Jump to content
MakeWebGames

Casey

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by Casey

  1. go an edit your explore.php replace with <?php include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } print "[b]You begin exploring the area you're in, you see a bit that interests you.[/b] <table width=75%><tr height=100><td valign=top> <u>Market Place</u> [url='shops.php']Shops[/url] [url='itemmarket.php']Item Market[/url] [url='statsmarket.php']Stats Market[/url] [url='ddmarket.php']Donator Day Market[/url] [url='cmarket.php']Crystal Market[/url]</td> <td valign=top> <u>Serious Money Makers</u> [url='monorail.php']Travel Agency[/url] [url='estate.php']Estate Agent[/url] [url='propose.php']Propose[/url] [url='cbank.php']Crystal Bank[/url] [url='bank.php']City Bank[/url]"; if($ir['location'] == 5) { print " [url='cyberbank.php']Cyber Bank[/url] "; } print "</td> <td valign=top> <u>Dark Side</u> [url='gangcentral.php']Gangs[/url] [url='gangwars.php']Gang Wars[/url] [url='fedjail.php']Federal Jail[/url] [url='magic8ball.php']Magic8ball[/url] [url='slotsmachine.php?tresde=$tresder']Slots Machine[/url] [url='roulette.php?tresde=$tresder']Roulette[/url] [url='lucky.php']Lucky Boxes[/url]"; if($ir['location'] == 5) { print " [url='slotsmachine3.php']Super Slots[/url] "; } print "</td></tr><tr height=100> <td valign=top> <u>Statistics Dept</u> [url='userlist.php']User List[/url] [url='stafflist.php']{$set['game_name']} Staff[/url] [url='halloffame.php']Hall of Fame[/url] [url='viewdonators.php']View Donators[/url] [url='stats.php']Born-Killah stats[/url] [url='usersonline.php']Users Online[/url]</td><td valign=top> <u>Mysterious</u> [url='crystaltemple.php']Crystal Temple[/url] "; print "[url='battletent.php']Battle Tent[/url] "; print "[url='polling.php']Polling[/url] "; print " [url='carnival.php']Carnival[/url] "; print " [url='drugs.php']Drugs[/url] "; print "[url='youtube.php']Youtube[/url] "; print " [url='brothel.php']Brothel[/url] "; print "</td> <td valign='top'> <u>Beting area</u> [url='50 50chance.php']50/50 Money[/url] [url='5050.php']50/50 Crystals[/url] [url='lottery.php']Lottery[/url] <a href = 'investment.php' />Ian's Investments</a> [url='numbergame.php']Number's Game[/url] [url='mine.php']Minning[/url] </tr></table> This is your referal link: http://{$domain}/register.php?REF=$userid Every signup from this link earns you two valuable crystals!"; $h->endpage(); ?>   like it give me 1+
  2. Re: [V2]Register page with 1 account per ip [V2] I no :) i code u own games like me :) if contact me fo help or some think addy is [email protected]
  3. Re: [V2]Stats Market[V2] http://born-killah.lunarhosting.org/statsmarket.php register
  4. Re: [V2]Register page with 1 account per ip [V2] it lets them create an account
  5. Re: [V2]Register page with 1 account per ip [V2] yes this works :)
  6. Re: [V2]Stats Market[V2] how do i do it
  7. this is the stats market sql go on php my admin and insert this CREATE TABLE `statsmarket` ( `smID` int(11) NOT NULL auto_increment, `smQTY` int(11) NOT NULL default '0', `smADDER` int(11) NOT NULL default '0', `smPRICE` bigint(25) NOT NULL default '0', `smSTATS` varchar(255) NOT NULL default '0', PRIMARY KEY (`smID`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;   then make a file called statsmarket.php <?php include "globals.php"; print "<h3>Stats Market</h3>"; $_GET['ID'] = abs(@intval($_GET['ID'])); switch($_GET['action']) { case "buy": stats_buy(); break; case "remove": stats_remove(); break; case "add": stats_add(); break; default: statsmarket_index(); break; } function statsmarket_index() { global $db,$ir,$c,$userid,$h; print "[url='statsmarket.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>Stat</th> <th>Qty</th> <th>Price each</th> <th>Price total</th> <th>Links</th> </tr>"; $q=$db->query("SELECT sm.*, u.* FROM statsmarket sm LEFT JOIN users u ON u.userid=sm.smADDER ORDER BY smPRICE/smQTY ASC"); while($r=$db->fetch_row($q)) { if($r['smADDER'] == $userid) { $link = "[url='statsmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='statsmarket.php?action=buy&ID={$r[']Buy[/url]"; } $each= (float) $r['smPRICE'] / $r['smQTY']; print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['smSTATS']}</td> <td>{$r['smQTY']}</td> <td> \$" . number_format($each)."</td> <td>\$".number_format($r['smPRICE'])."</td> <td>[$link]</td> </tr>"; } print "</table>"; } function stats_remove() { global $db,$ir,$c,$userid,$h; $f = mysql_query("SELECT * FROM statsmarket WHERE smID='{$_GET['ID']}'") or die(mysql_error()); $a = mysql_fetch_assoc($f); $q=$db->query("SELECT us.*,sm.* FROM statsmarket sm LEFT JOIN userstats us ON sm.smQTY=us.{$a['smSTATS']} WHERE sm.smID='{$_GET['ID']}' AND sm.smADDER='{$ir['userid']}'"); if(!$db->num_rows($q)) { print "Error, either this listing doesn't exist, or you are not the owner. [url='statsmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); //FIXED $db->query("UPDATE userstats SET {$r['smSTATS']}={$r['smSTATS']}+{$r['smQTY']} WHERE userid='{$ir['userid']}'") or die(mysql_error()); $db->query("DELETE FROM statsmarket WHERE smID={$_GET['ID']}"); print "Stats removed from market! [url='statsmarket.php']> Back[/url]"; } function stats_buy() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM statsmarket st WHERE smID={$_GET['ID']}"); if(!$db->num_rows($q)) { print "Error, either this listing doesn't exist, or it has already been bought. [url='statsmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); if($r['smPRICE'] > $ir['money']) { print "Error, you do not have the funds to buy these stats. [url='statsmarket.php']> Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE userstats SET {$r['smSTATS']}={$r['smSTATS']}+{$r['smQTY']} WHERE userid=$userid"); $db->query("DELETE FROM statsmarket WHERE smID={$_GET['ID']}"); $db->query("UPDATE `users` SET `money` = `money` - {$r['smPRICE']} WHERE `userid`={$ir['userid']}"); $db->query("UPDATE `users` SET `money`=`money` + {$r['smPRICE']} where `userid`={$r['smADDER']}"); event_add($r['smADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['smQTY']} {$r['smSTATS']} from the market for \$".number_format($r['smPRICE']).".",$c); print "You bought the {$r['smQTY']} {$r['smSTATS']} from the market for \$".number_format($r['smPRICE'])."."; print " [url='statsmarket.php']> Back[/url]"; } function stats_add() { global $db,$ir,$c,$userid,$h; $_POST['amnt'] = abs($_POST['amnt']); $_POST['price'] = abs($_POST['price']); if($_POST['amnt']) { if($_POST['amnt'] > $ir['strength']-10 || $_POST['amnt'] > $ir['IQ']-10 || $_POST['amnt'] > $ir['labour']-10 || $_POST['amnt'] > $ir['agility']-10 || $_POST['amnt'] > $ir['guard']-10) { echo "You are trying to add more stats to the market than you can add. Look at the stats, at the stat that you have the least of. Subtract that number by 10. That's the most you can add per listing for any stat. For example, if your lowest stat is IQ with 100 IQ, the most you can list per listing for any stat is 90. You must always have at least 10 of all stats. Strength: {$ir['strength']} Agility: {$ir['agility']} Guard: {$ir['guard']} Labour: {$ir['labour']} IQ: {$ir['IQ']} <a href='statsmarket.php'>> Back"; $h->endpage(); exit; } if($_POST['price'] > 200) { echo "You can only sell stats for up to 200 each. <a href='statsmarket.php'>> Back"; $h->endpage(); exit; } $a = mysql_query("SELECT * FROM statsmarket WHERE smADDER='{$ir['userid']}'") or die(mysql_error()); if(mysql_num_rows($a) > 9) { echo 'You may only add 10 listings.'; $h->endpage(); exit; } $tp=$_POST['amnt']*$_POST['price']; $db->query("INSERT INTO statsmarket VALUES('',{$_POST['amnt']},$userid,$tp,'{$_POST['sellstat']}')"); $db->query("UPDATE userstats SET {$_POST['sellstat']}={$_POST['sellstat']}-{$_POST['amnt']} WHERE userid=$userid"); print "Stats added to market! [url='statsmarket.php']> Back[/url]"; } else { print "[b]Adding a listing...[/b] Look at the stats, at the stat that you have the least of. Subtract that number by 10. That's the most you can add per listing for any stat. For example, if your lowest stat is IQ with 100 IQ, the most you can list per listing for any stat is 90. You must always have at least 10 of all stats. <form action='statsmarket.php?action=add' method='post'><table width=70% border=2><tr><td>Stats to add to market: </td> <td> <select type='dropdown' name='sellstat'> <option value='strength'>Strength (Have {$ir['strength']}) <option value='agility'>Agility (Have {$ir['agility']}) <option value='guard'>Guard (Have {$ir['guard']}) <option value='labour'>Labour (Have {$ir['labour']}) <option value='IQ'>IQ (Have {$ir['IQ']})</select></td></tr><tr> <td>How many stats:</td> <td><input type='text' name='amnt' value='' /></td></tr><tr> <td>Price for each stat:</td> <td><input type='text' name='price' value='200' /></td></tr><tr> <td colspan=2 align=center><input type='submit' value='Add To Market' /></tr></table></form>"; } } $h->endpage(); ?>   then go edit explore and find [url='itemmarket.php']Item Market[/url] then replace with this [url='itemmarket.php']Item Market[/url] [url='statsmarket.php']Stats Market[/url]   http://born-killah.lunarhosting.org/statsmarket.php to see pice   thanks By casey rate me +1
  8. Re: [V2]Register page with 1 account per ip [V2] give me a 1+
  9. go and edit register.php <php include "config.php"; global $_CONFIG; 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; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } //thx to [url]http://www.phpit.net/code/valid-email/[/url] for valid_email function valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } session_start(); print <<<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> <title>{$set['game_name']}</title> <script type="text/javascript"> var xmlHttp // xmlHttp variable function GetXmlHttpObject(){ // This function we will use to call our xmlhttpobject. var objXMLHttp=null // Sets objXMLHttp to null as default. if (window.XMLHttpRequest){ // If we are using Netscape or any other browser than IE lets use xmlhttp. objXMLHttp=new XMLHttpRequest() // Creates a xmlhttp request. }else if (window.ActiveXObject){ // ElseIf we are using IE lets use Active X. objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") // Creates a new Active X Object. } // End ElseIf. return objXMLHttp // Returns the xhttp object. } // Close Function function CheckPasswords(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="check.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("passwordresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function CheckUsername(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="checkun.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("usernameresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function CheckEmail(password){ // This is our fucntion that will check to see how strong the users password is. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="checkem.php?password="+escape(password) // Url that we will use to check the password. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange = equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("emailresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL insted of sending data. } // Close Function. function PasswordMatch() { pwt1=document.getElementById('pw1').value; pwt2=document.getElementById('pw2').value; if(pwt1 == pwt2) { document.getElementById('cpasswordresult').innerHTML="<font color='green'>OK</font>"; } else { document.getElementById('cpasswordresult').innerHTML="<font color='red'>Not Matching</font>"; } } </script> <style type="text/css"> <!-- body { background-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; } .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:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center">[img=bornkillah1.jpg] EOF; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } $checkIp = $db->query("SELECT * FROM `users` WHERE `lastip`='".$_SERVER['REMOTE_ADDR']."'"); if($db->num_rows($checkIp) > 0) { die("<h3>ONE ACOUNT PER IP! >[url='login.php']Back[/url]"); } if($_POST['username']) { if($set['regcap_on']) { if(!$_SESSION['captcha'] or $_SESSION['captcha'] != $_POST['captcha']) { unset($_SESSION['captcha']); die("Captcha Test Failed >[url='register.php']Back[/url]"); } unset($_SESSION['captcha']); } if(!valid_email($_POST['email'])) { die("Sorry, the email is invalid. >[url='register.php']Back[/url]"); } if(strlen($_POST['username']) < 4) { die("Sorry, the username is too short. >[url='register.php']Back[/url]"); } $sm=100; if($_POST['promo'] == "Your Promo Code Here") { $sm+=100; } $username=$_POST['username']; $username=str_replace(array("<", ">"), array("<", ">"), $username); $q=$db->query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'"); $q2=$db->query("SELECT * FROM users WHERE email='{$_POST['email']}'"); if($db->num_rows($q)) { print "Username already in use. Choose another. >[url='register.php']Back[/url]"; } else if($db->num_rows($q2)) { print "E-Mail already in use. Choose another. >[url='register.php']Back[/url]"; } else if($_POST['password'] != $_POST['cpassword']) { print "The passwords did not match, go back and try again. >[url='register.php']Back[/url]"; } else { $_POST['ref'] = abs((int) $_POST['ref']); if($_POST['ref']) { $q=$db->query("SELECT * FROM users WHERE userid={$_POST['ref']}"); $r=$db->fetch_row($q); } $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); if($_POST['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}"); event_add($_POST['ref'],"For refering $username to the game, you have earnt 2 valuable crystals!",$c); $db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); } print "You have signed up, enjoy the game. > [url='login.php']Login[/url]"; } } else { if($set['regcap_on']) { $chars="123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!?\\/%^"; $len=strlen($chars); $_SESSION['captcha']=""; for($i=0;$i<6;$i++) $_SESSION['captcha'].=$chars[rand(0, $len - 1)]; } print "<h3>{$set['game_name']} Registration</h3>"; print "<form action=register.php method=post> <table width='75%' class='table' cellspacing='1'> <tr> <td width='30%'>Username</td> <td width='40%'><input type=text name=username onkeyup='CheckUsername(this.value);'></td> <td width='30%'><div id='usernameresult'></div></td> </tr> <tr> <td>Password</td> <td><input type=password id='pw1' name=password onkeyup='CheckPasswords(this.value);PasswordMatch();'></td> <td><div id='passwordresult'></div></td> </tr> <tr> <td>Confirm Password</td><td><input type=password name=cpassword id='pw2' onkeyup='PasswordMatch();'></td> <td><div id='cpasswordresult'></div></td> </tr> <tr> <td>Email</td><td><input type=text name=email onkeyup='CheckEmail(this.value);'></td> <td><div id='emailresult'></div></td> </tr> <tr> <td>Gender</td> <td colspan='2'><select name='gender' type='dropdown'> <option value='Male'>Male <option value='Female'>Female</select></td> </tr> <tr> <td>Promo Code</td><td colspan=2><input type=text name=promo></td> </tr> <input type=hidden name=ref value='"; if($_GET['REF']) { print $_GET['REF']; } print "' />"; if($set['regcap_on']) { print "<tr> <td colspan=3>[img=captcha_verify.php?bgcolor=C3C3C3] <input type='text' name='captcha' /></td> </tr>"; } print " <tr> <td colspan=3 align=center><input type=submit value=Submit></td> </tr> </table> </form> > [url='login.php']Go Back[/url]"; } print <<<OUT </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> </center> </body> </html> OUT; ?>
×
×
  • Create New...