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
00035 $tpl->addBlockFile("CONTENT", "content", "tpl.feedback.html");
00036 $tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00037 $tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
00038
00039
00040 $tpl->setVariable("TXT_LOCATOR",$lng->txt("locator"));
00041 $tpl->setCurrentBlock("locator_item");
00042 $tpl->setVariable("ITEM", $lng->txt("feedback"));
00043 $tpl->setVariable("LINK_ITEM", "feedback.php");
00044 $tpl->parseCurrentBlock();
00045
00046
00047 infoPanel();
00048
00049 $recipient = $ilias->getSetting("feedback_recipient");
00050
00051 if (empty($recipient))
00052 {
00053 $recipient = $ilias->getSetting("admin_email");
00054 }
00055
00056 if ($_POST["msg_send"])
00057 {
00058 if (empty($recipient))
00059 {
00060 $tpl->setVariable("MSG", $lng->txt("no_recipient")."<br/>".$lng->txt("mail_not_sent"));
00061 }
00062 else
00063 {
00064 $subject = "ILIAS 3 Feedback";
00065 $from_host = "From: http://".$_SERVER["SERVER_NAME"].dirname($_SERVER["REQUEST_URI"])."\r\n";
00066 $message = $from_host.$_POST["msg_content"];
00067 $from_email = $ilias->account->getEmail();
00068 $from_sender = $ilias->account->getFullname();
00069 $headers = "From: ".$from_sender."<".$from_email.">\r\n";
00070
00071 if (mail($recipient,$subject,$message,$headers))
00072 {
00073 $tpl->setVariable("MSG", $lng->txt("mail_sent"));
00074 }
00075 else
00076 {
00077 $tpl->setVariable("MSG", $lng->txt("mail_not_sent"));
00078 }
00079 }
00080 }
00081
00082 $tpl->setCurrentBlock("content");
00083 $tpl->setVariable("TXT_PAGEHEADLINE", $lng->txt("feedback"));
00084 $tpl->setVariable("TXT_MSG_DEFAULT", $lng->txt("type_your_message_here"));
00085 $tpl->setVariable("TXT_MSG_TO", $lng->txt("message_to"));
00086 $tpl->setVariable("FEEDBACK_RECIPIENT", $recipient);
00087 $tpl->setVariable("TXT_YOUR_MSG", $lng->txt("your_message"));
00088 $tpl->setVariable("TXT_SEND", $lng->txt("send"));
00089 $tpl->parseCurrentBlock();
00090
00091
00092 $tpl->setCurrentBlock("message");
00093 $tpl->parseCurrentBlock();
00094
00095 $tpl->show();
00096 ?>