
<?php
	include('common/header.php');
?>

<div class="row">
	<!-- <div class="col-xs-12">
		<section class="panel panel-default">
        <header class="panel-heading bg-info lt font-bold">Search</header>
        <div class="panel-body bs-example form-horizontal">
          <div class="row"> -->
            <!-- PAGE CONTENT BEGINS--> 
     <!--  <div class="col-md-12">
         <div class="col-sm-6">
         <div class="form-group">   -->
                    <!-- <label class="col-sm-5 control-label" for="form-field-2" ><?php echo 'State Name';?><font style="color:red">*</font></label>
                    <div class="col-sm-7">                        
                      <input id="search" type="text" class="form-control" placeholder="State Name"> -->

                      <!-- <input type="text" name="testid" id="testid" >
                          <div id="result"> -->
           <!--            
                    </div>
          </div>

          

         </div>

      </div>      
          </div>
        </div>
      </section>

      <div class="clearfix form-actions">
        <div class="text-center">
          <button class="btn btn-info" type="button"> Search </button>
        </div>
      </div> -->
   <!--  </div> -->

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

      <section class="panel panel-default">
        <header class="panel-heading bg-info lt font-bold">List State
     <!--  <ul class="nav nav-pills pull-right">
        <li class="bg-info lt"><a href="http://project.nityam.in/nityamhygiene/index.php/admin/client/manage_client"> + Add New Client</a></li>
        <li class="bg-info lt"><a href="http://project.nityam.in/nityamhygiene/index.php/admin/client/manage_client_n_location"> + Add New Client</a></li>
      </ul> -->
    </header>
        <div class="panel-body bs-example form-horizontal">
          <div class="table-responsive">
            <table id="example" class="table table-bordered" cellspacing="0" width="100%">
              <thead>
        <tr>
          <th>Sr No</th>
          <th>Country Name</th>
          <th>State Name</th>
          <th>Action</th>
        </tr> 
      </thead>     
      <tbody>  
       <?php 
       $srno=1;
       foreach ($state as  $value) {
         $state_id=$value['state_id'];
       ?>     
        <tr>
          <td><?php echo $srno; ?></td>
          <td><?php echo $value['state_name']; ?></td>  
          <td>
            <!--<b><a href="http://project.nityam.in/nityamhygiene/index.php/admin/client/manage_client/Edit">Edit</a> | <a href="http://project.nityam.in/nityamhygiene/index.php/admin/client/view_client">View</a> | <a href="#">Disable</a></b>-->
            <b><a href="<?php echo base_url();?>index.php/gc/state/view_state/<?php echo $state_id ?>">View & Edit</a> | <a href="#">Disable</a></b>
          </td>
        </tr> 
        <?php 
         $srno=$srno+1;
       }
         ?>
        </tbody>
            </table>
          </div>
        </div>
      </section>

		<div class="clearfix form-actions">
			<div class="col-md-offset-5 col-md-5">
				<button class="btn btn-info" type="button" onclick="javascript:window.location='<?php echo base_url();?>index.php/gc/state/manage_state'">
					Add State
				</button>
			</div>
		</div>
	</div>
</div>
<div>
	<!-- /.page-row -->
    <!-- /.page-content --> 
</div>
<!-- /.main-content --> 
</div>
<!-- /#ace-settings-container --> 
</div>
<!-- /.main-container-inner -->
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() {
    $('#example').DataTable();
  } );
</script>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable( {
    destroy: true,
    searching: true,
    "order": [],
    "columnDefs": [
      { "orderable": false, "targets":  [] }
      ]
  } );
});
</script> 
<script>
$.widget( "custom.catcomplete", $.ui.autocomplete, {
          _create: function() {
            this._super();
            this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" );
          },
          _renderMenu: function( ul, items ) {
            var that = this,
            currentCategory = "";
            $.each( items, function( index, item ) {
              var li;
              if ( item.category != currentCategory ) {
                ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
                currentCategory = item.category;
              }
              li = that._renderItemData( ul, item );
                if ( item.category ) {
                li.attr( "aria-label", item.category + " : " + item.label );
              }
            });
          }
        });
        
         var data = [
          { label: "maharashtra" },
          { label: "hydrabad"},
          { label: "goa" },
          { label: "uttar pradesh"}
        ];
        $( "#search" ).catcomplete({
          delay: 0,
          source: data
        });   

</script>

<?php
	include('common/footer.php');
?>