X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofil%2Fget_skill.inc.php;h=d735ac2ac1601cd5086c5c7f92caf9a7b9c0f587;hb=1a013db76335dc18f2b756bd5aca57401d384026;hp=a5381b74177cc195a3cc463ca7015c1a58f91b6f;hpb=08cce2ff528b38bde27cdec6d6bc28d6af4a42d4;p=platal.git diff --git a/include/profil/get_skill.inc.php b/include/profil/get_skill.inc.php index a5381b7..d735ac2 100644 --- a/include/profil/get_skill.inc.php +++ b/include/profil/get_skill.inc.php @@ -21,20 +21,20 @@ if(Env::has('langue_op')){ - if(Env::get('langue_op', '')=='retirer'){ - XDB::execute("DELETE FROM langues_ins WHERE uid = {?} AND lid = {?}", Session::getInt('uid', -1), Env::get('langue_id', '')); - } elseif(Env::get('langue_op', '') == 'ajouter'){ - if(Env::get('langue_id', '') != '') - XDB::execute("INSERT INTO langues_ins (uid,lid,level) VALUES ({?}, {?}, {?})", Session::getInt('uid', -1), Env::get('langue_id', ''), Env::get('langue_level', '')); + if(Env::v('langue_op', '')=='retirer'){ + XDB::execute("DELETE FROM langues_ins WHERE uid = {?} AND lid = {?}", S::v('uid', -1), Env::v('langue_id', '')); + } elseif(Env::v('langue_op', '') == 'ajouter'){ + if(Env::v('langue_id', '') != '') + XDB::execute("INSERT INTO langues_ins (uid,lid,level) VALUES ({?}, {?}, {?})", S::v('uid', -1), Env::v('langue_id', ''), Env::v('langue_level', '')); } } if(Env::has('comppros_op')){ - if(Env::get('comppros_op', '')=='retirer'){ - XDB::execute("DELETE FROM competences_ins WHERE uid = {?} AND cid = {?}", Session::getInt('uid', -1), Env::get('comppros_id', '')); - } elseif(Env::get('comppros_op', '') == 'ajouter') { - if(Env::get('comppros_id', '') != '') - XDB::execute("INSERT INTO competences_ins (uid,cid,level) VALUES({?}, {?}, {?})", Session::getInt('uid', -1), Env::get('comppros_id', ''), Env::get('comppros_level', '')); + if(Env::v('comppros_op', '')=='retirer'){ + XDB::execute("DELETE FROM competences_ins WHERE uid = {?} AND cid = {?}", S::v('uid', -1), Env::v('comppros_id', '')); + } elseif(Env::v('comppros_op', '') == 'ajouter') { + if(Env::v('comppros_id', '') != '') + XDB::execute("INSERT INTO competences_ins (uid,cid,level) VALUES({?}, {?}, {?})", S::v('uid', -1), Env::v('comppros_id', ''), Env::v('comppros_level', '')); } } @@ -44,7 +44,7 @@ $nb_lg_max = 10; $nb_cpro_max = 20; $res = XDB::iterRow("SELECT ld.id, ld.langue_fr, li.level FROM langues_ins AS li, langues_def AS ld " - ."WHERE (li.lid=ld.id AND li.uid= {?}) LIMIT $nb_lg_max", Session::getInt('uid', -1)); + ."WHERE (li.lid=ld.id AND li.uid= {?}) LIMIT $nb_lg_max", S::v('uid', -1)); $nb_lg = $res->total(); @@ -53,7 +53,7 @@ for ($i = 1; $i <= $nb_lg; $i++) { } $res = XDB::iterRow("SELECT cd.id, cd.text_fr, ci.level FROM competences_ins AS ci, competences_def AS cd " - ."WHERE (ci.cid=cd.id AND ci.uid={?}) LIMIT $nb_cpro_max", Session::getInt('uid', -1)); + ."WHERE (ci.cid=cd.id AND ci.uid={?}) LIMIT $nb_cpro_max", S::v('uid', -1)); $nb_cpro = $res->total();