From 1405bfdd867cfee3c883faca6dd7653ca45e2af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E8=B4=A4=E5=87=8C?= Date: Mon, 16 Mar 2026 13:10:18 +0800 Subject: [PATCH] clear php --- MIGRATION.md | 17 +- _php_archive/api.php | 1013 ++++ _php_archive/config.php | 437 ++ _php_archive/function.php | 317 ++ _php_archive/linuxdo.php | 187 + _php_archive/login.php | 736 +++ _php_archive/php/PHPMailer/#/COMMITMENT | 46 + _php_archive/php/PHPMailer/#/LICENSE | 502 ++ _php_archive/php/PHPMailer/#/README.md | 229 + _php_archive/php/PHPMailer/#/SECURITY.md | 37 + _php_archive/php/PHPMailer/#/VERSION | 1 + _php_archive/php/PHPMailer/#/composer.json | 76 + .../php/PHPMailer/#/get_oauth_token.php | 146 + .../#/language/phpmailer.lang-af.php | 26 + .../#/language/phpmailer.lang-ar.php | 27 + .../#/language/phpmailer.lang-az.php | 27 + .../#/language/phpmailer.lang-ba.php | 27 + .../#/language/phpmailer.lang-be.php | 27 + .../#/language/phpmailer.lang-bg.php | 27 + .../#/language/phpmailer.lang-ca.php | 27 + .../#/language/phpmailer.lang-ch.php | 27 + .../#/language/phpmailer.lang-cs.php | 28 + .../#/language/phpmailer.lang-da.php | 29 + .../#/language/phpmailer.lang-de.php | 28 + .../#/language/phpmailer.lang-el.php | 26 + .../#/language/phpmailer.lang-eo.php | 26 + .../#/language/phpmailer.lang-es.php | 27 + .../#/language/phpmailer.lang-et.php | 28 + .../#/language/phpmailer.lang-fa.php | 28 + .../#/language/phpmailer.lang-fi.php | 28 + .../#/language/phpmailer.lang-fo.php | 27 + .../#/language/phpmailer.lang-fr.php | 38 + .../#/language/phpmailer.lang-gl.php | 27 + .../#/language/phpmailer.lang-he.php | 27 + .../#/language/phpmailer.lang-hi.php | 27 + .../#/language/phpmailer.lang-hr.php | 27 + .../#/language/phpmailer.lang-hu.php | 27 + .../#/language/phpmailer.lang-hy.php | 27 + .../#/language/phpmailer.lang-id.php | 31 + .../#/language/phpmailer.lang-it.php | 28 + .../#/language/phpmailer.lang-ja.php | 29 + .../#/language/phpmailer.lang-ka.php | 27 + .../#/language/phpmailer.lang-ko.php | 27 + .../#/language/phpmailer.lang-lt.php | 27 + .../#/language/phpmailer.lang-lv.php | 27 + .../#/language/phpmailer.lang-mg.php | 27 + .../#/language/phpmailer.lang-ms.php | 27 + .../#/language/phpmailer.lang-nb.php | 26 + .../#/language/phpmailer.lang-nl.php | 34 + .../#/language/phpmailer.lang-pl.php | 27 + .../#/language/phpmailer.lang-pt.php | 27 + .../#/language/phpmailer.lang-pt_br.php | 38 + .../#/language/phpmailer.lang-ro.php | 33 + .../#/language/phpmailer.lang-ru.php | 28 + .../#/language/phpmailer.lang-sk.php | 30 + .../#/language/phpmailer.lang-sl.php | 36 + .../#/language/phpmailer.lang-sr.php | 28 + .../#/language/phpmailer.lang-sr_latn.php | 28 + .../#/language/phpmailer.lang-sv.php | 27 + .../#/language/phpmailer.lang-tl.php | 28 + .../#/language/phpmailer.lang-tr.php | 31 + .../#/language/phpmailer.lang-uk.php | 28 + .../#/language/phpmailer.lang-vi.php | 27 + .../#/language/phpmailer.lang-zh.php | 29 + .../#/language/phpmailer.lang-zh_cn.php | 29 + _php_archive/php/PHPMailer/Exception.php | 40 + _php_archive/php/PHPMailer/OAuth.php | 139 + .../php/PHPMailer/OAuthTokenProvider.php | 44 + _php_archive/php/PHPMailer/PHPMailer.php | 5071 +++++++++++++++++ _php_archive/php/PHPMailer/POP3.php | 462 ++ _php_archive/php/PHPMailer/SMTP.php | 1456 +++++ _php_archive/server.php | 160 + api.php | 1021 +--- config.php | 440 +- function.php | 317 +- linuxdo.php | 200 +- login.php | 744 +-- nginx.conf.example | 5 + server.php | 167 +- 79 files changed, 12643 insertions(+), 2841 deletions(-) create mode 100644 _php_archive/api.php create mode 100644 _php_archive/config.php create mode 100644 _php_archive/function.php create mode 100644 _php_archive/linuxdo.php create mode 100644 _php_archive/login.php create mode 100644 _php_archive/php/PHPMailer/#/COMMITMENT create mode 100644 _php_archive/php/PHPMailer/#/LICENSE create mode 100644 _php_archive/php/PHPMailer/#/README.md create mode 100644 _php_archive/php/PHPMailer/#/SECURITY.md create mode 100644 _php_archive/php/PHPMailer/#/VERSION create mode 100644 _php_archive/php/PHPMailer/#/composer.json create mode 100644 _php_archive/php/PHPMailer/#/get_oauth_token.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-af.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ar.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-az.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ba.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-be.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-bg.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ca.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ch.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-cs.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-da.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-de.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-el.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-eo.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-es.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-et.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-fa.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-fi.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-fo.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-fr.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-gl.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-he.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-hi.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-hr.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-hu.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-hy.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-id.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-it.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ja.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ka.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ko.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-lt.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-lv.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-mg.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ms.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-nb.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-nl.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-pl.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-pt.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-pt_br.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ro.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-ru.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-sk.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-sl.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-sr.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-sr_latn.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-sv.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-tl.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-tr.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-uk.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-vi.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-zh.php create mode 100644 _php_archive/php/PHPMailer/#/language/phpmailer.lang-zh_cn.php create mode 100644 _php_archive/php/PHPMailer/Exception.php create mode 100644 _php_archive/php/PHPMailer/OAuth.php create mode 100644 _php_archive/php/PHPMailer/OAuthTokenProvider.php create mode 100644 _php_archive/php/PHPMailer/PHPMailer.php create mode 100644 _php_archive/php/PHPMailer/POP3.php create mode 100644 _php_archive/php/PHPMailer/SMTP.php create mode 100644 _php_archive/server.php diff --git a/MIGRATION.md b/MIGRATION.md index 2882805..a9f69e5 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,8 +1,8 @@ # 清渊传奇 PHP → Vue + Node.js 移植计划 -> **文档版本**:v1.2 +> **文档版本**:v1.3 > **创建时间**:2026-03-16 -> **最后更新**:2026-03-16(v1.2) +> **最后更新**:2026-03-16(v1.3) > **负责人**:待定 --- @@ -208,11 +208,11 @@ |---|------|--------|------|----------| | 3.0 | 功能覆盖核查(PHP vs Node.js 对比表) | 🔴 高 | ✅ | 2026-03-16 | | 3.1 | 功能验证:确认所有 PHP 功能在 Node.js 中均有等价实现 | 🔴 高 | ✅ | 2026-03-16 | -| 3.2 | 更新 Nginx/Apache 路由配置,所有 `/api/*` 流量转发到 Node.js | 🔴 高 | ✅ | 2026-03-16(`nginx.conf.example` 已覆盖) | +| 3.2 | 更新 Nginx 路由配置(屏蔽 `.php` 直接访问,补充 `return 404`) | 🔴 高 | ✅ | 2026-03-16 | | 3.3 | 游戏客户端兼容性测试(旧版 token 格式 vs JWT) | 🔴 高 | 🔄 | 需在真实环境测试 | -| 3.4 | 旧版 PHP 文件归档备份 | 🟡 中 | ❌ | 待确认测试通过后执行 | -| 3.5 | 删除根目录 PHP 文件(`api.php`, `login.php` 等) | 🟡 中 | ❌ | 待确认测试通过后执行 | -| 3.6 | 删除 `php/` 目录(PHPMailer 等依赖) | 🟢 低 | ❌ | 待确认测试通过后执行 | +| 3.4 | 旧版 PHP 文件归档备份(`_php_archive/`) | 🟡 中 | ✅ | 2026-03-16(6个PHP文件 + PHPMailer 全部备份) | +| 3.5 | 根目录 PHP 文件替换为「已迁移」提示(`api.php` 返回410,`login.php` 301跳转等) | 🟡 中 | ✅ | 2026-03-16 | +| 3.6 | 删除 `php/` 目录(PHPMailer 等依赖,已归档) | 🟢 低 | 🔄 | 归档已完成,物理删除待用户确认执行 | --- @@ -284,11 +284,11 @@ Egret 游戏资源(`public/` 目录,842 个文件,约数百 MB)需由 We ``` Phase 1:后端补全 ████████████████████ 100% ✅ 完成 Phase 2:前端补全 ████████████████████ 100% ✅ 完成 -Phase 3:PHP 停用 ████████████░░░░░░░░ 60% 🔄 进行中(待真实环境验证后执行文件清理) +Phase 3:PHP 停用 ██████████████████░░ 90% 🔄 进行中(仅剩 php/ 目录物理删除 + 真实环境测试) Phase 4:部署运维 ████████████████████ 100% ✅ 完成 ``` -> **整体进度估算**:约 90%(全部功能已实现并可构建,剩余真实环境验证 + PHP 文件清理) +> **整体进度估算**:约 95%(PHP 文件已归档替换,剩余 `php/` 目录删除确认 + 真实环境联调) --- @@ -299,6 +299,7 @@ Phase 4:部署运维 █████████████████ | 2026-03-16 | v1.0 | 初始版本:完成工程分析,制定移植计划 | WorkBuddy | | 2026-03-16 | v1.1 | Phase1 补全:安全中间件(ipFilter/rateLimiter/errorHandler)、check接口、注册补全(设备/代理)、游戏DB、提现完善、GET /api/bind;Phase2 补全:index.vue 进入游戏逻辑、路由守卫、agree.vue、withdraw.vue;Phase4:.env.example、ecosystem.config.cjs、nginx.conf.example | WorkBuddy | | 2026-03-16 | v1.2 | Phase1 收尾:config/agreement.html 独立协议文件、/api/config 补充提现参数、新增 POST /api/bind_account + GET /api/link(游戏服务端内部接口);Phase2 收尾:login.vue 移动端响应式布局、vite.config.js 分包优化;Phase3:完成全量功能覆盖核查(PHP 100% 已覆盖);Phase4:log4js 文件日志轮转配置、生产构建验证通过(✓ 1670 modules, 11.9s) | WorkBuddy | +| 2026-03-16 | v1.3 | Phase3 清理:所有 PHP 文件归档至 `_php_archive/`(6个PHP+PHPMailer全量);根目录 PHP 文件替换为「已迁移」提示(api.php→410、login.php→301、server/linuxdo/config/function→说明注释);nginx.conf.example 补充 `.php` 文件 404 屏蔽规则;修复 mysql/index.js queryFormat 私有API问题(Node24+mysql2 3.x 兼容性 Bug);修复 log4js.js XML 标签污染导致的语法错误 | WorkBuddy | --- diff --git a/_php_archive/api.php b/_php_archive/api.php new file mode 100644 index 0000000..8212cb0 --- /dev/null +++ b/_php_archive/api.php @@ -0,0 +1,1013 @@ + '登录', 1 => '注册', 2 => '找回密码']; + +$act = input('act'); +$do = input('do'); + +switch ($act) { + case 'reg': + $fromMicroClient = 'microClient' == $do; + + $type = intval(input('type')); + $account = input('account'); + $password = input('password'); + $serverId = 0; + $email = ''; + $agent_id = 0; + + if (!in_array($type, [0, 1, 2])) + returnJson(['code' => 1, 'msg' => '参数错误!请刷新页面重试~'], $fromMicroClient); + + if (!$account) + returnJson(['code' => 1, 'msg' => '请输入' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix']], $fromMicroClient); + if (6 > strlen($account) && !in_array($account, array_unique(explode(',', trim($_CONFIG['admin_account'])))) || 16 < strlen($account)) + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '长度为6-16个字符'], $fromMicroClient); + + if (!$password) + returnJson(['code' => 1, 'msg' => '请输入' . $_CONFIG['account_name'] . $_CONFIG['password_name_suffix']], $fromMicroClient); + if (6 > strlen($password) || 16 < strlen($password)) + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '长度为6-16个字符'], $fromMicroClient); + + $ip = get_ip(); + + // 检查IP是否被封 + if ($_CONFIG['deny_ip']) { + $deny_ip = array_unique(explode(',', trim($_CONFIG['deny_ip']))); + if (!empty($deny_ip) && in_array($ip, $deny_ip)) { + returnJson(['code' => 1, 'msg' => '当前未开放访问!'], $fromMicroClient); // 当前IP已禁用 + } + } + + $md5Pwd = md5($password . PASSWORD_KEY); + $time = time(); + + // 做一下从微端登录/注册的兼容 start -------------------------------------------------- + if ($fromMicroClient) { + // 关闭验证码 + $_CONFIG['code_open'] = 0; + // 连接数据库 + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error], $fromMicroClient); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + // 先查询账号是否存在 + $stmt = $mySQLi->prepare('select password from player where username=?'); + $stmt->bind_param('s', $account); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + // 如果帐号存在但密码错误表示登录模式 + if (!empty($row)) { + if ($md5Pwd != $row['password']) { + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '或' . $_CONFIG['password_name_suffix'] . '不正确!'], $fromMicroClient); + } + $type = 0; + } else { // 否则表示注册模式 + $type = 1; + $_CONFIG['reg_code_open'] = 0; + } + } + // 做一下从微端登录/注册的兼容 end -------------------------------------------------- + + // 提前检查条件 + switch ($type) { + case 1: // 注册 + // 是否开放注册 + if (!$_CONFIG['reg_open']) { + returnJson(['code' => 1, 'msg' => '内部测试中,未开放注册,如需体验请联系客服。'], $fromMicroClient); + } + // 检查保留帐号 + if ($_CONFIG['retain_account']) { + $retain_account = array_unique(explode(',', trim($_CONFIG['retain_account']))); + if (!empty($retain_account) && in_array($account, $retain_account)) { + returnJson(['code' => 1, 'msg' => '抱歉!此' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '已被占用,请更换。'], $fromMicroClient); + } + } + + $password2 = input('password2'); + $serverId = intval(input('serverId')); + $email = input('email'); + if ($_CONFIG['code_open'] && $_CONFIG['reg_code_open']) { + $code = input('code'); + } + + if (!$fromMicroClient) { + if (!$password2) + returnJson(['code' => 1, 'msg' => '请再次输入' . $_CONFIG['account_name'] . $_CONFIG['password_name_suffix']], $fromMicroClient); + if (6 > strlen($password2) || 16 < strlen($password2)) + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '长度为6-16个字符'], $fromMicroClient); + if ($password2 != $password) + returnJson(['code' => 1, 'msg' => '两次输入的' . $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '不一致!'], $fromMicroClient); + } + if (!$serverId) + returnJson(['code' => 1, 'msg' => '请选择区服!'], $fromMicroClient); + if ($_CONFIG['code_open']) { + if ($_CONFIG['reg_code_open'] && !$email) + returnJson(['code' => 1, 'msg' => '请输入邮箱地址!'], $fromMicroClient); + if ($email && !filter_var($email, FILTER_VALIDATE_EMAIL)) + returnJson(['code' => 1, 'msg' => '邮箱地址格式错误!'], $fromMicroClient); + + if ($_CONFIG['reg_code_open']) { + if (!$code) + returnJson(['code' => 1, 'msg' => '请输入邮箱验证码!'], $fromMicroClient); + if (strlen($code) != $_CONFIG['code_length']) + returnJson(['code' => 1, 'msg' => '验证码长度为6位数字!'], $fromMicroClient); + } + } + + $agent_id = intval(input('agent_id')); + break; + case 0: // 登录 + // 是否开放登录 + if (!$_CONFIG['login_open'] && !in_array($account, array_unique(explode(',', trim($_CONFIG['admin_account']))))) { + returnJson(['code' => 1, 'msg' => '内部测试中,未开放登录,如需体验请联系客服。'], $fromMicroClient); + } + break; + case 2: // 找回密码 + if (!$_CONFIG['code_open']) { + returnJson(['code' => 1, 'msg' => '验证码系统尚未开启!']); + } + + $password2 = input('password2'); + $email = input('email'); + $code = input('code'); + + if (!$password2) + returnJson(['code' => 1, 'msg' => '请输入' . $_CONFIG['account_name'] . $_CONFIG['password_name_suffix']]); + if (6 > strlen($password2) || 16 < strlen($password2)) + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '长度为6-16个字符']); + if ($password2 != $password) + returnJson(['code' => 1, 'msg' => '两次输入的' . $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '不一致!']); + + if (!$email) + returnJson(['code' => 1, 'msg' => '请输入邮箱地址!']); + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) + returnJson(['code' => 1, 'msg' => '邮箱地址格式错误!']); + + if (!$code) + returnJson(['code' => 1, 'msg' => '请输入邮箱验证码!']); + if (strlen($code) != $_CONFIG['code_length']) + returnJson(['code' => 1, 'msg' => '验证码长度为6位数字!']); + break; + } + + if (!isset($mySQLi)) { + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error], $fromMicroClient); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + } + + // 限制每日注册数量上限 + if (1 == $type && $_CONFIG['day_max_reg']) { + $stmt2 = $mySQLi->prepare("SELECT id FROM player WHERE reg_ip = ? AND FROM_UNIXTIME(reg_time, '%Y-%m-%d') = CURDATE()"); + $stmt2->bind_param('s', $ip); + $stmt2->execute(); + $result2 = $stmt2->get_result(); + $row2 = $result2->fetch_array(); + $regNum = $result2->num_rows; + $result2->free_result(); + $stmt2->close(); + if ($regNum >= $_CONFIG['day_max_reg']) { + $mySQLi->close(); + returnJson(['code' => 10, 'msg' => '您今日注册量已达上限,请明日再试~'], $fromMicroClient); + } + } + + if (2 != $type) { + $field = ['id']; + if (0 == $type) { + $field[] = 'password'; + } + $stmt = $mySQLi->prepare('select ' . implode(', ', $field) . ' from player where username=?'); + $stmt->bind_param('s', $account); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + } + + // 创建账号 + if (1 == $type) { + if (!empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '此' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '已被其他勇士占用!请更换。'], $fromMicroClient); + } + + // test + //returnJson(['code' => 1, 'msg' => 'test register: '.$email], $fromMicroClient); + + if ($email) { + // 检查邮箱地址是否被占用 + $stmt = $mySQLi->prepare('select id from player where email=?'); + $stmt->bind_param('s', $email); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (!empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '此邮箱地址已被其他勇士占用!请更换。', $fromMicroClient]); + } + + // 获取验证码记录 + if ($_CONFIG['code_open'] && $_CONFIG['reg_code_open']) { + $stmt = $mySQLi->prepare('select id, code from verify where account=? and email=? and type=?'); + $stmt->bind_param('ssi', $account, $email, $type); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (empty($row) || $code != $row['code']) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '验证码无效!'], $fromMicroClient); + } + } + } + + $device = isMobile() ? 1 : 0; + $os = getOS(); + $browse = getBrowse(); + + //echo $account.', '.$md5Pwd.', '.$email.', '.$device.', '.getOS().', '.getBrowse().', '.$time.', '.$ip;exit; + + $stmt1 = $mySQLi->prepare('insert into `player` (username, password, server_id, email, agent_id, device, os, browse, reg_time, reg_ip) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); + $stmt1->bind_param('ssisiissis', $account, $md5Pwd, $serverId, $email, $agent_id, $device, $os, $browse, $time, $ip); + $stmt1->execute(); + $rowNum = $stmt1->affected_rows; + $stmt1->close(); + if (0 < $rowNum) { + // 删除验证码 + if ($_CONFIG['code_open'] && $_CONFIG['reg_code_open']) { + $stmt = $mySQLi->prepare('DELETE FROM verify WHERE id = ? and type=?'); + $stmt->bind_param('ii', $row['id'], $type); + $stmt->execute(); + $stmt->close(); + } + + // 代理人 + if (0 < $agent_id) { + // 检查代理人是否存在 + $stmt = $mySQLi->prepare('select id from `agent` where id = ?'); + $stmt->bind_param('i', $agent_id); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + // 如果代理人存在 + if (!empty($row)) { + // 更新代理人邀请统计 + $stmt = $mySQLi->prepare('UPDATE `agent` SET invite_count = invite_count + 1 WHERE id = ?'); + $stmt->bind_param('i', $agent_id); + $stmt->execute(); + $stmt->close(); + } + } + + $mySQLi->close(); + + setcookie('account', $account, $_CONFIG['session_time']); + setcookie('password', $password, $_CONFIG['session_time']); + setcookie('token', $md5Pwd, $_CONFIG['session_time']); + $_SESSION['account'] = $account; + $_SESSION['password'] = $password; + $_SESSION['token'] = $md5Pwd; + + $msgLast = '

