📄 news.php
字号:
<?
include_once "myconnect.php";
include_once "date_time_format.php";
function main()
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" dwcopytype="CopyTableCell">
<tr>
<td valign="top"> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"> <table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td class="titlestyle"> NEWS</td>
</tr>
<?
$cnt=0;
$no_latest=mysql_fetch_array(mysql_query("select sb_latest_news_cnt from sbbleads_config"));
$rs_query=mysql_query("select *,UNIX_TIMESTAMP(sb_postedon) as ondate from sbbleads_news order by sb_id desc");
while (($rs0=mysql_fetch_array($rs_query)))//&&($cnt<$no_latest))
{
?>
<tr >
<td width="46%" valign="top" class="innertablestyle" > <table width="100%" border="0" cellspacing="0" cellpadding="0" class="onepxtable">
<tr>
<td width="5" align="left" valign="top"><font size="1" face="Arial, Helvetica, sans-serif"> </font></td>
<td valign="top"> <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr class="subtitle">
<td width="100%"><font class='normal'>
<?
if (strlen ($rs0["sb_subject"])>100)
{
echo substr($rs0["sb_subject"], 0, strrpos( substr($rs0["sb_subject"], 0, 100),' ' ))."..";
}
else
{
echo $rs0["sb_subject"];
}
?>
</font></td>
<td align="right"><a href="news_desc.php?id=<? echo $rs0["sb_id"];?> " class="insidelink">More</a></td>
</tr>
</table></td>
</tr>
<tr>
<td width="5" align="left" valign="top"><font size="1" face="Arial, Helvetica, sans-serif"> </font></td>
<td><font class='smalltext'>Posted
on <? echo sb_date($rs0["ondate"]);?></font><font class='normal'>
</font></td>
</tr>
<tr>
<td width="5" align="left" valign="top"><font size="1" face="Arial, Helvetica, sans-serif"> </font></td>
<td><font class='smalltext'>
<?
if (strlen (strip_tags($rs0["sb_description"]))>100)
{
echo substr(strip_tags($rs0["sb_description"]), 0, strrpos( substr(strip_tags($rs0["sb_description"]), 0, 100),' ' ))."..";
}
else
{
echo strip_tags($rs0["sb_description"]);
}
?>
</font></td>
</tr>
</table></td>
</tr>
<?
$cnt++;
}// end while
?>
</table></td>
</tr>
</table></td>
</tr>
</table>
<?
}// end main
?>
<?
include_once "template.php";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -