File size: 1.78Kb
<!-- START ./index_index.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>
<div class="title"><?=$lng_arr['CATEGORY']?></div>
<?php $catRes = $mysqli->query($viewCat);
while($cat = $catRes->fetch_assoc()){ ?>
<div class="row1">
<a href="./?index=index&idc=<?=$cat['id']?>&<?=SID?>">
<?=htmlspecialchars($cat['name'])?></a> [
<?=bParseCount($cat['num_ann'],"CALL")?>
]
<?php if(acpAuth()):?>
<a href="./acp.php?edit_id=<?=$cat['id']?>&index=edit_cat&<?=SID?>" title="<?=$lng_arr['ADMIN_EDIT']?>">[ E ]</a>
<?php endif;?>
</div>
<?php
if(is_numeric($_GET['idc']) && $cat['id']==$_GET['idc']){
foreach (bGetArrAct($cat['view_act']) as $k => $v){
if(!empty($v)) {?>
<div class="row2">
> <a href="./?index=cat_view&idc=<?=$cat['id']?>&ida=<?=$k?>&<?=SID?>"><?=$v?></a>
[
<?=bParseCount($cat['num_ann'],"CALL",$k,$cat['view_act'])?>
]
</div>
<?php } else echo "<div class=\"row2\">> Empty</div>";
}
}
} $catRes->close();
if($mysqli->affected_rows==0) {?>
<div class="row1"><?=$lng_arr['NO_CATEGORY']?></div>
<?php }?>
<br />
<div class="title">
<a href="./?index=add_ann&<?=SID?>">
<?=$lng_arr['ADD_ANN']?></a>
</div>
</div>
<!-- END ./index_index.tpl -->