Added inline TLS capabilities. See #34
Added inline TLS capabilities. See #34

--- a/Resources/main.js
+++ b/Resources/main.js
@@ -931,6 +931,18 @@
  * as it means a longer request.
  * 
  */
+
+
+function inlineDeCrypt(){
+ var i, eles = document.getElementsByClassName('inlineTLS');
+ 
+ for (i=0;i < eles.length;i++){
+   eles[i].innerHTML = decryptAPIResp(eles[i].innerHTML,retKey());   
+ }  
+  
+}
+
+
 function xorestr(str,key){
     if (!enabledEncryption()){ return str; }
     

--- a/lib/crypto.php
+++ b/lib/crypto.php
@@ -81,6 +81,11 @@
     return $en;
 }
 
+
+
+function inlineEncrypt($string){
+return "<div class='inlineTLS'>".base64_encode($this->xorestring(base64_encode($string),$tlskey = BTMain::getsessVar('tls')))."</div>";
+}
 
 
 /** Xor the provided string to encrypt it

--- a/lib/output.php
+++ b/lib/output.php
@@ -222,7 +222,7 @@
 	    <link rel="stylesheet" type="text/css" href='<?php echo $coreres->resources->resourcespath; ?>/<?php echo $css;?>.css'/>
     <?php endforeach;?>
 
-
+      <style type="text/css">.inlineTLS {display: inline;}</style>
       <script id='kFile' src="Resources/info.php?<?php $frs = BTMain::getSessVar('cacheFrustrate'); echo md5(session_id().$_SERVER['REMOTE_ADDR']).$frs; ?><?php $notif=BTMain::getVar('notif'); if (!empty($notif) && ($notif == 'LoginFailed' || $notif == 'LoggedOut' || $notif == 'InvalidSession')){ echo "&destSession=Y"; BTMain::setSessVar('cacheFrustrate',mt_rand());}?>" type="text/javascript"></script>
 
 
@@ -266,7 +266,7 @@
 
 <!-- Fire the default scripts when the browser reports document ready -->
     <script type="text/javascript">
-    var sesscheck; jQuery(document).ready(function() {  checkKeyAvailable(); <?php if (BTMain::getUser()->name):?>sesscheck = setInterval("checkSession()",120000);<?php endif;?>});
+    var sesscheck; jQuery(document).ready(function() {  checkKeyAvailable(); inlineDeCrypt();<?php if (BTMain::getUser()->name):?>sesscheck = setInterval("checkSession()",120000);<?php endif;?>});
     </script>
 
 <?php