summaryrefslogtreecommitdiffstats
path: root/etc/inc/functions.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/functions.inc')
-rw-r--r--etc/inc/functions.inc28
1 files changed, 14 insertions, 14 deletions
diff --git a/etc/inc/functions.inc b/etc/inc/functions.inc
index ab9b73d..0ccd845 100644
--- a/etc/inc/functions.inc
+++ b/etc/inc/functions.inc
@@ -78,7 +78,7 @@ if (!function_exists("pfSenseHeader")) {
/*fetch menu notices function*/
if (!function_exists("get_menu_messages")) {
function get_menu_messages() {
- global $g,$config;
+ global $g, $config;
if (are_notices_pending()) {
$notices = get_notices();
$requests=array();
@@ -102,7 +102,7 @@ if (!function_exists("get_menu_messages")) {
foreach ($notices as $key => $value) {
$date = date("m-d-y H:i:s", $key);
$noticemsg = ($value['notice'] != "" ? $value['notice'] : $value['id']);
- $noticemsg = preg_replace("/(\"|\'|\n|<.?\w+>)/i","",$noticemsg);
+ $noticemsg = preg_replace("/(\"|\'|\n|<.?\w+>)/i", "", $noticemsg);
if ((strlen($noticemsg)* 8) > $domtt_width) {
$domtt_width=(strlen($noticemsg) *8);
}
@@ -116,32 +116,32 @@ if (!function_exists("get_menu_messages")) {
$domtt= "onclick=\"domTT_activate(this, event, 'caption', '{$notice}','content', '<br />{$notice_msgs}', 'trail', false, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle','width','{$domtt_width}','y',5,'type', 'sticky');\"";
$menu_messages="<div id='alerts'>\n";
- if (count($notices)==1) {
- $msg= sprintf("%1$02d",count($notices))." ".gettext("unread notice");
+ if (count($notices) == 1) {
+ $msg= sprintf("%1$02d", count($notices)) . " " . gettext("unread notice");
} else {
- $msg= sprintf("%1$02d",count($notices))." ".gettext("unread notices");
+ $msg= sprintf("%1$02d", count($notices)) . " " . gettext("unread notices");
}
- $menu_messages.="<div id='marquee-text' style='z-index:1001;'><a href='#' {$domtt}><b> .:. {$msg} .:. </b></a></div>\n";
- $menu_messages.="</div>\n";
+ $menu_messages .= "<div id='marquee-text' style='z-index:1001;'><a href='#' {$domtt}><b> .:. {$msg} .:. </b></a></div>\n";
+ $menu_messages .= "</div>\n";
}
} else {
- $menu_messages='<div id="hostname">';
- $menu_messages.=$config['system']['hostname'] . "." . $config['system']['domain'];
- $menu_messages.='</div>';
+ $menu_messages = '<div id="hostname">';
+ $menu_messages .= $config['system']['hostname'] . "." . $config['system']['domain'];
+ $menu_messages .= '</div>';
}
return ($menu_messages);
}
}
if (!function_exists("dom_title")) {
- function dom_title($title_msg,$width=NULL) {
- $width=preg_replace("/\D+/","",$width);
+ function dom_title($title_msg, $width=NULL) {
+ $width=preg_replace("/\D+/", "", $width);
if (!empty($width)) {
$width=",'width',$width";
}
if (!empty($title_msg)) {
- $title_msg=preg_replace("/\s+/"," ",$title_msg);
- $title_msg=preg_replace("/'/","\'",$title_msg);
+ $title_msg=preg_replace("/\s+/", " ", $title_msg);
+ $title_msg=preg_replace("/'/", "\'", $title_msg);
return "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '{$title_msg}', 'trail', true, 'delay', 250, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle' $width);\"";
}
}
OpenPOWER on IntegriCloud