-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfirm.php
297 lines (244 loc) · 14.7 KB
/
confirm.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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?php session_start();
include 'php/joins/db.php';
$Dname = $_GET["name"];
$Owner = $_SESSION["id"];
$chipId = $_GET["chipId"];
$breed = $_GET["breed"];
$gender = $_GET["gender"];
$id=$_SESSION["id"];
if (!empty($_GET["birthDate"])) {
$birthDate = $_GET["birthDate"];
}
else {$birthDate = null;}
if (!empty($_GET["height"])) {
$height = $_GET["height"];
}
else {
$height = null;}
if (!empty($_GET["weight"])) {
$weight = $_GET["weight"];
}
else {
$weight = null;}
//insert to mysql
$query = "INSERT INTO `studDB19a`.`tb_dogs_212`(`snum`, `name`, `breed`, `age`, `weight`, `height`, `gender`)
VALUES ('".$chipId."','" .$Dname."','".$breed."','".$birthDate."','".$weight."','".$height."','".$gender."');";
$result=mysqli_query($connection, $query);
if (!$result) {
$message2 = "הכלב כבר רשום במערכת";
$flag=1;
} else {
$flag=0;
if (mysqli_query($connection, $query)) {
echo "New record created successfully";
} else {
//echo "Error: " . $query . "<br>" . mysqli_error($connection);
}
$sql = "INSERT INTO `studDB19a`.`tb_user-dog_212`(`id`,`snum`)
VALUES ('".$id."','" .$chipId."');";
if (mysqli_query($connection, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($connection);
}
}
mysqli_close($connection);
?>
<!DOCTYPE html>
<html>
<head>
<title>DogFetch</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="includes/style.css">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body id="wrapper">
<header>
<div class="navbar navbar-custom navbar-static-top" id="colorHed">
<div class="container">
<div class="navbar-header" id="go-right">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<ul class="nav navbar-nav navbar-left leftSise2">
<li class="dropdown" id="wi"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="glyphicon glyphicon-bell" id="icon-Nav"></span><span class="label label-primary">42</span>
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-left leftSise">
<li class="dropdown" id="wi"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="glyphicon glyphicon-bell" id="icon-Nav"></span>התראות <span class="label label-primary">42</span>
</a>
<ul class="dropdown-menu" id="wi2">
<li><a href="#"><span class="label label-warning">7:00 AM</span>גולי נמצאת באזור ספה</a></li>
<li><a href="#"><span class="label label-warning">8:00 AM</span>דיבל 300 כ-4 דק</a></li>
<li><a href="#"><span class="label label-warning">9:00 AM</span>גולי בחדר שלך רון </a></li>
<li class="divider"></li>
<li><a href="#" class="text-center">צפיה כל ההתראות</a></li>
</ul>
</li>
<li class="dropdown" id="wi"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="glyphicon glyphicon-envelope" id="icon-Nav"></span>הודעות <span class="label label-info">32</span>
</a>
<ul class="dropdown-menu" id="wi2">
<li><a href="#"><span class="label label-warning">4:00 AM</span>Favourites Snippet</a></li>
<li><a href="#"><span class="label label-warning">4:30 AM</span>Email marketing</a></li>
<li><a href="#"><span class="label label-warning">5:00 AM</span>Subscriber focused email
design</a></li>
<li class="divider"></li>
<li><a href="#" class="text-center">View All</a></li>
</ul>
</li>
<li class="dropdown" id="wi"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="glyphicon glyphicon-user" id="icon-Nav"></span>שרון <b class="caret"></b></a>
<ul class="dropdown-menu" id="wi2">
<li><a href="#"><span class="glyphicon glyphicon-user"></span>פרופיל</a></li>
<li><a href="#"><span class="glyphicon glyphicon-cog"></span>הגדרות</a></li>
<li class="divider"></li>
<li><a href="#"><span class="glyphicon glyphicon-off"></span>Logout</a></li>
</ul>
</li>
</ul>
<a id="Logo" href="index.php">
<span class="fa fa-paw paw1"></span>
<h1 class="Hdog">Dog </h1>
<span class="logoIMG"></span>
<h1 class="Hfetch"> Fetch</h1>
<span class="fa fa-paw paw2"></span>
</a>
</div>
<div class="collapse navbar-collapse" id="fix">
<ul class="nav navbar-nav" id="onlyapp" id="moveRight">
<li><a href="#contact"><img src="images/avatar.svg" class="imagHumborger">הגדרות פרפיל </a></li>
<li class="active"><a href="listDogsPage.html"><img src="images/add-dog.svg" class="imagHumborger">הכלבים שלי</a></li>
<li class="active"><a href="#"><img src="images/animal.svg" class="imagHumborger">מעקב טיפול</a></li>
<li class="active"><a href="listDOT.html"><img src="images/dot.svg" class="imagHumborger">אזורים אזורים</a></li>
<li class="active"><a href="#"><img src="images/colar.svg" class="imagHumborger">מכשיר אלקטרוני</a></li>
<li class="active"><a href="#"><img src="images/logout.svg" class="imagHumborger"> התנתק\י</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="navbar navbar-custom navbar-static-top" id="notonapp">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="moveRight">
<ul class="nav navbar-nav" id="wi">
<li class="active"><a href="#">הגדרות</a></li>
<li class="active"><a href="#">טיפול משמעת</a></li>
<li class="active"><a href="#"> WIFI מעקב </a></li>
<li class="active"><a href="#"> GPS מעקב </a></li>
<li class="active"><a href="listDogsPage.html">הכלבים שלי</a></li>
<li><a href="index.html">בית</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</header>
<main>
<div class="container">
<div class="row" id="moveforme">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-md-4 col-xs-12 col-sm-6 col-lg-4">
<img alt="User Pic" src="https://x1.xingassets.com/assets/frontend_minified/img/users/nobody_m.original.jpg" id="profile-image1" class="img-circle img-responsive">
</div>
<div class="col-md-8 col-xs-12 col-sm-6 col-lg-8" >
<div class="container" >
<?php if($flag!=1) echo ' <h2>'.$Dname.'</h2>
<p>נוצר על ידי: <b>'.$_SESSION["name"].'</b></p>
</div>
<hr>
<ul class="container details" >
<li><p>מספר ציפ:'.$chipId.'</p></li>
<li><p> תאריך לידה: '.$birthDate.'</p></li>
</ul>
<hr>
<div class="col-sm-5 col-xs-6 tital " >תאריך ההוספה :'.date("d/m/Y").'</div>
<a href="listDogsPage.html" class="btn btn-primary btn-lg active " id="finalize" role="button">סיום</a></div>';
else echo '<h2>'. $message2 .'</h2>
<a href="AddDogPage.php" class="btn btn-primary btn-lg active " id="finalize" role="button">חזור</a></div>' ?>;
</div>
<!-- <div >
<h2><?php echo $name ?></h2>
<p>נוצר על ידי: <b><?php echo $Owner ?></b></p>
</div>
<hr>
<ul >
<li><p>מספר ציפ: <?php echo $snum ?></p></li>
<li><p> תאריך לידה<?php echo $birthDate ?></p></li>
</ul>
<hr>
<div class="col-sm-5 col-xs-6 tital " >תאריך ההוספה : 6 מאי </div>
<?php echo '<a href="listDogsPage.html" class="btn btn-primary btn-lg active " id="finalize" role="button">סיום</a></div>' ?>
</div>
</div>
</div>
</div>-->
</main>
<footer>
<div class="footer-top">
<div class="container">
<div class="col-lg-2 col-xs-12 text-center">
<a href="#"><i class="fa fa-facebook fa-2x"></i>Facebook</a>
</div>
<div class="col-lg-2 col-xs-12 text-center">
<a href="#"><i class="fa fa-twitter fa-2x"></i>Twitter</a>
</div>
<div class="col-lg-2 col-xs-12 text-center">
<a href="#"><i class="fa fa-flickr fa-2x"></i>Flickr</a>
</div>
<div class="col-lg-2 col-xs-12 text-center">
<a href="#"><i class="fa fa-tumblr fa-2x"></i>Tumblr</a>
</div>
<div class="col-lg-2 col-xs-12 text-center">
<a href="#"><i class="fa fa-github fa-2x"></i>Github</a>
</div>
<div class="col-lg-2 col-xs-12 text-center">
<a href="#"><i class="fa fa-google-plus fa-2x"></i>Google</a>
</div>
</div>
</div>
<div class="container" style="border-top:1px solid grey;">
<div class="row text-center">
<div class="col-lg-6 col-lg-offset-3">
<ul class="menu">
<li>
<a href="#">בית</a>
</li>
<li>
<a href="#">אודות</a>
</li>
<li>
<a href="#">Blog</a>
</li>
<li>
<a href="#">גלריה</a>
</li>
<li>
<a href="#">צור קשר</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="./includes/script.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>