本文整理汇总了PHP中CValue::getOrSession方法的典型用法代码示例。如果您正苦于以下问题:PHP CValue::getOrSession方法的具体用法?PHP CValue::getOrSession怎么用?PHP CValue::getOrSession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CValue
的用法示例。
在下文中一共展示了CValue::getOrSession方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mbGetObjectFromGetOrSession
/**
* Returns the CMbObject with given GET or SESSION params keys,
* if it doesn't exist, a redirect is made
*
* @param string $class_key The class name of the object
* @param string $id_key The object ID
* @param string $guid_key The object GUID (classname-id)
*
* @return CMbObject The object loaded or nothing
**/
function mbGetObjectFromGetOrSession($class_key, $id_key, $guid_key = null)
{
$object_class = CValue::getOrSession($class_key);
$object_id = CValue::getOrSession($id_key);
$object_guid = "{$object_class}-{$object_id}";
if ($guid_key) {
$object_guid = CValue::getOrSession($guid_key, $object_guid);
}
$object = CMbObject::loadFromGuid($object_guid);
// Redirection
if (!$object || !$object->_id) {
global $ajax;
CAppUI::redirect("ajax={$ajax}" . "&suppressHeaders=1" . "&m=system" . "&a=object_not_found" . "&object_guid={$object_guid}");
}
return $object;
}
示例2: CPatient
<?php
/**
* $Id: vw_edit_patients.php 28472 2015-06-02 10:11:29Z rhum1 $
*
* @package Mediboard
* @subpackage Patients
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 28472 $
*/
CCanDo::checkEdit();
$patient_id = CValue::getOrSession("patient_id");
$name = CValue::get("name");
$firstName = CValue::get("firstName");
$naissance_day = CValue::get("naissance_day");
$naissance_month = CValue::get("naissance_month");
$naissance_year = CValue::get("naissance_year");
$useVitale = CValue::get("useVitale");
$covercard = CValue::get("covercard");
$callback = CValue::get("callback");
$modal = CValue::get("modal", 0);
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefPhotoIdentite();
$patient->countDocItems();
$patient->loadRefsCorrespondantsPatient();
$patient->countINS();
// Chargement de l'ipp
$patient->loadIPP();
if (CModule::getActive("fse")) {
示例3: CPlageOp
<?php
/**
* $Id: inc_edit_planning.php 22873 2014-04-22 07:51:07Z mytto $
*
* @package Mediboard
* @subpackage dPbloc
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 22873 $
*/
$plageop_id = CValue::getOrSession("plageop_id");
$date = CValue::getOrSession("date", CMbDT::date());
$bloc_id = CValue::get("bloc_id");
// Informations sur la plage demandée
$plagesel = new CPlageOp();
$plagesel->load($plageop_id);
$plagesel->loadRefSalle();
$listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ, null, "nom");
//curent bloc if $bloc_id
$bloc = new CBlocOperatoire();
$bloc->load($bloc_id);
$listSalles = $bloc->loadRefsSalles();
$arrKeySalle = array_keys($listSalles);
// cleanup listBlocs
foreach ($listBlocs as $key => $curr_bloc) {
$salles = $curr_bloc->loadRefsSalles();
foreach ($salles as $id => $_salle) {
if (count($arrKeySalle) && !in_array($id, $arrKeySalle)) {
unset($salles[$id]);
continue;
示例4: CSejour
$group = CGroups::loadCurrent();
$filter = new CSejour();
$today = CMbDT::date();
$filter->_date_min = CValue::getOrSession("_date_min", "{$today} 06:00:00");
$filter->_date_max = CValue::getOrSession("_date_max", "{$today} 21:00:00");
$filter->_horodatage = CValue::getOrSession("_horodatage", "entree_prevue");
$filter->_admission = CValue::getOrSession("_admission");
$filter->_service = CValue::getOrSession("_service");
$filter->praticien_id = CValue::getOrSession("praticien_id");
$filter->convalescence = CValue::getOrSession("convalescence");
$filter->_specialite = CValue::getOrSession("_specialite");
$filter->_filter_type = CValue::getOrSession("_filter_type");
$filter->_ccam_libelle = CValue::getOrSession("_ccam_libelle", "1");
$filter->_coordonnees = CValue::getOrSession("_coordonnees");
$filter->_notes = CValue::getOrSession("_notes");
$filter->_by_date = CValue::getOrSession("_by_date");
$listPrat = new CMediusers();
$listPrat = $listPrat->loadPraticiens(PERM_READ);
$listSpec = new CFunctions();
$listSpec = $listSpec->loadSpecialites(PERM_READ);
// Récupération de la liste des services
$where = array();
$where["externe"] = "= '0'";
$where["cancelled"] = "= '0'";
$service = new CService();
$services = $service->loadGroupList($where);
$yesterday = CMbDT::date("-1 day", $today);
$tomorrow = CMbDT::date("+1 day", $today);
$j2 = CMbDT::date("+2 day", $today);
$j3 = CMbDT::date("+3 day", $today);
$week_deb = CMbDT::date("last sunday", $today);
示例5: CUser
<?php
/**
* $Id$
*
* @category Admin
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$do_import = CValue::get("do_import");
$start = CValue::getOrSession("start", 0);
$count = CValue::get("count", 5);
$group_id = CGroups::loadCurrent()->_id;
$user = new CUser();
// Requêtes
$ljoin["id_sante400"] = "`id_sante400`.`object_id` = `users`.`user_id`";
$ljoin["users_mediboard"] = "`users`.`user_id` = `users_mediboard`.`user_id`";
$ljoin["functions_mediboard"] = "`functions_mediboard`.`function_id` = `users_mediboard`.`function_id`";
$where = array();
$where["id_sante400.object_class"] = "= 'CUser'";
$where["id_sante400.tag"] = "= '" . CAppUI::conf("admin LDAP ldap_tag") . "'";
$where["id_sante400.id400"] = "IS NOT NULL";
$where["users.template"] = "= '0'";
$where["users_mediboard.actif"] = "= '1'";
$where["functions_mediboard.group_id"] = "= '{$group_id}'";
if (!$do_import) {
$count_users_ldap = $user->countList($where, null, $ljoin);
示例6: explode
<?php
/**
* $Id: object_merger.php 22331 2014-03-06 11:13:46Z charlyecho $
*
* @package Mediboard
* @subpackage System
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 22331 $
*/
$objects_class = CValue::getOrSession('objects_class');
$readonly_class = CValue::get('readonly_class');
$objects_id = CValue::get('objects_id');
$mode = CValue::get('mode');
if (!is_array($objects_id)) {
$objects_id = explode("-", $objects_id);
}
$user = CMediusers::get();
CMbArray::removeValue("", $objects_id);
$objects = array();
$result = null;
$checkMerge = null;
$statuses = array();
$merge_type = null;
if (class_exists($objects_class) && count($objects_id)) {
foreach ($objects_id as $object_id) {
/** @var CMbObject $object */
$object = new $objects_class();
$merge_type = $object->_spec->merge_type;
if ($merge_type == 'none') {
示例7: CPasswordEntry
<?php
/**
* $Id$
*
* @category Password Keeper
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @link http://www.mediboard.org */
CPasswordKeeper::checkHTTPS();
CCanDo::checkAdmin();
$password_id = CValue::getOrSession("password_id");
$password = new CPasswordEntry();
$password->load($password_id);
// Déchiffrement
$revealed = $password->getPassword();
$smarty = new CSmartyDP();
$smarty->assign("revealed", $revealed);
$smarty->display("inc_revealed.tpl");
示例8: CHttpRedirection
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage System
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkAdmin();
$http_redirection_id = CValue::getOrSession("http_redirection_id");
// Récupération de la redirection à ajouter/éditer
$http_redirection = new CHttpRedirection();
$http_redirection->load($http_redirection_id);
// Récupération de la liste des redirections
$http_redirections = $http_redirection->loadList(null, "priority DESC");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("http_redirection", $http_redirection);
$smarty->assign("http_redirections", $http_redirections);
$smarty->display("vw_idx_redirections.tpl");
示例9: CCSVFile
/**
* $Id$
*
* @category DPpatients
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
if (!CAppUI::pref("allowed_modify_identity_status")) {
CAppUI::redirect("m=system&a=access_denied");
}
$number_day = CValue::getOrSession("_number_day", 8);
$number_day = $number_day ?: 8;
$now = CValue::getOrSession("_date_end", CMbDT::date());
$before = CMbDT::date("-{$number_day} DAY", $now);
$csv = new CCSVFile();
$line = array("Date", CAppUI::tr("CPatient.status.PROV"), CAppUI::tr("CPatient.status.DPOT"), CAppUI::tr("CPatient.status.ANOM"), CAppUI::tr("CPatient.status.CACH"), CAppUI::tr("CPatient.status.VALI"));
$csv->writeLine($line);
$results = CPatientStateTools::getPatientStateByDate($before, $now);
$values = array();
for ($i = $number_day; $i >= 0; $i--) {
$values[CMbDT::date("-{$i} DAY", $now)] = array("PROV" => 0, "DPOT" => 0, "ANOM" => 0, "CACH" => 0, "VALI" => 0);
}
foreach ($results as $_result) {
$values[$_result["date"]][$_result["state"]] = $_result["total"];
}
foreach ($values as $_date => $_value) {
$line = array($_date);
$line = array_merge($line, array_values($_value));
示例10: foreach
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage PMSI
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkEdit();
$object_guid = CValue::getOrSession("object_guid");
/** @var CCodable $objet */
$objet = CMbObject::loadFromGuid($object_guid);
$objet->loadRefsActes();
foreach ($objet->_ref_actes_ccam as &$acte) {
$acte->loadRefsFwd();
}
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
$objet->guessActesAssociation();
} else {
foreach ($objet->_ref_actes_ccam as &$acte) {
$acte->guessAssociation();
}
}
$sejour = new CSejour();
if ($objet->_class == "CSejour") {
$sejour = $objet;
} else {
$sejour->_id = $objet->sejour_id;
示例11: CSupervisionTimedPicture
<?php
/**
* $Id: ajax_edit_supervision_timed_picture.php 20428 2013-09-20 12:14:48Z phenxdesign $
*
* @package Mediboard
* @subpackage Patients
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 20428 $
*/
CCanDo::checkAdmin();
$supervision_timed_picture_id = CValue::getOrSession("supervision_timed_picture_id");
$picture = new CSupervisionTimedPicture();
$picture->load($supervision_timed_picture_id);
$picture->loadRefsNotes();
$picture->loadRefsFiles();
$tree = CMbPath::getTree("modules/dPpatients/images/supervision");
$smarty = new CSmartyDP();
$smarty->assign("picture", $picture);
$smarty->assign("tree", $tree);
$smarty->display("inc_edit_supervision_timed_picture.tpl");
示例12:
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage system
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkRead();
$date = CValue::getOrSession("date", CMbDT::date());
$user_id = CValue::getOrSession("user_id");
$interval = CValue::getOrSession("interval", "one-day");
CView::enforceSlave();
CAppUI::requireModuleFile("dPstats", "graph_userlog");
$to = CMbDT::date("+1 DAY", $date);
switch ($interval) {
case "one-day":
$from = CMbDT::date("-1 DAY", $to);
break;
case "one-week":
$from = CMbDT::date("-1 WEEK", $to);
break;
case "height-weeks":
$from = CMbDT::date("-8 WEEK", $to);
break;
case "one-year":
$from = CMbDT::date("-1 YEAR", $to);
break;
示例13: CMediusers
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage SSR
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCando::checkEdit();
$date = CValue::get("date", CMbDT::date());
$kine_id = CValue::getOrSession("kine_id", CAppUI::$instance->user_id);
// Chargement de la liste des utilisateurs
$user = new CMediusers();
$kines = CModule::getActive("dPprescription") ? CFunctionCategoryPrescription::getAllExecutants() : $user->loadKines();
$kine = new CMediusers();
$kine->load($kine_id);
$kine->loadRefIntervenantCdARR();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("kine", $kine);
$smarty->assign("kines", $kines);
$smarty->assign("kine_id", $kine_id);
$smarty->display("vw_kine_board.tpl");
示例14: CSociete
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage Stock
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkEdit();
$societe_id = CValue::getOrSession('societe_id');
$suppliers = CValue::getOrSession('suppliers', 1);
$manufacturers = CValue::getOrSession('manufacturers', 1);
$inactive = CValue::getOrSession('inactive', 1);
// Loads the expected Societe
$societe = new CSociete();
$societe->load($societe_id);
// Smarty template
$smarty = new CSmartyDP();
$smarty->assign('societe', $societe);
$smarty->assign('suppliers', $suppliers);
$smarty->assign('manufacturers', $manufacturers);
$smarty->assign('inactive', $inactive);
$smarty->display('vw_idx_societe.tpl');
示例15: CIntervHorsPlage
CCanDo::checkRead();
$hors_plage = new CIntervHorsPlage();
if (!$hors_plage->canRead()) {
$can->redirect();
}
// Toutes les salles des blocs
$listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ);
// Les salles autorisées
$salle = new CSalle();
$listSalles = $salle->loadListWithPerms(PERM_READ);
// Liste des Etablissements selon Permissions
$etablissements = CMediusers::loadEtablissements(PERM_READ);
// Chargement des prestations
$prestations = CPrestation::loadCurrentList();
$operation_id = CValue::getOrSession("operation_id");
$chir_id = CAppUI::conf("dPplanningOp COperation use_session_praticien") ? CValue::getOrSession("chir_id") : CValue::get("chir_id");
$sejour_id = CValue::get("sejour_id");
$hour_urgence = CValue::get("hour_urgence");
$min_urgence = CValue::get("min_urgence");
$date_urgence = CValue::get("date_urgence");
$salle_id = CValue::get("salle_id");
$patient_id = CValue::get("pat_id");
$grossesse_id = CValue::get("grossesse_id");
$consult_related_id = CValue::get("consult_related_id");
// L'utilisateur est-il un praticien
$user = $chir = CMediusers::get();
if ($chir->isPraticien() and !$chir_id) {
$chir_id = $chir->user_id;
}
// Chargement du praticien
$chir = new CMediusers();