set_filenames( array('plugin_admin_content' => PICLENS_ROOT.'/admin/rssfeed.tpl') ); if (isset($_POST['submit'])) { $me->my_config['piclens_thumb'] = $_POST['piclens_thumb']; $me->my_config['piclens_normal'] = $_POST['piclens_normal']; $me->my_config['piclens_order'] = $_POST['piclens_order']; $me->my_config['piclens_order_cat'] = $_POST['piclens_order_cat']; $me->my_config['piclens_sort'] = $_POST['piclens_sort']; $me->my_config['piclens_sort_cat'] = $_POST['piclens_sort_cat']; $included_file_types = isset($_POST['file_types']) ? array_map("mysql_escape_string", $_POST['file_types']) : array(); $me->my_config['included_file_types'] = $included_file_types; $me->my_config['piclens_name_image'] = $_POST['piclens_name_image']; $me->my_config['piclens_name_desc'] = $_POST['piclens_name_desc']; $me->my_config['piclens_video'] = isset($_POST['piclens_video']); $me->my_config['piclens_cat_view'] = isset($_POST['piclens_cat_view']); if ($me->my_config['piclens_order'] == 1) // defaut PIWIGO $me->my_config['piclens_sort'] = 1; // defaut PIWIGO if ($me->my_config['piclens_order_cat'] == 1) // defaut PIWIGO $me->my_config['piclens_sort_cat'] = 1; // defaut PIWIGO $me->save_config(); array_push($page['infos'], l10n('piclens_admin_saveOK')); } // Affichage des coix miniature possibles pour Piclens $i=1; foreach ( $thumb_list as $order ) //on parcours le tableau { $template->append('PlThumb',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_thumb'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_THUMB', $me->my_config['piclens_thumb']); // Affichage des choix normal possibles pour Piclens $i=1; foreach ( $normal_list as $order ) //on parcours le tableau { $template->append('PlNormal',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_normal'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_NORMAL', $me->my_config['piclens_normal']); // Affichage des tri possibles pour Piclens - HOME (Accueil) $i=1; foreach ( $order_list as $order ) //on parcours le tableau { $template->append('PlOrder',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_order'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_ORDER', $me->my_config['piclens_order']); // Affichage des tri possibles pour Piclens - CATEGORIES $i=1; foreach ( $order_list as $order ) //on parcours le tableau { $template->append('PlOrderC',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_order_cat'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_ORDER_CAT', $me->my_config['piclens_order_cat']); // Affichage de l'ordre possibles pour Piclens $i=1; foreach ( $sort_list as $order ) //on parcours le tableau { $template->append('PlSort',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_sort'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_SORT', $me->my_config['piclens_sort']); // Affichage de l'ordre possibles pour Piclens - CATEGORIES $i=1; foreach ( $sort_list as $order ) //on parcours le tableau { $template->append('PlSortC',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_sort_cat'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_SORT_CAT', $me->my_config['piclens_sort_cat']); /*ù // Selection type de fichier autorise $query = ' SELECT DISTINCT(tn_ext) FROM '.IMAGES_TABLE.';'; $result = pwg_query($query); if (!empty($result)) { while ($row = mysql_fetch_assoc($result)) { if (empty($row['tn_ext'])) $row['tn_ext']='!NULL!'; $template->append( 'file_types', array('SELECTED' => (!empty($me->my_config['included_file_types']) && in_array($row['tn_ext'], $me->my_config['included_file_types'] )) ? 'selected' : '', 'VALUE' => $row['tn_ext'], 'OPTION' => $row['tn_ext'] ) ); } } */ // Selection des groupes $exts = get_all_exts(); if (!empty($exts)) { $template->assign('file_types', get_html_exts_selection($exts, 'file_types', $me->my_config['included_file_types'])); } // Affichage des types d'affichage de nom image dans piclens $i=1; foreach ( $nameformat_list as $order ) //on parcours le tableau { $template->append('PlName',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_name_image'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_NAME_IMAGE', $me->my_config['piclens_name_image']); // Affichage des types d'affichage de description image dans piclens $i=1; foreach ( $descformat_list as $order ) //on parcours le tableau { $template->append('PlDesc',array('ID' => $i,'NAME' => $order,'SELECTED' => ($me->my_config['piclens_name_desc'] == $i ? 'selected' : ''))); $i++; } //$template->assign('PICLENS_NAME_DESC', $me->my_config['piclens_name_desc']); $template->assign('PICLENS_VIDEO', $me->my_config['piclens_video'] ? 'checked="checked"' : '' ); $template->assign('PICLENS_CAT_VIEW', $me->my_config['piclens_cat_view'] ? 'checked="checked"' : '' ); $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); ?>