Jump to content
MakeWebGames

mentaljason

Members
  • Posts

    135
  • Joined

  • Last visited

    Never

Everything posted by mentaljason

  1. Re: [mccode v2] Gift.php [edited] Line 13 is the whole $auto thing, this will be because there is no functions for $auto....
  2. Re: admins cant be feded [v2] To be honnest i would use id's for your chosen staff as admins can easily de-staff you then bann you... so i would always stick ith the id.
  3. Re: [mccode v2] Gift.php [edited] strats try this, die("Sorry, You Can Only Do This Once A Day"); i belive it was missing the speach marks for the text at the beggining... not sure. i think it is though as it is an unexpected , because that will do something else in code and the sorry, isnt inside the speach marks.... so that should work...
  4. Re: [MCcodes All] Staff Members cannot be attacked. I use else if($odata['fedjail']) { print "This player is in protective custody in the federal jail. you'll have to wait. > Back"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } so that fedded people cant be attacked as they might have fraudulent cash that would get stolen etc.
  5. Re: [mccode v2] New improved mailbox. I fixed the mailcount... in this you need to remove the 's so: mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid='{$who}'") or die(mysql_error()); and it should be mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$who}") or die(mysql_error()); replace both of these, in send mail and quick reply. and to fix your mail count run this query: UPDATE users SET new_mail=0 and empty your mail table for the mail count to work.
  6. Re: [any] Kool name meh, mear typo
  7. Re: [any] Kool name It's craqp, and i use a mailing system that needs id not names. solving that problem.
  8. To be honest i made this to show off my name, so this is what my name is, <font style="text-decoration: blink;">?</font><font color=red><font style="text-decoration: overline;">mental</font></font><font color=blue><u>jason</u></font><font style="text-decoration: blink;">?</font> So heres what you can rap your name to make it look flashier, this is for the extremely retarded XD go to staff panel edit user and put the following on the names <font color=COLOR>NAME</font> - coloured name <font style="text-decoration: DECORATION;">NAME</font> Styled name <u>NAME</u> - underlined <s>NAME</s> strikethrough NAME bold ANd just basic html in the name to snaz it up a little.
  9. Re: [V2]item pics change shops to: <?php include "globals.php"; $_GET['shop'] = abs((int) $_GET['shop']); if(!$_GET['shop']) { print "You begin looking through town and you see a few shops. "; $q=$db->query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}"); print "<table width=85% cellspacing=1 class='table'><tr style='background: gray;'><th>Shop</th><th>Description</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>[url='shops.php?shop={$r[']{$r['shopNAME']}[/url]</td><td>{$r['shopDESCRIPTION']}</td></tr>"; } print "</table>"; } else { $sd=$db->query("SELECT * FROM shops WHERE shopID={$_GET['shop']}"); if($db->num_rows($sd)) { $shopdata=$db->fetch_row($sd); if($shopdata['shopLOCATION'] == $ir['location']) { print "Browsing items at [b]{$shopdata['shopNAME']}...[/b] <table cellspacing=1 class='table'><tr style='background: gray;'><th>Item</th><th>Description</th><th>Image</th><th>Price</th><th>Sell Price</th><th>Buy</th></tr>"; $qtwo=$db->query("SELECT si.*,i.*,it.* FROM shopitems si LEFT JOIN items i ON si.sitemITEMID=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE si.sitemSHOP={$_GET['shop']} ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC"); $lt=""; while($r=$db->fetch_row($qtwo)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=6>{$lt}</th></tr>"; } print "\n<tr><td>{$r['itmname']}</td><td>{$r['itmdesc']}</td><td>[img=images/items/{$r[]</td><td>\${$r['itmbuyprice']}</td><td>\${$r['itmsellprice']}</td><td><form action='itembuy.php?ID={$r['itmid']}' method='post'>Qty: <input type='text' name='qty' value='1' /><input type='submit' value='Buy' /></form></td></tr>"; } print "</table>"; } else { print "You are trying to access a shop in another city!"; } } else { print "You are trying to access an invalid shop!"; } } $h->endpage(); ?>   and the sql, if this doesnt work you'll have to correct it sorry. my conection is very bad atm. ALTER 'items' ADD 'itmimg` text NOT NULL; Sorry if that doesnt work...i cant remember what i used, just add 1 field, thats field will be 'itmimg' only use this if you have mk666's inventory mod.
  10. Re: [V2]item pics step3: Inventory.php <?php include "globals.php"; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']}, {$ir['equip_helmet']}, {$ir['equip_boots']}, {$ir['equip_amulet']}, {$ir['equip_braclet']}, {$ir['equip_ring']}, {$ir['equip_special']})"); print "<h3>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width='75%' cellspacing='1' class='table'> <tr> <th>Helmet</th> <td>"; if($equip[$ir['equip_helmet']]['itmid']) { print $equip[$ir['equip_helmet']]['itmname']."</td><td>[url='unequip.php?type=equip_helmet']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Amulet</th> <td>"; if($equip[$ir['equip_amulet']]['itmid']) { print $equip[$ir['equip_amulet']]['itmname']."</td><td>[url='unequip.php?type=equip_amulet']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </tr> <tr> <th>Primary Weapon</th> <td>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</td><td>[url='unequip.php?type=equip_primary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Secondary Weapon</th> <td>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</td><td>[url='unequip.php?type=equip_secondary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Braclet</th> <td>"; if($equip[$ir['equip_braclet']]['itmid']) { print $equip[$ir['equip_braclet']]['itmname']."</td><td>[url='unequip.php?type=equip_braclet']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Ring</th> <td>"; if($equip[$ir['equip_ring']]['itmid']) { print $equip[$ir['equip_ring']]['itmname']."</td><td>[url='unequip.php?type=equip_ring']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Armor</th> <td>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</td><td>[url='unequip.php?type=equip_armor']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Boots</th> <td>"; if($equip[$ir['equip_boots']]['itmid']) { print $equip[$ir['equip_boots']]['itmname']."</td><td>[url='unequip.php?type=equip_boots']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Special Item</th> <td>"; if($equip[$ir['equip_special']]['itmid']) { print $equip[$ir['equip_special']]['itmname']."</td><td>[url='unequip.php?type=equip_special']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </table><hr /> <h3>Inventory</h3><hr />"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b]You have no items![/b]"; } else { print "[b]Your items are listed below.[/b] <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\">Item</td> <td class=\"h\">Sell Value</td> <td class=\"h\">Total Sell Value</td> <td class=\"h\">Pic</td> <td class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=6>[b]{$lt}[/b]</td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } if($i['helmet']) { $i['itmname']="<font color='blue'>*</font>".$i['itmname']; } if($i['boots']) { $i['itmname']="<font color='pink'>*</font>".$i['itmname']; } if($i['amulet']) { $i['itmname']="<font color='brown'>*</font>".$i['itmname']; } if($i['braclet']) { $i['itmname']="<font color='yellow'>*</font>".$i['itmname']; } if($i['ring']) { $i['itmname']="<font color='lime'>*</font>".$i['itmname']; } if($i['special']) { $i['itmname']="<font color='darkorange'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[img=images/items/{$i[]"; print "</td><td>[[url='iteminfo.php?ID={$i[']Info[/url]]"; if($i['inv_lent'] == 0) { print" [[url='itemsend.php?ID={$i[']Send[/url]] [[url='itemsell.php?ID={$i[']Sell[/url]] [[url='imadd.php?ID={$i[']Add To Market[/url]] [[url='quantify.php?id={$i[']Merge Items[/url]] [[url='itemuse.php?ID={$i[']Use[/url]] [[url='donateitem.php?ID={$i[']Donate To Gang[/url]]"; } if($ir['gang']>0 && $gangdata['gangARMORY']==1 && $i['inv_lent']==0) { print " [[url='donateitem.php?ID={$i[']Donate To Gang[/url]]"; } if($ir['gang']>0 && $gangdata['gangARMORY']==1 && $i['inv_lent']>0) { print " [[url='giveback.php?ID={$i[']Give Back[/url]]"; } if($i['itmtypename'] == 'Food' || $i['itmtypename'] == 'Medical' || $i['itmtypename'] == 'Donator Pack') if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } if($i['helmet']) { print " [[url='equip_helmet.php?ID={$i[']Equip as Helmet[/url]]"; } if($i['boots']) { print " [[url='equip_boots.php?ID={$i[']Equip as Boots[/url]]"; } if($i['amulet']) { print " [[url='equip_amulet.php?ID={$i[']Equip as Amulet[/url]]"; } if($i['braclet']) { print " [[url='equip_braclet.php?ID={$i[']Equip as Braclet[/url]]"; } if($i['ring']) { print " [[url='equip_ring.php?ID={$i[']Equip as Ring[/url]]"; } if($i['special']) { print " [[url='equip_special.php?ID={$i[']Equip as Special Item[/url]]"; } print "</td></tr>"; } print "</table>"; print "[size="1"][b]NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat. Items with a small blue [/size]<font color='blue'>*</font>[size="1"] next to their name can be used as a helmet in combat. Items with a small pink [/size]<font color='pink'>*</font>[size="1"] next to their name can be used as boots in combat. Items with a small brown [/size]<font color='brown'>*</font>[size="1"] next to their name can be used as amulets in combat. Items with a small lime [/size]<font color='lime'>*</font>[size="1"] next to their name can be used as braclets in combat. Items with a small yellow [/size]<font color='yellow'>*</font>[size="1"] next to their name can be used as rings in combat. Items with a small dark orange [/size]<font color='darkorange'>*</font>[size="1"] next to their name can be used as special items in combat.[/size]"; } $h->endpage(); ?> step5: load images in to the dir in stage1 and link em up when u edit items, image should only say the file name.
  11. please not if your not using mk666's inventory mod, only change some parts, im not going to put it because im too lazy, so if you are lazy too then i suggest you get mk666's inventory mod, il link it when i find it lol. i think its page 4 or 5. Step1: make a folder called images then in that add another dir called items. step2: overwrite staff items with: <?php include "sglobals.php"; //This contains item stuffs switch($_GET['action']) { case 'newitem': new_item_form(); break; case 'newitemsub': new_item_submit(); break; case 'giveitem': give_item_form(); break; case 'giveitemsub': give_item_submit(); break; case 'killitem': kill_item_form(); break; case 'killitemsub': kill_item_submit(); break; case 'edititem': edit_item_begin(); break; case 'edititemform': edit_item_form(); break; case 'edititemsub': edit_item_sub(); break; case 'newitemtype': newitemtype(); break; default: print "Error: This script requires an action."; break; } function new_item_form() { global $db,$ir,$c; if($ir['user_level'] > 2) { die("403"); } print "<h3>Adding an item to the game</h3><form action='staff_items.php?action=newitemsub' method='post'> Item Name: <input type='text' name='itmname' value='' /> Item Desc.: <input type='text' name='itmdesc' value='' /> Item Desc. add in html: <input type='text' name='itmimg' value='' /> Item Type: ".itemtype_dropdown($c,'itmtype')." Item Buyable: <input type='checkbox' name='itmbuyable' checked='checked' /> Item Price: <input type='text' name='itmbuyprice' /> Item Sell Value: <input type='text' name='itmsellprice' /> <hr /> [b]Usage Form[/b]<hr /> [b]<u>Effect 1</u>[/b] On? <input type='radio' name='effect1on' value='1' /> Yes <input type='radio' name='effect1on' value='0' checked='checked' /> No Stat: <select name='effect1stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect1dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect1amount' value='0' /> <select name='effect1type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 2</u>[/b] On? <input type='radio' name='effect2on' value='1' /> Yes <input type='radio' name='effect2on' value='0' checked='checked' /> No Stat: <select name='effect2stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect2dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect2amount' value='0' /> <select name='effect2type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 3</u>[/b] On? <input type='radio' name='effect3on' value='1' /> Yes <input type='radio' name='effect3on' value='0' checked='checked' /> No Stat: <select name='effect3stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect3dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect3amount' value='0' /> <select name='effect3type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]Combat Usage[/b] Helmet Defense: <input type='text' name='helmet' value='0' /> Weapon Power: <input type='text' name='weapon' value='0' /> Armor Defense: <input type='text' name='armor' value='0' /> Boots Defense: <input type='text' name='boots' value='0' /> Amulet Power: <input type='text' name='amulet' value='0' /> Braclet Power: <input type='text' name='braclet' value='0' /> Ring Power: <input type='text' name='ring' value='0' /> Special Defense: <input type='text' name='special' value='0' /><hr /> <input type='submit' value='Add Item To Game' /></form>"; } function new_item_submit() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmimg']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. if it was the images then replace with: No image. [url='admin.php?action=newitem']> Back[/url]"; $h->endpage(); exit; } $_POST['itmimg']=str_replace('\\\'',''', $_POST['itmimg']); $itmname=$db->escape($_POST['itmname']); $itmdesc=$db->escape($_POST['itmdesc']); $itmimg=$db->escape($_POST['itmimg']); $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); $helmet=abs((int) $_post['helmet']); $boots=abs((int) $_POST['boots']); $amulet=abs((int) $_POST['amulet']); $braclet=abs((int) $_POST['braclet']); $ring=abs((int) $_POST['ring']); $special=abs((int) $_POST['special']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc','$itmimg',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor, $helmet, $boots, $amulet, $braclet, $ring, $special)"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); } function give_item_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving Item To User</h3> <form action='staff_items.php?action=giveitemsub' method='post'> User: ".user_dropdown($c,'user')." Item: ".item_dropdown($c,'item')." Quantity: <input type='text' name='qty' value='1' /> <input type='submit' value='Give Item' /></form>"; } function give_item_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO inventory VALUES('',{$_POST['item']},{$_POST['user']},{$_POST['qty']},0,0)",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"); } function kill_item_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Deleting Item</h3> The item will be permanently removed from the game. <form action='staff_items.php?action=killitemsub' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Kill Item' /></form>"; } function kill_item_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM items WHERE itmid={$_POST['item']}"); $db->query("DELETE FROM shopitems WHERE sitemITEMID={$_POST['item']}"); $db->query("DELETE FROM inventory WHERE inv_itemid={$_POST['item']}"); $db->query("DELETE FROM itemmarket WHERE imITEM={$_POST['item']}"); print "The {$itemi['itmname']} Item was removed from the game."; stafflog_add("Deleted item {$itemi['itmname']}"); } function edit_item_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Editing Item</h3> You can edit any aspect of this item. <form action='staff_items.php?action=edititemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Edit Item' /></form>"; } function edit_item_form() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Item</h3> <form action='staff_items.php?action=edititemsub' method='post'> <input type='hidden' name='itmid' value='{$_POST['item']}' /> Item Name: <input type='text' name='itmname' value='{$itemi['itmname']}' /> Item Desc.: <input type='text' name='itmdesc' value='{$itemi['itmdesc']}' /> Item image. HTML plz: <input type='text' name='itmimg' value='{$itemi['itmimg']}' /> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." Item Buyable: <input type='checkbox' name='itmbuyable'"; if ($itemi['itmbuyable']) { print " checked='checked'"; } print " /> Item Price: <input type='text' name='itmbuyprice' value='{$itemi['itmbuyprice']}' /> Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /><hr />[b]Usage Form[/b]<hr />"; $stats=array( "energy" => "Energy", "will" => "Will", "brave" => "Brave", "hp" => "Health", "strength" => "Strength", "agility" => "Agility", "guard" => "Guard", "labour" => "Labour", "IQ" => "IQ", "hospital" => "Hospital Time", "jail" => "Jail Time", "money" => "Money", "crystals" => "Crystals", "cdays" => "Education Days Left", "bankmoney" => "Bank money", "cybermoney" => "Cyber money", "crimexp" => "Crime XP"); for($i=1;$i<=3;$i++) { if($itemi["effect".$i]) { $efx=unserialize($itemi["effect".$i]); } else { $efx=array("inc_amount" => 0); } $switch1=($itemi['effect'.$i.'_on'] > 0) ? " checked='checked'" : ""; $switch2=($itemi['effect'.$i.'_on'] > 0) ? "" : " checked='checked'"; print "[b]<u>Effect {$i}</u>[/b] On? <input type='radio' name='effect{$i}on' value='1'$switch1 /> Yes <input type='radio' name='effect{$i}on' value='0'$switch2 /> No Stat: <select name='effect{$i}stat' type='dropdown'>"; foreach($stats as $k => $v) { if($k==$efx['stat']) { print "<option value='{$k}' selected='selected'>{$v}</option>\n"; } else { print "<option value='$k'>{$v}</option>\n"; } } if($efx['dir']=="neg") { $str="<option value='pos'>Increase</option><option value='neg' selected='selected'>Decrease</option>"; } else { $str="<option value='pos' selected='selected'>Increase</option><option value='neg'>Decrease</option>"; } if($efx['inc_type']=="percent") { $str2="<option value='figure'>Value</option><option value='percent' selected='selected'>Percent</option>"; } else { $str2="<option value='figure' selected='selected'>Value</option><option value='percent'>Percent</option>"; } print "</select> Direction: <select name='effect{$i}dir' type='dropdown'>{$str} </select> Amount: <input type='text' name='effect{$i}amount' value='{$efx['inc_amount']}' /> <select name='effect{$i}type' type='dropdown'>{$str2}</select><hr />"; } print "[b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='{$itemi['weapon']}' /> Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /> Helmet Defense: <input type='text' name='helmet' value='{$itemi['helmet']}' /> Boots Defense: <input type='text' name='boots' value='{$itemi['boots']}' /> Amulet Power: <input type='text' name='amulet' value='{$itemi['amulet']}' /> Braclet Power: <input type='text' name='braclet' value='{$itemi['braclet']}' /> Ring Power: <input type='text' name='ring' value='{$itemi['ring']}' /> Special Defense: <input type='text' name='special' value='{$itemi['special']}' /><hr /> <input type='submit' value='Edit Item' /></form>"; } function edit_item_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmimg']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. if it is the item image then put in that field, No image. [url='staff_items.php?action=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=$_POST['itmname']; $itmdesc=$_POST['itmdesc']; $itmimg=$_POST['itmimg']; $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); $helmet=abs((int) $_POST['helmet']); $boots=abs((int) $_POST['boots']); $amulet=abs((int) $_POST['amulet']); $braclet=abs((int) $_POST['braclet']); $ring=abs((int) $_POST['ring']); $special=abs((int) $_POST['special']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $db->query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc','$itmimg', {$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor, $helmet, $boots, $amulet, $braclet, $ring, $special)"); print "The {$_POST['itmname']} Item was edited successfully."; stafflog_add("Edited item {$_POST['itmname']}"); } function newitemtype() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } } $h->endpage(); ?>
  12. Re: Item market error Chris, this your second post in the wrong place. only post errors in here if it is in response to a modification. otherwise post in a relevant forum area.
  13. Everything is allready there, just add Find in viewuser.php (near the bottom) Staff Notes: <font color=red>ALERT! -</font> (When changing staff notes delete all data from Email to Other Notes, As this data is already in there and would just be repeated.) <textarea rows=7 cols=40 name='staffnotes'>Email: {$r['email']} Other Notes:{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print " "; } print "</tr></table>"; } }     underneath add if(!$r['forums_signature']) { $r['forums_signature']="No Signature"; } else {$r['forums_signature']=($r['forums_signature']); } { print " <font color=red>NOTE:Signature will not display bb code. You can change it in your preferances where it says forum info change.</font> [b]Sinature:[/b] {$r['forums_signature']} ";   EASY PEASY! Rate plz
  14. Re: [mccode v2] New improved mailbox. Fixed for those who had the erros that you cant send or read use this:   <?php include("globals.php"); ?> <script type="text/javascript"> function insertSmiley(smiley) { var currentText = document.getElementById("message"); var smileyWithPadding = " " + smiley + " "; currentText.innerHTML += smileyWithPadding; } </script> <?php if($ir['mailban']) { echo '<font color="red">You have been mail baned for '.$ir['mailban'].' days. [b]Reason:[/b] '.$ir['mbreason']; $h->endpage(); exit; } $emos_toggle = <<<EOF [b]Note: Images are clickable.[/b] <table border="1" cellpacing="0" class="table" width="50%"> <tr> <th>Image</th> <th>Code</th> <th>Image</th> <th>Code</th> <th>Image</th> <th>Code</th> </tr> <tr> <td>[img=images/smileys/happy.gif]</td><td>:]</td> <td>[img=images/smileys/biggrin.gif]</td><td>:D</td> <td>[img=images/smileys/cool.gif]</td><td>:oo:</td> </tr> <tr> <td>[img=images/smileys/blink.gif]</td><td>O.o</td> <td>[img=images/smileys/dry.gif]</td><td>:/</td> <td>[img=images/smileys/angry.gif]</td><td>:angry:</td> </tr> <tr> <td>[img=images/smileys/huh.gif]</td><td>:?:</td> <td>[img=images/smileys/laugh.gif]</td><td>:lol:</td> <td>[img=images/smileys/mellow.gif]</td><td>:-:</td> </tr> <tr> <td>[img=images/smileys/ohmy.gif]</td><td>:O</td> <td>[img=images/smileys/sad.gif]</td><td>:(</td> <td>[img=images/smileys/ph34r.gif]</td><td>O.O</td> </tr> <tr> <td>[img=images/smileys/rolleyes.gif]</td><td>:roll:</td> <td>[img=images/smileys/sleep.gif]</td><td>:zzz:</td> <td>[img=images/smileys/smile.gif]</td><td>:)</td> </tr> <tr> <td>[img=images/smileys/tongue.gif]</td><td>:P</td> <td>[img=images/smileys/unsure.gif]</td><td>:S</td> <td>[img=images/smileys/wacko.gif]</td><td>:nut:</td> </tr> <tr> <td>[img=images/smileys/wink.gif]</td><td>;)</td> <td>[img=images/smileys/wub.gif]</td><td>:heart:</td> <td>[img=images/smileys/XD.gif]</td><td>XD</td> </tr> </table> EOF; if($_GET['ID']) { $ID = abs(@intval($_GET['ID'])); } if($_GET['action']) { $_GET['action'] = htmlentities(mysql_real_escape_string($_GET['action'])); } echo '<h2>Mailbox</h2> <table border="1" width="100%" cellspacing="0" class="table"> <tr> <th>[url="'.$_SERVER['PHP_SELF'].'"]Inbox[/url]</th> <th>[url="?action=outbox"]Outbox[/url]</th> <th>[url="?action=compose"]Compose[/url]</th> <th>[url="?action=del"]Delete Message\'s[/url]</th> <th>[url="?action=archive"]Archive Message\'s[/url]</th> </tr> </table>'; switch($_GET['action']) { case 'outbox': outbox(); break; case 'compose': compose(); break; case 'del': del(); break; case 'delb': delb(); break; case 'archive': archive(); break; case 'read': read(); break; default: inbox(); break; } function inbox() { global $ir,$h; echo ' <table border="0" width="100%" cellspacing="0" class="table"> <tr> <th>From</th> <th>Subject</th> <th>Time Sent</th> <th>Actions</th> </tr> <tr>'; $v = mysql_query("SELECT * FROM mail WHERE mail_to='{$ir['userid']}' ORDER BY mail_time DESC LIMIT 10") or die(mysql_error()); while($in = mysql_fetch_assoc($v)) { $whos = mysql_query("SELECT * FROM users WHERE userid='{$in['mail_from']}'") or die(mysql_error()); $who = mysql_fetch_assoc($whos); if($in['mail_read'] == 0) { $read = '<font color="red">New!</font>'; } else { $read = ''; } echo '<td>[url="viewuser.php?u='.$who['userid'].'"]'.$who['username'].'[/url] '.$read.'</td> <td>'.$in['mail_subject'].'</td> <td>'.date("F j, Y, g:i:s a", $in['mail_time']).'</td> <td>[[url="?action=delb&ID='.$in['mail_id'].'"]<font color="red">Delete</font>[/url]] [[url="?action=read&ID='.$in['mail_id'].'"]<font color="green">Read</font>[/url]]</td><tr>'; } echo '</tr></table>'; } function read() { global $ir,$h,$ID,$emos_toggle; if($_POST['subject']) { $msg = $_POST['message']; $msg = str_replace(array("\n"),array(" "),strip_tags($msg)); $subject = $_POST['subject']; $who = abs(@intval($_POST['towho'])); $subject = str_replace(array("\n"),array(" "),strip_tags($subject)); $emos_code = array( ':]', ':D', ':oo:', 'O.o', ':/', ':angry:', ':?:', ':lol:', ':-:', ':O', ':(', 'O.O', ':roll:', ':zzz:', ':)', ':P', ':S', ':nut:', ';)', ':heart:', 'XD', ); $emos_images = array( '[img=images/smileys/happy.gif]', '[img=images/smileys/biggrin.gif]', '[img=images/smileys/cool.gif]', '[img=images/smileys/blink.gif]', '[img=images/smileys/dry.gif]', '[img=images/smileys/angry.gif]', '[img=images/smileys/huh.gif]', '[img=images/smileys/laugh.gif]', '[img=images/smileys/mellow.gif]', '[img=images/smileys/ohmy.gif]', '[img=images/smileys/sad.gif]', '[img=images/smileys/ph34r.gif]', '[img=images/smileys/rolleyes.gif]', '[img=images/smileys/sleep.gif]', '[img=images/smileys/smile.gif]', '[img=images/smileys/tongue.gif]', '[img=images/smileys/unsure.gif]', '[img=images/smileys/wacko.gif]', '[img=images/smileys/wink.gif]', '[img=images/smileys/wub.gif]', '[img=images/smileys/XD.gif]', ); $completed_msg = str_replace($emos_code,$emos_images,$msg); mysql_query("INSERT INTO mail (mail_time,mail_from,mail_to,mail_read,mail_subject,mail_text) VALUES(unix_timestamp(),'{$ir['userid']}','{$who}','0','{$subject}','{$completed_msg}')") or die(mysql_error()); mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid='{$who}'") or die(mysql_error()); echo 'Mail sent successfuly.'; $h->endpage(); exit; } $y = mysql_query("SELECT * FROM mail WHERE mail_id='{$ID}'") or die(mysql_error()); $f = mysql_fetch_assoc($y); if($f['mail_to'] == $ir['userid']) { mysql_query("UPDATE users SET new_mail=new_mail-1 WHERE userid='{$ir['userid']}'") or die(mysql_error()); mysql_query("UPDATE mail SET mail_read=1 WHERE mail_id='{$ID}'") or die(mysql_error()); } $sl_users = mysql_query("SELECT * FROM users WHERE userid='{$f['mail_from']}'") or die(mysql_error()); $sl = mysql_fetch_assoc($sl_users); $to_users = mysql_query("SELECT * FROM users WHERE userid='{$f['mail_to']}'") or die(mysql_error()); $tl = mysql_fetch_assoc($to_users); if($f['mail_from'] == $ir['userid']) { $pass = 1; } else { $pass = 0; } if($f['mail_to'] != $ir['userid']) { if($pass != 1) { echo 'This mail is not yours!'; $h->endpage(); exit; } } if($f['mail_from'] == $ir['userid']) { $ton = $f['mail_to']; } else { $ton = $f['mail_from']; } echo ' <h2>From: '.$sl['username'].' To: '.$tl['username'].'</h2> <table border="0" cellspacing="0" class="table" width="100%"> <tr> <th>Subject</th> <th>Mail</th> </tr> <tr> <td width="20%">'.$f['mail_subject'].'</td> <td width="80%">'.$f['mail_text'].'</td> </tr> </table> <h2>Quick Response</h2> <form action="?action=read" method="post"> To: <input type="text" value="'.$ton.'" name="towho" readonly> Subject: <input type="text" name="subject" value="No Subject"> Mail: <textarea name="message" cols="50" rows="10" id="message"></textarea> <input type="submit" value="Send"> </form> '.$emos_toggle; } function compose() { global $ir,$h,$emos_toggle; if($_POST['towho']) { $msg = $_POST['message']; $msg = str_replace(array("\n"),array(" "),strip_tags($msg)); $subject = $_POST['subject']; $who = abs(@intval($_POST['towho'])); $subject = str_replace(array("\n"),array(" "),strip_tags($subject)); $emos_code = array( ':]', ':D', ':oo:', 'O.o', ':/', ':angry:', ':?:', ':lol:', ':-:', ':O', ':(', 'O.O', ':roll:', ':zzz:', ':)', ':P', ':S', ':nut:', ';)', ':heart:', 'XD', ); $emos_images = array( '[img=images/smileys/happy.gif]', '[img=images/smileys/biggrin.gif]', '[img=images/smileys/cool.gif]', '[img=images/smileys/blink.gif]', '[img=images/smileys/dry.gif]', '[img=images/smileys/angry.gif]', '[img=images/smileys/huh.gif]', '[img=images/smileys/laugh.gif]', '[img=images/smileys/mellow.gif]', '[img=images/smileys/ohmy.gif]', '[img=images/smileys/sad.gif]', '[img=images/smileys/ph34r.gif]', '[img=images/smileys/rolleyes.gif]', '[img=images/smileys/sleep.gif]', '[img=images/smileys/smile.gif]', '[img=images/smileys/tongue.gif]', '[img=images/smileys/unsure.gif]', '[img=images/smileys/wacko.gif]', '[img=images/smileys/wink.gif]', '[img=images/smileys/wub.gif]', '[img=images/smileys/XD.gif]', ); $completed_msg = str_replace($emos_code,$emos_images,$msg); mysql_query("INSERT INTO mail (mail_time,mail_from,mail_to,mail_read,mail_subject,mail_text) VALUES(unix_timestamp(),'{$ir['userid']}','{$who}','0','{$subject}','{$completed_msg}')") or die(mysql_error()); mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid='{$who}'") or die(mysql_error()); echo 'Mail sent successfuly.'; $h->endpage(); exit; } if($_GET['ID']) { $value = $_GET['ID']; } else { $value = ""; } echo '<form action="?action=compose" method="post"> Who To: <input type="text" name="towho" value="'.$value.'"> Subject: <input type="text" name="subject" value="No Subject"> Message: <textarea name="message" cols="50" rows="10" id="message"></textarea> <input type="submit" value="Send"> </form> '.$emos_toggle; } function outbox() { global $ir,$h; echo ' <table border="1" width="100%" cellspacing="0" class="table"> <tr> <th>To</th> <th>Subject</th> <th>Time Sent</th> <th>Actions</th> </tr> <tr>'; $v = mysql_query("SELECT * FROM mail WHERE mail_from='{$ir['userid']}' ORDER BY mail_time DESC LIMIT 10") or die(mysql_error()); while($in = mysql_fetch_assoc($v)) { $whos = mysql_query("SELECT * FROM users WHERE userid='{$in['mail_to']}'") or die(mysql_error()); $who = mysql_fetch_assoc($whos); echo '<td>[url="viewuser.php?u='.$who['userid'].'"]'.$who['username'].'[/url]</td> <td>'.$in['mail_subject'].'</td> <td>'.date("F j, Y, g:i:s a", $in['mail_time']).'</td> <td>[[url="?action=read&ID='.$in['mail_id'].'"]<font color="green">Read</font>[/url]]</td><tr>'; } echo '</tr></table>'; } function delb() { global $ir,$h,$ID; $t = mysql_query("SELECT * FROM mail WHERE mail_id='{$ID}'") or die(mysql_error()); $r = mysql_fetch_assoc($t); if($r['mail_to'] != $ir['userid']) { echo 'This mail is not yours!'; $h->endpage(); exit; } mysql_query("DELETE FROM mail WHERE mail_id='{$ID}'") or die(mysql_error()); echo 'Mail deleted successfuly.'; inbox(); } function del() { global $ir,$h; if($_POST['gohome']) { header("location: index.php"); exit; } if($_POST['yes']) { $q = mysql_query("SELECT * FROM mail WHERE mail_to='{$ir['userid']}'") or die(mysql_error()); $f = mysql_num_rows($q); mysql_query("DELETE FROM mail WHERE mail_to='{$ir['userid']}'") or die(mysql_error()); echo $f.' mails deleted.'; $h->endpage(); exit; } echo 'Are you sure you want to delete all your mails? <form action="?action=del" method="post"> <input type="submit" value="Yes" name="yes"> | <input type="submit" value="No" name="gohome"> </form>'; } function archive() { echo 'This tool allows you to download your mails to your computer. [url="dlarchive.php?a=inbox"]Download Inbox Messages[/url] [url="dlarchive.php?a=outbox"]Download Outbox Messages[/url] Select a link above.'; } $h->endpage(); ?>
  15. Re: [mccode v2] Youtube Mod where is function video_dropdown($connection,$ddname="videoNAME",$selected=-1) used because i need to change it to function video_dropdown1 but cant find where to else to change it.
  16. Re: [mccode] 8 Lines to secure your site from known sql injections. Learn this code, if 1=a and z=26 then what does 2-21-12-12--19-8-9-20 (dashes indicate an end to that letter and double dash represents a space.)
  17. Re: [mccode] 8 Lines to secure your site from known sql injections. Will some one send me the strings for the forum and markets, i need to check if im secure. thanks. (PM me)
  18. Re: [mccode lite & v1 & v2 / any site] Simple Snow Screenies?
  19. Re: [mccode V2] Player of the week... Nice Idea, instead of a donator pack you could convert a pack just for player of the weeks, like they get an individual name colour etc... but hey t's your mod lol....
  20. Re: [mccode v2]New Edit user Im going to update this,so it's allin tables (creating etc) And also il sort the line breaks out also.
  21. Re: [mccode v2]New Edit user Oh, i forgot to do the query then i thought i has because i replaced the field must have messed up, any who thats for posting that for me lol.
  22. Re: [mccode v2]New Edit user I did post one, and then i did say, if you dont have casino mod and fish mod then use this one and posted a different one with out the credits and fish lol.... You should have read thrugh it lol
  23. Re: [V2] View Donators Did you reply to Rosie (in screenie) Lmao
  24. Re: [mccode v2] Fishing Mod Well i used it, but ima add a few images on random to make it more interesting as it is quite empty atm...
  25. Re: [mccodes] Horoscopes In the rules it says what you should put before the topic... it is anoying when people don't abide by them. but still he has gave a mod so you can't complain..
×
×
  • Create New...