if ($action == 'cancel_edit') {
                                    $mode = 'view';
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // Start main content
    draw_title_bar(prepare_breadcrumbs(array(_MODULES => '', _FAQ => '', _FAQ_MANAGEMENT => '', ucfirst($action) => '')));
    echo $msg;
    draw_content_start();
    if ($mode == 'view') {
        $objFaqCategories->DrawViewMode();
    } else {
        if ($mode == 'add') {
            $objFaqCategories->DrawAddMode();
        } else {
            if ($mode == 'edit') {
                $objFaqCategories->DrawEditMode($rid);
            } else {
                if ($mode == 'details') {
                    $objFaqCategories->DrawDetailsMode($rid);
                }
            }
        }
    }
    draw_content_end();
} else {