<!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">
<head>
<meta   http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta   http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>留言中心 - <jcms:site.name/></title>
<script type="text/javascript" src="{site.Dir}_libs/jquery.tools.pack.js"></script>
<script type="text/javascript" src="{site.Dir}_data/jcmsV4.x.js"></script>
<link   type="text/css" rel="stylesheet" href="{site.Dir}_data/jcmsV4.x.css" />
<script type="text/javascript" src="{site.Dir}extends/feedback/styles/common.js"></script>
<link   type="text/css" rel="stylesheet" href="{site.Dir}themes/<jcms:site.page.theme/>/css/global.css" id="cssTheme" />
<link   rel="stylesheet" href="images/face/images/face.css" type="text/css"><!--表情样式-->
<script src="images/face/images/face.core.js" type="text/javascript"></script>
<script src="images/face/images/face.js" type="text/javascript"></script>
<style  type="text/css">
<!--
/*---------------留言中心*/
.feedbackbar {
	width:{$ThemeBodyWidth/1-14}px;
	font-size:12px;
	border:1px solid {$ThemeBorderColor};
	margin-top:0px;
}
.feedbackbar .feedbacktitle{
	width:{$ThemeBodyWidth/1-16}px;
	height:26px;
	margin:1px auto;
	background:url({site.Dir}themes/<jcms:site.page.theme/>/images/place_bg.gif) bottom repeat-x;
	border-bottom:1px solid {$ThemeBorderColor};
}
.feedbackbar .feedbacktitle .title{
	float:left;
	margin:5px 0px 0px 12px;
	color: {$ThemeTitleColor};
	display:inline;
}
.feedbackbar .feedbacktitle .title strong{
	letter-spacing:4px;
	color: {$ThemeTitleColor};
	margin-right:10px;
}
.feedbackbar .feedbacktitle .gotopost{
	float:right;
	display:block;
	width:100px;
	height:23px;
}
.feedbackbar .feedbacktitle .gotopost a{
	width:95px;
	height:22px;
	display:inline;
	float:right;
	text-align:center;
	line-height:22px;
	text-decoration:none;
	background:url({site.Dir}style/common/gotopost.gif) no-repeat;
	margin:1px 3px 0px 0px;
}
.feedbackbar .feedbackbox{
	width:{$ThemeBodyWidth/1-24}px;
	margin:5px auto 0px;
	border:0;
	padding:0px;
}
.feedbackbar .feedbackbox .feedbackbody{
	width:{$ThemeBodyWidth/1-34}px;
	margin:5px auto;
	border:1px solid {$ThemeBorderColor};
}
.feedbackbody .right img { width: expression(this.width > {$ThemeBodyWidth/1-264} ? {$ThemeBodyWidth/1-264} : true); max-width: {$ThemeBodyWidth/1-264}px; }
.feedbackbody .right img { height: expression(this.height > 200 ? 200 : true); max-height: 20 }

.feedbackbar .feedbackbox .left {
	background:{$ThemeTintBackground};
}
.feedbackbar .feedbackbox .left dl dt{
	width:100%;
	text-align:left;
	background:{$ThemeTintBackground};
	height:25px;
	line-height:25px;
	text-indent:5px;
}
.feedbackbar .feedbackbox .left dl dd{
	padding:10px;
	text-align:center;
	font-size:13px;
	line-height:25px;
}
.feedbackbar .feedbackbox .leftbar {
	width:120px;
}
.feedbackbar .feedbackbox .leftbar li{
	float:left;
	width:60px;
}
.feedbackbar .feedbackbox .leftbar li.message{
	height:25px;
	line-height:25px;
	text-indent:12px;
	background:url({site.Dir}style/common/ico_message.gif) 0px 4px no-repeat;
}
.feedbackbar .feedbackbox .leftbar li.friend{
	height:25px;
	line-height:25px;
	text-indent:12px;
	background:url({site.Dir}style/common/ico_friend.gif) 0px 4px no-repeat;
}
.feedbackbar .feedbackbox .right dl dt{
	width:100%;
	height:25px;
	line-height:25px;
	text-indent:5px;
	border-bottom:1px dashed {$ThemeBorderColor};
}
.feedbackbar .feedbackbox .right dl dt span.a{
	font-size:12px;
	float:left;
}
.feedbackbar .feedbackbox .right dl dt span.b{
	font-size:12px;
	float:right;
	padding-right:10px;
	color:#669933;
	cursor:pointer;
}
.feedbackbar .feedbackbox .right dl dd{
	padding:10px;
	font-size:13px;
	line-height:25px;
}
.feedbackbar .feedbackbox .right .feedbackreply {
	border-top:1px dashed {$ThemeBorderColor};
}
.feedbackbar .posttitle{
	width:{$ThemeBodyWidth/1-16}px;
	height:26px;
	margin:10px auto;
	background:url({site.Dir}themes/<jcms:site.page.theme/>/images/place_bg.gif) bottom repeat-x;
	border-top:1px solid {$ThemeBorderColor};
	border-bottom:1px solid {$ThemeBorderColor};
}
.feedbackbar .posttitle strong{
	letter-spacing:4px;
	color: {$ThemeTitleColor};
	display:block;
	margin:7px 0px 0px 13px;
}
.feedbackbar .postbox{
	width:{$ThemeBodyWidth/1-16}px;
	margin:5px auto;
}

