summaryrefslogtreecommitdiffstats
path: root/application/Functions.php
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-01-11 14:36:35 +0100
committerSebastian Schmelzer2012-01-11 14:36:35 +0100
commitfca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e (patch)
tree6e6aaf749f34db8c7c7153c23ef85c57187430bb /application/Functions.php
parentAPI: mit addBootos kann man nun auch editieren (diff)
downloadpbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.tar.gz
pbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.tar.xz
pbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.zip
format source files
Diffstat (limited to 'application/Functions.php')
-rw-r--r--application/Functions.php54
1 files changed, 27 insertions, 27 deletions
diff --git a/application/Functions.php b/application/Functions.php
index 9e2ccf5..b96b039 100644
--- a/application/Functions.php
+++ b/application/Functions.php
@@ -1,4 +1,4 @@
-<?php
+<? php
/*
* Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
* This program is free software distributed under the GPL version 2.
@@ -10,33 +10,33 @@
* General information about OpenSLX can be found at http://openslx.org/
*/
function randomString($name_laenge = 16) {
- $zeichen = "abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ0123456789";
- $name_neu = "";
+ $zeichen = "abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ0123456789";
+ $name_neu = "";
- mt_srand ((double) microtime() * 1000000);
- for ($i = 0; $i < $name_laenge; $i++ ) {
- $name_neu .= $zeichen{mt_rand (0,strlen($zeichen) - 1)};
- }
- return $name_neu;
+ mt_srand ((double) microtime() * 1000000);
+ for ($i = 0; $i < $name_laenge; $i++ ) {
+ $name_neu . = $zeichen {mt_rand (0, strlen($zeichen) - 1)};
+ }
+ return $name_neu;
}
-function print_a(){
- $numargs = func_num_args();
- if($numargs>1){
- $out = '';
- ob_start();
- echo "<div style='background-color:#FFCC33;border:1px solid black;margin:3px;padding:5px;'>";
- for($a=0;$a<$numargs;$a++)
- print_a(func_get_arg($a));
- echo "</div>";
- $out .= ob_get_contents();
- ob_end_clean();
- echo $out;
- }else{
- echo "<pre style='background-color:#FFDF80;border:1px solid #000;margin:3px;padding:5px;'>";
- $a = func_get_arg(0);
- $a = (is_bool($a))?(($a)?'true':'false'):$a;
- print_r($a);
- echo "</pre>";
- }
+function print_a() {
+ $numargs = func_num_args();
+ if($numargs > 1) {
+ $out = '';
+ ob_start();
+ echo "<div style='background-color:#FFCC33;border:1px solid black;margin:3px;padding:5px;'>";
+ for($a = 0; $a < $numargs; $a++)
+ { print_a(func_get_arg($a)); }
+ echo "</div>";
+ $out . = ob_get_contents();
+ ob_end_clean();
+ echo $out;
+ } else {
+ echo "<pre style='background-color:#FFDF80;border:1px solid #000;margin:3px;padding:5px;'>";
+ $a = func_get_arg(0);
+ $a = (is_bool($a)) ? (($a) ? 'true' : 'false') : $a;
+ print_r($a);
+ echo "</pre>";
+ }
} \ No newline at end of file