This repository has been archived by the owner on Oct 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
add_weathersite.php
executable file
·111 lines (94 loc) · 2.76 KB
/
add_weathersite.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
session_start();
require("include/functions.php");
$config_file = 'config.php';
if (file_exists($config_file)) {
require("config.php");
} else {
header("Location: error.php?e=config");
die();
}
require("include/apply_config.php");
$force_admin = TRUE;
require("include/check_admin.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<title>$app_custom_name</title>";
require("include/get_css.php");
require("include/get_jqueryui.php");
?>
<!-- Validation Script -->
<script src="js/jquery.validate.js"></script>
<!-- Form validation from http://bassistance.de/jquery-plugins/jquery-plugin-validation/ -->
<script type="text/javascript">
$().ready(function() {
// validate signup form on keyup and submit
$("#AddSiteForm").validate({
rules: {
SiteName: {
required: true,
},
Lat: {
required: true,
number: true
},
Lon: {
required: true,
number: true
}
},
messages: {
SiteName: "Please enter a name for this site",
Lat: "Please enter the latitude for this site",
Lon: "Please enter the longitude for this site"
}
});
});
</script>
<style type="text/css">
#AddSiteForm label.error {
margin-left: 10px;
width: auto;
display: inline;
}
</style>
<?php
if ($use_googleanalytics){
echo $googleanalytics_code;
}
#Execute custom code for head, if set
if (is_file("$absolute_dir/customhead.php")) {
include("customhead.php");
}
?>
</head>
<body>
<!--Blueprint container-->
<div class="container">
<?php
require("include/topbar.php");
?>
<div class="span-24 last">
<hr noshade>
</div>
<div class="span-24 last">
<h3>Add a weather data collection site:</h3>
<form action="include/add_weathersite.php" method="POST" id="AddSiteForm">
<p>Site Name: <br><input type="text" name="SiteName" maxlength="40" size="30" class="fg-button ui-state-default ui-corner-all formedge"><br>
Latitude: <br><input type="text" name="Lat" maxlength="20" size="10" class="fg-button ui-state-default ui-corner-all formedge"> (decimal degrees) <br>
Longitude: <br><input type="text" name="Lon" maxlength="20" size="10" class="fg-button ui-state-default ui-corner-all formedge"> (decimal degrees) <br>
Elevation: <br><input type="text" name="Elevation" maxlength="20" size="10" class="fg-button ui-state-default ui-corner-all formedge"> (meters above sea level) <br>
Data source: <br><input type="text" name="DataSource" maxlength="60" size="40" class="fg-button ui-state-default ui-corner-all formedge"><br>
<input type=submit value=" Add Site " class="fg-button ui-state-default ui-corner-all">
</form>
<br>
</div>
<div class="span-24 last">
<?php
require("include/bottom.php");
?>
</div>
</div>
</body>
</html>