Skip to content

Commit 9e85645

Browse files
manier13579StyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 7168854 commit 9e85645

28 files changed

+102
-101
lines changed

phpinfo.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
2+
23
echo phpinfo();
3-
?>

src/account.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44

@@ -120,7 +120,7 @@ function initLang(pageName,lang){
120120
}
121121
});
122122
}
123-
var langNow = '<?php
123+
var langNow = '<?php
124124
if (!isset($_SESSION['lang'])) {
125125
echo 'CN';
126126
} else {

src/class/list_class.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ public function init($testUserId = '')
4545
$res = [];
4646
while ($row = mysqli_fetch_array($result)) {
4747
$res[$i] = [
48-
'GUID' => $row['GUID'],
49-
'XING_MING' => $row['XING_MING'],
50-
'XIANG_MU' => $row['XIANG_MU'],
51-
'NEI_RONG' => jiemi($row['NEI_RONG']),
52-
'USER_ID' => $row['USER_ID'],
53-
'QUAN_XIAN' => $row['QUAN_XIAN'],
48+
'GUID' => $row['GUID'],
49+
'XING_MING' => $row['XING_MING'],
50+
'XIANG_MU' => $row['XIANG_MU'],
51+
'NEI_RONG' => jiemi($row['NEI_RONG']),
52+
'USER_ID' => $row['USER_ID'],
53+
'QUAN_XIAN' => $row['QUAN_XIAN'],
5454

55-
];
55+
];
5656
$i++;
5757
}
5858

@@ -174,13 +174,13 @@ public function XiangXi($GUID)
174174
$result2 = DbSelect($con, $sql2);
175175

176176
$i = 0;
177-
177+
178178
while ($row = mysqli_fetch_array($result2)) {
179179
$res->data[$i] = [
180-
'GUID' => $row['GUID'],
181-
'XING_MING' => $row['XING_MING'],
182-
'XIANG_MU' => $row['XIANG_MU'],
183-
'NEI_RONG' => jiemi($row['NEI_RONG']),
180+
'GUID' => $row['GUID'],
181+
'XING_MING' => $row['XING_MING'],
182+
'XIANG_MU' => $row['XIANG_MU'],
183+
'NEI_RONG' => jiemi($row['NEI_RONG']),
184184
];
185185
$i++;
186186
}

src/common/function.php

+18-17
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,21 @@ function jiemi($data)
9090
}
9191

9292
//兼容linux生成GUID的方法
93-
function getGUID(){
94-
if (function_exists('com_create_guid')){
95-
return com_create_guid();
96-
}else{
97-
mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
98-
$charid = strtoupper(md5(uniqid(rand(), true)));
99-
$hyphen = chr(45);// "-"
100-
$uuid = chr(123)// "{"
101-
.substr($charid, 0, 8).$hyphen
102-
.substr($charid, 8, 4).$hyphen
103-
.substr($charid,12, 4).$hyphen
104-
.substr($charid,16, 4).$hyphen
105-
.substr($charid,20,12)
106-
.chr(125);// "}"
107-
return $uuid;
108-
}
109-
}//this function fix linux can not use com_create_guid bug, create by iefreer
93+
function getGUID()
94+
{
95+
if (function_exists('com_create_guid')) {
96+
return com_create_guid();
97+
} else {
98+
mt_srand((float) microtime() * 10000); //optional for php 4.2.0 and up.
99+
$charid = strtoupper(md5(uniqid(rand(), true)));
100+
$hyphen = chr(45); // "-"
101+
$uuid = chr(123)// "{"
102+
.substr($charid, 0, 8).$hyphen
103+
.substr($charid, 8, 4).$hyphen
104+
.substr($charid, 12, 4).$hyphen
105+
.substr($charid, 16, 4).$hyphen
106+
.substr($charid, 20, 12)
107+
.chr(125); // "}"
108+
return $uuid;
109+
}
110+
}//this function fix linux can not use com_create_guid bug, create by iefreer

src/controller/lang_controller.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
$stmt->execute();
2323
$result = $stmt->get_result();
2424