.feedbackbar .postbox .userbox{
	width:{$ThemeBodyWidth/1-47}px;
	margin:5px 0 5px 10px;
}
.feedbackbar .postbox .txtbox{
	width:{$ThemeBodyWidth/1-47}px;
	line-height:25px;
	margin:5px 0 5px 10px;
}
.feedbackbar .postbox .userbox dl{
	width:{$ThemeBodyWidth/1-47}px;
}
.feedbackbar .postbox .userbox dl dd{
	float:left;
	display:block;
	padding-bottom:2px;
}
.feedbackbar .postbox .txtbox input.title{
	width:230px;
	height:18px;
	border:1px solid {$ThemeBorderColor};
	padding:2px 5px 2px 5px;
}
.feedbackbar .postbox .userbox input.username{
	width:100px;
	font-size:13px;
	height:18px;
	border:1px solid {$ThemeBorderColor};
	margin-right:10px;
}
.feedbackbar .postbox .userbox input.password{
	width:100px;
	font-size:13px;
	height:18px;
	border:1px solid {$ThemeBorderColor};
	margin-right:10px;
}
.feedbackbar .postbox .userbox input.code{
	width:56px;
	font-size:13px;
	height:18px;
	border:1px solid {$ThemeBorderColor};
	margin-right:0px;
}
.feedbackbar .postbox .userbox dl dd.mtop{
	margin-left:3px;
}
.feedbackbar .postbox .txtbox textarea {
	border:1px solid {$ThemeBorderColor};
	width:99%;
	font-size:13px;
	height:100px;
	margin:0;
	padding:0px 5px 2px 0px;
}
.feedbackbar .postbox .userbox .s{
	width:63px;
	height:21px;
	margin:0px;
	background:url({site.Dir}themes/<jcms:site.page.theme/>/images/btn_feedback.gif) no-repeat;
	border:none;
	cursor:pointer;
}
.feedbackbar .postbox .userbox .l{
	width:63px;
	height:21px;
	margin:0px;
	background:url({site.Dir}themes/<jcms:site.page.theme/>/images/btn_loginin.gif) no-repeat;
	border:none;
}
.feedbackbar .postbox .userbox .r{
	width:63px;
	height:21px;
	margin:0px;
	background:url({site.Dir}themes/<jcms:site.page.theme/>/images/btn_register.gif) no-repeat;
	border:none;
}
-->
</style>
<script type="text/javascript">
/*
1=技术支持,2=反馈建议,3=投诉意见,4=其他
*/
var classid = q("classid") == "" ? "1" : q("classid");
var classname = "技术支持";
if(classid=="2")
	classname = "反馈建议";
else if(classid=="3")
	classname = "投诉意见";
else if(classid=="4")
	classname = "其他";

