sitemap.xml ,sitemap.html,

at 2年前  ca 记录笔记  pv 857  by authorhu  

<?='<?xml version="1.0" encoding="UTF-8"?>'?>
   <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
        <loc>[!--news.url--]</loc>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>
[e:loop={"select classid,classname from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,classid Asc",0,24,0}]
<?php
$classurl=sys_ReturnBqClassname($bqr,9);
?>
    <url>
        <loc><?=$classurl?></loc>
        <lastmod><?=date('Y-m-d',time())?></lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>
[/e:loop] 
[e:loop={0,100,3,0}]
    <url>
        <loc><?=$bqsr['titleurl']?></loc>
        <lastmod><?=date('Y-m-d',$bqr[newstime])?></lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>
[/e:loop]
</urlset>




sitemap.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width,initial-scale=1.0" name="viewport" /> 
<meta content="Designed By Wellwap Team. | wellwap@qq.com" name="author"/>
<meta name="robots" content="index,follow" />
<title>HTML SiteMap</title>
<style type="text/css">
body{background-color:#FFFFFF;margin:20px;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px}h1{color:#0099CC}#wellwap{background-color:#CFEBF7;border:1px #2580B2 solid;padding:15px 10px 15px 10px;margin:10px 0px 10px 0px;line-height:20px;min-width:900px}#myTable{font-size:11px;list-style:none;margin:10px 0px 10px 0px;padding:0px;width:100%;min-width:804px}#myTable li{list-style-type:none;width:100%;min-width:404px;height:20px;line-height:20px}#myTable li .T1-h{float:left;font-weight:bold;min-width:300px}#myTable li .T2-h{width:200px;float:right;font-weight:bold}#myTable li .T3-h{width:200px;float:right;font-weight:bold}#myTable li .T4-h{width:100px;float:right;font-weight:bold}#myTable li .T1{float:left;min-width:300px}#myTable li .T2{width:200px;float:right}#myTable li .T3{width:200px;float:right}#myTable li .T4{width:100px;float:right}#footer{padding:2px;margin:0px;font-size:8pt;color:gray;min-width:900px}#footer a{color:gray}.myClear{clear:both}
</style>
</head>
<body>
<h1>官网</h1>
<div id="wellwap"> 
[e:loop={"select classid,classname from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,classid Asc",0,24,0}]
<?php
$classurl=sys_ReturnBqClassname($bqr,9);
?>
    <strong><a href='<?=$classurl?>'><?=$bqr[classname]?></a></strong> 
[/e:loop]  
</div>
<ul id="myTable">
  <li>
    <div class="T1-h">URL</div>
    <div class="T2-h">Last Change</div>
    <div class="T3-h">Change Frequency</div>
    <div class="T4-h">Priority</div>
  </li>
  <div class="myClear"></div>
  <li>
    <div class="T1"><a href="[!--news.url--]" title="官网">官网</a></div>
    <div class="T2"><?=date("Y-m-d h:i:s",time());?></div>
    <div class="T3">always</div>
    <div class="T4">1.0</div>
  </li>
  <div class="myClear"></div>
[e:loop={0,100,3,0}]
 <li>
    <div class="T1"><a href="<?=$bqsr['titleurl']?>" title="<?=$bqr['title']?>"><?=$bqr['title']?></a></div>
    <div class="T2"><?=date('Y-m-d h:i:s',$bqr['newstime'])?> </div>
    <div class="T3">daily</div>
    <div class="T4">0.8</div>
  </li>
  <div class="myClear"></div>
[/e:loop]
</ul>
<div id="footer"><a href="[!--news.url--]sitemap.html">HTML Sitemap</a> ©<a href="[!--news.url--]">官网</a> All Rights Reserved.</div>
</body>
</html>


sitemap.txt

[!--news.url--]
[e:loop={"select classid,classname from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,classid Asc",0,24,0}]
<?php
$classurl=sys_ReturnBqClassname($bqr,9);
?>
<?=$classurl?>

[/e:loop]
[e:loop={0,100,3,0}]
<?=$bqsr['titleurl']?>

[/e:loop]


版权声明

本文仅代表作者观点,未经许可,不得转载。

分享:

支付宝

微信