[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-svn
Subject:    [Ipcop-svn] SF.net SVN: ipcop:[5491] ipcop/trunk/src/libs/header.pl
From:       owes () users ! sourceforge ! net
Date:       2011-02-23 17:45:27
Message-ID: E1PsImE-0003xM-W7 () sfp-svn-2 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 5491
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5491&view=rev
Author:   owes
Date:     2011-02-23 17:45:26 +0000 (Wed, 23 Feb 2011)

Log Message:
-----------
Modify box display to be either 100% (full screen) or a minimal width. Minimal width \
is currently for index.cgi only, to be able to 'grow' in width when required.

Modified Paths:
--------------
    ipcop/trunk/src/libs/header.pl

Modified: ipcop/trunk/src/libs/header.pl
===================================================================
--- ipcop/trunk/src/libs/header.pl	2011-02-23 08:28:51 UTC (rev 5490)
+++ ipcop/trunk/src/libs/header.pl	2011-02-23 17:45:26 UTC (rev 5491)
@@ -1,14 +1,28 @@
-# SmoothWall CGIs
 #
-# This code is distributed under the terms of the GPL
+# header.pl: various helper functions for the web GUI
 #
-# (c) The SmoothWall Team
+# This file is part of the IPCop Firewall.
+#
+# IPCop 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.
+#
+# IPCop 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 IPCop; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
 # Copyright (C) 2002 Alex Hudson - getcgihash() rewrite
 # Copyright (C) 2002 Bob Grant <bob@cache.ucr.edu> - validmac()
 # Copyright (c) 2002/04/13 Steve Bootes - add alias section, helper functions
 # Copyright (c) 2002/08/23 Mark Wormgoor <mark@wormgoor.com> validfqdn()
 # Copyright (c) 2003/09/11 Darren Critchley <darrenc@telus.net> srtarray()
-# Copyright (c) 2004-2010 The IPCop Team - way to many changes to specify here
+# Copyright (c) 2004-2011 The IPCop Team - way to many changes to specify here
 #
 # $Id$
 #
@@ -397,47 +411,64 @@
 
     $Header::boxframe = $_[3] if (defined($_[3]));
 
+    my $tablewidth = "width='100%'";
+    if ($width eq '100%') {
+        $width = 500;
+    }
+    else {
+        $tablewidth = "";
+    }
+    my $tdwidth = $width - 18 - 12 - 145 - 18;
+
     print <<END
-	<table cellspacing='0' cellpadding='0' width='$width' border='0'>
-	    <col width='18' />
-	    <col width='12' />
-	    <col width='100%' />
-	    <col width='145' />
-	    <col width='18' />
-
- 	    <tr><td width='18'  ><img src='/images/null.gif' width='18'  height='1' alt='' \
                /></td>
-		<td width='12'  ><img src='/images/null.gif' width='12'  height='1' alt='' /></td>
-		<td width='100%'><img src='/images/null.gif' width='257' height='1' alt='' /></td>
-		<td width='145' ><img src='/images/null.gif' width='145' height='1' alt='' /></td>
-		<td width='18'  ><img src='/images/null.gif' width='18'  height='1' alt='' \
                /></td></tr>
-
-	    <tr><td colspan='2' ><img src='/images/${Header::boxframe}boxtop1.png' \
                width='30' height='53' alt='' /></td>
-		<td style='background: url(/images/${Header::boxframe}boxtop2.png);'>
+<table cellspacing='0' cellpadding='0' tablewidth border='0'>
+    <tr>
+        <td width='18'  ><img src='/images/null.gif' width='18'  height='1' alt='' \
/></td> +        <td width='12'  ><img src='/images/null.gif' width='12'  height='1' \
alt='' /></td> +        <td width='100%'><img src='/images/null.gif' width='$tdwidth' \
height='1' alt='' /></td> +        <td width='145' ><img src='/images/null.gif' \
width='145' height='1' alt='' /></td> +        <td width='18'  ><img \
src='/images/null.gif' width='18'  height='1' alt='' /></td> +    </tr><tr>
+        <td colspan='2' ><img src='/images/${Header::boxframe}boxtop1.png' \
width='30' height='53' alt='' /></td> +        <td style='background: \
url(/images/${Header::boxframe}boxtop2.png);'>  END
         ;
     if   ($caption) { print "<b>$caption</b>\n"; }
     else            { print "&nbsp;"; }
     print <<END
-		</td>
-		<td colspan='2'><img src='/images/${Header::boxframe}boxtop3.png' width='163' \
                height='53' alt='' /></td></tr></table>
-		<table cellspacing='0' cellpadding='0' width='$width' border='0'>
-	    <tr><td style='background: url(/images/${Header::boxframe}boxleft.png);'><img \
                src='/images/null.gif' width='18' height='1' alt='' /></td>
-		<td colspan='3' style='background-color: $Header::boxcolour;' width='100%'>
-		<table width='100%' cellpadding='5'><tr><td align='$align' valign='top'>
+        </td>
+        <td colspan='2'><img src='/images/${Header::boxframe}boxtop3.png' \
width='163' height='53' alt='' /></td> +    </tr>
+    <tr>
+        <td style='background: url(/images/${Header::boxframe}boxleft.png);'><img \
src='/images/null.gif' width='18' height='1' alt='' /></td> +        <td colspan='3' \
style='background-color: $Header::boxcolour;' width='100%'> +            <table \
width='100%' cellpadding='5'><tr><td align='$align' valign='top'>  END
         ;
 }
 
