风格所需基本代码
*********************************
head.htm
头部特定代码
<!--
<?php
print <<<EOT
-->
<head>
<title>$titleDB[title] powered by www.php168.com</title>
<link rel="stylesheet" type="text/css" href="$webdb[www_url]/images/default/default.css">
<link rel="stylesheet" type="text/css" href="$webdb[www_url]/images/$STYLE/css.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="$titleDB[keywords]">
<meta name="description" content="$titleDB[description]">
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--//导航菜单
function guide_link(fid){
if(fid==0){
window.location.href="$webdb[www_url]/";
}else{
window.location.href='$webdb[www_url]/list.php?fid='+fid;
}
}
function killErr(){
return true;
}
window.οnerrοr=killErr;
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--//处理大分类一行两个小分类
function autoTable(div){
fs=document.getElementById(div).getElementsByTagName("TABLE");
for(var i=0;i<fs.length;i++){
fs[i].style.width='49.5%';
if(i%2==1){
if (document.all) {
fs[i].style.styleFloat="right";
}else{
fs[i].style.cssFloat="right;";
}
}else{
if (document.all) {
fs[i].style.styleFloat="left";
}else{
fs[i].style.cssFloat="left;";
}
}
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="$webdb[www_url]/images/default/inc.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="$webdb[www_url]/images/default/default.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="$webdb[www_url]/images/default/swfobject.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="$webdb[www_url]/php168/$fidson_menu"></SCRIPT>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<SCRIPT LANGUAGE="JavaScript">
<!--//目的是为了做风格方便
document.write('<div class="wrap">');
//-->
</SCRIPT>
______________________
尾部特定代码
<!--
EOT;
?>
-->
********************************
index.htm
头部特定代码
<!--
<?php
print <<<EOT
-->
_________________
尾部特定代码
<!--
EOT;
?>
-->
********************************
foot.htm
头部特定代码
<!--
<?php
print <<<EOT
-->
_____________________________________
尾部特定代码
<SCRIPT LANGUAGE="JavaScript">
<!--//目的是为了做风格方便
document.write('</div>');
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
clickEdit.init();
//-->
</SCRIPT>
</body>
</html>
<!--
EOT;
?>
-->
**************************
list.htm
头部特定代码
<!--
<?php
$listdb_pic=ListPic($rows=4,$leng=30); //图片主题
$listdb_pic || $hide_listpic='none'; //不存在图片主题的话.要把图片主题的边框隐藏
$listdb || $hide_listnews='none'; //如果是大分类的话,就不存在标题,就把标题框隐藏
print <<<EOT
-->
___________________
尾部特定代码
<!--
EOT;
?>
-->
****************************
bencandy.htm
头部特定代码
<!--
<?php
print <<<EOT
-->
尾部特定代码
<!--
EOT;
?>
-->
********************************
图片路径:
$webdb[www_url]/images/myrad
**********************************
图片背景
body{
background:url(168_bg.gif) center;
}
**********************************
LOGOL下导航代码:
<!--
EOT;
$detail=explode("\r\n",$webdb[guide_word]);
foreach($detail AS $key=>$value){
list($name,$url,$blank,$color)=explode("|",$value);
if(ereg("^\/",$url)){
$url="$webdb[www_url]$url";
}elseif(!ereg("://",$url)){
$url="$webdb[www_url]/$url";
}
$blank=$blank?"_blank":'';
$color=$color?"$color":'';
print <<<EOT
-->
<a href="$url" target="$blank" style="color:$color;">$name</a>
<!--
EOT;
}
print <<<EOT
-->
**********************************
登陆代码:
在TABLE之间加 id="toplogin"
<SCRIPT src="$webdb[www_url]/hack.php?hack=login&job=js"></SCRIPT>
**********************************
首页栏目导航:
<script src="jsarticle.php?fid=0&type=sonfid&rows=15"></script>
**********************************
搜索代码:
<form name="formsearch" method="post" action="$webdb[www_url]/search.php?job=search">
<tr> <TD width=120><IMG height=29 src="images/search_s2.gif"
width=114></TD>
<td> 关键字:<input type="text" name="keyword" size="30">类 型:
<select name="type">
<option value="article" selected>文章</option>
<option value="photo">图片</option>
<option value="down">下载</option>
<option value="shop">商品</option>
<option value="flash">FLASH</option>
<option value="mv">视频</option>
<option value="log">日志</option>
</select>
<input type="submit" name="Submit32" value="搜索">
</td>
</tr>
</form>
***************************************
**********************************
友情联接:
<div class="imgfriendlink">
<!--
EOT;
foreach($friendlinkDB[1] AS $key=>$rs){
print <<<EOT
-->
<A HREF="$rs[url]" target=_blank><img alt="名称:$rs[name]\r\n描述:$rs[descrip]" src="$rs[logo]" width="88" height="31" border=0></A>
<!--
EOT;
}
print <<<EOT
-->
</div>
<div class="wordfriendlink"><!--
EOT;
foreach($friendlinkDB[0] AS $key=>$rs){
print <<<EOT
-->
<A HREF="$rs[url]" target="_blank" title="描述:$rs[descrip]">$rs[name]</A>
<!--
EOT;
}
print <<<EOT
--></div>
*******************************
底部版权:
在TABLE之间加id="footer"
<tr>
<td align="center">$webdb[copyright]<br>
Copyright@{$webdb[weburl]} all rights reserved <a href="http://www.miibeian.gov.cn" target="_blank">{$webdb[miibeian_gov_cn]}</a>
<br>
Powered by <a href="http://www.php168.com" target="_blank">PHP168 {$php168_Edition}</a>
Code © 2003-07 <a href="http://www.php168.com/bbs" target="_blank">PHP168CMS</a>
</td>
</tr>
**********************************
位置导航:
您当前的位置{$GuideFid[$fid]}
**********************************
LIST相关栏目:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=sonfid&rows=15"></script>
**********************************
LIST热门文章:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=hot&rows=$webdb[JsListRows]&leng=$webdb[JsListLeng]"></script>
**********************************
LIST推荐文章:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=com&rows=$webdb[JsListRows]&leng=$webdb[JsListLeng]"></script>
****************************************************************************************************************
LIST分类内容:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" style="display:$hide_listpic">
<tr>
<td class="head">
<h3 class="L"></h3>
<span class="TAG">图片主题</span>
<h3 class="R"></h3>
</td>
</tr>
<tr>
<td class="middle">
<!--
EOT;
foreach($listdb_pic AS $key=>$rs){
print <<<EOT
-->
<div class="listpic">
<p class="img"><a href="bencandy.php?fid=$rs[fid]&id=$rs[aid]"><img width="120" height="90" οnlοad="makesmallpic(this,120,90);" src="$rs[picurl]" border="0"></a></p>
<p class="title"><A HREF="bencandy.php?fid=$rs[fid]&id=$rs[aid]" title='$rs[full_title]'>$rs[title]</A></p>
</div>
<!--
EOT;
}
print <<<EOT
-->
</td>
</tr>
<tr>
<td class="foot">
<h3 class="L"></h3>
<h3 class="R"></h3>
</td>
</tr>
</table>
<div id="AutoRows">
<!--
EOT;
foreach($listdb_moresort AS $key=>$rss){
print <<<EOT
-->
<table border="0" cellspacing="0" cellpadding="0" class="dragTable" width="100%">
<tr>
<td class="head">
<h3 class="L"></h3>
<span class="TAG"><a href="list.php?fid=$rss[fid]">$rss[name]</A></span>
<h3 class="R"></h3>
</td>
</tr>
<tr>
<td class="middle">
<ul>
<!--
EOT;
foreach($rss[article] AS $key1=>$rs){
print <<<EOT
-->
<li><a href="bencandy.php?fid=$rs[fid]&id=$rs[aid]">$rs[title]</a></li>
<!--
EOT;
}print <<<EOT
-->
</ul>
</td>
</tr>
<tr>
<td class="foot">
<h3 class="L"></h3>
<h3 class="R"></h3>
</td>
</tr>
</table>
<!--
EOT;
}print <<<EOT
-->
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
autoTable("AutoRows");
//-->
</SCRIPT>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable" style="clear:both;display:$hide_listnews">
<tr>
<td class="head">
<h3 class="L"></h3>
<span class="TAG">文章列表</span>
<h3 class="R"></h3>
</td>
</tr>
<tr>
<td class="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="listarticle">
<!--
EOT;
foreach($listdb AS $key=>$rs){
$target=$rs[target]?'_blank':'_self';
print <<<EOT
-->
<tr>
<td><span class="title"><a href="bencandy.php?fid=$rs[fid]&id=$rs[aid]" target="$target" title='$rs[full_title]'>$rs[title]</a></span>
<span class="time">({$rs[posttime]})</span> </td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="page">$showpage</div>
</td>
</tr>
<tr>
<td class="foot">
<h3 class="L"></h3>
<h3 class="R"></h3>
</td>
</tr>
</table>
*****************************************************************************************/
BECANDAY.htm
**********************************
相关栏目代码:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=sonfid&rows=15"></script>
**********************************
最新栏目代码:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=new&rows=$webdb[JsListRows]&leng=$webdb[JsListLeng]"></script>
**********************************
热门栏目代码:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=hot&rows=$webdb[JsListRows]&leng=$webdb[JsListLeng]"></script>
**********************************
推荐文章:
<script src="$webdb[www_url]/jsarticle.php?fid=$fid&type=com&rows=$webdb[JsListRows]&leng=$webdb[JsListLeng]"></script>
**********************************
内容代码:
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" id="viewarticle">
<tr>
<td class="head">
<h3 class="L"></h3>
<span class="TAG"><a editurl='$webdb[www_url]/ajax.php?inc=bencandy&fid=$fid&id=$id&job=do'>TOP</a></span>
<h3 class="R"></h3>
</td>
</tr>
<tr>
<td class="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:8px;">
<tr>
<td style="color:#990000;font-weight:bold;font-size:14px;" align="center">$rsdb[title]</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:8px;border-bottom:1px solid #ccc;">
<tr>
<td align="center"> [ 录入者:{$rsdb[username]} | 时间:{$rsdb[posttime]}
| 作者:{$rsdb[author]} | 来源:<a href="$rsdb[copyfromurl]" target="_blank">{$rsdb[copyfrom]}</a>
| 浏览:<font id="hits">{$rsdb[hits]}</font>次 ] </td>
</tr>
</table>
<table class="content" width="100%" cellspacing="0" cellpadding="0" style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word'>
<tr>
<td align="left" class="content_word">$rsdb[content]</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word;'>
<tr>
<td colspan="2" align="center" class="page">$showpage</td>
</tr>
<tr>
<td width="48%" align="left">[<a href="$webdb[www_url]/job.php?job=next_page&fid=$fid&aid=$id">下一篇</a>]<a href="$webdb[www_url]/job.php?job=next_page&fid=$fid&aid=$id" title="$backdb[title]">$backdb[subject]</a></td>
<td width="52%" align="right">[<a href="$webdb[www_url]/job.php?job=back_page&fid=$fid&aid=$id">上一篇</a>]<a href="$webdb[www_url]/job.php?job=back_page&fid=$fid&aid=$id" title="$nextdb[title]">$nextdb[subject]</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="foot">
<h3 class="L"></h3>
<h3 class="R"></h3>
</td>
</tr>
</table>
<!--
EOT;
$webdb[showComment] && $fidDB[allowcomment] && require html("comment");
print <<<EOT
-->
********************************************
时间代码:
<SCRIPT language=JavaScript type=text/JavaScript>
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate();
myyear= mydate.getYear();
year=(myyear > 200) ? myyear : 1900 + myyear;
if(myweekday == 0)
weekday=" 星期日 ";
else if(myweekday == 1)
weekday=" 星期一 ";
else if(myweekday == 2)
weekday=" 星期二 ";
else if(myweekday == 3)
weekday=" 星期三 ";
else if(myweekday == 4)
weekday=" 星期四 ";
else if(myweekday == 5)
weekday=" 星期五 ";
else if(myweekday == 6)
weekday=" 星期六 ";
document.write(myyear+"."+mymonth+"."+myday+" "+weekday);
</SCRIPT>
*********************************************************************************
转载于:https://www.cnblogs.com/lookyou/articles/2064164.html