Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['status'])) {
- $qSelect_onderdelen = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM status3 ORDER BY id ASC") or die (((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
- while($aOnderdeel = mysqli_fetch_array($qSelect_onderdelen)) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE status3 SET status='".$_POST[''.htmlentities($aOnderdeel['id']).'']."' WHERE id='".htmlentities($aOnderdeel['id'])."'");
- }
- header('Location: '.$adminurl.'statussen/');
- }else{
- ?>
- <form method="post">
- <table width="100%" cellpadding="8" cellspacing="0" style="margin-top: 13px; border-top: 1px #dedede solid; border-right: 1px #dedede solid; border-left: 1px #dedede solid;">
- <tr>
- <td style="border-bottom: 1px #dedede solid; border-right: 1px #dedede solid;"><strong>Onderdeel</strong></td>
- <td width="65" align="center" style="border-bottom: 1px #dedede solid;"><strong>Status</strong></td>
- </tr>
- <?php
- $qSelect_onderdelen = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM status3 ORDER BY id ASC") or die (((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
- while($aOnderdeel = mysqli_fetch_array($qSelect_onderdelen)) {
- echo ' <tr>
- <td style="border-bottom: 1px #dedede solid; border-right: 1px #dedede solid;">'.htmlentities($aOnderdeel['naam']).'</td>
- <td align="center" style="border-bottom: 1px #dedede solid;">
- <select name="'.htmlentities($aOnderdeel['id']).'">
- ';
- if(htmlentities($aOnderdeel['status']) == 'AAN') {
- echo ' <option value="AAN" selected="selected">AAN</option>
- <option value="UIT">UIT</option>
- ';
- }else{
- echo ' <option value="AAN">AAN</option>
- <option value="UIT" selected="selected">UIT</option>
- ';
- }
- echo ' </select>
- </td>
- </tr>
- ';
- }
- ?>
- </table>
- <span id="smallnotice">* Zet de optie "onderhoud" altijd uit na gebruik. Bezoekers kunnen niet de website bezoeken wanneer deze optie op "aan" staat!</span><br />
- <input type="submit" name="status" value="Verander statussen" />
- </form>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement