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

Diff of /fenglin/bbs/article_service_del.php

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

Revision 1.3 by sysadm, Tue Apr 29 11:55:32 2025 UTC Revision 1.6 by sysadm, Fri Oct 10 12:15:02 2025 UTC
# Line 123  Line 123 
123          // Update exp          // Update exp
124          $exp_change = ($uid == $_SESSION["BBS_uid"] ? ($tid == 0 ? -20 : -5) : ($tid == 0 ? -50 : -15));          $exp_change = ($uid == $_SESSION["BBS_uid"] ? ($tid == 0 ? -20 : -5) : ($tid == 0 ? -50 : -15));
125    
126          $rs = user_exp_change($uid, ($tid == 0 ? -20 : -5), $db_conn);          $rs = user_exp_change($uid, $exp_change, $db_conn);
127    
128          if ($rs == false)          if ($rs == false)
129          {          {
# Line 137  Line 137 
137          if ($uid != $_SESSION["BBS_uid"]) // Delete by admin          if ($uid != $_SESSION["BBS_uid"]) // Delete by admin
138          {          {
139                  //Send alarm message                  //Send alarm message
140                  $msg_content = "[hide]SYS_Delete_Article[/hide]您所发表的[article $id]$id" .                  $msg_content = "您所发表的[article $id]$id" .
141                          "[/url]号文章,违反了本论坛的相关规定,现已被移至“回收站”。" .                          "[/url]号文章,违反了本论坛的相关规定,现已被移至“回收站”。" .
142                          "[align right]执行人:[user " .     $_SESSION["BBS_uid"] . "]" .                          "[align right]执行人:[user " .     $_SESSION["BBS_uid"] . "]" .
143                          $_SESSION["BBS_username"] . "[/user][/align]";                          $_SESSION["BBS_username"] . "[/user][/align]";
# Line 176  Line 176 
176    
177                  $rs = mysqli_query($db_conn, $sql);                  $rs = mysqli_query($db_conn, $sql);
178                  if ($rs == false)                  if ($rs == false)
                 {  
                         $result_set["return"]["code"] = -2;  
                         $result_set["return"]["message"] = "Update article error: " . mysqli_error($db_conn);  
   
                         mysqli_close($db_conn);  
                         exit(json_encode($result_set));  
                 }  
         }  
         else  
         {  
                 $sql = "UPDATE bbs SET reply_count = 0 WHERE AID = $id"; // For all the replies are deleted  
   
                 $rs = mysqli_query($db_conn, $sql);  
                 if ($rs == false)  
179                  {                  {
180                          $result_set["return"]["code"] = -2;                          $result_set["return"]["code"] = -2;
181                          $result_set["return"]["message"] = "Update article error: " . mysqli_error($db_conn);                          $result_set["return"]["message"] = "Update article error: " . mysqli_error($db_conn);


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

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