global $lan;
require_once("engine/yt_sql.php");
$conn = sqlGetGlobalConnection();
function GetSiteType($siteType) {
switch ($siteType) {
case "portal": $title = " Info Portals"; break;
case "service": $title = "Commercial sites"; break;
case "rail": $title = "Railway sites"; break;
case "city": $title = "City Portals"; break;
default: $title = "Subject directory";
}
return $title;
}
// ====== Search list of parters Types ====
/*
$query="SELECT site_type from partners2009 GROUP BY site_type";
$res=mysql_query($query, $conn);
$numr=mysql_numrows($res);
$siteTypes = array();
if( $numr > 0 ) {
for($i=0; $i<$numr; $i++)
{
$siteTypes[$i] = mysql_result($res,$i,"site_type");
}
}
*/
$siteTypes = array('portal','city','rail','service');
//print_r($siteTypes);
// ====== END Search list of parters Types ====
// ======= Selecting sites by type ============
for($i=0; $i$lan";
$res=mysql_query($query, $conn);
$numr=mysql_numrows($res);
if( $numr > 0 ) {
echo "".GetSiteType($siteTypes[$i])."";
echo "";
} else {
echo "No info was found! ";
}
}
mysql_close();
?>
|
|