コード例 #1
0
ファイル: mb_fckeditor.php プロジェクト: fbone/mediboard4
 * @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
 */
$templateManager = unserialize(gzuncompress($_SESSION["dPcompteRendu"]["templateManager"]));
header("Content-Type: text/javascript");
ksort($templateManager->sections);
foreach ($templateManager->sections as $key => $_section) {
    ksort($templateManager->sections[$key]);
    foreach ($templateManager->sections[$key] as $_key => $_sub_section) {
        ksort($templateManager->sections[$key][$_key]);
    }
}
$user = CMediusers::get();
$use_apicrypt = false;
if (CModule::getActive("apicrypt")) {
    $use_apicrypt = !$user->isPraticien() || $user->mail_apicrypt;
}
$use_mssante = false;
if (CModule::getActive('mssante')) {
    $use_mssante = !$user->isPraticien() || CMSSanteUserAccount::isUserHasAccount($user);
}
// Création du template
$smarty = new CSmartyDP("modules/dPcompteRendu");
$smarty->assign("templateManager", $templateManager);
$smarty->assign("nodebug", true);
$smarty->assign("use_apicrypt", $use_apicrypt);
$smarty->assign('use_mssante', $use_mssante);
$smarty->display("mb_fckeditor.tpl");
コード例 #2
0
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$user = CMediusers::get();
$source_smtp = CSourceSMTP::get("mediuser-{$user->_id}", 'smtp', true, null, false);
$sources_smtp = array();
if ($source_smtp->_id) {
    $sources_smtp[] = $source_smtp;
}
$sources_pop = new CSourcePOP();
$where["source_pop.object_class"] = "= 'CMediusers'";
$where["source_pop.object_id"] = " = '{$user->_id}'";
$where['source_pop.name'] = " NOT LIKE '%apicrypt'";
$sources_pop = $sources_pop->loadList($where);
if (CModule::getActive('mssante') && CModule::getCanDo('mssante')->read) {
    $mssante_account = CMSSanteUserAccount::getAccountForCurrentUser();
} else {
    $mssante_account = false;
}
if (CModule::getActive('apicrypt') && CModule::getCanDo('apicrypt')->read) {
    $apicrypt_account = CExchangeSource::get("mediuser-{$user->_id}-apicrypt", "smtp", true, null, false);
} else {
    $apicrypt_account = false;
}
$smarty = new CSmartyDP();
$smarty->assign('sources_smtp', $sources_smtp);
$smarty->assign('sources_pop', $sources_pop);
$smarty->assign('mssante_account', $mssante_account);
$smarty->assign('apicrypt_account', $apicrypt_account);
$smarty->display('inc_manage_accounts.tpl');
コード例 #3
0
ファイル: vw_messagerie.php プロジェクト: fbone/mediboard4
$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);
$smarty->display('vw_messagerie.tpl');