-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitpolicy.php
More file actions
executable file
·70 lines (61 loc) · 1.12 KB
/
Copy pathcommitpolicy.php
File metadata and controls
executable file
·70 lines (61 loc) · 1.12 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
59
60
61
62
63
64
65
66
67
68
69
70
<html>
<head>
<style>
.error {color: #FF0000;}
#ip td, #ip th, #file td, #file th
{
font-size:1em;
# border:1px solid #98bf21;
border:1px solid #5F9EA0;
padding:3px 7px 2px 7px;
}
#ip th, #file th
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
# background-color:#A7C942;
background-color:#5F9EA0;
color:#ffffff;
}
</style>
</head>
<body>
<?php
$device = $_POST["device"];
if (!preg_match("/[a-z]+/i",$user)) {
$DateErr = "invalid device name";
}
if( $_POST )
{
# print_r($_POST);
$conn1 = $_POST["conn1"];
$conn2 = $_POST["conn2"];
$conn3 = $_POST["conn3"];
$arr = array($conn1,$conn2,$conn3);
$conn = implode(",",$arr);
# echo $conn;
$count = count($_POST)-1;
echo $count;
}
#foreach ((array)$array as $v)
# {
# echo $v;
# }
#for($i=0;$i<=count($array);$i++)
#{
# if(!is_null($array[$i]))
# {$chechvalue.=$array[$i]}
#}
#print $chechvalue;
#}
if($_POST) {
echo $conn;
exec("sudo ./mpolicy.pl $device \"$conn\"");
# exec("sudo ./ssh.pl $date $user");
echo "<a href='js/main.php' font-size:80px>Back to Main</a>";
}
?>
</body>
</html>