* 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";
Example #2
0
    $themeQ->close();
    echo Msg::info(_("No results found."));
    include_once "../layout/footer.php";
    exit;
}
if ($themeQ->numRows() > 1) {
    $legend = _("Change Theme by default in application");
    $content = Form::label("id_theme", _("Choose a New Theme:"));
    $content .= Form::selectTable("theme_tbl", "id_theme", OPEN_THEME_ID, "theme_name");
    $body = array($content);
    $foot = array(Form::button("button1", _("Update")));
    /**
     * Theme use form
     */
    echo HTML::start('form', array('method' => 'post', 'action' => '../admin/theme_use.php'));
    echo Form::fieldset($legend, $body, $foot);
    echo HTML::end('form');
}
echo HTML::section(2, _("Themes List:"));
$thead = array(_("#"), _("Function") => array('colspan' => 5), _("Theme Name"), _("Usage"));
$validateLink = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
$validateLink = str_replace("/admin/", "/css/", $validateLink);
$validateLink = substr($validateLink, 0, strrpos($validateLink, "/") + 1);
$validateLink = "http://jigsaw.w3.org/css-validator/validator?uri=" . $validateLink;
$tbody = array();
$i = 0;
while ($theme = $themeQ->fetch()) {
    /**
     * Row construction
     */
    $row = ++$i . '.';
    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 #4
0
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()) {
    /**
Example #5
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
echo Form::open();
?>
	<?php 
echo Form::fieldset(__('auth.fieldset.register'));
?>

	<?php 
echo Form::label('email', __('auth.email'));
?>
	<?php 
echo Form::input('email', NULL, array('id' => 'email'));
?>

	<?php 
echo Form::label('username', __('auth.username'));
?>
	<?php 
echo Form::input('username', NULL, array('id' => 'username'));
?>

	<?php 
echo Form::label('password', __('auth.password'));
?>
	<?php 
echo Form::input('password', NULL, array('id' => 'password'));
?>

	<?php 
Example #6
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
echo Form::open();
?>
	<?php 
echo Form::fieldset(__('auth.fieldset.login'));
?>
	
	<?php 
echo Form::label('email', __('auth.email'));
?>
	<?php 
echo Form::input('email', NULL, array('id' => 'email'));
?>
	
	<?php 
echo Form::label('password', __('auth.password'));
?>
	<?php 
echo Form::input('password', NULL, array('id' => 'password'));
?>

	<?php 
echo Form::checkbox('remember', NULL, FALSE, array('id' => 'remember'));
?>
	<?php 
echo Form::label('remember', __('auth.remember'));
?>

	<?php 
Example #7
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";
Example #8
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";
 function search_form($legend = 'Filter')
 {
     $inputs = '';
     foreach ($this->enable_search_for as $search_field) {
         $name = $this->cols_array[$search_field]['name'];
         $id = Html::html_legal_id($search_field);
         $input_name = rawurlencode($search_field);
         if ($this->cols_array[$search_field]['options']) {
             $options = $this->get_options($search_field, true);
             $select = new Select($encoded_name);
             $select->add_option('', $this->cols_array[$search_field]['name']);
             $attr_array = array();
             if (is_array($options)) {
                 foreach ($options as $option => $name) {
                     if (isset($_GET['option'])) {
                         $attr_array['selected'] = 'selected';
                     } else {
                         unset($attr_array['selected']);
                     }
                     $select->add_option($option, $name, $attr_array);
                 }
             }
             $inputs .= $select->flush_select();
         } else {
             $input = Form::add_input('text', $input_name, "{If:" . $search_field . "_search_value}", array('id' => $id, 'onkeyup' => 'getSuggestions(event,this)'));
             $inputs .= Form::add_label($id, $name . ' ' . $input, array('class' => 'nowrap'));
         }
     }
     $inputs .= "{If:filter_get_vars}\n";
     $inputs .= Form::add_input('submit', 'Filter');
     $inputs .= Form::add_input('submit', '', 'Zurücksetzen', array('onclick' => "resetFilter(this);return false;"));
     $form = new Form();
     $form->form_tag('{SELF_URL}', 'get', '', array('onsubmit' => 'httpRequestSubmit(this);return false;', 'autocomplete' => 'off'));
     $form->fieldset($inputs, $legend);
     return $form->flush_form();
 }
Example #10
0
    $row .= Form::select("language", $languageList, $formVar["language"]);
    $body[] = $row;
} elseif (defined("OPEN_DEMO") && OPEN_DEMO) {
    $row = Form::hidden("language", "en");
    $body[] = $row;
}
$row = Form::label("id_theme", _("Theme by default") . ":");
$row .= Form::selectTable("theme_tbl", "id_theme", $formVar["id_theme"], "theme_name");
$body[] = $row;
$appFields = Form::fieldset(_("Application"), $body);
$body = array();
$row = Form::label("clinic_name", _("Clinic Name") . ":");
$row .= Form::text("clinic_name", isset($formVar["clinic_name"]) ? $formVar["clinic_name"] : null, array('size' => 40, 'maxlength' => 128, 'error' => isset($formError["clinic_name"]) ? $formError["clinic_name"] : null));
$body[] = $row;
$row = Form::label("clinic_hours", _("Clinic Hours") . ":");
$row .= Form::text("clinic_hours", isset($formVar["clinic_hours"]) ? $formVar["clinic_hours"] : null, array('size' => 40, 'maxlength' => 128, 'error' => isset($formError["clinic_hours"]) ? $formError["clinic_hours"] : null));
$body[] = $row;
$row = Form::label("clinic_address", _("Clinic Address") . ":");
$row .= Form::textArea("clinic_address", isset($formVar["clinic_address"]) ? $formVar["clinic_address"] : null, array('rows' => 3, 'cols' => 30));
$body[] = $row;
$row = Form::label("clinic_phone", _("Clinic Phone") . ":");
$row .= Form::text("clinic_phone", isset($formVar["clinic_phone"]) ? $formVar["clinic_phone"] : null, array('size' => 40, 'error' => isset($formError["clinic_phone"]) ? $formError["clinic_phone"] : null));
$body[] = $row;
$row = Form::label("clinic_url", _("Clinic URL") . ":");
$row .= Form::text("clinic_url", isset($formVar["clinic_url"]) ? $formVar["clinic_url"] : null, array('size' => 40, 'maxlength' => 300, 'error' => isset($formError["clinic_url"]) ? $formError["clinic_url"] : null));
$body[] = $row;
$clinicFields = Form::fieldset(_("Clinic"), $body);
$body = array($appFields, $clinicFields);
$foot = array(Form::button("update", _("Update")) . Form::generateToken());
echo Form::fieldset($title, $body, $foot);
Example #11
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
echo Form::open();
?>
	<?php 
echo Form::fieldset(__('auth.fieldset.change_pass'));
?>

	<?php 
echo Form::label('password', __('auth.login.password'));
?>
	<?php 
echo Form::input('password', NULL, array('id' => 'password'));
?>

	<?php 
echo Form::label('password_confirm', __('auth.login.password_confirm'));
?>
	<?php 
echo Form::input('password_confirm', NULL, array('id' => 'password_confirm'));
?>

	<?php 
echo Form::button('login', __('auth.change'));
echo Form::close();
 function search_form($legend = 'Filter')
 {
     $inputs = '';
     foreach ($this->enable_search_for as $search_field) {
         $name = $this->cols_array[$search_field]['name'];
         $id = Html::html_legal_id($search_field);
         $input_name = rawurlencode($search_field);
         $input = Form::add_input('text', $input_name, "{If:" . $search_field . "_search_value}", array('id' => $id, 'onkeyup' => 'getSuggestions(event,this)'));
         $inputs .= Form::add_label($id, $name . ' ' . $input, array('class' => 'nowrap'));
     }
     $inputs .= "{If:filter_get_vars}\n";
     $inputs .= Form::add_input('submit', 'Filter');
     $inputs .= Form::add_input('submit', '', 'Zurücksetzen', array('onclick' => "resetFilter(this);return false;"));
     $form = new Form();
     $form->form_tag('{SELF_URL}', 'get', '', array('onsubmit' => 'httpRequestSubmit(this);return false;', 'autocomplete' => 'off'));
     $form->fieldset($inputs, $legend);
     return $form->flush_form();
 }