<div class="body-content">

                        <div class="row">

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

                                <div class="card mb-4">

                                    <div class="card-header">

                                        <div class="d-flex justify-content-between align-items-center">

<input type="text" style="width:300px;" placeholder="Search Client name or mobile number" id="search_name" class="form-control pull-right float-right">

<button type="button" data-toggle="modal" data-target="#newusermodal" class="btn btn-warning pull-right">Add New Client</button>

                                        </div>

                                    </div>
                                    
                                    <div id="newusermodal" class="modal fade" role="dialog">
                                      <div class="modal-dialog">
                                        <!-- Modal content-->
                                        <div class="modal-content">
                                          <div class="modal-header">
                                            <h4 class="modal-title">Add New Client</h4>
                                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                                          </div>
                                          <div class="modal-body">
                                            <form action="<?php echo base_url();?>swadmin/add_new_user" method="post">
                                            
                                            </form>
                                          </div>
                                          <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                          </div>
                                        </div>
                                    
                                      </div>
                                    </div>

                                    

                                    <div class="card-body">

      

								

        <table class="table table-striped table-responsive table-bordered dataTable">

        	<thead>

												<tr>



													<th>S.No.</th><th>ClientID</th>



                                                    <th>Member Since</th><th>Limit/Charge</th>





                  <th><i class="fa fa-user"></i> Contact Details</th>



                                                    <th><i class="fa fa-map-marker"></i> Address</th>



													<th>Action</th>



												</tr>

											</thead>

			<tbody id="loadusers">

                                            

                                            </tbody>

        </table>

        <?php $total=$this->db->get_where("users")->num_rows();



						$no_of_pages=ceil($total/20);



						if($total%20>0){



						//$no_of_pages=$no_of_pages+1;	



						}?>



                <div class="text-center">

                <div class="btn-group mr-2">

                                                        

                                                    



                   



                    <?php for($i=1;$i<$no_of_pages;$i++){?>

						<button type="button" id="<?php echo $i*20;?>" class="btn <?php if($i==1){echo 'btn-warning';}else{echo "btn-success";}?> pagin"><?php echo $i;?></button><?php if($i%25==0){echo '</div><div class="btn-group mr-2">';}?>

                     <!-- <li class="<?php //if($i==0){echo 'active';}?> pagin" ><a href="#" ><?php //echo $i+1;?></a></li>-->



					<?php }?>



                    </div>



                </div>

      </div>

                    				</div>

                                </div>

                            

                            </div>

                        </div>

                    </div><!--/.body content-->

                </div><!--/.main content-->

                

            </div><!--/.wrapper-->

        </div>

        <!--Global script(used by all pages)-->

        <div class="modal fade" id="trade_modal" role="dialog">

            <div class="modal-dialog modal-sm">

              <div class="modal-content">

                <div class="modal-header">

                  <h4 class="modal-title">Trades List/Brokerage</h4>

                  <button type="button" class="close" data-dismiss="modal">&times;</button>

                </div>

                <div class="modal-body trades_list_div">

                </div>

              </div>

            </div>

        </div>

        <div class="modal fade" id="myModalp" role="dialog">

                    <div class="modal-dialog modal-sm">

                      <div class="modal-content">

                        <div class="modal-header">

                          <h4 class="modal-title"><b id="agentname" class="text-success"></b> Password</h4>

                          <button type="button" class="close" data-dismiss="modal">&times;</button>

                        </div>

                        <div class="modal-body">

                          <form class="form" action="" method="post" id="changepass">

                          <input type="hidden" name="agentid" id="agentid" value="" />



                          



                          	<div class="form-group label-floating">



                            <label class="control-label">Password</label>



                                <input type="password" name="npass" required id="edit_pass" class="form-control" >



                            </div>



                            <div class="form-group label-floating">



                            <label class="control-label">Password Confirm </label>



                                <input type="password" name="cpass" required id="edit_pass_change" class="form-control">



                            </div>



                            <b class="text-danger" id="passch"></b>



                            <button type="submit" class="btn btn-warning">Change Password</button>



                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>



                          </form>



                        </div>



                      </div>



                    </div>



                  </div>

		<div class="modal fade" id="notif_popup" role="dialog">

                    <div class="modal-dialog modal-sm">

                      <div class="modal-content">

                        <div class="modal-header">

                          <h5 class="modal-title"><b id="agentname2" class="text-success"></b><br/> Send Notification</h5>

                          <button type="button" class="close" data-dismiss="modal">&times;</button>

                        </div>

                        <div class="modal-body">

                          <form class="form" action="" method="post" id="notif_form">

                          <input type="hidden" name="agentid" id="agentid2" value="" />
                          <input type="hidden" name="token" id="token" value="" />
                          
                          	<div class="form-group label-floating">



                            <label class="control-label">Title</label>



                                <input type="text" name="title" required class="form-control" >



                            </div>



                            <div class="form-group label-floating">



                            <label class="control-label">Message</label>


								<textarea class="form-control" name="message" required rows="3"></textarea>



                            </div>



                            <b class="text-danger" id="notemsg"></b>



                            <button type="submit" class="btn btn-warning">Send Notification</button>



                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>



                          </form>



                        </div>



                      </div>



                    </div>



                  </div>

        <div id="myModal" class="modal fade" role="dialog">



  <div class="modal-dialog modal-md">







    <!-- Modal content-->



    <div class="modal-content">



      <div class="modal-header">





        <h4 class="modal-title">Customer Account</h4>

        <button type="button" class="close" data-dismiss="modal">&times;</button>



      </div>



      <div class="modal-body bank_div row">



      



      </div>



    </div>







  </div>