'; + $msgLast .= $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . ':' . $account; + $msgLast .= '
'; + $msgLast .= $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . ':' . $password; + $msgLast .= '
'; + $msgLast .= '邮箱地址:' . $email; + + $msg = '恭喜勇士!获得玛法' . $_CONFIG['account_name'] . ',请牢记' . $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '!准备开启玛法之旅..' . (!$fromMicroClient ? $msgLast : ''); + $resData = [ + 'code' => 0, + 'msg' => $msg, + 'token' => $md5Pwd + ]; + if ($fromMicroClient) { + $resData['url'] = '/play?account=' . $account . '&token=' . $md5Pwd; + } + returnJson($resData, $fromMicroClient); + } else { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . '获取失败,请重试~'], $fromMicroClient); + } + } elseif (0 == $type) { // 登录 + $mySQLi->close(); + if (empty($row) || $md5Pwd !== $row['password']) { + returnJson(['code' => 1, 'msg' => '传送员无法匹配此' . $_CONFIG['account_name'] . ',请检查!'], $fromMicroClient); + } else { + setcookie('account', $account, $_CONFIG['session_time']); + setcookie('password', $password, $_CONFIG['session_time']); + setcookie('token', $md5Pwd, $_CONFIG['session_time']); + $_SESSION['account'] = $account; + $_SESSION['password'] = $password; + $_SESSION['token'] = $md5Pwd; + + $resData = ['code' => 0, 'msg' => '欢迎来到清渊传奇,正在传送…', 'token' => $md5Pwd]; + if ($fromMicroClient) { + $resData['url'] = '/play?account=' . $account . '&token=' . $md5Pwd; + } + returnJson($resData, $fromMicroClient); + } + } elseif (2 == $type) { // 重置密码 + if (!$_CONFIG['code_open']) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '验证码系统尚未开启!']); + } + + // 检查邮箱地址是否存在 + $stmt = $mySQLi->prepare('select email from player where username=? and email=?'); + $stmt->bind_param('ss', $account, $email); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '传送员无法匹配此' . $_CONFIG['account_name'] . ',请检查!']); + } + + // 检查验证码 + $stmt = $mySQLi->prepare('select id, code from verify where email=? and type=?'); + $stmt->bind_param('si', $email, $type); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (empty($row) || $code != $row['code']) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '验证码不正确!']); + } + + // 修改密码 + $stmt = $mySQLi->prepare('UPDATE `player` SET password = ? WHERE username=? and email=?'); + $stmt->bind_param('sss', $md5Pwd, $account, $email); + $stmt->execute(); + $stmt->close(); + + // 删除验证码 + $stmt = $mySQLi->prepare('DELETE FROM verify WHERE id = ? and type= ?'); + $stmt->bind_param('ii', $row['id'], $type); + $stmt->execute(); + $stmt->close(); + + $mySQLi->close(); + returnJson(['code' => 0, 'msg' => $_CONFIG['account_name'] . $_CONFIG['password_name_suffix'] . '修改成功!']); + } + break; + case 'getCode': // 发送验证码到邮箱 + if (!$_CONFIG['code_open']) { + returnJson(['code' => 1, 'msg' => '验证码系统尚未开启!']); + } + + $type = intval(input('type')); + $account = input('account'); + $email = input('email'); + + if (!in_array($type, [1, 2])) + returnJson(['code' => 1, 'msg' => '参数错误!请刷新页面重试~']); + + if (!$account) + returnJson(['code' => 1, 'msg' => '请输入' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix']]); + if (6 > strlen($account) && !in_array($account, array_unique(explode(',', trim($_CONFIG['admin_account'])))) || 16 < strlen($account)) + returnJson(['code' => 1, 'msg' => $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '长度为6-16个字符']); + + if (!$email) + returnJson(['code' => 1, 'msg' => '请输入邮箱地址!']); + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) + returnJson(['code' => 1, 'msg' => '邮箱地址格式错误!']); + + $ip = get_ip(); + + // 检查IP是否被封 + if ($_CONFIG['deny_ip']) { + $deny_ip = array_unique(explode(',', trim($_CONFIG['deny_ip']))); + if (!empty($deny_ip) && in_array($ip, $deny_ip)) { + returnJson(['code' => 1, 'msg' => '当前未开放访问!']); // 当前IP已禁用 + } + } + + if (1 == $type) { + // 是否开放注册 + if (!$_CONFIG['reg_open']) { + returnJson(['code' => 1, 'msg' => '内部测试中,未开放注册,如需体验请联系客服。']); + } + // 检查保留帐号 + if ($_CONFIG['retain_account']) { + $retain_account = array_unique(explode(',', trim($_CONFIG['retain_account']))); + if (!empty($retain_account) && in_array($account, $retain_account)) { + returnJson(['code' => 1, 'msg' => '抱歉!此' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '已被占用,请更换。']); + } + } + } + + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + + if (1 == $type) { + // 限制每日注册数量上限 + if ($_CONFIG['day_max_reg']) { + $stmt2 = $mySQLi->prepare("SELECT id FROM player WHERE reg_ip = ? AND FROM_UNIXTIME(reg_time, '%Y-%m-%d') = CURDATE()"); + $stmt2->bind_param('s', $ip); + $stmt2->execute(); + $result2 = $stmt2->get_result(); + $row2 = $result2->fetch_array(); + $regNum = $result2->num_rows; + $result2->free_result(); + $stmt2->close(); + if ($regNum >= $_CONFIG['day_max_reg']) { + $mySQLi->close(); + returnJson(['code' => 10, 'msg' => '您今日注册量已达上限,请明日再试~']); + } + } + } + + if (1 == $type) { // 注册时 + // 检查帐号是否被占用 + $stmt = $mySQLi->prepare('select id from player where username=?'); + $stmt->bind_param('s', $account); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (!empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '此' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . '已被其他勇士占用!请更换。']); + } + // 检查邮箱地址是否被占用 + $stmt = $mySQLi->prepare('select id from player where email=?'); + $stmt->bind_param('s', $email); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (!empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '此邮箱地址已被其他勇士占用!请更换。']); + } + } else if (2 == $type) { // 找回密码时:检查帐号和邮箱地址是否存在 + $stmt = $mySQLi->prepare('select id from player where username=? and email=?'); + $stmt->bind_param('ss', $account, $email); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + if (empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '传送员无法匹配此' . $_CONFIG['account_name'] . ',请检查!']); + } + } + + // 获取验证码记录 + $stmt = $mySQLi->prepare('select id, time from verify where account=? and email=? and type=?'); + $stmt->bind_param('ssi', $account, $email, $type); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + $result->free_result(); + $stmt->close(); + + $sendInterval = $_CONFIG['code_send_interval']; + $nowTime = time(); + $leftTime = ($sendInterval - ($nowTime - $row['time'])); + + // 检查发送时间间隔 + if (!empty($row) && $nowTime - $row['time'] < $sendInterval) { + $mySQLi->close(); + returnJson([ + 'code' => 1, + 'msg' => '操作频繁!请' . $leftTime . '秒后发送~', + 'time' => $leftTime + ]); + } + + $code = getRandomString($_CONFIG['code_length'], $_CONFIG['code_data_type']); + + if ('email' == $_CONFIG['code_type']) { + // 邮件主题 + $subject = '【' . $_CONFIG['game_name'] . '】' . $typeNames[$type]; + // 邮件正文 + $message = '
'; + $message .= '
'; + $message .= $subject . '

'; + $message .= '您的' . $_CONFIG['account_name'] . $_CONFIG['account_name_suffix'] . ':' . $account . '
'; + $message .= '您的验证码:' . $code . '

'; + $message .= '用于' . $typeNames[$type] . '验证,5分钟内使用有效。

'; + $message .= '' . $_CONFIG['game_name'] . ' ' . $_CONFIG['game_description'] . '
'; + $message .= '' . $_CONFIG['web_url'] . '

'; + $message .= '如有疑问请联系客服QQ:' . $_CONFIG['kf_qq'] . ' / 客服微信:' . $_CONFIG['kf_wx']; + $message .= '
'; + $message .= '
'; + + require_once 'php/PHPMailer/PHPMailer.php'; + require_once 'php/PHPMailer/SMTP.php'; + + $mail = new PHPMailer(); + // 是否启用smtp的debug进行调试 开发环境建议开启 生产环境注释掉即可 默认关闭debug调试模式 + $mail->SMTPDebug = 0; + // 使用smtp鉴权方式发送邮件 + $mail->isSMTP(); + // smtp需要鉴权 这个必须是true + $mail->SMTPAuth = true; + $mail->Host = $_CONFIG['mail_host']; + // 设置使用ssl加密方式登录鉴权 + $mail->SMTPSecure = 'ssl'; + $mail->Port = $_CONFIG['mail_port']; + $mail->CharSet = $_CONFIG['mail_charset']; + $mail->FromName = $_CONFIG['game_name']; + $mail->Username = $_CONFIG['mail_from']; + $mail->Password = $_CONFIG['mail_password']; + $mail->From = $_CONFIG['mail_from']; + $mail->isHTML(true); + // 设置收件人邮箱地址 + $mail->addAddress($email); + // 添加多个收件人 则多次调用方法即可 + //$mail->addAddress('317743968@qq.com'); + $mail->Subject = $subject; + $mail->Body = $message; + //$mail->addAttachment('./example.pdf'); + $status = $mail->send(); + } elseif ('mobile' == $_CONFIG['code_type']) { + $status = 0; + } + + // 检查发送时间间隔 + if (!$status) { + $mySQLi->close(); + returnJson([ + 'code' => 1, + 'msg' => '验证码发送失败!请重试~', + 'time' => $leftTime + ]); + } + + // 插入验证记录 + if (empty($row)) { + $stmt1 = $mySQLi->prepare('insert into `verify` (account, type, email, code, time, ip) values(?, ?, ?, ?, ?, ?)'); + $stmt1->bind_param('sisiis', $account, $type, $email, $code, $nowTime, $ip); + $stmt1->execute(); + $rowNum = $stmt1->affected_rows; + $stmt1->close(); + if (!$rowNum) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '验证码发送失败!请重试~']); + } + } else { + $stmt1 = $mySQLi->prepare('UPDATE `verify` SET code=?, time=? WHERE id=? and type=?'); + $stmt1->bind_param('siii', $code, $nowTime, $row['id'], $type); + $stmt1->execute(); + $stmt1->close(); + $mySQLi->close(); + } + + returnJson(['code' => 0, 'msg' => '验证码已经发送到您的邮箱:' . $email . ',请查收!', 'time' => $sendInterval]); + break; + case 'check': // 验证帐号 + switch ($do) { + case 'verify': + $account = input('account'); + $token = input('token'); + + if (!$account || 6 > strlen($account) && !in_array($account, array_unique(explode(',', trim($_CONFIG['admin_account'])))) || 16 < strlen($account) || !$token || 32 != strlen($token)) + returnJson(['code' => 1, 'msg' => 'account or password error']); + + // 是否开放登录 + if (!$_CONFIG['login_open'] && !in_array($account, array_unique(explode(',', trim($_CONFIG['admin_account']))))) + returnJson(['code' => 1, 'msg' => '内部测试中,未开放登录,如需体验请联系客服。']); + + // 检查IP是否被封 + if ($_CONFIG['deny_ip']) { + $ip = get_ip(); + $deny_ip = array_unique(explode(',', trim($_CONFIG['deny_ip']))); + if (!empty($deny_ip) && in_array($ip, $deny_ip)) { + returnJson(['code' => 1, 'msg' => '当前未开放访问!']); // 当前IP已禁用 + } + } + + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + + $stmt = $mySQLi->prepare('select id from player where username=? and password=?'); + $stmt->bind_param('ss', $account, $token); + $stmt->execute(); + + $result = $stmt->get_result(); + $row = $result->fetch_array(); + + $result->free_result(); + $stmt->close(); + $mySQLi->close(); + + if (!$row) + returnJson(['code' => 1, 'msg' => 'account no exist']); + + // 验证成功 + returnJson(['code' => 0]); + break; + default: + echo 'success'; + } + break; + case 'enter_game': + if (!isPost()) + returnJson(['code' => 1, 'msg' => 'request error']); + + $srvId = intval(input('srvId')); + $account = input('account'); + $token = input('token'); + + if (!$srvId || !$account || !$token || 32 != strlen($token)) + returnJson(['code' => 1, 'msg' => 'param error']); + + // 是否开放登录 + if (!$_CONFIG['login_open'] && !in_array($account, array_unique(explode(',', trim($_CONFIG['admin_account']))))) { + returnJson(['code' => 1, 'msg' => '内部测试中,未开放登录,如需体验请联系客服。']); + } + + $time = time(); + $ip = get_ip(); + + // 检查IP是否被封 + if ($_CONFIG['deny_ip']) { + $deny_ip = array_unique(explode(',', trim($_CONFIG['deny_ip']))); + if (!empty($deny_ip) && in_array($ip, $deny_ip)) { + returnJson(['code' => 1, 'msg' => '当前未开放访问!']); // 当前IP已禁用 + } + } + + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + + // 检查帐号是否存在 + $stmt = $mySQLi->prepare('select id from player where username=? and password=?'); + $stmt->bind_param('ss', $account, $token); + $stmt->execute(); + + $result = $stmt->get_result(); + $row = $result->fetch_array(); + + $result->free_result(); + $stmt->close(); + + if (empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => 'account no exist']); + } + + // 更新登录时间和登录IP + $stmt = $mySQLi->prepare('UPDATE `player` SET login_time = ?, login_ip = ? WHERE username=?'); + $stmt->bind_param('iss', $time, $ip, $account); + $stmt->execute(); + + $stmt->close(); + $mySQLi->close(); + + // TODO: login server history + + returnJson(['code' => 0]); + break; + case 'game': // 游戏接口 + switch ($do) { + case 'withdraw': // 提现 + if (!isPost()) + returnJson(['code' => 1, 'msg' => 'request error']); + if (!in_array($_CONFIG['withdraw']['type'], array_keys($_CONFIG['currency_list']))) + returnJson(['code' => 1, 'msg' => 'currency error']); + + $serverId = intval(substr(input('server_id'), 1)); + $account = input('account'); + $token = input('token'); + $roleId = intval(input('role_id')); + $roleName = input('role_name'); + $payType = intval(input('pay_type')); + $payAccount = input('pay_account'); + $amount = intval(input('amount')); + + /* 检查参数 ---------------------------------------------------------------------------------------------------- */ + + if (!$serverId || !$account || !$roleId || !$roleName || !$payAccount || !$amount) + returnJson(['code' => 1, 'msg' => '参数错误!']); + if (26 < strlen($account)) + returnJson(['code' => 1, 'msg' => '参数错误!']); + if (!$token || 32 != strlen($token)) + returnJson(['code' => 1, 'msg' => '参数错误!']); + if (24 < strlen($roleName)) + returnJson(['code' => 1, 'msg' => '参数错误!']); + if (!in_array($payType, [0, 1])) + returnJson(['code' => 1, 'msg' => '收款账户类型不正确!']); + if (30 < strlen($payAccount)) + returnJson(['code' => 1, 'msg' => '收款账户格式不正确!']); + + // 检查是否开启提现功能 + //if($_CONFIG['withdraw']['sid'] != $serverId) returnJson(['code' => 1, 'msg' => '尚未开启提现功能!']); + // 检查最低提现数量 + if ($_CONFIG['withdraw']['ratio'] > $amount) + returnJson(['code' => 1, 'msg' => '最低提现数量为' . $_CONFIG['withdraw']['ratio']]); + // 限制一次提现人民币最低20元 + $maxNum = $_CONFIG['withdraw']['ratio'] * 20; + if ($maxNum > $amount) + returnJson(['code' => 1, 'msg' => '单次提现数量不能低于' . $maxNum]); + + $time = time(); + $accountId = 0; + $currencyName = $_CONFIG['currency_list'][$_CONFIG['withdraw']['type']]; + $currencyField = $_CONFIG['currency_field'][$_CONFIG['withdraw']['type']]; + + /* 连接帐号数据库 ---------------------------------------------------------------------------------------------------- */ + + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + + /* 检查帐号是否存在 ---------------------------------------------------------------------------------------------------- */ + + $stmt = $mySQLi->prepare('select id from player where username=? and password=?'); + $stmt->bind_param('ss', $account, $token); + $stmt->execute(); + + $result = $stmt->get_result(); + $row = $result->fetch_array(MYSQLI_ASSOC); + + $result->free_result(); + $stmt->close(); + + if (empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => '账号不存在!']); + } + + /* 限制提现时间间隔 ---------------------------------------------------------------------------------------------------- */ + + $withdrawMinTime = 30; + $stmt = $mySQLi->prepare('select time from withdraw where server_id = ? and role_id = ? order by id desc limit 1'); + $stmt->bind_param('ii', $serverId, $roleId); + $stmt->execute(); + + $result = $stmt->get_result(); + $row = $result->fetch_array(MYSQLI_ASSOC); + + $result->free_result(); + $stmt->close(); + + // test + //$mySQLi->close(); + //print_r($row);exit; + + if (!empty($row) && $time - $row['time'] < $withdrawMinTime) { + $mySQLi->close(); + $msg = '请等待 ' . ($time - $row['time']) . ' 秒后再试~'; + returnJson(['code' => 1, 'msg' => $msg]); + } + + /* 连接区服数据库 ---------------------------------------------------------------------------------------------------- */ + + $dbActor = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], 'mir_actor_s' . $serverId, $mir_actor_s1_port); + if ($dbActor->connect_errno) + exit($dbActor->connect_error); + $dbActor->set_charset($_CONFIG_DB['db_charset']); + + /* 检查提现货币数量是否足够 ---------------------------------------------------------------------------------------------------- */ + + $stmt = $dbActor->prepare("select $currencyField from actors where actorid=?"); + $stmt->bind_param('i', $roleId); + $stmt->execute(); + + $result = $stmt->get_result(); + $row = $result->fetch_array(MYSQLI_ASSOC); + + $result->free_result(); + $stmt->close(); + + if (empty($row)) { + $mySQLi->close(); + $dbActor->close(); + returnJson(['code' => 1, 'msg' => '找不到角色!']); + } + if ($row[$currencyField] < $amount) { + $mySQLi->close(); + $dbActor->close(); + returnJson(['code' => 1, 'msg' => "您帐户的" . $currencyName . "不足!\n\n查询可能有延迟,\n请稍候再试~"]); + } + + /* 插入提现记录 ---------------------------------------------------------------------------------------------------- */ + + $money = floor($amount / $_CONFIG['withdraw']['ratio']); + $stmt = $mySQLi->prepare('insert into `withdraw` (account, account_id, server_id, role_id, pay_type, pay_account, amount, money, time) values(?, ?, ?, ?, ?, ?, ?, ?, ?)'); + if (!$stmt) { + $mySQLi->close(); + $dbActor->close(); + returnJson(['code' => 1, 'msg' => $mySQLi->errno . '-' . $mySQLi->error]); + } + $stmt->bind_param('siiiisiii', $account, $accountId, $serverId, $roleId, $payType, $payAccount, $amount, $money, $time); + $stmt->execute(); + $wid = $stmt->insert_id; + $stmt->close(); + + if (empty($wid)) { + writeLog('提现扣除失败:' . $amount . $currencyName . '=' . $money . '元, s' . $serverId . ' ' . $roleName . ',插入失败'); + $mySQLi->close(); + $dbActor->close(); + returnJson(['code' => 1, 'msg' => '提现记录插入失败!']); + } + + /* 扣除提现货币 ---------------------------------------------------------------------------------------------------- */ + + $cmdUrl = get_http_type() . $_CONFIG['host'] . ':111/?'; + $operid = 10030; + $command = $roleName . '|' . $_CONFIG['withdraw']['type'] . '|' . $amount; + $post_data = ['operid' => $operid, 'server_num' => $serverId, 'user' => $account, 'spid' => $_CONFIG['spid'], 'command' => $command]; + $url = $cmdUrl . http_build_query($post_data); + $result = curl($url, $post_data); + //echo $url; + //print_r($result);exit; + $arr = $result ? explode(',', $result) : []; + $code = !empty($arr) && 1 == $arr[0] ? 0 : 1; + if (1 == $code) { + writeLog('提现扣除失败:' . $amount . $currencyName . '=' . $money . '元, s' . $serverId . ' ' . $roleName); + $mySQLi->close(); + $dbActor->close(); + returnJson(['code' => 1, 'msg' => '提现请求失败!请稍候再试~', 'result' => $result]); + } + + writeLog('提现成功:' . $amount . $currencyName . '=' . $money . '元, s' . $serverId . ' ' . $roleName); + + /* 更新提现状态 ---------------------------------------------------------------------------------------------------- */ + + $withdrawStatus = 1; // 货币扣除成功,可以打钱 + $stmt = $mySQLi->prepare('UPDATE `withdraw` SET status = ? WHERE id = ?'); + $stmt->bind_param('si', $withdrawStatus, $wid); + $stmt->execute(); + + $stmt->close(); + $mySQLi->close(); + $dbActor->close(); + + returnJson(['code' => 0, 'msg' => "成功提现:$amount$currencyName\n收益人民币:{$money}元\n\n请留意您的收款账户余额。"]); + break; + default: + // + } + returnJson(['code' => 0]); + break; + case 'report': // 上报信息 + switch ($do) { + case 'game_profile': + // + break; + case 'chat': // 上报聊天 + if (!isPost()) + returnJson(['code' => 1, 'msg' => 'request error']); + + $serverId = intval(substr(input('server_id'), 1)); + $account = input('account'); + $token = input('token'); + $roleId = intval(input('role_id')); + $channelId = intval(input('channel_id')); + $content = input('content'); + $cross = 1 == input('cross') ? 1 : 0; + + if (!$serverId || !$account || !$roleId || !$content) + returnJson(['code' => 1, 'msg' => 'param error']); + if (26 < strlen($account)) + returnJson(['code' => 1, 'msg' => 'param error']); + if (!$token || 32 != strlen($token)) + returnJson(['code' => 1, 'msg' => 'param error']); + if (10 < $channelId) + returnJson(['code' => 1, 'msg' => 'param error']); + if (255 < strlen($content)) + returnJson(['code' => 1, 'msg' => 'param error']); + + // 检查帐号是否存在 + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + + $stmt = $mySQLi->prepare('select id from player where username=? and password=?'); + $stmt->bind_param('ss', $account, $token); + $stmt->execute(); + + $result = $stmt->get_result(); + $row = $result->fetch_array(); + + $result->free_result(); + $stmt->close(); + + if (empty($row)) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => 'account no exist']); + } + + $time = time(); + $accountId = 0; + + // 插入聊天记录 + $stmt = $mySQLi->prepare('insert into `chat` (account, account_id, server_id, role_id, channel_id, content, is_cross, time) values(?, ?, ?, ?, ?, ?, ?, ?)'); + if (!$stmt) { + $mySQLi->close(); + returnJson(['code' => 1, 'msg' => $mySQLi->errno . '-' . $mySQLi->error]); + } + $stmt->bind_param('siiisssi', $account, $accountId, $serverId, $roleId, $channelId, $content, $cross, $time); + $stmt->execute(); + + $stmt->close(); + $mySQLi->close(); + break; + default: + // + } + returnJson(['code' => 0]); + break; + case 'misc': + switch ($do) { + case 'agree': + exit($_CONFIG['agree']); + break; + } + case 'bind': + $tpType = 'linuxdo'; + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + $stmt = $mySQLi->prepare('insert into `player_connect_threeparty` (username, type, connect_id) values(?, ?, ?)'); + $stmt->bind_param('sss', input('account'), $tpType, input('connect_id')); + $stmt->execute(); + $stmt->close(); + $stmt = $mySQLi->prepare('select password from player where username=?'); + $stmt->bind_param('s', input('account')); + $stmt->execute(); + $result = $stmt->get_result(); + $data = $result->fetch_array(); + $result->free_result(); + returnJson($data); + $stmt->close(); + $mySQLi->close(); + break; + case 'link': + $connectId = input('connect_id'); + $tpType = 'linuxdo'; + $mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); + if ($mySQLi->connect_errno) + returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); + $mySQLi->set_charset($_CONFIG_DB['db_charset']); + $stmt = $mySQLi->prepare('select username from player_connect_threeparty where type=? and connect_id=? limit 1'); + $stmt->bind_param('ss', $tpType, $connectId); + $stmt->execute(); + $result = $stmt->get_result(); + $row = $result->fetch_array(); + if (!empty($row)) { + $getPlayer = $mySQLi->prepare('select username,password from player where username=? limit 1'); + $getPlayer->bind_param('s', $row['username']); + $getPlayer->execute(); + $res = $getPlayer->get_result(); + $account = $res->fetch_array(); + returnJson(['code' => 0, 'data' => $account]); + $res->free_result(); + $getPlayer->close(); + } else { + returnJson(['code' => '1']); + } + $stmt->close(); + $mySQLi->close(); + break; + default: + echo 'success'; +} diff --git a/_php_archive/config.php b/_php_archive/config.php new file mode 100644 index 0000000..b617717 --- /dev/null +++ b/_php_archive/config.php @@ -0,0 +1,437 @@ + '121.36.201.12', + 'db_port' => 32506, + 'db_name' => 'mir_web', + 'db_user' => 'root', + 'db_password' => 'mysql_Adkijc', + 'db_charset' => 'utf8', +]; +$mir_actor_s1_port = 32506; + +// LINUXDO三方登录 +$_LINUXDO_CONNECT = [ + 'client_id'=>'tfKevot5lSwB5A5gcqPQMMhaXDLjib0P', + 'client_secret'=>'95KWP8sbRIUu5df7gBo5fIztz6ISmvfa' +]; + +// 网站IP+端口 +$_host = $protocol.$_SERVER['HTTP_HOST']; +$_port = 80; + +// 主配置 +$_CONFIG = [ + 'web_url' => 'http://'.$_host.(80 != $_port ? ':'.$_port : ''), + + 'host' => $_host, // 网站IP + 'port' => $_port, // 网站端口 + + // 游戏IP+端口 + 'game_host' => $_host, // 游戏服务器IP + 'game_port' => 9000, // 游戏网关起始端口,1区则9001 + + 'game_name' => '清渊传奇', // 游戏名字 + 'game_first_name' => '清渊', // 游戏名字前缀 + 'game_description' => '经典复古 爽快耐玩', // 游戏描述 + + 'copyright' => '2022 © XX信息科技有限公司', + + + // 请勿更改 + 'spid' => 1, + 'pf' => 'yfbx', + 'pf_id' => 10001, + + // 提现配置 + 'withdraw' => [ + 'sid' => 1, // 开启提现的区ID,0表示关闭提现功能 + 'type' => 3, // 提现的货币类型:2=金币,3=银两,4=元宝 + 'ratio' => 10000 // 提现比例:10000货币值=1元 + ], + + // 游戏货币配置 + 'currency_list' => [2 => '金币', 3 => '银两', 4 => '元宝'], // 货币列表 + 'currency_field' => [2 => 'bindcoin', 3 => 'bindyuanbao', 4 => 'nonbindyuanbao'], // 货币字段名(请勿更改) + + // 客服信息 + 'kf_qq' => '123456', + 'kf_wx' => '123456', + + // 帐号密码别名 + 'account_name' => '通行证', + 'account_name_suffix' => '号', + 'password_name_suffix' => '密文', + + 'admin_account' => 'admin', // 管理员帐号 + + 'reg_open' => 1, // 是否开放注册 + 'login_open' => 1, // 是否开放登录 + + 'day_max_reg' => 1, // 单个玩家每日注册帐号数量上限 + + //'allow_ip' => '', // 允许访问的IP + 'deny_ip' => '127.0.0.1', // 禁用IP + + 'code_open' => 1, // 验证码(总开关)是否开启:用于注册/找回密码验证 + 'reg_code_open' => 0, // 注册是否需要验证码 + 'code_type' => 'email', // email=邮件,mobile=手机短信(未实现) + 'code_length' => 6, // 验证码最大长度,请勿设置大于6 + 'code_data_type' => 'NUMBER', // 验证码字符类型:NUMBER=纯数字,CHAR=大小写字母,ALL=大小写字母+数字+符号 + 'code_send_interval' => 60, // 发送验证码时间间隔(秒) + + // 发送邮件配置 + 'mail_from' => 'admin@163.com', // 发件人邮箱 + 'mail_password' => '123456', // 发件人邮箱密码 + 'mail_host' => 'smtp.163.com', // 发件SMTP服务器 + 'mail_port' => 465, // 发件SMTP服务器端口 + 'mail_charset' => 'UTF-8', + + // 注册保留帐号 + 'retain_account' => 'administror,admin', + + // 登录过期时间(默认30天) + 'session_time' => time() + (86400 * 30), + + 'agree' => '
+前言
+本《用户服务协议》(以下简称“本协议”)是由您(以下称为“用户”)与广东夜风信息技术有限公司(以下称为“夜风”)就夜风在其和/或其关联公司的游戏平台上所提供的产品和服务(包括夜风的网站以及夜风现在正在提供和将来可能向用户提供的游戏服务和其他网络服务,以下统称为“产品和服务”)所订立的协议。

