<html>
    <head>
     
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" media="all">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
      <script src="<?php echo base_url(); ?>assets/ckeditor/plugins/ckeditor_wiris/integration/WIRISplugins.js?viewer=image"></script>
    
<style type="text/css">
body{max-height:350px !important;
page-break-after: always; margin-bottom:10px;} 
h3{margin:0;}
h3{
    color:#5a7bc5;}
.relative{position:relative;}
.text-bold{font-weight:bold;}
h4,hr{margin:2px;}
.logo{height:100px;position:absolute;top:0;left:0;}
.page{box-sizing: border-box;border-radius:10px;height:100%;padding:5px;}
.table tr td{border:2px dotted #17a05e !important;}
.table-match tr td{border:1px solid #000 !important;padding:5px;}
.table-match tr th{text-align: center;border:1px solid #000 !important;padding:5px;}
.table-match {
      width:70%;
      margin:0 auto;
}
@media print{
.logo{height:80px;}
.page{page-break-after:always;}
}
 .tbl1
            {
                border: 1px solid #000;
                text-align:center;
                width:100%;
                min-height:20px;
            }
 th{
                border: 1px solid #000;
                  border-right: 0px;
                border-bottom: 0px; 
                background-color:#ccccb3; 
                padding: 3px !important;
            }
    </style>
    </head>
    <body id="datatable-buttons">
     <?php 
                    
                     $branch=$this->user_model->getBranch();
                    $b_header= $this->db->query("SELECT * FROM `branch` WHERE is_delete='0' AND id='$branch'")->row_array();
                    
                    
                    
                    ?>
    
    
    
<div class="watermark" style="width:100%;position:fixed;top:30%;opacity:0.1;"><img src="<?php echo base_url().$b_header['b_logo'];?>" style="display:block;margin:0 auto;width:600px;" alt="logo"></div>
        <div class="page">
        <div class="container-fluid">
          <div class="row header">
              <div class="col-md-12 col-sm-12 col-xs-12">
                  <div class="row">
                      <div class="col-md-2 col-sm-2 col-xs-2 relative"><img  src="<?php echo base_url().$b_header['b_logo'];?>" style="height:100px"></div>
                      <div class="col-md-8 col-sm-8 col-xs-8 text-center">
                            <h3 class="wd-100"><b><?php echo $b_header['title']; ?></b></h3>
                            <h5 class="wd-100"><?php echo $b_header['tagline']; ?></h5>
                            <h4 class="wd-100"><b> </b></h4>
                      </div>
                      <div class="col-md-2 col-sm-2 col-xs-2 relative"><img  src="<?php echo base_url().$b_header['b_logo'];?>" style="height:100px"></div>
                  </div>  
              </div>
          </div>
          <div class="row header">
              <div class="col-md-12 col-sm-12 col-xs-12" style="padding:0;">
                  <div class="row upper-header" style="border-bottom:2px solid #5a7bc5;padding:5px;margin:5px;">
                              <div class="row">
                                 <!-- <table  class="tbl1">-->
                                 <!--     <tr>-->
                                   
                                 <!--       <th><h5 class="text-bold">Class</h5></th>  -->
                                 <!--         <th><h5 class="text-bold">Subject</h5></th>-->
                                 <!--        <th> <h5 class="text-bold">Time</h5></th>-->
                                  
                                 <!--        <th><h5 class="text-bold">Date</h5></th> -->
                                    
                                 <!--         <th><h5 class="text-bold">T.Marks</h5></th>-->
                                
                                 <!--</tr>-->
                                 <!--   </table>-->
                              </div>
                      </div>
                  </div>  
              </div>
          </div>





<!--//====================================Mcqs Questions===============================================-->
 <?php if(!empty($query_print))
        {
       ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                  <h4 style="font-weight:bold;"> MCQ answers</h4>
                  <div class="row" style="line-height:2;">
<?php
          $j=1;
           //var_dump("<pre>",$query_print);die();
           foreach ( $query_print as $value) {          
                            
                            $option1=$value->correct_answer;
                           
                ?>
                        <div class="col-md-11 col-sm-11 col-xs-11"><span class="question "><b class="magic_question"><?php echo $j++; ?> &nbsp;&bull;&nbsp </b></span> <b> <?php echo $value->question ;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_swap"><b> </b></div>
                        <div class="clearfix"></div>
                          <div class="col-sm-12">
                              <div class="row">
                                    <div class="col-md-3 col-sm-3 col-xs-3 magic_question"><b class="magic_question">(Answers)</b> <?php echo  $option1; ?></div>
                                  
                                 
                                   
                                    </div>
                          </div>
            <?php }
             ?>
                  </div>  
              </div>
          </div>
 <?php  }?>



<!--================================================================Words Meanings Questions==================================================-->
<?php  if(!empty($Wordsmeaningsq)) 
      { ?>
       <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                     <h4 style="font-weight:bold;">Words Meanings Answers</h4>
                  <div class="row">
<?php 
      $k=1;
      
                  foreach($Wordsmeaningsq as $value) {
                        $question=$value->words;
                        $qanswers=$value->meanings;
                        ?>
                        <div class="col-md-3 col-sm-3 col-xs-3 magic_arrange"><b class="magic_question">&nbsp;&bull;&nbsp;</b><b><?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $qanswers ;?>)</b></div>
                        
            <?php } ?>
                  </div>  
              </div>
          </div>
    <div class="clearfix"></div>
     <?php } ?>

<!--================================================================Opposites Questions==================================================-->
<?php  if(!empty($Oppositesq)){
       $c=0;
?>
         <div class="row  magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                     <h4 style="font-weight:bold;">Opposites Answer Questions    </h4>
                  <div class="row">
      <?php 
      $k=1;
           //var_dump($query_print);die();
           foreach($Oppositesq as $value)
           {
                  $question=$value->opposites;
                  $answer=$value->opposites_ans;
                  ?>
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><b class="magic_question">&nbsp;&bull;&nbsp;</b><b> <?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
                          <?php } ?>
                  </div>  
              </div>
          </div>
<?php }
?>


<!--//=========================================================Fill in the Blanks==========================-->
<?php  if(!empty($fillingq))
{ ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                  <h4 style="font-weight:bold;"> Fill in the Blanks Answer    </h4>
                  <div class="row" style="line-height:2;">
            <?php
           
            $j=1;
             
                 foreach($fillingq as $value) {          
                        $question=$value->fill_blank_question;
                            $answer=$value->fill_blank_ans;
                        
                        ?>
                        <div class="col-md-11 col-sm-11 col-xs-11"><b>&nbsp;&nbsp;<?php echo $j++; ?>&nbsp;&nbsp;</b><span style="font-weight:bold;"> <?php echo $question  ;?></span></div>
                         <div class="col-md-11 col-sm-11 col-xs-11"><b>&nbsp;&nbsp;Answer &nbsp;</b><span style="font-weight:bold;"> <?php echo $answer  ;?></span></div>
                       
            <?php } ?>
                  </div>  
              </div>
          </div>
 <?php } ?>


<!--//=========================================================Singular Questions==========================-->
<?php  if(!empty($singularq)){
       ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
              <h4 style="font-weight:bold;"> Singular Answer Questions   </h4>
                  <div class="row" style="line-height:2;">
            <?php
             $j=1;
          
           //var_dump($query_print);die();
           foreach ($singularq as $value) {          
            $question=$value->singular;
            $answer=$value->plural;
                ?>
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><span class="question"><b class="magic_question">&nbsp;&bull;&nbsp;</b></span> <b> <?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
            <?php 
            } ?>
                  </div>  
              </div>
          </div>
     <?php }
      ?>


      <!--//=========================================================Make Superlatvie==========================-->
<?php  if(!empty($Makesuperlatvi) )
 { ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                    <h4 style="font-weight:bold;"> Make Superlatvie Answer </h4>
                  <div class="row" style="line-height:2;">
            <?php
           
            $j=1;
             
           foreach ($Makesuperlatvi as $value) { 
               
                  $question=$value->postive;
                  $coparative=$value->coparative;
                  $superlative=$value->superlative;
                  
                  ?>
                  
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><b class="magic_question">&nbsp;&bull;&nbsp;</b> <b> <?php echo $question ;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo  $coparative ;?>)</b></div>
                         <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo  $superlative ;?>)</b></div>
                
            <?php } ?>
                  </div>  
              </div>
          </div>
 <?php } ?>

<!--//=========================================================True False==========================-->
<?php  if(!empty($TrueFalseq))
              { ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                    <h4 style="font-weight:bold;"> True False Answer  </h4>
                  <div class="row" style="line-height:2;">
            <?php
            $j=1;

           foreach($TrueFalseq as $value) {          
                  $question=$value->true_words;
                  $answer=$value->false_words;
                  
                  ?>
                        <div class="col-md-10 col-sm-10 col-xs-10 magic_arrange"><b class="magic_arrange">&nbsp;<?php echo $j++; ?>&nbsp;</b><span style="font-weight:bold;"> <?php echo $question ;?></span></div>
                        
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
            <?php } ?>
                  </div>  
              </div>
          </div>
 <?php } ?>
 
 <!--//=========================================================Masculine Questions==========================-->
<?php  if(!empty($masculineq))  {
       ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
              <h4 style="font-weight:bold;">Masculine Answer Questions  </h4>
                  <div class="row" style="line-height:2;">
            <?php
             $j=1;
           foreach($masculine as $value) {          
            $question=$value->masculine;
             $answer=$value->feminine;
                ?>
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><span class="question"><b class="magic_question">&nbsp;&bull;&nbsp;</b></span> <b> <?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
            <?php 
            } ?>
                  </div>  
              </div>
          </div>
     <?php }
      ?>

<!--//=========================================================Words Synonyms Questions==========================-->
<?php  if(!empty($wordssynonymsq))
  {
       ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
              <h4 style="font-weight:bold;"> Words Synonyms Answer Questions  </h4>
                  <div class="row" style="line-height:2;">
            <?php
             $j=1;
      
           //var_dump($wordssynonymsq);die();
           foreach($wordssynonymsq as $value) {          
            $question=$value->wordsforsynonyms;
              $answer=$value->synonyms;
                ?>
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><span class="question"><b class="magic_question">&nbsp;&bull;&nbsp;</b></span> <b> <?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
            <?php 
            } ?>
                  </div>  
              </div>
          </div>
     <?php }
      ?>

<!--//=========================================================sysnoms Questions end==========================-->


<!--//=========================================================Words antonyms  Questions==========================-->
<?php  if(!empty($Antonymq))
  {
       ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
              <h4 style="font-weight:bold;"> Words antonyms Answer Questions   </h4>
                  <div class="row" style="line-height:2;">
            <?php
             $j=1;
          
          //var_dump($query_print);die();
           foreach ($dat['Antonymq'] as $value) {          
            $question=$value->wordsforantonyms;
            $answer=$value->antonyms;
                ?>
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><span class="question"><b class="magic_question">&nbsp;&bull;&nbsp;</b></span> <b> <?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
            <?php 
            } ?>
                  </div>  
              </div>
          </div>
     <?php }
      ?>

<!--//=========================================================Antonyms Questions  end==========================-->



<!--//=========================================================Rearrange Questions==========================-->
<?php  if(!empty($Rearrangeq))
{      ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
              <h4 style="font-weight:bold;"> Rearrange Answer Questions   </h4>
                  <div class="row" style="line-height:2;">
            <?php
             $j=1;
          
          //var_dump($query_print);die();
           foreach ($Rearrangeq as $value) {          
            $question=$value->Rearrange_Sentence;
            $answer=$value->Arrange_Sentence;
                ?>
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><span class="question"><b class="magic_question">&nbsp;&bull;&nbsp;</b></span> <b> <?php echo $question;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo $answer ;?>)</b></div>
            <?php 
            } ?>
                  </div>  
              </div>
          </div>
     <?php }
      ?>

