iyaner 发表于 2007 年 6 月 15 日 19:18:33

回复 #9 ashun 的帖子

index 加到侧边栏:victory:

vbvs 发表于 2007 年 6 月 15 日 19:18:55

php是模板文件么

cctv000000 发表于 2007 年 6 月 15 日 19:23:40

显示了
可加在什么地方好~



代码如下:

<!--<?php
if(!defined('SABLOG_ROOT')) {
        exit('Access Denied');
}
$current_page_item = array();
if (in_array($action, array('index', 'finduser', 'tags'))) {
        $current_page_item['index'] = ' class="current_page_item"';
} elseif (in_array($action, array('archives', 'tagslist', 'comments', 'trackbacks', 'search', 'links'))) {
        $current_page_item[$action] = ' class="current_page_item"';
}
print <<<EOT
-->
<!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 http-equiv="Content-Language" content="utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="keywords" content="Hoofei,web标准,css,$options" />
<meta name="description" content="Hoofei,web标准,css,$options" />
<meta name="copyright" content="Hoofei.com" />
<meta name="author" content="Hoofei" />
<link rel="alternate" title="$options" href="rss.php" type="application/rss+xml" />
<link rel="stylesheet" href="templates/$options/style.css" type="text/css" media="all"/>
<script type="text/javascript">
        var postminchars = parseInt("$options");
        var postmaxchars = parseInt("$options");
</script>
<script type="text/javascript" src="include/common.js"></script>
<title>$options $options</title>
</head>
<body>
<div id="outmain">
<h1><a href="$options">$options</a></h1>
<ul class="menu">
      <li{$current_page_item}><a href="./">Home</a></li>
      <li{$current_page_item}><a href="./?action=archives">Archives</a></li>
      <li{$current_page_item}><a href="./?action=search">Search</a></li>
      <li{$current_page_item}><a href="./?action=tagslist">Tags</a></li>
      <li{$current_page_item}><a href="./?action=comments">Comments</a></li>
      <!--
EOT;
if ($options['enable_trackback']) {print <<<EOT
-->
      <li{$current_page_item}><a href="./?action=trackbacks">Trackbacks</a></li>
      <!--
EOT;
}print <<<EOT
-->
      <li{$current_page_item}><a href="./?action=links">Links</a></li>
</ul>
<div id="topmenu">
<span id="description">$options</span>
<span id="guestlink">
    <!--
EOT;
if ($sax_uid) {print <<<EOT
-->
    欢迎您,$sax_user &raquo; <a href="?action=profile">资料</a> | <a href="post.php?action=logout">注销</a>
<!--
EOT;
if ($sax_group == 1 || $sax_group == 2) {print <<<EOT
--> | <a href="admin/admincp.php" target="_blank">管理</a>
<!--
EOT;
}}else{print <<<EOT
-->
    <a href="./?action=reg">注册</a> | <a href="./?action=login">登陆</a>
    <!--
EOT;
}print <<<EOT
-->
</span>
</div>
<div id="searchbox">
    <form method="post" action="post.php">
    <input type="hidden" name="formhash" value="$formhash" />
    <input type="hidden" name="action" value="search" />
    <input name="keywords" id="key" />
    <input type="image" id="searchbutton" value="搜索" src="templates/$options/img/search.png" />
    </form>
<!--
EOT;
if ($options['hottags_shownum']) {print <<<EOT
-->
    <p>Hot Tags:
      <!--
EOT;
if(empty($tagcache)){print <<<EOT
-->
      没有任何标签
      <!--
EOT;
}else{
foreach($tagcache AS $data){
print <<<EOT
-->
<a href="./?action=tags&amp;item=$data">$data</a>
      <!--
EOT;
}}print <<<EOT
-->
    </p>
    <!--
EOT;
}print <<<EOT
-->
</div>
<!--
EOT;
if ($options['show_statistics']) {print <<<EOT
-->
<div id="about">
    <a href="mailto:admin@admin.com"><img src="templates/$options/img/avatar.gif" alt="Contact me!" /></a>
    <p>冷狐于2007年06月15日恢复重建LengHu's Blog,其间在 $stats 个分类中发表的 $stats 篇文章被评论了 $stats 次。</p>
</div>
<div id="page">
<div id="wrap">
<!--
EOT;
require_once PrintEot($pagefile);
print <<<EOT
-->
</div>
<div id="sidebar">
    <!--
EOT;
if ($options['show_calendar']) {print <<<EOT
-->
<table cellpadding="0" cellspacing="1">
<tr align="center">
    <td colspan="7" class="curdate"><a href="./?action=index&amp;setdate=$calendar">&laquo;</a> $calendar <a href="./?action=index&amp;setdate=$calendar">&raquo;</a></td>
</tr>
<tr>
    <th class="week"><font color="#CC0000">日</font></th>
    <th class="week">一</th>
    <th class="week">二</th>
    <th class="week">三</th>
    <th class="week">四</th>
    <th class="week">五</th>
    <th class="week"><font color="#53A300">六</font></th>
</tr>
$calendar
</table>
    <!--
EOT;
}
if ($options['show_categories']) {print <<<EOT
-->
    <h2>Category</h2>
    <ul>
      <!--
EOT;
if(empty($catecache)){print <<<EOT
-->
      <li>没有任何分类</li>
      <!--
EOT;
}else{
foreach($catecache AS $data){
print <<<EOT
-->
      <li><a href="./rss.php?cid=$data" target="_blank" title="RSS 2.0 订阅这个分类"><img src="templates/$options/img/rss.gif" border="0" alt="RSS 2.0 订阅这个分类" /></a> <a href="./?action=index&amp;cid=$data">$data</a> <span>[$data]</span></li>
      <!--
EOT;
}}print <<<EOT
-->
    </ul>
    <!--
EOT;
}
if ($options['show_archives']) {print <<<EOT
-->
    <h2>Archives</h2>
    <ul>
      <!--
EOT;
if(empty($archivecache)){print <<<EOT
-->
      <li>没有任何归档</li>
      <!--
EOT;
}else{
if (is_numeric($options['archives_num']) && $options['archives_num']) {
        $archivecache = array_slice($archivecache,0,$options['archives_num']);
}
foreach($archivecache AS $key => $val){
$v = explode('-', $key);
//$e_month = ($v < 10) ? str_replace('0', '', $v) : $v;
print <<<EOT
-->
      <li><a href="./?action=index&amp;setdate=$v$v">{$v}年{$v}月</a> <span>[$val]</span></li>
      <!--
EOT;
}}print <<<EOT
-->
    </ul>
<!--
EOT;
if (is_numeric($options['archives_num']) && $options['archives_num']) {print <<<EOT
-->
    <p class="more"><a href="./?action=archives">更多...</a></p>
    <!--
EOT;
}}
if($options['allow_search_comments']){print <<<EOT
-->
    <h2>Search Comments</h2>
    <form method="post" action="post.php">
      <input type="hidden" name="formhash" value="$formhash" />
      <input type="hidden" name="action" value="search" />
      <input type="hidden" name="searchfrom" value="comment" />
      <table border="0" cellspacing="0" cellpadding="0">
      <tr>
          <td><input class="formfield" maxlength="30" size="17" name="keywords" />
          </td>
          <td><button type="submit" class="formbutton">确定</button>
          </td>
      </tr>
      <tr>
          <td colspan="2">匹配评论人和内容</td>
      </tr>
      </table>
    </form>
    <!--
EOT;
}
if ($options['recentcomment_num']) {print <<<EOT
-->
    <h2>New Comments</h2>
    <ul>
      <!--
EOT;
if(empty($newcommentcache)){print <<<EOT
-->
      <li>没有任何评论</li>
      <!--
EOT;
}else{
foreach($newcommentcache AS $data){
$data = stripslashes_array($data);
print <<<EOT
-->
      <li><a href="./?action=show&amp;id=$data&amp;cmid=$data&amp;goto=newcm">$data</a><br /><span>$data - $data</span></li>
      <!--
EOT;
}}print <<<EOT
-->
    </ul>
    <p class="more"><a href="./?action=comments">更多...</a></p>
    <!--
EOT;
}}
if ($options['sidebarlinknum']) {print <<<EOT
-->
    <h2>Maybe You Like..</h2>
    <ul>
      <!--
EOT;
if(!$linkcache){print <<<EOT
-->
      <li><a href="http://www.sablog.net/blog" target="_blank" title="angel's blog">angel's blog</a></li>
          <li><a href="http://www.hoofei.com" target="_blank" title="Hoofei's Blog">Hoofei's blog</a></li>
      <!--
EOT;
}else{
foreach($linkcache AS $data){
print <<<EOT
-->
      <li><a href="$data" target="_blank" title="$data">$data</a></li>
      <!--
EOT;
}}print <<<EOT
-->
    </ul>
        <!--
EOT;
if ($link_count > $options['sidebarlinknum']) {print <<<EOT
-->
    <p class="more"><a href="./?action=links">更多...</a></p>
        <!--
EOT;
}}
print <<<EOT
-->
</div>
</div>
<!--
EOT;
?>-->

iyaner 发表于 2007 年 6 月 15 日 19:24:14

回复 #12 vbvs 的帖子

鸭宝宝,你已经被时代淘汰了:lol

cctv000000 发表于 2007 年 6 月 15 日 19:26:31

原帖由 yaner 于 2007-6-15 19:24 发表 http://bbs.jgfree.net/images/common/back.gif
鸭宝宝,你已经被时代淘汰了:lol

表理鸭
加在哪里?

vbvs 发表于 2007 年 6 月 15 日 19:31:26

就不告诉你
我以前做过很多sa的风格

cctv000000 发表于 2007 年 6 月 15 日 19:34:58

原帖由 vbvs 于 2007-6-15 19:31 发表 http://bbs.jgfree.net/images/common/back.gif
就不告诉你
我以前做过很多sa的风格

偶错了行不:$

告一下吧:handshake :call:

wxinlin 发表于 2007 年 6 月 15 日 19:35:47

<center>
中间
</center>

10y 发表于 2007 年 6 月 15 日 19:38:22

应该是在模板里,默认的那个!

iyaner 发表于 2007 年 6 月 15 日 19:40:44

回复 #15 cctv000000 的帖子

哇哈哈

随便加,加最后也可以!
页: 1 [2] 3
查看完整版本: SaBlog-X博客程序统计代码加哪个文件?