<?php
include('../config/config.php');
include('../classes/classVisits.php');
/*echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';
exit;*/
if(isset($_GET['deldress'])&&$_GET['deldress']!='')
{
	try
	{
		$deldress = base64_decode($_GET['deldress']);
		
		$delDressOb = new classVisits;
		$delDressOb->setDressingID($deldress);
		$delDressOb->deleteDressing();
		
		header("Location:mgmtdressing.php");
	}
	catch (MyException $e)
	{
		$error_message = $e->getUserMsg();
	}
}


try
{
	$dressOb = new classVisits;
	$dressOb->setOrganizationID($_SESSION['security']['org_id']);
	$dressing_array = $dressOb->retrieveDressing();
}
catch (MyException $e)
{
	$error_message = $e->getUserMsg();
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/print.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="shortcut icon" href="../images/favicon.png">
    <title>Med2TEC Hospital Management Information System</title> 
    <link href="../css/print.css" rel="stylesheet">
    <link href="../datepicker/jquery-ui.css" rel="stylesheet" >  
    <script type="text/javascript" src="../datepicker/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="../datepicker/jquery-ui.js"></script> 
</head>

<body> 
<div align="right"> 
 <SCRIPT LANGUAGE="JavaScript">  
if (window.print) {
document.write('<form class="no-print"><input type=button name=print value="Print" onClick="window.print()"></form>');
}
</script></div>

<section class="wrapper">
<div style="background:#FFF; padding:0px 0px 0; height:auto;">
  <table cellspacing="0" cellpadding="0" width="100%" border="0" style="font-size:11px;">
    <tbody>
      <tr>
        <td align="left" style="background:#fff;"><img alt="" src="../images/org_print_logos/<?php echo $_SESSION['security']['org_id']?>.png" style="width:100%;"></td>
      </tr>
    </tbody>
  </table>
  
</br>

</div>

<div class="row">
          <section class="panel">
            <header class="panel-heading">
              <h2><!-- InstanceBeginEditable name="title" --><!-- InstanceEndEditable --></h2>
            </header>

  <br />
  
<!-- InstanceBeginEditable name="main" -->
    
    

                    
					
  <section id="main-content">
    <section class="wrapper">

      <!-- page start-->
      <div class="row">
        <div class="col-sm-12">
          <section class="panel">
            <header class="panel-heading">
              <h2>LIST OF DRESSING</h2>
            </header>
            
			<?php
            if(isset($error_message)&&$error_message!='')
            {
                ?>
                <tr>
                    <td><span class="message_red"><?php echo $error_message;?></span></td>
                </tr>
                <?php
            }
            ?>
            <!--<table width="100%" border="0" cellpadding="1" cellspacing="0">
              <tr>
                <td width="65%" align="right"> </td>
                  <td width="25%" align="right"><div class="row-fluid">
                    <div class="span6">
                      <div id="dynamic-table_length" class="dataTables_length">
                        <label>
                          <select name="dynamic-table_length" size="1" class="form-control" aria-controls="dynamic-table">
                            <option value="10" selected="selected">10</option>
                            <option value="25">25</option>
                            <option value="50">50</option>
                            <option value="100">100</option>
                          </select>
                          </label>
                      </div>
                    </div>
                  </div></td>
                  <td width="10%">records per page</td>
                  
              </tr>
            </table>-->
            <br />
<br />
            <div class="panel-body">
              <div class="adv-table">
              
                <table class="bottomBorder" cellpadding="0" cellspacing="0" width="100%">
                
                  <thead>
                  
                    <tr>
                      <th width="5%" align="center">ID</th>
                      <th width="85%" align="right">Dressing</th>
                    </tr>
                    
                  </thead>
                  
                  <tbody>
                   <?php
					if(isset($dressing_array[0]['dressing_id'])&&$dressing_array[0]['dressing_id']!='')
					{
						for($m=0;$m<count($dressing_array);$m++)
						{
							
								if($m%2==0){$class='gradeX';}else{$class='gradeC';}
								
								?>
								<tr class="<?php echo $class;?>">
								
                                <td align="center"><?php echo $dressing_array[$m]['dressing_id'];?></td>
								<td align="right"><?php echo strtoupper($dressing_array[$m]['dressing']);?></td>
                                
                                
								</tr>
                                
                                 <?php
						}
					}
					else
					{
						?>
                        <tr>
                        <table>
                        	<tr><td>No Entries Found!</td></tr>
                        </table>
                        </tr>
                        <?php
					}
					?>

                  </tbody>
                  
                </table>
                
              
                
              </div>
            </div>
          </section>
        </div>
      </div>
      
     
      <!-- page end-->
     
    </section>
  </section>
  <!-- InstanceEndEditable -->
</section>
</div>

<!--<p align="center" style="font-size:12px; font-family:Arial, Helvetica, sans-serif; margin-top:260px;"><strong><!--317 A-1, Nursery Stop, Township, Lahore. 
Ph: 042-35151666</strong><br />
For Appointment call at 042-35151666 (bring your Patient ID Card) </p>-->

   <div class="sidepop" style="float:right;">
    <div class="sidepopbutton stemp"><div style="color: rgb(0, 0, 0); text-align: right; font-size: 10px; margin-top: 4px; position: absolute; right: 180px;">© Software by Softusion Inc. 0322 6155 219</div>   
    </div>
</div>

<!--<div class="sidepop" style="float:right;">
    <div class="sidepopbutton stemp"><div style="color:#000; text-align:right; font-size:9px;">© Software designed by Softusion Inc. Contact us at 0322 6155 219</div>   
    </div>
</div>-->


          
</body>
<!-- InstanceEnd --></html>







<script>

$(".update_medicalissue").click(function() {
	
	var id = this.id;
	
	med_issue_id = $("#med_issue_id_"+id).val();
	med_issue_name = $("#med_issue_name_"+id).val();
	
	
	$("#med_issue_id").val(med_issue_id);
	$("#med_issue_name").val(med_issue_name);
	
});
</script>