allManagersData();
$ids = array();
$usernames = array();
$email = array();
$pass = array();
$rol = array();
foreach($managers as $key => $value){
$ids[$key] = $value->getId();
$usernames[$key] = $value->getUsername();
$email[$key] = $value->getEmail();
$pass[$key] = $value->getPass();
$rol[$key] = $value->getRoll();
}
echo "
Id |
Nombre |
Email |
password |
Rol |
";
for($i = 0; $i < count($promos); $i++){
echo '
'. $ids[$i] .' |
'. $usernames[$i] .' |
'. $email[$i] .' |
'. $pass[$i] .' |
'. $rol[$i] .' |
|
|
';
}
echo'
';
}
function addManager(){
echo'
';
}
function deleteManager() {
echo'
';
}
function editManager() {
echo'
';
}
// Logic Functions
function confirmDelete() {
$cine = new FormPromotion();
$cine->processesForm($_POST['id'],null,null,null,null,"del");
$_SESSION['message'] = $cine->getReply();
header('Location: ../panel_admin/index.php?state=mp');
}
function confirmEdit() {
$cine = new FormPromotion();
$cine->processesForm($_POST['id'], $_POST['username'], $_POST['email'], $_POST['pass'],"manager","edit");
$_SESSION['message']= $cine->getReply();
header('Location: ../panel_admin/index.php?state=mp');
}
function confirmAdd() {
$cine = new FormPromotion();
$cine->processesForm(null,$_POST['username'], $_POST['email'], $_POST['pass'],"manager","new");
$_SESSION['message'] = $cine->getReply();
header('Location: ../panel_admin/index.php?state=mp');
}
?>