Jump to content
MakeWebGames

endo

Members
  • Posts

    116
  • Joined

  • Last visited

Everything posted by endo

  1. Re: learning mysql_real_escape_string just need to verify. Thanks again nyna but can anyone tell me how to use the mysql_real_escape_string? as this is helping me majorly :D im just learning on some basic protection, to hopefully secure my site against most hackers...... again major thanks to anyone who helps me here
  2. Re: learning mysql_real_escape_string just need to verify. thank you nyna that is really helpfull and explains it really well :D thanks nyna.
  3. I am learning some basic site protection now and i was wondering would anyone be able to tell me if this is the correct way to use the mysql_real_escape_string? $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid", mysql_real_escape_string(users), mysql_real_escape_string(crystals));
  4. Re: Honor Awards - V2 - Modified by HarryB   $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='100mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'100mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 100 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g100'){ if ($ir['daysingang'] <100) { echo "You need to have been in a gang for 100 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g100'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g100')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 100 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g200'){ if ($ir['daysingang'] <200) { echo "You need to have been in a gang for 200 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g200'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g200')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 200 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g300'){ if ($ir['daysingang'] <300) { echo "You need to have been in a gang for 300 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g300'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g300')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 300 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g400'){ if ($ir['daysingang'] <400) { echo "You need to have been in a gang for 400 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g400'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g400')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 400 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g500'){ if ($ir['daysingang'] <500) { echo "You need to have been in a gang for 500 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 500 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d150'){ if ($ir['donatordays'] <150) { echo "You need to have 150 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d150'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d150')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 150 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d200'){ if ($ir['donatordays'] <200) { echo "You need to have 200 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d200'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d200')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 200 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d300'){ if ($ir['donatordays'] <300) { echo "You need to have 300 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d300'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d300')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 300 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d400'){ if ($ir['donatordays'] <400) { echo "You need to have 400 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d400'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d400')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 400 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d500'){ if ($ir['donatordays'] <500) { echo "You need to have 500 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 500 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } $h->endpage(); ?>
  5. Re: Honor Awards - V2 - Modified by HarryB all ive done is shave a pages off of the original script and shortened it down to one page use the same sql and it will work a treat for v2 anyway lol <?php include_once(DIRNAME(__FILE__) . '/globals.php'); if (!isset($_GET['action'])){ print "<h3>Honor Awards</h3> <h2>[url='HonorExchange.php'] <font color = blue>Exchange Your awards here![/url] </h3> <font color = tan>Level Awards. [url='h2.php?action=level5']Level 5 Honor Award[/url] [url='h2.php?action=level10']Level 10 Honor Award[/url] [url='h2.php?action=level15']Level 15 Honor Award[/url] [url='h2.php?action=level20']Level 20 Honor Award[/url] [url='h2.php?action=level25']Level 25 Honor Award[/url] [url='h2.php?action=level30']Level 30 Honor Award[/url] Crime Awards. [url='h2.php?action=c500']500 crimes completed[/url] [url='h2.php?action=c1000']1000 crimes completed[/url] [url='h2.php?action=c1500']1500 crimes completed[/url] [url='h2.php?action=c2000']2000 crimes completed[/url] [url='h2.php?action=c2500']2500 crimes completed[/url] Money Awards. [url='h2.php?action=1mill']1 million cash[/url] [url='h2.php?action=5mill']5 million cash[/url] [url='h2.php?action=10mill']10 million cash[/url] [url='h2.php?action=20mill']20 million cash[/url] [url='h2.php?action=50mill']50 million cash[/url] [url='h2.php?action=100mill']100 million cash[/url] Gang Awards. [url='h2.php?action=g100']100 Days in Gang[/url] [url='h2.php?action=g200']200 Days in Gang[/url] [url='h2.php?action=g300']300 Days in Gang[/url] [url='h2.php?action=g400']400 Days in Gang[/url] [url='h2.php?action=g500']500 Days in Gang[/url] Donator Awards. [url='h2.php?action=d150']150 Donator Days[/url] [url='h2.php?action=d200']200 Donator Days[/url] [url='h2.php?action=d300']300 Donator Days[/url] [url='h2.php?action=d400']400 Donator Days[/url] [url='h2.php?action=d500']500 Donator Days[/url] </a>"; } if($_GET['action']=='level5') { if ($ir['level'] <5) { echo "You need to be level 5 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level5'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award one time! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level5')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 5. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level10') { if ($ir['level'] <10) { echo "You need to be level 10 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level10'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award one time! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level10')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 10. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level15'){ if ($ir['level'] <15) { echo "You need to be level 15 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level15'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level15')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 15. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level20'){ if ($ir['level'] <20) { echo "You need to be level 20 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level20'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level20')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 20. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level25'){ if ($ir['level'] <25) { echo "You need to be level 25 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level25'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level25')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 25. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level30'){ if ($ir['level'] <30) { echo "You need to be level 30 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level30'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level30')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on reaching level 30. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c500'){ if ($ir['crimesdone'] <500) { echo "You need to have done 500 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 500 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c1000'){ if ($ir['crimesdone'] <1000) { echo "You need to have done 1000 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes1000'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes1000')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 1000 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c1500'){ if ($ir['crimesdone'] <1500) { echo "You need to have done 1500 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes1500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes1500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 1500 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c2000'){ if ($ir['crimesdone'] <2000) { echo "You need to have done 2000 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes2000'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes2000')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 2000 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c2500'){ if ($ir['crimesdone'] <2500) { echo "You need to have done 2500 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes2500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes2500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 2500 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='5mill'){ if (($ir['money']+$ir['bankmoney']) <5000000) { echo "You need to have 5 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='5mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'5mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 5 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='10mill'){ if (($ir['money']+$ir['bankmoney']) <10000000) { echo "You need to have 10 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='10mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'10mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 10 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='20mill'){ if (($ir['money']+$ir['bankmoney']) <20000000) { echo "You need to have 20 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='20mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'20mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 20 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='50mill'){ if (($ir['money']+$ir['bankmoney']) <50000000) { echo "You need to have 50 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='50mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'50mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 50 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='100mill'){ if (($ir['money']+$ir['bankmoney']) <100000000) { echo "You need to have 100 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } the rest follows on the next post
  6. Re: Auto delete old mail very handy can use it for almost all of the recorded pieces of your database simple changes and it can be used for events $db->query("DELETE FROM events WHERE evTIME < (unix_timestamp() -2592000)",$c);
  7. Re: cron day problem..... v2 im using and it may be exterminator but im not sure how to find out
  8. i have a problem with the cron day im not sure what it is as if i manually change it to every minute it works but it will not work at midnight any ideas why this may be happening
  9. Re: Auto delete old mail thanks tonka was looking for an improveent to my method i struggle with unix timestamps so thanks a million tonka :mrgreen:
  10. I was getting fed up of having to run a sql command to clear out all the old mails taking up precious database space so i came up with this. Its a simple thing to do no php file 3 lines is all Simply run this sql alter table mail add mail_old int(11) not null default 0; add these two lines to your cron day $db->("update mail set mail_old=mail_old+1"); $db->("delete mail where mail_old >30"); ///change the 30 above to however long you wanna have the mails for the default ive done here is a month   ---if anyone spots any problems with this please dont hesitate to say and im undoubtably sure someone has a better way of doing it lol as always but hey enjoy it its free---
  11. Re: Register [Free] no problems jds137 and -z-e-r-o- good work on the login and register i hope to see more of your posts they supply me with new ideas all the time :mrgreen:
  12. Re: Register [Free] As Magictallguy said just remove it it reutrns that error becuase in your database you dont have a table called ips just as easily fixed by adding in ips and adding banned ips to that table. i believe that would work if not then just follow Magictallguy's word and just remove it.. Well thats my 2 cents. --endo-- sql for creating the ips would be something like this i think CREATE TABLE `ips` ( `userIP` int(11) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  13. Re: Login [Free] absolutely brilliant mate i will be using some of this with a mix of one of my own in constructionjust to help it move along as im stuck in one bit so this will help greatly thanks again :mrgreen:
  14. Re: [V2] Property gamble either change the percentage or just add in extra options more losses or breaking even easy as my friend takes two seconds
  15. Re: help quick if anyone can thnx zeon still a small problem but ill sort that
  16. Re: help quick if anyone can sorry zeon im feeling a little bit dim at asking this but what?
  17. Re: help quick if anyone can here ya go zeon <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DDDDDD; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #DDDDDD; scrollbar-arrow-color: #DDDDDD; scrollbar-DarkShadow-Color: #DDDDDD; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#DDDDDD; vertical-align:top; text-align:center; } .table { background-color:#DDDDDD; } .table3 { background-color:#DDDDDD; } .table td { background-color:#DDDDDD; height:22px; } .table3 td { background-color:#DDDDDD; } td .alt { background-color:#DDDDDD; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #DDDDDD; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $gn=""; global $staffpage; $bgcolor = 'DDDDDD'; print <<<OUT [img=title2.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] $gn{$u} [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} "; if($ir['upgrade'] ==1) { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } [b]Crystals:[/b] {$ir['crystals']} [b]Honors:[/b]{$ir['honor']} [[url='logout.php']Emergency Logout[/url]] <hr /> [b]Energy:[/b] {$enperc}% <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'DDDDDD'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Start */ /*+++++++++++++++++++++++++++++++++++++*/ //check if incomingData is not empty and of the expected length function checkIncomingData($idata, $minsize, $maxsize) { if ( strlen($idata)<$minsize or strlen($idata)>$maxsize ) { return false; } else { return true; } } //make sure that nothing bad can be entered by the user (-->sql injection attack) function cleanIncomingData($idata) { $cleaned = trim($idata); $cleaned = mysql_real_escape_string($cleaned); return $cleaned; } /*+++++++++++++++++++++++++++++++++++++*/ /* SQL Protection Ended */ /*+++++++++++++++++++++++++++++++++++++*/ ?>
  18. Re: help quick if anyone can still same error zeon even with it now like you said [b]Level:[/b] {$ir['level']} "; if($ir['upgrade'] ==1) { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; }
  19. right i keep getting this error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/endo/public_html/header.php on line 157   [b]Level:[/b] {$ir['level']} if($ir['upgrade'] ==1) ///////this is line 157 { print"<a href=upgrade.php>[b][upgrade][/b]</a>"; } i have been staring at this for ages ive tried numerous things but cant figure it out anyone out there have a solution.
  20. Re: strang ' marks appearing No longer a problem i decided id spend several hours to fix this myself and just made a brand new crime page instead as all i got from this is accusations of being an idiot. I do thank one person on here for saying check your mysql DB which i did and could not find the problem there but thank you very much anyway. CLOSED!!
  21. Re: strang ' marks appearing problem is it duplicates so after a while there are 3 or 4 or more
  22. anyone know how to solve this problem i keep getting new ' appear on my crimes and cant figure out why... Any help anyone ???
  23. Re: [V2] Property gamble Thanks iseeyou i used your code for doorshoot to create this so most credit should go to you :mrgreen:.
  24. Re: [V2] Property gamble thanks for the replys will keep making new ones and this time ill keep the sql safe :D
  25. Heres my first mod. Well a mod of a mod. I do not want credit for this as all i did was change doorshoot for v2 off of here and make it into this. We all know buying and selling property can be a massive gamble so once a day my users can risk all of there on hand cash on a single swing at buying and selling either making a lot of money or losing a lot of it. :D hope you all enjoy. create a new file called property.php <?php include "globals.php"; if ($ir['property'] ==1) {echo "You have already done property dealings today."; EXIT;} if ($ir['hospital']) {echo "You cannot do property dealings while in hospital."; EXIT;} if ($ir['jail']) {echo "You cannot property dealings while in Jail."; EXIT;} if (!isset($_GET['action'])){ echo "<center>Hi and welcome to the property auctioneers, please choose one of the six properties you would like to buy and sell , but be careful, not all of the properties will sell for more than what you paid. <table Border='1' class='table'><tr><td class='table'> [url='property.php?action=do']Tri a door[/url]</td></tr></table>";} else { if($_GET['action']=='do') { $rand=(int) (rand(1,3)); //code start// //property 1 start// if ($rand==1) { echo "You buy property 1 and it manages to sell for 10% more than what you paid for it. [url='index.php']> Back[/url]"; $db->query("UPDATE users SET money=money*1.1 WHERE userid=$userid"); $db->query("UPDATE users SET property=1 Where userid=$userid");}//// //property 1 end// //property 2 start// if ($rand==2) {echo "You buy property 2 and it sells for considerably less than what you paid for it, you only get 80% of its original value."; $db->query("UPDATE users SET money=money*0.8 WHERE userid=$userid"); $db->query("UPDATE users SET property=1 Where userid=$userid");}//// //property 2 end// //property 3 start// if ($rand==3) {echo "You buy property 3 and get a considerable amount more than what you paid for it 30% more infact and 5 crystals."; $db->query("UPDATE users SET crystals=crystals+5 Where userid=$userid"); $db->query("UPDATE users SET money=money*1.3 WHERE userid=$userid"); $db->query("UPDATE users SET property=1 Where userid=$userid");}//// //property 3 end// //code end// } elseif($_GET['action']!='do') { echo "Hacking attempt"; $h->endpage(); exit; } } ?>   add this into cron day $db->query("UPDATE users SET property=100");   and finally run this sql ALTER TABLE `users` ADD `property` INT( 11 ) NOT NULL DEFAULT '100'; should be right now :D
×
×
  • Create New...