'; /** * if post save then we save a new one */ if ( isset($_POST['save_plugin'])) { extract($_POST); $plugin=new Extension($cn); $plugin->me_code=$me_code; $plugin->me_menu=$me_menu; $plugin->me_file=$me_file; $plugin->me_description=$me_description; $plugin->me_parameter='plugin_code='.$me_code; $plugin->insert_plugin(); } /** * if post update then we update */ if (isset($_POST['mod_plugin'])) { extract ($_POST); $plugin=new Extension($cn); $plugin->me_code=strtoupper($me_code); $plugin->me_menu=$me_menu; $plugin->me_file=$me_file; $plugin->me_description=$me_description; $plugin->me_parameter='plugin_code='.strtoupper($me_code); if ( !isset ($delete_pl)) { $plugin->update_plugin(); } else { $plugin->remove_plugin(); } } /** * if post save then we save a new one */ if ( isset($_POST['create_menu'])|| isset($_POST['modify_menu'])) { extract($_POST); $menu_ref=new Menu_Ref($cn); $menu_ref->me_code=strtoupper($me_code); $menu_ref->me_menu=$me_menu; $menu_ref->me_file=$me_file; $menu_ref->me_description=$me_description; $menu_ref->me_parameter=$me_parameter; $menu_ref->me_url=$me_url; $menu_ref->me_javascript=$me_javascript; $menu_ref->me_type='ME'; $check=$menu_ref->verify(); if ($check == 0) { if (isset($_POST['create_menu'])) { $menu_ref->insert(); } elseif (isset($_POST['modify_menu'])) { if ($menu_ref->verify() == 0) $menu_ref->update(); } } } ////////////////////////////////////////////////////////////////////////////// // Show the list of menu ////////////////////////////////////////////////////////////////////////////// global $cn; $table=new Sort_Table(); $url=$_SERVER['REQUEST_URI']; $table->add(_('Code'),$url,"order by me_code asc","order by me_code desc","codea","coded"); $table->add(_('Menu'),$url,"order by me_menu asc","order by me_menu desc","menua","menud"); $table->add(_('Description'),$url,"order by me_description asc","order by me_description desc","desa","desd"); $table->add(_('Type'),$url,"order by me_type asc","order by me_type desc","ta","td"); $table->add(_('Fichier'),$url,"order by me_file asc","order by me_file desc","fa","fd"); $table->add(_('URL'),$url,"order by me_url asc","order by me_url desc","urla","urld"); $table->add(_('Paramètre'),$url,"order by me_parametere asc","order by me_parameter desc","paa","pad"); $table->add(_('Javascript'),$url,"order by me_javascript asc","order by me_javascript desc","jsa","jsd"); $ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'codea'; $order=$table->get_sql_order($ord); $iselect=new ISelect('p_type'); $iselect->value=array( array("value"=>'',"label"=>_("Tout")), array("value"=>'ME',"label"=>_("Menu")), array("value"=>'PR',"label"=>_("Impression")), array("value"=>'PL',"label"=>_("Extension / Plugin")), array("value"=>'SP',"label"=>_("Valeurs spéciales")) ); $iselect->selected=(isset($_REQUEST['p_type']))?$_REQUEST['p_type']:''; $sql=""; if ( $iselect->selected != '') { $sql="where me_type='".sql_string($_REQUEST['p_type'])."' "; } $menu=new Menu_Ref_sql($cn); $ret=$menu->seek($sql.$order); ?>
'; echo '