Files
neutrino/data/y-web/Y_Live_EPG.yhtm
Thilo Graf 4518361d3d Revert "yWeb: rework for basic functionality"
Your reaction to this commit were remarkable. You demanded with an
imperious kind to revert this commit. You spoke about any rules only,
and I didn't hear evidencing explanations from you.
Admittedly, my commit wasn't very pretty and not the best style because
everything was squashed in a single commit with some customizations,
but which is ultimately just a formality... that's about it, and was quite
compliant with license conditions. In additional, your name was noted on
the commit. I'm just reminding you, until a few years ago, you didn't care
about licenses. The general copyright mainly lies with yjogol and a lot of
changes of the origin yweb code has been coming in by several committers
since yweb exists. I won't judge, whether any unique selling points play a
role, but such restrictions are exactly what the license should prevent.
Especially as, many creeped in brandings in some code parts (not only yweb)
do suggest that. Besides neutralizing such things, mainly it was the
purpose to get more compatibility, even though some functionalities
were removed or switched off.

Related to yweb I have decided to take back this commit for the sake of
peace, and I hope you are happy with it. However, I still reserve to
continue using and adopting yweb.
2023-01-05 16:05:18 +01:00

130 lines
3.9 KiB
Plaintext

{=include-block:Y_Blocks.txt;head=}
<script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript">
//<![CDATA[
/*sLog*/
var sLog_body;
var sLog_line_number;
var epg_data;
var epg_data_index=0;
function sLog_init()
{
sLog_line_number = 0;
sLog_body=document.getElementById("slog_list");
}
function sLog_clear()
{
while(sLog_body.childNodes.length > 0){
aChild=sLog_body.firstChild;
sLog_body.removeChild(aChild);
}
sLog_line_number = 0;
}
function sLog_addRow(_body, _date, _rec, _zap, _start, _end, _title)
{
sLog_line_number++;
var mycurrent_row = y_add_row_to_table(_body, ((sLog_line_number % 2) ==0)?"a":"b" );
y_add_html_cell_to_row(mycurrent_row, "rec", _rec);
y_add_html_cell_to_row(mycurrent_row, "zap", _zap);
y_add_html_cell_to_row(mycurrent_row, "date", _date);
y_add_html_cell_to_row(mycurrent_row, "starttime", _start);
y_add_html_cell_to_row(mycurrent_row, "endtime", _end);
y_add_html_cell_to_row(mycurrent_row, "epgtitle", _title);
}
function set_timer_rec(_channel_id, _start, _stop)
{
var res = stb_set_timer_rec(_channel_id, _start, _stop);
alert("{=L:epg.set_timer_rec=}");
}
function set_timer_zap(_channel_id, _start)
{
var res = stb_set_timer_zap(_channel_id, _start);
alert("{=L:epg.set_timer_zap=}");
}
function show_info(_index)
{
parent.epg_info.show_info(epg_data[_index][0], epg_data[_index][1], epg_data[_index][2]);
}
function check_logo()
{
{=if-empty:{=logoid=}~~
show_obj("logo",true);
=}
}
function show_epg() {
show_waitbox(true);
window.setTimeout("_show_epg()",100);
}
function _show_epg()
{
check_logo();
sLog_init();
sLog_clear();
epg_data = new Array();
epg_data_index=0;
var weekday = new Array(7);
weekday[0]= "{=L:date.su=}";
weekday[1] = "{=L:date.mo=}";
weekday[2] = "{=L:date.tu=}";
weekday[3] = "{=L:date.we=}";
weekday[4] = "{=L:date.th=}";
weekday[5] = "{=L:date.fr=}";
weekday[6] = "{=L:date.sa=}";
var now = new Date();
var __d = new Date();
var _starttime = Math.round(now/1000);
var epg_xml = loadSyncURLxml("/control/epg?xml=true&channelid={=channel=}&details=true");
if(epg_xml){
var prog_list = epg_xml.getElementsByTagName('prog');
for(i=0;i<prog_list.length;i++){
var prog = prog_list[i];
var _stop = getXMLNodeItemValue(prog, "stop_sec");
if(_stop > _starttime){
var _start_t = getXMLNodeItemValue(prog, "start_t");
var _date = getXMLNodeItemValue(prog, "date");
var _start = getXMLNodeItemValue(prog, "start_sec");
var _stop_t = getXMLNodeItemValue(prog, "stop_t");
var _desc = epg_de_qout(getXMLNodeItemValue(prog, "description"));
var _info1 = epg_de_qout(getXMLNodeItemValue(prog, "info1"));
var _info2 = epg_de_qout(getXMLNodeItemValue(prog, "info2"));
__d.setTime(_start*1000);
var _dow = weekday[__d.getDay()];
_date = _dow + ", " + _date;
var epg_obj= new Array(_desc, _info1, _info2, _start, _start_t, _stop.toString(), "{=channel=}");
epg_data.push(epg_obj);
var _rec = "<a title=\"record\" href=\"javascript:set_timer_rec('{=channel=}',"+_start+","+_stop+");\"><img src=\"images/record.png\"/></a>";
var _zap = "<a title=\"zapping\" href=\"javascript:set_timer_zap('{=channel=}',"+_start+");\"><img src=\"images/zap.png\"/></a>";
var _title = "<span onmouseover=\"show_info('"+epg_data_index+"')\">"+_desc+"</span>";
sLog_addRow(sLog_body, _date, _rec, _zap, _start_t, _stop_t, _title);
epg_data_index++;
}
}
}
show_waitbox(false);
}
//]]>
</script>
</head>
<body onload="show_epg()" class="iframe">
{=var-set:wait_text={=L:epg.get_epg=}=}{=include-block:Y_Blocks.txt;snip_show_wait=}
<table id="epglist" class="y_invisible_table" cellpadding="4" cellspacing="0" width="100%">
<thead align="left">
<tr>
<th colspan="2"><img id="logo" src="{=func:get_logo_name {=channel=}=}" style="visibility:hidden; max-width: 50px;"/></th>
<th>{=L:date=}</th><th>{=L:from=}</th><th>{=L:to=}</th><th>{=L:program=}</th>
</tr>
</thead>
<tbody id="slog_list">
</tbody>
</table>
<br />
</body>
</html>