Beispiel #1
0
 function index()
 {
     $arrTmp = $this->product->findall();
     $products = $arrTmp['rpta'] == true ? $arrTmp['array'] : array();
     unlink(APPPATH . "../tmp/sitemap.xml");
     unlink(APPPATH . "../tmp/sitemap-index.xml");
     $sitemap = new Sitemap("https://www.lifeleg.com");
     $sitemap->setPath('tmp/');
     $sitemap->setFilename('sitemap');
     ///AGREGAR ITEMS AL XML CON LAS RUTAS DE LAS PAGINAS WEB
     $sitemap->addItem('/', '1.0', 'daily', 'Today');
     $hoy = getdate();
     $sitemap->addItem('/index.php/Petshop', '0.8', 'weekly', $hoy['month'] . " " . $hoy['mday']);
     foreach ($products as $key => $value) {
         $sitemap->addItem('/index.php/Petshop/detail/' . $value['url'], '0.8', 'weekly', $hoy['month'] . " " . $hoy['mday']);
     }
     /// SE CREA EL ARCHIVO
     $sitemap->createSitemapIndex('https://www.lifeleg.com/tmp/', 'Today');
 }
Beispiel #2
0
function generatePagesSitemap()
{
    $sitemap = new Sitemap(SITE_DOMAIN);
    $sitemap->setPath(DOC_ROOT . '/');
    $sitemap->setFilename('page');
    $posts = new Posts();
    $sitemap->addItem('', '1.0', 'daily', 'Today');
    while ($row = $posts->getPostsLoop(null, 'page')) {
        $sitemap->addItem($posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']), '0.8', 'weekly', $row['post_date']);
    }
    $sitemap->createSitemapIndex(SITE_DOMAIN, 'Today');
}
Beispiel #3
0
<?

include 'Sitemap.php';
include '../config/settings.inc.php';
$sitemap = new Sitemap('http://www.roseindigo.com');
$sitemap->setPath('maps/');	
// $sitemap->addItem('/filles/naissance', '1.0', 'daily', 'Today');
$sitemap->setFilename('categories');


// VENDEZ
$sitemap->addItem("/vendez", '0.5', 'daily', 'Today');
$sitemap->addItem("/concept", '0.5', 'daily', 'Today');
$sitemap->addItem("/livre-d-or", '0.5', 'daily', 'Today');

// MARQUES
$servername = _DB_SERVER_;
$username 	= _DB_USER_;
$password 	= _DB_PASSWD_;
// Create connection
$conn = new mysqli($servername, $username, $password);
$conn->select_db("presta");


// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
// print_r( "Connected successfully !!!!<br/>");
// print_r($conn);
Beispiel #4
0
<?

include 'Sitemap.php';
include '../config/settings.inc.php';
$sitemap = new Sitemap('http://www.roseindigo.com');
$sitemap->setPath('maps/');	
// $sitemap->addItem('/filles/naissance', '1.0', 'daily', 'Today');
$sitemap->setFilename('products');


$servername = _DB_SERVER_;
$username 	= _DB_USER_;
$password 	= _DB_PASSWD_;

// Create connection
$conn = new mysqli($servername, $username, $password);

$conn->select_db("presta");


// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
// print_r( "Connected successfully !!!!<br/>");
// print_r($conn);



if ($result = $conn->query("SELECT DATABASE()")) {
    $row = $result->fetch_row();