1 Star 3 Fork 2

mojie126/HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mailtest.php 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
mojie126 提交于 2015-02-11 13:18 . 增加英文语言
<?php
require "include/bittorrent.php";
dbconn();
require_once(get_langfile_path());
loggedinorreturn();
if (get_user_class() < UC_SYSOP)
permissiondenied();
$action = isset($_POST['action']) ? htmlspecialchars($_POST['action']) : '';
if ($action == "sendmail") {
$email = safe_email(htmlspecialchars(trim($_POST['email'])));
if (!check_email($email)) {
stderr($lang_mailtest['std_error'], $lang_mailtest['std_invalid_email_address']);
}
$title = $SITENAME . $lang_mailtest['text_smtp_testing_mail'];
$body = <<<EOD
{$lang_mailtest['mail_test_mail_content']}
EOD;
$SITENAME_ENCODE = "=?UTF-8?B?" . base64_encode($SITENAME) . "?=";
sent_mail($email, $SITENAME_ENCODE, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $body), '', false, false, '', get_email_encode(get_langfolder_cookie()));
stderr($lang_mailtest['std_success'], $lang_mailtest['std_success_note']);
} else {
stdhead($lang_mailtest['head_mail_test']);
print("<h1 align=\"center\">" . $lang_mailtest['text_mail_test'] . "</h1>");
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<form method='post' action='mailtest.php'>");
print("<input type='hidden' name='action' value='sendmail'>");
tr($lang_mailtest['row_enter_email'], "<input type='text' name='email' size=35><br />" . $lang_mailtest['text_enter_email_note'], 1);
print("<tr><td colspan=\"2\" align=\"center\"><input type='submit' name='sendmail' value='" . $lang_mailtest['submit_send_it'] . "'></td></tr>");
print("</form></table>");
stdfoot();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助