Subversion Repositories SmartDukaan

Rev

Rev 11495 | Rev 11505 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10582 lgm 1
<?php
11379 anikendra 2
require_once 'logger.php';
11402 lgm 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
$redirectUrl = array('static/buy-online-and-pickup-in-store','airtel-online-recharge','bsnl-online-recharge','etisalat-online-recharge','hfcl-online-recharge','idea-online-recharge',
14
				'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',
15
				'tata-cdma-online-recharge','tata-docomo-online-recharge','ttsl-online-recharge','uninor-online-recharge','videocon-online-recharge','vodafone-online-recharge',
16
				'dish-tv-online-recharge','sun-direct-online-recharge','tata-sky-online-recharge','videocon-d2h-online-recharge','androidland','androidland-overview','androidland-devices',
17
				'androidland-apps','static/oneassist-terms','latest-arrivals/1','static/aboutus','static/careers','static/privacy-policy','static/terms-conditions','androidland-store-in-noida',
18
				'androidland-store-in-bangalore','androidland-store-in-delhi','glossary','static/easy-linux','generated/product-index ','generated/most-frequently-searched','generated/accessories-compatibility-index',
19
				'generated/most-compared-phones','rechargelinks','quicklinks','personal-details','login-details','address');
20
	if($pageURL[1] == 'forgot-password'){
21
		header("Location: http://m.shop2020.in/login"); 
22
		exit;
23
	}elseif($pageURL[1] == 'proceed-to-pay'){
24
		header("Location: http://m.shop2020.in/payment"); 
25
		exit;
26
	}elseif($pageURL[1] == 'myaccount' || $pageURL[1] == 'completed-orders' || $pageURL == 'failed-orders' || $pageURL == 'my-purchases'){
27
		header("Location: http://m.shop2020.in/my-orders"); 
28
		exit;
29
	}elseif(in_array($pageURL[1], $redirectUrl)){
30
		$newURL = 'http://www.saholic.com/'.$pageURL[1];
11495 anikendra 31
		//header('Location: '.$newURL);
11496 anikendra 32
		//exit;
11402 lgm 33
	}
34
 
10582 lgm 35
/*
36
 *---------------------------------------------------------------
37
 * APPLICATION ENVIRONMENT
38
 *---------------------------------------------------------------
39
 *
40
 * You can load different configurations depending on your
41
 * current environment. Setting the environment also influences
42
 * things like logging and error reporting.
43
 *
44
 * This can be set to anything, but default usage is:
45
 *
46
 *     development
47
 *     testing
48
 *     production
49
 *
50
 * NOTE: If you change these, also change the error_reporting() code below
51
 *
52
 */
11355 lgm 53
	// Change the session timeout value to 30 minutes  // 8*60*60 = 8 hours
54
		ini_set('session.gc_maxlifetime', 8*24*60*60);
55
	//————————————————————————————–
56
 
57
// php.ini setting required for session timeout.
58
 
59
		ini_set('session.gc_maxlifetime',8*24*60*60);
60
		ini_set('session.gc_probability',1);
61
		ini_set('session.gc_divisor',1);
62
 
63
//if you want to change the  session.cookie_lifetime.
64
//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.
65
 
66
		$sessionCookieExpireTime=8*24*60*60;
67
		session_set_cookie_params($sessionCookieExpireTime);
68
		define('ENVIRONMENT', 'production');
10582 lgm 69
/*
70
 *---------------------------------------------------------------
71
 * ERROR REPORTING
72
 *---------------------------------------------------------------
73
 *
74
 * Different environments will require different levels of error reporting.
75
 * By default development will show errors but testing and live will hide them.
76
 */
77
 
78
if (defined('ENVIRONMENT'))
79
{
80
	switch (ENVIRONMENT)
81
	{
82
		case 'development':
83
			error_reporting(E_ALL);
84
			ini_set('display_errors', 'on');
85
			define('_PS_DEBUG_SQL_', true);
86
		break;
87
 
88
		case 'testing':
89
		case 'production':
90
			error_reporting(0);
11493 anikendra 91
			ini_set("log_errors", 1);
10582 lgm 92
		break;
93
 
94
		default:
95
			exit('The application environment is not set correctly.');
96
	}
97
}
98
 
99
/*
100
 *---------------------------------------------------------------
101
 * SYSTEM FOLDER NAME
102
 *---------------------------------------------------------------
103
 *
104
 * This variable must contain the name of your "system" folder.
105
 * Include the path if the folder is not in the same  directory
106
 * as this file.
107
 *
108
 */
109
	$system_path = 'system';
110
 
