 <div class="breadcome-area">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <div class="breadcome-list single-page-breadcome">
                                <div class="row">
                                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                       &nbsp;
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                        <ul class="breadcome-menu">
                                            <li><a href="#">Home</a> <span class="bread-slash">/</span>
                                            </li>
                                            <li><span class="bread-blod">Add Server</span>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Basic Form Start -->
        <div class="basic-form-area mg-tb-15">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-6 col-md-6 col-sm-6 col-md-offset-2 col-xs-12">
                        <div class="sparkline8-list mt-b-30">
   
								 <div class="sparkline8-hd">
                                <div class="main-sparkline8-hd">
                                    <h1>Add Server
                            </div>
                            <div class="sparkline8-graph">
                                <div class="basic-login-form-ad">
                      
                                    <div class="row">
                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                            <div class="basic-login-inner">
                                                <p></p>
                                                <form role="form" action="<?php echo site_url();?>Server/save_Server" method="post" role="form" class="form-horizontal">
                                                    <div class="form-group-inner">
                                                        <label>Name</label>
                                                        <input type="text" name="server_name" class="form-control" placeholder="Enter name" />
                                                   <span style="color: red;"><?php echo form_error('server_name'); ?></span>
                                                    </div>
                                                    <div class="form-group-inner">
                                                        <label>RAM(In GB)</label>
                                                      <input type="number" name="ram" class="form-control" placeholder="RAM in GB" />
                                                    </div> 
												  <div class="form-group-inner">
                                                        <label>CPU(in core)</label>
                                                       <input type="number" name="cpu" class="form-control" placeholder="Enter Number" />
                                                    </div> 
												  <div class="form-group-inner">
                                                        <label>HARD DRIVE(GB)</label>
                                                      <input type="number" name="hard_drive" class="form-control" placeholder="in GB" />
                                                    </div>

													<div class="form-group-inner">
                                                        <label>RED CONTROLLER</label>
                                                         <input type="text" name="redcontroler" class="form-control" placeholder="Enter name" />
                                                    </div> 	

													<div class="form-group-inner">
                                                        <label>POWER SUPPLY</label>
                                                        <input type="text" name="power_supply" class="form-control" placeholder="Enter name" />
                                                    </div> 	
														
													<div class="form-group-inner">
                                                        <label>DATA CENTER</label>
                                                      
														 <select name="datacenter_id" id="country" class="form-control">
															<option value="">Select datacenter</option>
															<?php
															foreach($datacenter as $r)
															{
																?>
																<option value="<?=$r['id']?>"><?=$r['name']?></option>
																<?php
															}
														?>
														</select>
                                                    </div> 
													<div class="form-group-inner">
                                                        <label>RACK</label>
                                                       <select id="state" name="rack_id" class="form-control">
														<option value="">Select Rack</option>
													</select>
                                                    </div> 
													<div class="form-group-inner">
                                                        <label>IP ADDRESS</label>
														 <select id="city" name="ipaddress" class="form-control">
														<option value="">Select IP ADDRESS</option>
													</select>
                                                    </div> 
													<div class="form-group-inner">
                                                        <label>IPKVM IPADDRESS</label>
                                                        <input type="text" name="ipkvm_ipaddress" class="form-control" placeholder="Enter name" />
                                                    </div> 				
													<div class="form-group-inner">
                                                        <label>SIZE OF SERVER</label>
                                                      <select required name="size_of_server" class="form-control" />
														<option value="">select<option>
														<option value="1">1U<option>
														<option value="2">2U<option>
														<option value="3">3U<option>
														<option value="4">4U<option>
														</select>
                                                    </div> 
												
                                                    <div class="login-btn-inner">
                                                        <div class="inline-remember-me">
                                                            <button class="btn btn-sm btn-primary pull-right login-submit-cs" type="submit">Submit</button>
                                                          
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                     
                                    </div>
                                </div>
                            </div>
							</div>
						
							
                        
                    </div>
                    </div>

                </div>


            </div>
        </div>
		
			
      <link href="<?php echo site_url();?>assets/css/jquery.dataTables.min.css" rel="stylesheet">
	    <link href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css" rel="stylesheet">
    
	<script src="//code.jquery.com/jquery-1.12.4.js"></script> 
	<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> 
	<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script> 
	<script src="//cdn.datatables.net/buttons/1.4.2/js/buttons.flash.min.js"></script> 
	<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> 
	<script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> 
	<script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> 
	<script src="//cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script> 
	<script src="//cdn.datatables.net/buttons/1.4.2/js/buttons.print.min.js"></script> 
<!-- for datatable csv,pdf.... -->

	<script>
$(document).ready(function() {
    $('#example1').DataTable( {
        dom: 'Bfrtip',
		"pageLength": 10,
        buttons: [
             'csv', 'excel'
        ]
    } );
} );			
	</script>  
	
	<script type="text/javascript">
$(document).ready(function(){
    $('#country').on('change',function(){
        var countryID = $(this).val();
        if(countryID){
            $.ajax({
                type:'POST',
                url:'http://srm.spectracloud.com/datacenter/Server/add_rack',
                data:'country_id='+countryID,
                success:function(html){
                    $('#state').html(html);
                }
            }); 
        }else{
            $('#state').html('<option value="">Select datacenter</option>');
        }
    });
    
    $('#country').on('change',function(){
        var countryID = $(this).val();
        if(countryID){
            $.ajax({
                type:'POST',
                url:'http://srm.spectracloud.com/datacenter/Server/add_rack1',
                data:'country_id='+countryID,
                success:function(html){
                    $('#city').html(html);
                }
            }); 
        }else{
            $('#city').html('<option value="">Select state first</option>'); 
        }
    });
});
</script>
		
			
	

