<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html;<%! charset=ISO-8859-1 !%>" />
	<title>VDRAdmin-AM - <%! VDR Commands !%></title>
	<link href="style.css" rel="stylesheet" media="screen" type="text/css" />
	<tmpl_if usercss>
		<link href="user.css" rel="stylesheet" media="screen" type="text/css" />
	</tmpl_if>
	<script type="text/javascript" language="JavaScript1.2" src="library.js"></script>
</head>

<body id="vdr_cmds">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="heading">
		<tr>
			<td class="col_left"></td>
			<td class="col_title"><h1><%! VDR Commands !%></h1></td>
<tmpl_if name="help_url">
			<td class="col_help">
				<a href="javascript:open_help('<tmpl_var help_url>');"><img src="bilder/help.gif" border="0" alt="help" title="<%! Help !%>" /></a>
			</td>
</tmpl_if>
			<td class="col_right"></td>
		</tr>
	</table>

	<form action="<tmpl_var url>" method="get" name="FormName">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="group">
			<tr class="heading">
				<td class="col_left"></td>
				<td colspan="2"></td>
				<td class="col_right"></td>
			</tr>
			<tr class="row_spacer">
				<td class="col_left"></td>
				<td colspan="2"></td>
				<td class="col_right"></td>
			</tr>

			<tr class="row_odd">
				<td class="col_left"></td>
				<td class="col_label"><%! Number of lines to show: !%></td>
				<td class="col_value">
					<select name="max_lines">
						<option value="20" <tmpl_if expr="max_lines == 20">selected="selected"</tmpl_if>>20</option>
						<option value="50" <tmpl_if expr="max_lines == 50">selected="selected"</tmpl_if>>50</option>
						<option value="100" <tmpl_if expr="max_lines == 100">selected="selected"</tmpl_if>>100</option>
						<option value="-1" <tmpl_if expr="max_lines == -1">selected="selected"</tmpl_if>><%! unlimited !%></option>
					</select>
				</td>
				<td class="col_right"></td>
			</tr>
			<tr class="row_even">
				<td class="col_left"></td>
				<td class="col_label"><%! SVDRP commands: !%></td>
				<td class="col_value">
					<input type="text" name="svdrp_cmd" value="<tmpl_var svdrp_cmd>"/>
					<input type="submit" class="submit" name="run_svdrpcmd" value="<%! Run !%>" onclick="return confirm('<%! Really run this command? !%>')" />
				</td>
				<td class="col_right"></td>
			</tr>
<tmpl_if commands>
			<tr class="row_odd">
				<td class="col_left"></td>
				<td class="col_label"><%! Commands defined in commands.conf: !%></td>
				<td class="col_value">
					<select name="vdr_cmd" class="submit">
						<tmpl_loop commands>
							<option value="<tmpl_var id>" <tmpl_if expr="vdr_cmd == id">selected="selected"</tmpl_if>><tmpl_var title></option>
						</tmpl_loop>
					</select>
					<input type="submit" class="submit" name="run_vdrcmd" value="<%! Run !%>" onclick="return confirm('<%! Really run this command? !%>')" />
				</td>
				<td class="col_right"></td>
			</tr>
</tmpl_if>

			<tr class="footer">
				<td class="col_left"></td>
				<td colspan="2"></td>
				<td class="col_right"></td>
			</tr>
		</table>
		<input type="hidden" name="aktion" value="vdr_cmds"/>
	</form>

<tmpl_if show_output>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="group">
		<tr class="heading">
			<td class="col_left"></td>
			<td><h2><%! Output !%></h2></td>
			<td class="col_right"></td>
		</tr>
		<tr class="row_spacer">
			<td class="col_left"></td>
			<td></td>
			<td class="col_right"></td>
		</tr>

<tmpl_loop show_output>
		<tr class="<tmpl_if __ODD__>row_odd<tmpl_else>row_even</tmpl_if>">
			<td class="col_left"></td>
			<td><pre><tmpl_var line escape="html"></pre></td>
			<td class="col_right"></td>
		</tr>
</tmpl_loop>
		<tr class="footer">
			<td class="col_left"></td>
			<td></td>
			<td class="col_right"></td>
		</tr>
	</table>
</tmpl_if>
</body>
</html>
