Пример #1
0
function getWeight($str)
{
    $values = explode(" ", $str);
    $retstr = getVocab('pounds', $values[0]);
    $retstr = $retstr . " " . getVocab('ounces', $values[1]);
    return $retstr;
}
Пример #2
0
     header("Content-Disposition: attachment; filename=" . $filename);
     printf("\"Name\",\"%s\"\n", $row["Name"]);
     printf("\"Address\",\"%s\"\n", $row["Address"]);
     printf("\"Phone\",\"%s\"\n", $row["Phone"]);
     printf("\"Age\",\"%s\"\n", getVocab("Age", $row["Age"]));
     printf("\"Ethnicity\",\"%s\"\n", getVocab("Ethnicity", $row["Ethnicity"]));
     printf("\"Race\",\"%s\"\n", getVocab("Race", $row["Race"]));
     printf("\"Education\",\"%s\"\n", getVocab("Education", $row["Education"]));
     printf("\"Household Income\",\"%s\"\n" . getVocab("HouseIncome", $row["HouseIncome"]));
     printf("\"Occupation\",\"%s\"\n", getVocab("Occupation", $row["Occupation"]));
     printf("\"Residence\",\"%s\"\n", getVocab("Residence", $row["Residence"]));
     printf("\"Parity\",\"%s\"\n", getVocab("Parity", $row["Parity"]));
     printf("\"Past Obsterical History\",\"%s\"\n", $row["POH"]);
     printf("\"Maternal History During Pregnancy\",\"%s\"\n", $row["MHDP"]);
     printf("\"Method of Delivery\",\"%s\"\n", getVocab("MODel", $row["MethodOfDelivery"]));
     printf("\"Past Breastfeeding Experience\",\"%s\"\n", getVocab("PBE", $row["PBE"]));
     exit;
 } else {
     if (isset($_POST['minsert'])) {
         $_SESSION['AccountDetails'] = "";
         if (trim($_POST["FormalName"]) == "") {
             $_SESSION['AccountMessage'] = "Mother information insertion failed.\n";
             $_SESSION['AccountDetails'] = $_SESSION['AccountDetails'] . "Name field was left blank.<br />";
         }
         if (trim($_POST["Address"]) == "") {
             $_SESSION['AccountMessage'] = "Mother information insertion failed.\n";
             $_SESSION['AccountDetails'] = $_SESSION['AccountDetails'] . "Address field was left blank.<br />";
         }
         if (trim($_POST["Phone"]) == "") {
             $_SESSION['AccountMessage'] = "Mother information insertion failed.\n";
             $_SESSION['AccountDetails'] = $_SESSION['AccountDetails'] . "Phone field was left blank.<br />";
Пример #3
0
     echo "<div><b>Total: " . mysql_num_rows($result) . "</b></div>";
     echo "<div>Time: " . getTime($row["EntryDate"]) . "</div>";
     echo "<div>Urine: " . getVocab("out-u-color", $row["UrineColor"]) . " / " . getVocab("out-u-saturation", $row["UrineSaturation"]) . "</div>";
     echo "<div>Stool: " . getVocab("out-s-color", $row["StoolColor"]) . " / " . getVocab("out-u-consistency", $row["StoolConsistency"]) . "</div>";
 } else {
     echo "<div>No new entries</div>";
 }
 echo "</td>";
 //get latest morbidity entry
 $query = "SELECT * FROM Diary, MorbidityEntry T WHERE mid = " . $mother[$i] . " AND Diary.EntryId=T.EntryId AND Diary.EntryType = 4 AND DATE(EntryDate) = DATE(NOW()) ORDER BY EntryDate DESC;";
 $result = mysql_query($query);
 echo "<td>";
 if ($row = mysql_fetch_array($result)) {
     echo "<div><b>Total: " . mysql_num_rows($result) . "</b></div>";
     echo "<div>Time: " . getTime($row["EntryDate"]) . "</div>";
     echo "<div>Type: " . getVocab("morb-type", $row["Type"]) . "</div>";
 } else {
     echo "<div>No new entries</div>";
 }
 echo "</td>";
 //white row
 echo "<td id=\"tablespace\"><pre>        </pre></td>";
 //get 1st notifications
 $query = "SELECT * FROM Notifications, NotificationDescription WHERE mid = " . $mother[$i] . " AND Notifications.ntype = NotificationDescription.ntype AND Notifications.astatus=1 AND DATE(NotificationIssued) = DATE(NOW());";
 $result = mysql_query($query);
 echo "<td>";
 if ($row = mysql_fetch_array($result)) {
     echo "<p><b>Total: " . mysql_num_rows($result) . "</b></p>";
     echo "<p>Problem: " . $row["Problem"] . "<p>";
 } else {
     echo "<p>No new notifications</p>";
Пример #4
0
    while ($row = mysql_fetch_array($result)) {
        if (passed($row['EntryDate']) == 1) {
            $c = 'old';
            $m = "-";
        } else {
            $c = '';
            $m = "<form action='modify_entry.php' method='post'>";
            $m = $m . "<input name='entryid' type='hidden' value='" . $row['EntryId'] . "'/>";
            $m = $m . "<input name='breast' value='Modify' type='submit' />";
            $m = $m . "<input name='direction' value='view' type='hidden' />";
            $m = $m . "</form>";
        }
        $entryDate = new Datetime($row['EntryDate']);
        echo "<tr class='{$c}'>";
        echo "<td>" . $entryDate->format(DATE_TIME_FORMAT) . "</td>";
        echo "<td>" . getVocab('morb-type', $row['Type']) . "</td>";
        //		echo "<td>" . $m . "</td>";
        echo "</tr>";
    }
    echo "</tbody>";
    echo "</table>";
}
?>
</form>
</div>
<?php 
include 'footer.php';
?>
</div>
</div>
</div>