/[cvs]/nfo/php/libs/org.netfrag.glib/utils/extensions.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/utils/extensions.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Sat Apr 5 19:53:45 2003 UTC revision 1.3 by joko, Tue Apr 8 22:35:16 2003 UTC
# Line 13  Line 13 
13   * $Id$   * $Id$
14   *   *
15   * $Log$   * $Log$
16     * Revision 1.3  2003/04/08 22:35:16  joko
17     * + 'function yesno' from utils/links.php
18     *
19     * Revision 1.2  2003/04/06 01:37:31  jonen
20     * + added functions to generate and handle unique ID's
21     *
22   * Revision 1.1  2003/04/05 19:53:45  joko   * Revision 1.1  2003/04/05 19:53:45  joko
23   * moved here from ../   * moved here from ../
24   *   *
# Line 637  Bitte versuchen Sie es später nocheinmal Line 643  Bitte versuchen Sie es später nocheinmal
643    
644    }    }
645    
646      //examples on howto create unique id's
647      // from: http://www.php.net/manual/en/function.uniqid.php
648      function CreateGUID(){
649        srand((double)microtime()*1000000);
650        $r = rand ;
651        $u = uniqid(getmypid() . $r . (double)microtime()*1000000,1);
652        $m = md5 ($u);
653        return($m);
654      }
655    
656      function CompressID( $ID ){
657        return(Base64_encode(pack("H*",$ID)));
658      }
659    
660      function ExpandID ($ID){
661        return ( implode(unpack("H*",Base64_decode($ID)), '') );
662      }
663    
664      // from: utils/links.php
665      function yesno($bool) {
666        return $bool ? 'yes' : 'no';
667      }
668    
669  }  }
670    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed