<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php");

if($_REQUEST['id']!='')
{
$m->where("branch_id", $_SESSION['branch']);
$m->where("id", $_REQUEST['id']);
$AttachDocuments = $m->get("eduportal_attach_documents");

}

 ?>

<!DOCTYPE html>
<html lang="en">
  <head>
 
    <title>Manage Classes | EduPortal</title>
   <?php include('RootMe/css_links.php');?>
   
  </head>
  
  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
            <?php include('RootMe/sidebar.php');?>

              <?php include('RootMe/header.php');?>
     
        <!-- page content -->
          <div class="right_col" role="main">

            <a href="<?php echo $_SESSION['dashboard'];?>">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 
              <a href="student_inquiry.php">Student Inquiry</a>
      &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 
              Attach Documents
                  <br><br>
         
          
          <div class="row" style="background-color:white;">
 <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">
   <div class="box_visa_form">
    <div class="table-responsive" style="min-height:320px;padding:3%;">


<div class="col-md-12 ">    

<div class="col-md-6 ">    
<h3>Manage Document Type</h3>


</div>



</div>

      

<table class="table table-bordered table-hover text-center" style="width:60%;float: left;">
<thead>
<tr class="" style="color:#e2333b;">
<td> Document Name</td>          
<td> Action</td>
</tr>
</thead>
<tbody>
<?php

$qr="select * from eduportal_attach_documents where branch_id='".$_SESSION['branch']."' ";

$WorkAssignList = $m->query($qr);

foreach($WorkAssignList as $WorkAssignListVal)
{


?>             
<tr>
<td style="padding:1px;font-size:12px;"><?php echo utf8_decode_all($WorkAssignListVal['document_type']);?></td>                    

<td style="padding:1px;font-size:12px;">


<a  href="attach_documents.php?<?php echo session_id().session_id().session_id();?>&id=<?php echo $WorkAssignListVal['id'];?>" style="padding:0px 5px;"  class="btn btn-success"><i class="fa fa-pencil"></i></a>

<a href="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php?id=<?php echo $WorkAssignListVal['id'];?>&action=DeleteAttachment" style="padding: 0px 5px; font-size:14px;" onClick="return confirm('Are you sure you want to delete this record');"  class="btn btn-danger"><i class="fa fa-remove"></i> </a>



</td>

</tr>


<?php 
$i++;
} ?>



</tbody>
</table>
  <div class="addclasswidth">
   <form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data">

   <?php 
if(isset($_REQUEST['id'])) { ?>

<input type="hidden" name="action" value="EditAttachDocuments">
<input type="hidden" name="eid" value="<?php echo $AttachDocuments[0]['id'];?>">
<?php } else { ?>
<input type="hidden" name="action" value="AddAttachDocuments">
<!-- <input type="hidden" name="class_id" value="<?php echo $_REQUEST['class_id'];?>"> -->
<?php } ?>
      <ul style="list-style-type:none;">
  <div class="col-md-12" style=""> <h3 class="heding_name">Add Document Type </h3></div>

<div class="clearfix"></div>
       
        <hr>
             
        
        <li>
          <label for=""> Document Type Name </label>
          <input type="text" name="document_type" class="inputfield"   value="<?php echo $AttachDocuments[0]['document_type'];?>" autocomplete="off" required>
        </li>
       
           <div class="clearfix"></div>
        <li class=" pull-left" style="margin-top:30px;">
        
          <input type="submit" value=" Submit " class="btn btn-primary" >
        </li>
      </ul>
    </form>
  </div>


    </div>
      <div class="clearfix"></div>
     </div>
  </div>
  <div class="clearfix"></div>
</section>
<section class="sub_agent_form" id="sub_user_form" style="display:none;">
  <div class="container">
   <div class="box_visa_form">
    
     <div class="clearfix"></div>
     </div>
  </div>
  <div class="clearfix"></div>
</section>            



           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  

    <?php include('RootMe/js_linksscript.php');?>
  
  </body>
</html>
