summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/fbegin.inc85
-rwxr-xr-xusr/local/www/index.php15
-rwxr-xr-xusr/local/www/javascript/ticker.js109
3 files changed, 77 insertions, 132 deletions
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 7af515b..7333118 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -1,10 +1,11 @@
<script src="/javascript/sorttable.js"></script>
+<script src="/javascript/ticker.js"></script>
<style id="antiClickjack">body{display:none}</style> <script type="text/JavaScript">
if (self === top) { var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack);
} else { top.location = self.location;
-}</script>
-
+}
+</script>
<?php
/*
pfSense_MODULE: header
@@ -249,88 +250,25 @@ if(! $g['disablehelpmenu']) {
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")),0);
}
-/* NOTICE ACKNOWLEDGE CODE by Erik Kristensen */
-if ($_REQUEST['noticeaction'] == 'acknowledge') {
- $notice_id = htmlspecialchars($_REQUEST['noticeid']);
- close_notice($notice_id);
-}
-/**********************************************/
-
?>
<div id="wrapper">
- <div id="header">
+ <div id="header" style="height:40px;">
<div id="header-left"><a href="/index.php" id="status-link"><img src="/themes/<?= $g['theme']; ?>/images/transparent.gif" border="0"></a></div>
- <div id="header-right">
+ <div id="header-right" style="height:30px;" >
<div class="container">
<div class="left">webConfigurator</div>
- <div class="right">
-<?
- if (are_notices_pending()) {
- $notices = get_notices();
-
- $requests=array();
-
- ## Get Query Arguments from URL ###
- foreach ($_REQUEST as $key => $value) {
- if ($key != "PHPSESSID")
- $requests[] = $key.'='.$value;
- }
- if(is_array($requests))
- $request_string = implode("&", $requests);
-
- if(is_array($notices)) {
- foreach ($notices as $key => $value) {
- $date = date("m-d-y H:i:s", $key);
- $noticemsg = str_replace("'", "", $value['notice']);
- $noticemsg = str_replace('"', "", $noticemsg);
- $noticemsg = str_replace("\n", "", $noticemsg);
- $noticemsg = str_replace("<p>", "", $noticemsg);
- $noticemsg = str_replace("<pre>", "", $noticemsg);
- $noticemsg = str_replace("</pre>", "", $noticemsg);
- $noticemsg = str_replace("</p>", "", $noticemsg);
- $noticemsg = str_replace("<br>", "", $noticemsg);
- $extra_args = "";
- if($_GET['xml'])
- $extraargs="&xml=" . htmlspecialchars($_GET['xml']);
- if($_POST['xml'])
- $extraargs="&xml=" . htmlspecialchars($_POST['xml']);
- if($_GET['id'])
- $extraargs="&xml=" . htmlspecialchars($_GET['id']);
- if($_POST['id'])
- $extraargs="&xml=" . htmlspecialchars($_POST['id']);
- $notice_msgs = '<a href="?noticeaction=acknowledge&noticeid=all' . $extraargs . '">Acknowledge All</a> &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ';
- if ($value['url']) {
- $notice_msgs .= $date.' - <a href="'.$url.'?' . htmlspecialchars($request_string) . '&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']</a>';
- } else {
- $notice_msgs .= $date.' - <a href="?' . htmlspecialchars($request_string) . '&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']'.htmlspecialchars($noticemsg).'</a>';
- }
- $notice_msgs .= " &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ";
- }
- }
-?>
- <div id="alerts">
- <script type="text/javascript">
- var content='<div id="marquee-text"><?= $notice_msgs; ?></div>'
- </script>
- <script type="text/javascript" src="/javascript/ticker.js"></script>
- </div>
+ <div class="right" id="menu_messages">
<?
- } else {
+ echo get_menu_messages();
?>
- <div id="hostname">
- <? print $config['system']['hostname'] . "." . $config['system']['domain']; ?>
- </div>
-<?
- }
-?>
- </div>
+ </div>
</div>
</div>
</div> <!-- Header DIV -->
<div id="content">
<div id="left">
- <div id="navigation" style="z-index:1000">
+ <div id="navigation" style="z-index:1000;width:750px;" >
<ul id="menu">
<li class="firstdrop">
<div><?php echo gettext("System"); ?></div>
@@ -406,7 +344,10 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
<div id="right">
<?php
-
+echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/domLib.js\"></script>\n";
+echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/domTT.js\"></script>\n";
+echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/behaviour.js\"></script>\n";
+echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/fadomatic.js\"></script>\n";
/* display a top alert bar if need be */
$need_alert_display = false;
$found_notices = are_notices_pending();
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index a59a652..c9efd0c 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -2,7 +2,7 @@
/* $Id$ */
/*
index.php
- Copyright (C) 2004, 2005 Scott Ullrich
+ Copyright (C) 2004-2012 Scott Ullrich
All rights reserved.
Originally part of m0n0wall (http://m0n0.ch/wall)
@@ -51,11 +51,19 @@ ini_set('output_buffering','true');
// Start buffering with a cache size of 100000
ob_start(null, "1000");
+
## Load Essential Includes
require_once('functions.inc');
require_once('guiconfig.inc');
require_once('notices.inc');
+if(isset($_REQUEST['closenotice'])){
+ include("functions.inc");
+ close_notice($_REQUEST['closenotice']);
+ echo get_menu_messages();
+ exit;
+}
+
if($g['disablecrashreporter'] != true) {
// Check to see if we have a crash report
$x = 0;
@@ -446,11 +454,6 @@ $closehead = false;
$pgtitle = array(gettext("Status: Dashboard"));
include("head.inc");
-echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/domLib.js\"></script>\n";
-echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/domTT.js\"></script>\n";
-echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/behaviour.js\"></script>\n";
-echo "\t<script type=\"text/javascript\" src=\"javascript/domTT/fadomatic.js\"></script>\n";
-
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
diff --git a/usr/local/www/javascript/ticker.js b/usr/local/www/javascript/ticker.js
index 3e32e33..3c8b6cc 100755
--- a/usr/local/www/javascript/ticker.js
+++ b/usr/local/www/javascript/ticker.js
@@ -1,58 +1,59 @@
-<!--
-
-var width="310px";
-
-var speed=2;
-var pauseit=1;
-
-var divonclick=speed=(document.all)? speed : Math.max(1, speed-1);
-var copyspeed=speed;
-var pausespeed=(pauseit==0)? copyspeed: 0;
-var iedom=document.all||document.getElementById;
-
-if (iedom&&content)
- document.write('<span id="marquee-container">'+content+'</span>');
-
-var actualwidth='';
-var scroller;
-
-try {
- if (window.addEventListener)
- window.addEventListener("load", populatescroller, false);
- else if (window.attachEvent)
- window.attachEvent("onload", populatescroller);
- else if (document.all || document.getElementById)
- window.onload=populatescroller;
-}catch(e){}
-
-function populatescroller(){
- try {
- scroller=document.getElementById? document.getElementById("scroller") : document.all.scroller;
- scroller.style.left=parseInt(width)+8+"px";
- scroller.style.width = parseInt(document.getElementById("marquee-text").offsetWidth) + 40 + "px";
- scroller.innerHTML=content;
- document.getElementById("marquee-text");
- actualwidth=document.all? document.getElementById("marquee-text").offsetWidth : document.getElementById("marquee-text").offsetWidth;
- lefttime=setInterval("scrollmarquee()",20);
- }catch(e){}
+/* $Id$ */
+/*
+ functions.inc
+ Copyright (C) 2012 Marcello Coutinho
+ Copyright (C) 2012 Carlos Cesario - carloscesario@gmail.com
+ All rights reserved.
+
+ originally part of m0n0wall (http://m0n0.ch/wall)
+ Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+ pfSense_MODULE: utils
+
+*/
+function notice_action(action,msgid) {
+ jQuery.ajax({
+ type: 'post',
+ cache: false,
+ url: 'index.php',
+ data: {closenotice: msgid},
+ success: function(response) {
+ jQuery('#menu_messages').html(response);
+ }
+ });
}
-function scrollmarquee(){
-
- try {
- if (parseInt(scroller.style.left)>(actualwidth*(-1)+8))
- scroller.style.left=parseInt(scroller.style.left)-copyspeed+"px";
- else
- scroller.style.left=parseInt(width)+8+"px";
- }catch(e){}
+function pulsateText(elem) {
+ jQuery(elem).effect("pulsate", { times:12 }, 500);
+ jQuery(elem).effect("pulsate", { times:6 }, 1500);
+ jQuery(elem).effect("pulsate", { times:3 }, 2500);
}
-if (iedom){
- document.write('<table id="marquee"><tr><td>');
- document.write('<div id="container" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">');
- document.write('<div id="scroller"></div>');
- document.write('</div>');
- document.write('</td></tr></table>');
-}
-
-//-->
+jQuery(document).ready(function() {
+ pulsateText('#marquee-text');
+ jQuery('#marquee-text a').hover(function () {
+ jQuery(this).css('cursor','pointer');
+ });
+});
OpenPOWER on IntegriCloud