Sindbad~EG File Manager

Current Path : /home/numerotech/mcinfo.numerotech.com/mc_info_update/
Upload File :
Current File : //home/numerotech/mcinfo.numerotech.com/mc_info_update/2912021.txt

 <form>    
    <div class="container form-inline">
 <div class="container row">
    <input type="text" class="form-control id" id="id" placeholder="Enter id" name="id" value="{{id}}" hidden>


  <div class="col-sm">
    <input type="text" class="form-control name" id="name" placeholder="Enter name" name="name">&nbsp;&nbsp;&nbsp;
  </div>
  <div class="col-sm">
    <input type="text" class="form-control email" id="email" placeholder="Enter email" name="email">&nbsp;&nbsp;&nbsp;
  </div>
  <div class="col-sm">
    <input type="text" class="form-control mobile" id="mobile" placeholder="Enter password" name="mobile" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')">&nbsp;&nbsp;&nbsp;
  </div>
  <div class="col-sm">
    <input type="text" class="form-control password" id="password" placeholder="Enter password" name="password">&nbsp;&nbsp;&nbsp;
  </div>
  <div class="col-sm">
    <button type="submit" class="btn btn-primary" id="btnmytest" name="btnmytest" onclick="ClearFields();" >Save</button>
  </div>
</div>
</div>
  </form>



<!-- {% extends "delegates/base.html" %} 
{% block content %}
{% block bottomscript %}
{% endblock %}
<div>
<form id="registration_form">
   <div id="divmesssage col" style="text-align:center;">
      <h4 class="form-title" style="text-align:center">Add delegate</h4>
      <h3>
         <div id="divmesssage" style="color:skyblue;"></div>
      </h3>
      <h3>
         <div id="divmesssages" style="color:skyblue;"></div>
      </h3>
      <h3>
         <div id="checkmail" style="color:skyblue;"></div>
      </h3>
      <h3>
         <div id="checkmobile" style="color:skyblue;"></div>
      </h3>
      <h3>
         <div id="update" style="color:skyblue;"></div>
      </h3>
      <br>
      <div class="container form-inline" style="align:center">
           <div class="row">
            <input type="text" class="form-control id" id="id" placeholder="Enter id" name="id" value="{{id}}" hidden>
            <div class="col-sm">
               <input type="text" class="form-control name" id="name" placeholder="Enter name" name="name">&nbsp;&nbsp;&nbsp;
            </div>
            <div class="col-sm">
               <input type="text" class="form-control email" id="email" placeholder="Enter email" name="email">&nbsp;&nbsp;&nbsp;
            </div>
            <div class="col-sm">
               <input type="text" class="form-control mobile" id="mobile" placeholder="Enter mobile" name="mobile" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')">&nbsp;&nbsp;&nbsp;
            </div>
            <div class="col-sm">
               <input type="text" class="form-control password" id="password" placeholder="Enter password" name="password">&nbsp;&nbsp;&nbsp;
            </div>
            <div class="col">
               <input type="button" class="btn btn-primary " id="btnmytest" name="btnmytest" onclick="ClearFields();" value="Save" >
                <input type="reset" name="reset_btn" id="reset_btn" class="btn btn-primary" value="Clear">
            </div>
         </div>
      </div>
   </div>
</form>
</div>
<div class="container  form-inline" >
<form method="POST" action="{{ url_for('delegate.DownloadReport')}}">
      <input type="button" id="button" value="Filter"  class="btn btn-primary"/>
      <div class="container" id="display" style="display:none;">
         <br>
         <div class="row">
            <input type="text" class="form-control id" id="id" placeholder="Enter id" name="id" value="{{id}}" hidden>
            <div class="col-sm">
               <input type="text" class="form-control serach_name" id="serach_name" placeholder="Enter name" name="serach_name">&nbsp;
            </div>
            <div class="col-sm">
               <input type="text" class="form-control emails" id="emails" placeholder="Enter email" name="emails">&nbsp;&nbsp;&nbsp;
            </div>
            <div class="col-sm">
               <input type="text" class="form-control mobiles" id="mobiles" placeholder="Enter mobile" name="mobiles" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')">&nbsp;&nbsp;&nbsp;
            </div>

            <div class="col">
               <input type="button" class="btn btn-primary filter" id="filter" value="Apply Filter"> 
               <input type="submit" class="btn btn-primary export" name="export" id="export"  value="export">

            </div>
         </div>
      </div>
</form>
 </div>
<div id="divShowTable">
</div>
<script type="text/javascript">
   var BaseUrl = document.location.origin
   
   $(document).ready(function(){
     $("#button").click(function(){
              $("#display").toggle();
            });
   
   
   
    $('#container').hide()
        $("#filter").click(function(){
        $("#container").toggle();
        })
   getdata();
      $("#btnmytest").click(function(e){ 
       e.preventDefault()
      var id = $("#id").val();         
      var name = $("#name").val();
      var email = $("#email").val();
      var mobile = $("#mobile").val();
      var password = $("#password").val();
         validate_register_form();
      if (name==null || name=="",email==null || email=="",mobile==null || mobile=="",password==null || password=="" )
   {
      $("#divmesssages").html("Please Fill All Required Field")
                      window.setTimeout(function () { 
                               $("#divmesssages").fadeTo(2000, 500).slideUp(500, function() {
                               $("#divmesssages").slideUp(500);
   
                       })})
   
   
      return false;
   }
   else{
   
   
            
       if (id==''){
   
                      $.ajax({
                type: 'POST', // <-- get method of form
                url: BaseUrl+"/delegate_add_ajax", // <-- get action of form
                data: {'name':name,'email':email,'mobile':mobile,'password':password}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
                dataType: 'json',
                success: function(data){
                  if(data.status == 1)
                  {
                      //alert(data);
                      
                      ClearFields();
                      $("#divmesssage").html(data.msg)
                      window.setTimeout(function () { 
                               $("#divmesssage").fadeTo(2000, 500).slideUp(500, function() {
                               $("#divmesssage").slideUp(500);
   
                       })})
   
   
                   }
                   else if (data.status == 2){
   
                   $("#checkmail").text("Email Already Exists.")
                      window.setTimeout(function () { 
                               $("#checkmail").fadeTo(2000, 500).slideUp(500, function() {
                               $("#checkmail").slideUp(500);
                               
                       })})
   
                   }
                   else
                   {
                       
                       $("#checkmobile").text("Mobile Number Already Exists.")
                      window.setTimeout(function () { 
                               $("#checkmobile").fadeTo(2000, 500).slideUp(500, function() {
                               $("#checkmobile").slideUp(500);
                               
                       })})
   
                         
                  }
                      
                     
                   getdata(); 
              }
   
   })
   
   
       }
       
   
       else
       {
           var update = $(this).val();
             $.ajax({
                type: 'POST', // <-- get method of form
                url: BaseUrl+"/post_edit", // <-- get action of form
                data: {'id':id,'name':name,'email':email,'mobile':mobile,'password':password}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
                dataType: 'json',
               success: function(data){
                  if(data.status == 1)
                  {
                      //alert(data);
                      ClearFields();
                          $("#update").html(data.update)
                      window.setTimeout(function () { 
                               $("#update").fadeTo(2000, 500).slideUp(500, function() {
                               $("#update").slideUp(500);
   
                       })})
               
                      getdata();
                      
                  }
              }
                                      
              })
       }
   
      return false;
   
   }
   
   });      
       
        
       $(".filter").click(function(e){
   var serach_name = $("#serach_name").val();
      var emails = $("#emails").val();
      var mobiles = $("#mobiles").val();
            //alert(mobiles);
     e.preventDefault()
   
       if (name!=null){
   
   $.ajax({
                type: 'POST', // <-- get method of form
                url: BaseUrl+"/get_filter", // <-- get action of form
                data: {'serach_name':serach_name,'emails':emails,'mobiles':mobiles}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
                dataType: 'html',
                success: function(data){
   
                   $("#divShowTable").html(data)
              },
                                      
              })
       }
   //        else if (email!=''){
   //
   //   $.ajax({
   //                 type: 'POST', // <-- get method of form
   //                 url: BaseUrl+"/get_email_filter", // <-- get action of form
   //                 data: {'email':email}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
   //                 dataType: 'json',
   //                 success: function(data){
   //                     if(data.status == 1)
   //                   {
   //                       getemail();
   //
   //
   //                    }
   //                        
   //                   },
   //                                       
   //               })
   //        }
   //        else{
   //
   //   $.ajax({
   //                 type: 'POST', // <-- get method of form
   //                 url: BaseUrl+"/get_mobile_filter", // <-- get action of form
   //                 data: {'mobile':mobile}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
   //                 dataType: 'json',
   //                 success: function(data){
   //                        getmobile();
   //                   },
   //                                       
   //               })
   //        }
   //    
                 }); 
   
   //         $(".export").click(function (e) {
   //    var serach_name = $("#serach_name").val();
   //       var emails = $("#emails").val();
   //       var mobiles = $("#mobiles").val();
   //      e.preventDefault()
   //                
   //           $.ajax({
   //               type: 'post', // <-- get method of form
   //               url: BaseUrl+"/download_report", // <-- get action of form
   //               data: {'serach_name':serach_name,'emails':emails,'mobiles':mobiles}, // <-- serialize all fields into a string that is ready to be //posted to your PHP file//
   //               dataType: 'json',//
   //               success: function// (Response) {//
   //                   dataPlot = JS//ON.parse(Response);//
   //                console.log(data//Plot);//
   //
   //                       
   //                   
   //               }
   //           });
   //          
   //       });
   
   
   
   
   function getname() {
   $.ajax({
   
                    type: 'GET', // <-- get method of form
                    url: BaseUrl+"/name_filter", // <-- get action of form
                    data:{}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
                    dataType: 'html',
                    success: function(data){
                      //alert(data)
                      console.log(data)
                      $("#divShowTable").html(data)
                      },
                      error: function(XMLHttpRequest, textStatus, errorThrown) { 
                        //location.reload();  
                      }                      
                  });   
   }
   
   
   
   function getdata() {
   $.ajax({
                    type: 'GET', // <-- get method of form
                    url: BaseUrl+"/getdata", // <-- get action of form
                    data:{}, // <-- serialize all fields into a string that is ready to be posted to your PHP file
                    dataType: 'html',
                    success: function(data){
                      //alert(data)
                      $("#divShowTable").html(data)
                      },
                      error: function(XMLHttpRequest, textStatus, errorThrown) { 
                        //location.reload();  
                      }                      
                  });   
   }
   
   function ClearFields() {
   
    document.getElementById("name").value = "";
    document.getElementById("email").value = "";
    document.getElementById("mobile").value = "";
    document.getElementById("password").value = "";
   
   }
   
   
   function validate_register_form()
        {
        
            errorclass : 'error',
        
            $("#registration_form").validate({
               
                rules : {
                     name : {
                        required:true,
                        lettersonly: true 
                    },
                    
   
                    email : {
                        required : true,
                        email : true
                    },
                    mobile : {
                        required : true,
                        minlength : 1,
                        maxlength : 10
                    },
                    password : "required"
                },
        
                messages : {
                    name : "Please enter the Name",
                    email_id : {
                        required : "Please enter the Email id",
                        email : "Please enter valid Email Id"
                    },
                    mobile : {
                        required : "Please enter Mobile number",
                        maxlength : "Mobile number 10 digits only"
                    },
                    password : "Please enter the Password"
   
                },
    
                 submitHandler: function(form) {
                    form.submit();
                }
                
            })
               
        }
        function onlyLetter(input){
   $(input).keypress(function(ev) {
   var keyCode = window.event ? ev.keyCode : ev.which;
   //  code
   
   });
   }
   
   });
</script>
<script type="text/javascript">window.setTimeout("document.getElementById('divmesssage').style.display='none';", 6000); </script>
{% endblock %}

-->

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists