当前位置: 首页>>代码示例>>PHP>>正文


PHP COperation::store方法代码示例

本文整理汇总了PHP中COperation::store方法的典型用法代码示例。如果您正苦于以下问题:PHP COperation::store方法的具体用法?PHP COperation::store怎么用?PHP COperation::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在COperation的用法示例。


在下文中一共展示了COperation::store方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CViewAccessToken

    $exchange_source->setRecipient($email);
    // Création du token
    $token = new CViewAccessToken();
    $token->ttl_hours = 24;
    $token->user_id = $praticien->_id;
    $token->params = "m=planningOp&a=vw_edit_urgence&operation_id={$operation_id}";
    if ($msg = $token->store()) {
        CAppUI::displayAjaxMsg($msg, UI_MSG_ERROR);
    }
    $url = $token->getUrl();
    // Lien vers la DHE
    $subject = CAppUI::conf("reservation subject_mail");
    $content = CAppUI::conf("reservation text_mail");
    $from = array("[URL]", "[PRATICIEN - NOM]", "[PRATICIEN - PRENOM]", "[DATE INTERVENTION]", "[HEURE INTERVENTION]");
    $to = array($url, $praticien->_user_last_name, $praticien->_user_first_name, CMbDT::dateToLocale(CMbDT::date($operation->_datetime_best)), CMbDT::transform($operation->_datetime_best, null, CAppUI::conf("time")));
    $subject = str_replace($from, $to, $subject);
    $exchange_source->setSubject($subject);
    $content = str_replace($from, $to, $content);
    $content = nl2br(utf8_encode($content));
    $exchange_source->setBody($content);
    $exchange_source->send();
    $operation->envoi_mail = CMbDT::dateTime();
    if ($msg = $operation->store()) {
        CAppUI::displayAjaxMsg($msg, UI_MSG_ERROR);
    }
    CAppUI::displayAjaxMsg("Message envoyé");
} catch (phpmailerException $e) {
    CAppUI::displayAjaxMsg($e->errorMessage(), UI_MSG_WARNING);
} catch (CMbException $e) {
    $e->stepAjax();
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_send_mail.php

示例2: reorderOp

 /** 
  * Mise à jour des horaires en fonction de l'ordre des operations, 
  * et mise a jour des rank, de sorte qu'ils soient consecutifs
  *
  * @param int $action action
  *
  * @return bool
  */
 function reorderOp($action = null)
 {
     $this->completeField("debut", "temps_inter_op", "date");
     if (!count($this->_ref_operations)) {
         $with_cancelled = CAppUI::conf("dPplanningOp COperation save_rank_annulee_validee");
         $this->loadRefsOperations($with_cancelled, "rank, rank_voulu, horaire_voulu", true);
     }
     $new_time = $this->debut;
     $plage_multipraticien = $this->spec_id && !$this->unique_chir;
     $prev_op = new COperation();
     $i = 0;
     foreach ($this->_ref_operations as $op) {
         // Intervention deja validée ou si on veut valider
         if ($op->rank || $action & self::RANK_VALIDATE) {
             $op->rank = ++$i;
             // Creation des pauses si plage multi-praticien
             if ($plage_multipraticien && $action & self::RANK_VALIDATE) {
                 if ($prev_op->_id) {
                     $op->time_operation = max($new_time, $op->horaire_voulu);
                     $prev_op->pause = CMbDT::subTime($new_time, $op->time_operation);
                     $prev_op->store(false);
                 } else {
                     $op->time_operation = $new_time;
                 }
                 $prev_op = $op;
             } else {
                 $op->time_operation = $new_time;
             }
             // Pour faire suivre un changement de salle
             if ($this->salle_id && $this->fieldModified("salle_id")) {
                 $op->salle_id = $this->salle_id;
             }
         } elseif (!$plage_multipraticien && $action & self::RANK_REORDER && ($op->horaire_voulu || $this->_reorder_up_to_interv_id)) {
             // Plage monopraticien
             $op->rank_voulu = ++$i;
             $op->horaire_voulu = $new_time;
         }
         if ($this->_reorder_up_to_interv_id == $op->_id) {
             $this->_reorder_up_to_interv_id = null;
         }
         $op->updateFormFields();
         $op->store(false);
         // Durée de l'operation
         // + durée entre les operations
         // + durée de pause
         $new_time = CMbDT::addTime($op->temp_operation, $new_time);
         $new_time = CMbDT::addTime($this->temps_inter_op, $new_time);
         $new_time = CMbDT::addTime($op->pause, $new_time);
     }
     return true;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:59,代码来源:CPlageOp.class.php

示例3: updatePlainFields

 /**
  * @see parent::updatePlainFields()
  */
 function updatePlainFields()
 {
     if (is_array($this->_codes_ccam) && count($this->_codes_ccam)) {
         $this->codes_ccam = implode("|", $this->_codes_ccam);
     }
     if ($this->codes_ccam) {
         $this->codes_ccam = strtoupper($this->codes_ccam);
         $codes_ccam = explode("|", $this->codes_ccam);
         $XPosition = true;
         // @TODO: change it to use removeValue
         while ($XPosition !== false) {
             $XPosition = array_search("-", $codes_ccam);
             if ($XPosition !== false) {
                 array_splice($codes_ccam, $XPosition, 1);
             }
         }
         $this->codes_ccam = implode("|", $codes_ccam);
     }
     if ($this->_time_op !== null) {
         $this->temp_operation = $this->_time_op;
     }
     if ($this->_time_urgence !== null) {
         $this->time_operation = $this->_time_urgence;
     } elseif ($this->_horaire_voulu) {
         $this->horaire_voulu = $this->_horaire_voulu;
     }
     $this->completeField('rank', 'plageop_id');
     if ($this->_move) {
         $op = new COperation();
         $op->plageop_id = $this->plageop_id;
         switch ($this->_move) {
             case 'before':
                 $op->rank = $this->rank - 1;
                 if ($op->loadMatchingObject()) {
                     $op->rank = $this->rank;
                     $op->store(false);
                     $this->rank -= 1;
                 }
                 break;
             case 'after':
                 $op->rank = $this->rank + 1;
                 if ($op->loadMatchingObject()) {
                     $op->rank = $this->rank;
                     $op->store(false);
                     $this->rank += 1;
                 }
                 break;
             case 'out':
                 $this->rank = 0;
                 $this->time_operation = '00:00:00';
                 $this->pause = '00:00:00';
                 break;
             case 'last':
                 if ($op->loadMatchingObject('rank DESC')) {
                     $this->rank = $op->rank + 1;
                 }
                 break;
             default:
         }
         $this->_reorder_rank_voulu = true;
         $this->_move = null;
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:66,代码来源:COperation.class.php

示例4: COperation

<?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$
 */
$copy_operation_id = CValue::post("copy_operation_id");
$date = CValue::post("date");
$salle_id = CValue::post("salle_id");
$sejour_id = CValue::post("sejour_id");
$time_operation = CValue::post("time_operation");
$operation = new COperation();
$operation->load($copy_operation_id);
$operation->_id = $operation->_time_urgence = null;
$operation->date = $date;
$operation->salle_id = $salle_id;
$operation->sejour_id = $sejour_id;
$operation->time_operation = $time_operation;
$msg = $operation->store();
CAppUI::setMsg($msg ? $msg : CAppUI::tr("COperation-msg-modify"), $msg ? UI_MSG_ERROR : UI_MSG_OK);
CAppUI::getMsg();
CApp::rip();
开发者ID:fbone,项目名称:mediboard4,代码行数:27,代码来源:do_copy_operation.php


注:本文中的COperation::store方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。