ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
inc.mail_buttons.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
33 $lng->loadLanguageModule("mail");
34 $tpl->addBlockFile("TABS", "tabs", "tpl.tabs.html");
35 
36 $script_name = basename($_SERVER["SCRIPT_FILENAME"]);
37 
38 $file_name = basename($_SERVER["SCRIPT_NAME"]);
39 
40 // FOLDER
41 $tpl->setCurrentBlock("tab");
42 $tpl->setVariable("TAB_TYPE", ($script_name == "mail.php" || $script_name == "mail_read.php")
43  ? "tabactive"
44  : "tabinactive");
45 $tpl->setVariable("TAB_LINK", "mail.php?mobj_id=$_GET[mobj_id]&type=new");
46 $tpl->setVariable("TAB_TEXT", $lng->txt("fold"));
47 $tpl->parseCurrentBlock();
48 
49 
50 // COMPOSE
51 $tpl->setCurrentBlock("tab");
52 $tpl->setVAriable("TAB_TYPE", ($script_name == "mail_new.php" || $script_name == "mail_attachment.php"
53  || $script_name == "mail_search.php")
54  ? "tabactive"
55  : "tabinactive");
56 $tpl->setVariable("TAB_LINK", "mail_new.php?mobj_id=$_GET[mobj_id]&type=new");
57 $tpl->setVariable("TAB_TEXT", $lng->txt("compose"));
58 $tpl->parseCurrentBlock();
59 
60 // ADDRESSBOOK
61 $tpl->setCurrentBlock("tab");
62 $tpl->setVAriable("TAB_TYPE",$script_name == "mail_addressbook.php" ? "tabactive" : "tabinactive");
63 $tpl->setVariable("TAB_LINK", "mail_addressbook.php?mobj_id=$_GET[mobj_id]");
64 $tpl->setVariable("TAB_TEXT", $lng->txt("mail_addressbook"));
65 $tpl->parseCurrentBlock();
66 
67 // OPTIONS
68 $tpl->setCurrentBlock("tab");
69 $tpl->setVAriable("TAB_TYPE",$script_name == "mail_options.php" ? "tabactive" : "tabinactive");
70 $tpl->setVariable("TAB_LINK", "mail_options.php?mobj_id=$_GET[mobj_id]");
71 $tpl->setVariable("TAB_TEXT", $lng->txt("options"));
72 $tpl->parseCurrentBlock();
73 
74 // FLATVIEW <-> TREEVIEW
75 if (!isset($_SESSION["viewmode"]) or $_SESSION["viewmode"] == "flat")
76 {
77  $tpl->setTreeFlatIcon(
78  "mail_frameset.php?viewmode=tree&amp;mobj_id=".$_GET["mobj_id"],
79  "tree");
80  //$tpl->setVariable("IMG_TREE", ilUtil::getImagePath("ic_treeview.gif"));
81  //$tpl->parseCurrentBlock();
82 }
83 else
84 {
85  $tpl->setTreeFlatIcon(
86  "mail_frameset.php?viewmode=flat&amp;mobj_id=".$_GET["mobj_id"],
87  "flat");
88  //$tpl->parseCurrentBlock();
89 }
90 $tpl->setCurrentBlock("tree_icons");
91 $tpl->parseCurrentBlock();
92 ?>