Jump to content
MakeWebGames

ducktape

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by ducktape

  1. Re: texting mail system i did all i found was a texting system where u can sent texts
  2. is there a mod out there that texts you if you have a new pm or comment or any thing alone that lines.... almost like a text alert like on facebook... i know theres a texting mod where u can send text to users but i want one that texts you if u get a new pm on mccodes
  3. Re: auto fed i got the main ones gone but i still want them fedded for even trying lol
  4. ducktape

    auto fed

    is there am out there that auto feds for sql injection
  5. Re: change user ids lol i was hopeing soem1 madea mod for that but guess it dont look like it lol
  6. Re: change user ids thats what i thught just usersats and users right
  7. is there way to change the user id and stats. like if some1 delets a user and we want to use that id is there a way to change it
  8. is there a mod out there for v2 that i can use that alows me to add voteing links to the site with out useing cpanel
  9. i have a SQL Protector is there a way to test it i had a few sqls but i lost them lol
  10. how do i make a promo code for mc code v2
  11. Re: Hack dont help very annyoing lol
  12. am trying to add the mass give items on v1 and when it does it says the pop. has been give 2"item id". is there a way to make it says the item name instead if id atm it says {$_POST['item']}.
  13. does any one know how to add attack ban to the staff panel like it has jail user mail ban user. i want it to be like attack ban jail user mail ban user
  14. does any 1 have the sql for the bug report
  15. does any1 know how to fix index.php every1's stat is stuck at rank 1 but in hof the stats are right :(   <?php $housequery=1; include "globals.php"; print "General Info:"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "</pre> <table>[b]Name:[/b] {$ir['username']}[b]Crystals:[/b] {$cm}[b]Level:[/b] {$ir['level']}[b]Exp:[/b] {$exp}%[b]Money:[/b] $fm[b]HP:[/b] {$ir['hp']}/{$ir['maxhp']}[b]Property:[/b] {$ir['hNAME']}</table>";<br>print "<hr> <h3>Stats Info:</h3>";<br>$ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ'];<br>$ir['strank']=get_rank($ir['strength'],'strength');<br>$ir['agirank']=get_rank($ir['agility'],'agility');<br>$ir['guarank']=get_rank($ir['guard'],'guard');<br>$ir['labrank']=get_rank($ir['labour'],'labour');<br>$ir['IQrank']=get_rank($ir['IQ'],'IQ');<br>$tsrank=get_rank($ts,'strength+agility+guard+labour+IQ');<br>$ir['strength']=number_format($ir['strength']);<br>$ir['agility']=number_format($ir['agility']);<br>$ir['guard']=number_format($ir['guard']);<br>$ir['labour']=number_format($ir['labour']);<br>$ir['IQ']=number_format($ir['IQ']);<br>$ts=number_format($ts);<br><br>print "<table>[b]Strength:[/b] {$ir['strength']} [Ranked: {$ir['strank']}][b]Agility:[/b] {$ir['agility']} [Ranked: {$ir['agirank']}][b]Guard:[/b] {$ir['guard']} [Ranked: {$ir['guarank']}][b]Labour:[/b] {$ir['labour']} [Ranked: {$ir['labrank']}][b]IQ: [/b] {$ir['IQ']} [Ranked: {$ir['IQrank']}][b]Total stats:[/b] {$ts} [Ranked: $tsrank]</table>";<br>if(isset($_POST['pn_update']))<br>{<br>$db->query("UPDATE users SET user_notepad='{$_POST['pn_update']}' WHERE userid=$userid");<br>$ir['user_notepad']=stripslashes($_POST['pn_update']);<br>print "<hr>[b]Personal Notepad Updated![/b]";<br>}<br>print "<hr>Your Personal Notepad:<br>".htmlspecialchars($ir['user_notepad'])."<br><br>";<br>$h->endpage();<br thats my index.php i have tryed others index.php that they sent me they looked at mine they see notthing wrong plz help thanks
  16. Re: FREE Bug Tracker Mod   <?php /*************************** Bug Tracker (1.0) made by oxidati0n -- Designed to make sure your bug asking days are over, Your players can efficiently report them, for those buggy players - It has most hacks removed. Such as HTML block, Javascript and PHP! Requires PHP version 4.44 minimum for this code to work! Created by oxidati0n! ***************************/ include "globals.php"; $sd=mysql_query("SELECT * FROM `bugtracker` WHERE `bt_from` = '$userid'",$c); if($_GET['x'] == "add" and mysql_num_rows($sd) < 7) { if($_POST['urgency'] and $_POST['description']) { //Secure the webpage. My favourite :> $_POST['description']=str_replace("/n", " ", strip_tags($_POST['description'])); $time=time(); //Insert the time log. $ip=$_SERVER['REMOTE_ADDR']; //The users IP - logged. ha ha! $nf="Not Fixed"; //The text for startup mysql_query("INSERT INTO `bugtracker` (`bt_id`, `bt_posted`, `bt_from`, `bt_description`, `bt_read`, `bt_replyfrom`, `bt_reply_one`, `bt_replytext`, `bt_urgency`, `bt_iplogged`) VALUES ('NULL', '$time', '$userid', '$_POST[description]', '0', '0', '$nf', 'N/A', '$_POST[urgency]', '$ip');",$c) or die("Your report couldn't be processed at the moment, Either contact a admin or wait until tommorrow. Thanks and sorry for any inconvenience caused [url='bugtracker.php']Back[/url] "); print "Your bug report has initially been added! [url='bugtracker.php']Back[/url] "; $h->endpage(); exit(); } else { print "[b]Submit your report[/b] <font color=red>Your IP logged: ".$_SERVER['REMOTE_ADDR']."</font> Your IP is logged for our benefits and yours, To make sure that you are posting a safe and clean spaced report! Once reported, your report will be shown as hidden to any other player except you. NOTE: This is only to report bugs, If it's related to players open a player dispute. Bugs are errors/spelling mistakes, php disruption or PHP errors <form action='bugtracker.php?x=add' method='post'> Urgency: <select name='urgency'><option value='Brief'>Brief</option> <option value='Basic'>Basic</option><option value='Vital'>Vital</option></select> Description (include as much detail as possible, links will be a help aswell): <textarea name='description' cols=40 rows=11></textarea> <input type=submit value='Submit Bug Report'></form> "; $h->endpage(); exit(); } } else if($ir['user_level'] > 1 and $_GET['x'] == "remove" and $_GET['report']) { mysql_query("DELETE FROM `bugtracker` WHERE `bt_id` = '$_GET[report]'",$c); print "Bug Report Row Removed [url='bugtracker.php']Back[/url] "; $h->endpage(); exit(); } elseif($ir['user_level'] > 1 and $_GET['x'] == "reply" and $_GET['report']) { if($_POST['text']) { //Make sure the text is ready to go, clean and safe. $text=str_replace(array("<",">","/n"),array("","",""),$_POST['text']); mysql_query("UPDATE `bugtracker` SET `bt_replyfrom` = '$userid', `bt_replytext` = '$text' WHERE `bt_id` = '$_GET[report]'",$c); print "Bug Report Row Edited [url='bugtracker.php']Back[/url] "; $h->endpage(); exit(); } else { print "[b]Make a reply[/b] <form action='bugtracker.php?x=reply&report=$_GET[report]' method='post'> Reply: <textarea name='text' cols=40 rows=11>Your reply here...</textarea> <input type=submit value='Submit Reply!'> </form>"; $h->endpage(); exit(); } } $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; print "<center><h3>Bug Tracker</h3>"; $sd=mysql_query("SELECT * FROM `bugtracker` WHERE `bt_from` = '$userid'",$c); if(mysql_num_rows($sd) < 7) { print "[url='bugtracker.php?x=add'][Add a Report][/url] "; } print "[b]You can report several bug reports[/b] "; if(!$_GET['selectBug']) { $reports=mysql_num_rows(mysql_query("SELECT * FROM `bugtracker`",$c)); $shown=10; //How many rows should be shown in one row $pages=(int) ($reports/$shown)+1; if($membs % $shown == 1) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*$shown; print "[url='bugtracker.php?st=$stl']$i[/url] "; } } if($ir["user_level"] > 1) { $man="<th>Manage</th>"; $cols=8; mysql_query("UPDATE `bugtracker` SET `bt_read` = '1' WHERE `bt_read` = '0'",$c); } else { $cols=7; } print " <table width=90% border=1><tr><th colspan={$cols}>Viewing all reported bugs - </th></tr> <tr><th>Reported ID</th><th>From</th><th>Urgency</th><th>Status</th><th>Reply Comments</th><th>Description</th><th>Read</th>".$man."</tr>"; if(!$_GET['selectBug']) { $q=mysql_query("SELECT * FROM `bugtracker` ORDER BY `bt_posted` DESC LIMIT $st,10",$c); } else { $q=mysql_query("SELECT * FROM `bugtracker` WHERE `bt_id` = '$_GET[selectBug]' LIMIT 1;",$c); } if(mysql_num_rows($q) == 0) { print "<tr><td colspan={$cols}>There are no current reports been posted.</td></tr>"; } while($r=mysql_fetch_array($q)) { if($r['bt_from'] == $userid or $ir['user_level'] >= 2) { $user_q=mysql_query("SELECT * FROM `users` WHERE `userid` = '$r[bt_from]'",$c); $p=mysql_fetch_array($user_q); if($r['bt_replyfrom'] > 0) { $user_q2=mysql_query("SELECT * FROM `users` WHERE `userid` = '$r[bt_from]'",$c); $d=mysql_fetch_array($user_q2); } $x=$r["bt_id"]; if($r['bt_read'] == 1) { $re="<font color=green>[b]Read[/b]</font>"; } else { $re="<font color=darkred>[b]No[/b]</font>"; } print "<tr><td align=center>".number_format($x)."</td><td align=center>[url='viewuser.php?u={$x}']".$p['username']."[/url] [".$p['userid']."]</td><td align=center>".$r['bt_urgency']."</td><td align=center>$r[bt_reply_one]</td><td align=center>"; if($r['bt_replyfrom'] > 0) { print "[b]".$r['bt_replytext']." [i]Replied from [url='viewuser.php?u=$d[userid]']$d[username][/url][/i]"; } else { print "You haven't been replied yet."; } print "</td><td align=center>".$r['bt_description']."</td><td align=center>".$re."</td>"; if($cols == 8) { print "<td align=center> <font color=darkred>IP Logged: [b]".$r['bt_iplogged']."[/b]</font> [url='bugtracker.php?x=remove&report={$x}']Remove[/url] [url='bugtracker.php?x=reply&report={$x}']Make Reply[/url] [url='mailbox.php?action=compose&ID={$p[']Mail User[/url] </td>"; } print "</tr>"; } else { print "<tr><td>Hidden</td><td>Hidden</td><td>Hidden</td><td>Hidden</td> <td>Hidden</td><td>Hidden</td><td>Hidden</td><td>Hidden</td></tr>"; } } print "</table></center> "; if(!$_GET['selectBug']) { print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*$shown; print "[url='bugtracker.php?st=$stl']$i[/url] "; } } $h->endpage(); ?>   next run the sql CREATE TABLE `bugtracker` ( `bt_id` INT( 11 ) NOT NULL auto_increment, `bt_posted` VARCHAR( 255 ) NOT NULL, `bt_from` INT( 11 ) NOT NULL, `bt_description` LONGTEXT NOT NULL, `bt_read` TINYINT( 2 ) NOT NULL, `bt_replyfrom` INT( 11 ) NOT NULL, `bt_reply_one` VARCHAR( 255 ) NOT NULL, `bt_replytext` LONGTEXT NOT NULL, `bt_urgency` VARCHAR( 255 ) NOT NULL, `bt_iplogged` VARCHAR( 255 ) NOT NULL, PRIMARY KEY (`bt_id`) ) TYPE=MYISAM ; works for me on v2
  17. does any1 know how to fix game ranks in v2 it syas am total stats si at lvl1 and i havent even trained :(
  18. Re: Giving Item To All Users [FREE]   <?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; case 'massitemgive': mass_give_item(); break; case 'massitemgivesub': mass_give_item_sub(); 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 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] Weapon Power: <input type='text' name='weapon' value='0' /> Armor Defense: <input type='text' name='armor' 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['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='admin.php?action=newitem']> Back[/url]"; $h->endpage(); exit; } $itmname=$db->escape($_POST['itmname']); $itmdesc=$db->escape($_POST['itmdesc']); $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); 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',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); 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']})",$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 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']}' /><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['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='staff_items.php?action=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=$_POST['itmname']; $itmdesc=$_POST['itmdesc']; $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); 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',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); 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>"; } } function mass_give_item() { global $db,$ir,$c; print "<h3>Giving Item To All Users</h3> <form action='staff_items.php?action=massitemgivesub' method='post'> Item: ".item_dropdown($c,'item')." Quantity: <input type='text' name='qty' value='1' /> <input type='submit' value='Mass Send' /></form>"; } function mass_give_item_sub() { global $db,$ir,$c; $q=mysql_query("SELECT * FROM users WHERE fedjail=0",$c); while($r=mysql_fetch_array($q)) { $db->query("INSERT INTO inventory VALUES('',{$_POST['item']},{$r['userid']},{$_POST['qty']})",$c) or die(mysql_error()); event_add($r['userid'],"The popliation has just bin given an item {$_POST['item']}, Click [url='inventory.php']Here[/url] to check.",$c); print "Item Sent To {$r['username']}</br>"; } print " Mass item sending complete!</br> Theres no need to send a mass mail because they just got an event."; } $h->endpage(); ?>   working v2 i just fixed :) *Come on people use code tags*
  19. does any one know how to remove the money cap in v2
  20. when i go to war some 1 on my game i get a error QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO gangwars VALUES('',23,22,unix_timestamp()) any1 know how to fix it
×
×
  • Create New...