Beispiel #1
0
    } else {
        $is_staff = '0';
    }
    if (isset($_POST['enabled'])) {
        $enabled = '1';
    } else {
        $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();
?>