summaryrefslogtreecommitdiff
path: root/pages/channels_widget.ecpp
blob: e2b22da120a8ba3927a1d183257ec58799671012 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<%pre>
#include <vdr/channels.h>
#include "setup.h"
#include "tools.h"

using namespace vdrlive;

</%pre>
<%args>
name = "channel";
int lastChannel = LiveSetup().GetLastChannel();
selected;
</%args>
	
	<select name="<$ name $>">
<{
		for (cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel; listChannel = Channels.Next(listChannel)) {
			if (!listChannel->GroupSep() && *listChannel->Name()) {
				std::string channelId = *listChannel->GetChannelID().ToString();
}>
				<option value="<$ listChannel->Number() $>" 
					<$ channelId == selected ? "selected=\"selected\"" : "" $>><$ listChannel->Name() $></option>
<{
			}
		}
}>
	</select>