📄 topic_conque.php
字号:
// echo "topicsel".$topicsel;
if($topicsel or $sertime ){
$sqldo_cont.="where ";
}
if($topicsel){
$sqldo_cont.=" spec_id='$topicsel' ";
}
if($sertime and $topicsel){
$datetime=date("YmdHis",mktime(date(''),date(''),date(''),date("m"),date("d")-$sertime,date("Y")) );
$sqldo_cont.="and datechar>'$datetime' ";
}elseif($sertime){
$datetime=date("YmdHis",mktime(date(''),date(''),date(''),date("m"),date("d")-$sertime,date("Y")) );
$sqldo_cont.=" datechar>'$datetime' ";
}
$sqldo_cont.=" order by tabindex,(0-topicid) ";
$sqldo_s=$sqldo_head.$sqldo_cont;
// echo "sqldo".$sqldo_s."end";
$sqldo=$sqldo_s;
$sqldo_c=$sqldo_head_c.$sqldo_cont;
}
?>
<?
//搜索数据库
/*
if(!$temp){
$sqldo= "select log_id,user_name,group_name,news_id,news_title,act_type,act_time from operatelog where (act_time > '20000909000000') and (act_time<'20090909246060') order by log_id desc ";
$sqldo_c="select count(*) from operatelog where (act_time > '20000909000000') and (act_time<'20090909246060') order by log_id desc ";
}
*/
if($temp==1){
$sqldo=stripslashes($sqldo);
$sqldo_c=stripslashes($sqldo_c);
}
//echo "sqldo:".$sqldo;
//echo "sqldo_c:".$sqldo_c;
if($sqldo_c)
{$result=$cla->db_query($sqldo_c);
$num=$result[0][0];
} //分页显示无匹配记
//echo "num".$num;
$perpage=500;//每页显示文章数
$pages=ceil($num/$perpage);
$last_offset=($pages-1)*$perpage;
if (isset($jumpto))
{if ($jumpto<=$pages){
$offset=($jumpto-1)*$perpage;
} else{
$offset=$last_offset;}
}
//判断偏移量参数是否传递给了脚本,如果没有就使用默认值0
if (empty($offset))
{
$offset=0;
}
if($cmdsearc=="搜索"){
$offset=0;
}
?>
<table bordercolor="#ffffff" cellspacing="0" cellpadding="0" width="100%"
align= "center" border="1" bordercolorlight="#000000" class=>
<tr>
<td width="52%" valign="middle"> <div align="left">
<?if(isset($num)){?>
<a href="<?="$PHP_SELF";?>?offset=0&temp=1&num=<?="$num";?>&sercont=<?php echo $sercont;?>&sertime=<?php echo $sertime;?>&seritem=<?php echo $seritem;?>">首
页</a>
<?}else{
echo "首 页";
}?>
<?
//如果偏移量是0,不显示前一页的链接
if($offset)
{
$preoffset=$offset-$perpage;
?>
<a href="<? echo $PHP_SELF;?>?offset=<?echo $preoffset;?>&temp=1&sercont=<?php echo $sercont;?>&sertime=<?php echo $sertime;?>&seritem=<?php echo $seritem;?>">前一页</a>
<?
}else{
print "前一页 ";
}
//计算总共需要的页数
$nextoffset=$offset+$perpage;
//检查是否是最后一页
if (($pages!=0) && ($nextoffset<$num))
{
?>
<a href="<? echo $PHP_SELF;?>?offset=<?echo $nextoffset;?>&temp=1&sercont=<?php echo $sercont;?>&sertime=<?php echo $sertime;?>&seritem=<?php echo $seritem;?>">下一页</a>
<?
//print "<a href=\"$PHP_SELF?offset=$nextoffset&temp=1&sqldo= $sqldo&sqldo_c=$sqldo_c\">下一页</a> ";
}else{
print "下一页 ";
}
$this_page_no=ceil($offset/$perpage)+1;
?>
<?if(!isset($num)){
echo "末 页";
}else{ ?>
<a href="<?=$PHP_SELF;?>?offset=<?=$last_offset;?>&temp=1&num=<?=$num;?>&sercont=<?php echo $sercont;?>&sertime=<?php echo $sertime;?>&seritem=<?php echo $seritem;?>">末
页</a>
<?}?>
</div>
<div align="right"> </div></td>
<td width="48%" valign="middle"><div align="right">页次:<font class="red">
<?echo $this_page_no;?> /</font> <?echo $pages;?>
页 共<font class="red">
<?if($num<>""){
echo $num;
}
else{
echo "0";
}
?>
</font>条记录 <?echo $perpage;?> 记录/页
<input name="temp" size="50" type="hidden" value="1">
<input name="sqldo" size="50" type="hidden" value="<?php print $sqldo;?>">
<input name="sqldo_c" size="50" type="hidden" value="<?php print $sqldo_c;?>">
<br>
<?
for ($i=0; $i < $pages; $i++)
{
$newoffset=$perpage*$i;
}
?>
</div></td>
</tr>
</table>
<table border="1" cellspacing="0" cellpadding="3" align="center" width="754"bgcolor="#000060" class=border bordercolor="#111111">
<tr>
<td height="2" width="10%"> <div align="center">
<font color="#000000"> 序号</font></div></td>
<td height="2" width="33%"> <div align="center"><font color="#000000">标题</font></div></td>
<td height="2" width="9%"> <div align="center"><font color="#000000">提交人</font></div></td>
<td height="2" width="12%"> <div align="center"><font color="#000000">所属专题</font></div></td>
<td width="10%" height="2"> <div align="center"><font color="#000000">提交日期</font></div></td>
<td width="10%" height="2"><div align="center">从专题库删除</div></td>
</tr>
<?
$A_define=array( "topicid","newsid","uploader","datechar","tabindex");
//$offset=2;
//$perpage=5;
if($sqldo){
$res_array=$cla->db_query($sqldo,$A_define,$offset,$offset+$perpage);
}
$i=0;
while($res_array[$i][0]){
?>
<tr bgcolor="#f7f7f7">
<td align="center" width="10%"> <div align="center">
<font color="#FFFFFF">
<input type="text" name="text<? echo $res_array[$i]['TOPICID'];?>" size="2" value= "<? if($res_array[$i]['TABINDEX']<>250){ echo $res_array[$i]['TABINDEX']; }?>">
</font></div></td>
<td align="center" width="33%"> <font color="#000000">
<?
$temp2= $res_array[$i]["NEWSID"];
//echo "newsid:".$temp2;
$sqldo_in_in="select newsname,uploader from waternews where newsid='$temp2'";
$result_array_in_in=$cla->db_query($sqldo_in_in);
$temp3=$result_array_in_in[0][0];
if($temp3){
echo substr($temp3,9); }
else{
echo " ";
}
?>
</font></td>
<td align="center" width="9%"> <div align="center">
<font color="#000000">
<? if($result_array_in_in[0]["UPLOADER"]<>""){
echo $result_array_in_in[0]["UPLOADER"]; }
else{
echo " ";
}
?>
</font></div></td>
<td align="center" width="12%"> <div align="center">
<font color="#000000">
<?
$sqldo_in_in="select spec_name from basespec where spec_id='$topicsel'";
$result_array_in_in=$cla->db_query($sqldo_in_in);
echo $result_array_in_in[0][0];
?>
</font></div></td>
<td align="center" width="10%"> <div align="center">
<font color="#000000">
<?
$tstr=$res_array[$i]["DATECHAR"];
if($tstr<>""){
echo $tstr[0].$tstr[1].$tstr[2].$tstr[3]."/".$tstr[4].$tstr[5]."/".$tstr[6].$tstr[7]."<br>".$tstr[8].$tstr[9].":".$tstr[10].$tstr[11].":".$tstr[10].$tstr[11]; }
else{
echo " ";
}
?>
</font></div></td>
<td align="center" width="10%"><a href="?action=del&topicid=<? echo $res_array[$i][TOPICID];?>&topic=<? echo $result_array_in_in[0][0];?>&topicsel=<? echo $topicsel;?>&sertime=<? echo $sertime;?>" >删除</a></td>
</tr>
<?$i++; }?>
</table>
<br>
<div align="right"> </div>
</td>
</tr>
</table>
<p> </p>
<p align="center">
<input type="hidden" name="sertime" value=<?echo $sertime;?>>
<input type="hidden" name="topicsel" value=<?echo $topicsel;?>>
<input type="submit" name="cmd" value="确定">
<input type="reset" name="cmdreset22" value="重置">
</p>
</form>
<div align="center"> </div>
</td>
</tr>
</table>
</div>
<div align="right"></div>
</td>
</tr>
</table>
</div>
</center>
<p> </p>
<div align="center"><br>
<p> </p>
</div>
<script language="JavaScript">
<!--
function CheckAll()
{
for (var i=0;i<document.form1.elements.length;i++)
{
var e = document.form1.elements[i];
if (e.name != 'allbox')
e.checked = document.form1.allbox.checked;
}
}
//-->
</script>
<?$cla->db_logoff();?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -