function showAssignSample() { $assignids = loadvar('assignid'); $selurid = loadvar('selurid'); if (sizeof($assignids) > 0 && ($selurid > 0 || $selurid == -1)) { //-1: back to sysadmin foreach ($assignids as $id) { //sysadmin mode: change on server 'only' $household = new Household($id); $household->setUrid($selurid); $household->saveChanges(); $respondents = $household->getRespondents(); foreach ($respondents as $respondent) { $respondent->setUrid($selurid); $respondent->saveChanges(); } $communication = new Communication(); $communication->assignHousehold($household, $selurid); } if (dbConfig::defaultPanel() == PANEL_HOUSEHOLD) { $message = Language::labelSupervisorHouseholdAssigned(); } else { $message = Language::labelSupervisorRespondentAssigned(); } } else { if (dbConfig::defaultPanel() == PANEL_HOUSEHOLD) { $message = Language::labelSupervisorHouseholdsNotAssigned(); } else { $message = Language::labelSupervisorRespondentsNotAssigned(); } } $display = new Display(); return $this->showUnassignedSample($display->displayInfo($message)); }
$headers = 'From: ' . $fromaddress . "\r\n" . 'Reply-To: ' . $fromaddress . "\r\n" . 'Return-Path: <>' . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; //$headers .= "Content-type: text/plain; charset=ISO-8859-1"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $arr = explode(";", $toaddress); foreach ($arr as $a) { mail($a, $subject, $message, $headers); } } /* myhh functions */ function getHHInfoPreload() { global $engine; $household = new Household($engine->getPrimaryKey()); $respondents = $household->getRespondents(); $cnt = 1;