示例#1
0
    while ($conn = $connQ->fetch()) {
        $connArray[] = $conn[1];
    }
    $connQ->freeResult();
}
$connQ->close();
unset($connQ);
if (count($connArray) == 0) {
    echo Msg::info(_("No connections defined for this medical problem."));
    include_once "../layout/footer.php";
    exit;
}
echo HTML::section(2, _("Connection Problems List:"));
$thead = array(_("#"), _("Function") => array('colspan' => $_SESSION['auth']['is_administrative'] ? 2 : 1), _("Opening Date"), _("Wording"));
$problemQ = new Query_Page_Problem();
$problemQ->captureError(true);
$tbody = array();
for ($i = 0; $i < count($connArray); $i++) {
    $problemQ->select($connArray[$i]);
    if ($problemQ->isError()) {
        Error::query($problemQ, false);
        continue;
    }
    $problem = $problemQ->fetch();
    if (!$problem) {
        $problemQ->close();
        Error::fetch($problemQ);
    }
    $row = $i + 1 . '.';
    $row .= OPEN_SEPARATOR;
    $row .= HTML::link(HTML::image('../img/action_view.png', _("view")), '../medical/problem_view.php', array('id_problem' => $problem->getIdProblem(), 'id_patient' => $idPatient));