• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

usr_personaldesktop.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003     +-----------------------------------------------------------------------------+
00004     | ILIAS open source                                                           |
00005     +-----------------------------------------------------------------------------+
00006     | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007     |                                                                             |
00008     | This program is free software; you can redistribute it and/or               |
00009     | modify it under the terms of the GNU General Public License                 |
00010     | as published by the Free Software Foundation; either version 2              |
00011     | of the License, or (at your option) any later version.                      |
00012     |                                                                             |
00013     | This program is distributed in the hope that it will be useful,             |
00014     | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015     | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016     | GNU General Public License for more details.                                |
00017     |                                                                             |
00018     | You should have received a copy of the GNU General Public License           |
00019     | along with this program; if not, write to the Free Software                 |
00020     | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021     +-----------------------------------------------------------------------------+
00022 */
00023 
00024 
00036 require_once "./include/inc.header.php";
00037 require_once "classes/class.ilObjUser.php";
00038 require_once "classes/class.ilMail.php";
00039 require_once "classes/class.ilPersonalDesktopGUI.php";
00040 
00041 
00042 // catch hack attempts
00043 if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
00044 {
00045     $ilias->raiseError($lng->txt("msg_not_available_for_anon"),$ilias->error_obj->MESSAGE);
00046 }
00047 
00048 switch($_GET["cmd"])
00049 {
00050     case "dropItem":
00051         $ilias->account->dropDesktopItem($_GET["id"], $_GET["type"]);
00052         break;
00053 
00054     case "removeMember":
00055         //$groupObj = $ilias->obj_factory->getInstanceByRefId($_GET["id"]);
00056         //$groupObj = new ilGroupGUI($a_data, $_GET["id"], false);
00057         //$err_msg = $groupObj->removeMember($ilias->account->getId());
00058         if (strlen($err_msg) > 0)
00059             $ilias->raiseError($lng->txt($err_msg),$ilias->error_obj->MESSAGE);
00060         break;
00061                 
00062         case "showSelectedItemsDetails":
00063                 $ilUser->writePref("pd_selected_items_details", "y");
00064                 break;
00065 
00066         case "hideSelectedItemsDetails":
00067                 $ilUser->writePref("pd_selected_items_details", "n");
00068                 break;
00069 
00070 }
00071 /*if ($_GET["action"] == "removeMember")
00072 {
00073     $groupObj = new ilGroupGUI($a_data, $_GET["id"], false);
00074     //$err_msg = $groupObj->removeMember("usr_personaldesktop.php" , "loaction: usr_personaldesktop.php");//$ilias->account->getId());
00075     if(strlen($err_msg) > 0)
00076         $ilias->raiseError($lng->txt($err_msg),$ilias->error_obj->MESSAGE);
00077     exit();
00078     break;
00079 }*/
00080 
00081 //add template for content
00082 $tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
00083 $tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00084 $tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00085 //$tpl->addBlockFile("CONTENT", "content", "tpl.usr_personaldesktop.html");
00086 $tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.usr_personaldesktop.html");
00087 //$tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
00088 
00089 // set locator
00090 $tpl->setVariable("TXT_LOCATOR",$lng->txt("locator"));
00091 $tpl->setCurrentBlock("locator_item");
00092 $tpl->setVariable("ITEM", $lng->txt("personal_desktop"));
00093 $tpl->setVariable("LINK_ITEM", "usr_personaldesktop.php");
00094 $tpl->parseCurrentBlock();
00095 
00096 // catch feedback message
00097 sendInfo();
00098 // display infopanel if something happened
00099 infoPanel();
00100 
00101 // display tabs
00102 //include "./include/inc.personaldesktop_buttons.php";
00103 
00104 $tpl->setCurrentBlock("adm_content");
00105 $tpl->setVariable("HEADER", $lng->txt("personal_desktop"));
00106 include "./include/inc.personaldesktop_buttons.php";
00107 //$tpl->setVariable("TABS", "KK");
00108 $tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.gif", false));
00109 
00110 // courses
00111 /*
00112 $courses = $ilias->account->getCourses();
00113 
00114 // forums
00115 $frm_obj = ilUtil::getObjectsByOperations('frm','read');
00116 $frmNum = count($frm_obj);
00117 $lastLogin = $ilias->account->getLastLogin();
00118 */
00119 
00120 //********************************************
00121 //* OUTPUT
00122 //********************************************
00123 
00124 //begin mailblock if there are new mails
00125 
00126 $deskgui =& new ilPersonalDesktopGUI();
00127 
00128 $deskgui->displaySelectedItems();
00129 $deskgui->displaySystemMessages();
00130 $deskgui->displayMails();
00131 $deskgui->displayUsersOnline();
00132 $deskgui->displayBookmarks();
00133 //$deskgui->displayTests();             // see display selected items
00134 
00135 // output
00136 $tpl->show();
00137 ?>

Generated on Fri Dec 13 2013 10:18:34 for ILIAS Release_3_5_x_branch .rev 46805 by  doxygen 1.7.1