	<?php if(isset($_SESSION['msg']) ){?>
	<div class="alert alert-info">                
	<h4>Info!</h4>
	<?php echo $_SESSION['msg']; unset($_SESSION['msg']); ?>
	</div> <?php }  ?>  
<?php

	$menu		= mysql_query("SELECT * FROM `state` WHERE 1 order by `state_name` ASC")or die(mysql_error());
	$count		= mysql_num_rows($menu);
?>     
    <div class="row-fluid" >
    <div class="span12">    
    	<div class="head clearfix">
        <div class="isw-ok"></div>
        <h1>View State List</h1>
     </div>   
   		<div class="block-fluid">
        	<table cellpadding="0" cellspacing="0" width="100%" class="table" id="example">
                <thead>
                    <tr>
                        <th>S.No.</th>
                        <th>State Name</th>
                       	<th>State Code</th>
                        <th>Mobile No</th>
                        <th>Address</th>
                        <th>Backend E-mail</th>
                        <th>Gst No</th>
                        <th>Modify</th>
                    </tr>
                </thead>                 
                <tbody>
					<?php
					$i=1;
                    while($show_menu = mysql_fetch_array($menu)) 
                    {
                    ?>	
                    	<tr>
                        <td><?php echo $i++; ?></td>
                        <td ><?php echo ucwords($show_menu['state_name']); ?></td>
                        <td><?php echo $show_menu['state_code']; ?></td>
                        <td><?php echo $show_menu['st_mobile']; ?></td>
                        <td><?php echo $show_menu['st_address']; ?></td>
                        <td><?php echo $show_menu['backend_mail']; ?></td>
                        <td><?php echo ($show_menu['gst_no']); ?></td>
                        <td class="center" style="text-align:center">
                        	<a href="home.php?page=state_edit&st_id=<?php echo $show_menu['id'];?>"><img src="images/edit_new.png"  border="0" style="width: 20px;"/></a>
                        </td>     
                         
                    </tr>
               	   <?php } ?>                
                </tbody>            
            </table> 
        </div>    
   </div>
   </div>            
<script>
$(document).ready(function() {
    var table = $('#example').DataTable( {
		"order": [[ 2, "asc" ]],
		"pageLength": 50,stateSave: true,
        fixedHeader: {
            header: true,
            footer: true
        }
    } );
	 table.on( 'order.dt search.dt', function () {
        table.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
            cell.innerHTML = i+1;
        } );
    } ).draw(); } );
	</script>