Account

<div id="account_result"></div> <script> const urlParams = new URLSearchParams(window.location.search); const email = urlParams.get('email'); const password = urlParams.get('password'); const action = urlParams.get('action'); const session = urlParams.get('session'); const param = urlParams.get('param'); const lang = urlParams.get('lang'); function account() { url=encodeURI("https://emdr.chat/emdr/account.php"); jQuery.ajax({url: url, data: { email: email, password : password, action: action, param: param, session: session, lang:lang} }) .done(function( data ) { if (data.substring(0,3)=='OK:') txt=data.substring(3,data.length) else txt='<font color="red">'+data.replace('Error: ','')+'</font>'; jQuery('#account_result').html(txt); }) } function checkSubmit(e) { if (typeof e !== 'undefined' && e.keyCode === 13) { send(); return false; }; } function checkSession(e) { let txt=''; let session=jQuery('#session').val(); if (session=='') return; const regex=/^[0-9a-z_]{3,20}$/; var result = regex.test(session); if (!result) { txt='<font color="red">'+(lang=='en'?'Session not valid.':'Sitzung nicht korrekt.')+'</font>'; jQuery('#session_result').html(txt); } else { jQuery.ajax({url: "https://emdr.chat/emdr/session.php?session="+session+"&lang="+lang}) .done(function( data ) { if (data=='OK') txt='<font color="green">'+(lang=='en'?'Session is available.':'Sitzung ist verfügbar.')+'</font>'; else txt='<font color="red">'+data.replace('ERROR:','')+'</font>'; jQuery('#session_result').html(txt); }); } } function send() { window.location.href=addLink+jQuery('#session').val(); } jQuery( document ).ready(function() { jQuery('h2').html(lang=='en'?'Account':'Konto'); account(); }); </script>
Powered by atecplugins.com