summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-01-11 14:36:35 +0100
committerSebastian Schmelzer2012-01-11 14:36:35 +0100
commitfca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e (patch)
tree6e6aaf749f34db8c7c7153c23ef85c57187430bb /public
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 'public')
-rw-r--r--public/index.php22
-rw-r--r--public/settergetter.php64
2 files changed, 43 insertions, 43 deletions
diff --git a/public/index.php b/public/index.php
index fe1701f..b12a55e 100644
--- a/public/index.php
+++ b/public/index.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.
@@ -19,25 +19,25 @@ defined('APPLICATION_ENV')
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
-realpath(APPLICATION_PATH . '/../library'),
-get_include_path(),
-)));
+ realpath(APPLICATION_PATH . '/../library'),
+ get_include_path(),
+ )));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application
$application = new Zend_Application(
-APPLICATION_ENV,
-APPLICATION_PATH . '/configs/application.ini'
+ APPLICATION_ENV,
+ APPLICATION_PATH . '/configs/application.ini'
);
// Set Session lifetime
-if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI'))
- Zend_Session::setOptions(array('cookie_lifetime' => null));
-else{
- Zend_Session::setOptions(array('cookie_lifetime' => null));
- Zend_Session::setOptions(array('gc_maxlifetime' => '1800'));
+if(stristr($_SERVER['HTTP_USER_AGENT'], 'prebootGUI'))
+ { Zend_Session::setOptions(array('cookie_lifetime' => null)); }
+else {
+ Zend_Session::setOptions(array('cookie_lifetime' => null));
+ Zend_Session::setOptions(array('gc_maxlifetime' => '1800'));
}
// Run bootstrap
$application->bootstrap()
diff --git a/public/settergetter.php b/public/settergetter.php
index 9b603d7..ac7ce8a 100644
--- a/public/settergetter.php
+++ b/public/settergetter.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.
@@ -9,40 +9,40 @@
*
* General information about OpenSLX can be found at http://openslx.org/
*/
-function print_a($v){echo"<pre style='background-color:#FFCC33'>";print_r($v);echo"</pre>";}
-function setget($name){
- $withdash = $name;
- $withoutdash = substr($name,1);
- return
-' public function get'.ucfirst($withoutdash).'()
- {
- return $this->'.$withdash.';
- }
- public function set'.ucfirst($withoutdash).'($'.$withdash.')
- {
- $this->'.$withdash.' = $'.$withdash.';
- }
-';
+function print_a($v) {echo"<pre style='background-color:#FFCC33'>"; print_r($v); echo"</pre>";}
+function setget($name) {
+ $withdash = $name;
+ $withoutdash = substr($name, 1);
+ return
+ ' public function get'.ucfirst($withoutdash).'()
+ {
+ return $this->'.$withdash.';
+ }
+ public function set'.ucfirst($withoutdash).'($'.$withdash.')
+ {
+ $this->'.$withdash.' = $'.$withdash.';
+ }
+ ';
}
-if(isset($_POST['submit'])){
- $ar = explode("\n",trim($_POST['variables']));
+if(isset($_POST['submit'])) {
+ $ar = explode("\n", trim($_POST['variables']));
- $output = "";
- foreach($ar as $item){
- $output .= setget("_".trim($item));
- }
- print_a($output);
- echo "<a href='".$_SERVER['PHP_SELF']."'>back</a>";
+ $output = "";
+ foreach($ar as $item) {
+ $output . = setget("_".trim($item));
+ }
+ print_a($output);
+ echo "<a href='".$_SERVER['PHP_SELF']."'>back</a>";
}
-else{
-?>
-Jeweils ein Variablenname pro Zeile:<br>
-<form method='post' action='<?php $_SERVER['PHP_SELF'];?>'>
-<textarea name='variables'>
-</textarea><br>
-<input type='submit' name='submit' value='setter und getter generieren'>
-</form>
-<?php
+else {
+ ? >
+ Jeweils ein Variablenname pro Zeile : <br>
+ < form method = 'post' action = '<?php $_SERVER['PHP_SELF'];?>' >
+ < textarea name = 'variables' >
+ < / textarea > <br>
+ < input type = 'submit' name = 'submit' value = 'setter und getter generieren' >
+ < / form >
+ <? php
}