<tmpl_include name="inc.head.tmpl">
<body>
<tmpl_include name="inc.titleBar.tmpl">
<tmpl_if name="pageop" value="default">
	<div>
		<tmpl_if name="is_streaming" value="1">
			<div id="attention">
				Attention !
			</div>
			<div id="current_stream">
				<tmpl_if name="current_stream">
					<em><tmpl_var name="current_stream"></em> is running.
				<tmpl_else>
					Stream is running.
				</tmpl_if>
				<br />
				Be careful and do not disrupt anyone.
			</div>
			<div id="stream_control">
				<form method="POST" action="index.php?iid=vlc" name="vlc_form_stop">
					<input type="submit" value="Stop Stream" name="OK">
					<input type="hidden" name="pageop" value="stop">
				</form>
			</div>
			<div id="links">
				<a class="watch_link" href="mms://<tmpl_var name="addr">:<tmpl_var name="port">">Click here to watch current stream - Windows Media Player</a>
				<br />
				<a class="watch_link" href="mmsh://<tmpl_var name="addr">:<tmpl_var name="port">">Click here to watch current stream - VLC</a>
			</div>
		<tmpl_else>
			<form method="POST" action="index.php?iid=vlc" name="vlc_form_start">
				<div id="file_title">Stream <em><tmpl_var name="file"></em> using following settings:</div>
				<div id="video_settings">
					<label for="vidc">Video Codec</label>
					<select id="vidc" name="vidc">
						<tmpl_loop name="list_vidc">
							<option value="<tmpl_var name="name">"><tmpl_var name="name"></option>
						</tmpl_loop>
					</select>
					<label for="vbit">Video Bitrate (kB/s)</label>
					<select id="vbit" name="vbit">
						<tmpl_loop name="list_vbit">
							<option value="<tmpl_var name="name">"><tmpl_var name="name"></option>
						</tmpl_loop>
					</select>
				</div>
				<div id="audio_settings">
					<label for="audc">Audio Codec</label>
					<select id="audc" name="audc">
						<tmpl_loop name="list_audc">
							<option value="<tmpl_var name="name">"><tmpl_var name="name"></option>
						</tmpl_loop>
					</select>
					<label for="abit">Audio Bitrate (kB/s)</label>
					<select id="abit" name="abit">
						<tmpl_loop name="list_abit">
							<option value="<tmpl_var name="name">"><tmpl_var name="name"></option>
						</tmpl_loop>
					</select>
				</div>
				<div id="stream_control">
					<input type="submit" value="Start Stream" name="OK">
					<input type="hidden" name="target" value="<tmpl_var name="target">">
					<input type="hidden" name="file" value="<tmpl_var name="file">">
					<input type="hidden" name="pageop" value="start">
				</div>
			</form>
		</tmpl_if>
		<div id="please_stop">
			Please Click "Stop Stream" after you have finished.
			<br>
			Remember that the current stream must be stopped before a new one can be opened.
		</div>
	</div>
<tmpl_elseif name="pageop" value="start">
	<div id="stream_started">
		Stream started.
	</div>
	<table id="info">
		<tr>
			<td class="infos">Stream :</td>
			<td class="infos"><tmpl_var name="addr">:<tmpl_var name="port"></td>
		</tr>
		<tr>
			<td class="infos">File :</td>
			<td class="infos"><tmpl_var name="file"></td>
		</tr>
		<tr>
			<td class="infos">Video Codec :</td>
			<td class="infos"><tmpl_var name="vidc"></td>
		</tr>
		<tr>
			<td class="infos">Video Bitrate :</td>
			<td class="infos"><tmpl_var name="vbit"> kB/s</td>
		</tr>
		<tr>
			<td class="infos">Audio Codec :</td>
			<td class="infos"><tmpl_var name="audc"></td>
		</tr>
		<tr>
			<td class="infos">Audio Bitrate :</td>
			<td class="infos"><tmpl_var name="abit"> kB/s</td>
		</tr>
	</table>
	<div id="stream_control">
		<form method="POST" action="index.php?iid=vlc" name="vlc_form_stop">
			<input type="submit" value="Stop Stream" name="OK">
			<input type="hidden" name="pageop" value="stop">
		</form>
	</div>
	<div id="links">
		<a class="watch_link" href="mms://<tmpl_var name="addr">:<tmpl_var name="port">">Click here to watch current stream - Windows Media Player</a>
		<br />
		<a class="watch_link" href="mmsh://<tmpl_var name="addr">:<tmpl_var name="port">">Click here to watch current stream - VLC</a>
	</div>
<tmpl_elseif name="pageop" value="stop">
	<div id="attention">
		Stream stopped.
	</div>
</tmpl_if>
<div id="close">
	[<a id="closeLink" href="#" onclick="window.opener.location.reload();window.close();">Close Window</a>]
</div>
</body>
</html>