⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 publish_news_result.php

📁 采用PHP+oracle;功能设计:用户管理、栏目管理、新闻管理、专题管理、日志管理
💻 PHP
字号:
<? include("../inc/check.php");

   include('../inc/func.php');

   include("pub_func.php");

   $uploader=$ses_loginname;//操作者

   $group_name=$ses_groupid;

   $sql="select newsid,newsname,uploadertime from news where del_statue!=1 and pub_statue=0 ";

   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="../create/water.css" rel="stylesheet" type="text/css">

</head>



<body bgcolor="#FFFFFF" text="#000000">

<form name="form1" method="post" action="publish_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">选择天数</option>
          <option value="1">1天</option>
          <option value="2">2天</option>
          <option value="3">3天</option>
          <option value="4">4天</option>
          <option value="5" selected>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="publish_news_done.php">

  <table width="772" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#111111" class="border">

    <tr> 

      <td width="93" class="border">序号</td>

      <td width="334" class="border">标题</td>

      <td width="272" class="border">上传时间</td>

      <td width="63" class="border">发布</td>

      <td width="63" class="border">预览</td>

    </tr>

    <?$i=0;while ($array[$i][NEWSNAME]){?>

    <tr> 

      <td width="93" height="19"> <span class="border"><?echo $i; ?> </span></td>

      <td width="334" height="19"> <span class="border"> 

        <?  echo substr($array[$i][NEWSNAME],9,(strlen($array[$i][NEWSNAME])-9));?>

        </span></td>

      <td width="272" height="19"> <span class="border"><?echo formdate($array[$i][UPLOADERTIME]);?> 

        </span></td>

      <td width="63" height="19"> <span class="border"> 

        <input type="checkbox" name="ck<?echo $i;?>" value="<?echo $array[$i][NEWSID];?>">

        </span></td>

      <td width="63" height="19" class="border"><a href=publish_news_preview.php?newid=<?echo $array[$i][NEWSID];?> target="_blank" >预览</a></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 + -