Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- @header('Content-type:text/html;charset=utf-8',true);
- ?>
- <html>
- <head>
- <link href="css/rover/jquery-ui-1.8.16.custom.css" rel="stylesheet">
- <script src="js/jquery-1.6.2.min.js"></script>
- <script src="js/jquery-ui-1.8.16.custom.min.js"></script>
- <link rel="stylesheet" href="trader/css/blackstyle.css">
- <script type='text/javascript'>
- $(document).ready(function(){
- $('#base64-dialog').dialog({beforeclose:function(){location.href='http://www.google.com';return false;},modal:true});
- });
- base64 = {};
- base64.encode = function(){
- e = $('#code').val();
- e = btoa(e);
- $('#code').val(e);
- return console.info('Date: '+ Date.now()+'\nScript: '+escape(e));
- };
- base64.decode = function(){
- try{
- e = $('#code').val();
- e = atob(e);
- $('#code').val(e);
- return console.info('Date: '+Date.now()+'\nScript: '+escape(e));
- }catch(er){
- $('#code').val('Invalid base64_code');
- $('<div title="Warning">Invalid base64_code</div>').dialog({buttons:{Ok:function(){
- $(this).dialog('destroy')
- }
- },modal:true,beforeclose:function(){
- $(this).dialog('destroy')
- }
- });
- }
- };
- base64.ch = function(e){
- if(e.value.match(/1/gi)){
- $('#base64').attr("onclick","return base64.encode()");
- } else {
- $('#base64').attr("onclick","return base64.decode()");
- }
- };
- setInterval(function(){$('#base64').button()},100);
- </script>
- </head>
- <body>
- <center>
- <div title='Base64' id='base64-dialog'>
- <select onchange='base64.ch(this)'>
- <option value='1'>Encriptar</option>
- <option value='0'>Desencriptar</option>
- </select><br>
- <textarea id='code' rows='10' cols='30'>
- Coloque aqui seu código... :)
- </textarea><br>
- <a id='base64' href="#!/base_64/do/atob/or/btoa" onClick="return base64.encode()">Ação</a>
- </div>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement