示例#1
0
}
$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));
    $row .= OPEN_SEPARATOR;
    if ($_SESSION['auth']['is_administrative']) {
        $row .= HTML::link(HTML::image('../img/action_delete.png', _("delete")), '../medical/connection_del_confirm.php', array('id_problem' => $idProblem, 'id_patient' => $idPatient, 'id_connection' => $problem->getIdProblem()));
        $row .= OPEN_SEPARATOR;