コード例 #1
0
 * @author Oliver Georgi <*****@*****.**>
 * @copyright Copyright (c) 2002-2015, Oliver Georgi
 * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
 * @link http://www.phpwcms.de
 *
 **/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
    die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
//predefine values
$content['cat'] = '';
$content['metakey'] = '';
$content['struct'] = get_struct_data();
//reads the complete structure as array
$content['article_date'] = time();
$content['redirect'] = array('code' => '');
$content['all_keywords'] = '';
$content['globalRT'] = array();
$content['aId_CpPage'] = 0;
// set default content part pagination page (0 and 1) are the same
$content['CpTrigger'] = array();
// array to hold content part trigger functions
$content['404error'] = array('status' => false, 'id' => '', 'aid' => '', 'alias' => '');
$content['set_canonical'] = false;
$content['overwrite_canonical'] = '';
$content['cptab'] = array();
// array to hold content part based tabs
$content['images'] = array();
コード例 #2
0
ファイル: sitemap.php プロジェクト: Ideenkarosell/phpwcms
define('CUSTOM_CONTENT_TYPE', 'Content-Type: text/xml');
require_once 'include/inc_lib/default.inc.php';
define('VISIBLE_MODE', 0);
require_once PHPWCMS_ROOT . '/include/inc_lib/dbcon.inc.php';
require_once PHPWCMS_ROOT . '/include/config/conf.indexpage.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_lib/general.inc.php';
require_once PHPWCMS_ROOT . '/include/inc_front/front.func.inc.php';
// start XML
echo '<?xml version="1.0" encoding="utf-8"?>' . LF;
echo '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" ';
echo 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
echo 'xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 ';
echo 'http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">' . LF . LF;
echo '	<!-- Google Sitemap, http://www.google.com/webmasters/sitemaps/ -->' . LF . LF;
//reads complete structure as array
$struct = get_struct_data();
// fallback value when no article available
$phpwcms['sitemap_set_base'] = true;
$phpwcms['sitemap_set_default'] = true;
if (is_file(PHPWCMS_ROOT . '/include/config/sitemap.custom.php')) {
    include PHPWCMS_ROOT . '/include/config/sitemap.custom.php';
}
if (function_exists('phpwcms_getCustomSitemap')) {
    $_addURL = phpwcms_getCustomSitemap($struct);
} else {
    $_addURL = array();
}
if ($phpwcms['sitemap_set_default']) {
    // now retrieve all articles
    $sql = "SELECT article_id, article_cid, DATE_FORMAT(article_tstamp, '%Y-%m-%d') AS article_tstamp, ";
    $sql .= "article_title, article_redirect, article_aliasid, article_alias ";