var CurrentUserId = "0";
var CurrentAdminId = "0";
(function(){
	$(document).ready(function() {
		$.ajax({
			type:		"get",
			dataType:	"json",
			data:		"time="+(new Date().getTime()),
			url:		site.Dir + "ajax/user.aspx?oper=ajaxUserInfo",
			error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
			success:	function(data){
				//数据绑定
				CurrentUserId = data.userid;
				CurrentAdminId = data.adminid;
				ajaxList(1);
				$(".classname").text(classname);
				$("#feedbackClassId").val(classid);
				if(data.username=="")
				{
					$("#feedbackName").val("匿名游客");
					$(".feedbackName").html("匿名游客");
					$("#guest_btn").show();
				}
				else{
					$("#feedbackName").val(data.username);
					$(".feedbackName").html(data.username);
					$("#guest_btn").hide();
				}
			}
		});
		$('#facecont1 ul').tabs({ fx: { opacity: 'toggle' } });
	});
})();
function ajaxList(page)
{
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"oper=ajaxList&classid="+classid+"&page="+page+"&pagesize="+ajaxPluginFeedbackPageSize+"&time="+(new Date().getTime()),
		url:		site.Dir + "extends/feedback/ajax.aspx",
		error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
		success:	function(d){
			switch (d.result)
			{
			case '0':
				alert(d.returnval);
				break;
			case '1':
				$("#ajaxList").setTemplateElement("tplList", null, {filter_data: false});
				$("#ajaxList").processTemplate(d);
				$("#ajaxPageBar").html(d.pagerbar);
				break;
			}
		}
	});
}
function SelectFace(img)
{
	var facetext="";
	facetext=img.src;
	var pos=facetext.lastIndexOf("/");
	facetext=facetext.substr(pos+1,facetext.length-pos);
	facetext=facetext.replace(".gif","");
	facetext="[img]"+facetext+"[/img]";
	var content=document.getElementById("feedbackContent");
	content.innerHTML += facetext;
}
function ExecuteFace(str)
{
	str=str.replace(/\[img\]QQ(\S+?)\[\/img\]/ig,"<img src=\"images/face/face_gif/QQ/QQ$1.gif\" />");/*QQ表情*/ 
	str=str.replace(/\[upload\](\S+?)\[\/upload\]/ig,"<center><a href=\"$1\"><img src=\"$1\" border=\"0\" /></a></center>");/*上传图片*/ 
	//str=str.replace(/\[img\]cc(\S+?)\[\/img\]/ig,"<img src=\"images/face/face_gif/xiaocc/cc$1.gif\"/>");/*悠嬉猴表情*/ 
	//str=str.replace(/\[img\]yc(\S+?)\[\/img\]/ig,"<img src=\"images/face/face_gif/yoyocici/yc$1.gif\"/>");/*洋葱头表情*/ 
	return str; 
}
function hideshow(o){
	var myvar = document.getElementById(o);
	if (myvar.style.display=="none")
	{
		gFace=true;
		myvar.style.display="";
	}else {
		gFace=false;
		myvar.style.display="none";
	}
}
</script>
</head>
<body>
<div class="jbody">
	<jcms:include file="~/_data/html/header.htm" />
	<!--~搜索条~-->
	<script type="text/javascript">document.write(_jcms_SearchBar());</script>
	<div class="main pbody">
		<div class="mybody">
			<div class="thispagenav mt5">
				<div class="title"></div>
				<div class="placenav"> <span>当前位置 :</span> <a href="{site.Dir}">首页</a>&nbsp;&raquo;&nbsp;留言中心&nbsp;&raquo;&nbsp;<span class="classname"></span></div>
			</div>
			<div id="ajaxPluginFeedback">
				<!--留言-->
				<div class="feedbackbar">
					<div class="feedbacktitle">
						<div class="title"> <strong>最新留言</strong></div>
						<div class="gotopost"> </div>
					</div>
					<div class="feedbackbox">
