-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloggerModifyForm.php
More file actions
58 lines (57 loc) · 1.37 KB
/
loggerModifyForm.php
File metadata and controls
58 lines (57 loc) · 1.37 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
include('lock.php');
$groupID = $_SESSION['s_loginGroupid'];
if (isset($groupID)) {
if ($groupID==0) {
$form = "
<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">
<link rel=\"stylesheet\" href=\"libs/css/astlogger.css\">
<form class=\"loggerModifyForm\" id=\"loggerModifyForm\" action=\"loggerModifyResult.php\" method=\"post\">
<table>
<tr>
<td >Logger IP(*)</td>
<td >:</td>
<td ><input name=\"ip\" type=\"text\" id=\"ip\"></td>
</tr>
<tr>
<td >Logger Port(*)</td>
<td >:</td>
<td ><input name=\"port\" type=\"text\" id=\"port\"></td>
</tr>
<tr>
<td ></td>
<td ></td>
<td ><input name=\"formname\" type=\"hidden\" id=\"formname\" value=\"loggerModifyForm\" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type=\"submit\" value=\" Search \"></td>
</tr>
</table>
</form>
";
echo $form;
}
}
?>
<script type="text/javascript">
$(function(){
jQuery.validator.addMethod('ipv4', function(value) {
var ipv4 = /^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/;
return value.match(ipv4);
}, 'Invalid IPv4 address');
$('#loggerModifyForm').validate({
rules: {
ip: {
required: true,
ipv4: true,
},
port: {
required: true,
number: true,
},
}
});
});
</script>