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" value="'.$_GET['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="'.$row['sitename'].'"></td>
- </tr>
- <tr>
- <td>Contact</td>
- <td><input type="textfield" name="contact" value="'.$row['contact'].'"></td>
- </tr>
- <tr>
- <td>Phone</td>
- <td><input type="textfield" name="phone" value="'.$row['phone'].'"></td>
- </tr>
- <tr>
- <td>From Version</td>
- <td><input type="textfield" name="fromvers" value="'.$row['fromvers'].'"></td>
- </tr>
- <tr>
- <td>To Version</td>
- <td><input type="textfield" name="tovers" value="'.$row['tovers'].'"></td>
- </tr>
- <tr>
- <td>Acct Rep</td>
- <td><input type="textfield" name="acctrep" value="'.$row['acctrep'].'"></td>
- </tr>
- <tr>
- <td>Notes</td>
- <td><input type="textfield" name="notes" value="'.$row['notes'].'"></td>
- </tr>
- <tr>
- <td>Serial</td>
- <td><input type="textfield" name="serial" value="'.$row['serial'].'"></td>
- </tr>
- <tr>
- <td>Scheduled</td>
- <td><input type="textfield" name="scheduled" value="'.$row['scheduled'].'"></td>
- </tr>
- <tr>
- <td>Assigned</td>
- <td>
- <select name="assigned" value="'.$row['assigned'].'">
- <?php
- foreach (getUsers() as $user)
- {
- ?>
- <option value='.$user['id'].'>'.$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