<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
?><!--<?php
print <<<EOT
-->

<!--小字报整页面-->
<!--小字报顶部状态栏-->
<table class="mainbox tableborder" cellspacing="0" cellpadding="5" align="center">
<form action="?t=paper&action=delpaper" method=post name=paper>
<input type=hidden name=boardid value="{$boardid}">
<tr align=center>
<th width="15%" height=25>{$lang['tpl.paper.str1']}</th>
<th width="50%">{$lang['tpl.paper.str2']}</th>
<th width="20%">{$lang['tpl.paper.str3']}</th>
<th width="15%" id=tabletitlelink>{$lang['tpl.paper.str4']}</a></th>
</tr>
<!--
EOT;
if( !empty($_infoList) ):
	if( is_array($_infoList) ):
		$groupSetting27 = 1;
		foreach( $_infoList as $val ):
			$username = htmlspecialchars($val['S_UserName']);
			//$addtime =& $val['S_Addtime'];
			$addtime = gmdate('Y-m-d H:i:s', $val['S_Addtime']+getUserTimeZoneOffset());
			$title = htmlspecialchars($val['S_Title']);
			$currboardid = intval($val['S_BoardID']);
			$sid = $val['S_ID'];
			if( $groupSetting27 == 1 ):
				$manageinfo1 = "<input type=checkbox class=\"chkbox\" name=\"sid[]\" value=\"{$sid}\">".$val['S_Hits'];
			else:
				$manageinfo1 =& $val['S_Hits'];
			endif;
			print <<<EOT
-->

<!--小字报循环部分-->
<tr>
<td class="tablebody6" align=center height=24>
<a href=dispuser.php?name={$username} target=_blank>{$username}</a>
</td>
<td class="tablebody5">
<a href=javascript:openScript('viewinfo.php?id={$sid}&boardid={$currboardid}',500,400)>{$title}</a>
</td>
<td class="tablebody6">{$addtime}</td>
<td align=center class="tablebody5">
{$manageinfo1}
</td></tr>
<!--
EOT;
		endforeach;
		if( $groupSetting27 == 1 ):
			print <<<EOT
		print <<<EOT
-->
<!--{$manageinfo}-->
<tr><td class="tablebody5" colspan=4 align=right>{$lang['tpl.paper.str5']}<input type=checkbox class="chkbox" name=chkall value=on onclick="CheckAll(this.form)">{$lang['tpl.paper.str6']} <input type=submit class="button" name=Submit value={$lang['tpl.paper.str7']}  onclick="{if(confirm({$lang['tpl.paper.str8']})){this.document.paper.submit();return true;}return false;}"></td></tr>
<!--
EOT;
		endif;
		print <<<EOT
-->
<!--{$pagelist}-->

<!--公共分页部分-->
<SCRIPT LANGUAGE="JavaScript">
<!--
var currentpage='{$page}';
var Pcount='{$Pcount}';
currentpage=Math.floor(currentpage);
Pcount=Math.floor(Pcount);
document.write ('</table>');
document.write ('<table border=0 cellpadding=0 cellspacing=3 width="{$width}" align=center>');
document.write ('<tr><td valign=middle nowrap>');
document.write ('{$lang['tpl.paper.str9']}<b>'+currentpage+'</b>/<b>'+Pcount+'</b>{$lang['tpl.paper.str10']}');
document.write ('{$lang['tpl.paper.str11']}<b>{$pagelimited}</b> {$lang['tpl.paper.str12']}<b>{$listnum}</b>{$lang['tpl.paper.str13']}</td>');
document.write ('<td valign=middle nowrap><div align=right><p>{$lang['tpl.paper.str14']}');
var endpage;
if (currentpage>4)
{
	document.write ('<a href="?{$action}page=1&boardid={$boardid}&keyword={$keyword}">[1]</a> ...');
}
if (Pcount>currentpage+3)
{
	endpage=currentpage+3;
}else{
	endpage=Pcount;
}
for (i=currentpage-3;i<endpage+1 ;i++ )
{
	i=Math.floor(i);
	if (i>0)
	{
		if (i>currentpage || i<currentpage)
		{
			document.write (' <a href="?{$action}page='+i+'&boardid={$boardid}&keyword={$keyword}">['+i+']</a>')
		}
		else{
			document.write (' <font color={$alertcolor}>['+i+']</font>');
		}
	}
}
if (currentpage+3 < Pcount)
{
	document.write ('... <a href="?{$action}page='+Pcount+'&boardid={$boardid}&keyword={$keyword}">['+Pcount+']</a>');
}
document.write ('</font></td></tr>');
document.write ('</form></table>');
//-->
</SCRIPT>

<!--
EOT;
	endif;
else:
	print <<<EOT
-->
<!--{$paperloop}-->
<tr> <td class="tablebody5" colspan=4 height=25>{$lang['tpl.paper.str15']}</td></tr>
<!--
EOT;
endif;
print <<<EOT
-->
</table>

<!--
EOT;
print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
	//复选表单全选事件 form：表单名
function CheckAll(form)  {
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
		if (e.name != 'chkall'&&e.type=="checkbox")
		{
			e.checked = form.chkall.checked;
		}
	}
}
//-->
</SCRIPT>
<!--
EOT;
?>-->