15 define(
'IN_PEEL_ADMIN',
true);
16 include(
"../configuration.inc.php");
21 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_haut.php");
28 switch (
vb($_REQUEST[
'mode'])) {
54 if(!empty($_GET[
'id'])) {
67 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_bas.php");
84 $qid =
query(
"SELECT *
90 $frm[
"nouveau_mode"] =
"maj";
91 $frm[
"titre_bouton"] =
$GLOBALS[
'STR_ADMIN_FORM_SAVE_CHANGES'];
109 $frm[
'technical_code'] =
"";
111 $frm[
'nouveau_mode'] =
"insere";
113 $frm[
'site_id'] =
"";
127 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_formulaire_meta.tpl');
130 $tpl->assign(
'mode',
$frm[
"nouveau_mode"]);
131 $tpl->assign(
'id', intval(
$frm[
'id']));
133 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
135 'meta_titre' =>
vb(
$frm[
'meta_titre_' . $lng]),
136 'meta_key' =>
vb(
$frm[
'meta_key_' . $lng]),
137 'meta_desc' =>
vb(
$frm[
'meta_desc_' . $lng]),
141 $tpl->assign(
'technical_code',
vb(
$frm[
'technical_code']));
142 $tpl->assign(
'titre_bouton',
$frm[
'titre_bouton']);
144 $tpl->assign(
'site_id_select_multiple', !empty(
$GLOBALS[
'site_parameters'][
'multisite_using_array_for_site_id']));
145 $tpl->assign(
'STR_ADMIN_WEBSITE',
$GLOBALS[
'STR_ADMIN_WEBSITE']);
146 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
148 $tpl->assign(
'STR_ADMIN_META_PAGE_TITLE',
$GLOBALS[
'STR_ADMIN_META_PAGE_TITLE']);
149 $tpl->assign(
'STR_ADMIN_LANGUAGES_SECTION_HEADER',
$GLOBALS[
'STR_ADMIN_LANGUAGES_SECTION_HEADER']);
150 $tpl->assign(
'STR_ADMIN_META_TITLE',
$GLOBALS[
'STR_ADMIN_META_TITLE']);
151 $tpl->assign(
'STR_ADMIN_META_KEYWORDS',
$GLOBALS[
'STR_ADMIN_META_KEYWORDS']);
152 $tpl->assign(
'STR_ADMIN_SEPARATE_KEYWORDS_EXPLAIN',
$GLOBALS[
'STR_ADMIN_SEPARATE_KEYWORDS_EXPLAIN']);
153 $tpl->assign(
'STR_ADMIN_META_DESCRIPTION',
$GLOBALS[
'STR_ADMIN_META_DESCRIPTION']);
154 $tpl->assign(
'STR_ADMIN_VARIOUS_INFORMATION_HEADER',
$GLOBALS[
'STR_ADMIN_VARIOUS_INFORMATION_HEADER']);
155 $tpl->assign(
'STR_ADMIN_TECHNICAL_CODE',
$GLOBALS[
'STR_ADMIN_TECHNICAL_CODE']);
169 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' => sprintf(
$GLOBALS[
'STR_ADMIN_META_META_DELETED'],
$id)))->fetch();
182 $sql =
'INSERT INTO';
186 $sql .=
' peel_meta SET
190 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
211 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_liste_meta.tpl');
218 $tpl_results = array();
226 if (!empty($meta_titre)) {
227 $anchor = $meta_titre;
228 }
elseif (!empty($meta_desc)) {
229 $anchor = $meta_desc;
230 }
elseif (!empty($meta_key)) {
231 $meta_key_array = explode(
',', $meta_key);
232 for (
$i = 0;
$i < 4;
$i++) {
233 $anchor .= $meta_key_array[
$i] .
' ';
238 $anchor .=
'['.$ligne[
'id'].
']';
240 $tpl_results[] = array(
'href' =>
get_current_url(
false) .
'?mode=modif&id=' . $ligne[
'id'],
241 'technical_code' => $ligne[
'technical_code'],
244 'drop_href' =>
get_current_url(
false) .
'?mode=suppr&id=' . $ligne[
'id']
247 $tpl->assign(
'results', $tpl_results);
249 $tpl->assign(
'administrer_url',
$GLOBALS[
'administrer_url']);
250 $tpl->assign(
'drop_src',
$GLOBALS[
'administrer_url'] .
'/images/b_drop.png');
251 $tpl->assign(
'STR_ADMIN_WEBSITE',
$GLOBALS[
'STR_ADMIN_WEBSITE']);
252 $tpl->assign(
'STR_ADMIN_ADD',
$GLOBALS[
'STR_ADMIN_ADD']);
253 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
254 $tpl->assign(
'STR_ADMIN_META_PAGE_TITLE',
$GLOBALS[
'STR_ADMIN_META_PAGE_TITLE']);
255 $tpl->assign(
'STR_ADMIN_META_UPDATE',
$GLOBALS[
'STR_ADMIN_META_UPDATE']);
256 $tpl->assign(
'STR_ADMIN_META_EMPTY_EXPLAIN',
$GLOBALS[
'STR_ADMIN_META_EMPTY_EXPLAIN']);
get_site_name($site_ids, $skip_rights_check=false)
Retourne le nom d'un ou de plusieurs sites à partir de l'id.
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
get_site_id_select_options($selected_site_id=null, $selected_site_name=null, $display_first_option=null, $select_current_site_id_by_default=false)
Créer les options pour le select qui liste les noms de sites configurés en back office.
static html_entity_decode_if_needed($string)
String::html_entity_decode_if_needed()
nohtml_real_escape_string($value, $allowed_tags=null)
Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte ...
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
necessite_priv($priv, $demo_allowed=true, $configuration_modification=false)
Cette fonction vérifie si l'utilisateur a les privilèges de $priv.
get_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
num_rows($query_result)
num_rows()
fetch_assoc($query_result)
fetch_assoc()
get_form_token_input($name= 'general', $use_existing_token=true, $return_as_input_form=true)
get_form_token_input()
get_site_id_sql_set_value($site_ids)
Retourne la valeur SQL d'un champ INT ou SET suivant que ce soit un entier ou un tableau.
verify_token($name= 'general', $delay_in_minutes=60, $check_referer_if_set_by_server=true, $cancel_token=true, $minimum_wait_in_seconds_before_use=0)
Vérification de la validité d'un token Par défaut, un token est valide 1h, et utilisable 1 seule fois...
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']