Esempio n. 1
0
 * Show page
 */
$title = _("Add New User");
$focusFormField = "pwd";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", _("Users") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_user");
unset($links);
echo Form::errorMsg();
/**
 * Edit form
 */
echo HTML::start('form', array('id' => 'userNew', 'method' => 'post', 'action' => '../admin/user_new.php'));
echo Form::hidden("referer", "new");
// to user_validate_post.php
echo Form::hidden("id_member", $formVar["id_member"]);
echo Form::hidden("login", $formVar["login"]);
$action = "new";
require_once "../admin/user_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The fields with * are required."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 2
0
        $typeValue = OPEN_ADMINISTRATIVE;
        break;
    case "d":
        $title = _("Add New Doctor Information");
        $typeValue = OPEN_DOCTOR;
        break;
}
$focusFormField = "nif";
// to avoid JavaScript mistakes in demo version
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);
echo Form::errorMsg();
/**
 * New form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../admin/staff_new.php?type=' . $memberType));
echo Form::hidden("member_type", $typeValue);
require_once "../admin/staff_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The fields with * are required."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 3
0
  document.forms[0].action = "../admin/theme_preview.php";
  document.forms[0].target = "secondary";
  document.forms[0].submit();
}

function editTheme()
{
  document.forms[0].action = "../admin/theme_new.php";
  document.forms[0].target = "";
  document.forms[0].submit();
}
/*]]>*///-->
</script>

<?php 
echo HTML::para(HTML::link(_("Preview Theme"), '#', null, array('onclick' => 'previewTheme(); return false;')) . ' | ' . HTML::link(_("Preload CSS file"), '../admin/theme_preload_css.php', isset($idTheme) ? array('id_theme' => $idTheme, 'copy' => 'Y') : null));
echo HTML::rule();
echo Form::errorMsg();
/**
 * New form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../admin/theme_new.php'));
require_once "../admin/theme_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The fields with * are required."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 4
0
    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";
Esempio n. 5
0
if (isset($isMd5) && $isMd5) {
    echo HTML::insertScript('md5.js');
    echo HTML::insertScript('password.php');
}
if (isset($focusFormField) && !empty($focusFormField)) {
    echo HTML::start('script', array('src' => '../js/focus.php?field=' . $focusFormField, 'type' => 'text/javascript'));
    echo HTML::end('script');
}
echo HTML::end('head');
echo HTML::start('body');
require_once "../layout/component.php";
echo HTML::start('div', array('id' => 'wrap'));
echo HTML::start('div', array('id' => 'header'));
echo appLogo();
echo HTML::para(HTML::link(_("Skip over navigation"), '#main', null, array('accesskey' => 2)), array('id' => 'skip_navigation'));
echo shortcuts(isset($tab) ? $tab : null, isset($nav) ? $nav : null);
if (isset($tab)) {
    echo menuBar($tab);
}
echo HTML::end('div');
// #header
echo HTML::rule();
echo HTML::start('div', array('id' => 'main'));
echo HTML::start('div', array('id' => 'content'));
if (defined("OPEN_DEMO") && OPEN_DEMO) {
    echo Msg::info(_("This is a demo version"));
}
/**
 * Display "public" message(s) from controller if available
 */
echo FlashMsg::get();
Esempio n. 6
0
$title = _("Editar Atendimento");
$titlePage = $patient->getName() . ' [' . $problem->getWordingPreview() . '] (' . $title . ')';
$focusFormField = "wording";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
//$returnLocation = "../medical/problem_view.php?id_problem=" . $idProblem . "&id_patient=" . $idPatient;
$returnLocation = "../medical/problem_view.php";
/**
 * Breadcrumb
 */
$links = array(_("Registro do Atendimento") => "../medical/index.php", $patient->getName() => "../medical/problem_view.php", _("Outras informações") => "../medical/problem_list.php", $problem->getWordingPreview() => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo $patient->getHeader();
echo Form::errorMsg();
/**
 * Edit form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/problem_edit.php'));
echo Form::hidden("id_problem", $formVar["id_problem"]);
echo Form::hidden("last_update_date", $formVar["last_update_date"]);
echo Form::hidden("id_patient", $formVar["id_patient"]);
require_once "../medical/problem_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Importante: Os campos com * são obrigatórios."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 7
0
    defined("OPEN_ENCODING") && OPEN_ENCODING == "UTF-8" ? ob_start("_convert2Utf8") : ob_start();
}
if (strpos($_contentType, "application/xhtml+xml") !== false) {
    // To prevent 'short_open_tag = On' mistake
    echo '<?xml version="1.0" encoding="' . OPEN_ENCODING . '" standalone="no" ?>' . PHP_EOL;
}
echo '<!DOCTYPE html PUBLIC "' . $_docType . '">' . PHP_EOL;
echo HTML::start('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', 'xml:lang' => str_replace("_", "-", OPEN_LANGUAGE), 'dir' => OPEN_DIRECTION));
echo HTML::start('head');
echo HTML::start('meta', array('http-equiv' => 'Content-Type', 'content' => $_contentType), true);
$_titlePage = isset($titlePage) ? $titlePage : (isset($title) && !empty($title) ? $title : "");
/**
 * @since 0.8
 */
$_titlePage .= isset($formError) && count($formError) > 0 && isset($focusFormField) ? " : " . _("Error occurred") : "";
if (defined("OPEN_CLINIC_NAME") && OPEN_CLINIC_NAME) {
    $_titlePage .= ' : ' . OPEN_CLINIC_NAME;
}
echo HTML::tag('title', $_titlePage);
//echo HTML::start('meta', array('http-equiv' => 'Content-Style-Type', 'content' => 'text/css2'), true);
echo HTML::start('meta', array('http-equiv' => 'Cache-Control', 'content' => 'no-store,no-cache,must-revalidate'), true);
echo HTML::start('meta', array('http-equiv' => 'Pragma', 'content' => 'no-cache'), true);
echo HTML::start('meta', array('http-equiv' => 'Expires', 'content' => '-1'), true);
echo HTML::start('meta', array('http-equiv' => 'imagetoolbar', 'content' => 'no'), true);
echo HTML::start('meta', array('name' => 'robots', 'content' => 'noindex,nofollow,noarchive'), true);
echo HTML::start('meta', array('name' => 'MSSmartTagsPreventParsing', 'content' => 'TRUE'), true);
echo HTML::start('meta', array('name' => 'author', 'content' => 'Jose Antonio Chavarría'), true);
echo HTML::start('meta', array('name' => 'copyright', 'content' => '2002-' . date("Y") . ' Jose Antonio Chavarría'), true);
echo HTML::start('meta', array('name' => 'keywords', 'content' => 'OpenClinic, open source, gpl, healthcare, php, mysql, coresis'), true);
echo HTML::start('meta', array('name' => 'description', 'content' => 'OpenClinic is an easy to use, open source, medical records system written in PHP'), true);
Esempio n. 8
0
/**
 * void _showButton(string $name, string $value, string $type = "next")
 *
 * Draws button html tag of type submit.
 *
 * @param string $name name of input field
 * @param string $value button value
 * @param string $type (optional) values: "next" (default), "back"
 * @return void
 * @access private
 * @todo helper that returns string (not echo)
 */
function _showButton($name, $value, $type = "next")
{
    $_html = HTML::start('button', array('id' => $name, 'name' => $name, 'type' => 'submit', 'class' => $type, 'onclick' => 'document.forms[0].buttonPressed.value=\'' . $name . '\';'));
    if ($type == "next") {
        $_html .= HTML::tag('span', $value);
        $_html .= HTML::image('../img/arrow_right.png', $value, array('width' => 22, 'height' => 22));
    } elseif ($type == "back") {
        $_html .= HTML::image('../img/arrow_left.png', $value, array('width' => 22, 'height' => 22));
        $_html .= HTML::tag('span', $value);
    }
    $_html .= HTML::end('button');
    echo $_html;
}
Esempio n. 9
0
// #main
echo HTML::rule();
echo HTML::start('div', array('id' => 'navigation'));
if (isset($tab) && is_file('../layout/' . $tab . '.php')) {
    include_once "../layout/" . $tab . ".php";
    // ul
}
echo clinicInfo();
echo HTML::end('div');
// #navigation
echo HTML::rule();
echo HTML::start('div', array('id' => 'footer'));
echo logos();
echo sfLinks();
echo miniLogos();
echo HTML::start('div', array('id' => 'app_info'));
$text = HTML::link(_("Powered by OpenClinic"), 'http://openclinic.sourceforge.net/');
if (defined("OPEN_VERSION")) {
    $text .= ' ' . _("version") . ' ' . OPEN_VERSION;
}
echo HTML::para($text);
echo HTML::para(sprintf('Copyright &copy; 2002-%d %s', date("Y"), HTML::link('Jose Antonio Chavarría', 'mailto:CUT-THIS.openclinic&#64;gmail.com', null, array('accesskey' => 9))));
echo HTML::para(sprintf(_("Under the %s"), HTML::link('GNU General Public License', '../home/license.php', null, array('rel' => 'license'))));
if (defined("OPEN_DEMO") && OPEN_DEMO) {
    echo Msg::info(_("This is a demo version"));
}
/**
 * End server page generation time
 */
if (defined("OPEN_DEBUG") && OPEN_DEBUG) {
    $microTime = explode(" ", microtime());
Esempio n. 10
0
require_once "../lib/Msg.php";
// include HTML.php
/**
 * Retrieving get var
 */
$_file = $_GET['file'];
/**
 * XHTML Start (XML prolog, DOCTYPE, title page and meta data)
 */
$title = sprintf(_("Source file: %s"), $_file);
require_once "../layout/xhtml_start.php";
echo HTML::start('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => '../css/style.css'), true);
echo HTML::end('head');
$array['id'] = 'viewSource';
if (count($_GET) == 0 || empty($_file)) {
    $array['onload'] = 'window.close();';
}
echo HTML::start('body', $array);
if (isset($_SESSION['auth']['is_admin'])) {
    if (is_file($_file)) {
        highlight_file($_file);
    } else {
        echo Msg::error(_("No file found."));
        echo HTML::para(HTML::link(_("Close Window"), '#', null, array('onclick' => 'window.close(); return false;')));
    }
} else {
    echo Msg::warning(sprintf(_("You are not authorized to use %s tab."), _("Admin")));
    // maybe change
}
echo HTML::end('body');
echo HTML::end('html');
Esempio n. 11
0
$title = _("Dumps");
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", $title => "");
echo HTML::breadcrumb($links, "icon icon_dump");
unset($links);
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"));
Esempio n. 12
0
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
if (!isset($_GET["all"])) {
    $links = array(_("Admin") => "../admin/index.php", _("Users") => $returnLocation, $title => "");
} else {
    $links = array(_("Home") => $returnLocation, $title => "");
}
echo HTML::breadcrumb($links, "icon icon_user");
unset($links);
echo Form::errorMsg();
/**
 * Edit form
 */
echo HTML::start('form', array('id' => 'userEdit', 'method' => 'post', 'action' => '../admin/user_edit.php'));
echo Form::hidden("referer", "edit");
// to user_validate_post.php
echo Form::hidden("id_user", $formVar["id_user"]);
echo Form::hidden("id_member", $formVar["id_member"]);
if (isset($_GET["all"])) {
    echo Form::hidden("all", "Y");
}
$action = "edit";
require_once "../admin/user_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The fields with * are required."));
if (isset($_GET["all"])) {
    echo Msg::hint(_("Fill password fields only if you want to change it."));
}
echo HTML::para(HTML::link(_("Return"), $returnLocation));
Esempio n. 13
0
 * Send headers depending on whether the user choosen to download a dump file or not
 */
// No download
if (empty($_POST['as_file'])) {
    /**
     * Show page
     */
    $title = _("Dump result");
    include_once "../layout/header.php";
    /**
     * Breadcrumb
     */
    $links = array(_("Admin") => "../admin/index.php", _("Dumps") => "../admin/dump_view_form.php", $title => "");
    echo HTML::breadcrumb($links, "icon icon_dump");
    unset($links);
    echo HTML::start('pre', array('width' => 80, 'class' => 'sqlcode'));
} else {
    // Defines filename and extension, and also mime types
    if (count($_POST['table_select']) != 1) {
        $filename = OPEN_DATABASE;
    } else {
        $filename = $_POST['table_select'][0];
    }
    $filename .= "-" . OPEN_VERSION . date("_Y-m-d_H-i-s");
    if ($_POST['what'] == 'csv' || $_POST['what'] == 'excel') {
        $ext = 'csv';
        $mimeType = 'text/x-csv';
    } elseif ($_POST['what'] == 'xml') {
        $ext = 'xml';
        $mimeType = 'text/xml';
    } else {
require_once "../layout/header.php";
//$returnLocation = "../medical/connection_list.php?id_problem=" . $idProblem . "&id_patient=" . $idPatient; // controlling var
$returnLocation = "../medical/connection_list.php";
// controlling var
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", _("Medical Problems Report") => "../medical/problem_list.php", $problem->getWordingPreview() => "../medical/problem_view.php", _("View Connection Problems") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo $patient->getHeader();
echo $problem->getHeader();
/**
 * Form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/connection_del.php'));
$tbody = array();
$problem = new Problem($idConnection);
$wording = $problem->getWordingPreview();
$tbody[] = Msg::warning(sprintf(_("Are you sure you want to delete connection, %s, from list?"), $wording));
$row = Form::hidden("id_problem", $idProblem);
$row .= Form::hidden("id_connection", $idConnection);
$row .= Form::hidden("id_patient", $idPatient);
$row .= Form::hidden("wording", $wording);
$tbody[] = $row;
$tfoot = array(Form::button("delete", _("Delete")) . Form::generateToken());
$options = array('class' => 'center');
echo Form::fieldset($title, $tbody, $tfoot, $options);
echo HTML::end('form');
echo HTML::para(HTML::link(_("Return"), $returnLocation));
require_once "../layout/footer.php";
Esempio n. 15
0
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
// after clean form vars
//$formVar["last_update_date"] = date("d-m-Y"); //date("Y-m-d");
/**
 * Show page
 */
$title = _("Adicionar novo");
$focusFormField = "nif";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Dados clínicos") => $returnLocation, _("Adicionar novo beneficiário") => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo Form::errorMsg();
/**
 * New form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/patient_new.php'));
//echo Form::hidden("last_update_date", $formVar['last_update_date']);
require_once "../medical/patient_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Nota: Os campos com * são obrigatórios."));
echo HTML::para(HTML::link(_("Return"), $returnLocation));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 16
0
 * @copyright 2002-2008 jact
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @version   CVS: $Id: footer.php,v 1.10 2008/03/23 11:59:38 jact Exp $
 * @author    jact <*****@*****.**>
 */
require_once dirname(__FILE__) . "/../lib/exe_protect.php";
executionProtection(__FILE__);
require_once "../lib/Msg.php";
//Error::debug($_SESSION);
//Error::debug($_SERVER);
echo HTML::end('div');
// #content
echo HTML::end('div');
// #main
echo HTML::rule();
echo HTML::start('div', array('id' => 'navigation'));
if (isset($tab) && is_file('../layout/' . $tab . '.php')) {
    include_once "../layout/" . $tab . ".php";
    // ul
}
echo clinicInfo();
echo HTML::end('div');
// #navigation
/*
  echo HTML::rule();

  echo HTML::start('div', array('id' => 'footer'));

  echo logos();
  echo sfLinks();
  echo miniLogos();
 */
$title = _("Delete Relative from list");
$titlePage = $patient->getName() . ' (' . $title . ')';
require_once "../layout/header.php";
//$returnLocation = "../medical/relative_list.php?id_patient=" . $idPatient; // controlling var
$returnLocation = "../medical/relative_list.php";
// controlling var
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", _("View Relatives") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo $patient->getHeader();
/**
 * Confirm form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/relative_del.php'));
$tbody = array();
$relative = new Patient($idRelative);
$tbody[] = Msg::warning(sprintf(_("Are you sure you want to delete relative, %s, from list?"), $relative->getName()));
$row = Form::hidden("id_patient", $idPatient);
$row .= Form::hidden("id_relative", $idRelative);
$row .= Form::hidden("name", $relative->getName());
$tbody[] = $row;
$tfoot = array(Form::button("delete", _("Delete")) . Form::generateToken());
$options = array('class' => 'center');
echo Form::fieldset($title, $tbody, $tfoot, $options);
echo HTML::end('form');
echo HTML::para(HTML::link(_("Return"), $returnLocation));
require_once "../layout/footer.php";
Esempio n. 18
0
 /**
  * string getHeader(void)
  *
  * Returns a header with medical problem information
  *
  * @return string
  * @access public
  * @since 0.8
  */
 function getHeader()
 {
     $_html = HTML::start('div', array('id' => 'problem_header', 'class' => 'clearfix'));
     $_html .= HTML::para(_("Wording") . ': ' . $this->getWordingPreview());
     $_html .= HTML::para(_("Opening Date") . ': ' . I18n::localDate($this->getOpeningDate()), array('class' => 'right'));
     $_html .= HTML::para(_("Last Update Date") . ': ' . I18n::localDate($this->getLastUpdateDate()), array('class' => 'right'));
     $_html .= HTML::end('div');
     return $_html;
 }
Esempio n. 19
0
 /**
  * string getHeader(void)
  *
  * Returns a header with patient information
  *
  * @return string
  * @access public
  * @since 0.8
  */
 public function getHeader()
 {
     $_html = HTML::start('div', array('id' => 'patient_header', 'class' => 'clearfix'));
     $_html .= HTML::para(_("Paciente") . ': <b>' . $this->getName()) . "</b>";
     $_html .= HTML::para(_("Sexo") . ': ' . ($this->getSex() == 'V' ? _("Male") : _("Female")));
     $_html .= HTML::para(_("Idade") . ': ' . $this->getAge(), array('class' => 'right'));
     $_html .= HTML::end('div');
     return $_html;
 }
Esempio n. 20
0
    $setQ->close();
    unset($setQ);
    unset($set);
}
/**
 * Show page
 */
$title = _("Config settings");
$focusFormField = "session_timeout";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", $title => "");
echo HTML::breadcrumb($links, "icon icon_config");
unset($links);
echo Form::errorMsg();
/**
 * Edit form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../admin/setting_edit.php'));
require_once "../admin/setting_fields.php";
echo HTML::end('form');
echo Msg::hint('* ' . _("Note: The fields with * are required."));
echo Msg::hint('** ' . _("Note: If zero, searchs return all results without pagination."));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 21
0
/**
 * string clinicInfo(void)
 *
 * @return string div#clinic_info (microformat hCard)
 * @access public
 * @see OPEN_CLINIC_NAME
 * @see OPEN_CLINIC_URL
 * @see OPEN_CLINIC_HOURS
 * @see OPEN_CLINIC_ADDRESS
 * @see OPEN_CLINIC_PHONE
 */
function clinicInfo()
{
    if (!defined("OPEN_CLINIC_NAME") || !OPEN_CLINIC_NAME) {
        return;
    }
    $_html = HTML::start('div', array('id' => 'clinic_info', 'class' => 'vcard contact'));
    $_name = OPEN_CLINIC_NAME;
    if (defined("OPEN_CLINIC_URL") && OPEN_CLINIC_URL) {
        $_name = HTML::link($_name, OPEN_CLINIC_URL, null, array('class' => 'url'));
    }
    $_html .= HTML::para($_name, array('class' => 'fn org'));
    if (defined("OPEN_CLINIC_HOURS") && OPEN_CLINIC_HOURS) {
        $_html .= HTML::para(sprintf(_("Clinic hours: %s"), OPEN_CLINIC_HOURS));
    }
    if (defined("OPEN_CLINIC_ADDRESS") && OPEN_CLINIC_ADDRESS || defined("OPEN_CLINIC_PHONE") && OPEN_CLINIC_PHONE) {
        $_html .= HTML::start('address', array('class' => 'adr'));
        if (defined("OPEN_CLINIC_ADDRESS") && OPEN_CLINIC_ADDRESS) {
            $_html .= HTML::para(sprintf(_("Clinic address: %s"), HTML::tag('span', OPEN_CLINIC_ADDRESS, array('class' => 'street-address'))));
        }
        if (defined("OPEN_CLINIC_PHONE") && OPEN_CLINIC_PHONE) {
            $_html .= HTML::para(sprintf(_("Clinic phone: %s"), HTML::tag('span', OPEN_CLINIC_PHONE, array('class' => 'tel value'))));
        }
        $_html .= HTML::end('address');
    }
    $_html .= HTML::end('div');
    return $_html;
}
Esempio n. 22
0
/**
 * Cookies disabled?
 */
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
 */
Esempio n. 23
0
$setQ->select();
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) {
Esempio n. 24
0
 /**
  * string errorMsg(void)
  *
  * Returns message of form errors if it is necessary
  *
  * @return string
  * @access public
  * @static
  */
 public static function errorMsg()
 {
     $_formSession = self::getSession();
     if (isset($_formSession['error']) && count($_formSession['error']) > 0) {
         $_html = HTML::start('div', array('class' => 'error'));
         $_html .= HTML::para(_("ERROR: Some fields have been incorrectly filled. Please fix the fields and send the form again. Each incorrectly filled field is marked with specific error message."));
         $_array = null;
         foreach ($_formSession['error'] as $_key => $_value) {
             if ($_value) {
                 $_array[] = self::label($_key, $_value);
             }
         }
         if (is_array($_array)) {
             $_html .= HTML::itemList($_array);
         }
         $_html .= HTML::end('div');
         return $_html;
     }
 }
    if ($problem->getActionPlan()) {
        echo HTML::section(3, _("Action Plan"));
        echo HTML::para(nl2br($problem->getActionPlan()));
    }
    if ($problem->getPrescription()) {
        echo HTML::section(3, _("Prescription"));
        echo HTML::para(nl2br($problem->getPrescription()));
    }
    echo HTML::rule();
}
// end while
$problemQ->freeResult();
$problemQ->close();
unset($problemQ);
unset($problem);
/**
 * Do print the page
 */
echo HTML::start('script', array('type' => 'text/javascript'));
echo "\n<!--/*--><![CDATA[/*<!--*/\n";
echo 'if (typeof(window.print) != "undefined")' . "\n";
echo "{\n";
echo '  window.print();' . "\n";
echo "}\n";
echo "/*]]>*///-->\n";
echo HTML::end('script');
/**
 * Show footer page
 */
echo HTML::end('body');
echo HTML::end('html');
Esempio n. 26
0
    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."));
    $array = array(sprintf(_("Create OpenClinic database (%s of the install instructions)"), HTML::link(sprintf(_("step %d"), 4), '../install.html#step4')), sprintf(_("Create OpenClinic database user (%s of the install instructions)"), HTML::link(sprintf(_("step %d"), 5), '../install.html#step5')), sprintf(_("Update %s with your new database username and password (%s of the install instructions)"), HTML::tag('strong', 'openclinic/config/database_constants.php'), HTML::link(sprintf(_("step %d"), 8), '../install.html#step8')));
    echo HTML::itemList($array, null, true);
    echo HTML::para(sprintf(_("See %s for more details."), HTML::link(_("Install Instructions"), '../install.html')));
    include_once "../layout/footer.php";
    exit;
}
// end if
$installQ->close();
echo Msg::info(_("Database connection is good."));
echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF'], 'enctype' => 'multipart/form-data'));
$body = array();
$body[] = Form::file("sql_file", null, array('size' => 50));
$foot = array(Form::button("view_file", _("View file")));
echo Form::fieldset(_("Install a SQL file"), $body, $foot);
echo HTML::end('form');
require_once "../layout/footer.php";
/**
 * Show page
 */
