-
Posts
2,124 -
Joined
-
Last visited
-
Days Won
144
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
Re: Updated Explore V.2 Haven't created it yet.. But soon..
-
Re: Login [Free] He's one step ahead of you xD
-
Re: Register [Free] Just remove this -.- $t = mysql_query("SELECT * FROM ips WHERE userIP='{$IP}'"); if($a = mysql_num_rows($t)> 0) { die('YOU ARE BANNED NOW BYE!'); }
-
Re: Login [Free] Confirmed, he did make it before I saw it.
-
mccode-v2 Crimes (Players Can Go To Hospital)
Magictallguy replied to jamboy1's topic in Free Modifications
Re: Crimes (Players Can Go To Hospital) [V2] ALTER TABLE `crimes` ADD ( `crimeHTEXT` text NOT NULL DEFAULT '', `crimeHOSPTIME` int(10) NOT NULL default '0', `crimeHREASON` varchar(255) NOT NULL default '' ); -
Re: Media Area/Room Simple, yet effective. Although I won't be using it, I do like it :)
-
Re: [v2]Html text converter[v2] Thanks for the shoutout The Ace :D
-
Re: Multiple Houses [V2] <?php //remember to remove the php tags echo ("<table width='95%' class='table' border='1' cellpadding='2' cellspacing='1'>"); echo ("<tr>"); echo ("<th>Name</th>"); echo ("<th>Price</th>"); echo ("<th>Will</th>"); echo ("<th>Link</th>"); echo ("</tr>"); $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC",$c); while($r=$db->fetch_row($hq)) { echo ("<tr>"); echo sprintf("<td style='text-align:center;'>%s</td>", $r['hNAME']); echo sprintf("<td style='text-align:right;'>%s</td>", number_format($r['hPRICE'])); echo sprintf("<td style='text-align:right;'>%s</td>", number_format($r['hWILL'])); echo sprintf("<td style='text-align:center;'>[[url='estate.php?ID=%u']Buy[/url]]</td>", $r['hID']); echo ("</tr>"); } echo ("</table>"); ?>
-
Re: Updated Explore V.2 Not hard to do if you think about it. Take my "multi-page newspaper mod" into account. A simple SQL table will be sufficient.. Joker, no... -.- And I'll be creating it free. Give me an hour or so :P
-
Re: crystal bank Yea.. it's "Magictallguy", although I do like Metallica....
-
Re: Quote Mod if(strlen($q) > 255) { echo 'Quotes can only have upto 255 characters'; echo ' '; echo '[url="preferences.php?action=uq"]Back[/url]'; } That's why that is there -.-
-
Re: crystal bank For the sake of The Joker, sprintf() has been implemented.. Joker, sprintf() on it's own, will offer little protection. Combine it with mysql_real_escape_string() and you'll have a file fit for a king.. (or Nyna..) Secured Crystal Bank <?php include (DIRNAME(__FILE__) . "/globals.php"); //Learn to secure your script! //And code properly for that matter -.- //Secured by Magictallguy print "<h3>Crystal Bank</h3>"; if($ir['crystalbank']>-1) { //Addition of the functions below to stop a hidden error. (Use error_reporting(E_ALL); too see what I mean... $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money'] > 25000) { print "Congratulations, you bought a crystal bank account for \$25,000! [url='crystalbank.php']Start using my account[/url]"; $sql = sprintf("UPDATE users SET money = money - %u WHERE (userid = %u)", 25000, $userid); $db->query($sql); } else { die("You do not have enough money to open an account, it costs \$25,000 for an account [url='explore.php']Back to town...[/url]"); } } else { print "Open a crystal bank account today, just \$25,000! [url='crystalbank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $db, $ir, $c, $userid, $h; $s = ($_POST['deposit'] == 1) ? "" : "s"; //Outputs: //0 crystals //1 crystal //2 crystals echo sprintf("[b]You currently have %s crystal%s in your crystal bank.[/b] ", number_format($ir['crystalbank']), $s); echo ("<table width='85%' cellspacing=1 class='table'>"); echo ("<tr>"); echo ("<td width='50%'>[b]Deposit crystal[/b] "); echo ("<form action='crystalbank.php?action=deposit' method='post'>"); echo sprintf("Amount: <input type='text' name='deposit' value='%u' /> ", $ir['crystalbank']); echo ("<input type='submit' value='Deposit' /></form></td>"); echo ("<td width='50%'>[b]Withdraw crystals[/b] "); echo ("There is no fee on withdrawals.<form action='crystalbank.php?action=withdraw' method='post'>"); echo sprintf("Amount: <input type='text' name='withdraw' value='%u' /> ", $ir['crystalbank']); echo ("<input type='submit' value='Withdraw' /></form></td>"); echo ("</tr>"); echo ("</table>"); } function deposit() { global $db, $ir, $c, $userid, $h; $_POST['deposit'] = (float) $_POST['deposit']; if($_POST['deposit'] > $ir['crystals']) { print "You do not have enough crystals to deposit in the bank."; } else { $gain=$_POST['deposit']-$fee; $ir['crystals']+=$gain; $sql = sprintf("UPDATE users SET crystalbank = crystalbank + %u, crystals = crystals - %u WHERE (userid = %u)", mysql_real_escape_string($gain), mysql_real_escape_string($_POST['deposit']), $userid); //You MUST ALWAYS escape everything,, unless you want hackers to gain access? $db->query($sql); $s = ($_POST['deposit'] == 1) ? "" : "s"; //Outputs: //0 crystals //1 crystal //2 crystals echo sprintf("You hand over %s crystal%s to be deposited, ", number_format($_POST['deposit']), $s); echo sprintf(" is added to your account. ", number_format($gain)); echo sprintf("[b]You now have %s crystal%s in the bank.[/b] ", number_format($ir['crystalbank']), $s); echo ("[url='crystalbank.php']> Back[/url]"); } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw'] = (float) $_POST['withdraw']; if($_POST['withdraw'] > $ir['crystalbank']) { print "You do not have enough crystals to withdraw from the bank."; } else { $gain=$_POST['withdraw']; $ir['crystalbank']-=$gain; $sql = sprintf("UPDATE users SET crystalbank = crystalbank - %u, crystals = crystals + %u WHERE (userid = %u)", mysql_real_escape_string($gain), mysql_real_escape_string($gain), $userid); $db->query($sql); $s = ($_POST['deposit'] == 1) ? "" : "s"; //Outputs: //0 crystals //1 crystal //2 crystals echo ("You ask to withdraw , ", number_format($gain), $s); echo ("the banking lady grudgingly hands it over. "); echo ("[b]You now have %s crystal%s in the bank.[/b] ", number_format($ir['crystalbank']), $s); echo ("[url='crystalbank.php']> Back[/url]"); } } $h->endpage(); ?>
-
Re: crystal bank Before posting all over CE what I'm attempting to teach you, actually learn it? Brilliant quote from Nyna .. You should take heed Chris..
-
Re: contact staff [v2] As this is v2, session_start(); is not required.. That is already in the globals.php..
-
Re: Religions Mod This is only true if your users are to stupid to open their eyes and see the person for who they are, and not what they believe in..
-
Re: [Mccode][Free] House Pictures Using the post before mine, and the first post works fine. Why are argue when you can call it from the database? That's what it's there for..
-
Re: Updated Explore V.2 I'm tempted to create an explore that is updatable via the staff panel.. Each "box" (or <td>) will have it's own row on a table in the database..[me=Magictallguy]ponders the thought[/me]
-
Re: [V2] Crystalbank Mod [V2] Links are the same, SQL is the same. Secured Crystal Bank <?php include (DIRNAME(__FILE__) . "/globals.php"); //Learn to secure your script! //And code properly for that matter -.- //Secured by Magictallguy print "<h3>Crystal Bank</h3>"; if($ir['crystalbank']>-1) { //Addition of the functions below to stop a hidden error. (Use error_reporting(E_ALL); too see what I mean... $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money'] > 25000) { print "Congratulations, you bought a crystal bank account for \$25,000! [url='crystalbank.php']Start using my account[/url]"; $sql = sprintf("UPDATE users SET money = money - %u WHERE (userid = %u)", 25000, $userid); $db->query($sql); } else { die("You do not have enough money to open an account, it costs \$25,000 for an account [url='explore.php']Back to town...[/url]"); } } else { print "Open a crystal bank account today, just \$25,000! [url='crystalbank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $db, $ir, $c, $userid, $h; $s = ($_POST['deposit'] == 1) ? "" : "s"; //Outputs: //0 crystals //1 crystal //2 crystals echo sprintf("[b]You currently have %s crystal%s in your crystal bank.[/b] ", number_format($ir['crystalbank']), $s); echo ("<table width='85%' cellspacing=1 class='table'>"); echo ("<tr>"); echo ("<td width='50%'>[b]Deposit crystal[/b] "); echo ("<form action='crystalbank.php?action=deposit' method='post'>"); echo sprintf("Amount: <input type='text' name='deposit' value='%u' /> ", $ir['crystalbank']); echo ("<input type='submit' value='Deposit' /></form></td>"); echo ("<td width='50%'>[b]Withdraw crystals[/b] "); echo ("There is no fee on withdrawals.<form action='crystalbank.php?action=withdraw' method='post'>"); echo sprintf("Amount: <input type='text' name='withdraw' value='%u' /> ", $ir['crystalbank']); echo ("<input type='submit' value='Withdraw' /></form></td>"); echo ("</tr>"); echo ("</table>"); } function deposit() { global $db, $ir, $c, $userid, $h; $_POST['deposit'] = (float) $_POST['deposit']; if($_POST['deposit'] > $ir['crystals']) { print "You do not have enough crystals to deposit in the bank."; } else { $gain=$_POST['deposit']-$fee; $ir['crystals']+=$gain; $sql = sprintf("UPDATE users SET crystalbank = crystalbank + %u, crystals = crystals - %u WHERE (userid = %u)", mysql_real_escape_string($gain), mysql_real_escape_string($_POST['deposit']), $userid); //You MUST ALWAYS escape everything,, unless you want hackers to gain access? $db->query($sql); $s = ($_POST['deposit'] == 1) ? "" : "s"; //Outputs: //0 crystals //1 crystal //2 crystals echo sprintf("You hand over %s crystal%s to be deposited, ", number_format($_POST['deposit']), $s); echo sprintf(" is added to your account. ", number_format($gain)); echo sprintf("[b]You now have %s crystal%s in the bank.[/b] ", number_format($ir['crystalbank']), $s); echo ("[url='crystalbank.php']> Back[/url]"); } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw'] = (float) $_POST['withdraw']; if($_POST['withdraw'] > $ir['crystalbank']) { print "You do not have enough crystals to withdraw from the bank."; } else { $gain=$_POST['withdraw']; $ir['crystalbank']-=$gain; $sql = sprintf("UPDATE users SET crystalbank = crystalbank - %u, crystals = crystals + %u WHERE (userid = %u)", mysql_real_escape_string($gain), mysql_real_escape_string($gain), $userid); $db->query($sql); $s = ($_POST['deposit'] == 1) ? "" : "s"; //Outputs: //0 crystals //1 crystal //2 crystals echo ("You ask to withdraw , ", number_format($gain), $s); echo ("the banking lady grudgingly hands it over. "); echo ("[b]You now have %s crystal%s in the bank.[/b] ", number_format($ir['crystalbank']), $s); echo ("[url='crystalbank.php']> Back[/url]"); } } $h->endpage(); ?>
-
[mccode v2] Updated Display Pic System
Magictallguy replied to Richard's topic in Free Modifications
Re: Updated Display Pic System [V2] Speak in english and we may be able to help you.. -
Re: online/offline/total users Stick inbetween those 2 lines of code..
-
Re: Quote Mod Thanks for the security LostOne. sprintf() would be a good idea there xD
-
Re: House Tax [$5] No idea who Matt is, but I'll make this for free if you wish? The screenshot no longer works so I don't know how you want it, but it's not hard to make :)
-
Re: House Rentals [V2] Ah nuts xD
-
[mccode v1] Advanced(ish) Level Upgrade Mod.
Magictallguy replied to Matty's topic in Free Modifications
Re: [Free] Advanced(ish) Level Upgrade Mod. Actually no, if you look into the globals.php, you'll find that $ir['exp_needed'] is defined there. -
Re: Updated Mailbox [v1] Instead of using include "globals.php"; Use include_once(DIRNAME(__FILE__) . '/globals.php');