+# removed from above, store here
+#    <col width='18' />
+#    <col width='12' />
+#    <col width='100%' />
+#    <col width='145' />
+#    <col width='18' />
+#</table><table cellspacing='0' cellpadding='0' width='$width' border='0'>
+
 sub closebox
 {
     print <<END
-		</td></tr></table></td>
-		<td style='background: url(/images/${Header::boxframe}boxright.png);'><img \
                src='/images/null.gif' width='12' alt='' /></td></tr>
-		<tr><td style='background: \
url(/images/${Header::boxframe}boxbottom1.png);background-repeat:no-repeat;'><img \
                src='/images/null.gif' width='18' height='18' alt='' /></td>
-		<td style='background: \
url(/images/${Header::boxframe}boxbottom2.png);background-repeat:repeat-x;' \
                colspan='3'><img src='/images/null.gif' width='1' height='18' alt='' \
                /></td>
-		<td style='background: \
url(/images/${Header::boxframe}boxbottom3.png);background-repeat:no-repeat;'><img \
                src='/images/null.gif' width='18' height='18' alt='' /></td></tr>
-<tr><td colspan='5'><img src='/images/null.gif' width='1' height='5' alt='' \
                /></td></tr>
-        </table>
+            </td></tr></table>
+        </td>
+        <td style='background: url(/images/${Header::boxframe}boxright.png);'><img \
src='/images/null.gif' width='12' alt='' /></td> +    </tr><tr>
+        <td style='background: \
url(/images/${Header::boxframe}boxbottom1.png);background-repeat:no-repeat;'><img \
src='/images/null.gif' width='18' height='18' alt='' /></td> +        <td \
style='background: url(/images/${Header::boxframe}boxbottom2.png);background-repeat:repeat-x;' \
colspan='3'><img src='/images/null.gif' width='1' height='18' alt='' /></td> +        \
<td style='background: \
url(/images/${Header::boxframe}boxbottom3.png);background-repeat:no-repeat;'><img \
src='/images/null.gif' width='18' height='18' alt='' /></td> +    </tr><tr>
+        <td colspan='5'><img src='/images/null.gif' width='1' height='5' alt='' \
/></td> +    </tr>
+</table>
 END
         ;
 }


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic