Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ylc.llewan.com
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
llewan
ylc.llewan.com
Commits
bbb8692f
Commit
bbb8692f
authored
Jul 01, 2019
by
734642908@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e
parent
d7f9debe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
FlushController.class.php
Application/Home/Controller/FlushController.class.php
+38
-1
No files found.
Application/Home/Controller/FlushController.class.php
View file @
bbb8692f
...
@@ -396,7 +396,44 @@ class FlushController extends BaseController
...
@@ -396,7 +396,44 @@ class FlushController extends BaseController
// $cache->set('huanlenongchangzhu:giftOrder',json_encode([23434,43546]),86400);
// $cache->set('huanlenongchangzhu:giftOrder',json_encode([23434,43546]),86400);
M
(
"game_redeem_code"
,
""
,
C
(
"LEWAN_HEZI"
))
->
query
(
"DROP TABLE IF EXISTS `game_redeem_code`"
);
// M("game_redeem_code","",C("LEWAN_HEZI"))->query("DROP TABLE IF EXISTS `game_redeem_code`");
set_time_limit
(
0
);
//返回随机数
function
cdkey
(
$mylen
=
8
){
$array
=
"123456789"
;
$arrayen
=
"abcdefghijklmnopqrstuvwxyz"
;
$arrayEn
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
$authnum
=
''
;
for
(
$i
=
0
;
$i
<
$mylen
;
$i
++
){
// $authnum .= substr($array,mt_rand(0,8),1).substr($arrayen,mt_rand(0,25),1).substr($arrayEn,mt_rand(0,25),1);
// $authnum .= $array[mt_rand(0,8)].$arrayen[mt_rand(0,25)].$arrayEn[mt_rand(0,25)];
$authnum
.=
$array
[
mt_rand
(
0
,
8
)]
.
$arrayEn
[
mt_rand
(
0
,
25
)];
}
return
$authnum
;
}
$model
=
M
(
"game_redeem_code"
,
""
,
C
(
"LEWAN_HEZI"
));
$data
=
array
(
'type'
=>
1
,
'create_time'
=>
date
(
'Y-m-d H:i:s'
)
,
'game_code'
=>
'wowtongyouxi-weixin'
);
for
(
$i
=
0
;
$i
<
100000
;
$i
++
)
{
echo
cdkey
()
.
"<br>"
;
$data
[
'code'
]
=
cdkey
();
$insertArr
[]
=
$data
;
if
(
count
(
$insertArr
)
>
1000
)
{
$model
->
addAll
(
$insertArr
);
$insertArr
=
array
();
}
}
if
(
!
empty
(
$insertArr
))
{
$model
->
addAll
(
$insertArr
);
}
}
}
...
...
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