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
783363d0
Commit
783363d0
authored
May 04, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www: style for ifstats.php
parent
267d589a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
ifstats.php
src/www/ifstats.php
+18
-18
No files found.
src/www/ifstats.php
View file @
783363d0
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005-2006 Scott Ullrich
(sullrich@gmail.com)
Copyright (C) 2005-2006 Scott Ullrich
<sullrich@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
@@ -26,26 +27,25 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
'guiconfig.inc'
);
require_once
(
"interfaces.inc"
);
require_once
(
'guiconfig.inc'
);
require_once
(
"interfaces.inc"
);
$if
=
$_GET
[
'if'
];
$if
=
$_GET
[
'if'
];
$realif
=
get_real_interface
(
$if
);
if
(
!
$realif
)
$realif
=
get_real_interface
(
$if
);
if
(
!
$realif
)
{
$realif
=
$if
;
// Need for IPSec case interface.
}
$ifinfo
=
pfSense_get_interface_stats
(
$realif
);
$temp
=
gettimeofday
();
$timing
=
(
double
)
$temp
[
"sec"
]
+
(
double
)
$temp
[
"usec"
]
/
1000000.0
;
$ifinfo
=
pfSense_get_interface_stats
(
$realif
);
header
(
"Last-Modified: "
.
gmdate
(
"D, j M Y H:i:s"
)
.
" GMT"
);
header
(
"Expires: "
.
gmdate
(
"D, j M Y H:i:s"
,
time
()
)
.
" GMT"
);
header
(
"Cache-Control: no-store, no-cache, must-revalidate"
);
// HTTP/1.1
header
(
"Cache-Control: post-check=0, pre-check=0"
,
FALSE
);
header
(
"Pragma: no-cache"
);
// HTTP/1.0
$temp
=
gettimeofday
();
$timing
=
(
double
)
$temp
[
"sec"
]
+
(
double
)
$temp
[
"usec"
]
/
1000000.0
;
echo
"
$timing
|"
.
$ifinfo
[
'inbytes'
]
.
"|"
.
$ifinfo
[
'outbytes'
]
.
"
\n
"
;
header
(
"Last-Modified: "
.
gmdate
(
"D, j M Y H:i:s"
)
.
" GMT"
);
header
(
"Expires: "
.
gmdate
(
"D, j M Y H:i:s"
,
time
()
)
.
" GMT"
);
header
(
"Cache-Control: no-store, no-cache, must-revalidate"
);
// HTTP/1.1
header
(
"Cache-Control: post-check=0, pre-check=0"
,
FALSE
);
header
(
"Pragma: no-cache"
);
// HTTP/1.0
?>
echo
"
$timing
|"
.
$ifinfo
[
'inbytes'
]
.
"|"
.
$ifinfo
[
'outbytes'
]
.
"
\n
"
;
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