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

Diff of /fenglin/bbs/section_service_setting.php

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

Revision 1.2 by sysadm, Sun Apr 27 04:32:05 2025 UTC Revision 1.5 by sysadm, Wed Feb 11 10:59:14 2026 UTC
# Line 161  Line 161 
161                  }                  }
162    
163                  $i = 1;                  $i = 1;
164                  $sid_disabled_list = "-1";                  $sid_disabled_list = array(-1);
165                  $real_sort_order = 0;                  $real_sort_order = 0;
166                  while ($row = mysqli_fetch_array($rs))                  while ($row = mysqli_fetch_array($rs))
167                  {                  {
# Line 184  Line 184 
184                          {                          {
185                                  if ($row["sort_order"] != 0)                                  if ($row["sort_order"] != 0)
186                                  {                                  {
187                                          $sid_disabled_list .= (", " . $row["SID"]);                                          array_push($sid_disabled_list, $row["SID"]);
188                                  }                                  }
189                                  continue;                                  continue;
190                          }                          }
# Line 232  Line 232 
232                  }                  }
233    
234                  // Enforce sort_order of disabled sections to 0                  // Enforce sort_order of disabled sections to 0
235                  if ($sid_disabled_list != "-1")                  if (count($sid_disabled_list) > 1)
236                  {                  {
237                          $sql = "UPDATE section_config SET sort_order = 0 WHERE SID IN ($sid_disabled_list)";                          $sql = "UPDATE section_config SET sort_order = 0 WHERE SID IN (" .
238                                            implode(",", $sid_disabled_list) .
239                                            ")";
240    
241                          $rs = mysqli_query($db_conn, $sql);                          $rs = mysqli_query($db_conn, $sql);
242                          if ($rs == false)                          if ($rs == false)
# Line 253  Line 255 
255                  $sql = "UPDATE section_config SET sname = '$sname', title = '$title',                  $sql = "UPDATE section_config SET sname = '$sname', title = '$title',
256                                  exp_get = $exp_get, recommend = $recommend, read_user_level = $read_user_level,                                  exp_get = $exp_get, recommend = $recommend, read_user_level = $read_user_level,
257                                  write_user_level = $write_user_level, comment = '$comment',                                  write_user_level = $write_user_level, comment = '$comment',
258                                  announcement = '$announcement', ex_update = $ex_update,                                  announcement = '$announcement', ex_update = $ex_update, ex_menu_update = $ex_update,
259                                  set_UID = " . $_SESSION["BBS_uid"] . ", set_dt = NOW(), set_ip='" .                                  set_UID = " . $_SESSION["BBS_uid"] . ", set_dt = NOW(), set_ip='" .
260                                  client_addr() ."' WHERE SID = $sid";                                  client_addr() ."' WHERE SID = $sid";
261          }          }
262          else          else
263          {          {
264                  $sql = "UPDATE section_config SET comment = '$comment',                  $sql = "UPDATE section_config SET comment = '$comment',
265                                  announcement = '$announcement', ex_update = $ex_update,                                  announcement = '$announcement', ex_update = $ex_update, ex_menu_update = $ex_update,
266                                  set_UID = " . $_SESSION["BBS_uid"] . ", set_dt = NOW(), set_ip='" .                                  set_UID = " . $_SESSION["BBS_uid"] . ", set_dt = NOW(), set_ip='" .
267                                  client_addr() ."' WHERE SID = $sid";                                  client_addr() ."' WHERE SID = $sid";
268          }          }
# Line 288  Line 290 
290    
291          mysqli_close($db_conn);          mysqli_close($db_conn);
292          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