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

Diff of /fenglin/bbs/set_life.php

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

Revision 1.3 by sysadm, Thu Jun 10 11:26:43 2004 UTC Revision 1.7 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  <?  <?
# Line 11  if (isset($_POST["life"])) Line 12  if (isset($_POST["life"]))
12          $life=intval($_POST["life"]);          $life=intval($_POST["life"]);
13  else  else
14  {  {
15          echo ("未指定生命值!");          echo ("鏈寚瀹氱敓鍛藉硷紒");
16          exit();          exit();
17  }  }
18    
19  $db_conn=include "./db_open.inc.php";  $db_conn=include "./db_open.inc.php";
20    
21  if (!($_SESSION["BBS_priv"]->checkpriv(0,S_POST) && (  if (!($_SESSION["BBS_priv"]->checkpriv(0, S_POST) && (
22          $_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))))  
23  {  {
24  ?>          error_msg("鎮ㄦ棤鏉冧慨鏀圭敤鎴风敓鍛藉硷紒",true);
 <script language="JavaScript">  
         alert("您无权修改用户生命值!");  
         history.go(-1);  
 </script>  
 <?  
25          exit();          exit();
26  }  }
27    
# Line 36  switch($life) Line 30  switch($life)
30          case 999:          case 999:
31          case 666:          case 666:
32          case 365:          case 365:
33            case 333:
34          case 150:          case 150:
35          case 30:          case 30:
36                  break;                  break;
37          default:          default:
38                  echo ("非法生命值!");                  echo ("闈炴硶鐢熷懡鍊硷紒");
39                  exit();                  exit();
40  }  }
41    
# Line 65  mysql_query("insert delayed into user_li Line 60  mysql_query("insert delayed into user_li
60          Client_Address()."')")          Client_Address()."')")
61          or die("Add log error!");          or die("Add log error!");
62    
63  ?>  error_msg("璁剧疆鐢ㄦ埛鐢熷懡鍊兼垚鍔燂紒");
 <script language="JavaScript">  
         alert("设置用户生命值成功!");  
 </script>  
 <?  
64    
65  mysql_query("update user_online set current_action='reload' where UID=".$uid)  mysql_query("update user_online set current_action='reload' where UID=".$uid)
66          or die("Update user_online error!");          or die("Update user_online error!");
# Line 78  mysql_close($db_conn); Line 69  mysql_close($db_conn);
69  ?>  ?>
70  <HTML>  <HTML>
71          <head>          <head>
72                  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">                  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
73                  <meta http-equiv="refresh" content="3;url=show_profile.php?user_id=<? echo $user_id; ?>">                  <meta http-equiv="refresh" content="3;url=show_profile.php?user_id=<? echo $user_id; ?>">
74                  <title>设置用户生命值</title>                  <title>璁剧疆鐢ㄦ埛鐢熷懡鍊</title>
75                  <link rel="stylesheet" href="css/default.css" type="text/css">                  <link rel="stylesheet" href="css/default.css" type="text/css">
76          </head>          </head>
77          <BODY>          <BODY>
78                  <P align=center>用户生命值设置完成!</P>                  <P align=center>鐢ㄦ埛鐢熷懡鍊艰缃畬鎴愶紒</P>
79          </BODY>          </BODY>
80  </HTML>  </HTML>


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

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