• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilSession类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: testBasicSessionBehaviour

 /**
  * @group IL_Init
  */
 public function testBasicSessionBehaviour()
 {
     global $ilUser;
     include_once "./Services/Authentication/classes/class.ilSession.php";
     $result = "";
     ilSession::_writeData("123456", "Testdata");
     if (ilSession::_exists("123456")) {
         $result .= "exists-";
     }
     if (ilSession::_getData("123456") == "Testdata") {
         $result .= "write-get-";
     }
     $duplicate = ilSession::_duplicate("123456");
     if (ilSession::_getData($duplicate) == "Testdata") {
         $result .= "duplicate-";
     }
     ilSession::_destroy("123456");
     if (!ilSession::_exists("123456")) {
         $result .= "destroy-";
     }
     ilSession::_destroyExpiredSessions();
     if (ilSession::_exists($duplicate)) {
         $result .= "destroyExp-";
     }
     ilSession::_destroyByUserId($ilUser->getId());
     if (!ilSession::_exists($duplicate)) {
         $result .= "destroyByUser-";
     }
     $this->assertEquals("exists-write-get-duplicate-destroy-destroyExp-destroyByUser-", $result);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:ilSessionTest.php


示例2: storeRequest

 /**
  *
  */
 protected function storeRequest()
 {
     /**
      * @var $http ilHTTPS
      */
     global $https;
     if (!ilSession::get('orig_request_target')) {
         //#16324 don't use the complete REQUEST_URI
         $url = substr($_SERVER['REQUEST_URI'], strrpos($_SERVER['REQUEST_URI'], "/") + 1);
         ilSession::set('orig_request_target', $url);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilUserRequestTargetAdjustment.php


示例3: getChapters

 /**
  * Get chapters
  *
  * @param
  * @return
  */
 function getChapters()
 {
     $hc = ilSession::get("help_chap");
     $lm_tree = $this->parent_obj->object->getTree();
     if ($hc > 0 && $lm_tree->isInTree($hc)) {
         //$node = $lm_tree->getNodeData($hc);
         //$chaps = $lm_tree->getSubTree($node);
         $chaps = $lm_tree->getFilteredSubTree($hc, array("pg"));
         unset($chaps[0]);
     } else {
         $chaps = ilStructureObject::getChapterList($this->parent_obj->object->getId());
     }
     $this->setData($chaps);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilHelpMappingTableGUI.php


示例4: storeRequest

 /**
  *
  */
 protected function storeRequest()
 {
     /**
      * @var $http ilHTTPS
      */
     global $https;
     if (!ilSession::get('orig_request_target')) {
         $target_protocol = 'http';
         if ($https->isDetected()) {
             $target_protocol .= 's';
         }
         $host = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'];
         $request_url = $_SERVER['REQUEST_URI'][0] == '/' ? $_SERVER['REQUEST_URI'] : '/' . $_SERVER['REQUEST_URI'];
         $url = $target_protocol . '://' . $host . $request_url;
         ilSession::set('orig_request_target', $url);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:20,代码来源:class.ilUserRequestTargetAdjustment.php


示例5: showPage


//.........这里部分代码省略.........
     // set default link xml, if nothing was set yet
     if (!$this->link_xml_set) {
         $this->setDefaultLinkXml();
     }
     //$content = $this->obj->getXMLFromDom(false, true, true,
     //	$this->getLinkXML().$this->getQuestionXML().$this->getComponentPluginsXML());
     $link_xml = $this->getLinkXML();
     // disable/enable auto margins
     if ($this->getStyleId() > 0) {
         if (ilObject::_lookupType($this->getStyleId()) == "sty") {
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $style = new ilObjStyleSheet($this->getStyleId());
             $template_xml = $style->getTemplateXML();
             $disable_auto_margins = "n";
             if ($style->lookupStyleSetting("disable_auto_margins")) {
                 $disable_auto_margins = "y";
             }
         }
     }
     if ($this->getAbstractOnly()) {
         $content = "<dummy><PageObject><PageContent><Paragraph>" . $this->obj->getFirstParagraphText() . $link_xml . "</Paragraph></PageContent></PageObject></dummy>";
     } else {
         $content = $this->obj->getXMLFromDom(false, true, true, $link_xml . $this->getQuestionXML() . $template_xml . $this->getComponentPluginsXML());
     }
     // check validation errors
     if ($builded !== true) {
         $this->displayValidationError($builded);
     } else {
         $this->displayValidationError($_SESSION["il_pg_error"]);
     }
     unset($_SESSION["il_pg_error"]);
     if (isset($_SESSION["citation_error"])) {
         ilUtil::sendFailure($this->lng->txt("cont_citation_selection_not_valid"));
         ilSession::clear("citation_error");
     }
     // get title
     $pg_title = $this->getPresentationTitle();
     $col_path = ilUtil::getImagePath("col.svg");
     $row_path = ilUtil::getImagePath("row.svg");
     $item_path = ilUtil::getImagePath("item.svg");
     if ($this->getOutputMode() != "offline") {
         $enlarge_path = ilUtil::getImagePath("enlarge.svg");
         $wb_path = ilUtil::getWebspaceDir("output") . "/";
     } else {
         $enlarge_path = "images/enlarge.svg";
         $wb_path = "";
     }
     $pg_title_class = $this->getOutputMode() == "print" ? "ilc_PrintPageTitle" : "";
     // page splitting only for learning modules and
     // digital books
     $enable_split_new = $this->obj->getParentType() == "lm" || $this->obj->getParentType() == "dbk" ? "y" : "n";
     // page splitting to next page only for learning modules and
     // digital books if next page exists in tree
     if (($this->obj->getParentType() == "lm" || $this->obj->getParentType() == "dbk") && ilObjContentObject::hasSuccessorPage($this->obj->getParentId(), $this->obj->getId())) {
         $enable_split_next = "y";
     } else {
         $enable_split_next = "n";
     }
     $img_path = ilUtil::getImagePath("", false, $this->getOutputMode(), $this->getOutputMode() == "offline");
     if ($this->getPageConfig()->getEnablePCType("Tabs")) {
         //include_once("./Services/YUI/classes/class.ilYuiUtil.php");
         //ilYuiUtil::initTabView();
         include_once "./Services/Accordion/classes/class.ilAccordionGUI.php";
         ilAccordionGUI::addJavaScript();
         ilAccordionGUI::addCss();
     }
开发者ID:bheyser,项目名称:qplskl,代码行数:67,代码来源:class.ilPageObjectGUI.php


示例6: showTermsOfService

 /**
  * Show terms of service
  */
 protected function showTermsOfService()
 {
     /**
      * @var $lng       ilLanguage
      * @var $tpl       ilTemplate
      * @var $ilUser    ilObjUser
      * @var $ilSetting ilSetting
      */
     global $lng, $tpl, $ilUser, $ilSetting;
     $back_to_login = 'getAcceptance' != $this->ctrl->getCmd();
     self::initStartUpTemplate('tpl.view_terms_of_service.html', $back_to_login, !$back_to_login);
     $tpl->setVariable('TXT_PAGEHEADLINE', $lng->txt('usr_agreement'));
     try {
         require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceSignableDocumentFactory.php';
         $document = ilTermsOfServiceSignableDocumentFactory::getByLanguageObject($lng);
         if ('getAcceptance' == $this->ctrl->getCmd()) {
             if (isset($_POST['status']) && 'accepted' == $_POST['status']) {
                 require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
                 ilTermsOfServiceHelper::trackAcceptance($ilUser, $document);
                 if (ilSession::get('orig_request_target')) {
                     $target = ilSession::get('orig_request_target');
                     ilSession::set('orig_request_target', '');
                     ilUtil::redirect($target);
                 } else {
                     ilUtil::redirect('index.php?target=' . $_GET['target'] . '&client_id=' . CLIENT_ID);
                 }
             }
             $tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this, $this->ctrl->getCmd()));
             $tpl->setVariable('ACCEPT_CHECKBOX', ilUtil::formCheckbox(0, 'status', 'accepted'));
             $tpl->setVariable('ACCEPT_TERMS_OF_SERVICE', $lng->txt('accept_usr_agreement'));
             $tpl->setVariable('TXT_SUBMIT', $lng->txt('submit'));
         }
         $tpl->setVariable('TERMS_OF_SERVICE_CONTENT', $document->getContent());
     } catch (ilTermsOfServiceNoSignableDocumentFoundException $e) {
         $tpl->setVariable('TERMS_OF_SERVICE_CONTENT', sprintf($lng->txt('no_agreement_description'), 'mailto:' . ilUtil::prepareFormOutput($ilSetting->get('feedback_recipient'))));
     }
     $tpl->show();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:41,代码来源:class.ilStartUpGUI.php


示例7: filterTooltips

 /**
  * Filter tooltips
  *
  * @param
  * @return
  */
 function filterTooltips()
 {
     global $lng, $ilCtrl;
     ilSession::set("help_tt_comp", ilUtil::stripSlashes($_POST["help_tt_comp"]));
     $ilCtrl->redirect($this, "showTooltipList");
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:12,代码来源:class.ilObjContentObjectGUI.php


示例8: initHTML

 /**
  * init HTML output (level 3)
  */
 protected static function initHTML()
 {
     global $ilUser;
     if (ilContext::hasUser()) {
         // load style definitions
         // use the init function with plugin hook here, too
         self::initStyle();
     }
     // $tpl
     $tpl = new ilTemplate("tpl.main.html", true, true);
     self::initGlobal("tpl", $tpl);
     if (ilContext::hasUser() && ilContext::doAuthentication()) {
         /**
          * @var $ilUser ilObjUser
          * @var $ilCtrl ilCtrl
          */
         global $ilUser, $ilCtrl;
         require_once 'Services/User/classes/class.ilUserRequestTargetAdjustment.php';
         $request_adjuster = new ilUserRequestTargetAdjustment($ilUser, $ilCtrl);
         $request_adjuster->adjust();
     }
     // load style sheet depending on user's settings
     $location_stylesheet = ilUtil::getStyleSheetLocation();
     $tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
     require_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
     self::initGlobal("ilNavigationHistory", "ilNavigationHistory", "Services/Navigation/classes/class.ilNavigationHistory.php");
     self::initGlobal("ilBrowser", "ilBrowser", "./Services/Utilities/classes/class.ilBrowser.php");
     self::initGlobal("ilHelp", "ilHelpGUI", "Services/Help/classes/class.ilHelpGUI.php");
     self::initGlobal("ilToolbar", "ilToolbarGUI", "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php");
     self::initGlobal("ilLocator", "ilLocatorGUI", "./Services/Locator/classes/class.ilLocatorGUI.php");
     self::initGlobal("ilTabs", "ilTabsGUI", "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
     if (ilContext::hasUser()) {
         // $ilMainMenu
         include_once './Services/MainMenu/classes/class.ilMainMenuGUI.php';
         $ilMainMenu = new ilMainMenuGUI("_top");
         self::initGlobal("ilMainMenu", $ilMainMenu);
         unset($ilMainMenu);
         // :TODO: tableGUI related
         // set hits per page for all lists using table module
         $_GET['limit'] = (int) $ilUser->getPref('hits_per_page');
         ilSession::set('tbl_limit', $_GET['limit']);
         // the next line makes it impossible to save the offset somehow in a session for
         // a specific table (I tried it for the user administration).
         // its not posssible to distinguish whether it has been set to page 1 (=offset = 0)
         // or not set at all (then we want the last offset, e.g. being used from a session var).
         // So I added the wrapping if statement. Seems to work (hopefully).
         // Alex April 14th 2006
         if (isset($_GET['offset']) && $_GET['offset'] != "") {
             $_GET['offset'] = (int) $_GET['offset'];
             // old code
         }
     } else {
         // several code parts rely on ilObjUser being always included
         include_once "Services/User/classes/class.ilObjUser.php";
     }
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:59,代码来源:class.ilInitialisation.php


示例9: LogoutNotification

function LogoutNotification($SessionID)
{
    // Delete session of user using $SessionID to locate the user's session file
    // on the file system or in the database
    // Then delete this entry or record to clear the session
    // However, for that to work it is essential that the user's Shibboleth
    // SessionID is stored in the user session data!
    global $ilDB;
    $q = "SELECT session_id, data FROM usr_session WHERE expires > 'NOW()'";
    $r = $ilDB->query($q);
    while ($session_entry = $r->fetchRow(DB_FETCHMODE_ASSOC)) {
        $user_session = unserializesession($session_entry['data']);
        // Look for session with matching Shibboleth session id
        // and then delete this ilias session
        foreach ($user_session as $user_session_entry) {
            if (is_array($user_session_entry) && array_key_exists('shibboleth_session_id', $user_session_entry) && $user_session_entry['shibboleth_session_id'] == $SessionID) {
                // Delete this session entry
                if (ilSession::_destroy($session_entry['session_id']) !== true) {
                    return new SoapFault('LogoutError', 'Could not delete session entry in database.');
                }
            }
        }
    }
    // If no SoapFault is returned, all is fine
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:shib_logout.php


示例10: kickFirstRequestAbidencer

 /**
  * kicks sessions of users that abidence after login
  * so people could not login and go for coffe break ;-)
  *
  * @global ilDB $ilDB
  * @global ilSetting $ilSetting
  * @return <type>
  */
 private static function kickFirstRequestAbidencer(array $a_types)
 {
     global $ilDB, $ilSetting;
     $max_idle_after_first_request = (int) $ilSetting->get('session_max_idle_after_first_request') * 60;
     if ((int) $max_idle_after_first_request == 0) {
         return;
     }
     $query = "SELECT session_id,expires FROM usr_session WHERE " . "(ctime - createtime) < %s " . "AND (%s - createtime) > %s " . "AND " . $ilDB->in('type', $a_types, false, 'integer');
     $res = $ilDB->queryF($query, array('integer', 'integer', 'integer'), array($max_idle_after_first_request, time(), $max_idle_after_first_request));
     $session_ids = array();
     while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
         $session_ids[$row->session_id] = $row->expires;
     }
     ilSession::_destroy($session_ids, ilSession::SESSION_CLOSE_FIRST, true);
     self::debug(__METHOD__ . ' --> Finished kicking first request abidencer');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:24,代码来源:class.ilSessionControl.php


示例11: redirectToTest

 /**
  * This is to be called by the plugin at the end of the signature process to redirect the user back to the test.
  */
 public function redirectToTest($success)
 {
     /** @var $ilCtrl ilCtrl */
     /** @var $ilUser ilObjUser */
     global $ilCtrl, $ilUser;
     $active = $this->test->getActiveIdOfUser($ilUser->getId());
     $pass = $this->test->_getMaxPass($active);
     $key = 'signed_' . $active . '_' . $pass;
     ilSession::set($key, $success);
     $ilCtrl->redirect($this->ilTestOutputGUI, 'afterTestPassFinished');
     return;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilTestSignatureGUI.php


示例12: fillMessage

 function fillMessage()
 {
     global $lng;
     $ms = array("info", "success", "failure", "question");
     $out = "";
     foreach ($ms as $m) {
         if ($m == "question") {
             $m = "mess_question";
         }
         $txt = ilSession::get($m) != "" ? ilSession::get($m) : $this->message[$m];
         if ($m == "mess_question") {
             $m = "question";
         }
         if ($txt != "") {
             $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
             $mtpl->setCurrentBlock($m . "_message");
             $mtpl->setVariable("TEXT", $txt);
             $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($m . "_message"));
             $mtpl->setVariable("ALT_IMAGE", $lng->txt("icon") . " " . $lng->txt($m . "_message"));
             $mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_" . $m . ".png"));
             $mtpl->parseCurrentBlock();
             $out .= $mtpl->get();
         }
         if ($m == "question") {
             $m = "mess_question";
         }
         if (ilSession::get($m)) {
             ilSession::clear($m);
         }
     }
     if ($out != "") {
         $this->setVariable("MESSAGE", $out);
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:34,代码来源:class.ilTemplate.php


示例13: getJsonResponse

    /**
     * @param int $sessionId
     * @return string
     */
    public function getJsonResponse($sessionId)
    {
        /**
         * @var $ilDB            ilDB
         * @var $ilUser          ilObjUser
         * @var $ilClientIniFile ilIniFile
         * @var $lng             ilLanguage
         */
        global $ilDB, $ilUser, $lng, $ilClientIniFile;
        include_once 'Services/JSON/classes/class.ilJsonUtil.php';
        $response = array('remind' => false);
        $res = $ilDB->queryF('
			SELECT expires, user_id, data
			FROM usr_session
			WHERE session_id = %s', array('text'), array($sessionId));
        $num = $ilDB->numRows($res);
        if ($num > 1) {
            $response['message'] = 'The determined session data is not unique.';
            return ilJsonUtil::encode($response);
        }
        if ($num == 0) {
            $response['message'] = 'ILIAS could not determine the session data.';
            return ilJsonUtil::encode($response);
        }
        $data = $ilDB->fetchAssoc($res);
        if (!$this->isAuthenticatedUsrSession($data)) {
            $response['message'] = 'ILIAS could not fetch the session data or the corresponding user is no more authenticated.';
            return ilJsonUtil::encode($response);
        }
        $session = ilUtil::unserializeSession($data['data']);
        $idletime = null;
        foreach ((array) $session as $key => $entry) {
            if (strpos($key, '_auth__') === 0) {
                $idletime = $entry['idle'];
                break;
            }
        }
        if (null === $idletime) {
            $response['message'] = 'ILIAS could not determine the idle time from the session data.';
            return ilJsonUtil::encode($response);
        }
        $expiretime = $idletime + ilSession::getIdleValue();
        if ($this->isSessionAlreadyExpired($expiretime)) {
            $response['message'] = 'The session is already expired. The client should have received a remind command before.';
            return ilJsonUtil::encode($response);
        }
        /**
         * @var $user ilObjUser
         */
        $ilUser = ilObjectFactory::getInstanceByObjId($data['user_id']);
        include_once './Services/Authentication/classes/class.ilSessionReminder.php';
        $remind_time = $expiretime - max(ilSessionReminder::MIN_LEAD_TIME, (double) $ilUser->getPref('session_reminder_lead_time')) * 60;
        if ($remind_time > time()) {
            // session will expire in <lead_time> minutes
            $response['message'] = 'Lead time not reached, yet. Current time: ' . date('Y-m-d H:i:s', time()) . ', Reminder time: ' . date('Y-m-d H:i:s', $remind_time);
            return ilJsonUtil::encode($response);
        }
        $dateTime = new ilDateTime($expiretime, IL_CAL_UNIX);
        switch ($ilUser->getTimeFormat()) {
            case ilCalendarSettings::TIME_FORMAT_12:
                $formatted_expiration_time = $dateTime->get(IL_CAL_FKT_DATE, 'g:ia', $ilUser->getTimeZone());
                break;
            case ilCalendarSettings::TIME_FORMAT_24:
            default:
                $formatted_expiration_time = $dateTime->get(IL_CAL_FKT_DATE, 'H:i', $ilUser->getTimeZone());
                break;
        }
        $response = array('extend_url' => './ilias.php?baseClass=ilPersonalDesktopGUI', 'txt' => str_replace("\\n", '%0A', sprintf($lng->txt('session_reminder_alert'), ilFormat::_secondsToString($expiretime - time()), $formatted_expiration_time, $ilClientIniFile->readVariable('client', 'name') . ' | ' . ilUtil::_getHttpPath())), 'remind' => true);
        return ilJsonUtil::encode($response);
    }
开发者ID:arlendotcn,项目名称:ilias,代码行数:74,代码来源:class.ilSessionReminderCheck.php


示例14: authenticate

 public static function authenticate()
 {
     global $ilAuth, $ilias, $ilErr, $ilUser;
     $oldSid = session_id();
     // error_log(">> init authenticate " . $oldSid);
     $ilAuth->start();
     $ilias->setAuthError($ilErr->getLastError());
     if ($ilAuth->getAuth() && $ilAuth->getStatus() == '') {
         error_log(">> init authenticate no session?");
         if (ilSession::get("AccountId")) {
             // ensure that web users have access to the services
             self::initUserAccount();
         }
         // 	self::initUserAccount();
         //
         // 	self::handleAuthenticationSuccess();
     }
     //
     // error_log(">> init authenticate user is: " . $ilUser->getId());
 }
开发者ID:phish108,项目名称:PowerTLA,代码行数:20,代码来源:ilRESTInitialisation.5.0.php


示例15: hasToAcceptTermsOfServiceInSession

 /**
  * @param bool|null $status
  * @return void|bool
  */
 public function hasToAcceptTermsOfServiceInSession($status = null)
 {
     if (null === $status) {
         return ilSession::get('has_to_accept_agr_in_session');
     }
     require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
     if (ilTermsOfServiceHelper::isEnabled()) {
         ilSession::set('has_to_accept_agr_in_session', (int) $status);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:14,代码来源:class.ilObjUser.php


示例16: adminSync

 protected function adminSync()
 {
     global $ilCtrl, $lng;
     // see ilSession::_writeData()
     $now = time();
     ilSession::_destroyExpiredSessions();
     ilSessionStatistics::aggretateRaw($now);
     ilUtil::sendSuccess($lng->txt("trac_sync_session_stats_success"), true);
     $ilCtrl->redirect($this);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:10,代码来源:class.ilSessionStatisticsGUI.php


示例17: showMail

 /**
  * Detail view of a mail
  */
 public function showMail()
 {
     /**
      * @var $ilUser ilObjUser
      * @var $ilToolbar ilToolbarGUI
      * @var $ilTabs ilTabsGUI
      */
     global $ilUser, $ilToolbar, $ilTabs;
     if ($_SESSION['mail_id']) {
         $_GET['mail_id'] = $_SESSION['mail_id'];
         $_SESSION['mail_id'] = '';
     }
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($this->lng->txt('back_to_folder'), $this->ctrl->getFormAction($this, 'showFolder'));
     $this->umail->markRead(array((int) $_GET['mail_id']));
     $mailData = $this->umail->getMail((int) $_GET['mail_id']);
     $this->tpl->setTitle($this->lng->txt('mail_mails_of'));
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setPreventDoubleSubmission(false);
     $form->setTableWidth('100%');
     $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
     $form->setFormAction($this->ctrl->getFormAction($this, 'showMail'));
     $this->ctrl->clearParameters($this);
     $form->setTitle($this->lng->txt('mail_mails_of'));
     if ('tree' == ilSession::get(ilMailGUI::VIEWMODE_SESSION_KEY)) {
         $this->tpl->setVariable('FORM_TARGET', ilFrameTargetInfo::_getFrame('MainContent'));
     }
     include_once 'Services/Accessibility/classes/class.ilAccessKeyGUI.php';
     /**
      * @var $sender ilObjUser
      */
     $sender = ilObjectFactory::getInstanceByObjId($mailData['sender_id'], false);
     if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
         $this->ctrl->setParameterByClass('ilmailformgui', 'mail_id', (int) $_GET['mail_id']);
         $this->ctrl->setParameterByClass('ilmailformgui', 'type', 'reply');
         $this->ctrl->clearParametersByClass('iliasmailformgui');
         $ilToolbar->addButton($this->lng->txt('reply'), $this->ctrl->getLinkTargetByClass('ilmailformgui'), '', ilAccessKey::REPLY);
         $this->ctrl->clearParameters($this);
     }
     $this->ctrl->setParameterByClass('ilmailformgui', 'mail_id', (int) $_GET['mail_id']);
     $this->ctrl->setParameterByClass('ilmailformgui', 'type', 'forward');
     $this->ctrl->clearParametersByClass('iliasmailformgui');
     $ilToolbar->addButton($this->lng->txt('forward'), $this->ctrl->getLinkTargetByClass('ilmailformgui'), '', ilAccessKey::FORWARD_MAIL);
     $this->ctrl->clearParameters($this);
     $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
     $ilToolbar->addButton($this->lng->txt('print'), $this->ctrl->getLinkTarget($this, 'printMail'), '_blank');
     $this->ctrl->clearParameters($this);
     $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
     $this->ctrl->setParameter($this, 'selected_cmd', 'deleteMails');
     $ilToolbar->addButton($this->lng->txt('delete'), $this->ctrl->getLinkTarget($this), '', ilAccessKey::DELETE);
     $this->ctrl->clearParameters($this);
     if ($sender && $sender->getId() && $sender->getId() != ANONYMOUS_USER_ID) {
         $linked_fullname = $sender->getPublicName();
         $picture = ilUtil::img($sender->getPersonalPicturePath('xsmall'), $sender->getPublicName());
         $add_to_addb_button = '';
         if (in_array(ilObjUser::_lookupPref($sender->getId(), 'public_profile'), array('y', 'g'))) {
             $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
             $this->ctrl->setParameter($this, 'user', $sender->getId());
             $linked_fullname = '<br /><a href="' . $this->ctrl->getLinkTarget($this, 'showUser') . '" title="' . $linked_fullname . '">' . $linked_fullname . '</a>';
             $this->ctrl->clearParameters($this);
         }
         if ($sender->getId() != $ilUser->getId()) {
             require_once 'Services/Contact/classes/class.ilAddressbook.php';
             $abook = new ilAddressbook($ilUser->getId());
             if ($abook->checkEntryByLogin($sender->getLogin()) == 0) {
                 $tplbtn = new ilTemplate('tpl.buttons.html', true, true);
                 $tplbtn->setCurrentBlock('btn_cell');
                 $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
                 $tplbtn->setVariable('BTN_LINK', $this->ctrl->getLinkTarget($this, 'add'));
                 $this->ctrl->clearParameters($this);
                 $tplbtn->setVariable('BTN_TXT', $this->lng->txt('mail_add_to_addressbook'));
                 $tplbtn->parseCurrentBlock();
                 $add_to_addb_button = '<br />' . $tplbtn->get();
             }
         }
         $from = new ilCustomInputGUI($this->lng->txt('from'));
         $from->setHtml($picture . ' ' . $linked_fullname . $add_to_addb_button);
         $form->addItem($from);
     } else {
         if (!$sender || !$sender->getId()) {
             $from = new ilCustomInputGUI($this->lng->txt('from'));
             $from->setHtml($mailData['import_name'] . ' (' . $this->lng->txt('user_deleted') . ')');
             $form->addItem($from);
         } else {
             $from = new ilCustomInputGUI($this->lng->txt('from'));
             $from->setHtml(ilUtil::img(ilUtil::getImagePath('HeaderIconAvatar.svg'), ilMail::_getIliasMailerName()) . '<br />' . ilMail::_getIliasMailerName());
             $form->addItem($from);
         }
     }
     $to = new ilCustomInputGUI($this->lng->txt('mail_to'));
     $to->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_to']), false));
     $form->addItem($to);
     if ($mailData['rcp_cc']) {
         $cc = new ilCustomInputGUI($this->lng->txt('cc'));
         $cc->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_cc']), false));
         $form->addItem($cc);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilMailFolderGUI.php


示例18: cancelDeleteExportFile

 /**
  * cancel deletion of export files
  */
 function cancelDeleteExportFile()
 {
     ilSession::clear("ilExportFiles");
     $this->ctrl->redirect($this, "showExportList");
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:8,代码来源:class.ilObjSCORM2004LearningModuleGUI.php


示例19: deleteOwnAccountLogout

 protected function deleteOwnAccountLogout()
 {
     global $ilAuth, $ilUser;
     // we are setting the flag and ending the session in the same step
     $ilUser->activateDeletionFlag();
     // see ilStartupGUI::showLogout()
     ilSession::setClosingContext(ilSession::SESSION_CLOSE_USER);
     $ilAuth->logout();
     session_destroy();
     ilUtil::redirect("login.php?target=usr_" . md5("usrdelown"));
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:11,代码来源:class.ilPersonalSettingsGUI.php


示例20: initSessionStorage

 protected function initSessionStorage()
 {
     $sess = ilSession::get('frm');
     if (!is_array($sess)) {
         $sess = array();
         ilSession::set('frm', $sess);
     }
     if (isset($_GET['thr_fk']) && !is_array($sess[(int) $_GET['thr_fk']])) {
         $sess[(int) $_GET['thr_fk']] = array();
         ilSession::set('frm', $sess);
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:12,代码来源:class.ilObjForumGUI.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilSetting类代码示例发布时间:2022-05-23
下一篇:
PHP ilSelectInputGUI类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap