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


PHP UserSettings::sessionPersistent方法代码示例

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


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

示例1: generateAddTaskBlock

 /**
  * A custom method within the Plugin to generate the content
  * 
  * @return string : HTML
  * @see class/UserSettings.class.php
  * @see class/DiscussionEmailSetting.class.php
  */
 function generateAddTaskBlock()
 {
     $output = '';
     $idproject = $_SESSION["do_project"]->idproject;
     if (!is_object($_SESSION['UserSettings'])) {
         $do_user_settings = new UserSettings();
         $do_user_settings->sessionPersistent("UserSettings", "logout.php", OFUZ_TTL);
     }
     $data = $_SESSION['UserSettings']->getSettingValue("task_discussion_alert");
     $global_discussion_email_on = 'Yes';
     if (!$data) {
         $global_discussion_email_on = 'Yes';
     } else {
         if (is_array($data)) {
             if ($data["setting_value"] == 'Yes') {
                 $global_discussion_email_on = 'Yes';
             } else {
                 $global_discussion_email_on = 'No';
             }
         }
     }
     $_SESSION['UserSettings']->global_task_discussion_alert = $global_discussion_email_on;
     if ($global_discussion_email_on == 'Yes') {
         $DiscussionEmailSetting = new DiscussionEmailSetting();
         $data = $DiscussionEmailSetting->isDiscussionAlertSet($idproject, 'Project');
         if ($data && is_array($data)) {
             $output .= _('You have turned off email alert for this project.<br /> If you want to get email alerts for this project please turn it on. <br />');
             $set_email_alert_on = new Event("DiscussionEmailSetting->eventSetOnDiscussionAlert");
             $set_email_alert_on->addParam("setting_level", "Project");
             $set_email_alert_on->addParam("id", $data["iddiscussion_email_setting"]);
             $output .= '<br />';
             $output .= $set_email_alert_on->getLink('Turn On');
         } else {
             $output .= _('Your email alert for the project discussion is set on by default. You can turn off if you do not want to receive emails for this project discussion.<br />');
             $set_email_alert_off = new Event("DiscussionEmailSetting->eventSetOffDiscussionAlert");
             $set_email_alert_off->addParam("id", $idproject);
             $set_email_alert_off->addParam("setting_level", "Project");
             $output .= '<br />';
             $output .= $set_email_alert_off->getLink('Turn Off');
         }
     }
     return $output;
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:50,代码来源:ProjectDiscussionEmailAlertBlock.class.php

示例2: UserSettings

</span>
        </div>
    </div>
    <div class="contentfull">        
      <div class="messageshadow">
	<div class="messages" style="font-size:1.8em;">Ofuz Getting started wizard</div>
      </div>

      <div align="center">
      <p id="pYourFirstProject" style="font-size:1.4em;">Setup your Invoices</p>
	  <div class="spacerblock_20"></div>
	<div id="setup_invoices">
	  <div>
<?php 
$UserSettings = new UserSettings();
$UserSettings->sessionPersistent("InvLogo", "index.php", OFUZ_TTL);
//$UserSettings->sessionPersistent("InvCurrency", "index.php", OFUZ_TTL);
//$UserSettings->sessionPersistent("InvDateFormat", "index.php", OFUZ_TTL);
//$UserSettings->sessionPersistent("InvAuthNet", "index.php", OFUZ_TTL);
//$UserSettings->sessionPersistent("InvPaypal", "index.php", OFUZ_TTL);
// Invoice Logo section
$inv_logo = $UserSettings->getSettingValue("invoice_logo");
if ($inv_logo && is_array($inv_logo)) {
    $_SESSION['InvLogo']->getId($inv_logo["iduser_settings"]);
    $img = $_SESSION['InvLogo']->setting_value;
    $e_inv_logo = new Event("InvLogo->eventValuesFromForm");
    $e_inv_logo->addEventAction("InvLogo->update", 2000);
    $e_inv_logo->addEventAction("InvLogo->eventCheckInvLogoExtension", 2);
    echo '<table width="50%" height="100px"><tr><td width="40%">';
    $e_inv_logo->setGotFile(true);
    $e_inv_logo->addEventAction("mydb.gotoPage", 2333);
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:ww_s4.php

示例3: UserSettings

?>
 
    <table class="layout_columns"><tr><td class="layout_lcolumn">
    <?php 
//For public access block the following
if ($task_operation_access === true) {
    include_once 'plugin_block.php';
}
// Public access hide ends here
?>
    

    <?php 
if (!is_object($_SESSION['UserSettings'])) {
    $do_user_settings = new UserSettings();
    $do_user_settings->sessionPersistent("UserSettings", "logout.php", OFUZ_TTL);
}
$data = $_SESSION['UserSettings']->getSettingValue("task_discussion_alert");
$global_discussion_email_on = 'Yes';
if (!$data) {
    $global_discussion_email_on = 'Yes';
} else {
    if (is_array($data)) {
        if ($data["setting_value"] == 'Yes') {
            $global_discussion_email_on = 'Yes';
        } else {
            $global_discussion_email_on = 'No';
        }
    }
}
$_SESSION['UserSettings']->global_task_discussion_alert = $global_discussion_email_on;
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:task.php


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