function old__construct() { global $path_site; global $cl; // CONTENT LOGIC FUNCTIONS global $meta_desc; global $meta_keywords; global $title; $action = BRequest::getCmd('action'); $method = BRequest::getCmd('method'); $call = BRequest::getCmd('call'); // a call is an ajax call. // TRACK LAST PAGE // $last = lastURL(); $returnmsg = NULL; // INIT OBJECTS if (!BRequest::getVar('category', false)) { unset($_SESSION['assortment'], $_SESSION['category'], $_SESSION['collection']); } if (BRequest::getVar('category', false)) { $title .= ucwords(BRequest::getString('category')) . ' - '; unset($_SESSION['assortment'], $_SESSION['collection']); } if (BRequest::getVar('collection', false)) { $title .= ucwords(BRequest::getString('collection')) . ' - '; unset($_SESSION['assortment']); } if (BRequest::getVar('category', false) && !isset($_SESSION['category']) || BRequest::getVar('category', false) && $_SESSION['category'] != BRequest::getString('category')) { $_SESSION['category'] = BRequest::getVar('category'); } if (BRequest::getVar('collection', false) && !isset($_SESSION['collection']) || BRequest::getVar('collection', false) && $_SESSION['collection'] != BRequest::getVar('collection')) { $_SESSION['collection'] = BRequest::getVar('collection'); } if (BRequest::getVar('assortment', false) && !isset($_SESSION['assortment']) || BRequest::getVar('assortment', false) && $_SESSION['assortment'] != BRequest::getVar('assortment')) { $title .= ucwords(BRequest::getString('assortment')) . ' - '; $_SESSION['assortment'] = BRequest::getVar('assortment'); } // AJAX CALLS START \\ if ($call == 'sl') { if ((BRequest::getVar('i', false) and preg_match('/^[0-9]{1,20}$/i', BRequest::getInt('i'))) && (isset($method) and preg_match('/^[a-z]{4,20}$/i', $method))) { $return = $this->set('like'); } else { $return = 0; } print $return; exit; } if ($call == 'sr') { if ((BRequest::getVar('i', false) and preg_match('/^[0-9]{1,20}$/i', BRequest::getInt('i'))) && (isset($method) and preg_match('/^[a-z]{4,20}$/i', $method))) { $return = $this->set('rating'); } else { $return = 0; } print $return; exit; } /* // CALL CONTENT AND REPLACE TAGS INSIDE $content = ABSPATH.'/inc/cb/index.inc'; $returnOutput = new main_output($content); // replace tags from template @ $returnOutput->replace_tags(array( 'path_site' => SITE_BASEURL, 'side_nav' => $cl->get_sideNav(), 'collections' => $cl->get_boxOne('collections'), 'assortments' => $cl->get_boxOne('assortments'), 'sm_icons_index' => $cl->get_smicons('index'), 'news_events' => $cl->get_boxTwo('news'), 'this_month' => '', 'advertise_banner' => rand(1, 2), 'think_global_shop_local' => $cl->get_boxSeven('tgsl'), 'pm_bill_of_rights' => $cl->get_boxSeven('bor'), 'our_favorite_things' => '', // $cl->get_boxSeven('oft'), 'category_calendar' => $cl->get_boxSeven('cm'), 'banner' => $cl->get_banner(), 'content' => $this->get_content() //'page_title' => $page_title_txt, )); // Call the output $this->output = $returnOutput->output;*/ }