<?php
$atts = array(
              'width'      => '600',
              'height'     => '600',
              'scrollbars' => 'yes',
              'status'     => 'no',
              'resizable'  => 'no',
              'screenx'    => '20',
              'screeny'    => '50',
    'class'=>'btn btn-primary'
            );
?>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="panel panel-primary">
        <div class="panel panel-heading">Verify Conference Registration</div>
        <div class="panel panel-body">
            <?php echo form_open('admin/verify2'); ?>
            <div class="input-group" style="margin-bottom: 10px !important">
                <span class="input-group-addon">Application No</span>
                <input type="number" name="transNo" class="form-control" />
            </div>
                 <div class="input-group">
                
                <input type="submit" value="Search" class="btn btn-primary" />
                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel panel-body">
        <?php
        if(empty($applicants)){ ?>
        <pre><span>No Applicant Found</span></pre>
        <?php } else{ foreach($applicants as $row){}?>
        <table class="table table-striped">
            <tr><td colspan='4'><?php echo anchor_popup('admin/printBadge/'.$row['confAuthNum'],'Print Badge',$atts); ?></td></tr>
            <tr><td>Names</td><td><?php echo $row['confName']; ?></td><td>Conference No</td><td><?php echo $row['confAuthNum']; ?></td></tr>
            <tr><td>Email</td><td><?php echo $row['confEmail']; ?></td><td>Phone</td><td><?php echo $row['confPhone']; ?></td></tr>
            <tr><td>Reg. Category</td><td><?php echo $row['confcatName']; ?></td><td>Date Registered</td><td><?php echo $row['confRegDate']; ?></td></tr>
            
        </table>
        <pre><span><strong>Conference Material</strong></span></pre>
        
        <?php
        echo form_open('welcome/addConfMaterial'); ?>
        <ul>
        <?php
        
        if(empty($materialCollection)){ ?>
            <p><strong><h4>Select Conference Materials to be given to Conference Participant</h4></strong></p><?php
            foreach($materials as $m){ ?>
        <li class='list-group-item'><input type="checkbox" name='material[<?php echo $m['confMaterialID']; ?>]' value='<?php echo $m['confMaterialID']; ?>' /> <?php echo $m["confMaterial"]; ?></li>
       <?php }
        ?>
        </ul>
        <input type='hidden' value='<?php echo $row['confID']; ?>' name="confID" />
        <input type="submit" name='submit' class="btn btn-primary" value="Submit" />
        <?php echo form_close(); ?>
        <?php }else{
            if(!empty($matRemaining)){
          echo form_open('welcome/addConfMaterial'); ?>
        <ul class="list-group">
        <?php foreach($matRemaining as $m){ ?>
        <li class='list-group-item'><input type="checkbox" name='material[<?php echo $m['confMaterialID']; ?>]' value='<?php echo $m['confMaterialID']; ?>' /> <?php echo $m["confMaterial"]; ?></li>
       <?php } ?></ul>
        <input type='hidden' value='<?php echo $row['confID']; ?>' name="confID" />
        <input type="submit" name='submit' class="btn btn-primary" value="Submit" />
        <?php  echo form_close();
        }
         ?>   
        <p><strong>Materials Already Issued to Applicant</strong></p>  
        <ul>
          <?php
          foreach($materialCollection as $m){ ?>
        <li class='list-group-item'><?php echo $m["confMaterial"]; ?></li>
       <?php }
        ?>
        </ul>   
            
       <?php } }?>
        
    </div>
    </div>
</div>