{include file="header.tpl"}
<script language="javascript">
userAccounts = Array();
{section name=p loop=$useracs}
userAccounts['{$useracs[p].name}'] = '{$useracs[p].account}';
{/section}

{literal}
function procVote()
{
  d = document.vote;
  if (!d.email) return true;

  if (!d.email.value)
  {
    alert('Please, enter your E-Mail address!');
    d.email.focus();
    return false;
  }
  else
  {
    a = d.email.value.indexOf('@');
    b = d.email.value.indexOf('@', a+1);
    c = d.email.value.lastIndexOf('.');
    if (c < a+1) { c = -1; }
    if (a == -1 || b != -1 || c <= a + 2 || a < 1 || c + 2 >= d.email.value.length || c + 4 < d.email.value.length)
    {
      alert('Please, enter a valid E-Mail Address');
      d.email.focus();
      return false;
    }
  }
  return true;
}
function textCounter(field, countfield, maxlimit) {
 if (field.value.length > maxlimit){
    field.value = field.value.substring(0, maxlimit);
 }
 else {
       countfield.value = maxlimit - field.value.length;
     }
 }

function vrcbdate() {
  var d = document.rcb_form;
  if (!d.username.value) {
    alert('Please enter your user name.');
    d.username.focus();
    return false;
  }
  if (!d.psaccount.value) {
    alert('Please enter your Payment System Account');
    d.psaccount.focus();
    return false;
  }
  if (!d.deposit.value) {
    alert('Please enter your deposit.');
    d.deposit.focus();
    return false;
  }
  if (isNaN(d.deposit.value)) {
    alert('Please enter Number only.');
    d.deposit.select();
    return false;
   }   
  if (!d.email.value) {
    alert('Please, enter your E-Mail address!');
    d.email.focus();
    return false;
  }
  return true;
}

function setDefAccount() {
  obj = document.rcb_form.paysystem;
  objd = document.rcb_form.psaccount;
  if (!obj) return;
  i = obj.selectedIndex; o = obj.options;
  n = o[i].value;
  if (userAccounts[n]) objd.value = userAccounts[n];
  else objd.value = '';
}

{/literal}
</script>
<div class="box">
<div class="box_title" id="tba">PROGRAM DETAILS</div>
<div class="box_body">
{if $group.type == 'Exclusive'}
{include file="details_exclusive.tpl"}
{/if}
{if $group.type == 'Premium'}
{include file="details_premium.tpl"}
{/if}
{if $group.type == 'Normal'}
{include file="details_normal.tpl"}
{/if}
{if $group.type == 'Trial'}
{include file="details_trial.tpl"}
{/if}
{if $group.type == 'Free'}
{include file="details_free.tpl"}
{/if}
{if $group.type == 'Games'}
{include file="details_games.tpl"}
{/if}
{if $group.type == 'Scam'}
{include file="details_scam.tpl"}
{/if}
{if $group.type == 'Closed'}
{include file="details_closed.tpl"}
{/if}
<div class="dline"></div>
<div id="data_type">
{if $aj == 'button'}{include file="details_button.tpl"}
{elseif $aj == 'votes'}{include file="details_vote.tpl"}
{elseif $aj == 'paystat'}{include file="details_paystat.tpl"}
{elseif $aj == 'rcb'}{include file="details_rcb.tpl"}
<script>setDefAccount();</script>
{elseif $aj == 'whois'}{include file="details_whois.tpl"}
{elseif $aj == 'report_scam'}{include file="details_report_scam.tpl"}
{else}
<table width=100% border=0 align="center" cellpadding=3 cellspacing=0>
<tr><td colspan="2"><b>Ratings stats of {$listing.name}</b></td>
</tr>
<tr>
  <td width="12%" align="right">Very Good:</td><td width="13%"><img src="{"images/r3.gif"|encurl}" alt="Very Good" title="Very Good" align="absmiddle"> {$listing.votes_summary.3.count} votes</td>
  <td><img src="{"images/r_dot.gif"|encurl}" width="{$listing.votes_summary.3.percent}" height="10" align="absmiddle" title="{$listing.votes_summary.3.count} votes ({$listing.votes_summary.3.percent}%)"> ({$listing.votes_summary.3.percent}%)</td>
