Exemplo n.º 1
0
$controller->layout = 'ajax';
$controller->set('sectionHead', 'Websites');
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    switch ($_POST['sec']) {
        case "create":
            $controller->createWebsite($_POST);
            break;
        case "update":
            $controller->updateWebsite($_POST);
            break;
    }
} else {
    switch ($_GET['sec']) {
        case "Activate":
            $controller->__changeStatus($_GET['websiteId'], 1);
            $controller->listWebsites($_GET);
            break;
        case "Inactivate":
            $controller->__changeStatus($_GET['websiteId'], 0);
            $controller->listWebsites($_GET);
            break;
        case "delete":
            $controller->__deleteWebsite($_GET['websiteId']);
            $controller->listWebsites($_GET);
            break;
        case "edit":
            $controller->editWebsite($_GET['websiteId']);
            break;
        case "new":
            $controller->newWebsite($_GET);
            break;