</div>

<div id="kycModal" class="modal fade" role="dialog">



  <div class="modal-dialog modal-lg">







    <!-- Modal content-->



    <div class="modal-content">



      <div class="modal-header">





        <h4 class="modal-title">Customer KYC</h4>

        <button type="button" class="close" data-dismiss="modal">&times;</button>



      </div>



      <div class="modal-body kycdocs_div row">



      



      </div>



    </div>







  </div>



</div>

		<script>

	$(document).ready(function(){

		//$("#addmoney").submit(function(e){e.preventDefault();

//			var formdata=$(this).serialize();

//			$.ajax({

//					 type: "POST",

//					 url: '<?php echo base_url();?>swadmin/add_money_submit',

//					 data: {formdata:formdata},

//					 success: function(response){

//						 alert(response);

//						}

//					 });

//				});

		$("#search_name").keyup(function(){

			var name=$(this).val();

			if(name.length>=3){

			$.ajax({

				 type: "POST",

				 url: '<?php echo base_url();?>swadmin/ajax_search_name',

				 data: {name:name},

				 success: function(response){

					$("#loadusers").html(response);

				 }

			 });

			}

			if(name.length==3){

				var offset=0;



					$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>swadmin/ajax_users',



							 data: {limit:10,offset:offset},



							 success: function(response){



								 //alert(response);



								 $("#loadusers").html(response);



							 }



							 });

			}

		});

		$(".pagin").click(function(e){e.preventDefault();



						$(".product_data").html("Loading..");



						$(".pagin").removeClass("btn-warning");

						$(".pagin").addClass("btn-success");



						$(this).addClass("btn-warning");



						var offset=$(this).attr("id");



						$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>swadmin/ajax_users',



							 data: {offset:offset},



							 success: function(response){



								 //alert(response);



								 $("#loadusers").html(response);



							 }



							 });	



					});



					var offset=0;



					$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>swadmin/ajax_users',



							 data: {limit:10,offset:offset},



							 success: function(response){



								 //alert(response);



								 $("#loadusers").html(response);



							 }



							 });

		

		

		

	});

</script>

        

        <script src="<?php echo base_url();?>adminassets/plugins/metisMenu/metisMenu.min.js"></script>

        <script src="<?php echo base_url();?>adminassets/plugins/perfect-scrollbar/dist/perfect-scrollbar.min.js"></script>

        <!-- Third Party Scripts(used by this page)-->

        <script src="<?php echo base_url();?>adminassets/plugins/sparkline/sparkline.min.js"></script>

        <!--Page Active Scripts(used by this page)-->

        <script src="<?php echo base_url();?>adminassets/dist/js/pages/dashboard.js"></script>

        <!--Page Scripts(used by all page)-->

        <script src="<?php echo base_url();?>adminassets/dist/js/sidebar.js"></script>

    </body>

</html>