/[LeafOK_CVS]/fenglin/bbs/set_recommend.php
ViewVC logotype

Diff of /fenglin/bbs/set_recommend.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Wed May 12 00:24:05 2004 UTC Revision 1.8 by sysadm, Tue Mar 4 04:07:05 2025 UTC
# Line 1  Line 1 
1  <?  <?
2            require_once "./common_lib.inc.php";
3          require_once "./session_init.inc.php";          require_once "./session_init.inc.php";
4  ?>  ?>
5  <?  <?
6  if (!isset($HTTP_GET_VARS["id"]))  if (!isset($_GET["id"]))
7          $id=0;          $id=0;
8  else  else
9          $id=intval($HTTP_GET_VARS["id"]);          $id=intval($_GET["id"]);
10    
11  if (!isset($HTTP_GET_VARS["set"]))  if (!isset($_GET["set"]))
12          exit();          exit();
13  else  else
14          $set=intval($HTTP_GET_VARS["set"])?1:0;          $set=intval($_GET["set"])?1:0;
15    
16  $db_conn=include "./db_open.inc.php";  $db_conn=include "./db_open.inc.php";
17    
# Line 29  else Line 30  else
30  mysql_free_result($rs);  mysql_free_result($rs);
31    
32  if (!($_SESSION["BBS_priv"]->checkpriv($sid,S_POST | S_MAN_M) && (  if (!($_SESSION["BBS_priv"]->checkpriv($sid,S_POST | S_MAN_M) && (
33          $_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ||          $_SESSION["BBS_priv"]->checklevel(P_ADMIN_M | P_ADMIN_S | P_MAN_C))))
         $_SESSION["BBS_priv"]->checklevel(P_ADMIN_S) ||  
         $_SESSION["BBS_priv"]->checklevel(P_MAN_C))))  
34  {  {
35  ?>          error_msg("没有权限!");
 <script language="JavaScript">  
         alert("ûȨޣ");  
 </script>  
 <?  
36          exit();          exit();
37  }  }
38    
39  mysql_query("update bbs set recommend=$set where AID=$id")  mysql_query("update bbs set recommend=$set where AID=$id")
40          or die("Set recommend error!");          or die("Set recommend error!");
41    
42  mysql_query("insert delayed into bbs_article_op(AID,UID,type,op_dt,op_ip,complete)".  //Add log
43          " values($id,".$_SESSION["BBS_uid"].",IF($set,'R','N'),now(),'".$_SERVER["REMOTE_ADDR"].  article_op_log($id,$_SESSION["BBS_uid"],($set?'R':'N'),Client_Address(),$db_conn)
         "',1)")  
44          or die("Add log error!");          or die("Add log error!");
45    
46  mysql_close($db_conn);  mysql_close($db_conn);
47    
48    error_msg("设置成功!");
49  ?>  ?>
 <script language="JavaScript">  
         alert("óɹ");  
 </script>  


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1