Subversion Repositories SmartDukaan

Rev

Rev 14547 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14547 Rev 15227
Line 19... Line 19...
19
 * index method
19
 * index method
20
 *
20
 *
21
 * @return void
21
 * @return void
22
 */
22
 */
23
	public function index() {
23
	public function index() {
-
 
24
		$this->checkAcl();
24
		$country = 'IN';
25
		$country = 'IN';
25
		foreach (getallheaders() as $name => $value) {
26
		foreach (getallheaders() as $name => $value) {
26
			if($name == "Cf-Ipcountry"){
27
			if($name == "Cf-Ipcountry"){
27
				//error_log("[XFWDF] [country]- $value");
28
				//error_log("[XFWDF] [country]- $value");
28
				//if($value != 'XX')
29
				//if($value != 'XX')
Line 70... Line 71...
70
 * add method
71
 * add method
71
 *
72
 *
72
 * @return void
73
 * @return void
73
 */
74
 */
74
	public function add() {
75
	public function add() {
-
 
76
		$this->checkAcl();
75
		throw new NotFoundException(__('Invalid campaign'));
77
		throw new NotFoundException(__('Invalid campaign'));
76
		if ($this->request->is('post')) {
78
		if ($this->request->is('post')) {
77
			$this->Campaign->create();
79
			$this->Campaign->create();
78
			if ($this->Campaign->save($this->request->data)) {
80
			if ($this->Campaign->save($this->request->data)) {
79
				$this->Session->setFlash(__('The campaign has been saved.'));
81
				$this->Session->setFlash(__('The campaign has been saved.'));