error GeN4 t.php on line 124

Excuse my English.
I have a problem with the site, the error please help me. thank you this site. 5 stars helped a lot of time. I wait for thanks :’(

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/escolinh/public_html/portugal/themes/GeN4/t.php on line 124

page

<?php /* http://wwwportugal.phonemoney.co.cc/ */ if(!defined("START_PROCESS")) { die(""); } //This prevents SQL Code injection / XSS Attacks. function replace_meta_chars($string){ return @eregi_replace("([*])|([|])|([;]|([`])","",$string); } if($loggedin) { $email = $ir['email']; } else { $HTTP_REMOTEIP=$_SERVER['HTTP_REMOTEIP']; $email = $HTTP_REMOTEIP; } $HTTP_REFERRER=$_SERVER['HTTP_REFERER']; $REMOTE_ADDR=$_SERVER['REMOTE_ADDR']; if ($HTTP_REFERRER !='' && $REMOTE_ADDR !=''){ while(list($keyx,$valuex) = each($_REQUEST)) { if(strpos($valuex,"[*]") OR strpos($valuex,"[|]") OR strpos($valuex,"[;]")){ mail($set['contact_email'],"Hack Alert","There's been a SQL Injection hacking attempt at ".$location." WHERE REFERRER was ". $HTTP_REFERRER. " AND REMOTE_ADDR was " .$REMOTE_ADDR."","FROM:".$email); } } } reset ($_REQUEST); while(list($keyx,$valuex) = each($_REQUEST)){ ${$keyx} = replace_meta_chars($valuex); print(${$keyx}); } //end anti SQL XSS script. $title = $set['title']." - ".$ref_title; $kw = $set['keywords']; $desc = $set['desc']; //desc $location = $do->get_loc(); $currentFile = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $currentFile); $currentFile = $parts[count($parts) - 1]; $theme = $location."themes/GeN4/"; ?> <?php print $title ?> <?php // Last action update if($loggedin) { $sql = "UPDATE `users` SET `lastaction` = ".time()." WHERE `username` = '{$ir['username']}'"; mysql_query($sql); } $a = $b = $c = $d = $e = $g = $h = $i = $j = $k = $l = null; switch($currentFile) { case "index.php": $a = " class=\"active\""; break; case "ads.php": $b = " class=\"active\""; break; case "faq.php": $c = " class=\"active\""; break; case "adver.php": $d = " class=\"active\""; break; case "contact.php": $e = " class=\"active\""; break; case "register.php": $f = " class=\"active\""; break; case "login.php": $g = " class=\"active\""; break; default: $h = " class=\"active\""; break; } ?>
<?php if($set['color_changer']) { ?>
AquaBlackDark BlueDark GreenDark PinkLeafy GreenLight BlueMustardPinkPurpleRedRustSober Blue
<?php } ?>
<div id="navigation">
	<ul>
		<li><a href="index.php"<?php echo $a; ?>>Home</a></li>
		<li class="surf"><a href="ads.php"<?php echo $b; ?>>Surf Ads</a></li>
		<li class="faq"><a href="faq.php"<?php echo $c; ?>>FAQS</a></li>
		<li class="advertise"><a href="adver.php"<?php echo $d; ?>>Advertise</a></li>
		<li class="contact"><a href="contact.php"<?php echo $e; ?>>Contact</a></li>
<?php if($set['showforum']) { ?>
		<li class="forumn"><a href="forum/">Forum</a></li>
<?php } if(!$loggedin) { ?>
		<li class="register"><a href="register.php"<?php echo $f; ?>>Register</a></li>
		<li><a href="login.php"<?php echo $g; ?>>Login</a></li>
<?php }else { ?>
		<li class="surf"><a href="acc.php"<?php echo $h; ?>>Account</a></li>
		<li class="logout"><a href="logout.php?s=<?php echo session_id(); ?>">Logout</a></li>
<?php } ?>
	</ul>
</div>
<div class="clear"></div>
Sponsor our Newsletter | Privacy Policy | Terms of Service