本文整理汇总了PHP中CValue::setSession方法的典型用法代码示例。如果您正苦于以下问题:PHP CValue::setSession方法的具体用法?PHP CValue::setSession怎么用?PHP CValue::setSession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CValue
的用法示例。
在下文中一共展示了CValue::setSession方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doStore
/**
* Store
*
* @return void
*/
function doStore()
{
// keep track of former values for fieldModified below
$obj = $this->_obj;
$old = $obj->loadOldObject();
if ($msg = $obj->store()) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
if ($this->redirectError) {
CAppUI::redirect($this->redirectError);
}
} else {
// Keep trace for redirections
CValue::setSession($this->objectKey, $obj->_id);
// Insert new group and function permission
if ($obj->fieldModified("function_id") || !$old->_id) {
$obj->insFunctionPermission();
$obj->insGroupPermission();
}
// Message
CAppUI::setMsg($old->_id ? $this->modifyMsg : $this->createMsg, UI_MSG_OK);
// Redirection
if ($this->redirectStore) {
CAppUI::redirect($this->redirectStore);
}
}
}
示例2: redirect
/**
* Redirection facility
*
* @param string $action Action view
* @param string $params HTTP GET styled paramters
*
* @return void
*/
function redirect($action = "access_denied", $params = null)
{
global $actionType;
// on passe a null soit "tab" soit "a" selon ou l'on se trouve
CValue::setSession($actionType);
if ($this->setValues) {
if (is_scalar($this->setValues)) {
CValue::setSession($this->setValues);
} else {
foreach ($this->setValues as $key => $value) {
CValue::setSession($key, $value);
}
}
}
$action_params = "";
foreach (array("wsdl", "info", "ajax", "raw", "dialog") as $_action_type) {
$_action_flag = CValue::get($_action_type);
if ($_action_flag) {
$action_params .= "&{$_action_type}={$_action_flag}";
}
}
$context_param = $this->context ? "&context={$this->context}" : "";
CAppUI::redirect("m=system&a={$action}" . $context_param . $action_params . $params);
}
示例3: abs
$praticien_id = CValue::getOrSession("planning_chir_id");
$scroll_top = CValue::get("scroll_top", null);
$bloc_id = CValue::getOrSession("bloc_id");
$show_cancelled = CValue::getOrSession("show_cancelled", 0);
$show_operations = CValue::getOrSession("show_operations", 1);
$days_limit_future = abs(CAppUI::pref("planning_resa_days_limit"));
$max_date_planning = CMbDT::date("+ {$days_limit_future} DAYS", $today);
if ($date_planning > $today && $days_limit_future != 0 && $date_planning > $max_date_planning) {
$date_planning = $max_date_planning;
}
$days_limit_past = abs(CAppUI::pref("planning_resa_past_days_limit"));
$min_date_planning = CMbDT::date("- {$days_limit_past} DAYS", $today);
if ($date_planning < $today && $days_limit_past != 0 && $date_planning < $min_date_planning) {
$date_planning = $min_date_planning;
}
CValue::setSession("date_planning", $date_planning);
//alerts
$nbIntervHorsPlage = 0;
$nbIntervNonPlacees = 0;
$nbAlertesInterv = 0;
$debut = $fin = $date_planning;
$bloc = new CBlocOperatoire();
$where = array();
if ($bloc_id) {
$where["bloc_operatoire_id"] = " = '{$bloc_id}'";
}
$where["group_id"] = " = '{$group->_id}' ";
/** @var CBlocOperatoire[] $blocs */
$blocs = $bloc->loadList($where);
CStoredObject::filterByPerm($blocs, PERM_READ);
if (count($blocs) == 1) {
示例4: CDocGed
$theme_id = CValue::getOrSession("theme_id");
$chapitre_id = CValue::getOrSession("chapitre_id");
$sort_by = CValue::getOrSession("sort_by", "date");
$sort_way = CValue::getOrSession("sort_way", "DESC");
$docGed = new CDocGed();
if (!$docGed->load($doc_ged_id)) {
// Ce document n'est pas valide
$doc_ged_id = null;
CValue::setSession("doc_ged_id");
$docGed = new CDocGed();
} else {
$docGed->loadLastActif();
if (!$docGed->_lastactif->doc_ged_suivi_id || $docGed->annule) {
// Ce document n'est pas Terminé ou est suspendu
$doc_ged_id = null;
CValue::setSession("doc_ged_id");
$docGed = new CDocGed();
} else {
$docGed->_lastactif->loadFile();
$docGed->loadRefs();
}
}
$group = CGroups::loadCurrent();
// Liste des Thèmes
$theme = new CThemeDoc();
$where = array();
$where[] = "group_id = '{$group->_id}' OR group_id IS NULL";
/** @var CThemeDoc[] $listThemes */
$listThemes = $theme->loadlist($where, "nom");
// Liste des chapitres
$chapitre = new CChapitreDoc();
示例5: CConsultation
CCanDo::checkRead();
//Initialisations des variables
$date = CValue::getOrSession("date", CMbDT::date());
$today = CMbDT::date();
$hour = CMbDT::time(null);
$board = CValue::get("board", 1);
$boardItem = CValue::get("boardItem", 1);
$consult = new CConsultation();
// Récupération des fonctions
$cabinets = CMediusers::loadFonctions();
// Récupération de la liste des anesthésistes
$mediuser = new CMediusers();
$anesthesistes = $mediuser->loadAnesthesistes(PERM_READ);
if ($consult->consultation_id) {
$date = $consult->_ref_plageconsult->date;
CValue::setSession("date", $date);
}
// Récupération des plages de consultation du jour et chargement des références
$listPlages = array();
foreach ($anesthesistes as $anesth) {
$listPlages[$anesth->_id]["anesthesiste"] = $anesth;
$plage = new CPlageconsult();
$where = array();
$where["chir_id"] = "= '{$anesth->_id}'";
$where["date"] = "= '{$date}'";
$order = "debut";
$listPlage = $plage->loadList($where, $order);
if (count($listPlage)) {
$listPlages[$anesth->_id]["plages"] = $listPlage;
} else {
unset($listPlages[$anesth->_id]);
示例6: array
* @version $Revision$
*/
CCanDo::checkRead();
$user = CUser::get();
$type = CValue::get("type");
$first = CValue::get("first");
$selected_user_id = CValue::get("selected_user_id");
$selected_service_valid_user_id = CValue::get("selected_service_valid_user_id");
$elem_concerne = CValue::get("elem_concerne");
$evenements = CValue::get("evenements");
$filter_item = CValue::get("filter_item");
CValue::setSession("selected_user_id", $selected_user_id);
CValue::setSession("selected_service_valid_user_id", $selected_service_valid_user_id);
CValue::setSession("elem_concerne", $elem_concerne);
CValue::setSession("evenements", $evenements);
CValue::setSession("filter_item", $filter_item);
$selected_fiche_id = CValue::getOrSession("selected_fiche_id");
$where = array();
if ($elem_concerne) {
$where["fiches_ei.elem_concerne"] = "= '{$elem_concerne}'";
}
if ($selected_user_id) {
$where["fiches_ei.user_id"] = "= '{$selected_user_id}'";
}
if ($selected_service_valid_user_id) {
$where["fiches_ei.service_valid_user_id"] = "= '{$selected_service_valid_user_id}'";
}
$user_id = null;
if ($type == "AUTHOR" || CCanDo::edit() && !CCanDo::admin()) {
$user_id = $user->_id;
}
示例7: checkVIP
/**
* Calcul l'aspect confidentiel du patient
*
* @return bool on a accès ou pas
*/
function checkVIP()
{
if ($this->_vip !== null) {
return;
}
$this->_vip = false;
$user = CMediusers::get();
if ($this->vip && !CModule::getCanDo("dPpatient")->admin()) {
// Test si le praticien est présent dans son dossier
$praticiens = $this->loadRefsPraticiens();
$user_in_list_prat = array_key_exists($user->_id, $praticiens);
// Test si un l'utilisateur est présent dans les logs
$user_in_logs = false;
$this->loadLogs();
foreach ($this->_ref_logs as $_log) {
if ($user->_id == $_log->user_id) {
$user_in_logs = true;
break;
}
}
$this->_vip = !$user_in_list_prat && !$user_in_logs;
}
if ($this->_vip) {
CValue::setSession("patient_id", 0);
}
}
示例8: CRPU
global $m, $tab;
CAppUI::setMsg("Ce RPU n'est pas ou plus disponible", UI_MSG_WARNING);
CAppUI::redirect("m={$m}&tab={$tab}&rpu_id=0");
}
// Création d'un RPU pour un séjour existant
if ($sejour_id) {
$rpu = new CRPU();
$rpu->sejour_id = $sejour_id;
$rpu->loadMatchingObject();
$rpu->updateFormFields();
}
if ($rpu->_id || $rpu->sejour_id) {
// Mise en session de l'id de la consultation, si elle existe.
$rpu->loadRefConsult();
if ($rpu->_ref_consult->_id) {
CValue::setSession("selConsult", $rpu->_ref_consult->_id);
}
$sejour = $rpu->_ref_sejour;
$sejour->loadNDA();
$sejour->loadRefPraticien(1);
$sejour->loadRefsNotes();
} else {
$rpu->_entree = CMbDT::dateTime();
$sejour = new CSejour();
}
$rpu->loadRefMotif();
$rpu->orderCtes();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("rpu", $rpu);
$smarty->display("inc_form_complement.tpl");
示例9: array
$ex_class_id = CValue::get("ex_class_id");
$target_element = CValue::get("target_element");
$other_container = CValue::get("other_container");
$print = CValue::get("print");
$start = CValue::get("start", 0);
$limit = CValue::get("limit");
$only_host = CValue::get("only_host");
$readonly = CValue::get("readonly");
// Search mode
$search_mode = CValue::get("search_mode", 0);
$date_min = CValue::get("date_min");
$date_max = CValue::get("date_max");
$group_id = CValue::get("group_id");
$concept_search = CValue::get("concept_search");
CValue::setSession('reference_class', $reference_class);
CValue::setSession('reference_id', $reference_id);
if ($reference_class) {
/** @var CMbObject $reference */
$reference = new $reference_class();
if ($reference_id) {
$reference->load($reference_id);
}
} else {
$reference = null;
}
CExClassField::$_load_lite = true;
CExObject::$_multiple_load = true;
CExObject::$_load_lite = $detail < 2;
$group_id = $group_id ? $group_id : CGroups::loadCurrent()->_id;
$where = array("group_id = '{$group_id}' OR group_id IS NULL");
if ($ex_class_id) {
示例10: CExchangeFTP
* @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();
$echange_ftp_id = CValue::get("echange_ftp_id");
$page = CValue::get('page', 0);
$now = CMbDT::date();
$_date_min = CValue::getOrSession('_date_min', CMbDT::dateTime("-7 day"));
$_date_max = CValue::getOrSession('_date_max', CMbDT::dateTime("+1 day"));
$function = CValue::getOrSession("function");
CValue::setSession("_date_min", $_date_min);
CValue::setSession("_date_max", $_date_max);
CValue::setSession("function", $function);
// Chargement de l'échange FTP demandé
$exchange_ftp = new CExchangeFTP();
$exchange_ftp->load($echange_ftp_id);
if ($exchange_ftp->_id) {
$exchange_ftp->loadRefs();
$exchange_ftp->input = unserialize($exchange_ftp->input);
if ($exchange_ftp->ftp_fault != 1) {
$exchange_ftp->output = unserialize($exchange_ftp->output);
}
}
// Récupération de la liste des echanges SOAP
$itemExchangeFTP = new CExchangeFTP();
$where = array();
if ($_date_min && $_date_max) {
$exchange_ftp->_date_min = $_date_min;
示例11: array
* @version SVN: $Id: vw_find_code.php 27313 2015-02-25 13:23:18Z flaviencrochard $
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$lang = CValue::getOrSession("lang", CCodeCIM10::LANG_FR);
$code = CValue::getOrSession("code", "");
$keys = CValue::getOrSession("keys", "");
$level1 = CValue::getOrSession("level1", "");
$level2 = CValue::getOrSession("level2", "");
if (CValue::session("code") || CValue::session("keys")) {
$level1 = "";
CValue::setSession("level1");
}
if (!$level1) {
$level2 = "";
CValue::setSession("level2");
}
$cim10 = new CCodeCIM10();
$listLevel1 = $cim10->getSommaire($lang);
$listLevel2 = array();
$master = array();
$keys = trim($keys);
$code = trim($code);
if ($code || $keys) {
$master = $cim10->findCodes($code, $keys, $lang);
} elseif ($level2) {
$listLevel2 = $cim10->getSubCodes($level1, $lang);
$master = $cim10->getSubCodes($level2, $lang);
} elseif ($level1) {
$listLevel2 = $cim10->getSubCodes($level1, $lang);
$master = $listLevel2;
示例12: array
}
$one_field = false || $one_field_presc;
$one_field_traitement = false;
$one_field_atcd = false;
$sejour_filled = false;
$consult_filled = false;
$interv_filled = false;
$from = null;
$to = null;
$data = array();
foreach ($fields as $_class => $_fields) {
$data[$_class] = array_intersect_key($_GET, $_fields);
$object = new $_class();
$prefix = $object->_spec->table;
foreach ($data[$_class] as $_field => $_value) {
CValue::setSession($_field, $_value);
if ($_value !== "") {
$one_field = true;
}
if ($_value === "" || !$_fields[$_field]) {
continue;
}
switch ($_fields[$_field]) {
case "=":
$where["{$prefix}.{$_field}"] = $ds->prepare(" = % ", $_value);
break;
default:
$where["{$prefix}.{$_field}"] = $ds->prepareLike("%{$_value}%");
}
}
}
示例13: array
$datetime_max = CValue::get("_datetime_max");
$order_by = CValue::get("order_by");
$group_similar = CValue::get("group_similar", "similar");
$user_id = CValue::get("user_id");
$human = CValue::get("human");
$robot = CValue::get("robot");
CValue::setSession("error_type", $error_type);
CValue::setSession("text", $text);
CValue::setSession("server_ip", $server_ip);
CValue::setSession("_datetime_min", $datetime_min);
CValue::setSession("_datetime_max", $datetime_max);
CValue::setSession("order_by", $order_by);
CValue::setSession("group_similar", $group_similar);
CValue::setSession("user_id", $user_id);
CValue::setSession("human", $human);
CValue::setSession("robot", $robot);
CView::enforceSlave();
$where = array();
$error_log = new CErrorLog();
$spec = $error_log->_spec;
$ds = $spec->ds;
if (($human || $robot) && !($human && $robot)) {
$tag = CMediusers::getTagSoftware();
$robots = array();
if ($tag) {
$query = "SELECT users.user_id\r\n FROM users\r\n LEFT JOIN id_sante400 ON users.user_id = id_sante400.object_id\r\n WHERE (id_sante400.object_class = 'CMediusers'\r\n AND id_sante400.tag = ?)\r\n OR users.dont_log_connection = '1'\r\n GROUP BY users.user_id";
$query = $ds->prepare($query, $tag);
} else {
$query = "SELECT users.user_id\r\n FROM users\r\n WHERE users.dont_log_connection = '1'";
}
$robots = $ds->loadColumn($query);
示例14: stripslashes
* $Id$
*
* @category Hprimsante
* @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();
$message_string = CValue::post("message");
if (!$message_string) {
return;
}
$message_string = stripslashes($message_string);
CValue::setSession("message", $message_string);
try {
$message = new CHPrimSanteMessage();
$message->parse($message_string);
$message->_errors_msg = !$message->isOK(CHL7v2Error::E_ERROR);
$message->_warnings_msg = !$message->isOK(CHL7v2Error::E_WARNING);
$message->_xml = CMbString::highlightCode("xml", $message->toXML()->saveXML());
} catch (CHL7v2Exception $e) {
CAppUI::stepMessage(UI_MSG_ERROR, $e->getMessage() . " (" . $e->extraData . ")");
return;
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("message", $message);
$smarty->assign("key", "input");
$smarty->display("inc_display_hprim_message.tpl");
示例15: array
* @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::checkRead();
$category_id = CValue::getOrSession('category_id');
$societe_id = CValue::getOrSession('societe_id');
$product_id = CValue::getOrSession('product_id');
$start = CValue::getOrSession('start');
$keywords = CValue::getOrSession('keywords');
$letter = CValue::getOrSession('letter', "%");
$show_all = CValue::get('show_all');
// Don't user getOrSession as we don't want to get it from session
CValue::setSession("show_all", $show_all);
$where = array();
$where["name"] = $letter === "#" ? "RLIKE '^[^A-Z]'" : "LIKE '{$letter}%'";
if ($category_id) {
$where['category_id'] = " = '{$category_id}'";
}
if ($societe_id) {
$where['societe_id'] = " = '{$societe_id}'";
}
if ($keywords) {
$where[] = "`code` LIKE '%{$keywords}%' OR \r\n `name` LIKE '%{$keywords}%' OR \r\n `classe_comptable` LIKE '%{$keywords}%' OR \r\n `description` LIKE '%{$keywords}%'";
}
if (!$show_all) {
$where[] = "cancelled = '0' OR cancelled IS NULL";
}
$orderby = 'name, code';