{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>Info XML URL (PHD):</th>
 <td><input type="text" name="phd_url" value=""></td>
</tr>
<tr>
  <th><a href="http://www.allhyipmonitors.com/about_phd.html" target="_blank">What is it?</a></th>
  <td><input type="submit" value="Submit" 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>Site Name:</th>
 <td><input type="text" name="name" value="{$frm.name|escape:html}"></td>
</tr>
<tr>
 <th>Site URL:</th>
 <td><input type="text" name="url" value="{$frm.url|escape:html}"></td>
</tr>
<tr>
 <th>Contact E-mail:</th>
 <td><input type="text" name="email" value="{$frm.email|escape:html}"></td>
</tr>
<tr>
 <th>Interest Percents:</th>
 <td><textarea name="percents" cols=82 rows=5>{$frm.percents|escape:html}</textarea></td>
</tr>
<tr>
 <th>Minimal Spend:</th>
 <td><input type="text" name="min_spend" value="{$frm.min_spend|escape:html}"></td>
</tr>
<tr>
 <th>Maximal Spend:</th>
 <td><input type="text" name="max_spend" value="{$frm.max_spend|escape:html}"></td>
</tr>
<tr>
 <th>Referral Bonus:</th>
 <td><input type="text" name="referral" value="{$frm.referral|escape:html}"></td>
</tr>
<tr>
 <th>Withdrawal Type:</th>
 <td>
   <select name="withdrawal_type" class=inpts>
     <option value=1 {if $frm.withdrawal_type == 1}selected{/if}>Manual</option>
     <option value=2 {if $frm.withdrawal_type == 2}selected{/if}>Instant</option>
     <option value=3 {if $frm.withdrawal_type == 3}selected{/if}>Automatic</option>
   </select>
 </td>
</tr>
<tr>
 <th>Support E-mail:</th>
 <td><input type="text" name="support_email" value="{$frm.support_email|escape:html}"></td>
</tr>
<tr>
 <th>Support Form:</th>
 <td><input type="text" name="support_form" value="{$frm.support_form|escape:html}"></td>
</tr>
<tr>
 <th>Support Forum:</th>
 <td><input type="text" name="support_forum" value="{$frm.support_forum|escape:html}"></td>
</tr>
{section name=f loop=$forums}
<tr>
 <th>{$forums[f].acronim|escape} Forum:</th>
 <td><input type="text" name="forums[{$forums[f].name|escape}]" value="{$forums[f].url|escape:html}"></td>
</tr>
{/section}
<tr>
 <th>Support Phone:</th>
 <td><input type="text" name="support_phone" value="{$frm.support_phone|escape:html}"></td>
</tr>
<tr>
 <th>Support AIM:</th>
 <td><input type="text" name="support_aim" value="{$frm.support_aim|escape:html}"></td>
</tr>
<tr>
  <th>Payment Methods:</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>Options:</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>Description</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="Add" class=sbmt></td>
</tr>
</table>
</form>
</div>

{include file="footer.tpl"}
