Example #1
0
<?php

/**
 * $Id$
 *  
 * @package    Mediboard
 * @subpackage messagerie
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$account_id = CValue::get('account_id');
$mail_id = Cvalue::get('mail_id');
$reply_to_id = CValue::get('reply_to_id');
$answer_to_all = CValue::get('answer_to_all');
$account = new CSourcePOP();
$account->load($account_id);
$smtp = CExchangeSource::get("mediuser-{$account->object_id}", 'smtp');
if (!$smtp->_id) {
    $smarty = new CSmartyDP();
    $smarty->assign('msg', CAppUI::tr('CUserMail-msg-no_smtp_source_linked_to_pop_account'));
    $smarty->assign('type', 'error');
    $smarty->assign('modal', 1);
    $smarty->assign('close_modal', 1);
    $smarty->display('inc_display_msg.tpl');
    CApp::rip();
}
$mail = new CUserMail();
if ($mail_id) {
    $mail->load($mail_id);
 /**
  * @see parent::store()
  */
 function store()
 {
     if ($this->_move && $this->_id) {
         $this->completeField("ex_class_id");
         $groups = $this->loadRefExClass()->loadRefsGroups();
         $groups_ids = array_keys($groups);
         $self_index = array_search($this->_id, $groups_ids);
         $signs = array("before" => -1, "after" => +1);
         $sign = Cvalue::read($signs, $this->_move);
         // Si signe valide et que l'index existe
         if ($sign && isset($groups_ids[$self_index + $sign])) {
             list($groups_ids[$self_index + $sign], $groups_ids[$self_index]) = array($groups_ids[$self_index], $groups_ids[$self_index + $sign]);
             $new_groups = array();
             foreach ($groups_ids as $id) {
                 $new_groups[$id] = $groups[$id];
             }
             $i = 1;
             foreach ($new_groups as $_group) {
                 if ($_group->_id == $this->_id) {
                     $this->rank = $i;
                 } else {
                     $_group->rank = $i;
                     $_group->store();
                 }
                 $i++;
             }
         }
     }
     return parent::store();
 }
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Board
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$chir = null;
$mediuser = CMediusers::get();
if ($mediuser->isPraticien()) {
    $chir = $mediuser;
}
$chirSel = CValue::getOrSession("praticien_id", $chir ? $chir->user_id : null);
$all_prats = CValue::get("all_prats", 0);
$fin = CValue::getOrSession("fin", CMbDT::date());
$debut = CValue::getOrSession("debut", CMbDT::date("-1 week", $fin));
$interv_with_no_codes = CValue::get('interv_with_no_codes', 1);
$display_not_exported = Cvalue::get('display_not_exported', 0);
if (!$all_prats) {
    CAppUI::requireModuleFile("dPboard", "inc_board");
}
$smarty = new CSmartyDP();
$smarty->assign("chirSel", $chirSel);
$smarty->assign("debut", $debut);
$smarty->assign("fin", $fin);
$smarty->assign("all_prats", $all_prats);
$smarty->assign('interv_with_no_codes', $interv_with_no_codes);
$smarty->assign('display_not_exported', $display_not_exported);
$smarty->display("../../dPboard/templates/inc_vw_interv_non_cotees.tpl");
<?php

/**
 * $Id$
 *  
 * @package    Mediboard
 * @subpackage messagerie
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
CCando::checkRead();
$account_id = Cvalue::get('account_id');
$counts = array(array('name' => 'inbox', 'count' => CUserMail::countUnread($account_id)), array('name' => 'archived', 'count' => CUserMail::countArchived($account_id)), array('name' => 'sentbox', 'count' => CUserMail::countSent($account_id)), array('name' => 'favorites', 'count' => CUserMail::countFavorites($account_id)), array('name' => 'drafts', 'count' => CUserMail::countDrafted($account_id)));
echo json_encode($counts);
Example #5
0
/**
 * $Id$
 *  
 * @package    Mediboard
 * @subpackage ccam
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$codable_id = Cvalue::post('codable_id');
$codable_class = CValue::post('codable_class');
$praticien_id = Cvalue::post('praticien_id');
$date = Cvalue::post('date');
$user_password = CValue::post('user_password');
$lock_all_codages = Cvalue::post('lock_all_codages', 0);
$lock = CValue::post('lock', 1);
$codage = new CCodageCCAM();
$codage->praticien_id = $praticien_id;
$codage->codable_class = $codable_class;
$codage->codable_id = $codable_id;
if ($date && !$lock_all_codages) {
    $codage->date = $date;
}
$codages = $codage->loadMatchingList();
$user = CMediusers::get();
if (CAppUI::conf('ccam CCodable lock_codage_ccam') != 'password' || CAppUI::conf('ccam CCodable lock_codage_ccam') == 'password' && $user->_id && CUser::checkPassword($user->_user_username, $user_password)) {
    foreach ($codages as $_codage) {
        $_codage->locked = $lock;
        $_codage->store();
    }
<?php

/**
 * $Id$
 *  
 * @package    Mediboard
 * @subpackage ccam
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$praticien_id = CValue::get('praticien_id');
$codable_class = CValue::get('codable_class');
$codable_id = CValue::get('codable_id');
$date = Cvalue::get('date');
$lock = CValue::get('lock', 1);
$user = CMediusers::get();
/** @var CCodable $codable */
$codable = CMbObject::loadFromGuid("{$codable_class}-{$codable_id}");
$codage = CCodageCCAM::get($codable, $praticien_id, 1, $date);
if (CAppUI::conf('ccam CCodable lock_codage_ccam') != 'password' && $codable_class != 'CSejour') {
    $codage = new CCodageCCAM();
    $codage->praticien_id = $praticien_id;
    $codage->codable_class = $codable_class;
    $codage->codable_id = $codable_id;
    $codages = $codage->loadMatchingList();
    foreach ($codages as $_codage) {
        $_codage->locked = $lock;
        $_codage->store();
    }
<?php 
/**
 * $Id$
 *  
 * @package    Mediboard
 * @subpackage soins
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$sejour_id = CValue::get('sejour_id');
$date = CValue::get('date', CMbDT::date());
$from = CValue::get('from');
$to = Cvalue::get('to');
$sejour = new CSejour();
$sejour->load($sejour_id);
$sejour->loadRefsFwd();
$sejour->countExchanges();
$sejour->isCoded();
$sejour->canDo();
$sejour->getAssociationCodesActes();
$sejour->loadPossibleActes();
/* Gestion des dates */
$date_entree = CMbDT::date(null, $sejour->entree);
$date_sortie = CMbDT::date(null, $sejour->sortie);
if (is_null($from) || is_null($to)) {
    if (CMbDT::daysRelative($date, $date_sortie) < 0) {
        $date = $date_sortie;
    } elseif (CMbDT::daysRelative($date_entree, $date) < 0) {