summaryrefslogtreecommitdiffstats
path: root/application/Functions.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-10 22:10:05 +0100
committerBjörn Geiger2011-03-10 22:10:05 +0100
commit7be4355001156faed62c71492234cba2c5bf96b4 (patch)
tree55bb96227ee354cc0c6d6788dc45020bd43d8bba /application/Functions.php
parentMerge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-7be4355001156faed62c71492234cba2c5bf96b4.tar.gz
pbs2-7be4355001156faed62c71492234cba2c5bf96b4.tar.xz
pbs2-7be4355001156faed62c71492234cba2c5bf96b4.zip
Benutzervewaltung, Gruppenverwaltung, Membershipverwaltung und noch leerer RoleController
Diffstat (limited to 'application/Functions.php')
-rw-r--r--application/Functions.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/application/Functions.php b/application/Functions.php
new file mode 100644
index 0000000..3ffc39b
--- /dev/null
+++ b/application/Functions.php
@@ -0,0 +1,32 @@
+<?php
+function random($name_laenge) {
+ $zeichen = "abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ0123456789";
+ $name_neu = "";
+
+ mt_srand ((double) microtime() * 1000000);
+ for ($i = 0; $i < $name_laenge; $i++ ) {
+ $name_neu .= $zeichen{mt_rand (0,strlen($zeichen))};
+ }
+ 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>";
+ }
+} \ No newline at end of file