Location: PHPKode > projects > Esvon Personals > esvon-personals/tpl/admin/pay_plan_add.htm
<!-- IF_TITLE: ##is_edit##, Edit Price Plan, Add Price Plan -->

<form method=post name=frm onSubmit="return ValidateForm()">

<script language="Javascript">
<!--
 
 function ValidateForm(){
   var f = document.frm;
   var err_msg = '';
   if(!(parseInt(f.exp_days.value)>0)) err_msg = '"Expires" value must be > 0';
   if(err_msg) { alert(err_msg); return false; }
   return CheckExtraValues();
 }
 
 function CheckExtraValues() {
   
   var block = 'OPT_VAL';
   var opt,ctl_en;  
   var el = document.frm.elements;
   
   for (var i=0; i<el.length; i++) {
     if (el[i].name.substr(0,block.length)== block){
       opt = el[i].name.replace('OPT_VAL','EN_OPT');
       ctl_en = document.frm.elements(opt);
       if((el[i].type=='text' || el[i].type=='select-one') && el[i].value!="" && !ctl_en.checked) {
         alert('To save extra option value please make this option active!');
         el[i].focus();
         return false;
       }
     }
   }
   return true;
 }

-->
</script> 

<center>

<table border="0" cellspacing="0" cellpadding=0 width=500>
<tr>
<td colspan=2>
<font class=txt8 color=0000FF><b>* Bold fields are required</font>
</td>
</tr>
<tr>
<td width=170><b>ID</td>
<td width=330>

<!-- IF ##is_edit## -->
##id##
<!-- ELSE --> 
<input name=id size=10 value="##id##" maxlength=10>
&nbsp;<font class=txt8 color=0000FF> Alphanumeric string, 10 chars max.
<!-- ENDIF -->


</td>
</tr>
<tr>
<td><b>Name</td>
<td><input name=name size=50 value="##name##"></td>
</tr>
<tr>
<td>Description</td>
<td><textarea name=descr cols=35 rows=3>##descr##</textarea></td>
</tr>
<tr>
<td><b>Type</b> <font class=txt8 color=0000FF>({Item} / {User})</td>
<td>##s_type##

<!-- IF ##is_edit## -->
<input type=hidden name=type value="##type##">
<!-- ENDIF -->

</td>
</tr>
<tr>
<td><b>Fee</td>
<td><input name=fee size=10 value="##fee##" ##en_fee##>
&nbsp;<font class=txt8 color=0000FF>Numbers and decimals (.) ONLY!
</td>
</tr>
<tr>
<td><b>Expires, days</td>
<td><input name=exp_days size=5 maxlength=4 value="##exp_days##">
&nbsp;<font class=txt8 color=0000FF><!--Set 0 to never expire this price plan-->
</td>
</tr>

<tr>
<td>Price plan to expire this price plan into</td>
<td><select name=pp_exp_into style="width:300">
<option value="">
##pp_exp_into##
</select>
</td>
</tr>

<tr>
<td>Enabled ?</td>
<td><input type=checkbox name=enabled ##enabled## value=1></td>
</tr>

<tr>
<td valign=top>Sample URL
</td>
<td valign=top><input name=pp_url size=50 value="##pp_url##">
<br>
<font color=0000FF class=txt8>
Optional URL to an image or a web page with price plan specific details.
Link to view this URL may appear in price plan order page.
</font>
</td>
</tr>

<!--
<tr>
<td>Icon URL</td>
<td><input name=pp_icon_url size=40 value="##pp_icon_url##"></td>
</tr>
-->

<tr>
<td><b>Realm</td>
<td>
<select name=realm>
##s_realm##
</select>
</td>
</tr>

<!-- IF ##type## == "SUB" -->

<tr>
<td><b>Disabled {Item} Plans</b>
<br />
<font class=txt8 color=0000FF>Please select Ad Plans disabled for member having this plan.
Hold CTRL button to (un)select multiple plans.
</td>
<td>
<select name=pp_sub_fee[] multiple>
##s_sub_fee##
</select>
</td>
</tr>

