diff --git a/application/modules/default/views/layout/default.phtml b/application/modules/default/views/layout/default.phtml new file mode 100644 index 0000000..82bfbae --- /dev/null +++ b/application/modules/default/views/layout/default.phtml @@ -0,0 +1,55 @@ + + + + Elements.htm + + + + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ + + + + + + + + + + +
abcbab
abcbbb
+ + +content()?> + + + \ No newline at end of file diff --git a/library/Fiktiv/Session.php b/library/Fiktiv/Session.php new file mode 100644 index 0000000..377d0cc --- /dev/null +++ b/library/Fiktiv/Session.php @@ -0,0 +1,89 @@ +_database = $database; + } + + /** + * Open the database connection + */ + public function open() + { + if (!$this->_database->isConnected()) { + $this->_database->getConnection(); + return true; + } + + return false; + } + + /** + * Close the database connection + */ + public function close() + { + if ($this->_database->isConnected()) { + $this->_database->closeConnection(); + return true; + } + + return false; + } + + /** + * Read data from session database + */ + public function read($session) + { + $data = $this->_database->select()->from($this->_sessionTable, $this->_sessionData)->where($this->_sessionId . ' = ?', $session)->query()->fetchObject(); + return ($data) ? $data->$this->_sessionData : null; + } + + /** + * Write data to session database + */ + public function write($session, $data) + { + try{ + return ($this->_database->insert($this->_sessionTable, array($this->_sessionId => $session, $this->_sessionData => $data))) ? true : false; + } catch (Zend_Db_Exception $ex) { + return ($this->_database->update($this->_sessionTable, array($this->_sessionId => $session, $this->_sessionData => $data))) ? true : false; + } + + return false; + } + + /** + * + */ + public function gc($life) + {} + +} \ No newline at end of file diff --git a/library/Fiktiv/Session/Abstract.php b/library/Fiktiv/Session/Abstract.php new file mode 100644 index 0000000..d542e81 --- /dev/null +++ b/library/Fiktiv/Session/Abstract.php @@ -0,0 +1,15 @@ +