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

Размер файла: 2.73Kb
<!-- START ./index_ann_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"><a href="./?index=cat_view&amp;idc=<?=$cat['id']?>&amp;ida=<?=(int)$_GET['ida']?>&amp;<?=SID?>">
	<?php echo htmlspecialchars($cat['name'])." / ".bGetArrAct($cat['view_act'],(int)$_GET['ida'])?></a></div>
	
	
	<?php } if(($annRes = $mysqli->query($viewAnn)) && $mysqli->affected_rows>0){	
			$ann = $annRes->fetch_assoc(); ?>
		<div  class="row1">
			<?php echo bDate($ann['time_add']);?><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>
			<?php if(!empty($ann['url'])) echo "<br/>http://".htmlspecialchars($ann['url']);?><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 $annRes->close(); } 
		else {?>
		<div  class="row1">
		<?=$lng_arr['NO_ANNOUNCEMENT']?>
		</div>
	<?php }?>
	
	<!--<div class="title"><a href="./?index=cat_view&amp;idc=<?=$cat['id']?>&amp;ida=<?=(int)$_GET['ida']?>&amp;<?=SID?>">
	<?php echo htmlspecialchars($cat['name'])." / ".bGetArrAct($cat['view_act'],(int)$_GET['ida'])?></a></div>-->
	<br />
	
	<div class="title">
		<a href="./?index=add_ann&amp;<?=SID?>">
		<?=$lng_arr['ADD_ANN']?></a>
	</div>
</div>
<!-- END ./index_ann_view.tpl -->