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


PHP ilSession::clear方法代码示例

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


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

示例1: cancelDeleteClassroom

 /**
  * cancel deletion of classroom object
  *
  * @access	public
  */
 function cancelDeleteClassroom()
 {
     ilSession::clear("saved_post");
     ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
     $this->ctrl->redirectByClass("ilobjilinccoursegui");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:11,代码来源:class.ilObjiLincClassroomGUI.php

示例2: checkPermission

 /**
  * Check permission and redirect on error
  * 
  * @param string $a_perm
  * @param string $a_cmd
  * @param string $a_type
  * @param int $a_ref_id
  * @return bool
  */
 protected function checkPermission($a_perm, $a_cmd = "", $a_type = "", $a_ref_id = null)
 {
     if (!$this->checkPermissionBool($a_perm, $a_cmd, $a_type, $a_ref_id)) {
         if (!is_int(strpos($_SERVER["PHP_SELF"], "goto.php"))) {
             // create: redirect to parent
             if ($a_perm == "create") {
                 if (!$a_ref_id) {
                     $a_ref_id = $_GET["ref_id"];
                 }
                 $type = ilObject::_lookupType($a_ref_id, true);
             } else {
                 // does this make sense?
                 if (!is_object($this->object)) {
                     return;
                 }
                 if (!$a_ref_id) {
                     $a_ref_id = $this->object->getRefId();
                 }
                 $type = $this->object->getType();
             }
             ilSession::clear("il_rep_ref_id");
             ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
             ilUtil::redirect("goto.php?target=" . $type . "_" . $a_ref_id);
         } else {
             die("Permission Denied.");
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilObjectGUI.php

示例3: cancelDeleteExportFileObject

 /**
  * cancel deletion of export files
  */
 public function cancelDeleteExportFileObject()
 {
     ilSession::clear("ilExportFiles");
     $this->ctrl->redirect($this, "export");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:8,代码来源:class.ilObjSurveyQuestionPoolGUI.php

示例4: cancelDeleteExportFile

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

示例5: infoPanel

 public static function infoPanel($a_keep = true)
 {
     global $tpl, $ilias, $lng;
     if (!empty($_SESSION["infopanel"]) and is_array($_SESSION["infopanel"])) {
         $tpl->addBlockFile("INFOPANEL", "infopanel", "tpl.infopanel.html", "Services/Utilities");
         $tpl->setCurrentBlock("infopanel");
         if (!empty($_SESSION["infopanel"]["text"])) {
             $link = "<a href=\"" . $dir . $_SESSION["infopanel"]["link"] . "\" target=\"" . ilFrameTargetInfo::_getFrame("MainContent") . "\">";
             $link .= $lng->txt($_SESSION["infopanel"]["text"]);
             $link .= "</a>";
         }
         // deactivated
         if (!empty($_SESSION["infopanel"]["img"])) {
             $link .= "<td><a href=\"" . $_SESSION["infopanel"]["link"] . "\" target=\"" . ilFrameTargetInfo::_getFrame("MainContent") . "\">";
             $link .= "<img src=\"" . $ilias->tplPath . $ilias->account->prefs["skin"] . "/images/" . $_SESSION["infopanel"]["img"] . "\" border=\"0\" vspace=\"0\"/>";
             $link .= "</a></td>";
         }
         $tpl->setVariable("INFO_ICONS", $link);
         $tpl->parseCurrentBlock();
     }
     //if (!$a_keep)
     //{
     ilSession::clear("infopanel");
     //}
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:25,代码来源:class.ilUtil.php

示例6: 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

示例7: cancelDelete

 /**
  * cancel deletion of page/structure objects
  */
 function cancelDelete()
 {
     ilSession::clear("saved_post");
     $this->ctrl->redirect($this, $_GET["backcmd"]);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:8,代码来源:class.ilLMObjectGUI.php

示例8: 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

示例9: deleteObjects

 /**
  * Delete objects. Move them to trash (if trash feature is enabled).
  *
  * @param	integer		current ref id
  * @param	array		array of ref(!) ids to be deleted
  */
 public static function deleteObjects($a_cur_ref_id, $a_ids)
 {
     global $ilAppEventHandler, $rbacsystem, $rbacadmin, $log, $ilUser, $tree, $lng, $ilSetting;
     include_once './Services/Payment/classes/class.ilPaymentObject.php';
     include_once "./Services/Repository/exceptions/class.ilRepositoryException.php";
     // Remove duplicate ids from array
     $a_ids = array_unique((array) $a_ids);
     // FOR ALL SELECTED OBJECTS
     foreach ($a_ids as $id) {
         if ($tree->isDeleted($id)) {
             $log->write(__METHOD__ . ': Object with ref_id: ' . $id . ' already deleted.');
             throw new ilRepositoryException($lng->txt("msg_obj_already_deleted"));
         }
         // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
         $node_data = $tree->getNodeData($id);
         $subtree_nodes = $tree->getSubTree($node_data);
         $all_node_data[] = $node_data;
         $all_subtree_nodes[] = $subtree_nodes;
         // CHECK DELETE PERMISSION OF ALL OBJECTS
         foreach ($subtree_nodes as $node) {
             if ($node['type'] == 'rolf') {
                 continue;
             }
             if (!$rbacsystem->checkAccess('delete', $node["child"])) {
                 $not_deletable[] = $node["child"];
                 $perform_delete = false;
             } else {
                 if (ilPaymentObject::_isBuyable($node['child'])) {
                     $buyable[] = $node['child'];
                     $perform_delete = false;
                 }
             }
         }
     }
     // IF THERE IS ANY OBJECT WITH NO PERMISSION TO DELETE
     if (count($not_deletable)) {
         $not_deletable = implode(',', $not_deletable);
         ilSession::clear("saved_post");
         throw new ilRepositoryException($lng->txt("msg_no_perm_delete") . " " . $not_deletable . "<br/>" . $lng->txt("msg_cancel"));
     }
     if (count($buyable)) {
         foreach ($buyable as $id) {
             $tmp_object = ilObjectFactory::getInstanceByRefId($id);
             $titles[] = $tmp_object->getTitle();
         }
         $title_str = implode(',', $titles);
         throw new ilRepositoryException($lng->txt('msg_obj_not_deletable_sold') . ' ' . $title_str);
     }
     // DELETE THEM
     if (!$all_node_data[0]["type"]) {
         // alex: this branch looks suspicious to me... I deactivate it for
         // now. Objects that aren't in the tree should overwrite this method.
         throw new ilRepositoryException($lng->txt("ilRepUtil::deleteObjects: Type information missing."));
         // OBJECTS ARE NO 'TREE OBJECTS'
         if ($rbacsystem->checkAccess('delete', $a_cur_ref_id)) {
             foreach ($a_ids as $id) {
                 $obj =& ilObjectFactory::getInstanceByObjId($id);
                 $obj->delete();
                 // write log entry
                 $log->write("ilObjectGUI::confirmedDeleteObject(), deleted obj_id " . $obj->getId() . ", type: " . $obj->getType() . ", title: " . $obj->getTitle());
             }
         } else {
             throw new ilRepositoryException($lng->txt("no_perm_delete") . "<br/>" . $lng->txt("msg_cancel"));
         }
     } else {
         // SAVE SUBTREE AND DELETE SUBTREE FROM TREE
         $affected_ids = array();
         foreach ($a_ids as $id) {
             if ($tree->isDeleted($id)) {
                 $log->write(__METHOD__ . ': Object with ref_id: ' . $id . ' already deleted.');
                 throw new ilRepositoryException($lng->txt("msg_obj_already_deleted"));
             }
             // DELETE OLD PERMISSION ENTRIES
             $subnodes = $tree->getSubtree($tree->getNodeData($id));
             foreach ($subnodes as $subnode) {
                 $rbacadmin->revokePermission($subnode["child"]);
                 // remove item from all user desktops
                 $affected_users = ilUtil::removeItemFromDesktops($subnode["child"]);
                 $affected_ids[$subnode["child"]] = $subnode["child"];
                 // TODO: inform users by mail that object $id was deleted
                 //$mail->sendMail($id,$msg,$affected_users);
                 // should go to appevents at the end
             }
             // TODO: needs other handling
             // This class shouldn't have to know anything about ECS
             include_once './Services/WebServices/ECS/classes/class.ilECSObjectSettings.php';
             ilECSObjectSettings::_handleDelete($subnodes);
             if (!$tree->saveSubTree($id, true)) {
                 $log->write(__METHOD__ . ': Object with ref_id: ' . $id . ' already deleted.');
                 throw new ilRepositoryException($lng->txt("msg_obj_already_deleted"));
             }
             // write log entry
             $log->write("ilObjectGUI::confirmedDeleteObject(), moved ref_id " . $id . " to trash");
             // remove item from all user desktops
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilRepUtil.php

示例10:

<?php

/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
require_once "Services/Init/classes/class.ilInitialisation.php";
ilInitialisation::initILIAS();
$tpl->addBlockFile("CONTENT", "content", "tpl.error.html");
$tpl->setCurrentBlock("content");
$tpl->setVariable("ERROR_MESSAGE", $_SESSION["failure"]);
$tpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_failure.png"));
$tpl->parseCurrentBlock();
ilSession::clear("referer");
ilSession::clear("message");
$tpl->show();
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:error.php

示例11: resetCurrentPage

 /**
  * Hide help
  *
  * @param
  * @return
  */
 function resetCurrentPage()
 {
     ilSession::clear("help_pg");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:10,代码来源:class.ilHelpGUI.php

示例12: cancel

 function cancel()
 {
     ilSession::clear("saved_post");
     ilUtil::sendInfo($this->lng->txt("msg_cancel"), true);
     if (strtolower($_GET["baseClass"]) == 'iladministrationgui') {
         $this->ctrl->redirectByClass("ilobjusergui", "view");
     } else {
         $this->ctrl->redirectByClass('ilobjcategorygui', 'listUsers');
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:10,代码来源:class.ilObjiLincUserGUI.php

示例13: cancelObject

 function cancelObject()
 {
     ilSession::clear("saved_post");
     if (strtolower($_GET["baseClass"]) == 'iladministrationgui') {
         $this->ctrl->redirectByClass("ilobjuserfoldergui", "view");
         //$return_location = $_GET["cmd_return_location"];
         //ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location));
     } else {
         $this->ctrl->redirectByClass('ilobjcategorygui', 'listUsers');
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilObjUserGUI.php


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