-
Posts
2,140 -
Joined
-
Last visited
-
Days Won
148
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
This isn't the place for updates. Of course he does
-
Don't add an E then :P
-
Shoot me a link! If nothing else, I'm curious
-
That doesn't exist in my code, no idea why you're getting that error O.o
-
Added search by item type and item name <?php require_once __DIR__ . '/globals.php'; if(!function_exists('format')) { function format($str, $dec = 0) { // purely for my own laziness.. return is_numeric($str) ? number_format($str, $dec) : stripslashes(htmlspecialchars($str)); } } $where = ''; if(array_key_exists('type', $_GET)) { $_GET['type'] = ctype_digit($_GET['type']) ? $_GET['type'] : null; if(!empty($_GET['type'])) { $selectType = $db->query('SELECT `itmtypename` FROM `itemtypes` WHERE `itmtypeid` = '.$_GET['type']); if($db->num_rows($selectType)) $where .= ' WHERE `itmtypeid` = '.$_GET['type']; } } if(array_key_exists('item', $_GET)) { $_GET['item'] = is_string($_GET['item']) ? $db->escape($_GET['item']) : null; if(!empty($_GET['item'])) { $where .= !$where ? ' WHERE' : ' AND'; $where .= ' `itmname` LIKE("%'.$_GET['item'].'%")'; } } $select = $db->query('SELECT `itmname`, `itmdesc`, `itmbuyprice`, `itmsellprice`, `weapon`, `armor`, `itmtypename` FROM `items` LEFT JOIN `itemtypes` ON `items`.`itmtype` = `itemtypes`.`itmtypeid` '.$where.' ORDER BY `itmtype` ASC, `itmname` ASC'); $selectTypes = $db->query('SELECT `itmtypeid`, `itmtypename` FROM `itemtypes` ORDER BY `itmtypename` ASC'); ?><form method="get"> <table class="table" width="100%"> <tr> <th width="25%">Search by type</th> <td width="75%"><select name="type"> <option value="0">--- None ---</option><?php while($row = $db->fetch_row($selectTypes)) printf('<option value="%u"%s>%s</option>', $row['itmtypeid'], !empty($_GET['type']) && $_GET['type'] == $row['itmtypeid'] ? ' selected="selected"' : null, format($row['itmtypename'])); ?></select></td> </tr> <tr> <th>Search by item</th> <td><input type="text" name="item" placeholder="Partial or complete name" /></td> </tr> <tr> <td colspan="2" class="center"><input type="submit" value="Search" /></td> </tr> </table> </form><br /> <table class="table" width="100%"> <tr> <th>Item</th> <th>Description</th> <th>Type</th> <th>Buy/Sell</th> <th>Weapon/Armor</th> </tr><?php while($row = $db->fetch_row($select)) { ?><tr> <td><?php echo format($row['itmname']);?></td> <td><?php echo $row['itmdesc'] ? format($row['itmdesc']) : 'No description';?></td> <td><?php echo format($row['itmtypename']);?></td> <td><?php echo $row['itmbuyable'] ? ($row['itmbuyprice'] ? '$'.format($row['itmbuyprice']) : 'Free') : 'Can\'t be bought';?>/<?php echo $row['itmsellprice'] > 0 ? '$'.format($row['itmsellprice']) : 'Can\'t be sold';?></td> <td><?php echo format($row['weapon']),'/',format($row['armor']);?></td> </tr><?php } ?></table>
-
Not a bad idea, I've done something similar for my clients. It may not be as clean (visually), but using 1 query can also be ok <?php require_once __DIR__ . '/globals.php'; if(!function_exists('format')) { function format($str, $dec = 0) { // purely for my own laziness.. return is_numeric($str) ? number_format($str, $dec) : stripslashes(htmlspecialchars($str)); } } $select = $db->query('SELECT `itmname`, `itmdesc`, `itmbuyprice`, `itmsellprice`, `weapon`, `armor`, `itmtypename` FROM `items` LEFT JOIN `itemtypes` ON `items`.`itmtype` = `itemtypes`.`itmtypeid` ORDER BY `itmtype` ASC, `itmname` ASC'); ?><table class="table"> <tr> <th>Item</th> <th>Description</th> <th>Type</th> <th>Buy/Sell</th> <th>Weapon/Armor</th> </tr><?php while($row = $db->fetch_row($select)) { ?><tr> <td><?php echo format($row['itmname']);?></td> <td><?php echo $row['itmdesc'] ? format($row['itmdesc']) : 'No description';?></td> <td><?php echo format($row['itmtypename']);?></td> <td><?php echo $row['itmbuyable'] ? ($row['itmbuyprice'] ? '$'.format($row['itmbuyprice']) : 'Free') : 'Can\'t be bought';?>/<?php echo $row['itmsellprice'] > 0 ? '$'.format($row['itmsellprice']) : 'Can\'t be sold';?></td> <td><?php echo format($row['weapon']),'/',format($row['armor']);?></td> </tr><?php } ?></table> NOTE: This is untested and it ain't pretty either
-
100% agree. I want to bring us down to have a couple of different quite broad boards. Rather than trying to separate everything like the current forum structure does. From here
-
New web development forum with a section for game engines
Magictallguy replied to IllegalPigeon's topic in Web Developement
Cheeky bish! Besides, that was a quick-fix.. Not intended for long-term use -
I have received no DMCA notice. The game is Derek's, I just work there. Welcome to the internet! Where everything online is public. There is no theft, an idea cannot be stolen - it's outcome can, but the idea itself cannot. I remember, on multiple occasions, where you asked me to sign up to multiple games in order to see how they did things and copy them. Naturally, I refused, so you sent screenshots instead. - Didn't you ever notice how the things you asked me to write always ended up a little different from the screenshot(s)? I owe nothing. The payment for the graphics is between Derek and the designer. As I've stated to you on multiple occasions; I'm a developer, not a designer. As for the game, it's up and running fine
-
'tis one of my engines (not exactly my best work, greatly in need of an overhaul)
-
Sending some idiot to spam both my test rig (which really has no impact) and a game upon which I work (has little impact. 4 queries later, all is mopped up), whilst also directly attempting to insult me? How cute!
-
Forgive the gravedig.. Any updates, [MENTION=66442]grant[/MENTION]?
-
I noticed when I went back to developing it this morning, I've added the new tables, simply pull from the repo again I should probably open my own topic about this at some point haha My apologies to the OP, it was not my intention to nab your topic
-
They're open source as of about now. Feel free to fork the repo and submit whatever back. I'll happily merge with improvements!
-
Thanks for the mention - buy why pay? https://bitbucket.org/Magictallguy/mtg-engine
-
Screenshots restored The entire site (including domain) was supposed to be mine when I agreed to convert a terribly outdated casino script. Naturally, I never received a thing. I have long since re-installed my OS (thrice) and no longer have those logs, unfortunately That is *exactly* what he did - giving me absolutely no warning, not even a polite "your services are no longer required" Most likely not
-
My name is Anthony Jordan, you are welcome to state what you wish. I wrote the code under my online handle "Magictallguy" - there are references to my online handle throughout my code. I've already had this argument with you, I'm not doing it again. It's pretty obvious to most exactly what's going on between you and I and it's pretty obvious whom speaks the truth. I tire of your lies and deceit. Please, I implore you; do yourself a favour - grow up!
-
No, I'm selling absolutely nothing. Thank you for finally admitting it was my work As requested by a client Mmmkay, who wrote it? Who's name is on it? Who is the author? I wrote the code, I am the author, it is my name throughout it. When will you learn that theft and your twisted sense of reality is exactly that?
-
mccode-v2 Jail/Hospital Timestamps
Magictallguy replied to TheMasterGeneral's topic in Free Modifications
Minor recommendation. Change $q=$db->query("SELECT `hospital` FROM `users` WHERE `userid` = {$user}");$userhosptime=$db->fetch_single($q); if ($userhosptime > $currenttime) { $db->query("UPDATE `users` SET `hospital` = `hospital` + {$TimeGiven}, `hospreason` = '{$reason}' WHERE `userid` = {$user}"); } else { $db->query("UPDATE `users` SET `hospital` = {$currenttime} + {$TimeGiven}, `hospreason` = '{$reason}' WHERE `userid` = {$user}"); } to $db->query("UPDATE `users` SET `hospital` = IF(`hospital`, ".($currenttime+$TimeGiven).", `hospital` + ".$TimeGiven."), hospreason = '".$db->escape($reason)."' WHERE userid = ".$user); Do the same with jail too -
My offer was genuinely serious >.>
-
No activity in over 3 days? What a shame(!)
-
Sure.. I'll take it.. I'll give you $0.02
-
So, 4 pages of *****ing and we come to memes.. Mmkay then
-
Add it into the SESSIONDATA before it hits the URL, then check that session on the next action. If the SESSIONDATA matches, then chances are it's invalid. <?php // include globals.php or whatever // show some h3 title or whatever if(array_key_exists('minion', $_SESSION) && is_array($_SESSION['minion'])) { if($_SESSION['minion']['step'] == $_GET['step'] || $_SESSION['minion']['amt'] == $_GET['amt'] || $_SESSION['minion']['type'] == $_GET['type']) { echo 'No'; exit($h->endpage()); } unset($_SESSION['minion']); } // Do processing code $_SESSION['minion'] = [ 'step' => 'capture', 'amt' => $amt2, 'type' => $type ]; //Output.. $h->endpage(); NOTE: This has not been tested
-
To add on to this, I've also ran into this issue for a client. It was a simple DOCTYPE/XHTML issue, (more precisely, a non-self-closing tag that had been written to self-close (i.e. <form action='whatever' method='whatever' />))