-
Notifications
You must be signed in to change notification settings - Fork 1
/
update-pwd.php
184 lines (172 loc) · 23.6 KB
/
update-pwd.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
<?php
require "header.php"
?>
<?php
require './includes/dbh.inc.php';
if(isset($_GET['update-submit'])){
$password = $_GET['up-pwd'];
$passwordCheck = $_GET['up-pwd-repeat'];
if($password != $passwordCheck){
header("location: update-pwd.php?error=passwordwrong");
}
else{
$takeMail = "SELECT min(idpwd),emailVerify from pwd_table;";
$check = mysqli_query($conn, $takeMail);
if($check){
$data = mysqli_fetch_array($check);
$realdata = $data[1];
$hashedUpdatedPwd = password_hash($password, PASSWORD_DEFAULT);
$query = "UPDATE users SET pwdUsers='$hashedUpdatedPwd' WHERE emailUsers='$realdata';";
$connect = mysqli_query($conn, $query);
if($connect){
$query = "DELETE FROM pwd_table WHERE emailVerify='$realdata'; ";
$check = mysqli_query($conn, $query);
if($check){
header("location: update-pwd.php?delete=success");
}
header("location: update-pwd.php?update=success");
}
else{
header("location: update-pwd.php?update=unsuccess");
}
}
else{
header("location: update-pwd.php?error=sqlerror");
}
}
}
if(isset($_GET['admin-update-submit'])){
$password = $_GET['admin-up-pwd'];
$passwordCheck = $_GET['admin-up-pwd-repeat'];
if($password != $passwordCheck){
header("location: update-pwd.php?error=passwordwrong");
}
else{
$takeMail = "SELECT min(idpwd),emailVerify from pwd_table;";
$check = mysqli_query($conn, $takeMail);
if($check){
$data = mysqli_fetch_array($check);
$realdata = $data[1];
$hashedUpdatedPwd = password_hash($password, PASSWORD_DEFAULT);
$query = "UPDATE admins SET adminPassword='$hashedUpdatedPwd' WHERE adminEmail='$realdata';";
$connect = mysqli_query($conn, $query);
if($connect){
$query = "DELETE FROM pwd_table WHERE emailVerify='$realdata'; ";
$check = mysqli_query($conn, $query);
if($check){
header("location: update-pwd.php?admin&delete=success");
}
header("location: update-pwd.php?admin&update=success");
}
else{
header("location: update-pwd.php?admin&update=unsuccess");
}
}
else{
header("location: update-pwd.php?admin&error=sqlerror");
}
}
}
?>
<body>
<style>
.section{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height:100%;
width: 100%;
background: #E0E0E0;
box-shadow: 0 25px 30px rgba(0, 0, 0, 0.5)
}
.imagebox{
width: calc(50% - 100px);
height: 100%;
background: #E0E0E0;
box-sizing: border-box;
}
.content{
width: calc(50% + 100px);
height: 100%;
background: #fff;
box-sizing: border-box;
border-left: 200px solid #E0E0E0;
border-bottom: 900px solid transparent;
}
</style>
<main class=" bg-color h-min-100">
<div class="d-flex section">
<div class="imagebox mt-1">
<div class="container">
<svg id="a3538d95-de03-4652-af87-43a4974fb51a" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="450" height="820.09338" viewBox="0 0 926.60132 820.09338"><title>updates</title><path d="M763.46667,639.95282l-.00048-2c3.97656-.001,8.01318-.083,11.999-.24219l.08008,1.998C771.53308,639.86981,767.4696,639.95184,763.46667,639.95282Zm-12.07519-.23144c-3.99805-.15625-8.05469-.39551-12.05664-.71094l.15722-1.99414c3.97608.31445,8.00586.55176,11.97754.707Zm36.21045-.73731-.15918-1.99414c3.96875-.31738,7.98535-.7207,11.9375-1.19824l.24023,1.98633C795.64148,638.25849,791.598,638.66376,787.60193,638.98407Zm-60.28711-1.166c-3.98779-.47754-8.01221-1.041-11.9624-1.67481l.31738-1.97461c3.92334.62988,7.92139,1.18945,11.88232,1.66309ZM811.58,636.08954l-.31934-1.97461c3.92236-.63379,7.89355-1.35937,11.80322-2.1543l.39844,1.959C819.52673,634.72138,815.52869,635.45087,811.58,636.08954ZM703.46765,633.987c-3.936-.79687-7.90186-1.68457-11.78857-2.63574l.47558-1.94336c3.86084.94629,7.8003,1.82715,11.70947,2.61816Zm131.78076-2.7168-.47851-1.9414c3.87256-.95313,7.772-1.99707,11.59033-3.10352l.55664,1.92188C843.07214,629.26044,839.14636,630.31122,835.24841,631.2702Zm-155.2417-3.03027c-3.85644-1.11328-7.73779-2.31836-11.53613-3.582l.63184-1.89844c3.77295,1.25586,7.62841,2.45313,11.459,3.5586Zm178.44141-3.68945-.63379-1.89649c3.77539-1.26172,7.57715-2.61816,11.30078-4.0332l.71094,1.86914C866.077,621.91474,862.2489,623.281,858.44812,624.55048ZM657.058,620.59833c-3.752-1.42188-7.53125-2.94141-11.2334-4.51856l.7837-1.83984c3.67724,1.56641,7.43164,3.07617,11.15869,4.48731ZM880.99792,615.986l-.78515-1.83984c3.65625-1.56152,7.32715-3.2168,10.91015-4.9209l.85938,1.80664C888.37488,612.74677,884.67859,614.41376,880.99792,615.986ZM634.786,611.111c-3.63281-1.7246-7.2749-3.54492-10.82471-5.41113l.93067-1.76953c3.52588,1.85254,7.14306,3.66113,10.75146,5.374Zm267.97656-5.4746-.93164-1.76954c3.52246-1.85351,7.05078-3.80175,10.48633-5.78906l1.00195,1.73047C909.86023,601.80927,906.30847,603.7702,902.76257,605.63642Zm-289.395-5.7793c-3.48535-2.01465-6.96631-4.12207-10.34668-6.26367l1.07032-1.68946c3.35742,2.127,6.81543,4.22071,10.27734,6.22266Zm310.26905-6.29883-1.07032-1.68945c3.35254-2.124,6.71485-4.34961,9.99317-6.61621l1.13672,1.64453C930.39636,589.17938,927.0116,591.42059,923.6366,593.55829Zm-330.69922-6.6377c-3.30713-2.28515-6.606-4.66406-9.80518-7.07128l1.20215-1.59766c3.17822,2.39062,6.45508,4.75391,9.73975,7.02441Zm350.54687-7.084-1.20312-1.59766c3.1709-2.38476,6.3457-4.874,9.43652-7.39941l1.26563,1.54883C949.872,574.93036,946.67566,577.43622,943.48425,579.83661Zm-369.86377-7.44629c-3.105-2.53711-6.20117-5.17187-9.20263-7.832l1.32617-1.49609c2.98193,2.6416,6.05761,5.25976,9.14209,7.77929Zm388.55811-7.82715-1.32617-1.49609c2.97949-2.64063,5.94629-5.37793,8.81738-8.13477l1.38476,1.44336C968.16492,559.15009,965.17859,561.905,962.17859,564.56317Zm-406.64112-8.19629c-2.88476-2.77148-5.75927-5.64453-8.543-8.53906l1.4414-1.38672c2.76563,2.876,5.6211,5.73047,8.48731,8.48242Zm424.061-8.53125-1.44141-1.38671c2.75684-2.86719,5.4961-5.833,8.14258-8.81641l1.4961,1.32812C985.13171,541.96259,982.3739,544.94892,979.59851,547.83563Zm-440.79736-8.8789c-2.66651-3.00586-5.30078-6.09864-7.83057-9.19239l1.54883-1.26562c2.51221,3.07324,5.12939,6.14551,7.77783,9.12988Zm456.83154-9.19434-1.54883-1.26562c2.52735-3.08985,5.02149-6.26758,7.41406-9.44434l1.59766,1.20313C1000.68738,523.4538,998.17566,526.652,995.63269,529.76239ZM523.51648,520.2702c-2.41016-3.20019-4.7876-6.49121-7.06592-9.7832l1.64453-1.13867c2.26319,3.27051,4.62451,6.54,7.019,9.71875Zm486.65625-9.8164-1.64453-1.13672c2.27148-3.28516,4.5039-6.6543,6.63379-10.01367l1.68945,1.07031C1014.70691,503.75556,1012.45984,507.14716,1010.17273,510.4538ZM509.78406,500.43036c-2.14307-3.37891-4.24756-6.84863-6.25537-10.31348l1.73046-1.00195c1.99414,3.44141,4.085,6.8877,6.21338,10.24414ZM1023.122,490.031l-1.73047-1.002c2.00195-3.46,3.95605-7,5.80859-10.5205l1.76953.93164C1027.10535,482.98407,1025.13757,486.54755,1023.122,490.031ZM497.69568,479.56122c-1.86328-3.53809-3.68067-7.16406-5.40137-10.77734L494.1,467.9245c1.70948,3.58887,3.51465,7.19043,5.36524,10.70508Zm536.69092-10.94238-1.80664-.85938c1.71191-3.60156,3.375-7.28906,4.9414-10.96094l1.83985.78516C1037.78406,461.28,1036.11023,464.99286,1034.3866,468.61884ZM487.33386,457.80341c-1.57519-3.6836-3.09277-7.44141-4.51123-11.16992l1.86914-.71094c1.40918,3.70215,2.91651,7.43554,4.481,11.09375Zm556.55274-11.45215-1.87012-.709c1.418-3.74121,2.77734-7.55468,4.03808-11.333l1.89649.63281C1046.68249,438.74677,1045.31433,442.58466,1043.8866,446.35126ZM478.75622,435.25849c-1.27343-3.80176-2.48535-7.68165-3.602-11.53028l1.9209-.55664c1.10938,3.82227,2.313,7.67578,3.57764,11.45215ZM1051.54089,423.406l-1.92187-.55469c1.10351-3.81641,2.14551-7.71582,3.09765-11.5918l1.94141.47656C1053.70007,415.63837,1052.65124,419.56513,1051.54089,423.406ZM472.02331,412.06122c-.96093-3.89453-1.854-7.8584-2.65576-11.7832l1.96-.40039c.7959,3.89843,1.68311,7.83691,2.63721,11.70507Zm585.27735-12.11035-1.96094-.39844c.791-3.89551,1.51367-7.86719,2.14844-11.80371l1.97461.31836C1058.8241,392.03,1058.09656,396.028,1057.30066,399.95087ZM467.19128,388.39618c-.64111-3.94824-1.21142-7.97168-1.69482-11.959l1.98535-.24024c.48047,3.96094,1.04688,7.957,1.68408,11.87891Zm593.95313-12.293-1.98633-.23828c.47559-3.959.877-7.97559,1.19141-11.938l1.99414.15821C1062.02624,368.0744,1061.62292,372.11786,1061.14441,376.10321ZM464.28406,364.42059c-.32276-3.99462-.56885-8.05126-.73145-12.05761l1.998-.08106c.16162,3.9795.40625,8.00928.72656,11.97754Zm598.77832-12.39111-1.99805-.0791c.15625-3.98535.23633-8.02148.23633-11.99658l-.001-.6626h2l.001.6582C1063.30066,343.95477,1063.22058,348.01727,1063.06238,352.02948ZM465.30017,340.28534h-2l.00049-.33594c0-3.90136.07568-7.85254.22558-11.73877l1.99805.07715c-.14844,3.86084-.22363,7.78565-.22363,11.666ZM1061.036,327.29755c-.165-3.97119-.41309-8.001-.73926-11.97656l1.99414-.16309c.32715,4.00244.57715,8.05859.74317,12.05664ZM466.225,316.30976l-1.99414-.15625c.31446-4.00489.71387-8.04883,1.18653-12.02051l1.98633.23633C466.934,308.31464,466.53747,312.33222,466.225,316.30976Zm592.855-12.9253c-.48243-3.94433-1.05274-7.94043-1.69727-11.87695l1.97461-.32275c.64746,3.96289,1.22266,7.98583,1.707,11.95751Zm-590.02-10.89795-1.97461-.3164c.63379-3.96,1.35693-7.95948,2.15039-11.88623l1.96.3955C470.40808,284.58026,469.68982,288.55243,469.05994,292.48651Zm586.147-12.77881c-.80274-3.9082-1.69434-7.84472-2.65039-11.70166l1.9414-.48144c.96289,3.88281,1.86036,7.84668,2.668,11.78076ZM473.80652,268.96893l-1.94287-.4746c.95117-3.89258,1.99609-7.82032,3.10547-11.67481l1.92187.55322C475.78894,261.20136,474.75134,265.10272,473.80652,268.96893Zm575.62793-12.54785c-1.11328-3.81982-2.32032-7.67187-3.58985-11.44873l1.89649-.63672c1.27734,3.80225,2.49316,7.68018,3.61328,11.52588Zm-568.9917-10.50879-1.89795-.63086c1.26562-3.8081,2.62891-7.64843,4.05224-11.41406l1.8711.707C483.05408,238.31513,481.69958,242.12958,480.44275,245.91229Zm561.34912-12.23388c-1.4209-3.72022-2.93262-7.45117-4.49316-11.08985l1.83789-.78808c1.57128,3.66308,3.09375,7.41894,4.52441,11.16406Zm-552.8418-10.26563-1.84082-.7832c1.57178-3.69482,3.2417-7.40967,4.96289-11.04l1.80713.85645C492.16931,216.05243,490.51111,219.74237,488.95007,223.41278Zm543.40918-11.72754c-1.71191-3.585-3.52051-7.18457-5.376-10.69873l1.76757-.93408c1.86914,3.53809,3.69043,7.16162,5.41309,10.77149Zm-533.11084-9.99463-1.77148-.92871c1.86426-3.55322,3.82812-7.11865,5.83642-10.59765l1.73243,1C503.05066,194.61981,501.1,198.16181,499.24841,201.69061ZM1021.17663,190.51c-2-3.44287-4.09375-6.88721-6.2246-10.23828l1.6875-1.07324c2.1455,3.37353,4.25293,6.84131,6.2666,10.30664Zm-509.91455-9.62646-1.69043-1.06934c2.14551-3.39209,4.38916-6.78613,6.668-10.0874l1.64551,1.13623C515.62146,174.14227,513.39343,177.51337,511.26208,180.88349Zm497.05616-10.59473c-2.26856-3.269-4.63379-6.53662-7.0293-9.71045l1.5957-1.20508c2.41211,3.19531,4.793,6.48438,7.07617,9.77588Zm-483.41358-9.16992-1.59863-1.20117c2.41016-3.208,4.91748-6.40918,7.45215-9.51563l1.5498,1.26465C529.78992,154.75214,527.29919,157.93231,524.90466,161.11884Zm468.96924-9.96436c-2.52246-3.07764-5.14355-6.14648-7.78809-9.12109l1.49415-1.3291c2.66308,2.99463,5.30078,6.084,7.84082,9.18261Zm-453.791-8.63428-1.49707-1.32519c2.65528-3,5.40967-5.98926,8.187-8.88477l1.44336,1.38477C545.4574,136.571,542.72107,139.54071,540.08288,142.5202Zm437.8545-9.292c-2.76758-2.87158-5.626-5.72217-8.49707-8.47314l1.38379-1.44434c2.88964,2.76953,5.76757,5.63916,8.55273,8.52979Zm-421.24366-8.0249L555.307,123.7619c2.88574-2.77685,5.86962-5.53466,8.86767-8.19775l1.32813,1.49512C562.52429,119.70477,559.56042,122.445,556.69372,125.20331Zm403.91749-8.57666c-2.98829-2.64209-6.06739-5.25635-9.1504-7.76953l1.26368-1.55029c3.10351,2.53027,6.20312,5.16162,9.21093,7.82177Zm-385.98243-7.35059-1.26757-1.54687c3.103-2.54151,6.29638-5.05078,9.49072-7.459l1.2041,1.59668C580.88269,104.259,577.71081,106.75214,574.62878,109.27606Zm367.374-7.81689c-3.19043-2.39453-6.47071-4.7544-9.74707-7.01416l1.13476-1.64649c3.29883,2.27491,6.60059,4.6504,9.81348,7.061ZM593.77185,94.841l-1.13965-1.64356c3.29688-2.28467,6.6792-4.5293,10.05322-6.67187l1.07227,1.68847C600.40613,90.342,597.04626,92.57147,593.77185,94.841Zm328.45947-7.01465c-3.37207-2.12989-6.832-4.21924-10.28515-6.21l1-1.73243c3.47461,2.00391,6.958,4.10743,10.35351,6.25147ZM613.9989,81.99579l-1.00342-1.73047c3.458-2.00537,7.00781-3.97021,10.54981-5.83887l.93359,1.76856C620.95984,78.05145,617.434,80.00311,613.9989,81.99579Zm287.419-6.17139c-3.53223-1.85058-7.15137-3.65478-10.75782-5.3623l.85547-1.80762c3.63086,1.71875,7.27539,3.53516,10.83008,5.39844Zm-266.2378-5-.86084-1.80566c3.60645-1.71924,7.3003-3.39014,10.9795-4.96631l.7871,1.83838C642.43152,67.45624,638.76208,69.11591,635.18005,70.8244Zm244.51026-5.28564c-3.67578-1.561-7.43164-3.06641-11.16407-4.47559l.707-1.87109c3.75683,1.41846,7.53906,2.93457,11.23828,4.50586ZM657.17859,61.40351l-.7124-1.86915c3.74218-1.42675,7.56835-2.79687,11.37207-4.07275l.63574,1.89648C664.69617,58.62518,660.89587,59.98651,657.17859,61.40351Zm200.00683-4.35987c-3.77929-1.25342-7.63574-2.44629-11.46289-3.54541l.55274-1.92187c3.85254,1.10644,7.73437,2.30713,11.53906,3.56884ZM679.92566,53.77313l-.5586-1.91992c3.8462-1.11914,7.771-2.1748,11.665-3.13818l.48047,1.9414C687.64441,51.61347,683.746,52.66229,679.92566,53.77313Zm154.19971-3.352c-3.86133-.94189-7.80225-1.81836-11.71241-2.605l.39453-1.96093c3.93653.792,7.90381,1.6748,11.79151,2.62255ZM703.21521,48.01337l-.40137-1.959c3.9209-.80273,7.918-1.53711,11.88037-2.1831l.32227,1.97363C711.08,46.487,707.10974,47.21649,703.21521,48.01337ZM810.60535,45.6872c-3.93311-.627-7.93164-1.18262-11.88477-1.65039l.23535-1.98633c3.97949.47119,8.00488,1.03027,11.96387,1.66211Zm-83.71094-1.53272-.24219-1.98535c3.97852-.48437,8.02149-.895,12.0166-1.21924l.16211,1.99317C734.86218,43.26581,730.84607,43.673,726.89441,44.15448Zm59.88574-1.28955c-3.96484-.30908-7.99512-.54248-11.97852-.69336l.07618-1.999c4.00976.15234,8.0664.38721,12.05761.69824ZM750.808,42.21015l-.082-1.998c3.999-.165,8.062-.252,12.07617-.25879l.00293,2C758.81775,41.96015,754.78113,42.04657,750.808,42.21015Z" transform="translate(-136.69934 -39.95331)" fill="#3f3d56"/><rect x="65.42129" y="175.23125" width="513.06593" height="631.13187" fill="#f2f2f2"/><rect x="65.42129" y="140.50598" width="513.06593" height="70.31868" fill="#28ab87"/><rect x="18.331" y="639.3763" width="632" height="162.71655" fill="#3f3d56"/><circle cx="93.85847" cy="720.48846" r="44.27473" fill="#28ab87"/><rect x="186.74858" y="683.15879" width="183.17582" height="13.02198" fill="#fff"/><rect x="186.74858" y="714.41153" width="403.68132" height="13.02198" fill="#fff"/><rect x="186.74858" y="745.66428" width="403.68132" height="13.02198" fill="#fff"/><circle cx="137.04217" cy="313.26422" r="44.27473" fill="#28ab87"/><rect x="216.9103" y="282.01147" width="151.6617" height="13.02198" fill="#fff"/><rect x="216.9103" y="313.26422" width="334.23077" height="13.02198" fill="#fff"/><rect x="216.9103" y="344.51697" width="334.23077" height="13.02198" fill="#fff"/><circle cx="137.04217" cy="516.73556" r="44.27473" fill="#28ab87"/><rect x="216.9103" y="485.48281" width="151.6617" height="13.02198" fill="#fff"/><rect x="216.9103" y="516.73556" width="334.23077" height="13.02198" fill="#fff"/><rect x="216.9103" y="547.98831" width="334.23077" height="13.02198" fill="#fff"/><rect x="78.44327" y="154.39609" width="65.97802" height="9.54945" fill="#fff"/><rect x="78.44327" y="170.8906" width="65.97802" height="9.54945" fill="#fff"/><rect x="78.44327" y="187.3851" width="65.97802" height="9.54945" fill="#fff"/><rect x="57.71479" y="509.26561" width="2" height="135.18066" fill="#3f3d56"/><circle cx="58.71463" cy="509.26596" r="19.11639" fill="#3f3d56"/><path d="M195.414,632.53362s-2.73091-58.73613-58.71463-51.90885" transform="translate(-136.69934 -39.95331)" fill="#3f3d56"/><path d="M811.82412,421.21107l-22.825,43.0163S623.957,495.83118,645.02623,544.99266,689.7983,666.1406,702.08867,664.38483s79.88741-40.38264,82.52106-51.79513-60.574-64.96339-60.574-64.96339L828.50391,527.435s14.924,70.23069-4.38942,118.51429-30.72592,179.08826-17.55767,180.844,46.52783,12.29037,61.45186,2.63365,21.94709-221.22668,21.94709-221.22668,31.60381-138.70561,12.29037-154.50752S811.82412,421.21107,811.82412,421.21107Z" transform="translate(-136.69934 -39.95331)" fill="#2f2e41"/><path d="M847.69094,805.46473s-20.173-10.61738-24.42-2.12348c0,0,3.18521,25.4817-9.55563,28.66691s-18.04954,25.48169,0,27.60517,29.72864-4.24695,36.09906-4.24695,0-22.29648,0-22.29648Z" transform="translate(-136.69934 -39.95331)" fill="#2f2e41"/><path d="M751.47576,629.23038s-21.95838-6.12439-24.31858,3.0741c0,0,8.48731,24.23692-3.29529,30.03736s-12.26989,28.715,5.82154,26.98435S757.84787,678.9054,764.075,677.562s-4.702-21.795-4.702-21.795Z" transform="translate(-136.69934 -39.95331)" fill="#2f2e41"/><path d="M860.54667,269.77614s.87788,32.4817-5.26731,35.11535S889.51683,323.327,889.51683,323.327l7.02306-12.29037s-7.90095-43.89418-6.14518-47.40571S860.54667,269.77614,860.54667,269.77614Z" transform="translate(-136.69934 -39.95331)" fill="#9f616a"/><circle cx="738.49587" cy="183.38155" r="53.82638" fill="#2f2e41"/><circle cx="742.20803" cy="132.99122" r="22.27298" fill="#2f2e41"/><path d="M849.21006,160.88a22.27528,22.27528,0,0,1,19.95288-22.15256,22.52015,22.52015,0,0,0-2.3201-.12042,22.273,22.273,0,0,0,0,44.546,22.52015,22.52015,0,0,0,2.3201-.12042A22.27528,22.27528,0,0,1,849.21006,160.88Z" transform="translate(-136.69934 -39.95331)" fill="#2f2e41"/><circle cx="737.01558" cy="209.63151" r="36.87111" fill="#9f616a"/><path d="M899.61249,297.42948s-31.60381,9.65672-47.40572,0-53.5509,18.43555-59.69609,30.72592,22.825,24.58074,22.825,24.58074-8.27277,23.73379-6.58413,35.55429c1.75577,12.29037-1.31682,37.31006-1.31682,37.31006s77.5575,51.09751,94.81143,28.09227c2.63365-3.51153,24.58074-86.03259,24.58074-86.03259l30.72593-30.72593s-19.31344-28.09228-30.72593-30.72593S899.61249,297.42948,899.61249,297.42948Z" transform="translate(-136.69934 -39.95331)" fill="#d0cde1"/><path d="M687.60359,477.83456s-59.69609,30.72593-47.40572,39.50477,62.32974-34.23747,62.32974-34.23747Z" transform="translate(-136.69934 -39.95331)" fill="#9f616a"/><path d="M921.99852,455.88747s-26.56173-17.93372-30.83854-8.96686,29.08277,29.15819,36.10584,21.25723S921.99852,455.88747,921.99852,455.88747Z" transform="translate(-136.69934 -39.95331)" fill="#9f616a"/><path d="M941.7509,327.27752l15.80191,9.65672s53.5509,73.74222,35.11534,90.422-65.84127,50.03937-65.84127,50.03937-15.80191-22.825-10.5346-23.70286S963.698,417.69953,963.698,417.69953l-36.87111-68.47492Z" transform="translate(-136.69934 -39.95331)" fill="#d0cde1"/><path d="M803.04529,323.766,791.6328,328.1554l-29.848,53.5509-79.00953,95.68932s10.5346,16.67979,19.31344,13.16826,74.62011-77.25376,74.62011-77.25376l43.0163-66.71916Z" transform="translate(-136.69934 -39.95331)" fill="#d0cde1"/><ellipse cx="738.49587" cy="165.82376" rx="37.12164" ry="22.27298" fill="#2f2e41"/></svg>
</div>
</div>
<div class="content container">
<div style="padding-top:160px;">
<h1 style="font-size:30px;" class="mt-lg text-center mb-1">Update password</h1>
<div class="text-center container">
<div class="container">
<div class="container">
<hr>
</div>
</div>
</div>
<div class="container text-center">
<?php
if(isset($_GET["update"])){
if($_GET["update"] == "success"){
echo"<p class='pt-1' style='font-size:12px; color:green'>Password updated successfully</p>";
}
elseif($_GET["update"] == "unsuccess"){
echo"<p class='pt-1' style='font-size:12px; color:red'>Password not updated</p>";
}
}
if(isset($_GET["error"])){
if($_GET["error"] == "passwordwrong"){
echo"<p class='pt-1' style='font-size:12px; color:red'>Password does not match</p>";
}
elseif($_GET["error"] == "unsuccess"){
echo"<p class='pt-1' style='font-size:12px; color:red'>Update problem</p>";
header("location: forget-pwd.php");
}
}
?>
<div>
<?php
if(isset($_GET['admin'])){
?>
<form action="" method="GET">
<input type="password" class="input-field" name="admin-up-pwd" placeholder="Enter your new password..."><br>
<input type="password" class="input-field" name="admin-up-pwd-repeat" placeholder="Repeat Password..."><br>
<button style="width:140px;background:#28AB87" class="btn button-field" type='submit' name='admin-update-submit'>Submit</button>
</form>
<?php
}
else{
?>
<form action="" method="GET">
<input type="password" class="input-field" name="up-pwd" placeholder="Enter your new password..."><br>
<input type="password" class="input-field" name="up-pwd-repeat" placeholder="Repeat Password..."><br>
<button style="width:140px;background:#28AB87" class="btn button-field" type='submit' name='update-submit'>Submit</button>
<?php
if(isset($_GET["admin"])){
if($_GET["update"] == "success"){
echo"<div class='logincard'><a style='width:140px;background:#28AB87' class='btn button-field text-deco-none' href='admin/admin.php'>Back to Login</a></div>";
}
}
if(isset($_GET["update"])){
if($_GET["update"] == "success"){
echo"<div class='logincard'><a style='width:140px;background:#28AB87' class='btn button-field text-deco-none' href='login.php'>Back to Login</a></div>";
}
}
}
?>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
</body>