📄 select_news_result.php
字号:
<? include('../inc/func.php');
include("news_func.php");
$newname=trim($newname);
$newdate=trim($newdate);
$sql="select newsid,newsname,uploadertime from news where pub_statue=1 and del_statue!=1 ";
if ($newname!=''){
$sql.="and newsname like '%".$newname."%'";
}
if ($newdate!=''){
$sql.="and newsdate like '%".$newdate."%'";
}else{
if($days!=0){
$date=date("YmdHis",mktime(0,0,0,date("m"),date("d")-$days, date("Y")) );
$sql.="and uploadertime>'$date'";
}else{
$date=date("YmdHis",mktime(0,0,0,date("m"),date("d")-5, date("Y")) );
$sql.="and uploadertime>'$date'";
}
}
if ($column1!=''){
$sql.=" and column1=$column1";
}
$sql.="order by -newsid ";
//echo $sql;
$array=$cla->db_query($sql);
?><html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="water.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form2" method="post" action="select_news_result.php">
<table width="772" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#111111" class=border>
<tr align="center">
<td height="28" colspan="4"> 请选择要添加为连接的新闻</td>
</tr>
<tr>
<td width="47" align="right">标题:</td>
<td width="310"> <input name="newname" type="text" class="input1" size="50"> </td>
<td width="268">栏目:
<select name="column1">
<option value=''>全选</option>
<?
$sqldo="select class_id,class_name from baseclass where class_layer=1";
$result_array=$cla->db_query($sqldo);
$i=0;
$old=$result_array[$i][0];
while($result_array[$i][0]){
$temp1=$result_array[$i][0];
$temp1_name=strip_tags($result_array[$i]["CLASS_NAME"]);
$sqldo_in="select class_id,class_name from baseclass where class_father='$temp1'";
$result_array_in=$cla->db_query($sqldo_in);
$j=0;
$flg1=0;
if($result_array_in[$j][0]==""){//如果是空,也显示一次,即将第二级专题显示出来
$flg1=1;
}
while($result_array_in[$j][0] or $flg1){
$temp2=$result_array_in[$j][0];
$temp2_name=strip_tags($result_array_in[$j]["CLASS_NAME"]);
$sqldo_in_in="select class_id,class_name from baseclass where class_father='$temp2'";
$result_array_in_in=$cla->db_query($sqldo_in_in);
$k=0;
$flg2=0;
if($result_array_in_in[$k][0]==""){//如果是空,也显示一次,即将第三级专题显示出来
$flg2=1;
}
while(($result_array_in_in[$k][0]<>"") or ($flg2<>0) or ($flg1<>0)){
$temp3=$result_array_in_in[$k]['CLASS_NAME'];
$temp3_name=strip_tags($result_array_in_in[$k]['CLASS_NAME']);
?>
<option value=<? if($temp3){echo $temp3;}elseif($temp2){echo $temp2;}elseif($temp1){echo $temp1;}?>>
<? echo "$temp1_name";if($temp2_name){ echo ".$temp2_name";if($temp3_name) echo".$temp3_name";}
//echo "old:".$old;
// echo "result_array".$result_array[$i][0];
?>
</option>
<?
$flg1=0; $flg2=0; $k++;}//第四级
$j++;}//第三级
?>
<option value="">***************************</option>
<?
$old=$result_array[$i][0];$i++;}//第二级
?>
</select></td>
<td width="113" ><input type="submit" name="Submit" value=" 搜 索 " class="input1"></td>
</tr>
<tr>
<td align="right">日期:</td>
<td width="310"> <input name="newdate" type="text" class="input1">
( 年年年年月月日日)</td>
<td width="268">最近:
<select name="days">
<option value="0" selected>选择天数</option>
<option value="1">1天</option>
<option value="2">2天</option>
<option value="3">3天</option>
<option value="4">4天</option>
<option value="5">5天</option>
<option value="6">6天</option>
<option value="7">一星期</option>
<option value="15">半个月</option>
<option value="30">一个月</option>
<option value="60">两个月</option>
<option value="90">三个月</option>
<option value="180">半年</option>
<option value="365">一年</option>
</select></td>
<td width="113"><input name="Submit2" type="reset" class="input1" value=" 取 消 "></td>
</tr>
</table>
</form>
<form name="form1" method="post" action="select_news_done.php">
<table width="772" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#111111" class="border">
<tr>
<td width="186">序号</td>
<td width="241">标题</td>
<td width="272">上传时间</td>
<td width="63">是否</td>
</tr>
<?$i=0;while ($array[$i][NEWNAME]){?>
<tr bgcolor="#FFFFFF">
<td width="186" height="21">
<?echo $i; ?>
</td>
<td width="241">
<? echo substr($array[$i][NEWNAME],9,(strlen($array[$i][NEWNAME])-9));?>
</td>
<td width="272">
<?echo formdate($array[$i][UPLOADERTIME]);?>
</td>
<td width="63">
<input type="checkbox" name="ck<?echo $i;?>" value="<?echo $array[$i][NEWID];?>">
</td>
</tr>
<?$i++;}?>
</table>
<center>
<input type="hidden" name="total" value="<?echo $i;?>">
<input name="Submit" type="submit" class="input1" value=" 确 定 " >
<input name="Reset" type="reset" class="input1" value=" 取 消 ">
</center>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -