<?php

include_once'db/connect_db.php';

if (isset($_POST['view'])) {
     $a =$_POST['ty'];
    
          echo'<h4>Type :'.$a.'</h4>';
               echo'<div style="overflow-x:auto;">';
                   echo'<table class="table table-bordered table-striped" id="myProduct">';
                        echo'<thead>';
                            echo'<tr>';
                                     echo'<th width="2%" align="left" style="border-bottom:1px solid #999999">ItmId</th>';
                                     echo'<th width="12%" align="left" style="border-bottom:1px solid #999999">Itmname</th>';
                                     echo'<th width="8%" align="left" style="border-bottom:1px solid #999999">catagory</th>';
                                     echo'<th width="8%" align="left" style="border-bottom:1px solid #999999">Date-Add</th>';
                                     echo'<th width="8%"align="left" style="border-bottom:1px solid #999999">Add.by</th>';
                                     echo'<th width="4%" align="left" style="border-bottom:1px solid #999999">Value</th>';
                                     echo'<th width="4%" align="left" style="border-bottom:1px solid #999999">Status</th>';
                                    // echo'<th width="4%" align="right">Update By</th>';
                             echo'</tr>';

                           echo'</thead>';
                        
                           echo'<tbody>';
                        
                          //  $no = 1;
                                          
                                                           
                           $selectst2 = $pdo->prepare("SELECT srl,itmname,cat_id,dop,user,value,status from item where status='Active'");
                               $selectst2->execute();
                                 
                                                  
                            while($rowst2 = $selectst2->fetch(PDO::FETCH_ASSOC)){     
                                
                                                          
                                
                          
                            echo'<tr>';
                               //  echo'<td style="width:10px;">'.$no++.'</td>';
                                 
                                 
                                  echo'<td>'.$rowst2['srl'].'</td>';
                                   echo'<td>'.$rowst2['itmname'].'</td>';
                                   echo'<td>'.$rowst2['cat_id'].'</td>';
                                   echo'<td>'.$rowst2['dop'].'</td>';
                                   echo'<td>'.$rowst2['user'].'</td>';
                                   echo'<td>'.$rowst2['value'].'</td>';
                                  echo '<td>'.$rowst2['status'].'</td>';
                                  // echo '<td>'.$rowst2['pname'].'</td>';
                                  // echo '<td>'. number_format($rowst2['qty']).'</td>';
                                  
                                 // echo '<td align="right">'.$rowst2['usrname'].'</td>';
                                 
                              
                               
                            echo'</tr>';
                                                         
                        
                       //echo'<tr>';
			//<th colspan="4" style="border-top:1px solid #999999"> Total: </th>
			//<th colspan="1" style="border-top:1px solid #999999"> 
			
			
			//</th>
				//<th colspan="1" style="border-top:1px solid #999999">
		
		//400
				//</th>
		//</tr>    
                            }
                    
               echo'</tbody>';
       echo'</table>';
                    
     echo'<hr></hr>';
 echo'</div>';  
                 
               // <!-- /.Report1***************************************************************************************** -->
                
    
    
    
    
    
    
                
        
 } elseif(isset($_POST['prid123']) && !empty($_POST['prid123'])) {

	 
     
 } elseif(isset($_POST['itrid']) && !empty($_POST['itrid'])) {  
     
    
     
     
    
}
        
        
        
        
        
        
        
        
        
        
        
        