<!-- ENDIF -->

<tr>
<td><b>Weight</td>
<td><input name=weight size=5 maxlength=4 value="##weight##">
&nbsp;<font class=txt8 color=0000FF>
</td>
</tr>

<tr>
<td colspan=2>
<hr size=1>
<table border=0 width="100%">

<!-- TPL_INSERT : extra -->

<!-- TPL_CELL : start -->
<tr>
<td colspan=4 class=txt8><font color=0000FF>
Optionally you can have the following Extra Options as part of this price plan.<br />
If you activate any options below, users won't have to pay for these options additionally, 
users will get them automatically by purchasing this price plan.<br />

<!-- IF ##type## == "FEE" -->
Users can pay fee for extra options ({ex_FEAT}, {ex_WEIGHT}, 
{ex_VIS}, {ex_COLOR}) 
separately from price plan ordering, you can specify extra options prices
<a href="index.php?page=extra_opts">here</a>
<!-- ENDIF -->

</td>
</tr>
<tr bgcolor=000000>
<td class=txt8>&nbsp;<font color=FFFFFF><b>Extra Options&nbsp;</td>
<td class=txt8 width="1%">&nbsp;<font color=FFFFFF><b>Possible<br />&nbsp;Values</td>
<td class=txt8 width="1%">&nbsp;<font color=FFFFFF><b>Value</td>
<td class=txt8 width="1%">&nbsp;<font color=FFFFFF><b>Active?</td>
</tr>
<!-- /TPL_CELL : start -->

<!-- TPL_CELL : row -->
<tr>
<td class=txt8><b>##f_t##</td>
<td class=txt8>##o_sample##</td>
<td><center><input name=OPT_VAL[##oid##] value="##opt_val##" size=8></td>
<td><center><input type=checkbox name=EN_OPT[##oid##] value=1 ##en_opt##></td>
</tr>
<!-- /TPL_CELL : row -->

<!-- TPL_CELL : text -->
<tr>
<td colspan=3>

<table border=0 width="100%" cellpadding=0 cellspacing=0>
<tr>
<td class=txt8><b>##f_t##</td>
<td class=txt8>##o_sample##</td>
<td align=right>
<input name=OPT_VAL[##oid##] value="##opt_val##" size=50 style="font-size:8pt">
</td>
</tr>
</table>

</td>
<td><center><input type=checkbox name=EN_OPT[##oid##] value=1 ##en_opt##></td>
</tr>
<!-- /TPL_CELL : text -->

<!-- TPL_CELL : custom -->
<tr>
<td colspan=3>

<table border=0 width="100%" cellpadding=0 cellspacing=0>
<tr>
<td class=txt8><b>##f_t##</td>
<td class=txt8>##o_sample##</td>
<td align=right>
##opt_val##
</td>
</tr>
</table>

</td>
<td><center><input type=checkbox name=EN_OPT[##oid##] value=1 ##en_opt##></td>
</tr>
<!-- /TPL_CELL : custom -->

<!-- TPL_CELL : chk -->
<tr>
<td class=txt8><b>##f_t##</td>
<td class=txt8>##o_sample##</td>
<td><input type=hidden name=OPT_VAL[##oid##] value="Y"></td>
<td><center><input type=checkbox name=EN_OPT[##oid##] value=1 ##en_opt##></td>
</tr>
<!-- /TPL_CELL : chk -->

<!-- /TPL_INSERT : extra -->

</table>

</td>
</tr>
<tr height=30>
<td>&nbsp;</td>
<td>
<input type=submit name=go value=" Save " 
class=button><input type=button value="Cancel" class=button 
onClick="document.location='index.php?page=pay_plans'">

</td>
</tr>

</table>

</center>

</form>
Return current item: Esvon Personals