ok
Direktori : /home2/selectio/public_html/tnpsctestbatch.com/ |
Current File : /home2/selectio/public_html/tnpsctestbatch.com/header.php |
<?php ob_start(); session_start(); include "config/config.php"; include "config/gc_config.php"; $test = "https://tnpsctestbatch.com"; if (isset($_SERVER['REQUEST_URI'])) { $test.= $_SERVER['REQUEST_URI']; $_SESSION['REQUEST_URI'] = $test; } $description=""; $title = ""; $keyword=""; if(isset($_GET['id'])){ $ids = $_GET['id'] ; $subject_query = $pdo->prepare("SELECT * FROM tbl_subject WHERE id=?"); $subject_query->execute(array($ids)); $subject_result = $subject_query->fetchAll(PDO::FETCH_ASSOC); $subject_total = $subject_query->rowCount(); $title = $subject_result[0]['discription_titles']; $description = $subject_result[0]['discription_content']; $keyword = $subject_result[0]['discription_keywords']; } //setcookie("Name", "", time() + 2 * 24 * 60 * 60, '/', 'tnpsctestbatch.com' ); // $current_page = $_SERVER['PHP_SELF']; // $currentPage = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; // if ($_SESSION['current_page'] != 'https://tnpsctestbatch.com/login.php') { // $_SESSION['current_page'] = $currentPage; // } if($_SERVER['PHP_SELF'] == "/index.php"){ $home_desc_sql = $pdo->prepare("SELECT * FROM tbl_current_affars_description WHERE status = 1 AND type = 1"); $home_desc_sql->execute(); $home_desc_data = $home_desc_sql->fetchAll(PDO::FETCH_ASSOC); $home_desc_total = $home_desc_sql->rowCount(); $title = $home_desc_data[0]['title']; $description = $home_desc_data[0]['description']; $keyword = $home_desc_data[0]['keyword']; } if($_SERVER['PHP_SELF'] == "/view_blog.php"){ $blog_id = $_GET['blog_id'] ; $blog_desc_sql= $pdo->prepare("SELECT * FROM tbl_blog WHERE id=".$blog_id); $blog_desc_sql->execute(); $blog_desc_data = $blog_desc_sql->fetchAll(PDO::FETCH_ASSOC); $blg_desc_total = $blog_desc_sql->rowCount(); $title = $blog_desc_data[0]['title']; $description = $blog_desc_data[0]['description']; $keyword = $blog_desc_data[0]['keyword']; } if($_SERVER['PHP_SELF'] == "/today-current-affairs-in-tamil-for-TNPSC.php"){ $mock_test_sql= $pdo->prepare("SELECT * FROM tbl_current_affars_description WHERE status=1 AND type = 2 "); $mock_test_sql->execute(); $mock_test_data = $mock_test_sql->fetchAll(PDO::FETCH_ASSOC); $mock_test_total = $mock_test_sql->rowCount(); $title = $mock_test_data[0]['title']; $description = $mock_test_data[0]['description']; $keyword = $mock_test_data[0]['keyword']; } if(isset($_GET['exam_id'])){ $mock_test_sql= $pdo->prepare("SELECT * FROM tbl_mocktest_description WHERE status=1 AND type=".$_GET['exam_id']); $mock_test_sql->execute(); $mock_test_data = $mock_test_sql->fetchAll(PDO::FETCH_ASSOC); $mock_test_total = $mock_test_sql->rowCount(); $title = $mock_test_data[0]['title']; $description = $mock_test_data[0]['description']; $keyword = $mock_test_data[0]['keyword']; } $error_message=''; if(isset($_POST['login'])) { if(isset($_POST['redirurl'])){ $url = $_POST['redirurl']; }else { $url = "index.php"; } if(empty($_POST['email']) || empty($_POST['password'])) { $error_message = 'Email or Password can not be empty'; } else { $email = strip_tags($_POST['email']); $password = strip_tags($_POST['password']); $statement = $pdo->prepare("SELECT * FROM tbl_students WHERE email=? AND password=?"); $statement->execute(array($email,$password)); $total = $statement->rowCount(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); if($total==0) { $error_message = 'Email does not match'; } else { $_SESSION['user_exam'] = $result[0]; echo "<script> window.location.href='".$_SESSION['current_page']."' </script>"; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- META --> <meta name="keywords" content="<?= $keyword ?>" /> <meta name="description" content="<?= $description ?>" /> <!-- FAVICONS ICON --> <link rel="icon" href="icons/logo/favicon.png" type="image/x-icon" /> <link rel="shortcut icon" type="icons/logo/favicon.png" href="icons/logo/favicon.png" /> <!-- PAGE TITLE HERE --> <title><?= $title ?></title> <!-- MOBILE SPECIFIC --> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /><!-- BOOTSTRAP STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" /><!-- FONTAWESOME STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/feather.css" /><!-- FEATHER ICON SHEET --> <link rel="stylesheet" type="text/css" href="css/owl.carousel.min.css" /><!-- OWL CAROUSEL STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/magnific-popup.min.css" /><!-- MAGNIFIC POPUP STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/lc_lightbox.css" /><!-- Lc light box popup --> <link rel="stylesheet" type="text/css" href="css/bootstrap-select.min.css" /><!-- BOOTSTRAP SLECT BOX STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/dataTables.bootstrap5.min.css" /><!-- DATA table STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/select.bootstrap5.min.css" /><!-- DASHBOARD select bootstrap STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/dropzone.css" /><!-- DROPZONE STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/scrollbar.css" /><!-- CUSTOM SCROLL BAR STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/datepicker.css" /><!-- DATEPICKER STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/flaticon.css" /> <!-- Flaticon --> <link rel="stylesheet" type="text/css" href="css/swiper-bundle.min.css" /><!-- Swiper Slider --> <link rel="stylesheet" type="text/css" href="css/style.css" /><!-- MAIN STYLE SHEET --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css"> <!-- THEME COLOR CHANGE STYLE SHEET --> <link rel="stylesheet" class="skin" type="text/css" href="css/skins-type/skin-6.css" /> <!-- SIDE SWITCHER STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/switcher.css" /> <!-- <script src="google-site-verification=WyqgG5rmTr4GgQqTUQPPyhH-oTbrFwwqbRuqWVI5mEM"></script>--> <script async src="https://www.googletagmanager.com/gtag/js?id=G-C68WBH4S9W"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-C68WBH4S9W'); </script> </head> <style> .header-style-3 .header-nav .nav > li > a { color: #2f2f2f; font-size: 16px; padding: 12px 7px; cursor: pointer; margin: 0px 0px; font-weight: 400; display: block; } </style> <body> <!-- LOADING AREA START ===== --> <div class="loading-area"> <div class="loading-box"></div> <div class="loading-pic"> <div class="wrapper"> <div class="cssload-loader"></div> </div> </div> </div> <!-- LOADING AREA END ====== --> <div class="page-wraper"> <!-- HEADER START --> <header class="site-header header-style-3 mobile-sider-drawer-menu" style="background-color: white;"> <div class="sticky-header main-bar-wraper navbar-expand-lg"> <div class="main-bar"> <div class="container-fluid clearfix"> <div class="logo-header"> <div class="logo-header-inner logo-header-one"> <a href="index.php"> <img src="icons/logo/logo.png" alt="" /> </a> </div> </div> <!-- NAV Toggle Button --> <button id="mobile-side-drawer" data-target=".header-nav" data-toggle="collapse" type="button" class="navbar-toggler collapsed"> <span class="sr-only">Toggle navigation </span> <span class="icon-bar icon-bar-first"></span> <span class="icon-bar icon-bar-two"></span> <span class="icon-bar icon-bar-three"></span> </button> <!-- MAIN Vav --> <div class="nav-animation header-nav navbar-collapse collapse d-flex justify-content-center"> <ul class=" nav navbar-nav"> <li class="has-child"> <a href="index.php">Home </a> </li> <li class="has-child"> <a href="javascript:;">General Studies <i class="bi bi-chevron-down"></i></a> <?php $query_subject = $pdo->prepare("SELECT * FROM tbl_subject WHERE status=1"); $query_subject->execute(); $result_subject = $query_subject->fetchAll(PDO::FETCH_ASSOC); $total=$query_subject->rowCount(); ?> <ul class="sub-menu"> <?php if($total>0) {foreach($result_subject as $subject_data){ $string = $subject_data['subject_name']; $replaced = str_replace(' ', '-', $string); ?> <li><a href="<?=$replaced?>"><?= $subject_data['subject_name'] ?></a></li> <?php }}else{ ?> <li><a href="#">No Subjects</a></li> <?php } ?> </ul> </li> <li class="has-child"> <a href="javascript:;"> Test Batch Series <i class="bi bi-chevron-down"></i></a> <ul class="sub-menu"> <?php $query_exam_type = $pdo->prepare("SELECT * FROM mock_exam_type WHERE status=1"); $query_exam_type->execute(); $result_exam_type = $query_exam_type->fetchAll(PDO::FETCH_ASSOC); $total=$query_exam_type->rowCount(); foreach($result_exam_type as $exam_result){ ?> <li><a href="mock-test-details.php?exam_id=<?=$exam_result['id']?>"><?=$exam_result['exam_type']?></a></li> <?php } ?> </ul> </li> <li class="has-child"><a href="today-current-affairs-in-tamil-for-TNPSC.php">Current Affairs </a></li> <li class="has-child"><a href="blog.php">Blog </a></li> <li class="has-child"><a href="contact.php">Contact us </a></li> </ul> </div> <!-- Header Right Section--> <div class="extra-nav header-2-nav"> <div class="extra-cell"> <div class="header-nav-btn-section"> <?php if(isset($_SESSION['user_exam'])){ ?> <div class="twm-nav-btn-left"> <a class="twm-nav-sign-up" href="logout.php"> <i class="feather-log-in"></i>Logout </a> </div> <?php }else{ ?> <div class="twm-nav-btn-left"> <a type="submit" class="twm-nav-sign-up" href="login.php" > <i class="feather-log-in"></i>Login / Register </a> </div> <?php } if(isset($_SESSION['user_exam'])){ ?> <div class="twm-nav-btn-right"> <a href="my_profile.php" class="twm-nav-post-a-job"> <i class="bi bi-person-circle"></i> My Profile </a> </div> <?php } ?> </div> </div> </div> </div> </div> <!-- SITE Search --> <div id="search"> <span class="close"></span> <form role="search" id="searchform" action="/search" method="get" class="radius-xl"> <input class="form-control" value="" name="q" type="search" placeholder="Type to search" /> <span class="input-group-append"> <button type="button" class="search-btn"> <i class="fa fa-paper-plane"></i> </button> </span> </form> </div> </div> </header> <!-- HEADER END --> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" > <div class="modal-content"> <div class="modal-header"> <h1 class="modal-title fs-5" id="exampleModalLabel">Login</h1> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="twm-log-reg-form-wrap"> <div class="twm-log-reg-inner"> <div class="twm-tabs-style-2"> <form method="post" action="" id="login_form"> <div class="tab-content" id="myTab2Content"> <!--Login Candidate Content--> <div class="tab-pane fade show active" id="twm-login-candidate"> <div class="row"> <div class="col-lg-12"> <div class="form-group mb-3"> <input name="email" type="email" required="" class="form-control" placeholder="Email*" /> </div> </div> <div class="col-lg-12"> <div class="form-group mb-3"> <input name="password" type="text" class="form-control" required="" placeholder="Password*" /> </div> </div> <div class="col-lg-12"> <div class="twm-forgot-wrap"> <div class="form-group mb-3"> <div class="form-check" id="warning_form"> </div> </div> </div> </div> <div class="col-lg-12"> <div class="twm-forgot-wrap"> <div class="form-group mb-3"> <div class="form-check"> <label class="form-check-label rem-forgot" for="Password4"><a href="register.php" class="site-text-primary">Create New Account </a></label> </div> </div> </div> </div> <div class="col-md-12"> <div class="form-group"> <input name="login" type="submit" class="site-button" value="Log in" class="form-control" required="" placeholder="Password*" /> </div> </div> <div class="col-md-12"> <div class="form-group"> <span class="center-text-or">Or </span> </div> </div> <div class="col-md-12"> <div class="form-group"> <a href="<?= $client->createAuthUrl() ?>" type="submit" class="log_with_google"> <img src="images/google-icon.png" alt="" /> with Google </a> </div> </div> </div> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> <?php // print_r($_COOKIE); ?>