以下为站长新闻调用代码:
<ul class="c1 ico2">
{dede:sql sql="Select aid,typeid,title,writer,senddate,body From dede\_mynews order by aid desc limit 0,5"} <li class='dotline'><a href="/mynew.php?id=[field:aid/]">[field:title/] </a></li> [field:senddate function="MyDate('m-d',@me)" /]<br>{/dede:sql}</ul>
以下为内容页面文件:
<?php
require\_once (dirname(\_\_FILE\_\_) . "/include/common.inc.php");
$id=$\_REQUEST['id'];
$dsql="select \* from dede\_mynews where aid='".$id."'";
$result=mysql\_query($dsql);
while($rs=mysql\_fetch\_object($result))
{
$title=$rs->title;
$writer=$rs->writer;
$body=$rs->body;
$senddate=$rs->senddate;
$time=MyDate("Y-m-d",$senddate);
}
?>
<title><?=$title?></title>
<link href="/templets/style/style.css" rel="stylesheet" media="screen" type="text/css" />
<div align="center" class="boxz">
<table width="600"border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="80" align="center" bgcolor="#F9F9F9"><b><?=$title?></b></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><?=$body?></td>
</tr>
<tr>
<td height="30" align="center">
<div align="right"><font color="#666666">发布人:
<?=$writer?>
时间:
<?=$time?>
</font></div></td>
</tr>
<tr>
<td><div align="center"><a href="http://www.adminbuy.cn/">首页</a></div></td>
</tr>
</table>
</div>
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。