-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert.php
executable file
·50 lines (43 loc) · 1.67 KB
/
convert.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
<!DOCTYPE html>
<html>
<head>
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js">
</script>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<link rel="stylesheet" type="text/css" href="js/easyui.css">
<link rel="stylesheet" type="text/css" href="js/icon.css">
<link rel="stylesheet" type="text/css" href="js/demo.css">
<title>Scenario Testing Builder</title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
</head>
<body>
<?php include 'navigators2.php'; ?>
<?php
#$xmlFile = "config.xml";
#$name = $_POST["name"];
$txt = $_POST["txt"];
#$des = $_POST["des"];
if (empty($_POST["txt"]) ){
# include 'cloudfile.php';
echo "No config to be converted";
return;
}
#exec("sudo ./config_op.pl add $name config $des $txt");
$arr = preg_split('/[^-]set /i', $txt);
# exec("sudo ./getconfig.pl $device",$arr, $sta);
# echo var_dump($arr);
foreach($arr AS $value){
# if (preg_match("/^set/i",$value)) {
echo "set " . "$value" . "," . "<br>";
}
#include 'create_otherconfig.php';
#echo "Done\n";
#exec("sudo ./profile.pl add profile.xml $name $type $des ");
#echo "$type $name saved" . "<br>";
?>
</body>
</html>