Warning: main(../../includes/config.php) [function.main]: failed to open stream: No such file or directory in /home/leavscom/public_html/original/files/voting_offers.php on line 16
Warning: main(../../includes/config.php) [function.main]: failed to open stream: No such file or directory in /home/leavscom/public_html/original/files/voting_offers.php on line 16
Warning: main() [function.include]: Failed opening '../../includes/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/leavscom/public_html/original/files/voting_offers.php on line 16
<?
session_start();
import_request_variables("gPc");
extract($_SESSION);
//*****SETTINGS
$reward="50"; // tokens to give per vote
//*****************
if($_SESSION['user_email']==NULL || $_SESSION['user_password']==NULL) {
echo "Error loading user information. To correct this error you may need to restart your web browser, or you may need to switch browsers temporarily to vote.";
exit;
}
include "../../includes/config.php";
if (!($game=mysql_connect($gamedbhost,$gamedbuser,$gamedbpassword)))
{
print "Connection to the $gamename.leavingscars.com game database failed. Please refresh this page to try again.<br>";
exit;
}
$offers = array (
1 => "http://www.gamesites100.net/in.php?site=11571",
2 => "http://www.xtremetop100.com/in.php?site=1132242257",
3 => "http://www.gtop100.com/in.php?site=22724",
);
if ($va=="vote" AND $vo <= 3 AND $vo <= count($offers)) {
if($offers[$vo]=='')
{
exit;
}
if($vo > '3'){
$time=time();
$ip = $_SERVER['REMOTE_ADDR'];
$sql="INSERT INTO `cheat_check` (`email`,`page`,`ip`,`time') VALUES ('$_SESSION[user_email]', 'Voting Offers','$ip','$time')";
$sql=mysql_query($sql);
die("Cheater, Your IP has been logged!");
exit;
}
$time=time();
$sql="SELECT * FROM voting_offers WHERE email='$_SESSION[user_email]'";
$sql=mysql_query($sql);
$getarray=mysql_fetch_array($sql);
$timeout = $time - $getarray[$vo];
if ($getarray[email]=="")
{
$sql="INSERT INTO `voting_offers` (`email`,`$vo`) VALUES ('$_SESSION[user_email]', '$time')";
$sql=mysql_query($sql);
$sql="UPDATE `voting_offers` SET `$vo`='$time' WHERE email='$_SESSION[user_email]'";
$sql=mysql_query($sql);
$sql="UPDATE `user_characters` SET tokens=tokens+50 WHERE email='$_SESSION[user_email]'";
$sql=mysql_query($sql);
echo "<center><b>You will be redirected to the voting site in a moment...<br><br>Fail to load automatically? <a href=$offers[$vo]>Click here</a>
<script>window.location='$offers[$vo]'</script>
";
}
else
{
if ($timeout < 86400)
{
$clickagain=$getarray[$vo]+86400;
$time_left = $clickagain - $time;;
$time_left = (floor($time_left/86400))."d ".floor(($time_left-(floor($time_left/86400)*86400))/3600)."h ".floor(($time_left-(floor($time_left/3600)*3600))/60)."m ".floor($time_left-(floor($time_left/60))*60)."s";
echo "<title>Leaving Scars: Vote for turns</title><body bgcolor=#000000><font face=arial size=2 color=#FFFFFF>";
echo "You have already voted on this in the past 24 hours, but you may be able to vote on some of the other sites.<br><br>
You may vote on this again in: $time_left";
}
else
{
$sql="UPDATE `voting_offers` SET `$vo`='$time' WHERE email='$_SESSION[user_email]'";
$sql=mysql_query($sql);
$sql="UPDATE `user_characters` SET tokens=tokens+50 WHERE email='$_SESSION[user_email]'";
$sql=mysql_query($sql);
echo "<center><b>You will be redirected to the voting site in a moment...<br><br>Fail to load automatically? <a href=$offers[$vo]>Click here</a>
<script>window.location='$offers[$vo]'</script>
";
}
}
}
?>
<script type="text/javascript"><!--
google_ad_client = "pub-7390873676254799";
/* 468x60, created 12/5/08 */
google_ad_slot = "0997754984";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>