$sql->update_table('menublock', array('mb_title' => $_POST[$i . '_mb_title']), array('mb_type' => $i, 'mb_user' => $user->get_user_id()));
                } else {
                    $sql->update_table('menublock', array('mb_title' => $_POST[$i . '_mb_title'], 'mb_limit' => $_POST[$i . '_mb_limit']), array('mb_type' => $i, 'mb_user' => $user->get_user_id()));
                }
                header('Location: index.php?p=menu');
            }
            break;
    }
} elseif (isset($_GET["a"])) {
    switch ($_GET["a"]) {
        case 'logout':
            unset($_COOKIE['ea_user']);
            setcookie('ea_user', null, -1, '/');
            break;
        case 'delete_post':
            post::delete_post($_GET['id']);
            header("Location: index.php?p=" . (isset($_GET["is_page"]) ? "pages" : "archive"));
            break;
        case 'delete_category':
            category::delete_category($_GET['id']);
            header("Location: index.php?p=category");
            break;
        case 'delete_comment':
            comment::delete_comment($_GET['id']);
            header("Location: index.php?p=comment");
            break;
        case 'delete_image':
            media::delete_media($_GET['id']);
            header("Location: index.php?p=images");
            break;
        case 'delete_sm':
Beispiel #2
0
                    ?>
</textarea>
                </div>
                <input type='hidden' name='auth_key' value='<?php 
                    echo $key;
                    ?>
' />
                <div class="formwrap post-title">
                  <input type='submit' value=' + SUBMiT EDiT + ' onclick='return post_check()' name='submit-edit-post' class='post-button' />
                </div>
              </form>
              <?php 
                }
            } elseif (isset($_GET['delete-post']) && !empty($_GET['delete-post']) && $admcl->check_key_from_id($db, $id, $_GET['auth_key'])) {
                if (isset($_GET['yes']) && empty($_GET['yes'])) {
                    $ret = $post->delete_post($db, $_GET['delete-post']);
                    if ($ret) {
                        if (isset($_GET['return']) && $_GET['return'] == 'main') {
                            $htmlinst->change_location('./index.php');
                        } elseif (isset($_GET['return']) && $_GET['return'] == 'mainid') {
                            $htmlinst->change_location('./index.php?id=' . htmlentities($_GET['delete-post']));
                        } else {
                            $htmlinst->admin_inform_ok_url(array('P0ST SUCCESSFUL DELETE!'), 'G0 BACK', '?list-post');
                        }
                    } else {
                        $htmlinst->error_admin_url(array('P0ST DELETE FAiLED', 'TRY AGAiN'), 'G0 BACK', '?list-post');
                    }
                } else {
                    ?>
              <div class="formhead admin-object-change-pass">C0NFiRMATi0N</div>
              <div class="formwrap admin-object-change-pass">