Advertisement
Guest User

Untitled

a guest
Dec 20th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.69 KB | None | 0 0
  1. <?php
  2.     include("config.php");
  3.     session_start();
  4.    
  5.     $name = $_SESSION['name'];
  6.     $id = $_POST['fallid'];
  7.     $suspect = $_POST['suspected'];
  8.     $answer = $_POST['beschreibung'];
  9.     $selecttyp = $_POST['selecttyp'];
  10.     $selectend = $_POST['selectend'];
  11.     $reason = $_POST['reason'];
  12.     $txtammo = $_POST['txtammo'];
  13.    
  14.     if(isset($selecttyp))
  15.     {
  16.         if(isset($selectend))
  17.         {  
  18.             $query = "SELECT * FROM `ucp_accounts` WHERE `name`='$suspect'";
  19.             $check = mysql_query($query) or die("ERROR(AMK): ". mysql_error());
  20.             $row = mysql_fetch_assoc($check);
  21.            
  22.             echo $ammo = $txtammo + $row["$selecttyp"];
  23.                
  24.             $query = "UPDATE `ucp_accounts` SET `$selecttyp`='$ammo' WHERE `name`='$suspect'";
  25.             $check = mysql_query($query) or die("ERROR(ACC): ". mysql_error());
  26.                
  27.             $query = "UPDATE `ucp_beschwerden` SET `status`='$selectend', `answer`='$answer', `admin`='$name' WHERE `id`='$id'";
  28.             $check = mysql_query($query);
  29.            
  30.             $timestamp = time();
  31.             $datum = date("d/m/Y - H:i", $timestamp);
  32.             $query = "INSERT INTO `log_sanktion` (`target`,`admin`,`typ`,`ammo`,`reason`,`date`) VALUES ('$suspect','$name','$selecttyp','$ammo','$reason','$datum')";
  33.             $check = mysql_query($query) or die("ERROR(LOG): ". mysql_error());
  34.             //header("Location: http://00348.stprof.eu/opencomplaint.php");
  35.                 ?> <br /> <?php echo"Mein Name ist: ". $name;
  36.                 ?> <br /> <?php echo"FALL ID: ". $id;
  37.                 ?> <br /> <?php echo"Der Angeklagte: ". $suspect;
  38.                 ?> <br /> <?php echo"Meine Antwort: ". $answer;
  39.                 ?> <br /> <?php echo"Strafe: ". $selecttyp;
  40.                 ?> <br /> <?php echo"Schließen?: ". $selectend;
  41.                 ?> <br /> <?php echo"GRUND: ". $reason;
  42.                 ?> <br /> <?php echo"Höhe der Strafe: ". $txtammo;
  43.         }
  44.     }
  45.  
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement