From f2ea796ba8d73c8f25310edfa04b6b58f43cd412 Mon Sep 17 00:00:00 2001 From: gareth Date: Wed, 7 Mar 2007 19:08:00 +0000 Subject: Added OGS --- ogs/common/util.inc.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ogs/common/util.inc.php (limited to 'ogs/common/util.inc.php') diff --git a/ogs/common/util.inc.php b/ogs/common/util.inc.php new file mode 100644 index 0000000..b931205 --- /dev/null +++ b/ogs/common/util.inc.php @@ -0,0 +1,42 @@ +\n"); + foreach($data as $name => $value) { + echo(" <$name>$value\n"); + } + echo("\n"); +} + +function rand_uuid() +{ + return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', + mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), + mt_rand( 0, 0x0fff ) | 0x4000, + mt_rand( 0, 0x3fff ) | 0x8000, + mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) ); +} +?> -- cgit v1.1