{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>{t}Report Scam{/t}</h3>

{if $errors}
<ul class="error">
{if $errors.turing}<li> {t}Invalid turing image provided{/t}</li>{/if}
{if $errors.email}<li> {t}Please enter your E-mail address{/t}</li>{/if}
{if $errors.invalid_email}<li> {t}Please enter a valid E-mail address{/t}</li>{/if}
</ul>
{elseif $frm.display == 'sent'}
<div class="ok">{t}Thank you. Your report has been sent to administrator.{/t}</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>{t}Your E-mail:{/t}</th>
 <td><input type="text" name="email" value="{$frm.email|default:$userinfo.email|escape:html}"></td>
</tr>
<tr>
 <th>{t}Report:{/t}</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="{t}Submit{/t}"></td>
</tr>
</form>
</table>

{include file="footer.tpl"}