Subversion Repositories SmartDukaan

Rev

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

Rev 15263 Rev 15311
Line 49... Line 49...
49
		);
49
		);
50
		$headers = array(
50
		$headers = array(
51
		    'Authorization: key=' . Configure::read('googleapikey'),
51
		    'Authorization: key=' . Configure::read('googleapikey'),
52
		    'Content-Type: application/json'
52
		    'Content-Type: application/json'
53
		);
53
		);
54
		// $this->out(print_r($headers,1));
54
		$this->log(print_r($msg,1),'pushnotifications');
55
		// Open connection
55
		// Open connection
56
		$ch = curl_init();
56
		$ch = curl_init();
57
 
57
 
58
		// Set the url, number of POST vars, POST data
58
		// Set the url, number of POST vars, POST data
59
		curl_setopt($ch, CURLOPT_URL, $url);
59
		curl_setopt($ch, CURLOPT_URL, $url);
Line 98... Line 98...
98
			}
98
			}
99
		} elseif($storeId == 4){
99
		} elseif($storeId == 4){
100
			$next = str_replace('www','m',$url);		
100
			$next = str_replace('www','m',$url);		
101
			$url = $this->getAutoLoginUrl($userId,$next);
101
			$url = $this->getAutoLoginUrl($userId,$next);
102
			$url .= '?utm_source=profitmandi';
102
			$url .= '?utm_source=profitmandi';
-
 
103
		} else {
-
 
104
			$url .= "?user_id=$user_id";
103
		}
105
		}
104
		if( strpos($url, '?') === false ) {
106
		if( strpos($url, '?') === false ) {
105
			$firstChar = '?';
107
			$firstChar = '?';
106
		} else {
108
		} else {
107
			$firstChar = '&';
109
			$firstChar = '&';