Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
1d127dcf
Commit
1d127dcf
authored
Jul 06, 2015
by
Ad Schellevis
Committed by
Franco Fichtner
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) let's try default index dashboard without warnings and notices from php
parent
ce26e375
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
42 deletions
+23
-42
foot.inc
src/www/foot.inc
+1
-1
guiconfig.inc
src/www/guiconfig.inc
+5
-26
index.php
src/www/index.php
+12
-11
interface_list.widget.php
src/www/widgets/widgets/interface_list.widget.php
+3
-2
system_information.widget.php
src/www/widgets/widgets/system_information.widget.php
+2
-2
No files found.
src/www/foot.inc
View file @
1d127dcf
...
...
@@ -41,7 +41,7 @@
$widgettitle
=
$widgetname
.
"_title"
;
$widgettitlelink
=
$widgetname
.
"_title_link"
;
if
(
$$widgettitle
!=
""
)
:
if
(
isset
(
$$widgettitle
)
)
:
?>
...
...
src/www/guiconfig.inc
View file @
1d127dcf
...
...
@@ -273,6 +273,8 @@ function print_info_box_np($msg, $name="apply",$value="", $showapply=false) {
if
(
$_POST
[
'if'
])
$savebutton
.=
"<input type=
\"
hidden
\"
name=
\"
if
\"
value=
\"
"
.
htmlspecialchars
(
$_POST
[
'if'
])
.
"
\"
/>"
;
$savebutton
.=
"</form>"
;
}
else
{
$savebutton
=
'<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>'
;
}
$nifty_redbox
=
"#990000"
;
$nifty_blackbox
=
"#000000"
;
...
...
@@ -289,10 +291,6 @@ function print_info_box_np($msg, $name="apply",$value="", $showapply=false) {
eval
(
$toeval
);
}
if
(
!
$savebutton
)
{
$savebutton
=
'<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>'
;
}
echo
<<<EOFnp
<div class="col-xs-12">
<div class="alert alert-info alert-dismissible" role="alert">
...
...
@@ -312,8 +310,10 @@ function print_info_box_np_undo($msg, $name="apply",$value="Apply changes", $und
$savebutton
.=
"<input class=
\"
btn btn-default
\"
type=
\"
button
\"
value=
\"
"
.
gettext
(
"Undo"
)
.
"
\"
onclick=
\"
document.location='
{
$undo
}
'
\"
/>"
;
$savebutton
.=
"<input class=
\"
btn btn-default
\"
name=
\"
{
$name
}
\"
type=
\"
submit
\"
class=
\"
formbtn
\"
id=
\"
${name}
\"
value=
\"
{
$value
}
\"
/>"
;
if
(
$_POST
[
'if'
]
)
if
(
isset
(
$_POST
[
'if'
])
)
$savebutton
.=
"<input type=
\"
hidden
\"
name=
\"
if
\"
value=
\"
"
.
htmlspecialchars
(
$_POST
[
'if'
])
.
"
\"
/>"
;
}
else
{
$savebutton
=
"<input class=
\"
btn btn-default
\"
value=
\"
"
.
gettext
(
"Close"
)
.
"
\"
type=
\"
button
\"
onclick=
\"
$('#redboxtable').hide();
\"
/>"
;
}
$nifty_redbox
=
"#990000"
;
$nifty_blackbox
=
"#000000"
;
...
...
@@ -331,10 +331,6 @@ function print_info_box_np_undo($msg, $name="apply",$value="Apply changes", $und
}
if
(
!
$savebutton
)
{
$savebutton
=
"<input class=
\"
btn btn-default
\"
value=
\"
"
.
gettext
(
"Close"
)
.
"
\"
type=
\"
button
\"
onclick=
\"
$('#redboxtable').hide();
\"
/>"
;
}
$url
=
$_SERVER
[
'REQUEST_URI'
];
echo
<<<EOFnp
...
...
@@ -1004,23 +1000,6 @@ function rule_popup($src,$srcport,$dst,$dstport){
if
(
isset
(
$config
[
'aliases'
][
'alias'
]))
{
$descriptions
=
array
();
foreach
(
$config
[
'aliases'
][
'alias'
]
as
$alias_id
=>
$alias_name
){
//$loading_image="<a><img src=\'/themes/{$g['theme']}/images/misc/loader.gif\' alt=\'loader\' /> " .gettext("loading...")."</a>";
//switch ($alias_name['type']){
//case "port":
// $width="250";
// break;
//case "urltable":
// $width="500";
// break;
//default:
// $width="350";
// break;
//}
//$span_begin = "<span style=\"cursor: help;\" onmouseover=\"var response_html=domTT_activate(this, event, 'id','ttalias_{$alias_id}','content','{$loading_image}', 'trail', true, 'delay', 300, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle','type','velcro','width',{$width});alias_popup('{$alias_id}','{$g['theme']}','".gettext('loading...')."');\" onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\"><u>";
//$span_begin ="<span style=\"cursor: help;\"><u>";
//$span_end = "</u></span>";
//$span_begin=$span_begin.$config['aliases']['alias'][$alias_id]['name'];
//var_dump($config['aliases']['alias'][$alias_id]);
if
(
$alias_name
[
'name'
]
==
$src
)
{
//var_dump($config['aliases']['alias'][$alias_id]);
$aliases_array
[
'src'
]
=
$config
[
'aliases'
][
'alias'
][
$alias_id
];
...
...
src/www/index.php
View file @
1d127dcf
...
...
@@ -45,10 +45,6 @@ if (isset($_REQUEST['closenotice'])) {
echo
get_menu_messages
();
exit
;
}
if
(
$_REQUEST
[
'act'
]
==
'alias_info_popup'
&&
!
preg_match
(
"/\D/"
,
$_REQUEST
[
'aliasid'
]))
{
alias_info_popup
(
$_REQUEST
[
'aliasid'
]);
exit
;
}
##build list of widgets
$directory
=
"/usr/local/www/widgets/widgets/"
;
...
...
@@ -159,7 +155,7 @@ if ($config['widgets'] && $config['widgets']['sequence'] != "") {
##find custom configurations of a particular widget and load its info to $pconfig
foreach
(
$widgetnames
as
$widget
)
{
if
(
$config
[
'widgets'
][
$widget
.
'-config'
]
)
{
if
(
isset
(
$config
[
'widgets'
][
$widget
.
'-config'
])
)
{
$pconfig
[
$widget
.
'-config'
]
=
$config
[
'widgets'
][
$widget
.
'-config'
];
}
}
...
...
@@ -446,8 +442,13 @@ endif; ?>
$nicename
=
ucwords
(
$nicename
);
}
if
(
$config
[
'widgets'
]
&&
$pconfig
[
'sequence'
]
!=
""
)
{
switch
(
$displayarray
[
$widgetcounter
]){
if
(
isset
(
$config
[
'widgets'
])
&&
isset
(
$pconfig
[
'sequence'
]))
{
if
(
isset
(
$displayarray
[
$widgetcounter
]))
{
$disparr
=
$displayarray
[
$widgetcounter
];
}
else
{
$disparr
=
null
;
}
switch
(
$disparr
){
case
"show"
:
$divdisplay
=
"block"
;
$display
=
"block"
;
...
...
@@ -520,7 +521,7 @@ endif; ?>
<?php
$widgettitle
=
$widgetname
.
"_title"
;
$widgettitlelink
=
$widgetname
.
"_title_link"
;
if
(
$$widgettitle
!=
""
)
{
if
(
isset
(
$$widgettitle
)
)
{
//only show link if defined
if
(
$$widgettitlelink
!=
""
)
{
?>
...
...
@@ -529,19 +530,19 @@ endif; ?>
}
//echo widget title
echo
$$widgettitle
;
if
(
$$widgettitlelink
!=
""
)
{
if
(
isset
(
$$widgettitlelink
)
)
{
?>
</span></u>
<?php
}
}
else
{
if
(
$$widgettitlelink
!=
""
)
{
if
(
isset
(
$$widgettitlelink
)
)
{
?>
<u><span
onclick=
"location.href='/
<?php
echo
$$widgettitlelink
;
?>
'"
style=
"cursor:pointer"
>
<?php
}
echo
$nicename
;
if
(
$$widgettitlelink
!=
""
)
{
if
(
isset
(
$$widgettitlelink
)
)
{
?>
</span></u>
<?php
...
...
src/www/widgets/widgets/interface_list.widget.php
View file @
1d127dcf
...
...
@@ -37,6 +37,7 @@ require_once("functions.inc");
require_once
(
"widgets/include/interfaces.inc"
);
$i
=
0
;
$iswireless
=
false
;
$ifdescrs
=
get_configured_interface_with_descr
();
?>
...
...
@@ -49,7 +50,7 @@ require_once("widgets/include/interfaces.inc");
<tr>
<td
class=
"vncellt"
>
<?php
if
(
$ifinfo
[
'ppplink'
]
)
{
if
(
isset
(
$ifinfo
[
'ppplink'
])
)
{
?>
<span
alt=
"3g"
class=
"glyphicon glyphicon-phone text-success"
></span>
<?php
}
elseif
(
$iswireless
)
{
if
(
$ifinfo
[
'status'
]
==
'associated'
||
$ifinfo
[
'status'
]
==
'up'
)
{
...
...
@@ -79,7 +80,7 @@ require_once("widgets/include/interfaces.inc");
<span
onclick=
"location.href='/interfaces.php?if=
<?=
$ifdescr
;
?>
'"
style=
"cursor:pointer"
>
<?=
htmlspecialchars
(
$ifname
);
?>
</span></u></strong>
<?php
if
(
$ifinfo
[
'dhcplink'
]
)
{
if
(
isset
(
$ifinfo
[
'dhcplink'
])
)
{
echo
" (DHCP)"
;
}
?>
...
...
src/www/widgets/widgets/system_information.widget.php
View file @
1d127dcf
...
...
@@ -35,7 +35,7 @@ require_once('notices.inc');
include_once
(
"includes/functions.inc.php"
);
require_once
(
"script/load_phalcon.php"
);
if
(
$_REQUEST
[
'getupdatestatus'
]
)
{
if
(
isset
(
$_REQUEST
[
'getupdatestatus'
])
)
{
$pkg_json
=
trim
(
configd_run
(
'firmware pkgstatus'
));
if
(
$pkg_json
!=
''
)
{
$pkg_status
=
json_decode
(
$pkg_json
,
true
);
...
...
@@ -128,7 +128,7 @@ endif; ?>
endif
;
?>
</td>
</tr>
<?php
if
(
$hwcrypto
)
:
<?php
if
(
isset
(
$hwcrypto
)
)
:
?>
<tr>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"Hardware crypto"
);
?>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment