本文整理汇总了PHP中generate_sitemap函数的典型用法代码示例。如果您正苦于以下问题:PHP generate_sitemap函数的具体用法?PHP generate_sitemap怎么用?PHP generate_sitemap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generate_sitemap函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: restore_bak
/**
* Restore Pages Backup File
*
* @since 1.0
* @uses GSBACKUPSPATH
* @uses GSDATAPAGESPATH
*
* @param string $id File ID to restore
*/
function restore_bak($id)
{
$file = GSBACKUPSPATH . "pages/" . $id . ".bak.xml";
$newfile = GSDATAPAGESPATH . $id . ".xml";
$tmpfile = GSBACKUPSPATH . "pages/" . $id . ".tmp.xml";
if (!file_exists($newfile)) {
copy($file, $newfile);
unlink($file);
} else {
copy($file, $tmpfile);
copy($newfile, $file);
copy($tmpfile, $newfile);
unlink($tmpfile);
}
generate_sitemap();
}
开发者ID:Emmett-Brown,项目名称:linea,代码行数:25,代码来源:template_functions.php
示例2: exec_action
$note->addCData($parent);
$note = $xml->addChild('content');
$note->addCData($content);
$note = $xml->addChild('private');
$note->addCData($private);
$note = $xml->addChild('author');
$note->addCData($author);
exec_action('changedata-save');
if (isset($_POST['autosave']) && $_POST['autosave'] == 'true') {
XMLsave($xml, GSAUTOSAVEPATH . $url);
} else {
XMLsave($xml, $file);
}
//ending actions
exec_action('changedata-aftersave');
generate_sitemap();
// redirect user back to edit page
if (isset($_POST['autosave']) && $_POST['autosave'] == 'true') {
echo 'OK';
} else {
if ($_POST['redirectto'] != '') {
$redirect_url = $_POST['redirectto'];
} else {
$redirect_url = 'edit.php';
}
if ($url == $_POST['existing-url']) {
redirect($redirect_url . "?id=" . $url . "&upd=edit-success&type=edit");
} else {
redirect($redirect_url . "?id=" . $url . "&old=" . $_POST['existing-url'] . "&upd=edit-success&type=edit");
}
}
开发者ID:google-code-backups,项目名称:get-simple-cms,代码行数:31,代码来源:changedata.php
示例3: login_cookie_check
/**
* View Sitemap
*
* Displays your site's sitemap
*
* @package GetSimple
* @subpackage Theme
*/
// Setup inclusions
$load['plugin'] = true;
include 'inc/common.php';
login_cookie_check();
exec_action('load-sitemap');
$sitemapfile = '../' . GSSITEMAPFILE;
if (!file_exists($sitemapfile) || isset($_GET['refresh'])) {
if (generate_sitemap() === true) {
$success = i18n_r('SITEMAP_REFRESHED');
} else {
$error = i18n_r('SITEMAP_ERROR');
}
}
$pagetitle = strip_tags(i18n_r('SIDE_VIEW_SITEMAP'));
get_template('header');
?>
<?php
include 'template/include-nav.php';
?>
<div class="bodycontent clearfix">
<div id="maincontent">
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:31,代码来源:sitemap.php
示例4: generate_sitemap
if ($static === 'sitemap.xml') {
generate_sitemap('index');
} elseif ($static === 'sitemap.base.xml') {
generate_sitemap('base');
} elseif ($static === 'sitemap.post.xml') {
generate_sitemap('post');
} elseif ($static === 'sitemap.static.xml') {
generate_sitemap('static');
} elseif ($static === 'sitemap.tag.xml') {
generate_sitemap('tag');
} elseif ($static === 'sitemap.archive.xml') {
generate_sitemap('archive');
} elseif ($static === 'sitemap.author.xml') {
generate_sitemap('author');
} elseif ($static === 'sitemap.category.xml') {
generate_sitemap('category');
}
die;
} elseif ($static === 'admin') {
if (login()) {
config('views.root', 'system/admin/views');
render('main', array('title' => 'Admin - ' . blog_title(), 'description' => blog_description(), 'canonical' => site_url(), 'bodyclass' => 'adminfront', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Admin'));
} else {
$login = site_url() . 'login';
header("location: {$login}");
}
die;
} elseif ($static === 'login') {
config('views.root', 'system/admin/views');
render('login', array('title' => 'Login - ' . blog_title(), 'description' => 'Login page from ' . blog_title() . '.', 'canonical' => site_url() . '/login', 'bodyclass' => 'inlogin', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Login'));
die;
开发者ID:robihidayat,项目名称:htmly,代码行数:31,代码来源:htmly.php
示例5: nm_generate_sitemap
function nm_generate_sitemap()
{
if (GSVERSION >= '3.3' && (!defined('NMNOSITEMAP') || !NMNOSITEMAP)) {
generate_sitemap();
}
}
开发者ID:Vin985,项目名称:clqweb,代码行数:6,代码来源:functions.php
示例6: header
case URL_COMPANIES:
require_once 'page_companies.php';
break;
case 'get-companies':
require_once 'page_getcompanies.php';
break;
case 'job-unavailable':
header("HTTP/1.1 404 Not Found");
$html_title = 'Unavailable job / ' . SITE_NAME;
$template = 'no-job.tpl';
break;
case 'sitemap.xml':
generate_sitemap('xml');
break;
case 'sitemap.txt':
generate_sitemap('txt');
break;
// custom pages, with fallback to the 404 error page
// custom pages, with fallback to the 404 error page
default:
$result = $db->query('
SELECT
*
FROM
' . DB_PREFIX . 'pages
WHERE
url = "' . $db->real_escape_string($page) . '"
');
$pageData = $result->fetch_assoc();
if (is_array($pageData)) {
require_once 'page_page.php';
开发者ID:zeamxie,项目名称:jobberbase,代码行数:31,代码来源:index.php
示例7: header
if ($static === 'sitemap.xml' || $static === 'sitemap.base.xml' || $static === 'sitemap.post.xml' || $static === 'sitemap.static.xml' || $static === 'sitemap.tag.xml' || $static === 'sitemap.archive.xml' || $static === 'sitemap.author.xml') {
header('Content-Type: text/xml');
if ($static === 'sitemap.xml') {
generate_sitemap('index');
} elseif ($static === 'sitemap.base.xml') {
generate_sitemap('base');
} elseif ($static === 'sitemap.post.xml') {
generate_sitemap('post');
} elseif ($static === 'sitemap.static.xml') {
generate_sitemap('static');
} elseif ($static === 'sitemap.tag.xml') {
generate_sitemap('tag');
} elseif ($static === 'sitemap.archive.xml') {
generate_sitemap('archive');
} elseif ($static === 'sitemap.author.xml') {
generate_sitemap('author');
}
die;
} elseif ($static === 'admin') {
if (login()) {
config('views.root', 'system/admin/views');
render('main', array('head_contents' => head_contents('Admin - ' . blog_title(), blog_description(), site_url()), 'bodyclass' => 'adminfront', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Admin'));
} else {
$login = site_url() . 'login';
header("location: {$login}");
}
die;
} elseif ($static === 'login') {
config('views.root', 'system/admin/views');
render('login', array('head_contents' => head_contents('Login - ' . blog_title(), 'Login page from ' . blog_title() . '.', site_url() . '/login'), 'bodyclass' => 'inlogin', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Login'));
die;
开发者ID:EricGhildyal,项目名称:ergh.co-Backend,代码行数:31,代码来源:htmly.php
示例8: elseif
} elseif ($static === 'sitemap.base.xml') {
generate_sitemap('base');
} elseif ($static === 'sitemap.post.xml') {
generate_sitemap('post');
} elseif ($static === 'sitemap.static.xml') {
generate_sitemap('static');
} elseif ($static === 'sitemap.tag.xml') {
generate_sitemap('tag');
} elseif ($static === 'sitemap.archive.xml') {
generate_sitemap('archive');
} elseif ($static === 'sitemap.author.xml') {
generate_sitemap('author');
} elseif ($static === 'sitemap.category.xml') {
generate_sitemap('category');
} elseif ($static === 'sitemap.type.xml') {
generate_sitemap('type');
}
die;
} elseif ($static === 'admin') {
if (login()) {
config('views.root', 'system/admin/views');
render('main', array('title' => 'Admin - ' . blog_title(), 'description' => blog_description(), 'canonical' => site_url(), 'bodyclass' => 'admin-front', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Admin'));
} else {
$login = site_url() . 'login';
header("location: {$login}");
}
die;
} elseif ($static === 'login') {
config('views.root', 'system/admin/views');
render('login', array('title' => 'Login - ' . blog_title(), 'description' => 'Login page from ' . blog_title() . '.', 'canonical' => site_url() . '/login', 'bodyclass' => 'in-login', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » Login'));
die;
开发者ID:austinvernsonger,项目名称:htmly,代码行数:31,代码来源:htmly.php
示例9: login_cookie_check
<?php
/**
* View Sitemap
*
* Displays your site's sitemap
*
* @package GetSimple
* @subpackage Theme
*/
// Setup inclusions
$load['plugin'] = true;
include 'inc/common.php';
login_cookie_check();
if (!generate_sitemap()) {
$error = generate_sitemap();
} else {
if (isset($_GET['refresh'])) {
$success = i18n_r('SITEMAP_REFRESHED');
}
}
get_template('header', cl($SITENAME) . ' » ' . strip_tags(i18n_r('SIDE_VIEW_SITEMAP')));
?>
<?php
include 'template/include-nav.php';
?>
<div class="bodycontent clearfix">
<div id="maincontent">
<div class="main" >
开发者ID:google-code-backups,项目名称:get-simple-cms,代码行数:31,代码来源:sitemap.php
示例10: edit_comic
function edit_comic($ID, $comic)
{
global $scdb;
$PID = (int) $ID;
if ($PID != $ID || $ID < 1) {
$this->comic->message = 'You must call $scadmin->edit_comic() with a valid permalink ID at the first agrument!';
return false;
}
if (!is_array($comic) || !isset($comic['title']) || !isset($comic['image'])) {
$this->comic->message = 'You must call $scadmin->edit_comic() with an associative array of values as the argument setting at least the "title" and "image" values.';
return false;
}
$title = safe_text($comic['title']);
$info = isset($comic['info']) ? safe_text($comic['info'], 200) : '';
$image = safe_text($comic['image'], 100, 'image');
if ($image === false) {
$this->comic->message = 'Invalid Image File/Name';
return false;
}
// consider leaving the `time` field alone if these aren't set instead of using NOW()
$datetime = isset($comic['date']) && isset($comic['time']) ? $comic['date'] . ' ' . $comic['time'] : '';
if (!preg_match("/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\$/", $datetime)) {
$datetime = NOW;
}
if (!$scdb->query("UPDATE `{$scdb->comics}` SET title='{$title}', info='{$info}', image='{$image}', time='{$datetime}' WHERE `PID` = '{$PID}' LIMIT 1")) {
$this->comic->message = 'Failed to edit comic!';
$scdb->debug();
return false;
}
$this->comic->message = 'Succesfully Edited!';
refresh_facebook();
clear_cache();
generate_sitemap();
return true;
}
开发者ID:jclay06,项目名称:scms,代码行数:35,代码来源:admin.class.php
示例11: cherry_save_options
function cherry_save_options()
{
$post_data = $_POST;
unset($post_data['action']);
foreach ($post_data as $key => $val) {
update_option($key, $val);
}
//echo $post_data['do_generate_sitemap'];
robot_txt_generate();
generate_sitemap();
exit;
}
开发者ID:drupalninja,项目名称:schome_org,代码行数:12,代码来源:seo_settings_page.php
注:本文中的generate_sitemap函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论