Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00042 $umail = new ilMail($_SESSION["AccountId"]);
00043 $mail_data = $umail->getMail($_GET["mail_id"]);
00044
00045
00046
00047
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
00057 $tplprint->setVariable("TXT_TO", $lng->txt("mail_to"));
00058 $tplprint->setVariable("TO", $mail_data["rcp_to"]);
00059
00060
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
00069 $tplprint->setVariable("TXT_SUBJECT",$lng->txt("subject"));
00070 $tplprint->setVariable("SUBJECT",htmlspecialchars($mail_data["m_subject"]));
00071
00072
00073 $tplprint->setVariable("TXT_DATE", $lng->txt("date"));
00074 $tplprint->setVariable("DATE", ilFormat::formatDate($mail_data["send_time"]));
00075
00076
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 ?>