<div class="huge" style="color:gray">PC- <?php 
    echo $i;
    ?>
</div>
                                </div>
                            </div>
                        </div>
                    </div>
               </button>

                 <div id="demo<?php 
    echo $i;
    ?>
" class="collapse">
                    <?php 
    $row = SelectAllWhere('gp_customer', 'pc_id', $pc_id);
    foreach ($row as $rw) {
        extract($rw);
        // echo "HHHH";
        // echo $cust_name;
        // echo $cust_mobile;
        // echo $cust_entry;
        // echo $cust_out;
    }
    ?>
                  </div>

                </div>
			<?php 
    $i++;
}
// $i=1;
foreach ($row1 as $rw1) {
    extract($rw1);
    echo "<option value='{$mem_mobile}'>" . $mem_mobile . "</option>";
    // $i++;
}
?>
							</select>
						  </div>

						   <div class="form-group">
							<label for="prem_pc">Pc Id</label>
							<select  class="form-control" name="prem_pc" id="prem_pc">
								<option value="">Select PC</option>
								<?php 
$row = SelectAllWhere('pc_info', 'status', 0);
// $i=1;
foreach ($row as $rw) {
    extract($rw);
    echo "<option value='{$id}'>PC " . $id . "</option>";
    // $i++;
}
?>
							</select>
						  </div>
						  
						   <div class="form-group">
							<label for="est_time">Remaining Hour</label>
							<input type="number" class="form-control" id="remain_hour" name="remaining_hour" readonly>
						  </div>
						  
<?php

include 'inc/connection.php';
include 'inc/functions.php';
if (isset($_GET['rid'])) {
    $pc_id = $_GET['rid'];
    $row = SelectAllWhere('pc_info', 'id', $pc_id);
    foreach ($row as $rw) {
        extract($rw);
    }
    if ($status == 0) {
        $query = "UPDATE pc_info SET del_status=1 where id='{$pc_id}'";
        $insert = mysql_query($query) or die(mysql_error());
        if ($insert) {
            $msg = "Successfully Deleted";
            header('location:view_pc.php?msg=' . $msg);
        }
    } else {
        $msg = "PC Is in used can not be deleted";
        header('location:view_pc.php?msg=' . $msg);
    }
}
// if(isset($_GET['rateid']))
// {
// $rate_id=$_GET['rateid'];
// $query="UPDATE hourly_rate SET del_status=1 where rate_id='$rate_id'";
// $insert=mysql_query($query) or die(mysql_error());
// if($insert)
// {
// $msg="Successfully Deleted";
// header('location:view_hourly_rate.php?msg='.$msg);
<?php

include 'inc/connection.php';
include 'inc/header.php';
include 'inc/nav.php';
include 'inc/functions.php';
?>
 
        <div id="page-wrapper">
		<?php 
