Subversion Repositories SmartDukaan

Rev

Rev 11506 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11506 Rev 11683
Line 1... Line 1...
1
<?php
1
<?php
2
require_once 'logger.php';
2
require_once 'logger.php';
3
 
3
 
4
$pageURL = 'http';
-
 
5
 //if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
-
 
6
 $pageURL .= "://";
-
 
7
 if ($_SERVER["SERVER_PORT"] != "80") {
-
 
8
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
-
 
9
 } else {
-
 
10
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
-
 
11
 }
-
 
12
$pageURL = explode('http://m.shop2020.in/', $pageURL);
-
 
13
/*
-
 
14
$redirectUrl = array('static/buy-online-and-pickup-in-store','airtel-online-recharge','bsnl-online-recharge','etisalat-online-recharge','hfcl-online-recharge','idea-online-recharge',
-
 
15
				'mtnl-mumbai-online-recharge','loop-mobile-online-recharge','mts-online-recharge','reliance-cdma-online-recharge','reliance-gsm-online-recharge','stel-online-recharge','swan-online-recharge',
-
 
16
				'tata-cdma-online-recharge','tata-docomo-online-recharge','ttsl-online-recharge','uninor-online-recharge','videocon-online-recharge','vodafone-online-recharge',
-
 
17
				'dish-tv-online-recharge','sun-direct-online-recharge','tata-sky-online-recharge','videocon-d2h-online-recharge','androidland','androidland-overview','androidland-devices',
-
 
18
				'androidland-apps','static/oneassist-terms','latest-arrivals/1','static/aboutus','static/careers','static/privacy-policy','static/terms-conditions','androidland-store-in-noida',
-
 
19
				'androidland-store-in-bangalore','androidland-store-in-delhi','glossary','static/easy-linux','generated/product-index ','generated/most-frequently-searched','generated/accessories-compatibility-index',
-
 
20
				'generated/most-compared-phones','rechargelinks','quicklinks','personal-details','login-details','address');
-
 
21
	if($pageURL[1] == 'forgot-password'){
-
 
22
		header("Location: http://m.shop2020.in/login"); 
-
 
23
		exit;
-
 
24
	}elseif($pageURL[1] == 'proceed-to-pay'){
-
 
25
		header("Location: http://m.shop2020.in/payment"); 
-
 
26
		exit;
-
 
27
	}elseif($pageURL[1] == 'myaccount' || $pageURL[1] == 'completed-orders' || $pageURL == 'failed-orders' || $pageURL == 'my-purchases'){
-
 
28
		header("Location: http://m.shop2020.in/my-orders"); 
-
 
29
		exit;
-
 
30
	}elseif(in_array($pageURL[1], $redirectUrl)){
-
 
31
		$newURL = 'http://www.saholic.com/'.$pageURL[1];
-
 
32
		//header('Location: '.$newURL);
-
 
33
		//exit;
-
 
34
	}
-
 
35
*/
-
 
36
/*
-
 
37
 *---------------------------------------------------------------
-
 
38
 * APPLICATION ENVIRONMENT
-
 
39
 *---------------------------------------------------------------
-
 
40
 *
-
 
41
 * You can load different configurations depending on your
-
 
42
 * current environment. Setting the environment also influences
-
 
43
 * things like logging and error reporting.
-
 
44
 *
-
 
45
 * This can be set to anything, but default usage is:
-
 
46
 *
-
 
47
 *     development
-
 
48
 *     testing
-
 
49
 *     production
-
 
50
 *
-
 
51
 * NOTE: If you change these, also change the error_reporting() code below
-
 
52
 *
-
 
53
 */
-
 
54
	// Change the session timeout value to 30 minutes  // 8*60*60 = 8 hours
4
	// Change the session timeout value to 30 minutes  // 8*60*60 = 8 hours
55
		ini_set('session.gc_maxlifetime', 8*24*60*60);
5
		ini_set('session.gc_maxlifetime', 8*24*60*60);
56
	//————————————————————————————–
6
	//————————————————————————————–
57
 
7
 
58
// php.ini setting required for session timeout.
8
// php.ini setting required for session timeout.
Line 64... Line 14...
64
//if you want to change the  session.cookie_lifetime.
14
//if you want to change the  session.cookie_lifetime.
65
//This required in some common file because to get the session values in whole application we need to        write session_start();  to each file then only will get $_SESSION global variable values.
15
//This required in some common file because to get the session values in whole application we need to        write session_start();  to each file then only will get $_SESSION global variable values.
66
 
16
 
67
		$sessionCookieExpireTime=8*24*60*60;
17
		$sessionCookieExpireTime=8*24*60*60;
68
		session_set_cookie_params($sessionCookieExpireTime);
18
		session_set_cookie_params($sessionCookieExpireTime);
69
		define('ENVIRONMENT', 'production');
19
		//define('ENVIRONMENT', 'production');
-
 
20
		$environment = getenv('ENVIRON');
-
 
21
		define('ENVIRONMENT', $environment);
70
/*
22
/*
71
 *---------------------------------------------------------------
23
 *---------------------------------------------------------------
72
 * ERROR REPORTING
24
 * ERROR REPORTING
73
 *---------------------------------------------------------------
25
 *---------------------------------------------------------------
74
 *
26
 *