Subversion Repositories SmartDukaan

Rev

Rev 11379 | Rev 11493 | 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];
31
		header('Location: '.$newURL);
32
		exit;
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);
91
		break;
92
 
93
		default:
94
			exit('The application environment is not set correctly.');
95
	}
96
}
97
 
98
/*
99
 *---------------------------------------------------------------
100
 * SYSTEM FOLDER NAME
101
 *---------------------------------------------------------------
102
 *
103
 * This variable must contain the name of your "system" folder.
104
 * Include the path if the folder is not in the same  directory
105
 * as this file.
106
 *
107
 */
108
	$system_path = 'system';
109
 
110
/*
111
 *---------------------------------------------------------------
112
 * APPLICATION FOLDER NAME
113
 *---------------------------------------------------------------
114
 *
115
 * If you want this front controller to use a different "application"
116
 * folder then the default one you can set its name here. The folder
117
 * can also be renamed or relocated anywhere on your server.  If
118
 * you do, use a full server path. For more info please see the user guide:
119
 * http://codeigniter.com/user_guide/general/managing_apps.html
120
 *
121
 * NO TRAILING SLASH!
122
 *
123
 */
124
	$application_folder = 'application';
125
 
126
/*
127
 * --------------------------------------------------------------------
128
 * DEFAULT CONTROLLER
129
 * --------------------------------------------------------------------
130
 *
131
 * Normally you will set your default controller in the routes.php file.
132
 * You can, however, force a custom routing by hard-coding a
133
 * specific controller class/function here.  For most applications, you
134
 * WILL NOT set your routing here, but it's an option for those
135
 * special instances where you might want to override the standard
136
 * routing in a specific front controller that shares a common CI installation.
137
 *
138
 * IMPORTANT:  If you set the routing here, NO OTHER controller will be
139
 * callable. In essence, this preference limits your application to ONE
140
 * specific controller.  Leave the function name blank if you need
141
 * to call functions dynamically via the URI.
142
 *
143
 * Un-comment the $routing array below to use this feature
144
 *
145
 */
146
	// The directory name, relative to the "controllers" folder.  Leave blank
147
	// if your controller is not in a sub-folder within the "controllers" folder
148
	// $routing['directory'] = '';
149
 
150
	// The controller class file name.  Example:  Mycontroller
151
	// $routing['controller'] = '';
152
 
153
	// The controller function you wish to be called.
154
	// $routing['function']	= '';
155
 
156
 
157
/*
158
 * -------------------------------------------------------------------
159
 *  CUSTOM CONFIG VALUES
160
 * -------------------------------------------------------------------
161
 *
162
 * The $assign_to_config array below will be passed dynamically to the
163
 * config class when initialized. This allows you to set custom config
164
 * items or override any default config values found in the config.php file.
165
 * This can be handy as it permits you to share one application between
166
 * multiple front controller files, with each file containing different
167
 * config values.
168
 *
169
 * Un-comment the $assign_to_config array below to use this feature
170
 *
171
 */
172
	// $assign_to_config['name_of_config_item'] = 'value of config item';
173
 
174
 
175
 
176
// --------------------------------------------------------------------
177
// END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
178
// --------------------------------------------------------------------
179
 
180
/*
181
 * ---------------------------------------------------------------
182
 *  Resolve the system path for increased reliability
183
 * ---------------------------------------------------------------
184
 */
185
 
186
	// Set the current directory correctly for CLI requests
187
	if (defined('STDIN'))
188
	{
189
		chdir(dirname(__FILE__));
190
	}
191
 
192
	if (realpath($system_path) !== FALSE)
193
	{
194
		$system_path = realpath($system_path).'/';
195
	}
196
 
197
	// ensure there's a trailing slash
198
	$system_path = rtrim($system_path, '/').'/';
199
 
200
	// Is the system path correct?
201
	if ( ! is_dir($system_path))
202
	{
203
		exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
204
	}
205
 
206
/*
207
 * -------------------------------------------------------------------
208
 *  Now that we know the path, set the main path constants
209
 * -------------------------------------------------------------------
210
 */
211
	// The name of THIS file
212
	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
213
 
214
	// The PHP file extension
215
	// this global constant is deprecated.
216
	define('EXT', '.php');
217
 
218
	// Path to the system folder
219
	define('BASEPATH', str_replace("\\", "/", $system_path));
220
 
221
	// Path to the front controller (this file)
222
	define('FCPATH', str_replace(SELF, '', __FILE__));
223
 
224
	// Name of the "system folder"
225
	define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
226
 
227
 
228
	// The path to the "application" folder
229
	if (is_dir($application_folder))
230
	{
231
		define('APPPATH', $application_folder.'/');
232
	}
233
	else
234
	{
235
		if ( ! is_dir(BASEPATH.$application_folder.'/'))
236
		{
237
			exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
238
		}
239
 
240
		define('APPPATH', BASEPATH.$application_folder.'/');
241
	}
242
 
243
/*
244
 * --------------------------------------------------------------------
245
 * LOAD THE BOOTSTRAP FILE
246
 * --------------------------------------------------------------------
247
 *
248
 * And away we go...
249
 *
250
 */
251
require_once BASEPATH.'core/CodeIgniter.php';
252
 
253
/* End of file index.php */
11379 anikendra 254
/* Location: ./index.php */