setBasePath($bp ? "/".$bp : ""); /* Setup the URL routing. This is production ready. */ // Main routes that non-customers see $router->map('GET|POST','/', 'home.php'); $router->map('GET|POST','/home/[a:lang]?/?', 'home.php'); $router->map('GET|POST','/home/[a:lang]?/[a:country]?/?', 'home.php'); $router->map('GET|POST','/register/?', 'signup.php'); $router->map('GET|POST','/index1/?', 'index1.php'); $router->map('GET|POST','/index2/?', 'index2.php'); $router->map('GET|POST','/login/?', 'login.php'); $router->map('GET|POST','/mobile_number_login/?', 'mobile_number_login.php'); $router->map('GET|POST','/logout/?', 'logout.php'); $router->map('GET|POST','/message/?', 'message.php'); $router->map('GET|POST','/forgot_password/?', 'forgot.php'); $router->map('GET|POST','/dashboard/?', 'dashboard.php'); $router->map('GET|POST','/my_post/[*:page]?/?', 'ad-my.php'); $router->map('GET|POST','/pending_post/[*:page]?/?', 'ad-pending.php'); $router->map('GET|POST','/expire_post/[*:page]?/?', 'ad-expire.php'); $router->map('GET|POST','/favourite_post/[*:page]?/?', 'ad-favourite.php'); $router->map('GET|POST','/hidden_post/[*:page]?/?', 'ad-hidden.php'); $router->map('GET|POST','/resubmission_post/[*:page]?/?', 'ad-resubmission.php'); $router->map('GET|POST','/transaction/?', 'transaction.php'); $router->map('GET|POST','/account-setting/?', 'account-setting.php'); $router->map('GET|POST','/report_post/?', 'report.php'); $router->map('GET|POST','/contact-us/?', 'contact.php'); $router->map('GET|POST','/sitemap/?', 'sitemap.php'); $router->map('GET|POST','/countries-list/?', 'countries.php'); $router->map('GET|POST','/faq-list/?', 'faq.php'); $router->map('GET|POST','/feedback_us/?', 'feedback.php'); $router->map('GET|POST','/test/?', 'test.php'); // Special (GET processing, etc) $router->map('GET|POST','/user-profile/[*:username]?/[*:page]?/?','profile.php'); $router->map('GET|POST','/ad/[i:id]?/[*:slug]?/?', 'ad-detail.php'); $router->map('GET|POST','/post_add/[a:lang]?/[a:country]?/[a:action]?/?', 'ad-post.php'); $router->map('GET|POST','/edit_post/[i:id]?/[a:lang]?/[a:country]?/[a:action]?/?', 'ad-edit.php'); $router->map('GET|POST','/listing_post/?', 'listing.php'); $router->map('GET|POST','/categories/[*:cat]?/[*:subcat]?/?', 'listing.php'); $router->map('GET|POST','/sub-categories/[*:subcat]?/[*:slug]?/?', 'listing.php'); $router->map('GET|POST','/city/[i:city]?/[*:slug]?/?', 'listing.php'); $router->map('GET|POST','/keywords/[*:keywords]?/?', 'listing.php'); $router->map('GET|POST','/page/[*:id]?/?', 'html.php'); $router->map('GET|POST','/premium_subscription/[a:change_plan]?/?', 'membership.php'); $router->map('GET|POST','/ipn/[a:i]?/[*:id]?/?', 'ipn.php'); $router->map('GET|POST','/payments/[*:token]?/[a:status]?/[*:message]?/?', 'payment.php'); $router->map('GET','/sitemap.xml/?', 'xml.php'); // API Routes /* Match the current request */ $match=$router->match(); if($match) { if ($_SERVER["REQUEST_METHOD"] == "GET") { $_GET = array_merge($match['params'],$_GET); } require_once ROOTPATH . '/includes/config.php'; if(!isset($config['installed'])) { $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://'; $site_url = $protocol . $_SERVER['HTTP_HOST'] . str_replace ("index.php", "", $_SERVER['PHP_SELF']); header("Location: ".$site_url."install/"); exit; } require_once ROOTPATH . '/includes/sql_builder/idiorm.php'; require_once ROOTPATH . '/includes/db.php'; require_once ROOTPATH . '/includes/classes/class.template_engine.php'; require_once ROOTPATH . '/includes/classes/class.country.php'; require_once ROOTPATH . '/includes/functions/func.global.php'; require_once ROOTPATH . '/includes/lib/password.php'; require_once ROOTPATH . '/includes/functions/func.users.php'; require_once ROOTPATH . '/includes/functions/func.sqlquery.php'; require_once ROOTPATH . '/includes/classes/GoogleTranslate.php'; if(isset($_GET['lang'])) { if ($_GET['lang'] != ""){ change_user_lang($_GET['lang']); } } require_once ROOTPATH . '/includes/lang/lang_'.$config['lang'].'.php'; require_once ROOTPATH . '/includes/seo-url.php'; sec_session_start(); $mysqli = db_connect(); require APPPATH.$match['target']; } else { header("HTTP/1.0 404 Not Found"); require APPPATH.'404.php'; } ?>