<?php

session_start();


if (!isset($_SESSION['admin_userName'])) {
    header('Location: login.php');
    }
?>
 <?php include("header.php"); ?>
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <link rel="stylesheet" type="text/css" href="css/new style.css">


<style>
     .d {
        background-color: rgba(0,0,0,0.5);
    }
     #nav  .d1
    {
        color: #f9a825;
        font-weight: 600;
    }
      nav a:hover {
    background-color: #721418;
    color: #f9a825;
        font-weight: 600;
}
         
</style>
<body  onload="passwordCheck()">
<div class="card" style=" border-radius: 8px; margin-top: 10px">
    <div id="row" style="margin-top: 10px">
        <div class="col-md-12"> 
        	
            <div class="table-title">
                <div class="row">
                    <div class="col-sm-12 " style="text-align: center;"><h3><b>Courier Charges Details</b></h3></div>
                </div>
                <p class="solid1" style="outline-style: solid; margin-top: 5px;  color: #00AC8B"></p>
            </div>

            <div class="row" style="margin: 30px;>
                <div class="col-md-4">
                	<div class="row">
                        <button type="button" class="btn btn-info"><a href="add_branch.php" style="color: #ffffff;"><i class="fa fa-plus" style="font-size: 15px">&nbsp;&nbsp;Add Branch</i></a></button>
               		</div>
                </div>
            </div>
            <br>
    
            <!--Main Cards-->
            <div class="row" style="margin-left: 60px; margin-right: 60px;">
                <div class="col-md-4">
                    <table class="table table-title">
                        <thead>
                            <tr>
                                <th colspan="3" style="background-color: #E4E2E2">Courier Parcel Charges</th>  
                            </tr>
                            <tr>
                                <td colspan="1">Branch</td>
                                <td colspan="2">Rs. / Kg</td>
                            </tr>
                        </thead>
                        <tbody>
                             <?php
                                include '../Admin_modules/branch_call.php';
                                foreach ($branch_fetch as $key => $value) {?>
                                    <tr>
                                        <td colspan="1"><?php echo $value['branch_name'];?></td>
                                        <td colspan="1"><?php echo $value['br_parcel'];?></td>
                                        <td colspan="1">
                                            <button id="<?php echo $value['branch_id'];?>" class="btn-change" style="background: #EC1B24; color: #ffffff; padding: 8px 12px; border: 1px solid #000000;"><a href="editcharges.php?id=<?php echo $value['branch_id'];?>&&name=<?php echo $value['branch_name'];?>&&cc=<?php echo $value['br_parcel'];?>&&docs=<?php echo $value['br_docs'];?>&&vvp=<?php echo $value['br_vvp'];?>" data-target="#edit" style="color: #ffffff;"><span>CHANGE</span></a></button>
                                        </td>
                                    </tr>
                                            
                                    <?php 
                                    }
                                ?>
                        </tbody>
                    </table>           
                </div>

                <div class="col-md-4">
                    <table class="table table-title">
                        <thead>
                            <tr>
                                <th colspan="3" style="background-color: #E4E2E2">Courier Documents Charges</th>  
                            </tr>
                            <tr>
                                <td colspan="1">Branch</td>
                                <td colspan="2">Rs. / Document</td>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                                foreach ($branch_fetch as $key => $value) {?>
                                    <tr>
                                        <td colspan="1"><?php echo $value['branch_name'];?></td>
                                        <td colspan="1"><?php echo $value['br_docs'];?></td>
                                        <td colspan="1">
                                            <button id="<?php echo $value['branch_id'];?>" class="btn-change" style="background: #EC1B24; color: #ffffff; padding: 8px 12px; border: 1px solid #000000;"><a href="editcharges.php?id=<?php echo $value['branch_id'];?>&&name=<?php echo $value['branch_name'];?>&&cc=<?php echo $value['br_parcel'];?>&&docs=<?php echo $value['br_docs'];?>&&vvp=<?php echo $value['br_vvp'];?>" data-target="#edit" style="color: #ffffff;"><span>CHANGE</span></a></button>
                                        </td>
                                    </tr>
                                            
                                    <?php 
                                    }
                                ?>
                        </tbody>
                    </table>           
                </div> 

                <div class="col-md-4">
                    <table class="table table-title">
                        <thead>
                            <tr>
                                <th colspan="3" style="background-color: #E4E2E2">Courier VPP Charges</th>  
                            </tr>
                            <tr>
                                <td colspan="1">Branch</td>
                                <td colspan="2">Rs. / 1000 Rs.</td>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                                foreach ($branch_fetch as $key => $value) {?>
                                    <tr>
                                        <td colspan="1"><?php echo $value['branch_name'];?></td>
                                        <td colspan="1"><?php echo $value['br_vvp'];?></td>
                                        <td colspan="1">
                                            <button id="<?php echo $value['branch_id'];?>" class="btn-change" style="background: #EC1B24; color: #ffffff; padding: 8px 12px; border: 1px solid #000000;"><a href="editcharges.php?id=<?php echo $value['branch_id'];?>&&name=<?php echo $value['branch_name'];?>&&cc=<?php echo $value['br_parcel'];?>&&docs=<?php echo $value['br_docs'];?>&&vvp=<?php echo $value['br_vvp'];?>" data-target="#edit" style="color: #ffffff;"><span>CHANGE</span></a></button>
                                        </td>
                                    </tr>
                                            
                                    <?php 
                                    }
                                ?>
                        </tbody>
                    </table>           
                </div> 
           </div>
        </div>
    </div>
</div>
        
</body>
</html>