Location: PHPKode > scripts > CsCP WapSite > cscp-wapsite/functions.php
<?php

/*********************************************************************
 *
 * WapSite powered by CsC Portal. WapSite[tm] is module of CsC Portal.
 *
 * (C) 2004. CsC Portal. All rights reserved.
 *
 * http://cscp.cs-centar.net | http://www.cs-centar.net
 *
 ********************************************************************/

// File: functions.php
// Desc: Use to define some simple functions, ex. which table to connect etc.
// Written on: 21.04.2004

include("wap_db.php");

function display_news() {

include("db_connect.php");

$news = mysql_query("SELECT * from cscp_wap_news ORDER BY news_date LIMIT 0,10", $db);

while($news_display = mysql_fetch_row($news)) {

	echo "<table align=\"center\" width=\"95%\"><tr><td><b>$lang_news[name]</b>: $news_display[0] | <b>$lang_news[date]</b>: $news_display[2]</td></tr><tr><td>&nbsp;</td></tr><tr><td>$news_display[1]</td></tr></table><br><hr>";

}

}


function display_page($page) {

include("db_connect.php");

$pagea = mysql_query("SELECT * from cscp_wap_page WHERE page_name = '$page'", $db);
$page_display = mysql_fetch_row($pagea);

echo "<table align=\"center\" width=\"95%\"><tr><td><center><b>$page_display[1]</b></center></td></tr><tr><td>&nbsp;</td></tr><tr><td>$page_display[2]</td></tr></table>";

}

function display_menu() {

include("db_connect.php");

$menua = mysql_query("SELECT * from cscp_wap_menu", $db);

while($menu_display = mysql_fetch_row($menua)) {

	echo "<center><a href=\"menu.php?page=$menu_display[1]&limit=10\">$menu_display[0]</a></center>";

}

}

?>
Return current item: CsCP WapSite