Advertisement
Guest User

Untitled

a guest
May 12th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.45 KB | None | 0 0
  1. <?php
  2. require_once __DIR__ . '/databaseManager.php';
  3. use Nowaste\Database;
  4.  
  5. class User
  6. {
  7. private $id;
  8. private $firstName;
  9. private $lastName;
  10. private $email;
  11. private $role;
  12. private $rue;
  13. private $postalCode;
  14. private $city;
  15. private $password;
  16.  
  17.  
  18. public function __construct($firstName, $lastName, $email, $role, $rue, $postalCode, $city, $password, $photo = null)
  19. {
  20.  
  21. $this->setFirstName($firstName);
  22. $this->setLastName($lastName);
  23. $this->setEmail($email);
  24. $this->setRole($role);
  25. $this->setRue($rue);
  26. $this->setPostalCode($postalCode);
  27. $this->setCity($city);
  28. $this->setPassword($password);
  29. }
  30.  
  31.  
  32. public function registerUser()
  33. {
  34. // Sécuriser les entrées avec les setters
  35. // Vérifier que les informations rentrées sont bonnes
  36. $database = DatabaseManager::getManager();
  37.  
  38. $this->email = htmlspecialchars($_POST['email']);
  39. $this->password = hash('sha256', $_POST['password']);
  40. $this->mdp2 = hash('sha256', $_POST['password2']);
  41. $this->role = htmlspecialchars($_POST['role']);
  42. $this->lastName = htmlspecialchars($_POST['nom']);
  43. $this->firstName = htmlspecialchars($_POST['prenom']);
  44. $this->rue = htmlspecialchars($_POST['rue']);
  45. $this->city = htmlspecialchars($_POST['ville']);
  46. $this->postalCode = htmlspecialchars($_POST['code_postal']);
  47. $mailexist = $database->exec("SELECT Email FROM utilisateurs WHERE Email = ?", [$this->email]);
  48.  
  49. if (isset($_POST['forminscription'])) {
  50.  
  51. if ($mailexist == 0) {
  52.  
  53. if ($_POST['password'] == $_POST['password2']) {
  54.  
  55. if ($this->role == "Benevole") {
  56.  
  57. if(empty($_POST['conducteur']))
  58. {
  59. $_FILES['img_conducteur'] == 'default.jpg';
  60. }
  61. if(empty($_POST['cuisinier']))
  62. {
  63. $_FILES['img_cuisinier']['name'] == 'default.jpg';
  64. }
  65. if(empty($_POST['service']))
  66. {
  67. $_FILES['img_service'] == 'default.jpg';
  68. }
  69. if(empty($_POST['gardiennage']))
  70. {
  71. $_FILES['img_gardiennage'] == 'default.jpg';
  72. }
  73. if(empty($_POST['autre']))
  74. {
  75. $_FILES['img_autre'] == 'default.jpg';
  76. }
  77.  
  78.  
  79. $taillemax = 2097152; //taille de 2mo
  80. $extensionvalides = array('jpg', 'jpeg', 'png', 'gif');
  81. //var_dump($_FILES);
  82. if ($_FILES['img_conducteur']['size'] <= $taillemax
  83. AND $_FILES['img_cuisinier']['size'] <= $taillemax
  84. AND $_FILES['img_service']['size'] <= $taillemax
  85. AND $_FILES['img_gardiennage']['size'] <= $taillemax
  86. AND $_FILES['img_autre']['size'] <= $taillemax) //si la taille est < ou = a 2 mo
  87. {
  88.  
  89. $extensionupload_con = strtolower(substr(strrchr($_FILES['img_conducteur']['name'], '.'), 1));
  90. $extensionupload_cui = strtolower(substr(strrchr($_FILES['img_cuisinier']['name'], '.'), 1));
  91. $extensionupload_ser = strtolower(substr(strrchr($_FILES['img_service']['name'], '.'), 1));
  92. $extensionupload_gar = strtolower(substr(strrchr($_FILES['img_gardiennage']['name'], '.'), 1));
  93. $extensionupload_aut = strtolower(substr(strrchr($_FILES['img_autre']['name'], '.'), 1));
  94. //strrchr renvoie l'extension avec le point (« . »).
  95. //substr(chaine,1) ignore le premier caractère de chaine.
  96. //strtolower met l'extension en minuscules.
  97.  
  98. if (in_array($extensionupload_con, $extensionvalides)
  99. OR in_array($extensionupload_cui, $extensionvalides)
  100. OR in_array($extensionupload_ser, $extensionvalides)
  101. OR in_array($extensionupload_gar, $extensionvalides)
  102. OR in_array($extensionupload_aut, $extensionvalides)) // on regarde dans le tableau extensionvalide si la variable extensionupload y est.
  103.  
  104. {
  105. $uniqueFilename = uniqid();
  106. $chemin = "img/" . $uniqueFilename . "." . $extensionupload_con; //chemin pour mettre l'image dans notre dossier
  107. $resultat = move_uploaded_file($_FILES['img_conducteur']['tmp_name'], $chemin);
  108.  
  109. $uniqueFilename_2 = uniqid();
  110. $chemin = "img/" . $uniqueFilename . "." . $extensionupload_cui; //chemin pour mettre l'image dans notre dossier
  111. $resultat_2 = move_uploaded_file($_FILES['img_cuisinier']['tmp_name'], $chemin);
  112.  
  113. if ($resultat OR $resultat_2) {
  114.  
  115. $sql = 'INSERT INTO utilisateurs (Nom,Prenom,Email,Role,Rue,Code_postal,Ville,Pass,conducteur,cuisinier,service,gardiennage,autre,img_conducteur, img_cuisinier) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
  116. $insertInto = $database->exec($sql, [
  117. $this->lastName,
  118. $this->firstName,
  119. $this->email,
  120. $this->role,
  121. $this->rue,
  122. $this->postalCode,
  123. $this->city,
  124. $this->password,
  125. $_POST['conducteur'],
  126. $_POST['cuisinier'],
  127. $_POST['service'],
  128. $_POST['gardiennage'],
  129. $_POST['autre'],
  130. $uniqueFilename . "." . $extensionupload_con,
  131. $uniqueFilename_2 . "." . $extensionupload_cui
  132. ]);
  133.  
  134. //header("Location: connexion.php");
  135. //exit();
  136. } else {
  137. $erreur = "<div class = 'alert alert-danger'> <strong> Erreur </strong></div>";
  138. if (isset($erreur)) {
  139. echo $erreur;
  140. }
  141. exit();
  142. }
  143. } else {
  144. $erreur = "<div class = 'alert alert-danger'> <strong> Vos photos doivent être au format : jpg / jpeg / png / gif </strong></div>";
  145. if (isset($erreur)) {
  146. echo $erreur;
  147. }
  148. exit();
  149. }
  150. } else {
  151. $erreur = "<div class = 'alert alert-danger'> <strong> Vos photos ne doivent pas dépasser 2 mo </strong></div>";
  152. if (isset($erreur)) {
  153. echo $erreur;
  154. }
  155. exit();
  156. }
  157.  
  158. }
  159.  
  160. $sql = 'INSERT INTO utilisateurs (Nom,Prenom,Email,Role,Rue,Code_postal,Ville,Pass) VALUES(?,?,?,?,?,?,?,?)';
  161. $insertInto = $database->exec($sql, [
  162. $this->lastName, $this->firstName, $this->email,
  163. $this->role, $this->rue, $this->postalCode, $this->city, $this->password
  164. ]);
  165.  
  166.  
  167. if ($this->role == "Commercant") {
  168.  
  169. $sql = 'SELECT ID_Utilisateurs FROM utilisateurs WHERE Email = ?';
  170. $ID_Owner = $database->findOne($sql, [$this->email]);
  171.  
  172.  
  173. $this->nom_societe = htmlspecialchars($_POST['nom_societe']);
  174. $this->telephone_societe = htmlspecialchars($_POST['telephone_societe']);
  175. $this->adresse_societe = htmlspecialchars($_POST['adresse_societe']);
  176. $this->ville_societe = htmlspecialchars($_POST['ville_societe']);
  177. $this->code_postal_societe = htmlspecialchars($_POST['code_postal_societe']);
  178.  
  179. $sql = 'INSERT INTO society
  180. (Nom, Tel, Rue, Ville, Code_Postal)
  181. VALUES
  182. ( ?, ?, ?, ?, ?)';
  183.  
  184. $insertInto = $database->exec(
  185. $sql,
  186. [
  187. $this->nom_societe,
  188. $this->telephone_societe,
  189. $this->adresse_societe,
  190. $this->ville_societe,
  191. $this->code_postal_societe
  192. ]
  193. );
  194. $sql = 'SELECT ID_Society FROM society WHERE Tel = ?';
  195. $ID_Society = $database->findOne($sql, [$this->telephone_societe]);
  196.  
  197. $ID_Owner = $ID_Owner["ID_Utilisateurs"];
  198. $ID_Society = $ID_Society["ID_Society"];
  199.  
  200. $sql2 = 'INSERT INTO manage
  201. (ID_Society, ID_Utilisateurs)
  202. VALUES
  203. (?, ?)';
  204. $insertInto = $database->exec(
  205. $sql2,
  206. [
  207. $ID_Society,
  208. $ID_Owner
  209. ]
  210. );
  211. }
  212.  
  213. //header('Location: connexion.php');
  214. //exit();
  215. } else {
  216. $erreur = "<div class = 'alert alert-danger'> <strong> Les mot de passe ne correspondent pas ! </strong></div>";
  217. if (isset($erreur)) {
  218. echo $erreur;
  219. }
  220. }
  221. } else {
  222. $erreur = "<div class = 'alert alert-danger'> <strong> Ce mail est déjà utilisé ! </strong></div>";
  223. if (isset($erreur)) {
  224. echo $erreur;
  225. }
  226. }
  227. }
  228. }
  229.  
  230. public function connectUser()
  231. {
  232.  
  233. $database = DatabaseManager::getManager();
  234. //$mailexist = $database->exec("SELECT Email FROM utilisateurs WHERE Email = ?", ['email']);
  235. $this->email = htmlspecialchars($_POST['email']);
  236. $this->password = hash('sha256', $_POST['password']);
  237. $sql = 'SELECT * FROM utilisateurs WHERE Email = ? AND Pass = ?';
  238.  
  239. if (isset($_POST['formconnexion'])) {
  240.  
  241. if (!empty($_POST['email']) and !empty($_POST['password'])) {
  242.  
  243. $this->counter = $database->exec($sql, [$this->email, $this->password]);
  244. //$userexist = $database-> rowcount();
  245.  
  246. if ($this->counter == 1) {
  247.  
  248. $userinfo = $database->findOne($sql, [$this->email, $this->password]);
  249. //var_dump('userinfo :' . $userinfo);
  250. $_SESSION['ID_Utilisateurs'] = $userinfo['ID_Utilisateurs'];
  251. //$_SESSION['Prenom'] = $userinfo['Prenom'];
  252. //$_SESSION['Email'] = $userinfo['Email'];
  253.  
  254. header('Location: profil.php');
  255. //var_dump($userinfo);
  256. exit();
  257. } else {
  258. $erreur = "<div class = 'alert alert-danger'> <strong> Email ou mot de passe incorrect</strong></div>";
  259. if (isset($erreur)) {
  260. echo $erreur;
  261. }
  262. }
  263. } else {
  264.  
  265. $erreur = "<div class = 'alert alert-danger'> <strong>Tous les champs doivent être complétés ! </strong></div> ";
  266. if (isset($erreur)) {
  267. echo $erreur;
  268. }
  269. }
  270. }
  271. }
  272.  
  273. public static function initSession()
  274. {
  275. //var_dump($_SESSION['Prenom']);
  276.  
  277. $database = DatabaseManager::getManager();
  278. $sql = 'SELECT * FROM utilisateurs WHERE ID_Utilisateurs = ?';
  279.  
  280. $sql_society = 'SELECT * FROM society WHERE ID_Society = ?';
  281. $sql_manage = 'SELECT ID_Society FROM manage WHERE ID_Utilisateurs = ?';
  282.  
  283. if (!empty($_SESSION["ID_Utilisateurs"])) {
  284.  
  285. $_SESSION['user'] = $database->findOne($sql, [$_SESSION["ID_Utilisateurs"]]);
  286. //$_SESSION['society'] = $database->findOne($sql,[$_SESSION["ID_Society"]]);
  287.  
  288. if ($_SESSION['user']['Role'] == 'Commercant') {
  289.  
  290. $ID_Society = $database->findOne($sql_manage, [$_SESSION["ID_Utilisateurs"]]);
  291. $ID_Society = $ID_Society["ID_Society"];
  292. $_SESSION['society'] = $database->findOne($sql_society, [$ID_Society]);
  293. }
  294. }
  295. }
  296.  
  297. public function editSession()
  298. {
  299. if (isset($_SESSION['user'])) {
  300.  
  301. $database = DatabaseManager::getManager();
  302.  
  303. $this->newfirstname = htmlspecialchars($_POST['newfirstname']);
  304. $this->newlastname = htmlspecialchars($_POST['newlastname']);
  305. $this->newmail = htmlspecialchars($_POST['newmail']);
  306. $this->newmdp1 = hash('sha256', $_POST['newmdp1']);
  307. $this->newmdp2 = hash('sha256', $_POST['newmdp2']);
  308. $this->newadresse = htmlspecialchars($_POST['newadresse']);
  309. $this->newpostal = htmlspecialchars($_POST['newpostal']);
  310. $this->newcity = htmlspecialchars($_POST['newcity']);
  311.  
  312. $sql3 = 'SELECT * FROM utilisateurs WHERE ID_Utilisateurs = ? ';
  313. $this->userinfo = $database->findOne($sql3, [$_SESSION["ID_Utilisateurs"]]);
  314.  
  315. $requsername = 'SELECT * FROM utilisateurs WHERE Prenom = ? AND Nom = ? ';
  316. $this->usernameexist = $database->exec($requsername, [$this->newfirstname, $this->newlastname]);
  317.  
  318. $reqmail = 'SELECT * FROM utilisateurs WHERE Email = ? ';
  319. $this->mailexist = $database->exec($reqmail, [$this->newmail]);
  320.  
  321.  
  322. if (isset($_POST['newfirstname']) and !empty($_POST['newfirstname']) and $_POST['newfirstname'] != $_SESSION["user"]["Prenom"]) {
  323.  
  324. $insertpseudo = "UPDATE utilisateurs SET Prenom = ? WHERE ID_Utilisateurs = ?";
  325.  
  326. $this->insertInto = $database->exec($insertpseudo, [$this->newfirstname, $_SESSION["ID_Utilisateurs"]]);
  327.  
  328. $success = "<div class = 'alert alert-success'> <strong>Votre Prenom à été modifié avec succès </strong></div> ";
  329. if (isset($success)) {
  330. echo $success;
  331. }
  332. }
  333.  
  334. if (isset($_POST['newlastname']) and !empty($_POST['newlastname']) and $_POST['newlastname'] != $_SESSION["user"]["Nom"]) {
  335.  
  336. $insertpseudo = "UPDATE utilisateurs SET Nom = ? WHERE ID_Utilisateurs = ?";
  337.  
  338. $this->insertInto = $database->exec($insertpseudo, [$this->newlastname, $_SESSION["ID_Utilisateurs"]]);
  339.  
  340. $success = "<div class = 'alert alert-success'> <strong>Votre Nom à été changé avec succès </strong></div> ";
  341. if (isset($success)) {
  342. echo $success;
  343. }
  344. }
  345.  
  346.  
  347. if (isset($_POST['newmail']) and $_POST['newmail'] != $_SESSION["user"]["Email"] and !empty($_POST['newmail'])) {
  348.  
  349. if ($this->mailexist == 0) {
  350.  
  351. $insertmail = "UPDATE utilisateurs SET Email = ? WHERE ID_Utilisateurs = ?";
  352. $this->insertInto = $database->exec($insertmail, [$this->newmail, $_SESSION["ID_Utilisateurs"]]);
  353.  
  354. $success = "<div class = 'alert alert-success'> <strong>Votre Email à été modifié avec succès </strong></div> ";
  355. if (isset($success)) {
  356. echo $success;
  357. }
  358. } else {
  359. $erreur = "<div class = 'alert alert-danger'> <strong>Un compte possède déjà cet Email</strong></div> ";
  360. if (isset($erreur)) {
  361. echo $erreur;
  362. }
  363. }
  364. }
  365.  
  366. if (isset($_POST['newmdp1']) and !empty($_POST['newmdp1']) and isset($_POST['newmdp2']) and !empty($_POST['newmdp2'])) {
  367.  
  368. if ($this->newmdp1 == $this->newmdp2) {
  369.  
  370. $insertmdp = "UPDATE utilisateurs SET Pass = ? WHERE ID_Utilisateurs = ?";
  371. $this->insertInto = $database->exec($insertmdp, [$this->newmdp1, $_SESSION['ID_Utilisateurs']]);
  372.  
  373. $success = "<div class = 'alert alert-success'> <strong>Votre mot de passe a bien été modifié</strong></div> ";
  374. if (isset($success)) {
  375. echo $success;
  376. }
  377. } else {
  378. $erreur = "<div class = 'alert alert-danger'> <strong>Mot de passe différents</strong></div> ";
  379. if (isset($erreur)) {
  380. echo $erreur;
  381. }
  382. }
  383. }
  384. if (isset($_POST['newadresse']) and !empty($_POST['newadresse'])) {
  385.  
  386. if ($this->newadresse != $_SESSION["user"]['Rue']) {
  387.  
  388. $insertadresse = "UPDATE utilisateurs SET Rue = ? WHERE ID_Utilisateurs = ?";
  389. $this->insertInto = $database->exec($insertadresse, [$this->newadresse, $_SESSION['ID_Utilisateurs']]);
  390.  
  391. $success = "<div class = 'alert alert-success'> <strong>Votre Adresse a bien été modifié</strong></div> ";
  392. if (isset($success)) {
  393. echo $success;
  394. }
  395. }
  396. }
  397.  
  398. if (isset($_POST['newpostal']) and !empty($_POST['newpostal'])) {
  399.  
  400. if ($this->newpostal != $_SESSION["user"]['Code_Postal']) {
  401.  
  402. $insertpostal = "UPDATE utilisateurs SET Code_Postal = ? WHERE ID_Utilisateurs = ?";
  403. $this->insertInto = $database->exec($insertpostal, [$this->newpostal, $_SESSION['ID_Utilisateurs']]);
  404.  
  405. $success = "<div class = 'alert alert-success'> <strong>Votre Code postal à bien été modifié</strong></div> ";
  406.  
  407. if (isset($success)) {
  408. echo $success;
  409. }
  410. }
  411. }
  412.  
  413. if (isset($_POST['newcity']) and !empty($_POST['newcity'])) {
  414.  
  415. if ($this->newcity != $_SESSION["user"]['Ville']) {
  416.  
  417. $insertcity = "UPDATE utilisateurs SET Ville = ? WHERE ID_Utilisateurs = ?";
  418. $this->insertInto = $database->exec($insertcity, [$this->newcity, $_SESSION['ID_Utilisateurs']]);
  419.  
  420. $success = "<div class = 'alert alert-success'> <strong>Votre Ville à bien été modifié</strong></div> ";
  421.  
  422. if (isset($success)) {
  423. echo $success;
  424. }
  425. }
  426. }
  427. }
  428. }
  429.  
  430. public function editSociety()
  431. {
  432. if (isset($_SESSION['society'])) {
  433. $database = DatabaseManager::getManager();
  434.  
  435. $this->newsocietyname = htmlspecialchars($_POST['newsocietyname']);
  436. $this->newsocietyphone = htmlspecialchars($_POST['newsocietyphone']);
  437. $this->newsocietyadresse = htmlspecialchars($_POST['newsocietyadresse']);
  438. $this->newsocietycity = htmlspecialchars($_POST['newsocietycity']);
  439. $this->newsocietypostal = htmlspecialchars($_POST['newsocietypostal']);
  440.  
  441. if (isset($_POST['newsocietyname']) and !empty($_POST['newsocietyname'])) {
  442.  
  443. if ($this->newsocietyname != $_SESSION["society"]['Nom']) {
  444.  
  445. $societyname = "UPDATE society SET Nom = ? WHERE ID_Society = ?";
  446. $this->insertInto = $database->exec($societyname, [$this->newsocietyname, $_SESSION["society"]['ID_Society']]);
  447.  
  448. $success = "<div class = 'alert alert-success'> <strong>Le nom de votre société a bien été modifié</strong></div> ";
  449.  
  450. if (isset($success)) {
  451. echo $success;
  452. }
  453. }
  454. }
  455.  
  456. if (isset($_POST['newsocietyphone']) and !empty($_POST['newsocietyphone'])) {
  457.  
  458. if ($this->newsocietyphone != $_SESSION["society"]['Tel']) {
  459.  
  460. $societyphone = "UPDATE society SET Tel = ? WHERE ID_Society = ?";
  461. $this->insertInto = $database->exec($societyphone, [$this->newsocietyphone, $_SESSION["society"]['ID_Society']]);
  462.  
  463. $success = "<div class = 'alert alert-success'> <strong>Le Numéro de téléphone a bien été modifié</strong></div> ";
  464.  
  465. if (isset($success)) {
  466. echo $success;
  467. }
  468. }
  469. }
  470.  
  471. if (isset($_POST['newsocietyadresse']) and !empty($_POST['newsocietyadresse'])) {
  472.  
  473. if ($this->newsocietyadresse != $_SESSION["society"]['Rue']) {
  474.  
  475. $societyadresse = "UPDATE society SET Rue = ? WHERE ID_Society = ?";
  476. $this->insertInto = $database->exec($societyadresse, [$this->newsocietyadresse, $_SESSION["society"]['ID_Society']]);
  477.  
  478. $success = "<div class = 'alert alert-success'> <strong>Votre Adresse a bien été modifié</strong></div> ";
  479.  
  480. if (isset($success)) {
  481. echo $success;
  482. }
  483. }
  484. }
  485.  
  486. if (isset($_POST['newsocietycity']) and !empty($_POST['newsocietycity'])) {
  487.  
  488. if ($this->newsocietycity != $_SESSION["society"]['Ville']) {
  489.  
  490. $societycity = "UPDATE society SET Ville = ? WHERE ID_Society = ?";
  491. $this->insertInto = $database->exec($societycity, [$this->newsocietycity, $_SESSION["society"]['ID_Society']]);
  492.  
  493. $success = "<div class = 'alert alert-success'> <strong>Votre Ville a bien été modifié</strong></div> ";
  494.  
  495. if (isset($success)) {
  496. echo $success;
  497. }
  498. }
  499. }
  500.  
  501. if (isset($_POST['newsocietypostal']) and !empty($_POST['newsocietypostal'])) {
  502.  
  503. if ($this->newsocietypostal != $_SESSION["society"]['Code_Postal']) {
  504.  
  505. $societypsotal = "UPDATE society SET Code_Postal = ? WHERE ID_Society = ?";
  506. $this->insertInto = $database->exec($societypsotal, [$this->newsocietypostal, $_SESSION["society"]['ID_Society']]);
  507.  
  508. $success = "<div class = 'alert alert-success'> <strong>Votre Code postal a bien été modifié</strong></div> ";
  509.  
  510. if (isset($success)) {
  511. echo $success;
  512. }
  513. }
  514. }
  515. }
  516. }
  517.  
  518. // getter
  519. public function getId()
  520. {
  521. return $this->id;
  522. }
  523. public function getFirstName()
  524. {
  525. return $this->firstName;
  526. }
  527. public function getLastName()
  528. {
  529. return $this->lastName;
  530. }
  531. public function getEmail()
  532. {
  533. return $this->email;
  534. }
  535. public function getRole()
  536. {
  537. return $this->role;
  538. }
  539. public function getRue()
  540. {
  541. return $this->rue;
  542. }
  543. public function getPostalCode()
  544. {
  545. return $this->postalCode;
  546. }
  547. public function getCity()
  548. {
  549. return $this->city;
  550. }
  551. public function getPassword()
  552. {
  553. return $this->password;
  554. }
  555.  
  556. //setter
  557. public function setId($id)
  558. {
  559. $this->id = $id;
  560. }
  561. public function setFirstName($firstName)
  562. {
  563. $this->firstName = $firstName;
  564. }
  565. public function setLastName($lastName)
  566. {
  567. $this->lastName = $lastName;
  568. }
  569. public function setEmail($email)
  570. {
  571. $this->email = $email;
  572. }
  573. public function setRole($role)
  574. {
  575. $this->role = $role;
  576. }
  577. public function setRue($rue)
  578. {
  579. $this->rue = $rue;
  580. }
  581. public function setPostalCode($postalCode)
  582. {
  583. $this->postalCode = $postalCode;
  584. }
  585. public function setCity($city)
  586. {
  587. $this->city = $city;
  588. }
  589. public function setPassword($password)
  590. {
  591. $this->password = $password;
  592. }
  593.  
  594. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement