Просмотр файла o5on.ru/wml/category.php

Размер файла: 1.77Kb
<?php
include '../inc/config.inc.php';
include '../inc/wap_tags.inc.php';
include '../inc/functions.inc.php';
connect_to_db();
	include "config.php";
    include './inc/head.php';



			// ------------------------------ Категории каталога -------------------------------
			$today  = date("Ymd");

echo "Категории<br />\n";

$result = mysql_query("SELECT * FROM `weeks` WHERE `host` > 0 and `date`=".$today." AND `uid` != '1';");  // TEST
$count = mysql_num_rows($result);

        	$result666 = mysql_query("SELECT count(`uid`) FROM `weeks` WHERE `host` > 0 and `date`=".$today." AND `uid` != '1';");  // TEST
            $cntData666 = mysql_fetch_row($result666);  // TEST
            $count_users666 = $cntData666[0];  // TEST

echo "<a href=\"/wml".$categorii[0]."/\">TOP-100</a> (".$count_users666.") <br/>\n";  // TEST
$zend=20;
$query = "SELECT * FROM cat ORDER BY id";
    $result = mysql_query($query)
        or die("Query failed");
for ($i=0; $i <= mysql_num_rows($result) - 1; $i++) {
        if (!mysql_data_seek($result, $i)) {
            echo "Cannot seek to row $i\n";
            continue;
        }

        if(!($row = mysql_fetch_object($result)))
            continue;
$zend--;
if($zend==0) break;
$idurl = $row->id;
$name = $row->name;
//$rez=mysql_query ("select * from users where cat_id='".$idurl."'"); // TEST
$rez = mysql_query("SELECT * FROM `weeks` WHERE `host` > 0 and cat_id=".$idurl." and `date`=".$today."");
$count = mysql_num_rows($rez);
$txt="&#187; <a href=\"/wml".$categorii[$idurl]."/\">".$name."</a> (".$count.")<br />";
echo $txt;
}
echo "--<br />";

echo "
<a href=\"/wml/stat/1/\">Статистика рейтинга</a><br />
<a href=\"/wml/reg.wml\">Регистрация</a><br />--<br />\n";


include "./inc/foot.php";

ob_end_flush();
?>