
veaseyspike
Members-
Posts
46 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by veaseyspike
-
Re: [McCodes][v2] Mailbox Layout Mod can u stilll use smilies?
-
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post ok -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post yh i know... can you lot tell me if the Shoutbox Ban works or not... send me a email plz n thank you -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post i only wanted to post shoutbox ban ... how hard has it got to be now a days -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post :S i got this shoutbox from iamwicked.net :S -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post does it work tho?..if it works gimme a +1 -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post Oh Ok Then... -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post Open Up cron_day.php: Add: $db->query("UPDATE shoutban set sb_days=sb_days-1"); $q=$db->query("SELECT * FROM shoutban WHERE sb_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['sb_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET shoutban=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM shoutban WHERE sb_days=0"); Add Your Done... IF You Have Error Please Mail Me Thank You -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post Open Shoutbox.php ( Where Ever You Stored your Shoutbox ): Add Somewhere if($ir['shoutban']) { $q=$db->query("SELECT * FROM shoutban WHERE sb_userid=$userid"); $r=$db->fetch_row($q); print"[b]<font color=red size=+1>You have been shoutbox banned for {$r['sb_days']} days. Reason: {$r['sb_reason']}</font>[/b] [url='index.php']> Back[/url] "; exit; } Open Smenu.php Add: > [url='staff_punit.php?action=shoutform']Shout Ban User[/url] > [url='staff_punit.php?action=unshoutform']Un-Shout Ban User[/url] -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post Open global_func.php: Add: function sb_user_dropdown($connection,$ddname="shoutban",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE shoutban=1 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post On The Same Page Then Find: $h->endpage(); ?> Before Add: function shoutban_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Shout Banning User</h3> The user will not be able to shout anyone in the game. <form action='staff_punit.php?action=shoutsub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Shout Ban User' /></form>"; } function shoutban_user_submit() { global $db,$ir,$c,$h,$userid; $re=$db->query("UPDATE users SET shoutban=1 WHERE userid={$_POST['user']}"); if($db->affected_rows()) { $db->query("INSERT INTO shoutban VALUES('',{$_POST['user']},{$_POST['days']},'". $_POST['reason']."')"); } print "User Shout Banned."; stafflog_add("Shout Banned ID {$_POST['user']} for {$_POST['days']}"); } function unsb_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Un-Shout Banning User</h3> The user will be able to shout again. <form action='staff_punit.php?action=unshoutsub' method='post'> User: ".sb_user_dropdown($c,'user')." <input type='submit' value='Un-shout Ban User' /></form>"; } function unsb_user_submit() { global $db,$ir,$c,$h,$userid; $db->query("UPDATE users SET shoutban=0 WHERE userid={$_POST['user']}"); $db->query("DELETE FROM shoutban WHERE sb_userid={$_POST['user']}"); print "User un-shoutbanned."; stafflog_add("Un-shout baned user ID {$_POST['user']}"); } -
Shoutbox Ban - Not Finished - Dont Post
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Shoutbox Ban - Not Finished - Dont Post Then open staff_punit.php Find: case 'ipsub': ip_search_submit(); break; case 'massjailip': mass_jail(); break; After Add: case 'shoutform': shoutban_user_form(); break; case 'shoutsub': shoutban_user_submit(); break; case 'unshoutform': unsb_user_form(); break; case 'unshoutsub': unsb_user_submit(); break; -
The shoutbox Ban - NOTE: Focus This Might Mess Up.. ( Should Work Ive Used It On My Game ) ( If Not Message Me And Il Add It Your Game ) ( This MY First Mod On CE ( Sharing ) ) Im Bricking IT :D SQL: ------------------------------- CREATE TABLE `shoutban` ( `sb_id` int(11) NOT NULL auto_increment, `sb_userid` int(11) NOT NULL default '0', `sb_days` int(11) NOT NULL default '0', `sb_reason` text NOT NULL, PRIMARY KEY (`sb_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ---------------------------------------------------- ALTER TABLE `users` ADD `shoutban` INT(11) NOT NULL DEFAULT '0'; ----------------------------------------------------
-
Re: [v2]User Competitions[v2] Can someone make this mod where theres no errors? .... post it below this post message thank you spike
-
Login & Register & Header & Lost Password
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password Ha lol...No i ask people things if i not 100% sure or havent got a clue like crons but i learnt to do them now ha lol well people learn cool stuff every day hehe.. i should be adding new mods like shoutbox ban would be coming soon when i fined the last error Shoutbox Ban Made - Coming Soon By Spikey -
Login & Register & Header & Lost Password
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password Ha lol...No i ask people things if i not 100% sure or havent got a clue like crons but i learnt to do them now ha lol well people learn cool stuff every day hehe.. i should be adding new mods like shoutbox ban would be coming soon when i fined the last error -
Login & Register & Header & Lost Password
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password il do that soon :D -
Login & Register & Header & Lost Password
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password yh... to be honest i dunno why i posted it up there.. now i think its a waste of space :lol: oh well lol -
Login & Register & Header & Lost Password
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password Register > Login > Header > -
Login & Register & Header & Lost Password
veaseyspike replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password Replace your header.php with this one: <?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: #000000; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: red; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:link { color: red;font-weight: bold;text-decoration: none; } a:hover {color: white;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:#000000; vertical-align:top; text-align:center; } .center { width:932px; background-color:#000000; vertical-align:top; text-align:center; } .table { background-color:#000000; border-width:1; border-color:#101010; border-style:solid; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } .tablee{ background-color:#000000; border-width:1; border-color:#101010; border-style:solid; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: red; } .tablee a { font-family:calibri, helvetica, arial, geneva, sans-seriff; font-size: 12px; color: red; } .tablee a:visited{ font-family:calibri, helvetica, arial, geneva, sans-seriff; font-size: 12px; color: red; } .tablee a:hover { font-family:calibri, helvetica, arial, geneva, sans-seriff; font-size: 12px; color: red; } .table3 { background-color:#000000; } .table td { background-color:#000000; border-width:1; border-color:#101010; border-style:solid; height:22px; } .table3 td { background-color:#000000; } td .alt { background-color:#000000; height:22px; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } td .h { background-image:url(baa.jpg); background-repeat:repeat-x; font-weight: bold; background-color: #000000; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } .table th { background-image:url(baa.jpg); background-repeat:repeat-x; font-weight: bold; background-color: #000000; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } textarea,input,select { font-family: Tahoma; color:#99CC00; font-weight:bold; color:silver; background-image:url(baa.jpg); background-color:#000000; border-width:1; border-color:silver; border-style:solid; font-size: 13px; } .quotemain { color:#EEEEEE; background-color: #66FF33 ; font-style: italic; padding: 2px; border: 1px solid gray; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table"> <tr> <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]"; } if($ir['smoking'] > 100) { $smoking = "<font color=red>Addictive</font>"; } else { $smoking = "<font color=blue>Not Addictive</font>"; } if($ir['smoking'] == 0) { $smoke = "Dont Smoke [[url='#'][size="1"]<font color=blue>Start</font>[/size][/url]]"; } else { $smoke = "$smoking"; } $gn=""; global $staffpage; $bgcolor = '000000'; print <<<OUT <div align=left> <table width="100%" border="0" cellpadding="0" cellspacing="0" class=table> <tr> <td class=table> [img=title.jpg] </td> <td class=table> [b]Name:[/b]<a href=viewuser.php?u=$userid> $gn{$u} [{$ir['userid']}] $d</a> [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} [b]Crystals:[/b] {$ir['crystals']} OUT; if($ir['smoking'] > 0) { print " [b]Smoking Level:[/b] {$ir['smoking']} [b]Smoker:[/b] $smoke "; } print <<<OUT [[url='logout.php']Logout[/url]] </td> <td> <table class=table border="0" cellpadding="0" cellspacing="0"> <tr> <td> [b]Energy:[/b] {$enperc}% </td> <td> <img src=yellowbar.png width=$enperc height=10><img src=333333.png width=$enopp height=10> </td> </tr> <tr> <td> [b]Will:[/b] {$wiperc}% </td> <td> <img src=yellowbar.png width=$wiperc height=10><img src=333333.png width=$wiopp height=10> </td> </tr> <tr> <td> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} </td> <td> <img src=yellowbar.png width=$brperc height=10><img src=333333.png width=$bropp height=10> </td> </tr> <tr> <td> [b]EXP:[/b] {$experc}% </td> <td> <img src=yellowbar.png width=$experc height=10><img src=333333.png width=$exopp height=10> </td> </tr> <tr> <td> [b]Health:[/b] {$hpperc}% </td> <td> <img src=yellowbar.png width=$hpperc height=10><img src=333333.png width=$hpopp height=10> </td> </tr> </table> </td> </tr> </table> </div> <table width="100%" border="0" cellpadding="0" cellspacing="0" class=table> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> 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 = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; function is_whole_number($var){ return (is_numeric($var)&&(intval($var)==floatval($var))); } $array = array_merge($_GET, $_POST); while ($post_cap = current($array)) { if ($post_cap < 0) { print "Illegal Operation"; die(""); } if (is_numeric($post_cap) && !is_whole_number($post_cap)) { print "Illegal Operation"; die(""); } if(strpos($post_cap, '=') && ($_POST[confirmPage] == "")) { print "Illegal Operation"; die(""); } next($array); } $array_gete = array($_GET); while ($tick = current($array_gete)) { $thekey = key($array_gete); $_GET[$thekey] = str_replace("=", "", htmlspecialchars($_GET[$thekey])); next($array_gete); } $array_poste = array($_POST); while ($tick = current($array_poste)) { $thekey = key($array_poste); $_POST[$thekey] = str_replace("=", "", htmlspecialchars($_POST[$thekey])); next($array_poste); } 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 "<table class=table><tr><td width=50%>[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url]</td><td width=50%>[url='voting.php'][b]Vote for {$set['game_name']} on game sites and get rewarded![/b][/url]</td></tr></table>"; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '000000'; 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> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <div align=center class=table id="footer"> [url="/userlist.php"]Total Users[/url] | [url="/usersonline.php"]Users Online Now[/url] | [url="/stats.php"]Game Stats[/url] </div> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } ?> For your forgot password click http://criminalexistence.com/ceforums/index.php?topic=4666.0 < there Screenshots coming soon -
Replace your login.php with this <?php session_start(); 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']; } 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 language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('You must enter a username/password.'); return false; } } </script> <style type="text/css"> <!-- body { background-image: url("BACKGROUND IMG HERE"); margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } 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:#C3C3C3; 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; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></head> <body onload="getme();"> <center> <table width="85%" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center">[img=http://i472.photobucket.com/albums/rr90/spike2494/transparent-banner-6.png] 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>"); } $year=date('Y'); print "<h3>> {$set['game_name']} Log-In</h3> <table width=80%> <tr> <td width=50%> <fieldset> <legend>About {$set['game_name']}</legend> {$set['game_description']} </fieldset> </td> <td> <fieldset> <legend>Login</legend>"; print "<form action=authenticate.php method=post name=login onsubmit=\"return saveme();\">[img=online.png]: <input type=text name=username> [img=key.png]: <input type=password name=password> Remember me? <input type=\"radio\" value=\"ON\" name=\"save\">Yes <input type=\"radio\" name=\"save\" value=\"OFF\" checked>No <input type=submit value=Submit></form></fieldset></td></tr></table> <h3>[url='register.php']<blink>[img=http://i472.photobucket.com/albums/rr90/spike2494/transparent-banner-7.png]</blink>[/url] [url='forgot_password.php']<blink>[img=http://i472.photobucket.com/albums/rr90/spike2494/transparent-banner-8.png]</blink>[/url]</h3> [i]<center>Powered by codes made by Dabomstew (© {$year}). Game Copyright ©{$year} {$set['game_owner']}.</center>[/i]"; 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> </body> </html> OUT; ?> Replace your register.php with this: <?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-image: url("http://dissonanceproductions.com/skull%20background%20inverted.JPG"); 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:#C3C3C3; 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="85%" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center">[img=BACKGROUND IMG HERE] 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]"); } if(strlen($_POST['username']) > 8) { die("Sorry, the username exceeds 8 characters. >[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)"); $db->query("INSERT INTO druginv VALUES($i, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); 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; ?>
-
Re: [mccode] Choose Gender if there any codes / sql to make ur gender inside the game cuz mine dont let me im a female and it says you can male and ses u have change to male but im still male :x :cry: :? Can Any One Help....Mail Me
-
Re: [mc codes lite] User Credit Card Companys Fatal error: Call to a member function query() on a non-object in /home/*****/public_html/user_cc_companys.php on line 190
-
Re: [V2]My own v2 Explore page [V2] im getting bored now...shall we just drop the subject and let casey try make more of her/his own mods and not to copy any others?
-
Re: [V2]My own v2 Explore page [V2] no one likes me ha ok...who was you to me begging for mods on msn then...every dayi sign in on msn u beg and beg and code and code for you