<?php
namespace App\Controllers;
use \Core\View;
use \Core\Inputs;
use \Core\Userlog;
use \Core\Menu;
use App\Models\Homem;
use App\Email\Emails;
class Menus extends \Core\Controller
{
    /** Browser Checking code started */
    public static function checkbrower()
    {
        $mystring = $_SERVER['HTTP_USER_AGENT'];
        $word = 'Chrome';
        if(strpos($mystring, $word) !== false)
        {
            if(strpos($mystring, 'Mozilla') !== false)
            {
                return "1";
            } 
        }
        else if(strpos($mystring, 'Mozilla') !== false)
        {
            return "1";
        } 
        else
        {
            return "0";
        }
    }
    public static function checkiphone()
    {
        $iPod    = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
        $iPhone  = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
        $iPad    = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
        $Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
        $webOS   = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
        if($iPod || $iPhone || $iPad || $Android || $webOS)
        {
            echo 1;
        }
        else
        {
            echo 0;
        }
    }
    /** Browser Checking code Ended */

    /** CSS, Script started */
    public static function css()
    {
        $css = 
        '<!DOCTYPE html>
        <html lang="en">
        <head>
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
            <title>Hindu College of Engineering & Technology || Guntur</title>
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
            <title>Hindu College of Engineering & Technology || Guntur</title>
            <link rel="stylesheet" href="https://assets.hinduengg.com/hindu/assets/css/bootstrap.min.css">
            <link rel="stylesheet" href="https://assets.hinduengg.com/hindu/assets/css/style.css">
            <link rel="stylesheet" href="https://assets.hinduengg.com/hindu/assets/sweetalert2/dist/sweetalert2.min.css" >
            <style>
                @media print
                {
                    body * {
                        visibility: hidden;
                    }
                    .print-this, .print-this * {
                        visibility: visible;
                    }
                }
            </style>
            <script>
                function exportTableToExcel(tableID, filename = "")
                {
                    var downloadLink;
                    var dataType = "application/vnd.ms-excel";
                    var tableSelect = document.getElementById(tableID);
                    var tableHTML = tableSelect.outerHTML.replace(/ /g, "%20");
                    
                    // Specify file name
                    filename = filename?filename+".xls":"excel_data.xls";
                    
                    // Create download link element
                    downloadLink = document.createElement("a");
                    
                    document.body.appendChild(downloadLink);
                    
                    if(navigator.msSaveOrOpenBlob){
                        var blob = new Blob(["\ufeff", tableHTML], {
                            type: dataType
                        });
                        navigator.msSaveOrOpenBlob( blob, filename);
                    }else{
                        // Create a link to the file
                        downloadLink.href = "data:" + dataType + ", " + tableHTML;
                    
                        // Setting the file name
                        downloadLink.download = filename;
                        
                        //triggering the function
                        downloadLink.click();
                    }
                }
            </script>
        </head>';
        return $css;  
    }
    public static function script()
    {
        $script =
                '
                <div class="footer navbar-fixed-bottom text-center">        
                    <span class="text-muted text-center">Copyright &#169 2020. Hindu College of Engineering & Technology, Guntur</span>
                </div>
                <script src="https://assets.hinduengg.com/hindu/assets/word/jquery.min.js" ></script>
                <script src="https://assets.hinduengg.com/hindu/assets/js/bootstrap.min.js" ></script>
                <script src="https://assets.hinduengg.com/hindu/assets/vendor/sweetalert2/dist/sweetalert2.min.js" ></script>';
        return $script;  
    }
    public static function blockscript()
    {
        $script =
                '
                <div class="footer navbar-fixed-bottom text-center">        
                    <span class="text-muted text-center">Copyright &#169 2020. Hindu College of Engineering & Technology, Guntur</span>
                </div>
                <script src="https://assets.hinduengg.com/hindu/assets/word/jquery.min.js" ></script>
                <script src="https://assets.hinduengg.com/hindu/assets/js/bootstrap.min.js" ></script>
                <script src="https://assets.hinduengg.com/hindu/assets/sweetalert2/dist/sweetalert2.min.js" ></script>
                <!-- Script to stop mouse right click start-->
            <script>
                //Disable right click script
                var message = "";
                ///////////////////////////////////
                function clickIE() {
                    if (document.all) {
                        (message);
                        return false;
                    }
                }

                function clickNS(e) {
                    if (document.layers || (document.getElementById && !document.all)) {
                        if (e.which == 2 || e.which == 3) {
                            (message);
                            return false;
                        }
                    }
                }
                if (document.layers) {
                    document.captureEvents(Event.MOUSEDOWN);
                    document.onmousedown = clickNS;
                } else {
                    document.onmouseup = clickNS;
                    document.oncontextmenu = clickIE;
                }

                document.oncontextmenu = new Function("return false")
            </script>
            <!-- Script to stop mouse right click end-->

            <!-- Script to prevent selection start-->
            <script>
                $(document).ready(function () {
                    $("body").bind("cut copy", function (e) {
                        e.preventDefault();
                    });
                });
            </script>
            <!-- Script to prevent selection end-->
                ';
        return $script;  
    }
    /** CSS, Script Ended */

