# $5 = string to append
# $6 = additional attributes
+BEGIN {
+ FS="|"
+ print "<input type=\"hidden\" name=\"submit\" value=\"1\" />"
+}
+
# trim leading whitespaces
{
gsub(/^[ \t]+/,"",$1)
}
$1 ~ /^start_form/ {
- print "<form method=\"POST\" action=\"" $2 "\" enctype=\"multipart/form-data\">"
- print "<input type=\"hidden\" name=\"submit\" value=\"1\" />"
- print "<table style=\"width: 90%; text-align: left;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" align=\"center\">"
- print "<tbody>"
+ if ($3 != "") field_opts=" id=\"" $3 "\""
+ else field_opts=""
+ if ($4 == "hidden") field_opts = field_opts " style=\"display: none\""
+ print "<div class=\"settings\"" field_opts ">"
+ if ($2 != "") print "<div class=\"settings-title\"><h3><strong>" $2 "</strong></h3></div>"
+ print "<div class=\"settings-content\"><table width=\"100%\" summary=\"Settings\">"
+ form_help = ""
}
$1 ~ /^field/ {
if (field_open == 1) print "</td></tr>"
if ($3 != "") field_opts=" id=\"" $3 "\""
else field_opts=""
if ($4 == "hidden") field_opts = field_opts " style=\"display: none\""
- print "<tr" field_opts "><td>" $2 "</td><td>"
+ print "<tr" field_opts "><td width=\"45%\">" $2 "</td><td width=\"55%\">"
field_open=1
}
$1 ~ /^checkbox/ {
else radio_selected=""
print "<input id=\"" $2 "_" $4 "\" type=\"radio\" name=\"" $2 "\" value=\"" $4 "\" " radio_selected $6 " />"
}
-$1 ~ /^text/ {
- print "<input id=\"" $2 "\" type=\"text\" name=\"" $2 "\" value=\"" $3 "\" />" $4
-}
-$1 ~ /^submit/ {
- print "<input type=\"submit\" name=\"" $2 "\" value=\"" $3 "\" />"
-}
+$1 ~ /^text/ { print "<input id=\"" $2 "\" type=\"text\" name=\"" $2 "\" value=\"" $3 "\" />" $4 }
+$1 ~ /^submit/ { print "<input type=\"submit\" name=\"" $2 "\" value=\"" $3 "\" />" }
+$1 ~ /^helpitem/ { form_help = form_help "<dt>" $2 ":</dt>" }
+$1 ~ /^helptext/ { form_help = form_help "<dd>" $2 "</dd>" }
+$1 ~ /^helplink/ { form_help_link = "<div class=\"more-help\"><a href=\"" $2 "\">more...</a></div>" }
+
{
print $5
}
+
$1 ~ /^end_form/ {
if (field_open == 1) print "</td></tr>"
field_open = 0
- print "</tbody>"
- print "</table>"
- print "</form>"
-}
-END {
- if(field_open == 1) print "</td></tr>"
+ print "</table></div>"
+ if (form_help != "") form_help = "<dl>" form_help "</dl>"
+ print "<div class=\"settings-help\"><blockquote><h3><strong>Short help:</strong></h3>" form_help form_help_link "</blockquote></div>"
+ form_help = ""
+ print "<div style=\"clear: both\"> </div></div>"
}
--- /dev/null
+# $1 = type
+# $2 = variable name
+# $3 = field name
+# $4 = options
+# $5 = value
+BEGIN {
+ FS="|"
+ output=""
+}
+
+{
+ valid_type = 0
+ valid = 1
+ # XXX: weird hack, but it works...
+ n = split($0, param, "|")
+ value = param[5]
+ for (i = 6; i <= n; i++) value = value FS param[i]
+ verr = ""
+}
+
+$1 == "int" {
+ valid_type = 1
+ if (value !~ /^[0-9]*$/) { valid = 0; verr = "Invalid value" }
+}
+
+# FIXME: add proper netmask validation
+($1 == "ip") || ($1 == "netmask") {
+ valid_type = 1
+ if ((value != "") && (value !~ /^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/)) valid = 0
+ else {
+ split(value, ipaddr, "\\.")
+ for (i = 1; i <= 4; i++) {
+ if ((ipaddr[i] < 0) || (ipaddr[i] > 255)) valid = 0
+ }
+ }
+ if (valid == 0) verr = "Invalid value"
+}
+
+valid_type != 1 { valid = 0 }
+
+valid == 1 {
+ n = split($4, options, " ")
+ for (i = 1; (valid == 1) && (i <= n); i++) {
+ if (options[i] == "required") {
+ if (value == "") { valid = 0; verr = "No value entered" }
+ } else if (options[i] ~ /^min=/) {
+ if ($1 == "int") {
+ min = options[i]
+ sub(/^min=/, "", min)
+ if (value < min) { valid = 0; verr = "Value too small" }
+ }
+ } else if (options[i] ~ /^max=/) {
+ if ($1 == "int") {
+ max = options[i]
+ sub(/^max=/, "", max)
+ if (value > max) { valid = 0; verr = "Value too large" }
+ }
+ }
+ }
+}
+
+valid_type == 1 {
+ if (valid == 1) output = output $2 "=\"" value "\";\n"
+ else error = error "Error in " $3 ": " verr "<br />"
+}
+
+END {
+ print output "ERROR=\"" error "\";\n"
+}
libdir=/usr/lib/webif
wwwdir=/www
cgidir=/www/cgi-bin/webif
+rootdir=/cgi-bin/webif
indexpage=index.sh
header() {
- UPTIME=$(uptime)
- UPTIME="up ${UPTIME##*up}"
+ UPTIME="$(uptime)"
+ LOADAVG="${UPTIME#*load average: }"
+ UPTIME="${UPTIME#*up }"
+ UPTIME="${UPTIME%%,*}"
HOSTNAME=$(cat /proc/sys/kernel/hostname)
- CHANGES=$(($(cat /tmp/.webif/config-* 2>&- | wc -l)))
- CHANGES=${CHANGES#0}
- CHANGES=${CHANGES:+( ${CHANGES} )}
+ VERSION=$(cat /etc/banner | grep "(")
+ VERSION="${VERSION%% ---*}"
cat <<EOF
Content-Type: text/html
Pragma: no-cache
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
- <head>
- <meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-15" />
- <link rel="stylesheet" type="text/css" href="/webif.css" media="screen, tv, projection" title="Default" />
- <title>OpenWrt Administrative Console</title>
- </head>
- <body $4>
- <div id="container">
- <div id="header">
- <div class="topHeader"> </div>
- <div class="midHeader">
- <h1 class="headerTitle">OpenWrt Admin Console</h1>
- <div class="headerSubTitle">$UPTIME</div>
- <br class="doNotDisplay doNotPrint" />
- <div class="headerInfo">
- <span>Hostname: </span>
- $HOSTNAME
- </div>
- <div class="headerLinks">
- <a href="config.sh?mode=save&cat=$1">Apply settings «</a>
- <a href="config.sh?mode=clear&cat=$1">Clear changes «</a>
- <a href="config.sh?mode=review&cat=$1">Review changes $CHANGES «</a>
- </div>
- </div>
- <div class="doNotDisplay doNotPrint">
- <br />
- <br />
- <br />
- </div>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <head>
+ <title>OpenWrt Administrative Console</title>
+ <link rel="stylesheet" type="text/css" href="/webif.css" />
+ </head>
+ <body $4><div id="container">
+ <div id="header">
+ <div id="header-title">
+ <div id="openwrt-title"><h1>OpenWrt Admin Console</h1></div>
+ <div id="short-status">
+ <h3><strong>Status:</strong></h3>
+ <ul>
+ <li><strong>Hostname:</strong> $HOSTNAME</li>
+ <li><strong>Uptime:</strong> $UPTIME</li>
+ <li><strong>Load:</strong> $LOADAVG</li>
+ <li><strong>Version:</strong> $VERSION</li>
+ </ul>
+ </div>
+ </div>
EOF
grep '##WEBIF:category' $cgidir/.categories $cgidir/*.sh 2>/dev/null | awk -F: '
BEGIN {
- print "<div class=\"categoryHeader\"><span>Categories: </span>"
+ print "<div id=\"mainmenu\"><h3><strong>Categories:</strong></h3><ul>"
}
categories !~ /:$4:/ {
categories = categories ":" $4 ":";
- if ($4 ~ /^'"$1"'$/) print "<a class=\"active\">»" $4 "«</a> "
- else print "<a href=\"'"$indexpage"'?cat=" $4 "\"> " $4 " </a> ";
+ if ($4 ~ /^'"$1"'$/) print "<li class=\"selected-maincat\"><a href=\"'"$rootdir/$indexpage"'?cat=" $4 "\">»" $4 "«</a></li>"
+ else print "<li><a href=\"'"$rootdir/$indexpage"'?cat=" $4 "\"> " $4 " </a></li>";
}
END {
- print "</div>"
+ print "</ul></div>"
}' -
[ \! -z "$2" ] && {
- grep "##WEBIF:name:$1:" *.sh 2>/dev/null | sed -e 's,^\([a-zA-Z\.\-]*\):\(.*\)$,\2:\1,' | sort -n | awk -F: '
+ grep -H "##WEBIF:name:$1:" $cgidir/*.sh 2>/dev/null | sed -e 's,^.*/\([a-zA-Z\.\-]*\):\(.*\)$,\2:\1,' | sort -n | awk -F: '
BEGIN {
- print "<div class=\"subHeader\"><span class=\"doNotDisplay doNotPrint\">Config pages: </span>";
+ print "<div id=\"submenu\"><h3><strong>Sub-Categories:</strong></h3><ul>"
}
{
- if ($5 ~ /^'"$2"'$/) print "<a class=\"active\">»" $5 "«</a> "
- else print "<a href=\"" $6 "\">" $5 "</a> ";
+ if ($5 ~ /^'"$2"'$/) print "<li class=\"selected-maincat\"><a href=\"'"$rootdir/"'" $6 "\">»" $5 "«</a></li>"
+ else print "<li><a href=\"'"$rootdir/"'" $6 "\"> " $5 " </a></li>"
}
END {
- print "</div>";
+ print "</ul></div>"
}
' -
}
- [ -z "$3" ] && HEAD="" || HEAD="<h1>$3</h1><br />"
+ SAVED=${SAVED:+: Settings saved}
+ SAVED_TITLE=${ERROR:+: Settings not saved}
+ SAVED_TITLE=${SAVED_TITLE:-$SAVED}
+ ERROR=${ERROR:+<h3>$ERROR</h3><br /><br />}
+ HEAD="${3:+<div class=\"settings-block-title\"><h2>$3$SAVED_TITLE</h2></div>}"
+ FORM="${5:+<form enctype=\"multipart/form-data\" action=\"$5\" method=\"post\">}"
+ SAVEBUTTON="${5:+<p><input type=\"submit\" name=\"action\" value=\"Save changes\" /></p>}"
cat <<EOF
- </div>
- <div id="main-copy">
- <div class="rowOfBoxes">
- <div class="noBorderOnLeft">
- $HEAD
+ </div>
+ $FORM
+ <div id="content">
+ <div class="settings-block">
+ $HEAD
+ $ERROR
EOF
[ -z "$REMOTE_USER" \
- -a "${SCRIPT_NAME#/cgi-bin/webif/}" != "info.sh"\
- -a "${SCRIPT_NAME#/cgi-bin/webif/}" != "about.sh" ] && {
+ -a "${SCRIPT_NAME#/cgi-bin/}" != "webif.sh" ] && {
[ -z $FORM_passwd1 ] || {
echo '<pre>'
(
}
footer() {
+ CHANGES=$(($(cat /tmp/.webif/config-* 2>&- | wc -l)))
+ CHANGES=${CHANGES#0}
+ CHANGES=${CHANGES:+(${CHANGES})}
cat <<EOF
- <br />
- </div> </div> </div>
- <div id="footer">
-OpenWrt Administrative Console
- </div>
- </div>
- </body>
+ </div>
+ <hr width="40%" />
+ </div>
+ <br />
+ <div id="save">
+ <div class="page-save">
+ <div>
+ $SAVEBUTTON
+ </div>
+ </div>
+ <div class="apply">
+ <div>
+ <a href="config.sh?mode=save&cat=Network">Apply changes «</a><br />
+ <a href="config.sh?mode=clear&cat=Network">Clear changes «</a><br />
+ <a href="config.sh?mode=review&cat=Network">Review changes $CHANGES «</a>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div></body>
</html>
EOF
}
apply_passwd() {
case ${SERVER_SOFTWARE%% *} in
busybox)
- echo -n '/:' > /etc/httpd.conf
+ echo -n '/cgi-bin/webif:' > /etc/httpd.conf
cat /etc/passwd | grep root | cut -d: -f1,2 >> /etc/httpd.conf
- echo '/cgi-bin/webif/info.sh:*' >> /etc/httpd.conf
- echo '/cgi-bin/webif/about.sh:*' >> /etc/httpd.conf
killall -HUP httpd
;;
esac
}
display_form() {
- echo "$1" | awk -F: -f /usr/lib/webif/form.awk
+ echo "$1" | awk -F'|' -f /usr/lib/webif/form.awk
}
mkdir -p /tmp/.webif
[ -f /tmp/.webif/config-$1 ] && . /tmp/.webif/config-$1
}
-validate_ip() {
- [ \! -z "$1" ] && {
- ipcalc "$1" >&- 2>&- && return 0 || {
- ERROR="$ERROR Invalid IP address: $2<br />"
- return 255
- }
- } || {
- [ "$3" != "1" ] && return 0 || {
- ERROR="$ERROR No IP address entered: $2<br />"
- return 255
- }
- }
-}
-
-validate_ips() {
- [ \! -z "$1" ] && {
- invalid_ip=0
- for tmp_ip in $1; do
- ipcalc "$1" >&- 2>&- || invalid_ip=1
- done
- [ "$invalid_ip" != 1 ] && return 0 || {
- ERROR="$ERROR Invalid IP address list: $2<br />"
- return 255
- }
- } || {
- [ "$3" != "1" ] && return 0 || {
- ERROR="$ERROR No IP address entered: $2<br />"
- return 255
- }
- }
-}
-
-validate_netmask() {
- [ \! -z "$1" ] && {
- # FIXME
- ipcalc "$1" >&- 2>&- && return 0 || {
- ERROR="$ERROR Invalid Netmask: $2<br />"
- return 255
- }
- } || {
- [ "$3" != "1" ] && return 0 || {
- ERROR="$ERROR No Netmask entered: $2<br />"
- return 255
- }
- }
+validate() {
+ eval "$(echo "$1" | awk -f /usr/lib/webif/validate.awk)"
+ [ -z "$ERROR" ] && return 0 || return 255
}
save_setting() {
oldval=$(eval "echo \${$2}")
oldval=${oldval:-$(nvram get "$2")}
+ mv /tmp/.webif/config-$1 /tmp/.webif/config-$1-old 2>&- >&-
+ grep -v "^$2=" /tmp/.webif/config-$1-old > /tmp/.webif/config-$1 2>&-
[ "$oldval" != "$3" ] && echo "$2=\"$3\"" >> /tmp/.webif/config-$1
+ rm -f /tmp/.webif/config-$1-old
}
--- /dev/null
+#!/bin/sh
+exec ./webif/info.sh
?>
<h3>webif - OpenWrt Administrative Console</h3>
-
+<br />
This program is free software; you can redistribute it and/or <br />
modify it under the terms of the GNU General Public License <br />
as published by the Free Software Foundation; either version 2 <br />
Copyright © 2005 Felix Fietkau <<a href="mailto:openwrt@nbd.name">openwrt@nbd.name</a>><br />
<br />
Contributions by:
-<ul>
- <li>Philipp Kewisch <<a href="mailto:openwrt@kewis.ch">openwrt@kewis.ch</a>></li>
+<ul class="about">
+ <li class="about">Philipp Kewisch <<a href="mailto:openwrt@kewis.ch">openwrt@kewis.ch</a>></li>
+ <li class="about">Spectra <<a href="mailto:spectra@gmx.ch">spectra@gmx.ch</a>></li>
+ <li class="about">Layout based on <a href="http://www.oswd.org/design/1773/prosimii/">"Prosimii"</a> by haran</li>
</ul>
-XHTML/CSS based on <a href="http://www.oswd.org/design/1773/prosimii/">"Prosimii"</a> by haran
<? footer ?>
<!--
<? (
cd /tmp/.webif
for configname in config-*; do
- echo -n "<h3>${configname#config-}</h3><pre>"
- cat $configname
- echo '</pre>'
+ grep = $configname >&- 2>&- && {
+ echo -n "<h3>${configname#config-}</h3><pre>"
+ cat $configname
+ echo '</pre>'
+ }
done
) ?>
<?fi?>
FORM_lan_dns=${lan_dns:-$(nvram get lan_dns)}
} || {
SAVED=1
- validate_ip "$FORM_lan_ipaddr" "LAN IP" 1 && save_setting network lan_ipaddr $FORM_lan_ipaddr
- validate_ip "$FORM_lan_netmask" "LAN Netmask" 1 && save_setting network lan_netmask $FORM_lan_netmask
- validate_ip "$FORM_lan_gateway" "LAN Gateway" && save_setting network lan_gateway $FORM_lan_gateway
- validate_ips "$FORM_lan_dns" "LAN DNS Servers" && save_setting network lan_dns $FORM_lan_dns
+ validate "
+ip|FORM_lan_ipaddr|LAN IP|required|$FORM_lan_ipaddr
+netmask|FORM_lan_netmask|LAN network mask|required|$FORM_lan_netmask
+ip|FORM_lan_gateway|LAN gateway||$FORM_lan_gateway" && {
+ save_setting network lan_ipaddr $FORM_lan_ipaddr
+ save_setting network lan_netmask $FORM_lan_netmask
+ save_setting network lan_gateway $FORM_lan_gateway
+ save_setting network lan_dns $FORM_lan_dns
+ }
}
-header "Network" "LAN" "LAN settings"
-?>
-<?if [ "$SAVED" = "1" ] ?>
- <? [ -z "$ERROR" ] || echo "<h2>Errors occured:</h2><h3>$ERROR</h3>" ?>
- <h2>Settings saved</h2>
- <br />
-<?fi?>
-<? display_form "start_form:$SCRIPT_NAME
-field:IP Address
-text:lan_ipaddr:$FORM_lan_ipaddr
-field:Netmask
-text:lan_netmask:$FORM_lan_netmask
-field:Default Gateway
-text:lan_gateway:$FORM_lan_gateway
-field:DNS Server
-text:lan_dns:$FORM_lan_dns
-field
-submit:action:Save settings
-end_form" ?>
-<? footer ?>
+header "Network" "LAN" "LAN settings" '' "$SCRIPT_NAME"
+
+display_form "start_form|LAN Configuration
+field|IP Address
+text|lan_ipaddr|$FORM_lan_ipaddr
+field|Netmask
+text|lan_netmask|$FORM_lan_netmask
+field|Default Gateway
+text|lan_gateway|$FORM_lan_gateway
+field|DNS Server
+text|lan_dns|$FORM_lan_dns
+end_form"
+
+footer ?>
<!--
##WEBIF:name:Network:1:LAN
-->
[ -z $FORM_boot_wait ] || save_setting nvram boot_wait $FORM_boot_wait
}
}
-header "System" "Settings" "System settings"
-?>
-<?if [ "$SAVED" = "1" ] ?>
- <h2>Settings saved</h2>
-<?el?>
-<?
-grep BCM947 /proc/cpuinfo 2>&- >&- && bootwait_form="field:boot_wait
-radio:boot_wait:$FORM_boot_wait:on:On<br />
-radio:boot_wait:$FORM_boot_wait:off:Off"
+header "System" "Settings" "System settings" '' "$SCRIPT_NAME"
+
+grep BCM947 /proc/cpuinfo 2>&- >&- && bootwait_form="field|boot_wait
+radio|boot_wait|$FORM_boot_wait|on|On<br />
+radio|boot_wait|$FORM_boot_wait|off|Off"
-display_form "start_form:$SCRIPT_NAME
-field:Hostname
-text:hostname:$FORM_hostname
+display_form "start_form|System settings
+field|Hostname
+text|hostname|$FORM_hostname
$bootwait_form
field
-submit:action:Save settings
end_form"
?>
-<?fi?>
<? footer ?>
<!--
# detect pptp package and compile option
[ -x /sbin/ifup.pptp ] && {
- PPTP_OPTION="radio:wan_proto:$FORM_wan_proto:pptp:PPTP<br />:onChange=\"modechange()\""
- PPTP_SERVER_OPTION="field:PPTP Server IP:pptp_server_ip:hidden
-text:pptp_server_ip:$FORM_pptp_server_ip"
+ PPTP_OPTION="radio|wan_proto|$FORM_wan_proto|pptp|PPTP<br />|onChange=\"modechange()\""
+ PPTP_SERVER_OPTION="field|PPTP Server IP|pptp_server_ip|hidden
+text|pptp_server_ip|$FORM_pptp_server_ip"
}
[ -x /sbin/ifup.pppoe ] && {
- PPPOE_OPTION="radio:wan_proto:$FORM_wan_proto:pppoe:PPPoE<br />:onChange=\"modechange()\""
+ PPPOE_OPTION="radio|wan_proto|$FORM_wan_proto|pppoe|PPPoE<br />|onChange=\"modechange()\""
}
# pptp, dhcp and static common
return -1
}
- save_setting network wan_proto $FORM_wan_proto
-
- # Settings specific to one protocol type
case "$FORM_wan_proto" in
static)
- validate_ip "$FORM_wan_dns" "WAN DNS Server" 1 && \
- save_setting network wan_dns $FORM_wan_dns
-
- validate_ip "$FORM_wan_gateway" "WAN Gateway" && \
- save_setting network wan_gateway $FORM_wan_gateway
-
- # Requirements for input validation
- REQ_IP=1
- REQ_NETMASK=1
+ V_IP="required"
+ V_NM="required"
;;
pptp)
- validate_ip "$FORM_pptp_server_ip" "PPTP Server" 1 && \
- save_setting network pptp_server_ip "$FORM_pptp_server_ip"
+ V_PPTP="required"
;;
esac
-
- # Common settings for PPTP, Static and DHCP
- [ "$FORM_wan_proto" = "pptp" -o "$FORM_wan_proto" = "static" -o "$FORM_wan_proto" = "dhcp" ] && {
- validate_ip "$FORM_wan_ipaddr" "WAN IP" $REQ_IP && \
- save_setting network wan_ipaddr $FORM_wan_ipaddr
-
- validate_netmask "$FORM_wan_netmask" "WAN Netmask" $REQ_NETMASK && \
- save_setting network wan_netmask $FORM_wan_netmask
- }
-
- # Common PPP settings
- [ "$FORM_wan_proto" = "pppoe" -o "$FORM_wan_proto" = "pptp" ] && {
- [ -z $FORM_ppp_username ] || save_setting network ppp_username $FORM_ppp_username
- [ -z $FORM_ppp_passwd ] || save_setting network ppp_passwd $FORM_ppp_passwd
-
- # These can be blank
- save_setting network ppp_idletime $FORM_ppp_idletime
- save_setting network ppp_redialperiod $FORM_ppp_redialperiod
- save_setting network ppp_mtu $FORM_ppp_mtu
- case "$FORM_ppp_redial" in
- demand)
- save_setting network ppp_demand 1
+ # FIXME: add validation for DNS server list
+ validate "
+ip|FORM_wan_ipaddr|IP address|$V_IP|$FORM_wan_ipaddr
+netmask|FORM_wan_netmask|network mask|$V_NM|$FORM_wan_netmask
+ip|FORM_wan_gateway|gateway address||$FORM_wan_gateway
+ip|FORM_pptp_server_ip|PPTP server IP|$V_PPTP|$FORM_pptp_server_ip" && {
+ save_setting network wan_proto $FORM_wan_proto
+
+ # Settings specific to one protocol type
+ case "$FORM_wan_proto" in
+ static)
+ save_setting network wan_dns $FORM_wan_dns
+ save_setting network wan_gateway $FORM_wan_gateway
;;
- persist)
- save_setting network ppp_demand ""
+ pptp)
+ save_setting network pptp_server_ip "$FORM_pptp_server_ip"
;;
- esac
+ esac
+
+ # Common settings for PPTP, Static and DHCP
+ [ "$FORM_wan_proto" = "pptp" -o "$FORM_wan_proto" = "static" -o "$FORM_wan_proto" = "dhcp" ] && {
+ save_setting network wan_ipaddr $FORM_wan_ipaddr
+ save_setting network wan_netmask $FORM_wan_netmask
+ }
+
+ # Common PPP settings
+ [ "$FORM_wan_proto" = "pppoe" -o "$FORM_wan_proto" = "pptp" ] && {
+ [ -z $FORM_ppp_username ] || save_setting network ppp_username $FORM_ppp_username
+ [ -z $FORM_ppp_passwd ] || save_setting network ppp_passwd $FORM_ppp_passwd
+
+ # These can be blank
+ save_setting network ppp_idletime $FORM_ppp_idletime
+ save_setting network ppp_redialperiod $FORM_ppp_redialperiod
+ save_setting network ppp_mtu $FORM_ppp_mtu
+
+ case "$FORM_ppp_redial" in
+ demand)
+ save_setting network ppp_demand 1
+ ;;
+ persist)
+ save_setting network ppp_demand ""
+ ;;
+ esac
+ }
}
-
}
-header "Network" "WAN" "WAN settings" ' onLoad="modechange()" '
+header "Network" "WAN" "WAN settings" ' onLoad="modechange()" ' "$SCRIPT_NAME"
?>
<script type="text/javascript" src="/webif.js "></script>
<script type="text/javascript">
}
-->
</script>
-<?if [ "$SAVED" = "1" ] ?>
- <? [ -z "$ERROR" ] || echo "<h2>Errors occured:</h2><h3>$ERROR</h3>" ?>
- <h2>Settings Saved</h2>
- <br />
-<?fi?>
-<? display_form "start_form:$SCRIPT_NAME
-field:Internet Connection Type
-radio:wan_proto:$FORM_wan_proto:none:None<br />:onchange=\"modechange()\"
-radio:wan_proto:$FORM_wan_proto:dhcp:DHCP<br />:onchange=\"modechange()\"
-radio:wan_proto:$FORM_wan_proto:static:Static IP<br />:onchange=\"modechange()\"
+<? display_form "start_form|WAN Configuration
+field|Internet Connection Type
+radio|wan_proto|$FORM_wan_proto|none|None<br />|onchange=\"modechange()\"
+radio|wan_proto|$FORM_wan_proto|dhcp|DHCP<br />|onchange=\"modechange()\"
+radio|wan_proto|$FORM_wan_proto|static|Static IP<br />|onchange=\"modechange()\"
$PPPOE_OPTION
$PPTP_OPTION
-field:Internet IP Address:wan_ipaddr:hidden
-text:wan_ipaddr:$FORM_wan_ipaddr
-field:Subnet Mask:wan_netmask:hidden
-text:wan_netmask:$FORM_wan_netmask
-field:Gateway:wan_gateway:hidden
-text:wan_gateway:$FORM_wan_gateway
-field:DNS Server(s):wan_dns:hidden
-text:wan_dns:$FORM_wan_dns
+field|Internet IP Address|wan_ipaddr|hidden
+text|wan_ipaddr|$FORM_wan_ipaddr
+field|Subnet Mask|wan_netmask|hidden
+text|wan_netmask|$FORM_wan_netmask
+field|Gateway|wan_gateway|hidden
+text|wan_gateway|$FORM_wan_gateway
+field|DNS Server(s)|wan_dns|hidden
+text|wan_dns|$FORM_wan_dns
$PPTP_SERVER_OPTION
-field:PPP Redial Policy:ppp_redial:hidden
-radio:ppp_redial:$FORM_ppp_redial:demand:Connect on Demand<br />:onChange=\"modechange()\"
-radio:ppp_redial:$FORM_ppp_redial:persist:Keep Alive:onChange=\"modechange()\"
-field:Maximum Idle Time:ppp_demand_idletime:hidden
-text:ppp_idletime:$FORM_ppp_idletime
-field:Redial Timeout:ppp_persist_redialperiod:hidden
-text:ppp_redialperiod:$FORM_ppp_redialperiod
-field:PPP Username:ppp_username:hidden
-text:ppp_username:$FORM_ppp_username
-field:PPP Password:ppp_passwd:hidden
-text:ppp_passwd:$FORM_ppp_passwd
-field:PPP MTU:ppp_mtu:hidden
-text:ppp_mtu:$FORM_ppp_mtu
-
-field
-submit:action:Save Settings
+field|PPP Redial Policy|ppp_redial|hidden
+radio|ppp_redial|$FORM_ppp_redial|demand|Connect on Demand<br />|onChange=\"modechange()\"
+radio|ppp_redial|$FORM_ppp_redial|persist|Keep Alive|onChange=\"modechange()\"
+field|Maximum Idle Time|ppp_demand_idletime|hidden
+text|ppp_idletime|$FORM_ppp_idletime
+field|Redial Timeout|ppp_persist_redialperiod|hidden
+text|ppp_redialperiod|$FORM_ppp_redialperiod
+field|PPP Username|ppp_username|hidden
+text|ppp_username|$FORM_ppp_username
+field|PPP Password|ppp_passwd|hidden
+text|ppp_passwd|$FORM_ppp_passwd
+field|PPP MTU|ppp_mtu|hidden
+text|ppp_mtu|$FORM_ppp_mtu
end_form" ?>
<? footer ?>
. /usr/lib/webif/webif.sh
load_settings "wireless"
-[ -z $FORM_submit ] && {
+WDS=${wl0_wds:-$(nvram get wl0_wds)}
+WDS="${WDS# }"
+[ -z "$FORM_wdsremove" ] || {
+ WDS=$(echo "$WDS " | awk '
+BEGIN {
+ RS=" "
+ FS=":"
+ first = 1
+}
+($0 !~ /^'"$FORM_wdsremove"'/) {
+ if (first != 1) printf " "
+ printf $0
+ first = 0
+}
+END { print "" }')
+ WDS="${WDS:- }"
+ save_setting wireless wl0_wds "$WDS"
+ FORM_submit=""
+}
+[ -z "$FORM_wdssubmit" ] || {
+ # FIXME: add input validation
+ WDS="$WDS $FORM_newmac"
+ WDS="${WDS# }"
+ save_setting wireless wl0_wds "$WDS"
+ FORM_submit=""
+}
+if [ -z "$FORM_submit" ]; then
FORM_mode=${wl0_mode:-$(nvram get wl0_mode)}
FORM_ssid=${wl0_ssid:-$(nvram get wl0_ssid)}
FORM_encryption=off
FORM_key4=${wl0_key4:-$(nvram get wl0_key4)}
key=${wl0_key:-$(nvram get wl0_key)}
FORM_key=${key:-1}
- true
-} || {
+else
SAVED=1
- save_setting wireless wl0_mode "$FORM_mode"
- save_setting wireless wl0_ssid "$FORM_ssid"
- case "$FORM_aes$FORM_tkip" in
- aes) save_setting wireless wl0_crypto aes;;
- tkip) save_setting wireless wl0_crypto tkip;;
- aestkip) save_setting wireless wl0_crypto tkip+aes;;
- esac
- case "$FORM_encryption" in
- psk)
- case "${FORM_wpa1}${FORM_wpa2}" in
- wpa1) save_setting wireless wl0_akm "psk";;
- wpa2) save_setting wireless wl0_akm "psk2";;
- wpa1wpa2) save_setting wireless wl0_akm "psk psk2";;
- esac
- save_setting wireless wl0_wpa_psk "$FORM_wpa_psk"
- ;;
- wpa)
- case "${FORM_wpa1}${FORM_wpa2}" in
- wpa1) save_setting wireless wl0_akm "wpa";;
- wpa2) save_setting wireless wl0_akm "wpa2";;
- wpa1wpa2) save_setting wireless wl0_akm "wpa wpa2";;
- esac
- validate_ip "$FORM_radius_ipaddr" "RADIUS Server" 1 && \
+ [ "$FORM_encryption" = "wpa" ] && VALIDATE_RADIUS="required"
+ validate "ip|FORM_radius_ipaddr|RADIUS IP address|$VALIDATE_RADIUS|$FORM_radius_ipaddr" && {
+ save_setting wireless wl0_mode "$FORM_mode"
+ save_setting wireless wl0_ssid "$FORM_ssid"
+ case "$FORM_aes$FORM_tkip" in
+ aes) save_setting wireless wl0_crypto aes;;
+ tkip) save_setting wireless wl0_crypto tkip;;
+ aestkip) save_setting wireless wl0_crypto tkip+aes;;
+ esac
+ case "$FORM_encryption" in
+ psk)
+ case "${FORM_wpa1}${FORM_wpa2}" in
+ wpa1) save_setting wireless wl0_akm "psk";;
+ wpa2) save_setting wireless wl0_akm "psk2";;
+ wpa1wpa2) save_setting wireless wl0_akm "psk psk2";;
+ esac
+ save_setting wireless wl0_wpa_psk "$FORM_wpa_psk"
+ ;;
+ wpa)
+ case "${FORM_wpa1}${FORM_wpa2}" in
+ wpa1) save_setting wireless wl0_akm "wpa";;
+ wpa2) save_setting wireless wl0_akm "wpa2";;
+ wpa1wpa2) save_setting wireless wl0_akm "wpa wpa2";;
+ esac
save_setting wireless wl0_radius_ipaddr "$FORM_radius_ipaddr"
- save_setting wireless wl0_radius_key "$FORM_radius_key"
- ;;
- wep)
- save_setting wireless wl0_wep enabled
- save_setting wireless wl0_akm "none"
- save_setting wireless wl0_key1 "$FORM_key1"
- save_setting wireless wl0_key2 "$FORM_key2"
- save_setting wireless wl0_key3 "$FORM_key3"
- save_setting wireless wl0_key4 "$FORM_key4"
- save_setting wireless wl0_key "$FORM_key"
- ;;
- off)
- save_setting wireless wl0_akm "none"
- save_setting wireless wl0_wep disabled
- ;;
- esac
-}
+ save_setting wireless wl0_radius_key "$FORM_radius_key"
+ ;;
+ wep)
+ save_setting wireless wl0_wep enabled
+ save_setting wireless wl0_akm "none"
+ save_setting wireless wl0_key1 "$FORM_key1"
+ save_setting wireless wl0_key2 "$FORM_key2"
+ save_setting wireless wl0_key3 "$FORM_key3"
+ save_setting wireless wl0_key4 "$FORM_key4"
+ save_setting wireless wl0_key "$FORM_key"
+ ;;
+ off)
+ save_setting wireless wl0_akm "none"
+ save_setting wireless wl0_wep disabled
+ ;;
+ esac
+ }
+fi
-header "Network" "Wireless" "Wireless settings" ' onLoad="modechange()" '
+header "Network" "Wireless" "Wireless settings" ' onLoad="modechange()" ' "$SCRIPT_NAME"
?>
<script type="text/javascript" src="/webif.js"></script>
<script type="text/javascript">
set_visible('wpa_support', v);
set_visible('wpa_crypto', v);
- set_visible('wpa_psk', checked('encryption_psk'));
+ set_visible('wpapsk', checked('encryption_psk'));
set_visible('wep_keys', checked('encryption_wep'));
v = checked('encryption_wpa');
- set_visible('radius_key', v);
- set_visible('radius_ipaddr', v);
+ set_visible('radiuskey', v);
+ set_visible('radius_ip', v);
if (checked('mode_wet') || checked('mode_sta')) {
var wpa = document.getElementById('encryption_wpa');
} else {
document.getElementById('encryption_wpa').disabled = false;
}
+ hide('save');
+ show('save');
}
-->
</script>
-<?if [ "$SAVED" = "1" ] ?>
- <? [ -z "$ERROR" ] || echo "<h2>Errors occured:</h2><h3>$ERROR</h3>" ?>
- <h2>Settings saved</h2>
- <br />
-<?fi?>
-<? display_form "start_form:$SCRIPT_NAME
-field:ESSID
-text:ssid:$FORM_ssid
-field:Mode
-radio:mode:$FORM_mode:ap:Access Point<br />:onChange=\"modechange()\"
-radio:mode:$FORM_mode:sta:Client <br />:onChange=\"modechange()\"
-radio:mode:$FORM_mode:wet:Bridge:onChange=\"modechange()\"
-field:Encryption type
-radio:encryption:$FORM_encryption:off:Disabled <br />:onChange=\"modechange()\"
-radio:encryption:$FORM_encryption:wep:WEP <br />:onChange=\"modechange()\"
-radio:encryption:$FORM_encryption:psk:WPA (preshared key) <br />:onChange=\"modechange()\"
-radio:encryption:$FORM_encryption:wpa:WPA (RADIUS):onChange=\"modechange()\"
-field:WPA support:wpa_support:hidden
-checkbox:wpa1:$FORM_wpa1:wpa1:WPA1
-checkbox:wpa2:$FORM_wpa2:wpa2:WPA2
-field:WPA encryption type:wpa_crypto:hidden
-checkbox:tkip:$FORM_tkip:tkip:RC4 (TKIP)
-checkbox:aes:$FORM_aes:aes:AES
-field:WPA preshared key:wpa_psk:hidden
-text:wpa_psk:$FORM_wpa_psk
-field:RADIUS Server IP:radius_ipaddr:hidden
-text:radius_ipaddr:$FORM_radius_ipaddr
-field:RADIUS Server Key:radius_key:hidden
-text:radius_key:$FORM_radius_key
-field:WEP keys:wep_keys:hidden
-radio:key:$FORM_key:1
-text:key1:$FORM_key1:<br />
-radio:key:$FORM_key:2
-text:key2:$FORM_key2:<br />
-radio:key:$FORM_key:3
-text:key3:$FORM_key3:<br />
-radio:key:$FORM_key:4
-text:key4:$FORM_key4:<br />
-field
-submit:action:Save settings
+<? display_form "start_form|Wireless Configuration
+field|ESSID
+text|ssid|$FORM_ssid
+helpitem|ESSID
+helptext|Name of your Wireless Network
+field|Mode
+radio|mode|$FORM_mode|ap|Access Point<br />|onChange=\"modechange()\"
+radio|mode|$FORM_mode|sta|Client <br />|onChange=\"modechange()\"
+radio|mode|$FORM_mode|wet|Bridge|onChange=\"modechange()\"
+helpitem|Mode
+helptext|Operation mode
+helplink|http://www.google.com
+end_form
+start_form|Encryption settings
+field|Encryption type
+radio|encryption|$FORM_encryption|off|Disabled <br />|onChange=\"modechange()\"
+radio|encryption|$FORM_encryption|wep|WEP <br />|onChange=\"modechange()\"
+radio|encryption|$FORM_encryption|psk|WPA (preshared key) <br />|onChange=\"modechange()\"
+radio|encryption|$FORM_encryption|wpa|WPA (RADIUS)|onChange=\"modechange()\"
+field|WPA support|wpa_support|hidden
+checkbox|wpa1|$FORM_wpa1|wpa1|WPA1
+checkbox|wpa2|$FORM_wpa2|wpa2|WPA2
+field|WPA encryption type|wpa_crypto|hidden
+checkbox|tkip|$FORM_tkip|tkip|RC4 (TKIP)
+checkbox|aes|$FORM_aes|aes|AES
+field|WPA preshared key|wpapsk|hidden
+text|wpa_psk|$FORM_wpa_psk
+field|RADIUS Server IP|radius_ip|hidden
+text|radius_ipaddr|$FORM_radius_ipaddr
+field|RADIUS Server Key|radiuskey|hidden
+text|radius_key|$FORM_radius_key
+field|WEP keys|wep_keys|hidden
+radio|key|$FORM_key|1
+text|key1|$FORM_key1|<br />
+radio|key|$FORM_key|2
+text|key2|$FORM_key2|<br />
+radio|key|$FORM_key|3
+text|key3|$FORM_key3|<br />
+radio|key|$FORM_key|4
+text|key4|$FORM_key4|<br />
end_form"
?>
+<div class="settings">
+ <div class="settings-title"><h3><strong>WDS connections</strong></h3></div>
+ <div class="settings-content">
+ <table summary="Settings" width="100%">
+<?
+echo "$WDS " | awk '
+BEGIN {
+ RS=" "
+ FS=":"
+}
+
+$0 ~ /^[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]$/ {
+ print "<tr><td width=\"50%\">" $0 "</td><td> <a href=\"'"$SCRIPT_NAME"'?wdsremove=" $0 "\">Remove</a></td></tr>"
+}
+'
+?>
+ <tr>
+ <td width="45%"><input type="text" name="newmac" value="00:00:00:00:00:00" /></td>
+ <td width="55%"><input type="submit" name="wdssubmit" value="Add WDS peer" /></td>
+ </tr>
+ </table>
+ </div>
+ <div class="settings-help"> </div>
+</div>
+<div style="clear: both"> </div>
+
<? footer ?>
<!--
<html>
<head>
- <meta http-equiv="refresh" content="0; URL=/cgi-bin/webif/info.sh" />
+ <meta http-equiv="refresh" content="0; URL=/cgi-bin/webif.sh" />
</head>
<body>
<div style="vertical-align: middle; text-align: center; height: 100%">
- Redirecting to <a href="/cgi-bin/webif/info.sh">main page</a>...
+ Redirecting to <a href="/cgi-bin/webif.sh">main page</a>...
</div>
</body>
</html>
-/***************************************
- * TITLE: Prosimii Screen Stylesheet *
- * URI : prosimii/prosimii-screen.css *
- * MODIF: 2004-Apr-28 21:43 +0800 *
- ***************************************/
-
-
-/* ##### Common Styles ##### */
-
-html, body {
- height: 100%;
- width: inherit;
-}
-
-#container {
- position: relative;
- min-height: 100%;
-}
-
-body {
- font-family: verdana, helvetica, arial, sans-serif;
- font-size: 73%; /* Enables font size scaling in MSIE */
- margin: 0;
- padding: 0;
-}
-
-html > body {
- font-size: 9pt;
-}
-
-acronym, .titleTip {
- border-bottom: 1px dotted rgb(61,92,122);
- cursor: help;
- margin: 0;
- padding: 0 0 0.4px 0;
+* {
+ margin: 0;
+ padding: 0;
}
-a {
- color: rgb(61,92,122);
- background-color: transparent;
- text-decoration: underline;
- margin: 0;
- padding: 0 1px 2px 1px;
-}
-
-a:hover {
- color: rgb(117,144,174);
- text-decoration: none;
-}
-
-ol {
- margin: 1em 0 1.5em 0;
- padding: 0;
-}
-
-ul {
- list-style-type: square;
- margin: 1em 0 1.5em 0;
- padding: 0;
-}
-
-dl {
- margin: 1em 0 0.5em 0;
- padding: 0;
-}
-
-ul li {
- line-height: 1.5em;
- margin: 1.25ex 0 0 1.5em;
- padding: 0;
-}
-
-ol li {
- line-height: 1.5em;
- margin: 1.25ex 0 0 2em;
- padding: 0;
+html, body {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ width: inherit;
+ height: 100%;
}
dt {
- font-weight: bold;
- margin: 0;
- padding: 0 0 1ex 0;
+ font-weight: bold;
}
dd {
- line-height: 1.75em;
- margin: 0 0 1.5em 1.5em;
- padding: 0;
-}
-
-.doNotDisplay {
- display: none !important;
-}
-
-
-.smallCaps {
- font-size: 117%;
- font-variant: small-caps;
-}
-
-
-/* ##### Header ##### */
-
-.superHeader {
- color: rgb(130,128,154);
- background-color: rgb(33,50,66);
- text-align: right;
- margin: 0;
- padding: 0.5ex 10px;
-}
-
-.superHeader span {
- color: rgb(195,196,210);
- background-color: transparent;
- font-weight: bold;
- text-transform: uppercase;
-}
-
-.superHeader a {
- color: rgb(195,196,210);
- background-color: transparent;
- text-decoration: none;
- margin: 0;
- padding: 0 0.25ex 0 0;
+ margin-left: 1em;
+ margin-bottom: 0.2em;
}
-.superHeader a:hover {
- color: rgb(193,102,90);
- background-color: transparent;
- text-decoration: none;
+ul {
+ display: inline;
+ list-style-type: none;
}
-.topHeader {
- color: rgb(130,128,154);
- background-color: rgb(33,50,66);
- text-align: left;
- margin: 0;
- padding: 0.5ex 10px;
+ul.about {
+ display: block;
+ list-style-type: disc;
}
-
-.categoryHeader {
- color: rgb(130,128,154);
- background-color: rgb(33,50,66);
- position: absolute;
- top: 0;
- text-align: left;
- margin: 0;
- padding: 0.5ex 10px;
+li.about {
+ margin-left: 2em;
}
-.categoryHeader span {
- color: rgb(195,196,210);
- background-color: transparent;
- font-weight: bold;
- text-transform: uppercase;
+hr {
+ display: none;
}
-.categoryHeader a {
- color: rgb(195,196,210);
- background-color: transparent;
- text-decoration: none;
- margin: 0;
- padding: 0 0.25ex 0 0;
+.selected-maincat {
+ font-weight: bold;
}
-.categoryHeader a.active {
- color: rgb(195,196,210);
- font-weight: bold;
- background-color: transparent;
- text-decoration: none;
- margin: 0;
- padding: 0 0.25ex 0 0;
+#container {
+ position: relative;
+ min-height: 100%;
}
-.categoryHeader a:hover {
- color: rgb(193,102,90);
- background-color: transparent;
- text-decoration: none;
+#header {
+ position: relative;
+ width: 100%;
}
-.midHeader {
- color: white;
- background-color: rgb(61,92,122);
- margin: 0;
- padding: 0.26ex 10px;
+#header #header-title {
+ padding-top: 2em;
+ padding-bottom: 0.2em;
+ color: white;
+ background-color: #3D5C7A;
}
-.headerTitle {
- font-size: 300%;
- margin: 0;
- padding: 0;
+#header #header-title #openwrt-title {
+ position: relative;
+ float: left;
+ left: 1em;
+ top: 0.7em;
}
-.headerSubTitle {
- font-size: 151%;
- font-weight: normal;
- font-style: italic;
- margin: 0 0 1ex 0;
- padding: 0;
+#header #header-title #openwrt-title h1 {
+ font-size: 2.8em;
}
-.headerInfo {
- text-align: right;
- margin: 0;
- padding: 0 0 2ex 0;
- position: absolute;
- right: 1em;
- top: 0.3em;
+#header #header-title #short-status {
+ position: relative;
+ text-align: right;
+ right: 1em;
+ line-height: 1.2em;
+ padding-bottom: 0.2em;
}
-.headerInfo span {
- color: rgb(195,196,210);
- background-color: transparent;
- font-weight: bold;
- text-transform: uppercase;
+#header #header-title #short-status ul {
+ font-size: 0.8em;
}
-.headerInfo a {
- color: white;
- background-color: transparent;
- text-decoration: none;
- margin: 0;
- padding: 0 0 0.5ex 0;
- display: block;
+#header #header-title #short-status h3 {
+ display: none;
+ font-size: 0.9em;
}
-.headerInfo a:hover {
- color: rgb(195,196,210);
- background-color: transparent;
- text-decoration: underline;
+#header #mainmenu {
+ position: absolute;
+ color: #C3C4D2;
+ background-color: #213242;
+ padding-top: 0.2em;
+ padding-bottom: 0.2em;
+ margin-top: 0.1em;
+ top: 0;
+ left: 0;
+ height: 1.2em;
+ width: 100%;
}
-.headerLinks {
- text-align: right;
- margin: 0;
- padding: 0 0 2ex 0;
- position: absolute;
- right: 1.5em;
- top: 3em;
+#header #mainmenu a {
+ color: #C3C4D2;
+ text-decoration: none;
}
-.headerLinks a {
- color: white;
- background-color: transparent;
- text-decoration: none;
- display: block;
+#header #mainmenu a:hover {
+ color: rgb(193,102,90);
}
-.headerLinks a:hover {
- color: rgb(195,196,210);
- background-color: transparent;
- text-decoration: underline;
+#header #mainmenu a:active {
+ font-weight: bold;
}
-.subHeader {
- color: white;
- background-color: rgb(117,144,174);
- margin: 0;
- padding: 0.5ex 10px;
+#header #mainmenu h3 {
+ padding-left: 1em;
+ float: left;
+ font-size: 9pt;
+ text-transform: uppercase;
}
-.subHeader a, .subHeader .highlight {
- color: white;
- background-color: transparent;
- font-size: 110%;
- font-weight: bold;
- text-decoration: none;
- margin: 0;
- padding: 0 0.25ex 0 0;
+#header #mainmenu ul {
+ display: inline;
+ list-style-type: none;
}
-.subHeader a:hover, .subHeader .highlight {
- color: rgb(255,204,0);
- background-color: transparent;
- text-decoration: none;
+#header #mainmenu li {
+ font-size: 9pt;
+ float: left;
+ margin-left: 1.5em;
}
-
-/* ##### Main Copy ##### */
-
-#main-copy {
- margin: 0;
- padding: 0.5em 10px;
- clear: left;
+#header #submenu {
+ position: absolute;
+ color: white;
+ background-color: #7590AE;
+ width: 100%;
+ padding-top: 0.2em;
+ padding-bottom: 0.2em;
+ height: 1.3em;
}
-#main-copy h1 {
- color: rgb(117,144,174);
- background-color: transparent;
- font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif;
- font-size: 200%;
- margin: 0;
- padding: 0;
+#header #submenu a {
+ font-weight: bold;
+ color: white;
+ text-decoration: none;
}
-#main-copy h2 {
- color: rgb(61,92,122);
- background-color: transparent;
- font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif;
- font-weight: normal;
- font-size: 151%;
- margin: 0;
- padding: 1ex 0 0 0;
+#header #submenu a:hover {
+ color: rgb(255,204,0);
}
-#main-copy p {
- line-height: 1.75em;
- margin: 1em 0 1.5em 0;
- padding: 0;
+#header #submenu a:active {
+ font-weight: bold;
}
-.newsHeading {
- color: rgb(61,92,122);
- background-color: transparent;
- font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif;
- font-size: 145%;
- text-decoration: none;
- margin: 0;
- padding: 1ex 0 0 0;
- display: block;
+#header #submenu h3 {
+ display: none;
}
-.newsHeading:hover {
- color: rgb(117,144,174);
- background-color: transparent;
- text-decoration: underline;
+#header #submenu ul {
+ display: inline;
+ list-style-type: none;
}
-.newsDate {
- font-style: italic;
- margin: 0 !important;
- padding: 0;
+#header #submenu li {
+ float: left;
+ margin-left: 1em;
}
-.newsSummary {
- margin: 1.5ex 0 2.5ex 0.75ex !important;
- padding: 0;
+#content {
+ padding-top: 2em;
+ margin-left: 1em;
+ padding-bottom: 5em;
}
-.more {
- text-align: right;
- margin: 0;
- padding: 0.5em 0;
+#content .settings-block {
+ margin-bottom: 1.5em;
}
-.more a {
- color: rgb(61,92,122);
- background-color: transparent;
- font-size: 92%;
- text-decoration: underline;
- margin: 0;
- padding: 0.25ex 0.75ex;
+#content .settings-block .settings-block-title {
+ padding: 0.2em;
+ margin-bottom: 10px;
}
-.more a:hover {
- color: rgb(117,144,174);
- text-decoration: none;
+#content .settings-block .settings-block-title h2 {
+ color: #7590AE;
}
-.rowOfBoxes {
- clear: both;
+#content .settings-block .settings {
+ clear: both;
+ margin-left: 1.5em;
+ padding-right: 1em;
}
-.quarter, .threeQuarter, .oneThird, .half, .twoThirds, .fullWidth {
- margin: 1em 0;
- float: left;
- border-left: 1px solid rgb(204,204,204);
+#content .settings-block .settings .settings-title {
+ padding: 0.2em;
+ color: #000;
+ background-color: #CCC;
}
-.quarter {
- width: 21%;
- padding: 0 1.9%;
+#content .settings-block .settings .settings-content {
+ margin-left: 1em;
+ float: left;
+ width: 58%;
+ padding-bottom: 0.5em;
}
-.threeQuarter {
- width: 71%;
- padding: 0 1.9%;
+#content .settings-block .settings .settings-content input {
+ margin-top: 0.8em;
}
-.oneThird {
- width: 28%;
- padding: 0 1.9%;
+#content .settings-block .settings .settings-help {
+ padding: 0.4em;
+ margin-left: 42%;
}
-.half {
- text-align: justify;
- width: 46%;
- padding: 0 1.9%;
+#content .settings-block .settings .settings-help h3 {
+ display: none;
}
-.twoThirds {
- text-align: justify;
- width: 63%;
- padding: 0 1.9%;
+#content .settings-block .settings .settings-help .more-help {
+ margin-right: 10%;
+ text-align: right;
}
-.fullWidth {
- text-align: justify;
- width: 96%;
- padding: 0 1.2em;
- border-left: none;
+#save {
+ position: absolute;
+ text-align: right;
+ bottom: 0;
+ clear: both;
+ width: 100%;
+ height: 7.4em;
}
-.filler { /* use with an empty <p> element to add padding to the end of a text box */
- border: 1px solid white;
-}
-
-.noBorderOnLeft {
- border-left: none;
+#save a {
+ color: white;
+ text-decoration: none;
+ font-weight: normal;
+ font-size: 11pt;
}
-.dividingBorderAbove {
- border-top: 1px solid rgb(204,204,204);
+#save a:hover {
+ text-decoration: underline;
}
-/* More elegant alternatives to .noBorderOnLeft & .dividingBorderAbove
- * that don't require the creation of new classes - but which are not
- * supported by MSIE - are the following:
- *
- * .rowOfBoxes > div:first-child {
- * border-left: none;
- * }
- *
- * .rowOfBoxes + .rowOfBoxes {
- * border-top: 1px solid rgb(204,204,204);
- * }
- */
-
-
-/* ##### Footer ##### */
-
-#footer {
- border-top: 1px solid rgb(128,128,128);
- color: rgb(51,51,102);
- background-color: rgb(239,239,239);
- font-size: 87%;
- text-align: center;
- line-height: 1.25em;
- margin: 2em 0 0 0;
- padding: 1ex 10px;
- position: absolute;
- bottom: 0;
- width: 100%;
+#save .page-save {
+ background-color: #FFF;
+ color: #FFF;
+ height: 2.3em;
+ width: 100%;
}
-* > #footer {
- width: auto;
- left: 0;
- right: 0;
+#save .page-save div {
+ float: right;
+ width: 15em;
+ height: 1.5em;
+ padding-right: 1em;
+ padding-top: 0.5em;
+ padding-bottom: 0.4em;
+ background-color: #7590AE;
}
-#footer a {
- color: rgb(0,68,204);
- background-color: transparent;
- text-decoration: underline;
+#save .apply {
+ clear: both;
+ background-color: #7590AE;
+ width: 100%;
+ height: 5em;
}
-#footer a:hover {
- text-decoration: none;
+#save .apply div {
+ float: right;
+ height: 4em;
+ width: 15em;
+ padding-right: 1em;
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ background-color: #3D5C7A;
}