<%# LuCI - Lua Configuration Interface Copyright 2010 openwrtcn Copyright 2011 flyzjhz Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id: guide.htm 4520 2010-04-07 23:46:56Z openwrt.org.cn $ -%> <% local is6358 = luci.util.exec("cat /proc/cpuinfo|grep -c 96358VW2") or 0 local is6358 = tonumber(is6358) %> <% function default_sel(value) local sel=nil; if ( value == model ) then sel = "\"selected\"" end return sel end function default_sel1(value) local sel=nil; if ( value == model ) then sel = "selected=" end return sel end %> <%+header%>

<%:Quick Guide%>


<% if step == 0 then %> <%:Quick guide%>
<%:Quick guide Fast configuration route %>

<% if is6358 >= 1 then %>
<% end -%>


<% elseif step == 1 then %> <% local uci = luci.model.uci.cursor() local proto,ifname,ipaddr,netmask,macaddr,gateway,dns,macaddr uci:load("network") proto=uci:get("network", "wan", "proto") ifname=uci:get("network", "wan", "ifname") ipaddr=uci:get("network", "wan", "ipaddr") netmask=uci:get("network", "wan", "netmask") macaddr=uci:get("network", "wan", "macaddr") gateway=uci:get("network", "wan", "gateway") dns=uci:get("network", "wan", "dns") macaddr=uci:get("network", "wan", "macaddr") function default_sel(value) local sel=nil; if ( value == proto ) then sel = "\"selected\"" end return sel end function default_sel1(value) local sel=nil; if ( value == proto ) then sel = "selected=" end return sel end %> <%:WAN Configuration%>

<%:If you don t know, just to contact your ISP%>

<%:If you don t know, just to contact your ISP%>

<%:Just leave blank and use the default mac generally%>


<% elseif step == 2 then %> <% local uci2 = luci.model.uci.cursor() local lan_ipaddr,netmask,macaddr local channel,ssid,encryption,key uci2:load("wireless") local wireless = luci.model.uci.cursor_state():get_all("wireless") local ifaces = {} for k, v in pairs(wireless) do if v[".type"] == "wifi-iface" then ssid=uci2:get("wireless",v[".name"], "ssid") encryption=uci2:get("wireless",v[".name"], "encryption") key=uci2:get("wireless",v[".name"], "key") table.insert(ifaces, v) else channel=uci2:get("wireless",v[".name"], "channel") end -- luci.sys.call("echo key="..key.." >/dev/ttyS1") end %> <%:Wireless Configuration%>
" >
" >

<%:Password must be more than 8 bit,if use none encryption just leave blank!%>


<% elseif step == 3 then %>
<%:The guide is now OK. Please click button "apply" to apply or Click button "quit" to quit %>


<% elseif step == 4 then %>

<%:Everything is OK, Just enjoy it. System is now jumping to main page..... %>

<% end %>

<%+footer%>