<?php
ob_start();
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$formname = 'All Data';
$maindb = 'alldata';
$printfile = "member_print.php";
$file = 'member.php';
$trandbexist = 0;
$grid = '';
$keyfld = "memno";
$keycond = "";
$focusfield = "name";
$mgrpcode = '';

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn,$zdb);
//include("includes/vouchno_generate.php");
//include("includes/prev&next.php");

//if ($addflag != 1) {
//
//    $getvouch = '';
//    if ($addflag == 0) {
//        $getvouch = $_GET[$keyfld];
//    } else {
//        $getvouch = $qvouch;
//    }
//
//    $result = mysqli_query($conn,"SELECT * FROM `$maindb` WHERE $keyfld='$getvouch' ") or die(mysqli_error($conn));
//    $get = mysqli_fetch_array($result);
////    browse($get);
//
////    $getbroker = mysqli_query($conn,"SELECT * FROM `member` WHERE `accode`='$get[broker]'") or die(mysqli_error($conn));
////    $gbroker = mysqli_fetch_array($getbroker);
//}

$senable = "";
$cenable = "";


//if (isset($_GET["delete"])) {
//    delete($zdb, "$maindb", "$keyfld", $_GET[$keyfld], "$file?mode=last");
//}

include("includes/linkshead.php");
?>  

</head>
<body>
    <form action='' method='POST'>
        <!-- Default box -->
        <div class="row" style="padding-left: 2%;padding-right: 2%">
            <div class=" table-responsive">
                        <table id="example1" class="table table-striped">
                            <thead>
                                <tr class='mySearchTr'>
                                    <th>BR.No.</th>
                                    <th>Name</th>
                                    <th>Address</th>
                                    <th>Area</th>
                                    <th>Mobile</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                $srchresult = mysqli_query($conn,"SELECT `region`, `memno`, `brno`, `name`, `add1`, `add2`, `add3`, `city`, `pin`, `mobile` FROM `$maindb` ") or die(mysqli_error($conn));
                                while ($row = mysqli_fetch_array($srchresult)) {
                                    echo "<tr class=''>";
                                    echo "<td align='left'>$row[brno]</td>";
                                    echo "<td align='left'>$row[name]</td>";
                                    echo "<td align='left'>$row[add1]</td>";
                                    echo "<td align='left'>$row[station]</td>";
                                    echo "<td align='left'>$row[mobile]</td>";
                                    echo "</tr>";
                                }
                                ?>
                            </tbody>
                        </table>
                    </div>
        </div>
    </form>
    
    <?php include("includes/linksfoot.php"); ?>
</body>
</html>
