Commit 52fd8ccc by doszhang

dos

parent 36cdb281
...@@ -252,53 +252,83 @@ class IndexController extends Controller ...@@ -252,53 +252,83 @@ class IndexController extends Controller
} }
} }
public function defaultStatus() { public function prizenum () {
if($_GET['password'] != 'UUvjQ1AT9fNwYlmNGEe1TSqbin7tClIg') if($_GET['password'] != 'UUvjQ1AT9fNwYlmNGEe1TSqbin7tClIg')
{ {
header("HTTP/1.0 404 Not Found"); header("HTTP/1.0 404 Not Found");
exit; exit;
} }
M('user')->where('1=1')->save(array( $p1 = M('prize')->where(array(
'tel' => NULL, 'is_get' => 1,
'is_prize' => 0 'prize_type' => 1
)); ))->count();
$p2 = M('prize')->where(array(
'is_get' => 1,
'prize_type' => 2
))->count();
$p3 = M('prize')->where(array(
'is_get' => 1,
'prize_type' => 3
))->count();
header('Content-Type: text/html; charset=utf-8');
echo '优酷:' . $p1 . '<br />';
echo '2元:' . $p2 . '<br />';
echo '1元:' . $p3 . '<br />';
M('prize')->where('1=1')->save(array(
'take_time' => 0,
'user_id' => 0,
'is_get' => 0,
'last_ip' => ''
));
echo 'clear complete';
} }
// public function defaultStatus() {
// if($_GET['password'] != 'UUvjQ1AT9fNwYlmNGEe1TSqbin7tClIg')
// {
// header("HTTP/1.0 404 Not Found");
// exit;
// }
// M('user')->where('1=1')->save(array(
// 'tel' => NULL,
// 'is_prize' => 0
// ));
// M('prize')->where('1=1')->save(array(
// 'take_time' => 0,
// 'user_id' => 0,
// 'is_get' => 0,
// 'last_ip' => ''
// ));
// echo 'clear complete';
// }
public function cookie() public function cookie()
{ {
SignedCookie::set_cookie($this->cookie_uid_key, 'oVsrlt0zUWMLvMx2-KPGVmY2I-Xc', C('cookie_sign'), 86400 * 60); SignedCookie::set_cookie($this->cookie_uid_key, 'oVsrlt0zUWMLvMx2-KPGVmY2I-Xc', C('cookie_sign'), 86400 * 60);
} }
public function addprize() { // public function addprize() {
for($i = 0;$i < 1300;$i++) // for($i = 0;$i < 1300;$i++)
{ // {
M('prize')->add(array( // M('prize')->add(array(
'type' => 2, // 'type' => 2,
'prize_type' => 3, // 'prize_type' => 3,
'prize_name' => '1元全网手机话费' // 'prize_name' => '1元全网手机话费'
)); // ));
if($i < 500) { // if($i < 500) {
M('prize')->add(array( // M('prize')->add(array(
'type' => 2, // 'type' => 2,
'prize_type' => 2, // 'prize_type' => 2,
'prize_name' => '2元全网手机话费' // 'prize_name' => '2元全网手机话费'
)); // ));
} if($i < 25) { // } if($i < 25) {
M('prize')->add(array( // M('prize')->add(array(
'type' => 1, // 'type' => 1,
'prize_type' => 1, // 'prize_type' => 1,
'prize_name' => '优酷VIP视频月卡' // 'prize_name' => '优酷VIP视频月卡'
)); // ));
} // }
} // }
} // }
} }
\ No newline at end of file
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