File size: 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&<?=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&idc=<?=$cat['id']?>&ida=<?=(int)$_GET['ida']?>&idann=<?=$ann['id']?>&<?=SID?>">>></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&idann=<?=$ann['id']?>&<?=SID?>">
<?=$lng_arr['SEND_MAIL']?></a>
<br/>
<!-- ADMIN START -->
<?php if(acpAuth()):?><br/>
<a href="./acp.php?edit_id=<?=$ann['id']?>&index=edit_ann&<?=SID?>" title="<?=$lng_arr['ADMIN_EDIT']?>">[ E ]</a>
<a href="./acp.php?edit_id=<?=$ann['id']?>&idc=<?=$ann['idc']?>&ida=<?=$ann['ida']?>&index=del_ann&<?=SID?>" title="<?=$lng_arr['ADMIN_DEL']?>">[ X ]</a>
<?php if($ann['paid']=='0'):?>
<a href="./acp.php?edit_id=<?=$ann['id']?>&index=unset_paid_ann&<?=SID?>" title="<?=$lng_arr['ADMIN_DEL_PAID']?>">[ $- ]</a>
<?php elseif($ann['paid']=='1'):?>
<a href="./acp.php?edit_id=<?=$ann['id']?>&index=set_paid_ann&<?=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&<?=SID?>">
<?=$lng_arr['ADD_ANN']?></a>
</div>
</div>
<!-- END ./index_cat_view.tpl -->