assign(array('CURRENT' => $conf_imageforall[0],)); $query = 'SELECT COUNT(DISTINCT(image_id)) FROM '.IMAGE_CATEGORY_TABLE.';'; $result = pwg_query($query) ; $total_img = mysql_fetch_row($result); if (isset($_POST['insert_nb_tot'])){ $template->assign( array( 'NEW_EXPRESS' => $_POST['new_form'].'{NB_TOTAL}', )); } if (isset($_POST['insert_nb_access'])){ $template->assign( array( 'NEW_EXPRESS' => $_POST['new_form'].'{NB_PICTURE}', )); } if (isset($_POST['insert_default'])){ $template->assign( array( 'NEW_EXPRESS' => '{NB_PICTURE} images / {NB_TOTAL} images', )); } if (isset($_POST['submit']) and !empty($_POST['new_form']) and !is_adviser()) { $query = ' UPDATE '.CONFIG_TABLE.' SET value="'.$_POST['new_form'].'" WHERE param="imageforall" LIMIT 1'; pwg_query($query); $template->assign(array('CURRENT' => $_POST['new_form'],)); array_push( $page['infos'], sprintf(l10n('new_express_saved')) ); } $template->set_filenames(array('plugin_admin_content' => realpath(IMG_PATH . 'admin/img_admin.tpl'))); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); ?>