Skip to content

Commit

Permalink
Fixed some bug, Added encryption method
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Jul 25, 2017
1 parent 998e8b4 commit b1d4804
Show file tree
Hide file tree
Showing 107 changed files with 242 additions and 5,416 deletions.
2 changes: 1 addition & 1 deletion Library/Controller/Admin/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function index()
$data['user'] = User::getCurrent();
$data['cronList'] = CronModel::getCronArray();
Template::setContext($data);
Template::setView('admin/cron');
Template::setView('Xenon/admin/cron');
}

}
2 changes: 1 addition & 1 deletion Library/Controller/Admin/Home.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public function index()
$data['userCount'] = Stats::countUser();
$data['money'] = Stats::countMoney();
Template::setContext($data);
Template::setView('admin/index');
Template::setView('Xenon/admin/index');
}
}
4 changes: 2 additions & 2 deletions Library/Controller/Admin/Invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function inviteList()
$data['planList'] = json_decode(Option::get('custom_plan_name'), true);
array_splice($data['planList'], -1, 1); // 移除 Z(固定流量套餐)
Template::setContext($data);
Template::setView('admin/invite');
Template::setView('Xenon/admin/invite');
}

public function inviteOldList()
Expand All @@ -40,7 +40,7 @@ public function inviteOldList()
$data['planList'] = json_decode(Option::get('custom_plan_name'), true);
array_splice($data['planList'], -1, 1);
Template::setContext($data);
Template::setView('admin/invite');
Template::setView('Xenon/admin/invite');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Admin/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function index()
$data['selectMail'] = Option::get('MAIL_AVAILABLE');
$data['user'] = User::getCurrent();
Template::setContext($data);
Template::setView('admin/mailer');
Template::setView('Xenon/admin/mailer');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Admin/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function index()
$data['user'] = User::getCurrent();
$data['lists'] = MessageModel::getPushMessage(-1);
Template::setContext($data);
Template::setView('admin/message');
Template::setView('Xenon/admin/message');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Admin/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function index()
$data['nodes'] = NodeModel::getNodeArray();

Template::setContext($data);
Template::setView('admin/node');
Template::setView('Xenon/admin/node');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Admin/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function index()
$data['users'] = UserModel::getUserList();
$data['planList'] = json_decode(Option::get('custom_plan_name'), true);
Template::setContext($data);
Template::setView('admin/user');
Template::setView('Xenon/admin/user');
}

/**
Expand Down
7 changes: 5 additions & 2 deletions Library/Controller/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ public function login()
return $result;
} else {
$data['globalMessage'] = MessageModel::getGlobalMessage();
if (empty($_GET['invite']) && User::getCount() <= 0) {
header("Location:/invite");
}
Template::setContext($data);
Template::setView('panel/login');
Template::setView('Xenon/panel/login');
}
}
}
Expand Down Expand Up @@ -451,7 +454,7 @@ public function forgePwd()
return $result;
} else {
Template::putContext('user', User::getCurrent());
Template::setView('panel/forgePwd');
Template::setView('Xenon/panel/forgePwd');
}
}

Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Index
*/
public function index()
{
Template::setView('../Home/index');
Template::setView('Home/index');
}

public function test()
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Invite
public function index()
{
$inviteList = InviteModel::getInviteArray(-1);
Template::setView('panel/home_invite');
Template::setView('Xenon/panel/home_invite');
Template::putContext('inviteList', $inviteList);
}

Expand Down
4 changes: 2 additions & 2 deletions Library/Controller/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function index()
$data['allNode'] = Stats::countNode();

Template::setContext($data);
Template::setView('panel/member');
Template::setView('Xenon/panel/member');

}

Expand Down Expand Up @@ -331,7 +331,7 @@ public function buyTransfer()
public function actCard()
{
Template::putContext('user', User::getUserByUserId(User::getCurrent()->uid));
Template::setView('panel/actCard');
Template::setView('Xenon/panel/actCard');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function Index()
$data['nodeVip'] = MNode::getNodeArray(1);

Template::setContext($data);
Template::setView("panel/node");
Template::setView("Xenon/panel/node");
}

/**
Expand Down
6 changes: 3 additions & 3 deletions Library/Controller/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class Order
public function index()
{
Template::putContext('user', User::getCurrent());
Template::setView('panel/order');
Template::setView('Xenon/panel/order');
}

public function lists()
{
Template::putContext('user', User::getCurrent());
Template::setView('panel/order_lists');
Template::setView('Xenon/panel/order_lists');
}

/**
Expand Down Expand Up @@ -88,7 +88,7 @@ public function create()
Template::putContext('plan_name', $data['custom_plan_name'][$plan]);
Template::putContext('money', $money);
Template::putContext('user', $user);
Template::setView('panel/order_create');
Template::setView('Xenon/panel/order_create');

}

Expand Down
4 changes: 2 additions & 2 deletions Library/Controller/Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function index()
public function ticket()
{
Template::putContext('user', User::getCurrent());
Template::setView('panel/ticket');
Template::setView('Xenon/panel/ticket');
}

public function tos()
{
Template::setView('panel/Tos');
Template::setView('Xenon/panel/Tos');
}

public function help()
Expand Down
2 changes: 1 addition & 1 deletion Library/Controller/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Ticket
public function index()
{
Template::putContext('user', User::getCurrent());
Template::setView('panel/ticket');
Template::setView('Xenon/panel/ticket');
}
}
12 changes: 6 additions & 6 deletions Library/Controller/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function info()
Template::putContext('enable_status', $user->enable == 1 ? '启用' : '停用');
Template::putContext('is_verification', $flag);
Template::putContext('user', $user);
Template::setView("panel/info");
Template::setView("Xenon/panel/info");
}

/**
Expand All @@ -48,7 +48,7 @@ public function invite()
$data['inviteList'] = Invite::getInvitesByUid($data['user']->uid, "0");

Template::setContext($data);
Template::setView("panel/invite");
Template::setView("Xenon/panel/invite");
}

/**
Expand All @@ -58,7 +58,7 @@ public function invite()
public function renew()
{
Template::putContext('user', MUser::getUserByUserId(MUser::getCurrent()->uid));
Template::setView("panel/renew");
Template::setView("Xenon/panel/renew");
}

/**
Expand Down Expand Up @@ -95,7 +95,7 @@ public function password()
return $result;
} else {
Template::putContext('user', $user);
Template::setView("panel/change_password");
Template::setView("Xenon/panel/change_password");
}
}

Expand All @@ -116,7 +116,7 @@ public function nickname()
return array('error' => 0, 'message' => '修改昵称成功,刷新页面或重新登录生效。');
} else {
Template::putContext('user', $user);
Template::setView("panel/change_nickname");
Template::setView("Xenon/panel/change_nickname");
}
}

Expand All @@ -142,7 +142,7 @@ public function method()
$nodeList = Node::getSupportCustomMethodArray();
Template::putContext('user', $user);
Template::putContext('nodeList', $nodeList);
Template::setView("panel/change_method");
Template::setView("Xenon/panel/change_method");
}
}

Expand Down
4 changes: 2 additions & 2 deletions Library/Core/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public static function load($templateName, $context = array())
if ($context) {
self::setContext($context);
}
if (stripos($templateName, "Misc") === false && stripos($templateName, THEME) === false) {
$templateName = THEME . '/' . $templateName;
if (stripos($templateName, "Misc") === false) {
$templateName = '/' . $templateName;
}

$templateFileOrigin = self::getPath($templateName);
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Cron/ClearLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
namespace Helper\Cron;

use Contactable\ICron;
use Interfaces\ICron;
use Core\Database;

/**
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Cron/ClearTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Helper\Cron;

use Contactable\ICron;
use Interfaces\ICron;

use Core\Database as DB;

Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Cron/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace Helper\Cron;


use Contactable\ICron;
use Interfaces\ICron;
use Helper\Logger;
use Helper\Mailer;
use Helper\Option;
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Cron/StopExpireUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Helper\Cron;

use Contactable\ICron;
use Interfaces\ICron;

use Helper\Logger;
use Helper\Mailer;
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Mailer/AliyunDirectMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Helper\Mailer;

use Contactable\IMailer;
use Interfaces\IMailer;
use Helper\Option;
use Helper\Utils;
use Model\Mail;
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Mailer/CoreSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Helper\Mailer;

use Contactable\IMailer;
use Interfaces\IMailer;
use Helper\Option;
use Helper\Utils;
use Model\Mail;
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Mailer/MailGun.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Helper\Mailer;


use Contactable\IMailer;
use Interfaces\IMailer;
use Helper\Option;
use Helper\Utils;
use Model\Mail;
Expand Down
2 changes: 1 addition & 1 deletion Library/Helper/Mailer/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace Helper\Mailer;


use Contactable\IMailer;
use Interfaces\IMailer;
use Core\Error;
use Helper\Option;
use Helper\Utils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Add: 2016/3/27 9:39
* Author: Sendya <[email protected]>
*/
namespace Contactable;
namespace Interfaces;


interface ICron
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: Sendya <[email protected]>
* Time: 2016/3/26 16:18
*/
namespace Contactable;
namespace Interfaces;

use Model\Mail;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: Sendya <[email protected]>
*/

namespace Contactable;
namespace Interfaces;

/**
* Interface IPay
Expand Down
Loading

0 comments on commit b1d4804

Please sign in to comment.