protected function delete($szDocument, $nId) { $this->aOutput['reponse'] = ''; $this->aOutput['error'] = ''; try { SiteMap::removeDocument($szDocument, $nId); $this->aOutput['response'] = _msg('Документ успешно удален'); } catch (SitemapException $e) { $this->aOutput['error'] = _msg('Ошибка при удалении. Возможно документ не поддерживается, либо уже удален'); } $this->output(); }
public function post($id, $aValues) { $id = intval($id); $aValues = explode("\r\n", $aValues); // try { SiteMap::manualOrder($id, $aValues); } catch (SiteMapException $e) { $this->addError('Сортировка не удалась. Ряд не найден в бд'); } $this->afterPost(); $this->jump('./order.php?id=' . $id); }
* @version $Id: makehtml_map.php 1 11:17 2010年7月19日Z tianya $ * @package DedeCMS.Administrator * @copyright Copyright (c) 2007 - 2010, DesDev, Inc. * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ require_once dirname(__FILE__) . "/config.php"; require_once DEDEINC . "/sitemap.class.php"; require_once DEDEINC . "/dedetag.class.php"; if (empty($dopost)) { ShowMsg("参数错误!", "-1"); exit; } $isremote = empty($isremote) ? 0 : $isremote; $serviterm = empty($serviterm) ? "" : $serviterm; $sm = new SiteMap(); $maplist = $sm->GetSiteMap($dopost); if ($dopost == "site") { $murl = $cfg_cmspath . "/data/sitemap.html"; $tmpfile = $cfg_basedir . $cfg_templets_dir . "/plus/sitemap.htm"; } else { $murl = $cfg_cmspath . "/data/rssmap.html"; $tmpfile = $cfg_basedir . $cfg_templets_dir . "/plus/rssmap.htm"; } $dtp = new DedeTagParse(); $dtp->LoadTemplet($tmpfile); $dtp->SaveTo($cfg_basedir . $murl); if ($cfg_remote_site == 'Y' && $isremote == 1) { if ($serviterm != "") { list($servurl, $servuser, $servpwd) = explode(',', $serviterm); $config = array('hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd, 'debug' => 'TRUE');
<?php /** * DouPHP * -------------------------------------------------------------------------------------------------- * 版权所有 2013-2015 漳州豆壳网络科技有限公司,并保留所有权利。 * 网站地址: http://www.douco.com * -------------------------------------------------------------------------------------------------- * 这不是一个自由软件!您只能在遵守授权协议前提下对程序代码进行修改和使用;不允许对程序代码以任何形式任何目的的再发布。 * 授权协议:http://www.douco.com/license.html * -------------------------------------------------------------------------------------------------- * Author: DouCo * Release Date: 2015-10-16 */ define('IN_DOUCO', true); require dirname(__FILE__) . '/include/init.php'; require ROOT_PATH . 'include/sitemap.class.php'; if (!intval($GLOBALS['_CFG']['sitemap'])) { exit; } $domain = ROOT_URL; $today = date('Y-m-d'); $sm = new SiteMap($domain, $today); header('Content-type: application/xml; charset=utf-8'); die($sm->build_sitemap());
file_put_contents($this->_basePath . $this->robotsFileName, $sampleRobotsFile); } } } //end class SiteMap defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/..')); set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/vendor/zendframework/zendframework/library'), get_include_path()))); require_once 'Zend/Loader/StandardAutoloader.php'; $config = (include APPLICATION_PATH . '/config/autoload/global.php'); $autoLoader = new Zend\Loader\StandardAutoloader(array('prefixes' => array('MyVendor' => '/vendor/zendframework/zendframework/library/Zend'), 'fallback_autoloader' => true)); // register our StandardAutoloader with the SPL autoloader $autoLoader->register(); $adapter = new \Zend\Db\Adapter\Adapter($config['db']); $baseUrl = $config['host']['base']; $avisoSitemapCount = 1; $sm = new SiteMap($baseUrl, APPLICATION_PATH . '/public/'); $sm->sitemapIndexFileName = 'sitemap_index.xml'; $sm->sitemapFileName = 'platos' . str_pad($avisoSitemapCount, 2, '0', STR_PAD_LEFT) . '_sitemap.xml'; $sm->init(); $platos = $adapter->query('SELECT ta_plato.in_id,ta_plato.va_nombre,tr.va_nombre AS restaurante FROM ta_plato LEFT JOIN `ta_plato_has_ta_local` AS `pl` ON `pl`.`ta_plato_in_id` = `ta_plato`.`in_id` LEFT JOIN `ta_local` AS `tl` ON `tl`.`in_id` = `pl`.`ta_local_in_id` LEFT JOIN `ta_restaurante` AS `tr` ON `tr`.`in_id` = `tl`.`ta_restaurante_in_id` WHERE ta_plato.en_estado=1 AND tr.en_estado=1 GROUP BY in_id', $adapter::QUERY_MODE_EXECUTE); include APPLICATION_PATH . '/module/Application/src/Application/View/Helper/CanonicalUrl.php'; include APPLICATION_PATH . '/module/Application/src/Application/View/Helper/Canonical.php'; $crul = new Application\View\Helper\CanonicalUrl(); $limpiando = new Application\View\Helper\Canonical(); foreach ($platos as $plato) {
<?php require_once(dirname(__FILE__)."/config.php"); require_once(dirname(__FILE__)."/../include/inc_sitemap.php"); require_once(dirname(__FILE__)."/../include/pub_dedetag.php"); if(empty($dopost)) { ShowMsg("参数错误!","-1"); exit(); } $sm = new SiteMap(); $maplist = $sm->GetSiteMap($dopost); $sm->Close(); if($dopost=="site") { $murl = $cfg_plus_dir."/sitemap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; } else { $murl = $cfg_plus_dir."/rssmap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; } $dtp = new DedeTagParse(); $dtp->LoadTemplet($tmpfile); $dtp->SaveTo($cfg_basedir.$murl); $dtp->Clear(); header("Content-Type: text/html; charset={$cfg_ver_lang}"); echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n"; echo "<a href='$murl' target='_blank'>成功更新文件: $murl 浏览...</a>"; ClearAllLink(); ?>
?> <br /> <?php echo $GeneralObj->TimetoDate(time()); ?> </td> </tr> <tr> <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="90%" class="topnav"> <ul id="MenuBar" class="MenuBarHorizontal"> <?php $class = ""; $siteMap = new SiteMap(); // $r=$_SESSION["sess_eType"]; // echo "<b>rights === ".$r."</b><br/>"; $menuItems = $siteMap->getItemsByRights($_SESSION["sess_eType"]); // echo "<b>COUNT === ".count($menuItems)."</b>"; for ($i = 0; $i < count($menuItems); $i++) { $currentItem = current($menuItems); echo "<li alt='" . $currentItem['vMenuDisplay'] . "'>"; if ($currentItem['vMenuDisplay'] == 'Content Mgmt') { echo "<a href='#' onclick='menuItemClicked(\"" . $currentItem['vURL'] . "\");return false;' class='MenuBarItemSubmenu' title='" . $currentItem['vMenuDisplay'] . "' >" . "<span><em>" . $currentItem['vMenuDisplay'] . "</em></span></a>"; } else { echo "<a href='" . $currentItem['vURL'] . "' class='MenuBarItemSubmenu' title='" . $currentItem['vMenuDisplay'] . "' >" . "<span><em>" . $currentItem['vMenuDisplay'] . "</em></span></a>"; } if (count($currentItem['eSubMenu']) > 0) { $currentSubMenu = $currentItem['eSubMenu']; echo "<ul '>";
function __construct($titul, $user, $topitem, $leftitem, $redir = NULL, $descr = NULL) { global $MASTER; $site = new SiteMap($user); if (!$MASTER) { $site->nosubacc(); } if (!empty($titul)) { $this->title = "{$titul} - " . MYNAME; } if (!empty($topitem)) { $this->topbar = $site->outtop($topitem); } // empty only when TC is shown $this->leftbar = $site->outleft($topitem, $leftitem); if (!empty($descr)) { $this->desc = $descr; } if (!empty($redir)) { $this->redirect = $redir; } $this->slogan = $user; }