本文整理汇总了PHP中CValue::get方法的典型用法代码示例。如果您正苦于以下问题:PHP CValue::get方法的具体用法?PHP CValue::get怎么用?PHP CValue::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CValue
的用法示例。
在下文中一共展示了CValue::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mbGetObjectFromGet
/**
* Returns the CMbObject with given GET 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 mbGetObjectFromGet($class_key, $id_key, $guid_key = null)
{
$object_class = CValue::get($class_key);
$object_id = CValue::get($id_key);
$object_guid = "{$object_class}-{$object_id}";
if ($guid_key) {
$object_guid = CValue::get($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: onAfterMain
/**
* @see parent::onAfterMain()
*/
function onAfterMain()
{
$cron_log_id = CValue::get("execute_cron_log_id");
if (!$cron_log_id) {
return;
}
//Mise à jour du statut du log suite à l'appel au script
$cron_log = new CCronJobLog();
$cron_log->load($cron_log_id);
if (CCronJobLog::$log) {
$cron_log->status = "error";
$cron_log->error = CCronJobLog::$log;
$cron_log->end_datetime = CMbDT::dateTime();
} else {
$cron_log->status = "finished";
$cron_log->end_datetime = CMbDT::dateTime();
}
$cron_log->store();
}
示例3: buildPartialTables
/**
* Fonction de construction du cache d'info des durées
* d'hospi et d'interv
*
* @param string $tableName Nom de la table de cache
* @param string $tableFields Champs de la table de cache
* @param array $queryFields Liste des champs du select
* @param string $querySelect Chaine contenant les éléments SELECT à utiliser
* @param array $queryWhere Chaine contenant les éléments WHERE à utiliser
*
* @return void
*/
function buildPartialTables($tableName, $tableFields, $queryFields, $querySelect, $queryWhere)
{
$ds = CSQLDataSource::get("std");
$joinedFields = join(", ", $queryFields);
// Intervale de temps
$intervalle = CValue::get("intervalle");
switch ($intervalle) {
case "month":
$deb = CMbDT::date("-1 month");
break;
case "6month":
$deb = CMbDT::date("-6 month");
break;
case "year":
$deb = CMbDT::date("-1 year");
break;
default:
$deb = CMbDT::date("-10 year");
}
$fin = CMbDT::date();
// Suppression si existe
$drop = "DROP TABLE IF EXISTS `{$tableName}`";
$ds->exec($drop);
// Création de la table partielle
$create = "CREATE TABLE `{$tableName}` (" . "\n`chir_id` int(11) unsigned NOT NULL default '0'," . "{$tableFields}" . "\n`ccam` varchar(255) NOT NULL default ''," . "\nKEY `chir_id` (`chir_id`)," . "\nKEY `ccam` (`ccam`)" . "\n) /*! ENGINE=MyISAM */;";
$ds->exec($create);
// Remplissage de la table partielle
$query = "INSERT INTO `{$tableName}` ({$joinedFields}, `chir_id`, `ccam`)\r\n SELECT {$querySelect}\r\n operations.chir_id,\r\n operations.codes_ccam AS ccam\r\n FROM operations\r\n LEFT JOIN users\r\n ON operations.chir_id = users.user_id\r\n LEFT JOIN plagesop\r\n ON operations.plageop_id = plagesop.plageop_id\r\n WHERE operations.annulee = '0'\r\n {$queryWhere}\r\n AND operations.date BETWEEN '{$deb}' AND '{$fin}'\r\n GROUP BY operations.chir_id, ccam\r\n ORDER BY ccam;";
$ds->exec($query);
CAppUI::stepAjax("Nombre de valeurs pour la table '{$tableName}': " . $ds->affectedRows(), UI_MSG_OK);
// Insert dans la table principale si vide
if (!$ds->loadResult("SELECT COUNT(*) FROM temps_op")) {
$query = "INSERT INTO temps_op ({$joinedFields}, `chir_id`, `ccam`)\r\n SELECT {$joinedFields}, `chir_id`, `ccam`\r\n FROM {$tableName}";
$ds->exec($query);
} else {
$query = "UPDATE temps_op, {$tableName} SET ";
foreach ($queryFields as $queryField) {
$query .= "\ntemps_op.{$queryField} = {$tableName}.{$queryField}, ";
}
$query .= "temps_op.chir_id = {$tableName}.chir_id" . "\nWHERE temps_op.chir_id = {$tableName}.chir_id" . "\nAND temps_op.ccam = {$tableName}.ccam";
$ds->exec($query);
}
}
示例4: 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);
}
示例5: 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;
示例6: fopen
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage dPfacturation
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
$out = fopen('php://output', 'w');
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="ExportCompta.xls"');
$facture_class = CValue::get("facture_class", 'CFactureEtablissement');
$factures_id = CValue::get("factures", array());
$factures_id = explode("|", $factures_id);
$where = array();
$where["facture_id"] = CSQLDataSource::prepareIn(array_values($factures_id));
$facture = new $facture_class();
$factures = $facture->loadList($where);
// Ligne d'entête
$fields = array();
$fields[] = "Date";
$fields[] = "Facture";
$fields[] = "Patient";
$fields[] = "Montant";
fputcsv($out, $fields, ';');
foreach ($factures as $_facture) {
/* @var CFactureEtablissement $_facture*/
$_facture->loadRefPatient();
示例7: CSejour
<?php
/**
* $Id$
*
* @category Soins
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkEdit();
$consult_id = CValue::get("consult_id", 0);
$sejour_id = CValue::get("sejour_id", 0);
$chir_id = CValue::get("chir_id", 0);
$sejour = new CSejour();
$sejour->load($sejour_id);
if ($sejour->_id) {
$chir = new CMediusers();
if ($chir_id) {
$chir->load($chir_id);
} else {
$chir->load($sejour->praticien_id);
}
$sejour->loadRefPraticien();
$sejour->loadRefsActes();
$sejour->updateFormFields();
$sejour->_datetime = CMbDT::dateTime();
// Récupération des tarifs
/** @var CTarif $tarif */
$tarif = new CTarif();
示例8: CPlageconsult
// Initialisation des variables
$plageconsult_id = CValue::get("plageconsult_id");
$consult_id = CValue::get("consult_id");
$slot_id = CValue::get("slot_id");
$heure = CValue::get("heure");
$multiple = CValue::get("multipleMode", false);
$display_nb_consult = CAppUI::conf("dPcabinet display_nb_consult");
$quotas = null;
// Récupération des consultations de la plage séléctionnée
$plage = new CPlageconsult();
if ($plageconsult_id) {
$plage->load($plageconsult_id);
$plage->loadRefsNotes();
$date = $plage->date;
} else {
$date = CValue::get("date", CMbDT::date());
}
// consultation précise
$consultation_target = new CConsultation();
if ($consult_id) {
$consultation_target->load($consult_id);
} elseif ($heure) {
$consultation_target->heure = $heure;
}
$consultation_target->loadRefElementPrescription();
// Chargement des places disponibles
$listPlace = array();
$listBefore = array();
$listAfter = array();
$next_plage = $previous_plage = new CPlageconsult();
$function_id = null;
示例9: intval
<?php
/**
* View functions
*
* @category Mediusers
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version SVN: $Id$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$page = intval(CValue::get('page', 0));
$inactif = CValue::get("inactif", array());
$type = CValue::get("type");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("inactif", $inactif);
$smarty->assign("page", $page);
$smarty->assign("type", $type);
$smarty->display("vw_idx_functions.tpl");
示例10: array
<?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();
$service_id = CValue::get('service_id');
$keywords = CValue::get('keywords');
$limit = CValue::get('limit');
// Service's stocks
$where = array();
if ($service_id) {
$where['product_stock_service.object_id'] = " = '{$service_id}'";
$where['product_stock_service.object_class'] = " = 'CService'";
// XXX
}
if ($keywords) {
$where[] = "product.code LIKE '%{$keywords}%' OR \r\n product.name LIKE '%{$keywords}%' OR \r\n product.description LIKE '%{$keywords}%'";
}
$orderby = 'product.name ASC';
$leftjoin = array();
$leftjoin['product'] = 'product.product_id = product_stock_service.product_id';
// product to stock
$stock = new CProductStockService();
$list_stocks_count = $stock->countList($where, null, $leftjoin);
示例11: CConsultation
* $Id$
*
* @category Admissions
* @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();
//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();
示例12: CActeNGAP
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage Cabinet
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkRead();
$acte = new CActeNGAP();
$acte->quantite = CValue::get("quantite", "1");
$acte->code = CValue::get("code");
$acte->coefficient = CValue::get("coefficient", "1");
$acte->demi = CValue::get("demi");
$acte->complement = CValue::get("complement");
$acte->executant_id = CValue::get('executant_id');
$acte->gratuit = CValue::get('gratuit');
$acte->updateMontantBase();
$acte->getLibelle();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("acte", $acte);
$smarty->display("inc_vw_tarif_ngap.tpl");
示例13: array
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage Qualite
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
$ei_categorie_id = CValue::get("categorie_id");
$items = array();
if ($ei_categorie_id) {
$where = array();
$where["ei_categorie_id"] = " = '{$ei_categorie_id}'";
$item = new CEiItem();
$items = $item->loadList($where);
}
$smarty = new CSmartyDP();
$smarty->assign("items", $items);
$smarty->display("ajax_list_items.tpl");
示例14: COUNT
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage PlanningOp
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
$type = CValue::get("type", 'check_entree');
$ds = CSQLDataSource::get("std");
$result = "";
switch ($type) {
case 'check_entree':
$message = " entrée(s) erronée(s)";
$sql = "SELECT COUNT(*) AS total \n FROM `sejour`\n WHERE `sejour`.`entree` != IF(`sejour`.`entree_reelle`,`sejour`.`entree_reelle`,`sejour`.`entree_prevue`)";
$result = $ds->loadResult($sql);
break;
case 'check_sortie':
$message = " sortie(s) erronnée(s)";
$sql = "SELECT COUNT(*) AS total \n FROM `sejour`\n WHERE `sejour`.`sortie` != IF(`sejour`.`sortie_reelle`,`sejour`.`sortie_reelle`,`sejour`.`sortie_prevue`)";
$result = $ds->loadResult($sql);
break;
case 'fix_entree':
$message = " entrée(s) corrigée(s)";
$sql = "UPDATE `sejour` SET\n `sejour`.`entree` = IF(`sejour`.`entree_reelle`,`sejour`.`entree_reelle`,`sejour`.`entree_prevue`)\n WHERE `sejour`.`entree` != IF(`sejour`.`entree_reelle`,`sejour`.`entree_reelle`,`sejour`.`entree_prevue`)";
$ds->query($sql);
$result = $ds->affectedRows();
break;
示例15: COperation
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage SalleOp
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkRead();
$operation_id = CValue::get("operation_id");
$operation = new COperation();
$operation->load($operation_id);
$sejour = $operation->loadRefSejour();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sejour", $sejour);
$smarty->assign("operation", $operation);
$smarty->display("inc_vw_surveillance_perop_administration.tpl");