<?php include "header.php";

$row_class = "col-12 col-sm-12 col-md-2 col-lg-2 mt-5";
$row_title = "col-8 col-sm-8 col-md-8 col-lg-8";
$row_checkbox = "col-4 col-sm-4 col-md-4 col-lg-4";

$permissions = [];

if (isset($_POST["form1"])) {
    $valid = 1;

    if (empty($_POST["role_name"])) {
        $valid = 0;
        $error_message .= "Role Name can not be empty<br>";
    }
    
    $permissions["company"] = [
        "create" => isset($_POST["add_company"]) ? 1 : 0,
        "read" => isset($_POST["view_company"]) ? 1 : 0,
        "update" => isset($_POST["edit_company"]) ? 1 : 0,
        "delete" => isset($_POST["delete_company"]) ? 1 : 0,
    ];
    
    $permissions["pincode"] = [
        "create" => isset($_POST["add_pincode"]) ? 1 : 0,
        "read" => isset($_POST["view_pincode"]) ? 1 : 0,
        "update" => isset($_POST["edit_pincode"]) ? 1 : 0,
        "delete" => isset($_POST["delete_pincode"]) ? 1 : 0,
    ];
    
    $permissions["branch"] = [
        "create" => isset($_POST["add_branch"]) ? 1 : 0,
        "read" => isset($_POST["view_branch"]) ? 1 : 0,
        "update" => isset($_POST["edit_branch"]) ? 1 : 0,
        "delete" => isset($_POST["delete_branch"]) ? 1 : 0,
    ];

    $permissions["client"] = [
        "create" => isset($_POST["add_client"]) ? 1 : 0,
        "read" => isset($_POST["view_client"]) ? 1 : 0,
        "update" => isset($_POST["edit_client"]) ? 1 : 0,
        "delete" => isset($_POST["delete_client"]) ? 1 : 0,
    ];
    
    $permissions["consignor"] = [
        "create" => isset($_POST["add_consignor"]) ? 1 : 0,
        "read" => isset($_POST["view_consignor"]) ? 1 : 0,
        "update" => isset($_POST["edit_consignor"]) ? 1 : 0,
        "delete" => isset($_POST["delete_consignor"]) ? 1 : 0,
    ];

    $permissions["consignee"] = [
        "create" => isset($_POST["add_consignee"]) ? 1 : 0,
        "read" => isset($_POST["view_consignee"]) ? 1 : 0,
        "update" => isset($_POST["edit_consignee"]) ? 1 : 0,
        "delete" => isset($_POST["delete_consignee"]) ? 1 : 0,
    ];
    
    $permissions["coloader"] = [
        "create" => isset($_POST["add_coloader"]) ? 1 : 0,
        "read" => isset($_POST["view_coloader"]) ? 1 : 0,
        "update" => isset($_POST["edit_coloader"]) ? 1 : 0,
        "delete" => isset($_POST["delete_coloader"]) ? 1 : 0,
    ];
    
    $permissions["delivery_boy"] = [
        "create" => isset($_POST["add_delivery_boy"]) ? 1 : 0,
        "read" => isset($_POST["view_delivery_boy"]) ? 1 : 0,
        "update" => isset($_POST["edit_delivery_boy"]) ? 1 : 0,
        "delete" => isset($_POST["delete_delivery_boy"]) ? 1 : 0,
    ];

    $permissions["pickup_points"] = [
        "create" => isset($_POST["add_pickup_points"]) ? 1 : 0,
        "read" => isset($_POST["view_pickup_points"]) ? 1 : 0,
        "update" => isset($_POST["edit_pickup_points"]) ? 1 : 0,
        "delete" => isset($_POST["delete_pickup_points"]) ? 1 : 0,
    ];
    
    $permissions["transporter_details"] = [
        "create" => isset($_POST["add_transporter_details"]) ? 1 : 0,
        "read" => isset($_POST["view_transporter_details"]) ? 1 : 0,
        "update" => isset($_POST["edit_transporter_details"]) ? 1 : 0,
        "delete" => isset($_POST["delete_transporter_details"]) ? 1 : 0,
    ];

    $permissions["driver"] = [
        "create" => isset($_POST["add_driver"]) ? 1 : 0,
        "read" => isset($_POST["view_driver"]) ? 1 : 0,
        "update" => isset($_POST["edit_driver"]) ? 1 : 0,
        "delete" => isset($_POST["delete_driver"]) ? 1 : 0,
    ];
    
    $permissions["status"] = [
        "create" => isset($_POST["add_status"]) ? 1 : 0,
        "read" => isset($_POST["view_status"]) ? 1 : 0,
        "update" => isset($_POST["edit_status"]) ? 1 : 0,
        "delete" => isset($_POST["delete_status"]) ? 1 : 0,
    ];

    $permissions["reason"] = [
        "create" => isset($_POST["add_reason"]) ? 1 : 0,
        "read" => isset($_POST["view_reason"]) ? 1 : 0,
        "update" => isset($_POST["edit_reason"]) ? 1 : 0,
        "delete" => isset($_POST["delete_reason"]) ? 1 : 0,
    ];

    $permissions["mode"] = [
        "create" => isset($_POST["add_mode"]) ? 1 : 0,
        "read" => isset($_POST["view_mode"]) ? 1 : 0,
        "update" => isset($_POST["edit_mode"]) ? 1 : 0,
        "delete" => isset($_POST["delete_mode"]) ? 1 : 0,
    ];
    
    $permissions["material_type"] = [
        "create" => isset($_POST["add_material_type"]) ? 1 : 0,
        "read" => isset($_POST["view_material_type"]) ? 1 : 0,
        "update" => isset($_POST["edit_material_type"]) ? 1 : 0,
        "delete" => isset($_POST["delete_material_type"]) ? 1 : 0,
    ];
    
    $permissions["zone_master"] = [
        "create" => isset($_POST["add_zone_master"]) ? 1 : 0,
        "read" => isset($_POST["view_zone_master"]) ? 1 : 0,
        "update" => isset($_POST["edit_zone_master"]) ? 1 : 0,
        "delete" => isset($_POST["delete_zone_master"]) ? 1 : 0,
    ];
    
    $permissions["generate_zone"] = [
        "create" => isset($_POST["add_generate_zone"]) ? 1 : 0,
        "read" => isset($_POST["view_generate_zone"]) ? 1 : 0,
        "update" => isset($_POST["edit_generate_zone"]) ? 1 : 0,
        "delete" => isset($_POST["delete_generate_zone"]) ? 1 : 0,
    ];

    $permissions["rate_entry"] = [
        "create" => isset($_POST["add_rate_entry"]) ? 1 : 0,
        "read" => isset($_POST["view_rate_entry"]) ? 1 : 0,
        "update" => isset($_POST["edit_rate_entry"]) ? 1 : 0,
        "delete" => isset($_POST["delete_rate_entry"]) ? 1 : 0,
    ];
    
    $permissions["transaction_booking"] = [
        "create" => isset($_POST["add_transaction_booking"]) ? 1 : 0,
        "read" => isset($_POST["view_transaction_booking"]) ? 1 : 0,
        "update" => isset($_POST["edit_transaction_booking"]) ? 1 : 0,
        "delete" => isset($_POST["delete_transaction_booking"]) ? 1 : 0,
    ];

    $permissions["ftl_booking"] = [
        "create" => isset($_POST["add_ftl_booking"]) ? 1 : 0,
        "read" => isset($_POST["view_ftl_booking"]) ? 1 : 0,
        "update" => isset($_POST["edit_ftl_booking"]) ? 1 : 0,
        "delete" => isset($_POST["delete_ftl_booking"]) ? 1 : 0,
    ];

    $permissions["booking_bulk_upload"] = [
        "read" => isset($_POST["view_booking_bulk_upload"]) ? 1 : 0,
        "delete" => isset($_POST["delete_booking_bulk_upload"]) ? 1 : 0,
    ];
    
    $permissions["incoming_manifest"] = [
        "create" => isset($_POST["add_incoming_manifest"]) ? 1 : 0,
        "read" => isset($_POST["view_incoming_manifest"]) ? 1 : 0,
        "update" => isset($_POST["edit_incoming_manifest"]) ? 1 : 0,
        "delete" => isset($_POST["delete_incoming_manifest"]) ? 1 : 0,
    ];

    $permissions["outgoing_manifest"] = [
        "create" => isset($_POST["add_outgoing_manifest"]) ? 1 : 0,
        "read" => isset($_POST["view_outgoing_manifest"]) ? 1 : 0,
        "update" => isset($_POST["edit_outgoing_manifest"]) ? 1 : 0,
        "delete" => isset($_POST["delete_outgoing_manifest"]) ? 1 : 0,
    ];
    
    $permissions["drs"] = [
        "create" => isset($_POST["add_drs"]) ? 1 : 0,
        "read" => isset($_POST["view_drs"]) ? 1 : 0,
        "update" => isset($_POST["edit_drs"]) ? 1 : 0,
        "delete" => isset($_POST["delete_drs"]) ? 1 : 0,
    ];

    $permissions["tracking"] = ["read" => isset($_POST["view_tracking"])];
    
    $permissions["delivery_status"] = [
        "create" => isset($_POST["add_delivery_status"]) ? 1 : 0,
        "read" => isset($_POST["view_delivery_status"]) ? 1 : 0,
        "update" => isset($_POST["edit_delivery_status"]) ? 1 : 0,
        "delete" => isset($_POST["delete_delivery_status"]) ? 1 : 0,
    ];
    
    $permissions["pod_entry"] = [
        "create" => isset($_POST["add_pod_entry"]) ? 1 : 0,
        "read" => isset($_POST["view_pod_entry"]) ? 1 : 0,
        "update" => isset($_POST["edit_pod_entry"]) ? 1 : 0,
        "delete" => isset($_POST["delete_pod_entry"]) ? 1 : 0,
        "upload" => isset($_POST["upload_pod_entry"]) ? 1 : 0,
    ];
    
    
    $permissions["view_booking_report"] = [
        "read_total" => isset($_POST["view_booking_report"]) ? 1 : 0,
    ];
    $permissions["view_mis_report"] = [
        "read_total" => isset($_POST["view_mis_report"]) ? 1 : 0,
    ];
    $permissions["view_drs_report"] = [
        "read_total" => isset($_POST["view_drs_report"]) ? 1 : 0,
    ];
    $permissions["view_delivery_pending"] = [
        "read_total" => isset($_POST["view_delivery_pending"]) ? 1 : 0,
    ];
    $permissions["view_manifest_report"] = [
        "read_total" => isset($_POST["view_manifest_report"]) ? 1 : 0,
    ];
    $permissions["view_transaction_report"] = [
        "read_total" => isset($_POST["view_transaction_report"]) ? 1 : 0,
    ];
    
    
    $permissions["userManagement"] = [
        "create" => isset($_POST["add_userManagement"]) ? 1 : 0,
        "read" => isset($_POST["view_userManagement"]) ? 1 : 0,
        "update" => isset($_POST["edit_userManagement"]) ? 1 : 0,
        "delete" => isset($_POST["delete_userManagement"]) ? 1 : 0,
    ];
    
    $permissions["roles"] = [
        "create" => isset($_POST["add_roles"]) ? 1 : 0,
        "read" => isset($_POST["view_roles"]) ? 1 : 0,
        "update" => isset($_POST["edit_roles"]) ? 1 : 0,
        "delete" => isset($_POST["delete_roles"]) ? 1 : 0,
    ];
    
    $permissions["backup"] = [
        "read" => isset($_POST["view_administratorBackup"]) ? 1 : 0,
    ];



    $permissions = json_encode($permissions);

    if ($valid == 1) {
        $statement = $pdo->prepare("UPDATE tbl_role set role_name=?,permission=? WHERE id=?");
        $statement->execute([$_POST["role_name"], $permissions, $_REQUEST["id"]]);

        $success_message = "Role is updated successfully!";

        unset($_POST["role_name"]);
    }
}
?>
    
    
    
