Advertisement
TomJarvis

email encryption Tiki plugin

Nov 26th, 2015
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <?php
  2. /* Tiki-Wiki plugin EMENCR */
  3. function wikiplugin_emencr($data, $params) {
  4. extract ($params,EXTR_SKIP);
  5. if (!isset($email)) { return ("<b>missing email address parameter for plugin</b><br />"); }
  6. $em = explode("@", $email);
  7. $ed = str_split($em[1], (strlen($em[1])/2)+1);
  8. $at = "'+\"&#\"+eval(60 + 4)"; # formula to create the number 64 for at sign
  9. $ret = "{JS()}document.write('<' + 'a h' + 'ref=\"m'+'grailto:z'.substr(2,6)+'";
  10. $ret .= $em[0].$at."+';'+'" . $ed[0] . "'+'" . $ed[1];
  11. if ("$data" == "") { # no data for link so make email address the link
  12. $ret .= "\">".$em[0].$at."+';'+'" . $ed[0] . "'+'" . $ed[1] . "</a>');{JS}";
  13. } else { # there is data so make it the link
  14. $ret .= "\">" . $data . "</a>');{JS}";
  15. }
  16. return $ret;
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement