Commit 5265fb0c by doszhang

dos

parent db1d7630
......@@ -74,7 +74,6 @@ class IndexController extends Controller
public function tryPrize()
{
echo date('Ymd');
$referer = $_SERVER['HTTP_REFERER'];
$refererInfo = parse_url( $referer );
if( $refererInfo['host'] != $_SERVER['HTTP_HOST'] )
......@@ -159,27 +158,67 @@ class IndexController extends Controller
$now = time();
$req_type = array();
$type_list = array(1,2,3);
$date = date('Ymd');
foreach ($type_list as $type) {
$c = M('prize')->where(array(
'prize_type' => $type,
'is_get' => 1,
))->count();
if($date == '20191224')
{
if ($type == 1) {
if ($c >= 12) {
continue;
}
}
else if ($type == 2) {
if ($c >= 250) {
continue;
}
}
else if ($type == 3) {
if ($c >= 650) {
continue;
}
}
}
else if($date == '20191225')
{
if ($type == 1) {
if ($c >= 25) {
if ($c >= 10) {
continue;
}
}
else if ($type == 2) {
if ($c >= 500) {
if ($c >= 200) {
continue;
}
}
else if ($type == 3) {
if ($c >= 1000) {
if ($c >= 520) {
continue;
}
}
}
else if($date == '20191226')
{
if ($type == 1) {
if ($c >= 3) {
continue;
}
}
else if ($type == 2) {
if ($c >= 50) {
continue;
}
}
else if ($type == 3) {
if ($c >= 130) {
continue;
}
}
}
$req_type[] = $type;
}
if (empty($req_type)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment