Jump to content

Can anyone correct this?


GetReady

Recommended Posts

The following wont work once added to my current codebase any ideas as to why? Thanks.

}
   
   if ($time=$conf["hours_to_block_same_user_attacking"]*60*60;
	$IP=isIPNewerThen($ip,$time);
	if ($IP){
		//print_r($IP);
		//$IP=getIP($ipID);
		$time=time()-$IP->time;
		//alert($time);
		$time=$conf["hours_to_block_same_user_attacking"]*60*60-$time;
		//alert($time);

		$t=$time/(60*60);
		$tF=floor($t);
		$timeA['tm_hour']=$tF;
		$time=$time-$tF*60*60;

		$t=$time/(60);
		$tF=floor($t);
		$timeA['tm_min']=$tF;

		$time=$time-$tF*60;
		$timeA['tm_sec']=$time;
//			$t=($time-$timeA['tm_sec'])


	?>You may only steal from an individual once per 6 hours.<br> You will need to wait 
<?=$timeA['tm_hour']?> hours, <?=$timeA['tm_min']?> minutes and <?=$timeA['tm_sec']?> seconds before attacking again  
	<?
	}
	else{

Link to comment
Share on other sites

      if ($time=$conf["hours_to_block_same_user_attacking"]*60*60;

 

you don't close the bracket, and you shouldn't have a colon ending the if argument.

i.e.

      if ($time=$conf["hours_to_block_same_user_attacking"]*60*60)
{
//code to execute if true
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.