Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2.         $paste->UserID = $CurrentAccount->UserID;
  3.         $paste->ExpiryFlag = isset($_POST['Expiry']) ? sql_injection($_POST['Expiry']) : "Day";
  4.         $paste->Format = isset($_POST['Format']) ? sql_injection($_POST['Format']) : "None";
  5.  
  6.         if (!array_key_exists($paste->Format, $CONF['all_syntax']))
  7.             $paste->Format = '';
  8.  
  9.         $paste = paste::create($paste);
  10.         if ($paste->ID > 0) {
  11.             $status_code = 1;
  12.             $error_msg = "DONE";
  13.             $id = $paste->ID;
  14.         }
  15.         else
  16.             $error_msg = "Could not complete the process";
  17.     }
  18. }
  19. echo "<?xml version=\"1.0\"?>\n";
  20. echo "<response>\n";
  21. echo "\t<status>$status_code</status>\n";
  22. echo "\t<message>$error_msg</message>\n";
  23. if ($id > 0) {
  24.     echo "\t<id>$id</id>\n";
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement