<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script language="javascript"> 

<!--屏蔽JS错误  

function killerrors() { 

return true; 

} 

window.onerror = killerrors; 

//--> 

</script>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />

<title>我的留言本 - 会员中心 - <?php echo $cfg_webname; ?></title>

<link href='/templets/default/css/style_web.css?v=f3a5c' media="screen, projection" rel="stylesheet" type="text/css" />

<link href="templets/style/base.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="templets/js/j.js"></script>

<script type="text/javascript" language='javascript' src='templets/js/main.js'></script>

<script type="text/javascript" language="javascript" src="../include/dedeajax2.js"></script>

<script type="text/javascript" src="templets/js/table_function.js"></script>

<script type="text/javascript" src="templets/js/leftmenu.js"></script>

<script type="text/javascript">

var reMethod = "<?php echo ($cfg_soft_lang == 'utf-8') ? 'POST' : 'GET';?>";

var pageno = 1;

var totalrow = <?php echo $totalRow; ?>;

var pagesize = <?php echo $pagesize; ?>;

var selitem = 0;

//加载列表

function ReloadPage(){

	$("#rslist").html("加载中...<br>[<a href=\"javascript:LoadPage('"+pageno+"')\"><u>点击此重新加载列表</u></a>]");	

	$.ajax({type: reMethod,url: "guestbook_admin.php",

		data: "dopost=getlist&pageno="+pageno,

		dataType: 'html',

		success: function(result){$("#rslist").html(result);}

	});

}

//载入指定页的列表

function LoadPage(npage){

	pageno = npage;

	ReloadPage();

	ReloadPageNum(pageno);

}

//删除留言

function DelNote(nid){

	if(!window.confirm('你确定要删除这则留言吗?'))

	{

		return false;

	}

	totalrow = totalrow - 1;

	var pagenum = Math.ceil(totalrow/pagesize);

	if(pagenum<=pageno) pageno = pagenum;

	$("#rslist").html("加载中...<br>[<a href=\"javascript:LoadPage('"+pageno+"')\"><u>点击此重新加载列表</u></a>]");

	

	$.ajax({type: reMethod,url: "guestbook_admin.php",

		data: "dopost=del&aid="+nid+"&pageno="+pageno,

		dataType: 'html',

		success: function(result){$("#rslist").html(result);}

	});	

	LoadPage(pageno);

}

//获得选中文项的ID

function getCheckboxItem()

{

	var allSel="";

	selitem = 0;

	if(document.form1.ids.value){

		selitem++;

		return document.form1.ids.value;

	}

	for(i=0;i<document.form1.ids.length;i++){

		if(document.form1.ids[i].checked){

			if(allSel=="") allSel=document.form1.ids[i].value;

			else allSel=allSel+","+document.form1.ids[i].value;

			selitem++;

		}

	}

	return allSel;

}

//批量删除留言

function DelNotes(){

	var listArea = $Obj('rslist');

	var aids = getCheckboxItem();

	if(selitem==0)

	{

		alert("你没选中任何内容！");

		return false;

	}

	if(!window.confirm('你确定要删除这些留言吗?'))

	{

		return false;

	}

	totalrow = totalrow - selitem;

	var pagenum = Math.ceil(totalrow/pagesize);

	if(pagenum<=pageno) pageno = pagenum;

	

	$("#rslist").html("加载中...<br>[<a href=\"javascript:LoadPage('"+pageno+"')\"><u>点击此重新加载列表</u></a>]");

	

	$.ajax({type: reMethod,url: "guestbook_admin.php",

		data: "dopost=del&ids="+aids+"&pageno="+pageno,

		dataType: 'html',

		success: function(result){$("#rslist").html(result);}

	});

	

	LoadPage(pageno);

}

//重新加载分页列表

function ReloadPageNum(startnum){

	var pagenum = Math.ceil(totalrow/pagesize);

	var listsize = 3;

	var ahtml = "";

	var startloop = 1;

	var endnum = 0;

	ahtml += "<span>共："+totalrow+" 条记录/"+pagenum+"页</span> ";

	if(pageno>1) ahtml += "<a href='#' onclick='LoadPage("+(pageno-1)+")'>↑上页</a> ";

	if(startnum >= pagenum-listsize){

		startloop = pagenum-(listsize*2);

		if(startloop<1) startloop = 1;

		for(i=startloop;i<=pagenum;i++){

			if(i==pageno) ahtml += "<span style='color:#555;font-weight:bold;'>"+i+"</span>";

			else ahtml += "<a href='#' onclick='LoadPage("+i+")'>"+i+"</a> ";

		}

	}

	else if(pagenum < listsize){

		for(i=1;i<=pagenum;i++){

			if(i==pageno) ahtml += "<span style='background:#006600; color:#FFFFFF;'>"+i+"</span>";

			else ahtml += "<a href='#' onclick='LoadPage("+i+")'>"+i+"</a> ";

		}

	}

	else{

		startloop = startnum-listsize;

		if(startloop<1){ startloop=1; endnum = startloop + (listsize*2); }

		else{ endnum = startnum+listsize; }

		if(endnum >= pagenum) endnum = pagenum;

		for(i=startloop;i<=endnum;i++){

			if(i==pageno) ahtml += "<span style='background:#006600; color:#FFFFFF;'>"+i+"</span>";

			else ahtml += "<a href='#' onclick='LoadPage("+i+")'>"+i+"</a> ";

		}

	}

	if(pageno<pagenum) ahtml += "<a href='#' onclick='LoadPage("+(pageno+1)+")'>下页↓</a> ";

	$('#pagelist').html(ahtml);

}