<textarea id="tplList" style="display:none">
{#foreach $T.table as record}<a name="c{$T.record.id}"></a>
<table class="feedbackbody">
	<tr>
		<td width="150" valign="top" class="left"><dl>
				<dt>{$T.record.username}</dt>
				<dd>
					<div><img src='{site.Dir}_data/avatar/{$T.record.userid}_l.jpg' onerror="this.src='{site.Dir}_data/avatar/0_l.jpg'" border='0' width="100" /></div>
					<div> {#if $T.record.userid != "0" && CurrentUserId !="0" && $T.record.userid != CurrentUserId}
						<ul class="leftbar">
							<li title="发信息给{$T.record.username}" class="message"><a href="javascript:void(0);" onclick="ajaxAddMessage('{$T.record.userid}','{$T.record.username}')">发信息</a></li>
							<li title="加{$T.record.username}为好友" class="friend"><a href="javascript:void(0);" onclick="ajaxAddFriend({$T.record.userid})">加好友</a></li>
						</ul>
						{#/if} </div>
				</dd>
			</dl></td>
		<td valign="top" class="right"><dl>
				<dt>
					<span class="a">留言时间：{$T.record.adddate}</span>
					{#if $T.record.replyuserid == "" || $T.record.replyuserid == "0"}
						{#if CurrentAdminId !="0" && $T.record.userid != CurrentAdminId}
						<span class="b" onclick="ajaxPluginFeedbackReply2({$T.record.id});">回复留言</span>
						{#/if}
					{#/if}
					{#if CurrentAdminId !="0"}
					<span class="b" onclick="ajaxPluginFeedbackDelete({$T.record.id});">删除留言</span>
					{#/if}
				</dt>
				<dd>
					<strong>{$T.record.title}</strong><br />
					<span style="word-break: break-all">{ExecuteFace($T.record.content)}</span>
					{#if $T.record.replyuserid != "" && $T.record.replyuserid != "0"}
						<div class="feedbackreply">
							<font color="#FF5500">{$T.record.replyusername} 的回复 {$T.record.replyadddate}</font> <br />
							<span style="word-break: break-all;"><font color="#FF5500">{ExecuteFace($T.record.replycontent)}</font></span>
						</div>
					{#/if}
				</dd>
			</dl></td>
	</tr>
	
</table>
{#/for} 
</textarea>
						<div id="ajaxList"><div style="margin:10px auto;width:32px;"><img src="{site.Dir}style/loading/01.gif" border="0"></div></div>
						<div id="ajaxPageBar" class="pages"></div>
						<div class="clear"></div>
					</div>
					<div class="posttitle"> <strong id="posttitle">发表留言</strong></div>
					<form method="post" id="form_feedback" name="form_feedback" action="">
						<div class="postbox">
							<div class="txtbox">
								<input type="hidden" name="feedbackClassId" id="feedbackClassId" value="1">
								<input type="hidden" name="feedbackParentId" id="feedbackParentId" value="0">
								<span class="feedbackName" style="font-weight:bold;"> </span>
								<span id="guest_btn" style="display:none;">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href="{site.Dir}passport/login.aspx">登录</a>]
										[<a href="{site.Dir}passport/register.aspx">注册</a>]
									</span><br />
								留言标题 <input name="feedbackTitle" id="feedbackTitle" type="text" maxlength="50" class="title" /><br />
								
							</div>
							<div class="txtbox">
							<div style="width:99%;">
						        <div class="face-div"  id="divFaceShow" onfocusout="hideshow('facecont1');">
							        <div class="face clearfix"> <span class="icon" onclick="hideshow('facecont1');"></span> <span class="select" ><a onclick="hideshow('facecont1');">更多表情</a></span> </div>
							        <div id="facecont1" class="face-list-div" style="display:none;">
								        <div class="face-close" title="关闭" onclick="hideshow('facecont1');"></div>
								        <ul class="face-nav">
									        <li><a href="#face_QQ"><span>QQ表情</span></a></li>
								        </ul>
								        <div id="face_QQ">
									        <div>
										        <div class="face-subnav">
											        <ul>
												        <li><a href="images/face/QQ01.html"><span>1</span></a></li>
												        <li><a href="images/face/QQ02.html"><span>2</span></a></li>
											        </ul>
										        </div>
									        </div>
								        </div>
							        </div>
						    </div>
						    </div>
							<div>
								<textarea name="feedbackContent" id="feedbackContent"></textarea></div>
							</div>
							<div class="userbox">
								<dl>
									<dd style="display:none;"> 用户名
										<input name="feedbackName" id="feedbackName" class="username" type="text" maxlength="20" />
									</dd>
									<dd> 校验码 <input name="feedbackCode" id="feedbackCode" class="code" type="text" maxlength="6" style="ime-mode:disabled;" onpaste="return false" />
										<img id="imgCode" onclick="this.src=_jcms_SetUrlRefresh('{site.Dir}plus/getcode.aspx');" src="{site.Dir}plus/getcode.aspx" align="absmiddle" style="cursor: pointer" alt="看不清楚？点击换一张" title="看不清楚？点击换一张" /><img id="imgRead" src="{site.Dir}style/common/maintb.gif" align="absmiddle" style="cursor: pointer" alt="收听校验码" title="收听校验码" onclick="PlayCodeVoice('player');" /><span id="player"></span></dd>
									<dd class="mtop">
										<input type="button" id="btnFeedbackAdd" name="btnFeedbackAdd" onclick="ajaxPluginFeedbackAdd();" value="" class="s" />
									</dd>
								</dl>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<div class="clear">
			<!--~清除浮动~-->
		</div>
	</div>
	<!--~页面底部~-->
	<jcms:include file="~/_data/html/footer.htm" />
</div>
<script type="text/javascript">get_user_status(0);</script>
<!--~~
<script>
var uploadnum = 0;
var uploadmax = 3;
var filename;
var posturl = '{site.Url}{site.Dir}extends/feedback/upfile.aspx';
var remotephoto;
var jObject = new ActiveXObject("JumbotCms.CaptureScreen");
if(jObject!=null){
	$('#btnCaptureScreen0').hide();
	$('#btnCaptureScreen1').show();
}
function Init()
{
	jObject.Init();
	JumbotCms.Loading.show("图片上传中...");
	filename = jObject.PhotoPath;
	Uploading();
	Uploaded();
	JumbotCms.Loading.hide();
}  
function Uploading(){
    jObject.Upload(filename,posturl);
    remotephoto = jObject.RemotePhoto;
}
function Uploaded(){
	if(remotephoto!="0" && remotephoto!="-1"){
		$('#feedbackContent').val($('#feedbackContent').val()+"\r\n[upload]"+remotephoto+"[/upload]");
		uploadnum++;
	}
	else{
		alert('图片上传失败');
	}
	if(uploadmax-uploadnum<1){//表示不允许上传了
		$('#btnCaptureScreen1').hide();
		$('#btnCaptureScreen0').show();
	}
}
</script>
~~-->
</body>
</html>
