<?php
    session_start();
    //ob_start();
    include "../../db.php";
    if ( !isset($_SESSION['uid']) && !isset($_SESSION['uref']) && !isset($_SESSION['utype']) )
        header("Location: logout.php");
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <?php include "includes/meta.php"; ?>
    <?php include "includes/css.php"; ?>
    <link href="css/all.min.css" rel="stylesheet" type="text/css">
    <link href="css/alltable.css" rel="stylesheet">
</head>

<body>
    <?php include "includes/header2.php"; ?>

    <div class="container" style="height: 100%;">
        <div class="row  justify-content-center ">
            <div class="col-12 col-sm-8 col-md-8" style="padding-top:100px;">

                <p class="h2 mb-4 text-gray-800 text-center">Welcome, <?php echo $_SESSION["uname"]; ?></p>
                <p class="small text-center mb-4"> Welcome, to Admin Panel, Here you can do the following things. </p>
                <br><br>
            </div>
        </div>

        <div class="row justify-content-center">
            <div class="col-6 col-lg-2 col-md-3 col-sm-4 mb-4">
                <a href='one_t1d1ck1i1.php' class="text-decoration-none">
                    <div class="card bg-success text-white shadow h-100">
                        <div class="card-body px-0 px-sm-3">
                            <div class="row mx-0">
                                <div class="col-8 fs-cus pr-0 pr-sm-2">
                                    Details Submit
                                </div>
                                <div class="col-4 text-right pl-0 pl-sm-2"><i class="fas fa-tags fa-lg fa-fw"></i></div>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
            <!--<div class="col-6 col-lg-2 col-md-3 col-sm-4 mb-4">
                <a href='course-t1d1ck1i1.php' class="text-decoration-none">
                    <div class="card bg-success text-white shadow h-100">
                        <div class="card-body px-0 px-sm-3">
                            <div class="row mx-0">
                                <div class="col-8 fs-cus pr-0 pr-sm-2">
                                    Add Courses
                                </div>
                                <div class="col-4 text-right pl-0 pl-sm-2"><i class="fas fa-tags fa-lg fa-fw"></i></div>
                            </div>
                        </div>
                    </div>
                </a>
            </div>-->
            <div class="col-6 col-lg-2 col-md-3 col-sm-4 mb-4">
                <a href='online_application.php' class="text-decoration-none">
                    <div class="card bg-success text-white shadow h-100">
                        <div class="card-body px-0 px-sm-3">
                            <div class="row mx-0">
                                <div class="col-8 fs-cus pr-0 pr-sm-2">
                                    Online Applications
                                </div>
                                <div class="col-4 text-right pl-0 pl-sm-2"><i class="fas fa-tags fa-lg fa-fw"></i></div>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
            <div class="col-6 col-lg-2 col-md-3 col-sm-4 mb-4">
                <a href='fees-structure.php' class="text-decoration-none">
                    <div class="card bg-success text-white shadow h-100">
                        <div class="card-body px-0 px-sm-3">
                            <div class="row mx-0">
                                <div class="col-8 fs-cus pr-0 pr-sm-2">
                                    Fees Structure
                                </div>
                                <div class="col-4 text-right pl-0 pl-sm-2"><i class="fas fa-tags fa-lg fa-fw"></i></div>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
            <!--<div class="col-6 col-lg-2 col-md-3 col-sm-4 mb-4">
                <a href='testimonial-submit.php' class="text-decoration-none">
                    <div class="card bg-success text-white shadow h-100">
                        <div class="card-body px-0 px-sm-3">
                            <div class="row mx-0">
                                <div class="col-8 fs-cus pr-0 pr-sm-2">
                                    Submited Testimonials
                                </div>
                                <div class="col-4 text-right pl-0 pl-sm-2"><i class="fas fa-tags fa-lg fa-fw"></i></div>
                            </div>
                        </div>
                    </div>
                </a>
            </div>-->
            <?php                    
                  $nav_sql = "SELECT * FROM nav  where navfor='$_SESSION[uid]' ORDER BY npositon ASC";
                  $nav_run = mysqli_query($con, $nav_sql);
                  while ( $nav_rows = mysqli_fetch_assoc($nav_run) ) {

                      $sql2 = "SELECT * FROM nav_page_type_master WHERE id = '$nav_rows[nname]' ";
                      $run2 = mysqli_query($con, $sql2);
                      $rows2 = mysqli_fetch_assoc($run2);

                      $sql3 = "SELECT * FROM nav_page_template_master WHERE id = '$nav_rows[nlink]' ";
                      $run3 = mysqli_query($con, $sql3);
                      $rows3 = mysqli_fetch_assoc($run3);

                      $navHeader =  $rows2['page_header_name']  ;
                      $navUrl = $rows3['template_name'].'?sec='.$rows2['page_type'];
                      ?>
            <div class="col-6 col-lg-2 col-md-3 col-sm-4 mb-4">
                <a href='<?php echo $navUrl; ?>' class="text-decoration-none">
                    <div class="card bg-success text-white shadow h-100">
                        <div class="card-body px-0 px-sm-3">
                            <div class="row mx-0">
                                <div class="col-8 fs-cus pr-0 pr-sm-2">
                                    <?php echo $navHeader; ?>
                                </div>
                                <div class="col-4 text-right pl-0 pl-sm-2"><i class="fas fa-tags fa-lg fa-fw"></i></div>
                            </div>
                        </div>
                    </div>
                </a>
            </div>

            <?php
                  }
                ?>

        </div>
    </div>

    <?php include "includes/ft.php"; ?>
    <?php include "includes/js.php"; ?>

</body>

</html>