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

//include("includes/menu_rights.php");
//$admin = $_SESSION["admin_" . $dbname];

$zroot = $_SESSION["zdir"];

$src = "";
$action = isset($_GET["action"]) ? $_GET["action"] : "";
switch ($action) {

    ####################### MASTERS ##########################
    case "member";
        $src = "member.php?mode=last";
        break;

    case "member_all";
        $src = "member_all.php?mode=last";
        break;

    case "finallist";
        $src = "finallist.php?mode=last";
        break;

    case "attendlist";
        $src = "attendlist.php?mode=last";
        break;

    case "eligmemb";
        $src = "eligmemb.php?mode=last";
        break;

    case "master";
        $src = "master.php?mode=last";
        break;

    case "memberprint";
        $src = "finallist_print.php?mode=last";
        break;

    case "labels";
        $src = "labels.php?mode=last";
        break;

    case "sms";
        $src = "smsaddress.php?mode=last";
        break;

    case "alldata";
        $src = "alldata.php?mode=last";
        break;

    case "alllisting";
        $src = "alllisting.php?mode=last";
        break;

    ####################### TRANSACTION ##########################
    case "cashpay";
        $src = "cashpay.php?mode=last";
        break;

    case "cashrecd";
        $src = "cashrecd.php?mode=last";
        break;

    ######################### REPORTS ###########################
    case "partyexp";
        $src = "partyexp.php";
        break;
    case "ledger";
        $src = "ledger.php";
        break;

    case "cashbook";
        $src = "bankbook.php?para=C";
        break;

    ########################## FINAALIZATION ########################
    case "trbal";
        $src = "trbal.php";
        break;

    case "profit";
        $src = "profit.php";
        break;

    case "profshar";
        $src = "profshar.php";
        break;

    case "balsheet";
        $src = "balsheet.php";
        break;


    #########################TOOLS#########################
    case "company";
        $src = "company.php?mode=last";
        break;

    case "profile";

//        if ($guser[usertype] == 1) {
//            $src = "user.php?mode=last";
//        } else {
        $src = "user2.php?mode=last";
//        }
        break;

    case "backup";
        $src = "backup.php";
        break;

    case "yearend";
        $src = "yearend.php";
        break;

    default :
        $head = "Home";
        $src = "default.php?mode=last";
}

include("includes/linkshead.php");
$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);

//$zdb = $_SESSION["zdbyear_" . $dbname];
//mysqli_select_db($conn, $zdb);
?>
<style type="text/css">

</style>
</head>
<body class="off-canvas">
    <div id="container" class="sidebar-mini">
        <header id="header">
            <!--logo start-->
            <div class="brand"><a href="menu.php" class="logo" style="text-align: center;"><?php Echo "AD 2025"; ?></a></div>
            <!--<div class="brand"><a href="menu.php" class="logo"><?php // Echo $project_name;               ?></a></div>-->
            <!--logo end-->
            <div class="user-nav">
                <ul>



<!--                    <li class="profile-photo"><img src="assets/img/avatar.png" alt="" class="img-circle"></li>-->
                    <li class="dropdown settings">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <b style="font-size: 20px;"><?php echo $_SESSION["username_" . $dbname]; ?></b> <i class="fa fa-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu animated fadeInDown">
                            <li><a href="backup.php"><b>Backup</b></a></li>  
                            <li><a href="?action=profile"><i class="fa fa-user"></i> Profile</a></li>
                            <li><a href="logout.php"><i class="fa fa-power-off"></i> Logout</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </header>

        <section class="">
            <section id="main-content">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 pad">
                    <div class="toggle-navigation toggle-left padimenu ">
                        <a class="dropdown-toggle" href="?action=finallist">
                            <button class="" style="background-color:#0dad93;border:1px solid white;color: black;border-radius: 3px;height: 30px;width: 135px;">
                                <b style="font-size: 12px;">Voter List</b>
                            </button>
                        </a>
                        <a class="dropdown-toggle" href="?action=attendlist">
                            <button class="" style="background-color:#0dad93;border:1px solid white;color: black;border-radius: 3px;height: 30px;width: 135px;">
                                <b style="font-size: 12px;">Attendance List</b>
                            </button>
                        </a>
                        <a class="dropdown-toggle" href="?action=eligmemb">
                            <button class="" style="background-color:#0dad93;border:1px solid white;color: black;border-radius: 3px;height: 30px;width: 135px;">
                                <b style="font-size: 12px;">Eligible Member</b>
                            </button>
                        </a>
                        <!--                        <a class="dropdown-toggle" href="?action=master">
                                                    <button class="" style="background-color:#0dad93;border:1px solid white;color: black;border-radius: 3px;height: 30px;width: 135px;">
                                                        <b style="font-size: 12px;">Masters</b>
                                                    </button>
                                                </a>-->
                        &nbsp;
                        <!--                        <a class="dropdown-toggle" href="?action=memberprint">
                                                    <button class="" style="background-color:white;border:1px solid #0dad93;border-radius: 3px;height: 30px;width: 135px;">
                                                        <b style="font-size: 12px;">Listing</b>
                                                    </button>   
                                                </a>
                                                &nbsp;
                                                <a class="dropdown-toggle" href="?action=labels">
                                                    <button class="" style="background-color:white;border:1px solid #0dad93;border-radius: 3px;height: 30px;width: 135px;">
                                                        <b style="font-size: 12px;">Labels</b>
                                                    </button>
                                                </a>&nbsp;-->
                        <!--                        <a class="dropdown-toggle" href="?action=sms">
                                                    <button class="" style="background-color:white;border:1px solid #0dad93;border-radius: 3px;height: 30px;width: 135px;">
                                                        <b style="font-size: 12px;">Sms</b>
                                                    </button>
                                                </a>&nbsp;-->

                    </div>
                    <iframe src="<?php echo $src; ?>" name="frame1" style="width: 100%; height:5000px;"  frameBorder="0" scrolling="no"></iframe>
                </div>
            </section>
        </section>
    </div>
    <!--main content end-->
    <?php include("includes/linksfoot.php") ?>
</body>
</html>
