$country_name = ($country_name <> '' ? $country_name : __('your country')); osc_redirect_to(osc_subdomain_top_url(true, true) . '&restricted=1&restrictedFrom=' . urlencode($country_name)); } } if(in_array($subdomain_id, $restricted_country_ids)) { if(Cookie::newInstance()->get_value('ip_country_code') != $subdomain_id) { osc_redirect_to(osc_subdomain_top_url(true, true) . '&restricted=2&restrictedDomain=' . urlencode(osc_subdomain_name())); } } } } } // Landing page visible only if redirect failed or is disabled if(osc_subdomain_landing_enabled()) { if(osc_is_topdomain() && !osc_is_home_page() && $block_redirect === false) { osc_redirect_to(osc_base_url()); } if(osc_subdomain_type() == 'country') { if(Params::getParam('restricted') == 1) { osc_add_flash_error_message(sprintf(__('Sorry, this site is not available from %s!'), urldecode(Params::getParam('restrictedFrom')))); osc_redirect_to(osc_subdomain_top_url(true, true)); } else if (Params::getParam('restricted') == 2) { osc_add_flash_error_message(sprintf(__('Sorry, this site is only available to customers from %s!'), urldecode(Params::getParam('restrictedDomain')))); osc_redirect_to(osc_subdomain_top_url(true, true)); } } if(osc_is_topdomain()) { if(file_exists(WebThemes::newInstance()->getCurrentThemePath().'subdomain-navigation.php')) { osc_current_web_theme_path('subdomain-navigation.php'); die(); } else { require_once LIB_PATH . 'osclass/helpers/hErrors.php'; $title = osc_page_title(); $message = ''; if(Params::getParam('restricted') == 1) { $message .= '
' . sprintf(__('Sorry, this site is only available to customers from %s!'), urldecode(Params::getParam('restrictedName'))) . '
'; } $message .= '
' . __('Join our community to buy and sell from each other everyday around the world.') . '
'; $message .= '
' . __('Please select preferred site:') . '
'; $message .= osc_subdomain_links(false, false, false, 1000, 0); osc_die($title, $message); } } } } } switch(Params::getParam('page')){ case ('cron'): // cron system define('__FROM_CRON__', true); require_once(osc_lib_path() . 'osclass/cron.php'); break; case ('user'): // user pages (with security) if( Params::getParam('action')=='change_email_confirm' || Params::getParam('action')=='activate_alert' || (Params::getParam('action')=='unsub_alert' && !osc_is_web_user_logged_in()) || Params::getParam('action')=='contact_post' || Params::getParam('action')=='pub_profile' ) { require_once(osc_lib_path() . 'osclass/controller/user-non-secure.php'); $do = new CWebUserNonSecure(); $do->doModel(); } else { require_once(osc_lib_path() . 'osclass/controller/user.php'); $do = new CWebUser(); $do->doModel(); } break; case ('item'): // item pages require_once(osc_lib_path() . 'osclass/controller/item.php'); $do = new CWebItem(); $do->doModel(); break; case ('search'): // search pages require_once(osc_lib_path() . 'osclass/controller/search.php'); $do = new CWebSearch(); $do->doModel(); break; case ('page'): // static pages require_once(osc_lib_path() . 'osclass/controller/page.php'); $do = new CWebPage(); $do->doModel(); break; case ('register'): // register page require_once(osc_lib_path() . 'osclass/controller/register.php'); $do = new CWebRegister(); $do->doModel(); break; case ('ajax'): // ajax require_once(osc_lib_path() . 'osclass/controller/ajax.php'); $do = new CWebAjax(); $do->doModel(); break; case ('login'): // login page require_once(osc_lib_path() . 'osclass/controller/login.php'); $do = new CWebLogin(); $do->doModel(); break; case ('language'): // set language require_once(osc_lib_path() . 'osclass/controller/language.php'); $do = new CWebLanguage(); $do->doModel(); break; case ('contact'): //contact require_once(osc_lib_path() . 'osclass/controller/contact.php'); $do = new CWebContact(); $do->doModel(); break; case ('custom'): //custom require_once(osc_lib_path() . 'osclass/controller/custom.php'); $do = new CWebCustom(); $do->doModel(); break; default: // home require_once(osc_lib_path() . 'osclass/controller/main.php'); $do = new CWebMain(); $do->doModel(); break; } if(!defined('__FROM_CRON__')) { if(osc_auto_cron()) { osc_doRequest(osc_base_url(), array('page' => 'cron')); } } /* file end: ./index.php */