View file wap4mambo/onews/index.php

File size: 1.55Kb
<?php
/*******************************************************************\
*   File Name onews/index.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 align="center"><b>News Categorys</b></p>
<p align="center"><small>
<? DB_connect($dbn,$host,$user,$pass);
$result = mysql_query("SELECT categoryname, categoryid FROM ".$dbpre."_categories where section='News' and published=1 ORDER BY categoryname");
while ($row = mysql_fetch_object($result))	 {
$cid = $row->categoryid;
$catname = $row->categoryname;
$catname=eregi_replace("&","&amp;",$catname); ?>
<a href="cat.php?id=<? echo "$cid" ?>"><? echo "$catname" ?></a><br/>    
 <?      }
mysql_free_result($result);?> 
</small></p></card> </wml>