14 define(
'IN_PEEL_ADMIN',
true);
15 include(
"../configuration.inc.php");
24 if (!empty($_GET[
'encoding'])) {
25 $file_encoding = $_GET[
'encoding'];
27 $file_encoding =
'utf-8';
32 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_haut.php");
35 $tpl->assign(
'href',
$GLOBALS[
'wwwroot'] .
'/sitemap.xml');
36 $tpl->assign(
'STR_ADMIN_SITEMAP_TITLE',
$GLOBALS[
'STR_ADMIN_SITEMAP_TITLE']);
37 $tpl->assign(
'STR_ADMIN_SITEMAP_OPEN',
$GLOBALS[
'STR_ADMIN_SITEMAP_OPEN']);
41 switch (
vb($_REQUEST[
'mode'])) {
49 $langs_array_by_subdomain = array();
50 foreach(
$GLOBALS[
'langs_array_by_wwwroot'] as $this_wwwroot=>$this_lang_array) {
52 $langs_array_by_subdomain[
get_site_domain(
false, $this_wwwroot,
false)][] = $this_lang_array[0];
56 foreach ($langs_array_by_subdomain as $this_domain=>$this_lang_array) {
71 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_bas.php");
84 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_google_sitemap.tpl');
85 $tpl->assign(
'GENERAL_ENCODING', GENERAL_ENCODING);
87 $tpl_products = array();
88 $account_register_url_array = array();
89 $product_category_url_array = array();
90 $content_url_array = array();
91 $content_category_url_array = array();
92 $account_url_array = array();
93 $wwwroot_array = array();
94 $legal_url_array = array();
95 $tpl->assign(
'date', date(
"Y-m-d"));
96 $current_lang =
$_SESSION[
'session_langue'];
97 foreach($this_wwwroot_lang_array as $this_lang) {
103 $sql =
"SELECT p.id AS produit_id, c.id AS categorie_id, p.nom_".(!empty(
$GLOBALS[
'site_parameters'][
'product_name_forced_lang'])?
$GLOBALS[
'site_parameters'][
'product_name_forced_lang']:$this_lang).
" AS name, c.nom_" . $this_lang .
" AS categorie
105 INNER JOIN peel_produits_categories pc ON p.id = pc.produit_id
106 INNER JOIN peel_categories c ON c.id = pc.categorie_id AND " .
get_filter_site_cond(
'categories',
'c') .
"
108 ORDER BY p.position ASC";
109 $created_report[] =
$sql;
118 if (empty(
$GLOBALS[
'site_parameters'][
'disallow_main_category'])) {
119 $product_category_url_array[] = get_product_category_url();
121 $sql =
"SELECT c.id, c.nom_" .$_SESSION[
'session_langue'].
" AS nom
122 FROM peel_categories c
124 ORDER BY c.position ASC";
125 $created_report[] =
$sql;
128 $product_category_url_array[] = get_product_category_url(
$result[
'id'],
$result[
'nom']);
132 $sql =
"SELECT p.id, c.id AS categorie_id, p.titre_".$this_lang.
" AS name, c.nom_" . $this_lang .
" AS categorie
134 INNER JOIN peel_articles_rubriques pc ON p.id = pc.article_id
135 INNER JOIN peel_rubriques c ON c.id = pc.rubrique_id AND " .
get_filter_site_cond(
'rubriques',
'c') .
"
137 ORDER BY p.position ASC";
138 $created_report[] =
$sql;
145 if (empty(
$GLOBALS[
'site_parameters'][
'disallow_main_content_category'])) {
146 $content_category_url_array[] = get_content_category_url();
148 $sql =
"SELECT c.id, c.nom_" .$_SESSION[
'session_langue'].
" AS nom
149 FROM peel_rubriques c
151 ORDER BY c.position ASC";
152 $created_report[] =
$sql;
155 $content_category_url_array[] = get_content_category_url(
$result[
'id'],
$result[
'nom']);
157 $content_url_array[] = get_url(
'/utilisateurs/contact.php');
158 $legal_url_array[] = get_url(
'legal');
159 $legal_url_array[] = get_url(
'cgv');
160 $account_register_url_array[] = get_account_register_url();
161 $account_url_array[] = get_account_url(
false,
false,
false);
162 $account_url_array[] = get_url(
'/utilisateurs/oubli_mot_passe.php');
163 $wwwroot_array[] = get_url(
'/');
166 $_SESSION[
'session_langue'] = $current_lang;
169 $tpl->assign(
'account_register_url_array', $account_register_url_array);
170 $tpl->assign(
'product_category_url_array', $product_category_url_array);
171 $tpl->assign(
'content_url_array', $content_url_array);
172 $tpl->assign(
'content_category_url_array', $content_category_url_array);
173 $tpl->assign(
'account_url_array', $account_url_array);
174 $tpl->assign(
'wwwroot_array', $wwwroot_array);
175 $tpl->assign(
'products', $tpl_products);
176 $tpl->assign(
'legal_url_array', $legal_url_array);
177 $sitemap =
$tpl->fetch();
179 $xml_filename =
$GLOBALS[
'dirroot'] .
"/sitemap_" . substr(md5($this_wwwroot), 0, 4) .
".xml";
184 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' =>
$GLOBALS[
'STR_ADMIN_SITEMAP_MSG_CREATED_OK']))->fetch();
185 echo
'<p>'.$GLOBALS[
'STR_ADMIN_SITEMAP_CREATED_REPORT'].
'<br /><br />' . nl2br(implode(
'<hr />', $created_report)) .
'</p>';
195 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_sitemap_form2xml.tpl');
198 $tpl->assign(
'STR_ADMIN_SITEMAP_CREATE_BUTTON',
$GLOBALS[
'STR_ADMIN_SITEMAP_CREATE_BUTTON']);
set_lang_configuration_and_texts($lang, $load_default_lang_files_before_main_lang_array=null, $general_setup=true, $load_modules_files=true, $load_general_admin_files=true, $exclude_empty_string=true, $skip_load_files=false)
On charge les variables de langue, en complétant éventuellement avec la langue de référence...
static convert_encoding($string, $new_encoding, $original_encoding=null)
Converts the character encoding of string $string to $new_encoding from optionally $original_encoding...
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
create_google_sitemap($this_wwwroot, $this_wwwroot_lang_array, $file_encoding)
static fopen_utf8($filename, $mode, $force_filename_in_iso_8859=false, $try_filename_in_iso_8859_if_file_not_found=true)
Ouvre un fichier.
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
if(empty($_GET['id'])) if(!empty($GLOBALS['site_parameters']['allow_multiple_product_url_with_category'])) $product_object
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...
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()
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...
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
get_site_domain($return_only_domains=false, $domain=null, $strip_subdomain=true)
Récupère le nom de domaine du site sans http:// et sans sous-domaine.
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']