<!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={$cfg['charset']}" />
<meta http-equiv="Content-Language" content="{$cfg['charset']}" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<meta name="keywords" content="{$c_keywords}" />
<meta name="description" content="{$c_description}" />
<title>{$c_name}-{$cfg['sitetitle']}</title>
<link href="{$cfg['siteurl']}{$cfg['path']}css/{$cfg['skin']}/common.css" rel="stylesheet" type="text/css">
<link rel="icon" href="{$cfg['path']}favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{$cfg['path']}favicon.ico" type="image/x-icon" />
<script language="javascript">
<!--
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
String.prototype.lenB=function(){
return this.replace(/[^\x00-\xff]/g,"**").length;
}
function Juge(theForm)
{
  if (fnRemoveBrank(theForm.username.value) == "")
  {
    alert("请输入用户名/呢称!");
    theForm.username.focus();
    return (false);
  }
  var objv = fnRemoveBrank(theForm.email.value);
  var pattern = /^([a-zA-Z0-9_-])+(\.([a-zA-Z0-9_-])+)*@([a-zA-Z0-9_-])+(\.([a-zA-Z0-9_-])+)+$/;
  flag = pattern.test(objv);
  if(!flag)
  {
    alert("电子邮件：格式不正确！请重新输入。");
	theForm.email.focus();
	return (false); 
  }
  if (fnRemoveBrank(theForm.title.value) == "")
  {
    alert("请输入留言主题!");
    theForm.title.focus();
    return (false);
  } 
  if (fnRemoveBrank(theForm.Content.value) == "")
  {
    alert("请输入留言内容!");
    theForm.Content.focus();
    return (false);
  }
  if ((theForm.Content.value).lenB()>=2000)
  {
	 alert("留言内容太长了，要求不多于2000个字符!");
	 theForm.Content.focus();
	 return (false);
  } 
 }
 //-->
</script>
</head>
<body>
{$FR_网站标准头}
<div class="navb">
	<div class="navdh"><li> 您现在的位置：<a href="{$cfg['siteurl']}">{$cfg['sitename']}</a> >> 客服中心 >> {$c_name}</li></div>