</tr>
<tr>
  <td align="right">Good:</td><td><img src="{"images/r2.gif"|encurl}" alt="Good" title="Good" align="absmiddle"> {$listing.votes_summary.2.count} votes</td>
  <td><img src="{"images/y_dot.gif"|encurl}" width="{$listing.votes_summary.2.percent}" height="10" align="absmiddle" title="{$listing.votes_summary.2.count} votes ({$listing.votes_summary.2.percent}%)"> ({$listing.votes_summary.2.percent}%)</td>
  </tr>
  <tr>
    <td align="right">bad:</td><td><img src="{"images/r1.gif"|encurl}" alt="Bad" title="Bad" align="absmiddle"> {$listing.votes_summary.1.count} votes</td>
    <td><img src="{"images/g_dot.gif"|encurl}" width="{$listing.votes_summary.1.percent}" height="10" align="absmiddle" title="{$listing.votes_summary.1.count} votes ({$listing.votes_summary.1.percent}%)"> ({$listing.votes_summary.1.percent}%)</td>
  </tr>
  <tr>
    <td align="right">very bad:</td><td><img src="{"images/r0.gif"|encurl}" alt="Very Bad" title="Very Bad" align="absmiddle"> {$listing.votes_summary.0.count} votes</td>
    <td><img src="{"images/b_dot.gif"|encurl}" width="{$listing.votes_summary.0.percent}" height="10" align="absmiddle" title="{$listing.votes_summary.0.count} votes ({$listing.votes_summary.0.percent}%)"> ({$listing.votes_summary.0.percent}%)</td>
</tr>
</table>

<br />
{if $votes}
<table cellspacing=0 cellpadding=2 border=0 width=100%>
<tr><td colspan="4" class="newlistingsdatetitle"><strong>User Votes</strong></td>
</tr>
<tr>
  <td align=center class=title><strong>Rating</strong></td>
  <td align=center class=title><strong>Voter IP</strong></td>
  <td align=center class=title><strong>User E-Mail</strong></td>
  <td align=center class=title><strong>Vote Date</strong></td>
</tr>

{section name=v loop=$votes}
<tr class={if $smarty.section.v.rownum % 2 == 0}detailsbg1{else}detailsbg2{/if}>
  <td align=center>
   {if $votes[v].vote == 0}<img src="{"images/r0.gif"|encurl}" alt="Very Bad" title="Very Bad">{/if}
   {if $votes[v].vote == 1}<img src="{"images/r1.gif"|encurl}" alt="Bad" title="Bad">{/if}
   {if $votes[v].vote == 2}<img src="{"images/r2.gif"|encurl}" alt="Good" title="Good">{/if}
   {if $votes[v].vote == 3}<img src="{"images/r3.gif"|encurl}" alt="Very Good" title="Very Good">{/if}
  </td>
  <td align=center><img src="{"images/c/`$votes[v].flag`.gif"|encurl}" align="absmiddle" alt="{$votes[v].flag}" title="{$votes[v].flag}" style="cursor:help;"> {$votes[v].ip}</td>
  <td align=center>{if $votes[v].username}{$votes[v].username}{else}{$votes[v].email}{/if}</td>
  <td align=center>{$votes[v].fdate}</td>
</tr>
{if $votes[v].comment}
<tr>
  <td colspan=4><img src="{"images/vcom.gif"|encurl}" alt=""> <font color="{if $votes[v].vote == 0}red{/if}{if $votes[v].vote == 1}orange{/if}{if $votes[v].vote == 2}#CBA903{/if}{if $votes[v].vote == 3}#008800{/if}">{$votes[v].comment}</td>
</tr>
{/if}
{/section}
</table>
{/if}
{/if}

</div>
</div></div>
{include file="footer.tpl"}