Subversion Repositories SmartDukaan

Rev

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

Rev 11108 Rev 11169
Line 31... Line 31...
31
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
31
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
32
				$_GET['isLoggedIn'] = 'false';
32
				$_GET['isLoggedIn'] = 'false';
33
			}
33
			}
34
		}
34
		}
35
		//standard array
35
		//standard array
-
 
36
		$configdata = $this->config->item('myaccount');
-
 
37
		$cachemodule = array('header','footer');
-
 
38
		$configdata = getCache($configdata,$cachemodule);
36
		$data = array();
39
		$data = array();
37
		$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
40
		$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
38
		$data['stylesheet'] = 'profile.css';
41
		$data['stylesheet'] = 'profile.css';
39
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('myaccount'));
42
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$configdata['module']);
-
 
43
		if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
-
 
44
		{
-
 
45
			foreach($cachemodule as $cm)
-
 
46
			{
-
 
47
				if(isset($configdata[$cm]) and !empty($configdata[$cm]))
-
 
48
				{
40
		//if(isset($data['response']['response']['account']))
49
					$data['response'][$cm]=$configdata[$cm];
-
 
50
				}
-
 
51
			}
-
 
52
		}
-
 
53
		setCache($configdata['module'],$cachemodule,$data['response']);
41
		$this->layout->view('myaccount/account_view',$data);
54
		$this->layout->view('myaccount/account_view',$data);
42
	}
55
	}
43
 
56
 
44
	public function closed(){
57
	public function closed(){
45
 
58
 
Line 52... Line 65...
52
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
65
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
53
				$_GET['isLoggedIn'] = 'false';
66
				$_GET['isLoggedIn'] = 'false';
54
			}
67
			}
55
		}
68
		}
56
		//standard array
69
		//standard array
-
 
70
		$configdata = $this->config->item('completed-orders');
-
 
71
		//$checkConfig = $this->config->item('home');
-
 
72
		$cachemodule = array('header','footer');
-
 
73
		$configdata = getCache($configdata,$cachemodule);
57
		$data = array();
74
		$data = array();
58
		$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
75
		$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
59
		$data['stylesheet'] = 'profile.css';
76
		$data['stylesheet'] = 'profile.css';
60
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('completed-orders'));
77
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$configdata['module']);
-
 
78
		if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
-
 
79
		{
-
 
80
			foreach($cachemodule as $cm)
-
 
81
			{
-
 
82
				if(isset($configdata[$cm]) and !empty($configdata[$cm]))
-
 
83
				{
-
 
84
					$data['response'][$cm]=$configdata[$cm];
-
 
85
				}
-
 
86
			}
-
 
87
		}
-
 
88
		setCache($configdata['module'],$cachemodule,$data['response']);
61
		$this->layout->view('myaccount/account_view',$data);
89
		$this->layout->view('myaccount/account_view',$data);
62
	}
90
	}
63
 
91
 
64
	public function failed(){
92
	public function failed(){
65
		
93
		
Line 98... Line 126...
98
		$data = array();
126
		$data = array();
99
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('mypurchases'));
127
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('mypurchases'));
100
		//if(isset($data['response']['response']['track_order']))
128
		//if(isset($data['response']['response']['track_order']))
101
		$this->layout->view('trackorder/trackorder_view',$data);
129
		$this->layout->view('trackorder/trackorder_view',$data);
102
	}
130
	}
103
 
-
 
104
	public function details(){
-
 
105
		
-
 
106
		$authorized = $this->session->userdata('authorized');
-
 
107
		if(isset($authorized) && !empty($authorized)){
-
 
108
			$_GET['userId'] = $authorized['Id'];
-
 
109
			if($authorized['isLoggedIn'] == 1){
-
 
110
				$_GET['isLoggedIn'] = 'true';
-
 
111
			}
-
 
112
			elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
-
 
113
				$_GET['isLoggedIn'] = 'false';
-
 
114
			}
-
 
115
		}
-
 
116
		//standard array
-
 
117
		$data = array();
-
 
118
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('personal-details'));
-
 
119
		//if(isset($data['response']['response']['track_order']))
-
 
120
		$this->layout->view('trackorder/trackorder_view',$data);
-
 
121
	}
-
 
122
	public function order(){
131
	public function order(){
123
		$last = $this->uri->total_segments();
132
		$last = $this->uri->total_segments();
124
		$orderId = $this->uri->segment($last);
133
		$orderId = $this->uri->segment($last);
125
		$authorized = $this->session->userdata('authorized');
134
		$authorized = $this->session->userdata('authorized');
126
		if(isset($authorized) && !empty($authorized)){
135
		if(isset($authorized) && !empty($authorized)){
Line 132... Line 141...
132
				$_GET['isLoggedIn'] = 'false';
141
				$_GET['isLoggedIn'] = 'false';
133
			}
142
			}
134
		}
143
		}
135
		//standard array
144
		//standard array
136
		$data = array();
145
		$data = array();
-
 
146
    	$configdata = $this->config->item('order');
-
 
147
		//$checkConfig = $this->config->item('home');
-
 
148
		$cachemodule = array('header','footer');
-
 
149
		$configdata = getCache($configdata,$cachemodule);
-
 
150
		$data = array();
137
    	$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
151
		$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
138
		$data['stylesheet'] = 'profile.css';
152
		$data['stylesheet'] = 'profile.css';
139
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('order'));
153
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$configdata['module']);
-
 
154
		if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
-
 
155
		{
-
 
156
			foreach($cachemodule as $cm)
-
 
157
			{
-
 
158
				if(isset($configdata[$cm]) and !empty($configdata[$cm]))
-
 
159
				{
-
 
160
					$data['response'][$cm]=$configdata[$cm];
-
 
161
				}
-
 
162
			}
-
 
163
		}
-
 
164
		setCache($configdata['module'],$cachemodule,$data['response']);
140
		//if(isset($data['response']['response']['track_order']))
165
		//if(isset($data['response']['response']['track_order']))
141
		$this->layout->view('myaccount/account_view',$data);
166
		$this->layout->view('myaccount/account_view',$data);
142
	}
167
	}
143
 
168
 
144
	public function wallet(){
169
	public function wallet(){
Line 154... Line 179...
154
			}
179
			}
155
		}else{
180
		}else{
156
			redirect(base_url().'login');
181
			redirect(base_url().'login');
157
		}
182
		}
158
		//standard array
183
		//standard array
-
 
184
		$configdata = $this->config->item('my-wallet');
-
 
185
		//$checkConfig = $this->config->item('home');
-
 
186
		$cachemodule = array('header','footer');
-
 
187
		$configdata = getCache($configdata,$cachemodule);
159
		$data = array();
188
		$data = array();
160
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('my-wallet'));
189
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$configdata['module']);
-
 
190
		if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
-
 
191
		{
-
 
192
			foreach($cachemodule as $cm)
-
 
193
			{
-
 
194
				if(isset($configdata[$cm]) and !empty($configdata[$cm]))
-
 
195
				{
-
 
196
					$data['response'][$cm]=$configdata[$cm];
-
 
197
				}
-
 
198
			}
-
 
199
		}
-
 
200
		setCache($configdata['module'],$cachemodule,$data['response']);
161
		if(isset($data['response']['response']['wallet'][0]) && !empty($data['response']['response']['wallet'][0])){
201
		if(isset($data['response']['response']['wallet'][0]) && !empty($data['response']['response']['wallet'][0])){
162
			$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
202
			$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
163
			$data['stylesheet'] = 'profile.css';
203
			$data['stylesheet'] = 'profile.css';
164
			$this->layout->view('myaccount/account_view',$data);
204
			$this->layout->view('myaccount/account_view',$data);
165
		}else{
205
		}else{
Line 179... Line 219...
179
			}
219
			}
180
		}else{
220
		}else{
181
			redirect(base_url().'login');
221
			redirect(base_url().'login');
182
		}
222
		}
183
		//standard array
223
		//standard array
-
 
224
		$configdata = $this->config->item('my-recharges');
-
 
225
		//$checkConfig = $this->config->item('home');
-
 
226
		$cachemodule = array('header','footer');
-
 
227
		$configdata = getCache($configdata,$cachemodule);
184
		$data = array();
228
		$data = array();
185
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$this->config->item('my-recharges'));
229
		$data['response']=$this->myaccount_model->getOrder($this->input->get(),$this->input->post(),$configdata['module']);
-
 
230
		if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
-
 
231
		{
-
 
232
			foreach($cachemodule as $cm)
-
 
233
			{
-
 
234
				if(isset($configdata[$cm]) and !empty($configdata[$cm]))
-
 
235
				{
-
 
236
					$data['response'][$cm]=$configdata[$cm];
-
 
237
				}
-
 
238
			}
-
 
239
		}
-
 
240
		setCache($configdata['module'],$cachemodule,$data['response']);
186
		if(isset($data['response']['response']['myrecharges'][0]) && !empty($data['response']['response']['myrecharges'][0])){
241
		if(isset($data['response']['response']['myrecharges'][0]) && !empty($data['response']['response']['myrecharges'][0])){
187
			$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
242
			$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
188
			$data['stylesheet'] = 'profile.css';
243
			$data['stylesheet'] = 'profile.css';
189
			$this->layout->view('myaccount/account_view',$data);
244
			$this->layout->view('myaccount/account_view',$data);
190
		}else{
245
		}else{