25-
$response = array();
25+
$response = [];
2626
$i = 0;
2727

2828
while ($row = $result->fetch_assoc()) {
2929
$response[$i] = [
30-
'XuHao' => $row['XU_HAO'],
31-
'WenZi' => $row['WEN_ZI'],
32-
];
30+
'XuHao' => $row['XU_HAO'],
31+
'WenZi' => $row['WEN_ZI'],
32+
];
3333

34-
$i++;
34+
$i++;
3535
}
3636

3737
echo json_encode($response);

src/controller/piLiang_controller.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
$res = [];
3535
while ($row = mysqli_fetch_array($result)) {
3636
$res[$i] = [
37-
'GUID' => $row['GUID'],
38-
'XING_MING' => $row['XING_MING'],
39-
'XIANG_MU' => $row['XIANG_MU'],
40-
'NEI_RONG' => jiemi($row['NEI_RONG']),
41-
'USER_ID' => $row['USER_ID'],
42-
'QUAN_XIAN' => $row['QUAN_XIAN'],
43-
'ZU_ID' => $row['ZU_ID'],
44-
'ZU_NAME' => $row['ZU_NAME'],
45-
];
37+
'GUID' => $row['GUID'],
38+
'XING_MING' => $row['XING_MING'],
39+
'XIANG_MU' => $row['XIANG_MU'],
40+
'NEI_RONG' => jiemi($row['NEI_RONG']),
41+
'USER_ID' => $row['USER_ID'],
42+
'QUAN_XIAN' => $row['QUAN_XIAN'],
43+
'ZU_ID' => $row['ZU_ID'],
44+
'ZU_NAME' => $row['ZU_NAME'],
45+
];
4646
$i++;
4747
}
4848

@@ -234,11 +234,11 @@
234234
$res = [];
235235
while ($row = mysqli_fetch_array($result)) {
236236
$res[$i] = [
237-
'GUID' => $row['GUID'],
238-
'XING_MING' => $row['XING_MING'],
239-
'XIANG_MU' => $row['XIANG_MU'],
240-
'NEI_RONG' => jiemi($row['NEI_RONG']),
241-
];
237+
'GUID' => $row['GUID'],
238+
'XING_MING' => $row['XING_MING'],
239+
'XIANG_MU' => $row['XIANG_MU'],
240+
'NEI_RONG' => jiemi($row['NEI_RONG']),
241+
];
242242
$i++;
243243
}
244244

src/controller/userManage_controller.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
$res = [];
2828
while ($row = mysqli_fetch_array($result)) {
2929
$res[$i] = [
30-
'USER_ID' => $row['USER_ID'],
31-
'USER_NAME' => $row['USER_NAME'],
32-
'USER_TYPE' => $row['USER_TYPE'],
33-
'FAILED_LOGINS' => $row['FAILED_LOGINS'],
34-
'LAST_IP' => $row['LAST_IP'],
35-
'JOIN_DATE' => $row['JOIN_DATE'],
36-
'LAST_LOGIN' => $row['LAST_LOGIN'],
37-
'EMAIL' => $row['EMAIL'],
38-
'ZU_ID' => $row['ZU_ID'],
39-
'ZU_NAME' => $row['ZU_NAME'],
40-
'ZU' => $row['ZU_NAME'].' ['.$row['ZU_ID'].']',
41-
];
30+
'USER_ID' => $row['USER_ID'],
31+
'USER_NAME' => $row['USER_NAME'],
32+
'USER_TYPE' => $row['USER_TYPE'],
33+
'FAILED_LOGINS' => $row['FAILED_LOGINS'],
34+
'LAST_IP' => $row['LAST_IP'],
35+
'JOIN_DATE' => $row['JOIN_DATE'],
36+
'LAST_LOGIN' => $row['LAST_LOGIN'],
37+
'EMAIL' => $row['EMAIL'],
38+
'ZU_ID' => $row['ZU_ID'],
39+
'ZU_NAME' => $row['ZU_NAME'],
40+
'ZU' => $row['ZU_NAME'].' ['.$row['ZU_ID'].']',
41+
];
4242
$i++;
4343
}
4444

src/controller/zuManage_controller.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
$res = [];
2323
while ($row = mysqli_fetch_array($result)) {
2424
$res[$i] = [
25-
'ZU_ID' => $row['ZU_ID'],
26-
'PARENT_ID' => $row['PARENT_ID'],
27-
'ZU_NAME' => $row['ZU_NAME'],
28-
];
25+
'ZU_ID' => $row['ZU_ID'],
26+
'PARENT_ID' => $row['PARENT_ID'],
27+
'ZU_NAME' => $row['ZU_NAME'],
28+
];
2929
$i++;
3030
}
3131

src/controller/zu_controller.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
$i = 0;
1818
while ($row = mysqli_fetch_array($result)) {
1919
$res[$i] = [
20-
'ZU_ID' => $row['ZU_ID'],
21-
'PARENT_ID' => $row['PARENT_ID'],
22-
'ZU_NAME' => $row['ZU_NAME'],
23-
];
20+
'ZU_ID' => $row['ZU_ID'],
21+
'PARENT_ID' => $row['PARENT_ID'],
22+
'ZU_NAME' => $row['ZU_NAME'],
23+
];
2424
$i++;
2525
}
2626

src/nav.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<script type="text/javascript">
5353
var langPages = ['nav'];
54-
var langNow = '<?php
54+
var langNow = '<?php
5555
if (!isset($_SESSION['lang'])) {
5656
echo 'CN';
5757
} else {
@@ -132,7 +132,7 @@ function initLang(pageName,lang){
132132
});
133133

134134
//初始化语言
135-
initLang('nav','<?php echo $_SESSION['lang'];?>');
135+
initLang('nav','<?php echo $_SESSION['lang']; ?>');
136136

137137
});
138138
</script>

src/view.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<dd><a href="/manage/changePass" id="changePass"><span lang="更改密码"></span></a></dd>
1717
</dl>
1818
</li>
19-
<?php
19+
<?php
2020
if ($_SESSION['USER_TYPE'] == '2') {
2121
echo '
2222
<li class="layui-nav-item layui-nav-itemed">

src/view/addIframe.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44
<script type="text/javascript" src="<?php $_SERVER['DOCUMENT_ROOT']?>/src/js/jquery-1.12.0.min.js"></script>

src/view/editIframe.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44
<script type="text/javascript" src="<?php $_SERVER['DOCUMENT_ROOT']?>/src/js/jquery-1.12.0.min.js"></script>
@@ -187,7 +187,7 @@ function editAjax(action){
187187
$('#addInfo').show(); //可以添加条目
188188
$('.addItem').append('<div class="delBtn"><span class="layui-icon">&#x1006;</span></div>');
189189

190-
initLang('editIframe','<?php echo $_SESSION['lang'];?>');
190+
initLang('editIframe','<?php echo $_SESSION['lang']; ?>');
191191

192192
});
193193

src/view/filterIframe.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44
<script type="text/javascript" src="<?php $_SERVER['DOCUMENT_ROOT']?>/src/js/jquery-1.12.0.min.js"></script>

src/view/manage.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<script type="text/javascript">
5050
//初始化语言
5151
initLang('<?php echo $view; ?>',''+langNow+'');
52-
langPages.push('<?php echo $view;?>');
52+
langPages.push('<?php echo $view; ?>');
5353
//初始化焦点页面
54-
var idx = '<?php echo $view;?>';
54+
var idx = '<?php echo $view; ?>';
5555
</script>

src/view/manage/changePass.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
$("a[id='<?php echo $page; ?>']").parent().addClass('layui-this');
6161
//初始化语言
6262
initLang('<?php echo $page; ?>',''+langNow+'');
63-
langPages.push('<?php echo $page;?>');
63+
langPages.push('<?php echo $page; ?>');
6464
//初始化焦点页面
65-
var idx = '<?php echo $view;?>';
65+
var idx = '<?php echo $view; ?>';
6666

