Location: PHPKode > projects > Esvon Personals > esvon-personals/tpl/account_items.htm
<!-- TITLE: My {Items} -->

<center>

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

##USER_MENU##

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

</center>

<script type="text/javascript">

function DelMultiReq(){
  if(!confirm('Delete Checked ?')) return;
  var f = document.frm;
  f.act.value = "delete";
  f.submit();
}

function DelReq(lid){
  if(!confirm('Delete ?')) return;
  var f = document.frm;
  var el = f.elements;
  var block = 'id[]';
  for (var i=0; i<el.length; i++) {
    if (el[i].name.substr(0,block.length)== block){ 
      el[i].checked = (el[i].value==lid);
    }
  }
  f.act.value = "delete";
  f.submit();
}

function SwitchMultiReq(){
  document.frm.chk_all.checked = ! document.frm.chk_all.checked;
  SwitchItemsUser();
}

function SwitchItemsUser(){
  SwitchItemsAdm('id[]');
  AdjustAmt();
}

function AdjustAmt(){
  var block = 'id[]';
  var amt = 0;
  var el = document.frm.elements;
  for (var i=0; i<el.length; i++) {
    if(el[i].name.substr(0,block.length)==block && el[i].checked) amt++;
  }
//  SwitchBlock('div_csv', amt>0);
  amt = '<b>'+amt+'</b>';
  var obj = document.getElementById('ch_amt');
  if(!obj) return;
  obj.innerHTML = amt;
//  obj.firstChild?obj.firstChild.data=txt:obj.appendChild(document.createTextNode(amt));
}

function switchAppr(id,appr){

 $.ajax({
   url: 'index.php',
   type: "POST",
   data: 'page=account&id='+id+'&act=switch&apr='+$( '#uappr_' + id ).val()+'&apr_adm='+appr+'&token=##TOKEN##&ajax=1',
   cache: false, 
   success: function(xml) {
     var msg = $("msg", xml).text();
     if(msg=='OK'){
       var id =  $("id", xml).text();
       var uappr = $( '#uappr_' + id ).val() =='1' ? '0' : '1' ;
       $( '#uappr_' + id ).val( uappr );
       var appr =  $("appr", xml).text();
       var s = '';
       if(uappr=='0') s = 'disabled'; 
       else if(appr=='0') s = 'not approved';
       if(s) s = '(' + s + ')';
       $( '#is_appr_' + id ).html(s);
     } 
     else alert(msg);
   }
 });

}

$(document).ready(function() {
  // global hook
  $.blockUI.defaults.message = '<h1>Please wait...</h1>'; // <img src="img/busy.gif" /> 
  $(document).ajaxStart($.blockUI).ajaxStop($.unblockUI);
});

</script> 

<form name=frm_my_listings_search>

