Initial project files: BESCMS full source

This commit is contained in:
bes
2026-08-13 23:37:46 +08:00
parent fa6cddb540
commit 2e26f85723
2166 changed files with 396625 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php namespace Phpcmf\Controllers\Member;
/**
* https://www.besyun.com
* BESCMS
* 本文件是框架系统文件,二次开发时不可以修改本文件
**/
class Pay extends \Phpcmf\Common
{
/**
* 提交支付账单
*/
public function index() {
if (IS_POST) {
$pay = \Phpcmf\Service::L('input')->post('pay');
$pay['uid'] = (int)$this->member['uid'];
$pay['username'] = (string)$this->member['username'];
$money = floatval($pay['money']);
if (!$money) {
$this->_msg(0, dr_lang('金额(%s)不正确', $money));
exit;
}
$rt = \Phpcmf\Service::M('Pay')->post($pay);
if (!$rt['code']) {
$this->_msg(0, $rt['msg'], $rt['data']);
}
$url = PAY_URL.'index.php?s=pay&id='.$rt['code'];
if (IS_API_HTTP || (\Phpcmf\Service::L('input')->get('is_ajax') || IS_API_HTTP || IS_AJAX)) {
// 回调页面
$this->_json($rt['code'], $url, $rt['data']);
} else {
// 跳转到支付页面,必须跳转到统一的主域名中付款
dr_redirect($url, 'auto');
}
exit;
} else {
$this->_msg(0, dr_lang('POST请求错误'));
}
}
}