本文整理汇总了PHP中GlobalConfig::getConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP GlobalConfig::getConfig方法的具体用法?PHP GlobalConfig::getConfig怎么用?PHP GlobalConfig::getConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlobalConfig
的用法示例。
在下文中一共展示了GlobalConfig::getConfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Displays the GUI showing the data
*/
function display($pid = 0)
{
global $root_path, $dbf_nodate, $newdata, $kb_other_his_array, $lang;
// $_SESSION;
$validdata = TRUE;
if (!empty($pid)) {
$this->pid = $pid;
}
# Load the language tables
$lang_tables = $this->langfiles;
include $root_path . 'include/inc_load_lang_tables.php';
# Load the other hospitals array
include_once $root_path . 'global_conf/other_hospitals.php';
include_once $root_path . 'include/inc_date_format_functions.php';
include_once $root_path . 'include/care_api_classes/class_insurance.php';
$pinsure_obj = new PersonInsurance($this->pid);
# Get the global config for person�s registration form
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$GLOBAL_CONFIG = array();
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('person_%');
//extract($GLOBAL_CONFIG);
if (empty($this->pid)) {
$validdata = FALSE;
} else {
//if($data_obj=&$this->person_obj->getAllInfoObject()){
// $this->data=$data_obj->FetchRow();
if ($this->is_loaded) {
extract($this->data);
# Get related insurance data
$p_insurance = $pinsure_obj->getPersonInsuranceObject($this->pid);
if ($p_insurance == FALSE) {
$insurance_show = true;
} else {
if (!$p_insurance->RecordCount()) {
$insurance_show = true;
} elseif ($p_insurance->RecordCount() == 1) {
$buffer = $p_insurance->FetchRow();
extract($buffer);
$insurance_show = true;
# Get insurace firm name
$insurance_firm_name = $pinsure_obj->getFirmName($insurance_firm_id);
} else {
$insurance_show = FALSE;
}
}
$insurance_class_info = $pinsure_obj->getInsuranceClassInfo(isset($insurance_class_nr));
# Check if person is currently admitted
$this->current_encounter = $this->person_obj->CurrentEncounter($this->pid);
# update the record�s history
if (empty($newdata)) {
@$this->person_obj->setHistorySeen($_SESSION['sess_user_name']);
}
# Check whether config foto path exists, else use default path
$photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $this->default_photo_path;
} else {
$validdata = FALSE;
}
}
if ($validdata) {
include_once $root_path . 'include/inc_photo_filename_resolve.php';
############ Here starts the GUI output ##################
# Start Smarty templating here
# Create smarty object without initiliazing the GUI (2nd param = FALSE)
include_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$this->smarty = new smarty_care('common', FALSE);
# Set from width
$this->smarty->assign('sFormWidth', 'width="100%"');
$img_male = createComIcon($root_path, 'spm.gif', '0');
$img_female = createComIcon($root_path, 'spf.gif', '0');
if (!empty($this->pretext)) {
$this->smarty->assign('pretext', $this->pretext);
}
$this->smarty->assign('LDRegistryNr', $LDRegistryNr);
$this->smarty->assign('pid', $pid);
if (file_exists($root_path . 'cache/barcodes/pn_' . $pid . '.png')) {
$this->smarty->assign('sBarcodeImg', '<img src="' . $root_path . 'cache/barcodes/pn_' . $pid . '.png" border=0 width=180 height=35>');
} else {
$this->smarty->assign('sBarcodeImg', "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5&label=2&form_file=pn' border=0 width=0 height=0>");
$this->smarty->assign('sBarcodeImg', "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5' border=0 width=180 height=35>");
}
$this->smarty->assign('img_source', $img_source);
# iRowSpanCount counts the rows on the left of the photo image. Begin with 5 because there are 5 static rows.
$iRowSpanCount = 5;
$this->smarty->assign('LDRegDate', $LDRegDate);
$this->smarty->assign('sRegDate', @formatDate2Local($date_reg, $date_format) . '<input name="date_reg" type="hidden" value="' . $date_reg . '"');
//$iRowSpanCount++;
$this->smarty->assign('LDRegTime', $LDRegTime);
$this->smarty->assign('sRegTime', convertTimeToLocal(@formatDate2Local($date_reg, $date_format, 0, 1)));
$this->smarty->assign('sFileNr', $this->createTR($LDFileNr, $selian_pid, 1, TRUE));
if (!$GLOBAL_CONFIG['person_title_hide']) {
$this->smarty->assign('sPersonTitle', $this->createTR($LDTitle, $title));
$iRowSpanCount++;
}
$this->smarty->assign('sNameLast', $this->createTR($LDLastName, $name_last, 1, TRUE));
//$iRowSpanCount++;
# If person is dead show a black cross
//.........这里部分代码省略.........
示例2: display
/**
* Displays the GUI input form
*/
function display()
{
global $db, $sid, $lang, $root_path, $pid, $insurance_show, $user_id, $mode, $dbtype, $no_tribe, $no_region, $update, $photo_filename;
#, $_FILES $_POST, $_SESSION;
extract($_POST);
require_once $root_path . 'include/care_api_classes/class_advanced_search.php';
# Load the language tables
$lang_tables = $this->langfiles;
include $root_path . 'include/inc_load_lang_tables.php';
include_once $root_path . 'include/inc_date_format_functions.php';
include_once $root_path . 'include/care_api_classes/class_insurance.php';
include_once $root_path . 'include/care_api_classes/class_person.php';
$db->debug = FALSE;
# Create the new person object
$person_obj =& new Person($pid);
# Create a new person insurance object
$pinsure_obj =& new PersonInsurance($pid);
if (!isset($insurance_show)) {
$insurance_show = TRUE;
}
$newdata = 1;
$error = 0;
$dbtable = 'care_person';
if (!isset($photo_filename) || empty($photo_filename)) {
$photo_filename = 'nopic';
}
# Assume first that image is not uploaded
$valid_image = FALSE;
//* Get the global config for person's registration form*/
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('person_%');
extract($GLOBAL_CONFIG);
# Check whether config foto path exists, else use default path
$photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $this->default_photo_path;
if ($mode == 'save' || $mode == 'forcesave') {
$search_obj =& new advanced_search();
if (is_array($result_array = $search_obj->get_equal_words("tribe_name", "care_tz_tribes", false, 65, 'tribe_id')) && $name_maiden && !$no_tribe) {
$tribe_array = $result_array;
} else {
$tribe_array = $result_array;
}
if (is_array($result_array = $search_obj->get_equal_words("name", "care_tz_religion", false, 65, 'nr')) && $religion && !$person_religion_hide) {
$religion_array = $result_array;
} else {
$religion_array = $result_array;
}
/*
if (is_array($result_array=$search_obj->get_equal_words("region_name", "care_tz_region", false, 65, 'region_id')) && $email && !$person_email_hide )
{
$region_array=$result_array;
}
else
{
$region_array=$result_array;
}
if (is_array($result_array=$search_obj->get_equal_words1("district_name", "care_tz_district", false, 65, 'district_id',$email)) && $sss_nr )
{
$district_array=$result_array;
}
else
{
$district_array=$result_array;
}
if (is_array($result_array=$search_obj->get_equal_words1("ward_name", "care_tz_ward", false, 65, 'ward_id',$sss_nr)) && $nat_id_nr )
{
$ward_array=$result_array;
}
else
{
$ward_array=$result_array;
}
*/
# If saving is not forced, validate important elements
if ($mode != 'forcesave') {
# clean and check input data variables
if (trim($encoder) == '') {
$encoder = $aufnahme_user;
}
if (trim($name_last) == '') {
$errornamelast = 1;
$error++;
}
//if (trim($selian_pid)=='' || !is_numeric($selian_pid) || (!$update && $person_obj->SelianFileExists($selian_pid))) { $errorfilenr=1; $error++;}
if ($person_obj->IsHospitalFileNrMandatory()) {
if (trim($selian_pid) == '' || !$update && $person_obj->SelianFileExists($selian_pid)) {
$errorfilenr = 1;
$error++;
}
}
if (trim($name_first) == '') {
$errornamefirst = 1;
$error++;
}
if (trim($date_birth) == '') {
$errordatebirth = 1;
$error++;
//.........这里部分代码省略.........
示例3: Paginator
$sql2 .= " OR p.date_birth = '{$srcword}' ";
}
if (is_numeric($srcword)) {
$sql2 .= " OR o.op_nr = {$srcword} OR e.encounter_nr = {$srcword}";
}
$sql2 .= ")";
}
}
#Load and create paginator object
include_once $root_path . 'include/care_api_classes/class_paginator.php';
$pagen =& new Paginator($pgx, $thisfile, $_SESSION['sess_searchkey'], $root_path);
$GLOBAL_CONFIG = array();
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
# Get the max nr of rows from global config
$glob_obj->getConfig('pagin_patient_search_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_patient_search_max_block_rows'])) {
$pagen->setMaxCount(MAX_BLOCK_ROWS);
} else {
$pagen->setMaxCount($GLOBAL_CONFIG['pagin_patient_search_max_block_rows']);
}
# Detect what type of sort item
if ($oitem == 'encounter_nr') {
$tab = 'e';
} elseif (stristr($oitem, 'op_')) {
$tab = 'o';
} else {
$tab = 'p';
}
# If the search is directed to a single patient
if ($mode == 'get' || $mode == 'getbypid' || $mode == 'getbyenc') {
示例4: display
/**
* Displays the GUI showing the data
*/
function display($pid)
{
global $root_path, $dbf_nodate, $newdata;
$validdata = TRUE;
if (!empty($pid)) {
$this->pid = $pid;
}
# Load the language tables
$lang_tables = $this->langfile;
include $root_path . 'include/inc_load_lang_tables.php';
include_once $root_path . 'include/inc_date_format_functions.php';
include_once $root_path . 'include/care_api_classes/class_insurance.php';
$pinsure_obj = new PersonInsurance($this->pid);
# Get the global config for person�s registration form
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$GLOBAL_CONFIG = array();
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('person_%');
//extract($GLOBAL_CONFIG);
if (empty($this->pid)) {
$validdata = FALSE;
} else {
//if($data_obj=&$this->person_obj->getAllInfoObject()){
// $this->data=$data_obj->FetchRow();
if ($this->is_loaded) {
extract($this->data);
# Get related insurance data
$p_insurance =& $pinsure_obj->getPersonInsuranceObject($this->pid);
if ($p_insurance == FALSE) {
$insurance_show = true;
} else {
if (!$p_insurance->RecordCount()) {
$insurance_show = true;
} elseif ($p_insurance->RecordCount() == 1) {
$buffer = $p_insurance->FetchRow();
extract($buffer);
$insurance_show = true;
# Get insurace firm name
$insurance_firm_name = $pinsure_obj->getFirmName($insurance_firm_id);
} else {
$insurance_show = FALSE;
}
}
$insurance_class_info = $pinsure_obj->getInsuranceClassInfo($insurance_class_nr);
# Check if person is currently admitted
$this->current_encounter = $this->person_obj->CurrentEncounter($this->pid);
# update the record�s history
if (empty($newdata)) {
@$this->person_obj->setHistorySeen($_SESSION['sess_user_name']);
}
# Check whether config foto path exists, else use default path
$photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $this->default_photo_path;
} else {
$validdata = FALSE;
}
}
if ($validdata) {
include_once $root_path . 'include/inc_photo_filename_resolve.php';
############ Here starts the GUI output ##################
# load config options
include_once $root_path . 'include/care_api_classes/class_multi.php';
$multi = new multi();
?>
<table border=0 cellspacing=1 cellpadding=3>
<tr>
<td bgColor="#eeeeee">
<FONT SIZE=-1 FACE="Arial"><?php
echo $LDRegistryNr;
?>
:
</td>
<td width="30%" bgcolor="#ffffee">
<FONT SIZE=-1 FACE="Arial" color="#800000">
<?php
if ($pid) {
if (IS_TANZANIAN) {
echo $this->showPID($pid);
} else {
echo $pid;
}
}
?>
<br>
<?php
if (file_exists($root_path . 'cache/barcodes/pn_' . $pid . '.png')) {
echo '<img src="' . $root_path . 'cache/barcodes/pn_' . $pid . '.png" border=0 width=180 height=35>';
} else {
echo "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5&label=2&form_file=pn' border=0 width=0 height=0>";
echo "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5' border=0 width=180 height=35>";
}
?>
</td>
<td valign="top" rowspan=6 align="center" bgcolor="#ffffee" >
<FONT SIZE=-1 FACE="Arial"><img <?php
echo $img_source;
?>
>
//.........这里部分代码省略.........
示例5: array
if ($mode != 'paginate') {
# Reset paginator variables
$pgx = 0;
$totalcount = 0;
# Set the sort parameters
if (empty($oitem)) {
$oitem = 'name';
}
if (empty($odir)) {
$odir = 'ASC';
}
}
$GLOBAL_CONFIG = array();
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('pagin_address_list_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_address_list_max_block_rows'])) {
$GLOBAL_CONFIG['pagin_address_list_max_block_rows'] = MAX_BLOCK_ROWS;
}
# Last resort, use the default defined at the start of this page
#Load and create paginator object
require_once $root_path . 'include/care_api_classes/class_paginator.php';
$pagen = new Paginator($pgx, $thisfile, $_SESSION['sess_searchkey'], $root_path);
# Adjust the max nr of rows in a block
$pagen->setMaxCount($GLOBAL_CONFIG['pagin_address_list_max_block_rows']);
# Get all the active firms info
//$address=$address_obj->getAllActiveCityTown();
$address =& $address_obj->getLimitActiveCityTown($GLOBAL_CONFIG['pagin_address_list_max_block_rows'], $pgx, $oitem, $odir);
# Get the resulting record count
//echo $address_obj->getLastQuery();
$linecount = $address_obj->LastRecordCount();
示例6: UserConfig
require_once 'include/care_api_classes/class_userconfig.php';
$cfg_obj = new UserConfig();
if ($cfg_obj->exists($user_id)) {
$cfg_obj->getConfig($user_id);
$USERCONFIG = $cfg_obj->buffer;
$config_exists = true;
// Flag that user config is existing
} else {
$cfg_obj->_getDefault();
$USERCONFIG = $cfg_obj->buffer;
}
# Load global configurations API
require_once 'include/care_api_classes/class_globalconfig.php';
$glob_cfg = new GlobalConfig($GLOBALCONFIG);
# Get the global config for language usage
$glob_cfg->getConfig('language_%');
# Get the global config for frames
$glob_cfg->getConfig('gui_frame_left_nav_width');
# Get the global config for lev nav border
$glob_cfg->getConfig('gui_frame_left_nav_border');
$savelang = 0;
/*echo $GLOBALCONFIG['language_non_single'];
while (list($x,$v)=each($GLOBALCONFIG)) echo $x.'==>'.$v.'<br>';
*/
# Start checking language properties
if (!$GLOBALCONFIG['language_single']) {
# We get the language code
if ($_chg_lang_ && !empty($lang)) {
$savelang = 1;
} else {
//echo $lang=$USERCONFIG['lang'];
示例7: header
} else {
if (!is_numeric($_POST['news_normal_display_width'])) {
$_POST['news_normal_display_width'] = NEWS_DISPLAY_WIDTH;
}
}
if (!is_numeric($_POST['news_normal_preview_maxlen'])) {
$_POST['news_normal_preview_maxlen'] = NEWS_PREVIEW_MAXLEN;
}
# Save the configuration
$glob_obj->saveConfigArray($_POST, $filter, $numeric, '', $addslash);
# Loop back to self to get the newly stored values
header("location:{$thisfile}" . URL_REDIRECT_APPEND . "&save_ok=1");
exit;
# Else get current global data
} else {
$glob_obj->getConfig('news_%');
}
# Start Smarty templating here
/**
* LOAD Smarty
*/
# Note: it is advisable to load this after the inc_front_chain_lang.php so
# that the smarty script can use the user configured template theme
require_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$smarty = new smarty_care('system_admin');
# Title in toolbar
$smarty->assign('sToolbarTitle', $LDNewsDisplay);
# href for help button
$smarty->assign('pbHelp', "javascript:gethelp('newsdisplay.php')");
# href for close button
$smarty->assign('breakfile', $breakfile);
示例8: array
$GCONFIG = array();
}
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$gc = new GlobalConfig($GCONFIG);
if (isset($mode) && $mode == 'save' && !empty($max_items)) {
for ($i = 1; $i <= $max_items; $i++) {
if (empty($_POST["value{$i}"])) {
$_POST["value{$i}"] = '0';
}
//echo $_POST["index$i"].'==>'.$_POST["value$i"].'<br>';
$gc->saveConfigItem($_POST["index{$i}"], $_POST["value{$i}"]);
}
header('location:' . $thisfile . URL_REDIRECT_APPEND . '&mode=0');
exit;
} else {
$gc->getConfig('person_%_hide');
$gc->getConfig('patient_%_hide');
$gc->getConfig('patient_%_show');
}
# Start Smarty templating here
/**
* LOAD Smarty
*/
# Note: it is advisable to load this after the inc_front_chain_lang.php so
# that the smarty script can use the user configured template theme
require_once $root_path . 'gui/smarty_template/smarty_care.class.php';
$smarty = new smarty_care('system_admin');
# Title in toolbar
$smarty->assign('sToolbarTitle', $LDDataEntryForms);
# href for return button
$smarty->assign('pbBack', $returnfile);
示例9: array
<?php
error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR);
require './roots.php';
require $root_path . 'include/inc_environment_global.php';
require $root_path . 'include/inc_front_chain_lang.php';
//----------------------------------------------------------------------------------------------------
$breakfile = 'edv-system-admi-welcome.php' . URL_APPEND;
//----------------------------------------------------------------------------------------------------
$GLOBAL_CONFIG = array();
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$thisfile = basename($_SERVER['PHP_SELF']);
if (isset($_POST['mode']) && $_POST['mode'] == 'save') {
$filter = 'main_info_facility';
# The index filter
$numeric = FALSE;
# Values are not strictly numeric
$addslash = TRUE;
# Slashes should be added to the stored values
# Save the configuration
$glob_obj->saveConfigArray($_POST, $filter, $numeric, '', $addslash);
# Loop back to self to get the newly stored values
header("location:{$thisfile}" . URL_REDIRECT_APPEND . "&save_ok=1");
exit;
# Else get current global data
} else {
$glob_obj->getConfig('main_info_facility%');
}
//----------------------------------------------------------------------------------------------------
require "gui_edv_arv_information.php";
示例10: header
* We check again the language variable lang. If table file not available use default (lang = "en")
*/
if (!isset($lang) || empty($lang)) {
include $root_path . 'chklang.php';
}
/* Load the language table */
if (file_exists($root_path . 'language/' . $lang . '/lang_' . $lang . '_indexframe.php')) {
include $root_path . 'language/' . $lang . '/lang_' . $lang . '_indexframe.php';
} else {
include $root_path . 'language/en/lang_en_indexframe.php';
$lang = 'en';
// last desperate effort to settle the language
}
// echo $_COOKIE['ck_config']; // for debugging only
if ($mask == 2 && !$nonewmask) {
header("location: indexframe2.php?sid=" . $sid . "&lang=" . $lang . "&boot=" . $boot . "&cookie=" . $cookie);
exit;
}
# Get the global config for language usage
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$GLOBALCONFIG = array();
$gc = new GlobalConfig($GLOBALCONFIG);
$gc->getConfig('language_%');
# Prepare additional data for the gui template
$charset = setCharSet();
# Load dept & ward classes
require_once $root_path . 'include/care_api_classes/class_department.php';
require_once $root_path . 'include/care_api_classes/class_ward.php';
$dept = new Department();
$ward = new Ward();
require './gui_bridge/gui_indexframe.php';
示例11: array
}
# Clean the title
require $root_path . 'include/inc_newstitle_clean.php';
# Check if the uploaded image file is valid
$is_pic = @$img_obj->isValidUploadedImage($_FILES['pic']);
# Retrieve the filename extension
$picext = @$img_obj->UploadedImageMimeType();
$publishdate = @formatDate2Std($publishdate, $date_format);
/* Prepare data set for saving */
$news = array('category' => $category, 'title' => $newstitle, 'preface' => $preface, 'body' => $newsbody, 'pic_mime' => $picext, 'art_num' => $artnum, 'author' => $author, 'publish_date' => $publishdate);
require_once $root_path . 'include/care_api_classes/class_news.php';
$newsobj = new News();
if ($news_nr = $newsobj->saveNews($dept_nr, $news)) {
if ($is_pic) {
# Get the news foto path from global config
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$globobj = new GlobalConfig($GLOBALCONFIG);
$globobj->getConfig('news_fotos_path');
if ($GLOBALCONFIG['news_fotos_path'] == '') {
$news_fotos_path = $root_path . 'fotos/news/';
} else {
$news_fotos_path = $root_path . $GLOBALCONFIG['news_fotos_path'];
}
$picfilename = "{$news_nr}.{$picext}";
$img_obj->saveUploadedImage($_FILES['pic'], $news_fotos_path, $picfilename);
}
header('Location: ' . $fileforward . URL_REDIRECT_APPEND . '&nr=' . $news_nr . '&mode=preview4saved');
exit;
} else {
echo $img_obj->getLastQuery() . "<p>{$LDDbNoSave}";
}
示例12: date
include $root_path . 'include/inc_init_crypt.php';
# initialize crypt
$clear_ck_sid = $dec_hcemd5->DecodeMimeSelfRand($_COOKIE[$ck_sid_buffer]);
$tnow = date('His');
// echo $tnow."<p>";
$time_out = FALSE;
if (!defined('NO_2LEVEL_CHK') || NO_2LEVEL_CHK != 1) {
# Let us check if the calling script is the time-out configuration script, if yes, then we skip the time out
if (!preg_match('/edv_system_timeout.php/i', $_SERVER['PHP_SELF'])) {
# Load the global time out configs
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
if (!isset($GLOBAL_CONFIG)) {
$GLOBAL_CONFIG = array();
}
$gc_obj = new GlobalConfig($GLOBAL_CONFIG);
$gc_obj->getConfig('timeout_%');
# If config data available, use it
if ($GLOBAL_CONFIG['timeout_inactive']) {
$TIME_OUT_INACTIVE = $GLOBAL_CONFIG['timeout_inactive'];
}
if ((int) $GLOBAL_CONFIG['timeout_time']) {
$TIME_OUT_TIME = (int) $GLOBAL_CONFIG['timeout_time'];
}
if (!$TIME_OUT_INACTIVE) {
#echo $tnow."<br>";
#echo $_SESSION['sess_tos']."<br>";
#echo ($tnow-$_SESSION['sess_tos'])."<br>";
# Check if session is still valid
if (isset($_SESSION['sess_tos']) || $_SESSION['sess_tos']) {
# Check if time out value is positive or not zero
# current time minus start time
示例13: die
<?php
if (preg_match('/pageheader1.php/i', $_SERVER['PHP_SELF'])) {
die('<meta http-equiv="refresh" content="0; url=../../../">');
}
#Get care logo
$imgsize = GetImageSize($logo);
$pdf->addPngFromFile($logo, 20, 780, $imgsize[0]);
# Attach logo
$pdf->selectFont($fontpath . 'Helvetica.afm');
$pdf->ezStartPageNumbers(550, 25, 8);
# Get the main informations
if (!isset($GLOBAL_CONFIG)) {
$GLOBAL_CONFIG = array();
}
include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob = new GlobalConfig($GLOBAL_CONFIG);
# Get all config items starting with "main_"
$glob->getConfig('main_%');
$addr[] = array($GLOBAL_CONFIG['main_info_address'], "{$LDPhone}:\n{$LDFax}:\n{$LDEmail}:", $GLOBAL_CONFIG['main_info_phone'] . "\n" . $GLOBAL_CONFIG['main_info_fax'] . "\n" . $GLOBAL_CONFIG['main_info_email'] . "\n");
$pdf->ezTable($addr, '', '', array('xPos' => 165, 'xOrientation' => 'right', 'showLines' => 0, 'showHeadings' => 0, 'shaded' => 0, 'fontsize' => 6, 'cols' => array(1 => array('justification' => 'right'))));
示例14: Paginator
# Initialize page�s control variables
if ($mode != 'paginate') {
# Reset paginator variables
$pgx = 0;
$totalcount = 0;
$odir = '';
$oitem = '';
}
#Load and create paginator object
require_once $root_path . 'include/care_api_classes/class_paginator.php';
$pagen = new Paginator($pgx, $thisfile, $_SESSION['sess_searchkey'], $root_path);
$GLOBAL_CONFIG = array();
# Get the max nr of rows from global config
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('pagin_personell_list_max_block_rows');
if (empty($GLOBAL_CONFIG['pagin_personell_list_max_block_rows'])) {
$pagen->setMaxCount(MAX_BLOCK_ROWS);
} else {
$pagen->setMaxCount($GLOBAL_CONFIG['pagin_personell_list_max_block_rows']);
}
if (empty($oitem)) {
$oitem = 'name_last';
}
if (empty($odir)) {
$odir = 'ASC';
}
# default, ascending alphabetic
# Set the sort parameters
$pagen->setSortItem($oitem);
$pagen->setSortDirection($odir);
示例15: basename
}
$thisfile = basename($_SERVER['PHP_SELF']);
# Load the department list with oncall doctors
require_once $root_path . 'include/care_api_classes/class_department.php';
$dept_obj = new Department();
$dept_obj->preloadDept($dept_nr);
$dept_list =& $dept_obj->getAllMedical();
# Load the dept doctors
require_once $root_path . 'include/care_api_classes/class_personell.php';
$pers_obj = new Personell();
$doctors =& $pers_obj->getDoctorsOfDept($dept_nr);
# Load global values
$GLOBAL_CONFIG = array();
require_once $root_path . 'include/care_api_classes/class_globalconfig.php';
$glob_obj = new GlobalConfig($GLOBAL_CONFIG);
$glob_obj->getConfig('personell_%');
# Set color values for the search mask
$searchmask_bgcolor = '#f3f3f3';
$searchprompt = $LDEntryPrompt;
$entry_block_bgcolor = '#fff3f3';
$entry_border_bgcolor = '#6666ee';
$entry_body_bgcolor = '#ffffff';
if (!isset($searchkey)) {
$searchkey = '';
}
if (!isset($mode)) {
$mode = '';
}
if (!empty($ipath)) {
switch ($ipath) {
case 'menu':