if (isset($_GET['memid'])) {
    $member_id = $_GET['memid'];
    $row = SelectAllWhere('premium_mem', 'member_id', $member_id);
    foreach ($row as $rw) {
        extract($rw);
    }
    ?>


            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Renew</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <form action="inc/query.php" method="POST">
                     <input type="hidden" name="member_id" value="<?php 
    echo $member_id;
    ?>
<?php

include 'inc/connection.php';
include 'inc/header.php';
include 'inc/nav.php';
include 'inc/functions.php';
?>
    <div id="page-wrapper">
		<?php 
if (isset($_GET['rid'])) {
    $dis_id = $_GET['rid'];
    $row = SelectAllWhere('discount', 'dis_id', $dis_id);
    foreach ($row as $rw) {
        extract($rw);
    }
    ?>
		  <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Edit Discount Rate</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
			
				<form action="inc/query.php" method="POST">
					<input type="hidden" name="dis_id" value="<?php 
    echo $dis_id;
    ?>
"/>
				  
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
				<table class="table table-bordered">
					<tr>
						
						<th>Mobile</th>
						<th>Name</th>
						<th>Email</th>
						<th>Password</th>						
						<th>Action</th>
					</tr>
		<?php 
$row = SelectAllWhere('general_customer', 'del_status', 0);
foreach ($row as $rw) {
    extract($rw);
    echo "<tr>";
    echo "<td>" . $cust_mobile . "</td>";
    echo "<td>" . $cust_name . "</td>";
    echo "<td>" . $cust_email . "</td>";
    echo "<td>" . $cust_password . "</td>";
    echo "<td><a href='edit_gene_cust.php?rid={$cust_id}' class='btn btn-warning'>Edit</a> | <a href='delete_gene_cust.php?rid={$cust_id}' class='btn btn-danger'>Delete</a></td>";
    echo "</tr>";
}
?>



				</table>
<?php

include 'inc/connection.php';
include 'inc/functions.php';
if (isset($_GET['rid'])) {
    $rate_id = $_GET['rid'];
    $row = SelectAllWhere('hourly_rate', 'id', $rate_id);
    foreach ($row as $rw) {
        extract($rw);
    }
    if ($status == 0) {
        $query = "UPDATE hourly_rate SET del_status=1 where id='{$rate_id}'";
        $insert = mysql_query($query) or die(mysql_error());
        if ($insert) {
            $msg = "Successfully Deleted";
            header('location:view_hourly_rate.php?msg=' . $msg);
        }
    } else {
        $msg = "Can not be deleted";
        header('location:view_hourly_rate.php?msg=' . $msg);
    }
}
            <!-- /.row -->
            <div class="row">
				<table class="table table-bordered">
					<tr>
						<th>Name</th>
						<th>Mobile</th>
						<th>Email</th>
						<th>Subscription Hour</th>
						<th>Remaining Hour</th>
						<th>Registration Date</th>
						<th>Amount</th>
						<th>Renew</th>
						<th>Action</th>
					</tr>
		<?php 
$row = SelectAllWhere('premium_mem', 'del_status', 0);
foreach ($row as $rw) {
    extract($rw);
    echo "<tr>";
    echo "<td>" . $mem_name . "</td>";
    echo "<td>" . $mem_mobile . "</td>";
    echo "<td>" . $mem_email . "</td>";
    echo "<td>" . $sub_hour . "</td>";
    echo "<td>" . $remain_hour . "</td>";
    echo "<td>" . $reg_date . "</td>";
    echo "<td>" . $amount . "</td>";
    echo "<td><a href='renew_mem.php?memid={$member_id}' class='btn btn-success'>Renew</a></td>";
    echo "<td><a href='edit_premium_mem.php?rid={$member_id}' class='btn btn-warning'>Edit</a> | <a href='delete_premium_mem.php?rid={$member_id}' class='btn btn-danger'>Delete</a></td>";
    echo "</tr>";
}
?>
<?php

include_once 'inc/connection.php';
include_once 'inc/functions.php';
if (!empty($_POST['cid'])) {
    $customer_id = $_POST['cid'];
    $rows = SelectAllWhere('premium_mem', 'member_id', $customer_id);
    extract($rows);
    foreach ($rows as $row) {
        extract($row);
    }
    echo $remain_hour;
    // echo "test";
}
                    <h1 class="page-header">View Discount Rate</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
				<table class="table table-bordered">
				<tr>
						<th>Minimum Hour</th>
						<th>Discount (%)</th>
						<th>Action</th>
						
					</tr>
					
					<?php 
$row = SelectAllWhere('discount', 'dell_status', 0);
foreach ($row as $rw) {
    extract($rw);
    echo "<tr>";
    echo "<td>" . $dis_condition . "</td>";
    echo "<td>" . $dis_rate . "</td>";
    echo "<td><a href='edit_dis_rate.php?rid={$dis_id}' class='btn btn-warning'>Edit</a></td>";
    echo "</tr>";
}
?>
					
					</table>
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->
                    <h1 class="page-header">View Hourly Rate</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
				<table class="table table-bordered">
				<tr>
						<th>Rate (.Tk)</th>
						<th>Entry Date</th>
						<th>Action</th>
						
					</tr>
					
					<?php 
$row = SelectAllWhere('hourly_rate', 'del_status', 0);
foreach ($row as $rw) {
    extract($rw);
    echo "<tr>";
    echo "<td>" . $rate . "</td>";
    echo "<td>" . $entry_date . "</td>";
    echo "<td><a href='edit_hourly_rate.php?rid={$rate_id}' class='btn btn-warning'>Edit</a></td>";
    echo "</tr>";
}
?>
					
					</table>
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->
<?php

include_once 'inc/connection.php';
include_once 'inc/functions.php';
if (!empty($_POST['cid'])) {
    $customer_id = $_POST['cid'];
    $rows = SelectAllWhere('premium_mem', 'mem_mobile', $customer_id);
    extract($rows);
    foreach ($rows as $row) {
        extract($row);
    }
    echo $remain_hour;
    // echo "test";
}
<?php

include 'inc/connection.php';
include 'inc/header.php';
include 'inc/nav.php';
include 'inc/functions.php';
?>
 
        <div id="page-wrapper">
		<?php 
if (isset($_GET['rid'])) {
    $cust_id = $_GET['rid'];
    $row = SelectAllWhere('general_customer', 'cust_id', $cust_id);
    foreach ($row as $rw) {
        extract($rw);
    }
    ?>
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Edit General Customer</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <form action="inc/query.php" method="POST">
					<input type="hidden" name="cust_id" value="<?php 
    echo $cust_id;
    ?>
"/>
				  <div class="form-group">
                                    <div class="huge" style="color:gray">PC- <?php 
    echo $i;
    ?>
</div>
                                </div>
                            </div>
                        </div>
                    </div>
               </button>

                 <div id="demo<?php 
    echo $i;
    ?>
" class="collapse">
                    <?php 
    $row = SelectAllWhere('customer_info', 'pc_id', $pc_id);
    foreach ($row as $rw) {
        extract($rw);
        echo $cust_name;
    }
    ?>
                  </div>

                </div>
			<?php 
    $i++;
}
?>
            </div>
            <!-- /.row -->
        </div>