forked from lirantal/daloradius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gis-main.php
71 lines (49 loc) · 1.42 KB
/
gis-main.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
include ("library/checklogin.php");
$operator = $_SESSION['operator_user'];
include_once('library/config_read.php');
$log = "visited page: ";
if (isset($_REQUEST["submit"])) {
$googleMapsCode = $_REQUEST['code'];
writeGoogleMapsCode($googleMapsCode);
}
function writeGoogleMapsCode($googleMapsCode) {
$myfile = "library/googlemaps.php";
if ($fh = fopen($myfile, 'w') ) {
$strCode = "<script src='http://maps.google.com/maps?file=api&v=2&key=" . $googleMapsCode .
"' type='text/javascript'></script>";
fwrite($fh, $strCode);
fclose($fh);
$successMsg = "Successfully updated GoogleMaps API Registration code";
} else {
$failureMsg = "Error: could not open the file for writing: <b> $myfile </b>
<br/> Check file permissions. The file should be writable by the webserver's user/group";
}
}
?>
<?php
include ("menu-gis.php");
?>
<div id="contentnorightbar">
<h2 id="Intro"><a href="#" onclick="javascript:toggleShowDiv('helpPage')"><? echo $l['Intro']['gismain.php']; ?>
<h144>+</h144></a></h2>
<div id="helpPage" style="display:none;visibility:visible" >
<?php echo $l['helpPage']['gismain'] ?>
<br/>
</div>
<?php
include_once('include/management/actionMessages.php');
?>
<?php
include('include/config/logging.php');
?>
</div>
<div id="footer">
<?php
include 'page-footer.php';
?>
</div>
</div>
</div>
</body>
</html>