Jump to content

[SOLVED] help with ifs


hchsk

Recommended Posts

why could this possibly be firing?

 

 

$warningfeed = '';
	foreach($info as $key => $value) {

	$inactive = (strtotime($value)+259200) - strtotime($nowpub);
	$inactive = Srtto2Time($inactive);

	$hold = intval($key) - 1;
	$warning = '';
	if (($value == 3) && (intval($inactive[seconds]) > 0)) {$bits[$key-1] = 0;}
	if ((intval($inactive[days]) == 0) && (intval($inactive[hours]) < 12) && ($bits[$hold] !== 1)) {$warning = 'Team ' . $key . ' is in danger of inactivity. Less than twelve hours left!'; $bits[$hold] = 1;}
	if ((intval($inactive[days]) == 0) && (intval($inactive[hours]) < 1) && ($bits[$hold] !== 2)) {$warning = 'Team ' . $key . ' is in danger of inactivity. Less than one hour left!'; $bits[$hold] = 2;}
	if ((intval($inactive[seconds]) < 0) && ($bits[$hold] !== 3)) {$warning = 'Team ' . $key . ' has been declared inactive. Please contact a judge for shootout details.'; $bits[$hold] = 3;}

///////////////////////////////////////////////////////////////////////////////CHANGE TO TEAM NAMES HERE

$category="allevents/team$key/";

//CREATE ITEM $warning
	if ($warning != '') {
	$warningfeed .= "
	<item>
	 <title>Network Update</title>
	 <category>$category</category>
	 <link>http://lowersouthlounge.com/circle.php</link>
	 <description>$warning $bits[$hold] | $inactive[days] | $inactive[hours] | $inactive[seconds]</description>
	 <pubDate>$value</pubDate>
	</item>";		}

	}

 

when

 

print "$bits[$hold] | $inactive[days] | $inactive[hours] | $inactive[seconds]" == 3 | 0 | 0 | -11163

 

 

 

thanks so much

 

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.