{=var-set:extension={=if-file-exists:/var/tuxbox/config/extensions.txt~/var/tuxbox/config/extensions.txt~{=if-file-exists:/var/tuxbox/httpd/extensions.txt~/var/tuxbox/httpd/extensions.txt~/usr/share/tuxbox/neutrino/httpd/extensions.txt=}=}=}
{=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/yWeb.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/yWeb.conf;management_ip2=}~1~=}=}
{=include-block:Y_Blocks.txt;head=}
{=include-block:Y_Blocks.txt;js_prototype=}
<script src="/Y_Baselib.js"></script>
<script src="/Y_yWeb.js"></script>
<script>
function build_menu(){
//	ext.read_items();
	var ext_normal=ext.select_type("n");
	ext_normal.each(function(e){
		var item="<a target=\"work\" title=\""+e.get('desc')+"\" href=\""+e.get('file')+"\">"+e.get('menuitem')+"</a>";
		y_add_li_to_ul(id("ext_normal"),"ext",item);
	});

	var ext_management=ext.select_type("m");
	ext_management.each(function(e){
		var item='<a {=if-empty:{=var-get:management=}~class="restricted" title="{=L:restriced_by_management_ip=}" href="javascript:void(0);"~title="'+e.get("desc")+'" href="'+e.get("file")+'" target="work"=}>'+e.get("menuitem")+'</a>';
		y_add_li_to_ul(id("ext_management"),"ext",item);
	});
}
</script>
{=include-block:Y_Blocks.txt;head_close=}
<body onload="build_menu()">
<div class="y_menu_sec_box">
	<div class="y_menu_sec_box_head"><h2>{=L:main.extensions=}</h2></div>
	<div class="y_menu_sec_box_body">
		<div class="y_menu_sec_section">{=L:normal=}</div>
		<div class="y_menu_sec">
			<ul id="ext_normal">
			</ul>
		</div>
		<div class="y_menu_sec_section">{=L:management=}</div>
		<div class="y_menu_sec" id="ext_management2">
			<ul id="ext_management">
			</ul>
		</div>
		<div class="y_menu_sec_section">{=L:administration=}</div>
		<div class="y_menu_sec">
			<ul>
				<li>
					{=var-set:m_link_href=Y_Ext_Settings.yhtm=}
					{=var-set:m_link_text={=L:main.settings=}=}
					{=include-block:Y_Blocks.txt;management_link=}
				</li>
				<li>
					{=var-set:m_link_href=Y_Ext_Update.yhtm=}
					{=var-set:m_link_text={=L:ext.installer_updater=}=}
					{=include-block:Y_Blocks.txt;management_link=}
				</li>
				<li>
					{=var-set:m_link_href=Y_Ext_Uninstall.yhtm=}
					{=var-set:m_link_text={=L:uninstaller=}=}
					{=include-block:Y_Blocks.txt;management_link=}
				</li>
			</ul>
		</div>
	</div>
</div>

</body>
</html>