</div>
<div class="container">
	<div class="guestbookleft">
		<div class="tit"><span></span>关于我们</div>
		<div class="con">{getsitebottomnav(1)}</div>
	</div>
	<div class="guestbook">
		<div class="tit"><span></span>用户留言列表</div>
		<div class="con">
            <div class="helpsearch"><font style="font-size: 14px; font-weight: bold;">欢迎您在此处留下您宝贵的意见或建议，非常感谢！</font>　　<input name="Submit22" type="button" class="inputcl" value="给管理员留言" onclick="window.location='#w'" />　　<input name="Submit4" type="button" class="inputcl" value="查看帮助信息" onclick="window.location='../help/index.php'" /></div>
            <div style="margin-top: 10px;"><table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#e1e6e9">
			<!--{php $counts = $db->counter($cfg['tb_pre']."guestbook","g_pass=1 and g_type=0");}-->
			<!--{php $getpageinfo = page($page,$counts,$cfg['path']."guestbook/index.php",10,5);}-->
			<!--{php $sql="select g_id,g_title,g_content,g_username,g_addtime from ".$cfg['tb_pre']."guestbook where g_pass=1 and g_type=0 order by g_addtime desc";}-->
			<!--{php $sql.=$getpageinfo['sqllimit'];}-->
			<!--{php $query=$db->query($sql);$gblist=array();}-->
            <!--{php while($row=$db->fetch_array($query)){}-->
            <!--{php $gblist[]=$row;}-->
            <!--{php }}-->
            {loop $gblist $a}
                <tr bgcolor="#FFFFff">
                    <td><b>留言主题：{$a[g_title]}</b></td><td width="100"><b>留言人：{$a[g_username]}</b></td><td width="100">{dtime(strtotime($a['g_addtime']),3)}</td>
                </tr>
                <tr bgcolor="#FFFFff">
                    <td colspan="3" valign="top" style="border-bottom:2px solid #e1e6e9"><b>留言内容：</b>{$a[g_content]}
                    <!--{php $gbrelist=array();$querys=$db->query("select r_username,r_content,r_addtime from ".$cfg['tb_pre']."reply where r_gid=".$a[g_id]." order by r_addtime desc");}-->
                    <!--{php while($rows=$db->fetch_array($querys)){}-->
                    <!--{php $gbrelist[]=$rows;}-->
                    <!--{php }}-->
                    {loop $gbrelist $r}
                    <div class="guestbookreply"><b><font color="red">{$r[r_username]}于{$r[r_addtime]}回复：</font></b>{$r[r_content]}</div>
                    {/loop}
                </td>
                </tr>
            {/loop}
			<tr>
			<td colspan="3" align="center" valign="middle" bgcolor="#FFFFFF">{$getpageinfo['pagecode']}</td>
			</tr>
			</table></div>
        </div>
       	<div>
		<div class="tits">在线提交留言内容<a name="w"></a></div>
		<div class="con">
        {if $cfg['gbenablevisitor']==1||_getcookie("user_login")!=''}
            <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#F5F5F5">
            <form name="guestbook" action="{$cfg['path']}guestbook/index.php?do=add" method="post" onsubmit="return Juge(this)">
                <tr>
                    <td width="11%" align="center" valign="middle" bgcolor="#FFFFFF">用户名/呢称</td>
                    <td width="89%" valign="top" bgcolor="#FFFFFF"><input name="username" type="text" id="username" value="{$memberlogin}" size="20"{$disabled} />
                    <input type="hidden" name="ismember" value="" /><a href="{$cfg[path]}register.php">注册</a>/<a href="{$cfg[path]}index.php">登陆</a> </td>
                </tr>
                <tr>
                    <td align="center" valign="middle" bgcolor="#FFFFFF">邮箱地址</td>
                    <td valign="top" bgcolor="#FFFFFF"><input name="email" type="text" id="email" value="{$memberemail}" size="20" />
                    请正确填写您常用的邮箱地址<input name="emailok" type="checkbox" id="emailok" value="1" checked="checked" />
                    选择 管理员回复后将发邮件通知您</td>
                </tr>
                <tr>
                    <td align="center" valign="middle" bgcolor="#FFFFFF">留言主题</td>
                    <td valign="top" bgcolor="#FFFFFF"><input name="title" type="text" id="title" size="40" /></td>
                </tr>
                <tr>
                    <td align="center" valign="middle" bgcolor="#FFFFFF">留言内容</td>
                    <td valign="top" bgcolor="#FFFFFF"><textarea name="content" cols="80" rows="8" id="content"></textarea></td>
                </tr>
                <tr>
                {if $veriArray[3]==1}
                <tr>
                    <td align="center" valign="middle" bgcolor="#FFFFFF">验证码</td>
                    <td valign="top" bgcolor="#FFFFFF"><input type="text" name="verifycode" size="10" title="输入右侧图片所示字符,不区分大小写" /> <img src="{$cfg[path]}inc/verifycode.php"  alt="验证码,看不清楚?请点击刷新验证码" align="absmiddle" style="cursor : pointer;" onclick="this.src=this.src+'?'+Math.random();" /></td>
                </tr>
                {/if}
                <tr>
                    <td align="center" valign="middle" bgcolor="#FFFFFF">&nbsp;</td>
                    <td valign="top" bgcolor="#FFFFFF">
                    <input name="Submit" type="submit" class="inputs" value="我写好了" />
                    <input name="Submit" type="reset" class="inputs" value="重置" />
                    </td>
                </tr></form>
            </table>
        {else}
            暂未开启游客留言功能，请<a href="{$cfg[path]}register.php">注册</a>/<a href="{$cfg[path]}index.php">登陆</a>后留言！
        {/if}
        </div>
	</div>
	</div>
</div>
<div class="container">
	<div class="copyright"><center>{$FR_版权信息}</center></div>	
</div>
</body>
</html>