#!/usr/bin/env python




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from controllers.defaults import USERCSSCLASSIC
from controllers.i18n import tstrings
from json import dumps

##################################################
## MODULE CONSTANTS
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1644596120.509602
__CHEETAH_genTimestamp__ = 'Fri Feb 11 16:15:20 2022'
__CHEETAH_src__ = '/home/nonsolosat/openpli-dreambox-oe-core/build/tmp/work/dm520-oe-linux/enigma2-plugin-extensions-openwebif/gitAUTOINC+81b15e17ab-r0/git/plugin/controllers/views/main.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Feb 11 15:59:45 2022'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'

if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
    raise AssertionError(
      'This template was compiled with Cheetah version'
      ' %s. Templates compiled before version %s must be recompiled.'%(
         __CHEETAH_version__, RequiredCheetahVersion))

##################################################
## CLASSES

class main(Template):

    ##################################################
    ## CHEETAH GENERATED METHODS


    def __init__(self, *args, **KWs):

        super(main, self).__init__(*args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
        

    def menu(self, title, name, content, **KWS):



        ## CHEETAH: generated from #def menu($title, $name, $content) at line 8, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write(u'''<div class="some-leftmenu-main">
''')
        caret = "s"
        style_val = "display: initial"
        if VFFSL(SL,"name",True) in VFFSL(SL,"collapsed",True): # generated from line 12, col 2
            caret = "w"
            style_val = "display: none"
        write(u'''\t<div class="some-leftmenu-top ui-widget-header" onclick="toggleMenu(\'''')
        _v = VFFSL(SL,"name",True) # u'$name' on line 16, col 71
        if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 16, col 71.
        write(u'''\');">
\t\t''')
        _v = VFFSL(SL,"title",True) # u'$title' on line 17, col 3
        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 17, col 3.
        write(u'''
\t\t<div id="leftmenu_expander_''')
        _v = VFFSL(SL,"name",True) # u'$name' on line 18, col 30
        if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 18, col 30.
        write(u'''" class="ui-selectmenu-icon ui-icon ui-icon-caret-1-''')
        _v = VFFSL(SL,"caret",True) # u'$caret' on line 18, col 87
        if _v is not None: write(_filter(_v, rawExpr=u'$caret')) # from line 18, col 87.
        write(u'''"></div>
\t</div>
\t<div id="leftmenu_container_''')
        _v = VFFSL(SL,"name",True) # u'$name' on line 20, col 30
        if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 20, col 30.
        write(u'''" style="''')
        _v = VFFSL(SL,"style_val",True) # u'$style_val' on line 20, col 44
        if _v is not None: write(_filter(_v, rawExpr=u'$style_val')) # from line 20, col 44.
        write(u'''">
\t''')
        _v = VFFSL(SL,"content",True) # u'$content' on line 21, col 2
        if _v is not None: write(_filter(_v, rawExpr=u'$content')) # from line 21, col 2.
        write(u'''
\t</div>
</div>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def mainMenu(self, **KWS):



        ## CHEETAH: generated from #def mainMenu at line 25, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write(u'''<ul>
\t<li><a class="lmc" href="ajax/tv">''')
        _v = VFFSL(SL,"tstrings",True)['television'] # u"$tstrings['television']" on line 27, col 36
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['television']")) # from line 27, col 36.
        write(u'''</a></li>
\t<li><a class="lmc" href="ajax/radio">''')
        _v = VFFSL(SL,"tstrings",True)['radio'] # u"$tstrings['radio']" on line 28, col 39
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['radio']")) # from line 28, col 39.
        write(u'''</a></li>
\t<li><a class="lmc spin" href="ajax/movies">''')
        _v = VFFSL(SL,"tstrings",True)['movies'] # u"$tstrings['movies']" on line 29, col 45
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['movies']")) # from line 29, col 45.
        write(u'''</a></li>
\t<li><a class="lmc" href="ajax/timers">''')
        _v = VFFSL(SL,"tstrings",True)['timers'] # u"$tstrings['timers']" on line 30, col 40
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['timers']")) # from line 30, col 40.
        write(u'''</a></li>
''')
        if VFFSL(SL,"webtv",True): # generated from line 31, col 2
            write(u'''\t<li><a class="lmc" href="ajax/webtv">''')
            _v = VFFSL(SL,"tstrings",True)['webtv'] # u"$tstrings['webtv']" on line 32, col 39
            if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['webtv']")) # from line 32, col 39.
            write(u'''</a></li>
''')
        write(u'''</ul>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def searchMenu(self, **KWS):



        ## CHEETAH: generated from #def searchMenu at line 36, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write(u'''<ul>
\t<li><input type="checkbox" name="epgsearchtype" />''')
        _v = VFFSL(SL,"tstrings",True)['epgsearchextended'] # u"$tstrings['epgsearchextended']" on line 38, col 52
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['epgsearchextended']")) # from line 38, col 52.
        write(u'''</li>
\t<li><input type="checkbox" name="epgsearchbouquetsonly" />''')
        _v = VFFSL(SL,"tstrings",True)['epgsearchbouquetsonly'] # u"$tstrings['epgsearchbouquetsonly']" on line 39, col 60
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['epgsearchbouquetsonly']")) # from line 39, col 60.
        write(u'''</li>
</ul>
<form action="" onSubmit="open_epg_search_dialog(); return false;">
\t<div style="width:100%; text-align:center; padding-top:5px;"><input type="text" id="epgSearch" size="14" /></div>
\t<div style="width:100%; text-align:center;padding-top:5px; padding-bottom:7px;" class="epgsearch"><button>''')
        _v = VFFSL(SL,"tstrings",True)['search'] # u"$tstrings['search']" on line 43, col 108
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['search']")) # from line 43, col 108.
        write(u'''</button></div>
</form>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def remoteMenu(self, **KWS):



        ## CHEETAH: generated from #def remoteMenu at line 46, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write(u'''<div style="width:100%; text-align:center;">
\t\t<ul>
\t\t<li style="margin-bottom:5px;margin-top:5px;">
\t\t<div class="tbl"><div>
\t\t<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['powercontrol'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'powercontrol\'].replace(" ","&nbsp;")' on line 51, col 38
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'powercontrol\'].replace(" ","&nbsp;")')) # from line 51, col 38.
        write(u''' onclick="load_dm(\'ajax/powerstate\',\'''')
        _v = VFFSL(SL,"tstrings",True)["powercontrol"] # u'$tstrings["powercontrol"]' on line 51, col 122
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings["powercontrol"]')) # from line 51, col 122.
        write(u'''\');this.blur();return false;"><i class="fa fa-power-off" aria-hidden="true"></i></a></div>
\t<!--<div><a class="lmc fbb" href="ajax/screenshot" title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['grabscreenshot'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'grabscreenshot\'].replace(" ","&nbsp;")' on line 52, col 59
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'grabscreenshot\'].replace(" ","&nbsp;")')) # from line 52, col 59.
        write(u'''><i class="fa fa-camera-retro" aria-hidden="true"></i></a></div> -->
\t\t<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['sendamessage'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'sendamessage\'].replace(" ","&nbsp;")' on line 53, col 38
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'sendamessage\'].replace(" ","&nbsp;")')) # from line 53, col 38.
        write(u''' onclick="load_message_dm(\'ajax/message\',\'''')
        _v = VFFSL(SL,"tstrings",True)["sendamessage"] # u'$tstrings["sendamessage"]' on line 53, col 127
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings["sendamessage"]')) # from line 53, col 127.
        write(u'''\');this.blur();return false;"><i class="fa fa-envelope-o" aria-hidden="true"></i></a></div>
''')
        if VFFSL(SL,"textinputsupport",True) == True: # generated from line 54, col 3
            write(u'''\t\t<div style="width: 30px;"><a class="fbb" href="#" title="Text" onclick="InputText();return false;" style="font-style: italic;font-size: 20px;text-align: center;text-decoration: underline;">T</a></div>
''')
        write(u'''\t\t<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['showfullremote'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'showfullremote\'].replace(" ","&nbsp;")' on line 57, col 38
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'showfullremote\'].replace(" ","&nbsp;")')) # from line 57, col 38.
        write(u''' onclick="toggleFullRemote();return false;"><i class="fa fa-expand" aria-hidden="true"></i></a></div>
\t\t</div></div>
\t\t</li>
\t\t</ul>
\t\t<div class="ui-widget-header" style="border-bottom: none;background: none;margin-left: 5px;margin-right: 5px;"></div>
''')
        if VFFSL(SL,"smallremote",True) == 'old': # generated from line 62, col 3
            write(u'''\t\t<img src="images/remotes/ow_remote.png" width="135" height="183" usemap="#menuremote" border="0">
\t\t<map name="menuremote" >
\t\t\t<area shape="circle" coords="67,148,13" alt="ok" onclick="pressMenuRemote(\'352\');">
\t\t\t<area shape="circle" coords="68,173,9" alt="down" onclick="pressMenuRemote(\'108\');">
\t\t\t<area shape="circle" coords="44,151,9" alt="left" onclick="pressMenuRemote(\'105\');">
\t\t\t<area shape="circle" coords="92,151,9" alt="right" onclick="pressMenuRemote(\'106\');">
\t\t\t<area shape="circle" coords="68,126,9" alt="up" onclick="pressMenuRemote(\'103\');">
\t\t\t<area shape="circle" coords="117,167,11" alt="blue" onclick="pressMenuRemote(\'401\');">
\t\t\t<area shape="circle" coords="117,137,11" alt="yellow" onclick="pressMenuRemote(\'400\');">
\t\t\t<area shape="circle" coords="18,167,11" alt="green" onclick="pressMenuRemote(\'399\');">
\t\t\t<area shape="circle" coords="18,137,11" alt="red" onclick="pressMenuRemote(\'398\');">
\t\t\t<area shape="rect" coords="2,88,41,111" alt="menu" onclick="pressMenuRemote(\'139\');">
\t\t\t<area shape="rect" coords="93,88,133,111" alt="exit" onclick="pressMenuRemote(\'174\');">
\t\t\t<area shape="rect" coords="46,88,87,111" alt="0" onclick="pressMenuRemote(\'11\');">
\t\t\t<area shape="rect" coords="93,60,133,84" alt="9" onclick="pressMenuRemote(\'10\');">
\t\t\t<area shape="rect" coords="46,60,87,84" alt="8" onclick="pressMenuRemote(\'9\');">
\t\t\t<area shape="rect" coords="2,60,41,84" alt="7" onclick="pressMenuRemote(\'8\');">
\t\t\t<area shape="rect" coords="93,31,133,55" alt="6" onclick="pressMenuRemote(\'7\');">
\t\t\t<area shape="rect" coords="46,31,87,55" alt="5" onclick="pressMenuRemote(\'6\');">
\t\t\t<area shape="rect" coords="2,31,41,55" alt="4" onclick="pressMenuRemote(\'5\');">
\t\t\t<area shape="rect" coords="93,0,133,25" alt="3" onclick="pressMenuRemote(\'4\');">
\t\t\t<area shape="rect" coords="46,0,89,25" alt="2" onclick="pressMenuRemote(\'3\');">
\t\t\t<area shape="rect" coords="2,0,41,25" alt="1" onclick="pressMenuRemote(\'2\');">
\t\t</map>
''')
        else: # generated from line 87, col 3
            write(u'''\t\t\t<table class="remotesmall" style="height:100px;">
\t\t\t<tr>
\t\t\t\t<td data-code="2"><button>1</button></td><td data-code="3"><button>2</button></td><td data-code="4"><button>3</button></td>
\t\t\t<tr>
\t\t\t<tr>
\t\t\t\t<td data-code="5"><button>4</button></td><td data-code="6"><button>5</button></td><td data-code="7"><button>6</button></td>
\t\t\t<tr>
\t\t\t<tr>
\t\t\t\t<td data-code="8"><button>7</button></td><td data-code="9"><button>8</button></td><td data-code="10"><button>9</button></td>
\t\t\t<tr>
\t\t\t<tr>
\t\t\t\t<td data-code="412" class="tdc bgray"><button>&lt;</button></td><td data-code="11"><button>0</button></td><td data-code="407" class="tdc bgray"><button>&gt;</button></td>
\t\t\t<tr>
\t\t\t</table>
\t\t\t<table class="remotesmall" style="height:20px;">
\t\t\t<tr>
\t\t\t\t<td data-code="398" class="tdc" style="background:red"><button></button></td>
\t\t\t\t<td data-code="399" class="tdc" style="background:green"><button></button></td>
\t\t\t\t<td data-code="400" class="tdc" style="background:#f5f501"><button></button></td>
\t\t\t\t<td data-code="401" class="tdc" style="background:#1a2cbd"><button></button></td>
\t\t\t<tr>
\t\t\t</table>
\t\t\t<table class="remotesmall" style="height:80px;">
\t\t\t<tr>
\t\t\t\t<td data-code="139"><button>Menu</button></td><td data-code="103" class="bgray"><button>&#x25B2;</button></td><td data-code="174"><button>Exit</button></td>
\t\t\t<tr>
\t\t\t<tr>
\t\t\t\t<td data-code="105" class="bgray"><button>&#x25C0;</button></td><td data-code="352" class="bgray"><button>OK</button></td><td data-code="106" class="bgray"><button>&#x25B6;</button></td>
\t\t\t<tr>
\t\t\t<tr>
\t\t\t\t<td data-code="358"><button>Info</button></td><td data-code="108" class="bgray"><button>&#x25BC;</button></td><td data-code="365"><button>EPG</button></td>
\t\t\t<tr>
\t\t\t</table>
''')
            if VFFSL(SL,"smallremote",True) == 'ims': # generated from line 121, col 4
                write(u'''\t\t\t\t<table class="remotesmall" style="height:20px;">
\t\t\t\t<tr>
\t\t\t\t\t<td data-code="167" class="tdc" style="background:#f08080"><button>Rec</button></td>
\t\t\t\t\t<td data-code="377" class="tdc bgray"><button>TV</button></td>
\t\t\t\t\t<td data-code="138" class="tdc bgray"><button>Help</button></td>
\t\t\t\t\t<td data-code="393" class="tdc bgray"><button>PVR</button></td>
\t\t\t\t<tr>
\t\t\t\t</table>
''')
            else: # generated from line 130, col 4
                write(u'''\t\t\t\t<table class="remotesmall" style="height:20px;">
\t\t\t\t<tr>
\t\t\t\t\t<td data-code="393" class="tdf"><button>PVR</button></td>
\t\t\t\t\t<td data-code="377" class="tdf"><button>TV</button></td>
\t\t\t\t\t<td data-code="388" class="tdf"><button>Text</button></td>
\t\t\t\t\t<td data-code="138" class="tdf"><button>Help</button></td>
\t\t\t\t<tr>
\t\t\t\t</table>
''')
        write(u'''\t<div class="help">
\t\t''')
        _v = VFFSL(SL,"tstrings",True)['shiftforlong'] # u"$tstrings['shiftforlong']" on line 142, col 3
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['shiftforlong']")) # from line 142, col 3.
        write(u'''
\t</div>
\t<ul>
\t\t<li style="margin-bottom:5px;margin-top:5px;">
\t\t\t<input type="checkbox" class="remotegrabscreen" name="remotegrabscreen1" /><span style="cursor:pointer;" title="''')
        _v = VFFSL(SL,"tstrings",True)['titscreenshot'] # u"$tstrings['titscreenshot']" on line 146, col 116
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['titscreenshot']")) # from line 146, col 116.
        write(u''' ''')
        _v = VFFSL(SL,"tstrings",True)['grabscreenshot'] # u"$tstrings['grabscreenshot']" on line 146, col 143
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['grabscreenshot']")) # from line 146, col 143.
        write(u'''" onclick="load_maincontent(\'ajax/screenshot\');return false;">''')
        _v = VFFSL(SL,"tstrings",True)['grabscreenshot'] # u"$tstrings['grabscreenshot']" on line 146, col 232
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['grabscreenshot']")) # from line 146, col 232.
        write(u'''</span>
\t\t</li>
\t</ul>
\t<div class="volslider" style="display:table-row;margin-bottom:15px">
\t\t<div style="display:table-cell;vertical-align: middle;"><img style="margin-left:5px;" id="volimage" src="images/volume.png" title="" border="0" width="24" height="24">
\t\t</div>
\t\t<div style="vertical-align: middle;display:table-cell;">
\t\t\t<div id="slider" style="margin-left:10px;margin-right:10px;width:90px;"></div>
\t\t</div>
\t\t<div style="vertical-align: middle;display:table-cell;">
\t\t\t<input readonly class="ui-state-active" style="border:none;font-weight:bold;width:22px;user-select: none;" type="text" id="amount"/>
\t\t</div>
\t</div>
\t<div style="margin-bottom:5px;"></div>
</div>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def extrasMenu(self, **KWS):



        ## CHEETAH: generated from #def extrasMenu at line 162, col 1.
        trans = KWS.get("trans")
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        write(u'''<ul>
\t<li><a class="lmc" href="ajax/boxinfo">''')
        _v = VFFSL(SL,"tstrings",True)["box_info"] # u'$tstrings["box_info"]' on line 164, col 41
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings["box_info"]')) # from line 164, col 41.
        write(u'''</a></li>
''')
        for extra in VFFSL(SL,"extras",True): # generated from line 165, col 2
            target_url = VFFSL(SL,"extra",True)["key"];
            if 'nw' in VFFSL(SL,"extra",True): # generated from line 167, col 3
                if VFFSL(SL,"extra",True)["nw"] == "1": # generated from line 168, col 4
                    write(u'''\t\t\t<li><a href="''')
                    _v = VFFSL(SL,"target_url",True) # u'$target_url' on line 169, col 17
                    if _v is not None: write(_filter(_v, rawExpr=u'$target_url')) # from line 169, col 17.
                    write(u'''" target=\'_blank\'>''')
                    _v = VFFSL(SL,"extra",True)["description"] # u'$extra["description"]' on line 169, col 46
                    if _v is not None: write(_filter(_v, rawExpr=u'$extra["description"]')) # from line 169, col 46.
                    write(u'''</a></li>
''')
                else: # generated from line 170, col 4
                    write(u'''\t\t\t<li><a class="lmc pop" href="''')
                    _v = VFFSL(SL,"target_url",True) # u'$target_url' on line 171, col 33
                    if _v is not None: write(_filter(_v, rawExpr=u'$target_url')) # from line 171, col 33.
                    write(u'''">''')
                    _v = VFFSL(SL,"extra",True)["description"] # u'$extra["description"]' on line 171, col 46
                    if _v is not None: write(_filter(_v, rawExpr=u'$extra["description"]')) # from line 171, col 46.
                    write(u'''</a></li>
''')
            else: # generated from line 173, col 3
                write(u'''\t\t\t<li><a class="lmc" href="''')
                _v = VFFSL(SL,"target_url",True) # u'$target_url' on line 174, col 29
                if _v is not None: write(_filter(_v, rawExpr=u'$target_url')) # from line 174, col 29.
                write(u'''">''')
                _v = VFFSL(SL,"extra",True)["description"] # u'$extra["description"]' on line 174, col 42
                if _v is not None: write(_filter(_v, rawExpr=u'$extra["description"]')) # from line 174, col 42.
                write(u'''</a></li>
''')
        write(u'''</ul>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        t = "original"
        if VFFSL(SL,"varExists",False)('theme'): # generated from line 5, col 1
            t = VFFSL(SL,"theme",True)
        write(u'''<!doctype html>
<html>
<head>
\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\t<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
\t<link rel="shortcut icon" href="images/favicon.png">
\t<link type="text/css" rel="stylesheet" href="css/jquery-ui.min.css">
''')
        if VFFSL(SL,"t",True) not in ["original", "clear"]: # generated from line 186, col 2
            theme_css = VFFSL(SL,"t",True) + '.css'
            write(u'''\t\t<link type="text/css" rel="stylesheet" href="themes/''')
            _v = VFFSL(SL,"theme_css",True) # u'$theme_css' on line 188, col 55
            if _v is not None: write(_filter(_v, rawExpr=u'$theme_css')) # from line 188, col 55.
            write(u'''">
''')
        write(u'''\t<link type="text/css" href="css/style.min.css?v2" rel="stylesheet"/>
''')
        if VFFSL(SL,"t",True) == "original": # generated from line 191, col 2
            write(u'''\t\t<link type="text/css" href="css/theme_original.css" rel="stylesheet"/>
''')
        write(u'''\t<link type="text/css" href="web/css" rel="stylesheet"/>
\t<title>''')
        _v = VFFSL(SL,"boxname",True) # u'$boxname' on line 195, col 9
        if _v is not None: write(_filter(_v, rawExpr=u'$boxname')) # from line 195, col 9.
        write(u''' - OpenWebif</title>
</head>
''')
        body_classes = [VFFSL(SL,"t",True)]
        if VFFSL(SL,"t",True) not in ["original", "original-small-screen"]: # generated from line 198, col 1
            body_classes += ["ui-widget-header"]
        if VFFSL(SL,"t",True) in ["excite-bike", "pepper-grinder"]: # generated from line 201, col 1
            body_classes += ["ui-state-hover"]
        body_css_class = ' '.join(VFFSL(SL,"body_classes",True))
        write(u'''<body class="''')
        _v = VFFSL(SL,"body_css_class",True) # u'$body_css_class' on line 205, col 14
        if _v is not None: write(_filter(_v, rawExpr=u'$body_css_class')) # from line 205, col 14.
        write(u'''">
\t<div id="container">
\t\t<div id="header">
\t\t\t<h1><a href="/">Open<span class="ui-state-active">Webif</span></a></h1>
''')
        if not VFFSL(SL,"showname",True): # generated from line 209, col 4
            boxname = VFFSL(SL,"tstrings",True)['box_info']
        write(u'''\t\t\t<h2>''')
        _v = VFFSL(SL,"tstrings",True)['openwebif_header'] # u"$tstrings['openwebif_header']" on line 212, col 8
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['openwebif_header']")) # from line 212, col 8.
        write(u'''<br/><span class="ui-state-active" onclick="load_maincontent(\'ajax/boxinfo\'); return false">''')
        _v = VFFSL(SL,"boxname",True) # u'$boxname' on line 212, col 129
        if _v is not None: write(_filter(_v, rawExpr=u'$boxname')) # from line 212, col 129.
        write(u'''</span></h2>
\t\t\t<div id="statusheader">
\t\t\t\t<div id="osd">''')
        _v = VFFSL(SL,"tstrings",True)['nothing_play'] # u"$tstrings['nothing_play']" on line 214, col 19
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['nothing_play']")) # from line 214, col 19.
        write(u'''</div>
\t\t\t\t<div id="osd_status"></div>
\t\t\t\t<div id="osd_bottom"></div>
\t\t\t</div>
\t\t</div>

\t\t<div id="leftmenu" class="ui-widget-content">
\t\t\t<div id="menucontainer">
\t\t\t\t''')
        _v = VFFSL(SL,"menu",False)(VFFSL(SL,"tstrings",True)['main'], "main", VFFSL(SL,"mainMenu",True)) # u'$menu($tstrings[\'main\'], "main", $mainMenu)' on line 222, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'$menu($tstrings[\'main\'], "main", $mainMenu)')) # from line 222, col 5.
        write(u'''
\t\t\t\t''')
        _v = VFFSL(SL,"menu",False)(VFFSL(SL,"tstrings",True)['remote'], "remote", VFFSL(SL,"remoteMenu",True)) # u'$menu($tstrings[\'remote\'], "remote", $remoteMenu)' on line 223, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'$menu($tstrings[\'remote\'], "remote", $remoteMenu)')) # from line 223, col 5.
        write(u'''
\t\t\t\t''')
        _v = VFFSL(SL,"menu",False)(VFFSL(SL,"tstrings",True)['extras'], "extras", VFFSL(SL,"extrasMenu",True)) # u'$menu($tstrings[\'extras\'], "extras", $extrasMenu)' on line 224, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'$menu($tstrings[\'extras\'], "extras", $extrasMenu)')) # from line 224, col 5.
        write(u'''
\t\t\t\t''')
        _v = VFFSL(SL,"menu",False)(VFFSL(SL,"tstrings",True)['epgsearch'], "search", VFFSL(SL,"searchMenu",True)) # u'$menu($tstrings[\'epgsearch\'], "search", $searchMenu)' on line 225, col 5
        if _v is not None: write(_filter(_v, rawExpr=u'$menu($tstrings[\'epgsearch\'], "search", $searchMenu)')) # from line 225, col 5.
        write(u'''
\t\t\t</div>

\t\t\t<div id="remotecontainer" style="display: none;">
\t\t\t\t<div class="some-leftmenu-main">
\t\t\t\t\t<div class="some-leftmenu-top ui-widget-header">''')
        _v = VFFSL(SL,"tstrings",True)['remote'] # u"$tstrings['remote']" on line 230, col 54
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['remote']")) # from line 230, col 54.
        write(u'''</div>
\t\t\t\t\t<div style="width:100%; text-align:center;">
\t\t\t\t\t\t<ul>
\t\t\t\t\t\t\t<li style="margin-bottom:5px;">
\t\t\t\t\t\t\t\t<div class="tbl"><div>
\t\t\t\t\t\t\t\t<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['powercontrol'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'powercontrol\'].replace(" ","&nbsp;")' on line 235, col 44
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'powercontrol\'].replace(" ","&nbsp;")')) # from line 235, col 44.
        write(u''' onclick="load_dm(\'ajax/powerstate\',\'''')
        _v = VFFSL(SL,"tstrings",True)["powercontrol"] # u'$tstrings["powercontrol"]' on line 235, col 128
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings["powercontrol"]')) # from line 235, col 128.
        write(u'''\');this.blur();return false;"><i class="fa fa-power-off" aria-hidden="true"></i></a></div>
\t\t\t\t\t\t\t<!--<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['grabscreenshot'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'grabscreenshot\'].replace(" ","&nbsp;")' on line 236, col 47
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'grabscreenshot\'].replace(" ","&nbsp;")')) # from line 236, col 47.
        write(u''' onclick="load_maincontent(\'ajax/screenshot\');return false;"><i class="fa fa-camera-retro" aria-hidden="true"></i></a></div> -->
\t\t\t\t\t\t\t\t<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['sendamessage'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'sendamessage\'].replace(" ","&nbsp;")' on line 237, col 44
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'sendamessage\'].replace(" ","&nbsp;")')) # from line 237, col 44.
        write(u''' onclick="load_message_dm(\'ajax/message\',\'''')
        _v = VFFSL(SL,"tstrings",True)["sendamessage"] # u'$tstrings["sendamessage"]' on line 237, col 133
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings["sendamessage"]')) # from line 237, col 133.
        write(u'''\');this.blur();return false;"><i class="fa fa-envelope-o" aria-hidden="true"></i></a></div>
\t\t\t\t\t\t\t\t<div><a class="fbb" href=\'#\' title=''')
        _v = VFN(VFFSL(SL,"tstrings",True)['hidefullremote'],"replace",False)(" ","&nbsp;") # u'$tstrings[\'hidefullremote\'].replace(" ","&nbsp;")' on line 238, col 44
        if _v is not None: write(_filter(_v, rawExpr=u'$tstrings[\'hidefullremote\'].replace(" ","&nbsp;")')) # from line 238, col 44.
        write(u''' onclick="toggleFullRemote();return false;"><i class="fa fa-compress" aria-hidden="true"></i></a></div>
\t\t\t\t\t\t\t\t</div></div>
\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t</ul>

\t\t\t\t\t\t<div id="remote_container" style="width:100%; text-align:center;"></div>
\t\t\t\t\t\t<div class="help">
\t\t\t\t\t\t\t''')
        _v = VFFSL(SL,"tstrings",True)['shiftforlong'] # u"$tstrings['shiftforlong']" on line 245, col 8
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['shiftforlong']")) # from line 245, col 8.
        write(u'''
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<ul>
\t\t\t\t\t\t\t<li style="margin-bottom:5px;">
\t\t\t\t\t\t\t<input type="checkbox" class="remotegrabscreen" name="remotegrabscreen2" /><span style="cursor:pointer;" title="Enable/Disable Screenhot on key press or ''')
        _v = VFFSL(SL,"tstrings",True)['grabscreenshot'] # u"$tstrings['grabscreenshot']" on line 249, col 161
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['grabscreenshot']")) # from line 249, col 161.
        write(u'''" onclick="load_maincontent(\'ajax/screenshot\');return false;">''')
        _v = VFFSL(SL,"tstrings",True)['grabscreenshot'] # u"$tstrings['grabscreenshot']" on line 249, col 250
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['grabscreenshot']")) # from line 249, col 250.
        write(u'''</span></li>
\t\t\t\t\t\t</ul>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>

\t\t<div id="content">
\t\t\t<div id="content_container">
\t\t\t''')
        _v = VFFSL(SL,"content",True) # u'$content' on line 258, col 4
        if _v is not None: write(_filter(_v, rawExpr=u'$content')) # from line 258, col 4.
        write(u'''
\t\t\t</div>
\t\t\t<div id="footer"><h3>&nbsp;&nbsp;<a href="https://github.com/E2OpenPlugins">E2OpenPlugins</a> | <a href="http://www.opena.tv">openATV</a> | <a href="http://www.vuplus-community.net">Black Hole</a> | <a href="http://www.droidsat.org">OpenDroid</a> | <a href="http://www.egami-image.com">EGAMI</a> | <a href="http://www.hdfreaks.cc">OpenHDF</a> | <a href="https://www.nachtfalke.biz">openNFR</a> | <a href="https://openpli.org">OpenPli</a> | <a href="http://forum.sifteam.eu">Sif</a> | <a href="http://openspa.info">OpenSpa</a> | <a href="http://www.teamblue.tech">teamBlue</a> | <a href="http://www.world-of-satellite.com">OpenViX</a> | <a class="lmc" href="ajax/about">''')
        _v = VFFSL(SL,"tstrings",True)['about'] # u"$tstrings['about']" on line 260, col 673
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['about']")) # from line 260, col 673.
        write(u'''</a></h3></div>
\t\t</div>
\t</div>
\t<form name="portForm" action="web/stream.m3u" method="GET" target="_blank">
\t\t<input type="hidden" name="ref">
\t\t<input type="hidden" name="name">
\t\t<input type="hidden" name="device">
\t\t<input type="hidden" name="fname">
\t</form>
\t<form name="portFormTs" action="web/ts.m3u" method="GET" target="_blank">
\t\t<input type="hidden" name="file">
\t\t<input type="hidden" name="device">
\t</form>
\t<div id="modaldialog"></div>
\t<div id="dialog" title="Work in progress" style="display:none">
\t\t<p>Sorry, this function is not yet implemented.</p>
\t</div>
\t<div id="editTimerForm" title="''')
        _v = VFFSL(SL,"tstrings",True)['edit_timer'] # u"$tstrings['edit_timer']" on line 277, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['edit_timer']")) # from line 277, col 33.
        write(u'''"></div>

\t<script type="text/javascript" src="js/jquery.min.js"></script>
\t<script type="text/javascript" src="js/jquery-ui.min.js"></script>
\t<script type="text/javascript" src="js/openwebif.min.js?v1.2.24"></script>
\t<script type="text/javascript" src="js/jquery-ui-timepicker-addon.min.js"></script>
\t<script type="text/javascript" src="/js/chosen.1.8.2.min.js"></script>
\t<script type="text/javascript">initJsTranslation(''')
        _v = VFFSL(SL,"dumps",False)(VFFSL(SL,"tstrings",True)) # u'$dumps($tstrings)' on line 284, col 51
        if _v is not None: write(_filter(_v, rawExpr=u'$dumps($tstrings)')) # from line 284, col 51.
        write(u''')</script>
\t<script type="text/javascript">
\t\tvar h = window.innerHeight - 210;
\t\tvar hh = h-70;
\t\tvar css = document.createElement("style");
\t\tcss.type = "text/css";
\t\tcss.innerHTML = \'#tvcontentmain { height: \'+h.toString()+\'px; } #tvcontent,#movies,#timers { height: \'+hh.toString()+\'px; }\';
\t\tdocument.body.appendChild(css);

\t\t$(document).ready(function() {
\t\t\t$("#remote_container").load("static/remotes/''')
        _v = VFFSL(SL,"remote",True) # u'${remote}' on line 294, col 49
        if _v is not None: write(_filter(_v, rawExpr=u'${remote}')) # from line 294, col 49.
        write(u'''.html");
\t\t\tdirectlink();
\t\t\t$(\'a.lmc\').on("click", function() {
\t\t\t\tvar target_url = $(this).prop("href");
\t\t\t\tif($(this).hasClass("spin")) {
\t\t\t\t\tload_maincontent_spin(target_url);
\t\t\t\t}
\t\t\t\telse if($(this).hasClass("pop")) {
\t\t\t\t\t_epg_pop(target_url);
\t\t\t\t}
\t\t\t\telse {
\t\t\t\t\tload_maincontent(target_url);
\t\t\t\t}
\t\t\t\treturn false;
\t\t\t});
\t\t});
\t\ttheme = \'''')
        _v = VFFSL(SL,"t",True) # u'$t' on line 310, col 12
        if _v is not None: write(_filter(_v, rawExpr=u'$t')) # from line 310, col 12.
        write(u'''\';
\t\tSetLSValue(\'TimerListOffset\',0);

\t\t$(document).ready(function() {
\t\t\t$("td",".remotesmall").click(function(e) {
\t\t\t\tvar d = $(this).data("code");
\t\t\t\tif (d != undefined) {
\t        \t\tpressMenuRemote(d);
\t\t\t\t}
    \t\t});
\t\t});
\t\tfunction InputText()
\t\t{
\t\t\tvar txt = prompt("''')
        _v = VFFSL(SL,"tstrings",True)['enter_text'] # u"$tstrings['enter_text']" on line 323, col 22
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['enter_text']")) # from line 323, col 22.
        write(u'''", "");
\t\t\tif (txt != null) {
\t\t\t\tvar url = "/api/remotecontrol?text=" + txt;
\t\t\t\twebapi_execute(url);
\t\t\t\tcallScreenShot();
\t\t\t}
\t\t}
\t</script>

''')
        if VFFSL(SL,"USERCSSCLASSIC",True) != '': # generated from line 332, col 1
            write(u'''<style>
''')
            _v = VFFSL(SL,"USERCSSCLASSIC",True) # u'$USERCSSCLASSIC' on line 334, col 1
            if _v is not None: write(_filter(_v, rawExpr=u'$USERCSSCLASSIC')) # from line 334, col 1.
            write(u'''
</style>
''')
        write(u'''</body>
</html>
''')
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    _mainCheetahMethod_for_main= 'respond'

## END CLASS DEFINITION

if not hasattr(main, '_initCheetahAttributes'):
    templateAPIClass = getattr(main, '_CHEETAH_templateClass', Template)
    templateAPIClass._addCheetahPlumbingCodeToClass(main)


# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/

##################################################
## if run from command line:
if __name__ == '__main__':
    from Cheetah.TemplateCmdLineIface import CmdLineIface
    CmdLineIface(templateObj=main()).run()


