$enabled = '0'; } $staff->setName($_POST['name']); $staff->setSecName($_POST['secondname']); $staff->setAdress($_POST['adress']); $staff->setCity($_POST['city']); $staff->setJbg($_POST['jbg']); $staff->setEmail($_POST['email']); $staff->setPasswd($_POST['passwd']); $staff->setPhone($_POST['phone']); $staff->setMphone($_POST['mphone']); $staff->setIsStaff($is_staff); $staff->setImageUrl($image_url); $staff->setPhotoId($photo_id); $staff->setWorkPlace($_POST['work_place']); $staff->setSalary($_POST['salary']); $staff->setIsAdmin($is_admin); $staff->setEnabled($enabled); $id = $userDao->createStafs($staff->getName(), $staff->getSecName(), $staff->getAdress(), $staff->getCity(), $staff->getJbg(), $staff->getEmail(), $staff->getPasswd(), $staff->getPhone(), $staff->getMphone(), $staff->getIsStaff(), $staff->getImageUrl(), $staff->getPhotoId(), $staff->getWorkPlace(), $staff->getSalary(), $staff->getIsAdmin(), $staff->getEnabled()); } //print_r("ID nakon createStafs iznosi: ".$id); $resultsshow = $userDao->showUser($id); $row = $resultsshow->fetch_assoc(); ?> <div class="main container-fluid"> <div class="sectionShow"> <div class="secimg"> <img src="<?php echo $row['image_url']; ?>
} $staff->setId($_POST['id']); $staff->setName($_POST['name']); $staff->setSecName($_POST['secondname']); $staff->setAdress($_POST['adress']); $staff->setCity($_POST['city']); $staff->setJbg($_POST['jbg']); $staff->setEmail($_POST['email']); $staff->setPasswd($_POST['passwd']); $staff->setPhone($_POST['phone']); $staff->setMphone($_POST['mphone']); $staff->setIsStaff($is_staff); $staff->setImageUrl($image_url); $staff->setPhotoId($photo_id); $staff->setWorkPlace($work_place); $staff->setSalary($salary); $staff->setIsAdmin($is_admin); $staff->setEnabled($enabled); $id = $userDao->editStafs($staff->getId(), $staff->getName(), $staff->getSecName(), $staff->getAdress(), $staff->getCity(), $staff->getJbg(), $staff->getEmail(), $staff->getPasswd(), $staff->getPhone(), $staff->getMphone(), $staff->getIsStaff(), $staff->getImageUrl(), $staff->getPhotoId(), $staff->getWorkPlace(), $staff->getSalary(), $staff->getIsAdmin(), $staff->getIsAdmin(), $staff->getEnabled()); } /*$sql = "SELECT * FROM user JOIN staff ON staff.user_id = user.id WHERE user.id = ".$id; if (!$results = $connection->query($sql)){ die('Ne mogu da izvrsim upit zbog ['. $connection->error . "]"); } $row = $results->fetch_assoc();*/ $resultsshow = $userDao->showUser($id); $row = $resultsshow->fetch_assoc(); ?>