-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall_step3.php
More file actions
139 lines (98 loc) · 3.71 KB
/
install_step3.php
File metadata and controls
139 lines (98 loc) · 3.71 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php session_start(); ?>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PDV Web - User</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/cmxform.css">
<link rel="stylesheet" href="js/lib/validationEngine.jquery.css">
<!-- Scripts -->
<script src="js/lib/jquery.min.js" type="text/javascript"></script>
<script src="js/lib/jquery.validate.min.js" type="text/javascript"></script>
<script src="js/install_step3.js" type="text/javascript"></script>
<!-- Optimize for mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<!-- Only Index Page for Analytics -->
<!-- TOP BAR -->
<div id="top-bar">
<div class="page-full-width">
<!--<a href="#" class="round button dark ic-left-arrow image-left ">See shortcuts</a>-->
</div>
<!-- end full-width -->
</div>
<!-- end top-bar -->
<!-- HEADER -->
<div id="header">
<div class="page-full-width cf">
<div id="login-intro" class="fl">
<h1>User Details </h1>
</div>
<!-- login-intro -->
<!-- Change this image to your own company's logo -->
<!-- The logo will automatically be resized to 39px height. -->
<a href="#" id="company-branding" class="fr"><img src="upload/posnic.png" alt="PDV Web"/></a>
</div>
<!-- end full-width -->
</div>
<!-- end header -->
<?php
include("lib/db.class.php");
$host = $_SESSION['host'];
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$name = $_SESSION['db_name'];
// Open the base (construct the object):
$db = new DB($name, $host, $user, $pass);
# Note that filters and validators are separate rule sets and method calls. There is a good reason for this.
require "lib/gump.class.php";
if (isset($_POST['submit']) and isset($_POST['uname']) and isset($_POST['password']) and isset($_POST['answer'])) {
$host = $_SESSION['host'];
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$name = $_SESSION['db_name'];
$con = mysqli_connect("$host", "$user", "$pass", "$name");
$uname = $_POST['uname'];
$password = $_POST['password'];
$answer = $_POST['answer'];
$db->query("UPDATE stock_user SET username ='" . $uname . "',password='" . $password . "',answer='" . $answer . "'");
echo "<script>window.location = 'install_step4.php';</script>";
// exit;
}
?>
<!-- MAIN CONTENT -->
<div id="content">
<form action="" method="POST" id="login-form" class="cmxform" autocomplete="off">
<fieldset>
<p>
<label>UserName</label>
<input type="text" name="uname" id="uname" class="round full-width-input" placeholder="Enter User Name"
autofocus/>
</p>
<p>
<label>Password</label>
<input type="password" name="password" id="password" class="round full-width-input"
placeholder="Enter Password" autofocus/>
</p>
<p>
<label>Security Question</label>
What's your favorite movie?
<input type="text" name="answer" id="answer" class="round full-width-input" placeholder="Enter Answer"
autofocus/>
</p>
<!--<a href="dashboard.php" class="button round blue image-right ic-right-arrow">LOG IN</a>-->
<input type="submit" class="button round blue image-right ic-right-arrow" name="submit" value="Next"/>
</fieldset>
</form>
</div>
<!-- end content -->
<!-- FOOTER -->
<div id="footer">
<p>Nome da Empresa - www.nomedaempresa.com.br</a>.
</p>
</div>
<!-- end footer -->
</body>
</html>