<?php
$statement = $pdo->prepare("SELECT * FROM tbl_role where id=?");
$statement->execute([$_REQUEST["id"]]);
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
if (!empty($result) && isset($result[0]["permission"])) {
    $resPerm = json_decode($result[0]["permission"], true);
    $branch_idss = explode(",", $result[0]["branch_ids"]);
    $roleName = $result[0]["role_name"];
} else {
    return 0;
}
?>
    
    
    
    
    
    
    
    
<div class="content" style="background:white;">
        <section class="content-header">
            <a href="auth-role-list.php" class="btn btn-danger btn-sm pull-left"><i class="fa fa-arrow-left"></i> Back to Role List</a>
        </section>


        <div class="clearfix"></div>




<section class="content">
    <div class="row">
        <!--<pre>-->
        <!--    <?php print_r($resPerm); ?>-->
            
        <!--</pre>-->
        <div class="col-xs-12">
            <div>
                <div class="box-header">
                    <h3 class="box-title"><b>Update Role Details</b></h3>
                </div>
                <div class="box-body">
                    <div class="col-lg-12">
                <form action="" class="validation" enctype="multipart/form-data" method="post" accept-charset="utf-8">
                    
                    
                    
                    
                    <div class="row">
                        
                        <div class="col-md-3">
                            <div class="form-group">
                                <label class="required" for="name">Role Name</label> 
                                <input type='hidden' name="ids" value="<?= $_REQUEST["id"] ?>" >
                                <input type="text" name="role_name" value="<?php if (isset($roleName)) {
                                    echo $roleName;
                                } ?>" placeholder="Enter Role Name" class="form-control" id="name"  required="required" />
                            </div>
                        </div>
                        
                        <div class="col-md-3">
                            <div class="form-group">
                                <label class="required" for="status">Status</label> 
                                <select name="status" class="form-control" id="name"  required="required" >
                                    <option value="1" <?php if (isset($roleStatus) && $roleStatus == 1) {
                                        echo "selected";
                                    } ?>>Active</option>
                                    <option value="0" <?php if (isset($roleStatus) && $roleStatus == 0) {
                                        echo "selected";
                                    } ?>>In-Active</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    
                    
                    
                    
                    
                    
                    
                   
                   
                    
        <!-- Booking Master Starts Here -->            
                     <div class="col-md-12 section_role" style="">   
                     
                         <center><h3 class="main_title"><b>Master</b></h3></center>
                            <center><h4 class="main_title"><b>Booking Master</b></h4></center>
                            
        <div class="row">
                        
                    
                         <div class="<?= $row_class ?>">
                            <center class="sub_titles">Company</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_company" class="largerCheckbox" <?php if ($resPerm["company"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_company" class="largerCheckbox" <?php if ($resPerm["company"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_company" class="largerCheckbox" <?php if ($resPerm["company"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_company" class="largerCheckbox" <?php if ($resPerm["company"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Pincode</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_pincode" class="largerCheckbox" <?php if ($resPerm["pincode"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_pincode" class="largerCheckbox" <?php if ($resPerm["pincode"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_pincode" class="largerCheckbox" <?php if ($resPerm["pincode"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_pincode" class="largerCheckbox" <?php if ($resPerm["pincode"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                         
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Branch</center>
                                                        
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_branch" class="largerCheckbox" <?php if ($resPerm["branch"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_branch" class="largerCheckbox" <?php if ($resPerm["branch"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_branch" class="largerCheckbox" <?php if ($resPerm["branch"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_branch" class="largerCheckbox" <?php if ($resPerm["branch"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Client</center>
                                                       
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_client" class="largerCheckbox" <?php if ($resPerm["client"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_client" class="largerCheckbox" <?php if ($resPerm["client"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_client" class="largerCheckbox" <?php if ($resPerm["client"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_client" class="largerCheckbox" <?php if ($resPerm["client"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Consignor</center>
                                                      
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_consignor" class="largerCheckbox" <?php if ($resPerm["consignor"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_consignor" class="largerCheckbox" <?php if ($resPerm["consignor"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_consignor" class="largerCheckbox" <?php if ($resPerm["consignor"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_consignor" class="largerCheckbox" <?php if ($resPerm["consignor"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Consignee</center>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_consignee" class="largerCheckbox" <?php if ($resPerm["consignee"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_consignee" class="largerCheckbox" <?php if ($resPerm["consignee"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_consignee" class="largerCheckbox" <?php if ($resPerm["consignee"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_consignee" class="largerCheckbox" <?php if ($resPerm["consignee"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                          </div>
                          
                          
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Coloader</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_coloader" class="largerCheckbox" <?php if ($resPerm["coloader"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_coloader" class="largerCheckbox" <?php if ($resPerm["coloader"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_coloader" class="largerCheckbox" <?php if ($resPerm["coloader"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_coloader" class="largerCheckbox" <?php if ($resPerm["coloader"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div> 
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Delivery Boy</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_delivery_boy" class="largerCheckbox" <?php if ($resPerm["delivery_boy"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_delivery_boy" class="largerCheckbox" <?php if ($resPerm["delivery_boy"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_delivery_boy" class="largerCheckbox" <?php if ($resPerm["delivery_boy"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_delivery_boy" class="largerCheckbox" <?php if ($resPerm["delivery_boy"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                        
                
                
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Pickup points</center>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_pickup_points" class="largerCheckbox" <?php if ($resPerm["pickup_points"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_pickup_points" class="largerCheckbox" <?php if ($resPerm["pickup_points"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_pickup_points" class="largerCheckbox" <?php if ($resPerm["pickup_points"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_pickup_points" class="largerCheckbox" <?php if ($resPerm["pickup_points"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                          </div>
                          
                          
                          
                          
                         <div class="<?= $row_class ?>">
                            <center class="sub_titles">Transporter Details</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_transporter_details" class="largerCheckbox" <?php if ($resPerm["transporter_details"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_transporter_details" class="largerCheckbox" <?php if ($resPerm["transporter_details"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_transporter_details" class="largerCheckbox" <?php if ($resPerm["transporter_details"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_transporter_details" class="largerCheckbox" <?php if ($resPerm["transporter_details"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                        
                        
                        
                        
                          <div class="<?= $row_class ?>">
                            <center class="sub_titles">Driver</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_driver" class="largerCheckbox" <?php if ($resPerm["driver"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_driver" class="largerCheckbox" <?php if ($resPerm["driver"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_driver" class="largerCheckbox" <?php if ($resPerm["driver"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_driver" class="largerCheckbox" <?php if ($resPerm["driver"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                        
        </div>
                    </div>
        <!-- Booking Master Endss Here -->
        
         <!--status master starts here -->
         <div class="col-md-12 section_role" style="">   
                <center><h4 class="main_title"><b>Status Master</b></h4></center>
                            
          <div class="row">
                        
                        
                         <div class="<?= $row_class ?>">
                            <center class="sub_titles">Status</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_status" class="largerCheckbox" <?php if ($resPerm["status"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_status" class="largerCheckbox" <?php if ($resPerm["status"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_status" class="largerCheckbox" <?php if ($resPerm["status"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_status" class="largerCheckbox" <?php if ($resPerm["status"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Reason</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_reason" class="largerCheckbox" <?php if ($resPerm["reason"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_reason" class="largerCheckbox" <?php if ($resPerm["reason"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_reason" class="largerCheckbox" <?php if ($resPerm["reason"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_reason" class="largerCheckbox" <?php if ($resPerm["reason"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                         
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Mode</center>
                                                        
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_mode" class="largerCheckbox" <?php if ($resPerm["mode"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_mode" class="largerCheckbox" <?php if ($resPerm["mode"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_mode" class="largerCheckbox" <?php if ($resPerm["mode"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_mode" class="largerCheckbox" <?php if ($resPerm["mode"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Material Type</center>
                                                       
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_material_type" class="largerCheckbox" <?php if ($resPerm["material_type"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_material_type" class="largerCheckbox" <?php if ($resPerm["material_type"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_material_type" class="largerCheckbox" <?php if ($resPerm["material_type"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_material_type" class="largerCheckbox" <?php if ($resPerm["material_type"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                    
                          
                          
                        
        </div>
                    </div>
         <!--status master ends here -->
         
         
         <!--billing master starts here-->
         <div class="col-md-12 section_role" style="">   
                     
                         
                            <center><h4 class="main_title"><b>Billing Master</b></h4></center>
                            
        <div class="row">
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Zone Master</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_zone_master" class="largerCheckbox" <?php if ($resPerm["zone_master"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_zone_master" class="largerCheckbox" <?php if ($resPerm["zone_master"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_zone_master" class="largerCheckbox" <?php if ($resPerm["zone_master"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_zone_master" class="largerCheckbox" <?php if ($resPerm["zone_master"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                         
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Generate Zone</center>
                                                        
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_generate_zone" class="largerCheckbox" <?php if ($resPerm["generate_zone"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_generate_zone" class="largerCheckbox" <?php if ($resPerm["generate_zone"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_generate_zone" class="largerCheckbox" <?php if ($resPerm["generate_zone"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_generate_zone" class="largerCheckbox" <?php if ($resPerm["generate_zone"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Rate Entry</center>
                                                       
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_rate_entry" class="largerCheckbox" <?php if ($resPerm["rate_entry"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_rate_entry" class="largerCheckbox" <?php if ($resPerm["rate_entry"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_rate_entry" class="largerCheckbox" <?php if ($resPerm["rate_entry"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_rate_entry" class="largerCheckbox" <?php if ($resPerm["rate_entry"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
        </div>
                    </div>
         <!--billing master ends here-->
         
        
                    
        <!--Booking starts here-->
            <div class="col-md-12 section_role" style="">   
                            <center> <h4><b> Booking</b></h4></center>
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Transaction Booking</center>
                              <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_transaction_booking" class="largerCheckbox" <?php if ($resPerm["transaction_booking"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_transaction_booking" class="largerCheckbox" <?php if ($resPerm["transaction_booking"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_transaction_booking" class="largerCheckbox" <?php if ($resPerm["transaction_booking"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_transaction_booking" class="largerCheckbox" <?php if ($resPerm["transaction_booking"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            
                         </div>
                       
                       
                       
                          <div class="<?= $row_class ?>">
                            <center class="sub_titles">FTL Booking</center>
                                <div class="row">
                                    <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                    <div class="<?= $row_checkbox ?>">
                                        <input type="checkbox" name="view_ftl_booking" class="largerCheckbox" <?php if ($resPerm["ftl_booking"]["read"] == "1") {
                                            echo "checked";
                                        } ?>>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                    <div class="<?= $row_checkbox ?>">
                                        <input type="checkbox" name="add_ftl_booking" class="largerCheckbox" <?php if ($resPerm["ftl_booking"]["create"] == "1") {
                                            echo "checked";
                                        } ?>>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                    <div class="<?= $row_checkbox ?>">
                                        <input type="checkbox" name="edit_ftl_booking" class="largerCheckbox" <?php if ($resPerm["ftl_booking"]["update"] == "1") {
                                            echo "checked";
                                        } ?>>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                    <div class="<?= $row_checkbox ?>">
                                        <input type="checkbox" name="delete_ftl_booking" class="largerCheckbox" <?php if ($resPerm["ftl_booking"]["delete"] == "1") {
                                            echo "checked";
                                        } ?>>
                                    </div>
                                </div>
                            </div>
                            
                            
                        
                          <div class="<?= $row_class ?>">
                            <center class="sub_titles">Booking Bulk Upload</center>
                         <div class="row">
                                <div class="<?= $row_title ?>"><label> View Bulk Uploads</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_booking_bulk_upload" class="largerCheckbox" <?php if ($resPerm["booking_bulk_upload"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>Bulk Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_booking_bulk_upload" class="largerCheckbox" <?php if ($resPerm["booking_bulk_upload"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        
                    </div>
                         </div>
        <!--Booking endss here-->
                            
                
        <!--Manifest Starts here-->
        
            <div class="col-md-12 section_role" style=""> 
                             <center> <h3><b>Transacation</b></h3></center>
                            <center> <h4><b>Manifest</b></h4></center>
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Incoming Manifest</center>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_incoming_manifest" class="largerCheckbox" <?php if ($resPerm["incoming_manifest"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_incoming_manifest" class="largerCheckbox" <?php if ($resPerm["incoming_manifest"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_incoming_manifest" class="largerCheckbox" <?php if ($resPerm["incoming_manifest"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_incoming_manifest" class="largerCheckbox" <?php if ($resPerm["incoming_manifest"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            
                         </div>
                           
                           <div class="<?= $row_class ?>">
                            <center class="sub_titles">Outgoing Manifest</center>
                           <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_outgoing_manifest" class="largerCheckbox" <?php if ($resPerm["outgoing_manifest"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_outgoing_manifest" class="largerCheckbox" <?php if ($resPerm["outgoing_manifest"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_outgoing_manifest" class="largerCheckbox" <?php if ($resPerm["outgoing_manifest"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_outgoing_manifest" class="largerCheckbox" <?php if ($resPerm["outgoing_manifest"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                           </div>
        <!-- Manifest endss here -->
                         
        
        <!-- DRS starts here-->
            <div class="col-md-12 section_role" style="">   
                            <center> <h4><b>DRS</b></h4></center>
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">DRS</center>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_drs" class="largerCheckbox" <?php if ($resPerm["drs"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_drs" class="largerCheckbox" <?php if ($resPerm["drs"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_drs" class="largerCheckbox" <?php if ($resPerm["drs"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_drs" class="largerCheckbox" <?php if ($resPerm["drs"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        <div class="<?= $row_class ?>">
                            <center class="sub_titles">Tracking</center>
                           <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_tracking" class="largerCheckbox" <?php if ($resPerm["tracking"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                         
                         
                         <div class="<?= $row_class ?>">
                            <center class="sub_titles">Delivery Status</center>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_delivery_status" class="largerCheckbox" <?php if ($resPerm["delivery_status"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_delivery_status" class="largerCheckbox" <?php if ($resPerm["delivery_status"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_delivery_status" class="largerCheckbox" <?php if ($resPerm["delivery_status"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_delivery_status" class="largerCheckbox" <?php if ($resPerm["delivery_status"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                         <div class="<?= $row_class ?>">
                            <center class="sub_titles">POD Entry</center>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                            <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_pod_entry" class="largerCheckbox" <?php if ($resPerm["pod_entry"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_pod_entry" class="largerCheckbox" <?php if ($resPerm["pod_entry"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_pod_entry" class="largerCheckbox" <?php if ($resPerm["pod_entry"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_pod_entry" class="largerCheckbox" <?php if ($resPerm["pod_entry"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>Upload</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="upload_pod_entry" class="largerCheckbox" <?php if ($resPerm["pod_entry"]["upload"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                     
                        
                      
                </div>
        <!-- DRS ends Here-->
          
          
                      
        <!--Reports Starts Here-->
            <div class="col-md-12 section_role" style="">   
                        <center> <h4><b>Reports</b></h4></center>
                            
                        <div class="<?= $row_class ?>">
                            
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>Booking Report</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_booking_report" class="largerCheckbox" <?php if ($resPerm["view_booking_report"]["read_total"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>MIS Report</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_mis_report" class="largerCheckbox" <?php if ($resPerm["view_mis_report"]["read_total"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>DRS Report</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_drs_report" class="largerCheckbox" <?php if ($resPerm["view_drs_report"]["read_total"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>Delivery Pending Report</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_delivery_pending" class="largerCheckbox" <?php if ($resPerm["view_delivery_pending"]["read_total"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>Manifest Report</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_manifest_report" class="largerCheckbox" <?php if ($resPerm["view_manifest_report"]["read_total"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            <div class="row">
                                <div class="<?= $row_title ?>"><label>Transaction Report</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_transaction_report" class="largerCheckbox" <?php if ($resPerm["view_transaction_report"]["read_total"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                        </div>
                        
                    <div class="clearfix"></div>
                </div>
        <!--Reports Ends Here-->
                    
                    
                    
        <!-- Custom Starts Here -->
                    <div class="col-md-12 section_role" style="">   
                            <center><h4 class="main_title"><b>User Management</b></h4></center>
                            
                        <div class="row">
                        
                <div class="<?= $row_class ?>">
                            <center class="sub_titles">Users</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_userManagement" class="largerCheckbox" <?php if ($resPerm["userManagement"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_userManagement" class="largerCheckbox" <?php if ($resPerm["userManagement"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_userManagement" class="largerCheckbox" <?php if ($resPerm["userManagement"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_userManagement" class="largerCheckbox" <?php if ($resPerm["userManagement"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                <div class="<?= $row_class ?>">
                            <center class="sub_titles">Roles</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_roles" class="largerCheckbox" <?php if ($resPerm["roles"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-plus"></i> Create</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="add_roles" class="largerCheckbox" <?php if ($resPerm["roles"]["create"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-edit"></i> Edit</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="edit_roles" class="largerCheckbox" <?php if ($resPerm["roles"]["update"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-trash"></i> Delete</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="delete_roles" class="largerCheckbox" <?php if ($resPerm["roles"]["delete"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        </div>
                    </div>
        <!-- Custom Endsss Here -->
        <!--administration backup starts here-->
        
        <div class="col-md-12 section_role" style="">   
                            <center><h4 class="main_title"><b>Administrator Backup</b></h4></center>
                            
                        <div class="row">
                        
                <div class="<?= $row_class ?>">
                            <center class="sub_titles">Backup</center>
                            
                            <div class="row">
                                <div class="<?= $row_title ?>"><label><i class="fa fa-eye"></i> View</label></div>
                                <div class="<?= $row_checkbox ?>">
                                    <input type="checkbox" name="view_administratorBackup" class="largerCheckbox" <?php if ($resPerm["backup"]["read"] == "1") {
                                        echo "checked";
                                    } ?>>
                                </div>
                            </div>
                            
                            
                            </div>
                        </div>
        
        <!--administration backup ends here-->
        
        
        
        
        
                    <div class="form-group" style="text-align:center;">
                            <input type="submit"  name="form1"id="submit" value="Update" class="btn btn-success" />
                    </div>
                    
                    
                    
                    
                    
            </form>
            </div>
                </div>
            </div>
        </div>
    </div>
</section>

</br></br>

</div>



<?php include "footer.php"; ?>


<style>
    .mt-5{
        margin-top: 30px;
    }
    .sub_titles{
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 14px;
    }
    .section_role{
        border: 2px solid #efefef;
        border-style: dashed;
        margin-top: 5px;
        margin-bottom: 10px;
        padding-bottom: 25px;
        background: #f7f7eb;
        border-radius: 5px;
    }
    .main_title{
        
    }
</style>

<style>
        input.largerCheckbox {
            width: 50px;
            height: 20px;
        }
</style>