Beispiel #1
0
 public function dbVals()
 {
     $sg_api = new restapi();
     $ids = array('survey' => $this->sid, 'surveyresponse' => $this->rid);
     $sg_api->setup($this->user, $this->md5, $this->v, $resultsperpage = 1);
     $response = $sg_api->get("surveyresponse", $ids);
     return $response;
 }
Beispiel #2
0
 public function campaign()
 {
     $tokens = array('uid' => $this->db_obj->{'responseID'}, 'business' => $this->db_obj->{'[question(4)]'}, 'name' => $this->db_obj->{'[question(2)]'} . " " . $this->db_obj->{'[question(3)]'}, 'email' => $this->db_obj->{'[question(11)]'});
     $tokens = http_build_query($tokens);
     $params = array('type' => 'link', 'name' => $this->db_obj->{'[question(4)]'}, 'status' => 'active', 'subtype' => 'shortlink', 'scheduledclose' => date('Y-m-d', strtotime('+30 days')), 'tokenvariables' => $tokens);
     $ids = $this->sg_obj;
     $sg_api = new restapi();
     $sg_api->setup($this->user, $this->md5, $this->v, $resultsperpage = 1);
     $links = $sg_api->put('surveycampaign', $params, $ids);
     return $links;
 }