Просмотр файла skins/tpl/index_cat_view.tpl

Размер файла: 2.63Kb
<!-- START ./index_cat_view.tpl -->
<div class="all">
	<div class="title">
	<?=$lng_arr['ANNOUNCEMENT']?>
	</div>
	<div class="title">
		<a href="./?index=add_ann&amp;<?=SID?>">
		<?=$lng_arr['ADD_ANN']?></a>
	</div><br/>
	
	<form action="./" method="get"><div class="form">
	<?=$lng_arr['SEARCH']?><br/>
	<input type="text" name="s" maxlength="30"/><br/>
	<input type="submit" value="<?=$lng_arr['SEARCH_GO']?>"/>
	<input type="hidden" name="index" value="search"/>
	<input type="hidden" name="<?=session_name()?>" value="<?=session_id()?>"/>
	</div></form>
	
	<?php if($cat = $mysqli->query($viewCat)){
	$cat = $cat->fetch_assoc();?>
	<div class="title"><?php echo htmlspecialchars($cat['name'])." / ".bGetArrAct($cat['view_act'],(int)$_GET['ida'])?></div>
	
	
	<?php } if(($annRes = $mysqli->query($viewAnn)) && $mysqli->affected_rows>0){	
		while($ann = $annRes->fetch_assoc()){ ?>
		<div  class="row1">
			<?php echo bDate($ann['time_add']);?> <a href="./?index=ann_view&amp;idc=<?=$cat['id']?>&amp;ida=<?=(int)$_GET['ida']?>&amp;idann=<?=$ann['id']?>&amp;<?=SID?>">&gt;&gt;</a><br/>
			<?=htmlspecialchars($ann['text'])?><br/>
			<i><?=htmlspecialchars($ann['city'])?></i><br/>
			<?php if(!empty($ann['phone'])):?>
			<?=htmlspecialchars($ann['phone'])?><br/>
			<?php endif;?>
			<a href="./?index=send_mail&amp;idann=<?=$ann['id']?>&amp;<?=SID?>">
			<?=$lng_arr['SEND_MAIL']?></a>
			<br/>
			
			<!-- ADMIN START -->
			<?php if(acpAuth()):?><br/>
			<a href="./acp.php?edit_id=<?=$ann['id']?>&amp;index=edit_ann&amp;<?=SID?>" title="<?=$lng_arr['ADMIN_EDIT']?>">[ E ]</a> 
			<a href="./acp.php?edit_id=<?=$ann['id']?>&amp;idc=<?=$ann['idc']?>&amp;ida=<?=$ann['ida']?>&amp;index=del_ann&amp;<?=SID?>" title="<?=$lng_arr['ADMIN_DEL']?>">[ X ]</a> 
				<?php if($ann['paid']=='0'):?>
					<a href="./acp.php?edit_id=<?=$ann['id']?>&amp;index=unset_paid_ann&amp;<?=SID?>" title="<?=$lng_arr['ADMIN_DEL_PAID']?>">[ $- ]</a> 
				<?php elseif($ann['paid']=='1'):?>
					<a href="./acp.php?edit_id=<?=$ann['id']?>&amp;index=set_paid_ann&amp;<?=SID?>" title="<?=$lng_arr['ADMIN_ADD_PAID']?>">[ $+ ]</a> 
				<?php endif;?>
			<?php endif;?>
			<!-- ADMIN END -->
			
		</div>
		<?php } } 
		else {?>
		<div  class="row1">
		<?=$lng_arr['NO_ANNOUNCEMENT']?><br/>
		</div>
	<?php }?>
	
	<?php bViewNavigation((int)$_GET['p'],$countAnn);?>
	<!--<div class="title"><?php echo htmlspecialchars($cat['name'])." / ".bGetArrAct($cat['view_act'],(int)$_GET['ida'])?></div>-->
	<br />
	
	<div class="title">
		<a href="./?index=add_ann&amp;<?=SID?>">
		<?=$lng_arr['ADD_ANN']?></a>
	</div>
</div>
<!-- END ./index_cat_view.tpl -->