-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathprint.php
More file actions
40 lines (37 loc) · 1.81 KB
/
Copy pathprint.php
File metadata and controls
40 lines (37 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2009-2013 Andrew Aloia |
| Copyright (C) 2014 Wixiweb |
| Copyright (C) 2004-2026 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
chdir('../../');
require_once('./include/auth.php');
?>
<script language='javascript'>
var mapEl = window.opener.document.getElementById('map');
if (mapEl) {
var clone = mapEl.cloneNode(true);
clone.querySelectorAll('script').forEach(function(s) { s.remove(); });
clone.querySelectorAll('*').forEach(function(el) {
Array.from(el.attributes).forEach(function(attr) {
if (attr.name.toLowerCase().indexOf('on') === 0) { el.removeAttribute(attr.name); }
});
});
document.body.appendChild(clone);
}
window.print();
</script>