$$set_images ) ) { for ( $i2=0; $i2<$results_amount_images; $i2++ ) { $fa = mysql_fetch_array ( $ra ); @unlink($folder . "./gallery/$fa[num].gif"); @unlink($folder . "./gallery/$fa[num].bmp"); @unlink($folder . "./gallery/$fa[num].jpg"); @unlink($folder . "./gallery/$fa[num].png"); @unlink($folder . "./gallery/$fa[num]-small.gif"); @unlink($folder . "./gallery/$fa[num]-small.bmp"); @unlink($folder . "./gallery/$fa[num]-small.jpg"); @unlink($folder . "./gallery/$fa[num]-small.png"); } mysql_query("DELETE FROM $db_images where firmselector='$selector'"); } if ( ( ( $def_onlypaid == "YES" ) and ( $flag == "D" ) ) or ( $$images_enabled != "YES" ) ) $imageSQL = ", images = 0"; else $imageSQL = ", images = " . $$set_images; $ra = mysql_query ( "SELECT * FROM $db_exelp where firmselector = $selector" ); if (!$ra) error ("mySQL error", mysql_error() ); $results_amount_exel = mysql_numrows ( $ra ); if ( (( $def_onlypaid == "YES" ) and ( $flag == "D") ) or ($$exel_enabled != "YES") or ( $results_amount_exel > $$set_exel ) ) { for ( $i2=0; $i2<$results_amount_exel; $i2++ ) { $fa = mysql_fetch_array ( $ra ); @unlink($folder . "./exel/$fa[num].xls"); } mysql_query("DELETE FROM $db_exelp where firmselector='$selector'"); } if ( ( ( $def_onlypaid == "YES" ) and ( $flag == "D" ) ) or ( $$exel_enabled != "YES" ) ) $exelSQL = ", exel = 0"; else $exelSQL = ", exel = " . $$set_exel; $ra = mysql_query ( "SELECT * FROM $db_offers where firmselector = $selector" ); if ( !$ra ) error ( "mySQL Error", mysql_error() ); $results_amount_products = mysql_numrows ( $ra ); if ( ( ( $def_onlypaid == "YES" ) and ($flag == "D") ) or ( $results_amount_products > $$set_products ) ) { for ( $i3=0; $i3<$results_amount_products; $i3++ ) { $fa = mysql_fetch_array ( $ra ); @unlink($folder . "./offer/$fa[num].gif"); @unlink($folder . "./offer/$fa[num].bmp"); @unlink($folder . "./offer/$fa[num].jpg"); @unlink($folder . "./offer/$fa[num].png"); @unlink($folder . "./offer/$fa[num]-small.gif"); @unlink($folder . "./offer/$fa[num]-small.bmp"); @unlink($folder . "./offer/$fa[num]-small.jpg"); @unlink($folder . "./offer/$fa[num]-small.png"); } mysql_query("DELETE FROM $db_offers where firmselector='$selector'"); } if ( ( ( $def_onlypaid == "YES" ) and ( $flag == "D" ) ) or ( $$products_enabled != "YES" ) ) $productSQL = ", prices = 0"; else $productSQL = ", prices = " . $$set_products; if ($flag != "D") $date_upgrade = date ("Y-m-d"); else $date_upgrade = "0"; $date_changed = date ("Y-m-d"); mysql_query ( "UPDATE $db_users SET flag='$flag', comment='Membership downgraded automatically from $f[flag] to $flag on $date_changed', date_upgrade='$date_upgrade' $productSQL $imageSQL $exelSQL WHERE selector='$selector'" ) or die (mysql_error()); } function update_categories ($oldflag, $flag, $oldcategories, $newcategories, $section) { global $db_category; global $db_subcategory; global $db_subsubcategory; if ($section == "admin") $folder = "../"; else $folder = ""; include ($folder . "./conf/memberships.php"); if ( ( ( $def_onlypaid == "YES" ) and ($oldflag != "D") ) or ( $def_onlypaid != "YES" ) ) { $category = explode (":", $oldcategories); for ($index = 0; $index < count ( $category ); $index++) { $new_cat = explode ("#", $category[$index]); if ( $new_cat[0] != $prev_cat ) mysql_query ("UPDATE $db_category SET fcounter = fcounter-1 where selector=$new_cat[0]"); if (($new_cat[1] != "") and ($new_cat[1] != "0") and ($new_cat[1] != $prev_subcat)) mysql_query ("UPDATE $db_subcategory SET fcounter = fcounter-1 where catsel=$new_cat[0] and catsubsel=$new_cat[1]"); if (($new_cat[1] != "") and ($new_cat[1] != "0") and ($new_cat[2] != "") and ($new_cat[2] != "0")) mysql_query ("UPDATE $db_subsubcategory SET fcounter = fcounter-1 where catsel=$new_cat[0] and catsubsel=$new_cat[1] and catsubsubsel=$new_cat[2]"); $prev_cat=$new_cat[0]; $prev_subcat=$new_cat[1]; } } unset($prev_cat); unset($prev_subcat); $index_category = 1; for ($index = 0; $index < count ( $newcategories ); $index++) { if ($newcategories[$index] != "") { $category_index[$index_category] = $newcategories[$index];$index_category++; if ( ( ( $def_onlypaid == "YES" ) and ( $flag != "D" ) ) or ( $def_onlypaid != "YES" ) ) { $new_cat = explode ("#", $newcategories[$index]); if ($new_cat[0] != $prev_cat) mysql_query ("UPDATE $db_category SET fcounter = fcounter+1 where selector=$new_cat[0]"); if (($new_cat[1] != "") and ($new_cat[1] != "0") and ($new_cat[1] != $prev_subcat)) mysql_query ("UPDATE $db_subcategory SET fcounter = fcounter+1 where catsel=$new_cat[0] and catsubsel=$new_cat[1]"); if (($new_cat[1] != "") and ($new_cat[1] != "0") and ($new_cat[2] != "") and ($new_cat[2] != "0")) mysql_query ("UPDATE $db_subsubcategory SET fcounter = fcounter+1 where catsel=$new_cat[0] and catsubsel=$new_cat[1] and catsubsubsel=$new_cat[2]"); } $prev_cat=$new_cat[0]; $prev_subcat=$new_cat[1]; } } @ $category = join(":", $category_index); return $category; } ?> <? IF ($incomingline == $def_catalogue ) {echo $def_title;} else { IF (!$incomingline_firm) {title ($incomingline);} else { echo $incomingline_firm . "-" . $def_title; } } ?> "> " > ">
bg_menu_top.gif" bgcolor="#FF6600" class="mainmenu" style="padding-left:15px;">/">Главная | /viewstatic.php?vs=catalog">О каталоге| /viewstatic.php?vs=info">Правила | /compare.php">Тарифные планы | /ratingtop.php">Рейтинг компаний. ТОП20 | /stat.php">Статистика каталога | /guest.php">Гостевая книга| /contact.php">Контакты|

bg_login.png"> bg_reg.png">
pda.gif" width="18" height="18"> /m/index.php" >Мобильная версия
r_search.gif" width="18" height="18"> /search.php" >Расширенный поиск
bg_speedbar.gif" bgcolor="#757575">



"; $template_sub_a = implode ('', file('./template/' . $def_template . '/sub_a.tpl')); $template_sub_b = implode ('', file('./template/' . $def_template . '/sub_b.tpl')); $template_sub_c = implode ('', file('./template/' . $def_template . '/sub_c.tpl')); $template_sub_d = implode ('', file('./template/' . $def_template . '/sub_d.tpl')); for ( $iii=0; $iii<$fetchcounter; $iii++ ) { $f = $db->fetcharray ( $r ); $id = $f["selector"]; if ($f[flag] == "A") $template_sub = $template_sub_a; if ($f[flag] == "B") $template_sub = $template_sub_b; if ($f[flag] == "C") $template_sub = $template_sub_c; if ($f[flag] == "D") $template_sub = $template_sub_d; $getcat = $_GET[cat]; $getcategory = $_GET[category]; $getsubcat = $_GET[subcat]; $getsubsubcat = $_GET[subsubcat]; if ( (empty($getcat)) and (empty($getcategory)) ) { $maincatx = explode (":", $f[category]); $maincat = explode ("#", $maincatx[0]); $getcat = $maincat[0]; $getcategory = $maincat[0]; $getsubcat = $maincat[1]; $getsubsubcat = $maincat[2]; } if ( $iii%2 == 0 ) { $color = "$def_form_back_color"; } else { $color = "$def_background"; } $template = new Template; $template->load($template_sub); $category = 0; $maincategory = ""; $subcategory = 0; $mainsubcategory = ""; $subsubcategory = 0; $mainsubsubcategory = ""; $r_cat = mysql_query ( "SELECT * FROM $db_category WHERE selector='$getcat' or selector='$getcategory'" ); $f_cat = mysql_fetch_array ( $r_cat ); $category = $f_cat[selector]; $maincategory = $f_cat[category]; $db->freeresult($r_cat); if ( ($getsubcat != "0") and (isset($getsubcat)) ) { $r_cat = mysql_query ( "SELECT * FROM $db_subcategory WHERE ( (catsel='$getcat' or catsel='$getcategory') and (catsubsel = '$getsubcat') )" ); $f_cat = mysql_fetch_array ( $r_cat ); $subcategory = $f_cat[catsubsel]; $mainsubcategory = $f_cat[subcategory]; $db->freeresult($r_cat); } if ( ( ($getsubcat != "0") and (isset($getsubcat)) ) and ( ($getsubsubcat != "0") and (isset($getsubsubcat)) ) ) { $r_cat = mysql_query ( "SELECT * FROM $db_subsubcategory WHERE ( (catsel='$getcat' or catsel='$getcategory') and (catsubsel = '$getsubcat') and (catsubsubsel = '$getsubsubcat') )" ); $f_cat = mysql_fetch_array ( $r_cat ); $subsubcategory = $f_cat[catsubsubsel]; $mainsubsubcategory = $f_cat[subsubcategory]; $db->freeresult($r_cat); } if (($category == "") and ($subcategory == "") and ($subsubcategory == "")) { if ($def_rewrite == "YES") $template->replace("link", $def_mainlocation ."/EmptyCategory/0-0-0-" . $id . "-" . $_GET[page] . "-0.html"); else $template->replace("link", $def_mainlocation ."/view.php?id=" . $id . "&page=" . $_GET[page] . "&cat=" . $category . "&subcat=" . $subcategory . "&subsubcat=" . $subsubcategory); } if (($category != 0) and ($subcategory == 0) and ($subsubcategory == 0)) { if ($def_rewrite == "YES") $template->replace("link", $def_mainlocation ."/" . rewrite($maincategory) . "/" . $category . "-0-0-" . $id . "-" . $_GET[page] . "-0.html"); else $template->replace("link", $def_mainlocation ."/view.php?id=" . $id . "&page=" . $_GET[page] . "&cat=" . $category . "&subcat=" . $subcategory . "&subsubcat=" . $subsubcategory); } if (($subcategory != 0) and ($subsubcategory == 0)) { if ($def_rewrite == "YES") $template->replace("link", $def_mainlocation ."/" . rewrite($maincategory) . "/" . rewrite($mainsubcategory) . "/" . $category . "-" . $subcategory . "-0-" . $id . "-" . $_GET[page] . "-0.html"); else $template->replace("link", $def_mainlocation ."/view.php?id=" . $id . "&page=" . $_GET[page] . "&cat=" . $category . "&subcat=" . $subcategory . "&subsubcat=" . $subsubcategory); } if ($subsubcategory != 0) { if ($def_rewrite == "YES") $template->replace("link", $def_mainlocation ."/" . rewrite($maincategory) . "/" . rewrite($mainsubcategory) . "/" . rewrite($mainsubsubcategory) . "/" . $category . "-" . $subcategory . "-" . $subsubcategory . "-" . $id . "-" . $_GET[page] . "-0.html"); else $template->replace("link", $def_mainlocation ."/view.php?id=" . $id . "&page=" . $_GET[page] . "&cat=" . $category . "&subcat=" . $subcategory . "&subsubcat=" . $subsubcategory); } $template->replace("flag", "$f[flag]"); $template->replace("company", "$f[firmname]"); $template->replace("description", parseDescription("X", $f[business])); $template->replace("new", ifNew($f[date])); $template->replace("updated", ifUpdated($f[update_date])); $template->replace("hot", ifHot($f[countrating], $f[votes])); $offers_r = $db->query ( "SELECT * FROM $db_offers where firmselector = '$f[selector]'" ); if ( $db->numrows ( $offers_r ) > 0 ) $offers_link = "$def_offers_mark"; else $offers_link=""; $template->replace("offers", "$offers_link"); $images_r = $db->query ( "SELECT * FROM $db_images where firmselector = '$f[selector]'" ); if ( $db->numrows ( $images_r ) > 0 ) $images_link = "$def_images_mark"; else $images_link=""; $exel_r = $db->query ( "SELECT * FROM $db_exelp where firmselector = '$f[selector]'" ); if ( $db->numrows ( $exel_r ) > 0 ) $exel_link = "$def_exel_mark"; else $exel_link=""; $template->replace("images", "$images_link"); $template->replace("exel", "$exel_link"); $template->replace("color", "$color"); $template->replace("rating", show_rating ($f[rating], $f[votes])); $template->replace("date", undate($f[date], $def_datetype)); $location_r = $db->query ( "SELECT location FROM $db_location WHERE locationselector = '$f[location]'" ); $location_f = $db->fetcharray ( $location_r ); $state_r = $db->query ( "SELECT state FROM $db_states WHERE stateselector = '$f[state]'" ); $state_f = $db->fetcharray ( $state_r ); if ( $def_country_allow == "YES" ) { $country = "$location_f[location]"; $city = "$f[city]"; } if ( $def_country_allow != "YES" ) { $city = "$location_f[location]"; $country = ""; } if ( $def_states_allow == "YES" ) $state = "$state_f[state]"; else $state = ""; $template->replace("country", "$country"); $template->replace("state", "$state"); $template->replace("city", "$city"); if (ifEnabled($f[flag], "address")) $template->replace("address", "$f[address]"); else $template->replace("address", ""); if (ifEnabled($f[flag], "zip")) $template->replace("zip", "$f[zip]"); else $template->replace("zip", ""); if (ifEnabled($f[flag], "phone")) $template->replace("phone", "$f[phone]"); else $template->replace("phone", ""); if (ifEnabled($f[flag], "fax")) $template->replace("fax", "$f[fax]"); else $template->replace("fax", ""); if (ifEnabled($f[flag], "mobile")) $template->replace("mobile", "$f[mobile]"); else $template->replace("mobile", ""); if (ifEnabled($f[flag], "manager")) $template->replace("contact", "$f[manager]"); else $template->replace("manager", ""); if (ifEnabled($f[flag], "email")) $template->replace("email", "$f[mail]"); else $template->replace("email", ""); if (ifEnabled($f[flag], "www")) $template->replace("www", "$f[www]"); else $template->replace("www", ""); $template->replace("reserved_1", $f[reserved_1]); $template->replace("reserved_2", $f[reserved_2]); $template->replace("reserved_3", $f[reserved_3]); $template->replace("logo", ifLogo($f[flag], $f[selector], 120)); $template->replace("icq", "
$f[icq] \"\"
"); $template->publish(); } echo "

"; ?>



 

Администрация сайта предупреждает: Уважаемые клиенты сайта, будьте внимательны при совершении сделок. Оформляйте сделки документально во избежание всякого вида мошеннических действий. Администрация сайта www.vbartere.ru не несет никакой ответственности за действия обманщиков!

© 2009-2012 Copyright ООО "Глобал - Медиа". При использовании информации ссылка на сайт обязательна. Реклама на сайте: +7 3812 340-100.

Rambler's Top100
";} ?>