Advertisement
DubStepMad

#2

Feb 11th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ob_start();
  4.  
  5. if (!isset($_SESSION['logged'])) {
  6. header('Location: ../index.php');
  7. }
  8.  
  9. $staffPerms = $_SESSION['perms'];
  10. $user = $_SESSION['user'];
  11.  
  12. include '../../verifyPanel.php';
  13. masterconnect();
  14.  
  15. $sql = "SELECT * FROM `points` WHERE `uid` = $_POST[uid]";
  16. $result = mysqli_query($dbcon, $sql);
  17. $point = $result->fetch_object();
  18.  
  19. $assigned = $point->assigned;
  20. $cmessage = $point->message;
  21.  
  22.  
  23. switch ($_POST['column']) {
  24. case 'assigned':
  25. $UpdateQ = "UPDATE points SET $_POST[column]='$assinged' WHERE uid='$_POST[uid]'";
  26. break;
  27. case 'message':
  28. $UpdateQ = "UPDATE points SET $_POST[column]='$cmessage' WHERE uid='$_POST[uid]'";
  29. break;
  30.  
  31. default:
  32. $message = 'ERROR';
  33. logIt($user, $message, $dbcon);
  34. break;
  35. }
  36.  
  37. mysqli_query($dbcon, $UpdateQ);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement