Jensej
Senior User
- Joined
- Mar 30, 2009
- Messages
- 1,252
- Reaction score
- 161
Witam.
Przestawiam sw?j panel do zarz?dzania, z pozycji WWW. Je?li macie jakie? propozycj? funkcji ch?tnie dorobi?.
Przestawiam sw?j panel do zarz?dzania, z pozycji WWW. Je?li macie jakie? propozycj? funkcji ch?tnie dorobi?.
PHP:
<?PHP
//////////////////////////////////////////
////////// jendri@o2.pl /////////////////
///////// Create by Jensej /////////////
////////////////////////////////////////
///Zapytanka
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['lightborder'] .'><TD><B><center>Welcome in Panel</b><br><small>create by Jensej</small></center></TD></tr></table><br>';
$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['lightborder'] .'><td>';
$main_content .= '<table bgcolor='.$config['site']['vdarkborder'].' border=0 cellpadding=5 cellspacing=1 width=100%>
<tr bgcolor='. $config['site']['darkborder'] .'><TD COLSPAN=2 ><b><center>Select Function:</center></TD></tr>
<tr bgcolor='. $config['site']['lightborder'] .'><td Align="center" WIDTH=50%>Change Name</td> <td Align="center" WIDTH=50%><a href="?subtopic=jensejpanel&action=namelock">Select</a></td>
<tr bgcolor='. $config['site']['darkborder'] .'><td Align="center" WIDTH=50%>Experience</td> <td Align="center" WIDTH=50%><a href="?subtopic=jensejpanel&action=exp">Select</a></td>
<tr bgcolor='. $config['site']['lightborder'] .'><td Align="center" WIDTH=50%>Add Points</td> <td Align="center" WIDTH=50%><a href="?subtopic=jensejpanel&action=points">Select</a></td>
<tr bgcolor='. $config['site']['darkborder'] .'><td Align="center" WIDTH=50%>Add new Product in Shop</td> <td Align="center" WIDTH=50%><a href="?subtopic=jensejpanel&action=addnew">Select</a></td>
</tr>
</table>';
//////////////////////////////////
$shop_id = stripslashes(trim($_POST['shop_id']));
$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']));
//////////////////////////
if (isset($_POST['yes3'])){
$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)');
$main_content .= '<br><table bgcolor="green" border=0 cellpadding=10 cellspacing=1 size=10 width=100%><tr><td>Congratulation, you add new Item to Shop</td></tr></table>';}
if($_GET["action"]=="addnew"){
$main_content .= '<form action="?subtopic=jensejpanel" method="post">
<br><table bgcolor="" border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['darkborder'] .'><td width=50% align="center" ><b>Items ID:</b><br><small>(example: 2160)</small></td>
<td><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr>
<tr bgcolor='. $config['site']['darkborder'] .'><td width=50% align="center" ><b>Count:</b><br><small>(example: 1)</small></td>
<td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>
<tr bgcolor='. $config['site']['darkborder'] .'><td width=50% align="center" ><b>Shop Points</b><br><small>(example: 100 Premium Points)</small></td>
<td><input type="text" name="shop_points" maxlenght="7" style="width: 70px" ></td></tr>
<tr bgcolor='. $config['site']['darkborder'] .'><td align="center" ><b>Offer Type:</b><br><small>(Only: Item)</small></td>
<td><input type="text" name="offer_type" maxlenght="7" style="width: 70px" ></td></tr>
<tr bgcolor='. $config['site']['darkborder'] .'><td width=50% align="center" ><b>Offer Name:</b><br><small>(example: Power Bolt)</small></td>
<td><input type="text" name="shop_offer_name" maxlenght="7" style="width: 70px" ></td></tr>
<tr bgcolor='. $config['site']['darkborder'] .'><td width=50% align="center" ><b>Offer Descriptions:</b><br><small>(tutaj wprowad? opis przedmiotu)</small></td>
<td><input type="text" name="shop_offer_description" maxlenght="7" style="width: 200px" ></td></tr>
</table>
<input type="submit" value="Add Item" name="yes3">
</form>';}
if (isset($_POST['ok1'])){
$SQL->query("UPDATE `players` SET `name` = ".$SQL->quote( $_POST['newname'] )." WHERE name = ".$SQL->quote( $_POST['name0'] ).";");
$main_content .= "Player name has been changed.";}
if($_GET["action"]=="namelock"){
$main_content .= '<form action="?subtopic=jensejpanel" method="post">
<table bgcolor="" border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['darkborder'] .'><br>
<td><b>New Player Name:</b></td> <td><input type="text" name="newname"><br>
<tr bgcolor='. $config['site']['darkborder'] .'><td><b>Old Player Name</b></td><td> <input type="text" name="name0"></tr></td></table><br><input type="submit" value="OK" name="ok1"></form>';}
if (isset($_POST['yes1'])){
$SQL->query("UPDATE `accounts` INNER JOIN `players` ON `accounts`.`id` = `players`.`account_id` SET accounts.premium_points=".$SQL->quote( $_POST['addp'] )." WHERE players.name = ".$SQL->quote( $_POST['name51'] ).";");
$main_content .= '<br><table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['lightborder'] .'><TD><B><center>Points Added</center></b></TD></tr></table>';}
if($_GET["action"]=="points"){
$main_content .= '<form action="?subtopic=jensejpanel" method="post">
<table bgcolor="" border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['darkborder'] .'><br>
<td><b>Premium Points:</b></td> <td><input type="text" name="addp"> <font color="green">(Only Numbers)</font><br></td></tr>
<tr bgcolor='. $config['site']['darkborder'] .'><td><b>Player Name: </b></td><td><input type="text" name="name51"><br></tr></td></table><input type="submit" value="Sumbit" name="yes1"></form>';}
$main_content .= '</td></tr></table>';
}
else
{
$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=10 cellspacing=1 size=10 width=100%>
<tr bgcolor='. $config['site']['lightborder'] .'><TD><B><center>You Need Admin Acces.</center></b></TD></tr></table>';
}
?>