<?php
include LOCALE.LOCALESET."/admin/info.php";
$id=$_GET['serv'];
$q = dbquery("SELECT * FROM ".DB_SERVERS." WHERE server_id = ".$id."");
$serv=dbarray_fetch($q);
$img = "<img src='../images/maps/default.jpg' alt='".$locale_view['001']."' width='160' height='120' class='map'>";
if (file_exists("../images/maps/".$serv['server_map'].".jpg"))
{$img = "<img src='../images/maps/".$serv['server_map'].".jpg' alt='".$serv['server_name']."' width='160' height='120' class='map'>";}
echo "<form name='servform' method='post' action='".AMX_SELF."?id=obpost'>";
echo "<table cellpadding='0' cellspacing='0' width='500' class='center'>";
echo "<b>".$serv['server_name']."</b><br><br>";
echo $img."<br>";
echo "<b><br>".$serv['server_map']."</b></center><br>";
echo "<tr>";
echo "<td valign='top' width='50%' ><br>".$locale_view['002']."</td>";
echo "<td width='50%' ><input name='votes' type='text' class='textbox' style='width:100px;' value='".$serv['votes']."' maxlength='11' /></td>";
echo "</tr><tr>";
echo "<td width='50%' >".$locale_view['011']."</td>";
echo "<td width='50%' ><select name='off' class='textbox'>\n";
echo "<option value='1'".($serv['server_off'] == 1 ? " selected='selected'" : "").">".$locale_view['004']."</option>\n";
echo "<option value='0'".($serv['server_off'] == 0 ? " selected='selected'" : "").">".$locale_view['005']."</option>\n";
echo "</select></td>\n";
echo "</tr><tr>";
echo "<td width='50%' >".$locale_view['014']."</td>";
echo "<td width='50%' ><select name='vip' class='textbox'>\n";
echo "<option value='1'".($serv['server_vip'] == 1 ? " selected='selected'" : "").">".$locale_view['004']."</option>\n";
echo "<option value='0'".($serv['server_vip'] == 0 ? " selected='selected'" : "").">".$locale_view['005']."</option>\n";
echo "</select></td>\n";
echo "</tr>";
echo "<td align='center' colspan='2'><br />";
echo "<input type='hidden' name='serv' value='".$id."'>";
echo "<input type='submit' name='save_serv' value='".$locale_view['012']."' class='button'> <input type='submit' name='delite_serv' value='".$locale_view['013']."' class='button'></td>";
echo "</tr></table></form>";