Location: PHPKode > projects > MembersGear > membersgear/config/seprate_ency_decy_func.php
<?php

      //Project007Bond
    function encrypt_sep($string,$pkey='MEMBERSITEENCRYPTEDKEY') {
        $key = $pkey;
        if(!isset($key) or $key=="")
            $key='MEMBERSITEENCRYPTEDKEY'; 
        $result = '';
        for($i=0; $i<strlen($string); $i++) {
             $char = substr($string, $i, 1);
             $keychar = substr($key, ($i % strlen($key))-1, 1);
             $char = chr(ord($char)+ord($keychar));
             $result.=$char;
         }
         
       $skey=urlencode(base64_encode($result));
       
       return $skey;
  }
  function decrypt_sep($string,$pkey='MEMBERSITEENCRYPTEDKEY') {
        $key = $pkey;
        if(!isset($key) or  $key=="")           
              $key='MEMBERSITEENCRYPTEDKEY';
        $result = '';
        $string = base64_decode(urldecode($string));
       for($i=0; $i<strlen($string); $i++) {
             $char = substr($string, $i, 1);
             $keychar = substr($key, ($i % strlen($key))-1, 1);
             $char = chr(ord($char)-ord($keychar));
             $result.=$char;
         }
       return $result;
  }
  
   function Redirect_installation_chk($pUrl='', $pEndResponse=false)
    {     
        if(trim($pUrl)=='')
            return false;
            
        echo("<script language='javascript'>\n" .
                "window.location.href='".$pUrl."'\n" .
             "</script>");  
             
        if($pEndResponse) die;
        
        return false;     
    }
?>
Return current item: MembersGear