firecamp
Members-
Posts
130 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by firecamp
-
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']}");
-
Re: cron_day.php but that doesnt get me any nearer to solving my error
-
Re: cron_day.php :x we aint all experienced like u i have only just started :x
-
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.">"); } } } } } ?>
-
Re: cron_day.php ok so how do i fix? can you show me the code pls?
-
<?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?
-
i will pay $1 just for someone to tell me how to get rid of a hotlink on my game either mail me or add me on msn [email protected] (and yes i have enabled hotlink protection)
-
Im looking for a coder mail me or add me on this email [email protected] thanks!
-
Re: Need help with simple sql please Shut up I'm new and dunno how to use these codes
-
Re: Need help with simple sql please no its cos in the syql db i put something and i need to change it but dunno wat to put so people arwent on my profile anymore
-
Re: Need help with simple sql please index.php <?php /*----------------------------------------------------- -- Blown City -- A product of GoldenZero.Net -- Copyright held 2007 by GoldenZero -- E-mail: joshisthebest1ca[AT]msn[DOT]com -----------------------------------------------------*/ $housequery=1; include "globals.php"; if($_GET['action'] == "stealth") { if($_POST['stelth'] == 1) { $db->query("UPDATE users SET lastip_login='$IP',last_login=unix_timestamp(),stelth=0 WHERE userid={$ir['userid']}"); print "Stealth Turned Off!"; } else { $db->query("UPDATE users SET lastip_login='$IP',stelth=1 WHERE userid={$ir['userid']}"); print "Stealth Turned On!"; } } if($_GET['action'] == "statussubmit") { $db->query("UPDATE users SET status='{$_POST['status']}' WHERE userid={$ir['userid']}"); print "Your status has been changed. Redirect in 1 second <META HTTP-EQUIV=Refresh CONTENT='1;url=index.php'>"; } if($_GET['action'] == "1") { $db->query("UPDATE users SET bgcolor='FFFFFF', tcolor='black' WHERE userid={$ir['userid']}"); } if($_GET['action'] == "2") { $db->query("UPDATE users SET bgcolor='0000000', tcolor='white' WHERE userid={$ir['userid']}"); } if($ir['hospital']) { $db->query("UPDATE users SET status='{$_POST['status']}' WHERE userid={$ir['userid']}"); print "Your In Surgery. <META HTTP-EQUIV=Refresh CONTENT='0;url=hospital.php'>"; } $exp=(int)($ir['exp']/$ir['exp_needed']*100); if ( !$ir['married'] ) { $marital="<font color='red'>No</font> [<a href=marital.php>Marital</a>]"; } else { $k=mysql_query("SELECT username FROM users WHERE userid={$ir['married']}", $c); $marital="".mysql_result($k,0,0)." "; $marital.="[Manage]"; $mair=mysql_query("SELECT u.*, h.* FROM users u LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE userid={$ir['married']}",$c); $ms=mysql_fetch_array($mair); } if($ir['bguard'] >0) { print " <font color='yellow'>NOTE:</font> Your Bodyguard is protecting you for {$ir['bguard']} more minutes. "; } $fbm=money_formatter($ir['bankmoney']); $fcm=money_formatter($ir['cybermoney']); print "<table width=100% border=0 cellspacing=3> <td class=h colspan=5>Player Info</td> <tr> <td>Name: {$ir['username']}</td> <td>Points: {$cm}</td> <td>Level: {$ir['level']}</td> <td>Exp: {$exp}%</td> </tr> <tr> <td>Money: $fm</td> <td>HP: {$ir['hp']}/{$ir['maxhp']}</td> <td>Bank Money: {$fbm}</td> <td>Cyber Money: {$fcm}</td> </tr> <tr> <td>Busts: {$ir['busts']} Users</td> <td>Bails: {$ir['bails']} Users</td> <td>Busted: {$ir['busted']} Times</td> <td>Jailed: {$ir['jailed']} Times</td> </tr> <tr> <td>Property: {$ir['hNAME']}</td> <td>Tax: <font color='red'>-\${$ir['hTAX']}</font></td> <td>Married: $marital</td> <td>Crimes: {$ir['crimes']}</td> </tr></table> "; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); print " <table width=100% border=0 cellspacing=3> <td class=h colspan=2>Stats Info</td></tr> <tr> <td>Strength: {$ir['strength']} <td>speed: {$ir['agility']} </tr> <tr> <td>defense: {$ir['guard']} <td>Labour: {$ir['labour']} </tr> <tr> <td>IQ: {$ir['IQ']} <td>Total stats: {$ts} </tr> </table> "; $awp=round($ir['attacks_won']/($ir['attacks_total'] > 0 ? $ir['attacks_total'] : 1)*100,2); $alp=round($ir['attacks_lost']/($ir['attacks_total'] > 0 ? $ir['attacks_total'] : 1)*100,2); $atp=round($ir['attacks_total']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $dwp=round($ir['defends_won']/($ir['defends_total'] > 0 ? $ir['defends_total'] : 1)*100,2); $dlp=round($ir['defends_lost']/($ir['defends_total'] > 0 ? $ir['defends_total'] : 1)*100,2); $dtp=round($ir['defends_total']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $twp=round($ir['total_won']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $tlp=round($ir['total_lost']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $bbb=$ir['attacks_won']+$ir['defends_won']; print " <table width=100% border=0 cellspacing=3> <td class=h colspan=4>Attack Record [<u>VIEW ATTACK LOG</u>]</td></tr> <tr> <td>Attacking: </td> <td>Won: <font color='green'>{$ir['attacks_won']}</font> ($awp%)</td> <td>Lost: <font color='red'>{$ir['attacks_lost']}</font> ($alp%)</td> <td>Total: <font color='green'>{$ir['attacks_total']}</font> ($atp%)</td> </tr> <tr> <td>Defending: </td> <td>Won: <font color='green'>{$ir['defends_won']}</font> ($dwp%)</td> <td>Lost: <font color='red'>{$ir['defends_lost']}</font> ($dlp%)</td> <td>Total: <font color='green'>{$ir['defends_total']}</font> ($dtp%)</td> </tr> <tr> <td>Both: </td> <td>Won: <font color='green'>$bbb</font>($twp%)</td> <td>Lost: <font color='red'>{$ir['total_lost']}</font> ($tlp%)</td> <td>Grand Total: <font color='green'>{$ir['total_total']}</font> / Draw's: <font color='green'>{$ir['draws']}</font></td> </tr> </table>"; print " <table width=100% border=0 cellspacing=3> <td class=h colspan=4>Car Racing Record</td></tr> <tr> <td>Cars Owned: <font color='green'>{$ir['cars_owned']}</font></td> <td>Cars Won: <font color='green'>{$ir['cars_won']}</font></td> <td>Cars Lost: <font color='red'>{$ir['cars_lost']}</font></td> <tr> <td>Races Won: <font color='green'>{$ir['cars_races_won']}</font></td> <td>Races Lost: <font color='red'>{$ir['cars_races_lost']}</font></td> <td>Race Income: <font color='green'>{$ir['cars_races_income']}</font></td> <tr> <td>Races Sent Friendly: {$ir['cars_races_friendly']}</td> <td>Races Sent Betted: {$ir['cars_races_betted']}</td> <td>Races Sent: {$ir['cars_challs_sent']}</td> <tr> <td>Races Accepted: <font color='green'>{$ir['cars_challs_accpt']}</font></td> <td></td> <td>Races Declined: <font color='red'>{$ir['cars_challs_decln']}</font></td> </tr> </table> "; if(isset($_POST['pn_update'])) { $db->query("UPDATE users SET user_notepad='{$_POST['pn_update']}' WHERE userid={$ir['userid']}"); $ir['user_notepad']=stripslashes($_POST['pn_update']); print "<hr width=75%>Personal Notepad Updated!"; } print "<hr width=75%>Your Personal Notepad:<form action='index.php' method='post'> <textarea rows='10' cols='75%' name='pn_update' class=textbox>".htmlspecialchars($ir['user_notepad'])."</textarea> <input class='textbox' type='submit' value='Update Notes' /></form>"; /* //merits //stats $ab=$db->query("SELECT * FROM userstats WHERE userid={$ir['userid']}"); $ab=$db->fetch_row($ab); $ai=$db->query("SELECT * FROM merits WHERE mHAVE='strength10000' AND mUSERID={$ir['userid']}"); if($db->num_rows($ai)==0 && $ab['strength']>10000) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for having more then 10,000 Strength!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','strength10000')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $bi=$db->query("SELECT * FROM merits WHERE mHAVE='agility10000' AND mUSERID={$ir['userid']}"); if($db->num_rows($bi)==0 && $ab['agility']>10000) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for having more then 10,000 Speed!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','speed10000')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $ci=$db->query("SELECT * FROM merits WHERE mHAVE='guard10000' AND mUSERID={$ir['userid']}"); if($db->num_rows($ci)==0 && $ab['guard']>10000) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for having more then 10,000 Defense!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','Defense10000')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $di=$db->query("SELECT * FROM merits WHERE mHAVE='labour10000' AND mUSERID={$ir['userid']}"); if($db->num_rows($di)==0 && $ab['labour']>10000) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for having more then 10,000 Labour!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','labour10000')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } //level $ei=$db->query("SELECT * FROM merits WHERE mHAVE='level5' AND mUSERID={$ir['userid']}"); if($db->num_rows($ei)==0 && $ir['level']>4) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for reaching level 5!!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','level5')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $ei=$db->query("SELECT * FROM merits WHERE mHAVE='level10' AND mUSERID={$ir['userid']}"); if($db->num_rows($ei)==0 && $ir['level']>9) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for reaching level 10!!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','level10')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $fi=$db->query("SELECT * FROM merits WHERE mHAVE='level15' AND mUSERID={$ir['userid']}"); if($db->num_rows($fi)==0 && $ir['level']>14) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for reaching level 15!!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','level15')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $gi=$db->query("SELECT * FROM merits WHERE mHAVE='level20' AND mUSERID={$ir['userid']}"); if($db->num_rows($gi)==0 && $ir['level']>19) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for reaching level 20!!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','level20')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } else { } $hi=$db->query("SELECT * FROM merits WHERE mHAVE='level25' AND mUSERID={$ir['userid']}"); if($db->num_rows($hi)==0 && $ir['level']>24) { $db->query("UPDATE users SET merits=merits+1"); $mtext="Congratulations you recieved 1 merit for reaching level 25!!"; $db->query("INSERT INTO merits VALUES('','{$ir['userid']}','level25')"); $db->query("INSERT INTO events VALUES('',{$ir['userid']},UNIX_TIMESTAMP(),0,'$mtext')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$ir['userid']}"); } */ $h->endpage(); ?> job.php <?php $jobquery=1; include "globals.php"; $_GET['interview'] = abs((int) $_GET['interview']); if(!$ir['job']) { if(!$_GET['interview']) { print "You do not yet have a job. A list of jobs is available below. "; $q=$db->query("SELECT * FROM jobs"); while($r=$db->fetch_row($q)) { print "<table width='500' cellspacing=1 class='table'><tr style='background:gray;'><th><center>{$r['jNAME']}</th></table><table width='500' cellspacing=1 class='table'><tr style='background:gray;'><td><center>{$r['jDESC']}</td></table><table width='500' cellspacing=1 class='table'><tr style='background:gray;'><td><center>Go to interview</td></table> "; } } else { $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}"); $r=$db->fetch_row($q); print "{$r['jOWNER']}: So {$ir['username']}, you were looking for a job with us? {$ir['username']}: Yes please! "; if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;"); print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow. {$ir['username']}: Thanks! :)"; } else { print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:"; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more strength, "; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more labour, "; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "before you'll be able to work here! :'("; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; print "<h3>Your Job</h3> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm! You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour! <table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> Job Ranks <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } print "</table> > Try To Get Promoted > Quit"; } function job_promote() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if($db->num_rows($q) == 0) { print "Sorry, you cannot be promoted at this time. > Back"; } else { $r=$db->fetch_row($q); $db->query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid"); print "Congrats, you have been promoted to {$r['jrNAME']} > Back"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid"); print "You have quit your job! > Back"; } $h->endpage(); ?>
-
Re: Need help with simple sql please Yes it is mccodes when other people loginin on the index.php and job.php they are logged in as me
-
ok when everyone logs in on index.php they are logged in as me this also happens on the jobs page if you know how to fix it please reply or add this email [email protected] thanks!
-
Basically when everyone logs in on the index they are on my profile this also happens on the job page can someone pls tell me the sql to fix this either on here or on my hotmail [email protected] thanks!
-
Re: Need help with this i have done the cron jobs yes but i dont know how to put it in the cron day file
-
Re: Need help with this i been on there but dont know what to do
-
Re: Need help with this none of my crons work except energy and nerve im no good at crons :-(
-
Re: Need help with this i dunno how lol
-
Re: Need help with this My voting sites do not work any more it always says i have already voted if you can help pls add me on msn [email protected] thanks
-
[McCodes V2] Intimidate Witness (Donator Only)
firecamp replied to Dayo's topic in Free Modifications
Re: [McCodes V2] Intimidate Witness (Donator Only) Loving this mod thankyou very much :lol: -
Re: Need help with this Also whenever any other players login on the homepage they are automatically on my account this also happens on the job page. If anyone can help pls add me on msn [email protected] thanks!
-
Re: Need help with this oh :oops:
-
Re: Need help with this pls add me on msn people and we will talk on there my addy is [email protected]
-
Re: Need help with this ok i will give it a go thanks
-
Re: Need help with this how do i do this? soz im still a noob :|