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