ok

Mini Shell

Direktori : /home2/selectio/www/tnpsctestbatch.com/
Upload File :
Current File : /home2/selectio/www/tnpsctestbatch.com/subject_book.php

<?php include "header.php" ;
$ids =  $_GET['id'];

	$standared_query = $pdo->prepare("SELECT tbl_topic.*,tbl_standard.standard,tbl_standard.id AS standard_ids FROM `tbl_topic` LEFT JOIN tbl_standard ON tbl_standard.id=tbl_topic.standard_id WHERE tbl_topic.subject_id=".$ids." GROUP BY tbl_topic.standard_id");
	$standared_query->execute();
	$standared_result = $standared_query->fetchAll(PDO::FETCH_ASSOC);
	$standared_count=$standared_query->rowCount();
  
    $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();


           
           	$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'];

    
	?>

<!--Desktop View Start Here-->
<style>



@media (min-width: 991px){

.section-full.p-t120, .section-full.p-b90, .section-full.p-tb120 {
    padding-top: 8%;
    padding-bottom: 10px;

}



}

</style>

<!--Desktop View End Here-->

<!--Mobile View Start Here-->

<style>


@media (max-width: 576px){
    .section-full.p-t120, .section-full.p-b90, .section-full.p-tb120 {
    padding-top: 26%;
    padding-bottom: 10px;

}
            }
            
</style>

<!--Mobile View End Here-->

<style>
   table {
      font-family: arial, sans-serif;
      border-collapse: collapse;
      width: 100%;
    }
    td, th {
        border: 1px solid #0e0e0e;
        text-align: justify;
        padding: 8px;
      
        color: black;
    }
    tr:nth-child(even) {
      background-color: white;
    }
</style>


            <!-- OUR BLOG START -->
             <div class="section-full p-t120  p-b90 site-bg-white" id="entirer-cont">
                 <div class="container">
                     <div class="row">
                         <div class="col-lg-4 col-md-12 rightSidebar">

                             <div class="side-bar">

                                 <div class="sidebar-elements search-bx">
                                                                            
                                    
                                    
                                 </div>
                         

                                 <div class="widget tw-sidebar-tags-wrap">
                                     <h4 class="section-head-small mb-4">Subjects </h4>
                                     <div class="tagcloud">
                                        <ul style="list-style: none;">
                                            <?php  foreach($result_subject as $subject_data) { 
                                                $style="";
                                                 $string = $subject_data['subject_name'];
                                                $replaced = str_replace(' ', '-', $string);
                                                
                                                if($subject_data['id']==$ids){
                                                    $style= 'style="background-color: #1967d2; color:white;"';
                                                }
                                         echo  '<li><a '.$style.' href="'.$replaced.'">'.$subject_data['subject_name'].'</a></li>';
                                            } ?>
                                        </ul>
                                        
                                        
                                     </div>
                                 </div>

                                
                             </div>

                         </div>
                         <div class="col-lg-8 col-md-12">
                            <!-- TITLE START-->
                            <div class="section-head center wt-small-separator-outer">
                                <div class="wt-small-separator site-text-primary">
                                   <div>Details</div>                                
                                </div>
                                <h2 class="wt-title"><?=$title ?></h2>
                                <p style="font-family: Arial, Helvetica, sans-serif;font-size: 18px;text-align: justify;"> <?= $description ?> </p>
                            </div>                  
                            
                            <div class="row">
                                        <div class="cantainer">
                                            <div class="row">
                                            <!-- COLUMNS 1 --> 
                                            <?php  
                                            
                                            
                                                
                                            if($standared_count > 0){
                                                
                                                foreach($standared_result as $standared_datas){
                                              ?>
                                               
                                            
                                            <div class="col-lg-12 col-md-12">
                                            
                                                <div class="m-b30">
                                                    <div class="twm-content">
                                                        <div class="twm-content">
                                                            <div class="twm-jobs-available" style="justify-content: center;display: flex;"> <button class="btn btn-primary"> <?=$standared_datas['standard']?> </button> </div>
                                                       </div> 
                                                       <div class="table-responsive">
                                                            <table style="margin-top: 2%;">
                                                            <tr style="background:#5a49e3;">
                                                                
                                                                <th><a style="color:white;" href="#"> Syllabus/Topic </a></th>
                                                                <th><a style="color:white;" id="table_title" href="#"> Attend test  </a></th>
                                                               
                                                            </tr>
                                                            <?php
                                                            $all_topics = $pdo->prepare("SELECT * FROM tbl_topic WHERE standard_id=".$standared_datas['standard_id']);
                                                        	$all_topics->execute();
                                                        	$topics_result = $all_topics->fetchAll(PDO::FETCH_ASSOC);
                                                        	$topics_count=$all_topics->rowCount();
                                                        	 $s_no=0;
                                                        	?>
                
                                                            <?php foreach($topics_result as $topics_datas){
                                                                 
                                                                $s_no ++;
                                                            ?>
                                                            <tr>
                                                                
                                                                
                                                                <td> <a style="text-align: left;" href="quiz/subject-exam.php?subject_id=<?= $_GET['id'] ?>&&topics_id=<?=$topics_datas['id']?>&&standared_id=<?=$standared_datas['standard_ids']?>"> <?= $topics_datas['syllabus'] ?>  </a> </td>
                                                                <td> <a style="text-align: left;" class="btn btn-link" href="quiz/subject-exam.php?subject_id=<?= $_GET['id'] ?>&&topics_id=<?=$topics_datas['id']?>&&standared_id=<?=$standared_datas['standard_ids']?>">Click Here </a> </td>
                                                                
    
                                                            </tr>
                                                          <?php  }   ?>
                                                          
                                                          
                                                        </table>
                                                        
                                                        </div>
                                                          
                                                    </div>                               
                                                </div>
                                            </div>
                                            <?php 
                                                           
                                                }  } else{ ?>
                                                
                                                <div class="row">
                                                    <div class="col-md-12" style="display: flex;justify-content: center;">
                                                        <div class="wt-small-separator site-text-primary">
                                                            <div>No Details In This Subject</div>                                
                                                         </div>
                                                    </div>
                                                </div>
                                                
                                                <?php 
                                            }
                                            
                                            ?>
                                        </div>
                                        </div>
                                     </div>
                            
                         </div>
                     </div>
                 </div>
             </div>   
             <!-- OUR BLOG END -->


<?php include "footer.php"?>

Zerion Mini Shell 1.0