Subversion Repositories SmartDukaan

Rev

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

Rev 17101 Rev 17113
Line 138... Line 138...
138
/**
138
/**
139
 * admin_index method
139
 * admin_index method
140
 *
140
 *
141
 * @return void
141
 * @return void
142
 */
142
 */
143
	public function admin_index() {
143
	public function admin_index() {		
144
		/*
-
 
145
		$this->UserUrl->recursive = 0;
-
 
146
		$q = $this->request->query('q');
144
		$q = $this->request->query('q');
147
		if(isset($q) && !empty($q)){
145
		if(isset($q) && !empty($q)){
148
			$this->Paginator->settings = array('conditions' => array('UserUrl.url LIKE'=>'%'.$q.'%'),'order' => array('id'=>'desc'));
146
			// $this->Paginator->settings = array('conditions' => array('UserUrl.url LIKE'=>'%'.$q.'%'),'order' => array('id'=>'desc'));
-
 
147
 			$url = Configure::read('nodeurl') . "/searchBrowsingHistory/?search_term=$q&posted_by=php";
149
 			$this->set(compact('q'));
148
 			$this->set(compact('q'));
150
		} else {
149
		} else {
151
			$this->Paginator->settings = array('order' => array('id'=>'desc'));
150
			// $this->Paginator->settings = array('order' => array('id'=>'desc'));
-
 
151
			$url = Configure::read('nodeurl') . '/getBrowsingHistory/?posted_by=php';
152
 		}
152
 		}
153
		$this->set('userUrls', $this->Paginator->paginate());
153
		// $this->set('userUrls', $this->Paginator->paginate());
154
		*/
-
 
155
		$page = $this->request->query('page');
154
		$page = $this->request->query('page');
156
		if(!isset($page)){
155
		if(!isset($page)){
157
			$page = 1;
156
			$page = 1;
158
		}		
157
		}
159
		$url = Configure::read('nodeurl') . '/getBrowsingHistory/?posted_by=php';
-
 
160
		$url = $this->UserUrl->getNodeUrl($url,$page);
158
		$url = $this->UserUrl->getNodeUrl($url,$page);
161
		$userUrls = $this->make_request($url,null);
159
		$userUrls = $this->make_request($url,null);
162
		$this->set(compact('userUrls', 'page'));
160
		$this->set(compact('userUrls', 'page'));
163
	}
161
	}
164
 
162