From 765bcb53aa178808c2eec5502aa5387ba6e1bf68 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 19 Apr 2011 15:14:17 +0200 Subject: Aufgeräumt und verschoben --- notes-1.txt | 386 ------------------------------------------------------------ 1 file changed, 386 deletions(-) delete mode 100644 notes-1.txt (limited to 'notes-1.txt') diff --git a/notes-1.txt b/notes-1.txt deleted file mode 100644 index d3e0f6d..0000000 --- a/notes-1.txt +++ /dev/null @@ -1,386 +0,0 @@ -test - -wget -qO - "$@" http://132.230.4.3/uniontmp.php | tar -C testdownload/ -zxvf - - - -Whitelist: -tar cz --file=/home/mp57/whitelist --ignore-failed-read --exclude=.wh* ./* - -Blacklist: -find /uniontmp/ -name .wh* >> /home/mp57/blacklist - - -http://piratepad.net/master-projekt -Whiteliste anlegen -echo '#!/bin/sh' > whitelist.sh -find * -printf 'chmod %m %p\n' >> whitelist.sh -chmod a+x whitelist.sh - -Setzen aller Ordner auf 777 -chmod -R 755 ./* - -Gepackt werden (bleibt mit ordnerberechtigung 755 auf dem server -nach herunterladen müssen die dateiberechtigugnen wieder gesetzt werden -./whitelist.sh - - -http://akrabat.com/zend-framework-tutorial/ - -http://lab.ks.uni-freiburg.de/projects/preboot/wiki/ZendWebInterface -http://lab.ks.uni-freiburg.de/projects/preboot/wiki/Zend_einrichten - -############################################################## -controller erstellen -zf create controller person -zf create action register person -zf create action login person -zf create action edit person -zf create action request person - -datenbankanbindung in der application.ini setzen - resources.db.adapter = PDO_MYSQL - resources.db.params.host = localhost - resources.db.params.username = rob - resources.db.params.password = 123456 - resources.db.params.dbname = pbs - -Datenbank initialisieren (pbs datenbank anlegen - pbs.sql einfügen - - -zf create db-table Person pbs_person -=> erstellt application/models/DbTable/Person.php - -Mapper erstellen - zf create model PersonMapper -=> erstellt application/models/PersonMapper.php -http://framework.zend.com/manual/en/learning.quickstart.create-model.html - - zf create model Person -=> erstellt /var/www/pbs/application/models/Person.php - -zf create controller Person - - - - - - - - - - - - - - - -

Sign Our Guestbook

- -Guestbook Entries:
-
- entries as $entry): ?> -
escape($entry->email) ?>
-
escape($entry->comment) ?>
- -
- - - - - - -_dbTable = $dbTable; - return $this; -} - -public function getDbTable() -{ - if (null === $this->_dbTable) { - $this->setDbTable('Application_Model_DbTable_Person'); - } - return $this->_dbTable; -} - -public function save(Application_Model_Person $person) -{ - $data = array( - 'title' => $person->getTitle(), - 'name' => $person->getName(), - 'firstname' => $person->getFirstname(), - 'street' => $person->getStreet(), - 'housenumber' => $person->getHousenumber(), - 'city' => $person->getCity(), - 'postalcode' => $person->getPostalcode(), - 'logindate' => $person->getlogindate(), - 'registerdate' => $person->getRegisterdate(), - 'email' => $person->getEmail(), - 'login' => $person->getLogin(), - 'password' => $person->getPassword() - ); - - if (null === ($id = $person->getPersonID())) { - unset($data['personID']); - $this->getDbTable()->insert($data); - } else { - $this->getDbTable()->update($data, array('personID = ?' => $id)); - } -} - -public function find($id, Application_Model_Person $person) -{ - $result = $this->getDbTable()->find($id); - if (0 == count($result)) { - return; - } - $row = $result->current(); - $guestbook->setPersonID($row->personID) - ->setTitle($row->title) - ->setName($row->name) - ->setFirstname($row->firstname) - ->setStreet($row->street) - ->setHousenumber($row->housenumber) - ->setCity($row->city) - ->setPostalcode($row->postalcode) - ->setLogindate($row->logindate) - ->setRegisterdate($row->registerdate) - ->setEmail($row->email) - ->setLogin($row->login) - ->setPassword($row->password); -} - -public function fetchAll() -{ - $resultSet = $this->getDbTable()->fetchAll(); - $entries = array(); - foreach ($resultSet as $row) { - $entry = new Application_Model_Person(); - $entry->setPersonID($row->personID) - ->setTitle($row->title) - ->setName($row->name) - ->setFirstname($row->firstname) - ->setStreet($row->street) - ->setHousenumber($row->housenumber) - ->setCity($row->city) - ->setPostalcode($row->postalcode) - ->setLogindate($row->logindate) - ->setRegisterdate($row->registerdate) - ->setEmail($row->email) - ->setLogin($row->login) - ->setPassword($row->password); - $entries[] = $entry; - } - return $entries; -} -} - - - - -setOptions($options); - } - } - - public function __set($name, $value) - { - $method = 'set' . $name; - if (('mapper' == $name) || !method_exists($this, $method)) { - throw new Exception('Invalid person property'); - } - $this->$method($value); - } - - public function __get($name) - { - $method = 'get' . $name; - if (('mapper' == $name) || !method_exists($this, $method)) { - throw new Exception('Invalid person property'); - } - return $this->$method(); - } - - public function setOptions(array $options) - { - $methods = get_class_methods($this); - foreach ($options as $key => $value) { - $method = 'set' . ucfirst($key); - if (in_array($method, $methods)) { - $this->$method($value); - } - } - return $this; - } - - public function setTitle($text) - { - $this->_title = (string) $text; - return $this; - } - public function getTitle() - { - return $this->_title; - } - - public function setName($text) - { - $this->_name = (string) $text; - return $this; - } - public function getName() - { - return $this->_name; - } - public function setFirstname($text) - { - $this->_firstname = (string) $text; - return $this; - } - public function getFirstname() - { - return $this->_firstname; - } - - public function setStreet($text) - { - $this->_street = (string) $text; - return $this; - } - public function getStreet() - { - return $this->_street; - } - - public function setHousenumber($text) - { - $this->_housenumber = (string) $text; - return $this; - } - public function getHousenumber() - { - return $this->_housenumber; - } - - public function setCity($text) - { - $this->_city = (string) $text; - return $this; - } - public function getCity() - { - return $this->_city; - } - - public function setPostalcode($text) - { - $this->_postalcode = (string) $text; - return $this; - } - public function getPostalcode() - { - return $this->_postalcode; - } - public function setLogindate($text) - { - $this->_logindate = (string) $text; - return $this; - } - public function getLogindate() - { - return $this->_logindate; - } - public function setRegisterdate($text) - { - $this->_registerdate = (string) $text; - return $this; - } - public function getRegisterdate() - { - return $this->_registerdate; - } - - registerdate - - public function setEmail($email) - { - $this->_email = (string) $email; - return $this; - } - public function getEmail() - { - return $this->_email; - } - - public function setLogin($login) - { - $this->_login = (string) $login; - return $this; - } - public function getLogin() - { - return $this->_login; - } - public function setPassword($login) - { - $this->_password = (string) $login; - return $this; - } - public function getPassword() - { - return $this->_password; - } - - - public function setPersonID($id) - { - $this->_personID = (int) $id; - return $this; - } - public function getPersonID() - { - return $this->_personID; - } -} - -- cgit v1.2.3-55-g7522