-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
93 lines (48 loc) · 1.28 KB
/
index.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
<?php
require_once 'Class_aplication/calss_msg.php';
$style = new user();
$aviso2 = new user();
echo'
<!DOCTYPE html>
<html>
<head>
<title>
</title>
'.$style -> estilo('body:color:#fff;').'
</head>
<body onload="myFunction()">
<form method="POST" class="form-eng">
<input type="text" name="host" placeholder="HOST"><br>
<input type="text" name="user" placeholder="USER"><br>
<input type="text" name="PASSWORD" placeholder="PASSWORD"><br>
<input type="text" name="DB" placeholder="Data Base Name"><br>
<input type="submit" name="bts" value="Create"><br>
'.
$aviso2 ::send_msg("OBs:").
$aviso2 ->msg .
'
</form>
</body>
</html>
';
if(isset($_POST['bts']))
{
$host_user = $_POST['host'];
$user_user = $_POST['user'];
$pass_user = $_POST['PASSWORD'];
$db_user = $_POST['DB'];
$sgbd_data = array( "host "=>$host_user, "user"=>$user_user, "pass"=>$pass_user, "db"=>$db_user );
$create = json_encode($sgbd_data );
$file = fopen("config/config.json","w");
fwrite($file,$create);
fclose($file);
clearstatcache();
echo'ok criado';
}
else
{
$aviso = new user();
echo$aviso ->send_msg("texto");
echo $aviso ->msg = "icnlua dados do seu SGBD:como usuário Senha e Host ";
}
?>