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

mail_print.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 "./include/inc.mail.php";
00035 require_once "classes/class.ilObjUser.php";
00036 require_once "classes/class.ilMail.php";
00037 
00038 $tplprint = new ilTemplate("tpl.mail_print.html",true,true);
00039 $tplprint->setVariable("JSPATH",$tpl->tplPath);
00040 
00041 //get the mail from user
00042 $umail = new ilMail($_SESSION["AccountId"]);
00043 $mail_data = $umail->getMail($_GET["mail_id"]);
00044 
00045 
00046 // SET MAIL DATA
00047 // FROM
00048 $tplprint->setVariable("TXT_FROM", $lng->txt("from"));
00049 
00050 $tmp_user = new ilObjUser($mail_data["sender_id"]); 
00051 if(!($login = $tmp_user->getFullname()))
00052 {
00053         $login = $mail_data["import_name"]." (".$lng->txt("imported").")";
00054 }
00055 $tplprint->setVariable("FROM", $login);
00056 // TO
00057 $tplprint->setVariable("TXT_TO", $lng->txt("mail_to"));
00058 $tplprint->setVariable("TO", $mail_data["rcp_to"]);
00059 
00060 // CC
00061 if($mail_data["rcp_cc"])
00062 {
00063         $tplprint->setCurrentBlock("cc");
00064         $tplprint->setVariable("TXT_CC",$lng->txt("cc"));
00065         $tplprint->setVariable("CC",$mail_data["rcp_cc"]);
00066         $tplprint->parseCurrentBlock();
00067 }
00068 // SUBJECT
00069 $tplprint->setVariable("TXT_SUBJECT",$lng->txt("subject"));
00070 $tplprint->setVariable("SUBJECT",htmlspecialchars($mail_data["m_subject"]));
00071 
00072 // DATE
00073 $tplprint->setVariable("TXT_DATE", $lng->txt("date"));
00074 $tplprint->setVariable("DATE", ilFormat::formatDate($mail_data["send_time"]));
00075 
00076 // MESSAGE
00077 $tplprint->setVariable("TXT_MESSAGE", $lng->txt("message"));
00078 $tplprint->setVariable("MAIL_MESSAGE", nl2br(htmlspecialchars($mail_data["m_message"])));
00079 
00080 
00081 $tplprint->show();
00082 
00083 ?>

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