Exemplo n.º 1
0
Arquivo: Exe.php Projeto: shiyake/PHP
    $cataObj = new Cores\Models\CataModel();
    $result = $cataObj->getSecondLevel($_GET['cata_second_to_view'], true);
    if (!$result) {
        echo -1;
    } else {
        print_r(json_encode($result));
    }
}
if (!empty($_GET['cata_second_to_edit']) && !empty($_GET['name'])) {
    $cataObj = new Cores\Models\CataModel();
    $result = $cataObj->editSecondLevel($_GET['cata_second_to_edit'], $_GET['name']);
    print_r(json_encode($result));
}
if (!empty($_GET['edit_third_lvl_field']) && !empty($_GET['name'])) {
    $cataObj = new Cores\Models\CataModel();
    $result = $cataObj->modify($_GET['edit_third_lvl_field'], $_GET['name']);
    print_r(json_encode($result));
}
if (!empty($_GET['cata_rd_lve_del'])) {
    $cataObj = new Cores\Models\CataModel();
    print_r(json_encode($cataObj->delete($_GET['cata_rd_lve_del'])));
}
if (!empty($_GET['action']) && !empty($_GET['rid'])) {
    $rid = $_GET['rid'];
    switch ($_GET['action']) {
        case 'edit_comments_confirm':
            if (!empty($_GET['content'])) {
                $commentsObj = new Cores\Models\CommentsModel();
                $result = $commentsObj->modify($rid, $_GET['content']);
                echo $result;
            } else {