Advertisement
rdsedmundo

k3

Oct 31st, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.75 KB | None | 0 0
  1. <?php
  2. session_start();
  3. @header('Content-type:text/html;charset=utf-8',true);
  4. ?>
  5. <html>
  6. <head>
  7. <link href="css/rover/jquery-ui-1.8.16.custom.css" rel="stylesheet">
  8. <script src="js/jquery-1.6.2.min.js"></script>
  9. <script src="js/jquery-ui-1.8.16.custom.min.js"></script>
  10. <link rel="stylesheet" href="trader/css/blackstyle.css">
  11. <script type='text/javascript'>
  12. $(document).ready(function(){
  13.     $('#base64-dialog').dialog({beforeclose:function(){location.href='http://www.google.com';return false;},modal:true});
  14. });
  15. base64 = {};
  16. base64.encode = function(){
  17.     e = $('#code').val();
  18.     e = btoa(e);
  19.     $('#code').val(e);
  20.     return console.info('Date: '+ Date.now()+'\nScript: '+escape(e));
  21. };
  22. base64.decode = function(){
  23.     try{
  24.     e = $('#code').val();
  25.     e = atob(e);
  26.     $('#code').val(e);
  27.     return console.info('Date: '+Date.now()+'\nScript: '+escape(e));
  28.     }catch(er){
  29.      $('#code').val('Invalid base64_code');
  30. $('<div title="Warning">Invalid base64_code</div>').dialog({buttons:{Ok:function(){
  31.     $(this).dialog('destroy')
  32.     }
  33.     },modal:true,beforeclose:function(){
  34.         $(this).dialog('destroy')
  35.         }
  36.         });
  37.     }
  38. };
  39. base64.ch = function(e){
  40.     if(e.value.match(/1/gi)){
  41.      $('#base64').attr("onclick","return base64.encode()");
  42.     } else {
  43.      $('#base64').attr("onclick","return base64.decode()");
  44.     }
  45. };
  46. setInterval(function(){$('#base64').button()},100);
  47. </script>
  48. </head>
  49. <body>
  50. <center>
  51. <div title='Base64' id='base64-dialog'>
  52. <select onchange='base64.ch(this)'>
  53. <option value='1'>Encriptar</option>
  54. <option value='0'>Desencriptar</option>
  55. </select><br>
  56. <textarea id='code' rows='10' cols='30'>
  57. Coloque aqui seu código... :)
  58. </textarea><br>
  59. <a id='base64' href="#!/base_64/do/atob/or/btoa" onClick="return base64.encode()">Ação</a>
  60. </div>
  61. </center>
  62. </body>
  63. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement