summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-01-11 17:54:11 +0100
committerSebastian Schmelzer2012-01-11 17:54:11 +0100
commit119ced43c00d8cc40c0f31da25b5829e9d7c0631 (patch)
treefa271ef964769a1dbafd1328bbbcde587b954f63 /public
parentcleanup (diff)
downloadpbs2-119ced43c00d8cc40c0f31da25b5829e9d7c0631.tar.gz
pbs2-119ced43c00d8cc40c0f31da25b5829e9d7c0631.tar.xz
pbs2-119ced43c00d8cc40c0f31da25b5829e9d7c0631.zip
add favico
Diffstat (limited to 'public')
-rw-r--r--public/favicon.icobin0 -> 4286 bytes
-rw-r--r--public/index.php20
-rw-r--r--public/settergetter.php26
3 files changed, 26 insertions, 20 deletions
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..8618a97
--- /dev/null
+++ b/public/favicon.ico
Binary files differ
diff --git a/public/index.php b/public/index.php
index 7934852..b631d50 100644
--- a/public/index.php
+++ b/public/index.php
@@ -9,6 +9,7 @@
*
* General information about OpenSLX can be found at http://openslx.org/
*/
+
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
@@ -27,15 +28,20 @@ set_include_path(implode(PATH_SEPARATOR, array(
require_once 'Zend/Application.php';
// Create application
-$application = new Zend_Application(
- APPLICATION_ENV,
- APPLICATION_PATH . '/configs/application.ini'
-);
+try {
+ $application = new Zend_Application(
+ APPLICATION_ENV,
+ APPLICATION_PATH . '/configs/application.ini'
+ );
+} catch (Zend_Config_Exception $e) {
+ echo "<h2>application.ini not found</h2>";
+ echo "<br/> make sure you copied and modified <code>application.ini.dist</code> to <code>application.ini</code>";
+}
// Set Session lifetime
-if(stristr($_SERVER['HTTP_USER_AGENT'], 'prebootGUI'))
- { Zend_Session::setOptions(array('cookie_lifetime' => null)); }
-else {
+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'));
}
diff --git a/public/settergetter.php b/public/settergetter.php
index 42cda16..f618eda 100644
--- a/public/settergetter.php
+++ b/public/settergetter.php
@@ -9,23 +9,23 @@
*
* 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.';
-}
-';
+ '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']));
@@ -41,11 +41,11 @@ else {
?>
Jeweils ein Variablenname pro Zeile :
- <br>
+ <br/>
<form method='post' action='<?php $_SERVER['PHP_SELF'];?>'>
- <textarea name='variables'>
- </textarea>
- <br> <input type='submit' name='submit'
+ <textarea name='variables'></textarea>
+ <br/>
+ <input type='submit' name='submit'
value='setter und getter generieren'>
</form>
<?php