Размер файла: 1.99Kb
<?php
/*******************************************************************\
* File Name news/link.php *
* Date 02-10-2003 *
* For Mambo WAP Site Builder *
* Writen By Tony Skilton [email protected] *
* Version 2.00 *
* Copyright (C) 2003 Media Finder http://mediafinder.sytes.net *
* Distributed under the terms of the GNU General Public License *
* Please do not remove any of the information above *
\*******************************************************************/
header("Content-Type: text/vnd.wap.wml");
echo"<?xml version=\"1.0\"?>"; ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<?php include("../config.php"); ?>
<card id="news1" title="<? echo $wap_title ?>">
<do type="prev" label="Back"><prev/></do>
<p>
<? DB_connect($dbn,$host,$user,$pass);
$result = mysql_query("SELECT * FROM ".$dbpre."_stories WHERE sid=$id");
while ($row = mysql_fetch_object($result))
{
$sid = $row->sid;
$title = $row->title;
$done = $row->introtext;
$dirty_time = $row->time;
$dates = explode("-", $dirty_time);
$clean_time = strftime ("%d %b %Y", mktime (0,0,0,$dates[1],$dates[2],$dates[0]));
$done=eregi_replace(" "," ",$done);
$done=eregi_replace("&","&",$done);
$done=eregi_replace("<BR>"," <br />",$done);
$done=eregi_replace("<br>","<br />",$done);
$done=eregi_replace("</p>","<br />",$done);
$done=eregi_replace("<strong>","<b>",$done);
$done=eregi_replace("</strong>","</b>",$done);
$done=eregi_replace("<B>","<b>",$done);
$done=eregi_replace("</B>","</b>",$done);
$title=eregi_replace("&","&",$title);
$atags = "<b><br />";
$done = strip_tags($done, $atags);
echo "$clean_time<br/><b>$title....</b><br/>$done<br/>";
}
mysql_free_result($result); ?>
</p></card> </wml>