ZuL | nan mais le submit est bon puisqu'il execute bien les actions demandées (qui sont contenues dans LIB_admin.php)
le probleme c'est qu'il execute la fonction et que en sortie de ca, au lieu de retourner sur la page, il retourne sur la racine du rep.
les fonctions appellées ds LIB_admin sont du type :
Code :
- function create_section($se_libelle,$se_priorite,$db,$session_user)
- {
- $rs = new Recordset;
- $sql="update section set se_priorite=(se_priorite+1) where se_priorite >=". $se_priorite .";";
- $db->Execute($sql);
- $sql="insert into Section(se_libelle,se_priorite) values('". $se_libelle ."',". $se_priorite ." );";
- $db->Execute($sql);
- //--- recup de l'id de la section
- $sql = "SELECT last_value FROM s_section;";
- $rs->open($db,$sql);
- $sec = $rs->champ["last_value"];
- //recup max priorite
- $sql = "SELECT MAX(th_priorite) FROM theme where th_section=". $sec .";";
- $rs->open($db,$sql);
- $Tpriorite = $rs->champ[0] +1;
- $sql = "insert into theme(th_section,th_post,th_libelle,th_description,th_priorite,th_nbsujet,th_nbpost)";
- $sql .= " values(".$sec.",-1,'generation automatique','---',". $Tpriorite .",1,1);";
- $db->Execute($sql);
- //--- recup de l'id du theme
- $sql = "SELECT last_value FROM s_theme;";
- $rs->open($db,$sql);
- $th = $rs->champ["last_value"];
- $sql = "INSERT INTO SUJET (SU_USER , SU_THEME , SU_ICONE , SU_POST , SU_DATE , SU_LIBELLE , SU_NBPOST , SU_NBVUE , SU_CLOS , SU_SONDAGE ) ";
- $sql = $sql . " VALUES (" . $session_user . " , " . $th . " , 1 , -1 , '" . date("YmdHi" ) . "' , 'génération automatique' , 1 , 0 , 't' , 'f' );";
- $db->Execute($sql);
- //--- recup de l'id du sujet
- $sql = "SELECT last_value FROM s_sujet;";
- $rs->open($db,$sql);
- $su = $rs->champ["last_value"];
- $sql = "INSERT INTO POST ( PO_USER , PO_SUJET , PO_DATE_CREATION , PO_DATE_EDIT , PO_CORPS , PO_EDITEUR ) ";
- $sql = $sql . " VALUES (" . $session_user . " , " . $su . " , '" . date("YmdHi" ) . "' , '' , 'génération automatique' , '' );";
- $db->Execute($sql);
- //--- recup de l'id du post
- $sql = "SELECT last_value FROM s_post;";
- $rs->open($db,$sql);
- $po = $rs->champ["last_value"];
- //--- update du sujet
- $req = "UPDATE SUJET set SU_NBPOST = (SU_NBPOST + 1) , SU_POST = " . $po . " where SU_CODE = " . $su . " ;" ;
- $db->Execute($req);
- //--- update du theme
- $sql = "UPDATE theme set th_post =". $po ." where th_CODE = " . $th . " ;" ;
- $db->Execute($sql);
- return 1;
- }
|
|