Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 10/13/2019 in all areas

  1. 2 points
    This was due to her trying to run v1 she now has V2 up and running 🙂
  2. 2 points
    And the URL you're attempting to use? Chances are you're not using an action (the "?action=wutever" bit) that's in the switch() statement near the top of the file. In v2 and v2.0.5b, the case is "repclear". and that function requires a POST value of ID. In reports_view(), the default form reads as <form action='staff_users.php?action=repclear'> <input type='hidden' name='ID' value='{$r['prID']}' /> {$csrf} <input type='submit' value='Clear' /> </form> and is part of an echo statement
  3. 2 points
    nice 🤩 i will implement this in my engine ❤️
  4. 2 points
    Im offering the ability to turn your website into a very basic android app (using web view) this will require that your site is already mobile friendly (something else i can help with) for more info mail me.
  5. 1 point
    I remember when someone could send a DMCA to your host and that provider would suspend the site for 24hrs then when they found out it was legit they'll unsuspend it. I think this was a problem back in the day. I'm not proud of it but I was taught by a vet on here and took down many of my competition that way. I think that's why I always chose offshore servers over US servers.
  6. 1 point
    The only reason you'd need an offshore host is if you weren't doing something legal with your application. If so there's a lot more other concerns you should be worried about then the location of the servers.
  7. 1 point
    The servers I manage are dotted around the planet. Only 2 of them are local (to the UK). That being said, I'm not paying specifically for servers to be located elsewhere, it just so happens that they're not in the UK. It can be used for providing a closer-to-home mirror of a site to doing things otherwise illegal on home soil - not that I would know, of course. Personally, I have no issue with offshore hosting, nor do I have much of an opinion on using them specifically because they're not homegrown. If you require an offshore host, you do you. In most cases you're likely to find here, (almost) any webserver will suffice
  8. 1 point
  9. 1 point
    I have had nothing but horrid experience with the Mccode website. For over a year I have been trying to get my money into my paypal. Today it hit over $100 and it's time to bitch moan and complain until something is done. Clearly they are just keeping money they do not have the right to. I want my money and I want all my mods removed. This has gone on far to long. Id also like to change my paypal email address but cant because they isn't an option. Second edit: I also cant see who buys anything so I cant offer any kind of support / updates. I also cant download my files to edit them and re-upload as some of them are from 5 years ago. @Dave @ColdBlooded @Dabomstew
  10. 1 point
  11. 1 point
    This sounds great, it'd enable you to create bundles of different modules for different genres. So all existing modules would be part of the mafia package and then in time you could release other bundles for other genres.
  12. 1 point
    Hi Elessair! Is there anything in your error_log?
  13. 1 point
    FFS i just got logged out now I gotta retype this shit! Note: MD you killin me f00l -> The message exceeds the maximum allowed length (20000 characters). itmsalegraph.php <?php require_once("gdgraph.php"); include "myconnect.php"; global $c; $gdg = new GDGraph(500,300,'',255); $_GET['ID']=abs(intval($_GET['ID'])); $test=mysql_query("SELECT price FROM itmmarketsales WHERE itmID={$_GET['ID']} ORDER BY time ASC",$c); $i=0; While ($tester=mysql_fetch_array($test)) { $pr[$i] = $tester['price']; $i=$i+1; } $arr = Array( 'Price' => Array($pr[0],$pr[1],$pr[2],$pr[3],$pr[4],$pr[5],$pr[6],$pr[7],$pr[8],$pr[9],$pr[10],$pr[11],$pr[12],$pr[13],$pr[14]) ); $colors = Array( 'Price' => Array(50,50,50,50,50,50,50,50,50,50,50,50,50,50,50) ); $thicknesses = Array( 'Price' => 8 ); //Example 1 $gdg->line_graph($arr, $colors,'','','','',$thicknesses,0,0,200); ?>   gdgraph.php (not mine but open gl) had to be deleted so I could post get it here: http://makko.com.mx/gden.php in item info page add $test=mysql_query("SELECT price,time FROM itmmarketsales WHERE itmID={$_GET['ID']} ORDER BY time DESC",$c); print"<table width=75% align=center class=content><tr style='background: gray;color:#EDE275;'><th colspan=4>[b]Looking up recent sales of {$id['itmname']}[/b]</th></tr><tr style='background: gray;color:#EDE275;'> <th>Last 15 Sale Prices</th><th>Sales Graph</th></tr>"; if (mysql_num_rows($test) < 1) {print "<tr style='background: gray;color:#EDE275;'><th colspan=2>No Recent Sales</th></tr></table>";} else {print"<tr><td valign=top><table align=center class=content width=100% valign=top><tr style='background: gray;color:#EDE275;'><th>Date</th><th>Price</th></tr>"; while ($testee=mysql_fetch_array($test)) { $date=date('F j, Y g:i a',$testee['time']); $price=money_formatter($testee['price']); print"<tr><td>$date</td><td>$price</td></tr>"; } print "</table></td><td align=center valign=top>[img=itmsalegraph.php?ID={$_GET[]</td></tr></table>";}   in item market after the money is taken from the user add mysql_query("INSERT INTO itmmarketsales VALUES ({$r['imITEM']},{$r['imPRICE']},unix_timestamp())",$c); $che=mysql_query("SELECT itmID from itmmarketsales WHERE itmID = {$r['imITEM']}",$c); If (mysql_num_rows($che) > 15) { mysql_query("Delete FROM itmmarketsales ORDER BY time ASC LIMIT 1"); }   SQL for it CREATE TABLE IF NOT EXISTS `itmmarketsales` ( `itmID` int(11) NOT NULL, `price` int(11) NOT NULL, `time` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;   tested and working for mccode lite bastardized edition (aka my game :p). If anyone asks how to convert it for v2 they are not allowed to have it xD you can see it working on my game http://www.lostcity.cc demo / demo1 <-- for the demo account
  14. 1 point
    Ok so back before MWG closed I had looked around for a trade system and couldn't find one, so I built one to suit my needs. So here it is SQL For Trades CREATE TABLE IF NOT EXISTS `trades` ( `trID` int(11) NOT NULL AUTO_INCREMENT, `trFROM` int(11) unsigned NOT NULL DEFAULT '0', `trUSER` int(11) NOT NULL DEFAULT '0', `trMONEY` bigint(22) NOT NULL DEFAULT '0', `trITEM` varchar(70) NOT NULL DEFAULT '', `trQTY` varchar(70) NOT NULL DEFAULT '', `trTAK` tinyint(1) NOT NULL, `trACC` tinyint(1) DEFAULT '0', `trRMONEY` bigint(22) NOT NULL DEFAULT '0', `trRITEM` varchar(70) NOT NULL DEFAULT '', `trRQTY` varchar(70) NOT NULL DEFAULT '', `trRTAK` tinyint(1) NOT NULL, `trRACC` tinyint(1) DEFAULT '0', PRIMARY KEY (`trID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; Sql for Logs CREATE TABLE IF NOT EXISTS `trades_logs` ( `trID` int(11) NOT NULL AUTO_INCREMENT, `trFROM` int(11) UNSIGNED NOT NULL DEFAULT 0, `trUSER` int(11) NOT NULL DEFAULT 0, `trGOLD` bigint(22) NOT NULL DEFAULT 0, `trITEM` varchar(70) NOT NULL DEFAULT '', `trQTY` varchar(70) NOT NULL DEFAULT '', `trTAK` varchar(15) NOT NULL, `trACC` tinyint(1) DEFAULT 0, `trRGOLD` bigint(22) NOT NULL DEFAULT 0, `trRITEM` varchar(70) NOT NULL DEFAULT '', `trRQTY` varchar(70) NOT NULL DEFAULT '', `trRTAK` varchar(15) NOT NULL, `trRACC` tinyint(1) DEFAULT 0, `time_added` timestamp NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`trID`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; Create a file called trade.php if you are using Cronus's mod for the armory uncomment the part about check_loaned. Also if your global_func doesn't have an inv_dropdown I created one <?php require_once __DIR__.'/globals.php'; /* * DON'T BE A DICK PUBLIC LICENSE * Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. * * DON'T BE A DICK PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION * * Do whatever you like with the original work, just don't be a dick. * * Being a dick includes - but is not limited to - the following instances: * * 1a. Outright copyright infringement - Don't just copy this and change the name. * 1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick. * 1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick. * * If you become rich through modifications, related works/services, or supporting the original work, share the love. Only a dick would make loads off this work and not buy the original works creator(s) a pint. * * Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back. */?> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#btnAdd').click(function() { var num = $('.clonedInputOne').length; var numTwo = $('.clonedInputTwo').length; var newNum = new Number(num + 1); var newElem = $('#input' + num).clone().attr('id', 'input' + newNum); var newElemTwo = $('#inputTwo' + numTwo).clone().attr('id', 'inputTwo' + newNum); newElem.children(':first').attr('id', 'item' + newNum).attr('name', 'item' + newNum); newElemTwo.children(':first').attr('id', 'qty' + newNum).attr('name', 'qty' + newNum); $('#input' + num).after(newElem); $('#inputTwo' + numTwo).after(newElemTwo); $('#btnDel').attr('disabled',''); if (newNum == 10) $('#btnAdd').attr('disabled','disabled'); }); $('#btnDel').click(function() { var num = $('.clonedInputTwo').length; $('#input' + num).remove(); $('#inputTwo' + num).remove(); $('#btnAdd').attr('disabled',''); if (num-1 == 1) $('#btnDel').attr('disabled','disabled'); }); $('#btnDel').attr('disabled','disabled'); }); </script> <?php echo " <h2>Trading Center</h2> "; $_GET['action'] = array_key_exists('action', $_GET) ? $_GET['action'] : null; switch ($_GET['action']) { default: def(); break; case 'accept': accept(); break; case 'add': add(); break; case 'view': view_trade(); break; case 'create': begin_trade(); break; case 'decline': decline_trade(); break; } function def() { global $db, $ir, $c, $userid, $h; $_GET['ID'] = array_key_exists('ID', $_GET) && ctype_digit($_GET['ID']) ? $_GET['ID'] : 0; $r = $db->query("SELECT * FROM trades WHERE trFROM = $userid OR trUSER = $userid ORDER by trID ASC"); if (0 == $db->num_rows($r)) { echo " No trade boxes opened.<br /><br /><a href='trade.php?action=create'><button>Create Trade</button></a>"; } else { echo " <table> <tr> <th>Trade ID</th> <th>Trading With</th> <th>See Trade</th> </tr>"; while ($d = $db->fetch_row($r)) { if ($d['trUSER'] == $userid) { $s = $d['trFROM']; } else { $s = $d['trUSER']; } $s = $db->query("SELECT username,userid FROM users WHERE userid = $s"); $f = $db->fetch_row($s); echo " <tr> <td>{$d['trID']}</td> <td><a href='viewuser.php?u={$f['userid']}'>{$f['username']}[{$f['userid']}]</a></td> <td><a href='trade.php?action=view&ID={$d['trID']}'>View</a></td> </tr>"; } echo "</table><br /><a href='trade.php?action=create'><button>Create New Trade</button></a>"; } } function begin_trade() { global $db, $ir, $c, $userid, $h; if ($_POST) { $_POST['user'] = isset($_POST['user']) && ctype_digit($_POST['user']) ? $_POST['user'] : null; $_POST['money'] = isset($_POST['money']) && ctype_digit($_POST['money']) ? $_POST['money'] : 0; $_POST['item'] = isset($_POST['item']) && preg_match('/^[0-9,]+$/', $_POST['item']) ? $_POST['item'] : null; $_POST['qty'] = isset($_POST['qty']) && ctype_digit($_POST['qty']) ? $_POST['qty'] : null; if (empty($_POST['user'])) { echo"You didn\'t enter a valid player ID."; die($h->endpage()); } if ($_POST['user'] == $userid) { echo"Really? You can\'t trade with yourself."; die($h->endpage()); } $items = $_POST['item']; $qty = $_POST['qty']; $itemCnt = 0; $qtyCnt = 0; for ($i = 1; $i <= 10; ++$i) { if ($_POST['item'.$i] > 0) { ++$itemCnt; $items .= ','.$_POST['item'.$i]; } } for ($i = 1; $i <= 10; ++$i) { $_POST['qty'.$i] = isset($_POST['qty'.$i]) && ctype_digit($_POST['qty'.$i]) ? $_POST['qty'.$i] : null; if ($_POST['qty'.$i] > 0) { ++$qtyCnt; $qty .= ','.$_POST['qty'.$i]; } } if ($itemCnt != $qtyCnt) { echo"Something doesn\'t add up. Please check your inputs"; die($h->endpage()); } $ex = explode(',', $_POST['item']); $qtys = explode(',', $_POST['qty']); $n = 0; if ($itemCnt) { foreach ($ex as $i) { $do_they_have = $db->query("SELECT * FROM `inventory` WHERE `inv_userid`={$userid} AND `inv_itemid`={$i} AND inv_qty>={$qtys[$n]}"); /*check_loaned($i, $qtys[$n]);*/ if (0 == $db->num_rows($do_they_have)) { echo"You do not have the item(s) you are trying to trade."; die($h->endpage()); } ++$n; } } unset($n); $us = $db->query("SELECT userid,username,money FROM users WHERE userid = {$_POST['user']}"); if (0 == $db->num_rows($us)) { echo"You are trying to trade with an invalid user!"; die($h->endpage()); } if ($_POST['money'] > $ir['money']) { echo"You don\'t have enough money to trade!"; die($h->endpage()); } if ($qty <= 0 && $items > 0) { echo"You can\'t trade a zero or a negative amount."; die($h->endpage()); } $ri = $db->fetch_row($us); $db->query("INSERT INTO `trades` (`trID`, `trFROM`, `trUSER`, `trMONEY`, `trITEM`, `trQTY`, `trTAK`, `trACC`, `trRMONEY`, `trRITEM`, `trRQTY`, `trRTAK`, `trRACC`) VALUES (NULL,{$userid},{$_POST['user']},{$_POST['money']},'{$items}','{$qty}',0,0,0,0,0,0,0)"); $db->query("INSERT INTO `trades_logs` (`trID`, `trFROM`, `trUSER`, `trMONEY`, `trITEM`, `trQTY`, `trTAK`, `trACC`, `trRMONEY`, `trRITEM`, `trRQTY`, `trRTAK`, `trRACC`) VALUES (NULL,{$userid},{$_POST['user']},{$_POST['money']},'{$items}','{$qty}','{$ir['lastip']}',0,0,0,0,'{$ri['lastip']}',0)"); $db->query("UPDATE users SET money=money-{$_POST['money']} WHERE userid=$userid"); echo"The trade has been entered! <br> <a href='trade.php'><button>Go Back</button></a>"; exit($h->endpage()); } ?> <form id='trade' method='post'> <fieldset style='width:75%;'><legend>Trading</legend> Userid: <input type='text' name='user' length='7' maxlength='7' value='0' /> <br /> Money: <input type='text' name='money' value='0' /> <br /> <table> <tr> <td><div id='input1' class='clonedInputOne'>Item: <?php echo inv_dropdown($c, 'item'); ?>x</div></td> <td><div id='inputTwo1' class='clonedInputTwo'><input type='text' name='qty' size='2' value='0' /></div></td> </tr> </table> <div> <input type='button' id='btnAdd' value='&plus;' /> <input type='button' id='btnDel' value='&minus;' /> </div> </fieldset> <input type='submit' value='Trade' /> </form><?php } function view_trade() { global $db, $ir, $c, $userid, $h; $_GET['ID'] = array_key_exists('ID', $_GET) && ctype_digit($_GET['ID']) ? $_GET['ID'] : 0; //fetch trade $q = $db->query("SELECT * FROM trades WHERE trID={$_GET['ID']}"); $r = $db->fetch_row($q); if (!$r['trID']) { echo"Invalid trade ID!"; die($h->endpage()); } $us = $db->query("SELECT userid,username,money FROM users WHERE userid = {$r['trFROM']}"); $user = $db->fetch_row($us); $us1 = $db->query("SELECT userid,username,money FROM users WHERE userid = {$r['trUSER']}"); $user1 = $db->fetch_row($us1); echo " <table> <tr> <th>User</th> <th>Money</th> <th>Item</th> <th>Quantity</th> </tr>"; echo " <tr> <td><a href='viewuser.php?u={$user['userid']}'>".$user['username'].'</a></td> <td>'.$r['trMONEY'].'</td>'; $ex = explode(',', $r['trITEM']); $qty = explode(',', $r['trQTY']); $n = 0; $items_needed=''; $qty_needed=''; foreach ($ex as $i) { $item = $db->query("SELECT `itmname` FROM `items` WHERE `itmid`={$i}"); $t = $db->fetch_row($item); $do_they_have = $db->query("SELECT `inv_itemid` FROM `inventory` WHERE `inv_userid`={$user['userid']} AND `inv_itemid`={$i} AND `inv_qty`>={$qty[$n]}"); if (0 == $qty[$n]) { $items_needed = 'None'; } $items_needed .= $t['itmname'].'<br />'; $qty_needed .= $qty[$n].'<br/>'; ++$n; } unset($n); echo '<td>'.$items_needed.'</td> <td>'.$qty_needed."</td> </tr> <tr> <td><a href='viewuser.php?u={$user1['userid']}'>".$user1['username'].'</a></td> <td>'.$r['trRMONEY'].'</td>'; $ex = explode(',', $r['trRITEM']); $qty = explode(',', $r['trRQTY']); $n = 0; $qty_needed1=''; foreach ($ex as $i) { $item = $db->query("SELECT `itmname` FROM `items` WHERE `itmid`={$i}"); $t = $db->fetch_row($item); $do_they_have = $db->query("SELECT `inv_itemid` FROM `inventory` WHERE `inv_userid`={$user1['userid']} AND `inv_itemid`={$i} AND `inv_qty`>={$qty[$n]}"); if (0 == $qty[$n]) { $items_needed1 = 'None'; } $items_needed1 .= $t['itmname'].'<br />'; $qty_needed1 .= $qty[$n].'<br/>'; ++$n; } unset($n); echo '<td>'.$items_needed1.'</td> <td>'.$qty_needed1.'</td> </tr></table>'; if ($r['trFROM'] == $userid) { if (1 == $r['trACC']) { echo 'You have<font color=green> accepted</font> the trade.<br />'; } elseif (0 == $r['trACC']) { echo 'You have not<font color=red> accepted</font> the trade.<br />'; } if (0 == $r['trRACC']) { echo 'They have not<font color=red> accepted</font> the trade.'; } elseif (1 == $r['trRACC']) { echo 'They have<font color=green> accepted</font> the trade.'; } } elseif ($r['trUSER'] == $userid) { if (1 == $r['trRACC']) { echo 'You have<font color=green> accepted</font> the trade<br />'; } elseif (0 == $s['trRACC']) { echo 'You have not<font color=red> accepted</font> the trade.<br />'; } if (0 == $r['trACC']) { echo 'They have not<font color=red> accepted</font> the trade.'; } elseif (1 == $r['trACC']) { echo 'They have<font color=green> accepted </font>the trade.'; } } echo '</div>'; echo "<br /><center><a href='trade.php?action=accept&ID={$r['trID']}'><button>Accept</button></a> <a href='trade.php?action=decline&ID={$r['trID']}'><button>Decline</button></a> <a href='trade.php?action=add&ID={$r['trID']}'><button>Update</button></a> <a href='trade.php'><button>Back</button></a><br /><br /> Warning: Updating a trade resets all items and amounts</center>"; } function add() { global $db, $ir, $c, $userid, $h; $_GET['ID'] = array_key_exists('ID', $_GET) && ctype_digit($_GET['ID']) ? $_GET['ID'] : 0; $q = $db->query("SELECT * FROM trades WHERE trID={$_GET['ID']}"); $r = $db->fetch_row($q); if (!$r['trID']) { echo"Invalid trade ID!"; die($h->endpage()); } if ($_POST) { $_POST['money'] = filter_var($_POST['money'], FILTER_VALIDATE_INT) ? abs((int) $_POST['money']) : 0; $_POST['item'] = filter_var($_POST['item'], FILTER_VALIDATE_INT) ? abs((int) $_POST['item']) : 0; $_POST['qty'] = filter_var($_POST['qty'], FILTER_VALIDATE_INT) ? abs((int) $_POST['qty']) : 0; $items = $_POST['item']; $qty = $_POST['qty']; $itemCnt = 0; $qtyCnt = 0; for ($i = 1; $i <= 10; ++$i) { $_POST['item'.$i] = isset($_POST['item'.$i]) && ctype_digit($_POST['item'.$i]) ? $_POST['item'.$i] : null; if ($_POST['item'.$i] > 0) { ++$itemCnt; $items .= ','.$_POST['item'.$i]; } } for ($i = 1; $i <= 10; ++$i) { $_POST['qty'.$i] = isset($_POST['qty'.$i]) && ctype_digit($_POST['qty'.$i]) ? $_POST['qty'.$i] : null; if ($_POST['qty'.$i] > 0) { ++$qtyCnt; $qty .= ','.$_POST['qty'.$i]; } } if ($itemCnt != $qtyCnt) { echo"Something doesn\'t add up. Please check your inputs"; die($h->endpage()); } $ex = explode(',', $_POST['item']); $qtys = explode(',', $_POST['qty']); $n = 0; if ($itemCnt) { foreach ($ex as $i) { $item = $db->query("SELECT `itmname` FROM `items` WHERE `itmid`={$i}"); $t = $db->fetch_row($item); if ($i > 0 && 0 == $qtys[$n]) { echo"All Items must have a qty."; die($h->endpage()); } /*check_loaned($i, $qtys[$n]);*/ $do_they_have = $db->query("SELECT * FROM `inventory` WHERE `inv_userid`={$userid} AND `inv_itemid`={$i} AND `inv_qty`>={$qtys[$n]}"); if (0 == $db->num_rows($do_they_have)) { echo"You do not have the item(s) you are trying to trade."; die($h->endpage()); } unset($n); } } trade_add(); if ($qty <= 0 && $items > 0) { echo"You can\'t trade zero or a negative amount."; die($h->endpage()); } if ($_POST['money'] > $ir['money']) { echo"You don\'t have enough money to trade!"; die($h->endpage()); } if ($r['trFROM'] == $userid) { $db->query("UPDATE users SET money=money+{$r['trMONEY']}, money=money-{$_POST['money']} WHERE userid=$userid"); $db->query("UPDATE trades SET trMONEY={$_POST['money']}, trITEM = '{$items}', trQTY = '{$qty}', trACC=0,trRACC=0 WHERE trID={$r['trID']}"); $db->query("UPDATE trades_logs SET trMONEY={$_POST['money']}, trITEM = '{$items}', trQTY = '{$qty}', trACC=0,trRACC=0 WHERE trID={$r['trID']}"); } if ($r['trUSER'] == $userid) { $db->query("UPDATE users SET money=money+{$r['trRMONEY']},money=money-{$_POST['money']} WHERE userid=$userid"); $db->query("UPDATE trades SET trRMONEY={$_POST['money']}, trRITEM = '{$items}', trRQTY = '{$qty}', trACC=0, trRACC=0 WHERE trID={$r['trID']}"); $db->query("UPDATE trades_logs SET trRMONEY={$_POST['money']}, trRITEM = '{$items}', trRQTY = '{$qty}', trACC=0, trRACC=0 WHERE trID={$r['trID']}"); } echo "Trade box has been updated. <br /><a href='trade.php?action=view&ID={$r['trID']}'><button>Back</button></a>"; exit($h->endpage()); } ?> <form id='#' method='post'> <fieldset style='width:75%;'><legend>Trade</legend> <sub><font color=red>Warning: Updating a trade resets all items and amounts!</font></sub><br /><br /> Money: <input type='text' name='money' value='0' /> <br /> <table> <tr> <td><div id='input1' class='clonedInputOne'>Item: <?php echo inv_dropdown($c, 'item'); ?>x</div></td> <td><div id='inputTwo1' class='clonedInputTwo'><input type='text' name='qty' size='2' value='0' /></div></td> </tr> </table> <div> <input type='button' id='btnAdd' value='&plus;' /> <input type='button' id='btnDel' value='&minus;' /> </div> </fieldset> <input type='submit' value='Update' /> </form><?php } function accept() { global $db, $ir, $c, $userid, $h; $_GET['ID'] = array_key_exists('ID', $_GET) && ctype_digit($_GET['ID']) ? $_GET['ID'] : 0; $q = $db->query("SELECT * FROM trades WHERE trID={$_GET['ID']}"); $r = $db->fetch_row($q); if (!$r['trID']) { echo"Invalid trade ID!"; die($h->endpage()); } if (0 == $r['trACC'] && 0 == $r['trRACC'] && $r['trFROM'] == $userid) { $db->query("UPDATE trades SET trACC=1 WHERE trID={$r['trID']}"); $db->query("UPDATE trades_logs SET trACC=1 WHERE trID={$r['trID']}"); echo " Trade<font color=green> accepted</font>, please wait for the other person.<br /> <a href='trade.php?action=view&ID={$r['trID']}'><button>Back</button></a>"; } elseif (0 == $r['trRACC'] && 0 == $r['trACC'] && $r['trUSER'] == $userid) { $db->query("UPDATE trades SET trRACC=1 WHERE trID={$r['trID']}"); $db->query("UPDATE trades_logs SET trRACC=1 WHERE trID={$r['trID']}"); echo " Trade <font color=green>accepted</font>, please wait for the other person.<br /> <a href='trade.php?action=view&ID={$r['trID']}'><button>Back</button></a>"; } if ($r['trFROM'] == $userid && 0 == $r['trACC'] && 1 == $r['trRACC']) { $db->query("UPDATE trades SET trACC=1 WHERE trID = {$r['trID']}"); $db->query("UPDATE trades_logs SET trACC=1 WHERE trID = {$r['trID']}"); if ($r['trITEM'] > 0) { $ex = explode(',', $r['trITEM']); $qty = explode(',', $r['trQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trUSER'], $i, $qty[$n]); ++$n; } unset($n); } if ($r['trRITEM'] > 0) { $ex = explode(',', $r['trRITEM']); $qty = explode(',', $r['trRQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trFROM'], $i, $qty[$n]); ++$n; } unset($n); } $db->query("UPDATE users SET money=money+{$r['trMONEY']} WHERE userid={$r['trUSER']}"); $db->query("UPDATE users SET money=money+{$r['trRMONEY']} WHERE userid={$r['trFROM']}"); $db->query("DELETE FROM trades WHERE trID={$r['trID']}"); echo "Trade Accepted. <br /><a href='trade.php'><button>Back</button></a>"; } elseif ($r['trUSER'] == $userid && 0 == $r['trRACC'] && 1 == $r['trACC']) { $db->query("UPDATE trades SET trRACC=1 WHERE trID = {$r['trID']}"); $db->query("UPDATE trades_logs SET trRACC=1 WHERE trID = {$r['trID']}"); if ($r['trITEM'] > 0) { $ex = explode(',', $r['trITEM']); $qty = explode(',', $r['trQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trUSER'], $i, $qty[$n]); ++$n; } unset($n); } if ($r['trRITEM'] > 0) { $ex = explode(',', $r['trRITEM']); $qty = explode(',', $r['trRQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trFROM'], $i, $qty[$n]); ++$n; } unset($n); } $db->query("UPDATE users SET money=money+{$r['trMONEY']} WHERE userid={$r['trUSER']}"); $db->query("UPDATE users SET money=money+{$r['trRMONEY']} WHERE userid={$r['trFROM']}"); $db->query("DELETE FROM trades WHERE trID={$r['trID']}"); echo "Trade accepted and finished. <br /><a href='trade.php'><button>Back</button></a>"; } } function decline_trade() { global $db, $ir, $c, $userid, $h; $_GET['ID'] = array_key_exists('ID', $_GET) && ctype_digit($_GET['ID']) ? $_GET['ID'] : 0; $q = $db->query("SELECT * FROM trades WHERE trID={$_GET['ID']}"); $r = $db->fetch_row($q); if (!$r['trID']) { echo"Invalid trade ID!"; die($h->endpage()); } if ($r['trFROM'] == $userid) { event_add($r['trUSER'], "{$ir['username']} has declined a trade you were in."); } elseif ($r['trUSER'] == $userid) { event_add($r['trFROM'], "{$ir['username']} has declined a trade you were in."); } if ($r['trFROM'] == $userid) { $db->query("UPDATE trades_logs SET trACC=2 WHERE trID = {$r['trID']}"); if ($r['trITEM'] > 0) { $ex = explode(',', $r['trITEM']); $qty = explode(',', $r['trQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trFROM'], $i, $qty[$n]); ++$n; } unset($n); } if ($r['trRITEM'] > 0) { $ex = explode(',', $r['trRITEM']); $qty = explode(',', $r['trRQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trUSER'], $i, $qty[$n]); ++$n; } unset($n); } } if ($r['trUSER'] == $userid) { $db->query("UPDATE trades_logs SET trRACC=2 WHERE trID = {$r['trID']}"); if ($r['trITEM'] > 0) { $ex = explode(',', $r['trITEM']); $qty = explode(',', $r['trQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trFROM'], $i, $qty[$n]); ++$n; } unset($n); } if ($r['trRITEM'] > 0) { $ex = explode(',', $r['trRITEM']); $qty = explode(',', $r['trRQTY']); $n = 0; foreach ($ex as $i) { item_add($r['trUSER'], $i, $qty[$n]); ++$n; } unset($n); } } $db->query("UPDATE users SET money=money+{$r['trRMONEY']} WHERE userid={$r['trUSER']}"); $db->query("UPDATE users SET money=money+{$r['trMONEY']} WHERE userid={$r['trFROM']}"); $db->query("DELETE FROM trades WHERE trID={$_GET['ID']}"); echo " Trade <font color=red>declined!<font><br /> <a href='trade.php'><button>Back</button></a>"; } $h->endpage(); ?> Inv_dropdown for your global_func.php <?php function inv_dropdown($connection, $ddname = 'inv', $selected = -1) { global $db, $userid; $ret = "<select name='$ddname' type='dropdown'>"; $q = $db->query("SELECT * FROM inventory LEFT JOIN items ON inv_itemid=itmid WHERE inv_userid={$userid} ORDER BY itmname ASC"); if ($selected < 1) { $ret .= "<option value='0' selected='selected'> None </option>"; } else { $ret .= "<option value='0'> None </option>"; } while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid']) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['itmname']}</option>"; } $ret .= "\n</select>"; return $ret; } ?> And for your staff_logs.php file <?php //The case to add at the top case 'tradelogs': view_trade_logs(); break; //And the function to add. Then of course you'll want to add the link to your smenu function view_trade_logs() { global $db, $ir, $c, $h, $userid; echo '<h3>Trade Logs</h3><hr />'; if (!$_GET['st']) { $_GET['st'] = 0; } $st = abs((int) $_GET['st']); $app = 50; $q = $db->query('SELECT * FROM trades_logs'); $trades = $db->num_rows($q); $pages = ceil($trades / $app); echo 'Pages:&nbsp;'; for ($i = 1; $i <= $pages; ++$i) { $s = ($i - 1) * $app; if ($s == $st) { echo "<b>$i</b>&nbsp;"; } else { echo "<a href='staff_logs.php?action=tradelogs&st=$s'>$i</a>&nbsp;"; } if (0 == $i % 25) { echo '<br />'; } } echo "<br /> <table width='100%' cellspacing=1 class='table'><th>ID</th><th>User</th><th>Money</th><th>Items</th><th>Qty</th><th>ACP</th><th>IP</th></tr>"; $q = $db->query("SELECT t.*,u1.username as trader, u2.username as tradee FROM trades_logs t LEFT JOIN users u1 ON t.trFROM=u1.userid LEFT JOIN users u2 ON t.trUSER=u2.userid ORDER BY t.trID DESC LIMIT $st,$app"); while ($r = $db->fetch_row($q)) { echo "<tr><td width=5%>{$r['trID']}</td><td width=15%>[<a href='viewuser.php?u={$r['trFROM']}'>{$r['trader']}</a>]</td><td>$".$db->escape($r['trMONEY']).'</td>'; $ex = explode(',', $r['trITEM']); $qty = explode(',', $r['trQTY']); $n = 0; $items_needed=''; $qty_needed=''; foreach ($ex as $i) { $item = $db->query("SELECT `itmname` FROM `items` WHERE `itmid`={$i}"); $t = $db->fetch_row($item); if (0 == $qty[$n]) { $items_needed = 'None'; } $items_needed .= $t['itmname'].'<br />'; $qty_needed .= $qty[$n].'<br/>'; ++$n; } unset($n); echo '<td>'.$items_needed.'</td> <td>'.$qty_needed.'</td>'; if (0 == $r['trACC']) { $ac = 'No'; } elseif (1 == $r['trRCC']) { $ac = 'Yes'; } elseif (2 == $r['trACC']) { $ac = 'Canc'; } echo '<td>'.$ac."</td> <td>{$r['trTAK']}</td></tr> <tr><td width=5%>{$r['trID']}</td><td width=15%>[<a href='viewuser.php?u={$r['trUSER']}'>{$r['tradee']}</a>]</td><td>$".$db->escape($r['trRMONEY']).'</td>'; $ex = explode(',', $r['trRITEM']); $qty = explode(',', $r['trRQTY']); $n = 0; $qty_needed1=''; $items_needed1=''; foreach ($ex as $i) { $item = $db->query("SELECT `itmname` FROM `items` WHERE `itmid`={$i}"); $t = $db->fetch_row($item); if (0 == $qty[$n]) { $items_needed1 = 'None'; } $items_needed1 .= $t['itmname'].'<br />'; $qty_needed1 .= $qty[$n].'<br/>'; ++$n; } unset($n); echo '<td>'.$items_needed1.'</td> <td>'.$qty_needed1.'</td>'; if (0 == $r['trRACC']) { $acc = 'No'; } elseif (1 == $r['trRACC']) { $acc = 'Yes'; } elseif (2 == $r['trRACC']) { $acc = 'Canc'; } echo '<td>'.$acc."</td> <td>{$r['trRTAK']}</td> </tr>"; } echo '</table><br />'; $mypage = floor($_GET['st'] / $app) + 1; echo 'Pages:&nbsp;'; for ($i = 1; $i <= $pages; ++$i) { $s = ($i - 1) * $app; if ($s == $st) { echo "<b>$i</b>&nbsp;"; } else { echo "<a href='staff_logs.php?action=tradelogs&st=$s'>$i</a>&nbsp;"; } if (0 == $i % 25) { echo '<br />'; } } stafflog_add("Looked at the Trade Logs(Page $mypage)"); } ?> You'll want to add the link to your smenu staff_logs.php?action=tradelogs and of course the trade.php link to explore. Edit* This was tested on base mccodes and it worked for me, I also stripped all the game specific css coding so it is barebones.
  15. 1 point
    Im in need of another coder to help with my project, i have a few things left to do that i require help with before the game is finised! Please contact me on discord Mugaru#2559 so we can discuss further...
  16. 1 point
    With V2.2.2 i have added a basic installer making it easier to install, i have also fixed many bugs and improved some of the core code making it more configurable when making modules.
  17. 1 point
    Hey everybody, Another long-time member popping in after randomly coming across this forum being back, was good to see a few familiar names. To think I joined in 2007 when I had just turned 14 years of age 😁 I've since become a Software/Website Developer after completing a Computer Science degree therefore my days of coding MCCodes games helped me get on this track. I actually use PHP primarily in my job as a Web Developer for local government. After looking back at some of my earlier code (I think we all cringe when we do that), I am glad I've learnt quite a bit since then 😅 I'm glad to see MWG back and I may even start posting on here again. No promises however, since life and work seems to get in the way of internet activities nowadays 😐 - Redeye
  18. 1 point
    Hiya i havent made any mods in a longgggg time :P so while on holiday i was thinking what could be improved in McCodes then i thought of the leveling system i use on Themercenary.net and thought McCodes was dull and boring and just takes the fun out of it and makes it a never ending click click click game What this does Displays a notice saying what level you are and what you have unlocked Sends you an event You can choose the option so the player gains money for each level they gain (ie $250 for each level) You can set a max level Set energy, brave, hp gain per level ITS FREE! First off in global_func.php you need to find function check_level() { global $db; global $ir,$c,$userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['exp'] >= $ir['exp_needed']) { $expu=$ir['exp']-$ir['exp_needed']; $ir['level']+=1; $ir['exp']=$expu; $ir['energy']+=2; $ir['brave']+=2; $ir['maxenergy']+=2; $ir['maxbrave']+=2; $ir['hp']+=50; $ir['maxhp']+=50; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); $db->query("UPDATE users SET level=level+1,exp=$expu,energy=energy+2,brave=brave+2,maxenergy=maxenergy+2,maxbrave=maxbrave+2, hp=hp+50,maxhp=maxhp+50 where userid=$userid"); } } And replace it with function check_level() { global $ir; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); } What this does is removes the current system, so that mine is being used :) Now we need to open up globals.php and before ?> add this include 'levelup.php'; now we have to make a file called levelup.php and upload it to your server <?php $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['exp'] >= $ir['exp_needed'] && $ir['level']!=$set['max_level']) { $expu=$ir['exp']-$ir['exp_needed']; $ir['exp']=$expu; if ($set['level_gain']>0) {$gain='<br>You received $'.(($ir['level']+1)*$set['level_gain']); $gainsql=' `money`=`money`+'.(($ir['level']+1)*$set['level_gain']).',';} $db->query("UPDATE `users` SET".$gainsql." `level`=`level`+1, `exp`=$expu, `energy`=`energy`+".$set['energy_gain'].", `brave`=`brave`+".$set['brave_gain'].", `maxenergy`=`maxenergy`+".$set['energy_gain'].", `maxbrave`=`maxbrave`+".$set['brave_gain'].", `hp`=`hp`+".$set['hp_gain'].", `maxhp`=`maxhp`+".$set['hp_gain']." WHERE `userid`=".$ir['userid']); event_add($ir['userid'], 'You have leveled up you are now level <strong>'.($ir['level']+1).'</strong>'.$gain, $c); $unlocks='<em>None</em>'; $q=mysql_query("SELECT `cityname` FROM `cities` WHERE `cityminlevel`=".($ir['level']+1)); if (mysql_num_rows($q)>0) { $unlocks='<strong>You can travel to:</strong><ul>'; while ($c=mysql_fetch-array($q)) { $unlocks=$unlocks.'<li>'.$c['cityname'].'</li>'; } $unlocks=$unlocks.'</ul>'; } echo ' <div align="center"> <table width="50%"> <tr> <td> <strong>You have leveled up!</strong> </td> </tr> <tr> <td> You are now level: '.($ir['level']+1).' </hr> <strong>Unlocks:</strong><br> '.$unlocks.' </td> </tr> </table> </div>'; } ?> INSERT INTO `settings` ( `conf_id` , `conf_name` , `conf_value` ) VALUES ( NULL , 'energy_gain', '2' ), ( NULL , 'brave_gain', '2' ), ( NULL , 'level_gain', '' ), ( NULL , 'max_level', '100' ), ( NULL , 'hp_gain' , '50' ); change the settings values to what you like then you are done screen shoot
  19. 1 point
    Long ago I sold this, but it needs pruning. A very simply addon, can be used for MCCodes or any other game/website. It was to replicate TornCity's captcha, so don't cure at me because of the similarities - it's meant to be so. Screens Stage 1 Stage 2 Config Download: http://www.mediafire.com/?7pwdn8965r7r398 (The manual is included) All important license: http://creativecommons.org/licenses/by-sa/3.0/ Problems should be mailed to spudinski[]gmail.com Discussion should be done in this thread.
  20. 1 point
    I recently "accuired" a set of MCCv2 codes, and I've been pissing about, anyways, here's a paypal/donation package editor thingy for the Admin panel... staff_paypal.php <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains paypal stuffs switch($_GET['action']) { case 'addpackage': add_package(); break; case 'editpackage': edit_package(); break; case 'delpackage': delete_package(); break; default: print "Error: This script requires an action."; break; } function add_package() { global $db, $ir, $c, $h, $userid; $money = abs((int) $_POST['money']); $crystals = abs((int) $_POST['crystals']); $iq = abs((int) $_POST['iq']); $ddays = abs((int) $_POST['ddays']); $cost = abs((int) $_POST['cost']); $name = $_POST['name']; if($cost > 0 && $name): if($db->num_rows($db->query("SELECT * FROM packages WHERE name='{$name}'"))): echo "You can't have two packages with the same name."; else: $db->query("INSERT INTO packages VALUES(NULL, '$money', '$crystals', '$iq', '$ddays', '$name', '$cost', '0')"); print "Package {$name} added to the game."; stafflog_add("Donation Package $name created"); endif; else: echo "<h3>Add Package</h3><hr /> <form action='staff_paypal.php?action=addpackage' method='post'> Name: <input type='text' name='name' /> Money: $<input type='text' name='money' /> Crystals: <input type='text' name='crystals' /> IQ: <input type='text' name='iq' /> Donator Days: <input type='text' name='ddays' /> Cost: $<input type='text' name='cost' /> <input type='submit' value='Add Package' /></form>"; endif; } function edit_package() { global $db, $ir, $c, $h, $userid; $edit = abs((int) $_POST[edit]); $r = $db->fetch_row($db->query("SELECT * FROM packages WHERE id='$edit' LIMIT 1")); if($_POST): if($_POST[id]): $money = abs((int) $_POST['money']); $crystals = abs((int) $_POST['crystals']); $iq = abs((int) $_POST['iq']); $ddays = abs((int) $_POST['ddays']); $cost = abs((int) $_POST['cost']); $id = abs((int) $_POST['id']); $name = $_POST['name']; $db->query("UPDATE packages SET money='$money', crystals='$crystals', iq='$iq', ddays='$ddays', name='$name', cost='$cost' WHERE id='$id' LIMIT 1"); print "Package {$name} edited."; stafflog_add("Donation Package $name editted"); else: echo "<h3>Edit Package</h3><hr /> <form action='staff_paypal.php?action=editpackage' method='post'> <input type='hidden' value='$edit' name='id' /> Name: <input type='text' name='name' value='$r[name]' /> Money: $<input type='text' name='money' value='$r[money]' /> Crystals: <input type='text' name='crystals' value='$r[crystals]' /> IQ: <input type='text' name='iq' value='$r[iq]' /> Donator Days: <input type='text' name='ddays' value='$r[ddays]' /> Cost: $<input type='text' name='cost' value='$r[cost]' /> <input type='submit' value='Edit Package' /></form>"; endif; else: $packs = $db->query("SELECT name,cost,id FROM packages WHERE deleted!='1'"); echo "<form action='staff_paypal.php?action=editpackage' method='post'>Package <select name='edit'>"; while($r = $db->fetch_row($packs)): echo "<option value='$r[id]'>$r[name] (\$$r[cost],--)</option>"; endwhile; echo "</select> <input type='submit' value='Edit Package'></form>"; endif; } function delete_package() { global $db, $ir, $c, $h, $userid; $id = abs((int) $_POST['id']); if($_POST[id]): $db->query("UPDATE packages SET deleted='1' WHERE id='$id' LIMIT 1"); print "Package {$name} deleted."; stafflog_add("Donation Package $name deleted"); else: $packs = $db->query("SELECT name,cost,id FROM packages WHERE deleted!='1'"); echo "<form action='staff_paypal.php?action=delpackage' method='post'>Package <select name='id'>"; while($r = $db->fetch_row($packs)): echo "<option value='$r[id]'>$r[name] (\$$r[cost],--)</option>"; endwhile; echo "</select> <input type='submit' value='Delete Package'></form>"; endif; } $h->endpage(); ?> donator.php (Just replace your old one with this...) <?php include "globals.php"; print <<<EOF <h3>Donations</h3> [b][[url='willpotion.php']Buy Will Potions[/url]][/b] If you become a donator to {$set['game_name']}, you will receive (each time you donate): EOF; if($db->num_rows($db->query("SELECT id FROM packages")) < 1): echo "Sorry, but there are currently no packages in the game yet."; else: $q=$db->query("SELECT * FROM packages WHERE deleted!='1' ORDER BY cost ASC"); while($r=$db->fetch_row($q)): echo "<fieldset><legend>$r[name] (\$$r[cost],--)</legend><ul>"; if($r[money] > 0) echo "[*]\$".number_format($r[money])." game money."; if($r[crystals] > 0) echo "[*]$r[crystals] crystals."; if($r[iq] > 0) echo "[*]$r[iq] IQ, the hardest stat in the game to get."; if($r[ddays] > 0) echo "[*]$r[ddays] days Donator Status: Red name + cross next to your name."; echo "[*]17% Energy every 5 minutes instead of 8%. (For aslong as you have Donator Status)[*]Access to Friends and Black lists[/list]"; echo '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">'; echo '<input type=hidden name=cmd value=_xclick>'; echo '<input type="hidden" name="business" value="'.$set[paypal].'">'; echo '<input type="hidden" name="item_name" value="'.$domain.'|DP|'.$r[id].'|'.$userid.'">'; echo '<input type="hidden" name="amount" value="'.$r[cost].'.00">'; echo '<input type="hidden" name="no_shipping" value="1">'; echo '<input type="hidden" name="return" value="http://'.$domain.'/donatordone.php?action=done&type=standard">'; echo '<input type="hidden" name="cancel_return" value="http://'.$domain.'/donatordone.php?action=cancel">'; echo '<input type="hidden" name="notify_url" value="http://'.$domain.'/ipn_donator.php">'; echo '<input type="hidden" name="cn" value="Your Player ID">'; echo '<input type="hidden" name="currency_code" value="USD">'; echo '<input type="hidden" name="tax" value="0">'; echo '<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!">'; echo '</form>'; echo "</fieldset>"; endwhile; endif; $h->endpage(); smenu.php (Just add this snippet where ever you want. ^_^) if($ir['user_level']==2) { print "<hr />[b]Donaion Packages[/b] > [url='staff_paypal.php?action=addpackage']Add Package[/url] > [url='staff_paypal.php?action=editpackage']Edit Package[/url] > [url='staff_paypal.php?action=delpackage']Delete Package[/url] "; } packages.sql CREATE TABLE IF NOT EXISTS `packages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `money` int(11) NOT NULL, `crystals` int(11) NOT NULL, `iq` int(11) NOT NULL, `ddays` int(11) NOT NULL, `name` varchar(32) NOT NULL, `cost` int(11) NOT NULL, `deleted` int(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Is this perfect? No... Do I care if this works? Not really... Why am I sharing it then? For teh lulz... Teh lulz is the only reason anyone does anything these days. ^_^ ENJOY!
  21. 1 point
    Refresh: <button onclick="myFunction()">Reload page</button> <script> function myFunction() { location.reload(); } </script> Back: <button onclick="goBack()">Go Back</button> <script> function goBack() { window.history.back(); } </script>
  22. 1 point
    Ok I made a new index page which i used to use on my old game its pretty much advanced Ok replace your index Page with This <html> <style> .table { background-color:#c3c3c3; } .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-color: #2C2C2C; border: 1px solid #000000; width: 160px; padding: 2px 5px 3px 5px; font-size: 12px; color: #FFFFFF; border-radius: 2px; outline: none; } .table th { background-color: #2C2C2C; border: 1px solid #000000; width: 160px; padding: 2px 5px 3px 5px; font-size: 12px; color: #FFFFFF; border-radius: 2px; border-top-left-radius: 5px; border-top-right-radius: 5px; outline: none; } </style> </html> <?php /*Made by jcvenom Free modification do not resell Copyright TPGnetworks */ $housequery=1; include_once "globals.php"; $awp=round($ir['attacks_won']/($ir['attacks_total'] > 0 ? $ir['attacks_total'] : 1)*100,2); $alp=round($ir['attacks_lost']/($ir['attacks_total'] > 0 ? $ir['attacks_total'] : 1)*100,2); $atp=round($ir['attacks_total']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $dwp=round($ir['defends_won']/($ir['defends_total'] > 0 ? $ir['defends_total'] : 1)*100,2); $dlp=round($ir['defends_lost']/($ir['defends_total'] > 0 ? $ir['defends_total'] : 1)*100,2); $dtp=round($ir['defends_total']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $twp=round($ir['total_won']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $tlp=round($ir['total_lost']/($ir['total_total'] > 0 ? $ir['total_total'] : 1)*100,2); $bbb=$ir['attacks_won']+$ir['defends_won']; $TotalEXP = abs(@intval($ir['exp']/$ir['exp_needed']*100)); $BankMoney = ($ir['bankmoney'] == '-1') ? 'No Account!' : number_format($ir['bankmoney']); if ( !$ir['married'] ) { $marital="<font color='red'>No</font>"; } else { $k=$db->query("SELECT username FROM users WHERE userid={$ir['married']}", $c); $marital="<a href='viewuser.php?u={$ir['married']}' style='color:green;'>".mysql_result($k,0,0)."</a> "; $marital.="[<a href='marriage.php'>Manage</a>]"; $mair=$db->query("SELECT u.*, h.* FROM users u LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE userid={$ir['married']}",$c); $ms=mysql_fetch_array($mair); } echo '<table width="55%" border="0" cellspacing="1" cellpadding="3" style="text-align:center;" class="table"> <tr> <th colspan="2">Updates</th><!--add your updates here are examples--> </tr> <tr><td width="150px">29 March Added Streets</td><td style="color:#009900">Complete<br/>Added streets to game use your turns to get random items and cash</td></tr> <tr><td>28 March Stats bug</td><td style="color:#009900">Complete<br/>Fixed Stats reset bug</td></tr> <tr><td width="150px">28 March Index fix with add ons</td><td style="color:#009900">Complete<br/>Fixed index and added attack logs</td></tr> <tr><td>28 March Stats bug</td><td style="color:#009900">Complete<br/>Fixed Stats reset bug</td></tr> <tr><td>Shop Images</td><td style="color:#009900">Complete<br/>Added images to the shop items, and restyled the table</td></tr> <tr><td>Sidebar Bars</td><td style="color:#009900">Complete<br/>Removed the "Bars" section, and the repeat of the "Profile" section</td></tr> <tr><td>View User</td><td style="color:#009900">Complete<br/>Added "Job" to view user which shows either the job, business or unemployed</td></tr> <tr><td colspan="2">Any bugs mail me, admin [1]</td></tr> </table><br/> '; echo '<table width="55%" border="0" cellspacing="1" cellpadding="3" style="text-align:center;" class="table"> <tr> <th colspan="3">General Info</th> </tr> <tr> <td width="50%"><b>Name:</b> '.stripslashes($ir['username']).'</td> <td width="50%"><b>Level:</b> '.number_format($ir['level']).'</td> </tr> <tr style="text-align:center;"> <td><b>EXP:</b> '.number_format($TotalEXP).'%</td> <td><b>Life:</b> '.number_format($ir['hp']).'/'.number_format($ir['maxhp']).'</td> </tr> <tr> <td><b>Money:</b> '.number_format($ir['money']).'</td> <td><b>Crystals:</b> '.number_format($ir['crystals']).'</td> </tr> <tr> <td><b>Crimes Passed:</b> '.number_format($ir['crimes']).'</td> <td><b>Total Busts:</b> '.number_format($ir['busts']).'</td> </tr> <tr> <td><b>Days Old:</b> '.number_format($ir['daysold']).'</td> <td><b>Married:</b> '.stripslashes($marital).'</td> </tr> <tr> <td><b>Bank Account:</b> '.$BankMoney.'</td> <td><b>Property:</b> '.stripslashes($ir['hNAME']).'</td> </tr> </table> <br /> '; $ts = $ir['strength'] + $ir['agility'] + $ir['guard'] + $ir['labour'] + $ir['IQ']; $ir['strank'] = get_rank($ir['strength'], 'strength'); $ir['agirank'] = get_rank($ir['agility'], 'agility'); $ir['guarank'] = get_rank($ir['guard'], 'guard'); $ir['labrank'] = get_rank($ir['labour'], 'labour'); $ir['IQrank'] = get_rank($ir['IQ'], 'IQ'); $tsrank = get_rank($ts, 'strength+agility+guard+labour+IQ'); $ir['strength'] = number_format($ir['strength']); $ir['agility'] = number_format($ir['agility']); $ir['guard'] = number_format($ir['guard']); $ir['labour'] = number_format($ir['labour']); $ir['IQ'] = number_format($ir['IQ']); $ts = number_format($ts); echo" <table width='55%' border='0' cellspacing='1' cellpadding='3' class='table' style='text-align:center;'> <tr> <th colspan='3'>Stats Info</th> </tr> <tr> <th width='33%'>Stat</th> <th width='33%'>Amount</th> <th width='34%'>Rank</th> </tr> <tr> <td>Strength</td> <td>{$ir['strength']} </td> <td>Rank: [Ranked: {$ir['strank']}</td> </tr> <tr> <td>Agility</td> <td>{$ir['agility']}</td> <td>Rank: [Ranked: {$ir['agirank']}]</td> </tr> <tr> <td>Guard</td> <td>{$ir['guard']}</td> <td>Rank: [Ranked: {$ir['guarank']}]</td> </tr> <tr> <td>Labour</td> <td>{$ir['labour']}</td> <td>Rank: [Ranked: {$ir['labrank']}]</td> </tr> <tr> <td>IQ</td> <td>{$ir['IQ']}</td> <td>Rank: [Ranked: {$ir['IQrank']}]</td> <tr> <td>Total Stats:</td> <td>{$ts}</td> <td>Rank: [Ranked: $tsrank]</td> </tr> </table><hr width=85%> "; echo " <table width='55%' border='0' cellspacing='1' cellpadding='3' class='table' style='text-align:center;'> <tr> <th colspan='3'>Finacial Info</th> </tr> <tr> <td>City Bank</td> <td>\${$ir['bankmoney']} </td> </tr> <tr> <td>Crystal Bank</td> <td>{$ir['crystalbank']} </td> </tr> <tr> <td>Cyber Bank</td> <td>{$ir['crybermoney']}</td> </tr> </table><hr width=85%> "; echo" <table cellspacing='1' border='0' cellpadding='0' class='table' width='85%'> <th colspan='5'><b><center>Attack Info</b></td></tr> <tr> <th>Attacking:</th> <td>Won: <b><font color='green'>{$ir['attacks_won']}</b></font> ($awp%)</td> <td>Lost: <b><font color='red'>{$ir['attacks_lost']}</font></b> ($alp%)</td> <td>Total: <b><font color='green'>{$ir['attacks_total']}</font></b> ($atp%)</td> </tr> <tr> <th>Defending:</th> <td>Won: <b><font color='green'>{$ir['defends_won']}</font></b> ($dwp%)</td> <td>Lost: <b><font color='red'>{$ir['defends_lost']}</b></font> ($dlp%)</td> <td>Total: <b><font color='green'>{$ir['defends_total']}</font></b> ($dtp%)</td> </tr> <tr> <th>Both:</th> <td>Won: <b><font color='green'>$bbb</font></b>($twp%)</td> <td>Lost: <b><font color='red'>{$ir['total_lost']}</font></b> ($tlp%)</td> <td>Grand Total: <b><font color='green'>{$ir['total_total']}</font></b> / Draw's: <b><font color='green'>{$ir['draws']}</font></b></td> </tr> </table> "; $_POST['pn_update'] = (isset($_POST['pn_update'])) ? strip_tags(stripslashes($_POST['pn_update'])) : ''; if (!empty($_POST['pn_update'])) { if (strlen($_POST['pn_update']) > 5000) { echo '<hr /><span style="font-weight:bold;">You may only enter 5000 or less characters here.</span>'; } else { $pn_update_db = $db->escape($_POST['pn_update']); $db->query( "UPDATE `users` SET `user_notepad` = '{$pn_update_db}' WHERE `userid` = {$userid}"); $ir['user_notepad'] = $_POST['pn_update']; echo '<span style="font-weight:bold;">Personal Notepad Updated!</span>'; } } echo "<br /><hr width=85% />Your Personal Notepad:<hr width=85% /> <form action='index.php' method='post'> <textarea rows='10' cols='50' name='pn_update'>" . htmlentities($ir['user_notepad'], ENT_QUOTES, 'ISO-8859-1') . "</textarea><br /> <input type='submit' value='Update Notes!' /></form>"; $h->endpage(); ?> And your done screenies are below [ATTACH=CONFIG]1053[/ATTACH][ATTACH=CONFIG]1054[/ATTACH]
  23. 1 point
    Run this in phpmyadmin - ALTER TABLE users ADD hosp_bill INT(11) DEFAULT 0 ; ALTER TABLE users ADD hosp_policy INT(11) DEFAULT 0 ; Create a file called insurance_agent.php - <?php require('globals.php'); echo "<h3><u>Medical Insurance</u></h3>"; if ($ir['jail'] or $ir['hospital']) { error('This page cannot be accessed while in jail or hospital.'); } if (!isset($_GET['x'])) { $_GET['x'] = ''; } switch ($_GET['x']) { case 'money': money(); break; case 'coins': coins(); break; default: index(); break; } function index() { global $ir, $goback; echo "<hr width ='75%'>Welcome to the Insurance Agency!<br/> You have <b>{$ir['hosp_policy']}</b> days left before you can renew your policy.<br/> How would you like to pay for your policy?<br/><br/> <a href='insurance_agent.php?x=money'>30 days of insurance policy - " . money_formatter(3500) . "</a><br/> <a href='insurance_agent.php?x=coins'>30 days of insurance policy - 500 coins</a><hr width ='75%'>$goback<hr width ='75%'>"; } function money() { global $db, $ir, $userid; if ($ir['money'] < 3500) { error('You need ¥3500.'); } else if ($ir['hosp_policy'] > 0) { error("You have {$ir['hosp_policy']} days left before you must renew your policy."); } else { $db->query("UPDATE `users` SET `hosp_policy` = `hosp_policy` + 30, `money` = `money` - 2500 WHERE `userid` = $userid"); confirmation("You have paid ¥3500 for 30 days of insurance policy."); } } function coins() { global $db, $ir, $userid; if ($ir['coins'] < 500) { error('You need 500 coins.'); } else if ($ir['hosp_policy'] > 0) { error("You have {$ir['hosp_policy']} days left before you must renew your policy."); } else { $db->query("UPDATE `users` SET `hosp_policy` = `hosp_policy` + 30, `coins` = `coins` - 500 WHERE `userid` = $userid"); confirmation("You have paid 500 coins for 30 days of insurance policy."); } } $h->endpage(); ?> Open up hospital.php and add this somewhere - echo"Medical Bill: " . money_formatter($ir['hosp_bill']) . ""; Open up cron_day.php and add this somewhere - $db->query("UPDATE `users` SET `hosp_policy` = `hosp_policy` - 1 WHERE `hosp_policy` > 0",$c); $db->query("UPDATE `users` SET `money` = `money` - `hosp_bill` WHERE hosp_policy > 0",$c); $db->query("UPDATE `users` SET `hosp_bill` = 0 WHERE `hosp_bill` > 0",$c); Open up attackbeat.php, attackwon.php and attacktake.php and find - $db->query( "UPDATE `users` SET `hp` = 1, `hospital` = $hosptime, `hospreason` = '$hospreason' WHERE `userid` = {$r['userid']}"); Replace with - $db->query( "UPDATE `users` SET `hp` = 1, `hospital` = $hosptime, `hospreason` = '$hospreason', `hosp_bill` = `hosp_bill` + $hosptime * 10 WHERE `userid` = {$r['userid']}");
  24. 1 point
    well you could add something like this for now if (($ir['level']+1)==8) {item_add(...);$unlocks=$unlocks.'<br>You received ... for reaching level xx';}
  25. 1 point
    inp_donator.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; require 'global_func.php'; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if (!$fp) { } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if($payment_status != "Completed") { fclose ($fp);die(""); } if($db->num_rows($db->query("SELECT * FROM dps_accepted WHERE dpTXN='{$txn_id}'")) > 0) { fclose ($fp);;die(""); } if($receiver_email != $set['paypal']) { fclose ($fp);die(""); } if($payment_currency != "USD") { fclose ($fp);die(""); } $packr=explode('|',$item_name); if(str_replace("www.","",$packr[0]) != str_replace("www.","",$_SERVER['HTTP_HOST'])) { fclose($fp);$db->query("INSERT INTO test VALUES('', 'DOMAIN FUCK UP!')"); die(""); } if($packr[1] != "DP") { fclose($fp);die(""); } $pack=$packr[2]; $packinfo = $db->fetch_row($db->query("SELECT * FROM packages WHERE id='$pack' AND deleted='0' LIMIT 1")); if(!$packinfo) { fclose($fp);die(""); } if($packinfo[cost] != $payment_amount) { fclose ($fp); die(""); } $buyer=$packr[3]; $for=$buyer; $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+'$packinfo[money]', u.crystals=u.crystals+'$packinfo[crystals]', us.IQ=us.IQ+'$packinfo[iq]', u.donatordays=u.donatordays+'$packinfo[ddays]' WHERE u.userid='$for'"); $d = $packinfo[ddays]; $t = $packinfo[id]; event_add($for, "Your \${$payment_amount} Pack {$packinfo[name]} Donator Pack has been successfully credited to you.", $c); $db->query("INSERT INTO dps_accepted VALUES('', {$buyer}, {$for}, '$t', unix_timestamp(), '$txn_id')"); ########} ########else if (strcmp ($res, "INVALID") == 0) { ######## $db->query("INSERT INTO test VALUES('', 'INVALID')"); ########} } fclose ($fp); } ?>   I don't give a **** if you don't like the way I've coded it, 'tis a free mod, you get what you pay for and I actually have NO idea what the hell I'm doiing posting it here, but yea... XD
  26. 1 point
    Currency Mod havent posted in a while here you go this mod will replace the current money_formatter in the global functions file along with 2 sql edits and a few php edits this will allow your members to have diffrent currencys these are USD, GBP, YEN, EURO PLUS they have the current conversion rate so if you had usd and changed to yen you money wouldent be 100 it would be 9800. :D all you do is go throgh your scripts and money format any HTML values of money e.g. echo' buy gun for $500 and attacke with it'; would be echo' buy gun for '.money_formatter(500).' and attacke with it'; REMOVE THE $ that 500 will become the currency you have plus the conversion rate too :D DO NOT ALTER ANY FILES UNLESS YOU HAVE BACKED THEM UP YOU COULD ALSO BACK UP YOUR DB BUT NOT NESASARY AS THERE IS VERY LITTLE SQL IN THIS MOD Run SQLs ALTER TABLE `users` ADD `cur` VARCHAR( 5 ) NOT NULL UPDATE `users` SET `cur`='USD' OPEN prefrences.php FIND [url='preferences.php?action=forumchange']Forum Info Change[/url] add after [url='preferences.php?action=curchange']Change Currency[/url] FIND case 'sexchange2': do_sex_change(); break; ADD AFTER case 'curchange': curchange1(); break; case 'curchange2': curchange2(); break; FIND $h->endpage(); ?> Add before function curchange1(){ echo 'you can change your currency here for an exchange rate of '.money_formatter(7500).'! <form id="form1" name="form1" method="post" action="preferences.php?action=curchange2"> <label> <select name="select" id="select"> <option value="GBP">Great British Pound</option> <option value="USD">United States Dollar</option> <option value="EUR">Euro</option> <option value="YEN">Yen</option> </select> </label> <label> <input type="submit" value=" Exchange ('.money_formatter(7500).') " /> </label> </form>'; } function curchange2(){ global $db, $ir,$c,$userid,$h; if ($ir['money'] >= 7500) { $cur=$_POST['select']; echo 'your currancy has been changed'; $db->query("UPDATE users SET cur = '{$cur}', `money` = `money`-7500 WHERE userid={$ir['userid']}"); } else { echo 'you dont have enough money!'; } } OPEN global-functions.php FIND function money_formatter($muny,$symb='$') { return $symb.number_format($muny); } replace with function money_formatter($money) { global $ir; /* +---------------+ | NOTES - READ! | +---------------+ when adding this function to your game moneyformat every single price in your game eg if you have shops, jail break etc... just find the html text and wrap moneyformatter(); around it use '. and .' or ". and." depending on what the echo/print is using DO NOT DO IT ON THE MYSQL_QUERY FUNCTIONS or with IF/ELSE ONLY DO THIS TO HTML TEXT!! this si so if you have 1 usd and you wanted to spend it and your currency was yen it would take away 98 usd from your bank/hand!! please note DONT DO THIS if you are a beginer at php it can possably f**k up yur game if done wrongly too add currencys add the shorted version eg USD and the symbol $ so it would be like this 'USD'=>'$', then add the conversion rate PLEASE note i have done the currencys throgh xe.com (12.JUNE.2009) compared to the USD also dont forget to add <option value='currency shortned values eg USD'>'currency name'</option> to the change currancy file if you want me to install this onto your site i charge $1.00 USD per page i edit i also chage $1.00USD to add new currancys */ $cur=$ir['cur']; $set = array ( "USD" => '$', "GBP" => '&pound', "YEN" => '¥', "EUR" => '€' ); $converter = array( 'USD'=>'1', 'EUR'=>'0.715416', 'YEN'=>'98.1855', 'GBP'=>'0.609824' ); $money=$money*$converter[$cur]; $money=number_format($money); $cash= $set[$cur].$money; return $cash; } when adding this function to your game moneyformat every single price in your game eg if you have shops, jail break etc... just find the html text and wrap moneyformatter(); around it use '. and .' or ". and." depending on what the echo/print is using DO NOT DO IT ON THE MYSQL_QUERY FUNCTIONS or with IF/ELSE ONLY DO THIS TO HTML TEXT!! this si so if you have 1 usd and you wanted to spend it and your currency was yen it would take away 98 usd from your bank/hand!! please note DONT DO THIS if you are a beginer at php it can possably f**k up yur game if done wrongly too add currencys add the shorted version eg USD and the symbol $ so it would be like this 'USD'=>'$', then add the conversion rate PLEASE note i have done the currencys throgh xe.com (12.JUNE.2009) compared to the USD also dont forget to add <option value='currency shortned values eg USD'>'currency name'</option> to the change currancy file if you want me to install this onto your site i charge $1.00 USD per page i edit i also chage $1.00USD to add new currancys enjoy, Dayo ps sorry about the spelling most of this was done on my ipod so forgive me :D
  27. 1 point
    Re: Sell all button i took the code and pimped it out: <?php /* ----------------------------------------- Just a little thing i came up with ----------------------------------------- */ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); $_GET['ID'] = abs((int) $_GET['ID']); $_GET['qty'] = make_bigint($_GET['qty']); //itemsell if($_GET['qty']) { $id=mysql_query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1",$c); if(mysql_num_rows($id)==0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($id); if($_GET['qty'] > $r['inv_qty']) { print "You are trying to sell more than you have!"; } else { $price=$r['itmsellprice']*$_GET['qty']; //are we sending it all if($_GET['qty'] == $r['inv_qty']) { //just give them possession of the item mysql_query("DELETE FROM inventory WHERE inv_id={$_GET['ID']}",$c); } else { //create seperate mysql_query("UPDATE inventory SET inv_qty=inv_qty-{$_GET['qty']} WHERE inv_id={$_GET['ID']} LIMIT 1;",$c); } mysql_query("UPDATE users SET money=money+{$price} WHERE userid=$userid",$c); $priceh="$".($price); print "You sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}"; mysql_query("INSERT INTO itemselllogs VALUES ('', $userid, {$r['itmid']}, $price, {$_GET['qty']}, unix_timestamp(), '{$ir['username']} sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}')", $c); } } } else if($_GET['ID']) { $id=mysql_query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} and iv.inv_userid=$userid LIMIT 1",$c); if(mysql_num_rows($id)==0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($id); print " [b]Enter how many {$r['itmname']} you want to sell. You have {$r['inv_qty']} to sell.[/b] <form action='itemsell.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> <table width=30% border=1><tr><td width=20% valign='top'>[b]<center>Quantity</center>[/b]</font></td><td>[b]Links[/b]</td> <tr><td><input type='text' name='qty' value='' /></td><td><input type='submit' value='Sell Items' /></form></td><tr><td>Sell All You Have Of This Item</td><td><input type='submit' value='Sell All' /></form></td> <form action='itemsell.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> <input type='hidden' name='qty' value='{$r['inv_qty']}' />"; } } else { print "Invalid use of file."; } $h->endpage(); ?> Its not brilliant but its a bit tidier, until someone makes it look better use this as the itemsell.php :? oh well im not that good a coder anyways. If you want a screen shot check this http://img406.imageshack.us/img406/3342/isscreenshotap5.png
  28. 1 point
    Sell all button just putting this:   <form action='itemsell.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Quantity: <input type='text' name='qty' value='{$r['inv_qty']}' size='3' /> <input type='submit' value='Sell Items' style='width:100px;' /> </form>   is much more effecient. also, you missed a space at the end of your last input. should be />.
×
×
  • Create New...