-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update & Fix Option,Node,Message,Mail,Cron
- Loading branch information
Showing
396 changed files
with
1,700 additions
and
155,111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,6 @@ Data/**/* | |
|
||
|
||
# Front-end Resources (compiled) | ||
Public/**/* | ||
!Public/**/*.php | ||
#Public/**/* | ||
#!Public/**/*.php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,17 @@ | |
*/ | ||
define('THEME', 'Default'); | ||
|
||
/** | ||
* Mailer config | ||
*/ | ||
$MAIL = array( | ||
'host' => 'smtp.exmail.qq.com', | ||
'username' => '[email protected]', | ||
'password' => 'password', | ||
'from' => '某科学的h本 <[email protected]>', | ||
'secure' => '' | ||
); | ||
|
||
/** | ||
* Rewrite setting: | ||
* remove "index.php" from url, needs to config apache/nginx manually | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* shadowsocks-panel | ||
* Add: 2016/3/27 9:39 | ||
* Author: Sendya <[email protected]> | ||
*/ | ||
namespace Contactable; | ||
|
||
|
||
interface ICron { | ||
|
||
/** Cron 的运行方法 */ | ||
public function run(); | ||
|
||
/** 返回下次执行时间 */ | ||
public function getStep(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/** | ||
* Project: shadowsocks-panel | ||
* Author: Sendya <[email protected]> | ||
* Time: 2016/3/26 16:18 | ||
*/ | ||
namespace Contactable; | ||
|
||
use Model\Mail as MailModel; | ||
|
||
/** | ||
* 邮件发送接口 | ||
* 怎么发送,使用什么方法自行继承并实现相应功能 | ||
* | ||
* Interface Mailer | ||
*/ | ||
interface Mailer { | ||
|
||
/** 是否可以 */ | ||
public function isAvailable(); | ||
|
||
/** 发送方法 */ | ||
public function send(MailModel $mail); | ||
|
||
/** 邮件发送测试 */ | ||
public function test(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* shadowsocks-panel | ||
* Add: 2016/4/6 10:40 | ||
* Author: Sendya <[email protected]> | ||
*/ | ||
|
||
namespace Contactable; | ||
|
||
/** | ||
* Interface IPay | ||
* 支付接口 | ||
* | ||
* @package Contactable | ||
*/ | ||
interface IPay { | ||
|
||
public function pay(); | ||
|
||
public function status(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/** | ||
* shadowsocks-panel | ||
* Add: 2016/4/11 9:53 | ||
* Author: Sendya <[email protected]> | ||
*/ | ||
|
||
namespace Controller\Admin; | ||
|
||
use Core\Template; | ||
use Helper\Option; | ||
use Model\User; | ||
|
||
/** | ||
* Class Setting | ||
* @Admin | ||
* @Authorization | ||
* @package Controller\Admin | ||
*/ | ||
class Setting { | ||
|
||
public function index() { | ||
$data['user'] = User::getCurrent(); | ||
$data['options'] = Option::getOptions(); | ||
|
||
Template::setContext($data); | ||
Template::setView("admin/setting"); | ||
} | ||
|
||
/** | ||
* 读取option详细配置 | ||
* | ||
* @JSON | ||
*/ | ||
public function query() { | ||
$result['error'] = 0; | ||
$result['message'] = 'success'; | ||
|
||
$result['modal'] = Option::get(trim($_GET['option'])); | ||
$result['isArray'] = false; | ||
return $result; | ||
} | ||
|
||
/** | ||
* 修改 | ||
* @JSON | ||
*/ | ||
public function update() { | ||
|
||
$result['error'] = 0; | ||
$result['message'] = '保存完成'; | ||
if($_POST['option_v'] != null && $_POST['option_k'] != null) { | ||
Option::set(trim($_POST['option_k']), trim($_POST['option_v'])); | ||
// 初始化一次系统设置 | ||
Option::init(); | ||
} | ||
return $result; | ||
} | ||
} |
Oops, something went wrong.