Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set("display_errors", 1);
- require ('functions.upgrades.php');
- require ('class.mysql.php');
- require ('config.php');
- //DO MODES
- if ($_GET['do']=="save")
- {
- modRow($_GET['itemid'], $_POST['status'], $_POST['sitename'], $_POST['contact'],
- $_POST['phone'], $_POST['serial'], $_POST['fromvers'], $_POST['tovers'], $_POST['notes'],
- $_POST['assigned'], $_POST['acctrep']);
- }
- if ($_GET['mode']=="change")
- {
- $rows=showItem($_GET['itemid']);
- foreach($rows as $row)
- {
- ?>
- <form method="POST" name="editItem" action="do.php?mode=change&do=save&itemid='.$_GET['itemid'].'">
- <table border=1><tr>
- <td>Status</td>
- <td>
- <select name="status"> <option value="0">Just Input</option>
- <option value="1">Download Complete</option>
- <option value="2">Upgrade Complete</option>
- <option value="3">Archive</option>
- <option value="10">Hold</option></select></td>
- </tr><tr>
- <td>Company Name</td>
- <td><input type="textfield" name="sitename" value=" <?php echo $row['sitename'];?>"></td>
- </tr>
- <tr>
- <td>Contact</td>
- <td><input type="textfield" name="contact" value=" <?php echo $row['contact'];?>"></td>
- </tr>
- <tr>
- <td>Phone</td>
- <td><input type="textfield" name="phone" value=" <?php echo $row['phone'];?>"></td>
- </tr>
- <tr>
- <td>From Version</td>
- <td><input type="textfield" name="fromvers" value=" <?php echo $row['fromvers'];?>"></td>
- </tr>
- <tr>
- <td>To Version</td>
- <td><input type="textfield" name="tovers" value=" <?php echo $row['tovers'];?>"></td>
- </tr>
- <tr>
- <td>Acct Rep</td>
- <td><select name="assigned">
- <option value="1">TEST</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>Notes</td>
- <td><input type="textfield" name="notes" value=" <?php echo $row['notes'];?>"></td>
- </tr>
- <tr>
- <td>Serial</td>
- <td><input type="textfield" name="serial" value=" <?php echo $row['serial'];?>"></td>
- </tr>
- <tr>
- <td>Scheduled</td>
- <td><input type="textfield" name="scheduled" value=" <?php echo $row['scheduled'];?>"></td>
- </tr>
- <tr>
- <td>Assigned</td>
- <td>
- <select name="assigned">
- <?php
- foreach (getUsers() as $user)
- {
- ?>
- <option value="
- <?php echo $user['id'];?>
- ">
- <?php echo $user['username'];?>
- </option>
- <?php
- }
- ?>
- </select>
- </tr></td>
- </table><input type="submit" name="submitItem" value="Save Changes"></form>
- <?php
- }
- }
- //QUE CHANGES
- if($_GET['mode']==1)
- {
- modCell('status', '1', 'id', $_GET['id']);
- echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
- //EMAIL STATUS
- }
- if($_GET['mode']==2)
- {
- modCell('status', '2', 'id', $_GET['id']);
- echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
- }
- if($_GET['mode']==3)
- {
- modCell('status', '3', 'id', $_GET['id']);
- echo '<a href="index.php">Please refresh your screen. Click here to go home...</a>';
- }
- elseif(!$_GET['mode'])
- {
- echo "no mode entered";
- }
- ?>
Add Comment
Please, Sign In to add comment