{include file="header.tpl"}

<script type="text/javascript">
{literal}
function checkReportScam()
{
  status = checkEmail(document.reportscam.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!');

    document.reportscam.email.focus();
    return false;
  }
  return true;
}
{/literal}
</script>

{include file="program_details.tpl"}

<h3>Report scam</h3>

{if $errors}
<ul class="error">
{if $errors.turing}<li> Invalid turing image.</li>{/if}
{if $errors.email}<li> Please enter your e-mail addresss.</li>{/if}
{if $errors.invalid_email}<li> Please enter valid e-mail address.</li>{/if}
</ul>
{elseif $frm.display == 'sent'}
<div class="ok">Thank you. Your report has been sent to administrator.</div>
<br><br>
{/if}
<form method="post" onsubmit="return checkReportScam()" name="reportscam" action="">
<input type=hidden name=a value=report_scam>
<input type=hidden name=action value=send>
<input type=hidden name=lid value={$listing.id}>
<table class="form">
<tr>
 <th>Your E-mail</th>
 <td><input type="text" name="email" value="{$frm.email|default:$userinfo.email|escape:html}"></td>
</tr>
<tr>
 <th>Report</th>
 <td><textarea name="report" cols=27 rows=4>{$frm.report|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="Submit"></td>
</tr>
</form>
</table>

{include file="footer.tpl"}