summaryrefslogtreecommitdiffstats
path: root/library/Pbs
diff options
context:
space:
mode:
authorSimon2011-03-18 18:49:30 +0100
committerSimon2011-03-18 18:49:30 +0100
commit5139008cee049b2ab24b870a263996fe9043adeb (patch)
treea79c36fce9afc587c73cd4e71c94e72bbc83830e /library/Pbs
parentAnsicht von Pools geändert (diff)
downloadpbs2-5139008cee049b2ab24b870a263996fe9043adeb.tar.gz
pbs2-5139008cee049b2ab24b870a263996fe9043adeb.tar.xz
pbs2-5139008cee049b2ab24b870a263996fe9043adeb.zip
User-Oberfläche, FBGui-Oberfläche legt Session&Clients an - für Kiosk-System
apache-default zum ersetzen, damit server von außen erreichbar ist FilterController weitergearbeitet
Diffstat (limited to 'library/Pbs')
-rw-r--r--library/Pbs/Notifier.php14
-rw-r--r--library/Pbs/Session.php14
2 files changed, 27 insertions, 1 deletions
diff --git a/library/Pbs/Notifier.php b/library/Pbs/Notifier.php
index 23fec57..1c7dfca 100644
--- a/library/Pbs/Notifier.php
+++ b/library/Pbs/Notifier.php
@@ -6,6 +6,20 @@ class Pbs_Notifier{
public function notify($action,$result){
switch($action){
+ default:
+ switch($result){
+ case "forbidden":
+ $result = "errorbox";
+ break;
+ case "ok":
+ $result = "okbox";
+ break;
+ case "error":
+ $result = "warningbox";
+ break;
+ }
+ $result = "<div class='$result'>$action</div>";
+ break;
case "delete":
switch($result){
case "forbidden":
diff --git a/library/Pbs/Session.php b/library/Pbs/Session.php
index 592b89c..eb7c927 100644
--- a/library/Pbs/Session.php
+++ b/library/Pbs/Session.php
@@ -2,7 +2,7 @@
class Pbs_Session{
- public function createsession(Application_Model_Session $session){
+ public function CreateSession(Application_Model_Session $session){
$sessionmapper = new Application_Model_SessionMapper();
$uniqid = $this->getUniqueCode(10);
@@ -16,6 +16,18 @@ class Pbs_Session{
$sessionmapper->find($id, $session);
return $session;
}
+ public function createClient(Application_Model_Client $client){
+ $clientmapper = new Application_Model_ClientMapper();
+ $result = $clientmapper->findBy('macadress',$client->getMacadress());
+ if(($result)>0){
+ $client->setOptions($result);
+ }
+ else{
+ $id = $clientmapper->save($client);
+ $clientmapper->find($id, $client);
+ }
+ return $client;
+ }
private function getUniqueCode($length = "")
{
$code = md5(uniqid(rand(), true));