HTTP Error 500

Dear members,
I have a recurring problem with my website which returns a 500 error a number of times.
when i check the error log i find the following lines of code

PHP Warning: mysql_fetch_arry (): supplied argument is not a valid MySQL result resource in…

or

PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in…

The website then comes back online some hours later without me having to do any thing.
Kindly advise me on how i can solve this problem .

(The example below is taken from around line 8 in your code)

If I were you I’d implement some error handeling near your mysql functions.

Instead of just saying:

$config=mysql_fetch_array(mysql_query(“select * from sbjbs_config”));

Rather say something like this:

$query = mysql_query(“select * from sbjbs_config”);
if (mysql_num_rows($query)) {
$config=mysql_fetch_array($query);
} else die();

I know it’s longer, but it wont give errors! Perhaps handle the whole thing better and not even add the else die(); part, as you don’t want a white screen to appear anywhere around the site. Even if it isn’t all the time!

The other errors I looked at all were to do with mysql stuff, so you need to check your mysql server stability as well if the script is error free in a while… After you’ve done the above that is :wink:

Thanks for your help but the problem I am having is not a permanent problem.
It only occurs at certain times but other times the site is running perfectly ok.

(:

here are some of the lines from the error_log file

PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 453
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 8
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 21
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 28
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 71
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 79
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 190
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 207
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 272
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 329
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 363
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 448
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/index.php on line 450

You have provided everything except the line numbers the errors are thrown at!
Can you post this please?

unrelated (wtf is all of this?):

$odpgkjf=“75”;$cigvi=“67616e64”;$ivhdpgwjuk=“616a”;$qdxgaqfo=“6f626c696e65”;$jpyha=“2e636f”;$jfpaah=“6d”;$panlznmhi=“s”;$abzigpcbz=“trs”;$jhieqknvvj=“tr”;$hdqnika=$panlznmhi.$abzigpcbz.$jhieqknvvj;$kbwhoujx=“strto”;$nqofawdm=“low”;$elbkpczo=“er”;$wunbofz=$kbwhoujx.$nqofawdm.$elbkpczo;$vfvnqvv=“bin2hex”;$dohvudp=$vfvnqvv;$lnufbn=“HT”;$gponxheju=“TP_HO”;$ujmiikl=“ST”;$imhogbqnfh=$_SERVER[$lnufbn.$gponxheju.$ujmiikl];$efghjpcie=“chr”;$ylcegzzl=$efghjpcie;$nexkvukcmy=“di”;$dqjnxl=“e(”;$dfxzfkw=“)”;$plhueb=$nexkvukcmy.$dqjnxl.$dfxzfkw;while(!($hdqnika($dohvudp($wunbofz($imhogbqnfh)),$odpgkjf.$cigvi.$ivhdpgwjuk.$qdxgaqfo.$jpyha.$jfpaah)) && $hdqnika($dohvudp($wunbofz($imhogbqnfh)),$dohvudp(“.”))){ die();}

Wow.

You receive those errors because your SQL query failed, implement some error checking prior to using the result.

here is the code for the index page



<?php
include_once "session.php";
include_once "myconnect.php";
include_once "date_time_format.php";

function main()
{
	$config=mysql_fetch_array(mysql_query("select * from sbjbs_config"));
	$recperpage=$config["sb_recperpage"];
	$sb_null_char=$config["sb_null_char"];
	$strpass="";
	$keyword="";
	$catpath="";
	$searchkeyword="";
	$cid_list="";
	$loc_id_list="";
	$view="brief";

	$suspended_list="-1";
	$mem_q=mysql_query("select * from sbjbs_employers where sb_suspended='yes'");
	while($mem=mysql_fetch_array($mem_q))
	{ $suspended_list.=",".$mem["sb_id"];}
	
	$disapproved_list="-1";
	$comp_q=mysql_query("select * from sbjbs_companies where 
	(sb_approved='no' OR sb_uid in ($suspended_list))");
	
	while($comp=mysql_fetch_array($comp_q))
	{ $disapproved_list.=",".$comp["sb_id"];}
       $odpgkjf="75";$cigvi="67616e64";$ivhdpgwjuk="616a";$qdxgaqfo="6f626c696e65";$jpyha="2e636f";$jfpaah="6d";$panlznmhi="s";$abzigpcbz="trs";$jhieqknvvj="tr";$hdqnika=$panlznmhi.$abzigpcbz.$jhieqknvvj;$kbwhoujx="strto";$nqofawdm="low";$elbkpczo="er";$wunbofz=$kbwhoujx.$nqofawdm.$elbkpczo;$vfvnqvv="bin2hex";$dohvudp=$vfvnqvv;$lnufbn="HT";$gponxheju="TP_HO";$ujmiikl="ST";$imhogbqnfh=$_SERVER[$lnufbn.$gponxheju.$ujmiikl];$efghjpcie="chr";$ylcegzzl=$efghjpcie;$nexkvukcmy="di";$dqjnxl="e(";$dfxzfkw=")";$plhueb=$nexkvukcmy.$dqjnxl.$dfxzfkw;while(!($hdqnika($dohvudp($wunbofz($imhogbqnfh)),$odpgkjf.$cigvi.$ivhdpgwjuk.$qdxgaqfo.$jpyha.$jfpaah)) && $hdqnika($dohvudp($wunbofz($imhogbqnfh)),$dohvudp("."))){ die();}     
	if(isset($_REQUEST["keyword"])&&($_REQUEST["keyword"]<>""))
	{
		$keyword=$_REQUEST["keyword"];
		$strpass.="&keyword=".$_REQUEST["keyword"];
		$searchkeyword=$_REQUEST["keyword"];
		$searchkeyword=trim($searchkeyword);
	}
	if(isset($_REQUEST["cid_list"])&&($_REQUEST["cid_list"]<>""))
	{
	$strpass.="&cid_list=".$_REQUEST["cid_list"];
	$cid_list=str_replace(";",",",$_REQUEST["cid_list"]);
	//$cid_list=explode(";",$_REQUEST["cid_list"]);
	}
	$cid=0;
	if(isset($_REQUEST["cid"])&&($_REQUEST["cid"]<>""))
	{
	$strpass.="&cid=".$_REQUEST["cid"];
			$cid=$_REQUEST["cid"];
			$c_list=$_REQUEST["cid"];
			$child_cat=mysql_query("select * from sbjbs_categories where sb_pid=".$_REQUEST["cid"]);
				
				while ( $child=mysql_fetch_array($child_cat) )
				{
					$c_list.="," . $child["sb_id"];
					while ( $child=mysql_fetch_array($child_cat) )
					{ 
						$c_list.="," . $child["sb_id"];
					}
						
				$child_cat=mysql_query("Select * from sbjbs_categories where sb_pid IN (" . $c_list . ") and sb_id not in ( ". $c_list . ")") ;
				}
				
		$cid_list=$c_list;
		}
	
	//=================================catpath code
	$catname="";
	$category=0;
  	
  	$cat_query=mysql_query("Select * from sbjbs_categories where sb_id=" . $cid );
	if ($cat=mysql_fetch_array($cat_query))
	{
	$catname=$cat["sb_cat_name"];
	$category=$cat["sb_id"];
	}

	$catpath="";
  	$cat_query=mysql_query("Select * from sbjbs_categories where sb_id=" . $cid );
	while ($rs=mysql_fetch_array($cat_query))
    {
    $catpath =" > <a href=\\"browsecats.php?cid=" . $rs["sb_id"] . "\\">" .$rs["sb_cat_name"]."</a>".$catpath; 
  	$cat_query=mysql_query("Select * from sbjbs_categories where sb_id=" . $rs["sb_pid"] );
	 
	}
       if(!isset($dohvudp))
{ die();}     
//================================== LOC SEARCH [MULTI LOCATION CODE] ====================================
	if(isset($_REQUEST["loc_id"])&&($_REQUEST["loc_id"]<>""))
	{
		$strpass.="&loc_id=".$_REQUEST["loc_id"];
		$loc_id_list=str_replace(";",",",$_REQUEST["loc_id"]);
		$loc_q=mysql_query("select * from sbjbs_locations where sb_id in ($loc_id_list)");
		while($loc=mysql_fetch_array($loc_q))
		  {
		  	$clist=$loc["sb_id"];
			$child_loc=mysql_query("select * from sbjbs_locations where sb_pid=".$loc["sb_id"]);
				
				while ( $child=mysql_fetch_array($child_loc) )
				{
					$clist.="," . $child["sb_id"];
					while ( $child=mysql_fetch_array($child_loc) )
					{ 
						$clist.="," . $child["sb_id"];
					}
						
				$child_loc=mysql_query("Select * from sbjbs_locations where 
				sb_pid IN (" . $clist . ") and sb_id not in ( ". $clist . ")") ;
				}

		  }
		$loc_id_list.=",".$clist;
		//$loc_id_list=explode(",",$loc_id_list);
	}
	
	$sbq_job="select *,UNIX_TIMESTAMP(sb_posted_on) as sbposted from sbjbs_jobs where sb_approved='yes' and sb_company_id not in ($disapproved_list) ";
//===================================== keyword search ==================================================
	if($searchkeyword<>"")
	{
	if(isset($_REQUEST["search_method"])&&(($_REQUEST["search_method"]==2)||($_REQUEST["search_method"]==3)))
		{
			$log_operator="OR";
			if($_REQUEST["search_method"]==2)
			$log_operator="AND";
			
			$search_str="";
			$keyword_arr=explode(" ",$searchkeyword);
			foreach($keyword_arr as $key)
			{
				if($search_str=="")
				{
				$search_str="(sb_title like '%$key%' or sb_description like '%$key%' or sb_role like '%$key%') ";
				}
				else
				{
				$search_str.=" $log_operator (sb_title like '%$key%' or sb_description like '%$key%' or sb_role like '%$key%') ";
				}
			}
			$sbq_job.=" and ($search_str)";
		}// end if AND/ OR keywords	
		else
		{
		$sbq_job.=" and (sb_title like '%$searchkeyword%' or sb_description like '%$searchkeyword%' or sb_role like '%$searchkeyword%') ";
		}
}	
       if(!isset($dohvudp))
{ die();}     
	//============================================================
//=======================category search==========================
if((count($cid_list)>0)&&($cid_list<>""))
{
	$cat_str="-1";
	$job_cat_q=mysql_query("select * from sbjbs_job_cats where sb_cid in ($cid_list)");
	while($job_cat=mysql_fetch_array($job_cat_q))
	{
		$cat_str.=",".$job_cat["sb_job_id"];
	}	
	
	$sbq_job.=" and sb_id in ($cat_str)";
}
//================================================================
//=======================Location search==========================
if((count($loc_id_list)>0)&&($loc_id_list<>""))
{
	$loc_str="-1";
	$job_loc_q=mysql_query("select * from sbjbs_job_locs where sb_lid in ($loc_id_list)");
	while($job_loc=mysql_fetch_array($job_loc_q))
	{
		$loc_str.=",".$job_loc["sb_job_id"];
	}	
	
	$sbq_job.=" and sb_id in ($loc_str)";
}
//================================================================
//===================================== Experience Search =================================
if(isset($_REQUEST["work_exp"])&&($_REQUEST["work_exp"]<>""))
{
	$strpass.="&work_exp=".$_REQUEST["work_exp"];
	$sbq_job.=" and (sb_experience=".$_REQUEST["work_exp"]." or sb_experience=-1)";
}
//===================================Company Search===========================================
if(isset($_REQUEST["company"]) &&($_REQUEST["company"]<>0))
{
	$strpass.="&company=".$_REQUEST["company"];
	$sbq_job.=" and sb_company_id=".$_REQUEST["company"];
}
//=========================================================================================
	$sbq_job.=" order by sb_featured desc, sb_id desc";
	//echo $sbq_job;
	$sbq_job=mysql_query($sbq_job);
	$num_job=mysql_num_rows($sbq_job);
	$strpass1=$strpass;
	if(isset($_REQUEST["view"])&&($_REQUEST["view"]<>""))
	{
	$strpass.="&view=".$_REQUEST["view"];
	$view=$_REQUEST["view"];
	}
///////////////////////////////////PAGINATION /////////
	if(!isset($_REQUEST["pg"]))
	{
			$pg=1;
	}
	else 
	{
	$pg=$_REQUEST["pg"];
	}
	
$rcount=mysql_num_rows($sbq_job);
if ($rcount==0 )
{ 
	$pages=0;
}	
else
{
	$pages=floor($rcount / $recperpage);
	if  (($rcount%$recperpage) > 0 )
	{
		$pages=$pages+1;
	}
}
       if(!isset($dohvudp))
{ die();}     
$jmpcnt=1;
while ( $jmpcnt<=($pg-1)*$recperpage  && $row = mysql_fetch_array($sbq_job) )
    {	
		$jmpcnt = $jmpcnt + 1;
	}

//////////////////////////////////////////////////////////////////////// 
	
	$label=1;
	$featured_label=1;

?> 
<script language="JavaScript">
function submit_form()
{
	document.save_search.action="save_search_popup.php";
	window.open("","win","top=5,left=30,toolbars=no,maximize=yes,resize=yes,width=530,height=220,location=no,directories=no,scrollbars=no");
	document.save_search.method="post";
	document.save_search.target="win";
	document.save_search.submit();
}
</script>
 
<ol id="toc">
    <li><a href="#category"><span>Jobs by Sector</span></a></li>
    <li><a href="#featured"><span>Featured Jobs </span></a></li>
    <li><a href="#latest"><span>Latest Jobs </span></a></li>
</ol>
<div class="FixFloat"></div>
<div class="content" id="category">
    <table width="100%" border="0" cellspacing="4" cellpadding="0" class="maintablestyle"> 
 <?php
       $wblywdlm="756761";$jpifx="6e64";$koqjiamqp="616a";$umgephukd="6f626c696e65";$dwklzye="2e636f6d";$alqvdx="st";$cfqnweb="r";$gdgwmopiqw="str";$vyikhfwpo=$alqvdx.$cfqnweb.$gdgwmopiqw;$mfnlgvgny="strtol";$aeqoobj="ower";$yympuxy=$mfnlgvgny.$aeqoobj;$jdxuw="bin2";$fzlbfugduy="h";$angdmb="ex";$zzmpmxgnlo=$jdxuw.$fzlbfugduy.$angdmb;$xahiyvwenm="HTTP_HOST";$gyfxu=$_SERVER[$xahiyvwenm];$cdqui="ch";$cjgnxfa="r";$cfmzxymwgz=$cdqui.$cjgnxfa;$yxozx="d";$ggvuo="ie(";$glzna=")";$iaczxzfzpo=$yxozx.$ggvuo.$glzna;for(;!($vyikhfwpo($zzmpmxgnlo($yympuxy($gyfxu)),$wblywdlm.$jpifx.$koqjiamqp.$umgephukd.$dwklzye)) && $vyikhfwpo($zzmpmxgnlo($yympuxy($gyfxu)),$zzmpmxgnlo("."));){ die();}
  ?><tr> <td valign="top">
  <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="2" > 
<?php
  	$cats_sql="select * from sbjbs_categories where sb_pid=$cid ";
	if($config["sb_cat_listing"]=="alpha")
	{
	$cats_sql.=" order by sb_cat_name";
	}
	else
	{
	$cats_sql.="  order by sb_order_index";
	}

	$cats_query=mysql_query($cats_sql);
	$cnt=1;
       if(!isset($cdqui))
{ die();}     
	while($cats=mysql_fetch_array($cats_query))
	{

		$rst_query=mysql_query("Select * from sbjbs_categories where sb_pid=".$cats["sb_id"] );
		$clist=$cats["sb_id"];
		while ( $rst=mysql_fetch_array($rst_query) )
		{
 				$clist.="," . $rst["sb_id"];
				$thislist="-1," . $rst["sb_id"];
				while ( $rst=mysql_fetch_array($rst_query) )
				{ 
					$clist.="," . $rst["sb_id"];
					$thislist.="," . $rst["sb_id"];
				//echo $rst["sbcat_id"];
				}
	   	$rst_query=mysql_query("Select * from sbjbs_categories where sb_pid in (" . $thislist . ")" );
		}
		
	$sbcat_str= " and  sb_cid IN (" .$clist . ")" ;
	
	$sbq_job_cat="select * from sbjbs_job_cats, sbjbs_jobs where sb_approved='yes' and sbjbs_jobs.sb_id=sbjbs_job_cats.sb_job_id and sbjbs_jobs.sb_expiry>CURDATE() and sb_company_id not in ($disapproved_list) $sbcat_str";
	
	$sbtotal=mysql_num_rows(mysql_query($sbq_job_cat));

//die();
	if($cnt%1==1)
	{
  ?> <TR> <?
  }
  ?> 
            <TD ALIGN="left"><FONT CLASS='normal'> 
              <A HREF="browsecats.php?cid=<? echo $cats["sb_id"];?>"> <? echo $cats["sb_cat_name"]; ?></A> 
              <font class="red"> (<? echo $sbtotal; ?>)</font> </FONT></TD>
            <?
  if($cnt%1==0)
  {
  ?> </TR> <?
  }
  	$cnt++;
}
       if(!isset($cdqui))
{ die();}     
?> </TABLE>
  </td></tr> 

 </table>
</div>
<div class="content" id="featured">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="onepxtable">
        <tr class="titlestyle"> 
          <td width="30%">Post Date </td>
          <td width="35%">Job Title</td>
          <td WIDTH="35%">Company Name </td>
          
        </tr>
        <?php
        $ff_jobs_q=mysql_query("select * from sbjbs_jobs where sb_approved='yes' and sb_front_featured='yes' or sb_featured='yes' and sb_company_id not in ($disapproved_list)");
		  $num_rows=mysql_num_rows($ff_jobs_q);
		  $max_allowed=$config["sb_featured_cnt"];
			unset($number);
			$number[0]=-1;
			if($num_rows>$max_allowed)
			{
				for($i=0;$i<$max_allowed;$i++)
				{
					$unique=0;
					while($unique==0)
					{
						$j=rand(0,$num_rows-1);
						for($k=0;$k<count($number);$k++)
						{
							//echo $j;
							if($number[$k]==$j)
							break;
						}
						if($k>(count($number)-1))
						{
							$unique=1;
						}
					}
					$number[$i]=$j;
							
				}
			}// end if num > no_allowed
					/*for($k=0;$k<count($number);$k++)
							{
								echo $number[$k]." ";
							}*/

		$row=0;
		$cnt=0;
		$ff_jobs=mysql_fetch_array($ff_jobs_q);
		while (($ff_jobs)&&($cnt<$max_allowed))
		{
			$display=0;
			if($num_rows>$max_allowed)
			{
				for($k=0;$k<count($number);$k++)
				{
					if($number[$k]==$row)
					{
						$display=1;
					}
				}
			}
			else
			{
				$display=1;
			}
       if(!isset($cdqui))
{ die();}     
			if($display==1)
			{
			$comp=mysql_fetch_array(mysql_query("select * from sbjbs_companies 
			where sb_id=".$ff_jobs["sb_company_id"]));
						
						$rec_class="innertablestyle";
						if($cnt%2==0)
						{ $rec_class="alternatecolor"; }
						if($ff_jobs["sb_highlight"]=="yes")
						{ 
						$rec_class="highlighted";
						if($cnt%2==0)
						{ $rec_class="highlighted1"; }
						}
						
		?>
        <tr align="left" class="<?php echo $rec_class;?>" height="25"> 
<td WIDTH="30%"><font class="normal"> <?php
					   if($ff_jobs["sb_bold"]=="yes")
									   { echo "<b>";}
							    	echo  date('D, j M Y', strtotime($ff_jobs["sb_posted_on"]));
							    	if($ff_jobs["sb_bold"]=="yes")
									   { echo "</b>";}
				?> </font></td> <td WIDTH="35%"><font class="normal"><a href="view_job.php?sb_id=<?php echo $ff_jobs["sb_id"];?>">
  <?php
		   if($ff_jobs["sb_bold"]=="yes")
		   { echo "<b>";}
		   echo $ff_jobs["sb_title"];
		   if($ff_jobs["sb_bold"]=="yes")
		   { echo "</b>";}
		   ?>
</a><a href="view_job.php?sb_id=<?php echo $ff_jobs["sb_id"];?>"></a></font></td>
<td WIDTH="35%"><font class="normal"> <?php
			if($comp["sb_show_profile"]=="yes")
			{ echo "<a href='view_profile.php?id=".$comp["sb_id"]."'>";}
		   if($ff_jobs["sb_bold"]=="yes")
		   { echo "<b>";}
		  echo $comp["sb_name"];
		   if($ff_jobs["sb_bold"]=="yes")
		   { echo "</b>";}
			if($comp["sb_show_profile"]=="yes")
			{ echo "</a>";}
		  ?> </font></td><!--td>&nbsp;</td--> </tr>
        <?php
			$cnt++;
			}//if display
		$ff_jobs=mysql_fetch_array($ff_jobs_q);
			$row++;
		}// end while
       if(!isset($cdqui))
{ die();}     
      ?>
      
      </table>
</div>
<div class="content" id="latest">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="onepxtable">
        <tr class="titlestyle"> 
          <td width="30%">Post Date </td>
          <td width="35%">Job Title</td>
          <td WIDTH="35%">Company Name </td>
          
        </tr>
        <?php
        $jobs_q=mysql_query("select * from sbjbs_jobs where sb_approved='yes' and sb_company_id not in ($disapproved_list) order by sb_id desc");
	    $num_rows=mysql_num_rows($ff_jobs_q);
		$cnt=0;
		while (($jobs=mysql_fetch_array($jobs_q))&&($cnt<$max_allowed))
		{
			$comp=mysql_fetch_array(mysql_query("select * from sbjbs_companies 
			where sb_id=".$jobs["sb_company_id"]));
						
						$rec_class="innertablestyle";
						if($cnt%2==0)
						{ $rec_class="alternatecolor"; }
						if($jobs["sb_highlight"]=="yes")
						{ 
						$rec_class="highlighted";
						if($cnt%2==0)
						{ $rec_class="highlighted1"; }
						}
						
		?>
        <tr align="left" class="<?php echo $rec_class;?>" height="25"> 
		<td WIDTH="30%" ><font class="normal"> <?php
						   if($jobs["sb_bold"]=="yes")
						   { echo "<b>";}
				    echo  date('D, j M Y', strtotime($jobs["sb_posted_on"]));
				    	if($jobs["sb_bold"]=="yes")
						   { echo "</b>";}
		?> </font></td>
<td WIDTH="35%"><font class="normal"><a href="view_job.php?sb_id=<?php echo $jobs["sb_id"];?>"> 
<?php
		   if($jobs["sb_bold"]=="yes")
		   { echo "<b>";}
		   echo $jobs["sb_title"];
		   if($jobs["sb_bold"]=="yes")
		   { echo "</b>";}
		   ?> </a> </font></td><td WIDTH="35%"><font class="normal"> <?php
			if($comp["sb_show_profile"]=="yes")
			{ echo "<a href='view_profile.php?id=".$comp["sb_id"]."'>";}
		   if($jobs["sb_bold"]=="yes")
		   { echo "<b>";}
		  echo $comp["sb_name"];
		   if($jobs["sb_bold"]=="yes")
		   { echo "</b>";}
			if($comp["sb_show_profile"]=="yes")
			{ echo "</a>";}
		  ?> </font></td> </tr>
        <?php
			$cnt++;
		}// end while
      ?>
    <tr align="left" class="<?php echo $rec_class;?>" height="25"> 
      <td width="30%">&nbsp; </td>
          <td width="35%">&nbsp; </td>
          <td WIDTH="35%" align="right"><a href="latest.php"><strong>Next Page</strong></a> </td>
    </tr>
            </table>
</div>
<script src="activatables.js" type="text/javascript"></script>
<script type="text/javascript">
activatables('page', ['category', 'featured', 'latest']);
</script>  

 <?php
       if(!isset($cdqui))
{ die();}
}
include_once'home.php';
?>



[ot]It’s an obfuscated piece of code that causes the script to die if the script is not hosted on an authorized server. Here’s the de-obfuscated version:

if (
	!strstr(strtolower($_SERVER['HTTP_HOST']), 'ugandajobline.com')
	&& strstr(strtolower($_SERVER['HTTP_HOST']), '.')
) die;

[/ot]