Jump to content

php script error


ssittetlet

Recommended Posts

ok im trying to run a surf site. whats happening is when i click start surfing it sends me to an error page. im not sure why it is doing this so anyone who could help i would appreciate. to sign up on the site and see the error just go to www.ezsurfking.com.. make an account.. then click start surfing from the actual members homepage. the first script i believe is being used when i click start surfing. and the second i believe is what the error is on but im not even sure why i end up getting sent tot he second script. it says the problem is on line 8 of the second script. the first script is called surfbar.php and the second is bar_break.php.

 

<?php

session_start();

include("vars.php");

include("auth.php");

include("headfoot.php");

mysql_connect($db_host, $db_user, $db_pwd);

mysql_select_db($db_name);

$res = checkbarauth();

$usrid = mysql_result($res, 0, "id");

$my_investment = mysql_result($res, 0, "invested");

$my_last_roi = mysql_result($res, 0, "lastroi");

$my_ref = mysql_result($res, 0, "ref");

$mref = $my_ref;

if ($_SESSION['sess_data']['usrid'] != $usrid) {

header("Location: " . $self_url . "bar_break.php?error=session-expired");

mysql_close;

exit;

}

$credit_me = 'yes';

$hour = date('Y-m-d:H');

$date = date("Y-m-d");

$time_now = date("H:i:s");

if (!isset($_SESSION['sess_data']['usrid'])) {

header("Location: " . $self_url . "bar_break.php?error=session-expired");

mysql_close;

exit;

}

$getmem = mysql_query("SELECT * FROM user WHERE id=" . $_SESSION['sess_data']['usrid']);

if (mysql_num_rows($getmem) == 0) {

header("Location: " . $self_url . "bar_break.php?error=user-not-found");

mysql_close;

exit;

}

$lastsurfed = mysql_result($getmem, 0, "lastsurfed");

$dummyt = explode(" ", $lastsurfed);

if ($dummyt[0] != $date) {

$lastsurfed_time = "00:00:00";

} else {

$lastsurfed_time = $dummyt[1];

}

$my_status = mysql_result($getmem, 0, "status");

if ($_SESSION['sess_data']['from'] != md5($_SESSION['sess_data']['surfing'])) {

header("Location: " . $self_url . "bar_break.php?error=inv-access");

mysql_close;

exit;

}

$vf_time_amt = strftime("%H:%M:%S", strtotime("$lastsurfed_time + " . $_SESSION['sess_data']['reftim'] . " seconds"));

if ($vf_time_amt>$time_now) {

$wait = $_SESSION['sess_data']['reftim'] - (time() - $_SESSION['sess_data']['time']);

if ($wait > $_SESSION['sess_data']['reftim'] || $wait == "" || $wait < 0) {

$wait = $_SESSION['sess_data']['reftim'];

}

echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"$wait;URL=" . $self_url . "surfbar.php?vc_val=" . md5($_SESSION['sess_data']['surf_encoder_vals']) . "\"></head><body><span style=\"font-size:150%\"><font face=$fontface>Surfing too fast! Re-connecting in $wait secs..</span></body></html>");

mysql_close;

exit;

}

if ($_GET['vc_val'] == 'begin' && $_GET['coder'] == md5($_SESSION['sess_data']['from'])) {

$credit_me = 'no';

$why = "Starting/Resuming Session";

} elseif ($_GET['vc_val'] != md5($_SESSION['sess_data']['surf_encoder_vals'])) {

header("Location: " . $self_url . "?error=inv-access");

mysql_close;

exit;

}

if (!isset($_SESSION['sess_data']['time']) || (time() - $_SESSION['sess_data']['time']) >= $_SESSION['sess_data']['reftim']) {

$_SESSION['sess_data']['time'] = time();

} else {

$wait = $_SESSION['sess_data']['reftim'] - (time() - $_SESSION['sess_data']['time']);

echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"$wait;URL=" . $self_url . "surfbar.php?vc_val=" . md5($_SESSION['sess_data']['surf_encoder_vals']) . "\"></head><body><span style=\"font-size:150%\"><font face=$fontface>Surfing too fast! Re-connecting in $wait secs..</span></body></html>");