</script>

<script language="javascript" type="text/javascript" src="/include/dedeajax2.js"></script>

<script language="javascript" type="text/javascript">

<!--

function CheckLogin(tid){

LoadCommets(tid);

if(document.getElementById('qbpl'+tid).className=='comments'){

	  document.getElementById('qbpl'+tid).className='login';

}else{

	  document.getElementById('qbpl'+tid).className='comments';

	  var taget_obj = document.getElementById('_ajax_feedback'+tid);

	  myajax = new DedeAjax(taget_obj,false,false,'','','');

	  myajax.SendGet2("/member/ajax_feedback.php?aid="+tid);

	  DedeXHTTP = null;

	  document.getElementById('commetcontentNew'+tid).innerHTML='';

}



}



function postBadGood(ftype,fid)

{

	var taget_obj = document.getElementById(ftype+fid);

	var saveid = GetCookie('badgoodid');

	if(saveid != null)

	{

		var saveids = saveid.split(',');

		var hasid = false;

		saveid = '';

		j = 1;

		for(i=saveids.length-1;i>=0;i--)

		{

			if(saveids[i]==fid && hasid) continue;

			else {

				if(saveids[i]==fid && !hasid) hasid = true;

				saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);

				j++;

				if(j==10 && hasid) break;

				if(j==9 && !hasid) break;

			}

		}

		if(hasid) { alert('您刚才已表决过了喔！'); return false;}

		else saveid += ','+fid;

		SetCookie('badgoodid',saveid,1);

	}

	else

	{

		SetCookie('badgoodid',fid,1);

	}

	myajax = new DedeAjax(taget_obj,false,false,'','','');

	myajax.SendGet2("/feedback.php?aid="+fid+"&action="+ftype+"&fid="+fid);

}

function postDigg(ftype,aid)

{

	var taget_obj = document.getElementById('newdigg'+aid);

	var saveid = GetCookie('diggid');

	if(saveid != null)

	{

		var saveids = saveid.split(',');

		var hasid = false;

		saveid = '';

		j = 1;

		for(i=saveids.length-1;i>=0;i--)

		{

			if(saveids[i]==aid && hasid) continue;

			else {

				if(saveids[i]==aid && !hasid) hasid = true;

				saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);

				j++;

				if(j==20 && hasid) break;

				if(j==19 && !hasid) break;

			}

		}

		if(hasid) { alert("您已经顶过该帖，请不要重复顶帖 ！"); return; }

		else saveid += ','+aid;

		SetCookie('diggid',saveid,1);

	}

	else

	{

		SetCookie('diggid',aid,1);

	}

	myajax = new DedeAjax(taget_obj,false,false,'','','');

	var url = "/plus/digg_ajax.php?action="+ftype+"&id="+aid;

	myajax.SendGet2(url);

}

function getDigg(aid)

{

	var taget_obj = document.getElementById('newdigg'+aid);

	myajax = new DedeAjax(taget_obj,false,false,'','','');

	myajax.SendGet2("/plus/digg_ajax.php?id="+aid);

	DedeXHTTP = null;

}

-->

</script>

<script language="javascript" type="text/javascript">  var childWindow;  function toQzoneLogin()  {  childWindow =window.open("/plus/qzonelogin/redirect.php?gourl="+document.URL,"TencentLogin","width=450,height=320,menubar=0,scrollbars=1, resizable=1,status=1,titlebar=0,toolbar=0,location=1");  }  function closeChildWindow()  {  childWindow.close();  }  </script>

<script src="/plus/autohtml.php?mod=index" language="javascript" type="text/javascript"></script>

</head>

<body>

<div id="main">

  <?php include(DEDEMEMBER."/templets/head.htm"); ?>

  <div id="content" class="w960 clearfix">

    <?php include(DEDEMEMBER."/templets/menu.php"); ?>

    <div class="mainBox">

<div id="mcpmain">

      <div id="appTab">

        <ul>

          <li class="thisTab"><a href="#"><span>留言板</span></a></li>

        </ul>

        <div class="tabOther">

        <button id="checkedClick" type="button" class="greenBtn1">全选</button>

        <button type="button" onclick="DelNotes()" class="greenBtn3">删除选中</button>

        </div>

      </div>

      <div id="mainCp">

         <form name="form1">

          <span id='rslist'>

          <?php GetList($dsql,$pageno,$pagesize,'aid'); ?>

          </span>

        </form>

        <div id="pagelist"></div>

        <!--主操作区域 -->

      <script type="text/javascript">

		ReloadPageNum(1);

	  </script>

      </div>



    </div>

  </div></div>

<?php include(DEDEMEMBER."/templets/foot.htm"); ?>

</div>

</body>

</html>

