修复bug

前端端口偏移
NimaQu 9 years ago
parent d19677f9c6
commit 7379dfc606

5
.gitignore vendored

@ -2,7 +2,4 @@
.DS_Store
/vendor
/config/.config.php
.idea/modules.xml
.idea/UIChanges.iml
.idea/vcs.xml
.idea/workspace.xml
/.idea

@ -54,7 +54,7 @@ Image:
-------------------
![](https://github.com/galaxychuck/images/blob/master/5.jpg)
> f2f支付宝支付([需要代开当面付点我](https://t.me/shouyeren))
> f2f支付宝支付([需要代开当面付点我](https://t.me/galaxyq))
-------------------
![](https://github.com/galaxychuck/images/blob/master/6.jpg)

@ -21,20 +21,20 @@ class TelegramProcess
break;
case 'qd':
if (!$user->isAbleToCheckin()) {
$bot->sendMessage($message->getChat()->getId(), "仟佰星云:您已经签到过了哦", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
$bot->sendMessage($message->getChat()->getId(), " Config::get('appName') :您已经签到过了哦", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
break;
}
$traffic = rand(Config::get('checkinMin'), Config::get('checkinMax'));
$user->transfer_enable = $user->transfer_enable + Tools::toMB($traffic);
$user->last_check_in_time = time();
$user->save();
$bot->sendMessage($message->getChat()->getId(), "走出屏障直达星云之上,只为了与你相遇!你获得了 ".$traffic." MB 流量!", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
$bot->sendMessage($message->getChat()->getId(), "nico~nico~ni !你获得了 ".$traffic." MB 流量!", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
break;
default:
$bot->sendMessage($message->getChat()->getId(), "???", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
}
} else {
$bot->sendMessage($message->getChat()->getId(), "您未绑定仟佰星云账号。请/help查看绑定步骤", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
$bot->sendMessage($message->getChat()->getId(), "您未绑定 Config::get('appName') 账号。请/help查看绑定步骤", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
}
}
@ -50,24 +50,23 @@ class TelegramProcess
switch ($command) {
case 'ping':
$bot->sendMessage($message->getChat()->getId(), 'Pong!仟佰星云的 群组ID 是 '.$message->getChat()->getId().',这个一般人没啥用!');
$bot->sendMessage($message->getChat()->getId(), 'Pong! Config::get('appName') 的 群组ID 是 '.$message->getChat()->getId().',这个一般人没啥用!');
break;
case 'tb':
$bot->sendMessage($message->getChat()->getId(),"大爷,不支持淘宝了,请直接网站充值!");
// $bot->sendMessage($message->getChat()->getId(), Tuling::chat($message->getFrom()->getId(), substr($message->getText(), 5)));
case 'chat':
$bot->sendMessage($message->getChat()->getId(), Tuling::chat($message->getFrom()->getId(), substr($message->getText(), 5)));
break;
case 'cq':
case 'traffic':
TelegramProcess::needbind_method($bot, $message, $command, $user);
break;
case 'qd':
case 'checkin':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'help':
$help_list = "命令列表:
/ping 获取群组ID
/tb 淘宝购买
/cq 查询流量
/qd 签到获取流量
/chat 唠嗑
/traffic 查询流量
/checkin 签到获取流量
/help 获取帮助信息
绑定提示:您可以在网站里点击->资料编辑->滑到页面最下方->Telegram绑定->把二维码拍下来单独发送给TG机器人->绑定成功,机器人扫码登陆,数字登陆、签到等更多精彩功能等着您去发掘。
@ -174,26 +173,25 @@ class TelegramProcess
case 'ping':
$bot->sendMessage($message->getChat()->getId(), 'Pong!这个群组的 ID 是 '.$message->getChat()->getId().'!', $parseMode = null, $disablePreview = false, $replyToMessageId = $message->getMessageId());
break;
case 'tb':
$bot->sendMessage($message->getChat()->getId(),"大爷,不支持淘宝了,请直接捐献!");
// if ($message->getChat()->getId() == Config::get('telegram_chatid')) {
// $bot->sendMessage($message->getChat()->getId(), Tuling::chat($message->getFrom()->getId(), substr($message->getText(), 5)), $parseMode = null, $disablePreview = false, $replyToMessageId = $message->getMessageId());
// } else {
// $bot->sendMessage($message->getChat()->getId(), '不约,叔叔我们不约。', $parseMode = null, $disablePreview = false, $replyToMessageId = $message->getMessageId());
// }
case 'chat':
if ($message->getChat()->getId() == Config::get('telegram_chatid')) {
$bot->sendMessage($message->getChat()->getId(), Tuling::chat($message->getFrom()->getId(), substr($message->getText(), 5)), $parseMode = null, $disablePreview = false, $replyToMessageId = $message->getMessageId());
} else {
$bot->sendMessage($message->getChat()->getId(), '不约,叔叔我们不约。', $parseMode = null, $disablePreview = false, $replyToMessageId = $message->getMessageId());
}
break;
case 'cq':
case 'traffic':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'qd':
case 'checkin':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'help':
$help_list_group = "命令列表:
/ping 获取群组ID
/tb 淘宝购买
/cq 查询流量
/qd 签到获取流量
/chat 唠嗑
/traffic 查询流量
/checkin 签到获取流量
/help 获取帮助信息
绑定提示:您可以在网站里点击->资料编辑->滑到页面最下方->Telegram绑定->把二维码拍下来单独发送给TG机器人->绑定成功,机器人扫码登陆,数字登陆、签到等更多精彩功能等着您去发掘。

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 198 KiB

@ -104,7 +104,7 @@
<p><img src="/images/c_ios_1.jpg" height="600" width="600" /></p>
<p>2:打开App Store 切换账号,并下载App</p>
<p><img src="/images/c_ios_2.jpg" height="2000" width="600" /></p>
<p>3:打开Safari,登录到仟佰星云的用户中心导入节点</p>
<p>3:打开Safari,登录到 {$config["appName"]} 的用户中心导入节点</p>
<p><img src="/images/c_ios_3.jpg" height="2000" width="600" /></p>
<p>附加:iOS快速连接</p>
<p><img src="/images/c_ios_4.jpg" height="2000" width="600" /></p>

@ -272,7 +272,7 @@
<!-- <div class="card margin-bottom-no">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
@ -315,7 +315,7 @@
</div>
</div>
</div>
</div> -->
</div>
<div class="card margin-bottom-no">
<div class="card-main">
@ -334,7 +334,7 @@
</div>
</div>
<!-- <div class="card margin-bottom-no">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
@ -355,7 +355,7 @@
</div>
</div>
</div>
</div> -->
</div>
{if $config['enable_telegram'] == 'true'}
<div class="card margin-bottom-no">

@ -1,796 +0,0 @@
{include file='user/main.tpl'}
<main class="content">
<div class="content-header ui-content-header">
<div class="container">
<h1 class="content-heading">修改资料</h1>
</div>
</div>
<div class="container">
<section class="content-inner margin-top-no">
<div class="col-lg-6 col-md-6">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">修改密码</p>
<div class="form-group form-group-label">
<label class="floating-label" for="oldpwd">当前密码</label>
<input class="form-control" id="oldpwd" type="password">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="pwd">新密码</label>
<input class="form-control" id="pwd" type="password">
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="repwd">确认新密码</label>
<input class="form-control" id="repwd" type="password">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="pwd-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">连接密码修改</p>
<p>当前连接密码:{$user->passwd}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="sspwd">连接密码</label>
<input class="form-control" id="sspwd" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="ss-pwd-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">加密方式修改</p>
<p>注意:SS 和 SSR 支持的加密方式有所不同,请根据实际情况来进行选择!</p>
<p>当前加密方式:{$user->method}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="method">加密方式</label>
<select id="method" class="form-control">
{$method_list = $config_service->getSupportParam('method')}
{foreach $method_list as $method}
<option value="{$method}" {if $user->method == $method}selected="selected"{/if}>[{if URL::CanMethodConnect($method) == 2}SS{else}SS/SSR{/if} 可连接] {$method}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button disabled="disabled" class="btn btn-flat waves-attach" id="method-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">联络方式修改</p>
<p>当前联络方式:
{if $user->im_type==1}
微信
{/if}
{if $user->im_type==2}
QQ
{/if}
{if $user->im_type==3}
Google+
{/if}
{if $user->im_type==4}
Telegram
{/if}
{$user->im_value}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="imtype">选择您的联络方式</label>
<select class="form-control" id="imtype">
<option></option>
<option value="1">微信</option>
<option value="2">QQ</option>
<option value="3">Google+</option>
<option value="4">Telegram</option>
</select>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="wechat">在这输入联络方式账号</label>
<input class="form-control" id="wechat" type="text">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="wechat-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">协议&混淆设置</p>
<p>当前协议:{$user->protocol}</p>
<p>注意1:如果需要兼容原版SS请选择带_compatible的兼容选项!</p>
<p>注意2:如果您使用原版 SS 客户端此处请直接设置为 origin!</p>
<div class="form-group form-group-label">
<label class="floating-label" for="protocol">协议</label>
<select id="protocol" class="form-control">
{$protocol_list = $config_service->getSupportParam('protocol')}
{foreach $protocol_list as $protocol}
<option value="{$protocol}" {if $user->protocol == $protocol}selected="selected"{/if}>[{if URL::CanProtocolConnect($protocol) == 3}SS/SSR{else}SSR{/if} 可连接] {$protocol}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-inner">
<p>当前混淆方式:{$user->obfs}</p>
<p>注意1:如果需要兼容原版SS请选择带_compatible的兼容选项!</p>
<p>注意2:SS 和 SSR 支持的混淆类型有所不同,simple_obfs_* 为原版 SS 的混淆方式,其他为 SSR 的混淆方式!</p>
<div class="form-group form-group-label">
<label class="floating-label" for="obfs">混淆方式</label>
<select id="obfs" class="form-control">
{$obfs_list = $config_service->getSupportParam('obfs')}
{foreach $obfs_list as $obfs}
<option value="{$obfs}" {if $user->obfs == $obfs}selected="selected"{/if}>[{if URL::CanObfsConnect($obfs) >= 3}SS/SSR{else}{if URL::CanObfsConnect($obfs) == 1}SSR{else}SS{/if}{/if} 可连接] {$obfs}</option>
{/foreach}
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button disabled="disabled" class="btn btn-flat waves-attach" id="ssr-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">主题修改</p>
<p>当前主题:{$user->theme}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="theme">主题</label>
<select id="theme" class="form-control">
{foreach $themes as $theme}
<option value="{$theme}">{$theme}</option>
{/foreach}
</select>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="theme-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">IP解封</p>
<p>当前状态:{$Block}</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="unblock" ><span class="icon">check</span>&nbsp;解封</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">每日邮件接收设置</p>
<p>当前设置:{if $user->sendDailyMail==1} 发送 {else} 不发送 {/if}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="mail">发送设置</label>
<select id="mail" class="form-control">
<option value="1">发送</option>
<option value="0">不发送</option>
</select>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="mail-update" ><span class="icon">check</span>&nbsp;提交</button>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">两步验证</p>
<p>请下载 Google 的两步验证器,扫描下面的二维码。</p>
<p><i class="icon icon-lg" aria-hidden="true">android</i><a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">&nbsp;Android</a></p>
<p><i class="icon icon-lg" aria-hidden="true">tablet_mac</i><a href="https://itunes.apple.com/cn/app/google-authenticator/id388497605?mt=8">&nbsp;iOS</a></p>
<p>在没有测试完成绑定成功之前请不要启用。</p>
<p>当前设置:{if $user->ga_enable==1} 登录时要求验证 {else} 不要求 {/if}</p>
<p>当前服务器时间:{date("Y-m-d H:i:s")}</p>
<div class="form-group form-group-label">
<label class="floating-label" for="ga-enable">验证设置</label>
<select id="ga-enable" class="form-control">
<option value="0">不要求</option>
<option value="1">要求验证</option>
</select>
</div>
<div class="form-group form-group-label">
<div class="text-center">
<div id="ga-qr"></div>
密钥:{$user->ga_token}
</div>
</div>
<div class="form-group form-group-label">
<label class="floating-label" for="code">测试一下</label>
<input type="text" id="code" placeholder="输入验证器生成的数字来测试" class="form-control">
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-brand-accent btn-flat waves-attach" href="/user/gareset" ><span class="icon">format_color_reset</span>&nbsp;重置</a>
<button class="btn btn-flat waves-attach" id="ga-test" ><span class="icon">extension</span>&nbsp;测试</button>
<button class="btn btn-brand btn-flat waves-attach" id="ga-set" ><span class="icon">perm_data_setting</span>&nbsp;设置</button>
</div>
</div>
</div>
</div>
</div> -->
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">重置端口</p>
<p>当前端口:{$user->port}</p>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="portreset" ><span class="icon">check</span>&nbsp;重置端口</button>
</div>
</div>
</div>
</div>
</div>
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">自定义ACL/PAC/Surge</p>
<p>您可以在此处追加 Gfwlist 规则。</p>
<p>格式参看<a href="https://adblockplus.org/zh_CN/filters">https://adblockplus.org/zh_CN/filters</a></p>
<p>IP 段请使用 |127.0.0.0/8 类似格式表示</p>
<div class="form-group form-group-label">
<label class="floating-label" for="pac">规则书写区</label>
<textarea class="form-control" id="pac" rows="8">{$user->pac}</textarea>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<button class="btn btn-flat waves-attach" id="setpac" ><span class="icon">check</span>&nbsp;设置</button>
</div>
</div>
</div>
</div>
</div>
{if $config['enable_telegram'] == 'true'}
<div class="card margin-bottom-no">
<div class="card-main">
<div class="card-inner">
<div class="card-inner">
<p class="card-heading">Telegram 绑定</p>
<p>Telegram 添加机器人账号 <a href="https://t.me/{$telegram_bot}">@{$telegram_bot}</a>,拍下下面这张二维码发给它。</p>
<div class="form-group form-group-label">
<div class="text-center">
<div id="telegram-qr"></div>
{if $user->telegram_id != 0}当前绑定:<a href="https://t.me/{$user->im_value}">@{$user->im_value}</a>{/if}
</div>
</div>
</div>
<div class="card-action">
<div class="card-action-btn pull-left">
<a class="btn btn-brand-accent btn-flat waves-attach" href="/user/telegram_reset" ><span class="icon">format_color_reset</span>&nbsp;解绑</a>
</div>
</div>
</div>
</div>
</div>
{/if}
</div>
{include file='dialog.tpl'}
</section>
</div>
</main>
{include file='user/footer.tpl'}
<script>
$(document).ready(function () {
$("#portreset").click(function () {
$.ajax({
type: "POST",
url: "resetport",
dataType: "json",
data: {
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#setpac").click(function () {
$.ajax({
type: "POST",
url: "pacset",
dataType: "json",
data: {
pac: $("#pac").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#pwd-update").click(function () {
$.ajax({
type: "POST",
url: "password",
dataType: "json",
data: {
oldpwd: $("#oldpwd").val(),
pwd: $("#pwd").val(),
repwd: $("#repwd").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script src=" /assets/public/js/jquery.qrcode.min.js "></script>
<script>
var ga_qrcode = '{$user->getGAurl()}';
jQuery('#ga-qr').qrcode({
"text": ga_qrcode
});
{if $config['enable_telegram'] == 'true'}
var telegram_qrcode = 'mod://bind/{$bind_token}';
jQuery('#telegram-qr').qrcode({
"text": telegram_qrcode
});
{/if}
</script>
<script>
$(document).ready(function () {
$("#wechat-update").click(function () {
$.ajax({
type: "POST",
url: "wechat",
dataType: "json",
data: {
wechat: $("#wechat").val(),
imtype: $("#imtype").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ssr-update").click(function () {
$.ajax({
type: "POST",
url: "ssr",
dataType: "json",
data: {
protocol: $("#protocol").val(),
obfs: $("#obfs").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#relay-update").click(function () {
$.ajax({
type: "POST",
url: "relay",
dataType: "json",
data: {
relay_enable: $("#relay_enable").val(),
relay_info: $("#relay_info").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#unblock").click(function () {
$.ajax({
type: "POST",
url: "unblock",
dataType: "json",
data: {
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ga-test").click(function () {
$.ajax({
type: "POST",
url: "gacheck",
dataType: "json",
data: {
code: $("#code").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ga-set").click(function () {
$.ajax({
type: "POST",
url: "gaset",
dataType: "json",
data: {
enable: $("#ga-enable").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#ss-pwd-update").click(function () {
$.ajax({
type: "POST",
url: "sspwd",
dataType: "json",
data: {
sspwd: $("#sspwd").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html("成功了");
} else {
$("#result").modal();
$("#msg").html("失败了");
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#mail-update").click(function () {
$.ajax({
type: "POST",
url: "mail",
dataType: "json",
data: {
mail: $("#mail").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#theme-update").click(function () {
$.ajax({
type: "POST",
url: "theme",
dataType: "json",
data: {
theme: $("#theme").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html(data.msg);
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>
<script>
$(document).ready(function () {
$("#method-update").click(function () {
$.ajax({
type: "POST",
url: "method",
dataType: "json",
data: {
method: $("#method").val()
},
success: function (data) {
if (data.ret) {
$("#result").modal();
$("#msg").html("成功了");
} else {
$("#result").modal();
$("#msg").html(data.msg);
}
},
error: function (jqXHR) {
$("#result").modal();
$("#msg").html(data.msg+" 出现了一些错误。");
}
})
})
})
</script>

@ -1,6 +1,6 @@
<footer class="ui-footer">
<div class="container">
<marquee>&copy; {$config["appName"]} <a href="/staff">STAFF</a> Google提供雲計算服務,伺服器位於台灣,遵守台灣法律法規<marquee> {if $config["enable_analytics_code"] == 'true'}{include file='analytics.tpl'}{/if}
<marquee>&copy; {$config["appName"]} <a href="/staff">STAFF</a> 示例文字,请在/resources/views/material/user/footer.tpl中修改,请不要删除staff <marquee> {if $config["enable_analytics_code"] == 'true'}{include file='analytics.tpl'}{/if}
</div>
</footer>

@ -1,59 +0,0 @@
<?php
//remove the utf-8 boms
//by magicbug at gmail dot com
if (isset($_GET['dir'])){ //config the basedir
$basedir=$_GET['dir'];
}else{
$basedir = '.';
}
$auto = 1;
checkdir($basedir);
function checkdir($basedir){
if ($dh = opendir($basedir)) {
while (($file = readdir($dh)) !== false) {
if ($file != '.' && $file != '..'){
if (!is_dir($basedir."/".$file)) {
echo "filename: $basedir/
$file ".checkBOM("$basedir/$file")." <br>";
}else{
$dirname = $basedir."/".
$file;
checkdir($dirname);
}
}
}
closedir($dh);
}
}
function checkBOM ($filename) {
global $auto;
$contents = file_get_contents($filename);
$charset[1] = substr($contents, 0, 1);
$charset[2] = substr($contents, 1, 1);
$charset[3] = substr($contents, 2, 1);
if (ord($charset[1]) == 239 && ord($charset[2]) == 187 &&
ord($charset[3]) == 191) {
if ($auto == 1) {
$rest = substr($contents, 3);
rewrite ($filename, $rest);
return ("BOM found,
automatically removed.");
} else {
return ("BOM found.");
}
}
else return ("BOM Not Found.");
}
function rewrite ($filename, $data) {
$filenum = fopen($filename, "w");
flock($filenum, LOCK_EX);
fwrite($filenum, $data);
fclose($filenum);
}
?>
Loading…
Cancel
Save