Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. session_start();
  3. @include('../config/db_conf.php');
  4. /* Soap Connection */
  5. $soapUsername = 'myusername';
  6. $soapPassword = 'mypass';
  7. $soapHost = '127.0.0.1';
  8. $soapPort = '7878';
  9. $char = $_POST['char'];
  10. $item = $_POST['item'];
  11. $dp = $_POST['dp'];
  12.  
  13. $conn = new mysqli($host, $dbuser, $dbpass, $authdb);
  14.  
  15. $sql = "UPDATE auth.account SET dp=dp-$dp WHERE username = '" . $_SESSION['username'] . "'";
  16.  
  17. if ($conn->query($sql) === TRUE) {
  18.  
  19. $client = new SoapClient(NULL, array(
  20.     'location' => "http://$soapHost:$soapPort/",
  21.     'uri'      => 'urn:TC',
  22.     'style'    => SOAP_RPC,
  23.     'login'    => $soapUsername,
  24.     'password' => $soapPassword,
  25. ));
  26.  
  27. $command = "send items $char \"Donor Item\" \"Thank your for supporting our server !\" $item";
  28.  
  29. $result = $client->executeCommand(new SoapParam($command, 'command'));
  30.     header('location: ../?p=home');
  31. } else {
  32.     echo "Error updating record: " . $conn->error . "<br>";
  33.     echo $sql;
  34. }
  35. ?>