Jump to content

PHP Errors


unknown87

Recommended Posts

Hi,

 

I'm having trouble fixing these errors - can anyone help me?

 

PHP Warning:  require(inc/config.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/bobnkile/public_html/index.php on line 2

 

PHP Warning:  require(inc/config.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/bobnkile/public_html/index.php on line 2

 

PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'inc/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bobnkile/public_html/index.php on line 2

 

INDEX.PHP

<?php
require "inc/init.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?= $title_tag_prefix ?><?= htmlentities( DOC_TITLE ) ?><?= $title_tag_suffix ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<?= $meta_keywords ?>" />
<meta name="description" content="<?= ( defined( "DOC_DESC" ) ) ? DOC_DESC : $meta_description ?>" />
<link href="/css/style.css" rel="stylesheet" type="text/css" media="screen" />
<script src="/js/prototype.js" type="text/javascript"></script>
<script src="/js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="/js/application.js" type="text/javascript"></script>
<?php if ( $optimize ) { ?><script type="text/javascript">init("/inc/optimizedb.php");</script><?php } ?>
<?php if ( $grab ) { ?><script type="text/javascript">init("/inc/autograb.php");</script><script type="text/javascript">init("/inc/pingsitemap.php");</script><?php } ?>
<script type="text/javascript"> 
<!--
naa_siteid="1206954436";
naa_sitename="Girls Game Layer";
naa_test="no";
naa_keywords="Girls, Games, Arcade"; 
naa_noads="";
//-->
</script>
<script type="text/javascript" src="http://aa.voice2page.com/naa_1x1.js"></script>


</head>

<body>
<script type="text/javascript"> 
<!--
naa_siteid="1206954436";
naa_sitename="Girls Game Layer";
naa_test="no";
naa_keywords="Hannah Montana, Ringtones, Debt"; 
naa_noads="";
//-->
</script>
<script type="text/javascript" src="http://aa.voice2page.com/naa_1x1.js"></script>


<div align="center">
<div id="header">
	<div id="top"><br /><br /><br /><br />
		<div id="logo">
			<a href="/" class="logo"><span><?= $site_title ?></span></a>
		</div>
		<div id="menu">
			<a href="/" class="menulink"><span class="icon"><span class="link"><strong>Home</strong></span></span></a>
			<a href="/games" class="menulink"><span class="icon"><span class="link"><strong>Games</strong></span></span></a>
			<a href="/members" class="menulink"><span class="icon"><span class="link"><strong>Members</strong></span></span></a>
			<a href="/news" class="menulink"><span class="icon"><span class="link"><strong>News</strong></span></span></a>
			<a href="/faq" class="menulink"><span class="icon"><span class="link"><strong>FAQ</strong></span></span></a>
			<a href="/links" class="menulink"><span class="icon"><span class="link"><strong>Links</strong></span></span></a>
			<a href="/sitemap" class="menulink"><span class="icon"><span class="link"><strong>Sitemap</strong></span></span></a>
		</div>
		<div id="submenu">
			<?php
			$result = $db->query( "SELECT * FROM `categories` ORDER BY `order` ASC" );
			while ( $g = $db->fetch( $result ) )
			{
				if ( $g["title"] == "Miscellaneous" ) $g["title"] = "Misc.";
				?>
			<a href="/games/<?= $g["url"] ?>" class="blue"><?= htmlentities( $g["title"] ) ?></a>
				<?php
			}
			?>
		</div>
	</div>
</div>
<div id="nav">
	<?php
        if ( $is_guest )
        {
           ?>
	<div id="user-menu" class="left" style="float: left; text-align: left; margin-top: 5px">Logged in as <label>Guest</label>
	You have <?= $user["credits"] ?> credits left! | <a href="/login<? if ( !$is_bot ) { echo "?ref="; echo urlencode( $_SERVER["REQUEST_URI"] ); } ?>" onclick="return(toggleLogin())" class="white">Login</a> | <a href="/register<? if ( !$is_bot ) { echo "?ref="; echo urlencode( $_SERVER["REQUEST_URI"] ); } ?>" class="white">Register</a> | <a href="/lostpass<? if ( !$is_bot ) { echo "?ref="; echo urlencode( $_SERVER["REQUEST_URI"] ); } ?>" class="white">Lost Pass</a></div>
           <?php
        }
        else
        {
        $db->query( "SELECT *, p.id as msgid FROM pms p LEFT JOIN members m ON p.from=m.id WHERE p.`to`=".$user["id"]." AND p.alerted=0 AND p.read_state=0" );
        if ( $db->countRows() > 0 )
        {
                if ( $db->countRows() == 1 )
                {
                        $r = $db->fetch();
                        $dgsd = "You have received a new message from ".$r["username"]." entitled \"".$r["subject"]."\".\n\nWould you like to read it now?";
                        ?>
        <script type="text/javascript">
        <!--
        if ( confirm( unescape( "<?= str_replace('+','%20',urlencode( $dgsd ) )?>" ) ) )
                window.location = '/messenger/view?id=<?= $r["msgid"] ?>';
        //-->
        </script>
                        <?php
                }
                else
                {
                        $r = $db->countRows();
                        $dgsd = "You have $r new messages! \n\nWould you like to go to your inbox now?";
                        ?>
        <script type="text/javascript">
        <!--
        if ( confirm( unescape( "<?= str_replace('+','%20',urlencode( $dgsd )) ?>" ) ) )
                window.location = '/messenger';
        //-->
        </script>
                        <?php
                }
                $db->query( "UPDATE `pms` SET alerted=1 WHERE `to`=".$user["id"]." AND alerted=0" );
        }
           $db->query( "SELECT * FROM `members` WHERE plays>".intval($user["plays"])." OR (plays=".intval($user["plays"])." AND id<=".intval($user["id"]).")" );
           $user["rank"] = $db->countRows();
           ?>
	<div id="user-menu" style="float: left; text-align: left; margin-top: 5px">Logged in as <a href="/profile/<?= htmlentities( $user["username"] ) ?>" class="white"><?= htmlentities( $user["username"] ) ?></a>
	<a href="/rank" class="white">Rank # <?= number_format( $user["rank"] ) ?></a> | <a href="/messenger" class="white">Messenger</a>
	<?php if ( $user["admin"] == "1" ) { ?> | <a href="/admin" class="white">Admin</a><?php } ?> | <a href="/controls" class="white">My Controls</a> | <a href="/logout" onclick="submitLogout(); return false;" class="white">Logout</a></div>
                <?php
        }
        ?>
        <div id="search">
		<form action="/search" method="get">
		 <label>Search</label> <input type="text" name="q" style="background-image: url(/images/inputbg.gif); width: 150px; height: 18px; border: 1px solid #adadad;" /> <input type="image" src="/images/explore.gif" name="submit" value="Explore!" />
		</form>
	</div>
</div>
<div id="header_divider"></div>
<div class="container">
	<div id="login-form" style="display: none">
	 <form method="post" action="/login" onsubmit="submitLogin(); return false;" id="login">
	  <label for="username">Username:</label>
	  <input type="text" name="username" id="username" size="15" tabindex="1" />
	  <label for="password">Password:</label>
	  <input type="password" name="password" id="password" size="15" tabindex="2" />
	  <label for="remember">Remember Me?</label><input type="checkbox" value="1" name="remember" id="remember" tabindex="3"  checked="checked" />
	  <input type="submit" value="Sign In!" onclick="if(submitLogin()); return false;" class="in" tabindex="4" />
	  <span id="login-message" style="padding-left: 10px"></span><span id="loading"></span>
	 </form>
	</div>
   <?php
   if ( defined( "DOC_ADS" ) && DOC_ADS == true && $user["plays"] < $plays_required_for_no_ads )
   {
   		?>
	<div id="ads">
		<?= $top_ad_code ?>
	</div>
		<?php
   }
   ?>
	<?php
	if ( !$is_guest && defined( "DOC_ADS" ) && DOC_ADS == true && !preg_match( "#^/play#", $_SERVER['REQUEST_URI'] ) && $user["joined"] == $user["last_updated"] )
	{
		?>
   <div id="message" align="center">
   		<strong>Tell us about yourself!</strong> Edit your profile now, just <a href="/controls/profile">click here</a>!
   </div><br />
		<?php
	}
	else if ( !preg_match( "#^/play#", $_SERVER['REQUEST_URI'] ) && $is_guest )
	{
		?>
   <div id="message" align="center">
   		<strong>Are you new here?</strong> Please <a href="/register"><strong>register</strong></a> for free! <strong>Already a member?</strong> Please <a href="/login" onclick="new Effect.Fade('message',{duration:1.0}); return(toggleLogin());"><strong>login</strong></a> for unlimited game credits!
   </div><br />
		<?php
	}
	?>
	<?php
	if ( $mod == "home" )
	{
		?>
	<div id="left-side">
		<div id="hot-games">
			<div class="gametitle2"><span class="title">Hot Games</span></div>
			<table width="99%" cellpadding="4" cellspacing="2">
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">game title</strong></td>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">plays</strong></td>
			 </tr>
			<?php
			$db->query( "SELECT * FROM `games` WHERE `plays` > '" .( $hot_games_limit ). "' ORDER BY RAND() LIMIT ".( $home_page_limit ) );
			$excerpt = array( 0 );
			while ( $r = $db->fetch() )
			{
				$excerpt[] = $r["id"];
			?>
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong><a href="/<?= $r["id"] ?>/<?= $r["url"] ?>"><?= htmlentities( shorten( $r["title"], $title_limit ) ) ?></a></strong></td>
			  <td style="border: 1px solid #ccc;"><?= number_format( $r["plays"] ) ?></td>
			 </tr>
			<?php
			}
			?>
			</table>
		</div><br />
		<div id="popular-games">
			<div class="gametitle2"><span class="title">Popular Games</span></div>
			<table width="99%" cellpadding="4" cellspacing="2">
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">game title</strong></td>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">plays</strong></td>
			 </tr>
			<?php
			$db->query( "SELECT * FROM `games` ORDER BY `plays` DESC, `id` DESC LIMIT ".( $home_page_limit ) );
			while ( $r = $db->fetch() )
			{
				$excerpt[] = $r["id"];
			?>
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong><a href="/<?= $r["id"] ?>/<?= $r["url"] ?>"><?= htmlentities( shorten( $r["title"], $title_limit ) ) ?></a></strong></td>
			  <td style="border: 1px solid #ccc;"><?= number_format( $r["plays"] ) ?></td>
			 </tr>
			<?php
			}
			?>
			</table>
		</div><br />
		<div id="newest-games">
			<div class="gametitle2"><span class="title">Newest Games</span></div>
			<table width="99%" cellpadding="4" cellspacing="2">
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">game title</strong></td>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">added</strong></td>
			 </tr>
			<?php
			$db->query( "SELECT * FROM `games` ORDER BY `id` DESC LIMIT ".( $home_page_limit ) );
			while ( $r = $db->fetch() )
			{
				$excerpt[] = $r["id"];
			?>
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong><a href="/<?= $r["id"] ?>/<?= $r["url"] ?>"><?= htmlentities( shorten( $r["title"], $title_limit ) ) ?></a></strong></td>
			  <td style="border: 1px solid #ccc;"><?= gmdate( "n/d/Y", $r["date"] ) ?></td>
			 </tr>
			<?php
			}
			?>
			</table>
		</div><br />
		<div id="random-games">
			<div class="gametitle2"><span class="title">Random Games</span></div>
			<table width="99%" cellpadding="4" cellspacing="2">
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">game title</strong></td>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">plays</strong></td>
			 </tr>
			<?php
			$db->query( "SELECT * FROM `games` WHERE `id` NOT IN(".implode(", ", $excerpt).
				                              ") ORDER BY RAND() LIMIT ".( $home_page_limit ) );
			while ( $r = $db->fetch() )
			{
				$excerpt[] = $r["id"];
			?>
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong><a href="/<?= $r["id"] ?>/<?= $r["url"] ?>"><?= shorten( $r["title"], $title_limit ) ?></a></strong></td>
			  <td style="border: 1px solid #ccc;"><?= number_format( $r["plays"] ) ?></td>
			 </tr>
			<?php
			}
			?>
			</table>
		</div><br />
	</div>
	<?php
}
?>
	<?php
	if ( $mod != "play" )
	{
	?>
	<div id="content">
		<?php
	}
	?>
   		<?= $output ?>
		<?php
		if ( $mod != "home" && $mod != "play" && defined( "DOC_ADS" ) && DOC_ADS == true && $user["plays"] < $plays_required_for_no_ads )
		{
			?>
		<br /><br />
		<div id="mid-adverts">
			<div class="gametitle"><span class="title">Advertisements</span></div>
			<?= $bottom_ad_code ?>
		</div><br />
		<?php
		}
		?>
	</div>
	<?php
	if ( $mod != "play" )
	{
		?>
	<div id="right-side">
		<div id="top-members">
			<div class="gametitle2"><span class="title">Top Members</span></div>
			<table width="99%" cellpadding="4" cellspacing="2">
			 <tr>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">rank</strong></td>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">username</strong></td>
			  <td style="border: 1px solid #ccc;"><strong style="color: #ccc;">plays</strong></td>
			 </tr>
			<?php
			$i = 0;
			$db->query( "SELECT * FROM `members` ORDER BY `plays` DESC, `id` DESC LIMIT ".( $home_page_limit ) );
			while ( $r = $db->fetch() )
			{
			        $i++;
			?>
			 <tr>
			  <td style="border: 1px solid #ccc;">#<?= $i ?></td>
			  <td style="border: 1px solid #ccc;"><strong><a href="/profile/<?= htmlentities( $r["username"] ) ?>"><?= htmlentities( $r["username"] ) ?></a></strong></td>
			  <td style="border: 1px solid #ccc;"><?= number_format( $r["plays"] ) ?></td>
			 </tr>
			<?php
			}
			?>
			</table>
		</div><br />
		<div id="links">
			<div class="gametitle2">
				<div style="float: left"><span class="title">Links</span></div>
				<div style="float: right">
					<span style="margin-right: 30px">( <a href="/exchange/ranks">ranks</a> |
					<a href="/exchange">join</a> )</span>
				</div>
			</div>
			<?php
			$db->query( "SELECT * FROM `traffic` WHERE `incoming` >= 1 ORDER BY `incoming` DESC LIMIT ".( $games_per_page - 20 ) );
			while ( $r = $db->fetch() )
			{
				?>
			- <a href="/out/<?= htmlentities( intval( $r["id"] ) ) ?>" target="_blank"><?= htmlentities( $r["text"] ) ?></a><br />
				<?php
			}
			?>
		</div><br />
		<div id="friends">
			<div class="gametitle2"><span class="title">Friends</span></div>
			<?php
			$db->query( "SELECT * FROM `links` WHERE important=1 ORDER BY `text` ASC" );
			while ( $r = $db->fetch() )
			{
				?>
			- <a href="<?= htmlentities( $r["url"] ) ?>" target="_blank"><?= htmlentities( $r["text"] ) ?></a><br />
				<?php
			}
			?>
		</div><br />
		<div id="users-online">
	   		<?php
	   		$timeout = time() - 900;
			$guests_online = 0;
			$members_online = 0;
			$members = array();
			$db->query( "SELECT * FROM sessions s LEFT JOIN members m ON s.member_id=m.id WHERE s.running_time>$timeout ORDER BY s.running_time DESC" );
			while ( $r = $db->fetch() )
			 {
			 	if ( $r["member_id"] > 0 )
				{
					$members_online++;
					$members[] = "<strong><a title=\"Last activity: ".gmdate( "g:i a", $r["running_time"] )."\" href=\"/profile/".htmlentities( $r["username"] )."\">".$r["username"]."</a></strong>";
				}
				else
					$guests_online++;
				$online++;
			 }
			 ?>
			<div class="gametitle2"><span class="title"><?= number_format( $online ) ?> Users Online</span></div>
			<?= number_format( $members_online ) ?> Members & <?= number_format( $guests_online ) ?> Guests
			<br /><br />
		   	<?= implode( ", ", $members ) ?>
		</div><br />
		<div id="statistics">
			<div class="gametitle2"><span class="title">Statistics</span></div>
			<?php
			$db->query( "SELECT * FROM `members`" );
			$total_members = $db->countRows();
			$db->query( "SELECT * FROM `games`" );
			$total_games = $db->countRows();
			$db->query( "SELECT SUM(today_plays) FROM `games`" );
			$r = $db->fetch();
			$plays_today = $r[0];
			$db->query( "SELECT SUM(plays) FROM `games`" );
			$r = $db->fetch();
			$total_plays = $r[0];
			?>
			Members: <?= number_format( $total_members ) ?><br />
			Games: <?= number_format( $total_games ) ?><br />
			Plays: <?= number_format( $total_plays ) ?><br />
			Plays Today: <?= number_format( $plays_today ) ?>
		</div><br />
	   <?php
	   if ( $mod == "home" && defined( "DOC_ADS" ) && DOC_ADS == true && $user["plays"] < $plays_required_for_no_ads )
	   {
	   		?>
		<div id="sky-ad">
			<div class="gametitle2"><span class="title">Advertisement</span></div>
			<?= $sky_ad_code ?>
		</div><br />
			<?php
		}
		?>
	</div>

   <?php
   if ( $mod != "home" && defined( "DOC_ADS" ) && DOC_ADS == true && $user["plays"] < $plays_required_for_no_ads )
   {
   		?>
	<div id="right-side2">
		<div id="sky-ad">
			<div class="gametitle2"><span class="title">Advertisement</span></div>
			<?= $sky_ad_code ?>
		</div><br />
	</div>
		<?php
	}
	?>
		<?php
	}
	?>
<?php
if ( $mod != "play" )
{
?>
</div>
	<?php
}
?>
<div id="divider"></div>
<div id="footer">
	<div style="float: left; text-align: left;">Copyright © <a href="/"><?= $site_title ?></a> 2008. All rights reserved.</div>
	Powered by <a href="http://www.overgrab.com">OverGrab</a>.
<!-- Start Quantcast tag -->
<script type="text/javascript">
_qoptions={
qacct:"p-e6EnNlOUxJUOY"
};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<a href="http://www.quantcast.com/p-e6EnNlOUxJUOY" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-e6EnNlOUxJUOY.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
</noscript>
<!-- End Quantcast tag -->
</div>
</div><br />
</body>
</html>

 

INIT.PHP

<?php
if ( !file_exists( "inc/config.php" ) )
{
header( "Location: /install/" );
die();
}

require "inc/config.php";
require "inc/cacheconfig.php";
require "inc/functions.php";
$db = new database($database_host, $database_user, $database_pass, $database_name, $_GET["debug"] );

$referer = str_replace( "http://www.", "", $_SERVER['HTTP_REFERER'] );
$referer = str_replace( "http://", "", $referer );
$explode = explode( "/", $referer );
$referer = $explode[0];

if ( $referer )
{
$db->query( "SELECT * FROM `traffic` WHERE `url` LIKE '%$referer%' LIMIT 1" );
if ( $db->countRows() > 0 )
{
	$r = $db->fetch();
	$db->query( "SELECT * FROM `referers` WHERE `referer` = '".$r["id"]."' AND ip_address='".$_SERVER["REMOTE_ADDR"]."' LIMIT 1" );
	if ( !$db->countRows() > 0 )
	{
		$db->query( "INSERT INTO `referers` VALUES ( '', '".$r["id"]."', UNIX_TIMESTAMP(), '".
			$_SERVER['REMOTE_ADDR']."' )" );
		$db->query( "UPDATE `traffic` SET `incoming` = (incoming + 1) WHERE `id` = '".$r["id"]."'" );
	}
}
}

$db->query( "SELECT date FROM `schedule` WHERE object='reset_plays' LIMIT 1" );
$r = $db->fetch();
if ( gmdate( "Y.m.d", $r["date"] ) != gmdate( "Y.m.d" ) )
{
$db->query( "UPDATE `games` SET today_plays=0" );
$db->query( "UPDATE `schedule` SET date=UNIX_TIMESTAMP() WHERE object='reset_plays' LIMIT 1" );
$db->query( "SELECT * FROM `referers` WHERE `referer` = '".$r["id"]."' AND ip_address='".$_SERVER["REMOTE_ADDR"]."' LIMIT 1" );
if ( !$db->countRows() > 0 )
{
	$db->query( "DELETE FROM `referers` WHERE `date` < UNIX_TIMESTAMP()" );
}
$optimize = true;
}

$db->query( "SELECT date FROM `schedule` WHERE object='auto_grab' LIMIT 1" );
$r = $db->fetch();
if ( gmdate( "h", $r["date"] ) != gmdate( "h" ) )
{
$db->query( "UPDATE `schedule` SET date=UNIX_TIMESTAMP() WHERE object='auto_grab' LIMIT 1" );
$grab = true;
}

$mod = ( !empty( $_GET["mod"] ) )? $_GET["mod"] : "home";
$sub = ( !empty( $_GET["sub"] ) )? $_GET["sub"] : false;
$mod = ( file_exists( "modules/mod_".$mod.".php" ) )? $mod : "error";

session_name( "session_id" );
session_start();
output_reset_rewrite_vars();

$db->query( "SELECT * FROM `sessions` WHERE id='".session_id()."'".
                        " AND ip_address='".$_SERVER["REMOTE_ADDR"]."' LIMIT 1" );
if ( $db->countRows() > 0 )
{
$r = $db->fetch();
if ( intval( $r["member_id"] ) == 0 )
	$is_guest = true;
else
{
	$db->query( "SELECT * FROM `members` WHERE id='".intval( $r["member_id"] )."' LIMIT 1" );
	$user = $db->fetch();
}
$db->query( "UPDATE `sessions` SET running_time=UNIX_TIMESTAMP()".
		" WHERE id='".session_id()."' LIMIT 1" );
}
else
{
$db->query( "DELETE FROM `sessions` WHERE id='".session_id()."'" );
$db->query( "INSERT INTO `sessions` VALUES ( '".session_id()."', 0, UNIX_TIMESTAMP(), 0, '".
		$_SERVER['REMOTE_ADDR']."' )" );
$is_guest = true;
}
if ( $is_guest )
{
if ( is_numeric( $_COOKIE["rememberUID"] ) )
{
	$db->query( "SELECT * FROM `members` WHERE id='".intval( $_COOKIE["rememberUID"] )."' LIMIT 1" );
	if ( $r = $db->fetch() )
	{
		if ( md5( $r["password"]."salt" ) == $_COOKIE["rememberHash"] )
		{
			$user = $r;
			$is_guest = false;

			$db->query( "UPDATE `sessions` SET member_id=0, admin=0".
					" WHERE member_id=".$r["id"]." LIMIT 1" );
			$db->query( "UPDATE `sessions` SET member_id=".$r["id"].", admin='".$r["admin"]."' WHERE id='".
					session_id()."' LIMIT 1" );
			if ( $_POST["remember"] == 1 )
			{
				$ts = time() + 31556926;
				setcookie( "rememberUID", $r["id"], $ts, "/", $_SERVER["HTTP_HOST"] );
				setcookie( "rememberHash", md5( $r["password"]."salt" ), $ts, "/", $_SERVER["HTTP_HOST"] );
			}
		}
	}
}
}
if ( mt_rand( 0, 100 ) == 1 )
{
$timeout = time() - 900;
$db->query( "DELETE FROM `sessions` WHERE running_time<=$timeout" );
}
if ( $is_guest )
{
if ( isset( $_COOKIE["credits"] ) )
{
	$user["credits"] = $_COOKIE["credits"];
}
else
{
	$user["credits"] = $startup_credits;
	setcookie( "credits", $startup_credits, time()+(24*3600*30), "/", str_replace( "www.", ".", $_SERVER["HTTP_HOST"] ) );
}
}
$agent = checkAgent();
if ( !empty( $agent ) )
{
$is_bot = true;
}

if ( $cache )
{
require "inc/cache.php";
}
else
{
ob_start();
require "modules/mod_".$mod.".php";
$output = ob_get_contents();
ob_end_clean();
}
?>

 

CONFIG.PHP

<?php
$database_host = "localhost";
$database_name = "4";
$database_user = "4";
$database_pass = "4";
$version = "1.6";
$home_page_title = "test";
$home_page_introduction = "<script type=\"text/javascript\"><!--
google_ad_client = \"pub-6075108699983564\";
/* 300x250, created 9/3/08 */
google_ad_slot = \"3892287202\";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script><script type=\"text/javascript\"><!--
google_ad_client = \"pub-6075108699983564\";
/* 300x250, created 9/3/08 */
google_ad_slot = \"3892287202\";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>";
$home_page_limit = 10;
$site_title = "Girls Games";
$site_email = "[email protected]";
$meta_keywords = "free games,Girls Games,free online games,online games,fun games";
$meta_description = "Play the most free Girls games online. Add your favorite free games to your profile or your website. Meet new friends and chat with other users that love free games.";
$title_tag_prefix = "";
$title_tag_suffix = " - GirlsGameLayer.com";
$startup_credits = 50;
$games_per_page = 40;
$hot_games_limit = 10;
$title_limit = 15;
$description_limit = 75;
$members_per_page = 20;
$members_per_row = 4;
$links_per_row = 4;
$allowed_photos = 6;
$photos_per_row = 4;
$plays_required_for_no_ads = 100000;
$top_ad_code = "<a href=\"http://x.azjmp.com/1YSxd\"><img src=\"/hannah.jpg\"></a>";
$mid_ad_code = "<script type=\"text/javascript\"><!--
google_ad_client = \"pub-6075108699983564\";
/* 468x60, created 8/19/08 */
google_ad_slot = \"9800577101\";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>";
$sky_ad_code = "<!-- START ADTOLL.COM CODE V1.0 -->
<STYLE>
A.at_adv_here_23933, A.at_pow_by_23933 {font-family: Arial,Sans-Serif; font-size: 10px; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; color: #FF0066; text-decoration: none; }
A.at_adv_here_23933:hover, A.at_pow_by_23933:hover { color: #0000FF; text-decoration: underline; }
</STYLE>
<SCRIPT type=\"text/javascript\">
adtoll_see_your_ad_here = 1;
adtoll_your_text = \"Advertise here\";
adtoll_show_powered_by = 0;
adtoll_auto_play = \"N\";
</SCRIPT>
<SCRIPT src=\"http://adserve.adtoll.com/js/at_ag_23933.js\" type=\"text/javascript\"></SCRIPT>
<!-- END ADTOLL.COM CODE V1.0 -->

<script type=\"text/javascript\"><!--
google_ad_client = \"pub-6075108699983564\";
/* 120x600, created 8/19/08 */
google_ad_slot = \"5620296393\";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>";
$bottom_ad_code = "<script type=\"text/javascript\"><!--
google_ad_client = \"pub-6075108699983564\";
/* 300x250, created 9/3/08 */
google_ad_slot = \"3892287202\";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script><script type=\"text/javascript\"><!--
google_ad_client = \"pub-6075108699983564\";
/* 300x250, created 9/3/08 */
google_ad_slot = \"3892287202\";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>";
?>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/143815-php-errors/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.