<?php
if(!defined('R_P')) exit('Access Denied');
if( isset($_POST['id'])){
  $id=intval($_POST['id']);
  $r = qdb::Query("update `".TABLEPRE."download_{$channelid}` set error=1 where id='$id'", true);
  if($r) {
     echo "<script>alert('谢谢提供信息，我们会尽快检查');</script>";
     echo "<script language=javascript>window.close();</script>";
   }else{
     echo "<script>alert('抱歉数据库出了点意外,您的信息无法提交');</script>";
     echo "<script language=javascript>window.close();</script>";
   }

}else{
$id = intval($_GET['id']);
echo '
<html>
<head>
<title>error report</title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<style>
td{font-size:9pt;line-height:140%} 
body{font-size:9pt;line-height:140%} 
a:link          { color: #0033CC; text-decoration: none }
a:visited       { color: #0033CC; text-decoration: none }
a:active        { color: #FF0000; text-decoration: none }
a:hover         { color: #000000; text-decoration: underline}
</style>
</head>
<body topmargin="8">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="100%">
  <tr>
    <td width="100%" align="center">
    <form action="index.php?mod='.$channelid.'&ac=error" method="post" name="form">
      <input type=hidden  name=id value='.$id.'>
      <input type="submit" value="报告错误">
    </form>
    </td>
  </tr>
</table>

';
}
?>
</body>
</html>