### # # FreeWLAN Addons - http://www.freewlan.info # # This Script is based on the original La Fonera Firmware version 0.7.1r2 # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA # # http://www.gnu.org/copyleft/gpl.html # ### function textinput(name, value) { return "" } function fileinput(name, value) { return "" } function hidden(name, value) { return "" } function button(name, caption) { return ">\" />" } function sel_option(name, caption, default, sel) { if (default == name) sel = " selected=\"selected\"" else sel = "" return "" } function close_field() { if (field_open == 1) print "
 
" field_open = 0 } BEGIN { FS="|" } # trim leading whitespaces { gsub(/^[ \t]+/,"",$1) } $1 ~ /^onchange/ { onchange = $2 } ($1 != "") && ($1 !~ /^option/) && (select_open == 1) { select_open = 0 printf "" } $1 ~ /^infotext/ { close_field() print "

@TR<<" $2 ">>

" } $1 ~ /^add_form/ { print "
" } $1 ~ /^end_form/ { print "
" } # # Table issues # $1 ~/^infotable/ { close_field() print "

@TR<<" $2 ">>

" } # # $2: the summary of the table. # $1 ~ /^start_table/ { print "" print "" } $1 ~ /^start_radio_table/ { print "
" } $1 ~ /^start_border_table/ { close_field() print " " } $1 ~ /^end_table/ { close_field() print "
" print " " print " " print "
" print " " } $1 ~ /^end_border_table/ { close_field() print "
" print "
" print "
" } # # $2: The title of the table # $1 ~ /^table_caption/ { close_field() print "" $2 "" } # # Begins a new row to the table # $1 ~ /^add_row/ { close_field() print "" } $1 ~ /^end_row/ { close_field() print "" } # # Add a cell to the row: # $2: height of the row # $3: width of the row # $4: text of the row $1 ~ /^add_title_cell/ { close_field() print ""$2"" } $1 ~ /^add_normal_cell/ { close_field() #print "" $2 "" print "" $2 "" } $1 ~ /^add_label_cell/ { close_field() if ($3 != "") print "" $2 "" $3 "" else print "" $2 "" } $1 ~ /^add_checkbox_cell/ { print ""$3 if ($5 != "") print "" else print "" print "" } $1 ~ /^add_radio_cell/ { close_field() if ($3==$4) opts="checked=\"checked\" " else opts="" if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" print ""$3 print "" print "" } $1 ~ /^add_fileinput_cell/ { print" " print fileinput($2,$3) print" " } $1 ~ /^add_pass_cell/ { close_field print "" print "" $5 print "" } $1 ~ /^start_select_cell/ { print "" if ($5 != "") print "" select_id = $2 select_open = 1 select_default = $3 } $1 ~ /^end_select_cell/ { close_field() print " " } $1 ~ /^add_input_cell/ { print "" if ( $5 == "") print "" if ( $5 != "") print "" print "" } $1 ~ /^add_button_cell/ { print "" if ( $5 == "") print " " if ( $5 != "") print " " print "" } $1 ~ /^add_input_submit_button/ { print "" } $1 ~ /^add_download_button/ { print "" } $1 ~ /^start_div/ { close_field() print "
" } $1 ~ /^end_div/ { close_field() print "
" } $1 ~ /^field/ { close_field() print ""); } # to direct call a Javascript function $1 ~ /^call_js/ { print "" } # $2: webpage to load $3: services, reboot or [blank] $1 ~ /^autoloadpage/ { print" " print" " } END { close_field() }
" field_open=1 } $1 ~ /^select/ { opts = "" if (onchange != "") opts = opts " onChange=\"" onchange "()\"" print ""); print("