Hi few days ago Download the scritp shopadmin of this forum but could only edit:
I want to add new offers.
I want to delete an offer.
And when adding an item to the player not had this option.
I edited this script for adding Gęsior 2012:
I want to Add Players Points.
Here is the corrected Shopadmin By Lollimpo.
Shopadmin:
<?PHP
$link = "shopadmin"; // put the "case" that you set in your index.php file
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
$main_content .= '<center><small>Scripts by <a href=""></a><a href=""></a></small></center><h2><center><B>Welcome to Shopadmin!!!</B></center></h2><br/><br/><center><b>What do you want?</b><br/>I want to <a href="?subtopic='.$link.'&action=points">add points player.</a></b><br/>I want to <a href="?subtopic='.$link.'&offer_type=item">add new offers.</a><br/>I want to <a href="?subtopic='.$link.'&action=delete">delete an offer.</a></center>';
}
if($_REQUEST['offer_type']){
$shop_points = stripslashes(ucwords(strtolower(trim($_REQUEST['shop_points']))));
$shop_offer_type = stripslashes(trim($_REQUEST['offer_type']));
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
if(empty($shop_points)) {
$main_content .= '<table border="0"><tr><td bgcolor="'.$config['site']['vdarkborder'].'" align="center">
<b><font color="white">Select offer type:</font></b></td><td><table border="0" bgcolor="'.$config['site']['vdarkborder'].'"><tr bgcolor="'.$config['site']['vdarkborder'].'">
<td><font color="white">Item</font></td><td><font color="white">Container</font></td><td><font color="white">Pacc</font></td><td><font color="white">Addon</font></td><td><font color="white">Redskull</font></td><td><font color="white">Unban</font></td><td><font color="white">Changename</font></td></tr>
<tr bgcolor="'.$config['site']['vdarkborder'].'">
<td align="center"><a href="?subtopic=shopadmin&offer_type=item"><input type="radio" name="offer_type" value="item"></a></td>
<td align="center"><a href="?subtopic=shopadmin&offer_type=container"><input type="radio" name="offer_type" value="container" ></a></td>
<td align="center"><a href="?subtopic=shopadmin&offer_type=pacc"><input type="radio" name="offer_type" value="pacc" ></a></td>
<td align="center"><a href="?subtopic=shopadmin&offer_type=addon"><input type="radio" name="offer_type" value="addon" ></a></td>
<td align="center"><a href="?subtopic=shopadmin&offer_type=redskull"><input type="radio" name="offer_type" value="redskull" ></a></td>
<td align="center"><a href="?subtopic=shopadmin&offer_type=unban"><input type="radio" name="offer_type" value="unban" ></a></td>
<td align="center"><a href="?subtopic=shopadmin&offer_type=changename"><input type="radio" name="offer_type" value="changename" ></a></td>
</tr></table></td></tr><form action="?subtopic=shopadmin&offer_type='.$shop_offer_type.'&check" method="post" ><table border="0">';
if ($_REQUEST['offer_type'] == 'item'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Item ID:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Item Count:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></form></center></td>
<td><center><form action="?subtopic=shopadmin&offer_type=item" method="post" >
<input name="submit" type="submit" value="Reset"/></form></center></td></tr></table>';
}
if ($_REQUEST['offer_type'] == 'container'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Container ID:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'6"><b>Count Container:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Item ID:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><input type="text" name="shop_itemid2" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Count Item:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_count2" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></form></center></td>
<td><center><form action="?subtopic=shopadmin&offer_type=container" method="post" >
<input name="submit" type="submit" value="Reset" /></form></center></td></tr></table>';
}
if ($_REQUEST['offer_type'] == 'addon'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Item ID:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Item Count:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></form></center></td>
<td><form action="?subtopic=shopadmin&offer_type=addon" method="post" >
<input name="submit" type="submit" value="Reset" /></form></center></td></tr></table>';
}
if ($_REQUEST['offer_type'] == 'pacc'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Days:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></form></center></td>
<td><center><form action="?subtopic=shopadmin&offer_type=pacc" method="post" >
<input name="submit" type="submit" value="Reset" /></form></center></td></tr></table>';
}
if ($_REQUEST['offer_type'] == 'unban'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></form></center></td>
<td><center><form action="?subtopic=shopadmin&offer_type=unban" method="post" >
<input name="submit" type="submit" value="Reset" /></form></center></td></tr></table>';
}
if ($_REQUEST['offer_type'] == 'redskull'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></center></form></td>
<td><center><form action="?subtopic=shopadmin&offer_type=redskull" method="post" >
<input name="submit" type="submit" value="Reset" /></form></center></td></tr></table>';
}
if ($_REQUEST['offer_type'] == 'changename'){
$main_content .= '
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Points:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['darkborder'].'"><b>Offer Description:</b></td>
<td bgcolor="'.$config['site']['darkborder'].'"><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr>
<tr><td align="center" bgcolor="'.$config['site']['lightborder'].'"><b>Offer Name:</b></td>
<td bgcolor="'.$config['site']['lightborder'].'"><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr>
<tr><td><center><input name="submit" type="submit" value="Submit" /></center></form></td>
<td><center><form action="?subtopic=shopadmin&offer_type=changename" method="post" >
<input name="submit" type="submit" value="Reset" /></form></center></td></tr></table>';
}
}
else
{
$shop_points = stripslashes(trim($_POST['shop_points']));
$shop_offer_type = stripslashes(trim($_REQUEST['offer_type']));
$shop_itemid1 = stripslashes(trim($_POST['shop_itemid1']));
$shop_count1 = stripslashes(trim($_POST['shop_count1']));
$shop_itemid2 = stripslashes(trim($_POST['shop_itemid2']));
$shop_count2 = stripslashes(trim($_POST['shop_count2']));
$shop_offer_description = stripslashes(trim($_POST['shop_offer_description']));
$shop_offer_name = stripslashes(trim($_POST['shop_offer_name']));
$SQL->query('INSERT INTO `z_shop_offer` (id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name, pid) VALUES (NULL, '.$SQL->quote($shop_points).', '.$SQL->quote($shop_itemid1).', '.$SQL->quote($shop_count1).', '.$SQL->quote($shop_itemid2).', '.$SQL->quote($shop_count2).', '.$SQL->quote($shop_offer_type).', '.$SQL->quote($shop_offer_description).', '.$SQL->quote($shop_offer_name).', 0)');
if ($shop_offer_type == 'container'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Container ID:</b></td>
<td>'.$shop_itemid1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Count Container:</b></td>
<td>'.$shop_count1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b> Item ID (in Container):</b></td>
<td>'.$shop_itemid2.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Count Item (in Container):</b></td>
<td>'.$shop_count2.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
if ($shop_offer_type == 'pacc'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Days:</b></td>
<td>'.$shop_count1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
if ($shop_offer_type == 'redskull'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
if ($shop_offer_type == 'changename'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
if ($shop_offer_type == 'unban'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
if ($shop_offer_type == 'item'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Item ID:</b></td>
<td>'.$shop_itemid1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Count Item:</b></td>
<td>'.$shop_count1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
if ($shop_offer_type == 'addon'){
$main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/>
<tr><td align="center" bgcolor="F1E0C6"><b>Points:</b></td>
<td>'.$shop_points.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Item ID:</b></td>
<td>'.$shop_itemid1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Count Item:</b></td>
<td>'.$shop_count1.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Type:</b></td>
<td>'.$shop_offer_type.'</td></tr><br>
<tr><td align="center" bgcolor="D4C0A1"><b>Offer Description:</b></td>
<td>'.$shop_offer_description.'</td></tr><br>
<tr><td align="center" bgcolor="F1E0C6"><b>Offer Name:</b></td>
<td>'.$shop_offer_name.'</td></tr>
<br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
}
}
else
{
$main_content .= 'Sorry, you have not the rights to access this page.';
}
}
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
if($action == "delete") {
$id = (int) $_REQUEST['id'];
$shop_points = stripslashes(trim($_POST['shop_points']));
$shop_offer_type = stripslashes(trim($_POST['shop_offer_type']));
$shop_itemid1 = stripslashes(trim($_POST['shop_itemid1']));
$shop_count1 = stripslashes(trim($_POST['shop_count1']));
$shop_itemid2 = stripslashes(trim($_POST['shop_itemid2']));
$shop_count2 = stripslashes(trim($_POST['shop_count2']));
$shop_offer_description = stripslashes(trim($_POST['shop_offer_description']));
$shop_offer_name = stripslashes(trim($_POST['shop_offer_name']));
$SQL->query('UPDATE `z_shop_offer` SET `points` = '.$shop_points.', `itemid1` = '.$SQL->quote($shop_itemid1).', `count1` = '.$SQL->quote($shop_count1).', `itemid2` = '.$SQL->quote($shop_itemid2).', `count2` = '.$SQL->quote($shop_count2).', `offer_type` = '.$SQL->quote($shop_offer_type).', `offer_description` = '.$SQL->quote($shop_offer_description).', `offer_name` = '.$SQL->quote($shop_offer_name).' WHERE `id` = '.$id.';');
$main_content .= '<b><center>Shop offer successfully edited.</b><br><br><form action="?subtopic=shopadmin&action=viewoffer" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form><meta http-equiv="refresh" content="1;url=/?subtopic=shopadmin&action=viewoffer" />';
}
if($action == "points") {
$player = stripslashes(ucwords(strtolower(trim($_REQUEST['character']))));
$points = $_POST['points'];
if(empty($player)) {
$main_content .= '<form action="?subtopic=shopadmin&action=points" method="post"><B>Enter Character Name:</B><input type="textbox" name="character"><br>
<B>Enter Points Amount:</B><input type="textbox" name="points"><br><br><input type="submit" value="Submit">
</form></center><form action="?subtopic=shopadmin" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
} else {
$player_data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch();
$SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$player_data['account_id']."'");
$SQL->query("UPDATE `accounts` SET `backup_points` = `backup_points` + '".$points."' WHERE `id` = '".$player_data['account_id']."'");
$main_content .= '<b><center>'.$points.' Premium Points added to the account of <i>'.$player.'</i> !</b></center><br>
<form action="?subtopic=shopadmin" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
}
}
} else {
$main_content .= 'Sorry, you have not the rights to access this page.';
}
?>