mysql_close;

exit;

}

$res = mysql_query("update site set hour='$hour', cth=0 where hour!='$hour' && cph!=0");

$query = "select id, url from site where usrid!=" .$_SESSION['sess_data']['usrid'] . " && state='Enabled'";

if ($_SESSION['sess_data']['negact'] == 0) {$query = $query . " && credits>=1";}

$query = $query . " && (cth<cph || cph=0)";

$query = $query . " order by rand() limit 1";

$res = mysql_query($query);

if (mysql_num_rows($res) == 0) {

$url = $default_site;

$siteid = 0;

} else {

$url = mysql_result($res, 0, "url");

$siteid = mysql_result($res, 0, "id");

if ($siteid != 0) {

$resas = mysql_query("update site set credits=credits-1, totalhits=totalhits+1, hitslastmail=hitslastmail+1, cth=cth+1 where id=$siteid");

$res = mysql_query("select count(*) from 7statsite where siteid=$siteid && date='$date'");

if (mysql_result($res, 0) == 0) {

$queryas = "insert into 7statsite (siteid, date, last_hit_time, num) values ($siteid, '$date', '$time_now', 1)";

} else {

$queryas = "update 7statsite set last_hit_time='$time_now', num=num+1 where siteid=$siteid && date='$date'";

}

$resa = mysql_query($queryas);

}

}

$_SESSION['sess_data']['surf_encoder_vals'] = md5(rand(10000, 100000000));

$_SESSION['sess_data']['pgv']++;

if (!isset($delay)) {$delay = $_SESSION['sess_data']['reftim'];}

if ($credit_me == 'yes') {

$why = "Credited <b>" . $_SESSION['sess_data']['rate'] . "</b> credit(s)";

$res = mysql_query("SELECT * FROM 7stat WHERE usrid=" . $_SESSION['sess_data']['usrid'] . " && date='$date'");

if (mysql_num_rows($res) == 0) {

$query = "insert into 7stat (usrid, date, time, pg_views, num) values (" . $_SESSION['sess_data']['usrid'] . ", '" . $date . "', '" . $time_now . "', 1, " . $_SESSION['sess_data']['rate'] . ")";

$my_crds_today = $_SESSION['sess_data']['rate'];

$iam_waiting = 'yes';

} else {

$laccess_time = mysql_result($res, 0, "time");

$was_paid_t = mysql_result($res, 0, "received_pay");

$thevftime = strftime("%H:%M:%S", strtotime("$laccess_time + " . $_SESSION['sess_data']['reftim'] . " seconds"));

if ($thevftime>$time_now) {

header("Location: $self_url" . "bar_break.php?error=cheating-timer");

session_destroy();

mysql_close;

exit;

} else {

$query = "update 7stat set time='$time_now', pg_views=pg_views+1, num=num+" . $_SESSION['sess_data']['rate'] . " where usrid=" . $_SESSION['sess_data']['usrid'] . " && date='$date'";

$my_crds_today = mysql_result($res, 0, "num") + $_SESSION['sess_data']['rate'];

if ($was_paid_t == 'no') {

$iam_waiting = 'yes';

} elseif ($was_paid_t == 'yes') {

$iam_waiting = 'no';

}

}

}

$_SESSION['sess_data']['cts'] = $_SESSION['sess_data']['cts'] + $_SESSION['sess_data']['rate'];

$_SESSION['sess_data']['sts']++;

}

if ($_SESSION['sess_data']['mmax'] == 0) {

$extra_js = "top.window.moveTo(0,0);\nif (document.all) {\ntop.window.resizeTo(screen.availWidth,screen.availHeight);\n}\nelse if (document.layers||document.getElementById) {\nif\n(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){\ntop.window.outerHeight = screen.availHeight;\ntop.window.outerWidth = screen.availWidth;\n}\n}\nwindow.focus();\n";

}

