Location: PHPKode > projects > Esvon Personals > esvon-personals/tpl/admin/cat_tree_list.htm
<!-- TITLE: Category & {Items} Management -->

<script type="text/javascript">

function del_item(lid){
  if(confirm('Delete {Item}?')) ActNav('dellink&lid='+lid);
}

function DelCats(){

   var block = 'chk_id';
   var el = document.frm.elements;
   var ids = '';
   for (var i=0; i<el.length; i++) {
     if (el[i].name.substr(0,block.length)== block && el[i].checked) ids+=el[i].value+",";
   }
   if(!ids) alert('No categories selected');
   else{
     if(confirm('Delete checked categories?')){ 
       document.frm.submdel.value = "Y";
       document.frm.submit();
     }
   }
}

function txtSwitchAll(){
  document.frm.chk_all.checked = !document.frm.chk_all.checked;
  SwitchItemsAdm('chk_id[]')
}

function ActNav(arg){
  document.location='##PAGE_URL##pid=##pid##&act=' + arg + '&token=##TOKEN##';
}

</SCRIPT>

<table width="100%" ALIGN=TOP>

<tr>
  <td height=12><b>Current category:</b>
  &nbsp; 
  <a href="##PAGE_URL##"><b>Home</b></a>

##cat_path## (##cat_items##)

  </td>
</tr>

<tr><td height=12><br />

<input type=button class=button value="Add" onClick="document.location='##PAGE_URL##pg=add&pid=##pid##'">

<!-- IF ##pid## -->
  <input type=button class=button value="Modify" onClick="document.location='##PAGE_URL##id=##pid##'">
  <input type=button class=button value="{Add_item}" onClick="document.location='index.php?page=add&cid=##pid##'">
  <input type=button class=button value="Add Related" onClick="document.location='index.php?page=cat_related&rel_id=##pid##'">
<!-- ENDIF -->

<input type=button value="Export" 
class=btnred OnClick="document.location='##PAGE_URL##pg=export&pid=##pid##'"><input type=button class=btnred value="Import" onClick="document.location='##PAGE_URL##pg=import&pid=##pid##'">

</td></tr>

<!-- IF ##numrecs## -->

<form method=post name=frm>

<input type=hidden name=token value="##TOKEN##">
<input type=hidden name=submdel value="">

<tr>
  <td><hr size=1 /><b>Categories:</b>

 &nbsp; 
 <input type=checkbox name=chk_all value=1 OnClick="SwitchItemsAdm('chk_id[]')">
 <a href="#" OnClick="txtSwitchAll()" class=txt8>Check / Uncheck All</a> |
 <a href="javascript:DelCats()" class=txt8>Delete Checked</a>

</td></tr>
<tr><td>

<!-- TPL_INSERT : row -->
<!-- TPL_CELL : def -->

<input type=checkbox value="##id##" name=chk_id[]> 

<b><a href="##PAGE_URL##pid=##id##">##name##</a></b>

<!-- IF ##EN_ADM_RES_NUM## -->
<i>(##cat_amt##)</i>
<!-- ENDIF -->

&nbsp; <font class=txt8><b>weight:</b> ##weight##</font>  &nbsp;
<a href="##PAGE_URL##id=##id##">modify</a><br />

<!-- /TPL_CELL : def -->
<!-- /TPL_INSERT : row -->

</td></tr>
</form>

<tr>
  <td align=center>##nav##</td>
</tr>

<!-- ENDIF -->

<tr>
  <td><hr size=1 /> <b>{Items}: </td>
</tr>
<tr><td>

<table width="100%" cellpadding=0 cellspacing=0>

<!-- TPL_INSERT : item -->
<!-- TPL_CELL : row -->

<tr height=50><td width=10></td><td>##num##. ##item_title## &nbsp;<font class=txt8>

<!-- IF ##approved## == "0" -->
 <font color=red><u>disabled</u></font>
<!-- ENDIF -->

<!-- IF ##hw_feat## -->
  <img src="../img/featured.gif" border=0>
<!-- ENDIF -->

<!-- IF ##EN_EXP_DATE## -->
  <!-- IF ##expired## -->
    <font color=red>expired</font>
  <!-- ENDIF -->
<!-- ENDIF -->

<br />
hits: <b>##hits##</b>
date: <b>##date##</b>
<br /><font face="Verdana, Arial, Helvetica, sans-serif">
   <a href="index.php?page=add&lid=##link_id##&cid=##pid##">edit</a>
 | <a href="javascript:del_item(##link_id##)">delete</a>
 | <a href="index.php?page=add&likeid=##link_id##&cid=##pid##">copy</a>
 | <a href="javascript:ActNav('##act_approve##&lid=##link_id##')">##act_approve##</a>
 | <a href="javascript:ActNav('##act_feat##&lid=##link_id##')">##act_feat##</a></td></tr>

<!-- /TPL_CELL : row -->
<!-- /TPL_INSERT : item -->


</table>
</td></tr>

<tr><td><center>##items_nav##</td></tr>

  <!-- IF ##items_amt## -->
    <tr><td><a href="javascript:ActNav('disable')"><b>Disable category</b></a> |
    <a href="javascript:ActNav('approve')"><b>Approve category</b></a></td></tr>
  <!-- ENDIF -->

<tr>
<form method=post name=rcats>
<input type=hidden name=go value=1>
<td>
<hr size=1 /><b>Related categories:</b><br />
<table border=0 cellpadding=0 cellspacing=0>


<!-- TPL_INSERT : rel_cat -->

<!-- TPL_CELL : row -->

<tr><td>##num##. <input type=checkbox name=ch_relcat[] value="##rid##">&nbsp; 
<b>Home > ##rel_cat##</td></tr>

<!-- /TPL_CELL : row -->

<!-- TPL_CELL : end -->
<tr><td height=25 valign=bottom><input type=submit name=rel_delcat value="Delete" class=button></td></tr>
<!-- /TPL_CELL : end -->

<!-- /TPL_INSERT : rel_cat -->


</table>
        </td>
        </form>
     </tr>
     <tr>
          <td>

<form method=post name=rlinks>

<input type=hidden name=go value=1>

<hr size=1 /><b>Related links:</b><br />

<!-- TPL_INSERT : rel_link -->
<!-- TPL_CELL : row -->

##num##. <input type=checkbox name=ch_rel[] value="##id##">&nbsp; <a

<!-- IF ##target## --> 
  target=##target## 
<!-- ENDIF -->

href="##url##">##rel_title##</a> 

<!-- IF ##target## --> 
<font size=1>(new window)</font>
<!-- ENDIF -->

<br />

<!-- /TPL_CELL : row -->
<!-- /TPL_INSERT : rel_link -->

<!-- IF ##pid## --> 

<br />
  Title: <input type=text name=rel_title size=17>&nbsp;
  Url: <input type=text name=rel_url size=15>&nbsp;
  Open in window: <select name=rel_tg>
  <option value="">the same
  <option value="_blank">new
 </select> <input type=submit name=rel_add value=" Add " 
class=button><input type=submit name=rel_del value="Delete" class=button>

<!-- ENDIF -->


<hr size=1 />
</form>
</td></tr>
</table>

Return current item: Esvon Personals