<?php 
error_reporting(0);
?>
<script type="text/javascript">
function changeimg()
{
var myimg = document.getElementById("code"); 
now = new Date(); 
myimg.src="source/ajax.php?ac=seccode&rand="+now.getTime();
}
</script>
  <div class="album_banner">
<?php
global $db;
if($key == "dj") {
    $sql="select CD_Name from " . tname('dj') . " where CD_ID='" . $id . "'";
	$type="dj";
	$name="音乐";
} elseif($key == "video") {
    $sql="select CD_Name from " . tname('video') . " where CD_ID='" . $id . "'";
	$type="video";
	$name="视频";
} else{ 
$sql="";
}
if($row=$db->Getrow($sql)){
?>
   <div style="color: #808080; margin: 10px 0px; font-size: 18px;">
如果当前<?php echo $name;?>页面中存在失效、错误、违法等信息，请提交给管理员处理。<br /><br />
<?php echo $name;?>报错：<?php echo $row['CD_Name'];?><br /><br /><br />
    <form action="?do=error&key=<?php echo $type;?>&id=<?php echo $id;?>" method="post">
     验证码：<input type="text" style="width: 50px;float: none;" class="input_normal" name="seccode" id="seccode" /> 
     <img id="code" alt="" src="source/ajax.php?ac=seccode&rand=" /> <a href="javascript:changeimg()" style="font-size: 12px;">看不清楚？换一张</a> <br /><br />
     <span style="margin-left:60px;" class="button-main"><span><input type="submit" value="确认提交" name="submitMe" class="btn btn-success"/></span></span>
<?php
$seccode=SafeRequest("seccode", "post");
if(isset($_POST['submitMe'])) {
    if($seccode == "") {
        echo '<span style="color: #CC0000;">请输入验证码！</span>';
    } else {
        if($seccode != $_SESSION["codes"]) {
            echo '<span style="color: #CC0000;">验证码错误，请重新输入！</span>';
        } else {
            updatetable('dj', array(
                'CD_Error'=>1
            ), array(
                'CD_ID'=>$id
            ));
            echo '<span style="color: #CC0000;">您的报错信息已提交，感谢您的反馈！</span>';
        }

    }
}
?>
     <br />
    </form> 
   </div> 
  </div> 
<?php }else{?>
   <div style="color: #808080; margin: 10px 0px; font-size: 18px;">
     <center>出错了，报错内容不存在！</center>
   </div>
<?php }?>
  </div> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/jquery/jquery.min.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/core.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/card.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/dialog.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/js/jquery/jquery.plugins.js"></script> 
  <script type="text/javascript" src="<?php echo cd_webpath?>user/static/space/js/common.js"></script> 
  <script type="text/javascript">listenMsg.start();nav.init();nav.userMenu();</script> 
<?php include_once('source/space_footer.php');?>
 </body>
</html>