GetReady Posted July 24, 2010 Share Posted July 24, 2010 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 https://forums.phpfreaks.com/topic/208750-can-anyone-correct-this/ Share on other sites More sharing options...
joel24 Posted July 24, 2010 Share Posted July 24, 2010 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 https://forums.phpfreaks.com/topic/208750-can-anyone-correct-this/#findComment-1090580 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.