<!--//=========================================================Rearrange Questions end==========================-->













      


 <!--//=========================================================Make Superlatvie==========================-->
<?php  if(!empty($Makesuperlatvi) )
 { ?>
          <div class="row magic_hover">
              <div class="col-md-11 col-sm-11 col-xs-11 col-md-offset-1">
                    <h4 style="font-weight:bold;"> Make Superlatvie Answer </h4>
                  <div class="row" style="line-height:2;">
            <?php
           
            $j=1;
             
           foreach ($Makesuperlatvi as $value) { 
               
                  $question=$value->postive;
                  $coparative=$value->coparative;
                  $superlative=$value->superlative;
                  
                  ?>
                  
                        <div class="col-md-2 col-sm-2 col-xs-2 magic_arrange"><b class="magic_question">&nbsp;&bull;&nbsp;</b> <b> <?php echo $question ;?></b></div>
                        <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo  $coparative ;?>)</b></div>
                         <div class="col-md-1 col-sm-1 col-xs-1 magic_arrange"><b>(<?php echo  $superlative ;?>)</b></div>
                
            <?php } ?>
                  </div>  
              </div>
          </div>
 <?php } ?>
      











































     

          <br /><br /><br />
          <div class="col-xs-12 col-md-12 text-center">
                  <h4><i>The End | Best of Luck<i></h4>
             

                  <h5><i>This is a software generated paper<i></h5>
                  <div class="col-lg-12 col-md-12 text-center">
                        <img src="<?php echo base_url(); ?>assets/images/softvilla-logo.png" style="width:150px;" alt="logo"><span style="border:1px solid black;height:300px;margin:0 10px;padding:25 0;"></span><img src="<?php echo base_url(); ?>assets/images/slm-qr-code.jpg" style="width:80px;" alt="logo">
                  </div>
          </div>
        </div></div>
        <script>//window.print();</script>
    </body>
