'; //print session_id().'
'; //if ($_REQUEST['demo']=='1') // $_SESSION['demo'] = 1; // //if ($_SESSION['demo']=='') // die; //require_once('settings/htmlparser.inc'); //vars($_SESSION); $lngDir = strtolower('lng/'.urls().'.php'); if (file_exists($lngDir)){ require_once($lngDir); } //vars($_SESSION); Zend_Loader::loadClass('Zend_View'); Zend_Loader::loadClass('Zend_Mail'); $view = new Zend_View(); $view->addScriptPath(dirname(__FILE__)); $view->addScriptPath(dirname(__FILE__).'/modules/'); $view->addScriptPath(dirname(__FILE__).'/lng/templates/'); $view->addScriptPath(dirname(__FILE__).'/templates/'); $view->url = $url; $view->url_all = $url_all; //unset($_SESSION); //vars($_SESSION); ################################################################# //vars($_SESSION); # REQUESTS $req = $_REQUEST; require_once('inc/request.php'); # REQUESTS - END ################################################################# # DIALOG define('_DIALOG_TITLE_','Beauty Service'); require_once('inc/dialog.php'); # DIALOG MSG - END ################################################################# # GET LNG include(dirname(__FILE__).'/lng/actions/lng.inc.php'); # GET LNG - END ################################################################# $view->HISTORY_LINK = getMenuHistory(); # LINK HISTORY //$view->LINK_HISTORY = getMenuLng(); # LINK HISTORY - END ################################################################# # FIRST PAGE getFirstPage(); # FIRST PAGE - END ################################################################# # MENU $dataMenu = getTopMenu(); $view->URL_CART = getUrlByModule($dataMenu,'cart'); $view->URL_REGISTRATION = getUrlByModule($dataMenu,'registration'); $view->URL_LOGIN = getUrlByModule($dataMenu,'login'); $view->URL_ACCOUNT = getUrlByModule($dataMenu,'account'); $view->URL_SEARCH = getUrlByModule($dataMenu,'search'); $view->URL_FORGOT_PSW = getUrlByModule($dataMenu,'forgot_psw'); $menuType = 'top'; $view->addScriptPath(dirname(__FILE__).'/menu/'.$menuType.'/templates/'); include(dirname(__FILE__).'/menu/'.$menuType.'/actions/'.$menuType.'.inc.php'); $menuType = 'left'; $view->addScriptPath(dirname(__FILE__).'/menu/'.$menuType.'/templates/'); include(dirname(__FILE__).'/menu/'.$menuType.'/actions/'.$menuType.'.inc.php'); # MENU END ################################################################# # GET MODULE-TEMPLATE URL $urlCatalog = array(); if (intval(end($url))>0) $urlCatalog['url'] = $url[count($url)-1]; else $urlCatalog['url'] = end($url); if (existsCategory($urlCatalog['url']) == 0){ $urlCatalog['url'] = $url[count($url)-2]; # GET LAST URL -1 } # GET MODULE-TEMPLATE URL -END ################################################################# # TRANSLATION if (intval($_SESSION['admin_login'])>0){ # IF LOGIN $view->TRANSLATION_JS = $view->render('trans.js.tpl'); $view->TRANSLATION_CONT = $view->render('trans.cont.tpl'); } # TRANSLATION - END ################################################################# # define('CART_ITEMS',getCartItems()); define('CART_ITEMS_PRICE',getCartItemsPrice()); # ################################################################# # BRAND - LIST $dataBrand = $db->q_data('select id,parent_id,name_'.urls().' as name, url_'.urls().' as url, module from categories where parent_id = "7" order by create_date'); $view->DATA_BRAND = $dataBrand; # BRAND - LIST - END ################################################################# # TITLE, KEYWORDS, DESCRIPTION, MODULE, TEMPLATE $category = $db->q_data('select id, module, url_'.urls().' as url, lightbox, name_'.urls().' as name, title_'.urls().' as title, description_'.urls().' as description, keywords_'.urls().' as keywords, img_slide, img_brand, img_prod from categories where url_'.urls().' = "'.$urlCatalog['url'].'"'); $category = $category[0]; $view->CATEGORY = $category; if (!$category['title']) $category['title'] = $category['name']; $view->CATEGORY_NAME = $category['name']; $view->TITLE = $category['name'].' :: '; $view->TITLE_PAGE = $category['name']; $view->DESCRIPTION = $metaData['name']; $view->KEYWORDS = $metaData['name']; if($category['module'] && is_dir(dirname(__FILE__).'/modules/'.$category['module'])){ $view->addScriptPath(dirname(__FILE__).'/modules/'.$category['module'].'/templates/'); $view->AJAX = '/modules/'.$category['module'].'/ajax/'; @include(dirname(__FILE__).'/modules/'.$category['module'].'/actions/'.$category['module'].'.inc.php'); } # TITLE, KEYWORDS, DESCRIPTION, MODULE, TEMPLATE - END ################################################################ if (($category['module'] == 'registration') OR ($category['module'] == 'cart') OR ($category['module'] == 'history') OR ($category['module'] == 'account') OR ($category['module'] == 'forgot_psw')) { # IF REGISTR. CATEGORY $view->CONTENT_CLASS = ''; } else if ($category['module'] == 'items' and getLastUrl()){ # IF ONE ITEM SELECTED $view->CONTENT_CLASS = 'one-prod-pad'; } else { # ELSE CATEGORIES $view->CONTENT_CLASS = 'cont-pad'; } ################################################################ # MAIN PAGE INFO $dataHome = $db->q_data('select * from blocks where block_name = "home"'); $dataHome = $dataHome[0]; $view->DATA_HOME = $dataHome; $dataBlocks = $db->q_data('select * from brand_blocks where category_id = "'.intval($category['id']).'"'); $dataBlocks = $dataBlocks[0]; //vars($dataBlocks); $view->DATA_BLOCKS = $dataBlocks; # MAIN PAGE INFO - END ################################################################ # SLIDER if ($category['img_slide']) $view->CATEGORY_SLIDE = $category['img_slide']; if ($category['img_brand']) $view->CATEGORY_BRAND_IMG = $category['img_brand']; if ($category['img_prod']) $view->CATEGORY_PROD_IMG = $category['img_prod']; # SLIDER - END ################################################################ if ($category['lightbox'] == 1){ $view->LIGHTBOX = 1; } $mainHtml = $view->render('header.tpl'); if (file_exists(TEMPLATES_DIR.$category['module'].'.tpl')){ if ((intval($_REQUEST['id'])>0) && ($category['module'] == 'brand')){ $mainHtml .= $view->render('body.tpl'); } else { $mainHtml .= $view->render($category['module'].'.tpl'); } } else $mainHtml .= $view->render('body.tpl'); $mainHtml .= $view->render('footer.tpl'); echo $mainHtml; # PRINT PAGE END ########################################################### if(!empty($_GET['debug'])){ echo '1'; echo '
'.print_r($db->query_list);
}
###########################################################


?>