<!-- End POP-UP Code -->	

<div class="page-inner" style="min-height:1631px !important">
<div class="page-title">
		<h3><img src="<?php 
echo get_option('hmgt_hospital_logo');
?>
" class="img-circle head_logo" width="40" height="40" /><?php 
echo get_option('hmgt_hospital_name');
?>
</h3>
	</div>
	<?php 
if (isset($_REQUEST['save_bed'])) {
    if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'insert' || $_REQUEST['action'] == 'edit')) {
        $result = $obj_bed->hmgt_add_bed($_POST);
        if ($result) {
            if ($_REQUEST['action'] == 'edit') {
                wp_redirect(admin_url() . 'admin.php?page=hmgt_bedmanage&tab=managebedlist&message=2');
            } else {
                wp_redirect(admin_url() . 'admin.php?page=hmgt_bedmanage&tab=managebedlist&message=1');
            }
        }
    }
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
    $result = $obj_bed->delete_bed($_REQUEST['bed_id']);
    if ($result) {
        wp_redirect(admin_url() . 'admin.php?page=hmgt_bedmanage&tab=managebedlist&message=3');
    }
}