+重要须知:
+1、本协议在用户获得及使用夜风游戏产品和服务之日签订并生效。本协议的订立、履行、解释及争议的解决均适用中华人民共和国法律并排除其他一切冲突法的适用。本协议订立于广东省广州市天河区。如双方就本协议的内容或其执行发生任何争议(包括但不限于合同或者其他财产性权益纠纷),双方应友好协商解决;协商不成时,双方同意交由夜风所在地有管辖权的人民法院管辖并处理。
+2、请用户仔细阅读本协议内容(特别是加粗字体的内容)。如用户不同意本协议的任意内容,请不要注册或使用夜风提供的任何产品和服务。如用户通过进入注册程序并勾选“我已阅读并同意用户服务协议与隐私协议”,即表示用户与夜风已达成协议,自愿接受本协议及《用户隐私协议》的所有内容。此后,用户不得以未阅读/未同意本协议及《用户隐私协议》的内容作任何形式的抗辩。
+3、请注意,夜风可能适时对本协议进行修改与更新,用户同意将随时留意查看本协议的最新版本。请在使用夜风的产品(或服务)前,仔细阅读并了解本协议,以确保对本协议的最新版本始终保持了解。用户不同意或不接受本协议条款内容的,请不要继续使用夜风游戏提供的产品和服务,否则视为用户同意接受修订后的本协议内容。
+4、夜风游戏特别提醒用户认真阅读本协议的全部条款,特别是其中免除或者限制夜风游戏责任的条款(该等条款通常含有“不负责”、“不保证”等词汇)、限制用户权利的条款(该等条款通常含有“不得”、“不应”、“不允许”、“禁止”等词汇)、法律适用和争议解决条款,这些条款应在中国法律所允许的范围内最大程度地适用,该类条款通常用红色字体标示。
+5、如果用户未满18周岁,请在法定监护人的陪同下阅读本协议,并特别注意未成年人使用条款。如未成年人继续使用夜风游戏提供的游戏及服务的,视为未成年人用户已取得法定监护人对该用户享用夜风游戏提供的游戏和服务、向夜风游戏支付费用的行为,以及对本协议全部条款的同意。

+一、服务内容
+1.1. 夜风产品和服务的具体内容由夜风根据实际情况提供,例如网络游戏、手机软件、论坛(BBS)、聊天室、电子邮件等。夜风保留随时变更、中断或终止部分或全部产品和服务的权利。
+1.2. 夜风在提供产品和服务时,可能会对部分用户收取一定的费用。在此情况下,相关页面上会有明确的提示。如用户不同意支付该等费用,可选择不接受相应的产品和服务。
+1.3. 夜风通过服务器端设备接入互联网为用户提供产品和服务,除此之外与产品和服务有关的设备(如电脑、手机、调制解调器及其他与接入互联网有关的装置)及所需的费用(如为接入互联网而支付的电话费及上网费)均应由用户自行负担。
+1.4. 用户应使用正版软件接受产品和服务,软件费用由用户自行负担。
+二、帐号名称和密码
+2.1. 用户阅读并同意本协议,成功完成注册后,即成为夜风的注册用户,取得夜风用户帐号(以下称“夜风帐号”)。夜风帐号名称在注册之后不可变更,而帐号对应的密码则可以通过夜风提供的客户服务进行修改。
+2.2. 用户对于夜风帐号及密码的保管以及使用该帐号和密码所进行的一切行为负有完全的责任。夜风禁止用户将夜风帐号或密码进行销售、转让或出借、共享给他人使用。因为用户的保管疏忽或任何第三方行为,导致用户的夜风帐号或密码遭他人非法使用,以及因此而产生的任何后果,夜风均不承担任何责任。
+2.3. 用户发现其夜风帐号或密码被他人非法使用或有使用异常情况的,应及时根据夜风不时公布的处理方式通知夜风,并有权请求夜风采取措施暂停该帐号的登录和使用。夜风根据用户身份核对结果,有权决定是否暂停用户帐号的登录和使用。
+2.4. 如果用户选择通过“快速游戏”、“游客”或其他类似便捷模式(下称“游客模式”),在未注册用户帐号的前提下快速登录游戏的,请用户登录后及时绑定用户帐号;如用户未绑定用户帐号的,则一旦用户选择卸载、重装夜风的产品或游戏软件的,或用户的移动智能设备、电脑损坏导致产品或游戏软件无法正常启动的,用户在游客模式下的全部游戏数据、游戏记录等内容将无法查询、恢复。
+三、帐号注册信息
+3.1. 提供注册信息
+(1)在申请夜风帐号时(或注册后补充信息时),用户应当向夜风提供最新、详细及真实准确的个人注册信息。前述个人注册信息包括:用户的夜风帐号名称、密码及注册夜风帐号(或补充、更新帐号信息时)输入的所有信息。用户在此承诺:用户应依据相关法律法规的规定及夜风提供的相关指引以其真实身份注册成为夜风的用户,并保证所提供的个人身份资料信息真实、完整、有效,依据法律规定和必备条款约定对所提供的信息承担相应的法律责任,未进行实名认证的用户部分夜风账号功能将可能被限制。夜风应当为用户提供帐号注册人证明、原始注册信息等必要的协助和支持,并根据需要向有关行政机关和司法机关提供相关证据信息资料。
+(2)所有由用户提供的个人注册信息将可能被夜风用来作为认定夜风帐号的关联性以及辨别用户身份的唯一依据。用户同意应夜风的要求,随时提供该等信息的证明材料,以便夜风核实用户身份。
+(3)如果用户提供给夜风的信息不准确,或不真实,或非法无效,或已变更而未及时更新,或有任何误导之嫌,夜风有权中止或终止该用户使用夜风的任何服务,直至用户提供符合要求的信息。夜风采取中止措施应当通知用户并告知中止期间,中止期间应该是合理的,中止期间届满夜风应当及时恢复对用户的服务。
+(4)夜风有权审查用户注册所提供的身份信息是否真实、有效,并应积极地采取技术与管理等合理措施保障用户帐号的安全、有效;用户有义务妥善保管其帐号及密码,并正确、安全地使用其帐号及密码。任何一方未尽上述义务导致帐号密码遗失、帐号被盗等情形而给对方或他人的权利造成损害的,应当承担由此产生的法律责任。
+3.2. 查询注册信息
+用户有权随时通过登录夜风官方网站,在“用户中心”页面访问和查阅用户注册信息及个人信息。
+3.3. 修改注册信息
+用户有权随时通过登录夜风官方网站,在“用户中心”页面,或通过夜风公布的其他途径,更新或修改用户申请注册时所提供的信息。夜风应当及时、有效地为其提供该项服务。但是,用户在注册夜风帐号时(或注册后补充信息时)填写的真实姓名、证件号码,以及夜风帐号名称本身在帐号注册成功后(或补充信息后)如无特殊原因将无法进行修改,请用户慎重填写各类注册信息。
+3.4. 用户同意,与其夜风帐号相关的一切资料、数据和记录(包括但不限于登录记录、登录后行为记录、点卡信息等)均以夜风系统记录的数据为准。
+四、信息披露与保护
+4.1. 本协议第三条所描述的注册信息,以及用户在使用产品和服务时存储在夜风控制范围内的非公开信息(以下合称“用户信息”),应按照本条约定进行披露及保护。
+4.2. 为了向用户提供更好的产品和服务,在用户自愿选择使用夜风的产品和服务的情况下,或者明示同意提供信息的情况下,夜风可能会收集用户信息,并可能对这些信息进行分析和整合。在用户使用夜风的产品和服务时,服务器可能会自动记录部分用户信息,这些信息都将成为夜风商业秘密的一部分。
+4.3. 保护用户(特别是未成年人用户)的隐私是夜风的一项基本原则。夜风一贯积极地采取技术与管理等方面的合理措施保障用户信息的安全、保密。
+4.4. 除本条所列下述情形之外,夜风保证不对外公开或向第三方披露、提供用户信息。但以下情形除外:
+(1)用户(或者用户的监护人)要求或同意夜风披露用户信息;
+(2)有关法律法规要求夜风披露用户信息;
+(3)司法机关或行政机关基于法定程序要求夜风披露用户信息;
+(4)为保护夜风的合法权益(知识产权和其他权益)向用户提起诉讼或者仲裁时需要披露用户信息;
+(5)在紧急情况下为保护其他用户和社会公众的利益,需要披露用户信息;
+(6)根据本协议其他条款的规定,夜风游戏认为确有必要披露用户信息的其他情况。
+4.5. 为了向用户正常地提供产品和服务,夜风可能需要向夜风的技术服务商、夜风的关联公司或其他第三方传送部分用户信息,在这些第三方承诺其具有合法经营资质并将承担至少与夜风同等的保密义务的前提下,夜风将向这些第三方传送用户信息,用户对此予以理解和同意。
+4.6. 在不透露单个用户隐私资料的前提下,夜风有权对整个用户信息数据库进行技术分析并对已进行分析、整理后的用户数据库进行商业上的利用。
+4.7. 夜风将采取行业内通用的、合理可行的方式保护用户的个人信息的安全。夜风使用通常可以获得的安全技术和程序来保护用户的个人信息不被未经授权地访问、使用或泄漏,包括但不限于:防火墙和数据备份措施;数据中心的访问权限限制;对移动终端的识别性信息进行加密处理等。
+五、用户的基本权利
+5.1. 用户可以根据本协议以及夜风不时公布和变更的其他规则使用夜风提供的产品和服务。
+5.2. 用户可以自愿选择通过手机绑定夜风提供的页面,从而在第一时间获得夜风提供的游戏活动、优惠信息等内容。
+5.3. 用户有权在使用夜风提供的产品和服务期间监督夜风及夜风的工作人员是否按照夜风所公布的标准向用户提供产品和服务,也可以随时向夜风提出与产品和服务有关的意见和建议。
+5.4. 如果用户不同意本协议条款,或对夜风后来修改、更新的条款有异议,或对夜风所提供的产品和服务不满意,用户可以随时选择停止使用夜风的产品和服务。如果用户选择停止使用夜风的产品和服务,夜风不再对用户承担任何义务和责任。
+六、用户行为守则
+6.1. 用户同意按照包括本协议在内的、夜风不时发布或变更的各类规则规范自己的行为,从而接受并使用夜风的产品和服务。用户对登录后其所持帐号产生的行为依法享有权利和承担责任。用户进一步同意,在违反这些规则时,按照本协议第六条第14款、第15款、第十四条及其他相关条款的规定承担违规后果和违约责任。
+6.2. 用户在使用夜风帐号期间,须遵守与互联网信息发布相关的法律、法规及通常适用的互联网一般道德和礼仪的规范,用户将自行承担用户所发布的信息内容产生的全部责任。用户发布的各类信息,不得包含以下内容:
+(1)违背宪法所确定的基本原则的;
+(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;
+(3)损害国家荣誉和利益的;
+(4)煽动民族仇恨、民族歧视,破坏民族团结的;
+(5)破坏国家宗教政策,宣扬邪教和封建迷信的;
+(6)散布谣言,扰乱社会秩序,破坏社会稳定的;
+(7)传播淫秽、色情、赌博、暴力、凶杀、恐怖信息或者教唆犯罪的;
+(8)侮辱、诽谤或恶意用言语攻击他人,侵害他人合法权益的;
+(9)侵犯任何第三者的知识产权,版权或公众/私人权利的;
+(10)违反社会公德、人文道德、风俗习惯的;
+(11)破坏游戏正常秩序的;
+(12)含有法律、行政法规禁止的其他内容的。
+6.3. 用户的夜风帐号名称及游戏中的人物、帮派等名称应当遵守合法、健康的原则,不允许使用包括但不限于涉及种族、宗教、政治、国家领导人、淫秽、低俗、诽谤、恐吓、欺诈性的、攻击性的、污辱性的、可能引起误会的、违禁药品等内容的名称。
+6.4. 用户应当对自己在游戏中的言行负责,尤其不得:
+(1)通过任何方式、行为散布或传播低俗、不雅、违背公序良俗的信息;
+(2)通过任何方式、行为冒充平台或游戏系统向其他用户散布或传播虚假信息;
+(3)通过任何方式或途径引起纷争;
+(4)通过任何方式、行为散布或传播、使用私服、木马、外挂、病毒及此类信息;
+(5)通过任何方式、行为散布或传播代练的信息;
+(6)通过任何方式、行为传播或进行游戏帐号、虚拟货币、虚拟道具的在非夜风游戏认可的平台上进行交易(又称“线下交易”);
+(7)大量传播相同的、类似的短语或无意义的文字,或者任何与夜风平台及其游戏无关的信息;
+(8)宣扬、鼓动任何游戏虚拟世界之外的暴力行为;
+(9)泄露其它用户、非用户或夜风平台相关的任何游戏世界和现实世界信息;
+(10)宣传或发布违法信息、违反社会公德的信息,或不利于精神文明建设的信息,包括但不限于色情、赌博、邪教、恐怖主义等内容;
+(11)通过任何方式、行为散布任何种类的广告信息及广告链接;
+(12)发布诋毁或攻击夜风的言论或信息;
+(13)其他不符合法律法规、社会公德或游戏规则的言论或行为。
+6.5. 用户不得干扰、阻碍夜风正常地提供产品和服务,尤其不得:
+(1)攻击、侵入夜风的网站服务器或使网站服务器过载;
+(2)破解、修改夜风提供的客户端程序;
+(3)攻击、侵入夜风的游戏服务器或游戏服务器端程序或使游戏服务器过载;
+(4)不合理地干扰或阻碍他人使用夜风所提供的产品和服务;
+(5)利用程序的漏洞和错误(Bug)破坏游戏的正常进行或传播该漏洞或错误(Bug);
+(6)直接或间接利用游戏Bug(包括游戏系统、程序、设定等方面存在的漏洞或不合理的现象)、程序漏洞、非法手段获利或扰乱游戏秩序、违反游戏规则,或者通过非法手段利用游戏Bug、程序漏洞修改游戏数据以达到个人目的;
+(7)制作、使用、发布、传播任何形式的妨碍游戏公平性的辅助工具或程序(指用于在游戏中获取优势,但不属于夜风平台或各游戏软件的一部分的任何文件或程序),包括作弊性质的外挂以及相关辅助性质的外挂等(包括但不限于自动打怪、自动练级、自动吃药、自动完成任务、加速性质或超出游戏设定范围等操作);
+(8)擅自修改客户端程序,使之改变或者新增或者减少夜风平台所预先设定的功能,或者导致客户端向服务器发送的数据出现异常的一切行为;
+(9)在夜风提供的游戏或服务内恶意拉人或从事任何不正当竞争行为,包括但不限于恶意发布与夜风相关运营游戏开服信息、开服活动、以及一切开服入驻奖励政策、渠道充值溢价返利、或攻击性及诽谤性质言论或使用含有淫秽、色情、赌博、暴力、迷信等不健康/违法内容的文字、图片、音频、视频等方式诱导其他用户或利用公会将夜风原有用户引导入其他非夜风运营的游戏或提供的服务内。
+6.6. 用户不得扰乱游戏秩序,尤其不得:
+(1)长时间停留在特殊地点或敏感地区(包括但不限于活动报名人、“移民使者”、传送人、传送点等处),干扰其他用户游戏;
+(2)进行恶意PK、清场、敲诈、勒索等行为;
+(3)扬言进行或煽动其他用户或非用户参与非正常游戏内容的行为(包括但不限于游行、聚众闹事等);
+(4)以相似昵称的人物冒充他人好友、冒充NPC或官方角色等方式在游戏内外进行欺诈。
+6.7. 用户可以与游戏管理员(以下称为“GM”)进行交流,但在与GM交流时,不得做出以下行为:
+(1)冒充系统或GM;
+(2)欺骗或试图欺骗GM,包括但不限于误导GM、拒绝提供信息、提供虚假信息以及任何试图“诈骗”GM的行为;
+(3)违反或忽视GM做出的提示。在游戏中,为了确保大多数用户的共同利益,维护正常的游戏秩序,GM可能会提示用户执行某些操作或停止执行某些操作,用户不得忽视或阻挠该项工作的进行;
+(4)干扰GM工作。干扰GM工作包括但不限于:向GM索取任何游戏虚拟物品(包括但不限于虚拟货币、游戏道具等),频繁呼叫GM或发送无实质性内容的请求,反复向GM发送已解答或解决问题的帮助请求;
+(5)辱骂、威胁或恶意攻击GM。
+6.8. 用户必须保管好自己的帐号和密码,由于用户的原因导致帐号和密码泄密而造成的后果均将由用户自行承担。
+6.9. 牟取不正当利益行为处理规则
+用户承诺不以营利为目的从事游戏行为或交易虚拟物品,任何以营利为目的从事游戏行为或交易虚拟物品的情形将被视为牟取不正当利益,包括但不限于用户:
+(1)注册多个用户帐号和/或游戏角色ID,以营利为目的进行游戏行为;
+(2)从事游戏内单一或系列产出玩法,将获得的虚拟物品出售获利;
+(3)利用不同服务器的虚拟物品价值差异,在不同服务器买卖虚拟物品获利;
+(4)充当游戏帐号、虚拟物品交易中介收取费用获利;
+(5)在非夜风公司提供或认可的交易平台上交易用户帐号或虚拟物品获利;
+(6)将游戏内获得的虚拟物品用于出售获利而不注重本身角色实力的提升,角色多个技能、修炼、装备、召唤兽水平与角色等级相差较大的;
+(7)利用游戏行为和游戏内容组织或参与赌博、实施或参与实施盗窃他人财产或虚拟物品等涉嫌违法犯罪行为的;
+(8)其他任何不以正常的游戏娱乐互动需要为目的的游戏内牟利行为。

+6.10. 用户不得利用夜风提供的产品和服务从事以下活动:
+(1)未经允许,进入夜风计算机信息网络系统或者使用计算机信息网络系统资源的;
+(2)未经允许,对计算机信息网络功能进行删除、修改或者增加的;
+(3)未经允许,对进入计算机信息网络中存储、处理或者传输的数据和应用程序进行删除、修改或者增加的;
+(4)故意制作、传播计算机病毒等破坏性程序的;
+(5)其他危害计算机信息网络安全的行为。
+6.11. 用户同意以游戏程序中的监测数据作为判断用户是否有通过使用外挂程序等方法进行的游戏作弊行为的依据。
+6.12. 如果夜风发现用户行为或者数据异常,可以观察及记录该用户行为,并以观察和记录的结果作为判断用户是否实施了违反本协议用户行为守则的依据。
+夜风积极保护用户的帐号、虚拟物品及虚拟货币的安全,为此,夜风对盗号及盗号相关行为展开严厉的打击。夜风发现或者怀疑存在包括但不限于以下的盗号及盗号相关行为时,有权视情况按照本协议第6.13、第6.14款、第十四条及其他相关条款的规定处理,同时,夜风保留进一步追诉的权利:(1)盗取帐号;(2)盗取虚拟物品;(3)盗取虚拟货币;(4)盗取帐号或/及密码;(5)异常IP下的物品转移;(6)其他盗号及盗号相关行为。为了维护游戏的公平与秩序,即使用户没有主动的参与盗号,但是用户的物品来源于盗号或者盗号相关行为的,夜风也有权自行判断回收、冻结涉及盗号的物品及帐号。用户应该配合夜风对盗号及盗号相关行为的调查。用户应该自觉维护游戏的秩序,夜风发现或者怀疑存在虚假的盗号投诉时,有权视情况按照本协议第6.13款、第6.14款、第十四条及其他相关条款的规定处理。
+6.13. 若用户实施违反本条所述用户行为守则的行为,夜风有权视行为严重程度,向该用户采取以下一项或处罚措施,该用户应承担该等不利后果:
+(1)警告:警告是针对轻微违反游戏政策而做出的教育导向,它是用于正常管理游戏运行的一种方式。
+(2)禁言:关闭违规用户的部分或全部聊天频道,强制暂停违规用户角色的线上对话功能,使该角色无法与其他用户对话,直到此次处罚到期或取消。
+(3)强制离线:强制让违规用户离开当前游戏,结束该用户当前游戏程序的执行。
+(4)封停帐号:暂停或永久终止违规用户使用夜风帐号登录某款游戏的权利。
+(5)暂时隔离:将违规用户的游戏角色转移至特殊游戏场景,限制其局部游戏操作,直到此次处罚到期或取消。
+(6)删除档案:将违规用户在某个游戏世界中的人物档案删除,不让该人物再出现在游戏世界。
+(7)删除帐号:永久终止违规用户通过夜风帐号登录夜风平台的权利,包括但不限于用户注册信息、角色信息、等级物品、游戏货币等游戏数据库中的全部数据都将被永久封禁。
+(8)收回游戏虚拟物品:对于违规用户因欺诈或其他违规行为而获取的游戏虚拟物品,包括但不限于游戏虚拟货币、虚拟物品,进行收回。
+(9)修改名称:强制修改违规用户论坛昵称、游戏人物或帮派等的名称。
+(10)解散组织:解散违规用户成立的帮派、公会等组织。
+(11)倒扣数值:针对游戏角色游戏数值进行扣除,包括但不限于游戏角色等级、金钱、经验等。
+(12)封禁IP:暂时或永久禁止违规用户在某一异常IP登录某款游戏的某个服务器。
+(13)撤销交易:撤销用户通过夜风授权或指定的交易平台/网站进行的违规交易将交易双方付出的游戏虚拟物品予以还原。
+(14)交易限制:暂时冻结用户在夜风授权/指定的交易平台中进行的违规交易所涉及的游戏虚拟物品或游戏账号,并持续考察用户在指定期限内的游戏内行为。如指定期限内其无再次违规的,到期将自动解冻相应的游戏虚拟物品或游戏账号;如指定期限内用户再次违规的,或在夜风认定违规行为存在时,夜风有权扣除用户游戏账号及/或游戏虚物品。
+(15)承担法律责任:违规用户的不当行为对他人或者夜风造成损害,或者与现行法律规定相违背的,违规用户应依法承担相应的民事、行政和/或刑事责任,例如,用户在进行游戏过程中侵犯第三方知识产权或其他权利而导致被权利人索赔的,由用户直接承担责任。
+6.14.若用户实施违反本条所述用户行为守则的行为,夜风还有权要求违规用户向夜风承担违约责任,包括但不限于恢复原状,消除影响,对给夜风造成的直接及间接损失或额外的成本支出进行赔偿,以及在夜风首先承担了因违规用户行为导致的行政处罚或侵权损害赔偿责任后,由夜风向违规用户追偿。
+6.15. 用户只可在游戏内或者通过夜风授权/指定的交易平台(如有,夜风将通过官网公告、游戏内公告、手机短信或其他可明确通知用户的方式进行通知)进行游戏虚拟物品或游戏账号交易。对于用户在任何非夜风事先认可的平台进行其他交易的相关行为(包括但不限于用户通过第三方进行充值或游戏内虚拟物品的购买、游戏账户的买卖等),夜风将予以严厉打击和处罚。一经查证属实,夜风有权视具体情况根据本协议采取一种或多种处理措施,情节严重的,夜风保留追究用户法律责任的权利。
+七、游戏管理
+7.1. 游戏管理员
+(1)游戏管理员即GM(Game Master),指维护和管理游戏虚拟世界秩序的夜风在线工作人员。
+(2)GM不会干预游戏的正常秩序,不会以任何方式索要用户的个人资料和密码,不负责解决用户之间的私人纠纷或回答游戏的攻略、诀窍等问题。
+(3)用户在游戏中应当尊重、理解并配合GM的工作,如有任何意见,应通过专用信箱向客户服务中心申诉和举报。
+7.2. 游戏信息转移。夜风有权根据产品和服务的提供状况,安排拆分或合并游戏服务器。用户知晓并同意,夜风有权根据自身经营安排将用户在游戏中的人物信息、角色档案转移到其它游戏服务器。此等转移行为并不影响用户继续使用夜风游戏服务,因此不属于违约情形。
+7.3. 家长监护系统。夜风遵从国家政策,在游戏中开设“未成年人家长监护系统”,若父母(监护人)同意未成年人(尤其是十岁以下子女)使用产品和服务,必须以父母(监护人)名义申请注册夜风帐号。在使用产品和服务时,父母(监护人)应以监护人身份判断产品和服务是否适合未成年人。如果用户未满18周岁(或夜风无法识别用户的年龄),则用户将受到“未成年人家长监护系统”的约束。在监护人提供充分证据证明账号的实际使用人为未成年人时,夜风将有权根据有关规则以及监护人的要求,对用户创建或使用夜风帐号关联的游戏帐号进行限制,包括但不限于临时或永久冻结帐号,部分或者全部终止提供夜风各项产品和服务。
+7.4. 防沉迷系统
+(1)如果用户未满法定年龄(或夜风无法识别用户的年龄,例如未填写实名身份信息被系统默认为未成年用户的),则用户在游戏内的活动将受到“游戏防沉迷系统”监测;如果用户拥有一个以上夜风帐号,则该“游戏防沉迷系统”将同时适用于该用户的所有夜风帐号;
+(2)“游戏防沉迷系统”通过按照连续游戏时间来逐级扣减游戏内收益的方式,对用户长时间连续游戏的行为进行规制;
+(3)用户需提供真实完整的信息以便夜风识别用户的身份并向有关部门提交实名认证信息,如因提供的资料不真实而产生的后果由用户自行承担。
+7.5. 在现有的技术条件下,夜风将尽合理的商业努力并根据有关监管部门的要求开发并维护“未成年人家长监护系统”、“游戏防沉迷系统”与实名认证系统,按“现状”提供给用户使用。由于技术不可避免的局限性以及系统运作各环节受外界的影响,夜风不保证各个系统不存在任何漏洞,不保证各系统能随时正常运作,亦不保证监护或认证效果完全满足用户的需求。夜风不提供任何适用法律明确规定之外的明示或默示担保,并不对此承担任何责任。
+八、资费政策
+8.1. 夜风产品和服务的收费信息以及有关的资费标准、收费方式、购买方式及其他有关资费政策的信息,在夜风相关平台或游戏网站(包括但不限于夜风官网和相应游戏官方网站等网站)上作出说明。
+8.2. 夜风有权决定夜风所提供的产品和服务的资费标准和收费方式,夜风可能会就不同的产品和服务制定不同的资费标准和收费方式,也可能按照夜风所提供的产品和服务的不同阶段确定不同的资费标准和收费方式。另外,夜风也可能不时地修改夜风的资费政策。夜风会将有关产品和服务的收费信息以及与该产品和服务有关的资费标准、收费方式、购买方式或其他有关资费政策的信息放置在该产品和服务相关网页的显著位置。
+8.3. 对于夜风的收费产品和服务,用户应该按照夜风确定的资费政策购买夜风的产品和服务。如果用户未按夜风确定的资费政策购买夜风的产品和服务,夜风可以立即停止向用户提供该产品和服务。
+8.4. 除非法律另有明文规定,否则用户不得要求夜风返还用户已经支付予夜风的任何资费(以下简称“退款”),无论该等资费是否已被消费。夜风有权决定是否、何时、以何种方式向用户退款。夜风同意退款的,用户应补偿支付时使用信用卡、手机等支付渠道产生的费用,夜风有权在返还用户的资费中直接扣收。夜风在产品和服务提供过程中赠送的充值金额、虚拟货币、虚拟道具等,不予退款或变现。
+九、虚拟物品
+9.1. 夜风(包括但不限于游戏平台、游戏、论坛)所提供的各种虚拟物品,不限于金币、银两、道具、装备等,其所有权归夜风或其合作方所有。用户只能在合乎法律和游戏规则的情况下拥有对虚拟物品的使用权。用户一旦购买了虚拟道具的使用权,将视为已经进入消费过程,不得以任何理由要求退还该虚拟道具或要求夜风退还相应款项。
+9.2. 夜风提供的服务或游戏中的各类虚拟物品,如对使用期限无特殊标识的,均默认用户可在获得使用权后持续使用,直至夜风提供的相应服务或游戏终止;如对使用期限有特殊标识的,则其使用期限以特殊标识的期限为准(但最迟不超过夜风提供相应服务或游戏终止的时间超过使用期限的,夜风有权不另行通知用户而随时收回其使用权(该使用期限不因任何原因而中断、中止)。
+9.3. 除服务器大规模断线外,由于地方网络问题、个人操作问题等非可归责于夜风的原因导致造成的角色被删或回档、虚拟物品或金钱的损失,夜风无需向用户承担任何责任。
+9.4. 鉴于网上交易的复杂性,夜风不支持用户自行进行虚拟物品买卖的线下交易及线下交易相关行为(包括但不限于参与线下交易、协助线下交易者操作及转移游戏虚拟物品等一系列行为),并且不保护用户自行进行线下交易产生的任何交易结果,用户之间进行线下交易行为发生的任何问题、纠纷,包括但不限于被虚假交易信息诈骗金钱或者游戏虚拟物品的,均与夜风无关,用户将自行负责,夜风不负责赔偿或追回因受骗造成的损失。
+9.5. 夜风不支持线下交易,不认可用户线下交易所产生的交易结果,用户通过非夜风指定或夜风授权的平台/网站进行线下交易所获得的游戏虚拟物品将被认定为来源不符合游戏规则;夜风有权按照本协议第六条的约定,对线下交易及线下交易相关行为涉及的游戏虚拟物品、游戏角色与夜风帐号采取相应的措施。
+十、服务方式、内容的变动与个人资料转移
+10.1. 夜风将尽力持续地向用户提供产品和服务,但是在适用法律许可的最大范围内,并不排除夜风可能会停止提供任何产品和服务的可能性,也不排除任何改变游戏服务或其他网络服务的服务方式、服务内容的可能性。
+10.2. 为增加并丰富夜风提供的游戏及其他网络服务的内容,游戏和游戏平台在运行时可能不定期更新并调整其包含的功能。在游戏和游戏平台更新后,一切游戏和游戏平台内的操作、内容、设定,将以游戏和游戏平台中的公告内容为准。
+10.3. 如果夜风停止提供某一项产品和服务,或改变某一项产品和服务的方式或内容,夜风将会事先通知用户,并尽力寻找适当的服务提供者以接替夜风继续提供产品和服务。
+10.4. 在本条第3款所述情况下且在适用法律许可的最大范围内,则夜风可能会将用户的个人资料(包括有关的帐号和密码信息及个人资料)转移给该继续提供服务的一方,用户在此同意夜风有权做此转移和提供,并且同意在夜风完成转移和提供之后,夜风将不再对用户原有资料承担任何义务和责任。但是,夜风并不保证夜风届时一定能够找到适当的服务提供者或服务方式以代替夜风继续提供产品和服务,也不保证夜风找到的服务提供者所提供的产品和服务或者改变的游戏方式能够满足用户的要求。
+10.5. 用户可授权夜风指定或授权的交易平台/网站向夜风申请查询或操作用户游戏账号,经交易平台/网站的申请,夜风可以对用户账号进行查询、冻结、转移、更新、更改或解封等操作,并将相关操作内容及结果反馈给交易平台。但用户知悉并确认,夜风依据交易平台的申请进行任何操作行为或产生的任何操作结果不承担责任。
+十一、服务中断或终止
+11.1. 如发生下列任何一种情形,夜风有权随时中断或终止向用户提供本协议项下的游戏服务和其他网络服务,对于因而产生的不便和损失,夜风不承担任何责任:
+(1)用户提供的个人资料不真实;
+(2)用户违反本协议中规定的用户行为准则。
+11.2. 用户清楚知悉夜风帐号存在有效期(有效期以夜风公司对外公布为准),并同意不定时登录夜风帐号以延续其有效期,用户清楚知悉夜风有权对超过有效期的夜风帐号进行注销并删除该帐号中的信息内容。
+(1)用户在注册帐号后,若在6个月内该帐号无登录使用记录,且该帐号从无任何充值记录的,夜风有权注销该帐号并删除该帐号中的信息内容。
+(2)关于夜风所提供的不同产品和服务注销帐户/角色的其他条件,请参见各个产品和服务的具体规定,或相关产品和服务的官方网站上的具体规定。
+11.3. 为了保障游戏及游戏平台网站和服务器的正常运行,夜风需要定期或不定期对游戏及游戏平台网站和服务器进行停机维护,或针对突发事件进行紧急停机维护。因上述情况而造成的正常服务中断、中止,用户予以理解并同意,夜风应尽力避免服务中断并将中断时间限制在最短时间内。
+11.4. 在适用法律许可的最大范围内,发生下列情形之一时,为了游戏网站和服务器的持续稳定运行,夜风有权不经提前通知,终止或中断游戏服务器所提供的全部或部分服务,对因此而产生的不便或损失,夜风对用户或第三人均不承担任何责任:
+(1)定期检查或施工,更新软硬件等;
+(2)服务器遭受损害,无法正常运作;
+(3)突发性的软硬件设备与电子通信设备故障;
+(4)网络提供商线路或其他故障;
+(5)在紧急情况下依照法律的规定或为用户及第三者之人身安全;
+(6)第三方原因或其他不可抗力的情形。
+11.5. 在适用法律许可的最大范围内,不管产品和服务由于任何原因终止,在夜风发布终止运营公告后,用户应在公告期内采取相应的措施自行处理游戏及游戏平台上的虚拟物品。产品和服务终止运营后,用户不得因终止服务而要求夜风承担除用户已经购买但尚未使用的游戏虚拟货币以外任何形式的赔偿或补偿责任,包括但不限于因不再能继续使用游戏帐号、游戏内虚拟物品等而要求的赔偿。
+十二、有限保证及免责声明
+12.1. 对于夜风的产品和服务,夜风仅作本条所述有限保证,该有限保证取代任何文档、包装或其他资料中的任何其他明示或默示的保证(若有)。
+12.2. 夜风仅以“现有状况且包含所有错误”的形式提供相关的产品、软件或程序及任何支持服务,并仅保证:
+(1)夜风所提供的产品和服务能基本符合夜风正式公布的要求;
+(2)夜风所提供的相关产品和服务基本与夜风正式公布的服务承诺相符;
+(3)夜风仅在法律允许的合理范围内尽力解决夜风在提供产品和服务过程中所遇到的任何问题。
+12.3. 在适用法律允许的最大范围内,夜风明确表示不提供任何其他类型的保证,不论是明示的或默示的,包括但不限于适销性、适用性、可靠性、准确性、完整性以及无错误的任何默示保证和责任。
+12.4. 在适用法律允许的最大范围内,夜风并不担保夜风所提供的产品和服务一定能满足用户的要求,也不担保提供的产品和服务不会被中断,并且不担保产品和服务的及时性、安全性及不受干扰,亦不担保无错误发生,以及信息能准确、及时、顺利地传送。
+12.5. 用户理解并同意:通过夜风的产品和服务取得的任何信息、资料,是否信任及使用,完全取决于用户自己,并由用户承担由该等信任及使用带来的系统受损、资料丢失以及其它任何风险。夜风对在产品和服务中提及的任何第三方发出的信息(包括但不限于任何商品购物服务、交易进程、招聘信息等),都不作担保。
+12.6. 如有系统故障、安全漏洞(Security Vulnerability)、程序缺陷(Bug)、程序出错等问题,夜风有权把游戏的资料还原到一定日期,以维护游戏之平衡。用户不得因此要求补偿或赔偿。
+12.7. 在适用法律允许的最大范围内,夜风对用户因使用夜风的产品和服务引起的任何间接、偶然、意外、特殊或继起的损害(包括但不限于人身伤害、隐私泄漏、因未能履行包括诚信或合理谨慎在内的任何责任、因过失和因任何其他金钱上的损失或其他损失而造成的损害赔偿)不负责任,这些损害可能来自:用户或他人不正当使用产品和服务、在网上购买商品或类似服务、在非夜风指定或授权的网上进行交易、非法使用服务或用户传送的信息有所变动。
+12.8. 夜风对本协议项下涉及的境内外基础电信运营商的固定及移动通信网络的故障,各类技术缺陷、覆盖范围限制、不可抗力、计算机病毒、黑客攻击、用户所在位置、用户关机、合作方因素、他人故意或过失行为或其他非夜风技术能力范围内的原因造成的服务中断、用户发送的数据或短信息的内容丢失、出现乱码、错误接收、无法接收、迟延接收等等,均不承担责任。
+12.9. 由于用户个人失误、错误、不当操作、未进行实名制认证等导致的任何后果,由用户自行承担责任,夜风不予任何赔偿或补偿。
+12.10. 用户在非夜风事先认可的第三方交易平台进行交易,产生的交易行为、交易结果或与交易平台产生的任何纠纷、法律责任或用户个人账号及虚拟财产风险均与夜风无关。
+十三、知识产权及信息所有权
+13.1. 夜风向用户通过产品和服务提供的游戏软件(包括具备客户端软件及不具备客户端软件的游戏)、其他软件、信息、作品及资料,其著作权、专利权、商标专用权及其它知识产权,均为夜风或其相应权利人所有。除非事先经夜风书面合法授权,或法律另有明文规定,任何人不得擅自以任何形式使用、复制、传播、伪造、模仿、修改、改编、翻译、汇编、出版、进行反编译或反汇编等反向工程,否则夜风有权立即终止向用户提供产品和服务,并依法追究其知识产权侵权责任,要求用户赔偿夜风的一切损失。
+13.2. 用户在使用产品和服务过程中产生并储存于夜风服务器中的任何数据信息(包括但不限于帐号数据信息、角色数据信息、等级物品数据信息等,但用户的姓名、身份证号、电话号码等个人身份数据信息除外)属于游戏或游戏平台的一部分,由夜风所有并进行管理,用户有权在遵守游戏规则的前提下通过夜风指定的途径对属于自身帐号的数据信息进行修改、转移、处分。
+13.3. 为保证准确及避免争议,本协议涉及到的有关技术方面的数据、信息,用户同意以夜风服务器所储存的数据作为判断标准,夜风保证该数据的真实性。
+十四、损害赔偿
+用户若违反本协议或可适用的法律法规,导致夜风的母公司、子公司、其他关联公司、附属机构及其人员,受雇人、代理人及其他一切相关履行辅助人员因此受到损害或支出任何衍生费用(包括但不限于支付上述法律主体须就用户的违约或违法行为所进行的一切辩护或索偿诉讼及相关和解之法律费用),用户应承担补偿相关费用及支付损害赔偿的责任。
+十五、协议的终止
+用户应遵守本协议及有关法律法规的规定。夜风有权判断用户是否违反本协议。若夜风认定用户违反本协议或任何法律法规,夜风无需向用户进行事先通知的情况下,立即暂停或终止用户的帐号并删除用户帐号中的所有相关资料、档案及任何记录,以及限制、停止或取消用户的使用资格。
+十六、修改和解释权
+16.1. 为了向用户及时、更好地提供产品和服务,基于对夜风本身、用户及市场状况不断变化的考虑,在法律最大适用范围内,夜风保留随时修改、新增、删除本协议条款的权利。修改、新增、删除本协议条款时,夜风将于官方网站公告修改、新增、删除的事实,而不另行对用户进行个别通知。若用户不同意夜风所修改、新增、删除的内容,可立即停止使用夜风所提供的服务。若用户继续使用夜风提供的服务,则视同用户同意并接受本协议条款修改、新增、删除后的内容,且不得因此而要求任何补偿或赔偿。
+16.2. 未经夜风事先书面同意,用户不得转让其在本协议项下的权利或义务。夜风有权通过夜风的子公司或其他关联公司行使其在本协议项下的权利或履行本协议项下的义务。
+十七、广告与外部链接
+17.1. 夜风的产品和服务中可能包含他人的商业广告或其它活动促销的广告。这些内容由广告商或商品/服务提供者提供并承担相应责任,夜风仅提供刊登内容的媒介。用户通过夜风或夜风所链接的网站所购买的该等服务或商品,其交易行为仅存于用户与该等商品或服务的提供者之间,与夜风无关,夜风无需就用户与该商品或服务的提供者之间所产生的交易行为承担任何法律责任。
+17.2. 用户可能在使用夜风的产品和服务过程中链接到第三方的站点。第三方的站点不由夜风控制,并且夜风也不对任何第三方站点的内容、第三方站点包含的任何链接、第三方站点的任何更改或更新负责。夜风仅为了提供便利的目的而向用户提供这些到第三方站点的链接,夜风所提供的这些链接并不意味着夜风认可该第三方站点,不意味着夜风担保其真实性、完整性、实时性或可信度。这些个人、公司或组织与夜风间亦不存在任何雇用、委任、代理、合伙或其它类似的关系。用户需要检查并遵守该第三方站点的相关规定。
+17.3. 用户理解并同意夜风通过电子邮件、短信或者其他方式向用户发送产品和服务或其他相关商业信息。
+十八、其他约定
+18.1. 本协议的订立、效力、解释、履行及争议解决适用中华人民共和国法律。如果本协议的任何内容与法律相抵触,应以法律规定为准。
+18.2. 本协议的任何条款部分或全部无效的,不影响其它条款的效力。
+18.3.夜风需要向用户发送的通知等均可以通过夜风官网(mir.317743968.cn)公告、电子邮件、页面公告、电话或其他夜风认为合适的方式进行发送。如本协议内容条款变更、夜风提供的产品或服务内容/方式变更、或其他重要通知等,夜风将会以上述形式向用户发送通知。通知一经发送即视为送达,用户应及时查看相关内容。
+
+
+
+
+

+隐私协议

+

+
+前言

+
+本《用户隐私协议》(以下简称“本协议”)是由您(以下称为“用户”)与广东夜风信息技术有限公司(以下称为“夜风”)就夜风在其和/或其关联公司的游戏平台上所提供的产品和服务(包括夜风的网站以及夜风现在正在提供和将来可能向用户提供的游戏服务和其他网络服务,以下统称为“产品和服务”)所订立的协议。
+用户在使用夜风的产品和服务时,夜风有权依本协议约定收集和使用用户的相关信息。

+重要须知
+1、本协议应根据中华人民共和国法律解释与管辖并排除其他一切冲突法的适用。本协议订立于广东省广州市天河区,有关与用户和夜风之间发生的任何形式的争议均应友好协商解决。协商不能解决的,任一方均有权将争议提交至夜风所在地有管辖权的人民法院提起诉讼解决。
+2如果用户不同意本协议的任意条款,则不得注册或(继续)使用夜风提供的任何产品和服务。用户一旦点击确认“同意”(或其他具有同样含义的词,如“接受”等)进行注册、开始使用及/或继续使用夜风游戏服务,即表示用户与夜风已达成协议,自愿接受本协议的所有内容。此后,用户不得以未阅读/未同意本协议的内容作任何形式的抗辩。
+3、请注意,夜风有权适时对本协议进行修改与更新,请用户随时留意查看本协议的最新版本。如用户不同意变更后的内容,用户可以选择停止使用夜风的产品或服务;如用户仍然继续使用夜风的产品或服务的,即表示同意夜风按照修订后的《用户隐私协议》收集、使用、储存和分享用户的信息。
+4、夜风游戏特别提醒用户认真阅读本协议的全部条款,特别是以加粗字体标示的内容,此类条款应在中国法律所允许的范围内最大程度地适用。

+一、夜风收集的信息
+个人信息是指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息,具体如下:
+1.1用户在使用夜风服务时主动提供的信息
+1.1.1用户在注册账户或使用夜风的服务时,向夜风提供的相关个人信息,包括但不限于姓名、QQ号、微信号、电话号码、电子邮箱、银行卡号、身份证号、护照号等
+1.1.2 用户在使用服务时上传的信息,例如上传的头像,分享的照片、拍摄的视频等。
+1.1.3 用户通过夜风的客服或参加夜风举办的活动时所提交的信息,例如,用户参与夜风线上或线下活动时填写的调查问卷或者提交的材料中可能包含用户的姓名、电话号码、生日、籍贯、性别、兴趣爱好、QQ号、微信号、电子邮箱、银行卡号、身份证号、家庭地址等信息。
+夜风的部分服务可能需要用户提供特定的个人敏感信息来实现特定功能。若用户选择不提供该类信息,则可能无法正常使用服务中的特定功能,但不影响用户使用服务中的其他功能。若用户主动提供用户的个人敏感信息,即表示用户同意夜风按本协议所述目的和方式来处理用户的个人敏感信息。
+1.2夜风在用户使用服务时获取的信息
+1.2.1 日志信息当用户使用夜风的服务时,夜风可能会自动收集登录时间、登录地址、服务使用日志、操作日志等相关信息并存储为服务日志信息。
+(1) 设备信息例如,设备型号、操作系统版本、唯一设备标识符、电池、信号强度等信息。
+(2) 软件信息例如,软件的版本号、浏览器类型。为确保操作环境的安全或提供服务所需,夜风会收集有关用户使用的移动应用和其他软件的信息。
+(3) IP地址
+(4) 服务日志信息例如,用户在使用夜风服务时搜索、查看的信息、服务故障信息、引荐网址等信息。
+(5) 通讯日志信息例如,用户在使用夜风服务时曾经通讯的账户、通讯时间和时长。
+1.2.2 位置信息当用户使用与位置有关的服务时,夜风可能会记录用户设备所在的位置信息,包括定位信息、行程信息,以便为用户提供相关服务。
+(1) 在用户使用服务时,夜风可能会通过IP地址、GPS、WIFI、基站等途径获取用户的地理位置信息。
+(2) 用户或其他用户在使用服务时提供的信息中可能包含用户所在地理位置信息,例如用户提供的帐号信息中可能包含的用户所在地区信息,用户或其他人共享的照片包含的地理标记信息。
+1.2.3支付信息为便于用户在支付相关订单时,综合判断用户账户及交易风险、进行身份验证、检测及防范安全事件,夜风可能会在交易过程中收集用户的虚拟财产相关信息(仅限交易记录、虚拟货币、虚拟交易、游戏类兑换码、口令密码等)
+1.2.4其他相关信息为了帮助用户更好地使用夜风的产品或服务,夜风会收集相关信息。例如,夜风收集的好友列表、群列表信息、声纹特征值信息。为确保用户使用夜风的产品和服务时能与用户认识的人进行联系,如用户选择开启导入通讯录功能,夜风可能对用户联系人的姓名和电话号码进行加密,并仅收集加密后的信息。
+1.3其他用户分享的信息中含有用户的信息,例如,其他用户发布的照片或分享的视频中可能包含用户的信息。
+1.4从第三方合作伙伴获取的信息
+夜风可能会根据第三方合作伙伴的规定或用户的授权获得用户在使用第三方合作伙伴服务时所产生或分享的信息。例如,用户使用夜风游戏帐户登录第三方合作伙伴服务时,夜风会获得用户登录第三方合作伙伴服务的名称、登录时间,方便用户进行授权管理。
+本协议只适用于夜风提供的服务,不适用于任何第三方提供的服务或第三方的用户信息使用规则,夜风对任何第三方使用用户提供的信息不承担任何责任。请用户仔细阅读第三方合作伙伴服务的用户协议或隐私协议。
+二、夜风如何使用收集的信息
+2.1夜风严格遵守法律法规的规定及与用户的约定,将收集的信息用于以下用途:
+2.1.1向用户发送注册确认;
+2.1.2了解和管理账户;
+2.1.3回应用户的客户服务要求;
+2.1.4了解用户的企业和产品需求以确定适用的产品和服务;
+2.1.5基于市场营销和促销的目的联系用户,并为用户提供更多有关夜风产品或服务的信息;
+2.1.6进行研究和分析,提升夜风的网站和服务质量; 
+2.1.7提升用户使用网站的体验和服务质量;
+2.1.8帮助夜风有效地管理网站内容;
+2.1.9分析群体性用户的站内活动情况以及整个用户群的社会信息。
+三、个人信息的授权与同意
+用户十分清楚,为了使用夜风的数据统计和分析之目的,用户需要夜风收集、存储、加工来自于用户的个人信息。因此,用户必须承诺: 
+(1)用户允许夜风出于提供服务的目的使用; 
+(2)用户允许夜风对已收集的数据进行匿名的、聚合性的处理和转移(包括可能的国际间转移); 
+(3)用户允许夜风对已收集的数据进行匿名的和聚合性的处理后,为互联网定向广告目的转移给非关联方使用
+(4)用户允许夜风与第三方合作以多种形式将夜风游戏平台中经过处理、加工后的数据用于商业化使用。这些合作包括但不限于:与广告平台、广告联盟或者其他广告经营者合作,将数据用于优化广告投放和提升营销效果;
+(5)用户允许夜风将用户个人信息及用户账号信息与夜风指定/授权的交易平台/网站进行同步,但夜风指定/授权的交易平台/网站应承担与夜风同等要求的信息安全保障及保密责任。
+四、夜风如何向其他方披露和共享信息
+4.1除非本协议已说明的情况外,用户的数据不会被以可识别具体个人真实身份信息的形式向第三方披露和共享。但以下情况除外:
+(1)获得用户的事先同意/允许;
+(2)因司法、行政等合法程序的要求;
+(3)在有限的情况下,夜风有可能聘请第三方供应商、顾问或其他服务商为夜风提供必要的维护、支持和服务,但夜风应要求该等第三方与夜风签署必要的条款保护数据安全和保密性的;
+(4)在紧急情况下,经合理判断是为了保护夜风、夜风的代理人、客户、终端用户或其他人的合法权益和安全的;
+(5)夜风为维护自己或其他用户的合法权益而向用户提起诉讼或者仲裁的;
+(6)夜风正在或拟进行企业并购、重组、出售全部或部分股份和/或资产等重大变化,包括但不限于尽职调查过程。
+4.2经用户同意合法收集的个人信息,通过信息系统、算法等非人工自动决策技术实现标签化或画像处理,从而做出的自动决策决定(如商业化信息推送等),此行为构成数据的不可识别化,不应视为夜风向任何第三方共享、转让或披露用户的任何个人信息。 
+五、重要提示
+5.1用户可以通过夜风的服务与用户的好友、家人及其他用户分享用户的相关信息。例如,用户在夜风游戏平台中公开分享的文字和照片。请注意,这其中可能包含用户的个人身份信息、个人财产信息等敏感信息;请用户谨慎考虑披露用户的相关个人敏感信息
+5.2用户可通过夜风提供服务中的隐私设置来控制分享信息的范围,也可通过服务中的设置或夜风提供的指引删除公开分享的信息。但请用户注意,这些信息仍可能由其他用户或不受夜风控制的非关联第三方独立地保存。
+六、个人信息保护措施
+6.1夜风采取的数据保密措施
+6.1.1用户知悉并了解,互联网传输或电子存储方法并非百分之百安全,夜风将尽到合理努力保障数据安全,但仍可能存在用户数据被盗、被非法拥有或者被滥用而给用户带来人身、财产和声誉等方面损失的风险,用户自愿承担相应风险。
+6.1.2夜风将采用行业内通行的、合理的、标准的安全防护措施来保护夜风所储存的信息的安全性和保密性。包括但不限于:防火墙和数据备份措施;数据中心的访问权限限制;对移动终端的识别性信息进行加密处理等。
+6.1.3夜风已经建立健全数据安全管理体系,包括对用户信息进行分级分类、加密保存、数据访问权限划分,指定内部数据管理制度和操作规程,从数据的获取、使用、销毁都有严格的流程要求,避免用户隐私数据被非法使用。 
+6.2应急处置与预警
+6.2.1若不幸发生个人信息安全事件的,夜风将按照法律法规要求,及时通过平台内通知/用户预留的联系方式等向用户告知安全事件的基本情况和可能的影响、夜风已采取或将采取的应急响应及其他有关处置措施、对用户的补救措施等。若难以逐一告知个人信息主体时,夜风将采取合理、有效的方式发布公告并将主动向有关监管部门上报个人信息安全事件的处置情况。
+6.2.2若用户发现用户的个人信息泄漏时,请立即与夜风联系,以便夜风及时采取相应的措施。
+七、未成年人保护
+夜风非常重视对未成年人个人信息的保护。根据相关法律法规的规定,若用户为18周岁以下的未成年人,在使用夜风游戏的产品或服务前,应事先取得用户的家长或法定监护人的同意。若用户是未成年人的监护人,在对用户所监护未成年人的个人信息有相关疑问时,请与夜风联系。
+八、免责条款
+除本协议约定的情形外,下列情况夜风亦无需承担任何责任:
+8.1 因用户将用户账号及密码告知他人、用户通过非夜风认可的交易平台进行虚拟物品道具交易、用户未保管好自己的密码或与他人共享夜风游戏账号、游戏角色、用户使用第三方软件或任何其他非夜风的过错导致的任何个人信息资料泄露;
+8.2 任何由于黑客攻击、计算机病毒侵入或发作、电信部门技术调整导致的影响、因政府管制而造成的暂时性关闭、由于第三方原因(包括不可抗力,例如国际出口的主干链路及国际出口电信提供商一方出现故障、火灾、水灾、雷击、地震、洪水、台风、龙卷风、火山爆发、瘟疫和传染病流行、罢工、战争或暴力行为或类似事件)及其他非因夜风过错而造成的用户个人信息资料泄露、丢失、被盗用或被篡改等,以及由此给用户和第三方造成的任何损失;
+8.3 由于与夜风和/或其关联公司链接的其它网站所造成的用户个人信息资料泄露及由此而导致的任何法律争议和后果;
+8.4 任何个人用户,包括未成年人用户向夜风提供错误、不完整、不实信息等造成不能通过认证、不能正常使用夜风的产品服务或遭受任何其他损失。
+九、用户信息访问、更正、删除
+9.1 用户可通过服务中的设置或夜风的指引访问用户个人信息,并根据夜风的管理方式和指引自行对相关信息进行查询、更正、补充、删除、改变授权范围等操作。
+9.2 用户在查询、更正、补充、删除、前述信息或改变授权范围时,夜风可能要求用户完成身份认证,以保障用户账号及个人信息的安全。
+9.3 若用户更正、删除相关的信息或改变授权范围导致夜风不能正常提供服务的,因而产生的不便和损失,夜风不承担任何责任。
+9.4 若用户继续使用夜风提供的服务的,夜风为了能够正常提供服务,将会重新收集用户信息。
+十、用户账号注销
+10.1 在符合夜风用户服务协议的约定的条件及国家相关法律法规规定的情况下,用户的服务账号可能被注销或者删除。
+10.2 当用户决定不再使用夜风提供的任何服务,可通过服务中的设置或夜风的指引注销或者删除账号。
+10.3 夜风将在用户注销账号后及时删除该的账号中的信息内容或按照服务协议的约定进行匿名化处理。
+10.4 用户十分明确并清楚,账号注销后,账号中的信息将不能再恢复,由此造成的不便和损失,夜风不承担任何责任。
+十一、投诉与反馈
+  用户对本协议有任何疑问的,应通过服务中的设置夜风官方网站上的客服信箱(317743968@qq.com)发送邮件或通过客服中心提供的信息向夜风进行咨询、申诉或举报,用户应同时向夜风提供相应的证据材料。夜风在收到用户材料后,原则上会在15天内回复处理意见或者结果。若有特殊情况需要延长的,以夜风的具体处理时间为准(若有特殊情况,夜风会另行通知用户)。
+十二、适用范围
+    夜风的所有服务均适用本协议。但某些服务有其特定的隐私指引/声明,该特定隐私指引/声明更具体地说明夜风在该服务中如何处理用户的信息。如本协议与特定服务的隐私指引/声明有不一致之处,请以该特定隐私指引/声明为准。
+十三、变更
+本隐私协议内容如发生任何实质性变更,夜风会在变更后于官方网站显著位置或服务页面的显著位置进行公示,如用户不同意变更后的内容,用户可以选择停止使用夜风的产品或服务并注销用户账号;如用户继续使用夜风的产品或服务的,即表示用户同意并接受修订后的《用户隐私协议》的约束。
+
', +]; diff --git a/_php_archive/function.php b/_php_archive/function.php new file mode 100644 index 0000000..48ccbb9 --- /dev/null +++ b/_php_archive/function.php @@ -0,0 +1,317 @@ +alert('{$data['msg']}');window.location.href = '/microClient/index';"; + } else { + echo ""; + } + if(isset($data['code'])) { + if(0 == $data['code']) { + $data['code'] = 1; + } else { + $data['code'] = 0; + } + } + exit; + } + exit(json_encode($data)); +} + +function isLogin() { + global $_SESSION; + + if(isset($_SESSION['account']) && $_SESSION['account']) { + return true; + } + return false; +} + +function logout() { + global $_SESSION; + + if(empty($_SESSION)) return false; + + $_SESSION = []; + session_destroy(); + + return true; +} + +function loginAdmin($token = '') { + global $_CONFIG, $_SESSION; + + if(!$token) return false; + + if(!isset($_SESSION['admin']) || !$_SESSION['admin']) { + setcookie('admin', $token, $_CONFIG['session_time']); + $_SESSION['admin'] = $token; + } + + return true; +} + +function logoutAdmin() { + global $_SESSION; + + if(empty($_SESSION)) return false; + + setcookie('admin', ''); + + $_SESSION = []; + session_destroy(); + + return true; +} + +// 推送日志 +function writeLog($message, $type = 'gm') { + $date = date('Y-m-d'); + + $path = __DIR__.'/log/'.date('Y-m').'/'.date('d').'/'; + mkdirs($path); + + $file = 'log_'.md5($date.BASE_KEY).'.log'; + $message .= ', IP: '.get_ip(); + file_put_contents($path.$file, '['.date('Y-m-d H:i:s').'] '.$message.PHP_EOL, FILE_APPEND); +} + +function isPost() { + return 'POST' == $_SERVER['REQUEST_METHOD']; +} + +function get_http_type() { + return ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://'; +} + +function get_ip() { + if (isset($_SERVER)) { + if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $realip = $_SERVER['HTTP_X_FORWARDED_FOR']; + } else if (isset($_SERVER['HTTP_CLIENT_IP'])) { + $realip = $_SERVER['HTTP_CLIENT_IP']; + } else { + $realip = $_SERVER['REMOTE_ADDR']; + } + } else { + if (getenv('HTTP_X_FORWARDED_FOR')) { + $realip = getenv('HTTP_X_FORWARDED_FOR'); + } else if (getenv('HTTP_CLIENT_IP')) { + $realip = getenv('HTTP_CLIENT_IP'); + } else { + $realip = getenv('REMOTE_ADDR'); + } + } + return $realip; +} + +function isMobile() { + // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 + if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) { + return true; + } + // 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息 + if (isset ($_SERVER['HTTP_VIA'])) { + // 找不到为flase,否则为true + return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false; + } + // 脑残法,判断手机发送的客户端标志,兼容性有待提高 + if (isset ($_SERVER['HTTP_USER_AGENT'])) { + $clientkeywords = ['nokia', 'sony', 'ericsson', 'mot', 'samsung', 'htc', 'sgh', 'lg', 'sharp', 'sie-', 'philips', 'panasonic', 'alcatel', 'lenovo', 'iphone', 'ipod', 'blackberry', 'meizu', 'android', 'netfront', 'symbian', 'ucweb', 'windowsce', 'palm', 'operamini', 'operamobi', 'openwave', 'nexusone', 'cldc', 'midp', 'wap', 'mobile']; + // 从HTTP_USER_AGENT中查找手机浏览器的关键字 + if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) { + return true; + } + } + // 协议法,因为有可能不准确,放到最后判断 + if (isset ($_SERVER['HTTP_ACCEPT'])) { + // 如果只支持wml并且不支持html那一定是移动设备 + // 如果支持wml和html但是wml在html之前则是移动设备 + if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) { + return true; + } + } + return false; +} + +/** + * 获得访客操作系统 + */ +function getOS($str = '') { + $str = $str ? $str : (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''); + if (isset($str)) { + if (preg_match('/win/i', $str)) { + $val = 'Windows'; + } else if (preg_match('/mac/i', $str)) { + $val = 'MAC'; + } else if (preg_match('/linux/i', $str)) { + $val = 'Linux'; + } else if (preg_match('/unix/i', $str)) { + $val = 'Unix'; + } else if (preg_match('/bsd/i', $str)) { + $val = 'BSD'; + } else { + $val = 'Other'; + } + return $val; + } else { + return 'unknow'; + } +} + +/** + * 获得访问者浏览器 + */ +function getBrowse($str = '') { + $str = $str ? $str : $_SERVER['HTTP_USER_AGENT']; + if (isset($str)) { + if (preg_match('/MSIE/i', $str)) { + $val = 'MSIE'; + } else if (preg_match('/Firefox/i', $str)) { + $val = 'Firefox'; + } else if (preg_match('/Chrome/i', $str)) { + $val = 'Chrome'; + } else if (preg_match('/Safari/i', $str)) { + $val = 'Safari'; + } else if (preg_match('/Opera/i', $str)) { + $val = 'Opera'; + } else { + $val = 'Other'; + } + return $val; + } else { + return 'unknow'; + } +} + +/** + * 生成指定位数的随机字符 + * + * @static + * @access public + * @param int $len 长度 + * @param string $format 格式 + * @return string + * @author 317743968 <2019/07/25> + */ +function getRandomString($len = 6, $format = 'ALL') { + switch($format) { + case 'ALL': + $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-@#~'; + break; + case 'CHAR': + $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';//-@#~ + break; + case 'NUMBER': + $chars = '0123456789'; + break; + default: + $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-@#~'; + break; + } + + mt_srand((double) microtime() * 1000000 * getmypid()); + + $string = ''; + while(strlen($string) < $len) { + $string .= substr($chars, (mt_rand() % strlen($chars)), 1); + } + + return $string; +} + +/** + * 个性化时间函数 + * @param string $time 时间戳 + * @return string + */ +function time_tran($time) { + $newtime = time() - $time; + if ($newtime < 60) { + $str = '刚刚'; + }elseif ($newtime < 60 * 60) { + $min = floor($newtime/60); + $str = ''.$min.'分钟前'; + }elseif ($newtime < 60 * 60 * 24) { + $h = floor($newtime/(60*60)); + $str = ''.$h.'小时前'; + }else{ + $newtime = strtotime(date('Y-m-d', time())) - strtotime(date('Y-m-d', $time)); + if ($newtime < 60 * 60 * 24 * 3) { + $d = floor($newtime/(60*60*24)); + $str = ''.($d == 1 ? '昨天' : '前天').''; + }elseif ($newtime < 60 * 60 * 24 * 30) { + $str = ''.floor($newtime / (60*60*24)).'天前'; + }elseif ($newtime < 60 * 60 * 24 * 30 * 12) { + $str = floor($newtime / (60*60*24*30)).'月前'; + }else{ + $str = '一年前'; + } + } + return $str; +} + +//创建文件夹 +function mkdirs($dir, $mode = 0777) { + if (is_dir($dir) || @mkdir($dir, $mode)) { + return true; + } + if (!mkdirs(dirname($dir), $mode)) { + return false; + } + return @mkdir($dir, $mode); +} + +function curl($url, $post_data = null, $method = 'post') { + //初始化 + $curl = curl_init(); + + //设置抓取的url + curl_setopt($curl, CURLOPT_URL, $url); + + //设置头文件的信息作为数据流输出 + //curl_setopt($curl, CURLOPT_HEADER, 1); + + //设置获取的信息以文件流的形式返回,而不是直接输出。 + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + + //防止CURL出错 + curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + + //不验证ssl证书 + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + + if ($method == 'post') { + //设置post方式提交 + curl_setopt($curl, CURLOPT_POST, 1); + //设置post数据 + curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); + } + + //执行命令 + $data = curl_exec($curl); + + if($data === false) die('Curl error: '.curl_error($curl)); + + //关闭URL请求 + curl_close($curl); + + return $data; +} diff --git a/_php_archive/linuxdo.php b/_php_archive/linuxdo.php new file mode 100644 index 0000000..918b511 --- /dev/null +++ b/_php_archive/linuxdo.php @@ -0,0 +1,187 @@ + 'tfKevot5lSwB5A5gcqPQMMhaXDLjib0P', + 'client_secret' => '95KWP8sbRIUu5df7gBo5fIztz6ISmvfa' +]; + +// cURL 函数 +function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua = 0, $nobaody = 0, $addheader = 0) +{ + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + $httpheader[] = "Accept: */*"; + $httpheader[] = "Accept-Encoding: gzip,deflate,sdch"; + $httpheader[] = "Accept-Language: zh-CN,zh;q=0.8"; + $httpheader[] = "Connection: close"; + if ($header) { + $httpheader = array_merge($httpheader, $header); + } + curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader); + if ($post) { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post); + } + if ($header) { + curl_setopt($ch, CURLOPT_HEADER, false); + } + if ($cookie) { + curl_setopt($ch, CURLOPT_COOKIE, $cookie); + } + if ($referer) { + if ($referer == 1) { + curl_setopt($ch, CURLOPT_REFERER, ''); + } else { + curl_setopt($ch, CURLOPT_REFERER, $referer); + } + } + if ($ua) { + curl_setopt($ch, CURLOPT_USERAGENT, $ua); + } else { + curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"); + } + if ($nobaody) { + curl_setopt($ch, CURLOPT_NOBODY, 1); + } + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $ret = curl_exec($ch); + curl_close($ch); + return $ret; +} + +$code = $_GET['code']; + +$key = base64_encode($_LINUXDO_CONNECT['client_id'] . ':' . $_LINUXDO_CONNECT['client_secret']); + +$header = [ + 'Authorization: Basic ' . $key +]; + +$post = http_build_query([ + 'grant_type' => 'authorization_code', + 'code' => $code, + 'redirect_uri' => '' +]); + +$getTokenRes = get_curl('https://connect.linux.do/oauth2/token', $post, 0, 0, $header); + +$getTokenArr = json_decode($getTokenRes, true); + +if (isset($getTokenArr['access_token'])) { + $access_token = $getTokenArr['access_token']; + + $header = [ + 'Authorization: Bearer ' . $access_token + ]; + + $getUserRes = get_curl('https://connect.linux.do/api/user', 0, 0, 0, $header); + + $getUserArr = json_decode($getUserRes, true); +} else { + $err = json_encode($getTokenArr); +} + +?> + + + + + + + + + + + + + + + + + + + + + <?= $_CONFIG['game_name'] ?> <?= $_CONFIG['game_description'] ?> + + + + + + + + + + + + + + + 授权发生异常: + + + + \ No newline at end of file diff --git a/_php_archive/login.php b/_php_archive/login.php new file mode 100644 index 0000000..ad8d0a1 --- /dev/null +++ b/_php_archive/login.php @@ -0,0 +1,736 @@ + + connect_errno) returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); +$mySQLi->set_charset($_CONFIG_DB['db_charset']); + +// 查询 +$status = 1; +$stmt = $mySQLi->prepare('select server_id from server where status >= ? order by server_id asc limit 1000'); +$stmt->bind_param('d', $status); + +$stmt->bind_result($server_id); +$stmt->execute(); +$stmt->store_result(); + +?> + + + + + + + + + + + + + + + + + + + + <?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?> + + + + + + + + + + + + + +
+ +
+
+ + + \ No newline at end of file diff --git a/_php_archive/php/PHPMailer/#/COMMITMENT b/_php_archive/php/PHPMailer/#/COMMITMENT new file mode 100644 index 0000000..a687e0d --- /dev/null +++ b/_php_archive/php/PHPMailer/#/COMMITMENT @@ -0,0 +1,46 @@ +GPL Cooperation Commitment +Version 1.0 + +Before filing or continuing to prosecute any legal proceeding or claim +(other than a Defensive Action) arising from termination of a Covered +License, we commit to extend to the person or entity ('you') accused +of violating the Covered License the following provisions regarding +cure and reinstatement, taken from GPL version 3. As used here, the +term 'this License' refers to the specific Covered License being +enforced. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you + have received notice of violation of this License (for any work) + from that copyright holder, and you cure the violation prior to 30 + days after your receipt of the notice. + +We intend this Commitment to be irrevocable, and binding and +enforceable against us and assignees of or successors to our +copyrights. + +Definitions + +'Covered License' means the GNU General Public License, version 2 +(GPLv2), the GNU Lesser General Public License, version 2.1 +(LGPLv2.1), or the GNU Library General Public License, version 2 +(LGPLv2), all as published by the Free Software Foundation. + +'Defensive Action' means a legal proceeding or claim that We bring +against you in response to a prior proceeding or claim initiated by +you or your affiliate. + +'We' means each contributor to this repository as of the date of +inclusion of this file, including subsidiaries of a corporate +contributor. + +This work is available under a Creative Commons Attribution-ShareAlike +4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/_php_archive/php/PHPMailer/#/LICENSE b/_php_archive/php/PHPMailer/#/LICENSE new file mode 100644 index 0000000..f166cc5 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/LICENSE @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! \ No newline at end of file diff --git a/_php_archive/php/PHPMailer/#/README.md b/_php_archive/php/PHPMailer/#/README.md new file mode 100644 index 0000000..3a1a05b --- /dev/null +++ b/_php_archive/php/PHPMailer/#/README.md @@ -0,0 +1,229 @@ +[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/) + +![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png) + +# PHPMailer – A full-featured email creation and transfer class for PHP + +[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) +[![codecov.io](https://codecov.io/gh/PHPMailer/PHPMailer/branch/master/graph/badge.svg?token=iORZpwmYmM)](https://codecov.io/gh/PHPMailer/PHPMailer) +[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) +[![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) +[![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) +[![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) + +## Features +- Probably the world's most popular code for sending email from PHP! +- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more +- Integrated SMTP support – send without a local mail server +- Send emails with multiple To, CC, BCC and Reply-to addresses +- Multipart/alternative emails for mail clients that do not read HTML email +- Add attachments, including inline +- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings +- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SMTPS and SMTP+STARTTLS transports +- Validates email addresses automatically +- Protects against header injection attacks +- Error messages in over 50 languages! +- DKIM and S/MIME signing support +- Compatible with PHP 5.5 and later, including PHP 8.1 +- Namespaced to prevent name clashes +- Much more! + +## Why you might need it +Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments. + +Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules – the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong, if not unsafe! + +The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the `mail()` function should be avoided when possible; it's both faster and [safer](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html) to use SMTP to localhost. + +*Please* don't be tempted to do it yourself – if you don't use PHPMailer, there are many other excellent libraries that +you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/) +, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail) etc. + +## License +This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution. + +## Installation & loading +PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: + +```json +"phpmailer/phpmailer": "^6.5" +``` + +or run + +```sh +composer require phpmailer/phpmailer +``` + +Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer. + +If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`. + +Alternatively, if you're not using Composer, you +can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: + +```php +SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output + $mail->isSMTP(); //Send using SMTP + $mail->Host = 'smtp.example.com'; //Set the SMTP server to send through + $mail->SMTPAuth = true; //Enable SMTP authentication + $mail->Username = 'user@example.com'; //SMTP username + $mail->Password = 'secret'; //SMTP password + $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption + $mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` + + //Recipients + $mail->setFrom('from@example.com', 'Mailer'); + $mail->addAddress('joe@example.net', 'Joe User'); //Add a recipient + $mail->addAddress('ellen@example.com'); //Name is optional + $mail->addReplyTo('info@example.com', 'Information'); + $mail->addCC('cc@example.com'); + $mail->addBCC('bcc@example.com'); + + //Attachments + $mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments + $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name + + //Content + $mail->isHTML(true); //Set email format to HTML + $mail->Subject = 'Here is the subject'; + $mail->Body = 'This is the HTML message body in bold!'; + $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; + + $mail->send(); + echo 'Message has been sent'; +} catch (Exception $e) { + echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; +} +``` + +You'll find plenty to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder, which covers many common scenarios including sending through gmail, building contact forms, sending to mailing lists, and more. + +If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance. + +That's it. You should now be ready to use PHPMailer! + +## Localization +PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: + +```php +//To load the French version +$mail->setLanguage('fr', '/optional/path/to/language/directory/'); +``` + +We welcome corrections and new languages – if you're looking for corrections, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. + +## Documentation +Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated. + +Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps). + +To reduce PHPMailer's deployed code footprint, examples are not included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly. + +Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/). + +You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good reference for how to do various operations such as encryption. + +If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). + +## Tests +[PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions. + +[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) + +If this isn't passing, is there something you can do to help? + +## Security +Please disclose any vulnerabilities found responsibly – report security issues to the maintainers privately. + +See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) and [PHPMailer's security advisories on GitHub](https://github.com/PHPMailer/PHPMailer/security). + +## Contributing +Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). + +We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. + +If you found a mistake in the docs, or want to add something, go ahead and amend the wiki – anyone can edit it. + +If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone: + +```sh +git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git +``` + +Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained. + +## Sponsorship +Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), the world's only privacy-first email marketing system. + +Smartmessages.net privacy-first email marketing logo + +Donations are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard cash 💰. Sponsorship through GitHub is a simple and convenient way to say "thank you" to PHPMailer's maintainers and contributors – just click the "Sponsor" button [on the project page](https://github.com/PHPMailer/PHPMailer). If your company uses PHPMailer, consider taking part in Tidelift's enterprise support programme. + +## PHPMailer For Enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of PHPMailer and thousands of other packages are working with Tidelift to deliver commercial +support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and +improve code health, while paying the maintainers of the exact packages you +use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-phpmailer?utm_source=packagist-phpmailer-phpmailer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +## Changelog +See [changelog](changelog.md). + +## History +- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). +- [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004. +- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. +- Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008. +- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013. +- PHPMailer moves to [the PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013. + +### What's changed since moving from SourceForge? +- Official successor to the SourceForge and Google Code projects. +- Test suite. +- Continuous integration with Github Actions. +- Composer support. +- Public development. +- Additional languages and language strings. +- CRAM-MD5 authentication support. +- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/_php_archive/php/PHPMailer/#/SECURITY.md b/_php_archive/php/PHPMailer/#/SECURITY.md new file mode 100644 index 0000000..035a87f --- /dev/null +++ b/_php_archive/php/PHPMailer/#/SECURITY.md @@ -0,0 +1,37 @@ +# Security notices relating to PHPMailer + +Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately. + +PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the `$patternselect` parameter to `validateAddress()` is set to `'php'` (the default, defined by `PHPMailer::$validator`), and the global namespace contains a function called `php`, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names. Recorded as [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603). Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/). + +PHPMailer versions 6.4.1 and earlier contain a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows. +PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. Recorded as [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [Jilin Diting Information Technology Co., Ltd](https://listensec.com) via Tidelift. + +PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts. + +PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security. + +PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr. + +PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending. + +PHPMailer versions prior to 5.2.10 (released May 2015) are vulnerable to [CVE-2008-5619](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-5619), a remote code execution vulnerability in the bundled html2text library. This file was removed in 5.2.10, so if you are using a version prior to that and make use of the html2text function, it's vitally important that you upgrade and remove this file. + +PHPMailer versions prior to 2.0.7 and 2.2.1 are vulnerable to [CVE-2012-0796](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0796), an email header injection attack. + +Joomla 1.6.0 uses PHPMailer in an unsafe way, allowing it to reveal local file paths, reported in [CVE-2011-3747](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3747). + +PHPMailer didn't sanitise the `$lang_path` parameter in `SetLanguage`. This wasn't a problem in itself, but some apps (PHPClassifieds, ATutor) also failed to sanitise user-provided parameters passed to it, permitting semi-arbitrary local file inclusion, reported in [CVE-2010-4914](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4914), [CVE-2007-2021](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-2021) and [CVE-2006-5734](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-5734). + +PHPMailer 1.7.2 and earlier contained a possible DDoS vulnerability reported in [CVE-2005-1807](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1807). + +PHPMailer 1.7 and earlier (June 2003) have a possible vulnerability in the `SendmailSend` method where shell commands may not be sanitised. Reported in [CVE-2007-3215](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-3215). + diff --git a/_php_archive/php/PHPMailer/#/VERSION b/_php_archive/php/PHPMailer/#/VERSION new file mode 100644 index 0000000..cd802a1 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/_php_archive/php/PHPMailer/#/composer.json b/_php_archive/php/PHPMailer/#/composer.json new file mode 100644 index 0000000..b13732b --- /dev/null +++ b/_php_archive/php/PHPMailer/#/composer.json @@ -0,0 +1,76 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + }, + "require": { + "php": ">=5.5.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "PHPMailer\\Test\\": "test/" + } + }, + "license": "LGPL-2.1-only", + "scripts": { + "check": "./vendor/bin/phpcs", + "test": "./vendor/bin/phpunit --no-coverage", + "coverage": "./vendor/bin/phpunit", + "lint": [ + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php,phps --exclude vendor --exclude .git --exclude build" + ] + } +} diff --git a/_php_archive/php/PHPMailer/#/get_oauth_token.php b/_php_archive/php/PHPMailer/#/get_oauth_token.php new file mode 100644 index 0000000..befdc34 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/get_oauth_token.php @@ -0,0 +1,146 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * Get an OAuth2 token from an OAuth2 provider. + * * Install this script on your server so that it's accessible + * as [https/http]:////get_oauth_token.php + * e.g.: http://localhost/phpmailer/get_oauth_token.php + * * Ensure dependencies are installed with 'composer install' + * * Set up an app in your Google/Yahoo/Microsoft account + * * Set the script address as the app's redirect URL + * If no refresh token is obtained when running this file, + * revoke access to your app and run the script again. + */ + +namespace PHPMailer\PHPMailer; + +/** + * Aliases for League Provider Classes + * Make sure you have added these to your composer.json and run `composer install` + * Plenty to choose from here: + * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ + */ +//@see https://github.com/thephpleague/oauth2-google +use League\OAuth2\Client\Provider\Google; +//@see https://packagist.org/packages/hayageek/oauth2-yahoo +use Hayageek\OAuth2\Client\Provider\Yahoo; +//@see https://github.com/stevenmaguire/oauth2-microsoft +use Stevenmaguire\OAuth2\Client\Provider\Microsoft; + +if (!isset($_GET['code']) && !isset($_GET['provider'])) { + ?> + +Select Provider:
+Google
+Yahoo
+Microsoft/Outlook/Hotmail/Live/Office365
+ + + $clientId, + 'clientSecret' => $clientSecret, + 'redirectUri' => $redirectUri, + 'accessType' => 'offline' +]; + +$options = []; +$provider = null; + +switch ($providerName) { + case 'Google': + $provider = new Google($params); + $options = [ + 'scope' => [ + 'https://mail.google.com/' + ] + ]; + break; + case 'Yahoo': + $provider = new Yahoo($params); + break; + case 'Microsoft': + $provider = new Microsoft($params); + $options = [ + 'scope' => [ + 'wl.imap', + 'wl.offline_access' + ] + ]; + break; +} + +if (null === $provider) { + exit('Provider missing'); +} + +if (!isset($_GET['code'])) { + //If we don't have an authorization code then get one + $authUrl = $provider->getAuthorizationUrl($options); + $_SESSION['oauth2state'] = $provider->getState(); + header('Location: ' . $authUrl); + exit; + //Check given state against previously stored one to mitigate CSRF attack +} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { + unset($_SESSION['oauth2state']); + unset($_SESSION['provider']); + exit('Invalid state'); +} else { + unset($_SESSION['provider']); + //Try to get an access token (using the authorization code grant) + $token = $provider->getAccessToken( + 'authorization_code', + [ + 'code' => $_GET['code'] + ] + ); + //Use this to interact with an API on the users behalf + //Use this to get a new access token if the old one expires + echo 'Refresh Token: ', $token->getRefreshToken(); +} diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-af.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-af.php new file mode 100644 index 0000000..0b2a72d --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-af.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.'; +$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .'; +$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ'; +$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; +$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : '; +$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: '; +$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: '; +$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : '; +$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.'; +$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.'; +$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية فشل في الارسال لكل من : '; +$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.'; +$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: '; +$PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-az.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-az.php new file mode 100644 index 0000000..552167e --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-az.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-be.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-be.php new file mode 100644 index 0000000..9e92dda --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-be.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.'; +$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.'; +$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.'; +$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: '; +$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: '; +$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: '; +$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: '; +$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: '; +$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().'; +$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: '; +$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.'; +$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: '; +$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.'; +$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-bg.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-bg.php new file mode 100644 index 0000000..c41f675 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-bg.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.'; +$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно'; +$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: '; +$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: '; +$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: '; +$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: '; +$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: '; +$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.'; +$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: '; +$PHPMAILER_LANG['signing'] = 'Грешка при подписване: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: '; +$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: '; +$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ca.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ca.php new file mode 100644 index 0000000..3468485 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ca.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.'; +$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.'; +$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: '; +$PHPMAILER_LANG['execute'] = 'No es pot executar: '; +$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: '; +$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: '; +$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat'; +$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: '; +$PHPMAILER_LANG['signing'] = 'Error al signar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ch.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ch.php new file mode 100644 index 0000000..500c952 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ch.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '不能执行: '; +$PHPMAILER_LANG['file_access'] = '不能访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; +$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; +$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; +$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-cs.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-cs.php new file mode 100644 index 0000000..e770a1a --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-cs.php @@ -0,0 +1,28 @@ + + * Rewrite and extension of the work by Mikael Stokkebro + * + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.'; +$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold'; +$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: '; +$PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: '; +$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; +$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; +$PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.'; +$PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; +$PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; +$PHPMAILER_LANG['signing'] = 'Signeringsfejl: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: '; +$PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: '; +$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-de.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-de.php new file mode 100644 index 0000000..e7e59d2 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-de.php @@ -0,0 +1,28 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.'; +$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; +$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; +$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; +$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; +$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Error al firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-et.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-et.php new file mode 100644 index 0000000..93addc9 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-et.php @@ -0,0 +1,28 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.'; +$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu'; +$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: '; +$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: '; +$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: '; +$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: '; +$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: '; +$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.'; +$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: '; +$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: '; +$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: '; +$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: '; +$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fa.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fa.php new file mode 100644 index 0000000..295a47f --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fa.php @@ -0,0 +1,28 @@ + + * @author Mohammad Hossein Mojtahedi + */ + +$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.'; +$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.'; +$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.'; +$PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: '; +$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: '; +$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: '; +$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: '; +$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: '; +$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.'; +$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.'; +$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: '; +$PHPMAILER_LANG['signing'] = 'خطا در امضا: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: '; +$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: '; +$PHPMAILER_LANG['extension_missing'] = 'افزونه موجود نیست: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fi.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fi.php new file mode 100644 index 0000000..243c054 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fi.php @@ -0,0 +1,28 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ókend encoding: '; +$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: '; +$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: '; +$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: '; +$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: '; +$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.'; +$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fr.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fr.php new file mode 100644 index 0000000..38a7a8e --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-fr.php @@ -0,0 +1,38 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.'; +$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía'; +$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: '; +$PHPMAILER_LANG['execute'] = 'Non puido ser executado: '; +$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: '; +$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Erro ó firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-he.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-he.php new file mode 100644 index 0000000..b123aa5 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-he.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; +$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; +$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; +$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; +$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; +$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; +$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; +$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; +$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; +$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; +$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hi.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hi.php new file mode 100644 index 0000000..d973a35 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hi.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। '; +$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। '; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। '; +$PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। '; +$PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। '; +$PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। '; +$PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। '; +$PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। '; +$PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। '; +$PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।'; +$PHPMAILER_LANG['invalid_address'] = 'पता गलत है। '; +$PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। '; +$PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। '; +$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। '; +$PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। '; +$PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। '; +$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hr.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hr.php new file mode 100644 index 0000000..cacb6c3 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hr.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: '; +$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hu.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hu.php new file mode 100644 index 0000000..e6b58b0 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-hu.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.'; +$PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է'; +$PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: '; +$PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: '; +$PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: '; +$PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: '; +$PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: '; +$PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.'; +$PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.'; +$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: '; +$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: '; +$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: '; +$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-id.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-id.php new file mode 100644 index 0000000..212a11f --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-id.php @@ -0,0 +1,31 @@ + + * @author @januridp + * @author Ian Mustafa + */ + +$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.'; +$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.'; +$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong'; +$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas: '; +$PHPMAILER_LANG['file_open'] = 'Kesalahan Berkas: Berkas tidak dapat dibuka: '; +$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel.'; +$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak sesuai: '; +$PHPMAILER_LANG['invalid_hostentry'] = 'Gagal terkirim, entri host tidak sesuai: '; +$PHPMAILER_LANG['invalid_host'] = 'Gagal terkirim, host tidak sesuai: '; +$PHPMAILER_LANG['provide_address'] = 'Harus tersedia minimal satu alamat tujuan'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung'; +$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menyebabkan kesalahan: '; +$PHPMAILER_LANG['signing'] = 'Kesalahan dalam penandatangan SSL: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Ekstensi PHP tidak tersedia: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-it.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-it.php new file mode 100644 index 0000000..08a6b73 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-it.php @@ -0,0 +1,28 @@ + + * @author Stefano Sabatini + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.'; +$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto'; +$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: '; +$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; +$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; +$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; +$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; +$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: '; +$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: '; +$PHPMAILER_LANG['signing'] = 'Errore nella firma: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.'; +$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: '; +$PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ja.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ja.php new file mode 100644 index 0000000..c76f526 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ja.php @@ -0,0 +1,29 @@ + + * @author Yoshi Sakai + * @author Arisophy + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; +$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; +$PHPMAILER_LANG['empty_message'] = 'メール本文が空です。'; +$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; +$PHPMAILER_LANG['execute'] = '実行できませんでした: '; +$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; +$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; +$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; +$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; +$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: '; +$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; +$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; +$PHPMAILER_LANG['signing'] = '署名エラー: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: '; +$PHPMAILER_LANG['variable_set'] = '変数が存在しません: '; +$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ka.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ka.php new file mode 100644 index 0000000..51fe403 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ka.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.'; +$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: '; +$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: '; +$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: '; +$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: '; +$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: '; +$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.'; +$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: '; +$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია'; +$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: '; +$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; +$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; +$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ko.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ko.php new file mode 100644 index 0000000..8c97dd9 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ko.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; +$PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; +$PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; +$PHPMAILER_LANG['execute'] = '실행 불가: '; +$PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; +$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; +$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; +$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; +$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['signing'] = '서명 오류: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; +$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; +$PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-lt.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-lt.php new file mode 100644 index 0000000..4f115b1 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-lt.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; +$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; +$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; +$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; +$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; +$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; +$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; +$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; +$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; +$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; +$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; +$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-lv.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-lv.php new file mode 100644 index 0000000..679b18c --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-lv.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; +$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; +$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; +$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; +$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; +$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; +$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; +$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; +$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; +$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; +$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-mg.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-mg.php new file mode 100644 index 0000000..8a94f6a --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-mg.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.'; +$PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.'; +$PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: '; +$PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: '; +$PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: '; +$PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: '; +$PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: '; +$PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.'; +$PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: '; +$PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ms.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ms.php new file mode 100644 index 0000000..71db338 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ms.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.'; +$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.'; +$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej'; +$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: '; +$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: '; +$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.'; +$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.'; +$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: '; +$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: '; +$PHPMAILER_LANG['extension_missing'] = 'Sambungan hilang: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-nb.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-nb.php new file mode 100644 index 0000000..65793ce --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-nb.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['buggy_php'] = 'PHP versie gededecteerd die onderhavig is aan een bug die kan resulteren in gecorrumpeerde berichten. Om dit te voorkomen, gebruik SMTP voor het verzenden van berichten, zet de mail.add_x_header optie in uw php.ini file uit, gebruik MacOS of Linux, of pas de gebruikte PHP versie aan naar versie 7.0.17+ or 7.1.3+.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; +$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; +$PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; +$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; +$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; +$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; +$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; +$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; +$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['invalid_header'] = 'Ongeldige header naam of waarde'; +$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: '; +$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; +$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; +$PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP code: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Aanvullende SMTP informatie: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_detail'] = 'Detail: '; +$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; +$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-pl.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-pl.php new file mode 100644 index 0000000..23caa71 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-pl.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; +$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; +$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; +$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; +$PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-pt_br.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-pt_br.php new file mode 100644 index 0000000..5239865 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-pt_br.php @@ -0,0 +1,38 @@ + + * @author Lucas Guimarães + * @author Phelipe Alves + * @author Fabio Beneditto + * @author Geidson Benício Coelho + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; +$PHPMAILER_LANG['buggy_php'] = 'Sua versão do PHP é afetada por um bug que por resultar em messagens corrompidas. Para corrigir, mude para enviar usando SMTP, desative a opção mail.add_x_header em seu php.ini, mude para MacOS ou Linux, ou atualize seu PHP para versão 7.0.17+ ou 7.1.3+ '; +$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; +$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor de cabeçalho inválido'; +$PHPMAILER_LANG['invalid_hostentry'] = 'hostentry inválido: '; +$PHPMAILER_LANG['invalid_host'] = 'host inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; +$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_code'] = 'Código do servidor SMTP: '; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais do servidor SMTP: '; +$PHPMAILER_LANG['smtp_detail'] = 'Detalhes do servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ro.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ro.php new file mode 100644 index 0000000..45bef91 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-ro.php @@ -0,0 +1,33 @@ + + * @author Foster Snowhill + */ + +$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; +$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; +$PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: '; +$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; +$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; +$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: '; +$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; +$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().'; +$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: '; +$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; +$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: '; +$PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: '; +$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sk.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sk.php new file mode 100644 index 0000000..028f5bc --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sk.php @@ -0,0 +1,30 @@ + + * @author Peter Orlický + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; +$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; +$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; +$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; +$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; +$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; +$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; +$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; +$PHPMAILER_LANG['invalid_hostentry'] = 'Záznam hostiteľa je nesprávny: '; +$PHPMAILER_LANG['invalid_host'] = 'Hostiteľ je nesprávny: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; +$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; +$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; +$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; +$PHPMAILER_LANG['extension_missing'] = 'Chýba rozšírenie: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sl.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sl.php new file mode 100644 index 0000000..3e00c25 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sl.php @@ -0,0 +1,36 @@ + + * @author Filip Š + * @author Blaž Oražem + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; +$PHPMAILER_LANG['buggy_php'] = 'Na vašo PHP različico vpliva napaka, ki lahko povzroči poškodovana sporočila. Če želite težavo odpraviti, preklopite na pošiljanje prek SMTP, onemogočite možnost mail.add_x_header v vaši php.ini datoteki, preklopite na MacOS ali Linux, ali nadgradite vašo PHP zaličico na 7.0.17+ ali 7.1.3+.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; +$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; +$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; +$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: '; +$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; +$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; +$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; +$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; +$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; +$PHPMAILER_LANG['invalid_header'] = 'Neveljavno ime ali vrednost glave'; +$PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: '; +$PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; +$PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; +$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP koda: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatne informacije o SMTP: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; +$PHPMAILER_LANG['smtp_detail'] = 'Podrobnosti: '; +$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; +$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sr.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sr.php new file mode 100644 index 0000000..0b5280f --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sr.php @@ -0,0 +1,28 @@ + + * @author Miloš Milanović + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.'; +$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.'; +$PHPMAILER_LANG['encoding'] = 'Непознато кодирање: '; +$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: '; +$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: '; +$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: '; +$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.'; +$PHPMAILER_LANG['invalid_address'] = 'Порука није послата. Неисправна адреса: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.'; +$PHPMAILER_LANG['provide_address'] = 'Дефинишите бар једну адресу примаоца.'; +$PHPMAILER_LANG['signing'] = 'Грешка приликом пријаве: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Није могуће задати нити ресетовати променљиву: '; +$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sr_latn.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sr_latn.php new file mode 100644 index 0000000..6213832 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sr_latn.php @@ -0,0 +1,28 @@ + + * @author Miloš Milanović + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP greška: autentifikacija nije uspela.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP greška: povezivanje sa SMTP serverom nije uspelo.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP greška: podaci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznato kodiranje: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP greška: slanje sa sledećih adresa nije uspelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP greška: slanje na sledeće adrese nije uspelo: '; +$PHPMAILER_LANG['instantiate'] = 'Nije moguće pokrenuti mail funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Poruka nije poslata. Neispravna adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' majler nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite bar jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Povezivanje sa SMTP serverom nije uspelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP servera: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće zadati niti resetovati promenljivu: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sv.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sv.php new file mode 100644 index 0000000..9872c19 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-sv.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; +$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; +$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; +$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; +$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: '; +$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; +$PHPMAILER_LANG['signing'] = 'Signeringsfel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serverfel: '; +$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-tl.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-tl.php new file mode 100644 index 0000000..d15bed1 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-tl.php @@ -0,0 +1,28 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi naitanggap.'; +$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe'; +$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: '; +$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: '; +$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Hindi mabuksan ang file: '; +$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: '; +$PHPMAILER_LANG['instantiate'] = 'Hindi maisimulan ang instance ng mail function.'; +$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: '; +$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: '; +$PHPMAILER_LANG['signing'] = 'Hindi ma-sign: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo.'; +$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo: '; +$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda o ma-reset ang mga variables: '; +$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-tr.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-tr.php new file mode 100644 index 0000000..f938f80 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-tr.php @@ -0,0 +1,31 @@ + + * @fixed by Boris Yurchenko + */ + +$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.'; +$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до SMTP-серверу.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийнято.'; +$PHPMAILER_LANG['encoding'] = 'Невідоме кодування: '; +$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: '; +$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: '; +$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: '; +$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: '; +$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().'; +$PHPMAILER_LANG['provide_address'] = 'Будь ласка, введіть хоча б одну email-адресу отримувача.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.'; +$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: '; +$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення'; +$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через неправильний формат email-адреси: '; +$PHPMAILER_LANG['signing'] = 'Помилка підпису: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або скинути змінну: '; +$PHPMAILER_LANG['extension_missing'] = 'Розширення відсутнє: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-vi.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-vi.php new file mode 100644 index 0000000..d65576e --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-vi.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; +$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; +$PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; +$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; +$PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; +$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; +$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; +$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; +$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; +$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; +$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; +$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; +$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; +$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; +$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-zh.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-zh.php new file mode 100644 index 0000000..35e4e70 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-zh.php @@ -0,0 +1,29 @@ + + * @author Peter Dave Hello <@PeterDaveHello/> + * @author Jason Chiang + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; +$PHPMAILER_LANG['empty_message'] = '郵件內容為空'; +$PHPMAILER_LANG['encoding'] = '未知編碼: '; +$PHPMAILER_LANG['execute'] = '無法執行:'; +$PHPMAILER_LANG['file_access'] = '無法存取檔案:'; +$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; +$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; +$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; +$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; +$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; +$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; +$PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; +$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; +$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; diff --git a/_php_archive/php/PHPMailer/#/language/phpmailer.lang-zh_cn.php b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-zh_cn.php new file mode 100644 index 0000000..728a499 --- /dev/null +++ b/_php_archive/php/PHPMailer/#/language/phpmailer.lang-zh_cn.php @@ -0,0 +1,29 @@ + + * @author young + * @author Teddysun + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; +$PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '无法执行:'; +$PHPMAILER_LANG['file_access'] = '无法访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; +$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; +$PHPMAILER_LANG['instantiate'] = '未知函数调用。'; +$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; +$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; +$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; +$PHPMAILER_LANG['signing'] = '登录失败:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; +$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; +$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; diff --git a/_php_archive/php/PHPMailer/Exception.php b/_php_archive/php/PHPMailer/Exception.php new file mode 100644 index 0000000..52eaf95 --- /dev/null +++ b/_php_archive/php/PHPMailer/Exception.php @@ -0,0 +1,40 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ +class Exception extends \Exception +{ + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
\n"; + } +} diff --git a/_php_archive/php/PHPMailer/OAuth.php b/_php_archive/php/PHPMailer/OAuth.php new file mode 100644 index 0000000..c1d5b77 --- /dev/null +++ b/_php_archive/php/PHPMailer/OAuth.php @@ -0,0 +1,139 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +use League\OAuth2\Client\Grant\RefreshToken; +use League\OAuth2\Client\Provider\AbstractProvider; +use League\OAuth2\Client\Token\AccessToken; + +/** + * OAuth - OAuth2 authentication wrapper class. + * Uses the oauth2-client package from the League of Extraordinary Packages. + * + * @see http://oauth2-client.thephpleague.com + * + * @author Marcus Bointon (Synchro/coolbru) + */ +class OAuth implements OAuthTokenProvider +{ + /** + * An instance of the League OAuth Client Provider. + * + * @var AbstractProvider + */ + protected $provider; + + /** + * The current OAuth access token. + * + * @var AccessToken + */ + protected $oauthToken; + + /** + * The user's email address, usually used as the login ID + * and also the from address when sending email. + * + * @var string + */ + protected $oauthUserEmail = ''; + + /** + * The client secret, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientSecret = ''; + + /** + * The client ID, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientId = ''; + + /** + * The refresh token, used to obtain new AccessTokens. + * + * @var string + */ + protected $oauthRefreshToken = ''; + + /** + * OAuth constructor. + * + * @param array $options Associative array containing + * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements + */ + public function __construct($options) + { + $this->provider = $options['provider']; + $this->oauthUserEmail = $options['userName']; + $this->oauthClientSecret = $options['clientSecret']; + $this->oauthClientId = $options['clientId']; + $this->oauthRefreshToken = $options['refreshToken']; + } + + /** + * Get a new RefreshToken. + * + * @return RefreshToken + */ + protected function getGrant() + { + return new RefreshToken(); + } + + /** + * Get a new AccessToken. + * + * @return AccessToken + */ + protected function getToken() + { + return $this->provider->getAccessToken( + $this->getGrant(), + ['refresh_token' => $this->oauthRefreshToken] + ); + } + + /** + * Generate a base64-encoded OAuth token. + * + * @return string + */ + public function getOauth64() + { + //Get a new token if it's not available or has expired + if (null === $this->oauthToken || $this->oauthToken->hasExpired()) { + $this->oauthToken = $this->getToken(); + } + + return base64_encode( + 'user=' . + $this->oauthUserEmail . + "\001auth=Bearer " . + $this->oauthToken . + "\001\001" + ); + } +} diff --git a/_php_archive/php/PHPMailer/OAuthTokenProvider.php b/_php_archive/php/PHPMailer/OAuthTokenProvider.php new file mode 100644 index 0000000..1155507 --- /dev/null +++ b/_php_archive/php/PHPMailer/OAuthTokenProvider.php @@ -0,0 +1,44 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * OAuthTokenProvider - OAuth2 token provider interface. + * Provides base64 encoded OAuth2 auth strings for SMTP authentication. + * + * @see OAuth + * @see SMTP::authenticate() + * + * @author Peter Scopes (pdscopes) + * @author Marcus Bointon (Synchro/coolbru) + */ +interface OAuthTokenProvider +{ + /** + * Generate a base64-encoded OAuth token ensuring that the access token has not expired. + * The string to be base 64 encoded should be in the form: + * "user=\001auth=Bearer \001\001" + * + * @return string + */ + public function getOauth64(); +} diff --git a/_php_archive/php/PHPMailer/PHPMailer.php b/_php_archive/php/PHPMailer/PHPMailer.php new file mode 100644 index 0000000..c459984 --- /dev/null +++ b/_php_archive/php/PHPMailer/PHPMailer.php @@ -0,0 +1,5071 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +//namespace PHPMailer\PHPMailer; + +/** + * PHPMailer - PHP email creation and transport class. + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +class PHPMailer +{ + const CHARSET_ASCII = 'us-ascii'; + const CHARSET_ISO88591 = 'iso-8859-1'; + const CHARSET_UTF8 = 'utf-8'; + + const CONTENT_TYPE_PLAINTEXT = 'text/plain'; + const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; + const CONTENT_TYPE_TEXT_HTML = 'text/html'; + const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; + const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; + + const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; + const ENCODING_BASE64 = 'base64'; + const ENCODING_BINARY = 'binary'; + const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; + + const ENCRYPTION_STARTTLS = 'tls'; + const ENCRYPTION_SMTPS = 'ssl'; + + const ICAL_METHOD_REQUEST = 'REQUEST'; + const ICAL_METHOD_PUBLISH = 'PUBLISH'; + const ICAL_METHOD_REPLY = 'REPLY'; + const ICAL_METHOD_ADD = 'ADD'; + const ICAL_METHOD_CANCEL = 'CANCEL'; + const ICAL_METHOD_REFRESH = 'REFRESH'; + const ICAL_METHOD_COUNTER = 'COUNTER'; + const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; + + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * + * @var int|null + */ + public $Priority; + + /** + * The character set of the message. + * + * @var string + */ + public $CharSet = self::CHARSET_ISO88591; + + /** + * The MIME Content-type of the message. + * + * @var string + */ + public $ContentType = self::CONTENT_TYPE_PLAINTEXT; + + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * + * @var string + */ + public $Encoding = self::ENCODING_8BIT; + + /** + * Holds the most recent mailer error message. + * + * @var string + */ + public $ErrorInfo = ''; + + /** + * The From email address for the message. + * + * @var string + */ + public $From = ''; + + /** + * The From name of the message. + * + * @var string + */ + public $FromName = ''; + + /** + * The envelope sender of the message. + * This will usually be turned into a Return-Path header by the receiver, + * and is the address that bounces will be sent to. + * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. + * + * @var string + */ + public $Sender = ''; + + /** + * The Subject of the message. + * + * @var string + */ + public $Subject = ''; + + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * + * @var string + */ + public $Body = ''; + + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * + * @var string + */ + public $AltBody = ''; + + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. + * + * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @see http://kigkonsult.se/iCalcreator/ + * + * @var string + */ + public $Ical = ''; + + /** + * Value-array of "method" in Contenttype header "text/calendar" + * + * @var string[] + */ + protected static $IcalMethods = [ + self::ICAL_METHOD_REQUEST, + self::ICAL_METHOD_PUBLISH, + self::ICAL_METHOD_REPLY, + self::ICAL_METHOD_ADD, + self::ICAL_METHOD_CANCEL, + self::ICAL_METHOD_REFRESH, + self::ICAL_METHOD_COUNTER, + self::ICAL_METHOD_DECLINECOUNTER, + ]; + + /** + * The complete compiled MIME message body. + * + * @var string + */ + protected $MIMEBody = ''; + + /** + * The complete compiled MIME message headers. + * + * @var string + */ + protected $MIMEHeader = ''; + + /** + * Extra headers that createHeader() doesn't fold in. + * + * @var string + */ + protected $mailHeader = ''; + + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * + * @see static::STD_LINE_LENGTH + * + * @var int + */ + public $WordWrap = 0; + + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * + * @var string + */ + public $Mailer = 'mail'; + + /** + * The path to the sendmail program. + * + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * + * @var bool + */ + public $UseSendmailOptions = true; + + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * + * @var string + */ + public $ConfirmReadingTo = ''; + + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * + * @see PHPMailer::$Helo + * + * @var string + */ + public $Hostname = ''; + + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * + * @var string + */ + public $MessageID = ''; + + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * + * @var string + */ + public $MessageDate = ''; + + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * + * @var string + */ + public $Host = 'localhost'; + + /** + * The default SMTP server port. + * + * @var int + */ + public $Port = 25; + + /** + * The SMTP HELO/EHLO name used for the SMTP connection. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * + * @see PHPMailer::$Hostname + * + * @var string + */ + public $Helo = ''; + + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS. + * + * @var string + */ + public $SMTPSecure = ''; + + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * + * @var bool + */ + public $SMTPAutoTLS = true; + + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * + * @see PHPMailer::$Username + * @see PHPMailer::$Password + * + * @var bool + */ + public $SMTPAuth = false; + + /** + * Options array passed to stream_context_create when connecting via SMTP. + * + * @var array + */ + public $SMTPOptions = []; + + /** + * SMTP username. + * + * @var string + */ + public $Username = ''; + + /** + * SMTP password. + * + * @var string + */ + public $Password = ''; + + /** + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. + * + * @var string + */ + public $AuthType = ''; + + /** + * An implementation of the PHPMailer OAuthTokenProvider interface. + * + * @var OAuthTokenProvider + */ + protected $oauth; + + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timeout = 300; + + /** + * Comma separated list of DSN notifications + * 'NEVER' under no circumstances a DSN must be returned to the sender. + * If you use NEVER all other notifications will be ignored. + * 'SUCCESS' will notify you when your mail has arrived at its destination. + * 'FAILURE' will arrive if an error occurred during delivery. + * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual + * delivery's outcome (success or failure) is not yet decided. + * + * @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY + */ + public $dsn = ''; + + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * @see SMTP::DEBUG_OFF: No output + * @see SMTP::DEBUG_CLIENT: Client messages + * @see SMTP::DEBUG_SERVER: Client and server messages + * @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status + * @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed + * + * @see SMTP::$do_debug + * + * @var int + */ + public $SMTPDebug = 0; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @see SMTP::$Debugoutput + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to keep the SMTP connection open after each message. + * If this is set to true then the connection will remain open after a send, + * and closing the connection will require an explicit call to smtpClose(). + * It's a good idea to use this if you are sending multiple messages as it reduces overhead. + * See the mailing list example for how to use it. + * + * @var bool + */ + public $SMTPKeepAlive = false; + + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * + * @var bool + * + * @deprecated 6.0.0 PHPMailer isn't a mailing list manager! + */ + public $SingleTo = false; + + /** + * Storage for addresses when SingleTo is enabled. + * + * @var array + */ + protected $SingleToArray = []; + + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Postfix VERP info + * + * @var bool + */ + public $do_verp = false; + + /** + * Whether to allow sending messages with an empty body. + * + * @var bool + */ + public $AllowEmpty = false; + + /** + * DKIM selector. + * + * @var string + */ + public $DKIM_selector = ''; + + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * + * @var string + */ + public $DKIM_identity = ''; + + /** + * DKIM passphrase. + * Used if your key is encrypted. + * + * @var string + */ + public $DKIM_passphrase = ''; + + /** + * DKIM signing domain name. + * + * @example 'example.com' + * + * @var string + */ + public $DKIM_domain = ''; + + /** + * DKIM Copy header field values for diagnostic use. + * + * @var bool + */ + public $DKIM_copyHeaderFields = true; + + /** + * DKIM Extra signing headers. + * + * @example ['List-Unsubscribe', 'List-Help'] + * + * @var array + */ + public $DKIM_extraHeaders = []; + + /** + * DKIM private key file path. + * + * @var string + */ + public $DKIM_private = ''; + + /** + * DKIM private key string. + * + * If set, takes precedence over `$DKIM_private`. + * + * @var string + */ + public $DKIM_private_string = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: http://www.php.net/is_callable + * + * Parameters: + * bool $result result of the send action + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * string $extra extra information of possible use + * "smtp_transaction_id' => last smtp transaction id + * + * @var string + */ + public $action_function = ''; + + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use. + * + * @var string|null + */ + public $XMailer = ''; + + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. + * + * @see PHPMailer::validateAddress() + * + * @var string|callable + */ + public static $validator = 'php'; + + /** + * An instance of the SMTP sender class. + * + * @var SMTP + */ + protected $smtp; + + /** + * The array of 'to' names and addresses. + * + * @var array + */ + protected $to = []; + + /** + * The array of 'cc' names and addresses. + * + * @var array + */ + protected $cc = []; + + /** + * The array of 'bcc' names and addresses. + * + * @var array + */ + protected $bcc = []; + + /** + * The array of reply-to names and addresses. + * + * @var array + */ + protected $ReplyTo = []; + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * + * @var array + */ + protected $all_recipients = []; + + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + * + * @var array + */ + protected $RecipientsQueue = []; + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$ReplyTo + * + * @var array + */ + protected $ReplyToQueue = []; + + /** + * The array of attachments. + * + * @var array + */ + protected $attachment = []; + + /** + * The array of custom headers. + * + * @var array + */ + protected $CustomHeader = []; + + /** + * The most recent Message-ID (including angular brackets). + * + * @var string + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * + * @var string + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * + * @var array + */ + protected $boundary = []; + + /** + * The array of available text strings for the current language. + * + * @var array + */ + protected $language = []; + + /** + * The number of errors encountered. + * + * @var int + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * + * @var string + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * + * @var string + */ + protected $sign_key_file = ''; + + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * + * @var string + */ + protected $sign_extracerts_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * + * @var string + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * + * @var bool + */ + protected $exceptions = false; + + /** + * Unique ID used for message ID and boundaries. + * + * @var string + */ + protected $uniqueid = ''; + + /** + * The PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.6.0'; + + /** + * Error severity: message only, continue processing. + * + * @var int + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing. + * + * @var int + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached. + * + * @var int + */ + const STOP_CRITICAL = 2; + + /** + * The SMTP standard CRLF line break. + * If you want to change line break format, change static::$LE, not this. + */ + const CRLF = "\r\n"; + + /** + * "Folding White Space" a white space string used for line folding. + */ + const FWS = ' '; + + /** + * SMTP RFC standard line ending; Carriage Return, Line Feed. + * + * @var string + */ + protected static $LE = self::CRLF; + + /** + * The maximum line length supported by mail(). + * + * Background: mail() will sometimes corrupt messages + * with headers headers longer than 65 chars, see #818. + * + * @var int + */ + const MAIL_MAX_LINE_LENGTH = 63; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * The lower maximum line length allowed by RFC 2822 section 2.1.1. + * This length does NOT include the line break + * 76 means that lines will be 77 or 78 chars depending on whether + * the line break format is LF or CRLF; both are valid. + * + * @var int + */ + const STD_LINE_LENGTH = 76; + + /** + * Constructor. + * + * @param bool $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + if (null !== $exceptions) { + $this->exceptions = (bool) $exceptions; + } + //Pick an appropriate debug output format automatically + $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); + } + + /** + * Destructor. + */ + public function __destruct() + { + //Close any open SMTP connection nicely + $this->smtpClose(); + } + + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do). + * + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string|null $params Params + * + * @return bool + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + //Calling mail() with null params breaks + $this->edebug('Sending with mail()'); + $this->edebug('Sendmail path: ' . ini_get('sendmail_path')); + $this->edebug("Envelope sender: {$this->Sender}"); + $this->edebug("To: {$to}"); + $this->edebug("Subject: {$subject}"); + $this->edebug("Headers: {$header}"); + if (!$this->UseSendmailOptions || null === $params) { + $result = @mail($to, $subject, $body, $header); + } else { + $this->edebug("Additional params: {$params}"); + $result = @mail($to, $subject, $body, $header, $params); + } + $this->edebug('Result: ' . ($result ? 'true' : 'false')); + return $result; + } + + /** + * Output debugging info via a user-defined method. + * Only generates output if debug output is enabled. + * + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * + * @param string $str + */ + protected function edebug($str) + { + if ($this->SMTPDebug <= 0) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) { + call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + /** @noinspection ForgottenDebugOutputInspection */ + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
\n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/m', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Sets message type to HTML or plain. + * + * @param bool $isHtml True for HTML mode + */ + public function isHTML($isHtml = true) + { + if ($isHtml) { + $this->ContentType = static::CONTENT_TYPE_TEXT_HTML; + } else { + $this->ContentType = static::CONTENT_TYPE_PLAINTEXT; + } + } + + /** + * Send messages using SMTP. + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + */ + public function isSendmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + */ + public function isQmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + return $this->addOrEnqueueAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-To" address. + * + * @param string $address The email address to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $pos = strrpos($address, '@'); + if (false === $pos) { + //At-sign is missing. + $error_message = sprintf( + '%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $params = [$kind, $address, $name]; + //Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) { + if ('Reply-To' !== $kind) { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + + return true; + } + } elseif (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + + return true; + } + + return false; + } + + //Immediately add standard addresses without IDN. + return call_user_func_array([$this, 'addAnAddress'], $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { + $error_message = sprintf( + '%s: %s', + $this->lang('Invalid recipient kind'), + $kind + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if (!static::validateAddress($address)) { + $error_message = sprintf( + '%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if ('Reply-To' !== $kind) { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { + $this->{$kind}[] = [$address, $name]; + $this->all_recipients[strtolower($address)] = true; + + return true; + } + } elseif (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = [$address, $name]; + + return true; + } + + return false; + } + + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name
" into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * + * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * @param string $charset The charset to use when decoding the address list string. + * + * @return array + */ + public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591) + { + $addresses = []; + if ($useimap && function_exists('imap_rfc822_parse_adrlist')) { + //Use this built-in parser if it's available + $list = imap_rfc822_parse_adrlist($addrstr, ''); + // Clear any potential IMAP errors to get rid of notices being thrown at end of script. + imap_errors(); + foreach ($list as $address) { + if ( + '.SYNTAX-ERROR.' !== $address->host && + static::validateAddress($address->mailbox . '@' . $address->host) + ) { + //Decode the name part if it's present and encoded + if ( + property_exists($address, 'personal') && + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled + defined('MB_CASE_UPPER') && + preg_match('/^=\?.*\?=$/s', $address->personal) + ) { + $origCharset = mb_internal_encoding(); + mb_internal_encoding($charset); + //Undo any RFC2047-encoded spaces-as-underscores + $address->personal = str_replace('_', '=20', $address->personal); + //Decode the name + $address->personal = mb_decode_mimeheader($address->personal); + mb_internal_encoding($origCharset); + } + + $addresses[] = [ + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), + 'address' => $address->mailbox . '@' . $address->host, + ]; + } + } + } else { + //Use this simpler parser + $list = explode(',', $addrstr); + foreach ($list as $address) { + $address = trim($address); + //Is there a separate name part? + if (strpos($address, '<') === false) { + //No separate name, just use the whole thing + if (static::validateAddress($address)) { + $addresses[] = [ + 'name' => '', + 'address' => $address, + ]; + } + } else { + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); + $name = trim($name); + if (static::validateAddress($email)) { + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled + //If this name is encoded, decode it + if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) { + $origCharset = mb_internal_encoding(); + mb_internal_encoding($charset); + //Undo any RFC2047-encoded spaces-as-underscores + $name = str_replace('_', '=20', $name); + //Decode the name + $name = mb_decode_mimeheader($name); + mb_internal_encoding($origCharset); + } + $addresses[] = [ + //Remove any surrounding quotes and spaces from the name + 'name' => trim($name, '\'" '), + 'address' => $email, + ]; + } + } + } + } + + return $addresses; + } + + /** + * Set the From and FromName properties. + * + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * + * @throws Exception + * + * @return bool + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + //Don't validate now addresses with IDN. Will be done in send(). + $pos = strrpos($address, '@'); + if ( + (false === $pos) + || ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported()) + && !static::validateAddress($address)) + ) { + $error_message = sprintf( + '%s (From): %s', + $this->lang('invalid_address'), + $address + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto && empty($this->Sender)) { + $this->Sender = $address; + } + + return true; + } + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * Validation patterns supported: + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * + * ```php + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * ``` + * + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use + * + * @return bool + */ + public static function validateAddress($address, $patternselect = null) + { + if (null === $patternselect) { + $patternselect = static::$validator; + } + //Don't allow strings as callables, see SECURITY.md and CVE-2021-3603 + if (is_callable($patternselect) && !is_string($patternselect)) { + return call_user_func($patternselect, $address); + } + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false || strpos($address, "\r") !== false) { + return false; + } + switch ($patternselect) { + case 'pcre': //Kept for BC + case 'pcre8': + /* + * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL + * is based. + * In addition to the addresses allowed by filter_var, also permits: + * * dotless domains: `a@b` + * * comments: `1234 @ local(blah) .machine .example` + * * quoted elements: `'"test blah"@example.org'` + * * numeric TLDs: `a@b.123` + * * unbracketed IPv4 literals: `a@192.168.0.1` + * * IPv6 literals: 'first.last@[IPv6:a1::]' + * Not all of these will necessarily work for sending! + * + * @see http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (bool) preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + case 'html5': + /* + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * + * @see https://html.spec.whatwg.org/#e-mail-state-(type=email) + */ + return (bool) preg_match( + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', + $address + ); + case 'php': + default: + return filter_var($address, FILTER_VALIDATE_EMAIL) !== false; + } + } + + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * `intl` and `mbstring` PHP extensions. + * + * @return bool `true` if required functions for IDN support are present + */ + public static function idnSupported() + { + return function_exists('idn_to_ascii') && function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain contains characters not allowed in an IDN). + * + * @see PHPMailer::$CharSet + * + * @param string $address The email address to convert + * + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + //Verify we have required functions, CharSet, and at-sign. + $pos = strrpos($address, '@'); + if ( + !empty($this->CharSet) && + false !== $pos && + static::idnSupported() + ) { + $domain = substr($address, ++$pos); + //Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) && @mb_check_encoding($domain, $this->CharSet)) { + //Convert the domain from whatever charset it's in to UTF-8 + $domain = mb_convert_encoding($domain, self::CHARSET_UTF8, $this->CharSet); + //Ignore IDE complaints about this line - method signature changed in PHP 5.4 + $errorcode = 0; + if (defined('INTL_IDNA_VARIANT_UTS46')) { + //Use the current punycode standard (appeared in PHP 7.2) + $punycode = idn_to_ascii( + $domain, + \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | + \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, + \INTL_IDNA_VARIANT_UTS46 + ); + } elseif (defined('INTL_IDNA_VARIANT_2003')) { + //Fall back to this old, deprecated/removed encoding + $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003); + } else { + //Fall back to a default we don't know about + $punycode = idn_to_ascii($domain, $errorcode); + } + if (false !== $punycode) { + return substr($address, 0, $pos) . $punycode; + } + } + } + + return $address; + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * + * @throws Exception + * + * @return bool false on error - See the ErrorInfo property for details of the error + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + + return $this->postSend(); + } catch (Exception $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Prepare a message for sending. + * + * @throws Exception + * + * @return bool + */ + public function preSend() + { + if ( + 'smtp' === $this->Mailer + || ('mail' === $this->Mailer && (\PHP_VERSION_ID >= 80000 || stripos(PHP_OS, 'WIN') === 0)) + ) { + //SMTP mandates RFC-compliant line endings + //and it's also used with mail() on Windows + static::setLE(self::CRLF); + } else { + //Maintain backward compatibility with legacy Linux command line mailers + static::setLE(PHP_EOL); + } + //Check for buggy PHP versions that add a header with an incorrect line break + if ( + 'mail' === $this->Mailer + && ((\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70017) + || (\PHP_VERSION_ID >= 70100 && \PHP_VERSION_ID < 70103)) + && ini_get('mail.add_x_header') === '1' + && stripos(PHP_OS, 'WIN') === 0 + ) { + trigger_error($this->lang('buggy_php'), E_USER_WARNING); + } + + try { + $this->error_count = 0; //Reset errors + $this->mailHeader = ''; + + //Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array([$this, 'addAnAddress'], $params); + } + if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { + throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL); + } + + //Validate From, Sender, and ConfirmReadingTo addresses + foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!static::validateAddress($this->$address_kind)) { + $error_message = sprintf( + '%s (%s): %s', + $this->lang('invalid_address'), + $address_kind, + $this->$address_kind + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + } + + //Set whether the message is multipart/alternative + if ($this->alternativeExists()) { + $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE; + } + + $this->setMessageType(); + //Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty && empty($this->Body)) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + + //Trim subject consistently + $this->Subject = trim($this->Subject); + //Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) + $this->MIMEHeader = ''; + $this->MIMEBody = $this->createBody(); + //createBody may have added some headers, so retain them + $tempheaders = $this->MIMEHeader; + $this->MIMEHeader = $this->createHeader(); + $this->MIMEHeader .= $tempheaders; + + //To capture the complete message when using mail(), create + //an extra header list which createHeader() doesn't fold in + if ('mail' === $this->Mailer) { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend('To', $this->to); + } else { + $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader($this->Subject)) + ); + } + + //Sign with DKIM if enabled + if ( + !empty($this->DKIM_domain) + && !empty($this->DKIM_selector) + && (!empty($this->DKIM_private_string) + || (!empty($this->DKIM_private) + && static::isPermittedPath($this->DKIM_private) + && file_exists($this->DKIM_private) + ) + ) + ) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = static::stripTrailingWSP($this->MIMEHeader) . static::$LE . + static::normalizeBreaks($header_dkim) . static::$LE; + } + + return true; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Actually send a message via the selected mechanism. + * + * @throws Exception + * + * @return bool + */ + public function postSend() + { + try { + //Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + $sendMethod = $this->Mailer . 'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (Exception $exc) { + if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) { + $this->smtp->reset(); + } + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + + return false; + } + + /** + * Send mail using the $Sendmail program. + * + * @see PHPMailer::$Sendmail + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function sendmailSend($header, $body) + { + if ($this->Mailer === 'qmail') { + $this->edebug('Sending with qmail'); + } else { + $this->edebug('Sending with sendmail'); + } + $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + //A space after `-f` is optional, but there is a long history of its presence + //causing problems, so we don't use one + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html + //Example problem: https://www.drupal.org/node/1057954 + + //PHP 5.6 workaround + $sendmail_from_value = ini_get('sendmail_from'); + if (empty($this->Sender) && !empty($sendmail_from_value)) { + //PHP config has a sender address we can use + $this->Sender = ini_get('sendmail_from'); + } + //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { + if ($this->Mailer === 'qmail') { + $sendmailFmt = '%s -f%s'; + } else { + $sendmailFmt = '%s -oi -f%s -t'; + } + } else { + //allow sendmail to choose a default envelope sender. It may + //seem preferable to force it to use the From header as with + //SMTP, but that introduces new problems (see + //), and + //it has historically worked this way. + $sendmailFmt = '%s -oi -t'; + } + + $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); + $this->edebug('Sendmail path: ' . $this->Sendmail); + $this->edebug('Sendmail command: ' . $sendmail); + $this->edebug('Envelope sender: ' . $this->Sender); + $this->edebug("Headers: {$header}"); + + if ($this->SingleTo) { + foreach ($this->SingleToArray as $toAddr) { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + $this->edebug("To: {$toAddr}"); + fwrite($mail, 'To: ' . $toAddr . "\n"); + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); + $this->doCallback( + ($result === 0), + [[$addrinfo['address'], $addrinfo['name']]], + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + $this->edebug("Result: " . ($result === 0 ? 'true' : 'false')); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result === 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + $this->edebug("Result: " . ($result === 0 ? 'true' : 'false')); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + + return true; + } + + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * + * @param string $string The string to be validated + * + * @return bool + */ + protected static function isShellSafe($string) + { + //It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg, + //but some hosting providers disable it, creating a security problem that we don't want to have to deal with, + //so we don't. + if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) { + return false; + } + + if ( + escapeshellcmd($string) !== $string + || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) + ) { + return false; + } + + $length = strlen($string); + + for ($i = 0; $i < $length; ++$i) { + $c = $string[$i]; + + //All other characters have a special meaning in at least one common shell, including = and +. + //Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + //Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Check whether a file path is of a permitted type. + * Used to reject URLs and phar files from functions that access local file paths, + * such as addAttachment. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function isPermittedPath($path) + { + //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1 + return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path); + } + + /** + * Check whether a file path is safe, accessible, and readable. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function fileIsAccessible($path) + { + if (!static::isPermittedPath($path)) { + return false; + } + $readable = file_exists($path); + //If not a UNC path (expected to start with \\), check read permission, see #2069 + if (strpos($path, '\\\\') !== 0) { + $readable = $readable && is_readable($path); + } + return $readable; + } + + /** + * Send mail using the PHP mail() function. + * + * @see http://www.php.net/manual/en/book.mail.php + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function mailSend($header, $body) + { + $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + + $toArr = []; + foreach ($this->to as $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $to = implode(', ', $toArr); + + $params = null; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + //A space after `-f` is optional, but there is a long history of its presence + //causing problems, so we don't use one + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html + //Example problem: https://www.drupal.org/node/1057954 + //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + + //PHP 5.6 workaround + $sendmail_from_value = ini_get('sendmail_from'); + if (empty($this->Sender) && !empty($sendmail_from_value)) { + //PHP config has a sender address we can use + $this->Sender = ini_get('sendmail_from'); + } + if (!empty($this->Sender) && static::validateAddress($this->Sender)) { + if (self::isShellSafe($this->Sender)) { + $params = sprintf('-f%s', $this->Sender); + } + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $result = false; + if ($this->SingleTo && count($toArr) > 1) { + foreach ($toArr as $toAddr) { + $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); + $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); + $this->doCallback( + $result, + [[$addrinfo['address'], $addrinfo['name']]], + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$result) { + throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); + } + + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation, + * or set one with setSMTPInstance. + * + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP(); + } + + return $this->smtp; + } + + /** + * Provide an instance to use for SMTP operations. + * + * @return SMTP + */ + public function setSMTPInstance(SMTP $smtp) + { + $this->smtp = $smtp; + + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * + * @see PHPMailer::setSMTPInstance() to use a different class. + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function smtpSend($header, $body) + { + $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + $bad_rcpt = []; + if (!$this->smtpConnect($this->SMTPOptions)) { + throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + //Sender already validated in preSend() + if ('' === $this->Sender) { + $smtp_from = $this->From; + } else { + $smtp_from = $this->Sender; + } + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); + } + + $callbacks = []; + //Attempt to send to all recipients + foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { + foreach ($togroup as $to) { + if (!$this->smtp->recipient($to[0], $this->dsn)) { + $error = $this->smtp->getError(); + $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; + $isSent = false; + } else { + $isSent = true; + } + + $callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]]; + } + } + + //Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) { + throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + + $smtp_transaction_id = $this->smtp->getLastTransactionID(); + + if ($this->SMTPKeepAlive) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + + foreach ($callbacks as $cb) { + $this->doCallback( + $cb['issent'], + [[$cb['to'], $cb['name']]], + [], + [], + $this->Subject, + $body, + $this->From, + ['smtp_transaction_id' => $smtp_transaction_id] + ); + } + + //Create error message for any bad addresses + if (count($bad_rcpt) > 0) { + $errstr = ''; + foreach ($bad_rcpt as $bad) { + $errstr .= $bad['to'] . ': ' . $bad['error']; + } + throw new Exception($this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE); + } + + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * + * @param array $options An array of options compatible with stream_context_create() + * + * @throws Exception + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @return bool + */ + public function smtpConnect($options = null) + { + if (null === $this->smtp) { + $this->smtp = $this->getSMTPInstance(); + } + + //If no options are provided, use whatever is set in the instance + if (null === $options) { + $options = $this->SMTPOptions; + } + + //Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = []; + if ( + !preg_match( + '/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/', + trim($hostentry), + $hostinfo + ) + ) { + $this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry)); + //Not a valid host entry + continue; + } + //$hostinfo[1]: optional ssl or tls prefix + //$hostinfo[2]: the hostname + //$hostinfo[3]: optional port number + //The host string prefix can temporarily override the current setting for SMTPSecure + //If it's not specified, the default value is used + + //Check the host name is a valid name or IP address before trying to use it + if (!static::isValidHost($hostinfo[2])) { + $this->edebug($this->lang('invalid_host') . ' ' . $hostinfo[2]); + continue; + } + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = (static::ENCRYPTION_STARTTLS === $this->SMTPSecure); + if ('ssl' === $hostinfo[1] || ('' === $hostinfo[1] && static::ENCRYPTION_SMTPS === $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; //Can't have SSL and TLS at the same time + $secure = static::ENCRYPTION_SMTPS; + } elseif ('tls' === $hostinfo[1]) { + $tls = true; + //TLS doesn't use a prefix + $secure = static::ENCRYPTION_STARTTLS; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA256'); + if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[2]; + $port = $this->Port; + if ( + array_key_exists(3, $hostinfo) && + is_numeric($hostinfo[3]) && + $hostinfo[3] > 0 && + $hostinfo[3] < 65536 + ) { + $port = (int) $hostinfo[3]; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + //* it's not disabled + //* we have openssl extension + //* we are not already using SSL + //* the server offers STARTTLS + if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); + } + //We must resend EHLO after TLS negotiation + $this->smtp->hello($hello); + } + if ( + $this->SMTPAuth && !$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->oauth + ) + ) { + throw new Exception($this->lang('authenticate')); + } + + return true; + } catch (Exception $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + //We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + //If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + //As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions && null !== $lastexception) { + throw $lastexception; + } elseif ($this->exceptions) { + // no exception was thrown, likely $this->smtp->connect() failed + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); + } + + return false; + } + + /** + * Close the active SMTP session if one exists. + */ + public function smtpClose() + { + if ((null !== $this->smtp) && $this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + + /** + * Set the language for error messages. + * The default language is English. + * + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * Optionally, the language code can be enhanced with a 4-character + * script annotation and/or a 2-character country annotation. + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * Do not set this from user input! + * + * @return bool Returns true if the requested language was loaded, false otherwise. + */ + public function setLanguage($langcode = 'en', $lang_path = '') + { + //Backwards compatibility for renamed language codes + $renamed_langcodes = [ + 'br' => 'pt_br', + 'cz' => 'cs', + 'dk' => 'da', + 'no' => 'nb', + 'se' => 'sv', + 'rs' => 'sr', + 'tg' => 'tl', + 'am' => 'hy', + ]; + + if (array_key_exists($langcode, $renamed_langcodes)) { + $langcode = $renamed_langcodes[$langcode]; + } + + //Define full set of translatable strings in English + $PHPMAILER_LANG = [ + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'extension_missing' => 'Extension missing: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address: ', + 'invalid_header' => 'Invalid header name or value', + 'invalid_hostentry' => 'Invalid hostentry: ', + 'invalid_host' => 'Invalid host: ', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_code' => 'SMTP code: ', + 'smtp_code_ex' => 'Additional SMTP info: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_detail' => 'Detail: ', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ', + ]; + if (empty($lang_path)) { + //Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; + } + + //Validate $langcode + $foundlang = true; + $langcode = strtolower($langcode); + if ( + !preg_match('/^(?P[a-z]{2})(?P"; - } else { - echo ""; - } - if(isset($data['code'])) { - if(0 == $data['code']) { - $data['code'] = 1; - } else { - $data['code'] = 0; - } - } - exit; - } - exit(json_encode($data)); -} - -function isLogin() { - global $_SESSION; - - if(isset($_SESSION['account']) && $_SESSION['account']) { - return true; - } - return false; -} - -function logout() { - global $_SESSION; - - if(empty($_SESSION)) return false; - - $_SESSION = []; - session_destroy(); - - return true; -} - -function loginAdmin($token = '') { - global $_CONFIG, $_SESSION; - - if(!$token) return false; - - if(!isset($_SESSION['admin']) || !$_SESSION['admin']) { - setcookie('admin', $token, $_CONFIG['session_time']); - $_SESSION['admin'] = $token; - } - - return true; -} - -function logoutAdmin() { - global $_SESSION; - - if(empty($_SESSION)) return false; - - setcookie('admin', ''); - - $_SESSION = []; - session_destroy(); - - return true; -} - -// 推送日志 -function writeLog($message, $type = 'gm') { - $date = date('Y-m-d'); - - $path = __DIR__.'/log/'.date('Y-m').'/'.date('d').'/'; - mkdirs($path); - - $file = 'log_'.md5($date.BASE_KEY).'.log'; - $message .= ', IP: '.get_ip(); - file_put_contents($path.$file, '['.date('Y-m-d H:i:s').'] '.$message.PHP_EOL, FILE_APPEND); -} - -function isPost() { - return 'POST' == $_SERVER['REQUEST_METHOD']; -} - -function get_http_type() { - return ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://'; -} - -function get_ip() { - if (isset($_SERVER)) { - if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $realip = $_SERVER['HTTP_X_FORWARDED_FOR']; - } else if (isset($_SERVER['HTTP_CLIENT_IP'])) { - $realip = $_SERVER['HTTP_CLIENT_IP']; - } else { - $realip = $_SERVER['REMOTE_ADDR']; - } - } else { - if (getenv('HTTP_X_FORWARDED_FOR')) { - $realip = getenv('HTTP_X_FORWARDED_FOR'); - } else if (getenv('HTTP_CLIENT_IP')) { - $realip = getenv('HTTP_CLIENT_IP'); - } else { - $realip = getenv('REMOTE_ADDR'); - } - } - return $realip; -} - -function isMobile() { - // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 - if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) { - return true; - } - // 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息 - if (isset ($_SERVER['HTTP_VIA'])) { - // 找不到为flase,否则为true - return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false; - } - // 脑残法,判断手机发送的客户端标志,兼容性有待提高 - if (isset ($_SERVER['HTTP_USER_AGENT'])) { - $clientkeywords = ['nokia', 'sony', 'ericsson', 'mot', 'samsung', 'htc', 'sgh', 'lg', 'sharp', 'sie-', 'philips', 'panasonic', 'alcatel', 'lenovo', 'iphone', 'ipod', 'blackberry', 'meizu', 'android', 'netfront', 'symbian', 'ucweb', 'windowsce', 'palm', 'operamini', 'operamobi', 'openwave', 'nexusone', 'cldc', 'midp', 'wap', 'mobile']; - // 从HTTP_USER_AGENT中查找手机浏览器的关键字 - if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) { - return true; - } - } - // 协议法,因为有可能不准确,放到最后判断 - if (isset ($_SERVER['HTTP_ACCEPT'])) { - // 如果只支持wml并且不支持html那一定是移动设备 - // 如果支持wml和html但是wml在html之前则是移动设备 - if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) { - return true; - } - } - return false; -} - -/** - * 获得访客操作系统 - */ -function getOS($str = '') { - $str = $str ? $str : (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''); - if (isset($str)) { - if (preg_match('/win/i', $str)) { - $val = 'Windows'; - } else if (preg_match('/mac/i', $str)) { - $val = 'MAC'; - } else if (preg_match('/linux/i', $str)) { - $val = 'Linux'; - } else if (preg_match('/unix/i', $str)) { - $val = 'Unix'; - } else if (preg_match('/bsd/i', $str)) { - $val = 'BSD'; - } else { - $val = 'Other'; - } - return $val; - } else { - return 'unknow'; - } -} - -/** - * 获得访问者浏览器 - */ -function getBrowse($str = '') { - $str = $str ? $str : $_SERVER['HTTP_USER_AGENT']; - if (isset($str)) { - if (preg_match('/MSIE/i', $str)) { - $val = 'MSIE'; - } else if (preg_match('/Firefox/i', $str)) { - $val = 'Firefox'; - } else if (preg_match('/Chrome/i', $str)) { - $val = 'Chrome'; - } else if (preg_match('/Safari/i', $str)) { - $val = 'Safari'; - } else if (preg_match('/Opera/i', $str)) { - $val = 'Opera'; - } else { - $val = 'Other'; - } - return $val; - } else { - return 'unknow'; - } -} - -/** - * 生成指定位数的随机字符 - * - * @static - * @access public - * @param int $len 长度 - * @param string $format 格式 - * @return string - * @author 317743968 <2019/07/25> - */ -function getRandomString($len = 6, $format = 'ALL') { - switch($format) { - case 'ALL': - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-@#~'; - break; - case 'CHAR': - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';//-@#~ - break; - case 'NUMBER': - $chars = '0123456789'; - break; - default: - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-@#~'; - break; - } - - mt_srand((double) microtime() * 1000000 * getmypid()); - - $string = ''; - while(strlen($string) < $len) { - $string .= substr($chars, (mt_rand() % strlen($chars)), 1); - } - - return $string; -} - -/** - * 个性化时间函数 - * @param string $time 时间戳 - * @return string - */ -function time_tran($time) { - $newtime = time() - $time; - if ($newtime < 60) { - $str = '刚刚'; - }elseif ($newtime < 60 * 60) { - $min = floor($newtime/60); - $str = ''.$min.'分钟前'; - }elseif ($newtime < 60 * 60 * 24) { - $h = floor($newtime/(60*60)); - $str = ''.$h.'小时前'; - }else{ - $newtime = strtotime(date('Y-m-d', time())) - strtotime(date('Y-m-d', $time)); - if ($newtime < 60 * 60 * 24 * 3) { - $d = floor($newtime/(60*60*24)); - $str = ''.($d == 1 ? '昨天' : '前天').''; - }elseif ($newtime < 60 * 60 * 24 * 30) { - $str = ''.floor($newtime / (60*60*24)).'天前'; - }elseif ($newtime < 60 * 60 * 24 * 30 * 12) { - $str = floor($newtime / (60*60*24*30)).'月前'; - }else{ - $str = '一年前'; - } - } - return $str; -} - -//创建文件夹 -function mkdirs($dir, $mode = 0777) { - if (is_dir($dir) || @mkdir($dir, $mode)) { - return true; - } - if (!mkdirs(dirname($dir), $mode)) { - return false; - } - return @mkdir($dir, $mode); -} - -function curl($url, $post_data = null, $method = 'post') { - //初始化 - $curl = curl_init(); - - //设置抓取的url - curl_setopt($curl, CURLOPT_URL, $url); - - //设置头文件的信息作为数据流输出 - //curl_setopt($curl, CURLOPT_HEADER, 1); - - //设置获取的信息以文件流的形式返回,而不是直接输出。 - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - - //防止CURL出错 - curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - //不验证ssl证书 - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); - - if ($method == 'post') { - //设置post方式提交 - curl_setopt($curl, CURLOPT_POST, 1); - //设置post数据 - curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); - } - - //执行命令 - $data = curl_exec($curl); - - if($data === false) die('Curl error: '.curl_error($curl)); - - //关闭URL请求 - curl_close($curl); - - return $data; -} diff --git a/linuxdo.php b/linuxdo.php index 918b511..c6e4c1b 100644 --- a/linuxdo.php +++ b/linuxdo.php @@ -1,187 +1,15 @@ 'tfKevot5lSwB5A5gcqPQMMhaXDLjib0P', - 'client_secret' => '95KWP8sbRIUu5df7gBo5fIztz6ISmvfa' -]; - -// cURL 函数 -function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua = 0, $nobaody = 0, $addheader = 0) -{ - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - $httpheader[] = "Accept: */*"; - $httpheader[] = "Accept-Encoding: gzip,deflate,sdch"; - $httpheader[] = "Accept-Language: zh-CN,zh;q=0.8"; - $httpheader[] = "Connection: close"; - if ($header) { - $httpheader = array_merge($httpheader, $header); - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader); - if ($post) { - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $post); - } - if ($header) { - curl_setopt($ch, CURLOPT_HEADER, false); - } - if ($cookie) { - curl_setopt($ch, CURLOPT_COOKIE, $cookie); - } - if ($referer) { - if ($referer == 1) { - curl_setopt($ch, CURLOPT_REFERER, ''); - } else { - curl_setopt($ch, CURLOPT_REFERER, $referer); - } - } - if ($ua) { - curl_setopt($ch, CURLOPT_USERAGENT, $ua); - } else { - curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"); - } - if ($nobaody) { - curl_setopt($ch, CURLOPT_NOBODY, 1); - } - curl_setopt($ch, CURLOPT_ENCODING, "gzip"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - $ret = curl_exec($ch); - curl_close($ch); - return $ret; -} - -$code = $_GET['code']; - -$key = base64_encode($_LINUXDO_CONNECT['client_id'] . ':' . $_LINUXDO_CONNECT['client_secret']); - -$header = [ - 'Authorization: Basic ' . $key -]; - -$post = http_build_query([ - 'grant_type' => 'authorization_code', - 'code' => $code, - 'redirect_uri' => '' -]); - -$getTokenRes = get_curl('https://connect.linux.do/oauth2/token', $post, 0, 0, $header); - -$getTokenArr = json_decode($getTokenRes, true); - -if (isset($getTokenArr['access_token'])) { - $access_token = $getTokenArr['access_token']; - - $header = [ - 'Authorization: Bearer ' . $access_token - ]; - - $getUserRes = get_curl('https://connect.linux.do/api/user', 0, 0, 0, $header); - - $getUserArr = json_decode($getUserRes, true); -} else { - $err = json_encode($getTokenArr); -} - -?> - - - - - - - - - - - - - - - - - - - - - <?= $_CONFIG['game_name'] ?> <?= $_CONFIG['game_description'] ?> - - - - - - - - - - - - - - - 授权发生异常: - - - - \ No newline at end of file +/** + * ⚠️ 此文件已停用 + * + * LinuxDo OAuth 已迁移至 Node.js 服务。 + * 新接口:GET /api/linuxdo/authorize + * 迁移完成时间:2026-03-16 + * 归档备份位置:_php_archive/linuxdo.php + */ +header('Content-Type: application/json; charset=utf-8'); +http_response_code(410); +echo json_encode([ + 'code' => 410, + 'message' => '此接口已迁移,新接口:GET /api/linuxdo/authorize', +], JSON_UNESCAPED_UNICODE); diff --git a/login.php b/login.php index ad8d0a1..0cd348e 100644 --- a/login.php +++ b/login.php @@ -1,736 +1,10 @@ - - connect_errno) returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); -$mySQLi->set_charset($_CONFIG_DB['db_charset']); - -// 查询 -$status = 1; -$stmt = $mySQLi->prepare('select server_id from server where status >= ? order by server_id asc limit 1000'); -$stmt->bind_param('d', $status); - -$stmt->bind_result($server_id); -$stmt->execute(); -$stmt->store_result(); - -?> - - - - - - - - - - - - - - - - - - - - <?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?> - - - - - - - - - - - - - -
- -
-
- - - \ No newline at end of file + * 登录页已迁移至 Vue 前端(module/web/src/views/login.vue)。 + * 迁移完成时间:2026-03-16 + * 归档备份位置:_php_archive/login.php + */ +header('Location: /'); +exit; diff --git a/nginx.conf.example b/nginx.conf.example index 09323c4..4a08120 100644 --- a/nginx.conf.example +++ b/nginx.conf.example @@ -52,6 +52,11 @@ server { charset utf-8; client_max_body_size 20m; + # ── 0. 屏蔽 PHP 文件直接访问(PHP 已停用,防止残留文件被暴露)── + location ~* \.php$ { + return 404; + } + # ── 1. API 请求 → Node.js ───────────────────────────────────── location /api/ { proxy_pass http://chuanqi_api; diff --git a/server.php b/server.php index 6c40d47..80e8da9 100644 --- a/server.php +++ b/server.php @@ -1,160 +1,15 @@ [999, 997, 990], - 'serverlist' => [], -]; -$defaultSrvId = 1; -$index = 0; -$nowTime = time(); -$newSrvTime = (24 * 60 * 60) * 7; - -// 获取选择的区服ID -$mySQLi = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']); -if($mySQLi->connect_errno) returnJson(['code' => 1, 'msg' => $mySQLi->connect_error]); -$mySQLi->set_charset($_CONFIG_DB['db_charset']); - -$stmt = $mySQLi->prepare('select server_id from player where username=?'); -$stmt->bind_param('s', $account); -$stmt->execute(); - -$result = $stmt->get_result(); -$row = $result->fetch_array(); - -$result->free_result(); -$stmt->close(); - -$serverId = !empty($row) ? intval($row['server_id']) : 0; - -// 查询 -$status = 1; -// $stmt = $mySQLi->prepare('select id, server_id, name, host, port, status, time, merge_id from server where server_id = ? and status >= ? order by server_id asc limit 1000'); -// $stmt->bind_param('id', $serverId, $status); -$stmt = $mySQLi->prepare('select id, server_id, name, host, port, status, time, merge_id from server where status >= ? order by server_id asc limit 1000'); -$stmt->bind_param('d', $status); -$stmt->bind_result($id, $server_id, $name, $host, $port, $status, $time, $merge_id); -$stmt->execute(); -$stmt->store_result(); - -$srvData['serverlist'][$index] = []; -$srvData['serverlist'][$index]['name'] = '1-100区'; - -// 全部显示 -------------------------------------------- - -while($stmt->fetch()) { - $sid = $merge_id ? $merge_id : $server_id; - //echo "$sid, $id, $server_id, $host, $port, $status, $time, $merge_id
"; - $srvData['serverlist'][$index]['serverlist'][] = [ - 'id' => $id, - 'serverName' => (isset($name) && $name ? $name : $_CONFIG['game_first_name']).$server_id.'区', - 'srvaddr' => isset($host) && $host && '127.0.0.1' != $host ? $host : $_CONFIG['game_host'], - 'srvport' => isset($port) && $port ? $port : ($_CONFIG['game_port'] + $sid), - 'srvid' => $sid, - 'type' => 3 != $status ? ($nowTime - $time <= $newSrvTime ? 1 : 2) : $status, // 1:新, 2:火爆, 3:维护 - 'opentime' => date('Y-m-d H:i:s', $time), - 'pf' => $_CONFIG['pf'], - 'serverAlias' => 's'.$sid, - 'originalSrvid' => $sid - ]; - //$index++; -} - -// 自动合并 -------------------------------------------- - -/*$list = []; - -while($stmt->fetch()) { - //$sid = $merge_id ? $merge_id : $server_id; - //echo "$sid, $id, $server_id, $host, $port, $status, $time, $merge_id
"; - - if(!$merge_id) { - $list[$server_id] = $server_id; - } else { - if(!isset($list[$server_id]) || $server_id > $list[$server_id]) { - $list[$merge_id] = $server_id; - } - } - //$index++; -} - -//print_r($list);exit; - -foreach ($list as $sid => $last_id) { - $srvData['serverlist'][$index]['serverlist'][] = [ - 'id' => $sid, - 'serverName' => (isset($name) && $name ? $name : $_CONFIG['game_first_name']).$server_id.'区', - 'srvaddr' => isset($host) && $host && '127.0.0.1' != $host ? $host : $_CONFIG['game_host'], - 'srvport' => isset($port) && $port ? $port : ($_CONFIG['game_port'] + $sid), - 'srvid' => $sid, - 'type' => 3 != $status ? ($nowTime - $time <= $newSrvTime ? 1 : 2) : $status, // 1:新, 2:火爆, 3:维护 - 'opentime' => date('Y-m-d H:i:s', $time), - 'pf' => $_CONFIG['pf'], - 'serverAlias' => 's'.$sid, - 'originalSrvid' => $sid - ]; -}*/ - -// -------------------------------------------- - -//echo "Records:".$stmt->num_rows."
"; - -// 关闭MySQL -$stmt->free_result(); -$stmt->close(); -$mySQLi->close(); - -returnJson($srvData); - -/*$groupMax = 10; -$groupSubMax = 100; - -$nowDate = date('Y-m-d H:i:s'); -$lastSrvId = $groupMax * $groupSubMax; -$_day = $lastSrvId; - -for($gid = 1; $gid <= $groupMax; $gid++) { - $srvData['serverlist'][$gid - 1] = []; - - $gidStart = ($gid < 2 ? $gid : ($gid - 1) * $groupSubMax); - $gidEnd = $gid * $groupSubMax; - - for($cid = 1; $cid <= $groupSubMax; $cid++) { - $srvData['serverlist'][$gid - 1]['name'] = $gidStart.'-'.$gidEnd.'区'; - $srvData['serverlist'][$gid - 1]['serverlist'][] = [ - 'id' => $index, - 'serverName' => $_CONFIG['game_first_name'].$index.'区', - 'srvaddr' => $_CONFIG['game_host'], - 'srvport' => 9000 + $defaultSrvId, - 'srvid' => $defaultSrvId, - 'type' => ($index > ($lastSrvId - 10) ? 1 : 2), // 1:新, 2:火爆, 3:维护 - 'opentime' => ($index == $lastSrvId ? $nowDate : date('Y-m-d H:i:s', strtotime('-'.$_day.' day'))), - 'pf' => $_CONFIG['pf'], - 'serverAlias' => 's'.$defaultSrvId, - 'originalSrvid' => $defaultSrvId - ]; - - $index++; - $_day--; - } -} - -echo json_encode($srvData);*/ +header('Content-Type: application/json; charset=utf-8'); +http_response_code(410); +echo json_encode([ + 'code' => 410, + 'message' => '此接口已迁移,新接口:GET /api/server/list', +], JSON_UNESCAPED_UNICODE);