Jump to content
MakeWebGames

bladewolf2010

Members
  • Posts

    369
  • Joined

  • Last visited

Everything posted by bladewolf2010

  1. I never said have your computer on all the time.. just if something happens on the hosts end. Even if you pay for hosting you still can have problems with crons..
  2. It is sometimes needed if your host is having problems and crons stop working.. Great idea if something on host's end happens.
  3. Would this work if your on V2 but chose to use V1 script?   if (file_exists('globals.php')) {include 'globals.php'; } else { require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); }
  4. if your a certain level it won't give %. please use the right section next time
  5. Still don't work
  6. will it do it automatically?
  7. It supposed to delete shout_box messages but it doesn't If you can help me i greatly appreciate it error is QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-14' at line 1 Query was SELECT `id` FROM `shout_box` ORDER BY `id` ASC LIMIT -14;   <?php include_once(DIRNAME(__FILE__) .'/globals.php'): $count = 0; $num = $db->fetch_row($db->query("SELECT COUNT(`id`) as `numb` FROM `shout_box`;")); $amount = $num['numb']-15; $chats = $db->query("SELECT `id` FROM `shout_box` ORDER BY `id` ASC LIMIT ". $amount .";"); while($chat = $db->fetch_row($chats)) { $db->query("DELETE FROM `shout_box` WHERE (`id` = ". $chat['id'] ."):"); $count++; } echo $count.' rows deleted.'; ?>   the SQL for shout box is [mysql]CREATE TABLE IF NOT EXISTS `shout_box` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL, `time` text NOT NULL, `message` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;[/mysql]
  8. Care to fix? It's an attempt to secure something on my part.
  9. Thank you for the help before hand. Its a noob question To ask but I'm drawing a blank. Thanks again.   How would i add case 'marriage2': do_demand_take(); break; case 'marriage': demand_take(); break;   AND   "; if($ir['married']) { print "[url='preferences.php?action=marriage']Marriage Allowance Change[/url] "; } print "   AND   function demand_take() { global $ir,$c,$userid,$h; if($ir['married']) { print "<h3>Marriage Allowances</h3> Disactivating this means your partner has [b]no[/b] access to take your money "; if($ir['demand_take'] == 0) { print "[url='preferences.php?action=marriage2']Click here to allow your partner to take your money![/url] "; } else { print "[url='preferences.php?action=marriage2']Click here to [b]not[/b] allow your partner to take your money![/url] "; } } } function do_demand_take() { global $ir,$c,$userid,$h; if($ir['married']) { if($ir['demand_take'] == 1) { mysql_query("UPDATE users SET demand_take=0 WHERE userid=$userid",$c); print "Your partner can [b]not[/b] take any money from you anymore! [url='preferences.php']Back[/url]"; } else { mysql_query("UPDATE users SET demand_take=1 WHERE userid=$userid",$c); print "Your partner can now take money from you! [url='preferences.php']Back[/url]"; } } }     to this preference       <?php include_once (DIRNAME(__FILE__). '/globals.php'); // XSS Prevention. function NoXSS($Var) { return (get_magic_quotes_gpc()) ? htmlspecialchars($Var) : addslashes(htmlspecialchars($Var)); } $_GET['act'] = isset($_GET['act']) && ctype_alpha($_GET['act']) ? trim($_GET['act']) : 'Index'; switch ($_GET['act']) { case 'SexChange': SexChange(); break; case 'PassChange': PassChange(); break; case 'namechange':namechange();break; case 'DPChange': DPChange(); break; case 'racechange2':do_race_change();break; case 'racechange':conf_race_change();break; case 'ForumSig': ForumSig(); break; default: Index(); break; } if (!in_array($_GET['act'], array('Index', 'SexChange', 'PassChange', 'nameChange', 'DPChange', 'ForumSig', 'do_race_change', 'conf_race_change'))) { print "Ip Logged"; } // Index Function. function Index() { echo '<h3 style="text-decoration: underline;">Your Preferences</h3> [url="preferences.php?act=SexChange"]Sex Change[/url] [url="preferences.php?act=PassChange"]Password Change[/url] [url="preferences.php?act=namechange"]Username Change[/url] [url="preferences.php?act=DPChange"]Display Picture Change[/url] [url="preferences.php?act=ForumSig"]Forum Info Change[/url] '; } // Sex Change Function. function SexChange() { global $ir, $db; if($ir['gender'] == "Male") { $g="Female"; } else { $g="Male"; } if (isset($_POST['NewGender'])) { $db->query(sprintf("UPDATE `users` SET `gender`='%s' WHERE `userid`='%d'", $_POST['NewGender'], $ir['userid'])); echo sprintf("You Are Now A %s", $_POST['NewGender']); exit; } else{ echo '<h3 style="text-decoration: underline;">Sex Change</h3> <form action="preferences.php?act=SexChange" method="post">'; echo sprintf("<input type='hidden' name='NewGender' value='%s' />", $NewGender); echo sprintf("You Are Currently A Are %s, Are You Sure You Want To Become A %s? ", $ir['gender'], $NewGender); echo '<input type="submit" value="Yes!" /> </form>'; } } // Password Change Function. function PassChange() { global $ir, $db, $c; $Info = $db->fetch_row($db->query(sprintf("SELECT `userid`, `userpass`, `login_name` FROM `users` WHERE `userid`='%d'", $ir['userid']))); if (isset($_POST['OldPass'], $_POST['NewPass1'])) { if ($_POST['NewPass1'] == '') { echo 'Error! You Entered No Password '; } else if (md5($_POST['OldPass']) != $Info['userpass']) { echo 'Error! The Current Password Is Inncorrect! '; } else { $db->query(sprintf("UPDATE `users` SET `userpass`='%s' WHERE `userid`='%d'", md5($_POST['NewPass1']), $ir['userid'])); echo 'Your Password Has Been Updated! Your New Password Is: [i]'.$_POST['NewPass1'].'[/i] Keep This Password Safe And Don\'t Tell Anyone It. > [url="index.php"]Home[/url]'; } } else { echo '<h3 style="text-decoration: underline;">Password Change</h3> <form action="preferences.php?act=PassChange" method="post"> Current Password: <input type="password" name="OldPass" /> New Password: <input type="password" name="NewPass1" /> <input type="submit" value="Change Password!" /> </form>'; } } // Name Change Function. function namechange() { global $c,$db,$ir; if (isset($_POST['NewName'])) { $CheckLog = mysql_num_rows(mysql_query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `login_name`='%s' AND `userid`!='%d'", $_POST['NewName'], $_SESSION['userid'], $c))); $CheckGame = mysql_num_rows(mysql_query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `username`='%s' AND `userid`!='%d'", $_POST['NewName'], $_SESSION['userid'], $c))); if (trim($_POST['NewName']) == '') { echo 'Error! You Did Not Enter A New Name '; } else if ($CheckLog) { echo 'Error! This Name Is In Use '; } else if ($CheckGame) { echo 'Error! This Name Is In Use '; } else if (strlen($_POST['NewName']) < '4') { echo 'Error! This Name Is Too Short'; } else if (strlen($_POST['NewName']) > '15') { echo 'Error! This Name Is Too Long'; } else { $_POST['NewName'] = str_replace(array("<", ">", "'", ";"), array("", "", "", ""), $_POST['NewName']); $db->query("INSERT INTO `namechange` VALUES('','".$ir['username']."','".$_POST['NewName']."',".$ir['userid'].")"); echo 'You Have Sent your name change request!'; } } else { echo '<h3>Name Change</h3> Please note that you still use the same name to login, this procedure simply changes the name that is displayed. Name changes will not be immediate. You must wait for the staff to Review and accept/Deny. If denied you will be informed as to why. <form act="preferences.php?act=namechange" method="post"> New Name: <input type="text" name="NewName" /> <input type="submit" value="Change Name" /> </form>'; } } // Display Picture Change Function. function DPChange() { global $ir, $db; $Pic = $db->query(sprintf("SELECT `display_pic` FROM `users` WHERE `userid`='%d'", $ir['userid'])); if (isset($_POST['NewPic'])) { if ($_POST['NewPic'] == '') { echo 'You Did Not Enter An Image'; } else { if(!preg_match('~(.?).(jpg|jpeg|gif|png)~i', $_POST['NewPic'])) { print "Ip Logged"; } else { $_POST['NewPic'] = str_replace(array("<", ">", "'", ";", ".php", ".html", ".js"), array("", "", "", "", "", "", ""), $_POST['NewPic']); $db->query(sprintf("UPDATE `users` SET `display_pic`='%s' WHERE `userid`='%d'", $_POST['NewPic'], $ir['userid'])); echo 'Picture Changed'; } } } else { echo '<h3>Pic Change</h3> Please note that this must be externally hosted, [url="http://imageshack.us"]ImageShack[/url] is our recommendation. <form action="preferences.php?act=DPChange" method="post">'; echo sprintf("New Pic: <input type='text' name='NewPic' value='%s' /> ", $Pic['display_pic']); echo ' <input type="submit" value="Change Picture" /> </form>'; } } //Do race change. function conf_race_change() { global $ir,$c,$userid,$h; if(isset($_POST['race'])) { $db->query("UPDATE users SET race= '".mysql_real_escape_string($_POST['race'])."' WHERE userid=$userid"); echo ("You Have Changed your Race Type! [url='preferences.php']Back[/url]"); exit($h->endpage()); } print "<center><hr width='20%'>Race Change<hr width='20%'> <form action='preferences.php?action=racechange2' method='post'> <select class=textbox name='race'> <option value='Wizard'>Wizard</option> <option value='Ware Wolf'>Ware Wolf</option> <option value='Vampire'>Vampire</option> <option value='Yeti'>Yeti</option> <option value='Elf'>Elf</option> <option value='Zombie'>Zombie</option> <option value='Beast'>Beast</option> <option value='Dwarf'>Dwarf</option> <option value='Gangsta'>Gangsta</option> <option value='Criminal'>Criminal</option> <option value='Pimp'>Pimp</option> <option value='Member'>Member</option> <option value='God'>God</option> <option value='Pilot'>Pilot</option> <option value='Boxer'>Boxer</option> <option value='Chief'>Chief</option> <option value='Cop'>Cop</option> <option value='Creature'>Creature</option> <option value='Seller'>Seller</option> <option value='Buyer'>Buyer</option> <option value='Goth'>Goth</option> <option value='Thief'>Thief</option> <option value='Hacker'>Hacker</option> <option value='Skeleton'>Skeleton</option> <option value='Demon'>Demon</option> <option value='Goblin'>Goblin</option> <option value='Unknown' SELECTED>Unknown</option> </Select> <input class='textbox' type='submit' value='Change Race' /> </form>"; } function do_race_change() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET race='{$_POST['race']}' WHERE userid=$userid"); print "You Have Changed your Race Type! [url='preferences.php']Back[/url]"; } // Forum Info Change Function. function ForumSig() { global $ir, $db; if (isset($_POST['NewFSig'])) { $db->query(sprintf("UPDATE `users` SET `forums_avatar`='%s', `forums_signature`='%s' WHERE `userid`='%d'", NoXSS($_POST['FPic']), NoXSS($_POST['NewFSig']), $ir['userid'])); echo 'Forum Info Updated'; } else { echo '<h3>Forum Info Change</h3> Please note that the avatar must be externally hosted, [url="http://imageshack.us"]ImageShack[/url] is our recommendation. <form action="preferences.php?act=ForumSig" method="post">'; echo sprintf("Avatar: <input type='text' name='NewFPic' value='%s' /> ", $ir['forums_avatar']); echo sprintf("Signature (you may use BBcode): <textarea rows='10' cols='50' name='NewFSig'>%s</textarea> ", $ir['forums_signature']); echo '<input type="submit" value="Change Info" /> </form>'; } } $h->endpage(); ?>
  10. Still says invalid user
  11. <?php $_GET['ID'] = abs(@intval($_GET['ID'])); include_once (DIRNAME(__FILE__) . '/globals.php'); if ($_POST['ID'] < 0) { echo 'Nice Try Trying To Exploit Rain of Heaven!. An Event of you trying to cheat our Crystals Market has been sent to id 1!'; event_add(1,"ID {$userid} Has just tried exploiting the crystal market!");exit; } if ($_POST['amnt'] < 0) { echo 'Nice Try Trying To Exploit Rain of Heaven!. An Event of you trying to cheat our Crystals Market has been sent to id 1!'; event_add(1,"ID {$userid} Has just tried exploiting the crystal market!");exit; } if ($_POST['price'] < 0) { echo 'Nice Try Trying To Exploit Rain of Heaven!. An Event of you trying to cheat our Crystals Market has been sent to id 1!'; event_add(1,"ID {$userid} Has just tried exploiting the crystal market!");exit; } if ($ir['hospital'] > 0 || $ir['jail'] > 0) { die("You cannot view this page while you are in hospital / jail."); } if (eregi("[^0-9]", $_GET[iD])) { print " Well.. i got some good news for you.. good news is that it didn't work.. bad news is that i caught you and you are now going to fed for life and your account deleted... Have fun rotting in hell!"; $db->query("INSERT INTO fedjail VALUES('',".$ir['userid'].",365,1,'Attempted an SQL Injection.')"); $db->query("UPDATE users SET fedjail=1 WHERE userid=$userid"); $db->query("INSERT INTO events VALUES('', 1, unix_timestamp(),'0','<a href=viewuser.php?u={$ir['userid']}>{$ir['username']}</a> tried to do a sql injection to the crystal market')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid=1"); stafflog_add("{$ir['username']} tried to do a sql injection to the crystal market, Fedded for 365 days."); $h->endpage(); exit; } print "<h3>Crystal Market</h3>"; switch($_GET['action']) { case "buy": crystal_buy(); break; case "remove": crystal_remove(); break; case "add": crystal_add(); break; default: cmarket_index(); break; } function cmarket_index() { global $db,$ir,$c,$userid,$h; print "[url='cmarket.php?action=add']> Add A Listing[/url] Viewing all listings... <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Adder</th> <th>Qty</th> <th>Price each</th> <th>Price total</th> <th>Links</th> </tr>"; $q=$db->query("SELECT cm.*, u.* FROM crystalmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER ORDER BY cmPRICE/cmQTY ASC"); while($r=$db->fetch_row($q)) { if($r['cmADDER'] == $userid) { $link = "[url='cmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='cmarket.php?action=buy&ID={$r[']Buy[/url]"; } $each= (int) $r['cmPRICE'] / $r['cmQTY']; print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['cmQTY']}</td> <td> \$" . number_format($each)."</td> <td>\$".number_format($r['cmPRICE'])."</td> <td>[$link]</td> </tr>"; } print "</table>"; } function crystal_remove() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM crystalmarket WHERE cmID='".mysql_real_escape_string($_GET['ID'])."' AND cmADDER=$userid"); if(!$db->num_rows($q)) { print "Error, either these crystals do not exist, or you are not the owner. [url='cmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $db->query("UPDATE users SET crystals=crystals+{$r['cmQTY']} where userid=$userid"); $db->query("DELETE FROM crystalmarket WHERE cmID='".mysql_real_escape_string($_GET['ID'])."'"); print "Crystals removed from market! [url='cmarket.php']> Back[/url]"; } function crystal_buy() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM crystalmarket cm WHERE cmID='".mysql_real_escape_string($_GET['ID'])."'"); if(!$db->num_rows($q)) { print "Error, either these crystals do not exist, or they have already been bought. [url='cmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); if($r['cmPRICE'] > $ir['money']) { print "Error, you do not have the funds to buy these crystals. [url='cmarket.php']> Back[/url]"; $h->endpage(); exit; } $m=$db->query("SELECT * FROM users WHERE userid={$r['cmADDER']}"); $rm=$db->fetch_row($m); if ($rm['lastip'] == $ir['lastip']) { print "Same IP Transfer Detected [url='javascript:history.back();']Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET crystals=crystals+{$r['cmQTY']} where userid=$userid"); $db->query("DELETE FROM crystalmarket WHERE cmID='".mysql_real_escape_string($_GET['ID'])."'"); $db->query("UPDATE users SET money=money-{$r['cmPRICE']} where userid=$userid"); $db->query("UPDATE users SET money=money+{$r['cmPRICE']} where userid={$r['cmADDER']}"); event_add($r['cmADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['cmQTY']} crystals from the market for \$".number_format($r['cmPRICE']).".",$c); print "You bought the {$r['cmQTY']} crystals from the market for \$".number_format($r['cmPRICE'])."."; } function crystal_add() { global $db,$ir,$c,$userid,$h; $_POST['amnt']=ereg_replace("[^0-9]", "",$_POST['amnt']); $_POST['amnt']=ereg_replace('/[\$,]/', '', $_POST['amnt']); $_POST['price']=ereg_replace("[^0-9]", "",$_POST['price']); $_POST['price']=ereg_replace('/[\$,]/', '', $_POST['price']); $_POST['amnt'] = abs(@intval($_POST['amnt'])); $_POST['price'] = abs(@intval($_POST['price'])); if($_POST['amnt']) { if($_POST['amnt'] > $ir['crystals']) { die ("You are trying to add more crystals to the market than you have."); } $tp=$_POST['amnt']*$_POST['price']; $db->query("INSERT INTO crystalmarket VALUES('','".mysql_real_escape_string($_POST['amnt'])."',$userid,$tp)"); $db->query("UPDATE users SET crystals=crystals-'".mysql_real_escape_string($_POST['amnt'])."' WHERE userid=$userid"); print "Crystals added to market! [url='cmarket.php']> Back[/url]"; } else { print "[b]Adding a listing...[/b] You have [b]{$ir['crystals']}[/b] crystal(s) that you can add to the market.<form action='cmarket.php?action=add' method='post'><table width=50% border=2><tr> <td>Crystals:</td> <td><input type='text' name='amnt' value='{$ir['crystals']}' maxlength='5' /></td></tr><tr> <td>Price Each:</td> <td><input type='text' name='price' value='200' maxlength='6' /></td></tr><tr> <td colspan=2 align=center><input type='submit' value='Add To Market' /></tr></table></form>"; } } $h->endpage(); ?>     Try that works fine for me secure i believe, its to the fullest I can do anyways will have to edit the first 3 things tho to match your game name
  12. XD I been trying to. I just don't understand it yet.
  13. Can someone fix this? keeps saying invalid user
  14. Pay: What ever the site makes the coder will get 50% of profits Myself: As of right now all I can do is give idea's on what I need.
  15. I'm looking for a coder that can help me code idea's I'm mapping out my game idea's as we speak. and will need help making the idea's reality :) If you can help then please mail me back
  16. Added :)
  17. I was wondering how much a good banner would cost that says "Rain of Heaven" on it. Starts out evil on one side then in middle its neutral then on last side its good. Mid-evil era game base. Players start as normal humans and work there way up to God status can become good or you can become evil.
  18. May be old but it was a great idea well is. add citys in there so like if your good is high enough you can enter that city and if your evil is good enough you can enter evil ones. Basicly if your good you can only do certain things same with evil You may be neutral tho do both good and evil. Maybe add crimes that add good or evil. EXP bar sort of like 50% be black or a dull color and other 50% bright color. you start in the middle as neutral and what you do changes it. do evil crime you get X amount of evil exp that might make the evil 62% evil 38% (not sure if i did that correct) same thing for good. If you can drop me a message on msn i could talk to you more about it? [email protected]
  19. Danny could you improve/update this if possible? I'd like to use this
  20. My site just got a Internal Server Error i was wondering if that is on my end or my hoster's end? Does anyone know
  21. O.o thought torn was a illegal version of Mccodes just recoded multiple times and changed all around. there was over 30 coders on it before it was ever released
  22. I'm not giving any tables out files i will but there modified for my site so they'd have to edit them
  23. XD i doin what you did to me danny.
  24. your mccodes should come standard with that. unless you got another way XD
  25. oops XD I read that wrong, it still apples the psdtut's not programming
×
×
  • Create New...