
BoGFx
Members-
Posts
139 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by BoGFx
-
Hey, I can design whatver you want high dpi for your tshirt.
-
My friend recently launched a new game and was looking for people to check it out/sign up and play. I believe this is a heavily edited GRPG script. It is a member of the infamous mafiadeath family. The launch happened just a day ago. I have two links, one is to the game and the other is to the game. The difference, one helps me in the referal contest: http://www.ghettostatus.com/refer.php?u=12 The other? http://www.ghettostatus.com
-
was totally just going to say that lol Ahh, I see where I messed up. When I tried that, it would not define the DB either - I didn't have any of the CONFIG stuff the the entire script, ha. All fixed. THANKS! Btw, I secured it too, so it's all good :D
-
Hi, sorry for asking, but I have blow my mind out on google and can not seem to figure this out. I get the following error Fatal error: Call to a member function query() on a non-object in /home/cagedmaf/public_html/register.php on line 200 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>"); } 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); $usernameck=$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($usernameck)) { 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']); $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q=$db->query("SELECT * FROM users WHERE lastip='$IP' AND userid={$_POST['ref']}"); if($db->num_rows($q)) { die("No creating referral multies. Bad dog. >[url='register.php']Back[/url]"); } 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)]; } Line 200 is Line 34. Thanks a bunch. I bet it is something simple and I am just stupid.
-
Looking for Help in making A VERY large Mod. More of a team Effort :-)
BoGFx replied to Joshua's topic in Game Projects
RE: Looking for Help in making A VERY large Mod. More of a team Effort :-) If you need any designs, let me know. -
Make Make it darker, and more .. zombie.
-
I know you probably typed it in like 4 seconds, but wouldn't you need a ] after ['gang' $tag = mysql_query('SELECT `gangPREF` AS `tag` FROM `gangs` WHERE `gangID` = '.$ir['gang']); $tag = mysql_fetch_assoc($tag); $tag = $tag['tag'];
-
167 is.. 167 - $q=$db->query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'"); That is 39 in this code bit I havane posted. Thx.
-
What's your error?
-
Here is a friendly edit, just makeing everything a table, and the forms all lined up. Thanks for the great mod! <?php include "globals.php"; switch($_GET['action']) { case 'update': do_update(); break; default: prefs_home(); break; } function prefs_home() { global $db,$ir,$c,$userid,$h; print "<table width=100% cellspacing=1 class='table'><tr><th>Edit Settings</th><th><form action='account.php?action=update' method='post'></th></tr> <tr><td>Username:</td> <td><input type='username' name='newname' value='{$ir['username']}' /> </td></tr> <tr><td>Login Name:</td> <td><input type='login_name' name='newloginname' value='{$ir['login_name']}' /> </td></tr> <tr><td>Email:</td> <td><input type='email' name='newemail' value='{$ir['email']}' /> </td></tr> <tr><td>Password:</td> <td><input type='password' name='newpw' /> </td></tr> <tr><td>Confirm Password:</td> <td><input type='password' name='newpw2' /> </td></tr> <tr><td>Gender:</td> <td><select name='gender' type='dropdown'><option></option><option>Male</option><option>Female</option></select> </td></tr> <tr><td>Display Pic:</td> <td><input type='text' name='newpic' value='{$ir['display_pic']}' /> </td></tr> <tr><td>Forum Avatar:</td> <td><input type='text' name='forums_avatar' value='{$ir['forums_avatar']}' /> </td></tr> <th>Forum Signature:</th><th> (BBcode Only)</th> </table> <textarea rows=17 cols=92 name='forums_signature'>{$ir['forums_signature']}</textarea> <table class ='table'><th>Profile Signature:</th> <th>(BBcode Only)</th></table> <textarea rows=17 cols=92 name='newsignature'>{$ir['profsignature']}</textarea> <input type='submit' value='Update' /></form>"; } function do_update() { global $db,$ir,$c,$userid,$h; if($_POST['newpw'] !== $_POST['newpw2']) { echo "The new passwords you entered did not match! \n"; $h->endpage(); exit; } $c_name = sprintf('SELECT userid FROM users WHERE UPPER(username) = UPPER("%s") AND userid != %d', $db->escape($_POST['newname']), $ir['userid']); $c_name = $db->query($c_name); if ($db->num_rows($c_name) > 0) { echo "Username already taken. \n"; $h->endpage(); exit; } if($_POST['newname'] == "") { echo "You left the username form blank. \n"; $h->endpage(); exit; } $c_email = sprintf('SELECT userid FROM users WHERE UPPER(email) = UPPER("%s") AND userid != %d', $db->escape($_POST['newemail']), $ir['userid']); $c_email = $db->query($c_email); if ($db->num_rows($c_email) > 0) { echo "Email address already taken. \n"; $h->endpage(); exit; } if($_POST['newemail'] == "") { echo "You left the email form blank. \n"; $h->endpage(); exit; } if ($db->num_rows($c_login) > 0) { echo "Login name already taken. \n"; $h->endpage(); exit; } $c_login = sprintf('SELECT userid FROM users WHERE UPPER(login_name) = UPPER("%s") AND userid != %d', $db->escape($_POST['newloginname']), $ir['userid']); $c_login = $db->query($c_login); if($_POST['newloginname'] == "") { echo "You left the login name form blank. \n"; $h->endpage(); exit; } else { if($_POST['gender'] != '') { $db->query("UPDATE users SET gender='{$_POST['gender']}' WHERE userid=$userid"); } if($_POST['newpw']) { $db->query("UPDATE users SET userpass=md5('{$_POST['newpw']}') WHERE userid=$userid"); } $_POST['newname']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newname']); $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET username='{$_POST['newname']}', display_pic='{$_POST['newpic']}', forums_avatar='{$_POST['forums_avatar']}', forums_signature='{$_POST['forums_signature']}', email='{$_POST['newemail']}', login_name='{$_POST['newloginname']}', profsignature='{$_POST['newsignature']}' WHERE userid=$userid"); print "Account settings saved!"; } } $h->endpage(); ?>
-
I still have my problem, could someone please help.
-
Hi Thank you so much everyone for taking interest in my problem. Nickson: The register URL is http://cagedmafia.com/register.php I do not get an error message, you can see what I get if you test it. This is the basic register, just added into my layout.
-
I changed the white to \"white\" , but no help.
-
That's not why it isn't working though.
-
After I got a new layout my register seemed to stop working. You can fill everything out and even click submit. When you click submit half the layout shows up, but you are not signed up. For obvious reasons I won't post the layout part, but here is the php part. <? $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>"); } 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']); $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q=$db->query("SELECT * FROM users WHERE lastip='$IP' AND userid={$_POST['ref']}"); if($db->num_rows($q)) { die("No creating referral multies. Bad dog. >[url='register.php']Back[/url]"); } 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%'><font color="white">Username</font></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><font color="white">Password</font></td> <td><input type=password id='pw1' name=password onkeyup='CheckPasswords(this.value);PasswordMatch();'></td> <td><div id='passwordresult'></div></td> </tr> <tr> <td><font color="white">Confirm Password</font></td><td><input type=password name=cpassword id='pw2' onkeyup='PasswordMatch();'></td> <td><div id='cpasswordresult'></div></td> </tr> <tr> <td><font color="white">Email</font></td><td><input type=text name=email onkeyup='CheckEmail(this.value);'></td> <td><div id='emailresult'></div></td> </tr> <tr> <td><font color="white">Gender</font></td> <td colspan='2'><select name='gender' type='dropdown'> <option value='Male'>Male <option value='Female'>Female</select></td> </tr> <tr> <td><font color="white">Promo Code</font></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]"; } ?> Thank you for any help.
-
Can't you just check this manually from the DB?
-
I know it is hard for a lot of new coders to do anything. I know, because I am one. Here is just a simple way to give your donators double the bank interest. Replace cron_day.php $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); With cron_day.php if($ir['donatordays'] == 0) { $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); } else if($ir['donatordays'] != 0) { $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/25) where bankmoney>0"); } I know it is such a small thing, but this does make a difference in your donator count. Thanks.
-
Re: auto fed Yes there are, but instead of doing that. Secure your game, I know it is very difficult to completely secure it (if not impossible), but pay someone to do it for you if you don't know how. I recommend Jeff from dev-forums. (Just because he did my game for a great price).
-
Re: Code my PSD and/or XCF for $$$ HD can not do it. Can anyone else do this for $20?
-
Re: id 1 and 2 Isn't there a way to do 1 or 2?
-
Re: Hospital Java Countdown Wouldn't this let them use it more than once?
-
Re: Complete new gang system... I'd buy this in a flash if you do it.
-
Re: Looking to buy I believe Richard made one.
-
Re: [$10] Mod REQUEST Attack System [V2] Still looking for someone! This should be simple.
-
Re: Code my PSD and/or XCF for $$$ Thank you!