{include file="header.tpl"}

<h3>Add Listing to {$group.name} list</h3>

{literal}
<script type="text/javascript">
function validate()
{
  var d = document.add_form;
  if (!d.name.value)
  {
    alert('Please enter your Site Name.');
    d.name.focus();
    return false;
  }
  if (!d.url.value)
  {
    alert('Please enter your Site URL.');
    d.url.focus();
    return false;
  }
  status = checkEmail(d.email.value);
  if (status > 0) {
    if (status == 1)
	    alert('Please, enter your E-mail address!');
    if (status == 2)
	    alert('Please, enter a valid E-mail address!');

    d.email.focus();
    return false;
  }

  return true;
}
function validate_phd()
{
  var d = document.phd_form;
  if (!d.phd_url.value.match(/^https?\:\/\//))
  {
    alert('Please enter your XML Url.');
    d.phd_url.focus();
    return false;
  }
  return true;
}

</script>
{/literal}

<div class="program_add">
{if $group.add_description}
<div class="description">
{$group.add_description}
</div>
{/if}

{if $errors}
<ul class="error">
{if $errors.turing}<li> Invalid turing image</li>{/if}
{if $errors.name}<li> Please enter your Site Name</li>{/if}
{if $errors.url}<li> Please enter your Site URL</li>{/if}
{if $errors.email}<li> Please enter your Contact E-mail</li>{/if}
{if $errors.invalid_email}<li> Please enter valid Contact E-mail</li>{/if}
</ul>
{/if}

<form method="post" name="phd_form" onsubmit="return validate_phd()" action="">
<input type="hidden" name="a" value="add">
<input type="hidden" name="action" value="phd">
<input type="hidden" name="type" value="{$frm.type}">
<table class="form">
<tr>
 <th>{t}Info XML URL (PHD):{/t}</th>
 <td><input type="text" name="phd_url" value=""></td>
</tr>
<tr>
  <th><a href="http://www.allhyipmonitors.com/about_phd.html" target="_blank">{t}What is it?{/t}</a></th>
  <td><input type="submit" value="{t}Submit{/t}" class=sbmt></td>
</tr>
</form>

<form method="post" name="add_form" onsubmit="return validate()" action="">
<input type="hidden" name="a" value="add">
<input type="hidden" name="action" value="save">
<input type="hidden" name="type" value="{$frm.type}">
<table class="form">
<tr>
 <th>{t}Site Name:{/t}</th>
 <td><input type="text" name="name" value="{$frm.name|escape:html}"></td>
</tr>
<tr>
 <th>{t}Site URL:{/t}</th>
 <td><input type="text" name="url" value="{$frm.url|escape:html}"></td>
</tr>
<tr>
 <th>{t}Contact E-mail:{/t}</th>
 <td><input type="text" name="email" value="{$frm.email|escape:html}"></td>
</tr>
<tr>
 <th>{t}Start Date:{/t}</th>
{if $frm.sYear}{assign var="sdate" value="`$frm.sYear`-`$frm.sMonth`-`$frm.sDay`"}{/if}
 <td>{html_select_date start_year="-5" prefix="s" time="`$sdate`" style="width:30%" reverse_years=1}</td>
</tr>
<tr>
 <th>{t}Interest Percents:{/t}</th>
 <td><textarea name="percents" cols=82 rows=5>{$frm.percents|escape:html}</textarea></td>
</tr>
<tr>
 <th>{t}Minimal Spend:{/t}</th>
 <td><input type="text" name="min_spend" value="{$frm.min_spend|escape:html}"></td>
</tr>
<tr>
 <th>{t}Maximal Spend:{/t}</th>
 <td><input type="text" name="max_spend" value="{$frm.max_spend|escape:html}"></td>
</tr>
<tr>
 <th>{t}Referral Bonus:{/t}</th>
 <td><input type="text" name="referral" value="{$frm.referral|escape:html}"></td>
</tr>
<tr>
 <th>{t}Withdrawal Type:{/t}</th>
 <td>
   <select name="withdrawal_type" class=inpts>
     <option value=1 {if $frm.withdrawal_type == 1}selected{/if}>{t}Manual{/t}</option>
     <option value=2 {if $frm.withdrawal_type == 2}selected{/if}>{t}Instant{/t}</option>
     <option value=3 {if $frm.withdrawal_type == 3}selected{/if}>{t}Automatic{/t}</option>
   </select>
 </td>
</tr>
<tr>
 <th>{t}Support E-mail:{/t}</th>
 <td><input type="text" name="support_email" value="{$frm.support_email|escape:html}"></td>
</tr>
<tr>
 <th>{t}Support Form:{/t}</th>
 <td><input type="text" name="support_form" value="{$frm.support_form|escape:html}"></td>
</tr>
<tr>
 <th>{t}Support Forum:{/t}</th>
 <td><input type="text" name="support_forum" value="{$frm.support_forum|escape:html}"></td>
</tr>
{section name=f loop=$forums}
<tr>
 <th>{t forum=$forums[f].acronim|escape}%forum Forum:{/t}</th>
 <td><input type="text" name="forums[{$forums[f].name|escape}]" value="{$forums[f].url|escape:html}"></td>
</tr>
{/section}
<tr>
 <th>{t}Support Phone:{/t}</th>
 <td><input type="text" name="support_phone" value="{$frm.support_phone|escape:html}"></td>
</tr>
<tr>
 <th>{t}Support AIM:{/t}</th>
 <td><input type="text" name="support_aim" value="{$frm.support_aim|escape:html}"></td>
</tr>
<tr>
  <th>{t}Payment Methods:{/t}</th>
  <td>
{section name=p loop=$payments}
  <div class="payment_systems">
   <input type="checkbox" name="payments[{$payments[p].name}]" value=1 {if $payments[p].selected}checked{/if}> <img src="{"`$theme`images/`$payments[p].name`.gif"|encurl}" alt="{$payments[p].name}">
  </div>
{/section}
  </td>
</tr>
<tr>
  <th>{t}Options:{/t}</th>
  <td>
{section name=p loop=$options}
  <div class="options">
   <input type="checkbox" name="options[{$options[p].name}]" value=1 {if $options[p].selected}checked{/if}> <img src="{"`$theme`images/`$options[p].name`.gif"|encurl}" alt="{$options[p].name}">
  </div>
{/section}
  </td>
</tr>
<tr>
  <th>{t}Description:{/t}</th>
  <td><textarea name="description" cols=82 rows=5>{$frm.description|escape:html}</textarea></td>
</tr>
{if $settings.use_turing}
<tr>
  <th><img src="{"?a=turing&`$sesname`=`$sesid`&r=`$rand`"|encurl}" alt="turing code"></th>
  <td><input type=text name="turing" maxlength=6 size=6></td>
</tr>
{/if}
<tr>
  <th></th>
  <td><input type="submit" value="{t}Add{/t}" class=sbmt></td>
</tr>
</table>
</form>
</div>

{include file="footer.tpl"}
