add( 'autosize_admin', l10n('admin'), $my_base_url.'&tab=autosize_admin' ); /* $tabsheet->add( 'autosize_help', l10n('help'), $my_base_url.'&tab=autosize_help' ); */ if (!isset($_GET['tab'])) $page['tab'] = 'autosize_admin'; else $page['tab'] = $_GET['tab']; $tabsheet->select($page['tab']); $tabsheet->assign(); $page['global'] = array(); $error = array(); global $user, $conf, $errors ; global $args, $autosizes_message,$erreur_message ; include_once (AUTOSIZE_PATH.'include/constants.php'); $aff_nb=true; ; include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); $my_base_url = get_admin_plugin_menu_link(__FILE__); load_language('plugin.lang', AUTOSIZE_PATH ); // ************************************************************************* // | Sélection de l'onglet | // ************************************************************************* global $infos_message , $erreur_message ,$warnings_message ; global $conf; global $autosize_parametres; global $template,$page,$conf ; global $picture; $visible=true; $path = AUTOSIZE_PATH; global $has_pamoorama,$autosize_parametres; global $defined_types,$pictureDeriv ,$liste_type,$SRC_IMG; global $pictureSelType ; $reload=false ; include (AUTOSIZE_PATH."include/affiche.php"); $autosize_parametres = cl_autosize_Get_Options(); $types = array_intersect(array_keys(ImageStdParams::get_defined_type_map()), array("Autosize","SelMaxi")); if (count($types)==0){ if(!isset($warnings_message)) $warnings_message=""; include_once (AUTOSIZE_PATH.'maintain.inc.php'); if (isset($conf['cl_derivatives_sav'])) { plugin_deactivate() ; } plugin_activate(); $warnings_message .= "Set :"; $defined_types = array_keys(ImageStdParams::get_defined_type_map()); $warnings_message .= cl_print_var($defined_types); $reload=true ; } $defined_types = array_keys(ImageStdParams::get_defined_type_map()); if (isset($_POST['submit'])) { if ($_POST['submit'] == l10n('cl_autosize_save')) { cl_autosize_sauve_options_inf() ; // unset($_POST); } } //========================================= if (isset($_POST['img_start'])) { unset($_POST); } //================================================================================ $base_url = get_root_url().'admin_autosize.php'; switch ($page['tab']) { case 'autosize_admin': $template->set_filenames(array('plugin_admin_content' => realpath(AUTOSIZE_PATH . 'admin/template/admin.tpl'))); $template->assign( array( 'reload' => $reload, )); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); break; case 'autosize_help': $message="
"; if (isset($_POST['valid'])) { $message = empty($_POST['texte']) ? $message : stripslashes($_POST['texte']); } //========================================================================= $toolbar = 'Full'; //basic $width = 'auto'; $height = 'auto'; $areas = array(); $areas[]='texte'; if (!empty($areas)){ if (function_exists('set_fckeditor_instance')) { $template->set_prefilter('plugin_admin_content', 'add_remove_button'); set_fckeditor_instance($areas, $toolbar, $width, $height); } } $template->set_filenames(array( 'plugin_admin_content' => realpath(AUTOSIZE_PATH . 'admin/template/help.tpl' ))); $template->assign( array( 'message' => $message )); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); break; } if (!isset($infos_message)){ $infos_message = ""; } if ($infos_message != "") { array_push($page['infos'], $infos_message); $infos_message=""; } if (!isset($erreur_message)){ $erreur_message = ""; } if ($erreur_message != "") { array_push($page['errors'], $erreur_message); $erreur_message=""; } if (!isset($warnings_message)){ $warnings_message = ""; } if ($warnings_message != "") { array_push($page['warnings'], $warnings_message); $warnings_message=""; } //================================================================ ?>