111
/*
112
 *---------------------------------------------------------------
113
 * APPLICATION FOLDER NAME
114
 *---------------------------------------------------------------
115
 *
116
 * If you want this front controller to use a different "application"
117
 * folder then the default one you can set its name here. The folder
118
 * can also be renamed or relocated anywhere on your server.  If
119
 * you do, use a full server path. For more info please see the user guide:
120
 * http://codeigniter.com/user_guide/general/managing_apps.html
121
 *
122
 * NO TRAILING SLASH!
123
 *
124
 */
125
	$application_folder = 'application';
126
 
127
/*
128
 * --------------------------------------------------------------------
129
 * DEFAULT CONTROLLER
130
 * --------------------------------------------------------------------
131
 *
132
 * Normally you will set your default controller in the routes.php file.
133
 * You can, however, force a custom routing by hard-coding a
134
 * specific controller class/function here.  For most applications, you
135
 * WILL NOT set your routing here, but it's an option for those
136
 * special instances where you might want to override the standard
137
 * routing in a specific front controller that shares a common CI installation.
138
 *
139
 * IMPORTANT:  If you set the routing here, NO OTHER controller will be
140
 * callable. In essence, this preference limits your application to ONE
141
 * specific controller.  Leave the function name blank if you need
142
 * to call functions dynamically via the URI.
143
 *
144
 * Un-comment the $routing array below to use this feature
145
 *
146
 */
147
	// The directory name, relative to the "controllers" folder.  Leave blank
148
	// if your controller is not in a sub-folder within the "controllers" folder
149
	// $routing['directory'] = '';
150
 
151
	// The controller class file name.  Example:  Mycontroller
152
	// $routing['controller'] = '';
153
 
154
	// The controller function you wish to be called.
155
	// $routing['function']	= '';
156
 
157
 
158
/*
159
 * -------------------------------------------------------------------
160
 *  CUSTOM CONFIG VALUES
161
 * -------------------------------------------------------------------
162
 *
163
 * The $assign_to_config array below will be passed dynamically to the
164
 * config class when initialized. This allows you to set custom config
165
 * items or override any default config values found in the config.php file.
166
 * This can be handy as it permits you to share one application between
167
 * multiple front controller files, with each file containing different
168
 * config values.
169
 *
170
 * Un-comment the $assign_to_config array below to use this feature
171
 *
172
 */
173
	// $assign_to_config['name_of_config_item'] = 'value of config item';
174
 
175
 
176
 
177
// --------------------------------------------------------------------
178
// END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
179
// --------------------------------------------------------------------
180
 
181
/*
182
 * ---------------------------------------------------------------
183
 *  Resolve the system path for increased reliability
184
 * ---------------------------------------------------------------
185
 */
186
 
187
	// Set the current directory correctly for CLI requests
188
	if (defined('STDIN'))
189
	{
190
		chdir(dirname(__FILE__));
191
	}
192
 
193
	if (realpath($system_path) !== FALSE)
194
	{
195
		$system_path = realpath($system_path).'/';
196
	}
197
 
198
	// ensure there's a trailing slash
199
	$system_path = rtrim($system_path, '/').'/';
200
 
201
	// Is the system path correct?
202
	if ( ! is_dir($system_path))
203
	{
204
		exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
205
	}
206
 
207
/*
208
 * -------------------------------------------------------------------
209
 *  Now that we know the path, set the main path constants
210
 * -------------------------------------------------------------------
211
 */
212
	// The name of THIS file
213
	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
214
 
215
	// The PHP file extension
216
	// this global constant is deprecated.
217
	define('EXT', '.php');
218
 
219
	// Path to the system folder
220
	define('BASEPATH', str_replace("\\", "/", $system_path));
221
 
222
	// Path to the front controller (this file)
223
	define('FCPATH', str_replace(SELF, '', __FILE__));
224
 
225
	// Name of the "system folder"
226
	define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
227
 
228
 
229
	// The path to the "application" folder
230
	if (is_dir($application_folder))
231
	{
232
		define('APPPATH', $application_folder.'/');
233
	}
234
	else
235
	{
236
		if ( ! is_dir(BASEPATH.$application_folder.'/'))
237
		{
238
			exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
239
		}
240
 
241
		define('APPPATH', BASEPATH.$application_folder.'/');
242
	}
243
 
244
/*
245
 * --------------------------------------------------------------------
246
 * LOAD THE BOOTSTRAP FILE
247
 * --------------------------------------------------------------------
248
 *
249
 * And away we go...
250
 *
251
 */
252
require_once BASEPATH.'core/CodeIgniter.php';
253
 
254
/* End of file index.php */
11379 anikendra 255
/* Location: ./index.php */