<input type=hidden name=act value="">
<input type=hidden name=page value=account> 
<table cellpadding=0 width="100%" border=0><tr>
<td width="40%"><span class=pagetitle>My {Items}(##num_rows##)</span></td>
<td class=txt9 width="58%" nowrap><B>Item # or Title:</B>&nbsp;<INPUT name=q value="##q##"></td>
<td width="2%"><INPUT class=button type=submit value=Search name=go></td>
</tr></table>

</form>

<span class=err>
##err_msg##
</span>

<p>

<form name=frm method="post">

<input type=hidden name=act value="">
<input type=hidden name=page value=account> 
<input type=hidden name=token value="##TOKEN##">

<table cellpadding=0 width="100%" border=0>
<tr>
<td width="99%">

To modify {item} click on {item} link below.<br />

<font class=txt8><b>Actions:</b> &nbsp; 

[R] - Renew/Upgrade, 
[C] - Copy/Duplicate, 
[P] - Preview, 

<!-- IF ##EN_U_DEL## -->
[D] - Delete,
<!-- ENDIF -->

<!-- IF ##Mod_Pay_Per_Click## == "1" -->
[B] - Bid/Details,
<!-- ENDIF -->

<!-- IF ##Mod_Availability## == "1" -->
[A] - Availability,
<!-- ENDIF -->

[E] - Enable/Disable


</font>

</td>
<td width="1%" nowrap class=txt8 align=right>


Show 
<select name=ac_show_amt class=txt8>
<option value="">ALL
##ac_show_amt##
</select><input type=submit name=btn_amt value="OK" class=button style="font-size: 8pt;">
<br />

<!-- IF ##EN_U_DEL## -->
&nbsp; &nbsp; &nbsp; &nbsp;
<font color=blue>Check All</font> <input type=checkbox name=chk_all value=1 OnClick="SwitchItemsUser()">
<br />

<table border=0 cellpadding=0 cellspacing=0>
<tr><td class=txt8 nowrap>
Total {Items} Checked: 
</td><td><b><div id="ch_amt">0</div></b>
</td></tr>
</table>

<!-- ENDIF -->

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

<br />

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

<!-- TPL_INSERT : row -->

<!-- TPL_CELL : cat -->
<tr>
<td height=30 valign=bottom width="90%">
<font color=blue><b>
##cname##
</td>
<td width="1%" valign=bottom><center>
<nobr><b class=txt8>{ITEM} #
</td>
<td width="1%" valign=bottom><center>
<nobr><b class=txt8>&nbsp;HITS
</td>
<td width="1%" valign=bottom>
<nobr><b class=txt8>&nbsp;START DATE
</td>
<td width="1%" valign=bottom>
<nobr><b class=txt8>&nbsp;EXP. DATE
</td>
<td width="5%" valign=bottom>
<b class=txt8>&nbsp;ACTIONS
</td>
<td width="1%" valign=bottom>&nbsp;</td>
</tr>
<!-- /TPL_CELL : cat -->

<!-- TPL_CELL : item -->
<tr>
<td>

<a name="##lid##" href="index.php?page=modify&id=##lid##&cid=##catid####ex_p##">##f_title##</a>

<div id="is_appr_##lid##" style="color:red" class=txt8>
<!-- IF ##user_approved## != "1" -->
(disabled)
<!-- ELSEIF ##approved## != "1" -->
(not approved)
<!-- ENDIF -->
</div>

</td>
<td class=txt8><center>##lid##</td>
<td class=txt8><center>##hits##</td>
<td class=txt8><center><nobr>##hw_added##</td>
<td class=txt8><center><nobr>

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

##exp_date##</td>
<td nowrap>
<a title="Renew/Upgrade" href="index.php?page=order&id=##lid##&cid=##catid####ex_p##" class=txt8>[R]</a>
<a title="Copy/Duplicate" href="index.php?page=add&likeid=##lid##&cid=##catid####ex_p##" class=txt8>[C]</a>
<a title="Preview" href="#" OnClick="OpenPreview('index.php?page=out&id=##lid##&cid=##catid##&preview=yes##ex_p##')" class=txt8>[P]</a>

<a title="Enable/Disable" href="javascript:switchAppr(##lid##,##approved##)" class=txt8>[E]</a>

<input type=hidden id="uappr_##lid##" name="uappr_##lid##" value="##user_approved##">

<!-- IF ##EN_U_DEL## -->
<a title="Delete" href="javascript:DelReq('##lid##')" class=txt8>[D]</a>
<!-- ENDIF -->

<!-- IF ##Mod_Pay_Per_Click## == "1" -->
<a title="Bid/Details" href="modules.php?mod=Pay_Per_Click&pg=bid&id=##lid####ex_p##" class=txt8>
  
  <!-- IF ##hw_ppc_bided## --> 
  <font color=red>[B]</font></a>
  <!-- ELSE --> 
  [B]</a>
  <!-- ENDIF -->

<!-- ENDIF -->

<!-- IF ##Mod_Availability## == "1" -->
  <!-- IF ##show_av_link## -->
<a title="Availability" href="modules.php?mod=Availability&pg=edit&id=##lid####ex_p##" class=txt8>[A]</a>
  <!-- ENDIF -->
<!-- ENDIF -->

</td>

<td>

<!-- IF ##EN_U_DEL## -->
<center><input type=checkbox name=id[] value="##lid##" OnClick="AdjustAmt()">
<!-- ENDIF -->

</td>

</tr>
<!-- /TPL_CELL : item -->

<!-- TPL_CELL : ex_begin -->
<tr><td colspan=8>

<br />
<table celpadding=0 cellspacing=0 align=center width="90%" style="border: outset 1px">
<tr>
<th class=txt8 width="33%">Extra Options - ##lid##</th>
<th class=txt8 width="33%">Value</th>
<th class=txt8 width="33%">Exp. Date</th>
</tr>
<!-- /TPL_CELL : ex_begin -->

<!-- TPL_CELL : ex_elem -->
<tr>
<td class=txt8 align=center>##ex_name##</td>
<td class=txt8 align=center>##ex_val##&nbsp;</td>
<td class=txt8 align=center>

<!-- IF ##ex_dt_end## -->
<font class=txt8>##ex_dt_end##</font>
<!-- ELSE -->
&#151;
<!-- ENDIF -->

</td>
</tr>

<!-- /TPL_CELL : ex_elem -->

<!-- TPL_CELL : ex_end -->
</table>
<br />

<!-- /TPL_CELL : ex_end -->

<!-- /TPL_INSERT : row -->

</table>
<p>
<center>
##nav##
<p>

<b>

<a href="index.php?page=account">View All</a> 
| <a href="index.php?page=account&listing=active">View Active</a> 
| <a href="index.php?page=account&listing=expired">View Expired</a> 

<!-- IF ##EN_U_DEL## -->

  <br />
  <a href="javascript:SwitchMultiReq()">Check/Uncheck All</a>
| <a href="javascript:DelMultiReq()">Delete Checked</a>

<!-- ENDIF -->

</b>

</center>

</form>
Return current item: Esvon Personals