-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddCustomersFront.php
More file actions
175 lines (151 loc) · 6.58 KB
/
addCustomersFront.php
File metadata and controls
175 lines (151 loc) · 6.58 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
session_start();
include_once 'object/Customer.php'
?>
<?php
$user = new User();
$cityResutl = $user->selectAllCity();
$areaResutl = $user->selectAllArea();
?>
<!DOCTYPE html>
<html lang="en">
<?php include_once 'head.php' ?>
<style>
#activeAddCustomers {
background-color: #6200EA;
}
</style>
<body>
<?php include_once 'header.php' ?>
<div class="row">
<div class="container pt-2 w-50 ">
<legend class="text-primary">
<center>
<h3><b>Add New Connection</b></h3>
</center>
</legend><br>
<form method="POST" action="addCustomerBackEnd.php" autocomplete="off">
<!-- Alert Messages -->
<div style="text-align : center; margin-top:20px !important; width:40%; margin:auto;">
<span><?php if (isset($_SESSION['userWithMobileAlreadyExists'])) {
echo "<div class='alert alert-danger'>";
echo $_SESSION['userWithMobileAlreadyExists'];
echo "</div>";
unset($_SESSION['userWithMobileAlreadyExists']);
} ?> </span>
</div>
<!-- Alert Messages End -->
<!-- Alert Messages -->
<div style="text-align : center; margin-top:20px !important; width:40%; margin:auto;">
<span><?php if (isset($_SESSION['AreaError'])) {
echo "<div class='alert alert-danger'>";
echo $_SESSION['AreaError'];
echo "</div>";
unset($_SESSION['AreaError']);
} ?> </span>
</div>
<!-- Alert Messages End -->
<!-- Alert Messages -->
<div style="text-align : center; margin-top:20px !important; width:30%; margin:auto;">
<span><?php if (isset($_SESSION['RecordCreated'])) {
echo "<div class='alert alert-success'>";
echo $_SESSION['RecordCreated'];
echo "</div>";
unset($_SESSION['RecordCreated']);
} ?> </span>
</div>
<!-- Alert Messages End -->
<!-- Alert Messages -->
<div style="text-align : center; margin-top:20px !important; width:30%; margin:auto;">
<span><?php if (isset($_SESSION['RecordFailed'])) {
echo "<div class='alert alert-danger'>";
echo $_SESSION['RecordFailed'];
echo "</div>";
unset($_SESSION['RecordFailed']);
} ?> </span>
</div>
<!-- Alert Messages End -->
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputEmail4">Customer Name</label>
<input type="text" name="customerName" class="form-control" id="inputEmail4" required placeholder="Name">
</div>
<div class="form-group col-md-6">
<label for="inputPassword4">Mobile Number</label>
<input type="number" name="mobileNumber" class="form-control" id="inputPassword4" required placeholder="e,g 0300xxxxxxx">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputEmail4">Alternative Mobile No</label>
<input type="number" name="mobileNumber2" class="form-control" id="inputEmail4" placeholder="e,g 0300xxxxxxx">
</div>
<div class="form-group col-md-3">
<label for="inputEmail4">Connection Fees</label>
<input type="number" name="totalPayment" class="form-control" id="inputEmail4" required >
</div>
<div class="form-group col-md-3">
<label for="inputPassword4">Recived Fees</label>
<input type="number" name="recivedPayment" class="form-control" id="inputPassword4" required >
</div>
</div>
<div class=" form-row ">
<!-- <div class="form-group col-md-6 ">
<label for="inputAddress2">Arrears</label>
<input type="text" name="arrears" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor">
</div> -->
<div class="form-group col-md-6">
<label for="inputAddress2">Connection Date</label>
<input type="date" name="con_date" class="form-control" id="inputAddress2" value="<?php echo date('Y-m-d'); ?>">
</div>
<div class="form-group col-md-6">
<label for="inputCity">City</label>
<select id="inputCity" name="city" class="form-control">
<?php if (!empty($cityResutl)) { ?>
<?php foreach ($cityResutl as $result) { ?>
<option value="<?php echo $result['cityName']; ?>"><?php echo $result['cityName']; ?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="form-row">
<!-- <div class="form-group col-md-4">
<label for="inputCity">City</label>
<select id="inputCity" name="city" class="form-control">
<option selected>Choose...</option>
<option>...</option>
</select>
</div> -->
<div class="form-group col-md-6">
<label for="inputState">Area</label>
<select id="inputState" name="area" class="form-control" required>
<option value="areaNotInTheList"> Not In The List</option>
<?php if (!empty($areaResutl)) { ?>
<?php foreach ($areaResutl as $result) { ?>
<option value="<?php echo $result['areaName']; ?>"><?php echo $result['areaName']; ?></option>
<?php }
} ?>
</select>
</div>
<div class="form-group col-md-4">
<label for="inputArea">If Area Not In List Type Below</label>
<input type="text" name="notInTheList" class="form-control" id="inputArea" >
</div>
<div class="form-group col-md-2">
<label for="inputZip">Status</label>
<select id="inputZip" name="status" class="form-control">
<option selected value="Active">Active</option>
<option value="Inactive">Inactive</option>
<option value="Deactive">Deactive</option>
<option value="Defaulter">Defaulter</option>
</select>
</div>
</div>
<button type="submit" class="btn btn-primary">Add Customer</button>
</form>
</div>
</div>
<?php include_once 'footer.php' ?>
</body>
</html>