X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofil%2Fget_poly.inc.php;h=07ea2666734e3e9c8b2e5bc482fc39edb77ea737;hb=5e2307dcebc38ebb0ffe469967a377eb3baed571;hp=d58b2cde90c8d26de58e4bbf2a280dccecec4d7f;hpb=50a40a33a496131e817df875607ea5542d096a64;p=platal.git diff --git a/include/profil/get_poly.inc.php b/include/profil/get_poly.inc.php index d58b2cd..07ea266 100644 --- a/include/profil/get_poly.inc.php +++ b/include/profil/get_poly.inc.php @@ -26,7 +26,7 @@ $sql = "SELECT section". " FROM auth_user_md5 AS u". " WHERE user_id = {?}"; -$result = $globals->xdb->query($sql, Session::getInt('uid', -1)); +$result = XDB::query($sql, S::v('uid', -1)); $section = $result->fetchOneCell(); replace_ifset($section,'section'); @@ -34,23 +34,23 @@ replace_ifset($section,'section'); /************* gestion des binets ************/ if (Env::has('binet_op')) { // retrait binet - if( (Env::get('binet_op', '')=='retirer')&&(Env::getInt('binet_id', 0) != 0)) { - $globals->xdb->execute("DELETE FROM binets_ins WHERE user_id = {?} AND binet_id = {?}", Session::getInt('uid', -1), Env::getInt('binet_id', -1)); + if( (Env::v('binet_op', '')=='retirer')&&(Env::i('binet_id', 0) != 0)) { + XDB::execute("DELETE FROM binets_ins WHERE user_id = {?} AND binet_id = {?}", S::v('uid', -1), Env::i('binet_id', -1)); } // ajout binet - if (Env::get('binet_op')=="ajouter" && (Env::getInt('binet_id', 0) != 0)) { - $globals->xdb->execute("INSERT INTO binets_ins (user_id,binet_id) VALUES({?}, {?})", Session::getInt('uid', -1), Env::getInt('binet_id', -1)); + if (Env::v('binet_op')=="ajouter" && (Env::i('binet_id', 0) != 0)) { + XDB::execute("INSERT INTO binets_ins (user_id,binet_id) VALUES({?}, {?})", S::v('uid', -1), Env::i('binet_id', -1)); } } /************* gestion des groupes X ************/ if (Env::has('groupex_op')) { // retrait groupe X - if (Env::get('groupex_op')=="retirer" && (Env::getInt('groupex_id', 0) != 0)) { - $globals->xdb->execute("DELETE FROM groupesx_ins WHERE guid = {?} AND gid = {?}", Session::getInt('uid', -1), Env::getInt('groupex_id', -1)); + if (Env::v('groupex_op')=="retirer" && (Env::i('groupex_id', 0) != 0)) { + XDB::execute("DELETE FROM groupesx_ins WHERE guid = {?} AND gid = {?}", S::v('uid', -1), Env::i('groupex_id', -1)); } // ajout groupe X - if (Env::get('groupex_op')=="ajouter" && (Env::getInt('groupex_id', 0) != 0)) { - $globals->xdb->execute("INSERT INTO groupesx_ins (guid, gid) VALUES ({?}, {?})", Session::getInt('uid', -1), Env::getInt('groupex_id', -1)); + if (Env::v('groupex_op')=="ajouter" && (Env::i('groupex_id', 0) != 0)) { + XDB::execute("INSERT INTO groupesx_ins (guid, gid) VALUES ({?}, {?})", S::v('uid', -1), Env::i('groupex_id', -1)); } }