-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaddSpecialist.php
137 lines (93 loc) · 3.61 KB
/
addSpecialist.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
<?php
session_start();
$pageName='Ajouter Spécialiste';
include_once 'assets/bootstrapAsset.php';
include_once 'autoload.php';
include_once 'isAdmin.php';
if (isset($_POST['submit'])) {
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
$address = $_POST['address'];
$phoneNumber = $_POST['phoneNumber'];
$profession = $_POST['profession'];
$description = $_POST['description'];
$image = $_FILES['image'];
$img_blob = file_get_contents($image['tmp_name']);
$specialist = new SpecialistRepository();
$specialist->insertSpecialist(array('lastName' => $lastName, 'firstName' => $firstName, 'email' => $email, 'address' => $address, 'phoneNumber' => $phoneNumber, 'profession' => $profession, 'description' => $description, 'image' => $img_blob));
}
?>
<link rel="stylesheet" href="css/adminMain.css">
</head>
<body>
<div class="container">
</div>
<div class="container add">
<div class="add__admin">
<div class="wavy">
<span style="--i:1;">A</span>
<span style="--i:2;">J</span>
<span style="--i:3;">O</span>
<span style="--i:4;">U</span>
<span style="--i:4;">T</span>
<span style="--i:5;">E</span>
<span style="--i:6;">R</span>
<span style="--i:7;"></span>
<span style="--i:8;"></span>
<span style="--i:9;">U</span>
<span style="--i:10;">N</span>
<span style="--i:11;"></span>
<span style="--i:12;"></span>
<span style="--i:13;">S</span>
<span style="--i:14;">P</span>
<span style="--i:15;">E</span>
<span style="--i:16;">C</span>
<span style="--i:17;">I</span>
<span style="--i:18;">A</span>
<span style="--i:19;">L</span>
<span style="--i:20;">I</span>
<span style="--i:21;">S</span>
<span style="--i:22;">T</span>
<span style="--i:23;">E</span>
</div>
<form method="post" enctype="multipart/form-data" action="addSpecialist.php">
<div class="form-group">
<h5>Nom:</h5>
<input type="text" name="lastName" class="form-control" placeholder="Nom Spécialiste">
</div>
<div class="form-group">
<h5>Prénom:</h5>
<input type="text" name="firstName" class="form-control" placeholder="Prénom Spécialiste">
</div>
<div class="form-group">
<h5>Email:</h5>
<input type="email" name="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Email Spécialiste">
</div>
<div class="form-group">
<h5>Informations:</h5>
<input type="text" name="description" class="form-control" placeholder="description">
</div>
<div class="form-group">
<h5>Profession:</h5>
<input type="text" name="profession" class="form-control" placeholder="Profession">
</div>
<div class="form-group">
<h5>Cabinet:</h5>
<input type="text" name="address" class="form-control" placeholder="Adresse Spécialiste">
</div>
<div class="form-group">
<h5>Numéro Téléphone:</h5>
<input type="text" name="phoneNumber" class="form-control" placeholder="Numéro De Téléphone">
</div>
<div class="form-group">
<h5>Photo de Profil:</h5>
<input class="form-control" name="image" id="formFile" type="file" accep="image/">
</div>
<button type="submit" name="submit" class="btn btn3">Submit</button>
</form>
</div>
</div>
<script src="js/admin.js"></script>
</body>
</html>