";
$template=str_replace("%DESC",$description_s,$template);
// ����� ������ ��������
// ���� $template=str_replace("%DESC",$ar["description"],$template);
// $template=str_replace("%URL",$ar["url"],$template);
require "_reg.php"; // ���������� ������ ��������
// $template=str_replace("%REG",$_Region[$ar["Region"]],$template);
if(!is_numeric($ar["url"])) // ���� �� �������� ����
{
// $template=str_replace("%URL",preg_replace("/^[0-9]{3}/","",$ar["url"], 3),$template); // ������� ��������
$uurl=str_replace("�.", " ",$ar["url"]);
$uurl=str_replace("quot;", " ",$uurl);
$uurl=str_replace("\t", " ",$uurl);
$uurl = preg_replace("/[^-\^\w\x7F-\xFF\s]/", " ", $uurl);
$uurl = trim($uurl);
$uurl=preg_replace("/\s+/"," ",$uurl); // ������ ������ �������
$uurl = urlencode($uurl);
// ����� ���������� � �������������
// $template=str_replace("%URL","".preg_replace("/^[0-9]{3}/","",$ar["url"], 3)."",$template); // ������� ��������
$template=str_replace("%URL","".preg_replace("/^[0-9]{3}/","",$ar["url"], 3)."",$template); // ������� ��������
}
else // ����� ������ �� �������
{
// $url_tmp=($ar["url"]);
// $template=str_replace("%URL","".mysql_result(mysql_query("SELECT catalog2.Firm FROM catalog2 WHERE catalog2.Id=$url_tmp LIMIT 1"),0,0)." ",$template);
// ����� ���������� � �������������
// $template=str_replace("%URL","".mysql_result(mysql_query("SELECT brands2.title FROM brands2 WHERE brands2.id=".$ar["url"]." LIMIT 1"),0,0)."",$template);
$template=str_replace("%URL","".mysql_result(mysql_query("SELECT brands2.title FROM brands2 WHERE brands2.id=".$ar["url"]." LIMIT 1"),0,0)."",$template);
}
$template=str_replace("%BEST"," ",$template);
$template=str_replace("%BOROKENTEXT",$LANG["broken"],$template);
$template=str_replace("%ADMINIFACE",$admin,$template);
print $template;
}
if ($best!=1)return(mysql_result(mysql_query("SELECT count(*) FROM cat_main WHERE type=1 $bestsql AND (cat1=$cid OR cat2=$cid OR cat3=$cid);"),0,0));
}
$c = preg_replace("/[^-\^\w\x7F-\xFF\s]/", "", $c);
$c=intval($c);
$start=intval($start);
if ((!isset($start)) OR ($start<0)) $start=0;
settype($start,"integer");
$pp=14;
$cid=$c;$l="";
do {
$r=mysql_query("SELECT parent,name,cid FROM cat WHERE cid='$cid' LIMIT 1;") or die(mysql_error());
// echo mysql_num_rows($r);
// ������ � ��������� ������� �� ����������
// echo mysql_num_rows($r);
if ((mysql_num_rows($r)<1) AND ($c>1)) {
header("Refresh:0; url=/?part_id=123");
header("HTTP/1.0 404 Not Found");
exit;
}
if (mysql_num_rows($r)==1) {
$id=mysql_result($r,0,2);
$title=mysql_result($r,0,1);
// $parent=mysql_result($r,0,0);
// ������� ����� �� ����. ��������
$title = preg_replace("/[0-9]/","",$title, 3);
$title = trim($title);
if ($cid==$c)
// { $l=mysql_result($r,0,1).$l; $l = preg_replace("/[0-9]/", "", $l); }
{ $l0=preg_replace("/[0-9]/","", mysql_result($r,0,1).$l, 3);
$ll=preg_replace("/[0-9]/","", mysql_result($r,0,1).$ll, 3); }
else
{ $l=" » ".trim($l);
$ll=" » ".trim($ll); }
$cid=mysql_result($r,0,0);
$banner_cid=mysql_result($r,0,2); // ������ ������ ������ ��� ������ ������
}
else $cid=0;
} while ($cid!=0);
// setlocale(LC_CTYPE , 'ru_RU.CP1251');
// echo mysql_result(mysql_query("SELECT count(*) FROM cat_main WHERE type=1 AND (cat1=$c OR cat2=$c OR cat3=$c);"),0,0);
// echo mysql_result(mysql_query("SELECT name, parent FROM cat WHERE cid=$c;"),0,1);
// ���� �������� ������ � ��������� - ������ � ���� ���������� ����������
//if (mysql_result(mysql_query("SELECT count(*) FROM cat_main WHERE type=1 AND (cat1=$c OR cat2=$c OR cat3=$c);"),0,0) != 0) { $parent = ucfirst(mysql_result(mysql_query("SELECT name, parent FROM cat WHERE cid=$c LIMIT 1;"),0,1)); $title22=ucfirst(preg_replace("/[0-9]/","",mysql_result(mysql_query("SELECT name, parent FROM cat WHERE cid=$parent LIMIT 1;"),0,0), 3)); }
if ($c!=0) { $parent = mysql_result(mysql_query("SELECT parent FROM cat WHERE cid=$c LIMIT 1;"),0,0); $title22=ucfirst(preg_replace("/[0-9]/","",@mysql_result(mysql_query("SELECT name, parent FROM cat WHERE cid=$parent LIMIT 1;"),0,0), 3)); }
// $child = mysql_result(mysql_query("SELECT cid FROM cat WHERE parent='$c' LIMIT 1;"),0,0);
// ����� ��� �������� �������� �������� � ���������
$r=mysql_query("SELECT name, title, description, keywords, text, text_l FROM cat WHERE cid='$c' LIMIT 1;") or die(mysql_error());
// ������ �������
if (mysql_num_rows($r)!=0) {
$title11=ucfirst(trim(preg_replace("/[0-9]/","",mysql_result($r,0,0), 3)));
//echo $parent;
$title33 = " | ����� ������, �����, ������ � �����-�������� � �������� ������������ | �������� ���� ���������, �������� � ������, ���������� ������";
// ������� ���������� ����������� �������� � �������� � title
if ($c>0) { $totalvibor=@mysql_result(@mysql_query("SELECT cat.count FROM cat WHERE cat.cid=$c LIMIT 1"),0,0); }
// echo $totalvibor;
// if ($totalvibor>4) $title33 = " - ".$totalvibor." ����������� �� Oborud.info | �������� ���� ���������, �������� � ������, ���������� ������";
// ������� ���������� ����������� �������� � �������� � title END
if ($totalvibor>4) $title33 = " | �������� ���� ���������, �������� � ������, ���������� ������";
if ($parent<1) { $title = "".ucfirst(trim($title11)).$title33;}
if ($parent>0) {
// ���� � ������ �����
$numtitle = preg_replace("/[^0-9]/", "", $title11);
// ���� ���� ������ ����� ������
// ������� ���������� ����
$title11array=explode (" ", $title11);
$title11result = count($title11array);
// print_r ($title11array); // �������� - ������� ������
// echo $title11result; // �������� - ������� ���������� ��������� �������
// ���� ������ ���� ������ ������
// ��� ���� ���� ����� � ������
if ($numtitle > 0) {
// ����� ������ ����� ������
// if (($numtitle > 0) OR (($title11result == 1) AND (strlen($title22) < 42 ) ))
$rubrika_title = ucfirst(trim($title22))." ".strtolower(trim($title11));
$rubrika_title=explode (" ", $rubrika_title); // ��������� �� �����
$rubrika_title=array_unique ($rubrika_title); // ������� ������������� �����
$rubrika_title=implode (" ", $rubrika_title); // ��������� �����
$title = "".$rubrika_title.$title33;
$title2 = $rubrika_title;
}
else { $title = "".ucfirst(trim($title11)).$title33; $title2 = ucfirst(trim($title11)); }
}
} // ����� �������
// if (mysql_num_rows($r)!=0) $title=mysql_result($r,0,0)." | ".$CATNAME."| OBORUD.INFO - ������ ������������";
// else $title=$CATNAME . " | ��������, �����������, ������� ������������";
// �� ������� ��������
else $title=" ������� ������������ | ������������� � ���������� �������� ������������ | OBORUD.INFO - ������ ������������";
// ������� ����� �� ����. ��������
//$title = preg_replace("/[0-9]/","",$title, 3);
//setlocale(LC_CTYPE , 'ru_RU.CP1251');
//$title = ucfirst($title);
// if ($c!=0) $title = strtoupper( substr( $title , 0 , 2 ) ).strtolower( substr( $title , 2 ) );
if ($c!=0) $title = ucfirst(trim($title));
@$title_h=mysql_result($r,0,1);
// $title2=mysql_result($r,0,0);
// $title2 = preg_replace("/[0-9]/","",$title2, 3);
// $title2 = trim($title2);
$title_h = str_replace("| �������","| �������", $title_h);
// $title2 = ucfirst($title2);
@$description_h=mysql_result($r,0,2);
@$keywords_h=mysql_result($r,0,3);
@$text_h=mysql_result($r,0,4);
@$text_l=mysql_result($r,0,5);
$text_h = str_replace(":",",",$text_h);
$text_h = strtolower($text_h);
$text_l=str_replace("F1F1F1","F5F5F5",$text_l);
//$description = str_replace(" | ",", ",$title).". ";
if ($totalvibor<4) $detail_keywords = str_replace(" | ",", ",$title).", �������� ����, ��������� ���������, ��������� ������ �������������, �������� � ������";
if ($totalvibor>4) $detail_keywords = str_replace(" | ",", ",$title)." ";
//$description = str_replace(""","",$description);
$detail_keywords = str_replace(""","",$detail_keywords);
$detail_keywords = str_replace('"',"",$detail_keywords);
$keywords_h = str_replace('"',"",$keywords_h);
$description_h = str_replace('"',"",$description_h);
$description = str_replace(""","",$description);
$description = str_replace('"',"",$description);
$text_h = str_replace(""","",$text_h);
$text_h = str_replace('"',"",$text_h);
if (strlen($title_h)>3) { $title11 = ucfirst(trim($title_h)); }
$description=$title11.". ����� ������, �����, ������ � �����-�������� � �������� ������������. �������� ��������: �������� ���� ���������, �������� � ������, ���������� ������";
// ������ �������������� ������ � ��������� ��������
if (strlen($title_h)>3) { $title = ucfirst(trim($title_h)).$title33; }
if (strlen($description_h)>3) { $description = $description_h; }
if (strlen($title_h)>3) { $detail_keywords = $description; }
if (strlen($text_h)>3) { $detail_keywords = $text_h; }
if (strlen($keywords_h)>3) { $detail_keywords = $keywords_h; }
// ������� �������� � ����������� �� �������
/*
$rubs_top0 = @mysql_result(@mysql_query("SELECT cat_banners_top.banners FROM cat_banners_top WHERE cat_banners_top.rubs=$banner_cid LIMIT 1"),0,0);
if (strlen($rubs_top0)>30) { $rubs_top = $rubs_top0; }
else {$rubs_top = @mysql_result(@mysql_query("SELECT cat_banners_top.banners FROM cat_banners_top WHERE cat_banners_top.rubs=0 LIMIT 1"),0,0); }
$rubs_top = str_replace("adclick.php","a.php", $rubs_top);
$rubs_top = str_replace("bannerid=","b=", $rubs_top);
$rubs_top = str_replace("zoneid=","z=", $rubs_top);
$rubs_top = str_replace("source=","s=", $rubs_top);
$rubs_top = str_replace("dest=","d=", $rubs_top);
$rubs_top = str_replace("ads.oborud.info","img.oborud.info", $rubs_top);
$rubs_top = str_replace("adjs.php","as.php", $rubs_top);
include "_top_b.php";
*/
// ����� ������ ��������
$rb=mysql_query("SELECT rubs,banners,switch FROM part2_banners WHERE rubs='1' LIMIT 1;") or die(mysql_error());
// $rubs=mysql_result($rb,0,0);
$bannertop=mysql_result($rb,0,1);
$switch=mysql_result($rb,0,2);
if ($switch=='1') { $bannertop = "
".$bannertop."
"; } else {$bannertop="";}
// ���������� ��� �����:
// �������� �������� �� ����������� ����������
$r123=mysql_query("Select * FROM count2 WHERE 1") or die(mysql_error());
// ����������� � �����������:
$cnt1=mysql_result($r123,0,1);
// ������� ������������
$cnt3=mysql_result($r123,0,3);
// $counter = "".$cnt1." ����������� | ".$cnt3." ������� ";
$counter = "".$cnt1." ����������� | ".$cnt3." ������� ";
$template=$TMPL["bmenu"];
$template=str_replace("%MODERATORSTEXT",$LANG["moderators"],$template);
$template=str_replace("%ADDLINKTEXT",$LANG["addlink"],$template);
$template=str_replace("%MAINTEXT",$LANG["main"],$template);
print $template;
// $template=$TMPL["brokenscript"];
$template=str_replace("%YESTEXT",$LANG["yes"],$template);
$template=str_replace("%NOTEXT",$LANG["no"],$template);
$template=str_replace("%BROKENSURETEXT",$LANG["brokensure"],$template);
print $template;
//$id=intval($id); // ��� $id ������ � �������� ���� ��������
// print_r($id);
// var_dump($massiv);
//$massiv = implode(",",$id);
//$rubs0 = @mysql_result(@mysql_query("SELECT cat_banners.banners FROM cat_banners WHERE cat_banners.rubs in ($massiv)"),0,0);
// ����� ��������
// $c2 = @mysql_result(@mysql_query("SELECT parent FROM cat WHERE cid='$c' LIMIT 1;"),0,0);
// $rubs0 = @mysql_result(@mysql_query("SELECT cat_banners.banners FROM cat_banners WHERE cat_banners.rubs=$c OR cat_banners.rubs=$c2 LIMIT 1"),0,0);
// echo $banner_cid; // ������ ������ ������ ��� ������ ������
$rubs0 = @mysql_result(@mysql_query("SELECT cat_banners.banners FROM cat_banners WHERE cat_banners.rubs=$banner_cid LIMIT 1"),0,0);
if (strlen($rubs0)>30) $rubs = $rubs0;
$rubs = str_replace("adclick.php","a.php", $rubs);
$rubs = str_replace("bannerid=","b=", $rubs);
$rubs = str_replace("zoneid=","z=", $rubs);
$rubs = str_replace("source=","s=", $rubs);
$rubs = str_replace("dest=","d=", $rubs);
$rubs = str_replace("ads.oborud.info","img.oborud.info", $rubs);
$rubs = str_replace("adjs.php","as.php", $rubs);
// ������ ����������� �� ���� ��������� ��������
//if (empty($rubs)) {
//$rubs = "
//
//";
//}
$sform=$TMPL["searchform"];
$sform="";
print $sform;
if ($c<1) { $CATNAME = ""; $l = " � ������� "; }
$template=$TMPL["catname"];
// $template=str_replace("%MAINTEXT",$CATNAME,$template);
$MAINTEXT=$CATNAME;
//$TEXTH=$texth;
// ��������� ���� ���� ����� ������ ����� 200 ��������
//echo strlen($l.$l0);
// echo $l.$l0;
// if (strlen($l.$l0) > 365) { $l = "..... � ".$l.""; }
// $template=str_replace("%OTHERTEXT",$l.$l0,$template);
$OTHERTEXT .= $l.$l0;
//if ($c<1) { $template=str_replace(" » "," ",$template); }
// if (strlen($text_h)>3) { $texth = " ".$text_h." "; }
if (strlen($title2)<3) { @$title2=mysql_result($r,0,0); $title2 = preg_replace("/[0-9]/","",$title2, 3); $title2 = trim($title2); }
// ������ �������������� ������ � ��������� ��������:
if (isset($sid)) { $texth_admin=" [".$LANG["edit"]."]"; }
if (strlen($title_h)>3) { $title2 = trim($title_h); }
if ($c>0) { $texth = "".ucfirst($title2).""; }
else $texth = "������� ������������";
$top_path = " » » ".$OTHERTEXT."";
if ($c<1) { $top_path=str_replace(" » "," ",$top_path); }
$canonical="\r\n";
if ($c<1) { $canonical="\r\n"; }
include "_top.php";
$template=str_replace("%TEXTH",$texth.$texth_admin,$template);
print $template;
// ������� ������ �� ������� ���.
// if ($c<1) $rubs = "";
// ����� ������� ������� ��������-����������� ����������/�������
// ���� ������� �������� - ������� ������
if ($c<1) {
$rbt=mysql_query("SELECT rubs,banners,switch FROM part2_banners WHERE rubs='5' LIMIT 1;") or die(mysql_error());
$rubs=mysql_result($rbt,0,0);
$rubs=mysql_result($rbt,0,1);
$switch=mysql_result($rbt,0,2);
if ($switch=='1') { $rubs = "
".$rubs."
";
echo $rubs;
} else {$rubs="";}
}
// ����� ������� "���� ������� �������� - ������� ������"
$b1=$TMPL["b1"];
// ���� �� ������� �������� - ������� ������
if ($c>1) {
$rubs = str_replace("","
",$rubs);
$rubs = str_replace("
","
",$rubs);
if (strlen($rubs0)>30) { $rubs = "".$rubs." "; }
}
// ����� ������� "���� �� ������� �������� - ������� ������"
$b1=str_replace("%BANNERS",$rubs,$b1); // ����� ��������
if (strlen($rubs0)>30) { echo "".$b1." ";}
// ������� �������
// if ($parent<1) { ShowParts($c); }
$cid = $c;
// �-� ��������
function ChgCountR($cid) {
global $rescat_all;
$count_start=mysql_result(mysql_query("SELECT count(cat_main.lid) FROM cat_main WHERE cat_main.cat1='$cid' AND cat_main.type=1"),0,0);
if ($count_start != 0) { $count = $count_start; }
// ������ ������� �������
if ($rescount == 0) {
$r=mysql_query("SELECT cid FROM cat WHERE parent='$cid' ") or die(mysql_error());
// if (mysql_num_rows($r)!=0) $cid=mysql_result($r,0,0);
$cnt=mysql_num_rows($r);
// ������ �����
for ($i=0;$i<$cnt;$i++) {
$rescat = mysql_result($r,$i,0);
// print_r ($rescat);
$rescat_all.=$rescat." ";
$rescount_ris = ChgCountR($rescat,$pid);
//print_r ($rescount_ris);
if ($rescount_ris != 0) { $count = "res";
$rrr=mysql_query("SELECT parent,cid FROM cat WHERE cid IN ($rescat) LIMIT 1;") or die(mysql_error());
if (mysql_num_rows($rrr)>0) {
// echo mysql_result($rrr,0,0);
$count = "9999";
}
}
// elseif (mysql_result(mysql_query("SELECT cid FROM cat WHERE parent IN ($rescat) LIMIT 1"),0,0)) { $count = "res"; }
} // ����� �����
} // ����� ������� �������
if (!isset ($count)) $count = "nul";
return $count; // ���������� �������� �-��
}
// ����� �-�� ��������
// �������� ��� ������ � ������
$query = "SELECT cat.cid, cat.parent, cat.name, cat.count FROM cat WHERE cat.count > 0 ORDER by cat.name";
$res = mysql_query ($query);
while($row = mysql_fetch_assoc($res)){
$tree[$row['parent']][$row['cid']] = $row['name'];
}
// print_r($tree); // ��������� ��� � �������
function ShowTree($tree, $cid){
GLOBAL $sum;
echo "";
foreach($tree as $id=>$root){
if($cid!=$id)continue;
if(count($root)){
foreach($root as $key => $name){
$rescount = ChgCountR($key,$cid); // �������� �-� ��������
$sum += $rescount;
$cntr= "[". $rescount . "]"; // ������ �������
$str= trim(preg_replace("/[0-9]/","",$name, 3));
// ������ ������ � ���������, ������� ����� �� ������������ ��������
if ((is_numeric($rescount)) AND ($rescount=="9999")) echo "- " .$str . "";
elseif ((is_numeric($rescount)) AND ($rescount!=0)) echo "
- " .$str. " " . $cntr . "";
else echo "
- "; // �������� ������ ����� �� ��������� �����
// ������ �� ������ ����� ���� �������� ��������, ��� ���� ������� ��������, � ���� �� ������� � ����� ���������
if(count($tree[$key]))ShowTree($tree,$key);
}
}
}
echo " ";
}
// ������� ������
function ShowTreeUp($tree, $cid){
GLOBAL $rescat_rub;
echo "";
foreach($tree as $id=>$root){
if($cid!=$id)continue;
if(count($root)){
foreach($root as $key => $name){
$rescount = ChgCountR($key,$cid); // �������� �-� ��������
if ($rescount=='9999') { $rescount = mysql_result(mysql_query("SELECT count FROM cat WHERE cid =".$key." LIMIT 1"),0,0);
$class = "class=dropdown";
}
$cntr= "[". $rescount . "]"; // ������ �������
$str= trim(preg_replace("/[0-9]/","",$name, 3));
// ������� ������ ��������� �������
if ($cid==0) {
if($t_i1++==2) $str = "".$str."";
if($t_i2++==9) $str = "".$str."";
if($t_i3++==18) $str = "".$str."";
}
// ������� ������ ��������� ������� END
// ������ ������ � ���������, ������� ����� �� ������������ ��������
// echo $key. " "; // �������� - ����� ID ������ ��� �����������
// ���� ��� �� ������� �������� ��������
$cy = @$_GET['c'];
// echo $cy; // ��������
if ($cy>0) { $rescat_rub .= $rescat_rub." ".$key; }
if ((is_numeric($rescount)) AND ($rescount==0)) { echo "- " .$str. ""; }
elseif ((is_numeric($rescount)) AND ($rescount!=0) AND (count($tree[$key])==0)) { echo "
- " .$str. " " . $cntr . ""; }
elseif ((is_numeric($rescount)) AND ($rescount!=0)) { echo "
- " .$str. " " . $cntr . ""; }
else echo "
- "; // �������� ������ ����� �� ��������� �����
// ������ �� ������ ����� ���� �������� ��������, ��� ���� ������� ��������, � ���� �� ������� � ����� ���������
if(count($tree[$key]))ShowTree($tree,$key);
}
}
}
echo " ";
}
// ������� ���������� ������
if ($parent>0) {
echo "
";
// ������� ������
ShowTree ($tree, $cid);
// ��������
echo " |
";
}
// ��� ����� ������� � ���������� �������
if ($parent<1) {
echo "
";
// ������� ������
ShowTreeUp ($tree, $cid);
// ��������
echo " |
";
}
if (intval($c)==0 && $cat["shownew"]==1) {
if ($o==0) $sortbypop="".$LANG["popuarity"].""; else $sortbypop="".$LANG["popuarity"]."";
if ($o==1) $sortbytitle="".$LANG["title"].""; else $sortbytitle="".$LANG["title"]."";
if ($o==2) $sortbymoder="".$LANG["modervote"].""; else $sortbymoder="".$LANG["modervote"]."";
$template=$TMPL["sortby"];
$template=str_replace("%SORTBYPOP",$sortbypop,$template);
$template=str_replace("%SORTBYTITLE",$sortbytitle,$template);
$template=str_replace("%SORTBYMODER",$sortbymoder,$template);
$template=str_replace("%SORTBYTEXT",$LANG["sortby"],$template);
print $template;
$newlinkstop=$TMPL["newlinkstop"];
$newlinkstop=str_replace("%NEWLINKSTEXT",$LANG["newlinks"],$newlinkstop);
print $newlinkstop;
$r=mysql_query("SELECT lid,title,description FROM cat_main WHERE type=1 ORDER by lid DESC LIMIT ".$cat["shownewcount"].";");
while ($ar=mysql_fetch_array($r)) {
if (strlen($ar["description"])>75) $ar["description75"]=substr($ar["description"],0,75)."..."; else $ar["description75"]=$ar["description"];
$template=$TMPL["newlinkstbit"];
$template=str_replace("%ID",$ar["lid"],$template);
$template=str_replace("%TITLE",$ar["title"],$template);
$template=str_replace("%GIN",$ar["gin"],$template);
$template=str_replace("%GOUT",$ar["gout"],$template);
$template=str_replace("%MODERVOTE",$ar["moder_vote"],$template);
$template=str_replace("%DESC75",$ar["description75"],$template);
$template=str_replace("%DESC",$ar["description"],$template);
$template=str_replace("%URL",$ar["url"],$template);
print $template;
}
print $TMPL["newlinkstbottom"];
}
if ($cat["linksatmain"]==1 || $c!=0) {
print $TMPL["linkstop"];
// ShowCat($c,1);
$total=ShowCat($c);
print str_replace("%NUM",(1+$start),$TMPL["linksmiddle"]);
// print "".$text_l." ";
// $total=ShowCat($c);
print $TMPL["linksbottom"];
if (($total>0) AND (isset($sid))) print "".$LANG["linkcount"].": $total".$LANG["linkdesc"]." ";
else print " ";
}
// ���� ������ �� ��������������
if (strlen($sortpsql)>3) { $total = $sortpsqlcnt;
//echo $sortpsqlcnt;
// ������ $sortpsql ����������� � �������� �� ������������ �����
$sortpsqlencrypted= encryptIt( $sortpsql );
$sortpsqlpages="&sortp=1&sort=".$sortpsqlencrypted;
//echo $sortpsqlpages;
//echo " ";
//echo decryptIt( $sortpsqlencrypted );
}
if ($total>$pp) {
$hache="&hache=".$_GET['hache']."#".$_GET['hache']; // #sortp
print "";
if ($start!=0) print "���. �� | ";
else print "���. � | ";
$sstart=$start-($pp*6); if ($sstart<0) $sstart=0;
$send=$start+($pp*6);if ($send>$total) $send=$total;
for ($i=$sstart;$i<$send;$i+=$pp) {
if ($start==$i)
print " ".(($i/$pp)+1)."";
else
print " ".(($i/$pp)+1)."";
print " | ";
}
if ($start==$i-$pp)
print "��";
else
print " ��";
print " ";
}
// ����� �������������� ����� parent ��������
$rr=@mysql_query("SELECT cat.name,cat.cid,cat.count, cat_parent.rubs, cat_parent.parent, cat_parent.subparent, cat_parent.text, cat_parent.ordering FROM cat,cat_parent WHERE cat_parent.rubs=$cid AND cat.cid=cat_parent.parent ORDER BY cat_parent.ordering ASC");
$cntr=@mysql_num_rows($rr);
if (!empty($cntr)) {
print " ����� �������� � ������ ��������:";
}
for ($ii=0;$ii<$cntr;$ii++) {
$subparent = @mysql_result(@mysql_query("SELECT cat.name,cat.cid, cat_parent.subparent, cat_parent.text FROM cat,cat_parent WHERE cat.cid=".mysql_result($rr,$ii,5)." LIMIT 1;"),0,0);
// print " |