6767
layui.use('form', function(){
6868
var form = layui.form;

src/view/manage/langRegister.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
$("a[id='<?php echo $page; ?>']").parent().addClass('layui-this');
8383
//初始化语言
8484
initLang('<?php echo $page; ?>',''+langNow+'');
85-
langPages.push('<?php echo $page;?>');
85+
langPages.push('<?php echo $page; ?>');
8686
//初始化焦点页面
87-
var idx = '<?php echo $view;?>';
87+
var idx = '<?php echo $view; ?>';
8888

8989
layui.use('form', function(){
9090
$('#login').click(function(){

src/view/manage/piLiang.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<button class="layui-btn" id="zu"><span lang="批量修改组"></span></button>
2828
<button class="layui-btn" id="quanxian"><span lang="批量修改权限"></span></button>
2929
<button class="layui-btn layui-btn-danger" id="del"><span lang="批量删除"></span></button>
30-
<?php
30+
<?php
3131
if ($_SESSION['USER_TYPE'] == '2') {
3232
echo '<button class="layui-btn layui-btn-warm" id="export"><span lang="批量导出"></span></button>';
3333
}
@@ -50,9 +50,9 @@
5050
$("a[id='<?php echo $page; ?>']").parent().addClass('layui-this');
5151
//初始化语言
5252
initLang('<?php echo $page; ?>',''+langNow+'');
53-
langPages.push('<?php echo $page;?>');
53+
langPages.push('<?php echo $page; ?>');
5454
//初始化焦点页面
55-
var idx = '<?php echo $view;?>';
55+
var idx = '<?php echo $view; ?>';
5656

5757
//定义页面全局变量
5858
var guidArr = [],

src/view/manage/piLiangImport.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
$("a[id='<?php echo $page; ?>']").parent().addClass('layui-this');
5353
//初始化语言
5454
initLang('<?php echo $page; ?>',''+langNow+'');
55-
langPages.push('<?php echo $page;?>');
55+
langPages.push('<?php echo $page; ?>');
5656
//初始化焦点页面
57-
var idx = '<?php echo $view;?>';
57+
var idx = '<?php echo $view; ?>';
5858

5959
//定义页面全局变量
6060
var guidArr = [],

src/view/manage/piLiangQuanxianIframe.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44
<script type="text/javascript" src="<?php $_SERVER['DOCUMENT_ROOT']?>/src/js/jquery-1.12.0.min.js"></script>

src/view/manage/piLiangZuIframe.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44
<script type="text/javascript" src="<?php $_SERVER['DOCUMENT_ROOT']?>/src/js/jquery-1.12.0.min.js"></script>

src/view/manage/userManage.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
$("a[id='<?php echo $page; ?>']").parent().addClass('layui-this');
4747
//初始化语言
4848
initLang('<?php echo $page; ?>',''+langNow+'');
49-
langPages.push('<?php echo $page;?>');
49+
langPages.push('<?php echo $page; ?>');
5050
//初始化焦点页面
51-
var idx = '<?php echo $view;?>';
51+
var idx = '<?php echo $view; ?>';
5252

5353
//定义页面全局变量
5454
var guidArr = [],

src/view/manage/userManageEditIframe.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
$userid = $_GET['userid'];
44
$username = $_GET['username'];
@@ -76,7 +76,7 @@
7676
var form = layui.form;
7777
//初始化语言
7878

79-
initLang('userManageIframe','<?php echo $_SESSION['lang'];?>');
79+
initLang('userManageIframe','<?php echo $_SESSION['lang']; ?>');
8080
function initLang(pageName,lang){
8181
ajax=$.ajax({
8282
url:rootpath+"/src/controller/lang_controller.php",

src/view/manage/userManageIframe.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
session_start();
33
?>
44
<script type="text/javascript" src="<?php $_SERVER['DOCUMENT_ROOT']?>/src/js/jquery-1.12.0.min.js"></script>

0 commit comments

Comments
 (0)