-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoruddoctor.php
More file actions
127 lines (124 loc) · 5.99 KB
/
voruddoctor.php
File metadata and controls
127 lines (124 loc) · 5.99 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
<?php
include_once("header.php");
?>
<nav>
<ol class="breadcrumb px-3 bg-light">
<li class="breadcrumb-item"><a href="asli.php">صفحه اصلی</a></li>
<li class="breadcrumb-item active">ورود کاربران </li>
</ol>
</nav>
</header>
<div class="py-3">
<div class="container" align="center">
<form id="login" method="post">
<div class="col-md-4" align="start">
<label>نام کاربری</label>
<input type="text" name="username" class="form-control formColor">
</div>
<br />
<div class="col-md-4" align="start">
<label>رمز عبور</label>
<input type="password" name="password" class="form-control formColor">
</div>
<div class="form-check col-md-4" align="start">
<input class="form-check-input" type="checkbox" id="sampleCheck" data-bs-toggle="modal" data-bs-target="#newModal">
<label for="sampleCheck" class="form-check-label">رمز عبور خود را فراموش کرده ام.</label>
</div>
<br />
<input type="submit" name="submit" class="btn btn-success subBtn" value="ورود" />
</form>
<div id="message">
<?php
if(isset($_POST['submit'])){
$username = $_POST['username'];
$password = $_POST['password'] ;
$doctor = new DoctorController();
$message = new Message();
$doctor->username = $username;
$doctor->password = $password;
$message = $doctor->UsersLogin();
if($message->GetMessageType() == true){
header("location: asli.php");
}
else if($message->GetMessageType() == false){
$patient = new PatientController();
$patient->username = $username;
$patient->password = $password;
$message = $patient->PatientLogin();
if($message->GetMessageType() == true){
header("location: asli.php");
}
else{
ShowNotification($message->GetMessage(), 0, "450px", "50px");
}
}
}
?>
</div>
</div>
</div>
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-3 border-top">
<p class="col-md-4 mt-0 text-muted">
آدرس : رشت، گلسار، نبش کوچه 110
<br>
ساختمان سلامت
</p>
<div class="col-md-4 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto text-decoration-none">
<img src="img/clinic.jpg" class="rounded" width="150">
</div>
<div class="col-md-4 mb-0 text-muted">
شماره های تماس :
<p class="d-flex justify-content-end">013-32117683</p>
<p class="d-flex justify-content-end">013-32117689</p>
</p>
</footer>
</div>
<div class="modal fade" id="newModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h3>فراموشی رمز عبور</h3>
</div>
<div class="modal-body" align="center">
<div class="container-fluid">
<form id="reset-password" method="post">
<div class="col-md-8" align="start">
<label>لطفا آدرس ایمیل خود را وارد کنید</label>
<input type="text" id="email" class="form-control formColor">
<br />
</div>
<a href="panelbimar.html">
<input type="submit" class="btn btn-success subBtn" value="تایید ایمیل" />
</a>
</form>
</div>
<div id="request-message"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger exitModal" data-bs-dismiss="modal">بستن</button>
</div>
</div>
</div>
</div>
<script src="js/bootstrap.bundle.js"></script>
<script src="jquery-3.6.4.js"></script>
<script>
$(document).ready(function(){
$('#sampleCheck').click(function(){
$('#newModal').modal('show');
})
})
</script>
<script>
$(document).ready(function(){
$('#reset-password').submit(function(event){
event.preventDefault();
var email = $("#email").val();
$("#request-message").load("Includes/ResetPasswordRequest.Include.php",
{email: email});
})
})
</script>
</body>
</html>