}
} else {
    if (!empty($_GET['do']) && $_GET['do'] == 'edit' && !empty($_GET['id'])) {
        $edit = TRUE;
        $res = StaticPage::get(array('id' => (int) $_GET['id']));
        if (!empty($res)) {
            $form_data['id'] = $res[0]->id;
            $form_data['caption'] = $res[0]->caption;
            $form_data['url'] = $res[0]->url;
            $form_data['page_text'] = $res[0]->page_text;
        }
    } else {
        if (!empty($_GET['action']) && $_GET['action'] == 'delete' && !empty($_GET['id'])) {
            if (!empty($_GET['id'])) {
                try {
                    StaticPage::delete((int) $_GET['id']);
                    header("location: cncontent_static_pages.php?msg_id=12013");
                    exit;
                } catch (CNException $e) {
                    $msg[] = $e->message;
                }
            }
        }
    }
}
function setup_module($column, $module, $obj)
{
    global $paging, $edit, $form_data;
    switch ($module) {
        case 'CNManageStaticPageModule':
            $obj->edit = $edit;