<?php
require("e/class/connect.php");
require("e/class/db_sql.php");
require('e/data/dbcache/class.php');
$link=db_connect();
$empire=new mysqlquery();
$editor=0;
$id=(int)$_GET['id'];
$classid=(int)$_GET['classid'];
if(!$id||!$classid||!$class_r[$classid][tbname])
{

	printerror("链接错误","history.go(-1)",1,0,1);
}

$r=$empire->fetch1("select title,titleurl,id from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid' limit 1");
if(empty($r[id]))
{
	printerror("链接错误","history.go(-1)",1,0,1);
}
//分类
$cid=(int)$_GET['cid'];
$titleurl=substr($public_r['add_pcurl'],0,-1).$r[titleurl];
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn">
<head>
<title>反馈报错</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta name="robots" content="noindex,nofollow" />
<script type="text/javascript">
	window.$ = window.$ || function(o){return (typeof o == 'object') ? o : document.getElementById(o)};
	var formValid = {
		contentMaxLen : 240,
		run:function(){
			var err = "";
			var isValid = true;
			if(!this.valid_LinkAddress()){
				err += "请输入‘错误连接名称’;\n";
				isValid = false;
			}
			if(!this.valid_cid()){
				err += "请至少选择一项‘错误原因’;\n";
				isValid = false;
			}
			if(!this.valid_Content()){
				err += "请输入" + this.contentMaxLen + "字以内的‘正文’;\n";
				isValid = false;
			}
			if(!isValid){
				alert(err);
				return false;
			}
			return true;
		},
		valid_LinkAddress:function(){
			return $("txtLinkAddress").value.trim().length > 0;
		},
		valid_Mail:function(){
			var mail = $("txtMail").value;
			if(mail != ""){
				return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail);
			}
			return true;
		},
		valid_cid:function(){
			var objs = $("divcid").getElementsByTagName("input");
			for(var i = 0; i < objs.length; i++){
				if(objs[i].checked) return true;
			}
			return false;
		},
		valid_Content:function(){
			var valLen = $("txtContent").value.trim().length;
			return valLen <= this.contentMaxLen;
		},
		valid2setContent:function(){
			var contentObj = $("txtContent");
			if ( contentObj.value.length > this.contentMaxLen ) {
				contentObj.value = contentObj.value.substring( 0, this.contentMaxLen );
				return false;
			}
			return true;
		}
	};
	if(!String.prototype.trim){
		String.prototype.trim = function(){
			var val = this;
			while(val.indexOf(" ") == 0) val = val.substring(1);
			while(val.length > 0 & val.lastIndexOf(" ") == val.length - 1) val = val.substring(0, val.length - 1);
			return val;
		}
	}

</script>
<base target="_blank" />
</head>
<body>
<div id="subWp">
<div class="subBody">
<div class="subBox">
<h4 class="t2">反馈报错</h4>
<style type="text/css">
.subBox .form {padding:30px 0;}
.subBox .form table {font-size:13px;}
.subBox .form td {padding:3px 0 10px;line-height:20px;border-top:1px solid #fff;}
.subBox .form td.op {width:140px;padding:5px 3px 0 0;text-align:right;vertical-align:top;}
.subBox .form .val {color:#666;}
.subBox .form input.inp,
.subBox .form .val textarea {font-size:14px;padding:2px;}
.subBox .form input.inp {width:460px;}
.subBox .form .val textarea {width:550px;}
.subBox .form .typ {color:#009900;padding:0 0 4px;}
</style>
<div class="form">
<form name="form1" method="post" action="/e/enews/index.php" target="_self" onsubmit="return formValid.run();">
<input name="enews" type="hidden" id="enews" value="AddError">
        <input name="id" type="hidden" id="id" value="<?=$id?>">
        <input name="classid" type="hidden" id="classid" value="<?=$classid?>">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="op">错误名称：</td>
<td style="padding:5px 3px 0 0;vertical-align:top;font-weight:bold;"><?=$r[title]?></td>
</tr>
<tr>
<td class="op">错误连接：</td>
<td class="val"><input type="text" class="inp" name="linkaddress" id="txtLinkAddress" value="<?=$titleurl?>" size="50" /></td>
</tr>
<tr>
<td class="op">错误原因：</td>
<td class="val">
<div class="typ" id="divcid"><label for="err_typ_0"><input type="radio" id="err_typ_0" name="cid" value="1" />无法播放</label>&nbsp;&nbsp;<label for="err_typ_1"><input type="radio" id="err_typ_1" name="cid" value="2" />画面不对</label>&nbsp;&nbsp;<label for="err_typ_2"><input type="radio" id="err_typ_2" name="cid" value="3" />非常卡</label>&nbsp;&nbsp;<label for="err_typ_3"><input type="radio" id="err_typ_3" name="cid" value="4" />画面太模糊</label>&nbsp;&nbsp;<label for="err_typ_4"><input type="radio" id="err_typ_4" name="cid" value="5" />插件无法安装</label>&nbsp;&nbsp;<label for="err_typ_5"><input type="radio" id="err_typ_5" name="cid" value="6" />网页错误</label>&nbsp;&nbsp;<label for="err_typ_6"><input type="radio" id="err_typ_6" name="cid" value="0" />其它</label></div></td>
</tr>
<tr id="errcontent">
<td class="op">详细描述：</td>
<td class="val"><textarea name="errortext" id="txtContent" rows="8" cols="50"></textarea> 选填<br />
请将你的描述文字控制在<font color="#009900">240字以内</font>，更多内容请分次提交。
</td>
</tr>
<tr>
<td class="op">联系方式：</td>
<td class="val"><input type="text" class="inp" name="email" id="txtMail" value="" size="50" /> 选填<br />
QQ、MSN、邮件、手机、电话都可以，便于我们解决后联系您。</td>
</tr>

<tr>
<td class="op">&nbsp;</td>
<td class="btns"><input type="submit" name="addsubmit" value="提交" />&nbsp;<input type="reset" value="重置" /></td>
</tr>
</table>
</form>
</div>
</div><!-- subBox -->
</div><!--subBody-->
</div>
</body>
</html><?
db_close();
$empire=null;
?>