</html>
<script>
      $(window).on("load", function() {
            var button="<div class='col-lg-12 magic-align' style='display:none;'><button type='button' class='btn btn-primary btn-sm magic-align-btn'>Left/Right</button></div>";
            $('.magic_hover').prepend(button);
      });
      $(function(){
            $(document).on('mouseenter', '.magic_hover', function () {
                    $(this).find(".magic-align").show();
                }).on('mouseleave', '.magic_hover', function () {
                    $(this).find(".magic-align").hide();
                });
            $(document).on('click', '.magic-align-btn', function () {
                    var status=$(this).parent().parent().css('textAlign');
                    var div=$(this).parent().parent();
                    var swaps=div.find('.magic_swap');
                    var quest=div.find('.magic_question');
                    var quest_mirror=div.find('.magic_question_mirror');
                    var magic_arrange=div.find('.magic_arrange');
                    var magic_quest_no=div.find('.magic_quest_no');
                    if(status=='start' || status=='left'){
                        div.css('text-align','right');
                        quest.addClass('pull-right');
                        quest_mirror.addClass('pull-left');
                        quest_mirror.removeClass('pull-right');
                        for (i = 0; i < swaps.length; i++) { 
                             swaps.eq(i).prev().find('b').addClass('pull-right'); 
                             swaps.eq(i).insertBefore(swaps.eq(i).prev());
                        }
                        magic_arrange.addClass('pull-right');
                        magic_quest_no.find('b').addClass('pull-left');
                    }
                    else {
                        div.css('text-align','left'); 
                        quest.removeClass('pull-right');
                        quest_mirror.addClass('pull-right');
                        quest_mirror.removeClass('pull-left');
                        for (i = 0; i < swaps.length; i++) {
                              swaps.eq(i).next().find('b').removeClass("pull-right");  
                              swaps.eq(i).insertAfter(swaps.eq(i).next());
                        }
                        magic_arrange.removeClass('pull-right');
                        magic_quest_no.find('b').removeClass('pull-left');
                    }
            });
            
      });
</script>





