Subversion Repositories SmartDukaan

Rev

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

Rev 19807 Rev 19811
Line 1469... Line 1469...
1469
			$this->loadModel('Retailer');
1469
			$this->loadModel('Retailer');
1470
			$this->Retailer->create();
1470
			$this->Retailer->create();
1471
			if ($retdata = $this->Retailer->save($retailer)) {
1471
			if ($retdata = $this->Retailer->save($retailer)) {
1472
				$this->Session->setFlash(__('The user has been saved'));
1472
				$this->Session->setFlash(__('The user has been saved'));
1473
				$callhistoryquery = "insert into callhistory (retailer_id,agent_id,mobile_number,call_type,sms_verified,call_time,duration_sec,last_fetch_time,call_disposition,disposition_description,disposition_comments,created) values (".$retdata['Retailer']['id'].",".$agentid.",'".$retailer['Retailer']['contact1']."','inbound',1,'".$cur_date."',0,'".$cur_date."','verified_link_sent','autosms of code will be sent','autosms of code will be sent','".$cur_date."')";
1473
				$callhistoryquery = "insert into callhistory (retailer_id,agent_id,mobile_number,call_type,sms_verified,call_time,duration_sec,last_fetch_time,call_disposition,disposition_description,disposition_comments,created) values (".$retdata['Retailer']['id'].",".$agentid.",'".$retailer['Retailer']['contact1']."','inbound',1,'".$cur_date."',0,'".$cur_date."','verified_link_sent','autosms of code will be sent','autosms of code will be sent','".$cur_date."')";
1474
				$contactquery = "insert into retailercontacts (retailer_id,agent_id,mobile_number,contact_type,call_type,created) values (".$retdata['Retailer']['id'].",".$agentid.",'".$retailer['Retailer']['contact1']."','sms','inbound','".date('Y-m-d h:i:s', time())."')";
1474
				$contactquery = "insert into retailercontacts (retailer_id,agent_id,mobile_number,contact_type,call_type,created) values (".$retdata['Retailer']['id'].",".$agentid.",'".$retailer['Retailer']['contact1']."','sms','inbound','".$cur_date."')";
1475
				$this->User->query($contactquery);
1475
				$this->User->query($contactquery);
1476
				$this->User->query($callhistoryquery);
1476
				$this->User->query($callhistoryquery);
1477
				$this->redirect('userretailer');
1477
				$this->redirect('userretailer');
1478
			} else {
1478
			} else {
1479
				$this->Session->setFlash(__('The user could not be saved. Please, try again.'));
1479
				$this->Session->setFlash(__('The user could not be saved. Please, try again.'));