/[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.2 by sysadm, Sun Apr 27 04:18:22 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 184  Line 184 
184                          exit(json_encode($result_set));                          exit(json_encode($result_set));
185                  }                  }
186          }          }
         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)  
                 {  
                         $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));  
                 }  
         }  
187    
188          // Commit transaction          // Commit transaction
189          $rs = mysqli_query($db_conn, "COMMIT");          $rs = mysqli_query($db_conn, "COMMIT");
# Line 212  Line 198 
198    
199          mysqli_close($db_conn);          mysqli_close($db_conn);
200          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