Update of /cvsroot/leaf/src/config/webconf/var/webconf/www
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1113
Modified Files:
interfaces.cgi
Log Message:
This version refers to the interfaces.css file and does not require
modifications in the webconf.css file
Index: interfaces.cgi
===================================================================
RCS file: /cvsroot/leaf/src/config/webconf/var/webconf/www/interfaces.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** interfaces.cgi 26 Jan 2009 08:50:31 -0000 1.1
--- interfaces.cgi 10 Jun 2009 06:18:19 -0000 1.2
***************
*** 42,55 ****
EOF
######################################################################
!
######################################################################
cat <<-EOF
! <p>
! This page allows you to display and modify the various network interfaces
! of your router.
! </p>
EOF
######################################################################
TEMP=/tmp$SCRIPT_NAME$$
--- 42,55 ----
EOF
######################################################################
! ######################################################################
! # insert the interface css file
######################################################################
cat <<-EOF
! <link rel="stylesheet" type="text/css" href="/interfaces.css">
EOF
######################################################################
+
+
TEMP=/tmp$SCRIPT_NAME$$
***************
*** 59,62 ****
--- 59,64 ----
EOF
+ ######################################################################
+
FORM_name="$( echo $FORM_name | to_html | sed "s-[^/a-zA-Z\.0-9\-_]--g" )"
FORM_name_ok="$( ls -1 /var/log | grep "^$FORM_name\$" )"
***************
*** 81,88 ****
is_gateway_interface $i $gateway &&
template=${TEMPLATE_DIR}/static_gateway
! if [ "$is_active" == 1 ]; then
! if [ "$use_dhcp" == "1" ]; then
template=${TEMPLATE_DIR}/dhcp
! elif [ "$use_pppoe" == "1" ]; then
template=${TEMPLATE_DIR}/pppoe
fi
--- 83,90 ----
is_gateway_interface $i $gateway &&
template=${TEMPLATE_DIR}/static_gateway
! if [ "$is_active" = 1 ]; then
! if [ "$use_dhcp" = "1" ]; then
template=${TEMPLATE_DIR}/dhcp
! elif [ "$use_pppoe" = "1" ]; then
template=${TEMPLATE_DIR}/pppoe
fi
***************
*** 100,104 ****
# now copy the newly created file to the config file
cat ${TEMPLATE_DIR}/end_interfaces >> ${TEMP}
! [ "$FORM_cmd" == "Apply" ] && /etc/init.d/networking
stop > /dev/null
cp ${TEMP} ${CONTROL_FILE}
rm -f ${TEMP}
--- 102,106 ----
# now copy the newly created file to the config file
cat ${TEMPLATE_DIR}/end_interfaces >> ${TEMP}
! [ "$FORM_cmd" = "Apply" ] && /etc/init.d/networking
stop > /dev/null
cp ${TEMP} ${CONTROL_FILE}
rm -f ${TEMP}
***************
*** 108,112 ****
esac
! if [ "$FORM_cmd" == "Apply" ]; then
/etc/init.d/networking start > /dev/null
[ -f /etc/shorewall/rules ] && /etc/init.d/shorewall restart >
/dev/null
--- 110,114 ----
esac
! if [ "$FORM_cmd" = "Apply" ]; then
/etc/init.d/networking start > /dev/null
[ -f /etc/shorewall/rules ] && /etc/init.d/shorewall restart >
/dev/null
***************
*** 114,118 ****
cat <<-EOF
! <div id="interfaces">
<table cellspacing=0 cellpadding=2>
<colgroup> <col width="120"><col width="120"><col width="100"><col
width="80"></colgroup>
--- 116,126 ----
cat <<-EOF
!
! <div id=interfaces class=interfaces>
! <br><div id=info>
! This page allows you to display and modify the various network interfaces
! of your router.
! </div>
!
<table cellspacing=0 cellpadding=2>
<colgroup> <col width="120"><col width="120"><col width="100"><col
width="80"></colgroup>
***************
*** 124,133 ****
is_active=0
use_dhcp=0
! if [ "$FORM_cmd" == "Save" ]; then
address=`eval echo '$'FORM_${i}_addr`
netmask=`eval echo '$'FORM_${i}_mask`
use_dhcp=`eval echo '$'FORM_${i}_dhcp`
use_pppoe=`eval echo '$'FORM_${i}_pppoe`
! [ "`eval echo '$'FORM_${i}_active`" == "1" ] &&
is_active=1
else
address=`get_interface_address $i`
--- 132,141 ----
is_active=0
use_dhcp=0
! if [ "$FORM_cmd" = "Save" ]; then
address=`eval echo '$'FORM_${i}_addr`
netmask=`eval echo '$'FORM_${i}_mask`
use_dhcp=`eval echo '$'FORM_${i}_dhcp`
use_pppoe=`eval echo '$'FORM_${i}_pppoe`
! [ "`eval echo '$'FORM_${i}_active`" = "1" ] &&
is_active=1
else
address=`get_interface_address $i`
***************
*** 139,143 ****
echo "<tr height=10>"
! echo "<td align=middle><label for=\"${i}_addr\">$i</label></td>"
echo "<td>"
echo "<input class=address name=${i}_addr
id=\"$i_addr\" size=15 maxlength=15 value=\"$address\" align=right"
--- 147,151 ----
echo "<tr height=10>"
! echo "<td align=middle><label for=\"${i}_addr\"
class=info>$i</label></td>"
echo "<td>"
echo "<input class=address name=${i}_addr
id=\"$i_addr\" size=15 maxlength=15 value=\"$address\" align=right"
***************
*** 150,177 ****
echo "></input>"
echo "</td>"
! echo "<td align=middle><label
for=\"${i}_active\">activate</label></td>"
echo "<td>"
echo "<input type=checkbox name=${i}_active
id=\"${i}_active\" value=1 onclick=toggle_active(\"$i\",this)"
! [ "$is_active" == "1" ] && echo "checked"
echo "></input>"
echo "</td>"
! echo "<td align=middle><label for=\"${i}_dhcp\">use
DHCP</label></td>"
echo "<td>"
echo "<input type=checkbox name=${i}_dhcp
id=\"${i}_dhcp\" value=1 onclick=toggle_dhcp(\"$i\",this)"
! [ "$use_dhcp" == "1" ] && echo "checked"
! [ "$use_pppoe" == "1" -o "$is_active" != "1" ]
&& echo "disabled"
echo "></input>"
echo "</td>"
! if [ "$i" == "eth0" ];then
! echo "<td align=middle><label for=\"${i}_pppoe\">use
for pppoe</label></td>"
echo "<td align=middle>"
echo "<input type=checkbox name=${i}_pppoe
id=\"${i}_pppoe\" value=1 onclick=toggle_pppoe(\"$i\",this)"
! [ "$use_pppoe" == "1" ] && echo "checked "
! [ "$use_dhcp" == "1" -o "$is_active" != "1" ]
&& echo "disabled"
echo "></input>"
echo "</td>"
if [ -r /var/webconf/www/pppoe.cgi ];then
echo "<td align=middle>"
! [ "$use_pppoe" == "1" ] && echo
"<div id=ppp_link style=display:inline>"
[ "$use_pppoe" != "1" ] && echo
"<div id=ppp_link style=display:none>"
echo "<a href=/pppoe.cgi>"
--- 158,185 ----
echo "></input>"
echo "</td>"
! echo "<td align=middle><label for=\"${i}_active\"
class=info>activate</label></td>"
echo "<td>"
echo "<input type=checkbox name=${i}_active
id=\"${i}_active\" value=1 onclick=toggle_active(\"$i\",this)"
! [ "$is_active" = "1" ] && echo "checked"
echo "></input>"
echo "</td>"
! echo "<td align=middle><label for=\"${i}_dhcp\"
class=info>use DHCP</label></td>"
echo "<td>"
echo "<input type=checkbox name=${i}_dhcp
id=\"${i}_dhcp\" value=1 onclick=toggle_dhcp(\"$i\",this)"
! [ "$use_dhcp" = "1" ] && echo "checked"
! [ "$use_pppoe" = "1" -o "$is_active" != "1" ]
&& echo "disabled"
echo "></input>"
echo "</td>"
! if [ "$i" = "eth0" ];then
! echo "<td align=middle><label for=\"${i}_pppoe\"
class=info>use for pppoe</label></td>"
echo "<td align=middle>"
echo "<input type=checkbox name=${i}_pppoe
id=\"${i}_pppoe\" value=1 onclick=toggle_pppoe(\"$i\",this)"
! [ "$use_pppoe" = "1" ] && echo "checked "
! [ "$use_dhcp" = "1" -o "$is_active" != "1" ]
&& echo "disabled"
echo "></input>"
echo "</td>"
if [ -r /var/webconf/www/pppoe.cgi ];then
echo "<td align=middle>"
! [ "$use_pppoe" = "1" ] && echo
"<div id=ppp_link style=display:inline>"
[ "$use_pppoe" != "1" ] && echo
"<div id=ppp_link style=display:none>"
echo "<a href=/pppoe.cgi>"
***************
*** 184,191 ****
echo "<tr height=10>"
! echo "<td align=middle><label for=\"gateway\">default
gateway</label></td>"
echo "<td>"
echo "<input class=address name=gateway
id=\"gateway\" size=15 maxlength=15 align=right value=`get_gateway`"
! [ "$use_pppoe" == "1" -o "$use_dhcp" == "1" ]
&& echo "disabled"
echo "></input>"
echo "</td>"
--- 192,199 ----
echo "<tr height=10>"
! echo "<td align=middle><label for=\"gateway\"
class=info>default gateway</label></td>"
echo "<td>"
echo "<input class=address name=gateway
id=\"gateway\" size=15 maxlength=15 align=right value=`get_gateway`"
! [ "$use_pppoe" = "1" -o "$use_dhcp" = "1" ] &&
echo "disabled"
echo "></input>"
echo "</td>"
***************
*** 196,206 ****
<tr height=10>
<td colspan=8 align=center>
! <input type=submit name="cmd" value="Save">
! <input type=submit width=100 name="cmd" value="Reset">
! <input type=submit width=100 name="cmd" value="Apply">
</tr>
</table>
<div id=warning>
EOF
--- 204,215 ----
<tr height=10>
<td colspan=8 align=center>
! <input type=submit name="cmd" value="Save" class=button>
! <input type=submit width=100 name="cmd" value="Reset" class=button>
! <input type=submit width=100 name="cmd" value="Apply" class=button>
</tr>
</table>
+ </div>
<div id=warning>
EOF
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits