Guest User

Untitled

a guest
Jul 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set("display_errors", 1);
  4. require ('functions.upgrades.php');
  5. require ('class.mysql.php');
  6. require ('config.php');
  7.  
  8. //DO MODES
  9. if ($_GET['do']=="save")
  10. {
  11. modRow($_GET['itemid'], $_POST['status'], $_POST['sitename'], $_POST['contact'],
  12. $_POST['phone'], $_POST['serial'], $_POST['fromvers'], $_POST['tovers'], $_POST['notes'],
  13. $_POST['assigned'], $_POST['acctrep']);
  14. }
  15. if ($_GET['mode']=="change")
  16. {
  17. $rows=showItem($_GET['itemid']);
  18. foreach($rows as $row)
  19. {
  20. ?>
  21. <form method="POST" name="editItem" action="do.php?mode=change&do=save&itemid='.$_GET['itemid'].'">
  22. <table border=1><tr>
  23.  
  24. <td>Status</td>
  25. <td>
  26. <select name="status" value="'.$_GET['status'].'"><option value="0">Just Input</option>
  27. <option value="1">Download Complete</option>
  28. <option value="2">Upgrade Complete</option>
  29. <option value="3">Archive</option>
  30. <option value="10">Hold</option></select></td>
  31.  
  32. </tr><tr>
  33.  
  34. <td>Company Name</td>
  35. <td><input type="textfield" name="sitename" value="'.$row['sitename'].'"></td>
  36. </tr>
  37. <tr>
  38. <td>Contact</td>
  39. <td><input type="textfield" name="contact" value="'.$row['contact'].'"></td>
  40.  
  41. </tr>
  42. <tr>
  43. <td>Phone</td>
  44. <td><input type="textfield" name="phone" value="'.$row['phone'].'"></td>
  45.  
  46. </tr>
  47. <tr>
  48. <td>From Version</td>
  49. <td><input type="textfield" name="fromvers" value="'.$row['fromvers'].'"></td>
  50.  
  51. </tr>
  52. <tr>
  53. <td>To Version</td>
  54. <td><input type="textfield" name="tovers" value="'.$row['tovers'].'"></td>
  55.  
  56. </tr>
  57. <tr>
  58. <td>Acct Rep</td>
  59. <td><input type="textfield" name="acctrep" value="'.$row['acctrep'].'"></td>
  60.  
  61. </tr>
  62. <tr>
  63. <td>Notes</td>
  64. <td><input type="textfield" name="notes" value="'.$row['notes'].'"></td>
  65.  
  66. </tr>
  67. <tr>
  68. <td>Serial</td>
  69. <td><input type="textfield" name="serial" value="'.$row['serial'].'"></td>
  70.  
  71. </tr>
  72. <tr>
  73. <td>Scheduled</td>
  74. <td><input type="textfield" name="scheduled" value="'.$row['scheduled'].'"></td>
  75.  
  76. </tr>
  77. <tr>
  78. <td>Assigned</td>
  79. <td>
  80. <select name="assigned" value="'.$row['assigned'].'">
  81. <?php
  82. foreach (getUsers() as $user)
  83. {
  84. ?>
  85. <option value='.$user['id'].'>'.$user['username'].'</option>
  86. <?php }?>
  87. </select>
  88.  
  89. </tr></td>
  90.  
  91. </table><input type="submit" name="submitItem" value="Save Changes"></form>
  92. <?php
  93. }
  94. }
  95.  
  96.  
  97. //QUE CHANGES
  98. if($_GET['mode']==1)
  99. {
  100. modCell('status', '1', 'id', $_GET['id']);
  101. echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
  102. //EMAIL STATUS
  103. }
  104. if($_GET['mode']==2)
  105. {
  106. modCell('status', '2', 'id', $_GET['id']);
  107. echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
  108. }
  109. if($_GET['mode']==3)
  110. {
  111. modCell('status', '3', 'id', $_GET['id']);
  112. echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
  113. }
  114. elseif(!$_GET['mode'])
  115. {
  116. echo "no mode entered";
  117. }
  118. ?>
Add Comment
Please, Sign In to add comment