dede调用文章的栏目,作者,发布时间.以及连接数据库输出一个表

发布时间:
{dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}
类目:{dede:field.typename/}
发布人:{dede:field.writer/}

 

 

<?php
$con=mysql_connect("localhost","root","120911");
if(!$con)
{
die('Could not connect'.mysql_error());
}
mysql_select_db("dedecms",$con);

$result=mysql_query("
select*from dede_archives where arcrank=-1"
);

echo "<table border='1' width='960px' cellpadding='0' cellspacing='1' bordercolor='#eaeaea'>
<tr bgcolor='#FBFCE2' height='25' align='center'>
<td>ID</td>
<td>选择</td>
<td>文章标题</td>
<td>更新时间</td>
<td>类目</td>
<td>发布人</td>
<td>操作</td>
</tr>";
while($row=mysql_fetch_array($result))
{
echo "<tr height='25'>";
echo "<td align='center'>".$row['id']."</td>";
echo "<td align='center'><input type='checkbox'></td>";
echo "<td>".$row['title']."</td>";
echo "<td align='center'>".$row['pubdate']."</td>";
echo "<td align='center'>".$row['keywords']."</td>";
echo "<td align='center'>".$row['writer']."</td>";
echo "<td align='center'><input type='submit' value='审核通过'></td>";
echo "</tr>";
}
echo "</table>";
mysql_close();

?>

posted @ 2015-12-30 11:50  zhenximeiyitian  阅读(756)  评论(0编辑  收藏  举报