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

Diff of /fenglin/bbs/user_service_ban.php

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

Revision 1.2 by sysadm, Wed Apr 23 04:51:55 2025 UTC Revision 1.5 by sysadm, Fri Oct 10 12:15:02 2025 UTC
# Line 101  Line 101 
101                  mysqli_close($db_conn);                  mysqli_close($db_conn);
102                  exit(json_encode($result_set));                  exit(json_encode($result_set));
103          }          }
104            
105          $rs = mysqli_query($db_conn, "BEGIN");          $rs = mysqli_query($db_conn, "BEGIN");
106          if ($rs == false)          if ($rs == false)
107          {          {
# Line 180  Line 180 
180                  {                  {
181                          $result_set["return"]["code"] = -2;                          $result_set["return"]["code"] = -2;
182                          $result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn);                          $result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn);
183            
184                          mysqli_close($db_conn);                          mysqli_close($db_conn);
185                          exit(json_encode($result_set));                          exit(json_encode($result_set));
186                  }                  }
187            
188                  if ($row = mysqli_fetch_array($rs))                  if ($row = mysqli_fetch_array($rs))
189                  {                  {
190                          $section_title=$row["title"];                          $section_title=$row["title"];
# Line 193  Line 193 
193                  {                  {
194                          $result_set["return"]["code"] = -1;                          $result_set["return"]["code"] = -1;
195                          $result_set["return"]["message"] = "版块不存在";                          $result_set["return"]["message"] = "版块不存在";
196            
197                          mysqli_close($db_conn);                          mysqli_close($db_conn);
198                          exit(json_encode($result_set));                          exit(json_encode($result_set));
199                  }                  }
# Line 250  Line 250 
250                  {                  {
251                          $result_set["return"]["code"] = -1;                          $result_set["return"]["code"] = -1;
252                          $result_set["return"]["message"] = "已存在该类封禁";                          $result_set["return"]["message"] = "已存在该类封禁";
253            
254                          mysqli_close($db_conn);                          mysqli_close($db_conn);
255                          exit(json_encode($result_set));                          exit(json_encode($result_set));
256                  }                  }
# Line 289  Line 289 
289                          ($sid > 0 ? "在“" . $section_title . "”版块的"  : "全站") . $p_name .                          ($sid > 0 ? "在“" . $section_title . "”版块的"  : "全站") . $p_name .
290                          $day . "天。\n如不服本决定, 可在7日内申请复议。\n" .                          $day . "天。\n如不服本决定, 可在7日内申请复议。\n" .
291                          "执行人: " . $_SESSION["BBS_username"] . "\n";                          "执行人: " . $_SESSION["BBS_username"] . "\n";
292          }          }
293          else // if (!ban)          else // if (!ban)
294          {          {
295                  if ($bid == 0)                  if ($bid == 0)
296                  {                  {
297                          $result_set["return"]["code"] = -1;                          $result_set["return"]["code"] = -1;
298                          $result_set["return"]["message"] = "不存在该类封禁";                          $result_set["return"]["message"] = "不存在该类封禁";
299            
300                          mysqli_close($db_conn);                          mysqli_close($db_conn);
301                          exit(json_encode($result_set));                          exit(json_encode($result_set));
302                  }                  }
# Line 352  Line 352 
352                          exit(json_encode($result_set));                          exit(json_encode($result_set));
353                  }                  }
354          }          }
355            
356          $sql = "UPDATE user_online SET current_action = '".          $sql = "UPDATE user_online SET current_action = '".
357                          ($ban && $sid == -1 ? "exit" : "reload") ."' WHERE UID = $uid";                          ($ban && $sid == -1 ? "exit" : "reload") ."' WHERE UID = $uid";
358    
# Line 418  Line 418 
418          // Prepare message          // Prepare message
419          if ($ban)          if ($ban)
420          {          {
421                  $msg_content = "[hide]SYS_Ban_User[/hide]您" .                  $msg_content = "您" .
422                          ($sid > 0 ? "在“" . $section_title . "”版块的" : "全站") . $p_name .                          ($sid > 0 ? "在“" . $section_title . "”版块的" : "全站") . $p_name .
423                          "已被封禁,详见[article " . $aid . "]处罚公告[/article]。" .                          "已被封禁,详见[article " . $aid . "]处罚公告[/article]。" .
424                          "[align right]执行人:[user " . $_SESSION["BBS_uid"] . "]" .                          "[align right]执行人:[user " . $_SESSION["BBS_uid"] . "]" .
# Line 426  Line 426 
426          }          }
427          else          else
428          {          {
429                  $msg_content = "[hide]SYS_Unban_User[/hide]您" .                  $msg_content = "您" .
430                          ($sid > 0 ? "在“" . $section_title . "”版块的" : "全站") . $p_name .                          ($sid > 0 ? "在“" . $section_title . "”版块的" : "全站") . $p_name .
431                          "已被恢复。[align right]执行人:[user " . $_SESSION["BBS_uid"] . "]" .                          "已被恢复。[align right]执行人:[user " . $_SESSION["BBS_uid"] . "]" .
432                          $_SESSION["BBS_username"] . "[/user][/align]";                          $_SESSION["BBS_username"] . "[/user][/align]";
# Line 462  Line 462 
462    
463          mysqli_close($db_conn);          mysqli_close($db_conn);
464          exit(json_encode($result_set));          exit(json_encode($result_set));
 ?>  


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

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