echo("<html>\n<head>\n<title>$title</title>\n<link rel=stylesheet type=text/css href=$self_url"."style.css>\n");

echo("<script language=\"JavaScript\">\n<!--\ndefaultStatus = '$title';\nif (parent.location.href == self.location.href) {window.location.href = 'surf.php';}\n

var counter=1+parseInt($delay);

var paused=0;

 

function start_time()

{

do_count();

}

 

function do_count()

{

  if (paused==0){

counter--;

  }

if (counter>=0) {document.f.stimer.value=counter;

setTimeout(\"do_count()\",1000);

}

  if (counter<0)

  {

      document.f.submit();

  }

}

 

function pause_time()

{

  paused=1-paused;

  if (paused==1) {document.f.stopgo.value='« Start Timer »';} else {document.f.stopgo.value='« Pause Timer »';}

}

 

function open_w(imf){

 

    window.open(imf);

return false;

 

}

$extra_js

//-->\n</script>\n");

if ($my_crds_today == "") {$my_crds_today = 'N/A'; }

echo("</head>\n<body onLoad=\"do_count();\" class=bar>\n");

echo("<script language=JavaScript>window.status=\"$title\";top.frames[1].location.href = \"$url\";</script>\n");

echo("<script language=JavaScript>if (document.all) document.body.onmousedown=new Function(\"if (event.button==2||event.button==3)alert('Sorry, right click is disabled here!')\")</script>\n");

echo("<form name=f method=GET><input type=hidden name=\"".session_name()."\" value=" . session_id() . "><input type=hidden name=vc_val value=" . md5($_SESSION['sess_data']['surf_encoder_vals']) . ">

<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\"><tr><td width=\"31%\"><div align=\"center\">");

echo("<input type=button name=\"stimer\" size=4 style=\"border: 0px;border-style: none;Color: $timer_txt;background-color: $timer_bg;text-align: center; top: 0; position: relative; float: center;\" onClick=\"return false;\"> <input name=\"stopgo\" value=\"« Pause Timer »\" type=\"button\" style=\"border: 0px;border-style: none;Color: $timer_txt;background-color: $timer_bg;width:100px; height:20px; text-align: center; top: 0; position: relative; float: center; cursor: hand;\" onClick=\"pause_time();\"><br>

<font size=\"1\">[<a href=$self_url" . "members/ target=_top>Open Account</a>] [<a href=\"#\" onClick=\"open_w('$url');\">Open Site</a>] [<a href=report.php?s=$siteid target=_top>Abuse Report</a>]");

if (isset($_SESSION['sess_data']['contex']) && $credit_me == 'yes') {

    if (($_SESSION['sess_data']['sts'] % $_SESSION['sess_data']['contex']) == 0) {

        $_SESSION['sess_data']['won'] = 'really';

        echo("<br>You have won <b>" . $_SESSION['sess_data']['contey'] . "</b> bonus credits!<br><a href=$self_url" . "bonus.php?next=" . md5($_SESSION['sess_data']['surf_encoder_vals']) . " target=_top>Click here to add them to your account!</a>\n");

    }

}

if (isset($_SESSION['sess_data']['contcx']) && $credit_me == 'yes' && $_SESSION['sess_data']['won'] != 'really') {

    if (($_SESSION['sess_data']['sts'] % $_SESSION['sess_data']['contcx']) == 0) {

        $_SESSION['sess_data']['ccwon'] = 'ccreallycc';

        echo("<br>You have won <b>\$" . $_SESSION['sess_data']['contcy'] . "</b> bonus Cash!<br><a href=$self_url" . "bonus_cash.php?next=" . md5($_SESSION['sess_data']['surf_encoder_vals']) . " target=_top>Click here to credit your account!</a>\n");

    }

}

echo("</font></div></td><td width=\"50%\"><div align=\"center\">$surf_ban_rotator<br><font size=1> User #<b>" . $_SESSION['sess_data']['usrid'] . "</b> $why | Credits this session: <b>" . $_SESSION['sess_data']['cts'] . "</b> | Credits today: <b>$my_crds_today</b></font></div></td></tr></table>\n");

$surplus = 1;

if ($credit_me == 'yes') {

$resins = mysql_query("update user set credits=credits+" . $_SESSION['sess_data']['rate'] . ", lifetime_pages=lifetime_pages+1, lifetime_credits=lifetime_credits+" . $_SESSION['sess_data']['rate'] . " where id=" . $_SESSION['sess_data']['usrid']);

if ($my_status == 'Verified' && $activation_pages >= 1) {

$my_pages_are = mysql_result(mysql_query("SELECT lifetime_pages FROM user WHERE id=" . $_SESSION['sess_data']['usrid']), 0);

$inibon = mysql_result(mysql_query("select value from adminprops where field='inibon'"), 0);

if ($my_pages_are >= $activation_pages) {

$resins = mysql_query("update user set credits=credits+$inibon, lifetime_credits=lifetime_credits+$inibon, status='Active' where id=" . $_SESSION['sess_data']['usrid']);

$surplus = $surplus - $inibon;

if ($mref >= 1) {

$accs = mysql_query("SELECT * FROM acctype");

for ($i = 0; $i < mysql_num_rows($accs); $i++) {

$accids = mysql_result($accs, $i, "id");

$r_bons = mysql_result($accs, $i, "rbonuses");

$r_bons2[$accids] = explode(",", $r_bons);

$acc_r_bon[$accids] = count($r_bons2[$accids]);

}

if ($acc_r_bon[2] > $acc_r_bon[1]) {$greatest = 2; } elseif ($acc_r_bon[1] > $acc_r_bon[2]) {$greatest = 1; } else {$greatest = 2; }

if ($my_ref >= 1 && ($acc_r_bon[1] > 0 || $acc_r_bon[2] > 0)) {

$cc = 0;

$ref_id[$cc]=$my_ref;

for ($v = 0; $v < ($acc_r_bon[$greatest] - 1); $v++) {

$my_ref = get_referral($my_ref);

if(!$my_ref || $my_ref == 0)

break;

++$cc;

$ref_id[$cc] = $my_ref;

}

credit_ref_bonuses($ref_id);

}

}

echo("<center><font size=1>Your account was just awarded the signup bonus of $inibon credits! You are now set to Active status and can now earn from referrals!</font></center>");

}

}

if ($my_crds_today >= $min_credits_to_earn && $iam_waiting == 'yes' && $my_investment > 0) {

if ($my_last_roi < $date) {

$roi_rate = round($roi_conversion_ratio / 100, 3);

$roi_credit_return = $my_investment * $roi_rate;

$updusr = mysql_query("UPDATE user SET roi_cash=roi_cash+$roi_credit_return, lifetot_roi=lifetot_roi+$roi_credit_return, lifetime_cash=lifetime_cash+$roi_credit_return, lastroi='$date' WHERE id=$usrid") or die(mysql_error());

$do_stats = mysql_query("UPDATE 7stat SET received_pay='yes' WHERE usrid=$usrid && date='$date' && received_pay='no'") or die (mysql_error());

$csures = mysql_query("UPDATE adminprops SET value=value-$roi_credit_return WHERE field='csurpl'");

$nns = explode('-', $date);

$yearis = $nns[0];

$monthis = $nns[1];

$get_stats = mysql_query("SELECT * FROM monthly_stats WHERE usrid=$usrid && monthis=$monthis && yearis=$yearis");

if (mysql_num_rows($get_stats) != 0) {

$updsts = mysql_query("UPDATE monthly_stats SET roi_earned=roi_earned+$roi_credit_return, days_paid_roi=days_paid_roi+1, tot_owed=tot_owed+$roi_credit_return, this_month='$date' WHERE usrid=$usrid && monthis=$monthis && yearis=$yearis") or die(mysql_error());

} else {

$updsts = mysql_query("INSERT INTO monthly_stats (usrid, days_paid_roi, roi_earned, tot_owed, monthis, yearis, this_month) VALUES ($usrid, 1, $roi_credit_return, $roi_credit_return, $monthis, $yearis, '$date')") or die(mysql_error());

}

echo("<center><font size=1>Your account was just awarded \$$roi_credit_return for earning $min_credits_to_earn credits in one day!</font></center>");

}

}

$surplus = $surplus - $_SESSION['sess_data']['rate'];

if ($mref >= 1) {

$accs = mysql_query("SELECT * FROM acctype");

for ($d = 0; $d < mysql_num_rows($accs); $d++) {

$accida = mysql_result($accs, $d, "id");

$r_cbons = mysql_result($accs, $d, "levels");

$r_cbons2[$accida] = explode(",", $r_cbons);

$acc_r_cbon[$accida] = count($r_cbons2[$accida]);

}

if ($acc_r_cbon[2] > $acc_r_cbon[1]) {$greatesta = 2; } elseif ($acc_r_cbon[1] > $acc_r_cbon[2]) {$greatesta = 1; } else {$greatesta = 2; }

if ($mref >= 1 && ($acc_r_cbon[1] > 0 || $acc_r_cbon[2] > 0)) {

$ccx = 0;

$refs_id[$ccx]=$mref;

for ($z = 0; $z < ($acc_r_cbon[$greatesta] - 1); $z++) {

$mref = get_referral($mref);

if(!$mref || $mref == 0)

break;

++$ccx;

$refs_id[$ccx] = $mref;

}

$givento_ref = credit_r_bonuses($refs_id,"credits",$_SESSION['sess_data']['rate']);

}

if ($givento_ref > 0) {

$resins = mysql_query("update user set toref=toref+$givento_ref where id=" . $_SESSION['sess_data']['usrid']);

}

}

}

$surpres = mysql_query("update adminprops set value=value+$surplus where field='surplu'");

$resins = mysql_query($query);

$la = date("Y-m-d H:i:s");

$resins = mysql_query("update user set lastaccess='$la', lastsurfed='$la' where id=" . $_SESSION['sess_data']['usrid']);

echo("</form>\n</body>\n</html>");

mysql_close;

exit;

?>

 

 

 

SECOND SCRIPT:

 

 

 

<?php

session_start();

session_register("sess_name");

session_register("sess_passwd");

session_register("sess_data");

include("vars.php");

flush();

header("Cache-control: private");

$_SESSION = array();

session_destroy();

?>

<html>

<head>

<title><? echo("$title"); ?> - Surf Error</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script>

<!--

if (window != top) {

top.location.href=location.href;

}

// -->

</script>

<? echo("<meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\">"); ?>

</head>

<body>

<div align="center">

  <table width="100%" border="0">

    <tr>

      <td height="79"><div align="center"><font size="2" face="<? echo("$fontface"); ?>"><strong><a href="<? echo("$self_url"."login.php"); ?>" target="_top">Click

          Here to Login</a></strong></font></div>

        </td>

      <td width="69%" valign="top"><div align="center">

          <p><font size="2" face="<? echo("$fontface"); ?>"><strong><? echo($_SERVER['QUERY_STRING']); ?><br>

            </strong></font></p>

        </div></td>

    </tr>

  </table>

</div>

</body>

</html>

<?

mysql_close;

exit;

?>

 

 

also another error im getting but im not to worried about right now is how come the image doesnt load up on the members homepage?

 

Thank you anyone who attempts to help me its confusing me pretty bad if you nee dmore info please ask!!!!!

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.