. */ /* */ /*************************************************************************************/ require_once(__DIR__ . "/../pre.php"); require_once(__DIR__ . "/../auth.php"); require_once(__DIR__ . "/../../fonctions/divers.php"); if(! est_autorise("configuration")) exit; header('Content-Type: text/html; charset=utf-8'); $action = lireParam('action', 'string'); if ($action == 'tva') { $pays = new Pays(); $id = intval(lireParam('pays', 'int')); if ($pays->charger($id)) { $pays->tva = intval($_REQUEST['tva']); $pays->maj(); } exit(); } else if ($action == 'defaut') { $pays = new Pays(); $id = intval(lireParam('pays', 'int')); $pays->query("update $pays->table set `defaut`=0"); $pays->query("update $pays->table set `defaut`=1 where id=$id"); exit(); } else if ($action == 'boutique') { $pays = new Pays(); $id = intval(lireParam('pays', 'int')); $pays->query("update $pays->table set `boutique`=0"); $pays->query("update $pays->table set `boutique`=1 where id=$id"); exit(); } /* Afficher la forme de modif/creation de pays */ $langues = array(); $langue = new Lang(); $result = $langue->query("select * from " . $langue->table . " order by id"); while ($result && $row = $langue->fetch_object($result)) { $langues[] = $row; } $pays = new Pays(); $paysdesc = new Paysdesc(); $id = intval(lireParam('pays', 'int')); $pays->id = $id; if ($id > 0) { $pays->charger($id); } ?>