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 3.08 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"> <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=" <?php echo $row['sitename'];?>"></td>
  36. </tr>
  37. <tr>
  38. <td>Contact</td>
  39. <td><input type="textfield" name="contact" value=" <?php echo $row['contact'];?>"></td>
  40.  
  41. </tr>
  42. <tr>
  43. <td>Phone</td>
  44. <td><input type="textfield" name="phone" value=" <?php echo $row['phone'];?>"></td>
  45.  
  46. </tr>
  47. <tr>
  48. <td>From Version</td>
  49. <td><input type="textfield" name="fromvers" value=" <?php echo $row['fromvers'];?>"></td>
  50.  
  51. </tr>
  52. <tr>
  53. <td>To Version</td>
  54. <td><input type="textfield" name="tovers" value=" <?php echo $row['tovers'];?>"></td>
  55.  
  56. </tr>
  57. <tr>
  58. <td>Acct Rep</td>
  59. <td><select name="assigned">
  60.  
  61. <option value="1">TEST</option>
  62.  
  63. </select>
  64. </td>
  65.  
  66. </tr>
  67. <tr>
  68. <td>Notes</td>
  69. <td><input type="textfield" name="notes" value=" <?php echo $row['notes'];?>"></td>
  70.  
  71. </tr>
  72. <tr>
  73. <td>Serial</td>
  74. <td><input type="textfield" name="serial" value=" <?php echo $row['serial'];?>"></td>
  75.  
  76. </tr>
  77. <tr>
  78. <td>Scheduled</td>
  79. <td><input type="textfield" name="scheduled" value=" <?php echo $row['scheduled'];?>"></td>
  80.  
  81. </tr>
  82. <tr>
  83. <td>Assigned</td>
  84. <td>
  85. <select name="assigned">
  86. <?php
  87. foreach (getUsers() as $user)
  88. {
  89. ?>
  90. <option value="
  91. <?php echo $user['id'];?>
  92. ">
  93. <?php echo $user['username'];?>
  94. </option>
  95. <?php
  96. }
  97. ?>
  98. </select>
  99.  
  100. </tr></td>
  101.  
  102. </table><input type="submit" name="submitItem" value="Save Changes"></form>
  103. <?php
  104. }
  105. }
  106.  
  107.  
  108. //QUE CHANGES
  109. if($_GET['mode']==1)
  110. {
  111. modCell('status', '1', 'id', $_GET['id']);
  112. echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
  113. //EMAIL STATUS
  114. }
  115. if($_GET['mode']==2)
  116. {
  117. modCell('status', '2', 'id', $_GET['id']);
  118. echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
  119. }
  120. if($_GET['mode']==3)
  121. {
  122. modCell('status', '3', 'id', $_GET['id']);
  123. echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
  124. }
  125. elseif(!$_GET['mode'])
  126. {
  127. echo "no mode entered";
  128. }
  129. ?>
Add Comment
Please, Sign In to add comment