Advertisement
Guest User

forum

a guest
Feb 9th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. $forumc = (isset($_POST["forums_count"]) ? 0 + $_POST["forums_count"] : 0);
  2.  
  3. if ($forumc > 0 && $forum_special != "no") {
  4. for ($i = 1; $i < $forumc + 1; $i++) {
  5. if (substr($_POST["forums_$i"], 0, 3) == "yes")
  6. $foo[] = (int)substr($_POST["forums_$i"], 4);
  7. }
  8. foreach ($foo as $fo) {
  9. $boo[] = "(" . $fo . "," . $user["id"] . "," . sqlesc($user["username"]) . ")";
  10. $boo1[] = "[" . $fo . "]";
  11. }
  12. mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM forum_acc WHERE uid=" . $user["id"]) or sqlerr(__file__, __line__);
  13. mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO forum_acc(pid,uid,user) VALUES " . join(",", $boo)) or sqlerr(__file__, __line__);
  14. $updateset[] = "forums_special=" . sqlesc(join("", $boo1));
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement