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

📄 topic_make.php

📁 Oracle源码:Oracle 数据库管理与应用系统开发代码
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
require "../inc/func.php";
require "../inc/error.php";
require "../publish/pub_func.php";
?>

<html>

<head>

<title>“天勤”网站后台管理系统</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<STYLE type=text/css>BODY {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px; scrollbar-face-color: ffffff; scrollbar-shadow-color: C1C1BB; scrollbar-highlight-color: C1C1BB; scrollbar-3dlight-color: EBEBE4; scrollbar-darkshadow-color: EBEBE4; scrollbar-track-color: F4F4F0; scrollbar-arrow-color: CACAB7

}

P {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

INPUT {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

FONT {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

SELECT {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

OPTION {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

TEXTAREA {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

FORM {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px

}

TD {

	FONT-FAMILY: "宋体"; FONT-SIZE: 12px; TABLE-LAYOUT: fixed; WORD-BREAK: break-all

}

A:link {

	TEXT-DECORATION: none

}

A:visited {

	TEXT-DECORATION: none

}

A:hover {

	TEXT-DECORATION: underline

}

A:active {

	FONT-SIZE: 12px; TEXT-DECORATION: none

}

.border {

	BACKGROUND-COLOR: #efefef; BORDER-BOTTOM: 1px dotted; BORDER-COLLAPSE: collapse; BORDER-LEFT: 1px dotted; BORDER-RIGHT: 1px dotted; BORDER-TOP: 1px dotted; COLOR: #000000

}

.shadow1 {

	COLOR: #ffffff; FILTER: dropshadow(color=#000000,offx=1,offy=1); FONT-SIZE: 12px

}

.shadow2 {

	COLOR: #000000; FILTER: dropshadow(color=#d5d5d5,offx=1,offy=1); FONT-SIZE: 12px

}

.p1 {

	COLOR: #ffffff; FONT-SIZE: 12px; TEXT-DECORATION: none

}

.p2 {

	COLOR: #000000; FONT-SIZE: 12px; TEXT-DECORATION: none

}

.p3 {

	COLOR: #004080; FONT-SIZE: 14px; TEXT-DECORATION: none

}

</STYLE>

</head>

<body>

<?

if($action=="del"){
      $sqldo="delete from topic where newsid='$newsid'";
	 // echo $sqldo;
      if($cla->db_delete($sqldo)){
      $cla->db_commit();
	  //echo "kill $topicid";
	  }
}

				

if($cmdadd){ //如果添加NEWGIVER   

/*    

标题: %标题%
作者:%作者%
译者:%译者% 
来源:%来源%
正文内容:%内容% 
加入时间:%时间%     
相关链接:%链接%   

*/  
                 //生成sqldo语句
	$sqldo_head="select newsid,upname,newsname,downname1,downname2,newswriter,newsgiver,newscomper,newstranser,newsdate,column1,column2,column3,newstext,newssource,newssourcestr,uploadertime,uploader,pic1,pic2,pic3,pic4,pic5,clas_statue,newslink from news ";
	$sqldo_cont="";
	if($sercont or $sertime or $seritem){
		$sqldo_cont.="where ";
	}
	if($sercont){
		$sqldo_cont.="(instr(newsname,'$sercont')>0 )  ";
	}
	if($sercont and $sertime){
		$datetime=date("YmdHis",mktime(date(''),date(''),date(''),date("m"),date("d")-$sertime,date("Y")) );
		$sqldo_cont.="and uploadertime>'$datetime'  ";
	}elseif($sertime){
		$datetime=date("YmdHis",mktime(date(''),date(''),date(''),date("m"),date("d")-$sertime,date("Y")) );
		$sqldo_cont.=" uploadertime>'$datetime'  ";
	}
	if(($sercont or $sertime) and $seritem){
		$sqldo_cont.="and  column1='$seritem'  ";
	}elseif($seritem){
		$sqldo_cont.=" column1='$seritem'  ";
	} 
	$sqldo_s=$sqldo_head.$sqldo_cont;
	$sqldo=$sqldo_s;
	//  echo "sqldo".$sqldo."end";
	$res_array=$cla->db_query($sqldo);
	$i=0;
	//echo "1:".${chk.$res_array[$i][0]};
	//echo "2:".$res_array[$i][0];
	while($res_array[$i][0]){
		if(${chk.$res_array[$i][0]}==$res_array[$i][0]){
			//插入专题库
			$tempid=$res_array[$i]["NEWSID"];  //新闻ID
			$uploader=$ses_login_name;  //session 用户注册名
			$datetime=date("YmdHis",mktime(date('H'),date('i'),date('s'),date("m"),date("d"),date("Y")) );
			$topicsel=trim($topicsel);  //专题ID
			$sqldo_in="select topicid from topic where newsid='$tempid' and spec_id='$topicsel'";
			$res_array_in=$cla->db_query($sqldo_in);
			if(!$res_array_in[0][0]){//如果不在专题库中存在				
			$sqldo="insert into topic values(topictopicid.nextval,'$tempid','$topicsel','$uploader','$datetime','','') ";
			//echo $sqldo;
			if($cla->db_insert($sqldo)){
				$cla->db_commit();
				//	echo "数据库插入成功!";
			}	
		}				
		else{
		//echo "这条已经存在!<br>";
		}
		//静态转换内容
		$newid=$res_array[$i][NEWSID];
		$upname=change($res_array[$i][UPNAME]);
		$newname=change($res_array[$i][NEWNAME]);
		$downname1=change($res_array[$i][DOWNNAME1]);
		$downname2=change($res_array[$i][DOWNNAME2]);
		$newname=$upname.$newname.$downname1.$downname2;
		$newwriter=$res_array[$i][NEWSWRITER];
		$newgiver=$res_array[$i][NEWSGIVER];
		$newcomper=$res_array[$i][NEWSCOMPER];
		$newtranser=$res_array[$i][NEWSTRANSER];
		$newdate=formnewdate($res_array[$i][NEWSDATE]);
		$column1=$res_array[$i][COLUMN1];
		$column2=$res_array[$i][COLUMN2];
		$column3=$res_array[$i][COLUMN3];
		$newtext=replace_html($res_array[$i][NEWSTEXT],$res_array[$i][PIC1],$res_array[$i][PIC2],$res_array[$i][PIC3],$res_array[$i][PIC4],$res_array[$i][PIC5],"../../image_news/".$newid);
		$newsource=$res_array[$i][NEWSSOURCE];
		$newsourcestr=$res_array[$i][NEWSSOURCESTR];
		$uploadertime=$res_array[$i][UPLOADERRTIME];
		$uploader=$res_array[$i][UPLOADER];
		$newlink=get_newname($res_array[$i][NEWSLINK],$cla);
		if($seltemp==""){
			$seltemp="默认模板";   
		}
		$modle=$seltemp;
		$dirname="../topicfiles/".$topicsel;
		// generate_html($newid,$dirname,$modle,$newname,$newdate,$newwriter,$newtext,$newlink,$newsourse);				
		$column=get_column($column1,$cla);	  
		generate_html($newid,$dirname,$modle,$newname,$newdate,$newwriter,$newtext,$newlink,$newsourse,$column,$uploader);	  
	}
	$i++;
	}
}
?>







<!-- search code begin -->

    <SCRIPT LANGUAGE="JavaScript">

    function chg_manu(ser_type){

        var subobj=document.form2.ser_type;

		alert(subobj.value);

        if(""==subobj.value){


        }

        document.list_manu.location="list_manu.php?ser_type=group_name";

    }

    </SCRIPT>

<center>

  <p>&nbsp;</p>

  <div align="center">

    <table width="100%" border="0" height="95">

      <tr> 

        <td width="75%" height="68" rowspan="5"> 



          <form name="form2" method="post" action="">

            <table width="100%" border="0" height="109">

              <tr> 

                <td width="7%" height="59">&nbsp;</td>

                <td width="86%" height="59" valign="middle"> 

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

                    <tr > 

                      <td width="138" height="20"> 

                        <div align="center"><font color="#000000">查询内容</font></div>

                      </td>

                      <td width="259" height="20"> 

                        <div align="center"><font color="#000000">时间限制</font></div>

                      </td>

                      <td width="165" height="20"> 

                        <div align="center"><font color="#000000">栏目</font></div>

                      </td>

                    </tr>

                    <tr bgcolor="#f7f7f7"> 

                      <td width="138" > 

                        <div align="center"> 

                          <input type="text" name="sercont">

                        </div>

                      </td>

                      <td width="259"> 

                        <div align="center"> 

                          <select name="sertime" size="1">

                       <option value="">任何时间</option>

			             <option value="3">3天之内</option>

							 <option value="7">7天之内</option>

							  <option value="30">一月之内</option>

							   <option value="180">半年之内</option>

                          </select>

                        </div>

                      </td>

                      <td width="165"> 

                        <div align="center">

                          <select name="seritem">

				 <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>

                            <?

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -