Skip to content

Commit acbb413

Browse files
committed
update
1 parent c708400 commit acbb413

File tree

18 files changed

+84
-69
lines changed

18 files changed

+84
-69
lines changed

application/Bootstrap.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
2-
class Bootstrap extends \Yaf\Bootstrap_Abstract{
3-
public function _initCore(){
2+
class Bootstrap extends \Yaf\Bootstrap_Abstract
3+
{
4+
public function _initCore()
5+
{
46
ini_set('yaf.library', LIB_PATH);
57
\Yaf\Loader::import(CORE_PATH.'/Helper.php');
68
\Yaf\Loader::import(CORE_PATH.'/Basic.php');
@@ -19,7 +21,8 @@ public function _initLoader()
1921
}
2022
public function _initRoute() {}
2123

22-
public function _initPlugin(\Yaf\Dispatcher $dispatcher) {
24+
public function _initPlugin(\Yaf\Dispatcher $dispatcher)
25+
{
2326
$router = new RouterPlugin();
2427
$dispatcher->registerPlugin($router);
2528
}

application/function/F_Basic.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* File: F_Basic.php
44
* Functionality: Global basic functions
5-
* Author: Nic XIE & IT Technology Department
6-
* Date: 2011-11-20
5+
* Author: 资料空白
6+
* Date: 2016-11-11再整理
77
*/
88

99
function createGateWayPOST($url,$postData){

application/function/F_File.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
/**
33
* File: F_File.php
44
* Functionality: Extra file functions
5-
* Author: Nic XIE
6-
* Date: 2012-03-01
5+
* Author: 资料空白
6+
* Date: 2016-11-11再整理
77
*/
8-
98
/*
109
* ============== Delete a dir recursively ==============
1110
*

application/function/F_Img.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
2-
/*
3-
* File: F_Img.php
4-
* Functionality: Extra img functions
5-
* Author: Nic XIE
6-
* Date: 2013-01-11
2+
/**
3+
* File: F_Img.php
4+
* Author: 资料空白
5+
* Date: 2016-11-11再整理
76
*/
7+
88

99
/*
1010
* Create thumb

application/function/F_Network.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?php
22
/**
33
* File: F_Network.php
4-
* Functionality: Extra network functions
5-
* Author: Nic XIE
6-
* Date: 2012-03-01
4+
* Author: 资料空白
5+
* Date: 2016-11-11再整理
76
*/
8-
97
/**
108
* Get client IP Address
119
*/

application/function/F_PY.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
/**
33
* File: F_PY.php
44
* Functionality: 根据汉字得到对应的拼音或单词的第一个小写字母
5-
* Author: unknown
6-
* Date: unknown
7-
* Remark: Thanks to the unknown author !
5+
* Author: 资料空白
6+
* Date: 2016-11-11再整理
87
*/
8+
99
if ( ! function_exists('Pinyin')){
1010
//echo Pinyin('华南碧桂园', 1); // hnbgy
1111
function Pinyin($_String, $first = 0, $_Code='gb2312'){

application/function/F_String.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
2-
// Generate specific lenght random chars or numbers, or both
2+
/**
3+
* File: F_String.php
4+
* Functionality: 字符串处理
5+
* Author: 资料空白
6+
* Date: 2016-11-11再整理
7+
*/
38
if ( ! function_exists('getRandom')){
49
function getRandom($length = 4, $type = 1) {
510
switch ($type) {

application/function/F_Validate.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<?php
22
/**
3-
验证函数集合
4-
*/
3+
* File: F_Validate.php
4+
* Functionality: 验证函数集合
5+
* Author: 资料空白
6+
* Date: 2016-11-11再整理
7+
*/
8+
59

610
//检查是否为邮箱格式
711
if (!function_exists('isEmail')){

application/library/Core/Basic.php

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* File: C_Basic.php
4-
* Functionality: Basic Controller
3+
* File: Basic.php
4+
* Functionality: Basic Controller(再整理)
55
* Author: 资料空白
6-
* Date: 2016-3-8
6+
* Date: 2018-6-8
77
*/
88

99
class BasicController extends Yaf\Controller_Abstract {
@@ -91,25 +91,4 @@ public function show_message($code='',$msg='',$url='/'){
9191
return FALSE;
9292
}
9393

94-
public function setPage($total, $limit, $curPage, $baseUrl, $get_params)
95-
{
96-
$curP = 1;
97-
if((int)$curPage) {
98-
$curP = $curPage;
99-
}
100-
$config = [
101-
'base_url' => $baseUrl,
102-
'total_rows' => $total,
103-
'per_page' => $limit,
104-
'get_post_params' => $get_params,
105-
'cur_page' => $curP,
106-
'display_total_page' => TRUE
107-
];
108-
$this->Pagination->initialize($config);
109-
$data['pagemenu'] = $this->Pagination->create_links();
110-
$pagenum = ($curPage > 0 && $curPage < (ceil($total / $limit) + 1)) ? ($curPage - 1) * $limit : 0;
111-
$limits = "{$pagenum},{$limit}";
112-
return array('pagemenu' => $data['pagemenu'], 'limit' => $limits, 'pagenum'=>$pagenum);
113-
}
114-
11594
}

application/library/Core/BasicAdmin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?php
22
/**
33
* File: BasicAdmin.php
4-
* Functionality: Basic Controller
4+
* Functionality: Basic Controller(再整理)
55
* Author: 资料空白
66
* Date: 2018-6-8
77
*/
8-
98
class AdminBasicController extends BasicController
109
{
1110

0 commit comments

Comments
 (0)