Jump to content
MakeWebGames

Brad

Members
  • Posts

    173
  • Joined

  • Last visited

Everything posted by Brad

  1. Brad

    Admin

    Line 1 to 600   <?php /* MCCodes Lite admin.php Rev 1.0.1 Copyright (C) 2006 Dabomstew This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 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(); if($ir['user_level'] != 2) { print "You sneak, get out of here!"; $h->endpage(); exit; } $posta=mysql_real_escape_string(print_r($_POST,1),$c); $geta=mysql_real_escape_string(print_r($_GET,1),$c); mysql_query("INSERT INTO adminlogs VALUES('', $userid, '$posta', '$geta', unix_timestamp() )",$c); switch($_GET['action']) { case 'newuser': new_user_form(); break; case 'newusersub': new_user_submit(); break; 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 'newshop': new_shop_form(); break; case 'newshopsub': new_shop_submit(); break; case 'newstock': new_stock_form(); break; case 'newstocksub': new_stock_submit(); break; case 'edituser': edit_user_begin(); break; case 'edituserform': edit_user_form(); break; case 'editusersub': edit_user_sub(); break; case 'fedform': fed_user_form(); break; case 'fedsub': fed_user_submit(); break; case 'fedeform': fed_edit_form(); break; case 'fedesub': fed_edit_submit(); break; case 'mailform': mail_user_form(); break; case 'mailsub': mail_user_submit(); break; case 'unfedform': unfed_user_form(); break; case 'unfedsub': unfed_user_submit(); break; case 'editnews': newspaper_form(); break; case 'subnews': newspaper_submit(); break; case 'editadnews': adnewspaper_form(); break; case 'subadnews': adnewspaper_submit(); break; case 'atklogs': view_attack_logs(); break; case 'index': admin_index(); break; case 'invbeg': inv_user_begin(); break; case 'invuser': inv_user_view(); break; case 'deleinv': inv_delete(); break; case 'creditform': credit_user_form(); break; case 'creditsub': credit_user_submit(); break; case 'ccreditform': ccredit_user_form(); break; case 'ccreditsub': ccredit_user_submit(); break; case 'ipform': ip_search_form(); break; case 'ipsub': ip_search_submit(); break; case 'massjailip': mass_jail(); break; case 'itmlogs': view_itm_logs(); break; case 'cashlogs': view_cash_logs(); break; case 'maillogs': view_mail_logs(); break; case 'stafflist': staff_list(); break; case 'userlevel': userlevel(); break; case 'userlevelform': userlevelform(); break; case 'massmailer': massmailer(); break; case 'ipban': ipban(); break; case 'ipbancon': ipbancon(); break; case 'ipbanview': ipbanview(); break; case 'ipbanremove': ipbanremove(); break; case 'deluserform': del_user_form(); break; case 'delusersub': del_user_submit(); break; default: admin_index(); break; } function admin_index() { global $ir,$c,$userid; print "Welcome to the Your Game Name admin panel, [b]{$ir['username']}![/b] [b]Admin Pad:[/b] "; include "admin.news"; print " <u>Users</u> [[url='admin.php?action=newuser']Create New User[/url]] [[url='admin.php?action=deluserform']Delete User[/url]] [[url='admin.php?action=edituser']Edit User[/url]] [[url='admin.php?action=mailform']Mail Ban User[/url]] [[url='admin.php?action=fedform']Jail User[/url]] [[url='admin.php?action=fedeform']Edit Fedjail Sentence[/url]] [[url='admin.php?action=unfedform']Unjail User[/url]] [[url='admin.php?action=invbeg']View User Inventory[/url]] [[url='admin.php?action=creditform']Credit User Money[/url]] [[url='admin.php?action=ccreditform']Credit User Crystals[/url]] [[url='admin.php?action=ipform']Ip Search[/url]] [[url='admin.php?action=ipban'][b]Ban an IP[/b][/url]] [[url='admin.php?action=ipbanview'][b]View Banned IP's[/b][/url]] <u>Items</u> [[url='admin.php?action=newitem']Create New Item[/url]] [[url='admin.php?action=giveitem']Give Item To User[/url]] [[url='admin.php?action=edititem']Edit Item[/url]] [[url='admin.php?action=killitem']Delete An Item[/url]] <u>Shops</u> [[url='admin.php?action=newshop']Create New Shop[/url]] [[url='admin.php?action=newstock']Add Item To Shop[/url]] <u>Misc</u> [[url='admin.php?action=editnews']Edit Announcements[/url]] [[url='admin.php?action=massmailer']Mass mailer[/url]] <u>Logs</u> [[url='admin.php?action=atklogs']Attack Logs[/url]] [[url='admin.php?action=cashlogs']Cash Xfer Logs[/url]] [[url='admin.php?action=itmlogs']Item Xfer Logs[/url]] [[url='admin.php?action=maillogs']Mail Logs[/url]] "; print " <u>Critical Tools</u> [[url='admin.php?action=stafflist']Staff List[/url]] [[url='admin.php?action=userlevelform']Adjust User Level[/url]] [[url='admin.php?action=editadnews']Edit Admin Pad[/url]] "; } function new_user_form() { global $ir, $c; print "Adding a new user. <form action='admin.php?action=newusersub' method='post'> Username: <input type='text' name='username' /> Login Name: <input type='text' name='login_name' /> Email: <input type='text' name='email' /> Password: <input type='text' name='userpass' /> Type: <input type='radio' name='user_level' value='0' />NPC <input type='radio' name='user_level' value='1' checked='checked' />Regular Member Level: <input type='text' name='level' value='1' /> Money: <input type='text' name='money' value='100' /> Crystals: <input type='text' name='crystals' value='0' /> Gender: <select name='gender' type='dropdown'><option>Male</option><option>Female</option></select> [b]Stats[/b] Strength: <input type='text' name='strength' value='10' /> Agility: <input type='text' name='agility' value='10' /> Guard: <input type='text' name='guard' value='10' /> Labour: <input type='text' name='labour' value='10' /> IQ: <input type='text' name='labour' value='10' /> <input type='submit' value='Create User' /></form>"; } function new_user_submit() { global $ir,$c,$userid; if(!isset($_POST['username']) || !isset($_POST['login_name']) || !isset($_POST['userpass'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newuser']> Back[/url]"; $h->endpage(); exit; } $level=abs((int) $_POST['level']); $money=make_bigint($_POST['money']); $crys=make_bigint($_POST['crystals']); $ulevel=abs((int) $_POST['user_level']); $strength=abs((int) $_POST['strength']); $agility=abs((int) $_POST['agility']); $guard=abs((int) $_POST['guard']); $labour=abs((int) $_POST['labour']); $iq=abs((int) $_POST['iq']); $energy=10+$level*2; $brave=3+$level*2; $hp=50+$level*50; mysql_query("INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, crystals) VALUES( '{$_POST['username']}', '{$_POST['login_name']}', md5('{$_POST['userpass']}'), $level, $money, $crystals, $donator, $ulevel, $energy, $energy, 100, 100, $brave, $brave, $hp, $hp, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, $crys)", $c); $i=mysql_insert_id($c); mysql_query("INSERT INTO userstats VALUES($i, $strength, $agility, $guard, $labour, $iq)", $c); print "User created!"; } function new_item_form() { global $ir,$c; print "<h3>Adding an item to the game</h3><form action='admin.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' /> [b]Specialized[/b] Item Energy Regen (food only): <input type='text' name='energy' value='1' /> Power (weapons only): <input type='text' name='damage' value='10' /> Damage Off (armor only): <input type='text' name='Defence' value='10' /> <input type='submit' value='Add Item To Game' /></form>"; } function new_item_submit() { global $ir,$c,$h; 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=mysql_escape($_POST['itmname']); $itmdesc=mysql_escape($_POST['itmdesc']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $m=mysql_query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy)",$c) or die(mysql_error()); if($_POST['itmtype'] == 1) { $i=mysql_insert_id(); mysql_query("INSERT INTO food VALUES($i,{$_POST['energy']})",$c) or die(mysql_error()); } if($_POST['itmtype'] == 3 || $_POST['itmtype'] == 4) { $i=mysql_insert_id(); mysql_query("INSERT INTO weapons VALUES($i,{$_POST['damage']})",$c) or die(mysql_error()); } if($_POST['itmtype'] == 7) { $i=mysql_insert_id(); mysql_query("INSERT INTO armour VALUES($i,{$_POST['Defence']})",$c) or die(mysql_error()); } print "The {$_POST['itmname']} Item was added to the game."; } function give_item_form() { global $ir,$c; print "<h3>Giving Item To User</h3> <form action='admin.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 $ir,$c; mysql_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']}"; } function kill_item_form() { global $ir,$c,$h,$userid; print "<h3>Deleting Item</h3> The item will be permanently removed from the game. <form action='admin.php?action=killitemsub' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Kill Item' /></form>"; } function kill_item_submit() { global $ir,$c,$h,$userid; $d=mysql_query("SELECT * FROM items WHERE itmid={$_POST['item']}",$c); $itemi=mysql_fetch_array($d); mysql_query("DELETE FROM items WHERE itmid={$_POST['item']}",$c); mysql_query("DELETE FROM shopitems WHERE sitemITEMID={$_POST['item']}",$c); mysql_query("DELETE FROM inventory WHERE inv_itemid={$_POST['item']}",$c); mysql_query("DELETE FROM food WHERE item_id={$_POST['item']}",$c); mysql_query("DELETE FROM weapons WHERE item_id={$_POST['item']}",$c); mysql_query("DELETE FROM armour WHERE item_ID={$_POST['item']}",$c); mysql_query("DELETE FROM itemmarket WHERE imITEM={$_POST['item']}",$c); print "The {$itemi['itmname']} Item was removed from the game."; } function edit_item_begin() { global $ir,$c,$h,$userid; print "<h3>Editing Item</h3> You can edit any aspect of this item. <form action='admin.php?action=edititemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Edit Item' /></form>"; } function edit_item_form() { global $ir,$c,$h; $d=mysql_query("SELECT * FROM items WHERE itmid={$_POST['item']}",$c); $itemi=mysql_fetch_array($d); $f=mysql_query("SELECT * FROM food WHERE item_id={$_POST['item']}",$c); if(mysql_num_rows($f) > 0) { $a=mysql_fetch_array($f); $energy=$a['energy']; } else { $energy=1; } $f=mysql_query("SELECT * FROM weapons WHERE item_id={$_POST['item']}",$c); if(mysql_num_rows($f) > 0) { $a=mysql_fetch_array($f); $damage=$a['damage']; } else { $damage=1; } $f=mysql_query("SELECT * FROM armour WHERE item_ID={$_POST['item']}",$c); if(mysql_num_rows($f) > 0) { $a=mysql_fetch_array($f); $def=$a['Defence']; } else { $def=10; } print "<h3>Editing Item</h3> <form action='admin.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']}'/> [b]Specialized[/b] Item Energy Regen (food only): <input type='text' name='energy' value='$energy' /> Power (weapons only): <input type='text' name='damage' value='$damage' /> Damage Off (armor only): <input type='text' name='Defence' value='$def' /> <input type='submit' value='Edit Item' /></form>"; } function edit_item_sub() { global $ir,$c,$h,$userid; 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=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=mysql_escape($_POST['itmname']); $itmdesc=mysql_escape($_POST['itmdesc']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } mysql_query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); mysql_query("DELETE FROM food WHERE item_id={$_POST['itmid']}",$c); mysql_query("DELETE FROM weapons WHERE item_id={$_POST['itmid']}",$c); mysql_query("DELETE FROM armour WHERE item_ID={$_POST['itmid']}",$c); $m=mysql_query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy)",$c) or die(mysql_error()); if($_POST['itmtype'] == 1) { mysql_query("INSERT INTO food VALUES({$_POST['itmid']},{$_POST['energy']})",$c) or die(mysql_error()); } if($_POST['itmtype'] == 3 || $_POST['itmtype'] == 4) { mysql_query("INSERT INTO weapons VALUES({$_POST['itmid']},{$_POST['damage']})",$c) or die(mysql_error()); } if($_POST['itmtype'] == 7) { $i=mysql_insert_id(); mysql_query("INSERT INTO armour VALUES({$_POST['itmid']} ,{$_POST['Defence']})",$c) or die(mysql_error()); } print "The {$_POST['itmname']} Item was edited successfully."; } function new_shop_form() { global $ir,$c,$h; print "<h3>Adding a New Shop</h3> <form action='admin.php?action=newshopsub' method='post'> Shop Name: <input type='text' name='sn' value='' /> Shop Desc: <input type='text' name='sd' value='' /> Shop Location: ".location_dropdown($c,"sl")." <input type='submit' value='Create Shop' /></form>"; } function new_shop_submit() { global $ir,$c,$h; if(!isset($_POST['sn']) || !isset($_POST['sd'])) { print "You missed a field, go back and try again. [url='admin.php?action=newitem']> Back[/url]"; } else { $sn=mysql_escape($_POST['sn']); $sd=mysql_escape($_POST['sd']); mysql_query("INSERT INTO shops VALUES('',{$_POST['sl']},'$sn','$sd')",$c); print "The $sn Shop was successfully added to the game."; } } function new_stock_form() { global $ir,$c,$h; print "<h3>Adding an item to a shop</h3> <form action='admin.php?action=newstocksub' method='post'> Shop: ".shop_dropdown($c,"shop")." Item: ".item_dropdown($c,"item")." <input type='submit' value='Add Item To Shop' /></form>"; } function new_stock_submit() { global $ir,$c,$h; mysql_query("INSERT INTO shopitems VALUES('',{$_POST['shop']},{$_POST['item']})",$c); print "Item ID {$_POST['item']} was successfully added to shop ID {$_POST['shop']}"; } function edit_user_begin() { global $ir,$c,$h,$userid; print "<h3>Editing User</h3> You can edit any aspect of this user. <form action='admin.php?action=edituserform' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='Edit User' /></form> OR enter a user ID to edit: <form action='admin.php?action=edituserform' method='post'> User: <input type='text' name='user' value='0' /> <input type='submit' value='Edit User' /></form>"; } function edit_user_form() { global $ir,$c,$h,$userid; $d=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us on u.userid=us.userid WHERE u.userid={$_POST['user']}",$c); $itemi=mysql_fetch_array($d); print "<h3>Editing User</h3> <form action='admin.php?action=editusersub' method='post'> <input type='hidden' name='userid' value='{$_POST['user']}' /> Username: <input type='text' name='username' value='{$itemi['username']}' /> Login Name: <input type='text' name='login_name' value='{$itemi['login_name']}' /> Duties: <input type='text' name='duties' value='{$itemi['duties']}' /> Staff Notes: <input type='text' name='staffnotes' value='{$itemi['staffnotes']}' /> Level: <input type='text' name='level' value='{$itemi['level']}' /> Money: \$<input type='text' name='money' value='{$itemi['money']}' /> Crystals: \$<input type='text' name='crystals' value='{$itemi['crystals']}' /> Mail Ban: <input type='text' name='mailban' value='{$itemi['mailban']}' /> Mail Ban Reason: <input type='text' name='mb_reason' value='{$itemi['mb_reason']}' /> <h4>Stats</h4> Strength: <input type='text' name='strength' value='{$itemi['strength']}' /> Agility: <input type='text' name='agility' value='{$itemi['agility']}' /> Guard: <input type='text' name='guard' value='{$itemi['guard']}' /> Labour: <input type='text' name='labour' value='{$itemi['labour']}' /> IQ: <input type='text' name='IQ' value='{$itemi['IQ']}' /> <input type='submit' value='Edit User' /></form>"; } function edit_user_sub() { global $ir,$c,$h,$userid; $go=0; if(!isset($_POST['level'])) { $go=1; } if(!isset($_POST['money'])) { $go=1; } if(!isset($_POST['crystals'])) { $go=1; } if(!isset($_POST['strength'])) { $go=1; } if(!isset($_POST['agility'])) { $go=1; } if(!isset($_POST['guard'])) { $go=1; } if(!isset($_POST['labour'])) { $go=1; } if(!isset($_POST['IQ'])) { $go=1; } if(!isset($_POST['username'])) { $go=1; } if(!isset($_POST['login_name'])) { $go=1; } if($go) { print "You did not fully fill out the form."; new_user_form(); } else { $_POST['level']=(int) $_POST['level']; $_POST['strength']=abs((int) $_POST['strength']); $_POST['agility']=abs((int) $_POST['agility']); $_POST['guard']=abs((int) $_POST['guard']); $_POST['labour']=abs((int) $_POST['labour']); $_POST['IQ']=abs((int) $_POST['IQ']); $_POST['money']=make_bigint($_POST['money'],0); $_POST['crystals']=make_bigint($_POST['crystals'],0); $_POST['mailban']=(int) $_POST['mailban']; //check for username usage $u=mysql_query("SELECT * FROM users WHERE username='{$_POST['username']}' and userid != {$_POST['userid']}",$c); if(mysql_num_rows($u) != 0) { print "That username is in use, choose another."; print " [url='admin.php?action=edituser']> Back[/url]"; $h->endpage(); exit; } $oq=mysql_query("SELECT * FROM users WHERE userid={$_POST['userid']}",$c); $rm=mysql_fetch_array($oq); $energy=10+$_POST['level']*2; $nerve=3+$_POST['level']*2; $hp=50+$_POST['level']*50; mysql_query("UPDATE users SET username='{$_POST['username']}', level={$_POST['level']}, money={$_POST['money']}, energy=$energy, brave=$nerve, maxbrave=$nerve, maxenergy=$energy, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, duties='{$_POST['duties']}', staffnotes='{$_POST['staffnotes']}', mailban={$_POST['mailban']}, mb_reason='{$_POST['mb_reason']}', login_name='{$_POST['login_name']}', crystals='{$_POST['crystals']}' WHERE userid={$_POST['userid']}", $c); mysql_query("UPDATE userstats SET strength={$_POST['strength']}, agility={$_POST['agility']}, guard={$_POST['guard']}, labour={$_POST['labour']}, IQ={$_POST['IQ']} WHERE userid={$_POST['userid']}", $c); print "User edited...."; } } function fed_user_form() { global $ir,$c,$h,$userid; print "<h3>Jailing User</h3> The user will be put in fed jail and will be unable to do anything in the game. <form action='admin.php?action=fedsub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Jail User' /></form>"; } function fed_user_submit() { global $ir,$c,$h,$userid; $re=mysql_query("UPDATE users SET fedjail=1 WHERE userid={$_POST['user']}",$c); if(mysql_affected_rows($c)) { mysql_query("INSERT INTO fedjail VALUES('',{$_POST['user']},{$_POST['days']},$userid,'". mysql_real_escape_string($_POST['reason'],$c)."')",$c); } mysql_query("INSERT INTO jaillogs VALUES('',$userid, {$_POST['user']}, {$_POST['days']}, '{$_POST['reason']}',unix_timestamp())",$c); print "User jailed."; } function fed_edit_form() { global $ir,$c,$h,$userid; print "<h3>Editing Fedjail Reason</h3> You are editing a player's sentence in fed jail. <form action='admin.php?action=fedesub' method='post'> User: ".fed_user_dropdown($c,'user')." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Jail User' /></form>"; } function fed_edit_submit() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM fedjail WHERE fed_userid={$_POST['user']}",$c); mysql_query("INSERT INTO fedjail VALUES('',{$_POST['user']},{$_POST['days']},$userid,'". mysql_real_escape_string($_POST['reason'],$c)."')",$c); mysql_query("INSERT INTO jaillogs VALUES('',$userid, {$_POST['user']}, {$_POST['days']}, '{$_POST['reason']}',unix_timestamp())",$c); print "User's sentence edited."; } function mail_user_form() { global $ir,$c,$h,$userid; print "<h3>Mail Banning User</h3> The user will be banned from the mail system. <form action='admin.php?action=mailsub' method='post'> User: ".user_dropdown($c,'user',$_GET['ID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Mailban User' /></form>"; } function mail_user_submit() { global $ir,$c,$h,$userid; $_POST['reason']=stripslashes($_POST['reason']); $re=mysql_query("UPDATE users SET mailban={$_POST['days']},mb_reason='{$_POST['reason']}' WHERE userid={$_POST['user']}",$c); event_add($_POST['user'],"You were banned from mail for {$_POST['days']} day(s) for the following reason: {$_POST['reason']}",$c); print "User mail banned."; } function unfed_user_form() { global $ir,$c,$h,$userid; print "<h3>Unjailing User</h3> The user will be taken out of fed jail. <form action='admin.php?action=unfedsub' method='post'> User: ".fed_user_dropdown($c,'user')." <input type='submit' value='Unjail User' /></form>";
  2. what when there are files which are like 1000 lines and that takes 30 sec
  3. can anyone help me
  4. no i understand the rest just not adding new user levels
  5. Yeah i would but i dont understand how to
  6. Brad

    Admin

    It is too big to post it is just the mccodes lite admin panel.
  7. i dont understand why most of my admin stuff dont work can someone fix it like edit user dont work.   I have added to it but it the lite adminnever works
  8. Ok i do that sometimes works.
  9. Can u code it up mate. Just use this to help u. http://makewebgames.io/board750/16666-tutorial-v1-v2-conversion/ Just do the the other way they tell u use the second post thought or read all of them xD.
  10. Yeah it will be faster after it works cause then you can do loads
  11. You can just edit the user name on ur admin panel to give a color but when u edit it on pref it dont work so it easy way to do that
  12. yeah i dont understand how to can u make one for me and i can make some just never seen one for lite xD
  13. yeah i use that but i just wanna do it fast thanks mate
  14. Ok can anyone make me a staff page for mccodes lite like sec panel and admin panel and helper and if you have time owner panel cause that will help me with my lite game if you can help thanks post it here plz.
  15. it dont change though i will do something. I will change v2 to v1 include "global_func.php"; It changes to include \"global_func.php\"; That is not even right
  16. help
  17. Fatal error: Cannot redeclare get_rank() (previously declared in /home/---/public_html/global_func.php:152) in /home/---/public_html/global_func.php on line 174
  18. there is errors
  19. nice thats v1 though but i was gonna convert it anyway
  20. Can someone fix this it dont work as the coverter.     <?php switch($_GET['convert']) { case 'to_v1': conv_v1(); break; case 'to_v2': conv_v2(); break; default: conv_home(); break; } function conv_home() { echo <<<EOF <title>MC Codes Converter</title> <center><h3>MC Codes Version Converter<h3> <form action=javascript:action; method='post'> <select onChange="this.form.action=this.options[this.selectedIndex].value;"> <option default value="">--Select One--</option> <option value="mccodes_converter.php?convert=to_v2">v1->v2</option> <option value="mccodes_converter.php?convert=to_v1">v2->v1</option> </select> <textarea rows='20' cols='100' name='convtext'></textarea> <input value='Convert' type='submit' /></center> EOF; } function conv_v2() { $convtext=($_POST['convtext']); $tobereplaced = array( 'mysql_query', 'fetch_array', 'mysql_', ); $replacedwith = array( '$db->query', 'fetch_row', '$db->', ); $convedtext = str_replace($tobereplaced, $replacedwith, $convtext); print "<center><title>Converted to V2</title> <h3>Converted to V2</h3> <textarea rows='20' cols='100' readonly>$convedtext</textarea></center>"; } function conv_v1() { $convtext=($_POST['convtext']); $tobereplaced = array( '$db->query', 'fetch_row', '$db->', ); $replacedwith = array( 'mysql_query', 'fetch_array', 'mysql_', ); $convedtext = str_replace($tobereplaced, $replacedwith, $convtext); print "<center><title>Converted to V1</title> <h3>Converted to V1</h3> <textarea rows='20' cols='100' readonly>$convedtext</textarea></center>"; } ?>
  21. yeah i like bad at coding and i read 3 files of mccodes and made 3 mods 2 that workeds my lotto did't but i will take any people who can teach me it's well hard for me to learn so i need someone to help me to understand better. I very bad at english cant remembers stuff well.
  22. o cool thanks that helps
  23. yeah i need one what goes to lite
  24. Does anyone have a mccode code coverter which coverts v2 to lite and v1.
  25. um post the errors here.
×
×
  • Create New...