ok
Direktori : /home2/selectio/www/tnpsctestbatch.com/quiz/ |
Current File : /home2/selectio/www/tnpsctestbatch.com/quiz/header.php |
<?php ob_start(); session_start(); include "../config/config.php"; $_SESSION['current_page'] = $_SERVER['REQUEST_URI']; if(isset($_GET['payment_questions'])&&$_GET['payment_questions'] >15){ if(isset($_SESSION['user_exam'])){ $student_payments = $pdo->prepare("SELECT tbl_students.*,tbl_payment.* FROM tbl_students INNER JOIN tbl_payment ON tbl_students.id=tbl_payment.user_id WHERE tbl_students.id = ? AND tbl_payment.payment_type = ? ORDER BY tbl_payment.id DESC LIMIT 1"); $student_payments->execute(array($_SESSION['user_exam']['id'],1)); $paymentresultas = $student_payments->fetchAll(PDO::FETCH_ASSOC); $ayment_count = $student_payments->rowCount(); if($ayment_count == 1){ $payment_date = date('Y-m-d', strtotime($paymentresultas[0]['created_at'])); $currentData = date('Y-m-d'); $futureDate = date('Y-m-d', strtotime($payment_date. ' + 30 days')); if($currentData >= $futureDate){ $statement = $pdo->prepare("UPDATE tbl_payment SET `payment_type`=? ,`status`=? WHERE `user_id`=? ORDER BY id DESC LIMIT 2"); $result=$statement->execute(array(0,0,$_SESSION['user_exam']['id'])); echo "<script> alert('You have not subscribed to access General Studies and Test Batch Series contents. Please Subscribe'); window.location.href='https://tnpsctestbatch.com/pricing.php' </script>"; exit(); } }else{ echo "<script> window.location.href='https://tnpsctestbatch.com/pricing.php' </script>"; exit(); } }else{ echo "<script> window.location.href='https://tnpsctestbatch.com/pricing.php' </script>"; exit(); } } // if(isset($_GET['payments_ids'])&&$_GET['payments_ids'] > 15){ // echo "<script> // window.location.href='https://tnpsctestbatch.com/pricing.php' // </script>"; // exit(); // } $keywords=""; $description=""; $meta_title=""; $titile_ids=""; $condition = ""; if(isset($_GET['title_id'])){ $titile_ids = $_GET['title_id']; $condition = " AND id = $titile_ids"; $query_subject = $pdo->prepare("SELECT * FROM tbl_current_affairs_titile WHERE 1=1".$condition ); $query_subject->execute(); $result_subject = $query_subject->fetchAll(PDO::FETCH_ASSOC); $total=$query_subject->rowCount(); } // Corrent affait Descriptions Start if(isset($_GET['title_id'])){ $current_affairs_title = $pdo->prepare("SELECT * FROM tbl_current_affairs_titile WHERE id=".$_GET['title_id']); $current_affairs_title->execute(); $current_affairs_title_result = $current_affairs_title->fetchAll(PDO::FETCH_ASSOC); $keywords = $result_subject[0]['meta_keywords']; $description = $result_subject[0]['meta_description']; $meta_title = $result_subject[0]['current_title']; } // Corrent affait Descriptions End // Corrent affait Descriptions Start if(isset($_GET['exam_id'])){ $mocktest_sql = $pdo->prepare("SELECT * FROM tbl_test_series WHERE id=".$_GET['exam_id']); $mocktest_sql->execute(); $mocktest_sql_result = $mocktest_sql->fetchAll(PDO::FETCH_ASSOC); $keywords = $mocktest_sql_result[0]['keyword']; $description = $mocktest_sql_result[0]['description']; $meta_title = $mocktest_sql_result[0]['title']; } // Corrent affait Descriptions End // General Studies Descriptions Start if(isset($_GET['topics_id'])){ $topic_query = $pdo->prepare("SELECT * FROM tbl_topic WHERE id=".$_GET['topics_id']); $topic_query->execute(); $topic_result = $topic_query->fetchAll(PDO::FETCH_ASSOC); $topic_total=$topic_query->rowCount(); $keywords = $topic_result[0]['discription_keyword']; $description = $topic_result[0]['discription_content']; $meta_title = $topic_result[0]['discription_title']; } // General Studies Descriptions End ?> <!--<!DOCTYPE html>--> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="keywords" content="<?= $keywords ?>" /> <meta name="description" content="<?= $description ?>" /> <title><?= $meta_title ?></title> <link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'> <link rel="stylesheet" href="assets/css/bootstrap.min.css"> <link rel="stylesheet" href="assets/css/animate.min.css"> <link rel="stylesheet" href="assets/css/style.css"> <!--bootsrapp CDN link start--> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> <!--bootsrapp CDN link end--> <style> .wrapper { background-color: #011f41; background-image: none; padding-top: 0px; } .question_number { color: #ffffff; font-size: 1.0625rem; font-weight: 700; margin-right: 5.176rem; } </style> <!--mobile view start here--> <style> @media (max-width: 576px){ #header_topics{ color:white; font-family: 'Poppins'; font-size: 8px; } #header_content{ color:white; font-size: 9px; } #login_register{ color: #fff; background-color: #428bca; border-color: #357ebd; margin-top: 0%; margin-left: -21px; font-size: 8px; } #header_logo{ } } </style> <!--mobile view end here--> <!--Desktop view start here--> <style> @media (min-width: 1200px){ #header_topics{ color:white; font-family: 'Poppins'; font-size: 21px; } #header_content{ color:white; font-size: 16px; } #login_register{ color: #fff; background-color: #428bca; border-color: #357ebd; margin-top:6%; margin-left: 0px; } } </style> <!--Desktop view end here--> </head> <body> <div class="wrapper position-relative"> <div class="top_content_area pt-2" style="margin-bottom: 26px; box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"> <div class="container-fluid"> <div class="row"> <div class="col-md-2 col-2"> <div class="logo_area ms-5"> <a href="#"> <img id="header_logo" src="icons/logo/logo test batch white.png" alt="logo_not_found"> </a> </div> </div> <div class="col-md-8 col-8"> <!--this is Subject Title End--> <?php if(isset($_GET['topics_id'])){ ?> <div class="logo_area" > <center ><h2 id="header_topics" ><?=$topic_result[0]['topic']?></h2></center> <p id="header_content"> <?=$topic_result[0]['topic_content']?> </p> </div> <?php } ?> <!--this is Subject Title End--> <!--This is Mock Test End--> <?php if(isset($_GET['exam_id'])){ ?> <div class="logo_area" style="margin-top: 12px;" > <center ><h2 style="color:white; font-family: 'Poppins'; font-size: 21px;" ><?=$meta_title?></h2></center> <p style="color:white;font-size: 16px; "> <?=$description?> </p> </div> <?php } ?> <!--This is Mock Test End--> <!--this is current affair Title End--> <?php if(isset($_GET['title_id'])){ ?> <div class="logo_area" style="margin-top: 12px;" > <center ><h2 style="color:white; font-family: 'Poppins'; font-size: 29px;" ><?=$current_affairs_title_result[0]['current_title']?></h2></center> <p style="color:white;font-size: 16px; "> <?=$current_affairs_title_result[0]['meta_description']?> </p> </div> <?php } ?> <!--this is current affair Title End--> </div> <div class="col-md-2 col-2"> <?php if(isset($_SESSION['user_exam'])){ $user_name = $_SESSION['user_exam']['name']; $first_letter = $user_name[0]; ?> <span style="display: flex;background-color: blue;border-radius: 50%;font-size: 27px;font-weight: 900;color: white;height: 46px;width: 48px;justify-content: center;margin-top: 11px;"> <?= $first_letter ?> </span> <?php } else{ ?> <a id="login_register" class="btn btn-primary" href="../login.php">Login / Register</a> <?php } ?> </div> </div> </div> </div> <!--Login Modal start Here--> <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <!--<div class="modal-header">--> <!-- <h5 class="modal-title" id="staticBackdropLabel">Modal title</h5>--> <!-- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>--> <!--</div>--> <div class="modal-body"> <section class="vh-100" style="background-color: #508bfc;"> <div class="container py-5 h-100"> <div class="row d-flex justify-content-center align-items-center h-100"> <div class=""> <div class="card shadow-2-strong" style="border-radius: 1rem;"> <div class="card-body text-center"> <h3 class="mb-5">Sign in</h3> <div class="form-outline mb-4"> <label for="typeEmailX-2">Email</label> <input style="height: 36px;" type="email" id="typeEmailX-2" class="form-control" /> </div> <div class="form-outline mb-4"> <label for="typePasswordX-2">Password</label> <input style="height: 36px;" type="password" id="typePasswordX-2" class="form-control" /> </div> <!-- Checkbox --> <div class="form-check d-flex justify-content-start mb-4"> <input class="form-check-input" type="checkbox" value="" id="form1Example3" /> <label class="form-check-label" for="form1Example3"> Remember password </label> </div> <button class="btn btn-primary btn-lg btn-block" type="submit">Login</button> <hr class="my-4"> <button class="btn btn-lg btn-block btn-primary" style="background-color: #dd4b39;" type="submit"><i class="fab fa-google me-2"></i> Sign in with google</button> </div> </div> </div> </div> </div> </section> </div> </div> </div> </div> <!--Login model end here-->