$title = _("Editar antecedentes clínicos");
$titlePage = $patient->getName() . ' (' . $title . ')';
$focusFormField = "birth_growth";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
//$returnLocation = "../medical/history_personal_view.php?id_patient=" . $idPatient;
$returnLocation = "../medical/history_personal_view.php";
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", _("Clinic History") => "../medical/history_list.php", _("View Personal Antecedents") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
unset($links);
echo $patient->getHeader();
echo Form::errorMsg();
/**
 * Edit form
 */
echo HTML::start('form', array('method' => 'post', 'action' => '../medical/history_personal_edit.php'));
echo Form::hidden("id_patient", $idPatient);
require_once "../medical/history_personal_fields.php";
echo HTML::end('form');
echo HTML::para(HTML::link(_("Voltar"), $returnLocation));
/**
 * Destroy form values and errors
 */
Form::unsetSession();
require_once "../layout/footer.php";
Esempio n. 28
0
$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;
}
$profiles = array(OPEN_PROFILE_ADMINISTRATOR => _("Administrator"), OPEN_PROFILE_ADMINISTRATIVE => _("Administrative"), OPEN_PROFILE_DOCTOR => _("Doctor"));
$thead = array(_("#"), _("Function") => array('colspan' => 6), _("Login"), _("Email"), _("Actived"), _("Profile"));
$options = array(0 => array('align' => 'right'), 1 => array('align' => 'center'), 2 => array('align' => 'center'), 3 => array('align' => 'center'), 4 => array('align' => 'center'), 5 => array('align' => 'center'), 6 => array('align' => 'center'), 9 => array('align' => 'center'), 10 => array('align' => 'center'));
$tbody = array();
$i = 0;
while ($user = $userQ->fetch()) {
Esempio n. 29
0
 * 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";
Esempio n. 30
0
$title = _("Reset User Password");
$focusFormField = "pwd";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Admin") => "../admin/index.php", _("Users") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_user");
unset($links);
echo Form::errorMsg();
/**
 * Edit form
 * @todo use user_fields.php with some controlling var to display adecuated fields
 */
echo HTML::start('form', array('id' => 'userPwd', 'method' => 'post', 'action' => '../admin/user_pwd_reset.php'));
echo Form::hidden("id_user", $formVar["id_user"]);
echo Form::hidden("login", $formVar["login"]);
echo Form::hidden("md5");
echo Form::hidden("md5_confirm");
$tbody = array();
$row = _("Login") . ": ";
$row .= HTML::tag('strong', $formVar["login"]);
$tbody[] = $row;
$row = Form::label("pwd", _("Password") . ":");
$row .= Form::password("pwd", 20, isset($formVar["pwd"]) ? $formVar["pwd"] : null, isset($formError["pwd"]) ? array('error' => $formError["pwd"]) : null);
$tbody[] = $row;
$row = Form::label("pwd2", _("Re-enter Password") . ":");
$row .= Form::password("pwd2", 20, isset($formVar["pwd2"]) ? $formVar["pwd2"] : null, isset($formError["pwd2"]) ? array('error' => $formError["pwd2"]) : null);
$tbody[] = $row;
$tfoot = array(Form::button("change", _("Submit")));