isAdmin($user_id);
if($isAdmin)
$home_info = $db->getGameHome($home_id);
else
$home_info = $db->getUserGameHome($user_id,$home_id);
$mods = $home_info['mods'];
$current_mod_info = $mods[$mod_id];
$mod_name = $current_mod_info['mod_name'];
$mod_key = $current_mod_info['mod_key'];
if ( strtolower($mod_name) == "none")
$mod = $mod_key;
else
$mod = $mod_name;
$game = $home_info['game_name'];
$home_cfg_id = $current_mod_info['home_cfg_id'];
$mod_cfg_id = $current_mod_info['mod_cfg_id'];
if($home_cfg_id === null && $mod_cfg_id === null){
print_failure(get_lang('invalid_game_mod_id'));
return;
}
echo "
".get_lang_f( "presets_for_game_and_mod",$game,$mod)."
";
if(isset($_POST['add_rcon_preset']))
{
$name = $_POST['name'];
$command = $_POST['command'];
$db->addRconPreset($name,$command,$home_cfg_id,$mod_cfg_id);
}
if(isset($_POST['del_rcon_preset']))
{
$preset_id = $_POST['preset_id'];
$db->delRconPreset($preset_id);
}
if(isset($_POST['change_rcon_preset']))
{
$name = $_POST['name'];
$command = $_POST['command'];
$preset_id = $_POST['preset_id'];
$db->changeRconPreset($name,$command,$preset_id);
}
?>
getRconPresets($home_cfg_id,$mod_cfg_id);
if(is_array($presets) && (is_array($presets) ? count((array)$presets) : 0) > 0)
{
echo "".get_lang("edit_presets")."
";
echo "