* Retrieving get vars
 */
$idMember = intval($_GET["id_member"]);
$surname1 = Check::safeText($_GET["surname1"]);
$surname2 = Check::safeText($_GET["surname2"]);
$firstName = Check::safeText($_GET["first_name"]);
/**
 * Show page
 */
$title = _("Delete Staff Member");
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", _("Staff Members") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_staff");
unset($links);
/**
 * Form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../admin/staff_del.php'));
$tbody = array();
$tbody[] = Msg::warning(sprintf(_("Are you sure you want to delete staff member, %s %s %s?"), $firstName, $surname1, $surname2));
$tbody[] = Form::hidden("id_member", $idMember);
$tfoot = array(Form::button("delete", _("Delete")) . Form::generateToken());
$options = array('class' => 'center');
echo Form::fieldset($title, $tbody, $tfoot, $options);
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The del function will delete the related user too (if exists)."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
require_once "../layout/footer.php";
    header("Location: " . $returnLocation);
    exit;
}
/**
 * Show page
 */
$title = _("Preload CSS file");
$focusFormField = "css_filename";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", _("Themes") => "../admin/theme_list.php", strstr($returnLocation, "edit") ? _("Edit Theme") : _("Add New Theme") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_theme");
unset($links);
/**
 * Form
 */
echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF'] . ($idTheme ? '?id_theme=' . $idTheme : ''), 'enctype' => 'multipart/form-data'));
$tbody = array();
$row = Form::label("css_filename", _("Path Filename") . ":", array('class' => 'required'));
//$row .= Form::hidden("MAX_FILE_SIZE", "10000");
$row .= Form::file("css_filename", null, array('size' => 50));
$tbody[] = $row;
$tfoot = array(Form::button("preload", _("Submit")) . Form::generateToken());
echo Form::fieldset($title, $tbody, $tfoot);
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The fields with * are required."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
require_once "../layout/footer.php";
Example #3
0
if ($setQ->isError()) {
    echo HTML::para(_("Building OpenClinic tables..."));
} else {
    $set = $setQ->fetch();
    if (!$set) {
        $setQ->close();
        Error::fetch($setQ);
    }
    if (!isset($_GET["confirm"]) || $_GET["confirm"] != "yes") {
        echo HTML::para(sprintf(_("OpenClinic (version %s) is already installed."), $set->getVersion()));
        $setQ->close();
        echo Msg::warning(_("Are you sure you want to delete all clinic data and create new OpenClinic tables?"));
        echo Msg::warning(_("If you continue all data will be lost."));
        // @todo use fieldset
        echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF'] . '?confirm=yes'));
        echo HTML::para(Form::button("continue", _("Continue")) . Form::generateToken());
        echo HTML::end('form');
        echo HTML::para(HTML::link(_("Cancel"), './index.php'));
        include_once "../layout/footer.php";
        exit;
    }
}
$setQ->close();
unset($setQ);
unset($set);
/**
 * Creating each table listed in the $tables array
 */
