Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
16644915
Commit
16644915
authored
Dec 10, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中心后台:修改分前端授权码机制,使用分前端标识及license文件方式验证授权
parent
acc7d804
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
12 deletions
+134
-12
licenses_100.txt
DB/licenses_100.txt
+100
-0
CenterAction.class.php
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
+11
-0
FrontAction.class.php
SooonerHotel/App/Lib/Action/Hotel/FrontAction.class.php
+12
-1
add.html
SooonerHotel/App/Tpl/Hotel/zh-cn/Front/add.html
+11
-11
No files found.
DB/licenses_100.txt
0 → 100644
View file @
16644915
MyBUsCL5
8NDhTF6u
FsRQhN93
jDVZV026
6OyccQNg
sLYtktzF
xEcjayO6
Qrtyi9DM
lJdYZB5U
2r56Emp7
VzoLLyEA
ia4YJJqJ
Xpn5n4da
XnXdF5VN
d8CWfPBh
1PVfYx4L
sxPZm4EL
IzIVbXNi
2hWnaYMA
jCeABA3E
fUGDvcyQ
3rVAv4D7
APO77iEA
virucW3Y
T3e9xtTt
6njKZqPY
5XFxaz3x
wn2ZL4YB
pq1AhP3m
GaJmq1mb
XmsORtMc
6GkMMyJ9
3EgAiKiA
cSYDmFcm
aPRXDLsW
uJzUnFhh
MnsvuOg2
4A46WhDh
CjV57LHA
qSlrZ5NV
xlnUY8i6
Et6R4ZNh
86NWwaeF
tvREXV3l
zqnGC89b
2burdzj4
wrj570GN
CRpQMXWm
IP8Q7LzT
0lT28F46
ywbcowth
ANEOoWVu
nQo12zEY
2RbCTK29
YndGvLVI
ehQRpRec
aTwVZYZE
mKi767jj
ybPm92CX
W5ENSvFJ
iWsSDXwE
6qCZK0tO
8LRKTTWz
Pwauz0Xq
xj6IkCil
2dxRHU02
ltcyRwN0
BhMKyz18
Kne9Rf4w
1UUmtMld
T13nPQOZ
KiRzRJvE
JroKk8MO
hwv0g4sS
CyP5LC2Y
ML05TRK2
cNjhw5Tf
pa11Zc3I
F02e6F9j
w6Ipa7HC
DVS3Kgwl
M13gDc1o
2SDYdFev
fK3OacDn
oyowqPaq
84dArXr5
iODe1xZo
PtxTfyCo
23wjSeii
VCR2fUBD
HF4TJrDA
FxhZbYKM
7pTqrNCg
D2wA2mgG
FJxgQdcG
OuM9XJeY
S1
YxvaAeb5
mGa1cjWn
yWwBLjnN
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
View file @
16644915
...
@@ -582,4 +582,14 @@ class CenterAction extends Action
...
@@ -582,4 +582,14 @@ class CenterAction extends Action
return
$data
;
return
$data
;
}
}
// public function gen_licenses(){
// $num=92;
// for ($i=1;$i<=$num;$i++){
// $code = getCode(8);
// $sql = "insert into sh_license (code,status) values('$code',0);";
// M('')->execute($sql);
//
// }
// }
}
}
\ No newline at end of file
SooonerHotel/App/Lib/Action/Hotel/FrontAction.class.php
View file @
16644915
...
@@ -58,10 +58,21 @@ class FrontAction extends CommonAction{
...
@@ -58,10 +58,21 @@ class FrontAction extends CommonAction{
}
else
{
}
else
{
$hotel_lists
=
$hotelModel
->
where
(
"`status`=0"
)
->
select
();
$hotel_lists
=
$hotelModel
->
where
(
"`status`=0"
)
->
select
();
}
}
$this
->
code
=
GetfourStr
(
8
);
// $this->code = GetfourStr(8);
$this
->
code
=
$this
->
GetCodeFromLicense
();
$this
->
hotel_lists
=
$hotel_lists
;
$this
->
hotel_lists
=
$hotel_lists
;
$this
->
display
();
$this
->
display
();
}
}
function
GetCodeFromLicense
(){
$sql
=
"SELECT code from sh_license sl where code not in (SELECT code from sh_hotel_device);"
;
$arr
=
M
(
''
)
->
query
(
$sql
);
if
(
!
empty
(
$arr
)){
shuffle
(
$arr
);
return
$arr
[
0
][
'code'
];
}
else
{
return
"暂无分前端授权码"
;
}
}
//添加处理
//添加处理
public
function
addHandle
(){
public
function
addHandle
(){
$model
=
D
(
"Front"
);
$model
=
D
(
"Front"
);
...
...
SooonerHotel/App/Tpl/Hotel/zh-cn/Front/add.html
View file @
16644915
...
@@ -96,17 +96,17 @@ body{padding:20px}
...
@@ -96,17 +96,17 @@ body{padding:20px}
</div>
</div>
</volist>
</volist>
</div>
</div>
<
div
class=
"form-group"
>
<
!--<div class="form-group">--
>
<
label
for=
"name"
class=
"col-sm-2 control-label"
>
分前端许可码
</label
>
<
!--<label for="name" class="col-sm-2 control-label">分前端许可码</label>--
>
<
div
class=
"col-sm-6"
name=
"type"
>
<
!--<div class="col-sm-6" name="type">--
>
<
select
class=
"form-control"
name=
"licence"
>
<
!--<select class="form-control" name="licence">--
>
<
option
value=
"0"
>
请选择分前端许可码
</option
>
<
!--<option value="0">请选择分前端许可码</option>--
>
<
volist
name=
"licence_lists"
id=
"item"
>
<
!--<volist name="licence_lists" id="item">--
>
<
option
value=
"{$key}"
>
【{$item|date='Y-m-d H:i:s',###}】{$key}
</option>
<
!--<option value="{$key}">【{$item|date='Y-m-d H:i:s',###}】{$key}</option> -->
<
/volist
>
<
!--</volist>--
>
<
/select
>
<
!--</select>--
>
<
/div
>
<
!--</div>--
>
<
/div
>
<
!--</div>--
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-2 control-label"
>
备注
</label>
<label
for=
"inputPassword3"
class=
"col-sm-2 control-label"
>
备注
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment