Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,140
  • Joined

  • Last visited

  • Days Won

    148

Everything posted by Magictallguy

  1. Re: [mccodes] Save Events [$5] I've already created this, with the ability to show your events publicly or keep them private :P Well done though, you've done more than most I know can..
  2. Re: [mccodes v2] Combined Gallery and Comment System [$30.00]   but he's not selling a single license to on person but to multiple people 10$pop 5 peeps =50$ Each licence I create is differs everytime, this allows me to check against my "database" of legal sales.. If I find my modification on an unregistered site with an illegal licence, I can them tell them to remove it or threaten closure of the site via the host.
  3. Re: Cron Problem   Removed   I was unaware that this was a paid mod
  4. Re: [mccodes v2] Combined Gallery and Comment System [$40.00]   Hahaha :D`
  5. Re: Need an Mccodes hall of fame of referrals Is your refferal system using a separate table from users? If so, post the structure for your referals table. If not, tell us what the refferals field is named as. If you don't know how to do that Learn SQL NOW! ;) Use this SQL: DESCRIBE `refferals_table_name`;
  6. Re: [mccodes v2] Combined Gallery and Comment System [$40.00] Due to there being only slight interest, I have brought the price down to $30!
  7. Re: Another Addon   They do but, as I have previously stated, not everyone understands arrays.
  8. Re: Vote Mod?   And I code for free, anything I make I'll offer free support. ;) (Gallery and combined Comment system exempt - support is free, but you have to actually buy the modification first)
  9. Re: Thank a CE mccode Mod Developer Day   Thanks...I think xD
  10. Re: Another Addon   I said user friendly, not code friendly. And not everyone understands arrays - but most people who "grew up" with MC Craps will understand the else and if functions.
  11. Re: Another Addon CE is being so slow -.- You could also make it slightly more user friendly <?php $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['level'] = abs(@intval($_GET['level'])); $sql = sprintf("SELECT userid, username, user_level FROM users WHERE (userid = %u)", $_GET['ID']); $query = $db->query($sql); $user = $db->fetch_row($query); // User's needed details have been retrieved, echo them where necessary :) if($_GET['level'] < $user['user_level']) { $what = 'demoted'; } else {$what = 'promoted'; } // Position names, edit as necessary $levels = array(0, 1, 2, 3, 4, 5); if(!in_array($_GET['level'], $levels) { echo "Invalid user level"; $h->endpage(); exit; } if($_GET['level'] == 0) { $pos = 'NPC'; } else if($_GET['level'] == 1) { $pos = 'Member'; } else if($_GET['level'] == 2) { $pos = 'Admin'; } else if($_GET['level'] == 3) { $pos = 'Secretary'; } else if($_GET['level'] == 4) { $pos = 'Forum Moderator'; } else if($_GET['level'] == 5) { $pos = 'Assistant'; } //Echo the message echo sprintf("%s has been %s to %s", $user['username'], $what, $pos); //Log it $stafflog = sprintf("[url='viewuser.php?u=%u']%s[/url] [%u] was %s to %s", $user['userid'], $user['username'], $what, $pos); stafflog_add($stafflog); //Optional - send an event. Comment out the next 2 lines if you don't want to send an event $event = sprintf("You have been %s to %s", $what, $pos); event_add($user['userid'], $event); ?>
  12. Re: [mccode] Religions Mod   For the sake of saving space, stick that in its own table and use a JOIN query to get the details..
  13. Re: [mccode v2] A better multi alerter for transfers.   $sql = sprintf("SELECT username, lastip, lastip_signup, lastip_login FROM users WHERE ((lastip = '%s') OR (lastip_signup = '%s') OR (lastip_login = '%s')", $ir['lastip'], $ir['lastip'], $ir['lastip']); /* Select on what is necessary - and compare all retrieved data */ $query = $db->query($sql); // Variablise the query if($db->num_rows($query) > 1) //There should only be one person - the person sending it. { echo "Multi access transfers not allowed"; event_add($_GET['ID'], $ir['username']." attempted to send something to you.."); $h->endpage(); exit; }   You can at least code it properly... - your code is flawed..
  14. Re: mccodes V2] Upgrade IPFINDER original Script by Magicaltallguy That will only show while using my "IP Finder". And the problem is not with my "IP Finder" - it's your global_func.php Find (near the bottom): $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];   And change to: $IP = $_SERVER['REMOTE_ADDR'];
  15. Re: [other] New Login + New Register   Have you tried fixing it? I can see the error myself just from there! It's trying to insert six rows into 5 columns... login.php <?php session_start(); include(DIRNAME(__FILE__) . '/config.php'); global $_CONFIG; define("MONO_ON", 1); require(DIRNAME(__FILE__) . '/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"); $q = $db->query("SELECT userid FROM users"); $membs = $db->num_rows($q); while($r = $db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $q = $db->query("SELECT userid FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); $r1 = $db->num_rows($q); 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" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5" /> <title>{$set['game_name']}</title> <style type="text/css"> body { background-color: #999999; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; } div#wrapper { width: 80%; background: #999999; margin-top: 50px; margin-bottom: 50px; margin-left: auto; margin-right: auto; padding: 0px; border: thin solid #999999; } div#header { padding: 15px; margin: 0px; text-align: center; } div#nav { width: 30%; padding: 10px; margin-top: 1px; float: left; } div#main { margin-left: 30%; margin-top: 1px; padding: 20px; font-family: perpetua; } div#footer { padding: 15px; margin: 0px; border-top: thin solid #999999; background-image: url('footer.jpg'); font-size: 17px; } a:link,a:visited,a:active { color: black; } a:hover { color: darkblue; background-image: url('nav.jpg'); } a:focus { color: royalblue; background-image: url('navfocus.jpg'); } </style></head> <body> <h1><div align='center'>[b]UnderGround Streets![/b]</div></h1> <div id='ownedby' align='center'>Game Owner <u>{$set['game_owner']}<u></div> <div align='center'> <div id='wrapper'> <div id='header'> <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> </head> EOF; $ip = $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { echo "[b]<font color='red' size='+1'>Your IP has been banned!</font>[/b]"; exit; } print " <div align='center'> <div id=main> <div align='center'> <form action='authenticate.php' method='post' name='login' onsubmit='return saveme();'> Username: <input type='text' name='username'> Password: <input type='password' name='password'> Remember me on this computer? <input type='radio' value='ON' name='save'>Yes <input type='radio' name='save' value='OFF' checked>No <input type='submit' value='Enter'> </form> <input type='submit' value='LOGIN' class='loginbutton' /> </form> </td> </tr> </table> <h3>[url='register.php']REGISTER NOW![/url]</h3> </form> </div> </div> </div> </div> </div> </div> [b]Template Made By Sniko`[/b]"; print <<<OUT </body> </html> OUT; ?>   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!#$%&#038;'*+/=?^_`{|}~-][A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~\.-]{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: #999999; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; } div#wrapper { width: 80%; background: #fefefe; margin-top: 50px; margin-bottom: 50px; margin-left: auto; margin-right: auto; padding: 0px; border: thin solid #222222; } div#header { padding: 15px; margin: 0px; text-align: center; } div#nav { width: 30%; padding: 10px; margin-top: 1px; float: left; } div#main { margin-left: 30%; margin-top: 1px; padding: 20px; font-family: perpetua; } div#footer { padding: 15px; margin: 0px; border-top: thin solid #222222; background-image: url('footer.jpg'); font-size: 17px; } a:link,a:visited,a:active { color: black; } a:hover { color: darkblue; background-image: url('nav.jpg'); } a:focus { color: royalblue; background-image: url('navfocus.jpg'); } </style></head> <body> <center> <div id=wrapper> <div id=header> 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(); $message = "Welcome to the game, please vote to gain an extra $/70 and please enjoy your stay within the streets. Thanks TCA` and Sniko` (Admins) "; $db->query("INSERT INTO mail VALUES ('',0,1,$i,unix_timestamp(),'Welcome to {$set['game_name']}','{$message}')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid=$i"); $db->query("INSERT INTO userstats (userid, strength, agility, defence, guard, labour) 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 [b]2[/b] valuable crystals, Thank you for refering!",$c); $db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); } print "Thank you for signing up. > [url='login.php']Login[/url]"; } } else { if($set['regcap_on']) { $chars="0123456789"; $len=strlen($chars); $_SESSION['captcha']=""; for($i=0;$i<6;$i++) $_SESSION['captcha'].=$chars[rand(0, $len - 1)]; } print "</div><div id=nav>Rules And Regulations <textarea readonly=readonly cols=30 rows=10> 1) Players are only allowed to have one account, owning two or more accounts will result in all accounts being jailed, if you are on the same IP as another player, mail staff and let them know. 2) You are responsible for whatever happens on your account, don't give out your password to anyone. 3)Children play this game, so keep it PG-13. Mild swearing will be permitted, but F-bombing, sexual vulgarities or excessive swearing will result in some time in Fed until you clean up your act. 4) Profile images with nudity, profanity, or otherwise offensive images will be removed, and may result in jail time. 5) We understand that you play other games, but do not advertise them here. You get 1 warning, afterwards its Fed time. 6) Do not spam the staff's mailbox, if you have a problem, message one of us once. They will deal with your problem in a timely manner, but do not mail them repeatedly, or mail multiple staff members. 7) Do not harrass other players, use common sense on this one, if you don't know when your crossing the line from fantasy into harrassment, assume that you are harrassing the other player. This will not be tolerated and will result in a stiff punishment. 8) Scamming will not be tolerated in any manner. Any attempt to scam anyone will result in being jailed for a long long time. 9) If a member of staff is bothering you for any unfair or just plain, weird reason, mail user [1] 10) Common sense rules are not posted here, if you can't determine the difference between what is ok, and what is not, you should consider not interacting with other people until you do understand. 11) These rules are subject to change without notice, check them from time to time, as ignorance will not be accepted as an excuse. </textarea></div><div id=main>"; print "<form action=register.php method=post> Username:<input type=text name=username onkeyup='CheckUsername(this.value);'> [[url='#']?[/url]] Password: <input type=password id='pw1' name=password onkeyup='CheckPasswords(this.value);PasswordMatch();'> [[url='#']?[/url]] Confirm Password: <input type=password name=cpassword id='pw2' onkeyup='PasswordMatch();'> [[url='#']?[/url]] Email: <input type=text name=email onkeyup='CheckEmail(this.value);'> [[url='#']?[/url]] Gender: <select name='gender' type='dropdown'> <option value='Male'>Male <option value='Female'>Female</select> [[url='#']?[/url]] Promo Code: <input type=text name=promo> [[url='#']?[/url]] <input type=submit value=Submit><input type=reset value=Reset> [url='login.php']Go Back[/url] </form> </div> </div> [b]Template Made By Sniko`[/b]"; } print <<<OUT </body> </html> OUT; ?>   I would've done more, but I' literally falling asleep as I type *yawn* this xD
  16. Re: mccodes V2] Upgrade IPFINDER original Script by Magicaltallguy You do know I have already attempted "clickable names" - it didn't work for me..
  17. Re: [mccode v2] Updated Newspaper - more than one page Then you're obviously missing the globals.php file 0,o
  18. Re: [mccode v2] Updated Newspaper - more than one page   Chances are you're using v1, this paper is for v2
  19. Re: [mccode v2] Updated Newspaper - more than one page   I can promise you, I haven't done that. As I'm a game owner myself, I know how annoying multis can get so, I simply don't bother making them What is your site? I'd like to know who's posing as me
  20. Re: [mccode v2] Updated Display Pic System   Newbie+ indeed...   echo ($r['display_count'] == 0) ? "[img=/testimages/nopic.gif]" : sprintf("[img=%s]", stripslashes($r['display_pic']));
  21. Re: [MCC V2] - Search.php in one | Optimized Learn about isset() It will help you get rid of unwanted errors popping up (E_WARNING)
  22. Re: Help!! Mccodes Lvl hack You could always mysql_real_escape_string() $_POST['newname'] = mysql_real_escape_string($_POST['newname']);
  23. Re: Referal in HOF   $sql = sprintf("SELECT * FROM referals WHERE (refREFER = %u)", $r['userid']); $query = mysql_query($sql) or die(mysql_error()); $refwin = mysql_num_rows($query);
  24. Re: Code for capped EXP?   ALTER TABLE users CHANGE `exp` `exp` DECIMAL( 45,4 ) NOT NULL DEFAULT '0.0000'; Not hard.
  25. Re: [mccodes v2] Combined Gallery and Comment System [$40.00] Nicely spotted radio_active!!
×
×
  • Create New...