$tables = getTables();
foreach ($tables as $tableName) {
    $result = parseSqlFile("./sql/" . $tableName . ".sql", $tableName, true);
Example #4
0
unset($array);
$tbody[] = $row;
$row = Form::label("meeting_place", _("Local e Data de atendimento") . ":");
$row .= Form::text("meeting_place", isset($formVar["meeting_place"]) ? $formVar["meeting_place"] : null, array('size' => 40, 'error' => isset($formError["meeting_place"]) ? $formError["meeting_place"] : null));
$tbody[] = $row;
$row = Form::label("wording", _("Resumo") . ":", array('class' => 'required'));
$row .= Form::textArea("wording", isset($formVar["wording"]) ? $formVar["wording"] : null, array('rows' => 4, 'cols' => 90, 'error' => isset($formError["wording"]) ? $formError["wording"] : null));
$tbody[] = $row;
$row = Form::label("subjective", _("Informações pedagógicas") . ":");
$row .= Form::textArea("subjective", isset($formVar["subjective"]) ? $formVar["subjective"] : null, array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
if (in_array($_SESSION['auth']['login_session'], $userArray)) {
    $row = Form::label("objective", _("Informações psicológicas (Campo restrito ao psicologo)") . ":");
    $row .= Form::textArea("objective", isset($formVar["objective"]) ? $formVar["objective"] : null, array('rows' => 4, 'cols' => 90));
}
$tbody[] = $row;
$row = Form::label("appreciation", _("Evoluções") . ":");
$row .= Form::textArea("appreciation", isset($formVar["appreciation"]) ? $formVar["appreciation"] : null, array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("action_plan", _("Próximos passos") . ":");
$row .= Form::textArea("action_plan", isset($formVar["action_plan"]) ? $formVar["action_plan"] : null, array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("prescription", _("Prescrições") . ":");
$row .= Form::textArea("prescription", isset($formVar["prescription"]) ? $formVar["prescription"] : null, array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("closed_problem", _("<font color=red>Marque <u>somente se</u> o atendimento estiver concluído</font>") . ":");
$row .= Form::checkBox("closed_problem", "closed", array('checked' => isset($formVar["closed_problem"]) ? $formVar["closed_problem"] != "" : false));
$tbody[] = $row;
$tfoot = array(Form::button("save", _("Submit")) . Form::generateToken());
$options = array('class' => 'large_area');
echo Form::fieldset($title, $tbody, $tfoot, $options);
Example #5
0
$tbody[] = $row;
$row = Form::label("family_situation", _("Informações complementares") . ":");
$row .= Form::textArea("family_situation", $formVar["family_situation"], array('rows' => 3, 'cols' => 30));
$tbody[] = $row;
$row = Form::label("labour_situation", _("Trabalho dos familiares") . ":");
$row .= Form::textArea("labour_situation", $formVar["labour_situation"], array('rows' => 3, 'cols' => 30));
$tbody[] = $row;
$row = Form::label("education", _("Procedência do encaminhamento") . ":");
$row .= Form::textArea("education", $formVar["education"], array('rows' => 3, 'cols' => 30));
$tbody[] = $row;
$row = Form::label("insurance_company", _("CID") . ":");
$row .= Form::text("insurance_company", isset($formVar["insurance_company"]) ? $formVar["insurance_company"] : null, array('size' => 30, 'error' => isset($formError["insurance_company"]) ? $formError["insurance_company"] : null));
$tbody[] = $row;
$staffQ = new Query_Staff();
$array = null;
$array[0] = "";
// to permit null value
if ($staffQ->selectType('D')) {
    while ($staff = $staffQ->fetch()) {
        $array[$staff->getIdMember()] = $staff->getFirstName() . " " . $staff->getSurname1() . " " . $staff->getSurname2();
    }
    $staffQ->freeResult();
}
$staffQ->close();
unset($staffQ);
$row = Form::label("id_member", _("Atendente") . ":");
$row .= Form::select("id_member", $array, $formVar["id_member"]);
unset($array);
$tbody[] = $row;
$tfoot = array(Form::button("save", _("Gravar dados")) . Form::generateToken());
echo Form::fieldset($title, $tbody, $tfoot);
Example #6
0
 */
$title = _("Users");
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", $title => "");
echo HTML::breadcrumb($links, "icon icon_user");
unset($links);
$legend = _("Create New User");
if (empty($userArray)) {
    $content = _("There no more users to create. You must create more staff members first.");
} else {
    $content = Form::label("id_member_login", _("Select a login to create a new user") . ": ");
    $content .= Form::select("id_member_login", $userArray);
    $tfoot = array(Form::button("new", _("Create")) . Form::generateToken());
}
$tbody = array($content);
/**
 * New user form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../admin/user_new_form.php'));
echo Form::fieldset($legend, $tbody, isset($tfoot) ? $tfoot : null, array('id' => 'new_user'));
echo HTML::end('form');
echo HTML::section(2, _("Users List:"));
if (!$userQ->select()) {
    $userQ->close();
    echo Msg::info(_("No results found."));
    include_once "../layout/footer.php";
    exit;
}
$tbody[] = array($row);
$row = '* ' . Form::text("search_text", null, array('size' => 40, 'maxlength' => 80));
$row .= Form::button("search_patient", _("Search"));
$tbody[] = array($row);
$row = Form::label("logical", _("Logical") . ': ');
$array = null;
$array[OPEN_OR] = "OR";
$array[OPEN_NOT] = "NOT";
$array[OPEN_AND] = "AND";
// it makes sense in fields with two or more words
$row .= Form::select("logical", $array, OPEN_OR);
unset($array);
$row .= OPEN_SEPARATOR;
$row .= Form::label("limit", _("Limit") . ': ');
$array = null;
$array["0"] = _("All");
$array["10"] = 10;
$array["20"] = 20;
$array["50"] = 50;
$array["100"] = 100;
$row .= Form::select("limit", $array);
unset($array);
if (isset($tokenForm)) {
    $row .= $tokenForm;
} else {
    $row .= Form::generateToken();
}
$row .= Form::hidden("page", 1);
$tbody[] = explode(OPEN_SEPARATOR, $row);
$options = array(0 => array('align' => 'center'), 1 => array('align' => 'center'), 'r0' => array('colspan' => 2), 'r1' => array('colspan' => 2), 'shaded' => false, 'align' => 'center');
echo HTML::table($thead, $tbody, null, $options);
Example #8
0
        session_destroy();
        echo Msg::info(_("File installed correctly."));
        echo HTML::para(HTML::link(_("Go to OpenClinic"), '../home/index.php'));
        echo HTML::rule();
    }
}
/**
 * In Mozilla there no path file, only name and extension. Why? Is it an error?
 */
if (isset($_POST['view_file']) && !empty($_FILES['sql_file']['name']) && $_FILES['sql_file']['size'] > 0) {
    $sqlQuery = file_get_contents($_FILES['sql_file']['tmp_name']);
    //$sqlQuery = Check::safeText($sqlQuery, false);
    echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF']));
    $body = array();
    $body[] = Form::textArea("sql_query", $sqlQuery, array('rows' => 15, 'cols' => 75, 'readonly' => true));
    $foot = array(Form::button("install_file", _("Install file")) . Form::generateToken());
    echo Form::fieldset(_("Install file"), $body, $foot);
    echo HTML::end('form');
    echo HTML::para(HTML::link(_("Cancel"), './index.php'));
    include_once "../layout/footer.php";
    exit;
}
// end if
require_once "../model/Query.php";
$installQ = new Query();
$installQ->captureError(true);
if ($installQ->isError()) {
    echo HTML::para(_("The connection to the database failed with the following error:"));
    echo Msg::error($installQ->getDbError());
    echo HTML::rule();
    echo HTML::para(_("Please make sure the following has been done before running this install script."));
/**
 * history_family_fields.php
 *
 * Fields of family antecedents
 *
 * Licensed under the GNU GPL. For full terms see the file LICENSE.
 *
 * @package   OpenClinic
 * @copyright 2002-2008 jact
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @version   CVS: $Id: history_family_fields.php,v 1.20 2008/03/23 12:00:17 jact Exp $
 * @author    jact <*****@*****.**>
 */
require_once dirname(__FILE__) . "/../lib/exe_protect.php";
executionProtection(__FILE__);
$tbody = array();
$row = Form::label("parents_status_health", _("Parents Status Health") . ":");
$row .= Form::textArea("parents_status_health", $formVar["parents_status_health"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("brothers_status_health", _("Brothers and Sisters Status Health") . ":");
$row .= Form::textArea("brothers_status_health", $formVar["brothers_status_health"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("spouse_childs_status_health", _("Spouse and Childs Status Health") . ":");
$row .= Form::textArea("spouse_childs_status_health", $formVar["spouse_childs_status_health"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("family_illness", _("Family Illness") . ":");
$row .= Form::textArea("family_illness", $formVar["family_illness"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$tfoot = array(Form::button("update", _("Update")) . Form::generateToken());
$options = array('class' => 'large_area');
echo Form::fieldset($title, $tbody, $tfoot, $options);
/**
 * Show page
 */
$title = _("Search Patient");
$focusFormField = "search_text";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
$headerWording2 = _("Search Patient by Medical Problem");
$returnLocation = "../medical/index.php";
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_search");
unset($links);
$tokenForm = Form::generateToken();
// for 2 forms (patient, problem)
/**
 * Patient search form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/patient_search.php'));
require_once "../medical/patient_search_fields.php";
echo HTML::end('form');
echo HTML::rule();
/**
 * Problem search form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/problem_search.php'));
require_once "../medical/problem_search_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: Empty search to see all results."));
Example #11
0
if (!isset($_COOKIE[session_name()])) {
    echo Msg::error(_("You must have cookies enabled to access your account."));
}
/**
 * Warning message if loginAttempts == (OPEN_MAX_LOGIN_ATTEMPTS - 1)
 */
if (OPEN_MAX_LOGIN_ATTEMPTS && isset($_SESSION['auth']['login_attempts']) && $_SESSION['auth']['login_attempts'] == OPEN_MAX_LOGIN_ATTEMPTS - 1) {
    echo Msg::warning(_("Last attempt to type correct password before suspend this user account."));
}
/**
 * Login form
 */
echo HTML::start('form', array('id' => 'loginForm', 'method' => 'post', 'action' => '../auth/login.php'));
$tbody = array();
$row = Form::hidden("md5_session");
$tbody[] = $row;
$row = Form::label("login_session", _("Login") . ":");
$row .= Form::text("login_session", isset($formVar["login_session"]) ? $formVar["login_session"] : null, array('size' => 20, 'error' => isset($formError["login_session"]) ? $formError["login_session"] : null));
$tbody[] = $row;
$row = Form::label("pwd_session", _("Password") . ":");
$row .= Form::password("pwd_session", isset($formVar["pwd_session"]) ? $formVar["pwd_session"] : null, array('size' => 20, 'error' => isset($formError["pwd_session"]) ? $formError["pwd_session"] : null));
$tbody[] = $row;
$tfoot = array(Form::button("login", _("Enter")) . Form::generateToken());
echo Form::fieldset($title, $tbody, $tfoot);
echo HTML::end('form');
/**
 * Destroy form values and errors
 */
Form::unsetSession();
//Error::debug($_SESSION, "session variables", true);
require_once "../layout/footer.php";
$tbody[] = $row;
$row = Form::label("feed", _("Horários de atendimento do beneficiário") . ":");
$row .= Form::textArea("feed", $formVar["feed"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("habits", _("Hábitos pessoais") . ":");
$row .= Form::textArea("habits", $formVar["habits"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("peristaltic_conditions", _("Condições periostálticas e/ou alimentares") . ":");
$row .= Form::textArea("peristaltic_conditions", $formVar["peristaltic_conditions"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("psychological", _("Condições psicológicas") . ":");
$row .= Form::textArea("psychological", $formVar["psychological"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("children_complaint", _("Queixas gerais (dores, tratamento familiar, etc.)") . ":");
$row .= Form::textArea("children_complaint", $formVar["children_complaint"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("venereal_disease", _("Está com alguma doença crônica ou venéria? Se sim, quais?") . ":");
$row .= Form::textArea("venereal_disease", $formVar["venereal_disease"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("accident_surgical_operation", _("Passou por sirurgia ou sofreu algum acidente? Caso sim, quais?") . ":");
$row .= Form::textArea("accident_surgical_operation", $formVar["accident_surgical_operation"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("medicinal_intolerance", _("Possui intolerância a medicamentos? Se sim, quais?") . ":");
$row .= Form::textArea("medicinal_intolerance", $formVar["medicinal_intolerance"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$row = Form::label("mental_illness", _("Possui alguma doença mental? Se sim, qual?") . ":");
$row .= Form::textArea("mental_illness", $formVar["mental_illness"], array('rows' => 4, 'cols' => 90));
$tbody[] = $row;
$tfoot = array(Form::button("update", _("Atualizar dados")) . Form::generateToken());
$options = array('class' => 'large_area');
echo Form::fieldset($title, $tbody, $tfoot, $options);
Example #13
0
echo HTML::para(HTML::link(_("Install dump from file"), '../install/index.php') . ' | ' . HTML::link(_("Optimize Database"), '../admin/dump_optimize_db.php'));
if ($numTables < 1) {
    // @todo message
    require_once "../layout/footer.php";
    exit;
}
echo HTML::insertScript('dump_functions.js');
echo HTML::start('form', array('method' => 'post', 'action' => './dump_process.php'));
$i = 0;
$table = null;
while ($i < $numTables) {
    DUMP_MYSQL_INT_VERSION >= 32303 ? $table[$tables[$i]['Name']] = $tables[$i]['Name'] : ($table[$tables[$i]] = $tables[$i]);
    $i++;
}
$fieldArray = array(Form::select("table_select", $table, null, array('size' => 15)));
unset($table);
$fieldFoot = array(HTML::link(_("Select all"), '#', null, array('id' => 'select_all')) . ' / ' . HTML::link(_("Unselect all"), '#', null, array('id' => 'unselect_all')));
echo Form::fieldset(_("View dump of database"), $fieldArray, $fieldFoot, array('id' => 'dump_tables'));
$fieldArray = null;
$fieldArray[] = Form::radioButton("what", "data", array('id' => 'radio_dump_data', 'checked' => true)) . Form::label("radio_dump_data", _("Structure and data"));
$fieldArray[] = Form::radioButton("what", "structure", array('id' => 'radio_dump_structure')) . Form::label("radio_dump_structure", _("Structure only"));
$fieldArray[] = Form::radioButton("what", "dataonly", array('id' => 'radio_dump_dataonly')) . Form::label("radio_dump_dataonly", _("Data only"));
$fieldArray[] = Form::radioButton("what", "xml", array('id' => 'radio_dump_xml')) . Form::label("radio_dump_xml", _("Export to XML format"));
$fieldArray[] = Form::radioButton("what", "excel", array('id' => 'radio_dump_csv')) . Form::label("radio_dump_csv", _("Export to CSV format (data only)"));
echo Form::fieldset(_("Options"), $fieldArray, null, array('id' => 'dump_options'));
$fieldArray = array(Form::checkBox("drop", "yes") . Form::label("drop", _("Add 'DROP TABLE'")), Form::checkBox("show_columns", "yes") . Form::label("show_columns", _("Complete 'INSERTs'")), Form::checkBox("extended_inserts", "yes") . Form::label("extended_inserts", _("Extended 'INSERTs'")), Form::checkBox("use_backquotes", "yes") . Form::label("use_backquotes", _("Enclose table and field names with backquotes")), Form::checkBox("add_delete", "yes") . Form::label("add_delete", _("Add 'DELETE * FROM __table__'")), Form::checkBox("use_dbname", "yes") . Form::label("use_dbname", _("Add 'USE __dbname__'")), Form::checkBox("create_db", "yes") . Form::label("create_db", _("Add 'CREATE DATABASE __dbname__'")), Form::checkBox("as_file", "sendit") . Form::label("as_file", _("Save as file")));
echo Form::fieldset(_("Extended options"), $fieldArray, null, array('id' => 'dump_extended'));
echo HTML::para(Form::button("dump", _("Submit")) . Form::generateToken(), array('class' => 'center'));
echo HTML::end('form');
echo Msg::hint(_("Note: Some check options are exclusive. Be carefully!"));
require_once "../layout/footer.php";
Example #14
0
}
if ($logical == OPEN_NOT) {
    $query .= " NOT ";
}
$query .= $word[$num - 1] . ")";
echo HTML::insertScript('checkboxes.js');
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/relative_new.php'));
echo Form::hidden("id_patient", $idPatient, array('id' => 'r_id_patient'));
$thead = array(sprintf(_("Search Results From Query: %s"), $query) => array('colspan' => 2));
$options = array(0 => array('align' => 'right'));
$tbody = array();
while ($pat = $patQ->fetch()) {
    $row = $patQ->getCurrentRow() . '.';
    $row .= Form::checkBox("check[]", $pat->getIdPatient(), array('id' => String::numberToAlphabet($patQ->getCurrentRow())));
    $row .= OPEN_SEPARATOR;
    $row .= $pat->getSurname1() . ' ' . $pat->getSurname2() . ' ' . $pat->getFirstName();
    if ($val != "") {
        $row .= "<br />" . $key . " ";
        eval("\$row .= {$val};");
    }
    $tbody[] = explode(OPEN_SEPARATOR, $row);
}
// end while
$patQ->freeResult();
$patQ->close();
unset($patQ);
$tfoot = array(0 => HTML::link(_("Select all"), '#', null, array('id' => 'select_all_checks')) . ' / ' . HTML::link(_("Unselect all"), '#', null, array('id' => 'unselect_all_checks')), 1 => Form::button("add", _("Add selected to Relatives List")) . Form::generateToken());
echo HTML::table($thead, $tbody, $tfoot, $options);
echo HTML::end('form');
echo $pageLinks;
require_once "../layout/footer.php";
Example #15
0
<?php

/**
 * theme_fields.php
 *
 * Fields of theme data
 *
 * Licensed under the GNU GPL. For full terms see the file LICENSE.
 *
 * @package   OpenClinic
 * @copyright 2002-2008 jact
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @version   CVS: $Id: theme_fields.php,v 1.21 2008/03/23 11:58:57 jact Exp $
 * @author    jact <*****@*****.**>
 */
require_once dirname(__FILE__) . "/../lib/exe_protect.php";
executionProtection(__FILE__);
$tbody = array();
$row = Form::label("theme_name", _("Theme Name") . ":", array('class' => 'required'));
$row .= Form::text("theme_name", isset($formVar["theme_name"]) ? $formVar["theme_name"] : null, array('size' => 50, 'error' => isset($formError["theme_name"]) ? $formError["theme_name"] : null));
$tbody[] = $row;
$row = Form::label("css_file", _("CSS File") . ":", array('class' => 'required'));
$row .= Form::text("css_file", isset($formVar["css_file"]) ? $formVar["css_file"] : null, array('size' => 50, 'error' => isset($formError["css_file"]) ? $formError["css_file"] : null));
$tbody[] = $row;
$row = Form::label("css_rules", _("CSS Rules") . ":", array('class' => 'required'));
$row .= Form::textArea("css_rules", isset($formVar["css_rules"]) ? $formVar["css_rules"] : null, array('rows' => 25, 'cols' => 80, 'error' => isset($formError["css_rules"]) ? $formError["css_rules"] : null));
$tbody[] = $row;
$tfoot = array(Form::button("save", _("Submit"), array('type' => 'button', 'onclick' => 'editTheme();')) . Form::generateToken());
$options = array('class' => 'large_area');
echo Form::fieldset($title, $tbody, $tfoot, $options);
    $problemQ->close();
    echo Msg::info(_("No medical problems defined for this patient."));
    include_once "../layout/footer.php";
    exit;
}
echo HTML::section(2, _("Medical Problems List:"));
/**
 * New form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/connection_new.php'));
echo Form::hidden("id_problem", $idProblem);
echo Form::hidden("id_patient", $idPatient);
$thead = array(_("Order Number"), _("Wording"));
$tbody = array();
while ($problem = $problemQ->fetch()) {
    $row = $problem->getOrderNumber() . '.';
    $row .= Form::checkBox("check[]", $problem->getIdProblem(), array('id' => String::numberToAlphabet($problem->getOrderNumber())));
    $row .= OPEN_SEPARATOR;
    $row .= $problem->getWording();
    $tbody[] = explode(OPEN_SEPARATOR, $row);
}
// end while
$problemQ->freeResult();
$problemQ->close();
unset($problemQ);
unset($problem);
$tfoot = array(Form::button("add", _("Add selected to Connection Problems List")) . Form::generateToken());
$options = array(0 => array('align' => 'right'), 'tfoot' => array('align' => 'center'));
echo HTML::table($thead, $tbody, $tfoot, $options);
echo HTML::end('form');
require_once "../layout/footer.php";