View file k/conf.php

File size: 2.05Kb
<?php
include "db.php";
//гбв ­ ў«Ёў Ґ¬ ᮥ¤Ё­Ґ­ЁҐ
mysql_connect($DB_HOST,$DB_USER,$DB_PASS) or die (mysql_error());
//ўлЎЁа Ґ¬ Ў §г ¤«п а Ў®вл
mysql_select_db($DB_NAME);
//Ј« ў­ п бва ­Ёж  б ©в 
$index="../index.php";
//ў и  Ї®«­ п ббл«Є  ­  б ©в, в.Ґ. ᮠ᫥襬 ў Є®­жҐ Ё«Ё б Ј« ў­л¬ д ©«®¬
$site="http://wep.org.ru/";
//¬ ббЁў бЁ¬ў®«®ў
function print_data($where_data,$page)
{
global $utable;
//Ґб«Ё бва ­Ёж  ­Ґ ¤ ­ , в® ®­  а ў­  ­г«о, ®вбзҐв б ЇҐаў®© бва ­Ёжл
if(empty($page)) $page=0;
//§ Їа®б ­  ўЎ®а Ё¤ Ё§ в Ў«Ёжл Є вҐЈ®аЁЁ Є в «®Ј 
$query=mysql_query("SELECT id FROM users where category='$where_data' and counter>0;");
//Є®«ЁзҐбвў® н«Ґ¬Ґ­в®ў
$num_of_rows=mysql_num_rows($query);
$total_mat_number=$num_of_rows;
//ббл«®Є ­  бва ­Ёжг
$mat_per_page=5;
//ўлбзЁвлў Ґ¬ ўбҐЈ® бва ­Ёж
$total_pages=ceil($total_mat_number/$mat_per_page);
//§ Їа®б ­  ббл«ЄЁ
$print = mysql_query("select * from users where category='$where_data' and counter>0 order by counter desc limit ".$page.",".($page+$mat_per_page).";");
//жЁЄ« ЇҐз в ­мп ббл«®Є
while($data=mysql_fetch_array($print))
{
$ix++;
print "<small><a href=\"out.php?link=".$data['link']."\">$ix.".$data['title']."</a>(id=".$data['id'].")<br/>[".$data['link']."]<br/>";
print "".$data['about']."<br/>";
print "<u>&#x0412; &#x043A;&#x0430;&#x0442;&#x0430;&#x043B;&#x043E;&#x0433;:</u> ".$data['counter']."<br/>";
print "<u>Р?&#x0437; &#x043A;&#x0430;&#x0442;&#x0430;&#x043B;&#x043E;&#x0433;&#x0430;:</u>";
print " ".$data['outcounter']."";
print "<br/>:::::</small><br/>";
}
//Є®¤ ¤«п ўлў®¤  ббл«®Є ­  ¤агЈЁҐ бва ­Ёжл ¤ ­­®© Є вҐЈ®аЁЁ
for ($i=0; $i<$total_pages; $i++){
$page_number=$i*$mat_per_page;
if ($page_number!=$page) {
print "<small><a href=\"katalog.php?where=$where_data&amp;page=$page_number\">[".($i+1)."]</a></small>";
} else {
print "<small><b>[".($i+1)."]</b></small>";
}
}
print "<small><br/>:::::<br/><a href=\"index.php\">&#x041A; &#x0440;&#x0430;&#x0437;&#x0434;&#x0435;&#x043B;&#x0430;&#x043C;</a><br/><img src=\"http://c.waplog.net/ru/6095.cnt\" alt=\"waplog\"/><br/></small>";  
}
?>