<% --[[ Info 智能插件首页 Author peng.kang Copyright 2016 ]]-- local ver = require "luci.version" local i18n = require "luci.i18n" local io = require "io" local hosts_path = "/etc/hosts.d/custumdns_host2" local act_submit = tostring(luci.http.formvalue("act_submit")) if act_submit == "1" then local hosts_text = tostring(luci.http.formvalue("hosts")) local file = io.open(hosts_path, "w") file:write(hosts_text) file:close() luci.sys.call("/etc/init.d/dnsmasq restart") end local file = io.open(hosts_path, "rb") if file then file:close() end hosts = "" if file ~= nil then local t = {} for line in io.lines(hosts_path) do table.insert(t, line) end hosts = table.concat(t, "\n") .. "\n" end %> <% include('admin_web/header') %>
<% include('admin_web/menu/menu_left') %>
<%=i18n.translate("web_plugin_title")%>
<%=i18n.translate('web_go_back')%> Hosts设置

请小心设置

<%=i18n.translate("web_hiwifi_local_plugin")%>
  • <%=i18n.translate("web_click_add")%>

<% include('admin_web/footer') %>