} $accounts_user = $account->loadList($where, null, null, null, $ljoin); /** @var CSourcePOP[] $pop_accounts */ $pop_accounts = $account->loadList($where, null, null, null, $ljoin); $apicrypt_account = false; if (CModule::getActive('apicrypt')) { $apicrypt_account = new CSourcePOP(); $where = array(); $apicrypt_account->object_class = 'CMediusers'; $apicrypt_account->object_id = $selected_user->_id; $apicrypt_account->name = "SourcePOP-{$selected_user->_id}-apicrypt"; //if user connected, show the private source pop if ($current_user->_id != $selected_user->_id) { $apicrypt_account->is_private = '0'; } $apicrypt_account->loadMatchingObject(); if (!$apicrypt_account->_id) { $apicrypt_account = null; } } $mssante_account = false; if (CModule::getActive('mssante') && CModule::getCanDo('mssante')->read) { $mssante_account = CMSSanteUserAccount::getAccountFor($selected_user); } $smarty = new CSmartyDP('modules/messagerie'); $smarty->assign('user', $current_user); $smarty->assign('selected_user', $selected_user); $smarty->assign('users_list', $users); $smarty->assign('pop_accounts', $accounts_user); $smarty->assign('apicrypt_account', $apicrypt_account); $smarty->assign('mssante_account', $mssante_account);
<?php /** $Id$ **/ /** * @package Mediboard * @subpackage messagerie * @version $Revision$ * @author SARL OpenXtrem * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html */ CCanDo::checkRead(); $user = CMediusers::get(); $mail_id = CValue::get("mail_id"); $log_pop = new CSourcePOP(); $log_pop->name = "user-pop-" . $user->_id; $log_pop->loadMatchingObject(); if (!$log_pop) { CAppUI::stepAjax("Source POP indisponible", UI_MSG_ERROR); } if (!$mail_id) { CAppUI::stepAjax("CSourcePOP-error-mail_id", UI_MSG_ERROR); } //pop init $pop = new CPop($log_pop); $pop->open(); //mail $mail = new CUserMail(); $head = $pop->header($mail_id); $content = $pop->getFullBody($_mail, false, false, true); $hash = $mail_unseen->makeHash($head, $content); $mail->loadMatchingFromHash($hash);
<?php /** * dPboard * * @category Board * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version SVN: $Id:$ * @link http://www.mediboard.org */ CCanDo::checkRead(); $ds = CSQLDataSource::get("std"); // Récupération des paramètres $chirSel = CValue::getOrSession("chirSel"); $date = CValue::getOrSession("date", CMbDT::date()); // Création du template $smarty = new CSmartyDP(); $account = new CSourcePOP(); $account->object_class = "CMediusers"; $account->object_id = $chirSel; $account->loadMatchingObject(); $smarty->assign("account", $account); $smarty->assign("date", $date); $smarty->assign("chirSel", $chirSel); $smarty->display("inc_worklist.tpl");