
TipZ
Members-
Posts
45 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by TipZ
-
Re: donator.php lol sorry i was tired when i maked the topic :P if you se the the name on the topic its donator.php i dont understand that site i want a form where you can buy only 100 crystals over paypal ??
-
ehm i dont get it :? how do a make a pay function they only gives 100 crystals
-
Re: [V2] SafeHouse nice mod but i already got my own safehouse mod :P
-
Re: hey Hmm, cron could work..not the best of ideas. But the cron you provided will not, $userid & $ir are not defined. Try.. <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("UPDATE users SET rank = 'starter' WHERE `rankxp` > 1"); $db->query("UPDATE users SET rank='Pickpocket' WHERE `rankxp` > 150"); $db->query("UPDATE users SET rank='Criminal' WHERE `rankxp` > 400"); $db->query("UPDATE users SET rank='Dealer' WHERE `rankxp` > 550"); $db->query("UPDATE users SET rank='Thug' WHERE `rankxp` > 700"); $db->query("UPDATE users SET rank='Leader' WHERE `rankxp` > 1000"); $db->query("UPDATE users SET rank='Con Artist' WHERE `rankxp` > 2500"); $db->query("UPDATE users SET rank='Caporegime' WHERE `rankxp` > 5000"); $db->query("UPDATE users SET rank='Hitman' WHERE `rankxp` > 10000"); $db->query("UPDATE users SET rank='Crimelord' WHERE `rankxp` > 15000"); $db->query("UPDATE users SET rank='Piciotto' WHERE `rankxp` > 32000"); $db->query("UPDATE users SET rank='Contabile' WHERE `rankxp` > 40000"); $db->query("UPDATE users SET rank='Boss' WHERE `rankxp` > 57000"); $db->query("UPDATE users SET rank='Kingpin' WHERE `rankxp` > 65000"); $db->query("UPDATE users SET rank='Consiglieri' WHERE `rankxp` > 80000"); $db->query("UPDATE users SET rank='Godfather' WHERE `rankxp` > 110000"); $db->query("UPDATE users SET rank='Don' WHERE `rankxp` > 210000"); $db->query("UPDATE users SET rank='Legendary Godfather' WHERE `rankxp` > 310000"); $db->query("UPDATE users SET rank='Legendary Don' WHERE `rankxp` > 410000"); $db->query("UPDATE users SET rank='Untouchable Don' WHERE `rankxp` > 490000"); ?> thanks man its working now :)
-
hi. i maked a rank script but now i just need it to run hmm every one can help me ???? as it is now you have to go to the page where i placed the rank script <?php include "globals.php"; if ($ir['rankxp'] > 1) { $db->query("UPDATE users SET rank='starter' WHERE userid=$userid"); } if ($ir['rankxp'] > 150) { $db->query("UPDATE users SET rank='Pickpocket' WHERE userid=$userid"); } if ($ir['rankxp'] > 400) { $db->query("UPDATE users SET rank='Criminal' WHERE userid=$userid"); } if ($ir['rankxp'] > 550) { $db->query("UPDATE users SET rank='Dealer' WHERE userid=$userid"); } if ($ir['rankxp'] > 700) { $db->query("UPDATE users SET rank='Thug' WHERE userid=$userid"); } if ($ir['rankxp'] > 1000) { $db->query("UPDATE users SET rank='Leader' WHERE userid=$userid"); } if ($ir['rankxp'] > 2500) { $db->query("UPDATE users SET rank='Con Artist' WHERE userid=$userid"); } if ($ir['rankxp'] > 5000) { $db->query("UPDATE users SET rank='Caporegime' WHERE userid=$userid"); } if ($ir['rankxp'] > 10000) { $db->query("UPDATE users SET rank='Hitman' WHERE userid=$userid"); } if ($ir['rankxp'] > 15000) { $db->query("UPDATE users SET rank='Crimelord' WHERE userid=$userid"); } if ($ir['rankxp'] > 32000) { $db->query("UPDATE users SET rank='Piciotto' WHERE userid=$userid"); } if ($ir['rankxp'] > 40000) { $db->query("UPDATE users SET rank='Contabile' WHERE userid=$userid"); } if ($ir['rankxp'] > 57000) { $db->query("UPDATE users SET rank='Boss' WHERE userid=$userid"); } if ($ir['rankxp'] > 65000) { $db->query("UPDATE users SET rank='Kingpin' WHERE userid=$userid"); } if ($ir['rankxp'] > 80000) { $db->query("UPDATE users SET rank='Consiglieri' WHERE userid=$userid"); } if ($ir['rankxp'] > 110000) { $db->query("UPDATE users SET rank='Godfather' WHERE userid=$userid"); } if ($ir['rankxp'] > 210000) { $db->query("UPDATE users SET rank='Don' WHERE userid=$userid"); } if ($ir['rankxp'] > 310000) { $db->query("UPDATE users SET rank='Legendary Godfather' WHERE userid=$userid"); } if ($ir['rankxp'] > 410000) { $db->query("UPDATE users SET rank='Legendary Don' WHERE userid=$userid"); } if ($ir['rankxp'] > 490000) { $db->query("UPDATE users SET rank='Untouchable Don' WHERE userid=$userid"); } ?> any one know how i get it to run automatic ??
-
Re: Userlist Edit [V2] hmmm :? you removed the backround color and changed the on and offline staus to a pic :? that not coding
-
Quickest way to test your Crons without using cpanel
TipZ replied to Uridium's topic in General Discussion
Re: Quickest way to test your Crons without using cpanel lol he have right in something but if you didnt knew this maybe you should shut down your game and learn some more ;) -
Re: Ammo [V2] ohh you need to write ammo=ammo+amount :P thanks
-
Re: Ammo [V2] i found a little bug in it ;) when you buy 6 bullets and you buy 6 more then you dont get 6 more you only lose the money then i looked trough the scripts and thinked i just should pu a + before 6 like this $db->query("UPDATE users SET money=money-10,ammo=+6 WHERE userid=$userid",$c); instead off $db->query("UPDATE users SET money=money-10,ammo=6 WHERE userid=$userid",$c); but that didnt work :S im preddy new in php so any one got a idea to fix that ??
-
Re: FREE ADVANCED USERSONLINE MOD This one should work also added mug function :P <?php /***************************************** ** Made by Daniel Robert ** Free mod advanced useronline for v1 ** Please do not resell ** Please leave this note ** Other than that have a nice time ** Don't do drugs. They aren't good for you. **Usersonline.php ******************************************/ include "globals.php"; $cn=0; echo "<table width='510' height='20' class=tablee> <tr> <th height='6'><u>Order</u></th> <th><u>Name</u></th> <th><u>ID</u></th> <th><u>Level</u></th> <th><u>Gender<u/></th> <th><u>Location<u/></th> <th><u>Last Action<u/></th> <th><u>Money</u></th> <th><u>Mug</u></th> <th><u>Attack</u></th> </tr>"; $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); while($r=$db->fetch_row($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } $cn++; echo "<tr> <th>$cn.</th> <th>[url='viewuser.php?u={$r[']{$r['username']}[/url]</th> <th>{$r['userid']}</th> <th>{$r['level']}</th> <th>{$r['gender']}</th> <th>{$r['location']}</th> <th>$str</th> <th>{$r['money']}</th> <th><a href='mug.php?ID={$r['userid']}'>Mug</th> <th><a href='attack.php?ID={$r['userid']}'>Attack "; if($r['gender'] == 'Female') { echo ""; } else { echo ""; } echo "</a></th> </tr>"; } echo "</table>"; $h->endpage(); ?>
-
Re: Items Pic mod [v2] it worked fine for me :P but i cant get it to show in inventory
-
Re: Items Pic mod [v2] why not just learn to make picture at you self ;) but anyway can i get showet the picture on my inventory site ??
-
Re: online/offline/total users Great !! :-D thanks have tryed to put it in here butthat not worked haha global $ir, $set, $r; echo <<<EOF
-
Re: online/offline/total users can this be added into a header ??
-
Re: e need seriously help and my macro1 and 2 macro1.php <?php include "globals.php"; if(!$set['validate_on'] || $ir['verified']) { die("WTF are you doing on this page? Go home losr."); } $ref=$_GET['refer']; unset($_SESSION['captcha']); $chars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!?\\/%^"; $len=strlen($chars); $_SESSION['captcha']=""; for($i=0;$i<6;$i++) $_SESSION['captcha'].=$chars[rand(0, $len - 1)]; print "<h3>Validation</h3><hr /> Enter the text you see in the image into the box below.<form action='macro2.php' method='post'>"; if($_GET['code']) { print "<font color='red'>[b]Invalid code or blank[/b]</font> "; } print " [img=captcha_verify.php] Text: <input type='text' name='captcha' /> <input type='hidden' name='refer' value='{$_GET['refer']}' /> <input type='submit' value='Verify' /></form>"; $h->endpage(); ?> macro2.php <?php session_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; 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; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); $ir=$db->fetch_row($is); $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } if(!$set['validate_on'] || $ir['verified']) { die("WTF are you doing on this page? Go home losr."); } if(!isset($_SESSION['captcha'])) { header("Location: macro1.php?code=invalid&refer={$_POST['refer']}"); exit; } if($_SESSION['captcha'] != $_POST['captcha']) { header("Location: macro1.php?code=invalid&refer={$_POST['refer']}"); exit; } $ref=$_POST['refer']; unset($_SESSION['captcha']); $db->query("UPDATE users SET verified=1 WHERE userid={$userid}"); header("Location: $ref"); ?>
-
my captcha code doesent work can any one help me ?? my captcha_verify.php <?php function parse_bgcolor() { if(strlen($_GET['bgcolor']) == 6) { $p1=$_GET['bgcolor'][0].$_GET['bgcolor'][1]; $p2=$_GET['bgcolor'][2].$_GET['bgcolor'][3]; $p3=$_GET['bgcolor'][4].$_GET['bgcolor'][5]; } else { $p1=$_GET['bgcolor'][0].$_GET['bgcolor'][0]; $p2=$_GET['bgcolor'][1].$_GET['bgcolor'][1]; $p3=$_GET['bgcolor'][2].$_GET['bgcolor'][2]; } return array(hexdec($p1),hexdec($p2),hexdec($p3)); } session_start(); $bgcolor=($_GET['bgcolor']) ? parse_bgcolor() : array(255,255,255); $text=array(255-$bgcolor[0],255-$bgcolor[1],255-$bgcolor[2]); $distort=rand(80,120)/100; $distort2=rand(80,120)/100; $f_x=round(75*$distort); $f_y=round(25*$distort); $s_x=round(175*$distort2); $s_y=round(70*$distort2); $first=imagecreatetruecolor($f_x, $f_y); $second=imagecreatetruecolor($s_x, $s_y); $white=imagecolorallocate($first, $bgcolor[0], $bgcolor[1], $bgcolor[2]); $black=imagecolorallocate($first, 0, 0, 0); $red=imagecolorallocate($first, 255, 0, 0); $green=imagecolorallocate($first, 0, 128, 0); $blue=imagecolorallocate($first, 0, 0, 255); imagefill($first, 0, 0, $white); $color[0]=$red; $color[1]=$green; $color[2]=$blue; for($i=0; $i<=2; $i++) { $points = array( 0 => array(10, $f_x - 10), 1 => array(5, $f_y - 5), 2 => array(10, $f_x - 10), 3 => array(5, $f_y - 5), 4 => array(10, $f_x - 10), 5 => array(5, $f_y - 5), 6 => array(10, $f_x - 10), 7 => array(5, $f_y - 5), 8 => array(10, $f_x - 10), 9 => array(5, $f_y - 5), ); imagefilledpolygon($first, $points, 5, $red); } imagestring($first, 4, rand(0, $f_x/3), rand(0,$f_y/2.5), $_SESSION['captcha'], $black); imagecopyresized($second, $first, 0, 0, 0, 0, $s_x, $s_y, $f_x, $f_y); imagedestroy($first); $red=imagecolorallocate($second, 255, 0, 0); $green=imagecolorallocate($second, 0, 128, 0); $blue=imagecolorallocate($second, 0, 0, 255); $RandomPixels=ceil($s_x*$s_y/100); for($i=0;$i<$RandomPixels;$i++) { $locx=rand(0,$s_x-1); $locy=rand(0,$s_y-1); imagesetpixel($second, $locx, $locy, $red); } for($i=0;$i<$RandomPixels;$i++) { $locx=rand(0,$s_x-1); $locy=rand(0,$s_y-1); imagesetpixel($second, $locx, $locy, $green); } for($i=0;$i<$RandomPixels;$i++) { $locx=rand(0,$s_x-1); $locy=rand(0,$s_y-1); imagesetpixel($second, $locx, $locy, $blue); } $randcolor=imagecolorallocate($second, rand(100,255), rand(100,255), rand(100,255)); for($i=0; $i<5; $i++) { imageline($second, rand(0, $s_x), rand(0, $s_y), rand(0, $s_x), rand(0, $s_y), $randcolor); $randcolor=imagecolorallocate($second, rand(100,255), rand(100,255), rand(100,255)); } @header("Content-Type: image/png"); $finished=imagerotate($second, rand(0,15)-7.5, $bgcolor[2]*65536+$bgcolor[1]*256+$bgcolor[0]); imagedestroy($second); imagepng($finished); imagedestroy($finished); ?>
-
Re: Game Ranks can this be maked for v2 ??
-
Re: upgraded lucky boxes lol then make it its not so hard :)
-
Re: upgraded lucky boxes no there is not only the buttons you can get will energy and brave also if you are lucky ;)
-
i dont know about it will work i havent testet it but here its is Picture http://game1.american-gangster.dk/style3/images/box.png <?php include "globals.php"; print "<h3>Lucky Boxes</h3><hr />"; if($_GET['open']) { if($ir['boxes_opened'] >= 5) { die("Sorry, you have already opened 5 boxes today. Come back tomorrow."); } if($ir['money'] < 1000) { die("Sorry, it costs \$1,000 to open a box. Come back when you have enough."); } $num=rand(1, 5); $db->query("UPDATE users SET boxes_opened=boxes_opened+1, money=money-1000 WHERE userid=$userid"); $ir['money']-=1000; switch($num) { case 1: $tokens=rand(1,5); print "First outcome here (gained {$tokens} crystals)"; $db->query("UPDATE users SET crystals=crystals+{$tokens} WHERE userid={$userid}"); break; case 2: $money=rand(330, 3300); print "Second outcome here (gained \${$money})"; $db->query("UPDATE users SET money=money+{$money} WHERE userid={$userid}"); break; case 3: $stole=min(rand($ir['money']/10, $ir['money']/5), 5000); print "Third outcome here (lost \${$stole})"; $db->query("UPDATE users SET money=money-{$stole} WHERE userid={$userid}"); break; case 4: print "Fourth outcome here (nothing)"; break; case 5: print "Fifth outcome here (nothing)"; break; case 6: print "You Gained Some Energy!>"; $db->query("UPDATE users SET energy=+5 WHERE userid={$userid}"); break; case 7: print "You Gained Some Will!"; $db->query("UPDATE users SET will=maxwill WHERE userid={$userid}"); break; case 8: print ">You Gained Some Brave!"; $db->query("UPDATE users SET brave=maxbrave WHERE userid={$userid}"); break; } print "<hr /> [img=images/box.png] <form action='lucky.php?open=1' method='post' > <input type='submit' class='submit' value='Open Another'> </form> <form action='explore.php' method='get'> <input type='submit' class='submit' value='Back to Town'> </form> "; } else { print "A man comes up to you and whispers, \"I have magical boxes, I let you open one for \$1,000. You can open a maximum of 5 a day. Deal or no deal?<hr /> [img=images/box.png] <form action='lucky.php?open=1' method='post'> <input type='submit' class='submit' value='Open one.'> </form> <form action='explore.php' method='get'> <input type='submit' class='submit' value='No thanks.'> </form> "; } $h->endpage(); ?>
-
Re: Captca code mccodeV2 the code just looks like this :S http://game1.american-gangster.dk/captcha_verify.php
-
Re: Captca code mccodeV2 i allreay did :) http://criminalexistence.com/ceforums/index.php?topic=21896.0
-
any on there gotthe original my is broken :S
-
Re: Captca code mccodeV2 <?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; } 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: #000000; 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:#360b05; vertical-align:top; text-align:center; } .table { background-color:#360b05; } .table3 { background-color:#360b05; } .table td { background-color:#360b05; height:22px; } .table3 td { background-color:#360b05; } td .alt { background-color:#360b05; 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="400" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> 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>"); } 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%'>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] <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; ?>