    /**Default functions to support the main functions starting*/
    public static function year()
    {
        $year = date('Y')+5;
        $a = '';
        for($i=0; $i<=40; $i++)
        {
            $y = $year-$i;
            $a .= '<option value="'.$y.'">'.$y.'</option>';
        }
        return $a;
    }
    public static function examyear()
    {
        $year = date('Y')+1;
        $a = '';
        for($i=0; $i<=1; $i++)
        {
            $y = $year-$i;
            $a .= '<option value="'.$y.'">'.$y.'</option>';
        }
        return $a;
    }
    /**Default functions to support the main functions ending*/
    
    public static function normalmenu()
    {
        // bg-light
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light ">
                <a class="navbar-brand" href="#" >HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    
                    <li class="nav-item active" >
                        <a class="nav-link" href="/Accounts/index" >Home</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/latest" >Latest News</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/suggestions" >Suggestions</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/contactus" >Contact Us</a>
                    </li>
                    <!--
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        Dropdown
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                        <a class="dropdown-item" href="#">Action</a>
                        <a class="dropdown-item" href="#">Another action</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="#">Something else here</a>
                        </div>
                    </li>
                    -->
                    </ul>
                    <form class="form-inline my-2 my-lg-0">
                    <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
                    <button class="btn btn-outline-light my-2 my-sm-0" type="submit">Search</button>
                    </form>
                </div>
            </nav>
        ';
        return $menu;
    }
    public static function usermenu()
    {
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    <li class="nav-item active">
                        <a class="nav-link" href="/Main/home" >Home</a>
                    </li>
                <!--
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Masters
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/bloodgroup" >Blood Group</a>
                        <a class="dropdown-item" href="/Main/courses">Courses</a>
                        <a class="dropdown-item" href="/Main/departments">Departments</a>
                        <a class="dropdown-item" href="/Main/category">Category</a>
                        </div>
                    </li>
                    
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Students
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/supload" >Upload Student Details</a>
                        <a class="dropdown-item" href="/Main/slist" >View List of Students</a>
                        <a class="dropdown-item" href="/Main/addstudent">Individual Student Entry</a>
                        <a class="dropdown-item" href="/Main/ssearch" >Search a Student</a>
                        <a class="dropdown-item" href="/Main/upstdntphotos">Upload Students Photos</a>
                        <a class="dropdown-item" href="/Main/stdntadditional">Student Additional Details</a>
                        </div>
                    </li>
                    
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        User
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/ulist">View List of Users</a>
                        <a class="dropdown-item" href="/Main/adduser">Individual User Entry</a>
                        </div>
                    </li>
                    
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Subject
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/searchsub">Search Subjects Available</a>
                        <a class="dropdown-item" href="/Main/indsubject">Individual Subject Entry</a>
                        <a class="dropdown-item" href="/Main/bulksubject">Bulk Subject Uploading</a>
                        </div>
                    </li>
                
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Marks Entry
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/uploadmarks" >B.Tech Marks Entry</a>
                        <a class="dropdown-item" href="/Main/mdipinformat">Diploma Marks (College Format)</a>
                        <a class="dropdown-item" href="/Main/mindividual" >Individual Marks Entry</a>
                        <a class="dropdown-item" href="/Main/editindstdmarks"  >Edit Individual Student Marks</a>
                        </div>
                    </li>
                    -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Reports 
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/studentresultfinal" >Student Result</a>
                        <!--<a class="dropdown-item" href="/Main/sattempts" >Student Attempts</a>-->
                        <a class="dropdown-item" href="/Main/semwiseconmarks" >Sem wise Consolidated Marks Report</a>
                        <a class="dropdown-item" href="/Main/sbacklogs" >Sem Wise Student Backlogs</a>
                        <a class="dropdown-item" href="/Main/subwisefailistinsem" >Subject wise Baclogs in Sem</a>
                        <a class="dropdown-item" href="/Main/subwiseresults" >Subject Wise Results</a>
                        <a class="dropdown-item" href="/Main/deptwiseresult" >Semester Wise Result Analysis</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Internal exams
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Internalexams/fixdatesofinternalexam" >Student Result</a>
                        </div>
                    </li>
                <!--
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Fee 
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Main/allotstdfee" >Allot Fee for Students</a>
                        <a class="dropdown-item" href="/Main/normalfeecolect" >Normal Fee Collection</a>
                        <a class="dropdown-item" href="/Main/examfeecollect" >Exam Fee Collection</a>
                        <a class="dropdown-item" href="/Main/stdntindfee" >Check Student Fees</a>
                        </div>
                    </li>
                -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    public static function studentmenu()
    {
        $a='';
        if($_SESSION['org_id'] == 3)
        {
            $a = '<li class="nav-item active">
                        <a class="nav-link" href="/Students/uploadphotos" >Photo Contest</a>
                    </li>';
        }
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/home" >Home</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/Students/feestatement" >Fee Details</a>
                    </li>
                    '.$a.'
                    <!--
                    <li class="nav-item active">
                        <a class="nav-link" href="/Students/attendancebydate" >Fee Details</a>
                    </li>
                    
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Subject
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        
                        <a class="dropdown-item" href="/Exams/indsubject" >Add Subject</a>
                        <a class="dropdown-item" href="/Exams/searchsub" >Search Subject</a>
                        
                        <a class="dropdown-item" href="/Exams/subjectsyllabus" >Add Subject Syllabus</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendance" >Subject Attendance</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendancebydate">Date wise Sinle Subject Attendance</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Internal Exams
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Internalexams/singlesubjectinternalmarksentry">Internal Exam Marks Entry</a>
                        </div>
                    </li>
                    -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    public static function facultymenu()
    {
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/home" >Home</a>
                    </li>

                    
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Subject
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <!--
                        <a class="dropdown-item" href="/Exams/indsubject" >Add Subject</a>
                        <a class="dropdown-item" href="/Exams/searchsub" >Search Subject</a>
                        -->
                        <a class="dropdown-item" href="/Exams/subjectsyllabus" >Add Subject Syllabus</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendance" >Subject Attendance</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendancebydate">Date wise Sinle Subject Attendance</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Internal Exams
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Internalexams/singlesubjectinternalmarksentry">Internal Exam Marks Entry</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    public static function classinchargesmainmenu()
    {
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/home" >Home</a>
                    </li>

                    <li class="nav-item active">
                    <a class="nav-link" href="/Accounts/hnowiseconsreport" >Individual Student Fee Report</a>
                    </li>
                    
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Fee Collection Reports
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/slist" >List of Students</a>
                        <a class="dropdown-item" href="/Admissions/updatestudentcontactdetails" >Update Student Contact Details</a>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsolactivenewallfeetypefundamental" >Dept Wise Consolidated Report - All Fee Types</a>
                        <a class="dropdown-item" href="/Accounts/additionalfeecollectionsummary">Additional Fee Collection Summary</a>
                        <a class="dropdown-item" href="/Collection/reportbwndates" >Fee Collection Between Two Dates - Dept Wise</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Attendance
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Admissions/dailyattendancefirstandlasthourstostudents" >First Hour Attendance Notification (To Students)</a>
                        <a class="dropdown-item" href="/Admissions/dailyattendancefirstandlasthours" >First Hour Attendance Notification (To Parents)</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Subject
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Exams/indsubject" >Add Subject</a>
                        <a class="dropdown-item" href="/Exams/searchsub" >Search Subject</a>
                        <a class="dropdown-item" href="/Exams/subjectsyllabus" >Add Subject Syllabus</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendance" >Subject Attendance</a>
                        <a class="dropdown-item" href="/Exams/datewiseattendancesummary" > Attendance Report</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Internal Exams
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Internalexams/singlesubjectinternalmarksentry">Internal Exam Marks Entry</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    public static function collectionmainmenu()
    {
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    <!--
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/home" >Home</a>
                    </li>-->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Fee Collection
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        ';
                        // if($_SESSION['org_id'] == 1)
                        {
                        $menu.='<a class="dropdown-item" href="/Accounts/normalfeelatest" >Latest Tution Fee Collection</a>';
                        }
                        $menu.='
                        
                        <!--<a class="dropdown-item" href="/Accounts/normalfeecolect" >Old Tution Fee Collection</a>
                        <a class="dropdown-item" href="/Accounts/normalfeecolectnew" >New Tution Fee Collection</a>-->
                        
                        <a class="dropdown-item" href="/Accounts/examfeecollect" >Exam Fee Collection</a>
                        
                        <a class="dropdown-item" href="/Accounts/additionalfeecollection" >Additional Fee Collection</a>
                        <a class="dropdown-item" href="/Accounts/monthlyfeecollection" >Monthly Fee Collection</a>
                        <a class="dropdown-item" href="/Newfee/eventfeecollection" >Event Fee Collection</a>
                        <a class="dropdown-item" href="/Newfee/extrafeecollection" >Extra Fee Collection</a>
                        <a class="dropdown-item" href="/Accounts/ipgdata" >Online Fee Collection Receipts</a>
                        </div>
                    </li>
                    <!--
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/normalfeecolect" >Old Fee</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/normalfeecolectnew">New Fee</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/Accounts/examfeecollect" >Exam Fee</a>
                    </li>
                    
                    <li class="nav-item active">
                    <a class="nav-link" href="/Accounts/hnowiseconsreport" >Individual Fee Report</a>
                    </li>
                    -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Reports
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        
                        <a class="dropdown-item" href="/Accounts/hnowiseconsreport" >Individual Fee Report</a>
                        <a class="dropdown-item" href="/Accounts/slist" >List of Students</a>
                        <a class="dropdown-item" href="/Accounts/deptwisefeesettingreport" >Department wise Fee List</a>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsolactive" >Dept Wise Consolidated Report</a>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsolactivenewallfeetypefundamental" >Dept Wise Consolidated Report - All Fee Types</a>
                        <a class="dropdown-item" href="/Accounts/coursewiseconsolactive" >Course Wise Detailed Report</a>
                        <a class="dropdown-item" href="/Accounts/datewisecon" >Date wise fee collection report</a>
                        <a class="dropdown-item" href="/Accounts/reportbwndates" >Fee Collection betwen two dates</a>
                        <a class="dropdown-item" href="/Accounts/daysummary" >Day Wise Summary Report</a>
                        <a class="dropdown-item" href="/Accounts/individualexamfeecollectionbetweendates">Individual Exam Fee Collection Between Two Days</a>
                        <a class="dropdown-item" href="/Accounts/examfeecollectionbetweendates">Exam Fee Collection Between Two Days</a>
                        <a class="dropdown-item" href="/Accounts/monthlyfeecollectionsummary">Monthly Fee Collection Summary</a>
                        <a class="dropdown-item" href="/Sreports/operatorwisedaysummary">Operator wise day Summary</a>
                        <a class="dropdown-item" href="/Accounts/additionalfeecollectionsummarybetweentwodates">Additional Fee Collection Summary Between Two Dates</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Add New Data
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/addstudent" >Add Student</a>
                        <a class="dropdown-item" href="/Accounts/allotindstdfee" >Add Individual Student Prescribed Fee</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Admissions
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Admissions/addmissionenquiry" >Admission Enquiry</a>
                        <a class="dropdown-item" href="/Admissions/addmissionapplicationfee" >Provisional Application</a>
                        <a class="dropdown-item" href="/Admissions/provisionaladdmissionfee" >Provisional Admission Fee</a>
                        <a class="dropdown-item" href="/Admissions/additionalfeecollection" >Additional Fee - Provisional Admissions</a>
                        <a class="dropdown-item" href="/Admissions/certfixing" >Certificate Details</a>
                        <a class="dropdown-item" href="/Admissions/feefixing" >Final Fee Details Submission</a>
                        <a class="dropdown-item" href="/Admissions/addmissionapplicationfeeonluprint" >Application Fee Print</a>
                        <a class="dropdown-item" href="/Admissions/provisionaladdmissionfeeonluprint" >Pro-Admission Fee Print</a>
                        </div>
                    </li>
                    <!--
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Admissions
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Admissions/addmissionapplicationfee" >Admission Application Fee Collection</a>
                        <a class="dropdown-item" href="/Admissions/provisionaladdmissionfee" >Provisional Admissions Fee Collection</a>
                        <a class="dropdown-item" href="/Admissions/additionalfeecollection" >Additional Fee - Provisional Admissions</a>
                        <a class="dropdown-item" href="/Admissions/additionalfeecollectionsummary" >Additional Fee Reports- Provisional Admissions</a>
                        
                        <a class="dropdown-item" href="/Admissions/addadmissionnquiry" >Admissions Eanquiry</a>
                        <a class="dropdown-item" href="/Admissions/updatestudentcontactdetails" >Update Student Contact Details</a>
                        
                        </div>
                    </li>
                    --!>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Certificates
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Certificates/studycertificateentry" >Study Certificate</a>
                        <a class="dropdown-item" href="/Certificates/transfercertificateentrypage" >TC Data Entry</a>
                        <a class="dropdown-item" href="/Certificates/transfercertificateissuingpage" >TC Certificate</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Cons. Reports
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">';
                        if($_SESSION["org_id"]!=1)
                        {
                            $menu.='
                            <a class="dropdown-item" href="/Accounts/reportbwndateswithopnameconsolidated" >Bank wise reports between two dates</a>';
                        }
                        $menu.='
                        <a class="dropdown-item" href="/Accounts/reportbwndateswithopnameconsolidatedbyuserid" >Operator wise fee collction summary</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Attendance
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Admissions/dailyattendancefirstandlasthourstostudents" >First Hour Attendance Notification (To Students)</a>
                        <!--<a class="dropdown-item" href="/Admissions/dailyattendancefirstandlasthours" >First Hour Attendance Notification (To Parents)</a>-->
                        <a class="dropdown-item" href="/Admissions/attendancereportbetweentwodates" >Student Wise Attendance Between Two dates</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/unblockexamfeecollect" >Unblock Exam Fee</a>
                        <a class="dropdown-item" href="/Admissions/discontinuedstudents" >Discontinued Students</a>
                        <a class="dropdown-item" href="/Accounts/profile" >Update Profile</a>
                        <a class="dropdown-item" href="/Accounts/changepassword" >Change Password</a>
                        <a class="dropdown-item" href="/Accounts/daywiseindividualworkreport" >Daily Work Report Summary</a>
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    public static function adminmainmenu()
    {
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <ul class="navbar-nav ml-auto navbar-right">
                        <li class="nav-item active">
                            <a class="nav-link" href="/Accounts/home" >Home</a>
                        </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Total Reports
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/deptwiseconsol" >Dept Wise Consolidated Report (Total)</a>
                        <a class="dropdown-item" href="/Accounts/coursewiseconsol" >Course Wise Detailed Report (Total)</a>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsolactive" >Dept Wise Consolidated Report (Active)</a>
                        <a class="dropdown-item" href="/Accounts/coursewiseconsolactive" >Course Wise Detailed Report (Active)</a>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsolinactive" >Dept Wise Consolidated Report (Discontinued)</a>
                        <a class="dropdown-item" href="/Accounts/coursewiseconsolinactive" >Course Wise Detailed Report (Discontinued)</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Admissions
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Admissions/addmissionenquiry" >Admission Enquiry</a>
                        <a class="dropdown-item" href="/Admissions/addmissionapplicationfee" >Provisional Application</a>
                        <a class="dropdown-item" href="/Admissions/provisionaladdmissionfee" >Provisional Admission Fee</a>
                        <a class="dropdown-item" href="/Admissions/additionalfeecollection" >Additional Fee - Provisional Admissions</a>
                        <a class="dropdown-item" href="/Admissions/certfixing" >Certificate Details</a>
                        <a class="dropdown-item" href="/Admissions/feefixing" >Final Fee Details Submission</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Accounts Section
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Admissions/additionalfeecollectionsummary" >Additional Fee Reports- Provisional Admissions</a>
                        <a class="dropdown-item" href="/Accounts/allotstdfee" >Bulk Uploading of Student Fee</a>
                        <a class="dropdown-item" href="/Accounts/allotindstdfee" >Individual Fee Upload</a>
                        <a class="dropdown-item" href="/Accounts/normalfeeconcession" >Concession Fee Details</a>
                        <a class="dropdown-item" href="/Accounts/deptwisefeesettingreport" >Department wise Fee List</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/Accounts/normalfeecolect" >Normal Fee Collection</a>
                        <a class="dropdown-item" href="/Accounts/normalfeecolectnew">New Fee Collection</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/Accounts/hnowiseconsreport" >Individual Student Fee Report</a>
                        
                        <a class="dropdown-item" href="/Accounts/dailyreport" >Operator Entry Report Date Wise</a>
                        <a class="dropdown-item" href="/Accounts/datewisecon" >Date wise Fee Collection</a>
                        <a class="dropdown-item" href="/Accounts/reportbwndates" >Fee Collection Between Two Dates</a>
                        <a class="dropdown-item" href="/Collection/reportbwndates" >Fee Collection Between Two Dates - Dept Wise</a>
                        <a class="dropdown-item" href="/Accounts/reportbwndateswithopname" >Fee Collection Between Two Dates with Operator Name</a>
                        <a class="dropdown-item" href="/Accounts/reportbybook" >Book Wise Fee Reciept Details</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsoladditionalfee" >Department wise Additional Fee Collection</a>
                        <a class="dropdown-item" href="/Accounts/deptwiseconsolmonthlyfee" >Department wise Monthly Fee Collection</a>

                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Reports New
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/operatorwisedailysumaryreport" >Operator Wise Daily Summary Report</a>
                        <a class="dropdown-item" href="/Accounts/daywisefeesummaryreport" >Day wise fee summary report</a>
                        <a class="dropdown-item" href="/Accounts/reportbwndateswithopnameconsolidated" >Bank wise transactions between days</a>
                        <a class="dropdown-item" href="/Accounts/bobspiltup" >BOB Split up between days</a>
                        <a class="dropdown-item" href="/Accounts/dateandcoursewiseoperatorreportbwndates" >Course and Fee wise operator report</a>
                        <a class="dropdown-item" href="/Accounts/monthlyfeecollectionsummary">Monthly Fee Collection Summary</a>
                        <a class="dropdown-item" href="/Accounts/monthlyfeecollectionsummarybetweendates">Monthly Fee Collection Summary Between Dates</a>
                        <a class="dropdown-item" href="/Accounts/additionalfeecollectionsummary">Additional Fee Collection Summary</a>
                        <a class="dropdown-item" href="/Accounts/additionalfeecollectionsummarybetweentwodates">Additional Fee Collection Summary Between Two Dates</a>
                        <a class="dropdown-item" href="/Sreports/operatorwisedaysummary">Operator wise day Summary</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Subject
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Timetable/workingdays" >Working Days</a>
                        <a class="dropdown-item" href="/Timetable/createshift" >Shift Creation</a>
                        <a class="dropdown-item" href="/Timetable/createtimetable" >Create Timetable</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/Exams/indsubject" >Add Subject</a>
                        <a class="dropdown-item" href="/Exams/searchsub" >Search Subject</a>
                        <a class="dropdown-item" href="/Exams/addsubfaculty">Add Facult to Subject</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendance">Subject Attendance</a>
                        <a class="dropdown-item" href="/Exams/datewiseattendancesummary">Date wise Attendance Summary</a>
                        <a class="dropdown-item" href="/Exams/singlesubjectattendancebydate">Date wise Sinle Subject Attendance</a>
                        <a class="dropdown-item" href="/Internalexams/singlesubjectinternalmarksentry">Internal Exam Marks Entry</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Extra
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        
                        <a class="dropdown-item" href="/Exams/stdntdetails" >Student Details</a>
                        <a class="dropdown-item" href="/Exams/userdetails" >User Details</a>
                        <a class="dropdown-item" href="/Gateway/userwisefeemode" >User wise Fee Mode Payments</a>
                        <a class="dropdown-item" href="/Gateway/daywisetotalreceipts" >Day Wise Total Receipts</a>
                        <a class="dropdown-item" href="/Certificates/certificatefoldersearch" >Search Certificate Folders</a>
                        </div>
                    </li>';
                $menu .='<li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                    Results 
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                    <a class="dropdown-item" href="/Main/studentresultfinal" >Student Result</a>
                    <!--<a class="dropdown-item" href="/Main/sattempts" >Student Attempts</a>-->
                    <a class="dropdown-item" href="/Main/semwiseconmarks" >Sem wise Consolidated Marks Report</a>
                    <a class="dropdown-item" href="/Main/sbacklogs" >Sem Wise Student Backlogs</a>
                    <a class="dropdown-item" href="/Main/subwisefailistinsem" >Subject wise Baclogs in Sem</a>
                    <a class="dropdown-item" href="/Main/subwiseresults" >Subject Wise Results</a>
                    <a class="dropdown-item" href="/Main/deptwiseresult" >Semester Wise Result Analysis</a>
                    </div>
                </li>';
                if($_SESSION['org_id'] == 1)
                {
                    $menu .= '
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Aided
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Sreports/degreeaidedfeereportbwndateswithopname" >Aided Degree Fee Collection</a>
                        <a class="dropdown-item" href="/Sreports/degreeunaidedfeereportbwndateswithopname" >Un-Aided Degree Fee Collection</a>
                        <a class="dropdown-item" href="/Sreports/degreeunaidedtutionfeefeereportbwndateswithopname" >Un-Aided Degree Tution Fee Collection</a>
                        <a class="dropdown-item" href="/Sreports/degreeunaidedaddoncoursefeefeereportbwndateswithopname" >Un-Aided Degree Add-On Course Fee Collection</a>
                        <a class="dropdown-item" href="/Sreports/interaidedfeereportbwndateswithopname" >Inter Fee Collection</a>
                        <a class="dropdown-item" href="/Sreports/pgfeereportbwndateswithopname" >PG Fee Collection</a>
                        <a class="dropdown-item" href="/Sreports/prasasirreport" >Fee Collection Report - Cross Check</a>
                        <a class="dropdown-item" href="/Sreports/feebreakupview" >List of Available Fee Breakups</a>
                        <a class="dropdown-item" href="/Sreports/feebraeakupreportbwndates" >Fee Breakups Between Dates</a>
                        <a class="dropdown-item" href="/Sreports/reportbwndateswithopnameconsolidatedaided" >Aided - Bank wise transactions</a>
                        <a class="dropdown-item" href="/Sreports/reportbwndateswithopnameconsolidatedunaided" >Unaided - Bank wise transactions</a>
                        </div>
                    </li>';
                }
                $menu .='<li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/userorgchange" >Change Organization</a>
                        <a class="dropdown-item" href="/Accounts/profile" >Update Profile</a>
                        <a class="dropdown-item" href="/Accounts/changepassword" >Change Password</a>
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    
    public static function examfeecollectionmenu()
    {
        $menu = '
            <nav class="navbar navbar-expand-lg navbar-light " style="background-color: #002366; text-color: #ffffff;">
                <a class="navbar-brand" href="#" style="color: #ffffff;">HINDU COLLEGE</a>
                <button style="background-color:white;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Fee Collection
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        ';
                        $menu.='
                    
                        <a class="dropdown-item" href="/Accounts/examfeecollect" >Exam Fee Collection</a>
                        </div>
                    </li>

                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        Reports
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        
                        <a class="dropdown-item" href="/Accounts/hnowiseconsreport" >Individual Fee Report</a>
                        <a class="dropdown-item" href="/Accounts/slist" >List of Students</a>
                        <a class="dropdown-item" href="/Accounts/daysummary" >Day Wise Summary Report</a>
                        <a class="dropdown-item" href="/Accounts/individualexamfeecollectionbetweendates">Individual Exam Fee Collection Between Two Days</a>
                        <a class="dropdown-item" href="/Accounts/examfeecollectionbetweendates">Exam Fee Collection Between Two Days</a>
                        </div>
                    </li>




                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
                        '.$_SESSION['name'].'
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color: #002366;">
                        <a class="dropdown-item" href="/Accounts/unblockexamfeecollect" >Unblock Exam Fee</a>
                        <a class="dropdown-item" href="/Admissions/discontinuedstudents" >Discontinued Students</a>
                        <a class="dropdown-item" href="/Accounts/profile" >Update Profile</a>
                        <a class="dropdown-item" href="/Accounts/changepassword" >Change Password</a>
                        <a class="dropdown-item" href="/Accounts/daywiseindividualworkreport" >Daily Work Report Summary</a>
                        <a class="dropdown-item" href="/Accounts/logout" >Logout</a>
                        </div>
                    </li>
                    </ul>
                </div>
            </nav>
        ';
        return $menu;
    }
    /* Start of master section */
    public static function bloodgroup()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            if(isset($_GET['deleteid']))
            {
                Homem::insert("DELETE FROM `blood_group` WHERE `id`='$_GET[deleteid]'");
            }
            $blood = Homem::getdata("SELECT * FROM `blood_group`");
            $table = Form::dbtableed($blood, ['S. No.', 'Blood Group'], ['id', 'name'], '/Accounts/bloodgroup', 'id', 'id');
            echo Menus::css();
            echo '<body>';
                echo $_SESSION['menu'];
                echo '
                <div class="clearfix"></div>
                <form action="/Accounts/savebloodgroup" method="POST">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-2"></div>
                        <div class="col-lg-4">                                       
                            <div class="row">
                                <div class="col-lg-12">
                                    <section class="box" style="margin-top: 30px;">
                                        <header class="panel_header">
                                            <h5 class="title pull-left">ADD NEW BLOOD GROUP</h5>
                                            <div class="actions panel_actions pull-right">
                                                <a class="fa fa-refresh" onclick="refreshClick()"></a>
                                                <a class="box_toggle fa fa-chevron-down"></a>
                                            </div>
                                        </header>
                                        <div class="content-body">    
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                      
                                                        <input type="text" name="group" id="group" class="form-control" placeholder="Blood Group">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                            
                                                        <input type="hidden" name="edit_id" id="edit_id" class="form-control" placeholder="editid">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">  
                                                    <div class="form-group">
                                                        <button id="btn_reg" class="btn btn-primary pull-right" type="submit" style="background-color: #002366 !important;">Submit</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                        
                                    </section>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-1"></div>
                        <div class="col-lg-5">
                        ';
                        echo $table;
                        echo '
                        </div>
                    </div>
                </div>
                </form>
                ';
            echo '</body>';
            echo Menus::script();
            if(isset($_GET['editid']))
            {
                for($i=0; $i<sizeof($blood); $i++)
                {
                    if($blood[$i]['id'] == $_GET['editid'])
                    {
                        echo '
                        <script>
                            $("#group").val("'.$blood[$i]['name'].'");
                            $("#edit_id").val("'.$blood[$i]['id'].'");
                        </script>
                        ';
                    }
                }
            }
            if(isset($_GET['status']))
            {
                if($_GET['status'] == 1)
                {
                    echo '<script>swal("", "Inserted Successfully", "success");</script>';
                }
                else if($_GET['status'] == 2)
                {
                    echo '<script>swal("", "Updated Successfully", "success");</script>';
                }
                else
                {
                    echo '<script>swal("", "Something went Wrong.. Please try again later..", "error");</script>';
                }
            }
        }
    }
    public static function savebloodgroup()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            if($_POST['edit_id'] != '')
            {
                Homem::insert("UPDATE `blood_group` SET `name`='$_POST[group]' WHERE `id`='$_POST[edit_id]'");
            }
            else
            {
                Homem::insert("INSERT INTO `blood_group`(`name`) VALUES ('$_POST[group]')");
            }
            echo '<script>window.location = "/Accounts/bloodgroup?status=1";</script>';
        }
    }
    public static function courses()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            $blood = Homem::getdata("SELECT * FROM `degree_name_master`");
            $table = Form::dbtableed($blood, ['S. No.', 'Code', 'Name'], ['id', 'code', 'name'], '/Accounts/courses', 'id', '');
            echo Menus::css();
            echo '<body>';
                echo $_SESSION['menu'];
                echo '
                <div class="clearfix"></div>
                <form action="/Accounts/savecourses" method="POST">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-2"></div>
                        <div class="col-lg-4">                                       
                            <div class="row">
                                <div class="col-lg-12">
                                    <section class="box" style="margin-top: 30px;">
                                        <header class="panel_header">
                                            <h5 class="title pull-left">ADD NEW COURSE</h5>
                                            <div class="actions panel_actions pull-right">
                                                <a class="fa fa-refresh" onclick="refreshClick()"></a>
                                                <a class="box_toggle fa fa-chevron-down"></a>
                                            </div>
                                        </header>
                                        <div class="content-body">    
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                      
                                                        <input type="text" name="code" id="code" class="form-control" placeholder="Courses Code">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                      
                                                        <input type="text" name="name" id="name" class="form-control" placeholder="Course Name">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                            
                                                        <input type="hidden" name="edit_id" id="edit_id" class="form-control" placeholder="editid">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">  
                                                    <div class="form-group">
                                                        <button id="btn_reg" class="btn btn-primary pull-right" type="submit" style="background-color: #002366 !important;">Submit</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                        
                                    </section>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-5">
                        ';
                        echo $table;
                        echo '
                        </div>
                        <div class="col-lg-1"></div>
                    </div>
                </div>
                </form>
                ';
            echo '</body>';
            echo Menus::script();
            if(isset($_GET['editid']))
            {
                for($i=0; $i<sizeof($blood); $i++)
                {
                    if($blood[$i]['id'] == $_GET['editid'])
                    {
                        echo '
                        <script>
                            $("#code").val("'.$blood[$i]['code'].'");
                            $("#name").val("'.$blood[$i]['name'].'");
                            $("#edit_id").val("'.$blood[$i]['id'].'");
                        </script>
                        ';
                    }
                }
            }
            if(isset($_GET['status']))
            {
                if($_GET['status'] == 1)
                {
                    echo '<script>swal("", "Inserted Successfully", "success");</script>';
                }
                else if($_GET['status'] == 2)
                {
                    echo '<script>swal("", "Updated Successfully", "success");</script>';
                }
                else
                {
                    echo '<script>swal("", "Something went Wrong.. Please try again later..", "error");</script>';
                }
            }
        }
    }
    public static function savecourses()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            if($_POST['edit_id'] != '')
            {
                Homem::insert("UPDATE `degree_name_master` SET `code`='$_POST[code]', `name`='$_POST[name]' WHERE `id`='$_POST[edit_id]'");
            }
            else
            {
                Homem::insert("INSERT INTO `degree_name_master`(`code`, `name`) VALUES ('$_POST[code]', '$_POST[name]')");
            }
            echo '<script>window.location = "/Accounts/courses?status=1";</script>';
        }
    }
    public static function departments()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            $blood = Homem::getdata("SELECT * FROM `degree_dept_master`");
            $table = Form::dbtableed($blood, ['S. No.', 'Name'], ['id', 'name'], '/Accounts/departments', 'id', '');
            echo Menus::css();
            echo '<body>';
                echo $_SESSION['menu'];
                echo '
                <div class="clearfix"></div>
                <form action="/Accounts/savedepartments" method="POST">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-2"></div>
                        <div class="col-lg-4">                                       
                            <div class="row">
                                <div class="col-lg-12">
                                    <section class="box" style="margin-top: 30px;">
                                        <header class="panel_header">
                                            <h5 class="title pull-left">ADD NEW DEPARTMENT</h5>
                                            <div class="actions panel_actions pull-right">
                                                <a class="fa fa-refresh" onclick="refreshClick()"></a>
                                                <a class="box_toggle fa fa-chevron-down"></a>
                                            </div>
                                        </header>
                                        <div class="content-body">    
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                      
                                                        <input type="text" name="name" id="name" class="form-control" placeholder="Department Name">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                            
                                                        <input type="hidden" name="edit_id" id="edit_id" class="form-control" placeholder="editid">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">  
                                                    <div class="form-group">
                                                        <button id="btn_reg" class="btn btn-primary pull-right" type="submit" style="background-color: #002366 !important;">Submit</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                        
                                    </section>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-5">
                        ';
                        echo $table;
                        echo '
                        </div>
                        <div class="col-lg-1"></div>
                    </div>
                </div>
                </form>
                ';
            echo '</body>';
            echo Menus::script();
            if(isset($_GET['editid']))
            {
                for($i=0; $i<sizeof($blood); $i++)
                {
                    if($blood[$i]['id'] == $_GET['editid'])
                    {
                        echo '
                        <script>
                            $("#name").val("'.$blood[$i]['name'].'");
                            $("#edit_id").val("'.$blood[$i]['id'].'");
                        </script>
                        ';
                    }
                }
            }
            if(isset($_GET['status']))
            {
                if($_GET['status'] == 1)
                {
                    echo '<script>swal("", "Inserted Successfully", "success");</script>';
                }
                else if($_GET['status'] == 2)
                {
                    echo '<script>swal("", "Updated Successfully", "success");</script>';
                }
                else
                {
                    echo '<script>swal("", "Something went Wrong.. Please try again later..", "error");</script>';
                }
            }
        }
    }
    public static function savedepartments()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            if($_POST['edit_id'] != '')
            {
                Homem::insert("UPDATE `degree_dept_master` SET `name`='$_POST[name]' WHERE `id`='$_POST[edit_id]'");
            }
            else
            {
                Homem::insert("INSERT INTO `degree_dept_master`(`name`) VALUES ('$_POST[name]')");
            }
            echo '<script>window.location = "/Accounts/departments?status=1";</script>';
        }
    }
    public static function category()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            $blood = Homem::getdata("SELECT * FROM `category`");
            $table = Form::dbtableed($blood, ['S. No.', 'Name'], ['id', 'name'], '/Accounts/category', 'id', '');
            echo Menus::css();
            echo '<body>';
                echo $_SESSION['menu'];
                echo '
                <div class="clearfix"></div>
                <form action="/Accounts/savecategory" method="POST">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-2"></div>
                        <div class="col-lg-4">                                       
                            <div class="row">
                                <div class="col-lg-12">
                                    <section class="box" style="margin-top: 30px;">
                                        <header class="panel_header">
                                            <h5 class="title pull-left">ADD NEW CATEGORY</h5>
                                            <div class="actions panel_actions pull-right">
                                                <a class="fa fa-refresh" onclick="refreshClick()"></a>
                                                <a class="box_toggle fa fa-chevron-down"></a>
                                            </div>
                                        </header>
                                        <div class="content-body">    
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                      
                                                        <input type="text" name="name" id="name" class="form-control" placeholder="Category Name">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-lg-12">
                                                    <div class="form-group">                                            
                                                        <input type="hidden" name="edit_id" id="edit_id" class="form-control" placeholder="editid">
                                                    </div>
                                                </div>                              
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">  
                                                    <div class="form-group">
                                                        <button id="btn_reg" class="btn btn-primary pull-right" type="submit" style="background-color: #002366 !important;">Submit</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                        
                                    </section>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-5">
                        ';
                        echo $table;
                        echo '
                        </div>
                        <div class="col-lg-1"></div>
                    </div>
                </div>
                </form>
                ';
            echo '</body>';
            echo Menus::script();
            if(isset($_GET['editid']))
            {
                for($i=0; $i<sizeof($blood); $i++)
                {
                    if($blood[$i]['id'] == $_GET['editid'])
                    {
                        echo '
                        <script>
                            $("#name").val("'.$blood[$i]['name'].'");
                            $("#edit_id").val("'.$blood[$i]['id'].'");
                        </script>
                        ';
                    }
                }
            }
            if(isset($_GET['status']))
            {
                if($_GET['status'] == 1)
                {
                    echo '<script>swal("", "Inserted Successfully", "success");</script>';
                }
                else if($_GET['status'] == 2)
                {
                    echo '<script>swal("", "Updated Successfully", "success");</script>';
                }
                else
                {
                    echo '<script>swal("", "Something went Wrong.. Please try again later..", "error");</script>';
                }
            }
        }
    }
    public static function savecategory()
    {
        if($_SESSION['user_role'] == 4 || $_SESSION['user_role'] == 5 || $_SESSION['user_role'] == 6)
        {
            if($_POST['edit_id'] != '')
            {
                Homem::insert("UPDATE `category` SET `name`='$_POST[name]' WHERE `id`='$_POST[edit_id]'");
            }
            else
            {
                Homem::insert("INSERT INTO `category`(`name`) VALUES ('$_POST[name]')");
            }
            echo '<script>window.location = "/Accounts/category?status=1";</script>';
        }
    }
    /* end of master section */
}