diff options
author | sullrich <sullrich@pfsense.org> | 2009-12-02 22:07:44 -0500 |
---|---|---|
committer | sullrich <sullrich@pfsense.org> | 2009-12-02 22:07:44 -0500 |
commit | 3fa86ecd68e92030fbf04c94cebbd1d136881470 (patch) | |
tree | b7f151a365bea3e77d600771e4a536765454aa0b /usr/local | |
parent | 0b013ef040e36dd71f6b9ca94aa657d2619309f3 (diff) | |
download | pfsense-3fa86ecd68e92030fbf04c94cebbd1d136881470.zip pfsense-3fa86ecd68e92030fbf04c94cebbd1d136881470.tar.gz |
Formatting cleanups. Increase buffer size
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/index.php | 12 | ||||
-rw-r--r-- | usr/local/www/system_groupmanager.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/traffic_graphs.widget.php | 164 |
3 files changed, 82 insertions, 96 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 1a99763..15e8571 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -45,8 +45,8 @@ // Turn on buffering to speed up rendering ini_set('output_buffering','true'); - // Start buffering with a cache size of 10094 - ob_start(null, "10094"); + // Start buffering with a cache size of 100000 + ob_start(null, "100000"); ## Load Essential Includes require_once('guiconfig.inc'); @@ -76,7 +76,6 @@ if(stristr($swapinfo,'%') == true) $showswap=true; } - ## User recently restored his config. ## If packages are installed lets resync if(file_exists('/conf/needs_package_sync')) { @@ -91,12 +90,9 @@ } } - ## If it is the first time webConfigurator has been ## accessed since initial install show this stuff. if(file_exists('/conf/trigger_initial_wizard')) { - - echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -504,8 +500,6 @@ echo $jscriptstr; </div> </div> - - <input type="hidden" value="" name="sequence" id="sequence"> <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="Click here to add widgets" style="cursor: pointer;" onmouseup="domTT_activate(this, event, 'content', document.getElementById('content1'), 'type', 'velcro', 'delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" /> @@ -688,8 +682,6 @@ echo $jscriptstr; <div style="clear:both;"></div> </div> - - <?php include("fend.inc"); ?> <script type="text/javascript"> diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php index 5d9ada1..6988bea 100644 --- a/usr/local/www/system_groupmanager.php +++ b/usr/local/www/system_groupmanager.php @@ -44,9 +44,9 @@ ##|*MATCH=system_groupmanager.php* ##|-PRIV -require("guiconfig.inc"); require("priv.defs.inc"); require("priv.inc"); +require("guiconfig.inc"); $pgtitle = array("System", "Group manager"); diff --git a/usr/local/www/widgets/widgets/traffic_graphs.widget.php b/usr/local/www/widgets/widgets/traffic_graphs.widget.php index 2003ca9..b33743e 100644 --- a/usr/local/www/widgets/widgets/traffic_graphs.widget.php +++ b/usr/local/www/widgets/widgets/traffic_graphs.widget.php @@ -30,29 +30,29 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + require_once("guiconfig.inc"); require_once("pfsense-utils.inc"); require_once("functions.inc"); - $ifdescrs = get_configured_interface_with_descr(); +$ifdescrs = get_configured_interface_with_descr(); + ?> - <input type="hidden" id="traffic_graphs-config" name="traffic_graphs-config" value=""> - <?php - //set variables for traffic graph - $width = "100%"; - $height = "150"; - $showngraphlist = explode(",", $pconfig['traffic_graphs-config']); - $graphcounter = 0; - if($config['widgets']['traffic_graphs-config']){ - $graphlistcount = count($showngraphlist); - $refreshintervalstring = $showngraphlist[$graphlistcount-1]; - $eqposition = strpos($refreshintervalstring,"="); - $refreshInterval = substr($refreshintervalstring, $eqposition+1); - } - else { - $refreshInterval = "10"; - } - +<input type="hidden" id="traffic_graphs-config" name="traffic_graphs-config" value=""> +<?php + //set variables for traffic graph + $width = "100%"; + $height = "150"; + $showngraphlist = explode(",", $pconfig['traffic_graphs-config']); + $graphcounter = 0; + if($config['widgets']['traffic_graphs-config']) { + $graphlistcount = count($showngraphlist); + $refreshintervalstring = $showngraphlist[$graphlistcount-1]; + $eqposition = strpos($refreshintervalstring,"="); + $refreshInterval = substr($refreshintervalstring, $eqposition +1 ); + } else { + $refreshInterval = "10"; + } ?> <div id="traffic_graphs-settings" name="traffic_graphs-settings" class="widgetconfigdiv" style="display:none;"> @@ -73,76 +73,70 @@ Refresh Interval: </div> <script language="javascript" type="text/javascript"> - d = document; - selectIntLink = "traffic_graphs-configure"; - textlink = d.getElementById(selectIntLink); - textlink.style.display = "inline"; - </script> + d = document; + selectIntLink = "traffic_graphs-configure"; + textlink = d.getElementById(selectIntLink); + textlink.style.display = "inline"; +</script> <?php - if (get_cpu_speed() >= 500) - $firstgraphshown = false; - else - $firstgraphshown = true; - foreach ($ifdescrs as $ifdescr => $ifname){ - $ifinfo = get_interface_info($ifdescr); - $currentgraph = $showngraphlist[$graphcounter]; - $colposition = strpos($currentgraph,":"); - $currentgraph = substr($currentgraph, $colposition+1); - if($config['widgets']['traffic_graphs-config']){ - if ($currentgraph =="show"){ - $mingraphbutton = "inline"; - $showgraphbutton = "none"; - $graphdisplay = "inline"; - $interfacevalue = "show"; - } - else - { - $mingraphbutton = "none"; - $showgraphbutton = "inline"; - $graphdisplay = "none"; - $interfacevalue = "hide"; - } - } - else - { - if(!$firstgraphshown){ - $mingraphbutton = "inline"; - $showgraphbutton = "none"; - $graphdisplay = "inline"; - $interfacevalue = "show"; - } - else - { - $mingraphbutton = "none"; - $showgraphbutton = "inline"; - $graphdisplay = "none"; - $interfacevalue = "hide"; - } - } - - - if ($ifinfo['status'] != "down"){ - ?> - <div id="<?=$ifname;?>trafficdiv" style="padding: 5px"> - <input type="hidden" id="<?php echo $ifname;?>_graph-config" name="<?php echo $ifname;?>_graph-config" class="graphsettings" value="<?=$interfacevalue;?>"> - <div id="<?=$ifname;?>topic" class="widgetsubheader"> - <div style="float:left;width:49%"> - <span onClick="location.href='/status_graph.php?if=<?=$ifdescr;?>'" style="cursor:pointer">Current <?=$ifname;?> Traffic</span> - </div> - <div align="right" style="float:right;width:49%"> - <div id="<?=$ifname;?>graphdiv-min" onclick='return trafficminimizeDiv("<?php echo $ifname;?>",true)' style="display:<?php echo $mingraphbutton;?>; cursor:pointer" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_minus.gif" alt="Minimize <?=$ifname;?> traffic graph" /></div> - <div id="<?=$ifname;?>graphdiv-open" onclick='return trafficshowDiv("<?php echo $ifname;?>",true)' style="display:<?php echo $showgraphbutton;?>; cursor:pointer" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_open.gif" alt="Show <?=$ifname;?> traffic graph" /></div> - </div> - <div style="clear:both;"></div> - </div> - <div id="<?=$ifname;?>graphdiv" style="display:<?php echo $graphdisplay;?>"> - <?php $refreshInterval = $refreshInterval + 3 ?> - <embed id="graph" src="graph.php?ifnum=<?=$ifdescr;?>&ifname=<?=rawurlencode($ifname);?>&timeint=<?=$refreshInterval;?>" type="image/svg+xml" width="<? echo $width; ?>" height="<? echo $height; ?>" pluginspage="http://www.adobe.com/svg/viewer/install/auto" /> - </div> - <? $firstgraphshown = true; $graphcounter++; ?> - </div> + if (get_cpu_speed() >= 500) + $firstgraphshown = false; + else + $firstgraphshown = true; + foreach ($ifdescrs as $ifdescr => $ifname) { + $ifinfo = get_interface_info($ifdescr); + $currentgraph = $showngraphlist[$graphcounter]; + $colposition = strpos($currentgraph,":"); + $currentgraph = substr($currentgraph, $colposition+1); + if($config['widgets']['traffic_graphs-config']) { + if ($currentgraph =="show") { + $mingraphbutton = "inline"; + $showgraphbutton = "none"; + $graphdisplay = "inline"; + $interfacevalue = "show"; + } else { + $mingraphbutton = "none"; + $showgraphbutton = "inline"; + $graphdisplay = "none"; + $interfacevalue = "hide"; + } + } else { + if(!$firstgraphshown) { + $mingraphbutton = "inline"; + $showgraphbutton = "none"; + $graphdisplay = "inline"; + $interfacevalue = "show"; + } else { + $mingraphbutton = "none"; + $showgraphbutton = "inline"; + $graphdisplay = "none"; + $interfacevalue = "hide"; + } + } + + + if ($ifinfo['status'] != "down") { + ?> + <div id="<?=$ifname;?>trafficdiv" style="padding: 5px"> + <input type="hidden" id="<?php echo $ifname;?>_graph-config" name="<?php echo $ifname;?>_graph-config" class="graphsettings" value="<?=$interfacevalue;?>"> + <div id="<?=$ifname;?>topic" class="widgetsubheader"> + <div style="float:left;width:49%"> + <span onClick="location.href='/status_graph.php?if=<?=$ifdescr;?>'" style="cursor:pointer">Current <?=$ifname;?> Traffic</span> + </div> + <div align="right" style="float:right;width:49%"> + <div id="<?=$ifname;?>graphdiv-min" onclick='return trafficminimizeDiv("<?php echo $ifname;?>",true)' style="display:<?php echo $mingraphbutton;?>; cursor:pointer" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_minus.gif" alt="Minimize <?=$ifname;?> traffic graph" /></div> + <div id="<?=$ifname;?>graphdiv-open" onclick='return trafficshowDiv("<?php echo $ifname;?>",true)' style="display:<?php echo $showgraphbutton;?>; cursor:pointer" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_open.gif" alt="Show <?=$ifname;?> traffic graph" /></div> + </div> + <div style="clear:both;"></div> + </div> + <div id="<?=$ifname;?>graphdiv" style="display:<?php echo $graphdisplay;?>"> + <?php $refreshInterval = $refreshInterval + 3 ?> + <embed id="graph" src="graph.php?ifnum=<?=$ifdescr;?>&ifname=<?=rawurlencode($ifname);?>&timeint=<?=$refreshInterval;?>" type="image/svg+xml" width="<? echo $width; ?>" height="<? echo $height; ?>" pluginspage="http://www.adobe.com/svg/viewer/install/auto" /> + </div> +<? $firstgraphshown = true; $graphcounter++; ?> + </div> <? } } ?> |