Guest User

Untitled

a guest
Oct 28th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.07 KB | None | 0 0
  1. <?
  2. include("config.php");
  3. // Begin gathering personal info
  4. $igname = $_POST['igname'];
  5. $corp = $_POST['corp'];
  6. $alliance = $_POST['alliance'];
  7. $ipaddress = $_POST['ip'];
  8.  
  9. //Begin gathering ship selection
  10. $Abaddon = $_POST['abaddon'];
  11. $Armageddon = $_POST['armageddon'];
  12. $Apocalypse = $_POST['apocalypse'];
  13. $Hyperion = $_POST['hyperion'];
  14. $Megathron = $_POST['megathron'];
  15. $Dominix = $_POST['dominix'];
  16. $Maelstrom = $_POST['maelstrom'];
  17. $Tempest = $_POST['tempest'];
  18. $Typhoon = $_POST['typhoon'];
  19. $Rokh = $_POST['rokh'];
  20. $Raven = $_POST['raven'];
  21. $Scorpion = $_POST['scorpion'];
  22.  
  23. // Begin gathering ship counts
  24. $Abaddoncount = $_POST['abaddoncount'];
  25. $Armageddoncount = $_POST['armageddoncount'];
  26. $Apocalypsecount = $_POST['apocalypsecount'];
  27. $Hyperioncount = $_POST['hyperioncount'];
  28. $Megathroncount = $_POST['megathroncount'];
  29. $Dominixcount = $_POST['dominixcount'];
  30. $Maelstromcount = $_POST['maelstromcount'];
  31. $Tempestcount = $_POST['tempestcount'];
  32. $Typhooncount = $_POST['typhooncount'];
  33. $Rokhcount = $_POST['rokhcount'];
  34. $Ravencount = $_POST['ravencount'];
  35. $Scorpioncount = $_POST['scorpioncount'];
  36.  
  37. // Ship Costs
  38. $Abaddoncost = "100000000";
  39. $Abaddoncostf = number_format($Abaddoncost * $Abaddoncount);
  40.  
  41. $Armageddoncost = "80000000";
  42. $Armageddoncostf = number_format($Armageddoncost * $Armageddoncount);
  43.  
  44. $Apocalypsecost = "60000000";
  45. $Apocalypsecostf = number_format($Apocalypsecost * $Apocalypsecount);
  46.  
  47. $Hyperioncost = "60000000";
  48. $Hyperioncostf = number_format($Hyperioncost * $Hyperioncount);
  49.  
  50. $Megathroncost = "60000000";
  51. $Megathroncostf = number_format($Megathroncost * $Megathroncount);
  52.  
  53. $Dominixcost = "60000000";
  54. $Dominixcostf = number_format($Dominixcost * $Dominixcount);
  55.  
  56. $Maelstromcost = "60000000";
  57. $Maelstromcostf = number_format($Maelstromcost * $Maelstromcount);
  58.  
  59. $Tempestcost = "60000000";
  60. $Tempestcostf = number_format($Tempestcost * $Tempestcount);
  61.  
  62. $Typhooncost = "60000000";
  63. $Typhooncostf = number_format($Typhooncost * $Typhooncount);
  64.  
  65. $Rokhcost = "60000000";
  66. $Rokhcostf = number_format($Rokhcost * $Rokhcount);
  67.  
  68. $Ravencost = "60000000";
  69. $Ravencostf = number_format($Ravencost * $Ravencount);
  70.  
  71. $Scorpioncost = "60000000";
  72. $Scorpioncostf = number_format($Scorpioncost * $Scorpioncount);
  73.  
  74.  
  75. //Begin deciding whats ordered
  76. if ($Abaddon == NULL) {
  77. } else {
  78. $Abaddonorder = "$Abaddon x$Abaddoncount - $Abaddoncostf ISK<br> ";
  79. }
  80.  
  81. if ($Armageddon == NULL) {
  82. } else {
  83. $Armageddonorder = "$Armageddon x$Armageddoncount - $Armageddoncostf ISK<br> ";
  84. }
  85.  
  86. if ($Apocalypse == NULL) {
  87. } else {
  88. $Apocalypseorder = "$Apocalypse x$Apocalypsecount - $Apocalypsecostf ISK<br> ";
  89. }
  90.  
  91. if ($Hyperion == NULL) {
  92. } else {
  93. $Hyperionorder = "$Hyperion x$Hyperioncount - $Hyperioncostf ISK<br> ";
  94. }
  95.  
  96. if ($Megathron == NULL) {
  97. } else {
  98. $Megathronorder = "$Megathron x$Megathroncount - $Megathroncostf ISK<br> ";
  99. }
  100.  
  101. if ($Dominix == NULL) {
  102. } else {
  103. $Dominixorder = "$Dominix x$Dominixcount - $Dominixcostf ISK<br> ";
  104. }
  105. if ($Maelstrom == NULL) {
  106. } else {
  107. $Maelstromorder = "$Maelstrom x$Maelstromcount - $Maelstromcostf ISK<br> ";
  108. }
  109.  
  110. if ($Tempest == NULL) {
  111. } else {
  112. $Tempestorder = "$Tempest x$Tempestcount - $Tempestcostf ISK<br> ";
  113. }
  114.  
  115. if ($Typhoon == NULL) {
  116. } else {
  117. $Typhoonorder = "$Typhoon x$Typhooncount - $Typhooncostf ISK<br> ";
  118. }
  119.  
  120. if ($Rokh == NULL) {
  121. } else {
  122. $Rokhorder = "$Rokh x$Rokhcount - $Rokhcostf ISK<br> ";
  123. }
  124.  
  125. if ($Raven == NULL) {
  126. } else {
  127. $Ravenorder = "$Raven x$Ravencount - $Ravencostf ISK<br> ";
  128. }
  129.  
  130. if ($Scorpion == NULL) {
  131. } else {
  132. $Scorpionorder = "$Scorpion x$Scorpioncount - $Scorpioncostf ISK<br> ";
  133. }
  134.  
  135. $wanted = "$Abaddonorder $Armageddonorder $Apocalypseorder $Hyperionorder $Megathronorder $Dominixorder $Maelstromorder $Tempestorder
  136.  
  137. $Typhoonorder $Rokhorder $Ravenorder $Scorpionorder";
  138. // Insert a row of information into the table "orders"
  139.  
  140. $sql="INSERT INTO orders
  141. (name, corp, alliance, wanted, ipaddress) VALUES(' $igname ', ' $corp ', ' $alliance ', ' $wanted ', ' $ipaddress ')";
  142.  
  143. if (!mysql_query($sql))
  144.   {
  145.   die('Error: ' . mysql_error());
  146.   }
  147. echo "Order Recieved";
  148.  
  149. ?>
Add Comment
Please, Sign In to add comment