<?php
session_start();
include_once "../config.php";
require_once '../database1.php';
require_once "../check_admin.php";
require_once '../check_edit_page.php';


class edit extends database
{
    public function Getdata($id)
    {
        $where['cl_id']= $id;
        return $this->fetchRow('tb_mailbox', $where);
    }
}

$obj = new edit();

$data = $obj->Getdata($id);
if(!$data)
{
    header('Location: list.php');
    exit;
}

$templateType = 'edit';
include '../header.php';
?>

<script src="<?php echo MAIN_DOMAIN ?>/ckeditor/ckeditor.js"></script>
   <div class="main-content">
                <div class="section__content section__content--p30">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="overview-wrap">
                                    <h2 class="title-1">Edit Mailbox</h2>
                                    
                                </div>
                           
                            </div>
                        </div>
                        
                        <div class="row m-t-25 m-row">
                    
                            <div class="col-lg-10">
                                <div class="card">
                                    
                                    <div class="card-body card-block">
                                        
                                                                <form method="post" class="form" cluster-url="../ajax/mailbox/send_email" cluster-redirect="list" >
                                       
                                            <?php include_once "template/mail_form.php" ?>
                                        </form>
                                     
                                    </div>
                                </div>
                            </div>
                          
                        </div>

                           <script>
                                  CKEDITOR.replace( 'body');
                             
                        </script>  

<?php
include '../footer.php';
?>