<SCRIPT LANGUAGE="JavaScript">

    function checkAll(field)
    {
        for (i = 0; i < field.length; i++)
            field[i].checked = true;
    }

    function uncheckAll(field)
    {
        for (i = 0; i < field.length; i++)
            field[i].checked = false;
    }

    //Create a boolean variable to check for a valid Internet Explorer instance.
    var xmlhttp = false;
    //Check if we are using IE.
    try {
        //If the Javascript version is greater than 5.
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

        //alert ("You are using Microsoft Internet Explorer.");
    } catch (e) {

        //If not, then use the older active x object.
        try {
            //If we are using Internet Explorer.
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            //alert ("You are using Microsoft Internet Explorer");
        } catch (E) {
            //Else we must be using a non-IE browser.
            xmlhttp = false;
        }
    }
    //If we are using a non-IE browser, create a javascript instance of the object.
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        xmlhttp = new XMLHttpRequest();
        //alert ("You are not using Microsoft Internet Explorer");
    }

    function shortedUserList(objID)
    {
        serverPage = '<?php echo base_url(); ?>super_admin/shorted_user_list/';

        xmlhttp.open("GET", serverPage);
        xmlhttp.onreadystatechange = function ()
        {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
            {
                document.getElementById(objID).innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.send(null);
    }
</script>
<?php
$person_role = $this->session->userdata('person_role');
?>
<div class="col-sm-10" >
    <div class="row ">
        <div class="col-sm-12"  >
            <div class="col-sm-12" style="background:#DAF2DA;padding: 10px" >
                <div class="color_blocks" >
                    <div class="container_16">
                        <div class="blocks">
                            <div class="subject_toggle flip-container army">
                                <a href="<?php echo (in_array($person_role, Array(8, 9))) ? 'javascript:void(0)' : base_url('super-admin/all-user'); ?>" class="flipper">
                                    <div class="front">
                                        <span>User <br><br> <i class="fa fa-user fa-2x"></i></span>
                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding: 5px"><span>Organization : </span>  <?php echo $dashboard_user_info['total_organization']; ?></h5>
                                        <h5 style="padding: 5px"><span>Teacher : </span>  <?php echo $dashboard_user_info['total_teacher']; ?></h5>
                                        <h5 style="padding: 5px"><span>Learner : </span>  <?php echo $dashboard_user_info['total_learner']; ?></h5>
                                        <h5 style="padding: 5px"><span>Total User : </span>  <?php echo $dashboard_user_info['total_user']; ?></h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container plum">
                                <a href="<?php echo base_url('admin/manage-course'); ?>" class="flipper">
                                    <div class="front">
                                        <span>Course<br><br> <i class="fa fa-list-alt fa-2x"></i></span>
                                    </div>
                                    <div class="back"><br>
                                        <h5 style="padding: 2px"><span>Today's : </span>  <?php echo $dashboard_course_info['todays_course']; ?></h5>
                                        <h5 style="padding: 2px"><span>This Month : </span> <?php echo $dashboard_course_info['this_month_course']; ?></h5>
                                        <h5 style="padding: 2px"><span>Active Course : </span> <?php echo $dashboard_course_info['active_course']; ?></h5>
                                        <h5 style="padding: 2px"><span>Inactive Course : </span> <?php echo $dashboard_course_info['inactive_course']; ?></h5>
                                        <h5 style="padding: 2px"><span>Total Course : </span> <?php echo $dashboard_course_info['total_course']; ?></h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container purple">
                                <a href="<?php echo (in_array($person_role, Array(8, 9))) ? 'javascript:void(0)' : base_url() . 'admin/view-course-notification' ?>" class="flipper">
                                    <div class="front">
                                        <span>Course Notification<br><br> <i class="fa fa-book fa-2x"></i></span>
                                    </div>
                                    <div class="back"><br>
                                        <h5 style="padding: 5px"><span>Today's :</span>  <?php echo $course_notification_info['todays_notification']; ?></h5>
                                        <h5 style="padding: 5px"><span>Read :</span>  <?php echo $course_notification_info['read_notification']; ?></h5>
                                        <h5 style="padding: 5px"><span>Unread :</span>  <?php echo $course_notification_info['unread_notification']; ?></h5>
                                        <h5 style="padding: 5px"><span>Total :</span>  <?php echo ($course_notification_info['read_notification'] + $course_notification_info['unread_notification']); ?></h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container orange">
                                <a href="<?php echo (in_array($person_role, Array(8, 9))) ? 'javascript:void(0)' : base_url() . 'admin/view-payment-notification' ?>" class="flipper">
                                    <div class="front">
                                        <span>Payment Notification<br><br> <i class="fa fa-bank fa-2x"></i></span>
                                    </div>
                                    <div class="back"><br>
                                       <h5 style="padding: 5px"><span>Today's :</span>  <?php echo $payment_notification_info['todays_notification']; ?></h5>
                                        <h5 style="padding: 5px"><span>Read :</span>  <?php echo $payment_notification_info['read_notification']; ?></h5>
                                        <h5 style="padding: 5px"><span>Unread :</span>  <?php echo $payment_notification_info['unread_notification']; ?></h5>
                                        <h5 style="padding: 5px"><span>Total :</span>  <?php echo ($payment_notification_info['read_notification'] + $payment_notification_info['unread_notification']); ?></h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container teal">
                                <a href="student_management.html" class="flipper">
                                    <div class="front">
                                        <span>Students<br><br> <i class="fa fa-male fa-2x"></i></span>

                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding: 5px"><span>Current</span>  419</h5>
                                        <h5 style="padding: 5px"><span> Online</span> 50</h5>
                                        <h5 style="padding: 5px"><span>Class Room </span> 219</h5>
                                        <h5 style="padding: 5px"><span>Video Training</span> 150</h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container yellow">
                                <a href="manage_video.html" class="flipper">
                                    <div class="front">
                                        <span>Video Course<br><br> <i class="fa fa-file-video-o  fa-2x"></i></span>
                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding-top: 50px"><span>Video Course</span>  419</h5>
                                    </div>

                                </a>
                            </div>
                            <div class="subject_toggle flip-container green">
                                <a href="javascript:void(0)" class="flipper">
                                    <div class="front">
                                        <span>Group<br><br> <i class="fa fa-users fa-2x"></i></span>

                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding-top: 35px"><span>Group</span>  165</h5>
                                        <h5 style="padding: 5px"><span>Total Member</span>  860</h5>
                                    </div>
                                </a>
                            </div>
                            <div class="flip-container blue">
                                <a href="manage_coupon.html" class="flipper">
                                    <div class="front">
                                        <span>Coupon<br><br> <i class="fa fa-money  fa-2x"></i></span>
                                    </div>

                                    <div class="back" ><br>
                                        <h5 style="padding-top: 35px"><span>Coupon</span>  80</h5>
                                        <h5 style="padding: 5px"><span>Coupon  taken</span>  360</h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container sky">
                                <a href="manage_video_wish_list.html" class="flipper">
                                    <div class="front">
                                        <span>Wish List<br><br> <i class="fa fa-heart fa-2x"></i></span>

                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding-top: 5px"><span>Wish List</span>  125</h5>
                                        <h5 style="padding-top: 5px"><span>Course Wish</span>  10</h5>
                                        <h5 style="padding-top: 5px"><span>Video Course Wish</span>  115</h5>
                                    </div>
                                </a>
                            </div>
                            <div class="subject_toggle flip-container ttcg">
                                <a href="manage_tutorial.html" class="flipper">
                                    <div class="front">
                                        <span>Tutorial<br><br> <i class="fa fa-connectdevelop fa-2x"></i></span>
                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding-top: 50px"><span>Tutorial</span>  35</h5>
                                    </div>
                                </a>
                            </div>

                            <div class="subject_toggle flip-container ttcr">
                                <a href="#" class="flipper">
                                    <div class="front">
                                        <span>Quiz<br><br> <i class="fa fa-question-circle fa-2x"></i></span>
                                    </div>
                                    <div class="back" ><br>
                                        <h5 style="padding-top: 50px"><span>Quiz</span>  35</h5>
                                    </div>
                                </a>
                            </div>


                        </div>

                    </div>



                </div>

                <div class="col-sm-12"><br><br><br></div>

            </div>


            <div class="col-sm-12 "><br></div>
            <div class="col-sm-12 gray" style="padding-left: 10px">
                Dashboard
            </div>
            <div class="col-sm-12 "><br></div>

        </div>



    </div>





</div>


<!--</div>--> 




<!-- Modal Start For Change Role and Status-->
<div class="modal fade" id="changeRole" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Change Role</h4>
            </div>
            <form name="userForm" action="<?php echo base_url(); ?>super_admin/update_user_information/" method="post">
                <div class="modal-body">

                    <label for="user_role_id">User role:</label><span>*</span>
                    <select class="form-control" name="user_role_id" required>
                        <option value="">--Select User Role--</option>
                        <?php
                        if ($user_roles) {
                            foreach ($user_roles as $v_user_role) {
                                ?>
                                <option value="<?php echo $v_user_role->user_role_id; ?>"> <?php echo $v_user_role->role_name ?></option>
                                <?php
                            }
                        }
                        ?>
                    </select>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="modal fade" id="changeStatus" tabindex="-1" role="dialog" aria-labelledby="changeStatus" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Change Role</h4>
            </div>
            <div class="modal-body">
                <h3>Select Status</h3>
                <select class="form-control" name="user_role_id" required>
                    <option value="">--Select User Role--</option>
                    <option value="1">Active</option>
                    <option value="2">Inactive</option>
                    <option value="0">Archive</option>
                </select>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="changeStatus" tabindex="-1" role="dialog" aria-labelledby="changeStatus" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Change Role</h4>
            </div>
            <div class="modal-body">
                <h3>Select Status</h3>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="addUser" tabindex="-1" role="dialog" aria-labelledby="addUser" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Add User</h4>
            </div>
            <?php include 'add_user_form.php'; ?>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

<!-- Modal END For Change Role and Status-->



<!--</div>-->