Jump to content
MakeWebGames

Recommended Posts

Posted

<?php

include "config.php";

global $_CONFIG;

if($_GET['code'] != $_CONFIG['code']) { die("Cron Not Ran"); }

define("MONO_ON", 1);

require "class/class_db_{$_CONFIG['driver']}.php";

$db=new database;

$db->configure($_CONFIG['hostname'],

$_CONFIG['username'],

$_CONFIG['password'],

$_CONFIG['database'],

$_CONFIG['persistent']);

$db->connect();

$c=$db->connection_id;

$db->query("UPDATE fedjail set fed_days=fed_days-1");

$q=$db->query("SELECT * FROM fedjail WHERE fed_days=0");

$ids=array();

while($r=$db->fetch_row($q))

{

$ids[]=$r['fed_userid'];

}

if(count($ids) > 0)

{

$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");

}

$db->query("DELETE FROM fedjail WHERE fed_days=0");

$db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");

$db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0");

$db->query("UPDATE users SET gameturns=50");

$stockreset = rand(100,500); //100 is the minimum it will reset to and 500 is maximum, you can change

$db->query("update shopitems set sitemQTY = ".$stockreset." ");

$db->query("UPDATE users SET fishing_aloud=20");

$db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0");

$db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");

$db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0");

$db->query('UPDATE users SET hoesbuy = 0 WHERE hoesbuy > 0 );

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0");

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0 and donatordays>0");

$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0");

$q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");

while($r=$db->fetch_row($q))

{

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");

$coud=$db->fetch_row($cd);

$userid=$r['userid'];

$db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");

$upd="";

$ev="";

if($coud['crSTR'] > 0)

{

$upd.=",us.strength=us.strength+{$coud['crSTR']}";

$ev.=", {$coud['crSTR']} strength";

}

if($coud['crGUARD'] > 0)

{

$upd.=",us.guard=us.guard+{$coud['crGUARD']}";

$ev.=", {$coud['crGUARD']} guard";

}

if($coud['crLABOUR'] > 0)

{

$upd.=",us.labour=us.labour+{$coud['crLABOUR']}";

$ev.=", {$coud['crLABOUR']} labour";

}

if($coud['crAGIL'] > 0)

{

$upd.=",us.agility=us.agility+{$coud['crAGIL']}";

$ev.=", {$coud['crAGIL']} agility";

}

if($coud['crIQ'] > 0)

{

$upd.=",us.IQ=us.IQ+{$coud['crIQ']}";

$ev.=", {$coud['crIQ']} IQ";

}

$ev=substr($ev,1);

if ($upd) {

$db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid");

}

$db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')");

}

$db->query("UPDATE users SET course=0 WHERE cdays=0");

$db->query("TRUNCATE TABLE votes;");

$rem=$db->query("SELECT * FROM users WHERE fedjail=0 AND user_level>0 AND reminder=0");

while($rem1=$db->fetch_row($rem))

{

$lon=($rem1['laston'] > 0) ?date('F j, Y g:i:s a',$rem1['laston']) : "Never";

if($rem1['laston'] > 0)

{

$la=time()-$rem1['laston'];

$unit="seconds";

if($la >= 60)

{

$la=(int) ($la/60);

$unit="minutes";

}

if($la >= 60)

{

$la=(int) ($la/60);

$unit="hours";

if($la >= 24)

{

$la=(int) ($la/24);

$unit="days";

if ($la>30) {

$db->query("UPDATE users SET reminder=1 WHERE userid={$rem1['userid']}");

// send email.

$site_name = "The Destroyers";

$site_mail = "[email protected]";

$bericht = "Inactive Reminder.\n\n";

$bericht .= "Username: ".$rem1['username']."\n";

$bericht .= "Password: ".$rem1['password']."\n";

$bericht .= "Email: ".$rem1['email']."\n";

$bericht .= "\n";

$bericht .= "We have noticed that you have not logged in over 1 month. A lot of changes have happened in our site since then. Why don't you come and try it out. Your account details are still active. So come on and lets all have fun together.";

mail($rem1['email'],"Welcome to ".$site_name,$bericht,"From: ".$site_name." <".$site_mail.">");

}

}

}

}

}

?>

 

 

 

 

 

 

then i get this when i type my game and cron_day.php at the end

Parse error: syntax error, unexpected T_STRING in /home/thedestr/public_html/cron_day.php on line 43

anyone know why?

Posted

Re: cron_day.php

<?php

include "config.php";

global $_CONFIG;

if($_GET['code'] != $_CONFIG['code']) { die("Cron Not Ran"); }

define("MONO_ON", 1);

require "class/class_db_{$_CONFIG['driver']}.php";

$db=new database;

$db->configure($_CONFIG['hostname'],

$_CONFIG['username'],

$_CONFIG['password'],

$_CONFIG['database'],

$_CONFIG['persistent']);

$db->connect();

$c=$db->connection_id;

$db->query("UPDATE fedjail set fed_days=fed_days-1");

$q=$db->query("SELECT * FROM fedjail WHERE fed_days=0");

$ids=array();

while($r=$db->fetch_row($q))

{

$ids[]=$r['fed_userid'];

}

if(count($ids) > 0)

{

$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");

}

$db->query("DELETE FROM fedjail WHERE fed_days=0");

$db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");

$db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0");

$db->query("UPDATE users SET gameturns=50");

$stockreset = rand(100,500); //100 is the minimum it will reset to and 500 is maximum, you can change

$db->query("update shopitems set sitemQTY = ".$stockreset." ");

$db->query("UPDATE users SET fishing_aloud=20");

$db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0");

$db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");

$db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0");

$db->query('UPDATE users SET hoesbuy = 0 WHERE hoesbuy > 0 );

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0");

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0 and donatordays>0");

$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0");

$q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");

while($r=$db->fetch_row($q))

{

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");

$coud=$db->fetch_row($cd);

$userid=$r['userid'];

$db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");

$upd="";

$ev="";

if($coud['crSTR'] > 0)

{

$upd.=",us.strength=us.strength+{$coud['crSTR']}";

$ev.=", {$coud['crSTR']} strength";

}

if($coud['crGUARD'] > 0)

{

$upd.=",us.guard=us.guard+{$coud['crGUARD']}";

$ev.=", {$coud['crGUARD']} guard";

}

if($coud['crLABOUR'] > 0)

{

$upd.=",us.labour=us.labour+{$coud['crLABOUR']}";

$ev.=", {$coud['crLABOUR']} labour";

}

if($coud['crAGIL'] > 0)

{

$upd.=",us.agility=us.agility+{$coud['crAGIL']}";

$ev.=", {$coud['crAGIL']} agility";

}

if($coud['crIQ'] > 0)

{

$upd.=",us.IQ=us.IQ+{$coud['crIQ']}";

$ev.=", {$coud['crIQ']} IQ";

}

$ev=substr($ev,1);

if ($upd) {

$db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid");

}

$db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')");

}

$db->query("UPDATE users SET course=0 WHERE cdays=0");

$db->query("TRUNCATE TABLE votes;");

$rem=$db->query("SELECT * FROM users WHERE fedjail=0 AND user_level>0 AND reminder=0");

while($rem1=$db->fetch_row($rem))

{

$lon=($rem1['laston'] > 0) ?date('F j, Y g:i:s a',$rem1['laston']) : "Never";

if($rem1['laston'] > 0)

{

$la=time()-$rem1['laston'];

$unit="seconds";

if($la >= 60)

{

$la=(int) ($la/60);

$unit="minutes";

}

if($la >= 60)

{

$la=(int) ($la/60);

$unit="hours";

if($la >= 24)

{

$la=(int) ($la/24);

$unit="days";

if ($la>30) {

$db->query("UPDATE users SET reminder=1 WHERE userid={$rem1['userid']}");

// send email.

$site_name = "The Destroyers";

$site_mail = "[email protected]";

$bericht = "Inactive Reminder.\n\n";

$bericht .= "Username: ".$rem1['username']."\n";

$bericht .= "Password: ".$rem1['password']."\n";

$bericht .= "Email: ".$rem1['email']."\n";

$bericht .= "\n";

$bericht .= "We have noticed that you have not logged in over 1 month. A lot of changes have happened in our site since then. Why don't you come and try it out. Your account details are still active. So come on and lets all have fun together.";

mail($rem1['email'],"Welcome to ".$site_name,$bericht,"From: ".$site_name." <".$site_mail.">");

}

}

}

}

}

?>

Posted

Re: cron_day.php

 

<?php
include "config.php";
global $_CONFIG;
if($_GET['code'] != $_CONFIG['code']) { die("Cron Not Ran"); }
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$db->query("UPDATE fedjail set fed_days=fed_days-1");
$q=$db->query("SELECT * FROM fedjail WHERE fed_days=0");
$ids=array();
while($r=$db->fetch_row($q))
{
$ids[]=$r['fed_userid'];
}
if(count($ids) > 0)
{
$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");
}
$db->query("DELETE FROM fedjail WHERE fed_days=0");
$db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");
$db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0");
$db->query("UPDATE users SET gameturns=50");
$stockreset = rand(100,500); //100 is the minimum it will reset to and 500 is maximum, you can change
$db->query("update shopitems set sitemQTY = ".$stockreset." ");
$db->query("UPDATE users SET fishing_aloud=20");
$db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0");
$db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");
$db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0");
$db->query('UPDATE users SET hoesbuy = 0 WHERE hoesbuy > 0 );
$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0");
$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0 and donatordays>0");
$db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0");
$q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");
while($r=$db->fetch_row($q))
{
$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");
$coud=$db->fetch_row($cd);
$userid=$r['userid'];
$db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");
$upd="";
$ev="";
if($coud['crSTR'] > 0)
{
$upd.=",us.strength=us.strength+{$coud['crSTR']}";
$ev.=", {$coud['crSTR']} strength";
}
if($coud['crGUARD'] > 0)
{
$upd.=",us.guard=us.guard+{$coud['crGUARD']}";
$ev.=", {$coud['crGUARD']} guard";
}
if($coud['crLABOUR'] > 0)
{
$upd.=",us.labour=us.labour+{$coud['crLABOUR']}";
$ev.=", {$coud['crLABOUR']} labour";
}
if($coud['crAGIL'] > 0)
{
$upd.=",us.agility=us.agility+{$coud['crAGIL']}";
$ev.=", {$coud['crAGIL']} agility";
}
if($coud['crIQ'] > 0)
{
$upd.=",us.IQ=us.IQ+{$coud['crIQ']}";
$ev.=", {$coud['crIQ']} IQ";
}
$ev=substr($ev,1);
if ($upd) {
$db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid");
}
$db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')");
}
$db->query("UPDATE users SET course=0 WHERE cdays=0");
$db->query("TRUNCATE TABLE votes;");
$rem=$db->query("SELECT * FROM users WHERE fedjail=0 AND user_level>0 AND reminder=0");

while($rem1=$db->fetch_row($rem))
{
$lon=($rem1['laston'] > 0) ?date('F j, Y g:i:s a',$rem1['laston']) : "Never";

if($rem1['laston'] > 0)
{
$la=time()-$rem1['laston'];
$unit="seconds";
if($la >= 60)
{
$la=(int) ($la/60);
$unit="minutes";
}
if($la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if($la >= 24)
{
$la=(int) ($la/24);
$unit="days";
if ($la>30) {
  $db->query("UPDATE users SET reminder=1 WHERE userid={$rem1['userid']}");

  // send email.
  $site_name = "The Destroyers";
  $site_mail = "[email protected]";
    $bericht  = "Inactive Reminder.\n\n";
     $bericht .= "Username: ".$rem1['username']."\n";
     $bericht .= "Password: ".$rem1['password']."\n";
    $bericht .= "Email: ".$rem1['email']."\n";
    $bericht .=  "\n";
    $bericht .= "We have noticed that you have not logged in over 1 month. A lot of changes have happened in our site since then. Why don't you come and try it out. Your account details are still active. So come on and lets all have fun together.";
     mail($rem1['email'],"Welcome to ".$site_name,$bericht,"From: ".$site_name." <".$site_mail.">");
}
}
}
}
}
?>

 

he means put it in them lol i seriously think you should start at html before making a game.

Posted

Re: cron_day.php

mate what people are trying to say is you are asking for help but making it really difficult for anyone to help you...

if you get an error such as you have stating a certain line number in this case line number 43...

just post that line and 5 to 10 lines above it...

no one is going to sit and count the lines of code till they reach the problem line...

posting just these lines (the last line you post being the error line people are more likely to help...

when you post if you look at the buttons above where you are typing in your post you will see a button with a # on it... click this THEN post the code between the [code*] and [/code*] (*'s will not show i have put these into to stop the code box showing...

Posted

Re: cron_day.php

You really should listen to the advice if you want help. Using the tags make it legible and sending us the snippet of code around the error would really help.

Posted

Re: cron_day.php

ok here you go

<?php
include "config.php";
global $_CONFIG;
if($_GET['code'] != $_CONFIG['code']) { die("Cron Not Ran"); }
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$db->query("UPDATE fedjail set fed_days=fed_days-1");
$q=$db->query("SELECT * FROM fedjail WHERE fed_days=0");
$ids=array();
while($r=$db->fetch_row($q))
{
$ids[]=$r['fed_userid'];
}
if(count($ids) > 0)
{
$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");
}
mysql_query("DELETE FROM fedjail WHERE fed_days=0");
mysql_query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");
mysql_query("UPDATE users SET daysold=daysold+1",$c);
mysql_query("UPDATE users SET gameturns=50");
mysql_query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");
mysql_query("UPDATE users SET cdays=cdays-1 WHERE course > 0");
mysql_query('UPDATE users SET hoesbuy = 0 WHERE hoesbuy > 0 );
$stockreset = rand(100,500); //100 is the minimum it will reset to and 500 is maximum, you can change
mysql_query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0",$c);
mysql_query("UPDATE fedjail set fed_days=fed_days-1",$c);
mysql_query("UPDATE users u LEFT JOIN fedjail f ON u.fedjail=f.fed_id SET u.fedjail=0 WHERE f.fed_days=0",$c);
mysql_query("DELETE FROM fedjail WHERE fed_days=0",$c);
while($r=$db->fetch_row($q))

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");
$coud=$db->fetch_row($cd);
$userid=$r['userid'];
$db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");
$upd="";
$ev="";
if($coud['crSTR'] > 0)
{
$upd.=",us.strength=us.strength+{$coud['crSTR']}";
$ev.=", {$coud['crSTR']} strength";
}
if($coud['crGUARD'] > 0)
{
$upd.=",us.guard=us.guard+{$coud['crGUARD']}";
$ev.=", {$coud['crGUARD']} guard";
}
if($coud['crLABOUR'] > 0)
{
$upd.=",us.labour=us.labour+{$coud['crLABOUR']}";
$ev.=", {$coud['crLABOUR']} labour";
}
if($coud['crAGIL'] > 0)
{
$upd.=",us.agility=us.agility+{$coud['crAGIL']}";
$ev.=", {$coud['crAGIL']} agility";
}
if($coud['crIQ'] > 0)
{
$upd.=",us.IQ=us.IQ+{$coud['crIQ']}";
$ev.=", {$coud['crIQ']} IQ";
}
$ev=substr($ev,1);
if ($upd) {
$db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid");
}
$db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')");
}
$db->query("UPDATE users SET course=0 WHERE cdays=0");
$db->query("TRUNCATE TABLE votes;");
$rem=$db->query("SELECT * FROM users WHERE fedjail=0 AND user_level>0 AND reminder=0");

while($rem1=$db->fetch_row($rem))
{
$lon=($rem1['laston'] > 0) ?date('F j, Y g:i:s a',$rem1['laston']) : "Never";

if($rem1['laston'] > 0)
{
$la=time()-$rem1['laston'];
$unit="seconds";
if($la >= 60)
{
$la=(int) ($la/60);
$unit="minutes";
}
if($la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if($la >= 24)
{
$la=(int) ($la/24);
$unit="days";
if ($la>30) {
  $db->query("UPDATE users SET reminder=1 WHERE userid={$rem1['userid']}");

  // send email.
  $site_name = "The Destroyers";
  $site_mail = "[email protected]";
    $bericht  = "Inactive Reminder.\n\n";
     $bericht .= "Username: ".$rem1['username']."\n";
     $bericht .= "Password: ".$rem1['password']."\n";
    $bericht .= "Email: ".$rem1['email']."\n";
    $bericht .=  "\n";
    $bericht .= "We have noticed that you have not logged in over 1 month. A lot of changes have happened in our site since then. Why don't you come and try it out. Your account details are still active. So come on and lets all have fun together.";
     mail($rem1['email'],"Welcome to ".$site_name,$bericht,"From: ".$site_name." <".$site_mail.">");
}
}
}
}
}
?>

 

Parse error: syntax error, unexpected T_STRING in /home/thedestr/public_html/cron_day.php on line 40

this is line 40

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");
Posted

Re: cron_day.php

 

<?php
include "config.php";
global $_CONFIG;
if($_GET['code'] != $_CONFIG['code']) { die("Cron Not Ran"); }
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$db->query("UPDATE fedjail set fed_days=fed_days-1");
$q=$db->query("SELECT * FROM fedjail WHERE fed_days=0");
$ids=array();
while($r=$db->fetch_row($q))
{
$ids[]=$r['fed_userid'];
}
if(count($ids) > 0)
{
$db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")");
}
mysql_query("DELETE FROM fedjail WHERE fed_days=0");
mysql_query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");
mysql_query("UPDATE users SET daysold=daysold+1",$c);
mysql_query("UPDATE users SET gameturns=50");
mysql_query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0");
mysql_query("UPDATE users SET cdays=cdays-1 WHERE course > 0");
mysql_query('UPDATE users SET hoesbuy = 0 WHERE hoesbuy > 0');
$stockreset = rand(100,500); //100 is the minimum it will reset to and 500 is maximum, you can change
mysql_query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0",$c);
mysql_query("UPDATE fedjail set fed_days=fed_days-1",$c);
mysql_query("UPDATE users u LEFT JOIN fedjail f ON u.fedjail=f.fed_id SET u.fedjail=0 WHERE f.fed_days=0",$c);
mysql_query("DELETE FROM fedjail WHERE fed_days=0",$c);
while($r=$db->fetch_row($q))

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");
$coud=$db->fetch_row($cd);
$userid=$r['userid'];
$db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})");
$upd="";
$ev="";
if($coud['crSTR'] > 0)
{
$upd.=",us.strength=us.strength+{$coud['crSTR']}";
$ev.=", {$coud['crSTR']} strength";
}
if($coud['crGUARD'] > 0)
{
$upd.=",us.guard=us.guard+{$coud['crGUARD']}";
$ev.=", {$coud['crGUARD']} guard";
}
if($coud['crLABOUR'] > 0)
{
$upd.=",us.labour=us.labour+{$coud['crLABOUR']}";
$ev.=", {$coud['crLABOUR']} labour";
}
if($coud['crAGIL'] > 0)
{
$upd.=",us.agility=us.agility+{$coud['crAGIL']}";
$ev.=", {$coud['crAGIL']} agility";
}
if($coud['crIQ'] > 0)
{
$upd.=",us.IQ=us.IQ+{$coud['crIQ']}";
$ev.=", {$coud['crIQ']} IQ";
}
$ev=substr($ev,1);
if ($upd) {
$db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid");
}
$db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')");
}
$db->query("UPDATE users SET course=0 WHERE cdays=0");
$db->query("TRUNCATE TABLE votes;");
$rem=$db->query("SELECT * FROM users WHERE fedjail=0 AND user_level>0 AND reminder=0");

