aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ogs/common/util.inc.php
diff options
context:
space:
mode:
authorgareth2007-03-07 18:48:38 +0000
committergareth2007-03-07 18:48:38 +0000
commitb3844c1f7348b4296b5ab1df258935d7f971e412 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /ogs/common/util.inc.php
parent* Updating libsecondlife.dll to the latest version with a working LayerData f... (diff)
downloadopensim-SC-b3844c1f7348b4296b5ab1df258935d7f971e412.zip
opensim-SC-b3844c1f7348b4296b5ab1df258935d7f971e412.tar.gz
opensim-SC-b3844c1f7348b4296b5ab1df258935d7f971e412.tar.bz2
opensim-SC-b3844c1f7348b4296b5ab1df258935d7f971e412.tar.xz
Deleted old trunk code
Diffstat (limited to 'ogs/common/util.inc.php')
-rw-r--r--ogs/common/util.inc.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/ogs/common/util.inc.php b/ogs/common/util.inc.php
deleted file mode 100644
index b931205..0000000
--- a/ogs/common/util.inc.php
+++ /dev/null
@@ -1,42 +0,0 @@
1<?
2// Some generic utilities which may be used by any services
3
4function inc_lluuid($lluuid)
5{
6 $partB = substr($lluuid, 15);
7 $partB = (float)base_convert($partB,16,10)+1;
8 $partB = sprintf('%016x', $partB);
9 $partA = substr($lluuid, 0, 16);
10
11 if(substr($lluuid,15,16)=='FFFFFFFFFFFFFFFE') {
12 $partA = (float)base_convert($partA,16,10)+1;
13 $partA = sprintf('%016x', $partA);
14 }
15
16 $returnval = sprintf('%s%s',$partA, $partB);
17
18 return $returnval;
19}
20
21function format_lluuid($uuid)
22{
23 return strtolower(substr($uuid,0,8)."-".substr($uuid,8,4)."-".substr($uuid,12,4)."-".substr($uuid,16,4)."-".substr($uuid,20));
24}
25
26function output_xml_block($blockname, $data) {
27 echo("<$blockname>\n");
28 foreach($data as $name => $value) {
29 echo(" <$name>$value</$name>\n");
30 }
31 echo("</$blockname>\n");
32}
33
34function rand_uuid()
35{
36 return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
37 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
38 mt_rand( 0, 0x0fff ) | 0x4000,
39 mt_rand( 0, 0x3fff ) | 0x8000,
40 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
41}
42?>