// Edit per file /******************************************************************************/ $pageObject = new Administrator($id, 'edit'); $smarty->assign('contentTemplate', 'templates-admin/content/' . $pageObject->editContentTemplate); $smarty->assign('htmlpagetitle', $pageObject->editHtmlPageTitle); $pageObject->getAdministratorType($administratorType); $smarty->assign('administratorType', $administratorType); $pageObject->getAdministratorAccess($administratorAccess); $smarty->assign('administratorAccess', $administratorAccess); /******************************************************************************/ /* Update / Add / AddAsNew functionality /******************************************************************************/ if ($formAction != '') { $redirect = false; if (isset($_POST['password']) && trim($_POST['password']) != '') { $_POST['password'] = $pageObject->encrypt($_POST['password']); } else { unset($_POST['password']); } $processResult = $pageObject->processForm($formAction, $_POST, $redirect); $smarty->assign('processResult', $processResult); if ($processResult != 0) { $pageObject->setAdministratorAccess($id_administratoraccess, $formAction); } $pageObject->redirect($formAction); } /******************************************************************************/ /* Get edit data /******************************************************************************/ if ($pageObject->id != '') { $pageObject->getEditData($editData);