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

forums_user_view.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 
00033 require_once "./include/inc.header.php";
00034 require_once "classes/class.ilForum.php";
00035 
00036 $lng->loadLanguageModule("forum");
00037 
00038 $ref_obj =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]);
00039 if($ref_obj->getType() == "frm")
00040 {
00041         $forumObj = new ilObjForum($_GET["ref_id"]);
00042         $frm =& $forumObj->Forum;
00043         $frm->setForumId($forumObj->getId());
00044         $frm->setForumRefId($forumObj->getRefId());
00045 }
00046 else
00047 {
00048         $frm =& new ilForum();
00049 }
00050 
00051 $tpl->addBlockFile("CONTENT", "content", "tpl.forums_user_view.html");
00052 $tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00053 $tpl->addBlockFile("BUTTONS", "buttons", "tpl.buttons.html");
00054 $tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00055 
00056 // locator
00057 require_once("classes/class.ilForumLocatorGUI.php");
00058 $frm_loc =& new ilForumLocatorGUI();
00059 $frm_loc->setRefId($_GET["ref_id"]);
00060 if ($ref_obj->getType() == "frm")
00061 {
00062         $frm_loc->setForum($frm);
00063 }
00064 if (!empty($_GET["thr_pk"]))
00065 {
00066         $frm->setWhereCondition("thr_pk = ".$_GET["thr_pk"]);
00067         $threadData = $frm->getOneThread();
00068         $frm_loc->setThread($_GET["thr_pk"], $threadData["thr_subject"]);
00069 }
00070 $frm_loc->showUser(true);
00071 $frm_loc->display();
00072 
00073 require_once ("classes/class.ilObjUserGUI.php");
00074 
00075 $_GET["obj_id"]=$_GET["user"];
00076 $user_gui = new ilObjUserGUI("",$_GET["user"], false, false);
00077 // count articles of user
00078 $numPosts = $frm->countUserArticles($_GET["user"]);
00079 $add = array($lng->txt("forums_posts") => $numPosts);
00080 $user_gui->insertPublicProfile("USR_PROFILE","usr_profile", $add);
00081 
00082 // display infopanel if something happened
00083 infoPanel();
00084 
00085 //$tpl->setCurrentBlock("usertable");
00086 if($_GET['backurl'])
00087 {
00088         $tpl->setCurrentBlock("btn_cell");
00089         $tpl->setVariable("BTN_LINK",urldecode($_GET["backurl"]));
00090         $tpl->setVariable("BTN_TXT", $lng->txt("back"));
00091         $tpl->parseCurrentBlock();
00092 }
00093 
00094 if (!$rbacsystem->checkAccess("read", $_GET["ref_id"]))
00095 {
00096         $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
00097 }
00098 
00099 $tpl->setVariable("TXT_PAGEHEADLINE", $lng->txt("userdata"));
00100 
00101 // get user data
00102 $author = $frm->getUser($_GET["user"]);
00103 
00104 $tpl->setVariable("TPLPATH", $tpl->vars["TPLPATH"]);
00105 
00106 $tpl->show();
00107 ?>

Generated on Fri Dec 13 2013 13:52:10 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1