本帖最后由 maohailong 于 2010-01-16 18:13 编辑
<?php
if(!function_exists('_obfuscate_38TQV81_0f8a90931c97dd3aaa3affc5f06ae0ce')){function _obfuscate_38TQV81_0f8a90931c97dd3aaa3affc5f06ae0ce($input){return base64_decode(strtr($input, '-_,', '+/='));}}
require_once './global.php'; require_once './apps/lang/lucky.lang.php'; function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } function make_reward($input = 100, $num = 0) { srand(make_seed()); $randval = rand(1,$input); if($randval == $num) return true; return false; } islogin(); $today = getdate(); $wday = $today["wday"]; if($op=='lucky') { $reward1 = make_reward(10, 8); $reward2 = make_reward(100, 8); $reward3 = make_reward(300, 8); $result = 0; $sql = ""; $message = $lang['lucky_in']; $wedding = $db->get_one("SELECT * FROM " . WEDDING_TABLE . " WHERE uid='$user_id'"); if(empty($wedding['wid'])) { $db->query("INSERT INTO " . WEDDING_TABLE . " (uid) VALUES ('$user_id')"); } if($reward1) { $result = 1; $sql = "hongxian=hongxian+1"; $message .= $lang['lucky_hongxian']; } if($reward2) { $result = 2; $sql = "balloon=balloon+1"; $message .= $lang['lucky_balloon']; } if($reward3) { $result = 3; $sql = "ring2=ring2+1"; $message .= $lang['lucky_ring']; } upuserpnt($userdata, 100, 0); if($result) { $db->query("UPDATE ". WEDDING_TABLE . " SET $sql"); } writelog($user_id,'lucky',$message,'lucky.php'); $tpl->set(array( "luckyresult" => $result, "getreward" => 1 )); } $tpl->set("userspnts",$userdata["user_pnts"]); $tpl->set("main_page","lucky.html"); $tpl->parse("main.html");
?>
有能力解PHP混淆的加QQ:860030658 |