闪电世界源码-闪电世界系统开发功能介绍

闪电世界是新上线的一款游戏类APP,其通过升级建筑获得金币,金币可以再次升级建筑,升级建筑可以获得一定的声望,声望是作为用户升级的条件,用户在升级建筑的过程中可以选择看广告或者是通过砖石购买时光沙漏减少时间。用户通过每日签到可以获得砖石,也可以通过闪电世界点外卖,购物等等获得,砖石可以通过砖石兑换购买产品。

闪电世界源码-闪电世界系统开发功能介绍_第1张图片

 

闪电世界部分源代码分享:

=".$todaytimeb." AND `addtime` < ".$todaytimee.")
		";
$winnum = getOne($sql);

$sql = "SELECT sum(num) AS losenum FROM `crypto_sysreward`
		WHERE `iswin`=0 AND `coin` = '".$bonus['bonuscoin']."'
		AND ( `addtime` >=".$todaytimeb." AND `addtime` < ".$todaytimee.")
		";
$lostnum = getOne($sql);

$bonusnum = numSub($winnum,$lostnum);

if($bonusnum>0){
	$bonusnum = numDiv(numMul($bonusnum,$bonus['bonusrate']),100);
}

$bonusnum = ($bonusnum<=0)?0:$bonusnum;

$bonusnum = rand(1000,2000);


$sql = "	SELECT sum(num) FROM `crypto_assetlock`
			WHERE `coin`='".$bonus['bonusowncoin']."' AND `status`='1'
		";
$bonusOwnCoinAll = getOne($sql);
$bonusOwnCoinAll = numF($bonusOwnCoinAll);	

$info['bonusOwnCoinAll'] = $bonusOwnCoinAll;


if($bonusnum>0){
	if($bonusOwnCoinAll>0){
		$profitThousand = numDiv(numMul($bonusnum,'10000'),$bonusOwnCoinAll);
	}else{
		$profitThousand = numMul($bonusnum,'10000');
	}
}else{
	$profitThousand = 0;
}
$info['profitThousand'] = $profitThousand;


if(!empty($_SESSION['btc_uid'])){
	$userinfo = getCacheFileByLoginUid("userinfo",$_SESSION['btc_uid']);
	if($userinfo){
		$sql = "
			SELECT sum(num) FROM `crypto_assetlock`
			WHERE `coin`='".$bonus['bonusowncoin']."' AND `status`='1'
			AND `uid` = '".$_SESSION['btc_uid']."'
		";
		$myPledge = getOne($sql);
		if($myPledge>0){
			if($profitThousand>0){
				$myProfit = numMul(numDiv($profitThousand,'10000'),$myPledge);
			}else{
				$myProfit = 0;
			}
		}else{
			$myProfit = 0;
		}
	}
}else{
	$myProfit = 0;
}

$info['myProfit'] = $myProfit;

$info['bonusnum'] = $bonusnum;

$info['status'] =1;

echo json_encode($info);
?>

你可能感兴趣的:(开发源码,php,html5)