<!-- BEGIN SIDEBPANEL-->
<nav class="page-sidebar" data-pages="sidebar">
    <!-- BEGIN SIDEBAR MENU HEADER-->
    <div class="sidebar-header">
        <img src="<?php echo $base_url; ?>upload/<?php echo $logo; ?>" alt="logo" class="brand" data-src="<?php echo $base_url; ?>upload/<?php echo $logo; ?>" data-src-retina="<?php echo $base_url; ?>upload/<?php echo $logo; ?>" width="32" height="32">
        <div class="sidebar-header-controls">
            <button aria-label="Toggle Drawer" type="button" class="btn btn-icon-link invert sidebar-slide-toggle m-l-20 m-r-10" data-pages-toggle="#appMenu">
                <i class="pg-icon">chevron_down</i>
            </button>
            <button aria-label="Pin Menu" type="button" class="btn btn-icon-link invert d-lg-inline-block d-xlg-inline-block d-md-inline-block d-sm-none d-none" data-toggle-pin="sidebar">
                <i class="pg-icon"></i>
            </button>
        </div>
    </div>
    <!-- END SIDEBAR MENU HEADER-->
    <!-- START SIDEBAR MENU -->
    <div class="sidebar-menu">
        <!-- BEGIN SIDEBAR MENU ITEMS-->
        <ul class="menu-items">

        <!-- Dasboard -->
            <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'index.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="m-t-20 active"';
                    } else {
                        echo 'class="m-t-20"';
                    }?>>
                <a href="<?php echo $base_url; ?>">
                    <span class="title">Dashboard</span>
                </a>
                <span class="icon-thumbnail"><i class="pg-icon">home</i></span>
            </li>

            <!-- Dasboard -->

           

            <!-- Church-->

            <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'district.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'add-district.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'edit-district.php'
                    || basename($_SERVER['SCRIPT_NAME']) == 'conference-officer.php'
                ) {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="open active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="javascript:;"><span class="title">Conference</span>
                    <span class=" arrow"></span></a>
                <span class="icon-thumbnail"><i class="pg-icon">chart</i></span>
                <ul class="sub-menu">
                <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'district.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'add-district.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'edit-district.php' ) {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>district">
                    <span class="title">Districts</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">di</i></span>
                    </li>
                    <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'conference-officer.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>conference-officer">
                    <span class="title">Conference Officers</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">of</i></span>
                    </li>
                </ul>
            </li>
            <!-- Church-->


             <!-- Clergy-->

             <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'clergy.php'
                    || basename($_SERVER['SCRIPT_NAME']) == 'add-clergy.php'
                    || basename($_SERVER['SCRIPT_NAME']) == 'edit-clergy.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="open active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="javascript:;"><span class="title">Clergy</span>
                    <span class=" arrow"></span></a>
                <span class="icon-thumbnail"><i class="pg-icon">person</i></span>
                <ul class="sub-menu">
                <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'clergy.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>clergy">
                    <span class="title">All Clergies</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">ac</i></span>
                    </li>


                    <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'add-clergy.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>add-clergy">
                    <span class="title">Add Clergy</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">ad</i></span>
                    </li>                    
                </ul>
            </li>
            <!-- Clergy-->


             <!-- Members-->

             <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'member.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'add-member.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'edit-member.php' 
                ) {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="open active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="javascript:;"><span class="title">Members</span>
                    <span class=" arrow"></span></a>
                <span class="icon-thumbnail"><i class="pg-icon">users</i></span>
                <ul class="sub-menu">
                <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'member.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>member">
                    <span class="title">All Members</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">m</i></span>
                    </li>


                    <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'add-member.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>add-member">
                    <span class="title">Add Member</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">a</i></span>
                    </li>                    
                </ul>
            </li>
            <!-- Church-->

            <!-- Administrator -->
            <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'reset-password.php' 
                    || basename($_SERVER['SCRIPT_NAME']) == 'systemadmin.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="open active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="javascript:;"><span class="title">Administrator</span>
                    <span class=" arrow"></span></a>
                <span class="icon-thumbnail"><i class="pg-icon">shield_lock</i></span>
                <ul class="sub-menu">
                <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'reset-password.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>reset-password">
                    <span class="title">Reset Password</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">re</i></span>
                    </li>
                    <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'system-admin.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>system-admin">
                    <span class="title">System Admin</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">sy</i></span>
            </li>
                    
                </ul>
            </li>
            <!-- Administrator -->


            <!-- Settings -->
            <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'settings.php'
                        || basename($_SERVER['SCRIPT_NAME']) == 'position-settings.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="open active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="javascript:;"><span class="title">Settings</span>
                    <span class=" arrow"></span></a>
                <span class="icon-thumbnail"><i class="pg-icon">database</i></span>
                <ul class="sub-menu">
                <li <?php if (basename($_SERVER['SCRIPT_NAME']) == 'settings.php') {
                        // APPLY THE ACTIVE CLASS
                        echo 'class="active"';
                    } else {
                        echo 'class=""';
                    }?>>
                <a href="<?php echo $base_url; ?>settings">
                    <span class="title">General Settings</span>
                </a>
                        <span class="icon-thumbnail"><i class="pg-icon">ge</i></span>
                    </li>
                </ul>
            </li>
            <!-- Settings -->


            

            

            <li class="">
                <a href="<?php echo $base_url; ?>logout"><span class="title">Logout</span></a>
                <span class="icon-thumbnail"><i class="pg-icon">exit</i></span>
            </li>
        </ul>
        <div class="clearfix"></div>
    </div>
    <!-- END SIDEBAR MENU -->
</nav>
<!-- END SIDEBAR -->
<!-- END SIDEBPANEL-->