}
$edlist = new EditList("serverId", "hlstats_Servers", "server", true, true, "serversettings", 'delete_server');
$edlist->columns[] = new EditListColumn("address", "IP Address", 15, true, "ipaddress", "", 15);
$edlist->columns[] = new EditListColumn("port", "Port", 5, true, "text", "27015", 5);
$edlist->columns[] = new EditListColumn("name", "Server Name", 35, true, "text", "", 255);
$edlist->columns[] = new EditListColumn("rcon_password", "Rcon Password", 10, false, "password", "", 128);
$edlist->columns[] = new EditListColumn("publicaddress", "Public Address", 20, false, "text", "", 128);
$edlist->columns[] = new EditListColumn("game", "Game", 20, true, "select", "hlstats_Games.name/code/realgame='" . getRealGame($gamecode) . "'");
$edlist->columns[] = new EditListColumn("sortorder", "Sort Order", 2, true, "text", "", 255);
if ($_POST) {
    if ($edlist->update()) {
        message("success", "Operation successful.");
    } else {
        message("warning", $edlist->error());
    }
}
?>
<br /><br />

<?php 
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\tserverId,\r\n\t\t\taddress,\r\n\t\t\tport,\r\n\t\t\tname,\r\n\t\t\tsortorder,\r\n\t\t\tpublicaddress,\r\n\t\t\tgame,\r\n\t\t\tIF(rcon_password='','','(encrypted)') AS rcon_password\r\n\t\tFROM\r\n\t\t\thlstats_Servers\r\n\t\tWHERE\r\n\t\t\tgame='{$gamecode}'\r\n\t\tORDER BY\r\n\t\t\taddress ASC,\r\n\t\t\tport ASC\r\n\t");
$edlist->draw($result, false);
?>

<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td align="center"><input type="submit" value="  Apply  " class="submit"></td>
</tr>
</table>

Example #2
0
    } else {
        message("warning", $edlist->error());
    }
}
?>

<?php 
echo l('You can make an action map-specific by prepending the map name and an underscore to the Action Code');
?>
.
<?php 
echo l('For example, if the map'), " <b>rock2</b> ", l('has an action'), " <b>goalitem</b> ", l('then you can either make the action code just');
echo " <b>goalitem</b> ", l('(in which case it will match all maps) or you can make it');
echo " <b>rock2_goalitem</b> ", l('to match only on the "rock2" map');
?>
,'.<p>';

<?php 
$result = mysql_query("\n\t\tSELECT\n\t\t\tid,\n\t\t\tcode,\n\t\t\treward_player,\n\t\t\treward_team,\n\t\t\tteam,\n\t\t\tdescription,\n\t\t\tfor_PlayerActions,\n\t\t\tfor_PlayerPlayerActions,\n\t\t\tfor_TeamActions,\n\t\t\tfor_WorldActions\n\t\tFROM\n\t\t\t" . DB_PREFIX . "_Actions\n\t\tWHERE\n\t\t\tgame='{$gamecode}'\n\t\tORDER BY\n\t\t\tcode ASC\n\t");
$edlist->draw($result);
?>

<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td align="center"><input type="submit" value=" <?php 
echo l('Apply');
?>
 " class="submit"></td>
</tr>
</table>
Example #3
0
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
if ($auth->userdata["acclevel"] < 80) {
    die("Access denied!");
}
$edlist = new EditList("awardId", DB_PREFIX . "_Awards", "award");
$edlist->columns[] = new EditListColumn("game", "Game", 0, true, "hidden", $gamecode);
$edlist->columns[] = new EditListColumn("awardType", "Type", 0, true, "hidden", "O");
$edlist->columns[] = new EditListColumn("code", "Action", 0, true, "select", "" . DB_PREFIX . "_Actions.code/code/game='{$gamecode}' AND for_PlayerActions='1'", 0, false);
$edlist->columns[] = new EditListColumn("name", "Award Name", 20, true, "text", "", 128);
$edlist->columns[] = new EditListColumn("verb", "Verb Plural", 20, true, "text", "", 64);
if ($_POST) {
    if ($edlist->update()) {
        message("success", l("Operation successful"));
    } else {
        message("warning", $edlist->error());
    }
}
$query = mysql_query("\n\t\tSELECT\n\t\t\tawardId,\n\t\t\tcode,\n\t\t\tname,\n\t\t\tverb\n\t\tFROM\n\t\t\t" . DB_PREFIX . "_Awards\n\t\tWHERE\n\t\t\tgame='{$gamecode}'\n\t\t\tAND awardType='O'\n\t\tORDER BY\n\t\t\tcode ASC\n\t");
$edlist->draw($query);
?>

<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td align="center"><input type="submit" value=" <?php 
echo l('Apply');
?>
  " class="submit"></td>
</tr>
</table>