function Respondent($rowOrPrimkey) { global $db; $this->remarks = new Remarks(); $this->contacts = new Contacts(); $this->logactions = new LogActions(); if (is_array($rowOrPrimkey)) { $this->respondent = $rowOrPrimkey; } else { $query = 'select *, ' . Respondents::getDeIdentified() . ' from ' . Config::dbSurvey() . '_respondents where primkey = \'' . prepareDatabaseString($rowOrPrimkey) . '\''; $result = $db->selectQuery($query); $this->respondent = $db->getRow($result); } $this->user = new User($this->getUrid()); }
$query .= 'email = AES_ENCRYPT("' . prepareDatabaseString($this->getEmail()) . '", "' . Config::smsPersonalInfoKey() . '"), '; $query .= 'status = ' . prepareDatabaseString($this->getStatus()) . ', '; $query .= 'urid = ' . prepareDatabaseString($this->getUrid()) . ' '; $query .= 'WHERE primkey = "' . prepareDatabaseString($this->getPrimkey()) . '"'; $db->executeQuery($query); return $errorMessage; } function getRespondents() { global $db; if ($this->respondents == null) { $this->respondents = array(); $query = 'select *, ' . Respondents::getDeIdentified() . ' from ' . Config::dbSurvey() . '_respondents where hhid = "' . prepareDatabaseString($this->getHhid()) . '" order by hhorder';