Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
samsung-christmas
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
07892cee
authored
Dec 23, 2019
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
40d3a650
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
Application/Home/Controller/IndexController.class.php
+7
-4
No files found.
Application/Home/Controller/IndexController.class.php
View file @
07892cee
...
...
@@ -157,10 +157,10 @@ class IndexController extends Controller
}
$now
=
time
();
$req_type
=
array
();
$type_list
=
array
(
1
,
2
);
$type_list
=
array
(
1
,
2
,
3
);
foreach
(
$type_list
as
$type
)
{
$c
=
M
(
'prize'
)
->
where
(
array
(
'type'
=>
$type
,
'
prize_
type'
=>
$type
,
'is_get'
=>
1
,
))
->
count
();
if
(
$type
==
1
)
{
...
...
@@ -186,7 +186,7 @@ class IndexController extends Controller
$prize
=
M
(
'prize'
)
->
where
(
array
(
'is_get'
=>
0
,
'user_id'
=>
0
,
'type'
=>
array
(
'in'
,
$req_type
),
'
prize_
type'
=>
array
(
'in'
,
$req_type
),
))
->
order
(
'rand()'
)
->
limit
(
1
)
->
find
();
if
(
!
$prize
)
{
return
false
;
...
...
@@ -240,17 +240,20 @@ class IndexController extends Controller
for
(
$i
=
0
;
$i
<
1000
;
$i
++
)
{
M
(
'prize'
)
->
add
(
array
(
'type'
=>
3
,
'type'
=>
2
,
'prize'
=>
3
,
'prize_name'
=>
'1元全网手机话费'
));
if
(
$i
<
500
)
{
M
(
'prize'
)
->
add
(
array
(
'type'
=>
2
,
'prize'
=>
2
,
'prize_name'
=>
'2元全网手机话费'
));
}
if
(
$i
<
25
)
{
M
(
'prize'
)
->
add
(
array
(
'type'
=>
1
,
'prize'
=>
1
,
'prize_name'
=>
'优酷VIP视频月卡'
));
}
...
...
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