Needs Finishing: Tweaks to new Resources plugin types and implementation on output
Needs Finishing: Tweaks to new Resources plugin types and implementation on output

--- a/Install/index.php
+++ b/Install/index.php
@@ -416,12 +416,17 @@
 $str = "<?php\n/** System Configuration\n*\n* Copyright (C) 2012 B Tasker\n* Released under GNU GPL V2\n* See LICENSE\n*\n*/\ndefined('_CREDLOCK') or die;\n\n";
 
 fwrite($fh,$str);
-foreach ($_POST as $key=>$value){
-
-$str = "\$conf->$key = '$value';\n";
-fwrite($fh,$str);
-
-}
+  foreach ($_POST as $key=>$value){
+
+      if ($value == 'true' || $value == 'false'){
+	$val = $value;
+      }else{
+	$val = "'$value'";
+      }
+
+    $str = "\$conf->$key = $val;\n";
+    fwrite($fh,$str);
+  }
 
 fwrite($fh,"\n\n?>");
 fclose($fh);
@@ -445,11 +450,6 @@
 }else{
 echo "<div class='alert alert-error'>Could not Obfuscate Plugin path, you will need to do this manually</div>";
 }
-
-
-
-
-
 
 
 
@@ -599,6 +599,7 @@
 <input type="hidden" name="stage" value="3">
 <input type="hidden" name="template" value="EstDeus">
 <input type="hidden" name="JSMinName" value=".min">
+<input type="hidden" name="forceSSL" value="false">
 
 <table>
 <tr>

--- a/Resources/Entropy.css
+++ b/Resources/Entropy.css
@@ -1,3 +1,3 @@
 .EntropyDiv {width: 100%; height: 400px; border-radius: 5px; border: 1px black solid; background: red; margin-bottom: 20px;}
 .EntropyGenerated {border: 1px green solid; background: green;} 
-
+.EntropyDivClicking {background: white;}

--- /dev/null
+++ b/Resources/Entropy.min.css
@@ -1,1 +1,1 @@
-
+.EntropyDiv{width:100%;height:400px;border-radius:5px;border:1px black solid;background:red;margin-bottom:20px}.EntropyGenerated{border:1px green solid;background:green}.EntropyDivClicking{background:white}

--- a/Resources/info.php
+++ b/Resources/info.php
@@ -53,12 +53,12 @@
 
 
 
-// We only to do key generation if  we're not on a SSL connection
-if (!BTMain::getConnTypeSSL()):
+// We only to do key generation if  we're not on a SSL connection or if the system is configured to force use
+if (!BTMain::getConnTypeSSL() || BTMain::getConf()->forceTLS){
 
 
 // If the key is still valid and we know the browser has already retrieved it, just tell the browser to use the cache
-if  ((time() < $expiry) && ($_COOKIE['PHPCredLockerKeySet'] == 1) && ($expiry) && (!empty($tls))){
+if  ((BTMain::getVar('forceload') != 'y') && (time() < $expiry) && ($_COOKIE['PHPCredLockerKeySet'] == 1) && ($expiry) && (!empty($tls))){
 header("HTTP/1.1 304 Not Modified");
 die;
 }
@@ -137,7 +137,7 @@
 
 
 
-else:
+}else{
 // We don't need to generate keys as we're on a SSL connection
 
      foreach ($apiterms as $value){
@@ -160,8 +160,7 @@
     header("Pragma: cache");
     header("Cache-Control: Private, max-age=$seconds_to_cache");
 
-
-endif;
+}
 
 
 

--- a/Resources/main.js
+++ b/Resources/main.js
@@ -97,7 +97,7 @@
   {
      clearInterval(counter);
      
-     field.innerHTML = 'Display Password';
+     field.innerHTML = 'Display<span class="DisPwdText"> Password</span>';
      document.getElementById('Address'+id).innerHTML = '';
      document.getElementById('UserName'+id).innerHTML = '';
      document.getElementById('Password'+id).innerHTML = '';
@@ -511,7 +511,7 @@
   {
 if (xmlhttp.readyState==4 && xmlhttp.status==200)
     {
-    resp = decryptAPIResp(xmlhttp.responseText,key).split(getDivider());
+    resp = xmlhttp.responseText.split(getDivider());
     // Check for an invalid verb response
     if (resp[1] == 2){
      return unknownAPICommand(); 
@@ -519,7 +519,8 @@
     
     if (resp[1] == 0){
      // Session Invalid
-     
+    removeCurrKey(0);
+    
     cookies = document.cookie.split(";");
    
     for (var i = 0; i < cookies.length; i++){
@@ -772,8 +773,19 @@
 		   }
 		   
 		    if (table.rows[r].cells[6]){
+		     
+		      
+		     add = table.rows[r].cells[6].innerHTML.split("=");
+		      
+		     res.setAttribute('entid2',add[0]);
+		     res.setAttribute('entid2val',add[1]);
 		      
 		     add = "&"+ table.rows[r].cells[6].innerHTML;
+		     
+		     
+		     
+		     
+		     
 		    }else{
 		     add = ''; 
 		    }
@@ -839,6 +851,8 @@
   document.getElementById('SrchOpt').value = SearchResult.getAttribute('link');
   document.getElementById('SrchID').name = SearchResult.getAttribute('frmName');
   document.getElementById('SrchID').value = SearchResult.getAttribute('entID');
+  document.getElementById('SrchID2').name = SearchResult.getAttribute('entid2');
+  document.getElementById('SrchID2').value = SearchResult.getAttribute('entid2val');
   document.getElementById('SearchBox').focus();
  
 }
@@ -959,16 +973,7 @@
 function unknownAPICommand(){
  // The API reports that the verb used wasn't recognised. We need to refresh the key file  
   
-  var sess,sessid,parent,frm,notify;
-  
- 
-  
-  
-  
-  sess = document.getElementById("kFile");
-  sessid = sess.getAttribute('src');
-  parent = sess.parentNode;
-  notify = document.getElementById('NotificationArea')
+  var notify = document.getElementById('NotificationArea');
   
  clearInterval(sesscheck);
  
@@ -985,25 +990,37 @@
   notify.innerHTML = "<div id='apiError' class='alert alert-info'>Attempting to rectify API issue. Window will refresh when ready</div>";
  
   destroyKeys();
+  removeCurrKey(1);
+  
+}
+
+
+
+function removeCurrKey(n){
+  
+  var frm,
+  sess = document.getElementById("kFile"),
+  sessid = sess.getAttribute('src'),
+  parent = sess.parentNode;
+  
   parent.removeChild(sess);
   
   // We need to delete the cookie, but can't do that from the current location
   frm = document.createElement('iframe');
   frm.setAttribute('id','kfile');
-  frm.setAttribute('src',sessid);
+  frm.setAttribute('src',sessid+'&forceload=y');
   frm.style.width = '0px';
   frm.style.height = '0px';
   frm.style.border = '0px';
   document.body.appendChild(frm);
   // Wait 500 milliseconds so we can be sure it's loaded
-  interval = setInterval("reloadKeyf('"+sessid+"')",500);
-  
- 
-}
-
-
-
-function reloadKeyf(sessid){
+  interval = setInterval("reloadKeyf('"+sessid+"',"+n+")",500);
+  
+}
+
+
+
+function reloadKeyf(sessid,n){
   var frm, date, notify;
   
   clearInterval(interval);
@@ -1018,12 +1035,13 @@
   frm.setAttribute('id','kFile');
   
   // Append a string to ensure the browser doesn't use the cache.
-  frm.setAttribute('src',sessid+date.getTime());
+  frm.setAttribute('src',sessid+'&forceload=y'+'&rand='+date.getTime());
   
   document.getElementsByTagName("head")[0].appendChild(frm);
   
  
-  if (window.getKey != ''){
+  if (window.getKey != '' && n == 1){
+    
     notify = document.getElementById('apiError');
     notify.parentNode.removeChild(notify);
     
@@ -1102,7 +1120,7 @@
   
  if(typeof getKey != 'function') {
    
-   if (confirm("Key retrieval failed - Attempting to rectify, Click OK to continue - Screen will refresh")){
+   if (confirm("Key retrieval failed - Attempting to rectify, Click OK to continue - Screen may refresh")){
    
    var i,
 	cookies = document.cookie.split(";");
@@ -1111,7 +1129,15 @@
     KillCookie(cookies[i].split("=")[0]);
     }
    
-   window.location.href = location.reload();
+   removeCurrKey();
+   
+    if(typeof getKey == 'function') {
+      alert("Keys retrieved successfully");
+      return true;
+      
+    }
+   
+   window.location.reload(true);
   return false; 
   }
  }

--- /dev/null
+++ b/Resources/main.min.js
@@ -1,1 +1,14 @@
+/* ************************************************************
+Author:  Ben Tasker - BenTasker.co.uk
+Description: Main Javascript functions for PHPCredLocker. Most 
+  functions currently quick and dirty, will improve in future releases!
 
+License: GNU GPL V2 -  See http://www.gnu.org/licenses/gpl-2.0.html
+
+Repo: https://github.com/bentasker/PHPCredLocker/
+---------------------------------------------------------------
+Copyright (c) 2012 Ben Tasker
+
+*/
+
+var counter=false,cancel="",dispcred,interval;function genPwd(c,b){var e,f="",d="(=?)+.,abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(e=0;e<b;e++){f+=d.charAt(Math.floor(Math.random()*d.length))}if(c=="r"){return f}document.getElementById(c).value=f}function resizebkgrnd(){var width=document.documentElement.clientHeight,height=width,img;img=document.getElementById("ContentWrap");img.style.minHeight=eval(height*0.8)+"px"}function CreateMenuContent(b,i,f,j,e,k){var g,d,m,h,c=0,b=document.getElementById(b),l=document.getElementById(f);if(!l){return false}for(var a=0;a<l.rows.length;a++){if(c==e){break}d=l.rows[a].cells[3].innerHTML;if(d==i){m=document.createElement("li");m.id=k+l.rows[a].cells[2].innerHTML;m.innerHTML="<a href='index.php?option="+l.rows[a].cells[5].innerHTML+"&id="+l.rows[a].cells[2].innerHTML+"'>"+l.rows[a].cells[j].innerHTML+"</a>";b.appendChild(m);c=c+1}}}function Credtimer(d){var b,a=document.getElementById("PassCount"+d),c=document.getElementById("retrievePassword"+d);b=a.value-1;a.value=b;if(b<=0||cancel==1){clearInterval(counter);c.innerHTML="Display Password";document.getElementById("Address"+d).innerHTML="";document.getElementById("UserName"+d).innerHTML="";document.getElementById("Password"+d).innerHTML="";document.getElementById("CredPluginOutput"+d).innerHTML="";document.getElementById("clickCount"+d).value=0;return}c.innerHTML="Displaying Password for "+b+" seconds"}function noCredTypes(){$(document).ready(function(){var a;if(document.getElementById("AddCredBtnTop")){a=document.getElementById("AddCredBtnTop");a.parentNode.removeChild(a)}if(document.getElementById("AddCredBtnBottom")){a=document.getElementById("AddCredBtnBottom");a.parentNode.removeChild(a)}})}function loginReqProcess(){var c,b="",e=document.getElementById("FrmPassPlace"),d=document.getElementById("FrmPass");if(!enabledEncryption()){d.value=e.value;return true}d.value=Base64.encode(xorestr(e.value,retAuthKey()));for(c=0;c<e.length;c++){b+="a"}e.value=b;return true}function checkNewCust(){var d=document.getElementById("FrmName"),b=document.getElementById("frmGroup"),c=document.getElementById("FrmEmail");if(c.value.indexOf("@")==-1){c.className+=" frmEntryMissed";return false}if(b.options[b.selectedIndex].value=="null"){b.className+=" frmEntryMissed";return false}if(d.value==""){d.className+=" frmEntryMissed";return false}if(enabledEncryption()){var e=document.getElementById("FrmconName"),a=document.getElementById("FrmSurname");d.value=Base64.encode(xorestr(d.value,retKey()));c.value=Base64.encode(xorestr(c.value,retKey()));e.value=Base64.encode(xorestr(e.value,retKey()));a.value=Base64.encode(xorestr(a.value,retKey()))}return true}function checkNewCred(){var c=document.getElementById("frmCredential"),b=document.getElementById("frmUser"),d=document.getElementById("frmAddress"),a=document.getElementById("frmGroup");if(a.options[a.selectedIndex].value=="null"){a.className+=" frmEntryMissed";return false}if(c.value.indexOf("http")!==-1){if(confirm("Click OK to make this credential a hyperlink in the database, click cancel to set not clicky")){document.getElementById("frmClicky").value=1}}if(enabledEncryption()){c.value=Base64.encode(xorestr(c.value,retKey()));b.value=Base64.encode(xorestr(b.value,retKey()));d.value=Base64.encode(xorestr(d.value,retKey()))}return true}function checkEditCred(){var c=document.getElementById("frmCredential"),b=document.getElementById("frmUser"),d=document.getElementById("frmAddress"),a=document.getElementById("frmGroup");if(a.options[a.selectedIndex].value=="null"){a.className+=" frmEntryMissed";return false}if(c.value.indexOf("http")!==-1){if(confirm("Click OK to make this credential a hyperlink in the database, click cancel to set not clicky")){document.getElementById("frmClicky").value=1}}if(c.value==null||c.value==""){c.value=" "}if(b.value==null||b.value==""){b.value=" "}if(d.value==null||d.value==""){d.value=" "}if(enabledEncryption()){c.value=Base64.encode(xorestr(c.value,retKey()));b.value=Base64.encode(xorestr(b.value,retKey()));d.value=Base64.encode(xorestr(d.value,retKey()))}return true}function checkChngPwds(){if(!comparePwds()){return false}if(!enabledEncryption()){return true}var a=document.getElementById("frmPass"),b=document.getElementById("frmPassConf");a.value=Base64.encode(xorestr(a.value,retKey()));b.value=Base64.encode(xorestr(b.value,retKey()));return true}function comparePwds(){var f,g,d,c=document.getElementById("frmPass"),b=document.getElementById("PassNoMatch"),e=document.getElementById("passScore"),a=document.getElementById("minpassStrength");if(a){f=a.value;if(f.indexOf("+")>=0){if(parseInt(passScore.value)>45){g=true}else{g=false}}else{d=f.split("-");if((parseInt(passScore.value)>d[0])){g=true}else{g=false}}if(!g){b.innerHTML="Password is too weak";b.style.display="inline-block";return false}}if(c.value!=document.getElementById("frmPassConf").value){b.innerHTML="Passwords don't match";b.style.display="inline-block";return false}if(c.value==null||c.value==""){document.getElementById("PassNoMatch").innerHTML="You must set a password";b.style.display="inline-block";return false}b.style.display="none";return true}function getCreds(a){var b,e,f,d,i,g,k=document.getElementById("retrievePassword"+a),h=document.getElementById("Address"+a),l=document.getElementById("UserName"+a),c=document.getElementById("Password"+a),n=document.getElementById("CredPluginOutput"+a),m=retKey(),j=document.getElementById("clickCount"+a);if(j.value!=0){return}j.value=1;k.innerHTML="<i>Retrieving.....</i>";if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{b=new ActiveXObject("Microsoft.XMLHTTP")}b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){e=decryptAPIResp(b.responseText,m).split(getDivider());if(e[1]==2){return unknownAPICommand()}if(e[1]==0){k.innerHTML="Failed to retrieve credentials. Click to try again";return false}f=document.getElementById("defaultInterval").value;d=document.getElementById("PassCount"+a);d.value=f;i=f;h.innerHTML=e[3];c.innerHTML=e[2];l.innerHTML=e[4];n.innerHTML=e[5];k.innerHTML="Displaying Password for "+i+" seconds";if(counter){cancel=1;document.getElementById("clickCount"+dispcred).value=0;dispcred=a;setTimeout(function(){cancel=false;counter=setInterval("Credtimer('"+a+"')",1000)},1000);return}dispcred=a;counter=setInterval("Credtimer('"+a+"')",1000)}};g=cryptReq("retCred");b.open("POST","api.php",true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.send("option="+g+"&id="+a)}function checkSession(){var b,e,d,c,a=retKey();if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{b=new ActiveXObject("Microsoft.XMLHTTP")}b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){e=decryptAPIResp(b.responseText,a).split(getDivider());if(e[1]==2){return unknownAPICommand()}if(e[1]==0){d=document.cookie.split(";");for(var f=0;f<d.length;f++){KillCookie(d[f].split("=")[0])}window.location.href="index.php?notif=InvalidSession";return false}}};c=cryptReq("checkSess");b.open("POST","api.php",true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.send("option="+c+"&id="+Math.floor((Math.random()*100)+1))}function DelCust(h){var c,f,g,b,d,a=retKey();if(!confirm("Are you sure you want to delete this customer and all associated credentials?")){return false}g=document.getElementById("CustDisp"+h);b=document.getElementById("NotificationArea");if(document.getElementById("Custmenu"+h)){var e=document.getElementById("Custmenu"+h)}if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{c=new ActiveXObject("Microsoft.XMLHTTP")}c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){f=decryptAPIResp(c.responseText,a).split(getDivider());if(f[1]==2){return unknownAPICommand()}if(f[1]==0||f[2]==0){b.innerHTML+='<div class="alert alert-error">Failed to Delete</div>';return false}g.parentNode.removeChild(g);b.innerHTML+='<div class="alert alert-success">Customer and all associated credentials Deleted</div>';if(e){e.parentNode.removeChild(e)}}};d=cryptReq("delCust");c.open("POST","api.php",true);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.send("option="+d+"&id="+h)}function DelCred(g){var c,e,f,b,d,a=retKey();if(!confirm("Are you sure you want to delete this credential?")){return false}f=document.getElementById("CredDisp"+g);b=document.getElementById("NotificationArea");if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{c=new ActiveXObject("Microsoft.XMLHTTP")}c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){e=decryptAPIResp(c.responseText,a).split(getDivider());if(e[1]==2){return unknownAPICommand()}if(e[1]==0||e[2]==0){b.innerHTML+='<div class="alert alert-error">Failed to Delete</div>';return false}f.parentNode.removeChild(f);b.innerHTML+='<div class="alert alert-success">Credential Deleted</div>'}};d=cryptReq("delCred");c.open("POST","api.php",true);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.send("option="+d+"&id="+g)}function positionResults(SearchBox,ResBox){var search=document.getElementById(SearchBox),res=document.getElementById(ResBox);res.style.left=search.offsetLeft+"px";res.style.top=eval(search.offsetTop+search.offsetHeight+6)+"px";res.style.width=search.offsetWidth+"px"}function SearchTable(c,f,d,k,i){var l,g,o,j,h=0,b,p,n,a,m=0;if(window.event){m=window.event.keyCode}else{if(i.which){m=i.which}}if(m===38){selectResult("up");return}if(m===40){selectResult("down");return}l=document.getElementById(d);l.innerHTML="";if(c.length<3){return}document.getElementById("SelectedValue").value=0;positionResults("SearchBox",d);g=c.toLowerCase();o=document.getElementById(f);for(a=0;a<o.rows.length;a++){p=o.rows[a].cells[k].innerHTML.replace(/<[^>]+>/g,"");if((p.toLowerCase().indexOf(g)>=0)||((g.indexOf(":")>=0)&&(o.rows[a].cells[1].innerHTML.toLowerCase().indexOf(g)>=0))){h=h+1;j=document.createElement("div");j.id="SearchResult"+h;j.className="SearchResult";j.setAttribute("link",o.rows[a].cells[5].innerHTML);j.setAttribute("entID",o.rows[a].cells[2].innerHTML);if(o.rows[a].cells[4].innerHTML!=null&&o.rows[a].cells[4].innerHTML!=""){b=o.rows[a].cells[4].innerHTML}else{b="id"}if(o.rows[a].cells[6]){n="&"+o.rows[a].cells[6].innerHTML}else{n=""}j.setAttribute("onclick","window.location.href = 'index.php?option="+o.rows[a].cells[5].innerHTML+"&"+b+"="+o.rows[a].cells[2].innerHTML+n+"';");j.setAttribute("frmName",b);j.innerHTML=o.rows[a].cells[1].innerHTML+" "+o.rows[a].cells[k].innerHTML;l.appendChild(j);l.style.display="block"}}}function selectResult(dir){var ind,SearchResult,SelIndex=document.getElementById("SelectedValue"),SearchLength=document.getElementById("SearchResBox").childNodes.length;if(dir=="down"){if(SelIndex.value!=0){document.getElementById("SearchResult"+parseInt(SelIndex.value)).className="SearchResult"}if(SearchLength==SelIndex.value){SelIndex.value=0}ind=eval(parseInt(SelIndex.value)+1)}else{document.getElementById("SearchResult"+parseInt(SelIndex.value)).className="SearchResult";if(SelIndex.value==1){ind=SearchLength}else{ind=eval(parseInt(SelIndex.value)-1)}}SearchResult=document.getElementById("SearchResult"+ind);SearchResult.className="SearchResult SearchResultActive";SelIndex.value=ind;document.getElementById("SrchOpt").value=SearchResult.getAttribute("link");document.getElementById("SrchID").name=SearchResult.getAttribute("frmName");document.getElementById("SrchID").value=SearchResult.getAttribute("entID");document.getElementById("SearchBox").focus()}function hideSearchDiv(a){var b=document.getElementById(a);for(opacity=10;opacity>0;opacity--){b.style.opacity="0."+opacity}b.style.display="none";b.style.opacity="1"}function checkExistingSearch(a,b){if(a.length>3){document.getElementById(b).style.display="block"}}function setUpMenus(){jQuery(document).ready(function(){if(!document.getElementById("SearchListing")){return}var b,a;CreateMenuContent("TypeDropDownMenu",2,"SearchListing",0,100,"TypeMenu");CreateMenuContent("CustDropDownMenu",1,"SearchListing",0,5,"Custmenu");b=document.getElementById("CustDropDownMenu");a=document.createElement("li");a.className="divider";b.appendChild(a);a=document.createElement("li");a.className="viewAll";a.innerHTML="<a href='index.php?option=viewCustomers'>View All</a></li>";b.appendChild(a)})}function xorestr(j,g){if(!enabledEncryption()){return j}var d,c,e="",h=0;for(var f=0;f<j.length;f++){d=j.charCodeAt(f);c=d^g.charCodeAt(h);e+=c.toString()+" ";h++;if(h>=g.length){h=0}}return e}function xordstr(j,g){if(!enabledEncryption()){return j}var d,c,e="",h=0,j=j.split(" ");for(var f=0;f<j.length;f++){if(j[f].length==0){continue}d=j[f];c=d^g.charCodeAt(h);e+=String.fromCharCode(c);h++;if(h>=g.length){h=0}}return e}function unknownAPICommand(){var a,d,c,e,b;a=document.getElementById("kFile");d=a.getAttribute("src");c=a.parentNode;b=document.getElementById("NotificationArea");clearInterval(sesscheck);b.innerHTML+="<div id='apiError' class='alert alert-error'>API Error Detected</div>";if(!enabledEncryption()){return}if(!confirm("The API reported an error, attempting to rectify. Click OK to try and rectify")){return}b.removeChild(document.getElementById("apiError"));b.innerHTML="<div id='apiError' class='alert alert-info'>Attempting to rectify API issue. Window will refresh when ready</div>";destroyKeys();c.removeChild(a);e=document.createElement("iframe");e.setAttribute("id","kfile");e.setAttribute("src",d);e.style.width="0px";e.style.height="0px";e.style.border="0px";document.body.appendChild(e);interval=setInterval("reloadKeyf('"+d+"')",500)}function reloadKeyf(c){var d,a,b;clearInterval(interval);d=document.getElementById("kfile");d.contentWindow.document.cookie="PHPCredLockerKeySet=0;";d.parentNode.removeChild(d);a=new Date();d=document.createElement("script");d.setAttribute("id","kFile");d.setAttribute("src",c+a.getTime());document.getElementsByTagName("head")[0].appendChild(d);if(window.getKey!=""){b=document.getElementById("apiError");b.parentNode.removeChild(b);sesscheck=setInterval("checkSession()",120000)}}function decryptAPIResp(b,a){if(!enabledEncryption()){return b}return Base64.decode(xordstr(Base64.decode(b),a))}function getDivider(){return getDelimiter()}function getTerms(b){return Base64.decode(getTerminology(b))}function cryptReq(c){var a,b=retKey(),d=getDivider();a=genPadding()+d+getTerms(c)+d+genPadding();if(!enabledEncryption()){return a}return encodeURIComponent(Base64.encode(xorestr(Base64.encode(a),b)))}function genPadding(){if(!enabledEncryption()){return"a"}var d,e,b="";e=Math.random().toString(10).substring(2,3);for(d=0;d<e;d++){b+=Math.random().toString(10).substring(Math.random().toString(10).substring(2,3))}return b}function retAuthKey(){return Base64.decode(getAuthKey())}function retKey(){return Base64.decode(getKey())}function checkKeyAvailable(){if(typeof getKey!="function"){if(confirm("Key retrieval failed - Attempting to rectify, Click OK to continue - Screen will refresh")){var a,b=document.cookie.split(";");for(a=0;a<b.length;a++){KillCookie(b[a].split("=")[0])}window.location.href=location.reload();return false}}return true}function KillCookie(a){createCookie(a,"",-1)}function createCookie(d,e,b){var a,c;if(b){c=new Date();c.setTime(c.getTime()+(b*24*60*60*1000));a="; expires="+c.toGMTString()}else{a=""}document.cookie=d+"="+e+a+"; path=/"};

--- a/conf/notifications.php
+++ b/conf/notifications.php
@@ -6,6 +6,15 @@
 * See LICENSE
 *
 */
+
+$notifs->HomePageTextNotLoggedIn->className = 'HomePgText';
+$notifs->HomePageTextNotLoggedIn->text = 'You must log in to use this system';
+
+
+$notifs->HomePageTextLoggedIn->className = 'HomePgText';
+$notifs->HomePageTextLoggedIn->text = 'Welcome to PHPCredLocker, please use the menus to proceed';
+
+
 
 $notifs->addCustSuccess->className = 'alert alert-success';
 $notifs->addCustSuccess->text = 'Customer added successfully';

--- a/conf/plugins.php
+++ b/conf/plugins.php
@@ -17,6 +17,7 @@
 $plugins->Creds = array('AutoAuth');
 $plugins->CredTypes = array('AutoAuth');
 $plugins->Cron = array();
+$plugins->Resources = array('ExternalResources');
 
 
 

--- /dev/null
+++ b/conf/plugins/ExternalResources/config.php
@@ -1,1 +1,20 @@
+<?php
+/** ExternalResources plugin Config
+*
+* Copyright (C) 2012 B Tasker
+* Released under GNU GPL V2
+* See LICENSE
+*
+*/
+defined('_CREDLOCK') or die;
 
+// Set this to false to disable the plugin
+$this->active = false;
+
+
+// URL to prefix resources with (don't include a trailing slash)
+$this->url = "";
+
+
+?> 
+

--- /dev/null
+++ b/conf/plugins/ExternalResources/index.html
@@ -1,1 +1,2 @@
+ 
 

--- a/lib/API.php
+++ b/lib/API.php
@@ -17,7 +17,7 @@
 require_once 'lib/crypto.php';
 
 $plg = new Plugins;
-
+$crypt = new Crypto;
 
 /**
  Implemented so that we can treat the divider as a key and reduce the likelihood/effectiveness 
@@ -50,7 +50,7 @@
 
 $option = BTMain::getVar('option');
 
-$crypt = new Crypto;
+
 
 
 	if (!BTMain::getConnTypeSSL()){
@@ -108,7 +108,9 @@
 
 
 case 'checkSess':
-    echo "OK";
+    ob_end_clean();
+    echo BTMain::getip().$opDivider."1".$opDivider."OK".$opDivider;
+    die;
     break;
 
 

--- a/lib/includes/gatherEntropy.php
+++ b/lib/includes/gatherEntropy.php
@@ -87,9 +87,7 @@
 <script type="text/javascript">
 var count=15;
 document.getElementById('ClickDiv').onclick=function(e){ var c = whereAt(e), b=document.getElementById('EntropylastClick');if (c == b.value){ return; } b.value=c; document.getElementById('content').value += c; count=count-1; document.getElementById('countsremaining').value = count; if(count == 0){document.getElementById('ClickDiv').className = 'EntropyDiv EntropyGenerated';}};
-
 $('#EntropyGeneration *').tooltip({track: true, fade: 250});
-
 </script>
 
 <?php

--- a/lib/output.php
+++ b/lib/output.php
@@ -13,26 +13,31 @@
 
 class genOutput{
 
-/** Will be overhauled at some point, will most likely move the actual page content into the template
+/** Ouputs the default content for the homepage. Content can be controlled in the notifications config file
 *
 */
 function genDefaultPage(){
 global $notifications;
 $notifications->setPageTitle("Home");
 
-$str = "<span class='basic-content default-page'>";
-if (BTMain::getUser()->name){
-
-$str .= 'Welcome to the cred handling system. Please use the menus to proceed';
-
-}else{
-
-$str .= 'Please log-in to continue';
-
-
-}
-
-return $str . "</span>\n";
+  if (BTMain::getUser()->name){
+    $notname= 'HomePageTextLoggedIn';
+  }else{
+    $notname= 'HomePageTextNotLoggedIn';
+  }
+
+
+$notif = $notifications->getNotification($notname);
+$str = "<div class='{$notif->className}'";
+
+
+  if (isset($notif->id)){
+      $str .= " id='{$notif->id}'";
+    }
+
+
+
+return $str . $notif->text . "</div>\n";
 
 }
 
@@ -104,8 +109,9 @@
 
 global $notifications;
 $nots = $notifications->getNotifications();
-
-  if ($notifications){
+$str = array();
+
+  if ($nots){
   
       foreach ($nots as $not){
       $id='';
@@ -135,26 +141,65 @@
 global $notifications;
 $page = $notifications->getPageInfo();
 $conf = BTMain::getConf();
+$plg = new Plugins;
+
+
+$coreres->css->jquerytooltip->fname = 'jquery.tooltip';
+$coreres->css->bootstrap->fname = 'bootstrap';
+$coreres->css->bootstrap->path = 'bootstrap/css/';
+$coreres->css->bootstrapresponsive->fname = 'bootstrap-responsive';
+$coreres->css->bootstrapresponsive->path = 'bootstrap/css/';
+
+$coreres->js->jquery->fname = 'jquery';
+$coreres->js->bootstrap->fname = 'bootstrap';
+$coreres->js->bootstrap->path = 'bootstrap/js/';
+$coreres->js->jquerytooltip->fname = 'jquery.tooltip';
+$coreres->js->main->fname = 'main';
+$coreres->js->base64->fname = 'base64';
+
+$coreres->resourcespath = "Resources";
+
+
+// Call any configured plugins
+     $data->resources = $coreres;
+     $data->action = 'loadresource';
+
+       
+    $coreres = $plg->loadPlugins("Resources",$data)->plgOutput;
+    
+
+
+// I'm knackered, quitting while I'm ahead. Will improve/finish later
+$resourcespath = $coreres->resourcespath;
+
+
 ?>
       <title><?php echo $conf->ProgName;?> - <?php echo htmlentities($page->title);?></title>
-      <link rel="stylesheet" type="text/css" href="Resources/jquery.tooltip<?php echo $conf->JSMinName;?>.css" />
-      <link rel="stylesheet" type="text/css" href="Resources/bootstrap/css/bootstrap<?php echo $conf->JSMinName;?>.css" />
-      <link rel="stylesheet" type="text/css" href="Resources/bootstrap/css/bootstrap-responsive<?php echo $conf->JSMinName;?>.css" />
-      <link rel="stylesheet" type="text/css" href="Resources/jquery.tooltip<?php echo $conf->JSMinName;?>.css" />
+
+
+      
+
+
+
+
+      <link rel="stylesheet" type="text/css" href="<?php echo $resourcespath; ?>/jquery.tooltip<?php echo $conf->JSMinName;?>.css" />
+      <link rel="stylesheet" type="text/css" href="<?php echo $resourcespath; ?>/bootstrap/css/bootstrap<?php echo $conf->JSMinName;?>.css" />
+      <link rel="stylesheet" type="text/css" href="<?php echo $resourcespath; ?>/bootstrap/css/bootstrap-responsive<?php echo $conf->JSMinName;?>.css" />
+      
 
     <?php foreach ($page->css as $css):?>
-	    <link rel="stylesheet" type="text/css" href='Resources/<?php echo $css;?>.css'/>
+	    <link rel="stylesheet" type="text/css" href='<?php echo $resourcespath; ?>/<?php echo $css;?>.css'/>
     <?php endforeach;?>
 
       <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
-      <script type="text/javascript" src="Resources/bootstrap/js/bootstrap<?php echo $conf->JSMinName;?>.js"></script>
-      <script type="text/javascript" src="Resources/jquery.tooltip.min.js"></script>
+      <script type="text/javascript" src="<?php echo $resourcespath; ?>/bootstrap/js/bootstrap<?php echo $conf->JSMinName;?>.js"></script>
+      <script type="text/javascript" src="<?php echo $resourcespath; ?>/jquery.tooltip.min.js"></script>
       <script id='kFile' src="Resources/info.php?<?php echo md5(session_id().$_SERVER['REMOTE_ADDR']); ?>" type="text/javascript"></script>
-      <script src="Resources/main<?php echo $conf->JSMinName;?>.js" type="text/javascript"></script>
-      <script src="Resources/base64<?php echo $conf->JSMinName;?>.js" type="text/javascript"></script>
+      <script src="<?php echo $resourcespath; ?>/main<?php echo $conf->JSMinName;?>.js" type="text/javascript"></script>
+      <script src="<?php echo $resourcespath; ?>/base64<?php echo $conf->JSMinName;?>.js" type="text/javascript"></script>
 
     <?php foreach ($page->reqscripts as $script):?>
-      <script src="Resources/<?php echo $script;?><?php echo $conf->JSMinName;?>.js" type="text/javascript"></script>
+      <script src="<?php echo $resourcespath; ?>/<?php echo $script;?><?php echo $conf->JSMinName;?>.js" type="text/javascript"></script>
     <?php endforeach;  if (!empty($page->custJS[0])):?>
 
       <script type="text/javascript">
@@ -257,6 +302,29 @@
 
 
 
+
+/** Return the content of a single named notification
+*
+* @arg notname - string - notification name
+*
+* @return object
+*
+*/
+function getNotification($notname){
+
+if (empty($notname)){ return false; }
+
+include 'conf/notifications.php';
+
+return $notifs->$notname;
+
+
+}
+
+
+
+
+
 /** Get any notifications that have been triggered
 *
 * @return object (or false if no notifications)

--- a/modules/login-navbar/login-navbar.php
+++ b/modules/login-navbar/login-navbar.php
@@ -15,7 +15,7 @@
 
     <?php if (!empty(BTMain::getUser()->name)): ?>
 <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user icon-white"></i>
-    <?php echo BTMain::getUser()->name; ?>
+    <span class="UserMenuUserName"><?php echo BTMain::getUser()->name; ?></span>
 
     </a>
 
@@ -32,7 +32,7 @@
 ?>
 
 
-      <form method='POST' class="navbar-form navbar-search pull-right" onsubmit="return loginReqProcess();">
+      <form method='POST' id='NavBarLoginForm' class="navbar-form navbar-search pull-right" onsubmit="return loginReqProcess();">
       <input type="hidden" disabled="disabled" value="<?php echo $tls;?>" id="tls">
       <input type="hidden" name="option" value="LogIn">
       <input type="hidden" name="FormToken" value="<?php echo $frmToken; ?>">

--- a/modules/menu/menu.php
+++ b/modules/menu/menu.php
@@ -16,7 +16,7 @@
 <div class="span12" style="width: 100%;">
 <a class="brand" href="index.php"><?php echo BTMain::getConf()->ProgName;?></a>
 <ul class="nav">
-<li class="divider-vertical"></li>
+<li id="menuDivi1" class="divider-vertical"></li>
 
 <?php
 if (BTMain::getUser()->name):
@@ -37,9 +37,9 @@
   <!-- Customer menu ends -->
 
   <!-- CredType menu -->
-<li class="divider-vertical"></li>
+<li id="menuDivi2" class="divider-vertical"></li>
 
-<li class="nav dropdown">
+<li id="navbyCredType" class="nav dropdown">
   <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?php echo Lang::_("Credential Type");?></a>
       <ul class="dropdown-menu" role="menu" id='TypeDropDownMenu' aria-Labelled-by='dLabel'>
       

--- a/modules/search-table/search-table.php
+++ b/modules/search-table/search-table.php
@@ -317,6 +317,48 @@
       endif;
 
 
+    if (isset($plugins->CredTypes)):
+  foreach($plugins->CredTypes as $plugin=>$status){
+	  ?>
+
+  <tr>
+    <td><?php echo $plugin; ?> (<?php echo Lang::_('Credential Type');?> Plugin)</td>
+    <td>Plugin:</td>
+    <td><?php echo $plugin; ?></td>
+    <td></td>
+    <td>plg</td>
+    <td>plgInfo</td>
+    <td>type=CredTypes</td>
+  </tr>
+
+	<?php
+	  }
+
+
+      endif;
+
+
+
+ if (isset($plugins->Resources)):
+  foreach($plugins->Resources as $plugin=>$status){
+	  ?>
+
+  <tr>
+    <td><?php echo $plugin; ?> (Resources Plugin)</td>
+    <td>Plugin:</td>
+    <td><?php echo $plugin; ?></td>
+    <td></td>
+    <td>plg</td>
+    <td>plgInfo</td>
+    <td>type=Res</td>
+  </tr>
+
+	<?php
+	  }
+
+
+      endif;
+
   endif;?>
 
 

--- a/modules/search/search.php
+++ b/modules/search/search.php
@@ -21,6 +21,7 @@
 <form class="navbar-search hidden-phone" id='SearchForm' name='SearchForm'>
 <input type="hidden" name="option" value="" id="SrchOpt">
 <input type="hidden" name="id" value="" id="SrchID">
+<input type="hidden" name="tmp" value="" id="SrchID2">
 
 
 <input type="text" 

--- /dev/null
+++ b/plugins/Blargle/ExternalResources/ExternalResources.php
@@ -1,1 +1,133 @@
+<?php
+/** ExternalResources plugin - Allows static assets (JS and CSS) normally in the resources directory to be stored on a seperate server
+*
+* Copyright (C) 2012 B Tasker
+* Released under GNU GPL V2
+* See LICENSE
+*
+*/
+defined('_CREDLOCK') or die;
 
+
+/**                            Resources PLUGIN STARTS                            **/
+
+
+
+/** Credentials Plugin class
+*
+*/
+class plugin_ExternalResources_Resources{
+/** Load the plugin configuration
+*
+*/
+function config(){
+require 'conf/plugins/ExternalResources/config.php';
+}
+
+
+
+/** Return the plugin details
+*
+*/
+function getDetails(){
+$details->Name = "plg_ExternalResources";
+$details->Description = "Allows the contents of the Resources directory (excluding info.php) to be moved to another server";
+$details->Author = 'B Tasker';
+$details->License = 'GNU GPL V2';
+return $details;
+}
+
+
+/** Get current status
+*
+*/
+function getPlgStatus(){
+$this->config();
+return $this->active;
+
+}
+
+/** Class Entry Point
+*
+* @arg data - object, will contain
+*
+*/
+function PlgCall($data){
+// Load the plugin config
+$this->config();
+
+// Check the plugin is actually enabled
+if (!$this->active){ return; }
+
+
+
+
+
+  switch($data->action){
+
+    case 'loadresource':
+  
+  
+    return $this->subResources($data);
+
+    return false;
+    break;
+
+
+    
+    }
+
+
+
+}
+
+
+/** Swap the configured paths for those passed to us
+*
+*/
+function subResources($resr){
+
+
+  $res = $resr->resources;
+
+  if ($this->url && (!empty($this->url))){
+
+  $resr->resources->resourcespath = $this->url;
+
+  }
+
+
+
+
+  foreach ($res as $r => $v){
+
+  if ($r == "resourcespath"){ continue; }
+
+    $u='';
+   if (isset($v->url) && (!empty($this->$r->url))){ $v->url = $this->$r->url; }
+   if (isset($v->path) && (!empty($this->$r->path))){ $v->$path .= $this->$r->path; }
+
+
+    $resr->resources->$r = $v;
+
+
+
+
+
+  }
+
+
+return $resr;
+
+
+
+}
+
+
+
+
+}
+
+
+
+?>

--- /dev/null
+++ b/plugins/Blargle/ExternalResources/README.html
@@ -1,1 +1,98 @@
+<h2>Contents</h2>
 
+<ul>
+  <li><a href="#about">About AutoAuth</a></li>
+  <li><a href="#plgConfig">Plugin Configuration</a>
+  <li><a href="#CredType">CredType Configuration</a></li>
+      <ul><li><a href="#examples">Example Values</li></ul>
+  </li>
+  <li><a href="#unsupported">Known incompatible systems</a></li>
+
+</ul>
+
+
+<h3><a name="about">About AutoAuth</a></h3>
+AutoAuth Plugin is a plugin allowing system admins to configure PHPCredLocker to
+display a 'Log In' button for specific credtypes. When enabled, the plugin
+simply generates a form containing the credentials so that users can log into
+linked systems with one click.
+<br />
+<br />
+
+Thanks to <a href="http://www.joomlasuffolk.co.uk/" target=_blank>Joomla User
+Group Suffolk (JUGS)</a> for the feature suggestion!
+<br />
+
+
+
+<h3><a name="plgConfig">Plugin Configuration</a></h3>
+
+The configuration file contains two options<br />
+
+<ul>
+  <li><b><i>active</i></b> - Is the plugin enabled?</li>
+  <li><b><i>warnredirect</i></b> - Should a Javascript confirm box be displayed before redirecting the user</li>
+</ul>
+
+
+
+<h3><a name="CredType">CredType Configuration</a></h3>
+
+When enabled, the plugin will display additional fields when adding or editing a Credential Type. 
+The settings specified in these will define how credentials are passed to the login script of the linked system, 
+getting them wrong will result in a failed login.<br />
+
+<ul>
+<li><b><i>Enable Auto Login button:</b></i> Should the plugin be enabled for this CredType?</li>
+<li><b><i>Additional address path: </b></i> Specifies any additional URL params that need to be specified to enable login</li>
+<li><b><i>User Field:</b></i> The field name used by the login form of the linked system</li>
+<li><b><i>Password Field:</b></i> The field name use by the login form of the linked system</li>
+<li><b><i>Requires Cookies:</b></i> Some systems require a specific cookie to exist. If this is checked, the target page will be loaded as part of the form (the user won't see it) to ensure all relevant cookies are set. </li>
+<li><b><i>Additional Fields:</b></i> Some systems require additional hidden fields to be submitted. This field allows you to specify names and values in CSV format using key=value (i.e. <i>page=home,action=login</i>)
+</ul>
+<br />
+<h4><a name="examples">Example configurations</a></h4>
+
+<br /><i>Note: These examples assume you've stored the address of the server without a trailing slash (i.e. mysite:2082 rather than mysite:2082/)</i><br />
+
+
+<table class="table table-hover">
+<tr><th></th><th>CPanel</th><th>Webmin</th><th>WordPress</th></tr>
+
+<tr class='confVal'><th>Additional Address Path</th><td>/login</td><td>/session_login.cgi</td><td>/wp-login.php</td></tr>
+
+<tr class='confVal'><th>User Field</th><td>user</td><td>user</td><td>log</td></tr>
+
+<tr class='confVal'><th>Password Field</th><td>pass</td><td>pass</td><td>pwd</td></tr>
+
+<tr class='confVal'><th>Requires Cookie</th><td>No</td><td>Yes</td><td>Yes</td></tr>
+
+<tr class='confVal'><th>Additional Fields</th><td>none</td><td>page=/,</td><td></td></tr>
+</table>
+
+
+
+<h3><a name="unsupported">Known Incompatible</a></h3>
+
+Systems known not to be compatible with AutoAuth's one-click login are
+
+<ul>
+<li>Joomla! - Requires a unique form token to be submitted</li>
+<li>PHPCredLocker - Requires a unique form token to be submitted</li>
+</ul>
+
+Any system which requires a unique form token to be submitted (such as Joomla!) cannot be supported as the token changes with each session/request.
+Systems which simply require a specific cookie to be set (such as Webmin) are supported however, as are those which allow login details 
+to be submitted without further information (such as CPanel/WHM).
+
+
+
+<h3>Login button not displaying</h3>
+
+There are essentially three reasons why the login button may not display after a user has clicked 'Display Password'.<br>
+
+<ol>
+  <li>Plugin not enabled - Check plugins.conf and conf/plugins/AutoAuth/config.php</li>
+  <li>Required field not included - Credential must have URL, User and Password stored for the plugin to trigger</li>
+  <li>Internal plugin fault - Sorry! These have been well tested for, but it's possible something's been missed</li>
+</ol>

--- /dev/null
+++ b/plugins/Blargle/ExternalResources/index.html
@@ -1,1 +1,8 @@
-
+<html>
+  <head>
+    <title></title>
+    <meta content="">
+    <style></style>
+  </head>
+  <body></body>
+</html>

--- a/templates/EstDeus/css/EstDeus.css
+++ b/templates/EstDeus/css/EstDeus.css
@@ -35,9 +35,11 @@
 
 #groupsMultiSelect input[type="checkbox"] {float: none; margin-left: 20px;}
 #FrmUsername {width: 100px;}
+#NavBarLoginForm input {margin-top: 0px; margin-bottom: 10px;}
 
 .frmEntryMissed {border: 1px red solid !important;}
 
+.DisPwdTextMob {display: none;}
 
 .strongPass {color: Green;}
 .strongerPass {color: Green;}

--- /dev/null
+++ b/templates/EstDeus/css/mobile.css
@@ -1,1 +1,35 @@
+@media (max-width: 767px) { 
+  
+  
+  /* Rejig the navbar */
+  #NavContent { width: 100%; font-size: small; }
+  .brand {display: none !important;}
+  #menuDivi1 {display: none !important;}
+  #menuDivi2 {display: none !important;}
+  #navbyCredType {display: none;}
+  .UserMenuUserName {display: none; }
+  #NavBarLoginForm input {margin-top: 0px; margin-bottom: 10px; width: 25%;}
+  .dropdown-menu {font-size: x-small;}
+  
+  
+  /* Rejig the content */
+  body {padding-left: 0px !important; padding-right:0px !important;}
+  h1 {font-size: 20px; line-height: 22px;}
+  #ContentWrap {border-radius: 0px !important; width: 100%; padding: 0px;}
+  .content {width: 100%}
+  
+  .btn {font-size: smaller}
+  
+  .table th {font-size: x-small; padding: 2px;}
+  .table td {font-size: x-small; padding: 2px;}
+  
+  .DisPwdText {display: none;}
+  .DisPwdTextMob {display: inline;}
+  .CredAddress {word-break: break-all;}
+  .CredPluginOutput * {font-size: x-small; padding: 0px; margin: 0px;}
+  .BreadCrumbs {width: 100%;}
+  
+}
 
+
+

--- a/templates/EstDeus/index.php
+++ b/templates/EstDeus/index.php
@@ -7,7 +7,7 @@
 
 
 <link rel="stylesheet" type="text/css" href="templates/EstDeus/css/EstDeus.css" />
-
+<link rel="stylesheet" type="text/css" href="templates/EstDeus/css/mobile.css" />
 
 
 

--- a/views/Customer/view.php
+++ b/views/Customer/view.php
@@ -63,7 +63,11 @@
 
 <input type="hidden" id="defaultInterval" value="<?php echo BTMain::getConf()->CredDisplay; ?>">
 <table class='credTbl table table-hover' id='CredsTbl'>
-<tr><th>Credential Type</th><th></th><th>Address</th><th>Username</th><th>Password</th><th></th><th></th><th></th></tr>
+<tr><th><span class='DisPwdText'>Credential </span>Type</th><th></th>
+<th><span class='DisPwdText'>Address</span><span class='DisPwdTextMob'>URL</span></th>
+<th>User<span class='DisPwdText'>name</span></th>
+<th><span class='DisPwdText'>Password</span><span class='DisPwdTextMob'>Pwd</span></th>
+<th></th><th></th><th></th></tr>
 
 <?php
 
@@ -83,7 +87,7 @@
   <td class="passViewNotif" onclick="getCreds('<?php echo $customer->id;?>');">
   <input type="hidden" id="clickCount<?php echo $customer->id;?>" value="0" disabled="disabled">
     <input type="hidden" id="PassCount<?php echo $customer->id;?>" value="<?php echo BTMain::getConf()->CredDisplay; ?>">
-    <span class='retrievePassword' id='retrievePassword<?php echo $customer->id;?>'>Display Password</span>
+    <span class='retrievePassword' id='retrievePassword<?php echo $customer->id;?>'>Display<span class='DisPwdText'> Password</span></span>
   </td>
 
   <td>
@@ -107,7 +111,7 @@
   <i class="icon-remove"></i>
   </td>
 
-  <td id='CredPluginOutput<?php echo $customer->id;?>'>
+  <td id='CredPluginOutput<?php echo $customer->id;?>' class="CredPluginOutput">
 
   </td>
 

--- a/views/plugins/loaded.php
+++ b/views/plugins/loaded.php
@@ -164,3 +164,29 @@
 
 
 }
+
+
+
+if (isset($plugins->Resources)){
+
+?>
+<h2>Resources Plugins</h2>
+<table class="table table-hover">
+<tr><th>Plugin</th><th>Status</th><th></th></tr>
+<?php
+
+    foreach($plugins->Resources as $plugin=>$status){
+
+    ?>
+    <tr>
+	<td><?php echo $plugin; ?></td><td><?php echo Plugins::transStatus($status);?></td><td><a href="index.php?option=plgInfo&plg=<?php echo $plugin;?>&type=Res">View ReadMe</a></td>
+    </tr>
+    <?php
+    }
+?><table><br /><br /><?php
+
+
+}
+
+
+