0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www.OLD
/
classes
/
ajax
/
[
Home
]
File: transport.php
<?php include_once(realpath(dirname(__FILE__)) . "/../../classes/Administrateur.class.php"); include_once(realpath(dirname(__FILE__)) . "/../../classes/Navigation.class.php"); session_start(); if( ! isset($_SESSION["util"]->id) ) {header("Location: ../index.php");exit;} include_once(realpath(dirname(__FILE__)) . "/../../fonctions/divers.php"); ?> <?php if(! est_autorise("acces_configuration")) exit; ?> <?php include_once("../../classes/Transzone.class.php"); include_once("../../classes/Zone.class.php"); ?> <?php if($_GET['action'] == "supprimer" && $_GET['zone'] != ""){ $transzone = new Transzone(); $transzone->charger_id($_GET['zone']); $transzone->delete(); } else if($_GET['action'] == "ajouter" && $_GET['id'] != "" && $_GET['zone'] != ""){ $transzone = new Transzone(); $transzone->zone = $_GET['zone']; $transzone->transport = $_GET['id']; $transzone->add(); } $zone = new Zone(); ?> <table id="listezone"> <tbody> <tr> <td width="119"><select id="zone"> <?php $query = "select * from $zone->table"; $resul = mysql_query($query, $transzone->link); while($row = mysql_fetch_object($resul)){ $test = new Transzone(); if(! $test->charger($_GET['id'], $row->id)){ ?> <option value="<?php echo $row->id; ?>"><?php echo $row->nom; ?></option> <?php } } ?> </select></td> <td width="72"><a href="javascript:ajouter($('#zone').val())" class="button">AJOUTER UNE ZONE</a></td> </tr><?php $query = "select * from $transzone->table where transport=\"" . $_GET['id']. "\""; $resul = mysql_query($query, $transzone->link); $i = 0; while($row = mysql_fetch_object($resul)){ $zone = new Zone(); $zone->charger($row->zone); if($i%2) $fond = "ligne_fonce_BlocDescription"; else $fond = "ligne_claire_BlocDescription"; ?><tr> <td><?php echo $zone->nom; ?></td> <td><a href="javascript:supprimer(<?php echo $row->id; ?>)"><img border="0" src="resources/images/icons/cross.png"></a></td> </tr><?php $i++; } ?> </tbody> </table>
©
2018.