while($rem1=$db->fetch_row($rem))
{
$lon=($rem1['laston'] > 0) ?date('F j, Y g:i:s a',$rem1['laston']) : "Never";

if($rem1['laston'] > 0)
{
$la=time()-$rem1['laston'];
$unit="seconds";
if($la >= 60)
{
$la=(int) ($la/60);
$unit="minutes";
}
if($la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if($la >= 24)
{
$la=(int) ($la/24);
$unit="days";
if ($la>30) {
  $db->query("UPDATE users SET reminder=1 WHERE userid={$rem1['userid']}");

  // send email.
  $site_name = "The Destroyers";
  $site_mail = "[email protected]";
    $bericht  = "Inactive Reminder.\n\n";
     $bericht .= "Username: ".$rem1['username']."\n";
     $bericht .= "Password: ".$rem1['password']."\n";
    $bericht .= "Email: ".$rem1['email']."\n";
    $bericht .=  "\n";
    $bericht .= "We have noticed that you have not logged in over 1 month. A lot of changes have happened in our site since then. Why don't you come and try it out. Your account details are still active. So come on and lets all have fun together.";
     mail($rem1['email'],"Welcome to ".$site_name,$bericht,"From: ".$site_name." <".$site_mail.">");
}
}
}
}
}
?>
Posted

Re: cron_day.php

i think there is a missing {

here:

 

while($r=$db->fetch_row($q))

$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");
$coud=$db->fetch_row($cd);

 

try

 

while($r=$db->fetch_row($q))
{
$cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}");
$coud=$db->fetch_row($cd);
Posted

Re: cron_day.php

try running the cron manually... ie take the full link out of your cron panel not the curl bit just the http://yourgame.com etc

if it runs with out erroring manually then your problem is in the cron panel in cpanel... perhaps ask your hosts for help if it is that

Posted

Re: cron_day.php

ok so go into your cron panel find the cron_day url then copy and paste it into the url bar on your browser... this will run it manually... ignore the curl part just copy the link from http://yourgame.com etc including all the long number code at the end of the url...

if it runs correctly you will only see a blank white page, if it errors you will get text...

if it runs currectly then your error is server side NOT script side

Posted

Re: cron_day.php

its working now thanks!

also does anyone know where to get all your config.php and mysql.php information back from? cos i deleted all my file to start again

Posted

Re: cron_day.php

i'm really not understanding this at all...

have you actually bought mccodes ?

if you have deleted all your files then you should only have deleted them from the server, surely you have the original zip file with the script in when you purchased it...

hence you just upload the files again ?

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.   Paste as plain text instead

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