diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2010-10-17 13:29:57 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2010-10-17 13:29:57 +0000 |
commit | 232aa1924c8c0f10d87b210b46c9f061af5c844c (patch) | |
tree | 2351f2aaff7ad244f60358954e4711692fb8aadc /h-source | |
parent | a17e3e0495bee3705d3c1e5ead2db1a8359e64e9 (diff) |
added files
Diffstat (limited to 'h-source')
488 files changed, 48827 insertions, 0 deletions
diff --git a/h-source/.htaccess b/h-source/.htaccess new file mode 100755 index 0000000..d27d849 --- /dev/null +++ b/h-source/.htaccess @@ -0,0 +1,9 @@ +# <IfModule mod_rewrite.c> +# Options +FollowSymlinks + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] +# </IfModule> + + diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php new file mode 100644 index 0000000..b201165 --- /dev/null +++ b/h-source/Application/Controllers/BaseController.php @@ -0,0 +1,171 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class BaseController extends Controller +{ + + protected $lang; + protected $ismoderator; + protected $querySanitized = true; + + protected $_topMenuClasses = array( + "home" => null, + "hardware" => null, + "credits" => null, + "issues" => null, + "contact" => null, + "search" => null, + "news" => null, + "download" => null, + "help" => null, + ); + + public function __construct($model, $controller, $queryString) { + parent::__construct($model, $controller, $queryString); + + header("Cache-Control: no-cache"); + + $this->model('BoxesModel'); + + $this->load('header'); + $this->load('footer','last'); + + $this->session('registered'); + $this->s['registered']->checkStatus(); + + $data['username'] = null; + $data['islogged'] = 'no'; + $data['token'] = 'token'; + $data['ismoderator'] = false; + $this->ismoderator = false; + + if ($this->s['registered']->status['status'] === 'logged') + { + $data['username'] = $this->s['registered']->status['user']; + $data['islogged'] = 'yes'; + $data['token'] = $this->s['registered']->status['token']; + $data['ismoderator'] = in_array('moderator',$this->s['registered']->status['groups']) ? true : false; + $this->ismoderator = $data['ismoderator']; + } + + $data['lang'] = 'en'; + $this->lang = 'en'; + + if (isset($this->_queryString[0])) + { + $lang = (strcmp($this->_queryString[0],'') !== 0) ? $this->_queryString[0] : 'en'; + $data['lang'] = Lang::sanitize($lang); + $this->lang = $data['lang']; + Lang::$current = $data['lang']; + } + + $data['tm'] = $this->_topMenuClasses; + +// print_r($this->_queryString); + $this->_queryString = $this->sanitizeQueryString($this->_queryString); + + $this->append($data); + + } + + protected function right($lang = 'en') + { + $hard = new HardwareModel(); + + $data['stat'] = $hard->clear()->select('type,count(*) AS numb')->where(array('-deleted'=>'no'))->groupBy('type')->toList('type','aggregate.numb')->send(); + + $logged = $this->s['registered']->getUsersLogged(); + + $data['numbLogged'] = count($logged); + + // get the right column container + $this->m['BoxesModel']->setWhereQueryClause(array('title'=>'right_bottom')); + $boxes = $this->m['BoxesModel']->getAll('boxes'); + + if (count($boxes) > 0) + { + $xml = htmlspecialchars_decode($boxes[0]['boxes']['message'],ENT_QUOTES); + + $box_news = new BoxParser($xml); + $data['htmlRightBox'] = $box_news->render(); + } + else + { + $data['htmlRightBox'] = null; + } + + $data['language_links'] = $this->buildLanguageLinks($this->lang); + +// print_r($this->_queryString); + + $this->append($data); + $this->load('right'); + } + + protected function sanitizeQueryString($queryArray) + { + $resArray = array(); + foreach ($queryArray as $item) + { + if (preg_match('/^[a-zA-Z0-9\-\_\.\+\s]+$/',$item)) + { + $resArray[] = sanitizeAll($item); + } + else + { + $this->querySanitized = false; + return array('en'); + } + } + return $resArray; + } + + protected function buildLanguageLinks($lang) + { + $status = $this->_queryString; + $cPage = $this->querySanitized ? $this->currPage : $this->baseUrl."/home/index"; + $link = "<ul class='languages_link_box'>\n"; + foreach (Lang::$complete as $abbr => $fullName) + { + $linkClass = (strcmp($abbr,$lang) === 0) ? "class='current_lang'" : null; + $status[0] = $abbr; + $href = Url::createUrl($status); + $fullNameArray = explode(',',$fullName); + $text = "<img src='".$this->baseUrl."/Public/Img/Famfamfam/".$fullNameArray[0]."'><span>".$fullNameArray[1]."</span>"; + $link .= "\t<li><a $linkClass href='".$cPage.$href."'>$text</a></li>\n"; + } + $link .= "</ul>\n"; + return $link; + } + + protected function cleverLoad($file) + { + $fileInt = $file."_".$this->lang; + if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . ucwords($this->controller) . DS . $fileInt . '.php')) + { + $this->load($fileInt); + } + else + { + $this->load($file); + } + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/ContactController.php b/h-source/Application/Controllers/ContactController.php new file mode 100644 index 0000000..f1fe89e --- /dev/null +++ b/h-source/Application/Controllers/ContactController.php @@ -0,0 +1,41 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ContactController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['contact'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'contact - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { + $this->cleverLoad('index'); + $this->right(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/CreditsController.php b/h-source/Application/Controllers/CreditsController.php new file mode 100644 index 0000000..ba19624 --- /dev/null +++ b/h-source/Application/Controllers/CreditsController.php @@ -0,0 +1,41 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class CreditsController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['credits'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'credits - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { + $this->cleverLoad('index'); + $this->right(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php new file mode 100644 index 0000000..4952456 --- /dev/null +++ b/h-source/Application/Controllers/DownloadController.php @@ -0,0 +1,199 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class DownloadController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['download'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $this->model('HardwareModel'); + + $data['title'] = 'download - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { + $this->cleverLoad('index'); + $this->right($lang); + } + + //get the xml of the archive + private function getXml($res) + { + $xml = null; + $xml = "<?xml version='1.0' encoding='UTF-8'?>\n"; + $xml .= "<hardware>\n"; + $xml .= "\t<general_informations>\n"; + $xml .= "\t\t<credits>h-node project</credits>\n"; + $xml .= "\t\t<link>www.h-node.com</link>\n"; + $xml .= "\t\t<date>".date("Y-m-d h:m:s")."</date>\n"; + $xml .= "\t\t<license>The contents of this page are in the Public Domain (see the CC0 page at http://creativecommons.org/publicdomain/zero/1.0/ for detailed information). Anyone is free to copy, modify, publish, use, sell, or distribute the text for any purpose, commercial or non-commercial, and by any means.</license>\n"; + $xml .= "\t</general_informations>\n"; + + foreach ($res as $row) + { + $type = $row['hardware']['type']; + $xml .= "\t<device>\n"; + + $xml .= "\t\t<id>".$row['hardware']['id_hard']."</id>\n"; + $xml .= "\t\t<type>".$row['hardware']['type']."</type>\n"; + + if ($type === 'notebook') + { + $xml .= "\t\t<subtype>".$row['hardware']['subtype']."</subtype>\n"; + } + + $xml .= "\t\t<model_name>".$row['hardware']['model']."</model_name>\n"; + + if ($type !== 'notebook') + { + $xml .= "\t\t<vendorid_productid>".$row['hardware']['pci_id']."</vendorid_productid>\n"; + } + + $xml .= "\t\t<vendor>".$row['hardware']['vendor']."</vendor>\n"; + $xml .= "\t\t<kernel_libre>".$row['hardware']['kernel']."</kernel_libre>\n"; + $xml .= "\t\t<distribution>".$row['hardware']['distribution']."</distribution>\n"; + $xml .= "\t\t<year>".$row['hardware']['comm_year']."</year>\n"; + if ($type !== 'notebook') + { + $xml .= "\t\t<interface>".$row['hardware']['interface']."</interface>\n"; + } + + if ($type === 'notebook' or $type === 'printer' or $type === 'scanner') + { + $xml .= "\t\t<compatibility>".$row['hardware']['compatibility']."</compatibility>\n"; + } + + if ($type === 'notebook') + { + $xml .= "\t\t<wifi_card>".$row['hardware']['wifi_type']."</wifi_card>\n"; + $xml .= "\t\t<videocard>".$row['hardware']['video_card_type']."</videocard>\n"; + } + + if ($type === 'notebook' or $type === 'wifi') + { + $xml .= "\t\t<wifi_works>".$row['hardware']['wifi_works']."</wifi_works>\n"; + } + + if ($type === 'notebook' or $type === 'videocard') + { + $xml .= "\t\t<videocard_works>".$row['hardware']['video_card_works']."</videocard_works>\n"; + } + if ($type === 'printer' or $type === 'scanner') + { + $xml .= "\t\t<driver>".$row['hardware']['driver']."</driver>\n"; + } + $xml .= "\t\t<description><![CDATA[".$row['hardware']['description']."]]></description>\n"; + + $xml .= "\t\t<link>".$this->baseUrl."/".MyStrings::$reverse[$type]."/view/".$this->lang."/".$row['hardware']['id_hard']."/".encodeUrl($row['hardware']['model'])."</link>\n"; + $xml .= "\t\t<created_by>".$this->baseUrl."/".MyStrings::$reverse[$type]."/history/".$this->lang."/".$row['hardware']['id_hard']."</created_by>\n"; + + $xml .= "\t</device>\n"; + } + + $xml .= "</hardware>\n"; + + return $xml; + } + + public function all($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } + + public function notebooks($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'notebook','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } + + public function wifi($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'wifi','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } + + public function videocards($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'videocard','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } + + public function printers($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'printer','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } + + public function scanners($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'scanner','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php new file mode 100644 index 0000000..a08956e --- /dev/null +++ b/h-source/Application/Controllers/GenericController.php @@ -0,0 +1,658 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class GenericController extends BaseController +{ + + protected $_controllerName = null; //as in the URL + + public $orderPopup; + + public function __construct($model, $controller, $queryString) { + parent::__construct($model, $controller, $queryString); + + $popup = new Popup(); + $popup->name = gtext('sort by'); + switch ($this->controller) + { + case 'wifi': + $popup->itemsName = array('last inserted','alphabetically','alphabetically desc'); + $popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc'); + break; + case 'videocards': + $popup->itemsName = array('last inserted','alphabetically','alphabetically desc'); + $popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc'); + break; + default: + $popup->itemsName = array('last inserted','alphabetically','alphabetically desc','compatibility'); + $popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc','compatibility'); + break; + } + + $this->orderPopup = $popup; + + } + + protected function insert($lang = 'en', $token = '') + { + $this->shift(2); + + $clean['token'] = sanitizeAlphanum($token); + + $data['notice'] = null; + $data['tree'] = $this->getSpecHardLink() . " » " . " <span class='last_tree_element'>insert</span>"; + + $this->s['registered']->checkStatus(); + + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..'); + + if (isset($_POST['insertAction'])) + { + if ($this->checkDist()) + { + $pci_id = $this->request->post('pci_id','','sanitizeAll'); + if (strcmp($pci_id,'') !== 0) + { + $this->m['HardwareModel']->databaseConditions['insert']['+checkUnique'] = 'pci_id|<i>VendorID:ProductID</i> is already present in the database. This means that the device you are trying to insert is already in the database'; + } + + //insert the new device + $this->m['HardwareModel']->updateTable('insert'); + + if ($this->m['HardwareModel']->queryResult) + { + if (strcmp($this->controller,'notebooks') === 0) + { + session_start(); + $_SESSION['notebook_inserted'] = 'yes'; + } + } + + $this->viewRedirect($this->m['HardwareModel']->lastId); + } + } + + $data['notice'] = $this->m['HardwareModel']->notice; + + $data['submitName'] = "insertAction"; + $data['hiddenInput'] = null; + + $data['values'] = $this->m['HardwareModel']->getFormValues('insert','sanitizeHtml'); + $this->append($data); + + $this->load('top_left'); + $this->load('license_notice'); + $this->load('form'); + $this->load('bottom_left'); + $this->right(); + } + else + { + $this->redirect('users/login/'.$this->lang.'/'.$this->controller.'/catalogue',0); + } + } + + public function del($lang = 'en', $token = '') + { + header('Content-type: text/html; charset=UTF-8'); + + $this->shift(2); + + $this->clean(); + + $clean['token'] = sanitizeAlphanum($token); + + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) die("wrong token"); + + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + $clean['id_hard'] = $this->request->post('id_hard',0,'forceInt'); + + $this->model("DeletionModel"); + + $numb = $this->m['DeletionModel']->where(array("id_hard"=>$clean['id_hard'],"created_by"=>$clean['id_user']))->rowNumber(); + + if ($numb === 0) + { + $id_dup = $this->request->post('id_duplicate',0,'forceInt'); + $object = $this->request->post('object','','sanitizeAll'); + + if ($id_dup === 0 and strcmp($object,'duplication') === 0) + { + echo "you have no specified the device duplicated by this model"; + } + else + { + $this->m['DeletionModel']->setFields('id_hard:forceInt,object,message,id_duplicate:forceInt','sanitizeAll'); + $this->m['DeletionModel']->values['created_by'] = $clean['id_user']; + + $this->m['DeletionModel']->updateTable('insert'); + if ($this->m['DeletionModel']->queryResult) + { + $hard = new HardwareModel(); + $c = $hard->where(array('id_hard'=>$clean['id_hard'],'ask_for_del'=>'yes'))->rowNumber(); + if ($c < 1) + { + $hard->db->update('hardware','ask_for_del',array('yes'),'id_hard='.$clean['id_hard']); + } + echo "operation executed"; + } + else + { + echo "one error occurred, please try later"; + } + } + } + else + { + echo "you have already asked for the deletion of this device"; + } + } + } + + protected function update($lang = 'en', $token = '') + { + $this->shift(2); + + $clean['token'] = sanitizeAlphanum($token); + + $data['notice'] = null; + $this->s['registered']->checkStatus(); + + if (isset($_POST['id_hard'])) + { + //get the id + $clean['id_hard'] = isset($_POST['id_hard']) ? (int)$_POST['id_hard'] : 0; + + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..'); + + $deleted = $this->m['HardwareModel']->select("hardware.deleted")->where(array("id_hard"=>$clean['id_hard']))->limit(1)->toList('deleted')->send(); + + if (strcmp($deleted[0],'no') === 0) + { + $ne_name = $this->m['HardwareModel']->getTheModelName($clean['id_hard']); + $name = encodeUrl($ne_name); + $data['name'] = $name; + $data['ne_name'] = $ne_name; + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id_hard'],$name) . " » <span class='last_tree_element'>edit</span>"; + + if (isset($_POST['updateAction'])) + { + if ($this->checkDist()) + { + $pci_id = $this->request->post('pci_id','','sanitizeAll'); + if (strcmp($pci_id,'') !== 0) + { + $this->m['HardwareModel']->databaseConditions['update']['+checkUniqueCompl'] = 'pci_id|<i>VendorID:ProductID</i> is already present in the database. This means that the device you are trying to insert is already in the database'; + } + + //carry out the update database action + $this->m['HardwareModel']->updateTable('update'); + + $this->viewRedirect($this->m['HardwareModel']->lastId); + } + } + + $data['notice'] = $this->m['HardwareModel']->notice; + + $data['id_hard'] = $clean['id_hard']; + $data['submitName'] = "updateAction"; + // echo $this->m['HardwareModel']->fields; + $data['values'] = $this->m['HardwareModel']->getFormValues('update','sanitizeHtml'); + $data['hiddenInput'] = "<input type='hidden' name='id_hard' value='".$clean['id_hard']."'>\n"; + + $this->append($data); + + $this->load('top_left'); + $this->load('license_notice'); + $this->load('form'); + $this->load('bottom_left'); + $this->right(); + } + else + { + $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'deleted..'); + } + } + else + { + $this->redirect('users/login/'.$this->lang.'/'.$this->controller.'/view/'.$clean['id_hard'],0); + } + } + else + { + $this->redirect($this->controller.'/catalogue/'.$this->lang); + } + } + + protected function checkDist() + { + if (array_key_exists('distribution',$_POST)) + { + if (strcmp($_POST['distribution'],"") !== 0) + { + if (Distributions::check($_POST['distribution'])) + { + return true; + } + else + { + $this->m['HardwareModel']->result = false; + $this->m['HardwareModel']->notice = "<div class='alert'>Distribution not allowed..</div>\n"; + return false; + } + } + else + { + $this->m['HardwareModel']->result = false; + $this->m['HardwareModel']->notice = "<div class='alert'>Distribution not defined..</div>\n"; + return false; + } + } + $this->m['HardwareModel']->result = false; + return false; + } + + protected function viewRedirect($id) + { + $clean['id'] = (int)$id; + + if ($this->m['HardwareModel']->queryResult) + { + $name = encodeUrl($this->m['HardwareModel']->getTheModelName($clean['id'])); + $this->redirect($this->controller.'/view/'.$this->lang.'/'.$clean['id'].'/'.$name.$this->viewStatus); + } + } + + //load the view files + protected function loadViewAll($viewName = null) + { + $this->load('top_left'); + $viewArray = explode(',',$viewName); + foreach ($viewArray as $viewFile) + { + $this->load($viewFile); + } + $this->load('bottom_left'); + $this->right(); + } + + protected function catalogue($lang = 'en') + { + $data['title'] = $this->controller.' - '.Website::$generalName; + + Params::$nullQueryValue = 'undef'; + + $data['tree'] = $this->controller; + + $this->mod->aWhere(array("deleted"=>"no")); + + $this->mod->popupBuild(); + $popup = $this->mod->popupArray; + $popup['sort-by'] = $this->orderPopup; + + $this->helper('Popup',$this->controller.'/catalogue/'.$this->lang,$popup,'inclusive','page'); + //create the HTML of the popup + $data['popup'] = $this->h['Popup']->render(); + + $this->mod->orderBy = getOrderByClause($this->viewArgs['sort-by']); + $recordNumber = $this->mod->rowNumber(); + + $data['recordNumber'] = $recordNumber; + + //load the Pages helper + $this->helper('Pages',$this->controller.'/catalogue/'.$this->lang,'page'); + $page = $this->viewArgs['page']; + //set the limit clause + $this->mod->limit = $this->h['Pages']->getLimit($page,$recordNumber,10); + + $data['table'] = $this->mod->getAll(); +// echo $this->mod->getQuery(); + + $data['pageList'] = $this->h['Pages']->render($page-3,7); + + $this->append($data); + + $this->loadViewAll('catalogue'); + } + + protected function view($lang = 'en', $id_hard = 0, $name = null) + { + $this->shift(3); + + //set the history_page to 1 in the viewStatus + $this->viewArgs['history_page'] = 1; + $this->buildStatus(); + + $clean['id_hard'] = (int)$id_hard; + $data['id_hard'] = $clean['id_hard']; + $data['ne_name'] = null; + $data['name'] = null; + $data['tree'] = null; + $data['isDeleted'] = 'no'; + + if ($this->mod->checkType($clean['id_hard'])) + { + $this->mod->setWhereQueryClause(array("id_hard" => $clean['id_hard'])); + $data['table'] = $this->mod->getAll(); + + if (count($data['table']) > 0) + { + + $data['talk_number'] = $this->m['TalkModel']->select('count(*) as numb,id_hard')->where(array('id_hard'=>$clean['id_hard']))->rowNumber(); + + $data['ne_name'] = $data['table'][0]['hardware']['model']; + $data['name'] = encodeUrl($data['ne_name']); + $data['title'] = $data['ne_name'].' - '.Website::$generalName; + $data['tree'] = $this->getSpecHardLink() . " » <span class='last_tree_element'>".$data['ne_name']."</span>"; + $data['isDeleted'] = $data['table'][0]['hardware']['deleted']; + + if (strcmp($data['isDeleted'],'yes') === 0) + { + $deletion = new DeletionModel(); + $data['deletion'] = $deletion->select()->where(array('id_hard'=>$clean['id_hard']))->send(); + $data['deletionUsers'] = $deletion->getList($data['deletion'],'created_by'); + } + } + + $this->append($data); + + session_start(); + if ( isset($_SESSION['notebook_inserted']) and strcmp($this->controller,'notebooks') === 0 ) + { + $viewFilesList = 'suggest_dialog,dialog,page,if_page_deleted'; + unset($_SESSION['notebook_inserted']); + } + else + { + $viewFilesList = 'dialog,page,if_page_deleted'; + } + + $this->loadViewAll($viewFilesList); + } + else + { +// $this->redirect($this->_controller.'/'.); + } + } + + protected function history($lang = 'en', $id = 0) + { + $this->shift(2); + $clean['id'] = (int)$id; + $data['id'] = $clean['id']; + $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id']); + $data['name'] = encodeUrl($data['ne_name']); + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id'],$data['name'])." » <span class='last_tree_element'>history</span>"; + + $data['title'] = 'history - '.Website::$generalName; + + //get the first revision + $res = $this->m['RevisionsModel']->db->select('revisions','id_rev','id_hard='.$clean['id'],null,'id_rev',1); + if (count($res) > 0) + { + $data['firstRev'] = $res[0]['revisions']['id_rev']; + } + + $res1 = $this->m['HardwareModel']->db->select('hardware','update_date,updated_by','id_hard='.$clean['id']); + + $this->m['RevisionsModel']->setWhereQueryClause(array('id_hard' => $clean['id'])); + + //load the Pages helper + $this->helper('Pages',$this->controller.'/history/'.$this->lang.'/'.$clean['id'],'history_page'); + //get the number of records + $recordNumber = $this->m['RevisionsModel']->rowNumber(); + $page = $this->viewArgs['history_page']; + //set the limit clause + $this->m['RevisionsModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20); + $res2 = $this->m['RevisionsModel']->getFields('update_date,updated_by,id_rev'); + + $data['pageList'] = $this->h['Pages']->render($page-3,7); + + + $data['rev1'] = $res1; + $data['rev2'] = $res2; + + $this->append($data); + $this->loadViewAll('history'); + } + + protected function revision($lang = 'en', $id_rev = 0) + { + $this->shift(2); + $clean['id_rev'] = (int)$id_rev; + + $this->m['RevisionsModel']->setWhereQueryClause(array("id_rev" => $clean['id_rev'])); + $data['table'] = $this->m['RevisionsModel']->getAll(); + + $data['id_hard'] = 0; + $data['updated_by'] = null; + $data['update_date'] = null; + $data['name'] = null; + $data['ne_name'] = null; + $data['tree'] = null; + $data['isDeleted'] = 'no'; + + if (count($data['table']) > 0) + { + $data['id_hard'] = (int)$data['table'][0]['revisions']['id_hard']; + $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($data['id_hard']); + $data['name'] = encodeUrl($data['ne_name']); + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['name'])." » " . $this->getHistoryLink($data['id_hard']) . " » <span class='last_tree_element'>revision</span>"; + + $data['title'] = 'revision - '.Website::$generalName; + + $data['updated_by'] = $data['table'][0]['revisions']['updated_by']; + $data['update_date'] = $data['table'][0]['revisions']['update_date']; + } + + $this->append($data); + $this->loadViewAll('page'); + } + + protected function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + $this->shift(3); + + $data['title'] = 'differences - '.Website::$generalName; + + $clean['id_hard'] = (int)$id_hard; + $clean['id_rev'] = (int)$id_rev; + + $data['id_hard'] = $clean['id_hard']; + $data['name'] = encodeUrl($this->m['HardwareModel']->getTheModelName((int)$data['id_hard'])); + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['name'])." » " . $this->getHistoryLink($clean['id_hard']) . " » <span class='last_tree_element'>differences</span>"; + + $data['showDiff'] = false; + + $diffArray = array(); + + if (strcmp($clean['id_hard'],0) !== 0 and strcmp($clean['id_rev'],0) !== 0) + { + $this->m['RevisionsModel']->setWhereQueryClause(array('id_hard' => $clean['id_hard'],'id_rev' => '<='.$clean['id_rev'])); + $this->m['RevisionsModel']->limit = 2; + $res = $this->m['RevisionsModel']->getAll(); + if (count($res) > 1) + { + $newArray = $res[0]['revisions']; + $oldArray = $res[1]['revisions']; + + $data['update_new'] = $newArray['update_date']; + $data['update_old'] = $oldArray['update_date']; + $data['updated_by'] = $newArray['updated_by']; + + $diffArray = $this->mod->getDiffArray($oldArray, $newArray); + + $data['showDiff'] = true; + } + } + else if (strcmp($clean['id_hard'],0) !== 0 and strcmp($clean['id_rev'],0) === 0) + { + $this->mod->setWhereQueryClause(array('id_hard' => $clean['id_hard'])); + $lastRes = $this->mod->getAll(); + + if (count($lastRes) > 0) + { + $this->m['RevisionsModel']->setWhereQueryClause(array('id_hard' => $clean['id_hard'])); + $this->m['RevisionsModel']->limit = 1; + $revRes = $this->m['RevisionsModel']->getAll(); + + if (count($revRes) > 0) + { + $newArray = $lastRes[0]['hardware']; + $oldArray = $revRes[0]['revisions']; + + $data['update_new'] = $newArray['update_date']; + $data['update_old'] = $oldArray['update_date']; + $data['updated_by'] = $newArray['updated_by']; + + $diffArray = $this->mod->getDiffArray($oldArray, $newArray); + + $data['showDiff'] = true; + } + } + + } + + $data['fieldsWithBreaks'] = $this->mod->fieldsWithBreaks; + $data['diffArray'] = $diffArray; + + $this->append($data); + $this->loadViewAll('differences'); + } + + protected function climb($lang = 'en', $id_rev = 0, $token = '') + { + $this->shift(3); + + $data['title'] = 'make current - '.Website::$generalName; + + $clean['token'] = sanitizeAlphanum($token); + + $clean['id_rev'] = (int)$id_rev; + $clean['id_hard'] = (int)$this->m['RevisionsModel']->getIdHard($clean['id_rev']); + + if ($clean['id_hard'] !== 0) + { + $deleted = $this->m['HardwareModel']->select("hardware.deleted")->where(array("id_hard"=>$clean['id_hard']))->limit(1)->toList('deleted')->send(); + + $data['isDeleted'] = $deleted[0]; + + $data['id_rev'] = $clean['id_rev']; + $data['id_hard'] = $clean['id_hard']; + $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id_hard']); + $data['name'] = encodeUrl($data['ne_name']); + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($data['id_hard'],$data['name'])." » " . $this->getHistoryLink($clean['id_hard']) . " » <span class='last_tree_element'>make current</span>"; + + $data['notice'] = null; + $this->s['registered']->checkStatus(); + + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..'); + + if (isset($_POST['confirmAction'])) + { + if (strcmp($deleted[0],'no') === 0) + { + $this->m['HardwareModel']->makeCurrent($clean['id_rev']); + + $this->viewRedirect($this->m['HardwareModel']->lastId); + + $data['notice'] = $this->m['HardwareModel']->notice; + } + else + { + $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'deleted..'); + } + } + + $this->append($data); + $this->loadViewAll('climb'); + } + else + { + $this->redirect('users/login/'.$this->lang.'/'.$this->controller.'/view/'.$clean['id_hard'],0); + } + } + } + + protected function talk($lang = 'en', $id_hard = 0, $token = 'token') + { + $this->shift(3); + + $this->m['TalkModel']->setFields('title,message','sanitizeAll'); + + $data['title'] = 'talk - '.Website::$generalName; + + $clean['token'] = sanitizeAlphanum($token); + $clean['id_hard'] = (int)$id_hard; + $data['id_hard'] = $clean['id_hard']; + $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id_hard']); + $data['name'] = encodeUrl($data['ne_name']); + $data['tree'] = $this->getSpecHardLink() . " » " . $this->getViewLink($clean['id_hard'],$data['name'])." » <span class='last_tree_element'>talk</span>"; + + if (isset($_POST['insertAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..'); + + $this->m['TalkModel']->values['created_by'] = $this->s['registered']->status['id_user']; + $this->m['TalkModel']->values['id_hard'] = $clean['id_hard']; + + $this->m['TalkModel']->updateTable('insert'); + } + } + + $data['table'] = $this->m['TalkModel']->select()->where(array('id_hard'=>$clean['id_hard']))->orderBy('id_talk')->send(); + + $data['values'] = $this->m['TalkModel']->getFormValues('insert','sanitizeHtml'); + $data['notice'] = $this->m['TalkModel']->notice; + +// javascript for moderator + $data['md_javascript'] = "moderator_dialog(\"hide\",\"talk\");moderator_dialog(\"show\",\"talk\");"; + $data['go_to'] = $this->currPage."/".$this->lang."/".$clean['id_hard']; + + $this->append($data); + $this->loadViewAll('talk,moderator_dialog'); + } + + protected function getViewLink($id,$name) + { + return "<a href='".$this->baseUrl.'/'.$this->controller.'/view/'.$this->lang.'/'.$id.'/'.$name.$this->viewStatus."'>".urldecode($name)."</a>"; + } + + protected function getHistoryLink($id) + { + return "<a href='".$this->baseUrl.'/'.$this->controller.'/history/'.$this->lang.'/'.$id.'/'.$this->viewStatus."'>history</a>"; + } + + protected function getSpecHardLink() + { + return "<a href='".$this->baseUrl.'/'.$this->controller.'/catalogue/'.$this->lang.$this->viewStatus."'>".$this->controller."</a>"; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/HardwareController.php b/h-source/Application/Controllers/HardwareController.php new file mode 100644 index 0000000..6a189ed --- /dev/null +++ b/h-source/Application/Controllers/HardwareController.php @@ -0,0 +1,41 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HardwareController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['hardware'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'hardware - '.Website::$generalName; + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->load('left'); + $this->right(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/HelpController.php b/h-source/Application/Controllers/HelpController.php new file mode 100644 index 0000000..40908cf --- /dev/null +++ b/h-source/Application/Controllers/HelpController.php @@ -0,0 +1,40 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HelpController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['help'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'help index - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { + $this->cleverLoad('index'); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php new file mode 100644 index 0000000..2d965ac --- /dev/null +++ b/h-source/Application/Controllers/HistoryController.php @@ -0,0 +1,185 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HistoryController extends BaseController +{ + + protected $strings = array( + + 'hide' => array( + + 'action' => 'hide', + 'check_status' => 'no', + 'to_status' => 'yes', + 'exec_string' => 'The message has been hidden. Just reload the page', + 'error_string' => 'Error: the message is already hidden', + + ), + + 'show' => array( + + 'action' => 'show', + 'check_status' => 'yes', + 'to_status' => 'no', + 'exec_string' => 'The message is no more hidden. Just reload the page', + 'error_string' => 'Error: the message is already visible', + + ), + + ); + + protected $types = array( + + 'message' => array( + + 'clean_type' => 'message', + 'model_name' => 'MessagesModel', + 'id_name' => 'id_mes', + + ), + + 'talk' => array( + + 'clean_type' => 'talk', + 'model_name' => 'TalkModel', + 'id_name' => 'id_talk', + + ), + + ); + + public function __construct($model, $controller, $queryString) + { + parent::__construct($model, $controller, $queryString); + + $this->model('HistoryModel'); + + } + + public function hide($lang = 'en', $token = '') + { + $this->generic($lang, $token, 'hide'); + } + + public function show($lang = 'en', $token = '') + { + $this->generic($lang, $token, 'show'); + } + + protected function generic($lang = 'en', $token = '', $action = 'hide') + { + header('Content-type: text/html; charset=UTF-8'); + + $this->shift(2); + + $this->clean(); + + $clean['token'] = sanitizeAlphanum($token); + + if ($this->s['registered']->status['status'] === 'logged') + { + if ($this->ismoderator) + { + if (!$this->s['registered']->checkCsrf($clean['token'])) die("wrong token"); + + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + $clean['id'] = $this->request->post('id',0,'forceInt'); + $type = $this->request->post('type',0,'sanitizeAll'); + $message = $this->request->post('message',''); + + $modelName = 'error'; + + if (array_key_exists($type,$this->types)) + { + $modelName = $this->types[$type]['model_name']; + $clean['type'] = $this->types[$type]['clean_type']; + $clean['id_name'] = $this->types[$type]['id_name']; + + //load the right model + $this->model($modelName); + $model = $this->m[$modelName]; + + $count = $model->select()->where(array($clean['id_name'] => $clean['id'],'deleted' => $this->strings[$action]['check_status']))->rowNumber(); + + if ($count > 0) + { + if (eg_strlen($message) < 500) + { + //hide the message + $model->values = array('deleted' => $this->strings[$action]['to_status']); + $model->update($clean['id']); + + if ($model->queryResult) + { + $this->m['HistoryModel']->setFields('id:forceInt,type,message','sanitizeAll'); + $this->m['HistoryModel']->values['created_by'] = $clean['id_user']; + $this->m['HistoryModel']->values['action'] = $this->strings[$action]['action']; + $this->m['HistoryModel']->updateTable('insert'); + + echo $this->strings[$action]['exec_string']; + } + else + { + echo "error: one error occurred, please retry later"; + } + } + else + { + echo "error: the message has too many characters or wrong type"; + } + } + else + { + echo $this->strings[$action]['error_string']; + } + } + } + } + } + + public function viewall($lang = 'en', $type = 'message', $id = 0) + { + header('Content-type: text/html; charset=UTF-8'); + + $this->shift(3); + + $this->clean(); + + if ($this->s['registered']->status['status'] === 'logged') + { + if ($this->ismoderator) + { + $clean['id'] = (int)$id; + if (array_key_exists($type,$this->types)) + { + $clean['type'] = $this->types[$type]['clean_type']; + + $data['res'] = $this->m['HistoryModel']->select()->where(array('id'=>$clean['id'],'type'=>$clean['type']))->send(); + + $data['md_action'] = array('hide'=>'hidden','show'=>'restored'); + + $this->append($data); + $this->load('viewall'); + } + } + } + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/HomeController.php b/h-source/Application/Controllers/HomeController.php new file mode 100644 index 0000000..593d7b0 --- /dev/null +++ b/h-source/Application/Controllers/HomeController.php @@ -0,0 +1,58 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HomeController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['home'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'home - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { +// get the news container + $this->m['BoxesModel']->setWhereQueryClause(array('title'=>'home_news')); + $boxes = $this->m['BoxesModel']->getAll('boxes'); + + if (count($boxes) > 0) + { + $xml = htmlspecialchars_decode($boxes[0]['boxes']['message'],ENT_QUOTES); + + $box_news = new BoxParser($xml); + $data['htmlNewsBox'] = $box_news->render(); + } + else + { + $data['htmlNewsBox'] = null; + } + + $this->append($data); + $this->cleverLoad('left'); + $this->right($lang); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/ImageController.php b/h-source/Application/Controllers/ImageController.php new file mode 100644 index 0000000..471c634 --- /dev/null +++ b/h-source/Application/Controllers/ImageController.php @@ -0,0 +1,39 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ImageController extends Controller { + + public function captcha() + { + session_start(); + + $params = array( + 'fontPath' => ROOT.'/External/Fonts/FreeFont/FreeMono.ttf', + 'boxHeight' => 100, + 'boxWidth' => 200, + 'undulation'=> true, + 'align' => false + ); + + $captcha = new Image_Gd_Captcha($params); + $captcha->render(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php new file mode 100644 index 0000000..02f6499 --- /dev/null +++ b/h-source/Application/Controllers/IssuesController.php @@ -0,0 +1,171 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class IssuesController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['issues'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $this->model('IssuesModel'); + $this->model('MessagesModel'); + + $argKeys = array( + 'page:forceNat' => 1, + 'token:sanitizeAlphanum' => 'token' + ); + + $this->setArgKeys($argKeys); + + $this->m['IssuesModel']->setFields('title,topic,priority,message','sanitizeAll'); + + $data['title'] = 'issues - '.Website::$generalName; + $this->append($data); + } + + public function viewall($lang = 'en') + { + $this->shift(1); + + $data['preview_message'] = null; + + if (isset($_POST['insertAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..'); + + //set the page to 1 in the viewStatus + $this->viewArgs['page'] = 1; + $this->buildStatus(); + + $this->m['IssuesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user']; + $this->m['IssuesModel']->values['status'] = 'opened'; + + $this->m['IssuesModel']->updateTable('insert'); + } + } + + //if preview + if (isset($_POST['previewAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..'); + + $data['preview_message'] = $this->request->post('message','','sanitizeHtml'); + $this->m['IssuesModel']->result = false; + } + } + + $data['notice'] = $this->m['IssuesModel']->notice; + + $this->m['IssuesModel']->setForm('issues/viewall/'.$this->lang.$this->viewStatus."#form",array('previewAction'=>'preview','insertAction'=>'submit')); + + $values = $this->m['IssuesModel']->getFormValues('insert','sanitizeHtml'); + + $data['form'] = $this->m['IssuesModel']->form->render($values); + + //load the Pages helper + $this->helper('Pages',$this->controller.'/viewall/'.$this->lang,'page'); + //get the number of records + $this->m['IssuesModel']->from('issues left join messages')->using('id_issue')->aWhere(array('deleted'=>'no'))->groupBy('issues.id_issue'); + + $recordNumber = $this->m['IssuesModel']->rowNumber(); + $page = $this->viewArgs['page']; + //set the limit clause + $this->m['IssuesModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20); +// $data['table'] = $this->m['IssuesModel']->getFields('id_issue,created_by,title,status,creation_date,topic,priority'); + $data['table'] = $this->m['IssuesModel']->getFields('issues.*,messages.message,count(*) as numb_mess'); + + $data['pageList'] = $this->h['Pages']->render($page-3,7); + + $this->append($data); + $this->load('viewall'); + $this->right(); + } + + public function view($lang = 'en', $id_issue = 0) + { + $this->m['MessagesModel']->setFields('message','sanitizeAll'); + + $this->shift(2); + + $clean['id_issue'] = (int)$id_issue; + $data['id_issue'] = $clean['id_issue']; + $data['preview_message'] = null; + + //if submit + if (isset($_POST['insertAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..'); + + $this->m['MessagesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user']; + $this->m['MessagesModel']->values['id_issue'] = $clean['id_issue']; + $this->m['MessagesModel']->updateTable('insert'); + } + } + + //if preview + if (isset($_POST['previewAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..'); + + $data['preview_message'] = $this->request->post('message','','sanitizeHtml'); + $this->m['MessagesModel']->result = false; + } + } + + $data['notice'] = $this->m['MessagesModel']->notice; + + //create the form + $this->m['MessagesModel']->setForm('issues/view/'.$this->lang."/".$clean['id_issue'].$this->viewStatus."#form",array('previewAction'=>'preview','insertAction'=>'submit')); + + $values = $this->m['MessagesModel']->getFormValues('insert','sanitizeHtml'); + + $data['form'] = $this->m['MessagesModel']->form->render($values); + + //retrieve the values from the table + $data['table'] = $this->m['IssuesModel']->select('id_issue,created_by,title,status,creation_date,topic,priority,message,notice')->where(array('id_issue'=>$clean['id_issue'],'deleted'=>'no'))->send(); + +// javascript for moderator + $data['md_javascript'] = "moderator_dialog(\"hide\",\"message\");moderator_dialog(\"show\",\"message\");"; + $data['go_to'] = $this->currPage."/".$this->lang."/".$clean['id_issue']; + + if (count($data['table']) > 0) + { + $data['messages'] = $this->m['MessagesModel']->select()->where(array('id_issue'=>$clean['id_issue']))->send(); + + $this->append($data); + $this->load('view'); + $this->load('moderator_dialog'); + $this->right(); + } + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/MyController.php b/h-source/Application/Controllers/MyController.php new file mode 100644 index 0000000..75cf794 --- /dev/null +++ b/h-source/Application/Controllers/MyController.php @@ -0,0 +1,209 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class MyController extends BaseController +{ + + public function __construct($model, $controller, $queryString) { + parent::__construct($model, $controller, $queryString); + + $this->model('UsersModel'); + $this->model('ProfileModel'); + + $argKeys = array( + 'token:sanitizeAlphanum' => 'token' + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'my panel'; + $this->append($data); + } + + public function home($lang = 'en') + { + $this->shift(1); + + $data['title'] = 'my panel - '.Website::$generalName; + + $this->s['registered']->check(); + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + $data['username'] = $this->m['UsersModel']->getUser($clean['id_user']); + + $this->append($data); + $this->load('panel'); + $this->right($this->lang); + } + + public function password($lang = 'en') + { + $this->shift(1); + + $data['title'] = 'password - '.Website::$generalName; + + $this->s['registered']->check(); + + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..'); + + $this->m['UsersModel']->setFields('password:sha1','none'); + + $this->m['UsersModel']->strongConditions['update'] = array('checkEqual'=>'password,confirmation'); + + $data['notice'] = null; + + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + + if (isset($_POST['updateAction'])) { + $pass = $this->s['registered']->getPassword(); + if (sha1($_POST['old']) === $pass) + { + $this->m['UsersModel']->updateTable('update',$clean['id_user']); + $data['notice'] = $this->m['UsersModel']->notice; + if ($this->m['UsersModel']->queryResult) + { + $this->s['registered']->logout(); + $this->redirect('home/index/'.$this->lang,2,'logout'); + } + } + else + { + $data['notice'] = "<div class='alert'>The old password is wrong</div>\n"; + } + } + + $values = $this->m['UsersModel']->selectId($clean['id_user']); + $values['old'] = ''; + $values['confirmation'] = ''; + + $action = array('updateAction'=>'save'); + $form = new Form_Form('my/password/'.$this->lang.$this->viewStatus,$action); + $form->setEntry('old','Password'); + $form->entry['old']->labelString = 'old password:'; + $form->setEntry('password','Password'); + $form->setEntry('confirmation','Password'); + $data['form'] = $form->render($values,'old,password,confirmation'); + + $this->append($data); + + $this->load('password'); + $this->right(); + } + + public function email($lang = 'en') + { + $this->shift(1); + + $data['title'] = 'email - '.Website::$generalName; + + $this->s['registered']->check(); + + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..'); + + $this->m['UsersModel']->setFields('e_mail','sanitizeAll'); + + $this->m['UsersModel']->strongConditions['update'] = array('checkMail'=>'e_mail'); + + $this->m['UsersModel']->databaseConditions['update'] = array('checkUniqueCompl'=>'e_mail'); + + $data['notice'] = null; + + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + + $this->m['UsersModel']->updateTable('update',$clean['id_user']); + $data['notice'] = $this->m['UsersModel']->notice; + + $values = $this->m['UsersModel']->selectId($clean['id_user']); + + $action = array('updateAction'=>'save'); + $form = new Form_Form('my/email/'.$this->lang.$this->viewStatus,$action); + $form->setEntry('e_mail','InputText'); + $form->entry['e_mail']->labelString = 'your e-mail address:'; + $data['form'] = $form->render($values,'e_mail'); + + $this->append($data); + + $this->load('email'); + $this->right(); + } + + public function profile($lang = 'en') + { + $this->shift(1); + + $data['title'] = 'profile - '.Website::$generalName; + + $this->s['registered']->check(); + + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..'); + + $this->m['ProfileModel']->setFields('real_name,website,where_you_are,birth_date,fav_distro,projects,publish_mail,description','sanitizeAll'); + + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + + $res = $this->m['ProfileModel']->db->select('profile','id_prof','created_by='.$clean['id_user']); + $clean['id_prof'] = (int)$res[0]['profile']['id_prof']; + + $this->m['ProfileModel']->values['update_date'] = date('Y-m-d H:i:s'); + $this->m['ProfileModel']->updateTable('update',$clean['id_prof']); + $data['notice'] = $this->m['ProfileModel']->notice; + + $values = $this->m['ProfileModel']->getFormValues('update','sanitizeHtml',$clean['id_prof']); + + $this->m['ProfileModel']->setForm('my/profile/'.$this->lang.$this->viewStatus,array('updateAction'=>'save'),'POST'); + $data['form'] = $this->m['ProfileModel']->form->render($values); + + $this->append($data); + + $this->load('profile'); + $this->right(); + } + + public function goodbye($lang = 'en') + { + $data['title'] = 'delete - '.Website::$generalName; + + session_start(); + + $this->shift(1); + + $this->s['registered']->check(); + + if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..'); + + $clean['id_user'] = (int)$this->s['registered']->status['id_user']; + + if (isset($_POST['closeAction'])) + { + $this->s['registered']->logout(); + $this->m['UsersModel']->close($clean['id_user']); + + if ($this->m['UsersModel']->queryResult) + { + $this->redirect('users/notice/'.$this->lang); + } + + } + + $this->append($data); + $this->load('goodbye'); + $this->right(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/NewsController.php b/h-source/Application/Controllers/NewsController.php new file mode 100644 index 0000000..5b7d0e4 --- /dev/null +++ b/h-source/Application/Controllers/NewsController.php @@ -0,0 +1,65 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class NewsController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['news'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $this->model('NewsModel'); + + $data['title'] = 'news - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { + $argKeys = array( + 'page:forceNat' => 1, + ); + + $this->setArgKeys($argKeys); + + $this->shift(1); + + $this->helper('Pages',$this->controller.'/index/'.$this->lang,'page'); + $this->h['Pages']->nextString = 'older news'; + $this->h['Pages']->previousString = 'latest news'; + $page = $this->viewArgs['page']; + $recordNumber = $this->m['NewsModel']->rowNumber(); + $data['recordNumber'] = $recordNumber; + + //set the limit clause + $limit = $this->h['Pages']->getLimit($page,$recordNumber,10); + + $data['table'] = $this->m['NewsModel']->select()->limit($limit)->send(); + $data['pageList'] = $this->h['Pages']->render($page,0); + + $this->append($data); + $this->load('index'); + $this->right($lang); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php new file mode 100644 index 0000000..4a40612 --- /dev/null +++ b/h-source/Application/Controllers/NotebooksController.php @@ -0,0 +1,162 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class NotebooksController extends GenericController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['hardware'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + //load the model + $this->model('HardwareModel'); + $this->model('RevisionsModel'); + $this->model('NotebooksModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['NotebooksModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'notebook'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "checkIsStrings|".Notebooks::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Notebooks::$commYear => "comm_year", + "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype", + "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works", + "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "checkIsStrings|".Notebooks::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Notebooks::$commYear => "comm_year", + "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype", + "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works", + "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", + ); + + $this->m['HardwareModel']->softConditions['update'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "++checkLength|99" => "video_card_type,wifi_type", + "+++checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the <i>videocard</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + ); + + $this->m['HardwareModel']->softConditions['insert'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "++checkLength|99" => "video_card_type,wifi_type", + "+++checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the <i>videocard</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + ); + + $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'compatibility:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'subtype:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef' + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'Notebooks'; + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->shift(1); + + $whereArray = array( + 'type' => $this->mod->type, + 'vendor' => $this->viewArgs['vendor'], + 'comm_year' => $this->viewArgs['comm_year'], + 'subtype' => $this->viewArgs['subtype'], + 'compatibility' => $this->viewArgs['compatibility'] + ); + + $this->mod->setWhereQueryClause($whereArray); + + parent::catalogue($lang); + } + + public function view($lang = 'en', $id = 0, $name = null) + { + parent::view($lang, $id, $name); + } + + public function history($lang = 'en', $id = 0) + { + parent::history($lang, $id); + } + + public function revision($lang = 'en', $id_rev = 0) + { + parent::revision($lang, $id_rev); + } + + public function insert($lang = 'en', $token = '') + { + parent::insert($lang, $token); + } + + public function update($lang = 'en', $token = '') + { + parent::update($lang, $token); + } + + public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + parent::differences($lang, $id_hard, $id_rev); + } + + public function climb($lang = 'en', $id_rev = 0, $token = '') + { + parent::climb($lang, $id_rev, $token); + } + + public function talk($lang = 'en', $id_hard = 0, $token = '') + { + parent::talk($lang, $id_hard, $token); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php new file mode 100644 index 0000000..50da908 --- /dev/null +++ b/h-source/Application/Controllers/PrintersController.php @@ -0,0 +1,158 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class PrintersController extends GenericController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['hardware'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + //load the model + $this->model('HardwareModel'); + $this->model('RevisionsModel'); + $this->model('PrintersModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['PrintersModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'printer'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "checkIsStrings|".Printer::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "+checkIsStrings|".Printer::compatibilityList() => "compatibility", + "++checkIsStrings|".Printer::$commYear => "comm_year", + "+++checkIsStrings|".Printer::$interface => "interface", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "checkIsStrings|".Printer::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "+checkIsStrings|".Printer::compatibilityList() => "compatibility", + "++checkIsStrings|".Printer::$commYear => "comm_year", + "+++checkIsStrings|".Printer::$interface => "interface", + ); + + $this->m['HardwareModel']->softConditions['update'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "driver", + "++checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + ); + + $this->m['HardwareModel']->softConditions['insert'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "driver", + "++checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + ); + + $this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'compatibility:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'interface:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef', + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'printers'; + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->shift(1); + + $whereArray = array( + 'type' => $this->mod->type, + 'vendor' => $this->viewArgs['vendor'], + 'compatibility' => $this->viewArgs['compatibility'], + 'comm_year' => $this->viewArgs['comm_year'], + 'interface' => $this->viewArgs['interface'], + ); + + $this->mod->setWhereQueryClause($whereArray); + + parent::catalogue($lang); + } + + public function view($lang = 'en', $id = 0, $name = null) + { + parent::view($lang, $id, $name); + } + + public function history($lang = 'en', $id = 0) + { + parent::history($lang, $id); + } + + public function revision($lang = 'en', $id_rev = 0) + { + parent::revision($lang, $id_rev); + } + + public function insert($lang = 'en', $token = '') + { + parent::insert($lang, $token); + } + + public function update($lang = 'en', $token = '') + { + parent::update($lang, $token); + } + + public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + parent::differences($lang, $id_hard, $id_rev); + } + + public function climb($lang = 'en', $id_rev = 0, $token = '') + { + parent::climb($lang, $id_rev, $token); + } + + public function talk($lang = 'en', $id_hard = 0, $token = '') + { + parent::talk($lang, $id_hard, $token); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/ProjectController.php b/h-source/Application/Controllers/ProjectController.php new file mode 100644 index 0000000..e114f75 --- /dev/null +++ b/h-source/Application/Controllers/ProjectController.php @@ -0,0 +1,38 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ProjectController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'project - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { + $this->cleverLoad('index'); + $this->right(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/ScannersController.php b/h-source/Application/Controllers/ScannersController.php new file mode 100644 index 0000000..f4206d5 --- /dev/null +++ b/h-source/Application/Controllers/ScannersController.php @@ -0,0 +1,158 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ScannersController extends GenericController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['hardware'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + //load the model + $this->model('HardwareModel'); + $this->model('RevisionsModel'); + $this->model('ScannersModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['ScannersModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'scanner'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "checkIsStrings|".Printer::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "+checkIsStrings|".Printer::compatibilityList() => "compatibility", + "++checkIsStrings|".Printer::$commYear => "comm_year", + "+++checkIsStrings|".Printer::$interface => "interface", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "checkIsStrings|".Printer::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "+checkIsStrings|".Printer::compatibilityList() => "compatibility", + "++checkIsStrings|".Printer::$commYear => "comm_year", + "+++checkIsStrings|".Printer::$interface => "interface", + ); + + $this->m['HardwareModel']->softConditions['update'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "driver", + "++checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + ); + + $this->m['HardwareModel']->softConditions['insert'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "driver", + "++checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + ); + + $this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'compatibility:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'interface:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef', + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'scanners'; + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->shift(1); + + $whereArray = array( + 'type' => $this->mod->type, + 'vendor' => $this->viewArgs['vendor'], + 'compatibility' => $this->viewArgs['compatibility'], + 'comm_year' => $this->viewArgs['comm_year'], + 'interface' => $this->viewArgs['interface'], + ); + + $this->mod->setWhereQueryClause($whereArray); + + parent::catalogue($lang); + } + + public function view($lang = 'en', $id = 0, $name = null) + { + parent::view($lang, $id, $name); + } + + public function history($lang = 'en', $id = 0) + { + parent::history($lang, $id); + } + + public function revision($lang = 'en', $id_rev = 0) + { + parent::revision($lang, $id_rev); + } + + public function insert($lang = 'en', $token = '') + { + parent::insert($lang, $token); + } + + public function update($lang = 'en', $token = '') + { + parent::update($lang, $token); + } + + public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + parent::differences($lang, $id_hard, $id_rev); + } + + public function climb($lang = 'en', $id_rev = 0, $token = '') + { + parent::climb($lang, $id_rev, $token); + } + + public function talk($lang = 'en', $id_hard = 0, $token = '') + { + parent::talk($lang, $id_hard, $token); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php new file mode 100644 index 0000000..2d8a1a8 --- /dev/null +++ b/h-source/Application/Controllers/SearchController.php @@ -0,0 +1,90 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class SearchController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['search'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $this->model('HardwareModel'); + + $data['title'] = 'search - '.Website::$generalName; + $this->append($data); + } + + public function form($lang = 'en') + { + $this->cleverLoad('form'); + $this->right(); + } + + public function results($lang = 'en') + { + Params::$nullQueryValue = 'undef'; + + $argKeys = array( + 'page:forceNat' => 1, + 'action:sanitizeAlphanum' => 'search', + 'type:sanitizeAlphanum' => 'notebook', + 'model:sanitizeString' => 'undef', + ); + + $this->setArgKeys($argKeys); + + $this->shift(1); + + if (strcmp($this->viewArgs['action'],'search') === 0) + { + Params::$whereClauseSymbolArray = array('like'); + + $whereClause = array( + 'type' => $this->viewArgs['type'], + 'model' => "like '%".$this->viewArgs['model']."%'", + '-deleted' => "no", + ); + + $recordNumber = $this->m['HardwareModel']->clear()->where($whereClause)->orderBy("id_hard desc")->rowNumber(); + + $data['recordNumber'] = $recordNumber; + + //load the Pages helper + $this->helper('Pages',$this->controller.'/results/'.$this->lang,'page'); + $page = $this->viewArgs['page']; + //set the limit clause + $limit = $this->h['Pages']->getLimit($page,$recordNumber,10); + + $data['table'] = $this->m['HardwareModel']->clear()->select('id_hard,model,type,comm_year')->where($whereClause)->limit($limit)->orderBy("id_hard desc")->send(); +// echo $this->m['HardwareModel']->getQuery(); + + $data['pageList'] = $this->h['Pages']->render($page-3,7); + + $this->append($data); + $this->cleverLoad('results'); + $this->right(); + } + + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/UsersController.php b/h-source/Application/Controllers/UsersController.php new file mode 100644 index 0000000..6e760ba --- /dev/null +++ b/h-source/Application/Controllers/UsersController.php @@ -0,0 +1,428 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class UsersController extends BaseController +{ + + private $_updating; + + public function __construct($model, $controller, $queryString) + { + parent::__construct($model, $controller, $queryString); + + $this->model('UsersModel'); + $this->model('ProfileModel'); + $this->model('HardwareModel'); + $this->model('ParamsModel'); + + $updating = $this->m['ParamsModel']->select('updating')->where(array('id_par'=>1))->toList('updating')->send(); + $data['updating_flag'] = $updating[0]; + $this->_updating = $data['updating_flag']; + + $data['title'] = 'Login'; + $this->append($data); + } + + public function login($lang = 'en', $type = null,$the_action = null,$the_id = null) + { + $data = array(); + + if ( strcmp($this->_updating,'no') === 0 ) + { + $data['flag'] = isset($type) ? 'setted' : null; + $html['type'] = in_array($type,Hardware::$controllers) ? sanitizeAll($type) : 'notebooks'; + $html['the_action'] = sanitizeAlphanum($the_action); + $html['the_id'] = (int)$the_id; + $html['lang'] = Lang::sanitize($lang); + + $data['title'] = 'Login - '.Website::$generalName; + + if (isset($type)) + { + $data['action'] = Url::getRoot("users/login/".$html['lang']."/".$html['type']."/".$html['the_action']."/".$html['the_id']); + } + else + { + $data['action'] = Url::getRoot("users/login/".$html['lang']); + } + + $data['notice'] = null; + + $this->s['registered']->checkStatus(); + + if ($this->s['registered']->status['status']=='logged') { //check if already logged + $this->s['registered']->redirect('logged'); + } + if (isset($_POST['username']) and isset($_POST['password'])) + { + $username = ctype_alnum($_POST['username']) ? sanitizeAll($_POST['username']) : ''; + $choice = $this->s['registered']->login($username,$_POST['password']); + + switch($choice) { + case 'logged': + $this->redirect('home/index',3,'You are already logged...'); + break; + case 'accepted': + if (isset($type)) + { + $address = strcmp($html['the_action'],'view') === 0 ? $html['type']."/view/".$html['lang']."/".$html['the_id'] : $html['type']."/catalogue/".$html['lang']; + + $this->redirect($address,0); + } + else + { + $this->redirect('home/index',0); + } + break; + case 'login-error': + $data['notice'] = '<div class="alert">Wrong username or password</div>'; + break; + case 'wait': + $data['notice'] = '<div class="alert">You have to wait 5 seconds before you can try to login another time</div>'; + break; + } + } + } + + $this->append($data); + $this->load('login'); + } + + public function logout($lang = 'en') + { + $res = $this->s['registered']->logout(); + + if ($res === 'not-logged') + { + $data['notice'] = "<div class='alert'>You can't logout because you are not logged..</div>\n"; + } + else if ($res === 'was-logged') + { + $this->redirect('home',0); + } + else if ($res === 'error') + { + + } + + $this->append($data); + $this->load('logout'); + } + + public function add($lang = 'en') + { + $data['title'] = 'create account - '.Website::$generalName; + + if ( strcmp($this->_updating,'no') === 0 ) + { + //start session for captcha + session_start(); + + if ( isset($_SESSION['status']) ) unset($_SESSION['status']); + + $this->shift(1); + + $this->m['UsersModel']->strongConditions['insert'] = array( + "checkAlphanum" => "username", + "checkLength|35" => "username", + "checkMail" => "e_mail", + "+checkLength|35" => "e_mail", + "checkEqual" => "password,confirmation", + "checkMatch|/^[a-zA-Z0-9\_\-\!]+$/" => "password,confirmation|characters allowed for the password: a-z A-Z 0-9 - _ !" + ); + + $this->m['UsersModel']->databaseConditions['insert'] = array( + "checkUnique" => "username", + "+checkUnique" => "e_mail" + ); + + if ($this->s['registered']->status['status'] === 'logged') + { + $this->redirect('home/index/'.$this->lang,2,'you are already logged..'); + } + else + { + $data['notice'] = null; + + $this->m['UsersModel']->setFields('username:sanitizeAll,e_mail:sanitizeAll,password:sha1','none'); + + $this->m['UsersModel']->updateTable('insert'); + + $data['notice'] = $this->m['UsersModel']->notice; + + $values = $this->m['UsersModel']->getFormValues('insert','sanitizeHtml'); + $values['confirmation'] = ''; + + $data['values'] = $values; + + $this->append($data); + + $this->load('add'); + $this->right(); + } + } + else + { + $this->redirect('users/login/'.$this->lang,0); + } + } + + public function confirm($lang = 'en', $id_user = 0, $confirmation_token = '') + { + $data['title'] = 'confirm account - '.Website::$generalName; + + if ( strcmp($this->_updating,'no') === 0 ) + { + if ($this->s['registered']->status['status'] === 'logged') + { + $this->redirect('home/index/'.$this->lang,2,'you are already logged..'); + } + else + { + $clean['id_user'] = (int)$id_user; + $clean['confirmation_token'] = sanitizeAlphanum($confirmation_token); + + $data['status_confirm'] = false; + + $res = $this->m['UsersModel']->select('id_user,creation_time')->where(array("id_user"=>$clean['id_user'],"confirmation_token"=>$clean['confirmation_token'],"has_confirmed"=>1,"deleted"=>"no"))->send(); + + // echo $this->m['UsersModel']->getQuery(); + + if (count($res) > 0) + { + $now = time(); + $checkTime = $res[0]['regusers']['creation_time'] + Account::$confirmTime; + if ($checkTime > $now) + { + $this->m['UsersModel']->values = array('has_confirmed' => 0, 'creation_time' => 0); + if ($this->m['UsersModel']->update($clean['id_user'])) + { + $data['status_confirm'] = true; + + //ad a record in the profile table + $this->m['ProfileModel']->values = array('created_by' => $clean['id_user']); + $this->m['ProfileModel']->insert(); + + } + } + } + + // var_dump($data['status_confirm']); + + $this->append($data); + $this->load('confirmation'); + $this->right(); + } + } + else + { + $this->redirect('users/login/'.$this->lang,0); + } + } + + public function change($lang = 'en', $id_user = 0, $forgot_token = '') + { + session_start(); + + $data['title'] = 'change password - '.Website::$generalName; + + if ( strcmp($this->_updating,'no') === 0 ) + { + if ($this->s['registered']->status['status'] === 'logged') + { + $this->redirect('home/index/'.$this->lang,2,'you are already logged..'); + } + else + { + $clean['id_user'] = (int)$id_user; + $clean['forgot_token'] = sanitizeAlphanum($forgot_token); + + $res = $this->m['UsersModel']->select('username,id_user,forgot_time,e_mail')->where(array("id_user"=>$clean['id_user'],"forgot_token"=>$clean['forgot_token'],"has_confirmed"=>0,"deleted"=>"no"))->send(); + + if (count($res) > 0) + { + $now = time(); + $checkTime = $res[0]['regusers']['forgot_time'] + Account::$confirmTime; + if ($checkTime > $now) + { + $username = $res[0]['regusers']['username']; + $email = $res[0]['regusers']['e_mail']; + + $newPassword = generateString(10); + $this->m['UsersModel']->values = array('password' => sha1($newPassword), 'forgot_time' => 0); + if ($this->m['UsersModel']->update($clean['id_user'])) + { + $result = Account::sendpassword($username,$email,$newPassword); + + if ($result) + { + $_SESSION['status'] = 'sent_new_password'; + } + else + { + $_SESSION['status'] = 'sent_new_password_error'; + } + + $hed = new HeaderObj(DOMAIN_NAME); + $hed->redirect('users/notice/'.Lang::$current,1); + + } + } + } + + $this->append($data); + $this->load('change'); + $this->right(); + } + } + else + { + $this->redirect('users/login/'.$this->lang,0); + } + } + + public function forgot($lang = 'en') + { + $data['title'] = 'request password - '.Website::$generalName; + + if ( strcmp($this->_updating,'no') === 0 ) + { + session_start(); + + if ( isset($_SESSION['status']) ) unset($_SESSION['status']); + + $this->shift(1); + + if ($this->s['registered']->status['status'] === 'logged') + { + $this->redirect('home/index/'.$this->lang,2,'you are already logged..'); + } + else + { + $data['notice'] = null; + + if (isset($_POST['forgotAction'])) + { + if (isset($_POST['username'])) + { + $this->m['UsersModel']->forgot($_POST['username']); + $data['notice'] = $this->m['UsersModel']->notice; + } + } + + $this->append($data); + + $this->load('forgot'); + $this->right(); + } + } + else + { + $this->redirect('users/login/'.$this->lang,0); + } + } + + public function notice($lang = 'en') + { + $data['title'] = 'notice - '.Website::$generalName; + + if ( strcmp($this->_updating,'no') === 0 ) + { + session_start(); + if ($this->s['registered']->status['status'] === 'logged') + { + $this->redirect('home/index/'.$this->lang,2,'you are already logged..'); + } + else + { + $this->load('notice'); + $this->right(); + } + } + else + { + $this->redirect('users/login/'.$this->lang,0); + } + } + + public function meet($lang = 'en', $user = '') + { + $clean['user'] = ctype_alnum($user) ? sanitizeAll($user) : ''; + $data['title'] = "meet ".$clean['user']." - ".Website::$generalName; + + if (strcmp($clean['user'],'') !== 0) + { + $this->shift(2); + + $res = $this->m['UsersModel']->db->select('regusers','has_confirmed,deleted,username','username="'.$clean['user'].'" and has_confirmed=0 and deleted="no"'); +// echo $this->m['UsersModel']->getQuery(); + if (count($res) > 0) + { + $whereArray = array( + 'username' => $clean['user'], + 'has_confirmed' => 0, + 'deleted' => 'no' + ); + + $data['table'] = $this->m['ProfileModel']->select('regusers.e_mail,regusers.username,profile.*')->from('regusers inner join profile')->on('regusers.id_user = profile.created_by')->where($whereArray)->send(); + + // echo $this->m['HardwareModel']->getQuery(); + + $data['meet_username'] = $res[0]['regusers']['username']; + + $this->append($data); + $this->load('meet'); + $this->right(); + } + } + } + + public function contributions($lang = 'en', $user = '') + { + $clean['user'] = ctype_alnum($user) ? sanitizeAll($user) : ''; + $data['title'] = $clean['user']." contributions - ".Website::$generalName; + + if (strcmp($clean['user'],'') !== 0) + { + $this->shift(2); + + $res = $this->m['UsersModel']->db->select('regusers','has_confirmed,deleted,username','username="'.$clean['user'].'" and has_confirmed=0 and deleted="no"'); + + if (count($res) > 0) + { + $whereArray = array( + 'username' => $clean['user'], + 'has_confirmed' => 0, + 'deleted' => 'no' + ); + + $data['table'] = $this->m['HardwareModel']->select('hardware.*,regusers.username')->where($whereArray)->send(); + // echo $this->m['HardwareModel']->getQuery(); + + $data['meet_username'] = $res[0]['regusers']['username']; + + $this->append($data); + $this->load('contributions'); + $this->right(); + } + } + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/VideocardsController.php b/h-source/Application/Controllers/VideocardsController.php new file mode 100644 index 0000000..e95fac6 --- /dev/null +++ b/h-source/Application/Controllers/VideocardsController.php @@ -0,0 +1,152 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class VideocardsController extends GenericController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['hardware'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + //load the model + $this->model('HardwareModel'); + $this->model('RevisionsModel'); + $this->model('VideocardsModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['VideocardsModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'videocard'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "checkIsStrings|".Videocard::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Notebooks::$commYear => "comm_year", + "+++checkIsStrings|".Videocard::videoList() => "video_card_works", + "++++checkIsStrings|".Videocard::$interface => "interface", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "checkIsStrings|".Videocard::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Notebooks::$commYear => "comm_year", + "+++checkIsStrings|".Videocard::videoList() => "video_card_works", + "++++checkIsStrings|".Videocard::$interface => "interface", + ); + + $this->m['HardwareModel']->softConditions['update'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + ); + + $this->m['HardwareModel']->softConditions['insert'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + ); + + $this->m['HardwareModel']->setFields('vendor,model,kernel,description,distribution,video_card_works,comm_year,pci_id,interface','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'interface:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef', + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'Videocards'; + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->shift(1); + + $whereArray = array( + 'type' => $this->mod->type, + 'vendor' => $this->viewArgs['vendor'], + 'comm_year' => $this->viewArgs['comm_year'], + 'interface' => $this->viewArgs['interface'], + ); + + $this->mod->setWhereQueryClause($whereArray); + + parent::catalogue($lang); + } + + public function view($lang = 'en', $id = 0, $name = null) + { + parent::view($lang, $id, $name); + } + + public function history($lang = 'en', $id = 0) + { + parent::history($lang, $id); + } + + public function revision($lang = 'en', $id_rev = 0) + { + parent::revision($lang, $id_rev); + } + + public function insert($lang = 'en', $token = '') + { + parent::insert($lang, $token); + } + + public function update($lang = 'en', $token = '') + { + parent::update($lang, $token); + } + + public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + parent::differences($lang, $id_hard, $id_rev); + } + + public function climb($lang = 'en', $id_rev = 0, $token = '') + { + parent::climb($lang, $id_rev, $token); + } + + public function talk($lang = 'en', $id_hard = 0, $token = '') + { + parent::talk($lang, $id_hard, $token); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Controllers/WifiController.php b/h-source/Application/Controllers/WifiController.php new file mode 100644 index 0000000..8313ffc --- /dev/null +++ b/h-source/Application/Controllers/WifiController.php @@ -0,0 +1,154 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class WifiController extends GenericController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['hardware'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + //load the model + $this->model('HardwareModel'); + $this->model('RevisionsModel'); + $this->model('WifiModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['WifiModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'wifi'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "checkIsStrings|".Wifi::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Wifi::$commYear => "comm_year", + "+++checkIsStrings|".Wifi::$wifiSelect => "wifi_works", + "++++checkIsStrings|".Wifi::$interface => "interface", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "checkIsStrings|".Wifi::vendorsList() => "vendor", + "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Wifi::$commYear => "comm_year", + "+++checkIsStrings|".Wifi::$wifiSelect => "wifi_works", + "++++checkIsStrings|".Wifi::$interface => "interface", + ); + + $this->m['HardwareModel']->softConditions['update'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + ); + + $this->m['HardwareModel']->softConditions['insert'] = array( + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry", + "checkLength|20000" => "description", + "+checkLength|49" => "kernel", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", + ); + + $this->m['HardwareModel']->setFields('vendor,model,kernel,description,distribution,comm_year,wifi_works,pci_id,interface','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'wifi_works:sanitizeString' => 'undef', + 'interface:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef' + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'Wifi'; + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->shift(1); + + $whereArray = array( + 'type' => $this->mod->type, + 'vendor' => $this->viewArgs['vendor'], + 'comm_year' => $this->viewArgs['comm_year'], + 'wifi_works' => $this->viewArgs['wifi_works'], + 'interface' => $this->viewArgs['interface'], + ); + + $this->mod->setWhereQueryClause($whereArray); + + parent::catalogue($lang); + } + + public function view($lang = 'en', $id = 0, $name = null) + { + parent::view($lang, $id, $name); + } + + public function history($lang = 'en', $id = 0) + { + parent::history($lang, $id); + } + + public function revision($lang = 'en', $id_rev = 0) + { + parent::revision($lang, $id_rev); + } + + public function insert($lang = 'en', $token = '') + { + parent::insert($lang, $token); + } + + public function update($lang = 'en', $token = '') + { + parent::update($lang, $token); + } + + public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + parent::differences($lang, $id_hard, $id_rev); + } + + public function climb($lang = 'en', $id_rev = 0, $token = '') + { + parent::climb($lang, $id_rev, $token); + } + + public function talk($lang = 'en', $id_hard = 0, $token = '') + { + parent::talk($lang, $id_hard, $token); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Hooks/AfterInitialization.php b/h-source/Application/Hooks/AfterInitialization.php new file mode 100644 index 0000000..a369309 --- /dev/null +++ b/h-source/Application/Hooks/AfterInitialization.php @@ -0,0 +1,10 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//in this file you can write the PHP code that will be executed just after the controller initialization, after super global array have been sanitizied + +//you can access the whole set of classes of EasyGiant
\ No newline at end of file diff --git a/h-source/Application/Hooks/BeforeChecks.php b/h-source/Application/Hooks/BeforeChecks.php new file mode 100644 index 0000000..03ee247 --- /dev/null +++ b/h-source/Application/Hooks/BeforeChecks.php @@ -0,0 +1,16 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//in this file you can write the PHP code that will be executed at the beginning of the EasyGiant execution, before super global array have been sanitizied + +//this is the preferred place to create and fill log files + +//you can access the whole set of classes and functions of EasyGiant + +Params::$htmlentititiesCharset = "UTF-8"; + +Params::$allowedSanitizeFunc .= ",sanitizeString,sanitizeAlphanum";
\ No newline at end of file diff --git a/h-source/Application/Hooks/BeforeInitialization.php b/h-source/Application/Hooks/BeforeInitialization.php new file mode 100644 index 0000000..6d1851b --- /dev/null +++ b/h-source/Application/Hooks/BeforeInitialization.php @@ -0,0 +1,10 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//in this file you can write the PHP code that will be executed just before the controller initialization, after super global array have been sanitizied + +//you can access the whole set of classes of EasyGiant
\ No newline at end of file diff --git a/h-source/Application/Hooks/index.html b/h-source/Application/Hooks/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Application/Hooks/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Application/Include/distributions.php b/h-source/Application/Include/distributions.php new file mode 100644 index 0000000..6f5e1ae --- /dev/null +++ b/h-source/Application/Include/distributions.php @@ -0,0 +1,86 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Distributions +{ + + public static $allowed = array( + 'blag_90001' => 'BLAG 90001', + 'blag_120000' => 'BLAG 120000', + 'dragora_1_1' => 'Dragora 1.1', + 'dynebolic_2_5_2' => 'Dynebolic 2.5.2 DHORUBA', + 'gnewsense_2_3' => 'gNewSense 2.3 Deltah', + 'gnewsense_3_0' => 'gNewSense 3.0 Metad', + 'musix_2_0' => 'Musix GNU+Linux 2.0 R0', + 'trisquel_3_5' => 'Trisquel 3.5 Awen', + 'trisquel_4_0' => 'Trisquel 4.0 Taranis', + 'ututo_xs_2009' => 'UTUTO XS 2009', + 'ututo_xs_2010' => 'UTUTO XS 2010', + 'venenux_0_8' => 'VENENUX 0.8', + ); + + public static function getName($distList = '') + { + $returnString = null; + $returnArray = array(); + $distArray = explode(',',$distList); + foreach ($distArray as $dist) + { + $dist = trim($dist); + if (array_key_exists($dist,self::$allowed)) + { + $returnArray[] = self::$allowed[$dist]; + } + } + return implode(" <br /> ",$returnArray); + } + + public static function check($distString) + { + $distArray = explode(',',$distString); + + $allowedArray = array_keys(self::$allowed); + + foreach ($distArray as $dist) + { + $dist = trim($dist); + if (!in_array($dist,$allowedArray)) return false; + } + + return true; + } + + public static function getFormHtml() + { + $str = "<div class='dist_checkboxes_hidden_box'>"; + $str .= "<div class='dist_checkboxes_hidden_box_inner'>"; + foreach (self::$allowed as $value => $label) + { + $str .= "<div class=\"hidden_box_item\"><input class=\"hidden_box_input $value\" type=\"checkbox\" name=\"$value\" value=\"$value\"/> $label</div>"; + } + $str .= "</div>"; + $str .= "<input class=\"hidden_box_distribution_submit\" type=\"submit\" value=\"apply\">"; + $str .= "<input class=\"hidden_box_distribution_cancel\" type=\"submit\" value=\"cancel\">"; + $str .= "</div>"; + + return $str; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php new file mode 100644 index 0000000..e711231 --- /dev/null +++ b/h-source/Application/Include/hardware.php @@ -0,0 +1,216 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + + +class Hardware +{ + + public static $controllers = array('notebooks','wifi','videocards','printers','scanners'); //used by UsersController::login() + + public static $commYear = 'not-specified,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992'; + +} + +class Printer extends hardware +{ + public static $vendors = array( + "brother" => "brother", + "Canon" => "Canon", + "EPSON" => "EPSON", + "Lexmark" => "Lexmark", + "KONICA-MINOLTA" => "KONICA-MINOLTA", + "Hewlett-Packard" => "Hewlett-Packard", + "Panasonic" => "Panasonic", + "RICOH" => "RICOH", + "SAMSUNG" => "SAMSUNG", + "SHARP" => "SHARP", + "TOSHIBA" => "TOSHIBA", + "XEROX" => "XEROX", + ); + + public static $compatibility = array( + "A Full" => "A-Full", + "B Partial" => "B-Partial", + "C None" => "C-None", + ); + + public static $interface = "not-specified,USB,Serial,Parallel,Firewire,SCSI,Ethernet"; + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } + + public static function compatibilityList() + { + return implode(',',array_values(self::$compatibility)); + } + +} + +class Wifi extends hardware +{ + public static $vendors = array( + "A-LINK" => "A-LINK", + "Airlink101" => "Airlink101", + "Belkin" => "Belkin", + "Broadcom" => "Broadcom", + "CANYON" => "CANYON", + "D-Link" => "D-Link", + "Hawking" => "Hawking", + "Intel" => "Intel", + "LevelOne" => "LevelOne", + "Linksys" => "Linksys", + "NEC" => "NEC", + "Netgear" => "Netgear", + "Ralink" => "Ralink", + "TOSHIBA" => "TOSHIBA", + "TP-LINK" => "TP-LINK", + ); + + public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card"; + + public static $wifiSelect = 'yes,no'; + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } +} + +class Videocard extends hardware +{ + public static $vendors = array( + "ATI" => "ATI", + "NVIDIA" => "NVIDIA", + "Intel" => "Intel", + ); + + public static $videoSelect = array( + "works with 3D acceleration" => "works_with_3D", + "works, but without 3D acceleration" => "works_without_3D", + ); + + public static $videoReverse = array( + "works_with_3D" => "works with 3D acceleration", + "works_without_3D" => "works, but without 3D acceleration", + ); + + public static $interface = "not-specified,PCI,AGP,PCI-E,ISA"; + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } + + public static function videoList() + { + return implode(',',array_values(self::$videoSelect)); + } +} + + +class Notebooks extends Hardware +{ + + public static $vendors = array( + "Acer" => "Acer", + "Apple" => "Apple", + "Asus" => "Asus", + "Compal Electronics" => "Compal-Electronics", + "COMPAQ" => "COMPAQ", + "Dell" => "Dell", + "emachines" => "emachines", + "FUJITSU" => "FUJITSU", + "Gateway" => "Gateway", + "Hewlett Packard" => "Hewlett-Packard", + "IBM" => "IBM", + "Lenovo" => "Lenovo", + "LG" => "LG", + "Philco" => "Philco", + "Philips" => "Philips", + "Panasonic" => "Panasonic", + "Sony" => "Sony", + "SAMSUNG" => "SAMSUNG", + "Thomson" => "Thomson", + "TOSHIBA" => "TOSHIBA", + ); + + public static $compatibility = array( + "A Platinum" => "A-platinum", + "B Gold" => "B-gold", + "C Silver" => "C-silver", + "D Bronze" => "D-bronze", + "E Garbage" => "E-garbage" + ); + + public static $subtypeSelect = 'notebook,netbook,not-specified'; + + public static $videoSelect = array( + "not specified" => 'not-specified', + "yes, with 3D acceleration" => "yes_with_3D", + "yes, but without 3D acceleration" => "yes_without_3D", + "it does not work" => "no", + ); + + public static $videoReverse = array( + "yes_with_3D" => "works with 3D acceleration", + "yes_without_3D" => "works but without 3D acceleration", + "no" => "it does not work", + 'not-specified' => "not specified how it works", + "" => "" + ); + + public static $wifiSelect = array( + "not specified" => 'not-specified', + 'yes' => 'yes', + 'no' => 'no', + 'there is no wifi card' => 'no-wifi-card', + ); + + public static $wifiReverse = array( + "yes" => "it works", + "no" => "it does not work", + 'not-specified' => "not specified how it works", + 'no-wifi-card' => 'there is no wifi card', + "" => "" + ); + + public static function videoList() + { + return implode(',',array_values(self::$videoSelect)); + } + + public static function wifiList() + { + return implode(',',array_values(self::$wifiSelect)); + } + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } + + public static function compatibilityList() + { + return implode(',',array_values(self::$compatibility)); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php new file mode 100644 index 0000000..8351a88 --- /dev/null +++ b/h-source/Application/Include/languages.php @@ -0,0 +1,322 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang +{ + public static $allowed = array('en','es','fr','it'); + public static $current = 'en'; + + public static $complete = array( + 'en' => 'gb.png,English', + 'es' => 'es.png,Español', + 'fr' => 'fr.png,Français', + 'it' => 'it.png,Italiano', + ); + + public static $i18n = array( + 'it' => array + ( + "List of issues" => "Lista di questioni", + "TITLE" => "TITOLO", + "TOPIC" => "ARGOMENTO", + "OPENED BY" => "APERTO DA", + "DATE" => "DATA", + "REPLIES" => "MESSAGGI", + "PRIORITY" => "PRIORITÀ", + "STATUS" => "STATO", + "You have to" => "Devi eseguire il", + "in order to submit an issue" => "per poter aprire una nuova questione", + "Description" => "Descrizione", + "Messages" => "Messaggi", + "this message has been deleted" => "questo messaggio è stato cancellato", + "in order to submit a message to this issue" => "per aggiungere un messaggio a questa questione", + "model name" => "nome del modello", + "model type" => "tipo di device", + "year of commercialization" => "anno di commercializzazione", + "Results of the search" => "Risultati della ricerca", + "page list" => "pagine", + "No devices found" => "Non è stato trovato alcun device", + "vendor" => "marca", + "compatibility" => "compatibilità", + "year" => "anno", + "subtype" => "sottotipo", + "sort by" => "ordina per", + "interface" => "interfaccia", + "does it work?" => "funziona?", + "preview of the message" => "anteprima del messaggio", + "preview of the new issue message" => "anteprima del testo della questione", + "Add a message to this issue" => "Aggiungi un messaggio a questa questione", + "Add a new issue" => "Aggiungi una nuova questione", + "MESSAGE" => "MESSAGGIO", + "there are no messages" => "non ci sono messaggi", + "No notebooks found" => "Non è stato trovato alcun notebook", + "subtype (notebook or netbook)" => "sottotipo (notebook or netbook)", + "compatibility with free software" => "compatibilità con il software libero", + "view the other specifications" => "guarda le altre specifiche", + "model" => "modello", + "model id" => "id del modello", + "tested on" => "testato con", + "tested with the following kernel libre" => "testato con il seguente kernel libre", + "video card model" => "modello di scheda video", + "wifi model" => "modello di scheda wifi", + "GNU/Linux distribution used for the test" => "distribuzione GNU/Linux usata per il test", + "does the video card work?" => "funziona la scheda video?", + "does the wifi card work?" => "funziona la scheda wifi?", + "Description: (write here all the useful information)" => "Descrizione (scrivi sotto tutte le informazioni utili)", + "discover all the wiki tags" => "scopri tutti i tag della wiki", + "Fields marked with <b>*</b> are mandatory" => "I campi marcati con <b>*</b> sono obbligatori", + "No printers found" => "Non è stata trovata alcuna stampante", + "interface" => "interfaccia", + "VendorID:ProductID code of the device" => "codice VendorID:ProductID del prodotto", + "free driver used" => "driver liberi usati", + "set not-specified if not sure" => "seleziona not-specified se non sei sicuro/a", + "see the help page or leave blank if you are not sure" => "guarda nella pagina di help o lascia vuoto se non sei sicuro/a", + "No scanners found" => "Non sono è stato trovato alcuno scanner", + "No video cards found" => "Non è stata trovata alcuna scheda grafica", + "how does it work with free software?" => "come funziona con il software libero?", + "No wifi cards found" => "Non è stata trovata alcuna scheda wifi", + "does it work with free software?" => "funziona con il software libero?", + "differences in the entry" => "differenze nel campo", + ), + 'es' => array + ( + "List of issues" => "Lista de incidencias", + "TITLE" => "TITULO", + "TOPIC" => "ARGUMENTO", + "OPENED BY" => "ABIERTO POR", + "DATE" => "FECHA", + "REPLIES" => "RESPUESTAS", + "PRIORITY" => "PRIORIDAD", + "STATUS" => "ESTADO", + "You have to" => "Tiene que", + "in order to submit an issue" => "para poder agregar una incidencia", + "Description" => "Descripción", + "Messages" => "Mensajes", + "this message has been deleted" => "este mensaje ha sido borrado", + "in order to submit a message to this issue" => "para poder agregar un mensaje a esta incidencia", + "model name" => "nombre del modelo", + "model type" => "tipo de modelo", + "year of commercialization" => "año de comercialización", + "Results of the search" => "Resultado de la búsqueda", + "page list" => "página", + "No devices found" => "No se encontró ningún dispositivo", + "vendor" => "fabricante", + "compatibility" => "compatibilidad", + "year" => "año", + "subtype" => "subtipo", + "sort by" => "ordenar por", + "interface" => "interfaz", + "does it work?" => "¿funciona?", + "preview of the message" => "vista previa del mensaje", + "preview of the new issue message" => "vista previa del mensaje de la incidencia", + "Add a message to this issue" => "Agregue un mensaje a esta incidencia", + "Add a new issue" => "Agregue una nueva incidencia", + "MESSAGE" => "MENSAJE", + "there are no messages" => "no hay mensajes", + "No notebooks found" => "No se encontró ninguna laptop", + "subtype (notebook or netbook)" => "subtipo (laptop o netbook)", + "compatibility with free software" => "compatibilidad con software libre", + "view the other specifications" => "ver otras especificaciones", + "model" => "modelo", + "model id" => "id del modelo", + "tested on" => "probado con", + "tested with the following kernel libre" => "probado con el siguiente kernel libre", + "video card model" => "modelo de tarjeta de video", + "wifi model" => "modelo de tarjeta de red inalámbrica", + "GNU/Linux distribution used for the test" => "distribución GNU/Linux usada para la prueba", + "does the video card work?" => "¿funciona la tarjeta de video?", + "does the wifi card work?" => "¿funciona la tarjeta de red inalámbrica?", + "Description: (write here all the useful information)" => "Descripción (escriba aquí toda la información útil)", + "discover all the wiki tags" => "mostrar todas las etiquetas del wiki", + "Fields marked with <b>*</b> are mandatory" => "Campos marcados con <b>*</b> son obligatorios", + "No printers found" => "No se encontró ninguna impresora", + "interface" => "interfaz", + "VendorID:ProductID code of the device" => "código VendorID:ProductID del dispositivo", + "free driver used" => "driver libre usado", + "set not-specified if not sure" => "seleccione not-specified si no esta seguro/a", + "see the help page or leave blank if you are not sure" => "vea la página de ayuda o deje vacío si no esta seguro/a", + "No scanners found" => "No se encontró ningun escáner", + "No video cards found" => "No se encontró ninguna tarjeta de video", + "how does it work with free software?" => "¿como funciona con software libre?", + "No wifi cards found" => "No se encontró ninguna tarjeta de red inalámbrica", + "does it work with free software?" => "¿funciona con software libre?", + "differences in the entry" => "diferencias en el campo", + ), + ); + + public static function sanitize($lang = 'en') + { + return (in_array($lang,self::$allowed)) ? sanitizeAll($lang) : 'en'; + } +} + +class MyStrings +{ + + public static $view = array( + + 'en' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + + 'fr' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + + 'it' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + + 'es' => array( + + 'notebooks' => array( + + 'element' => 'notebook' + + ), + + 'wifi' => array( + + 'element' => 'wifi card' + + ), + + 'videocards'=> array( + + 'element' => 'video card' + + ), + + 'printers'=> array( + + 'element' => 'printer' + + ), + + 'scanners'=> array( + + 'element' => 'scanner' + + ), + ), + ); + + //type => controller + public static $reverse = array( + 'notebook' => 'notebooks', + 'wifi' => 'wifi', + 'videocard' => 'videocards', + 'printer' => 'printers', + 'scanner' => 'scanners', + ); + + public static function getTypes() + { + return implode(',',array_keys(self::$reverse)); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php new file mode 100644 index 0000000..a5e3934 --- /dev/null +++ b/h-source/Application/Include/myFunctions.php @@ -0,0 +1,330 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +function encodeUrl($url) +{ + $url = str_replace(' ','-',$url); + $url = str_replace('[',null,$url); + $url = str_replace(']',null,$url); + $url = str_replace('(',null,$url); + $url = str_replace(')',null,$url); + $url = urlencode($url); +// $url = html_entity_decode($url, ENT_QUOTES); +// $url = xml_encode($url); + return $url; +} + + +function smartDate($uglyDate = null, $lang = 'en') +{ + switch ($lang) + { + case 'en': + $smDate = date('H:i, d F Y',strtotime($uglyDate)); + break; + default: + $smDate = date('H:i, d F Y',strtotime($uglyDate)); + } + return $smDate; +} + +function sanitizeString($string) +{ + $string = preg_match('/^[a-zA-Z0-9\-\_\.\+\s]+$/',$string) ? sanitizeAll($string) : 'undef'; + return $string; +} + +function sanitizeAlphanum($string) +{ + $string = ctype_alnum($string) ? sanitizeAll($string) : 'undef'; + return $string; +} + + +function getOrderByClause($string) +{ + switch ($string) + { + case 'last-inserted': + $orderBy = 'hardware.id_hard desc'; + break; + case 'alphabetically': + $orderBy = 'model'; + break; + case 'alphabetically-desc': + $orderBy = 'model desc'; + break; + case 'compatibility': + $orderBy = 'compatibility'; + break; + case 'undef': + $orderBy = 'hardware.id_hard desc'; + break; + default: + $orderBy = 'hardware.id_hard desc'; + } + + return $orderBy; +} + + +// function isEqual($str1, $str2) +// { +// // $str1 = str_replace("\n",'',$str1); +// // $str1 = str_replace("\r",null,$str1); +// // $str2 = str_replace("\n",'',$str1); +// // $str2 = str_replace("\r",null,$str1); +// +// return (strcmp($str1,$str2) === 0) ? true : false; +// } +// +// function getNewKeys($array,$ovalue) +// { +// $res = array(); +// for ($i = 0; $i < count($array); $i++) +// { +// if (isEqual($array[$i],$ovalue)) $res[] = $i; +// // if (strcmp($keys[$i],$ovalue) === 0) $res[] = $i; +// } +// return $res; +// } + +function diff($old, $new){ + $maxlen = 0; + foreach($old as $oindex => $ovalue){ +// $nkeys = getNewKeys($new,$ovalue); + $nkeys = array_keys($new, $ovalue); + foreach($nkeys as $nindex){ + $matrix[$oindex][$nindex] = isset($matrix[$oindex - 1][$nindex - 1]) ? + $matrix[$oindex - 1][$nindex - 1] + 1 : 1; + if($matrix[$oindex][$nindex] > $maxlen){ + $maxlen = $matrix[$oindex][$nindex]; + $omax = $oindex + 1 - $maxlen; + $nmax = $nindex + 1 - $maxlen; + } + } + } + if($maxlen == 0) return array(array('d'=>$old, 'i'=>$new)); + return array_merge( + diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax)), + array_slice($new, $nmax, $maxlen), + diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen))); +} + +function htmlDiff($old, $new){ + $old = str_replace("\r\n"," \r\n ",$old); + $new = str_replace("\r\n"," \r\n ",$new); + + $ret = null; + $diff = diff(explode(' ', $old), explode(' ', $new)); + foreach($diff as $k){ + if(is_array($k)) + $ret .= (!empty($k['d'])?"<del>".implode(' ',$k['d'])."</del> ":''). + (!empty($k['i'])?"<ins>".implode(' ',$k['i'])."</ins> ":''); + else $ret .= $k . ' '; + } + return $ret; +} + + +//a cosa serve? +function applyBreaks($values,$fields) +{ + $fieldsArray = explode(',',$fields); + + foreach ($fieldsArray as $field) + { + if (array_key_exists($field,$values)) + { + $values[$field] = nl2br($values[$field]); + } + } + return $values; +} + + +function getLinkToUser($user) +{ + if (strstr($user,'__')) + { + return str_replace('__',null,$user); + } + else + { + return "<a href='http://".DOMAIN_NAME."/users/meet/".Lang::$current."/$user'>$user</a>"; + } +} + + + +//decode the text of the wiki +function decodeWikiText($string) +{ + + $string = preg_replace('/(\[hr\])/', '<hr />',$string); + + $string = preg_replace_callback('/(\[a\])(.*?)(\[\/a\])/', 'linkTo',$string); + + $string = preg_replace_callback('/(\[a\])(.*?)\|(.*?)(\[\/a\])/', 'linkToWithText',$string); + + $string = preg_replace_callback('/(\[notebook\])([0-9]*?)(\[\/notebook\])/s', 'linkToNotebook',$string); + + $string = preg_replace_callback('/(\[wifi\])([0-9]*?)(\[\/wifi\])/s', 'linkToWifi',$string); + + $string = preg_replace_callback('/(\[videocard\])([0-9]*?)(\[\/videocard\])/s', 'linkToVideocard',$string); + + $string = preg_replace('/(\[b\])(.*?)(\[\/b\])/s', '<b>${2}</b>',$string); + + $string = preg_replace('/(\[u\])(.*?)(\[\/u\])/s', '<u>${2}</u>',$string); + + $string = preg_replace('/(\[i\])(.*?)(\[\/i\])/s', '<i>${2}</i>',$string); + + $string = preg_replace('/(\[del\])(.*?)(\[\/del\])/s', '<del>${2}</del>',$string); + + $string = preg_replace('/(\[\*\])(.*?)(\[\/\*\])/s', '<li>${2}</li>',$string); + + $string = preg_replace('/(\[list\])(.*?)(\[\/list\])/s', '<ul>${2}</ul>',$string); + + $string = preg_replace('/(\[enum\])(.*?)(\[\/enum\])/s', '<ol>${2}</ol>',$string); + + $string = preg_replace('/(\[code\])(.*?)(\[\/code\])/s', '<pre class="code_pre">${2}</pre>',$string); + + $string = preg_replace('/(\[p\])(.*?)(\[\/p\])/s', '<p>${2}</p>',$string); + + $string = preg_replace('/(\[h1\])(.*?)(\[\/h1\])/s', '<div class="div_h1">${2}</div>',$string); + + $string = preg_replace('/(\[h2\])(.*?)(\[\/h2\])/s', '<div class="div_h2">${2}</div>',$string); + + $string = preg_replace('/(\[h3\])(.*?)(\[\/h3\])/s', '<div class="div_h3">${2}</div>',$string); + + return $string; +} + +function checkUrl($url) +{ +// $match = '/^http\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)?\.(com|net|it|info|org|eu|uk)((\/[a-zA-Z0-9\_\-\+]+)+[\/]?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; + + $match = '/^http\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)?\.(com|net|it|info|org|eu|uk|ca)((\/[a-zA-Z0-9\_\-\+]+)*(\/([a-zA-Z0-9\_\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; + + if (preg_match($match,$url)) + { + return true; + } + else + { + return false; + } +} + +function vitalizeUrl($string) +{ + if (checkUrl($string)) + { + return "<a title = '".$string."' href='".$string."'>".$string."</a>"; + } + return $string; +} + +function linkTo($match) +{ + if (checkUrl($match[2])) + { + return "<a title = '".$match[2]."' href='".$match[2]."'>".$match[2]."</a>"; + } + else + { + return $match[0]; + } +} + +function linkToWithText($match) +{ + if (checkUrl($match[2])) + { + + return "<a title = '".$match[2]."' href='".$match[2]."'>".$match[3]."</a>"; + } + else + { + return $match[0]; + } +} + +//create the link to the wiki page of the notebook +function linkToNotebook($match) +{ + $hardware = new HardwareModel(); + $clean['id_hard'] = (int)$match[2]; + $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); + $href = "HTTP://".DOMAIN_NAME."/notebooks/view/".Lang::$current."/".$clean['id_hard']."/$name"; + return (strcmp($name,'') !== 0) ? "<a title = 'link to notebook $name: $href' href='$href'>".$name."</a>" : $match[0]; +} + +//create the link to the wiki page of the wifi +function linkToWifi($match) +{ + $hardware = new HardwareModel(); + $clean['id_hard'] = (int)$match[2]; + $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); + $href = "HTTP://".DOMAIN_NAME."/wifi/view/".Lang::$current."/".$clean['id_hard']."/$name"; + return (strcmp($name,'') !== 0) ? "<a title = 'link to wifi card $name: $href' href='$href'>".$name."</a>" : $match[0]; +} + +//create the link to the wiki page of the videocard +function linkToVideocard($match) +{ + $hardware = new HardwareModel(); + $clean['id_hard'] = (int)$match[2]; + $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); + $href = "HTTP://".DOMAIN_NAME."/videocards/view/".Lang::$current."/".$clean['id_hard']."/$name"; + return (strcmp($name,'') !== 0) ? "<a title = 'link to video card $name: $href' href='$href'>".$name."</a>" : $match[0]; +} + +function getUserName($id_user = 0) +{ + $clean['id_user'] = (int)$id_user; + $u = new UsersModel(); + return $u->getUser($clean['id_user']); +} + +function getMotivation($row,$controller) +{ + if (strcmp($row['deletion']['object'],'duplication') === 0) + { + $clean['id_hard'] = (int)$row['deletion']['id_duplicate']; + $hardware = new HardwareModel(); + $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); + return "<b>duplication</b> of the model having id <b><a href='http://".DOMAIN_NAME."/".$controller."/view/".Lang::$current."/".$clean['id_hard']."/".$name."'>".$clean['id_hard']."</a></b>"; + } + else + { + return "<b>".$row['deletion']['object']."</b>"; + } +} + +//get the text in the right language +function gtext($string) +{ + if (isset(Lang::$i18n[Lang::$current][$string])) + { + return Lang::$i18n[Lang::$current][$string]; + } + return $string; +}
\ No newline at end of file diff --git a/h-source/Application/Include/params.php b/h-source/Application/Include/params.php new file mode 100644 index 0000000..d53960b --- /dev/null +++ b/h-source/Application/Include/params.php @@ -0,0 +1,143 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Website +{ + static public $generalMail = ""; + + static public $generalName = "h-node.com"; + + static public $projectName = "h-node"; + + static public $mailServer = ""; + + static public $mailPassword = ""; +} + +class Account +{ + + static public $confirmTime = 3600; + + static public function confirm($username,$e_mail,$id_user,$token) + { + require_once (ROOT.'/External/swiftmailer/lib/swift_required.php'); + + $clean['username'] = sanitizeAll($username); + $clean['id_user'] = (int)$id_user; + $clean['token'] = sanitizeAll($token); + + $siteName = Website::$generalName; + $siteMail = Website::$generalMail; + + $mess = "Hello,\n\nyou have registered an account at $siteName with the following data:\nusername: ".$clean['username']."\n\nin order to confirm the registration of the new account follow the link below\nhttp://".DOMAIN_NAME."/users/confirm/".Lang::$current."/".$clean['id_user']."/".$clean['token']."\n\nIf you don't want to confirm the account registration\nthen wait one hour and your username and e-mail will be deleted from the database\n\nIf you received this e-mail for error, please simply disregard this message"; + + $message = Swift_Message::newInstance()->setSubject('account registration to '.$siteName)->setFrom(array($siteMail => $siteName))->setTo(array($e_mail))->setBody($mess); + + //Create the Transport + $transport = Swift_SmtpTransport::newInstance(Website::$mailServer, 25)->setUsername(Website::$generalMail)->setPassword(Website::$mailPassword); + + //Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + //Send the message + $result = $mailer->send($message); + + if ($result) + { + return true; + } + else + { + return false; + } + + } + + static public function sendnew($username,$e_mail,$id_user,$token) + { + require_once (ROOT.'/External/swiftmailer/lib/swift_required.php'); + + $clean['username'] = sanitizeAll($username); + $clean['id_user'] = (int)$id_user; + $clean['token'] = sanitizeAll($token); + + $siteName = Website::$generalName; + $siteMail = Website::$generalMail; + + $mess = "Hello,\n\nyou have requested a new password for your account at $siteName.\nYour username is:\n".$clean['username']."\n\nin order to obtain a new password for your account follow the link below\nhttp://".DOMAIN_NAME."/users/change/".Lang::$current."/".$clean['id_user']."/".$clean['token']."\n\nIf you don't want to change the password then disregard this mail\n"; + + $message = Swift_Message::newInstance()->setSubject('request a new password at '.$siteName)->setFrom(array($siteMail => $siteName))->setTo(array($e_mail))->setBody($mess); + + //Create the Transport + $transport = Swift_SmtpTransport::newInstance(Website::$mailServer, 25)->setUsername(Website::$generalMail)->setPassword(Website::$mailPassword); + + //Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + //Send the message + $result = $mailer->send($message); + + if ($result) + { + return true; + } + else + { + return false; + } + + } + + static public function sendpassword($username,$e_mail,$password) + { + require_once (ROOT.'/External/swiftmailer/lib/swift_required.php'); + + $clean['username'] = sanitizeAll($username); + $clean['password'] = sanitizeAll($password); + + $siteName = Website::$generalName; + $siteMail = Website::$generalMail; + + $mess = "Hello,\n\nyou have requested a new password for your account to $siteName.\nYour username is:\n".$clean['username']."\n\nYour new password is:\n".$clean['password']."\n"; + + $message = Swift_Message::newInstance()->setSubject('get your new h-node.com account password ')->setFrom(array($siteMail => $siteName))->setTo(array($e_mail))->setBody($mess); + + //Create the Transport + $transport = Swift_SmtpTransport::newInstance(Website::$mailServer, 25)->setUsername(Website::$generalMail)->setPassword(Website::$mailPassword); + + //Create the Mailer using your created Transport + $mailer = Swift_Mailer::newInstance($transport); + + //Send the message + $result = $mailer->send($message); + + if ($result) + { + return true; + } + else + { + return false; + } + + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/BaseModel.php b/h-source/Application/Models/BaseModel.php new file mode 100644 index 0000000..b40482e --- /dev/null +++ b/h-source/Application/Models/BaseModel.php @@ -0,0 +1,66 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class BaseModel extends Model_Tree { + + public $type = ''; //device type + public $diffFields = array(); + + public function __construct() { + $this->_tables = 'hardware'; + $this->_idFields = 'id_hard'; + + $this->_where=array( + 'type' => 'hardware', + 'vendor' => 'hardware', + 'compatibility' => 'hardware', + 'comm_year' => 'hardware', + ); + + $this->orderBy = 'hardware.id_hard desc'; + parent::__construct(); + } + + public function checkType($id_hard = 0) + { + $clean['id_hard'] = (int)$id_hard; + $res = $this->db->select('hardware','type','id_hard='.$clean['id_hard']); + if (count($res) > 0) + { + return (strcmp($this->type,$res[0]['hardware']['type']) === 0 ) ? true : false; + } + return false; + } + + public function getDiffArray($oldArray, $newArray) + { + $diffArray = array(); + foreach ($this->diffFields as $field => $label) + { + if (array_key_exists($field,$oldArray) and array_key_exists($field,$newArray)) + { +// echo htmlDiff($oldArray[$field], $newArray[$field]); +// echo $oldArray[$field].$newArray[$field]; + $diffArray[$label] = htmlDiff($oldArray[$field], $newArray[$field]); + } + } + return $diffArray; + } +}
\ No newline at end of file diff --git a/h-source/Application/Models/BoxesModel.php b/h-source/Application/Models/BoxesModel.php new file mode 100644 index 0000000..0e6eee1 --- /dev/null +++ b/h-source/Application/Models/BoxesModel.php @@ -0,0 +1,40 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class BoxesModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'boxes'; + $this->_idFields = 'id_box'; + + parent::__construct(); + } + + public $formStruct = array( + 'entries' => array( + 'title' => array(), + 'message' => array('type'=>'Textarea'), + 'id_box' => array( + 'type' => 'Hidden' + ) + ), + ); + +}
\ No newline at end of file diff --git a/h-source/Application/Models/DeletionModel.php b/h-source/Application/Models/DeletionModel.php new file mode 100644 index 0000000..ea3c4e6 --- /dev/null +++ b/h-source/Application/Models/DeletionModel.php @@ -0,0 +1,51 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class DeletionModel extends Model_Tree +{ + + public function __construct() + { + $this->_tables = 'deletion'; + $this->_idFields = 'id_del'; + +// $this->_where=array( +// 'id_hard' => 'talk' +// ); +// + $this->_popupItemNames = array( + 'object' => 'object', + ); + + $this->_popupLabels = array( + 'object' => 'OBJECT', + ); +// + $this->orderBy = 'deletion.id_del desc'; + + $this->strongConditions['insert'] = array( + "checkIsStrings|duplication,other" => 'object', + "+checkLength|500" => 'message' + ); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php new file mode 100644 index 0000000..710ddaf --- /dev/null +++ b/h-source/Application/Models/HardwareModel.php @@ -0,0 +1,198 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HardwareModel extends Model_Map { + + public $id_user = 0; + public $type = ''; //device type + public $lastId = 0; //the id of the last record inserted + + public $formStruct = array( + 'entries' => array( + 'deleted'=> array('type'=>'Select','options'=>'no,yes'), + 'id_hard' => array( + 'type' => 'Hidden' + ) + ), + ); + + public function __construct() { + $this->_tables='hardware,regusers,hardware_users'; + $this->_idFields='id_hard,id_user'; + $this->_where=array( + 'type' => 'hardware', + 'username' => 'regusers', + 'has_confirmed' => 'regusers', + 'deleted' => 'regusers', + '-deleted' => 'hardware' + ); + $this->orderBy = 'hardware.id_hard desc'; + $this->printAssError = "no"; + + $this->_popupItemNames = array( + 'type'=>'type', + 'ask_for_del'=>'ask_for_del', + '-deleted'=>'deleted', + ); + + $this->_popupLabels = array( + 'type'=>'TYPE', + 'ask_for_del'=>'ASK FOR DEL?', + '-deleted'=>'DELETED?', + ); + + $this->databaseConditions['insert'] = array( + 'checkUnique' => 'model', + ); + + $this->databaseConditions['update'] = array( + 'checkUniqueCompl' => 'model', + ); + + parent::__construct(); + } + + public function insert() + { + $this->values['created_by'] = (int)$this->id_user; + $this->values['updated_by'] = (int)$this->id_user; + $this->values['update_date'] = date('Y-m-d H:i:s'); + + //random ID + $randomId = md5(uniqid(mt_rand(),true)); + $this->values["type"] = $randomId; + + parent::insert(); + + //associate the user to the record + if ($this->queryResult) + { + $resId = $this->db->select("hardware","id_hard","type='$randomId'"); + $clean['id'] = $resId[0]['hardware']['id_hard']; + $this->lastId = $clean['id']; + $this->db->update('hardware','type',array($this->type),'id_hard='.$clean['id']); + + $this->associate($clean['id']); + } + + } + + public function update($id) + { + $clean['id'] = (int)$id; + + $this->values['updated_by'] = (int)$this->id_user; + $this->values['update_date'] = date('Y-m-d H:i:s'); + + //save the old fields in the revisions table + $this->setWhereQueryClause(array('id_hard' => $clean['id'])); + $oldStruct = $this->getFields($this->fields.',created_by,updated_by,update_date,type,id_hard'); + + if (count($oldStruct > 0)) + { + if (strcmp($oldStruct[0]['hardware']['type'],$this->type) === 0) + { + $oldValues = $oldStruct[0]['hardware']; + + $revisions = new RevisionsModel(); + $revisions->values = $oldValues; + if ($revisions->insert()) + { + parent::update($clean['id']); + if ($this->queryResult) + { + $this->lastId = $clean['id']; + if (!$this->checkAssociation($clean['id'],(int)$this->id_user)) + { + $this->associate($clean['id']); + } + } + } + } + } + } + + public function makeCurrent($id_rev) + { + $clean['id_rev'] = (int)$id_rev; + + $revisions = new RevisionsModel(); + + $clean['id_hard'] = (int)$revisions->getIdHard($clean['id_rev']); + + //save the old fields in the revisions table + $this->setWhereQueryClause(array('id_hard'=>$clean['id_hard'])); + $oldStruct = $this->getFields($this->fields.',created_by,updated_by,update_date,type,id_hard'); + + if (count($oldStruct > 0)) + { + if (strcmp($oldStruct[0]['hardware']['type'],$this->type) === 0) + { + //get the values of the revision + $revisions->setWhereQueryClause(array('id_rev'=>$clean['id_rev'])); + $newStruct = $revisions->getFields($this->fields.',created_by,updated_by,update_date,type,id_hard'); + + if (count($newStruct > 0)) + { + $revisions->values = $oldStruct[0]['hardware']; + + $this->values = $newStruct[0]['revisions']; + $this->values['updated_by'] = (int)$this->id_user; + $this->values['update_date'] = date('Y-m-d H:i:s'); + + if ($revisions->insert()) + { + if (parent::update($clean['id_hard'])) + { + $this->lastId = $clean['id_hard']; + if (!$this->checkAssociation($clean['id_hard'],(int)$this->id_user)) + { + $this->associate($clean['id_hard']); + } + } + } + } + } + else + { + $this->notice = "<div class='alert'>Wrong type..</div>\n"; + } + } + + } + + public function associate($id_record) + { + return parent::associate((int)$id_record,(int)$this->id_user); + } + + //get the model name + public function getTheModelName($id) + { + $clean['id'] = (int)$id; + $this->setWhereQueryClause(array('id_hard' => $clean['id'])); + $res = $this->getFields('model'); + $name = count($res) > 0 ? $res[0]['hardware']['model'] : ''; + return $name; + } + + + +}
\ No newline at end of file diff --git a/h-source/Application/Models/HistoryModel.php b/h-source/Application/Models/HistoryModel.php new file mode 100644 index 0000000..309bc99 --- /dev/null +++ b/h-source/Application/Models/HistoryModel.php @@ -0,0 +1,48 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HistoryModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'history'; + $this->_idFields = 'id_history'; + + $this->orderBy = 'history.id_history'; + + $this->_popupFunctions = array( + 'created_by'=> 'getUserName', + ); + + $this->_popupItemNames = array( + 'type' => 'type', + 'action' => 'action', + 'created_by'=> 'created_by', + ); + + $this->_popupLabels = array( + 'type' => 'TYPE', + 'action' => 'ACTION', + 'created_by'=> 'MODERATOR', + ); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/IssuesModel.php b/h-source/Application/Models/IssuesModel.php new file mode 100644 index 0000000..8ca8a52 --- /dev/null +++ b/h-source/Application/Models/IssuesModel.php @@ -0,0 +1,131 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class IssuesModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'issues'; + $this->_idFields = 'id_issue'; + + $this->_onDelete = 'nocheck'; + + $this->_where = array( + 'priority' => 'issues', + 'status' => 'issues', + 'topic' => 'issues', + ); + + $this->_popupItemNames = array( + 'priority' => 'priority', + 'status' => 'status', + 'topic' => 'topic', + 'deleted' => 'deleted', + ); + + $this->_popupLabels = array( + 'priority' => 'PRIORITY', + 'status' => 'STATUS', + 'topic' => 'TOPIC', + 'deleted' => 'DELETED?', + ); + + $this->orderBy = 'issues.id_issue desc'; + + $this->strongConditions['insert'] = array( + "checkLength|99" => 'title', + "+checkLength|34" => 'topic', + "++checkLength|15" => 'priority', + "+++checkLength|5000" => 'message', + "checkisStrings|low,medium,high" => 'priority', + "+checkisStrings|maybe-a-bug,new-categories-of-hardware,add-a-vendor-name,other" => 'topic', + ); + + $this->formStruct = array( + 'entries' => array( + 'title' => array('labelString' => gtext("TITLE").':'), + 'topic' => array( + 'type'=>'Select', + 'options'=>array( + 'Add a vendor name' => 'add-a-vendor-name', + 'Maybe a bug' => 'maybe-a-bug', + 'Add new categories of hardware' => 'new-categories-of-hardware', + 'Other' => 'other' + ), + 'labelString' => gtext("TOPIC").':', + ), + 'deleted'=> array( + 'type' => 'Select', + 'options' => 'no,yes', + ), + 'priority' => array( + 'type'=>'Select', + 'options'=>'low,medium,high', + 'labelString' => gtext("PRIORITY").':', + ), + 'message' => array('type'=>'Textarea','idName'=>'bb_code','labelString' => gtext("MESSAGE").':',), + 'status' => array( + 'type' => 'Select', + 'options' => 'opened,closed' + ), + 'notice' => array( + 'type' => 'Textarea', + 'idName' => 'bb_code_notice', + ), + 'id_issue' => array( + 'type' => 'Hidden' + ) + ), + ); + + parent::__construct(); + } + +// public $formStruct = array( +// 'entries' => array( +// 'title' => array(), +// 'topic' => array( +// 'type'=>'Select', +// 'options'=>array( +// 'Add a vendor name' => 'add-a-vendor-name', +// 'Maybe a bug' => 'maybe-a-bug', +// 'Add new categories of hardware' => 'new-categories-of-hardware', +// 'Other' => 'other' +// ), +// ), +// 'deleted'=> array( +// 'type' => 'Select', +// 'options' => 'no,yes', +// ), +// 'priority' => array('type'=>'Select','options'=>'low,medium,high'), +// 'message' => array('type'=>'Textarea','idName'=>'bb_code'), +// 'status' => array( +// 'type' => 'Select', +// 'options' => 'opened,closed' +// ), +// 'notice' => array( +// 'type' => 'Textarea', +// 'idName' => 'bb_code_notice', +// ), +// 'id_issue' => array( +// 'type' => 'Hidden' +// ) +// ), +// ); +}
\ No newline at end of file diff --git a/h-source/Application/Models/MessagesModel.php b/h-source/Application/Models/MessagesModel.php new file mode 100644 index 0000000..64b2bed --- /dev/null +++ b/h-source/Application/Models/MessagesModel.php @@ -0,0 +1,56 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class MessagesModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'messages'; + $this->_idFields = 'id_mes'; + + $this->orderBy = 'messages.id_mes'; + + $this->_popupItemNames = array( + 'deleted' => 'deleted', + 'has_read' => 'has_read', + ); + + $this->_popupLabels = array( + 'deleted' => 'DELETED?', + 'has_read' => 'ALREADY READ?', + ); + + $this->strongConditions['insert'] = array( + "checkLength|5000" => 'message', + ); + + parent::__construct(); + } + + public $formStruct = array( + 'entries' => array( + 'deleted' => array('type'=>'Select','options'=>'no,yes'), + 'has_read' => array('type'=>'Select','options'=>'no,yes'), + 'message' => array('type'=>'Textarea','idName'=>'bb_code'), + 'id_mes' => array( + 'type' => 'Hidden' + ) + ), + ); +}
\ No newline at end of file diff --git a/h-source/Application/Models/NewsModel.php b/h-source/Application/Models/NewsModel.php new file mode 100644 index 0000000..fae053b --- /dev/null +++ b/h-source/Application/Models/NewsModel.php @@ -0,0 +1,42 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class NewsModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'news'; + $this->_idFields = 'id_news'; + + $this->orderBy = 'news.id_news desc'; + + parent::__construct(); + } + + public $formStruct = array( + 'entries' => array( + 'title' => array(), + 'message' => array('type'=>'Textarea','idName'=>'bb_code'), + 'id_news' => array( + 'type' => 'Hidden' + ) + ), + ); + +}
\ No newline at end of file diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php new file mode 100644 index 0000000..456f75f --- /dev/null +++ b/h-source/Application/Models/NotebooksModel.php @@ -0,0 +1,69 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class NotebooksModel extends BaseModel { + + public $type = 'notebook'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'compatibility' => 'compatibility', + 'comm_year' => 'comm_year', + 'subtype' => 'subtype', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'compatibility' => gtext("compatibility"), + 'comm_year' => gtext("year"), + 'subtype' => gtext("subtype"), + ); + + $this->_popupWhere = array( + 'vendor' => 'type="notebook" and deleted="no"', + 'compatibility' => 'type="notebook" and deleted="no"', + 'comm_year' => 'type="notebook" and deleted="no"', + 'subtype' => 'type="notebook" and deleted="no"', + ); + + $this->diffFields = array( + 'vendor' => gtext("vendor"), + 'model' => gtext('model name'), + 'subtype' => gtext('subtype (notebook or netbook)'), + 'comm_year' => gtext('year of commercialization'), + 'distribution' => gtext('GNU/Linux distribution used for the test'), + 'compatibility' => gtext('compatibility with free software'), + 'kernel' => gtext('tested with the following kernel libre'), + 'video_card_type' => gtext('video card model'), + 'video_card_works' => gtext('does the video card work?'), + 'wifi_type' => gtext('wifi model'), + 'wifi_works' => gtext('does the wifi card work?'), + 'description' => gtext('Description'), + ); + + $this->fieldsWithBreaks = array(gtext('Description')); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/ParamsModel.php b/h-source/Application/Models/ParamsModel.php new file mode 100644 index 0000000..d1347fe --- /dev/null +++ b/h-source/Application/Models/ParamsModel.php @@ -0,0 +1,41 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ParamsModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'params'; + $this->_idFields = 'id_par'; + + parent::__construct(); + } + + public $formStruct = array( + 'entries' => array( + 'updating' => array( + 'type'=>'Select', + 'options'=>'no,yes', + ), + 'id_par' => array( + 'type' => 'Hidden' + ) + ), + ); +}
\ No newline at end of file diff --git a/h-source/Application/Models/PrintersModel.php b/h-source/Application/Models/PrintersModel.php new file mode 100644 index 0000000..8d5991e --- /dev/null +++ b/h-source/Application/Models/PrintersModel.php @@ -0,0 +1,68 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class PrintersModel extends BaseModel +{ + + public $type = 'printer'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'compatibility' => 'compatibility', + 'comm_year' => 'comm_year', + 'interface' => 'interface', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'compatibility' => gtext("compatibility"), + 'comm_year' => gtext("year"), + 'interface' => gtext("interface"), + ); + + $this->_popupWhere = array( + 'vendor' => 'type="printer" and deleted="no"', + 'compatibility' => 'type="printer" and deleted="no"', + 'comm_year' => 'type="printer" and deleted="no"', + 'interface' => 'type="printer" and deleted="no"', + ); + + $this->diffFields = array( + 'vendor' => gtext("vendor"), + 'model' => gtext('model name'), + 'pci_id' => gtext("VendorID:ProductID code of the device"), + 'comm_year' => gtext('year of commercialization'), + 'interface' => gtext("interface"), + 'distribution' => gtext('GNU/Linux distribution used for the test'), + 'compatibility' => gtext('compatibility with free software'), + 'kernel' => gtext('tested with the following kernel libre'), + 'driver' => gtext("free driver used"), + 'description' => gtext('Description'), + ); + + $this->fieldsWithBreaks = array(gtext('Description')); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/ProfileModel.php b/h-source/Application/Models/ProfileModel.php new file mode 100644 index 0000000..c282b4f --- /dev/null +++ b/h-source/Application/Models/ProfileModel.php @@ -0,0 +1,70 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ProfileModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'profile'; + $this->_idFields = 'id_prof'; + + $this->_where=array( + 'username' => 'regusers', + 'has_confirmed' => 'regusers', + 'deleted' => 'regusers' + ); + + $this->softConditions['update'] = array( + "checkLength|90" => "real_name,where_you_are,fav_distro,birth_date,website|the fields 'real name', 'where_you_are', 'favorite distro', 'website' and 'birthdate' don't have to have more than 90 characters", + "checkLength|1000" => "projects,description|the fields 'projects' and 'description' don't have to have more than 1000 characters", + "checkIsStrings|no,yes" => "publish_mail" + ); + + parent::__construct(); + } + + public $formStruct = array( + + 'entries' => array( + 'real_name' => array('labelString'=>'Your real name'), + 'website' => array('labelString'=>'Your website address (add http://)'), + 'where_you_are' => array('labelString'=>'I\'m from...'), + 'birth_date' => array('labelString'=>'My birthdate'), + 'fav_distro' => array('labelString'=>'My favourite distribution'), + 'projects' => array( + 'type' => 'Textarea', + 'labelString'=>'Free software projects I\'m working on' + ), + 'publish_mail' => array( + 'type' => 'Select', + 'options' => 'no,yes', + 'labelString'=> 'Would you like to publish your e-mail address?' + ), + 'description' => array( + 'type' => 'Textarea', + 'labelString'=> 'Your description' + ), + 'id_prof' => array( + 'type' => 'Hidden' + ) + ), + + ); + +}
\ No newline at end of file diff --git a/h-source/Application/Models/RevisionsModel.php b/h-source/Application/Models/RevisionsModel.php new file mode 100644 index 0000000..203da64 --- /dev/null +++ b/h-source/Application/Models/RevisionsModel.php @@ -0,0 +1,48 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class RevisionsModel extends Model_Tree { + + public $id_user = 0; + public $type = ''; //device type + + public function __construct() { + $this->_tables='revisions'; + $this->_idFields='id_rev'; + + $this->_where=array( + 'id_hard'=>'revisions' + ); + + $this->orderBy = 'id_rev desc'; + + parent::__construct(); + } + + public function getIdHard($id_rev = 0) + { + $clean['id_rev'] = (int)$id_rev; + + $res = $this->db->select('revisions','id_hard','id_rev='.$clean['id_rev']); + + return (count($res) > 0) ? $res[0]['revisions']['id_hard'] : 0; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/ScannersModel.php b/h-source/Application/Models/ScannersModel.php new file mode 100644 index 0000000..74e2bdd --- /dev/null +++ b/h-source/Application/Models/ScannersModel.php @@ -0,0 +1,68 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class ScannersModel extends BaseModel +{ + + public $type = 'scanner'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'compatibility' => 'compatibility', + 'comm_year' => 'comm_year', + 'interface' => 'interface', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'compatibility' => gtext("compatibility"), + 'comm_year' => gtext("year"), + 'interface' => gtext("interface"), + ); + + $this->_popupWhere = array( + 'vendor' => 'type="scanner" and deleted="no"', + 'compatibility' => 'type="scanner" and deleted="no"', + 'comm_year' => 'type="scanner" and deleted="no"', + 'interface' => 'type="scanner" and deleted="no"', + ); + + $this->diffFields = array( + 'vendor' => gtext("vendor"), + 'model' => gtext('model name'), + 'pci_id' => gtext("VendorID:ProductID code of the device"), + 'comm_year' => gtext('year of commercialization'), + 'interface' => gtext("interface"), + 'distribution' => gtext('GNU/Linux distribution used for the test'), + 'compatibility' => gtext('compatibility with free software'), + 'kernel' => gtext('tested with the following kernel libre'), + 'driver' => gtext("free driver used"), + 'description' => gtext('Description'), + ); + + $this->fieldsWithBreaks = array(gtext('Description')); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/TalkModel.php b/h-source/Application/Models/TalkModel.php new file mode 100644 index 0000000..992ffa9 --- /dev/null +++ b/h-source/Application/Models/TalkModel.php @@ -0,0 +1,52 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class TalkModel extends Model_Tree { + + public function __construct() { + $this->_tables = 'talk'; + $this->_idFields = 'id_talk'; + + $this->_where=array( + 'id_hard' => 'talk' + ); + + $this->orderBy = 'talk.id_talk desc'; + + $this->strongConditions['insert'] = array( + "checkLength|99" => 'title', + "+checkNotEmpty" => 'message', + "++checkLength|5000" => 'message', + ); + + parent::__construct(); + } + + public $formStruct = array( + 'entries' => array( + 'title' => array(), + 'message' => array('type'=>'Textarea'), + 'id_talk' => array( + 'type' => 'Hidden' + ) + ), + ); + +}
\ No newline at end of file diff --git a/h-source/Application/Models/UsersModel.php b/h-source/Application/Models/UsersModel.php new file mode 100755 index 0000000..c425079 --- /dev/null +++ b/h-source/Application/Models/UsersModel.php @@ -0,0 +1,221 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class UsersModel extends Model_Map +{ + + public static $usersList = array(); + + public function __construct() + { + $this->_tables='regusers,reggroups,regusers_groups'; + $this->_idFields='id_user,id_group'; + + $this->_where=array( + 'id_group' => 'reggroups', + 'id_user' => 'regusers', + 'name' => 'reggroups', + 'confirmation_token'=> 'regusers', + 'has_confirmed' => 'regusers', + 'deleted' => 'regusers', + 'forgot_token' => 'regusers' + ); + + $this->_popupItemNames = array( + 'has_confirmed'=>'has_confirmed', + 'deleted'=>'deleted', + 'id_group'=>'name', + ); + + $this->_popupLabels = array( + 'has_confirmed'=>'HAS CONFIRMED?', + 'deleted'=>'DELETED?', + 'id_group'=>'GROUP' + ); + + $this->orderBy = 'regusers.id_user desc'; + + parent::__construct(); + + $this->deleteNotRegistered(); + } + + public function deleteNotRegistered() + { + $limit = time() - Account::$confirmTime; + $this->db->del('regusers','has_confirmed = 1 and deleted = "no" and creation_time < '.$limit); + } + + public function getUser($id_user = 0) + { + $clean['id_user'] = (int)$id_user; + if (array_key_exists($clean['id_user'],self::$usersList)) + { + return self::$usersList[$clean['id_user']]; + } + else + { + $user = $this->db->select('regusers','username,has_confirmed','id_user='.$clean['id_user']); + if (count($user) > 0) + { + $fuser = (strcmp($user[0]['regusers']['has_confirmed'],0) === 0) ? $user[0]['regusers']['username'] : "__".$user[0]['regusers']['username']; + self::$usersList[$clean['id_user']] = $fuser; + return $fuser; + } + else + { + return "__"; + } + } + } + + public function insert() + { + //create the token + $confirmation_token = md5(randString(20)); + $this->values['confirmation_token'] = $confirmation_token; + //has_confirmed flag + $this->values['has_confirmed'] = 1; + $this->values['creation_time'] = time(); + + //random ID + $randomId = md5(randString(5).uniqid(mt_rand(),true)); + $this->values["temp_field"] = $randomId; + + if (isset($_POST['captcha'])) + { + if ( strcmp($_SESSION['captchaString'],$_POST['captcha']) === 0 ) + { + + parent::insert(); + + if ($this->queryResult) + { + $resId = $this->db->select("regusers","id_user","temp_field='$randomId'"); + $clean['id_user'] = $resId[0]['regusers']['id_user']; + $this->db->update("regusers",'temp_field',array(''),'id_user='.$clean['id_user']); + + $result = Account::confirm($this->values['username'],$this->values['e_mail'],$clean['id_user'],$confirmation_token); + + if ($result) + { + $_SESSION['status'] = 'sent'; + } + else + { + $_SESSION['status'] = 'regerror'; + } + + $hed = new HeaderObj(DOMAIN_NAME); + $hed->redirect('users/notice/'.Lang::$current); + } + + } + else + { + $this->result = false; + $this->queryResult = false; + $this->notice = "<div class='alert'>Wrong captcha code...</div>\n"; + } + } + } + + public function close($id_user) + { + $clean['id_user'] = (int)$id_user; + + $this->values = array( + 'has_confirmed' => 1, + 'deleted' => 'yes', + 'e_mail' => '' + ); + + if ($this->update($clean['id_user'])) + { + $_SESSION['status'] = 'deleted'; + + $profile = new ProfileModel(); + $res = $profile->db->select('profile','id_prof','created_by='.$clean['id_user']); + + if (count($res) > 0) + { + $clean['id_prof'] = (int)$res[0]['profile']['id_prof']; + $profile->values = array( + 'real_name' => '', + 'where_you_are' => '', + 'birth_date' => '', + 'fav_distro' => '', + 'projects' => '', + 'description' => '' + ); + $profile->update($clean['id_prof']); + } + } + + } + + public function forgot($username) + { + $clean['username'] = ctype_alnum($username) ? sanitizeAll($username) : ''; + + if (isset($_POST['captcha'])) + { + if ( strcmp($_SESSION['captchaString'],$_POST['captcha']) === 0 ) + { + $res = $this->db->select('regusers','e_mail,id_user','username="'.$clean['username'].'" and has_confirmed = 0 and deleted = "no"'); + if (count($res) > 0) + { + $e_mail = $res[0]['regusers']['e_mail']; + $id_user = (int)$res[0]['regusers']['id_user']; + $forgot_token = md5(randString(20)); + $forgot_time = time(); + $updateArray = array($forgot_token, $forgot_time); + $this->db->update('regusers','forgot_token,forgot_time',$updateArray,'username="'.$clean['username'].'"'); + + $result = Account::sendnew($clean['username'],$e_mail,$id_user,$forgot_token); + + if ($result) + { + $_SESSION['status'] = 'sent_new'; + } + else + { + $_SESSION['status'] = 'sent_new_error'; + } + + $hed = new HeaderObj(DOMAIN_NAME); + $hed->redirect('users/notice/'.Lang::$current,1); + + } + else + { + $this->notice = "<div class='alert'>the user does not exist</div>\n"; + } + } + else + { + $this->result = false; + $this->queryResult = false; + $this->notice = "<div class='alert'>Wrong captcha code...</div>\n"; + } + } + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/VideocardsModel.php b/h-source/Application/Models/VideocardsModel.php new file mode 100644 index 0000000..fb90a31 --- /dev/null +++ b/h-source/Application/Models/VideocardsModel.php @@ -0,0 +1,64 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class VideocardsModel extends BaseModel +{ + + public $type = 'videocard'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'comm_year' => 'comm_year', + 'interface' => 'interface', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'comm_year' => gtext("year"), + 'interface' => gtext("interface"), + ); + + $this->_popupWhere = array( + 'vendor' => 'type="videocard" and deleted="no"', + 'comm_year' => 'type="videocard" and deleted="no"', + 'interface' => 'type="videocard" and deleted="no"', + ); + + $this->diffFields = array( + 'vendor' => gtext("vendor"), + 'model' => gtext('model name'), + 'pci_id' => gtext("VendorID:ProductID code of the device"), + 'comm_year' => gtext('year of commercialization'), + 'interface' => gtext("interface"), + 'distribution' => gtext('GNU/Linux distribution used for the test'), + 'kernel' => gtext('tested with the following kernel libre'), + 'video_card_works' => gtext("how does it work with free software?"), + 'description' => gtext('Description'), + ); + + $this->fieldsWithBreaks = array(gtext('Description')); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Models/WifiModel.php b/h-source/Application/Models/WifiModel.php new file mode 100644 index 0000000..1322cdd --- /dev/null +++ b/h-source/Application/Models/WifiModel.php @@ -0,0 +1,67 @@ +<?php + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class WifiModel extends BaseModel +{ + + public $type = 'wifi'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'comm_year' => 'comm_year', + 'wifi_works' => 'wifi_works', + 'interface' => 'interface', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'comm_year' => gtext("year"), + 'wifi_works' => gtext("does it work?"), + 'interface' => gtext("interface"), + ); + + $this->_popupWhere = array( + 'vendor' => 'type="wifi" and deleted="no"', + 'comm_year' => 'type="wifi" and deleted="no"', + 'wifi_works' => 'type="wifi" and deleted="no"', + 'interface' => 'type="wifi" and deleted="no"', + ); + + $this->diffFields = array( + 'vendor' => gtext("vendor"), + 'model' => gtext('model name'), + 'pci_id' => gtext("VendorID:ProductID code of the device"), + 'comm_year' => gtext('year of commercialization'), + 'interface' => gtext("interface"), + 'distribution' => gtext('GNU/Linux distribution used for the test'), + 'kernel' => gtext('tested with the following kernel libre'), + 'wifi_works' => gtext("does it work with free software?"), + 'description' => gtext('Description'), + ); + + $this->fieldsWithBreaks = array(gtext('Description')); + + parent::__construct(); + } + +}
\ No newline at end of file diff --git a/h-source/Application/Modules/ModBase.php b/h-source/Application/Modules/ModBase.php new file mode 100644 index 0000000..44d25a2 --- /dev/null +++ b/h-source/Application/Modules/ModBase.php @@ -0,0 +1,41 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//module to print an HTML link +//extends the ModAbstract class inside the Library folder +class ModBase extends ModAbstract { + + public function render() + { + return null; + } + + public function getHtmlClass() + { + if (isset($this->simpleXmlObj->classname)) + { + return " class='".$this->simpleXmlObj->classname[0]."' "; + } + return null; + } + + //wrap the html with a <div> + //look for the <div> tag in the xml in order to set the class of the div + public function wrapDiv($string) + { + $divOpen = "<div class='box_module'>"; + $divClose = "</div>"; + + if (isset($this->simpleXmlObj->div)) + { + $divOpen = "<div class='".$this->simpleXmlObj->div."'>"; + } + + return $divOpen . $string . $divClose; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Modules/ModImage.php b/h-source/Application/Modules/ModImage.php new file mode 100644 index 0000000..5a116b1 --- /dev/null +++ b/h-source/Application/Modules/ModImage.php @@ -0,0 +1,45 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//module to print an HTML image +//extends the ModBase class +class ModImage extends ModBase { + + public function widthPropertyString() + { + if (isset($this->simpleXmlObj->width)) + { + return " width = '" . $this->simpleXmlObj->width ."' "; + } + return null; + } + + public function heightPropertyString() + { + if (isset($this->simpleXmlObj->height)) + { + return " height = '" . $this->simpleXmlObj->height ."' "; + } + return null; + } + + public function titlePropertyString() + { + if (isset($this->simpleXmlObj->title)) + { + return " title = '" . $this->simpleXmlObj->title ."' "; + } + return null; + } + + public function render() + { + $link = "<img ".$this->getHtmlClass().$this->widthPropertyString().$this->heightPropertyString().$this->titlePropertyString()." src='".$this->simpleXmlObj->src[0]."'>"; + return $this->wrapDiv($link)."\n"; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Modules/ModLink.php b/h-source/Application/Modules/ModLink.php new file mode 100644 index 0000000..011bc78 --- /dev/null +++ b/h-source/Application/Modules/ModLink.php @@ -0,0 +1,18 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//module to print an HTML link +//extends the ModBase class +class ModLink extends ModBase { + + public function render() + { + $link = "<a ".$this->getHtmlClass()." href='".$this->simpleXmlObj->href[0]."'>".$this->simpleXmlObj->text[0]."</a>"; + return $this->wrapDiv($link)."\n"; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Modules/ModLinkimage.php b/h-source/Application/Modules/ModLinkimage.php new file mode 100644 index 0000000..8e49bbf --- /dev/null +++ b/h-source/Application/Modules/ModLinkimage.php @@ -0,0 +1,18 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//module to print an HTML image linking to something +//extends the ModBase class +class ModLinkimage extends ModImage { + + public function render() + { + $link = "<a ".$this->getHtmlClass()." href='".$this->simpleXmlObj->href[0]."'><img ".$this->widthPropertyString().$this->heightPropertyString().$this->titlePropertyString()." src='".$this->simpleXmlObj->src[0]."'></a>"; + return $this->wrapDiv($link)."\n"; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Modules/ModRaw.php b/h-source/Application/Modules/ModRaw.php new file mode 100644 index 0000000..4ed3226 --- /dev/null +++ b/h-source/Application/Modules/ModRaw.php @@ -0,0 +1,18 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//module to print some raw HTML +//extends the ModBase class +class ModRaw extends ModBase { + + public function render() + { + $link = $this->simpleXmlObj->text[0]; + return $this->wrapDiv($link)."\n"; + } + +}
\ No newline at end of file diff --git a/h-source/Application/Modules/index.html b/h-source/Application/Modules/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Application/Modules/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Application/Strings/Lang/It/DbCondStrings.php b/h-source/Application/Strings/Lang/It/DbCondStrings.php new file mode 100644 index 0000000..4c985cd --- /dev/null +++ b/h-source/Application/Strings/Lang/It/DbCondStrings.php @@ -0,0 +1,17 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//error strings in the case database conditions are not satisfied +class Lang_It_DbCondStrings extends Lang_Eng_DbCondStrings { + + //get the error string in the case that the value of the field $field is already present in the table $table + public function getNotUniqueString($field) + { + return "<div class='alert'>Il valore del campo <i>". $field ."</i> è già presente. Per favore scegline un altro.</div>\n"; + } + +} diff --git a/h-source/Application/Strings/Lang/It/ModelStrings.php b/h-source/Application/Strings/Lang/It/ModelStrings.php new file mode 100644 index 0000000..e02013b --- /dev/null +++ b/h-source/Application/Strings/Lang/It/ModelStrings.php @@ -0,0 +1,19 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_It_ModelStrings extends Lang_ResultStrings { + + public $string = array( + "error" => "<div class='alert'>Errore nella query: contatta l'amministratore!</div>\n", + "executed" => "<div class='executed'>operazione eseguita!</div>\n", + "associate" => "<div class='alert'>Problema di integrità referenziale: il record è associato ad un record di una tabella figlia. Devi prima rompere l'associazione.</div>\n", + "no-id" => "<div class='alert'>Non è definito alcun id della query</div>\n", + "not-linked" => "<div class='alert'>Il record non è associato, non puoi dissociarlo</div>", + "linked" => "<div class='alert'>Il record è già associato, non puoi associarlo un'altra volta</div>" + ); + +} diff --git a/h-source/Application/Strings/Lang/It/UploadStrings.php b/h-source/Application/Strings/Lang/It/UploadStrings.php new file mode 100644 index 0000000..57bcda6 --- /dev/null +++ b/h-source/Application/Strings/Lang/It/UploadStrings.php @@ -0,0 +1,26 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_It_UploadStrings extends Lang_ResultStrings { + + public $string = array( + "error" => "<div class='alert'>Errore: verificare i permessi del file/directory</div>\n", + "executed" => "<div class='executed'>Operazione eseguita!</div>\n", + "not-child" => "<div class='alert'>La cartella selezionata non è una sotto directory della directory base</div>\n", + "not-dir" => "<div class='alert'>La cartella selezionata non è una directory</div>\n", + "not-empty" => "<div class='alert'>La cartella selezionata non è vuota</div>\n", + "no-folder-specified" => "<div class='alert'>Non è stata specificata alcuna cartella</div>\n", + "not-writable" => "<div class='alert'>La cartella non è scrivibile</div>\n", + "not-writable-file" => "<div class='alert'>Il file non è scrivibile</div>\n", + "dir-exists" => "<div class='alert'>Esiste già una directory con lo stesso nome</div>\n", + "no-upload-file" => "<div class='alert'>Non c'è alcun file di cui fare l'upload</div>\n", + "size-over" => "<div class='alert'>La dimensione del file è troppo grande</div>\n", + "not-allowed-ext" => "<div class='alert'>L'estensione del file che vuoi caricare non è consentita</div>\n", + "file-exists" => "<div class='alert'>Esiste già un file con lo stesso nome</div>\n", + ); + +} diff --git a/h-source/Application/Strings/Lang/It/ValCondStrings.php b/h-source/Application/Strings/Lang/It/ValCondStrings.php new file mode 100644 index 0000000..a54c650 --- /dev/null +++ b/h-source/Application/Strings/Lang/It/ValCondStrings.php @@ -0,0 +1,69 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_It_ValCondStrings extends Lang_Eng_ValCondStrings { + + //if the element is not defined + public function getNotDefinedResultString($element) + { + return "<div class='alert'>". $element ." non è stato definito</div>\n"; + } + + //if the elements are not equal + public function getNotEqualResultString($element) + { + return "<div class='alert'>Differenti valori: $element</div>\n"; + } + + //if the element is not alphabetic + public function getNotAlphabeticResultString($element) + { + return "<div class='alert'>".$element." deve essere una stringa di soli caratteri alfabetici</div>\n"; + } + + //if the element is not alphanumeric + public function getNotAlphanumericResultString($element) + { + return "<div class='alert'>".$element." deve essere una stringa di soli caratteri alfanumerici</div>\n"; + } + + //if the element is not a decimal digit + public function getNotDecimalDigitResultString($element) + { + return "<div class='alert'>".$element." deve essere una stringa di soli numeri decimali</div>\n"; + } + + //if the element has the mail format + public function getNotMailFormatResultString($element) + { + return "<div class='alert'>".$element." non sembra un indirizzo e-mail</div>\n"; + } + + //if the element is numeric + public function getNotNumericResultString($element) + { + return "<div class='alert'>".$element." deve essere un numero</div>\n"; + } + + //if the element (string) length exceeds the value of characters (defined by $maxLength) + public function getLengthExceedsResultString($element,$maxLength) + { + return "<div class='alert'>".$element." non deve essere composto da più di $maxLength caratteri</div>\n"; + } + + //if the element is one of the strings indicated by $stringList (a comma-separated list of strings) + public function getIsForbiddenStringResultString($element,$stringList) + { + return "<div class='alert'>".$element." non può assumere uno dei seguenti valori: $stringList</div>\n"; + } + + //if the element is not one of the strings indicated by $stringList (a comma-separated list of strings) + public function getIsNotStringResultString($element,$stringList) + { + return "<div class='alert'>".$element." deve assumere uno dei seguenti valori: $stringList</div>\n"; + } +} diff --git a/h-source/Application/Strings/Lang/It/index.html b/h-source/Application/Strings/Lang/It/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Application/Strings/Lang/It/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Application/Strings/Lang/index.html b/h-source/Application/Strings/Lang/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Application/Strings/Lang/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Application/Strings/index.html b/h-source/Application/Strings/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Application/Strings/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Application/Views/Contact/index.php b/h-source/Application/Views/Contact/index.php new file mode 100644 index 0000000..bac30f4 --- /dev/null +++ b/h-source/Application/Views/Contact/index.php @@ -0,0 +1,29 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact + </div> + + <p>write in the file <b>Application/Views/Contact/index.php</b> your contact information</p> + + </div> diff --git a/h-source/Application/Views/Contact/index_es.php b/h-source/Application/Views/Contact/index_es.php new file mode 100644 index 0000000..acaf264 --- /dev/null +++ b/h-source/Application/Views/Contact/index_es.php @@ -0,0 +1,29 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact + </div> + + + + </div> diff --git a/h-source/Application/Views/Contact/index_it.php b/h-source/Application/Views/Contact/index_it.php new file mode 100644 index 0000000..acaf264 --- /dev/null +++ b/h-source/Application/Views/Contact/index_it.php @@ -0,0 +1,29 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact + </div> + + + + </div> diff --git a/h-source/Application/Views/Credits/index.php b/h-source/Application/Views/Credits/index.php new file mode 100644 index 0000000..fe327f3 --- /dev/null +++ b/h-source/Application/Views/Credits/index.php @@ -0,0 +1,63 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » credits + </div> + + <div class="credits_external_box"> + + <div class="credits_item_title"> + Icons: + </div> + + <div class="credits_item_description"> + The icons used inside <?php echo Website::$generalName;?> are taken from the <a href="http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018">ACUN Simgeleri 0.7</a> icon theme and from the <a href="http://kde-look.org/content/show.php/H2O+Icon+Theme?content=127149">H2O Icon Theme 0.0.5</a>, both licensed under the GNU GPL license, from the <a href="http://www.everaldo.com/crystal/?action=downloads">Crystal Projects</a> icons, licensed under the LGPL, from the <a href="http://www.notmart.org/index.php/Graphics">glaze icons set</a> (LGPL) and from the <a href="http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902">DarkGlass_Reworked icons theme</a> (GPL). The flag icons are taken from the <a href="http://www.famfamfam.com/lab/icons/flags/">FAMFAMFAM flag icons set</a> (Public Domain). + </div> + + <div class="credits_item_title"> + jQuery: + </div> + + <div class="credits_item_description"> + The <a href="http://jquery.com/">jQuery</a> and the <a href="http://jqueryui.com/home">jQuery UI</a> javascript libraries (licensed under MIT/GPL) have been used through the website + </div> + + <div class="credits_item_title"> + markitup: + </div> + + <div class="credits_item_description"> + The <a href="http://markitup.jaysalvat.com/home/">markitup</a> jQuery plugin (licensed under MIT/GPL) has been used in order to help the user to insert wiki tags + </div> + + <div class="credits_item_title"> + php diff algorithm: + </div> + + <div class="credits_item_description"> + <a href="http://compsci.ca/v3/viewtopic.php?p=142539">This</a> algorithm (licensed under the zlib free license) has been used in order to highlight the differences between two different revisions of the same hadrware model. + </div> + + </div> + + </div> diff --git a/h-source/Application/Views/Credits/index_es.php b/h-source/Application/Views/Credits/index_es.php new file mode 100644 index 0000000..3efea33 --- /dev/null +++ b/h-source/Application/Views/Credits/index_es.php @@ -0,0 +1,63 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » credits + </div> + + <div class="credits_external_box"> + + <div class="credits_item_title"> + Iconos: + </div> + + <div class="credits_item_description"> + Los iconos usados dentro de <?php echo Website::$generalName;?> son tomados de el tema de iconos <a href="http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018">ACUN Simgeleri 0.7</a> y de <a href="http://kde-look.org/content/show.php/H2O+Icon+Theme?content=127149">H2O Icon Theme 0.0.5</a>, ambos licenciados bajo la licencia GNU GPL, de <a href="http://www.everaldo.com/crystal/?action=downloads">Crystal Projects</a>, licenciado bajo la LGPL, de <a href="http://www.notmart.org/index.php/Graphics">glaze icons set</a> (LGPL) y de <a href="http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902">DarkGlass_Reworked icons theme</a> (GPL). Los iconos de las banderas son tomados la colección de iconos de banderas <a href="http://www.famfamfam.com/lab/icons/flags/">FAMFAMFAM</a> (Dominio Público) + </div> + + <div class="credits_item_title"> + jQuery: + </div> + + <div class="credits_item_description"> + Las bibliotecas javascript <a href="http://jquery.com/">jQuery</a> y <a href="http://jqueryui.com/home">jQuery UI</a> (licenciadas bajo MIT/GPL) han sido usadas en el sitio + </div> + + <div class="credits_item_title"> + markitup: + </div> + + <div class="credits_item_description"> + El complemento <a href="http://markitup.jaysalvat.com/home/">markitup</a> jQuery (licenciado bajo MIT/GPL) ha sido usado en orden de ayudar al usuario a insertar etiquetas wiki + </div> + + <div class="credits_item_title"> + php diff algorithm: + </div> + + <div class="credits_item_description"> + <a href="http://compsci.ca/v3/viewtopic.php?p=142539">Este</a> algoritmo (licenciado bajo la licencia libre de zlib) ha sido usado en orden de remarcar las diferencias entre dos diferentes revisiones del mismo modelo de hardware. + </div> + + </div> + + </div> diff --git a/h-source/Application/Views/Credits/index_it.php b/h-source/Application/Views/Credits/index_it.php new file mode 100644 index 0000000..0d32ebd --- /dev/null +++ b/h-source/Application/Views/Credits/index_it.php @@ -0,0 +1,64 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » credits + </div> + + <div class="credits_external_box"> + + <div class="credits_item_title"> + Icone: + </div> + + <div class="credits_item_description"> + Le icone utilizzate nel sito h-node.com appartengono ai temi di icone <a href="http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018">ACUN Simgeleri 0.7</a> e <a href="http://kde-look.org/content/show.php/H2O+Icon+Theme?content=127149">H2O Icon Theme 0.0.5</a>, entrambi sotto licenza GNU GPL, e al tema <a href="http://www.everaldo.com/crystal/?action=downloads">Crystal Projects</a>, sotto licenza LGPL, al <a href="http://www.notmart.org/index.php/Graphics">set di icone glaze</a> (LGPL) e al tema <a href="http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902">DarkGlass_Reworked</a> (GPL). Le icone bandiere derivano dal set di icone <a href="http://www.famfamfam.com/lab/icons/flags/">FAMFAMFAM</a> (Public Domain). + </div> + + + <div class="credits_item_title"> + jQuery: + </div> + + <div class="credits_item_description"> + Le librerie javascript <a href="http://jquery.com/">jQuery</a> e <a href="http://jqueryui.com/home">jQuery UI</a> (sotto licenza MIT/GPL) sono state usate nel sito + </div> + + <div class="credits_item_title"> + markitup: + </div> + + <div class="credits_item_description"> + Il plugin jQuery <a href="http://markitup.jaysalvat.com/home/">markitup</a> (sotto licenza MIT/GPL) è stata usata per aiutare gli utenti a inserire i tag della wiki </div> + + <div class="credits_item_title"> + Algoritmo php diff: + </div> + + <div class="credits_item_description"> + <a href="http://compsci.ca/v3/viewtopic.php?p=142539">Questo</a> algoritmo (sotto licenza libera zlib) è stata usata per sottolineare la differenza tra due diverse revisioni dello stesso modello di hardware. + </div> + + + </div> + + </div> diff --git a/h-source/Application/Views/Download/index.php b/h-source/Application/Views/Download/index.php new file mode 100644 index 0000000..e296711 --- /dev/null +++ b/h-source/Application/Views/Download/index.php @@ -0,0 +1,68 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » download + </div> + + <div class="credits_external_box"> + + <div class="credits_item_title"> + Download the h-node hardware database in xml format: + </div> + + <div class="credits_item_description"> + You can download all the h-node database in one unique xml file in order to parse its contents by means of some proper script (for example a Python or Perl or PHP script) + + <div class="download_table"> + <table width="95%"> + <tr> + <td>Download the xml file of all the database</td> + <td><a href="<?php echo $this->baseUrl."/download/all/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Download the xml file of all the <b>notebooks</b> in the database</td> + <td><a href="<?php echo $this->baseUrl."/download/notebooks/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Download the xml file of all the <b>wifi cards</b> in the database</td> + <td><a href="<?php echo $this->baseUrl."/download/wifi/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Download the xml file of all the <b>video cards</b> in the database</td> + <td><a href="<?php echo $this->baseUrl."/download/videocards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Download the xml file of all the <b>printers</b> in the database</td> + <td><a href="<?php echo $this->baseUrl."/download/printers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Download the xml file of all the <b>scanners</b> in the database</td> + <td><a href="<?php echo $this->baseUrl."/download/scanners/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + </table> + </div> + </div> + + </div> + + </div> diff --git a/h-source/Application/Views/Download/index_es.php b/h-source/Application/Views/Download/index_es.php new file mode 100644 index 0000000..b181b23 --- /dev/null +++ b/h-source/Application/Views/Download/index_es.php @@ -0,0 +1,68 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » download + </div> + + <div class="credits_external_box"> + + <div class="credits_item_title"> + Descargue la base de datos de h-node.com en formato xml: + </div> + + <div class="credits_item_description"> + Puede descargar toda la base de datos de h-node en un único archivo xml en orden de procesar sus contenidos por medio de un algoritmo (por ejemplo un algoritmo en Python o Perl o PHP) + + <div class="download_table"> + <table width="95%"> + <tr> + <td>Descargue el archivo xml de toda la base de datos</td> + <td><a href="<?php echo $this->baseUrl."/download/all/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Descargue el archivo xml de todas las <b>laptops</b> en la base de datos</td> + <td><a href="<?php echo $this->baseUrl."/download/notebooks/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Descargue el archivo xml de todas las <b>tarjetas inalámbricas</b> en la base de datos</td> + <td><a href="<?php echo $this->baseUrl."/download/wifi/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Descargue el archivo xml de todas las <b>tarjetas de video</b> en la base de datos</td> + <td><a href="<?php echo $this->baseUrl."/download/videocards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Descargue el archivo xml de todas las <b>impresoras</b> en la base de datos</td> + <td><a href="<?php echo $this->baseUrl."/download/printers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Download the xml file of all the <b>scanners</b> in the database</td> + <td><a href="<?php echo $this->baseUrl."/download/scanners/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + </table> + </div> + </div> + + </div> + + </div> diff --git a/h-source/Application/Views/Download/index_it.php b/h-source/Application/Views/Download/index_it.php new file mode 100644 index 0000000..16fb40a --- /dev/null +++ b/h-source/Application/Views/Download/index_it.php @@ -0,0 +1,68 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » download + </div> + + <div class="credits_external_box"> + + <div class="credits_item_title"> + Scarica il database dell'hardware di h-node in formato xml: + </div> + + <div class="credits_item_description"> + Puoi scaricare l'intero database di h-node in un unico file xml per analizzarne i contenuti utilizzando uno script appropriato (ad esempio uno script Python o Perl o PHP) + + <div class="download_table"> + <table width="95%"> + <tr> + <td>Scarica il file xml dell'intero database</td> + <td><a href="<?php echo $this->baseUrl."/download/all/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Scarica il file xml di tutti i <b>notebooks</b> del database</td> + <td><a href="<?php echo $this->baseUrl."/download/notebooks/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Scarica il file xml di tutte le <b>schede wifi</b> del database</td> + <td><a href="<?php echo $this->baseUrl."/download/wifi/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Scarica il file xml di tutte le <b>schede video</b> del database</td> + <td><a href="<?php echo $this->baseUrl."/download/videocards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Scarica il file xml di tutte le <b>stampanti</b> del database</td> + <td><a href="<?php echo $this->baseUrl."/download/printers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + <tr> + <td>Scarica il file xml di tutti gli <b>scanner</b> del database</td> + <td><a href="<?php echo $this->baseUrl."/download/scanners/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> + </table> + </div> + </div> + + </div> + + </div> diff --git a/h-source/Application/Views/Download/xml.php b/h-source/Application/Views/Download/xml.php new file mode 100644 index 0000000..b473875 --- /dev/null +++ b/h-source/Application/Views/Download/xml.php @@ -0,0 +1,20 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> +<?php echo $xml; ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?>
\ No newline at end of file diff --git a/h-source/Application/Views/Hardware/left.php b/h-source/Application/Views/Hardware/left.php new file mode 100644 index 0000000..974340d --- /dev/null +++ b/h-source/Application/Views/Hardware/left.php @@ -0,0 +1,47 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » Hardware + </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/computer-laptop.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/notebooks/catalogue/<?php echo $lang;?>">Notebooks</a> + </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/network-wireless.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/wifi/catalogue/<?php echo $lang;?>">Wifi cards</a> + </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/1282042718_hardware.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/videocards/catalogue/<?php echo $lang;?>">Video cards</a> + </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/printer.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/printers/catalogue/<?php echo $lang;?>">Printers</a> + </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/scanner.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/scanners/catalogue/<?php echo $lang;?>">Scanners</a> + </div> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Help/index.php b/h-source/Application/Views/Help/index.php new file mode 100644 index 0000000..8412f1d --- /dev/null +++ b/h-source/Application/Views/Help/index.php @@ -0,0 +1,361 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<div class="help_external_box"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » help + </div> + + <div class="help_tables_of_contents"> + Table of contents + <ul> + <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Wiki syntax</a></li> + <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Compatibility classes</a></li> + <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Discover your hardware</a></li> + <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">List of fully free Gnu/Linux distributions</a></li> + </ul> + </div> + + <a name="wiki-syntax"><h1>Wiki syntax</h1></a> + + <h3>List of <?php echo Website::$generalName;?> wiki tags</h3> + + <table class="help_wiki_table" width="100%"> + <thead> + <tr> + <th>name</th> + <th>tag</th> + <th>result</th> + <th width="40%">description</th> + </tr> + </thead> + <tr> + <td>bold</td> + <td>[b]text[/b]</td> + <td><b>text</b></td> + <td>text bold</td> + </tr> + <tr> + <td>italic</td> + <td>[i]text[/i]</td> + <td><i>text</i></td> + <td>text italic</td> + </tr> + <tr> + <td>del</td> + <td>[del]text[/del]</td> + <td><del>text</del></td> + <td>text deleted</td> + </tr> + <tr> + <td>underline</td> + <td>[u]text[/u]</td> + <td><u>text</u></td> + <td>text underlined</td> + </tr> + <tr> + <td>head 1</td> + <td>[h1]text[/h1]</td> + <td><div class="div_h1">text</div></td> + <td>head 1</td> + </tr> + <tr> + <td>head 2</td> + <td>[h2]text[/h2]</td> + <td><div class="div_h2">text</div></td> + <td>head 2</td> + </tr> + <tr> + <td>head 3</td> + <td>[h3]text[/h3]</td> + <td><div class="div_h3">text</div></td> + <td>head 3</td> + </tr> + <tr> + <td>paragraph</td> + <td>[p]text[/p]</td> + <td><p>text</p></td> + <td>new paragraph</td> + </tr> + <tr> + <td>list</td> + <td>[list]list[/list]</td> + <td><ul>list</ul></td> + <td>make a list of items</td> + </tr> + <tr> + <td>numbered list</td> + <td>[enum]list[/enum]</td> + <td><ol>list</ol></td> + <td>make a numbered list of items</td> + </tr> + <tr> + <td>list item</td> + <td>[*]item[/*]</td> + <td><li>item</li></td> + <td>ad an item to a list</td> + </tr> + <tr> + <td>code</td> + <td>[code]some code[/code]</td> + <td><pre class="code_pre">some code</div></td> + <td>ad some code</td> + </tr> + <tr> + <td>simple link</td> + <td>[a]url[/a]</td> + <td><a href="url">url</a></td> + <td>simple link</td> + </tr> + <tr> + <td>link with text</td> + <td>[a]url|text[/a]</td> + <td><a href="url">text</a></td> + <td>link with text</td> + </tr> + <tr> + <td>notebook</td> + <td>[notebook]id[/notebook]</td> + <td> </td> + <td>link to the notebook with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td> + </tr> + <tr> + <td>wifi</td> + <td>[wifi]id[/wifi]</td> + <td> </td> + <td>link to the wifi with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td> + </tr> + <tr> + <td>videocard</td> + <td>[videocard]id[/videocard]</td> + <td> </td> + <td>link to the videocard with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td> + </tr> + </table> + + <a name="compatibility"><h1>Compatibility classes</h1></a> + + <a name="notebook-compatibility"><h2>Notebooks</h2></a> + + <h3>Class A (Platinum)</h3> + + <p>All the notebook devices work with a very good performance. Example: all the devices work, the 3D acceleration is supported</p> + + <h3>Class B (Gold)</h3> + + <p>All the notebook devices work but not at full performance. A typical example: all the devices work, but the 3D acceleration is not supported</p> + + <h3>Class C (Silver)</h3> + + <p>One main device is not supported. Example: the internal wifi card does not work. You need an external USB card</p> + + <h3>Class D (Bronze)</h3> + + <p>More than one device is not supported</p> + + <h3>Class E (Garbage)</h3> + + <p>The notebook does not work with free software</p> + + + <a name="printer-compatibility"><h2>Printers</h2></a> + + <h3>Class A (Full)</h3> + + <p>All device functions and features are supported</p> + + <h3>Class B (Partial)</h3> + + <p>Printing supported but possibly at limited speed or print quality; scanning and/or faxing on some multifunction devices may not be supported</p> + + <h3>Class C (None)</h3> + + <p>The printer does not work with free software</p> + + + <a name="scanner-compatibility"><h2>Scanners</h2></a> + + <h3>Class A (Full)</h3> + + <p>All device functions and features are supported</p> + + <h3>Class B (Partial)</h3> + + <p>Scanning supported but possibly at limited speed or quality; some other features may not be supported</p> + + <h3>Class C (None)</h3> + + <p>The scanner does not work with free software</p> + + <a name="discover-hardware"><h1>Discover your hardware</h1></a> + <div> + (Thanks <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>) + </div> + + <p>In order to know the details of your hardware you can carry out the following actions:</p> + + <h3>How to discover the model name of your notebook</h3> + + <p>See below your notebook or netbook</p> + + <!--<h3>How to discover the year of commercialization of your notebook</h3> + + <p>Open a terminal and type the following command:</p> + + <pre> + sudo dmidecode| grep "Release Date" + </pre>--> + + <h3>How to discover the kernel libre version you are using</h3> + + <p>Open a terminal and type the following command:</p> + + <pre> + uname -r + </pre> + + <h3>How to discover the name of your video card</h3> + + <p>Open a terminal and type the following command:</p> + + <pre> + sudo lspci + </pre> + + <p>Then look for the row containing the string <b>VGA</b> or <b>Display controller</b>. You can also try one of the following commands:</p> + + <pre> + lspci | grep "Display controller" + </pre> + + <p>or</p> + + <pre> + lspci | grep "VGA" + </pre> + + <h3>How to discover the VendorID and the ProductID of your device (VendorID:ProductID code)</h3> + + <div> + (Thanks <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> and <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>) + </div> + + <h4>If the device is integrated (example: a video card)</h4> + + <p>Open a terminal and type the following command:</p> + + <pre> + sudo lspci -nnk + </pre> + + <p>You should obtain a list of hardware similar to the one written below</p> + + <pre> + 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02) + Kernel driver in use: b43-pci-bridge + Kernel modules: ssb + 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1) + Kernel modules: nouveau, nvidiafb + </pre> + + <p>The strings in <b>bold</b> and placed inside the square brackets (in the above list) are the code you are looking for. The first set of digits (before the colon) are the <b>VendorID</b>, the second set of digits are the <b>ProductID</b>. In the above example: the VendorID:ProductID code of the wifi card (note the strings "Network controller" and "WLAN") is <b>14e4:4311</b> while the VendorID:ProductID code of the video card (note the string "VGA") is <b>10de:0427</b></p> + + <h4>If the device is an USB device (example: an external USB wifi card)</h4> + + <p>Open a terminal and type the following command:</p> + + <pre> + sudo lsusb + </pre> + + <p>You should obtain a list of hardware similar to the one written below</p> + + <pre> + Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B] + Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub + Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor + </pre> + + <p>The strings in <b>bold</b> (in the above list) are the code you are looking for. The first set of digits (before the colon) are the <b>VendorID</b>, the second set of digits are the <b>ProductID</b>. In the above example: the VendorID:ProductID code of the external USB wifi card (note the strings "Wireless") is <b>0846:4260</b></p> + + + <h3>How to discover if the video card works</h3> + + <p>Install <a href="http://rss-glx.sourceforge.net/">rss-glx</a> by means of the package manager of your distribution or compiling it from source and try some screensavers (for example <b>Skyrocket</b> or <b>Solarwinds</b>). Check if you can play the screensaver (and/or if you can play it smoothly)</p> + + <h3>How to discover if the 3D acceleration works</h3> + + <p>Try to enable compiz</p> + + <h3>How to discover the name of your wifi card</h3> + + <p>Open a terminal and type the following command:</p> + + <pre> + sudo lspci + </pre> + + <p>Then look for the row containing the string <b>Wireless</b> or <b>Network controller</b>. You can also try one of the following commands:</p> + + <pre> + lspci | grep "Wireless" + </pre> + + <p>or</p> + + <pre> + lspci | grep "Network" + </pre> + + <h3>How to discover the printer driver you are using</h3> + + <h4>If you are using cups</h4> + + <p>Open a terminal and type the following command:</p> + + <pre> + dpkg-query -W -f '${Version}\n' cups + </pre> + + + <a name="fully-free"><h1>List of fully free GNU/Linux distributions</h1></a> + + <p>They are listed in alphabetical order</p> + + <ul> + <li><a href="http://www.blagblagblag.org/">BLAG</a></li> + + <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li> + + <li><a href="http://dynebolic.org/">Dynebolic</a></li> + + <li><a href="http://www.gnewsense.org/">gNewSense</a></li> + + <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li> + + <li><a href="http://trisquel.info/en/">Trisquel</a></li> + + <li><a href="http://www.ututo.org/www/">Ututo</a></li> + + <li><a href="http://venenux.org/">Venenux</a></li> + </ul> + +</div> diff --git a/h-source/Application/Views/Help/index_es.php b/h-source/Application/Views/Help/index_es.php new file mode 100644 index 0000000..e218517 --- /dev/null +++ b/h-source/Application/Views/Help/index_es.php @@ -0,0 +1,361 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<div class="help_external_box"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » help + </div> + + <div class="help_tables_of_contents"> + Tabla de contenidos + <ul> + <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Sintaxis del Wiki</a></li> + <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Clases de Compatibilidad</a></li> + <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Descubra su hardware</a></li> + <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">Lista de las distribuciones GNU/Linux completamente libres distributions</a></li> + </ul> + </div> + + <a name="wiki-syntax"><h1>Sintaxis del Wiki</h1></a> + + <h3>Lista de las etiquetas wiki de <?php echo Website::$generalName;?></h3> + + <table class="help_wiki_table" width="100%"> + <thead> + <tr> + <th>nombre</th> + <th>etiqueta</th> + <th>resultado</th> + <th width="40%">descripción</th> + </tr> + </thead> + <tr> + <td>bold</td> + <td>[b]texto[/b]</td> + <td><b>texto</b></td> + <td>texto en negrita</td> + </tr> + <tr> + <td>italic</td> + <td>[i]texto[/i]</td> + <td><i>texto</i></td> + <td>texto en cursiva</td> + </tr> + <tr> + <td>del</td> + <td>[del]texto[/del]</td> + <td><del>texto</del></td> + <td>texto eliminado</td> + </tr> + <tr> + <td>underline</td> + <td>[u]texto[/u]</td> + <td><u>texto</u></td> + <td>texto subrayado</td> + </tr> + <tr> + <td>head 1</td> + <td>[h1]texto[/h1]</td> + <td><div class="div_h1">texto</div></td> + <td>encabezado 1</td> + </tr> + <tr> + <td>head 2</td> + <td>[h2]texto[/h2]</td> + <td><div class="div_h2">texto</div></td> + <td>encabezado 2</td> + </tr> + <tr> + <td>head 3</td> + <td>[h3]texto[/h3]</td> + <td><div class="div_h3">texto</div></td> + <td>encabezado 3</td> + </tr> + <tr> + <td>paragraph</td> + <td>[p]texto[/p]</td> + <td><p>texto</p></td> + <td>nuevo párrafo</td> + </tr> + <tr> + <td>lista</td> + <td>[list]lista[/list]</td> + <td><ul>lista</ul></td> + <td>hace una lista de objetos</td> + </tr> + <tr> + <td>numbered list</td> + <td>[enum]lista[/enum]</td> + <td><ol>lista</ol></td> + <td>hace una lista numerada de objetos</td> + </tr> + <tr> + <td>list item</td> + <td>[*]objeto[/*]</td> + <td><li>objeto</li></td> + <td>agrega un objeto a la lista</td> + </tr> + <tr> + <td>code</td> + <td>[code]código[/code]</td> + <td><pre class="code_pre">código</div></td> + <td>agrega código</td> + </tr> + <tr> + <td>simple link</td> + <td>[a]url[/a]</td> + <td><a href="url">url</a></td> + <td>enlace simple</td> + </tr> + <tr> + <td>link with text</td> + <td>[a]url|text[/a]</td> + <td><a href="url">text</a></td> + <td>enlace con texto</td> + </tr> + <tr> + <td>notebook</td> + <td>[notebook]id[/notebook]</td> + <td> </td> + <td>enlace a la laptop con el identificador id (el identificador de cada modelo de dispositivo esta escrito en la página del dispositivo mismo, seguido del nombre del modelo)</td> + </tr> + <tr> + <td>wifi</td> + <td>[wifi]id[/wifi]</td> + <td> </td> + <td>enlace al wifi con el identificador id (el identificador de cada modelo de dispositivo esta escrito en la página del dispositivo mismo, seguido del nombre del modelo)</td> + </tr> + <tr> + <td>videocard</td> + <td>[videocard]id[/videocard]</td> + <td> </td> + <td>enlace a la tarjeta de video con el identificador id (el identificador de cada modelo de dispositivo esta escrito en la página del dispositivo mismo, seguido del nombre del modelo)</td> + </tr> + </table> + + <a name="compatibility"><h1>Clases de Compatibilidad</h1></a> + + <a name="notebook-compatibility"><h2>Laptops</h2></a> + + <h3>Clase A (Platino)</h3> + + <p>Todos los dispositivos funcionan con un buen desempeño. Ejemplo: todos los dispositivos funcionan, la aceleración 3D esta soportada</p> + + <h3>Clase B (Oro)</h3> + + <p>Todos los dispositivos funcionan pero no a su rendimiento completo. Un ejemplo típico es: todos los dispositivos funcionan, pero la aceleración 3D no esta soportada</p> + + <h3>Clase C (Plata)</h3> + + <p>Un dispositivo principal no esta soportado. Ejemplo: la tarjeta inalámbrica interna no funciona. Necesita una tarjeta USB externa</p> + + <h3>Clase D (Bronce)</h3> + + <p>Más de un dispositivo no esta soportado</p> + + <h3>Clase E (Basura)</h3> + + <p>El equipo no funciona con software libre</p> + + + <a name="printer-compatibility"><h2>Impresoras</h2></a> + + <h3>Clase A (Completo)</h3> + + <p>Todos los dispositivos funcionan y las características soportadas</p> + + <h3>Clase B (Parcial)</h3> + + <p>La impresión esta soportada pero a velocidad o calidad limitada; escaneo y/o envío por fax en algunos dispositivos multifuncionales pueden no estar soportados</p> + + <h3>Clase C (Ninguno)</h3> + + <p>La impresora no funciona con software libre</p> + + + <a name="scanner-compatibility"><h2>Scanners</h2></a> + + <h3>Class A (Full)</h3> + + <p>All device functions and features are supported</p> + + <h3>Class B (Partial)</h3> + + <p>Scanning supported but possibly at limited speed or quality; some other features may not be supported</p> + + <h3>Class C (None)</h3> + + <p>The scanner does not work with free software</p> + + <a name="discover-hardware"><h1>Descubra su hardware</h1></a> + <div> + (Gracias <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>) + </div> + + <p>En orden de conocer los detalles de su hardware puede seguir las siguientes acciones:</p> + + <h3>Como descubrir el modelo de su laptop</h3> + + <p>Vea debajo de su laptop o netbook</p> + + <!--<h3>How to discover the year of commercialization of your notebook</h3> + + <p>Open a terminal and type the following command:</p> + + <pre> + sudo dmidecode| grep "Release Date" + </pre>--> + + <h3>Como descubrir la versión de kernel que esta usando</h3> + + <p>Abra una terminal y escriba la siguiente orden:</p> + + <pre> + uname -r + </pre> + + <h3>Como descubrir el nombre de su tarjeta de video</h3> + + <p>Abra una terminal y escriba la siguiente orden:</p> + + <pre> + sudo lspci + </pre> + + <p>Después busque por la linea que contenga la cadena VGA o Display controller. También puede usar uno de las siguientes ordenes:</p> + + <pre> + lspci | grep "Display controller" + </pre> + + <p>o</p> + + <pre> + lspci | grep "VGA" + </pre> + + <h3>Como descubrir el ID del vendedor y el ID del producto de su dispositivo (código VendorID:ProductID)</h3> + + <div> + (Gracias <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> y <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>) + </div> + + <h4>Si el dispositivo es integrado (ejemplo: una tarjeta de video)</h4> + + <p>Abra una terminal y escriba la siguiente orden:</p> + + <pre> + sudo lspci -nnk + </pre> + + <p>Debe de obtener una lista de hardware similar a la escriba debajo</p> + + <pre> + 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02) + Kernel driver in use: b43-pci-bridge + Kernel modules: ssb + 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1) + Kernel modules: nouveau, nvidiafb + </pre> + + <p>Las cadenas en <b>negritas</b> y colocadas en los corchetes (en la lista superior) son los códigos que esta buscando. El primer grupo de dígitos (antes de los dos puntos) son el <b>VendorID</b>, el segundo grupo de dígitos son el <b>ProductID</b>. En el ejemplo superior: el código VendorID:ProductID de la tarjeta inalámbrica (note las cadenas "Network controller" y "WLAN") es <b>14e4:4311</b> mientras el código VendorID:ProductID de la tarjeta de video (note la cadena "VGA") es <b>10de:0427</b></p> + + <h4>Si el dispositivo es un dispositivo USB (ejemplo: una tarjeta USB externa)</h4> + + <p>Abra una terminal y escriba la siguiente orden:</p> + + <pre> + sudo lsusb + </pre> + + <p>Debe de obtener una lista de hardware similar a la descrita a continuación</p> + + <pre> + Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B] + Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub + Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor + </pre> + + <p>Las cadenas en <b>negritas</b> (en la lista superior) son el código que busca. El primer grupo de dígitos (antes de los dos puntos) son el <b>VendorID</b>, el segundo grupo de dígitos son el <b>ProductID</b>. En el ejemplo superior: el código VendorID:ProductID de la tarjeta inalámbrica USB externa (note la cadena "Wireless") es <b>0846:4260</b></p> + + + <h3>Como descubrir si la tarjeta de video funciona</h3> + + <p>Instale <a href="http://rss-glx.sourceforge.net/">rss-glx</a> por lo medios del administrador de paquetes de su distribución o por medio de compilar el código fuente y pruebe algunos protectores de pantalla (por ejemplo <b>Skyrocket</b> o <b>Solarwinds</b>). Revise si puede ejecutar el protector de pantalla (y/o si puede mostrarlo suavemente)</p> + + <h3>Como descubrir si la aceleración 3D funciona</h3> + + <p>Intente activar compiz</p> + + <h3>Como descubrir el nombre de su tarjeta de inalámbrica</h3> + + <p>Abra una terminal y escriba la siguiente orden:</p> + + <pre> + sudo lspci + </pre> + + <p>Después busque por la linea que contenga la cadena <b>Wireless</b> o <b>Network controller</b>. También puede intentar una de las siguientes ordenes</p> + + <pre> + lspci | grep "Wireless" + </pre> + + <p>o</p> + + <pre> + lspci | grep "Network" + </pre> + + <h3>Como descubrir el driver de la impresora que esta usando</h3> + + <h4>If you are using cups</h4> + + <p>Abra una terminal y escriba la orden siguiente:</p> + + <pre> + dpkg-query -W -f '${Version}\n' cups + </pre> + + + <a name="fully-free"><h1>Lista de las distribuciones GNU/Linux completamente libres</h1></a> + + <p>Están enlistadas en orden alfabético</p> + + <ul> + <li><a href="http://www.blagblagblag.org/">BLAG</a></li> + + <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li> + + <li><a href="http://dynebolic.org/">Dynebolic</a></li> + + <li><a href="http://www.gnewsense.org/">gNewSense</a></li> + + <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li> + + <li><a href="http://trisquel.info/en/">Trisquel</a></li> + + <li><a href="http://www.ututo.org/www/">Ututo</a></li> + + <li><a href="http://venenux.org/">Venenux</a></li> + </ul> + +</div> diff --git a/h-source/Application/Views/Help/index_fr.php b/h-source/Application/Views/Help/index_fr.php new file mode 100644 index 0000000..0abcd54 --- /dev/null +++ b/h-source/Application/Views/Help/index_fr.php @@ -0,0 +1,352 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<div class="help_external_box"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » help + </div> + + <div class="help_tables_of_contents"> + Sommaire + <ul> + <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Syntaxe Wiki</a></li> + <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Niveau de compatibilitée</a></li> + <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Découvrez votre matériel</a></li> + <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">Liste de distribution GNU/Linux entièrement libre</a></li> + </ul> + </div> + + <a name="wiki-syntax"><h1>Syntaxe Wiki</h1></a> + + <h3>Liste des tags Wiki sur <?php echo Website::$generalName;?></h3> + + <table class="help_wiki_table" width="100%"> + <thead> + <tr> + <th>name</th> + <th>tag</th> + <th>result</th> + <th width="40%">description</th> + </tr> + </thead> + <tr> + <td>bold</td> + <td>[b]text[/b]</td> + <td><b>text</b></td> + <td>text bold</td> + </tr> + <tr> + <td>italic</td> + <td>[i]text[/i]</td> + <td><i>text</i></td> + <td>text italic</td> + </tr> + <tr> + <td>del</td> + <td>[del]text[/del]</td> + <td><del>text</del></td> + <td>text deleted</td> + </tr> + <tr> + <td>underline</td> + <td>[u]text[/u]</td> + <td><u>text</u></td> + <td>text underlined</td> + </tr> + <tr> + <td>head 1</td> + <td>[h1]text[/h1]</td> + <td><div class="div_h1">text</div></td> + <td>head 1</td> + </tr> + <tr> + <td>head 2</td> + <td>[h2]text[/h2]</td> + <td><div class="div_h2">text</div></td> + <td>head 2</td> + </tr> + <tr> + <td>head 3</td> + <td>[h3]text[/h3]</td> + <td><div class="div_h3">text</div></td> + <td>head 3</td> + </tr> + <tr> + <td>paragraph</td> + <td>[p]text[/p]</td> + <td><p>text</p></td> + <td>new paragraph</td> + </tr> + <tr> + <td>list</td> + <td>[list]list[/list]</td> + <td><ul>list</ul></td> + <td>make a list of items</td> + </tr> + <tr> + <td>numbered list</td> + <td>[enum]list[/enum]</td> + <td><ol>list</ol></td> + <td>make a numbered list of items</td> + </tr> + <tr> + <td>list item</td> + <td>[*]item[/*]</td> + <td><li>item</li></td> + <td>ad an item to a list</td> + </tr> + <tr> + <td>code</td> + <td>[code]some code[/code]</td> + <td><pre class="code_pre">some code</div></td> + <td>ad some code</td> + </tr> + <tr> + <td>simple link</td> + <td>[a]url[/a]</td> + <td><a href="url">url</a></td> + <td>simple link</td> + </tr> + <tr> + <td>link with text</td> + <td>[a]url|text[/a]</td> + <td><a href="url">text</a></td> + <td>link with text</td> + </tr> + <tr> + <td>notebook</td> + <td>[notebook]id[/notebook]</td> + <td> </td> + <td>link to the notebook with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td> + </tr> + <tr> + <td>wifi</td> + <td>[wifi]id[/wifi]</td> + <td> </td> + <td>link to the wifi with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td> + </tr> + <tr> + <td>videocard</td> + <td>[videocard]id[/videocard]</td> + <td> </td> + <td>link to the videocard with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td> + </tr> + </table> + + <a name="compatibility"><h1>Niveau de compatibilitée</h1></a> + + <a name="notebook-compatibility"><h2>Notebooks</h2></a> + + <h3>Classe A (Platinium)</h3> + + <p>Tout le matériel du notebook fonctionne avec du logiciel libre. Exemple : la 3D fonctionne, le son et la wifi également</p> + + <h3>Classe B (Or)</h3> + + <p>Tout le matériel du notebook fonctionne, mais avec des performances réduites. Exemple : la carte graphique est reconnues mais la 3D ne fonctionne pas</p> + + <h3>Classe C (Argent)</h3> + + <p>Un matériel principal ne fonctionne pas. Exemple : La carte wifi ne fonctionne pas</p> + + <h3>Classe D (Bronze)</h3> + + <p>Plus d'un matériel ne fonctionne pas avec du logiciel libre</p> + + <h3>Classe E (Poubelle)</h3> + + <p>Aucun matériel ne fonctionne avec du logiciel libre</p> + + + <a name="printer-compatibility"><h2>Imprimantes</h2></a> + + <h3>Classe A (Complet)</h3> + + <p>Toutes les fonctionnalitées de l'imprimante fonctionne avec du logiciel libre</p> + + <h3>Classe B (Partielle)</h3> + + <p>La fonction d'impression fonctionne, mais à une vitesse ou qualitée limitée. Le scan ou le fax sur certains appareils peut ne pas être supportés</p> + + <h3>Classe C (Aucun)</h3> + + <p>L'imprimante ne fonctionne pas avec du logiciel libre</p> + + + <a name="scanner-compatibility"><h2>Scanners</h2></a> + + <h3>Classe A (Complet)</h3> + + <p>Toutes les fonctionnalitées du scanner sont supportées</p> + + <h3>Classe B (Partielle)</h3> + + <p>Le scanner fonctionne mais à une vitesse ou qualitée limitée, d'autres fonctionnalitées peuvent ne pas fonctionner</p> + + <h3>Classe C (Aucun)</h3> + + <p>Le scanner ne fonctionne pas avec du logiciel libre</p> + + <a name="discover-hardware"><h1>Découvrez votre matériel</h1></a> + <div> + (Merci <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>) + </div> + + <p>Pour connaitre votre matériel en détails, vous pouviez faire les choses suivantes:</p> + + <h3>Comment découvrir le modèle de votre notebook</h3> + + <p>See below your notebook or netbook</p> + + <h3>Trouver la version du noyau linux libre que vous utilisez</h3> + + <p>Ouvrez un terminal et tapez la commande suivant:</p> + + <pre> + uname -r + </pre> + + <h3>Comment trouver le modèle de votre carte graphique</h3> + + <p>Ouvrez un terminal et taper la commande suivante:</p> + + <pre> + sudo lspci + </pre> + + <p>Chercher la ligne qui contient le mot <b>VGA</b> ou <b>Display Controller</b>. Vous pouvez aussi essayer l'une des commandes suivantes:</p> + + <pre> + lspci | grep "Display controller" + </pre> + + <p>ou</p> + + <pre> + lspci | grep "VGA" + </pre> + + <h3>Comment connaitre le VendorID ou le ProductID (VendorID:ProductID code)</h3> + + <div> + (Merci à <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> et <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>) + </div> + + <h4>Si le matériel est intégré (example : une puce vidéo)</h4> + + <p>Ouvrez un terminal sudo et taper la commande suivante:</p> + + <pre> + sudo lspci -nnk + </pre> + + <p>Vous devriez obtenir une liste de matériel similaire à celle-ci</p> + + <pre> + 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02) + Kernel driver in use: b43-pci-bridge + Kernel modules: ssb + 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1) + Kernel modules: nouveau, nvidiafb + </pre> + + <p>Les lignes en <b>gras</b> et placée entre crochet (dans la liste ci-dessus) sont les lignes que vous recherchez. Le premier packet de numéros (avant la virgule) sont le <b>VendorID</b>, le second sont le <b>ProductID</b>. Dans l’exemple ci dessus, le code VendorID:ProductID de la carte wifi ( vous pouvez la remarquez grace aux mots "Network Controller" et "WLAN" ) est <b>14e4:4311</b></p> + + <h4>Si le périphérique est un périphérique USB : (exemple : une clé usb wifi)</h4> + + <p>Ouvrez un terminal et tapez:</p> + + <pre> + sudo lsusb + </pre> + + <p>Vous devriez obtenir une liste de matériel similaire à celle ci</p> + + <pre> + Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B] + Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub + Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor + </pre> + + <p>Les lignes en <b>gras</b> (dans la liste du dessus) sont les lignes que vous recherchez. Les premiers nombres (avant les deux points) sont le <b>VendorID</b>, les autres sont le <b>ProductID</b>. Dans l'exemple ci-dessus : le code VendorID:ProductID de la carte usb wifi externe (Remarquez la ligne Wireless) est <b>0846:4260</b></p> + + <h3>Comment savoir si votre carte graphique fonctionne</h3> + + <p>Installer <a href="http://rss-glx.sourceforge.net/">rss-glx</a> en utilisant le gestionnaire de paquet de votre distribution ou en le compilant depuis les sources et essayez certains écran de veille (par exemple <b>Skyrocket</b> ou <b>Solarwinds</b>). Essayer de faire fonctionner le fond d'écran, et/ou le faire fonctionner fluidement.</p> + + <h3>Comment savoir si l'accélération 3D fonctionne</h3> + + <p>Essayer d’activer compiz</p> + + <h3>Comment decouvrir le nom de votre carte wifi</h3> + + <p>Ouvrez un terminal et taper la commande suivante:</p> + + <pre> + sudo lspci + </pre> + + <p>Regardez ensuite les lignes <b>Wireless</b> ou <b>Network controller</b>. Vous pouvez aussi essayer l'une de ses commandes:</p> + + <pre> + lspci | grep "Wireless" + </pre> + + <p>ou</p> + + <pre> + lspci | grep "Network" + </pre> + + <h3>Comment connaitre le pilote d’imprimante que vous utilisez</h3> + + <h4>Si vous utilisez cups</h4> + + <p>Ouvrez un terminal et taper ceci:</p> + + <pre> + dpkg-query -W -f '${Version}\n' cups + </pre> + + + <a name="fully-free"><h1>Liste de dristributions GNU/Linux entièrement libre</h1></a> + + <p>They are listed in alphabetical order</p> + + <ul> + <li><a href="http://www.blagblagblag.org/">BLAG</a></li> + + <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li> + + <li><a href="http://dynebolic.org/">Dynebolic</a></li> + + <li><a href="http://www.gnewsense.org/">gNewSense</a></li> + + <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li> + + <li><a href="http://trisquel.info/en/">Trisquel</a></li> + + <li><a href="http://www.ututo.org/www/">Ututo</a></li> + + <li><a href="http://venenux.org/">Venenux</a></li> + </ul> + +</div> diff --git a/h-source/Application/Views/Help/index_it.php b/h-source/Application/Views/Help/index_it.php new file mode 100644 index 0000000..cd22c34 --- /dev/null +++ b/h-source/Application/Views/Help/index_it.php @@ -0,0 +1,378 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<div class="help_external_box"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » help + </div> + + <div class="help_tables_of_contents"> + Table of contents + <ul> + <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Sintassi della Wiki</a></li> + <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Classi di compatibilità</a></li> + <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Scopri il tuo hardware</a></li> + <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">Lista delle distribuzioni Gnu/Linux completamente libere</a></li> + </ul> + </div> + + <a name="wiki-syntax"><h1>Sintassi della Wiki</h1></a> + + <h3>Lista dei tag della wiki di <?php echo Website::$generalName;?></h3> + + <table class="help_wiki_table" width="100%"> + <thead> + <tr> + + <th>nome</th> + <th>tag</th> + <th>risultato</th> + <th width="40%">descrizione</th> + </tr> + </thead> + <tr> + + <td>grassetto</td> + <td>[b]text[/b]</td> + <td><b>text</b></td> + <td>testo in grassetto</td> + </tr> + <tr> + <td>corsivo</td> + + <td>[i]text[/i]</td> + <td><i>text</i></td> + <td>testo corsivo</td> + </tr> + <tr> + <td>cancellare</td> + <td>[del]text[/del]</td> + + <td><del>text</del></td> + <td>testo cancellato</td> + </tr> + <tr> + <td>sottolineare</td> + <td>[u]text[/u]</td> + <td><u>text</u></td> + + <td>testo sottolineato</td> + </tr> + <tr> + <td>head 1</td> + <td>[h1]text[/h1]</td> + <td><div class="div_h1">text</div></td> + <td>head 1</td> + + </tr> + <tr> + <td>head 2</td> + <td>[h2]text[/h2]</td> + <td><div class="div_h2">text</div></td> + <td>head 2</td> + </tr> + + <tr> + <td>head 3</td> + <td>[h3]text[/h3]</td> + <td><div class="div_h3">text</div></td> + <td>head 3</td> + </tr> + <tr> + + <td>paragrafo</td> + <td>[p]text[/p]</td> + <td><p>text</p></td> + <td>crea un nuovo paragrafo</td> + </tr> + <tr> + <td>elenco</td> + + <td>[list]list[/list]</td> + <td><ul>list</ul></td> + <td>crea un elenco di item</td> + </tr> + <tr> + <td>elenco numerato</td> + + <td>[enum]list[/enum]</td> + <td><ol>list</ol></td> + <td>crea un elenco numerato di item</td> + </tr> + <tr> + <td>item di un elenco</td> + + <td>[*]item[/*]</td> + <td><li>item</li></td> + <td>aggiungi un item a un elenco</td> + </tr> + <tr> + <td>codice</td> + + <td>[code]some code[/code]</td> + <td><pre class="code_pre">some code</div></td> + <td>aggiungi del codice</td> + </tr> + <tr> + <td>link semplice</td> + <td>[a]url[/a]</td> + + <td><a href="url">url</a></td> + <td>crea un link semplice</td> + </tr> + <tr> + <td>link con testo</td> + <td>[a]url|text[/a]</td> + + <td><a href="url">text</a></td> + <td>crea un link con testo</td> + </tr> + <tr> + <td>notebook</td> + <td>[notebook]id[/notebook]</td> + + <td> </td> + <td>crea un link al notebook con l'identificatore corrispondente a id (l'identificatore di ogni modello di dispositivo si trova nella pagina del dispositivo stesso, accanto al nome del modello</td> + </tr> + <tr> + <td>wifi</td> + <td>[wifi]id[/wifi]</td> + <td> </td> + + <td>crea un link alla wifi con l'identificatore corrispondente a id (l'identificatore di ogni modello di dispositivo si trova nella pagina del dispositivo stesso, accanto al nome del modello)</td> + </tr> + <tr> + <td>scheda video</td> + <td>[videocard]id[/videocard]</td> + <td> </td> + <td>crea un link alla scheda video con l'identificatore corrispondente a id (l'identificatore di ogni modello di dispositivo si trova nella pagina del dispositivo stesso, accanto al nome del modello)</td> + + </tr> + </table> + + <a name="compatibility"><h1>Classi di compatibilità</h1></a> + + <a name="notebook-compatibility"><h2>Notebooks</h2></a> + + <h3>Classe A (Platino)</h3> + + <p>Tutti i dispositivi del portatile funzionano ad alte prestazioni. Per esempio: funzionano tutti i dispositivi, l'accelerazione 3D è supportata.</p> + + <h3>Classe B (Oro)</h3> + + <p>Tutti i dispositivi del portatile funzionano ma non a piene prestazioni. Esempio tipico: funzionano tutti i dispositivi, ma l'accelerazione 3D non è supportata.</p> + + <h3>Classe C (Argento)</h3> + + <p>Uno dei dispositivi principali non è supportato. Per esempio: la scheda wifi interna non funziona e serve una wifi esterna USB.</p> + + <h3>Classe D (Bronzo)</h3> + + <p>Più di uno dei dispositivi principali non è supportato.</p> + + <h3>Classe E (Spazzatura)</h3> + + <p>Il portatile non funziona con software libero.</p> + + + <a name="printer-compatibility"><h2>Stampanti</h2></a> + + + <h3>Classe A (Piena)</h3> + + <p>Sono supportate tutte le funzioni e le caratteristiche della stampante.</p> + + <h3>Classe B (Parziale)</h3> + + <p>La funzione di stampa è supportata, ma a velocità limitata o a scarsa qualità. Su alcune stampanti multifunzione possono non essere supportate le funzioni di scanner e/o di fax.</p> + + <h3>Classe C (Nessuna)</h3> + + <p>La stampante non funziona con software libero.</p> + + + <a name="scanner-compatibility"><h2>Scanner</h2></a> + + <h3>Classe A (Piena)</h3> + + <p>Sono supportate tutte le funzioni e le caratteristiche dello scanner.</p> + + <h3>Classe B (Parziale)</h3> + + <p>La funzione di scannerizzazione è supportata, ma a velocità limitata o a scarsa qualità. Qualche altra caratteristica può non essere supportata.</p> + + <h3>Classe C (Nessuna)</h3> + + <p>Lo scanner non funziona con software libero.</p> + + <a name="discover-hardware"><h1>Scopri il tuo hardware</h1></a> + <div> + (Grazie <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>) + </div> + + <p>Per sapere le caratteristiche e i dettagli del tuo hardware puoi seguire queste istruzioni:</p> + + <h3>Come scoprire il nome del modello del portatile</h3> + + <p>Guarda sotto al tuo notebook o al tuo netbook</p> + + <h3>Come scoprire che versione del kernel libre stai usando</h3> + + <p>Apri un terminale e digita questo comando:</p> + + <pre> + uname -r + </pre> + + <h3>Come scoprire il nome della tua scheda video</h3> + + <p>Apri un terminale e digita questo comando:</p> + + + <pre> + sudo lspci + </pre> + + <p>Poi cerca la riga contenente la stringa <b>VGA</b> o <b>Display controller</b>. Puoi anche provare con uno di questi comandi:</p> + + <pre> + lspci | grep "Display controller" + </pre> + + + <p>o</p> + + <pre> + lspci | grep "VGA" + </pre> + + <h3>Come scoprire il VendorID e il ProductID del tuo dispositivo (VendorID:ProductID code)</h3> + + <div> + (Grazie <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> e <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>) + </div> + + <h4>Se il dispositivo è integrato (per esempio una scheda video)</h4> + + <p>Apri un terminale e digita il seguente comando:</p> + + <pre> + sudo lspci -nnk + </pre> + + <p>Dovresti ottenere una lista di hardware simile a quella scritta qui sotto</p> + + <pre> + + 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02) + Kernel driver in use: b43-pci-bridge + Kernel modules: ssb + 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1) + Kernel modules: nouveau, nvidiafb + </pre> + + <p>Le stringhe in <b>grassetto</b> e tra parentesi quadre (nella lista qui sopra) sono il codice che stai cercando. Il primo gruppo di cifre (prima dei due punti) è il <b>VendorID</b>, il secondo gruppo è il <b>ProductID</b>. Nell'esempio qui sopra: il codice VendorID:ProductID della scheda wifi (nota le stringhe "Network controller" e "WLAN") è <b>14e4:4311</b> mentre il codice VendorID:ProductID della scheda video (nota la stringa "VGA") è <b>10de:0427</b></p> + + + <h4>Se si tratta di un dispositivo USB (per esempio una wifi esterna USB)</h4> + + <p>Apri un terminale e digita questo comando:</p> + + <pre> + sudo lsusb + </pre> + + <p>Dovresti ottenere una lista di hardware simile a quella scritta qui sotto</p> + + <pre> + + Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B] + Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub + Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor + </pre> + + <p>Le stringhe in <b>grassetto</b> (nella lista qui sopra) sono il codice che stai cercando. Il primo gruppo di cifre (prima dei due punti) è il <b>VendorID</b>, il secondo gruppo è il <b>ProductID</b>. Nell'esempio qui sopra: il codice VendorID:ProductID della wifi esterna USB (nota la stringa "Wireless") è <b>0846:4260</b></p> + + <h3>Come scoprire se funziona la scheda video</h3> + + <p>Installa <a href="http://rss-glx.sourceforge.net/">rss-glx</a> tramite il gestore di pacchetti della tua distribuzione +o compilando dai sorgenti e prova degli screensaver (per esempio <b>Skyrocket</b> o <b>Solarwinds</b>). Controlla se parte lo screensaver (e/o se si vede "fluido")</p> + + <h3>Come scoprire se funziona l'accelerazione 3D</h3> + + + <p>Prova ad attivare compiz</p> + + <h3>Come scoprire il nome della tua scheda wifi</h3> + + <p>Apri un terminale e digita questo comando:</p> + + <pre> + sudo lspci + </pre> + + <p>Poi cerca la riga contenente la stringa <b>Wireless</b> o <b>Network controller</b>. Puoi anche provare uno dei seguenti comandi:</p> + + + <pre> + lspci | grep "Wireless" + </pre> + + <p>o</p> + + <pre> + lspci | grep "Network" + </pre> + + <h3>Come scoprire che driver per la stampante stai usando</h3> + + <h4>Se stai usando cups</h4> + + <p>Apri un terminale e digita il seguente comando:</p> + + <pre> + dpkg-query -W -f '${Version}\n' cups + </pre> + + + <a name="fully-free"><h1>Lista di distribuzioni GNU/Linux completamente libere</h1></a> + + <p>In ordine alfabetico</p> + + <ul> + <li><a href="http://www.blagblagblag.org/">BLAG</a></li> + + <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li> + + <li><a href="http://dynebolic.org/">Dynebolic</a></li> + + <li><a href="http://www.gnewsense.org/">gNewSense</a></li> + + <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li> + + <li><a href="http://trisquel.info/en/">Trisquel</a></li> + + <li><a href="http://www.ututo.org/www/">Ututo</a></li> + + <li><a href="http://venenux.org/">Venenux</a></li> + </ul> + +</div> diff --git a/h-source/Application/Views/History/viewall.php b/h-source/Application/Views/History/viewall.php new file mode 100644 index 0000000..47848ff --- /dev/null +++ b/h-source/Application/Views/History/viewall.php @@ -0,0 +1,38 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<?php $u = new UsersModel();?> +<?php + $mess_count = 0; + foreach ($res as $row) { + $mess_count++; +?> +<div class="details_of_actions_inner"> + <div class="talk_message_item_date">this message has been <?php echo $md_action[$row['history']['action']];?> by <?php echo getLinkToUser($u->getUser($row['history']['created_by']));?> at <?php echo smartDate($row['history']['creation_date']);?> with the following motivation: + </div> + <div class="deleted_message_show"><?php echo$row['history']['message'];?></div> +</div> +<?php } ?> + +<?php if ($mess_count === 0) { ?> + <div class="details_of_actions_inner"> + there are no details.. + </div> +<?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Home/left.php b/h-source/Application/Views/Home/left.php new file mode 100644 index 0000000..816a47b --- /dev/null +++ b/h-source/Application/Views/Home/left.php @@ -0,0 +1,34 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + Home + </div> + + <?php echo $htmlNewsBox;?> + + <p>it works!!</p> + + <p>modify the file <b>Application/Views/Home/left.php</b> in order to change the english version of your homepage</p> + + <p>modify the file <b>Application/Include/languages.php</b> in order to add new languages</p> + </div> diff --git a/h-source/Application/Views/Home/left_es.php b/h-source/Application/Views/Home/left_es.php new file mode 100644 index 0000000..029962b --- /dev/null +++ b/h-source/Application/Views/Home/left_es.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + Home + </div> + + <?php echo $htmlNewsBox;?> + + + + </div> diff --git a/h-source/Application/Views/Home/left_fr.php b/h-source/Application/Views/Home/left_fr.php new file mode 100644 index 0000000..de2acda --- /dev/null +++ b/h-source/Application/Views/Home/left_fr.php @@ -0,0 +1,30 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + Home + </div> + + <?php echo $htmlNewsBox;?> + + + </div> diff --git a/h-source/Application/Views/Home/left_it.php b/h-source/Application/Views/Home/left_it.php new file mode 100644 index 0000000..de2acda --- /dev/null +++ b/h-source/Application/Views/Home/left_it.php @@ -0,0 +1,30 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + Home + </div> + + <?php echo $htmlNewsBox;?> + + + </div> diff --git a/h-source/Application/Views/Issues/view.php b/h-source/Application/Views/Issues/view.php new file mode 100644 index 0000000..20d0403 --- /dev/null +++ b/h-source/Application/Views/Issues/view.php @@ -0,0 +1,202 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/issues/viewall/$lang".$this->viewStatus;?>">issues</a> » <?php echo $id_issue;?> + </div> + + <div class="issues_external_box"> + <?php foreach ($table as $row) { ?> + + <div class="issues_view_title"> + <?php echo $row['issues']['title'];?> + </div> + + <div class="talk_message_item_date"> + submitted by <?php echo getLinkToUser($u->getUser($row['issues']['created_by']));?>, <?php echo smartDate($row['issues']['creation_date']);?> + </div> + + <div class="issues_view_status_and_priority"> + <table> + <tr> + <td><?php echo gtext("TOPIC");?>:</td> + <td><b><?php echo str_replace('-',' ',$row['issues']['topic']);?></b></td> + </tr> + <tr> + <td><?php echo gtext("STATUS");?>:</td> + <td><b><?php echo $row['issues']['status'];?></b></td> + </tr> + <tr> + <td><?php echo gtext("PRIORITY");?>:</td> + <td><b><?php echo $row['issues']['priority'];?></b></td> + </tr> + </table> + </div> + + <div class="issues_view_description_title"> + <?php echo gtext("Description");?>: + </div> + + <div class="issues_view_description"> + <?php echo decodeWikiText($row['issues']['message']);?> + </div> + + <?php if (strcmp($row['issues']['notice'],'') !== 0) { ?> + + <div class="issues_view_description_title"> + Response message (from h-node.com): + </div> + + <div class="issues_view_description"> + <?php echo decodeWikiText($row['issues']['notice']);?> + </div> + + <?php } ?> + + <?php } ?> + </div> + + <!--print the messages to this issue--> + <div class="issues_external_box"> + <div class="add_message_form_title"> + <?php echo gtext("Messages");?>: + </div> + <?php + $mess_count = 0; + foreach ($messages as $row) { + $mess_count++; + ?> + + <?php if (strcmp($row['messages']['deleted'],'no') === 0) { ?> + + <div class="issues_message_item"> + <div class="issues_message_item_user"> + <div class="issues_message_item_user_inner"> + <?php echo $u->getUser($row['messages']['created_by']);?>: + </div> + <?php if ($ismoderator) { ?> + <a id="<?php echo $row['messages']['id_mes'];?>" class="hide_message hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png">hide</a> + <?php } ?> + + </div> + + <div class="message_view_description"> + <?php echo decodeWikiText($row['messages']['message']);?> + </div> + <div class="talk_message_item_date"> + submitted by <?php echo getLinkToUser($u->getUser($row['messages']['created_by']));?>, <?php echo smartDate($row['messages']['creation_date']);?> + </div> + + <?php if ($ismoderator) { ?> + <!--view details--> + <div class="show_hidden_box_ext"> + <div class="md_type">message</div> + <a id="<?php echo $row['messages']['id_mes'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a> + <div class="moderation_details_box"></div> + </div> + <?php } ?> + + </div> + + <?php } else { ?> + + <div class="issues_message_item_hidden"> + <?php echo gtext("this message has been deleted");?> + <?php if ($ismoderator) { ?> + <a id="<?php echo $row['messages']['id_mes'];?>" class="show_message hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a> + + <!--view details--> + <div class="show_hidden_box_ext"> + <div class="md_type">message</div> + + <a id="<?php echo $row['messages']['id_mes'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a> + + <div class="details_of_hidden_message"> + <div class="details_of_hidden_message_inner"> + <div class="talk_message_item_date"> + submitted by <?php echo getLinkToUser($u->getUser($row['messages']['created_by']));?>, <?php echo smartDate($row['messages']['creation_date']);?> + </div> + <div class="message_view_description_hidden"> + <?php echo decodeWikiText($row['messages']['message']);?> + </div> + </div> + <div class="moderation_details_box"></div> + </div> + </div> + + <?php } ?> + </div> + + <?php } ?> + + <?php } ?> + + <?php if ($mess_count === 0) { ?> + <?php echo gtext("there are no messages");?>.. + <?php } ?> + + </div> + + <!--insert a message notice--> + <?php if ($islogged === 'yes') { ?> + + <div class="add_issue_form"> + <div class="add_message_form_title"> + <a name="form"><?php echo gtext("Add a message to this issue");?></a> + </div> + + <?php echo $notice;?> + + <!--preiview--> + <?php if (isset($preview_message)) { ?> + <div class="message_preview_notice"> + <?php echo gtext("preview of the message");?>: + </div> + <div class="issues_message_item_preview"> + <div class="message_view_description"> + <?php echo decodeWikiText($preview_message);?> + </div> + </div> + <?php } ?> + + <?php echo $form;?> + </div> + + <?php } else { ?> + + <div class="talk_login_notice"> + <a name="form"><?php echo gtext("You have to");?> <a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a> <?php echo gtext("in order to submit a message to this issue");?></a> + </div> + + <?php } ?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Issues/viewall.php b/h-source/Application/Views/Issues/viewall.php new file mode 100644 index 0000000..39bd566 --- /dev/null +++ b/h-source/Application/Views/Issues/viewall.php @@ -0,0 +1,118 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » issues + </div> + + <div class="issues_external_box"> + <div class="issues_viewall_title"> + <?php echo gtext("List of issues");?>: + </div> + + <table class="issues_viewall_table"> + <thead> + <tr> + <th>ID</th> + <th><?php echo gtext("TITLE");?></th> + <th><?php echo gtext("TOPIC");?></th> + <th><?php echo gtext("OPENED BY");?></th> + <th><?php echo gtext("DATE");?></th> + <th><?php echo gtext("REPLIES");?></th> + <th><?php echo gtext("PRIORITY");?></th> + <th><?php echo gtext("STATUS");?></th> + </tr> + </thead> + + <?php foreach ($table as $row) { ?> + <tr> + <td><?php echo $row['issues']['id_issue'];?></td> + <td><a href="<?php echo $this->baseUrl."/issues/view/$lang/".$row['issues']['id_issue'].$this->viewStatus;?>"><?php echo $row['issues']['title'];?></a></td> + <td><?php echo str_replace('-',' ',$row['issues']['topic']);?></td> + <td><?php echo getLinkToUser($u->getUser($row['issues']['created_by']));?></td> + <td><?php echo smartDate($row['issues']['creation_date']);?></td> + <td> + <?php + if (strcmp($row['messages']['message'],'') !== 0) + { + echo $row['aggregate']['numb_mess']; + } + else + { + echo $row['aggregate']['numb_mess']-1; + } + ?> + </td> + <td><?php echo $row['issues']['priority'];?></td> + <td><?php echo $row['issues']['status'];?></td> + </tr> + <?php } ?> + </table> + </div> + + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + + <?php if ($islogged === 'yes') { ?> + + <div class="add_issue_form"> + <div class="add_issue_form_title"> + <a name="form"><?php echo gtext("Add a new issue");?></a> + </div> + + <?php echo $notice;?> + + <!--preiview--> + <?php if (isset($preview_message)) { ?> + <div class="message_preview_notice"> + <?php echo gtext("preview of the new issue message");?>: + </div> + <div class="issues_message_item_preview"> + <div class="message_view_description"> + <?php echo decodeWikiText($preview_message);?> + </div> + </div> + <?php } ?> + + <?php echo $form;?> + </div> + + <?php } else { ?> + + <div class="talk_login_notice"> + <a name="form"><?php echo gtext("You have to");?> <a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a> <?php echo gtext("in order to submit an issue");?></a> + </div> + + <?php } ?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/My/email.php b/h-source/Application/Views/My/email.php new file mode 100644 index 0000000..bda793e --- /dev/null +++ b/h-source/Application/Views/My/email.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> » e-mail + </div> + + <?php echo $notice;?> + + <?php echo $form;?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/My/goodbye.php b/h-source/Application/Views/My/goodbye.php new file mode 100644 index 0000000..e4936a6 --- /dev/null +++ b/h-source/Application/Views/My/goodbye.php @@ -0,0 +1,61 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function(){ + + $(".close_account_submit").click(function () { + if (window.confirm("Are you really sure?")) { + return true; + } + return false; + }); + + }); + + </script> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> » delete account + </div> + + <div class="delete_account_notice_box"> + After your account cancellation: + <ul> + <li>you won't be able to log-in anymore</li> + <li>all your data, except for your username, will be deleted from the database</li> + <li>your public profile won't be accessible anymore</li> + <li>you won't be able to get your old account back. If you want to register another time you have to choose a different username</li> + <li>your username will remain in the history of the devices (notebooks,video cards..) you have modified</li> + </ul> + </div> + + <div class="climb_form_ext_box"> + + <form action="<?php echo $this->currPage."/$lang".$this->viewStatus;?>" method="POST"> + I want to close my account: <input class="close_account_submit" type="submit" name="closeAction" value="confirm"> + </form> + + </div> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/My/panel.php b/h-source/Application/Views/My/panel.php new file mode 100644 index 0000000..d03d274 --- /dev/null +++ b/h-source/Application/Views/My/panel.php @@ -0,0 +1,35 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » panel + </div> + + <ul class='panelApplicationList'> + <li><a href="<?php echo Url::getRoot('users/meet/'.$lang.'/'.$username);?>">Watch your public profile</a></li> + <li><a href="<?php echo Url::getRoot('my/profile/'.$lang.'/'.$token);?>">Edit your profile</a></li> + <li><a href="<?php echo Url::getRoot('my/email/'.$lang.'/'.$token);?>">Change the e-mail address</a></li> + <li><a href="<?php echo Url::getRoot('my/password/'.$lang.'/'.$token);?>">Change the password</a></li> + <li><a href="<?php echo Url::getRoot('my/goodbye/'.$lang.'/'.$token);?>">Delete your account</a></li> + </ul> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/My/password.php b/h-source/Application/Views/My/password.php new file mode 100644 index 0000000..1644b88 --- /dev/null +++ b/h-source/Application/Views/My/password.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> » password + </div> + + <?php echo $notice;?> + + <?php echo $form;?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/My/profile.php b/h-source/Application/Views/My/profile.php new file mode 100644 index 0000000..b4f51ea --- /dev/null +++ b/h-source/Application/Views/My/profile.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> » profile + </div> + + <?php echo $notice;?> + + <?php echo $form;?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/News/index.php b/h-source/Application/Views/News/index.php new file mode 100644 index 0000000..ce2b080 --- /dev/null +++ b/h-source/Application/Views/News/index.php @@ -0,0 +1,49 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » news + </div> + + <div class="news_external_box"> + <?php foreach ($table as $row) { ?> + <div class="news_item"> + <div class="news_item_title"> + <?php echo $row['news']['title'];?> + </div> + <div class="news_item_date"> + <?php echo smartDate($row['news']['creation_date']);?> + </div> + <div class="news_item_message"> + <?php echo decodeWikiText($row['news']['message']);?> + </div> + </div> + <?php } ?> + </div> + + <?php if ($recordNumber > 10) { ?> + <div class="history_page_list_news"> + <?php echo $pageList;?> + </div> + <?php } ?> + + </div> diff --git a/h-source/Application/Views/Notebooks/catalogue.php b/h-source/Application/Views/Notebooks/catalogue.php new file mode 100644 index 0000000..b4c24ce --- /dev/null +++ b/h-source/Application/Views/Notebooks/catalogue.php @@ -0,0 +1,80 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="viewall_popup_menu_box_external"> + <div class="viewall_popup_menu_box"> + <?php echo $popup;?> + </div> + <div class="viewall_popup_menu_status"> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['compatibility']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['subtype']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div> + </div> + </div> + + <!--if no notebooks found--> + <?php if (strcmp($recordNumber,0) === 0) { ?> + <div class="viewall_no_items_found"> + <?php echo gtext("No notebooks found");?>.. + </div> + <?php } ?> + + <!--loop--> + <?php foreach ($table as $item) {?> + <div class="model_viewall"> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/computer-laptop_22.png";?>"><span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("subtype (notebook or netbook)");?></div> + <div class="inner_value"><b><?php echo $item['hardware']['subtype'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div> + </div> + + <div class="notebook_compatibility"> + <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div> + </div> + + <div class="notebook_view_link"> + <a href="<?php echo $this->baseUrl."/notebooks/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?></a> + </div> + + </div> + <?php } ?> + + <?php if (strcmp($recordNumber,0) !== 0) { ?> + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Notebooks/form.php b/h-source/Application/Views/Notebooks/form.php new file mode 100644 index 0000000..0ef7d1b --- /dev/null +++ b/h-source/Application/Views/Notebooks/form.php @@ -0,0 +1,114 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + dist_list_helper(); + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <?php echo $notice;?> + + <div class="notebooks_insert_form"> + <form action="<?php echo $this->baseUrl."/notebooks/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST"> + + <div class="edit_form"> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("vendor");?>:</div> + <?php echo Html_Form::select('vendor',$values['vendor'],Notebooks::$vendors,"select_entry");?> + <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div> + <?php echo Html_Form::input('model',$values['model'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("subtype (notebook or netbook)");?>:</div> + <?php echo Html_Form::select('subtype',$values['subtype'],Notebooks::$subtypeSelect,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("year of commercialization");?>:</div> + <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?> + </div> + + <div class="form_entry td_with_distribution_checkboxes"> + <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div> + <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?> + <?php echo Distributions::getFormHtml();?> + </div> + + <div class="form_entry hidden_x_explorer"> + <div class="entry_label"><?php echo gtext("compatibility with free software");?>:</div> + <?php echo Html_Form::select('compatibility',$values['compatibility'],Notebooks::$compatibility,"select_entry");?> + <a class="open_help_window" title="compatibility help page" target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#notebook-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("video card model");?>:</div> + <?php echo Html_Form::input('video_card_type',$values['video_card_type'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("does the video card work?");?></div> + <?php echo Html_Form::select('video_card_works',$values['video_card_works'],Notebooks::$videoSelect,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("wifi model");?>:</div> + <?php echo Html_Form::input('wifi_type',$values['wifi_type'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("does the wifi card work?");?></div> + <?php echo Html_Form::select('wifi_works',$values['wifi_works'],Notebooks::$wifiSelect,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div> + <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?> + </div> + + <?php echo $hiddenInput;?> + + <input type="submit" name="<?php echo $submitName;?>" value="Save"> + + <div class="mandatory_fields_notice"> + <?php echo gtext("Fields marked with <b>*</b> are mandatory");?> + </div> + + </div> + + </form> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Notebooks/page.php b/h-source/Application/Views/Notebooks/page.php new file mode 100644 index 0000000..0a29b3d --- /dev/null +++ b/h-source/Application/Views/Notebooks/page.php @@ -0,0 +1,92 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($isDeleted,'no') === 0) { ?> + + <?php + $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions'; + ?> + + <?php foreach ($table as $item) { ?> + <div class="notebooks_viewall"> + + <!--if revision--> + <?php if (strcmp($this->action,'revision') === 0) { ?> + <div class="revision_alert"> + This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/notebooks/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>. + </div> + <?php } ?> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/computer-laptop_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span> + <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?> + <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span> + <?php } ?> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("subtype (notebook or netbook)");?></div> + <div class="inner_value"><b><?php echo $item[$tableName]['subtype'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div> + </div> + + <div class="notebook_compatibility"> + <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['compatibility'];?></b> <a class="open_help_window" target="blank" title="compatibility help page" href="<?php echo $this->baseUrl."/help/index/$lang#notebook-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a></div> + </div> + + <div class="model_tested_on"> + <div class="inner_label"><?php echo gtext("tested on");?>:</div> + <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("video card model");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['video_card_type'];?></b> (<?php echo Notebooks::$videoReverse[$item[$tableName]['video_card_works']];?>)</div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("wifi model");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['wifi_type'];?></b> (<?php echo Notebooks::$wifiReverse[$item[$tableName]['wifi_works']];?>)</div> + </div> + + <div class="notebook_description"> + <div class="notebook_description_label"><?php echo gtext("Description");?>:</div> + <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div> + </div> + + </div> + <?php } ?> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Printers/catalogue.php b/h-source/Application/Views/Printers/catalogue.php new file mode 100644 index 0000000..bf790f0 --- /dev/null +++ b/h-source/Application/Views/Printers/catalogue.php @@ -0,0 +1,80 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="viewall_popup_menu_box_external"> + <div class="viewall_popup_menu_box"> + <?php echo $popup;?> + </div> + <div class="viewall_popup_menu_status"> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['compatibility']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div> + </div> + </div> + + <!--if no notebooks found--> + <?php if (strcmp($recordNumber,0) === 0) { ?> + <div class="viewall_no_items_found"> + <?php echo gtext("No printers found");?>.. + </div> + <?php } ?> + + <!--loop--> + <?php foreach ($table as $item) {?> + <div class="model_viewall"> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/printer_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div> + </div> + + <div class="notebook_compatibility"> + <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div> + </div> + + <div class="notebook_view_link"> + <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a> + </div> + + </div> + <?php } ?> + + <?php if (strcmp($recordNumber,0) !== 0) { ?> + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Printers/form.php b/h-source/Application/Views/Printers/form.php new file mode 100644 index 0000000..b6a71a6 --- /dev/null +++ b/h-source/Application/Views/Printers/form.php @@ -0,0 +1,104 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + dist_list_helper(); + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <?php echo $notice;?> + + <div class="notebooks_insert_form"> + <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST"> + + <div class="edit_form"> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("vendor");?>:</div> + <?php echo Html_Form::select('vendor',$values['vendor'],Printer::$vendors,"select_entry");?> + <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div> + <?php echo Html_Form::input('model',$values['model'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("year of commercialization");?></div> + <?php echo Html_Form::select('comm_year',$values['comm_year'],Printer::$commYear,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div> + <?php echo Html_Form::select('interface',$values['interface'],Printer::$interface,"select_entry");?> + </div> + + <div class="form_entry td_with_distribution_checkboxes"> + <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div> + <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?> + <?php echo Distributions::getFormHtml();?> + </div> + + <div class="form_entry hidden_x_explorer"> + <div class="entry_label"><?php echo gtext("compatibility with free software");?>:</div> + <?php echo Html_Form::select('compatibility',$values['compatibility'],Printer::$compatibility,"select_entry");?> + <a class="open_help_window" title="compatibility help page" target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#printer-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label hidden_x_explorer"><?php echo gtext("free driver used");?> (example: cups-1.4.4) (<?php echo gtext("see the help page or leave blank if you are not sure");?>):</div> + <?php echo Html_Form::input('driver',$values['driver'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div> + <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?> + </div> + + <?php echo $hiddenInput;?> + + <input type="submit" name="<?php echo $submitName;?>" value="Save"> + + <div class="mandatory_fields_notice"> + <?php echo gtext("Fields marked with <b>*</b> are mandatory");?> + </div> + + </div> + + </form> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Printers/page.php b/h-source/Application/Views/Printers/page.php new file mode 100644 index 0000000..100cfde --- /dev/null +++ b/h-source/Application/Views/Printers/page.php @@ -0,0 +1,92 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($isDeleted,'no') === 0) { ?> + + <?php + $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions'; + ?> + + <?php foreach ($table as $item) { ?> + <div class="notebooks_viewall"> + + <!--if revision--> + <?php if (strcmp($this->action,'revision') === 0) { ?> + <div class="revision_alert"> + This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>. + </div> + <?php } ?> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/printer_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span> + <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?> + <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span> + <?php } ?> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div> + </div> + + <div class="model_tested_on"> + <div class="inner_label"><?php echo gtext("tested on");?>:</div> + <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div> + </div> + + <div class="notebook_compatibility"> + <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['compatibility'];?></b> <a class="open_help_window" target="blank" title="compatibility help page" href="<?php echo $this->baseUrl."/help/index/$lang#printer-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("free driver used");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['driver'];?></b></div> + </div> + + <div class="notebook_description"> + <div class="notebook_description_label"><?php echo gtext("Description");?>:</div> + <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div> + </div> + + </div> + <?php } ?> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Project/index.php b/h-source/Application/Views/Project/index.php new file mode 100644 index 0000000..7b8140c --- /dev/null +++ b/h-source/Application/Views/Project/index.php @@ -0,0 +1,29 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project + </div> + + <p>write in the file <b>Application/Views/Project/index.php</b> your project information</p> + + </div> diff --git a/h-source/Application/Views/Project/index_es.php b/h-source/Application/Views/Project/index_es.php new file mode 100644 index 0000000..f934b0f --- /dev/null +++ b/h-source/Application/Views/Project/index_es.php @@ -0,0 +1,29 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project + </div> + + + + </div> diff --git a/h-source/Application/Views/Project/index_it.php b/h-source/Application/Views/Project/index_it.php new file mode 100644 index 0000000..f934b0f --- /dev/null +++ b/h-source/Application/Views/Project/index_it.php @@ -0,0 +1,29 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project + </div> + + + + </div> diff --git a/h-source/Application/Views/Scanners/catalogue.php b/h-source/Application/Views/Scanners/catalogue.php new file mode 100644 index 0000000..c988371 --- /dev/null +++ b/h-source/Application/Views/Scanners/catalogue.php @@ -0,0 +1,80 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="viewall_popup_menu_box_external"> + <div class="viewall_popup_menu_box"> + <?php echo $popup;?> + </div> + <div class="viewall_popup_menu_status"> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['compatibility']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div> + </div> + </div> + + <!--if no notebooks found--> + <?php if (strcmp($recordNumber,0) === 0) { ?> + <div class="viewall_no_items_found"> + <?php echo gtext("No scanners found");?>... + </div> + <?php } ?> + + <!--loop--> + <?php foreach ($table as $item) {?> + <div class="model_viewall"> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/scanner_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div> + </div> + + <div class="notebook_compatibility"> + <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div> + </div> + + <div class="notebook_view_link"> + <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a> + </div> + + </div> + <?php } ?> + + <?php if (strcmp($recordNumber,0) !== 0) { ?> + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Scanners/form.php b/h-source/Application/Views/Scanners/form.php new file mode 100644 index 0000000..78f8bcb --- /dev/null +++ b/h-source/Application/Views/Scanners/form.php @@ -0,0 +1,104 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + dist_list_helper(); + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <?php echo $notice;?> + + <div class="notebooks_insert_form"> + <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST"> + + <div class="edit_form"> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("vendor");?>:</div> + <?php echo Html_Form::select('vendor',$values['vendor'],Printer::$vendors,"select_entry");?> + <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div> + <?php echo Html_Form::input('model',$values['model'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("year of commercialization");?></div> + <?php echo Html_Form::select('comm_year',$values['comm_year'],Printer::$commYear,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div> + <?php echo Html_Form::select('interface',$values['interface'],Printer::$interface,"select_entry");?> + </div> + + <div class="form_entry td_with_distribution_checkboxes"> + <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div> + <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?> + <?php echo Distributions::getFormHtml();?> + </div> + + <div class="form_entry hidden_x_explorer"> + <div class="entry_label"><?php echo gtext("compatibility with free software");?>:</div> + <?php echo Html_Form::select('compatibility',$values['compatibility'],Printer::$compatibility,"select_entry");?> + <a class="open_help_window" title="compatibility help page" target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#scanner-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label hidden_x_explorer"><?php echo gtext("free driver used");?> (<?php echo gtext("see the help page or leave blank if you are not sure");?>):</div> + <?php echo Html_Form::input('driver',$values['driver'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div> + <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?> + </div> + + <?php echo $hiddenInput;?> + + <input type="submit" name="<?php echo $submitName;?>" value="Save"> + + <div class="mandatory_fields_notice"> + <?php echo gtext("Fields marked with <b>*</b> are mandatory");?> + </div> + + </div> + + </form> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Scanners/page.php b/h-source/Application/Views/Scanners/page.php new file mode 100644 index 0000000..411fe6d --- /dev/null +++ b/h-source/Application/Views/Scanners/page.php @@ -0,0 +1,92 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($isDeleted,'no') === 0) { ?> + + <?php + $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions'; + ?> + + <?php foreach ($table as $item) { ?> + <div class="notebooks_viewall"> + + <!--if revision--> + <?php if (strcmp($this->action,'revision') === 0) { ?> + <div class="revision_alert"> + This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>. + </div> + <?php } ?> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/scanner_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span> + <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?> + <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span> + <?php } ?> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div> + </div> + + <div class="model_tested_on"> + <div class="inner_label"><?php echo gtext("tested on");?>:</div> + <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div> + </div> + + <div class="notebook_compatibility"> + <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['compatibility'];?></b> <a class="open_help_window" target="blank" title="compatibility help page" href="<?php echo $this->baseUrl."/help/index/$lang#scanner-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("free driver used");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['driver'];?></b></div> + </div> + + <div class="notebook_description"> + <div class="notebook_description_label"><?php echo gtext("Description");?>:</div> + <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div> + </div> + + </div> + <?php } ?> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Search/form.php b/h-source/Application/Views/Search/form.php new file mode 100644 index 0000000..ab25d9e --- /dev/null +++ b/h-source/Application/Views/Search/form.php @@ -0,0 +1,72 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + $(".search_form table").append("<tr><td><input id=\"search_action_input\" type=\"submit\" name=\"action\" value=\"search\"></td></tr>"); + + $("#search_action_input").click(function(){ + + var s_type = $("#search_type_input").attr("value"); + var s_model = $("#search_model_input").attr("value"); + var s_action = $("#search_action_input").attr("value"); + + var s_url = "1/" + s_action + "/" + s_type + "/" + s_model; + + location.href="<?php echo $this->baseUrl."/search/results/$lang/";?>"+s_url; + return false; + }); + + }); + + </script> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » search form + </div> + + <div class="notebook_view_title"> + Search one device in the archive: + </div> + + <div class="search_form"> + + + <form method="GET"> + <table> + <tr> + <td>hardware type:</td> + <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td> + </tr> + <tr> + <td>the model name contains:</td> + <td><?php echo Html_Form::input('model','','input_entry_search',"search_model_input");?></td> + </tr> + </table> + </form> + + + </div> + + </div> diff --git a/h-source/Application/Views/Search/form_es.php b/h-source/Application/Views/Search/form_es.php new file mode 100644 index 0000000..f58a125 --- /dev/null +++ b/h-source/Application/Views/Search/form_es.php @@ -0,0 +1,72 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + $(".search_form table").append("<tr><td><input id=\"search_action_input\" type=\"submit\" name=\"action\" value=\"search\"></td></tr>"); + + $("#search_action_input").click(function(){ + + var s_type = $("#search_type_input").attr("value"); + var s_model = $("#search_model_input").attr("value"); + var s_action = $("#search_action_input").attr("value"); + + var s_url = "1/" + s_action + "/" + s_type + "/" + s_model; + + location.href="<?php echo $this->baseUrl."/search/results/$lang/";?>"+s_url; + return false; + }); + + }); + + </script> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » search form + </div> + + <div class="notebook_view_title"> + Busque un dispositivo en el archivo:: + </div> + + <div class="search_form"> + + + <form method="GET"> + <table> + <tr> + <td>tipo de hardware:</td> + <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td> + </tr> + <tr> + <td>el nombre del modelo contiene:</td> + <td><?php echo Html_Form::input('model','','input_entry_search',"search_model_input");?></td> + </tr> + </table> + </form> + + + </div> + + </div> diff --git a/h-source/Application/Views/Search/form_it.php b/h-source/Application/Views/Search/form_it.php new file mode 100644 index 0000000..4d89477 --- /dev/null +++ b/h-source/Application/Views/Search/form_it.php @@ -0,0 +1,72 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + $(".search_form table").append("<tr><td><input id=\"search_action_input\" type=\"submit\" name=\"action\" value=\"search\"></td></tr>"); + + $("#search_action_input").click(function(){ + + var s_type = $("#search_type_input").attr("value"); + var s_model = $("#search_model_input").attr("value"); + var s_action = $("#search_action_input").attr("value"); + + var s_url = "1/" + s_action + "/" + s_type + "/" + s_model; + + location.href="<?php echo $this->baseUrl."/search/results/$lang/";?>"+s_url; + return false; + }); + + }); + + </script> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » search form + </div> + + <div class="notebook_view_title"> + Cerca un dispositivo nell'archivio: + </div> + + <div class="search_form"> + + + <form method="GET"> + <table> + <tr> + <td>tipo di hardware:</td> + <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td> + </tr> + <tr> + <td>il nome del modello contiene:</td> + <td><?php echo Html_Form::input('model','','input_entry_search',"search_model_input");?></td> + </tr> + </table> + </form> + + + </div> + + </div> diff --git a/h-source/Application/Views/Search/results.php b/h-source/Application/Views/Search/results.php new file mode 100644 index 0000000..48c4f8b --- /dev/null +++ b/h-source/Application/Views/Search/results.php @@ -0,0 +1,66 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/search/form/$lang";?>">search form</a> » results + </div> + + <div class="notebook_view_title"> + <?php echo gtext("Results of the search");?>: + </div> + + <div class="search_form"> + <?php + $count = 0; + foreach ($table as $row) { + $count++; + ?> + + <div class="search_result_item"> + <div> + <?php echo gtext("model name");?>: <b><a href="<?php echo $this->baseUrl."/".MyStrings::$reverse[$row['hardware']['type']]."/view/$lang/".$row['hardware']['id_hard']."/".$row['hardware']['model'];?>"><?php echo $row['hardware']['model'];?></a></b> + </div> + <div> + <?php echo gtext("model type");?>: <b><?php echo $row['hardware']['type'];?></b> + </div> + <div> + <?php echo gtext("year of commercialization");?>: <b><?php echo $row['hardware']['comm_year'];?></b> + </div> + </div> + + <?php } ?> + + <?php if ($count === 0) { ?> + <div class="search_result_item"> + <?php echo gtext("No devices found");?>.. + </div> + <?php } ?> + + </div> + + <?php if (strcmp($recordNumber,0) !== 0) { ?> + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + <?php } ?> + + </div> diff --git a/h-source/Application/Views/Users/add.php b/h-source/Application/Views/Users/add.php new file mode 100755 index 0000000..0b8aabc --- /dev/null +++ b/h-source/Application/Views/Users/add.php @@ -0,0 +1,70 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » create account + </div> + + <div class="new_account_title"> + Create new account + </div> + + <?php echo $notice;?> + + <form class='formClass' action='<?php echo $this->baseUrl."/users/add/$lang";?>' method='POST'> + + <div class='formEntry'> + <span class='entryLabel'>choose the username:</span> + <?php echo Html_Form::input('username',$values['username']);?> + </div> + + <div class='formEntry'> + <span class='entryLabel'>your e-mail address (necessary to confirm the registration):</span> + <?php echo Html_Form::input('e_mail',$values['e_mail']);?> + </div> + + <div class='formEntry'> + <span class='entryLabel'>choose the password:</span> + <?php echo Html_Form::password('password',$values['password']);?> + </div> + + <div class='formEntry'> + <span class='entryLabel'>confirm your password:</span> + <?php echo Html_Form::password('confirmation',$values['confirmation']);?> + </div> + + <div class="captcha_box"> + <img src="<?php echo $this->baseUrl?>/image/captcha"> + </div> + + <div class='formEntry'> + <span class='entryLabel'>write the code above:</span> + <input type="input" name="captcha" value=""> + </div> + + <div class='inputEntry'> + <input id='insertAction' type='submit' name='insertAction' value='create account'> + </div> + + </form> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/change.php b/h-source/Application/Views/Users/change.php new file mode 100644 index 0000000..623d647 --- /dev/null +++ b/h-source/Application/Views/Users/change.php @@ -0,0 +1,28 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="confirm_notice"> + <p>The link has expired</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/confirmation.php b/h-source/Application/Views/Users/confirmation.php new file mode 100644 index 0000000..f1a2074 --- /dev/null +++ b/h-source/Application/Views/Users/confirmation.php @@ -0,0 +1,42 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » confirmation + </div> + + <?php if ($status_confirm) { ?> + + <div class="confirm_notice"> + <p>The account has been confirmed successfully!</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else { ?> + + <div class="confirm_notice"> + <p>The confirmation link has expired</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } ?> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/contributions.php b/h-source/Application/Views/Users/contributions.php new file mode 100644 index 0000000..2d5995a --- /dev/null +++ b/h-source/Application/Views/Users/contributions.php @@ -0,0 +1,50 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/users/meet/$lang/$meet_username";?>">meet <b><?php echo $meet_username;?></b></a> » contributions + </div> + + <div class="contrib_explain_box"> + contributions of <?php echo $meet_username;?> + </div> + + <div class="external_users_contrib"> + <?php foreach ($table as $item) {?> + <div class="users_contrib_item"> + + <div class="contribution_item"> + <?php + + $name = $item['hardware']['model']; + $type = $item['hardware']['type']; + $id_hard = $item['hardware']['id_hard']; + + ?> + <?php echo $type;?> <a href="<?php echo $this->baseUrl."/".MyStrings::$reverse[$type]."/view/$lang/$id_hard/".encodeUrl($name);?>"><?php echo $name;?></a> + </div> + + </div> + <?php } ?> + </div> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/forgot.php b/h-source/Application/Views/Users/forgot.php new file mode 100644 index 0000000..a4c7d20 --- /dev/null +++ b/h-source/Application/Views/Users/forgot.php @@ -0,0 +1,55 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » request new password + </div> + + <div class="new_account_title"> + Request new password + </div> + + <?php echo $notice;?> + + <form class='formClass' action='<?php echo $this->currPage."/$lang";?>' method='POST'> + + <div class='formEntry'> + <span class='entryLabel'>write your username:</span> + <input type="input" name="username" value=""> + </div> + + <div class="captcha_box"> + <img src="<?php echo $this->baseUrl?>/image/captcha"> + </div> + + <div class='formEntry'> + <span class='entryLabel'>write the code above:</span> + <input type="input" name="captcha" value=""> + </div> + + <div class='inputEntry'> + <input id='insertAction' type='submit' name='forgotAction' value='send e-mail'> + </div> + + </form> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/login.php b/h-source/Application/Views/Users/login.php new file mode 100755 index 0000000..5998751 --- /dev/null +++ b/h-source/Application/Views/Users/login.php @@ -0,0 +1,57 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if ( strcmp($updating_flag,'no') === 0 ) { ?> + + <?php if (isset($flag)) { ?> + <div class="login_note"> + Sorry.. you have to be logged if you want to insert a new device in the archive or modify an existing one.. + </div> + <?php } ?> + + <?php echo $notice; ?> + + <div class="login_box"> + <form action = '<?php echo $action;?>' method = 'POST'> + + <table> + <tr> + <td>Username</td> + <td><input class="login_username_input" type='text' name='username'></td> + </tr> + <tr> + <td>Password</td> + <td><input class="login_username_input" type='password' name='password'></td> + </tr> + <tr> + <td><input type = 'submit' value = 'login'></td> + </tr> + </table> + + </form> + </div> + + <?php } else { ?> + + <div class="login_note"> + Sorry, we are updating the website... it is no possible to log-in, register new accounts or request a new password. You will be able to log-in or create a new account as soon as possible. Thanks! + </div> + + <?php } ?> diff --git a/h-source/Application/Views/Users/logout.php b/h-source/Application/Views/Users/logout.php new file mode 100755 index 0000000..39b5873 --- /dev/null +++ b/h-source/Application/Views/Users/logout.php @@ -0,0 +1,25 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="logout_box"> + <div><?php echo $notice;?></div> + + <div><a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a></div> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/meet.php b/h-source/Application/Views/Users/meet.php new file mode 100644 index 0000000..ee0c708 --- /dev/null +++ b/h-source/Application/Views/Users/meet.php @@ -0,0 +1,89 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » meet <b><?php echo $meet_username;?></b> + </div> + + <div class="meet_contrib_link"> + <u>Public profile of <?php echo $meet_username;?></u>. See all <a href="<?php echo $this->baseUrl."/users/contributions/$lang/$meet_username";?>"><b><?php echo $meet_username;?></b> contributions</a> + </div> + + <?php foreach ($table as $item) {?> + <div class="users_meet_box"> + + <div class="meet_item"> + <div class="meet_item_inner">Username:</div> <?php echo $item['regusers']['username'];?> + </div> + + <?php if (strcmp($item['profile']['website'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">My website:</div> <?php echo vitalizeUrl($item['profile']['website']);?> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['real_name'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">My real name is:</div> <?php echo $item['profile']['real_name'];?> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['publish_mail'],'yes') === 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">My e-mail address:</div> <?php echo $item['regusers']['e_mail'];?> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['where_you_are'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">I'm from:</div> <?php echo $item['profile']['where_you_are'];?> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['birth_date'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">Birthdate:</div> <?php echo $item['profile']['birth_date'];?> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['fav_distro'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">My favourite distro is:</div> <?php echo $item['profile']['fav_distro'];?> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['projects'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">Projects I'm working on:</div> <div><?php echo nl2br($item['profile']['projects']);?></div> + </div> + <?php } ?> + + <?php if (strcmp($item['profile']['description'],'') !== 0) { ?> + <div class="meet_item"> + <div class="meet_item_inner">My description:</div> <div><?php echo nl2br($item['profile']['description']);?></div> + </div> + <?php } ?> + + </div> + <?php } ?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Users/notice.php b/h-source/Application/Views/Users/notice.php new file mode 100644 index 0000000..d556363 --- /dev/null +++ b/h-source/Application/Views/Users/notice.php @@ -0,0 +1,94 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » notice + </div> + + <?php if ( isset($_SESSION['status']) ) { ?> + + <?php if ( strcmp($_SESSION['status'],'sent') === 0 ) { ?> + <div class="confirm_notice"> + <p>An e-mail has been sent to your mailbox.</p> + <p>If you have received no mail, then check inside the spam too</p> + <p>Click on the confirmation link in the e-mail in order to confirm the registration of the new account.</p> + <p>The confirmation link will expire in a hour.</p> + <p>If you don't want to confirm the account registration then wait one hour and your username and e-mail will be deleted from the database.</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else if (strcmp($_SESSION['status'],'regerror') === 0) { ?> + + <div class="confirm_notice"> + <p>Registration failed</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else if (strcmp($_SESSION['status'],'sent_new') === 0) { ?> + + <div class="confirm_notice"> + <p>An e-mail has been sent to your mailbox.</p> + <p>If you have received no mail, then check inside the spam too</p> + <p>Click on the confirmation link in the e-mail in order to change the password of your account.</p> + <p>The confirmation link will expire in a hour.</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else if (strcmp($_SESSION['status'],'sent_new_error') === 0) { ?> + + <div class="confirm_notice"> + <p>Registration failed</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else if (strcmp($_SESSION['status'],'sent_new_password') === 0) { ?> + + <div class="confirm_notice"> + <p>The new password has been sent to you by mail!</p> + <p>If you have received no mail, then check inside the spam too</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else if (strcmp($_SESSION['status'],'sent_new_password_error') === 0) { ?> + + <div class="confirm_notice"> + <p>Operation failed</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } else if (strcmp($_SESSION['status'],'deleted') === 0) { ?> + + <div class="confirm_notice"> + <p>Your account has been successfully deleted</p> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } ?> + + <?php } else { ?> + + <div class="confirm_notice"> + <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p> + </div> + + <?php } ?> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Videocards/catalogue.php b/h-source/Application/Views/Videocards/catalogue.php new file mode 100644 index 0000000..0fbe2be --- /dev/null +++ b/h-source/Application/Views/Videocards/catalogue.php @@ -0,0 +1,79 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="viewall_popup_menu_box_external"> + <div class="viewall_popup_menu_box"> + <?php echo $popup;?> + </div> + <div class="viewall_popup_menu_status"> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div> + </div> + </div> + + <!--if no notebooks found--> + <?php if (strcmp($recordNumber,0) === 0) { ?> + <div class="viewall_no_items_found"> + <?php echo gtext("No video cards found");?>.. + </div> + <?php } ?> + + <!--loop--> + <?php foreach ($table as $item) {?> + <div class="model_viewall"> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/Crystal/1282042976_hardware.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("how does it work with free software?");?></div> + <div class="inner_value"><b><?php echo Videocard::$videoReverse[$item['hardware']['video_card_works']];?></b></div> + </div> + + <div class="notebook_view_link"> + <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a> + </div> + + </div> + <?php } ?> + + <?php if (strcmp($recordNumber,0) !== 0) { ?> + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Videocards/form.php b/h-source/Application/Views/Videocards/form.php new file mode 100644 index 0000000..25f33b7 --- /dev/null +++ b/h-source/Application/Views/Videocards/form.php @@ -0,0 +1,98 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + dist_list_helper(); + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <?php echo $notice;?> + + <div class="notebooks_insert_form"> + <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST"> + + <div class="edit_form"> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("vendor");?>:</div> + <?php echo Html_Form::select('vendor',$values['vendor'],Videocard::$vendors,"select_entry");?> + <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div> + <?php echo Html_Form::input('model',$values['model'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("year of commercialization");?></div> + <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div> + <?php echo Html_Form::select('interface',$values['interface'],Videocard::$interface,"select_entry");?> + </div> + + <div class="form_entry td_with_distribution_checkboxes"> + <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div> + <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?> + <?php echo Distributions::getFormHtml();?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("how does it work with free software?");?></div> + <?php echo Html_Form::select('video_card_works',$values['video_card_works'],Videocard::$videoSelect,"select_entry hidden_x_explorer");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div> + <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?> + </div> + + <?php echo $hiddenInput;?> + + <input type="submit" name="<?php echo $submitName;?>" value="Save"> + + <div class="mandatory_fields_notice"> + <?php echo gtext("Fields marked with <b>*</b> are mandatory");?> + </div> + + </div> + + </form> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Videocards/page.php b/h-source/Application/Views/Videocards/page.php new file mode 100644 index 0000000..5ae071c --- /dev/null +++ b/h-source/Application/Views/Videocards/page.php @@ -0,0 +1,87 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($isDeleted,'no') === 0) { ?> + + <?php + $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions'; + ?> + + <?php foreach ($table as $item) { ?> + <div class="notebooks_viewall"> + + <!--if revision--> + <?php if (strcmp($this->action,'revision') === 0) { ?> + <div class="revision_alert"> + This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>. + </div> + <?php } ?> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/Crystal/1282042976_hardware.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span> + <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?> + <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span> + <?php } ?> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div> + </div> + + <div class="model_tested_on"> + <div class="inner_label"><?php echo gtext("tested on");?>:</div> + <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("how does it work with free software?");?></div> + <div class="inner_value"><b><?php echo Videocard::$videoReverse[$item[$tableName]['video_card_works']];?></b></div> + </div> + + <div class="notebook_description"> + <div class="notebook_description_label"><?php echo gtext("Description");?>:</div> + <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div> + </div> + + </div> + <?php } ?> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Wifi/catalogue.php b/h-source/Application/Views/Wifi/catalogue.php new file mode 100644 index 0000000..df03820 --- /dev/null +++ b/h-source/Application/Views/Wifi/catalogue.php @@ -0,0 +1,80 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="viewall_popup_menu_box_external"> + <div class="viewall_popup_menu_box"> + <?php echo $popup;?> + </div> + <div class="viewall_popup_menu_status"> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['wifi_works']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div> + <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div> + </div> + </div> + + <!--if no notebooks found--> + <?php if (strcmp($recordNumber,0) === 0) { ?> + <div class="viewall_no_items_found"> + <?php echo gtext("No wifi cards found");?>.. + </div> + <?php } ?> + + <!--loop--> + <?php foreach ($table as $item) {?> + <div class="model_viewall"> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/network-wireless_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("does it work with free software?");?></div> + <div class="inner_value"><b><?php echo $item['hardware']['wifi_works'];?></b></div> + </div> + + <div class="notebook_view_link"> + <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a> + </div> + + </div> + <?php } ?> + + <?php if (strcmp($recordNumber,0) !== 0) { ?> + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/Wifi/form.php b/h-source/Application/Views/Wifi/form.php new file mode 100644 index 0000000..c955d26 --- /dev/null +++ b/h-source/Application/Views/Wifi/form.php @@ -0,0 +1,98 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + dist_list_helper(); + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <?php echo $notice;?> + + <div class="notebooks_insert_form"> + <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST"> + + <div class="edit_form"> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("vendor");?>:</div> + <?php echo Html_Form::select('vendor',$values['vendor'],Wifi::$vendors,"select_entry");?> + <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div> + <?php echo Html_Form::input('model',$values['model'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("year of commercialization");?></div> + <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div> + <?php echo Html_Form::select('interface',$values['interface'],Wifi::$interface,"select_entry");?> + </div> + + <div class="form_entry td_with_distribution_checkboxes"> + <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div> + <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?> + <?php echo Distributions::getFormHtml();?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label hidden_x_explorer"><?php echo gtext("does it work with free software?");?></div> + <?php echo Html_Form::select('wifi_works',$values['wifi_works'],Wifi::$wifiSelect,"select_entry hidden_x_explorer");?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div> + <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?> + </div> + + <?php echo $hiddenInput;?> + + <input type="submit" name="<?php echo $submitName;?>" value="Save"> + + <div class="mandatory_fields_notice"> + <?php echo gtext("Fields marked with <b>*</b> are mandatory");?> + </div> + + </div> + + </form> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Wifi/page.php b/h-source/Application/Views/Wifi/page.php new file mode 100644 index 0000000..40696dc --- /dev/null +++ b/h-source/Application/Views/Wifi/page.php @@ -0,0 +1,87 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($isDeleted,'no') === 0) { ?> + + <?php + $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions'; + ?> + + <?php foreach ($table as $item) { ?> + <div class="notebooks_viewall"> + + <!--if revision--> + <?php if (strcmp($this->action,'revision') === 0) { ?> + <div class="revision_alert"> + This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>. + </div> + <?php } ?> + + <div class="notebook_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/network-wireless_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span> + <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?> + <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span> + <?php } ?> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("vendor");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div> + </div> + + <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("interface");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div> + </div> + + <div class="model_tested_on"> + <div class="inner_label"><?php echo gtext("tested on");?>:</div> + <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div> + </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("does it work with free software?");?></div> + <div class="inner_value"><b><?php echo $item[$tableName]['wifi_works'];?></b></div> + </div> + + <div class="notebook_description"> + <div class="notebook_description_label"><?php echo gtext("Description");?>:</div> + <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div> + </div> + + </div> + <?php } ?> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/bottom_left.php b/h-source/Application/Views/bottom_left.php new file mode 100644 index 0000000..438fe0f --- /dev/null +++ b/h-source/Application/Views/bottom_left.php @@ -0,0 +1,27 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($this->action,'talk') !== 0) { ?> + <div class="bottom_licence_notice"> + The contents of this page are in the Public Domain. (see the <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0 page</a> for detailed information). Anyone is free to copy, modify, publish, use, sell, or distribute the text for any purpose, commercial or non-commercial, and by any means. + </div> + <?php } ?> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/climb.php b/h-source/Application/Views/climb.php new file mode 100644 index 0000000..f947cd5 --- /dev/null +++ b/h-source/Application/Views/climb.php @@ -0,0 +1,35 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="notebooks_viewall"> + + <?php echo $notice;?> + + <div class="climb_form_ext_box"> + + <?php if (strcmp($isDeleted,'no') === 0 ) { ?> + <form action="<?php echo $this->currPage."/$lang/$id_rev/$token".$this->viewStatus;?>" method="POST"> + I want to make this revision the current revision: <input type="submit" name="confirmAction" value="confirm"> + </form> + <?php } ?> + + </div> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/dialog.php b/h-source/Application/Views/dialog.php new file mode 100644 index 0000000..537e527 --- /dev/null +++ b/h-source/Application/Views/dialog.php @@ -0,0 +1,100 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<script type="text/javascript"> + + $(function(){ + + $("#dialog-form").css("display","block"); + + $('#notice_dialog').dialog({ + autoOpen: false, + width: 500 + }); + + // Dialog + $('#dialog-form').dialog({ + autoOpen: false, + width: 500, + buttons: { + "Send": function() { + + var d_id_hard = $(".dialod_hidden_id_hard").attr("value"); + var d_object = encodeURIComponent($("#object").attr("value")); + var d_message = encodeURIComponent($("#message").attr("value")); + var d_id_duplicate = encodeURIComponent($("#id_duplicate").attr("value")); + + $.ajax({ + type: "POST", + url: "<?php echo $this->baseUrl.'/generic/del/'.$lang.'/'.$token;?>", + data: "id_hard="+d_id_hard+"&object="+d_object+"&message="+d_message+"&id_duplicate="+d_id_duplicate+"&insertAction=save", + async: false, + cache:false, + dataType: "html", + success: function(html){ + $(".notice_dialog_inner").text(html); + $('#notice_dialog').dialog('open'); + } + }); + + $(this).dialog("close"); + }, + "Cancel": function() { + $(this).dialog("close"); + } + } + }); + + // Dialog Link + $('.ask_for_removal_class_link').click(function(){ + $('#dialog-form').dialog('open'); + return false; + }); + + }); +</script> + + +<div id="dialog-form" title="Ask for the removal of this device"> +<!-- <p class="validateTips">Ask for removal:</p> --> + <form> + <table> + <tr> + <td><label for="object">why?</label></td> + <td><?php echo Html_Form::select('object','duplicated','duplication,other',null,"object");?></td> + </tr> + <tr> + <td><label for="message">message</label></td> + <td><textarea name="message" id="message">Write here your message..</textarea></td> + </tr> + <tr> + <td><label for="id_duplicate">duplicated model (write the id)</label></td> + <td><input type="text" id="id_duplicate" type="hidden" name="id_duplicate" value=""></td> + </tr> + <input class="dialod_hidden_id_hard" type="hidden" name="id_hard" value="<?php echo $id_hard;?>"> + </table> + </form> +</div> + +<div id="notice_dialog" title="Notice:"> + <div class="notice_dialog_inner"> + + </div> +</div>
\ No newline at end of file diff --git a/h-source/Application/Views/differences.php b/h-source/Application/Views/differences.php new file mode 100644 index 0000000..7e3862e --- /dev/null +++ b/h-source/Application/Views/differences.php @@ -0,0 +1,43 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="notebooks_viewall"> + + <div class="diff_color_notice"> + <b>Notice</b>: the text in <del>red</del> has been deleted from the previous revision, the text in <ins>green</ins> has been added in this revision and the text in <span class="gray_text_notice">gray</span> has not been changed. + </div> + + <?php foreach ($diffArray as $label => $text) { ?> + + <div class="diff_ext_box"> + + <div class="diff_item_label"> + <?php echo gtext("differences in the entry");?>: <b><?php echo $label;?></b> + </div> + + <div class="diff_item_text"> + <?php echo in_array($label,$fieldsWithBreaks) ? nl2br($text) : $text;?> + </div> + + </div> + + <?php } ?> + + </div> diff --git a/h-source/Application/Views/footer.php b/h-source/Application/Views/footer.php new file mode 100644 index 0000000..aeadbe1 --- /dev/null +++ b/h-source/Application/Views/footer.php @@ -0,0 +1,38 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="footer"> + <div class="copyright_notice_box"> + The <a href="<?php echo $this->baseUrl."/project/index/$lang";?>"><?php echo Website::$projectName;?></a> Project + </div> + + <div class="footer_credits_box"> + <a href="<?php echo $this->baseUrl."/credits/index/$lang";?>">credits</a> + </div> + + <div class="footer_credits_box"> + <a href="<?php echo $this->baseUrl."/contact/index/$lang";?>">contact</a> + </div> + </div> <!--fine footer--> + +</div> <!--fine container--> + +</body> +</html> diff --git a/h-source/Application/Views/header.php b/h-source/Application/Views/header.php new file mode 100644 index 0000000..83aa59d --- /dev/null +++ b/h-source/Application/Views/header.php @@ -0,0 +1,78 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//IT"> +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> +<?php $u = new UsersModel();?> +<html> +<head> + + <title><?php echo $title;?></title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="description" content="free software project with the aim of collecting informations about the hardware that work with a fully free operating system" /> + <meta name="keywords" content="free software GNU Linux distribution hardware wiki users freedom" /> + <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl?>/Public/Css/website.css"> + <link rel="Shortcut Icon" href="<?php echo $this->baseUrl?>/Public/Img/tab_icon_2.ico" type="image/x-icon"> + + + <!--[if IE]> + <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl?>/Public/Css/explorer.css"> + <![endif] --> + + <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/jquery/jquery-1.4.2.min.js"></script> + <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/functions.js"></script> + + <!--markitup--> + <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/markitup/jquery.markitup.js"></script> + <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/markitup/sets/bbcode/set.js"></script> + + <!-- markItUp! skin --> + <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl;?>/Public/Js/markitup/skins/simple/style.css" /> + <!-- markItUp! toolbar skin --> + <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl;?>/Public/Js/markitup/sets/bbcode/style.css" /> + + <!-- jQuery ui dialog --> + <link rel="stylesheet" href="<?php echo $this->baseUrl;?>/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css" rel="stylesheet" /> + <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js"></script> + + <script type="text/javascript"> + + var base_url = "<?php echo $this->baseUrl;?>"; + var curr_lang = "<?php echo $lang;?>"; + var csrf_token = "<?php echo $token;?>"; + + </script> + +</head> +<body> + + +<div id="external_header"> + <div id="header"> + <img src="<?php echo $this->baseUrl;?>/Public/Img/title.png"> + </div> +</div> + +<div id="top_menu_external"> + <div id="top_menu"> + <ul> + <li<?php echo $tm['home']; ?>><a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a></li><li<?php echo $tm['hardware']; ?>><a href="<?php echo $this->baseUrl."/hardware/catalogue/$lang";?>">Hardware</a></li><li<?php echo $tm['issues']; ?>><a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Issues</a></li><li<?php echo $tm['search']; ?>><a href="<?php echo $this->baseUrl."/search/form/$lang";?>">Search</a></li><li<?php echo $tm['news']; ?>><a href="<?php echo $this->baseUrl."/news/index/$lang";?>">News</a></li><li<?php echo $tm['download']; ?>><a href="<?php echo $this->baseUrl."/download/index/$lang";?>">Download</a></li><li<?php echo $tm['help']; ?>><a href="<?php echo $this->baseUrl."/help/index/$lang";?>">Help</a></li> + </ul> + </div> +</div> + +<div id="container"> diff --git a/h-source/Application/Views/history.php b/h-source/Application/Views/history.php new file mode 100644 index 0000000..4edd41b --- /dev/null +++ b/h-source/Application/Views/history.php @@ -0,0 +1,53 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="notebooks_viewall"> + + <ul class="page_history"> + + <?php if ($this->viewArgs['history_page'] === 1) { ?> + <?php foreach ($rev1 as $rev) { ?> + <li class="page_history_current_item"><b>Current revision:</b> <?php echo smartDate($rev['hardware']['update_date']);?> by <?php echo getLinkToUser($u->getUser($rev['hardware']['updated_by']));?> (<a href="<?php echo $this->baseUrl."/".$this->controller."/differences/$lang/$id/0".$this->viewStatus;?>">diff</a>)</li> + <?php } ?> + <?php } ?> + + <?php foreach ($rev2 as $rev) { ?> + <li class="page_history_item"> + + <a href="<?php echo $this->baseUrl."/".$this->controller."/revision/$lang/".$rev['revisions']['id_rev'].$this->viewStatus;?>"><?php echo smartDate($rev['revisions']['update_date']);?></a> by <?php echo getLinkToUser($u->getUser($rev['revisions']['updated_by']));?> + + <?php if (strcmp($rev['revisions']['id_rev'],$firstRev) !== 0) {?> + (<a href="<?php echo $this->baseUrl."/".$this->controller."/differences/$lang/$id/".$rev['revisions']['id_rev'].$this->viewStatus;?>">diff</a>) + <?php } ?> + + <?php if ($islogged === 'yes') { ?> + (<a href="<?php echo $this->baseUrl.'/'.$this->controller.'/climb/'.$lang.'/'.$rev['revisions']['id_rev'].'/'.$token.$this->viewStatus;?>">make current</a>) + <?php } ?> + + </li> + <?php } ?> + + </ul> + + </div> + + <div class="history_page_list"> + page list: <?php echo $pageList;?> + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/if_page_deleted.php b/h-source/Application/Views/if_page_deleted.php new file mode 100644 index 0000000..2f9fd1e --- /dev/null +++ b/h-source/Application/Views/if_page_deleted.php @@ -0,0 +1,49 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <?php if (strcmp($isDeleted,'yes') === 0) { ?> + + <div class="notebooks_viewall"> + <div class="revision_alert"> + <div> + This page has been deleted as requested by: + <?php foreach ($deletionUsers as $user) { ?> + <?php echo getLinkToUser($u->getUser($user));?> + <?php } ?> + </div> + </div> + <div class="deletion_motivations_title"> + With the following motivations: + </div> + <div class="deletion_motivations_external"> + <?php foreach ($deletion as $row) { ?> + <div class="deletion_motivations_iternal"> + <div class="deletion_motivations_iternal_title"> + motivation of <?php echo getLinkToUser($u->getUser($row['deletion']['created_by']));?>: <?php echo getMotivation($row,$this->controller);?> + </div> + <div class="deletion_motivations_iternal_message"> + message: <i><?php echo $row['deletion']['message'];?></i> + </div> + </div> + <?php } ?> + </div> + </div> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/license_notice.php b/h-source/Application/Views/license_notice.php new file mode 100644 index 0000000..71b1db9 --- /dev/null +++ b/h-source/Application/Views/license_notice.php @@ -0,0 +1,24 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div class="top_licence_notice"> + <div><b>License Informations:</b></div> + Any text submitted by you will be put in the Public Domain (see the <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0 page</a> for detailed information). + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/moderator_dialog.php b/h-source/Application/Views/moderator_dialog.php new file mode 100644 index 0000000..058cc3a --- /dev/null +++ b/h-source/Application/Views/moderator_dialog.php @@ -0,0 +1,62 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<div id="delete_dialog" title="Manage this message"> + <form> + <p>Write below your motivation</p> + <textarea name="md_message" id="md_message"></textarea> + </form> +</div> + +<div id="notice_dialog" title="Notice:"> + <div class="notice_dialog_inner"> + + </div> +</div> + +<script> + + $(document).ready(function() { + + <?php echo $md_javascript;?> + + $(".hidden_message_view_details").click(function(){ + + var md_id_ext = $(this).attr("id"); + var md_type_ext = $(this).parent().find(".md_type").text(); + var that = $(this); + + $.ajax({ + url: base_url + "/history/viewall/" + curr_lang + "/" + md_type_ext + "/" + md_id_ext, + async: false, + cache: false, + dataType: "html", + success: function(html){ + that.parent().find(".moderation_details_box").empty(); + that.parent().find(".moderation_details_box").append(html); + } + }); + + that.parent().find(".details_of_hidden_message").show(); + return false; + }); + }); + +</script>
\ No newline at end of file diff --git a/h-source/Application/Views/right.php b/h-source/Application/Views/right.php new file mode 100644 index 0000000..9d778b2 --- /dev/null +++ b/h-source/Application/Views/right.php @@ -0,0 +1,118 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="right"> + + <?php if (strcmp($this->action,'update') !== 0) { ?> + <div class="language_links_box"> + <?php echo $language_links;?> + </div> + <?php } ?> + + <div class="login_table_box"> + + <?php if ($islogged === 'yes') { ?> + <div class="login_box_logged"> + <div class="who_you_are_and_logout"> + Hello <b><?php echo $username; ?></b> (<a href="<?php echo $this->baseUrl?>/users/logout">logout</a>) + </div> + <div class="your_panel_link"> + your <a href="<?php echo $this->baseUrl."/my/home/$lang";?>">control panel</a> + </div> + </div> + <?php } else { ?> + + <div class="who_you_are_and_logout"> + Login form: + </div> + <!--login form--> + <form action="<?php echo $this->baseUrl."/users/login/$lang";?>" method="POST"> + + <div class="login_right_box"> + <div class="login_right_item"> + <div class="login_right_label"> + username + </div> + <div class="login_right_form"> + <input class="login_input" type="text" name="username" value=""> + </div> + </div> + <div class="login_right_item"> + <div class="login_right_label"> + password + </div> + <div class="login_right_form"> + <input class="login_input" type="password" name="password" value=""> + </div> + </div> + <div> + <input type="submit" name="login" value="login"> + </div> + </div> + </form> + + <div class="manage_account_link_box"> + <a href="<?php echo $this->baseUrl."/users/add/$lang";?>">Create new account</a> + </div> + + <div class="manage_account_link_box"> + <a href="<?php echo $this->baseUrl."/users/forgot/$lang";?>">Request new password</a> + </div> + + <?php } ?> + + </div> + + <div class="discover_hardware"> + <a href="<?php echo $this->baseUrl."/help/index/$lang#discover-hardware";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/discover.png"></a> + </div> + + <div class="download_database"> + <a href="<?php echo $this->baseUrl."/download/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/download.png"></a> + </div> + + <div class="statistics_ext_box"> + <div class="statistics_int_title"> + website statistics: + </div> + + <div class="statistics_hard_title"> + hardware in the database: + </div> + + <table width="100%"> + <?php foreach ($stat as $type => $number) { ?> + <tr> + <td><?php echo $type;?></td> + <td><?php echo "<b>".$number."</b>";?></td> + </tr> + <?php } ?> + </table> + + <div class="statistics_hard_title"> + users logged: <span class="user_logged"><?php echo $numbLogged;?></span> + </div> + </div> + + <div class="right_box_ext_box"> + <?php echo $htmlRightBox;?> + </div> + + </div>
\ No newline at end of file diff --git a/h-source/Application/Views/suggest_dialog.php b/h-source/Application/Views/suggest_dialog.php new file mode 100644 index 0000000..223bbd8 --- /dev/null +++ b/h-source/Application/Views/suggest_dialog.php @@ -0,0 +1,41 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + +<script type="text/javascript"> + + $(function(){ + + $("#suggest_dialog").css("display","block"); + + // Dialog + $('#suggest_dialog').dialog({ + autoOpen: false, + width: 500, + }); + + $('#suggest_dialog').dialog('open'); + + }); +</script> + +<div id="suggest_dialog" title="Insert new hardware"> + <p>Thanks for helping the h-node project and the free software movement!</p> + <p>You have just inserted a new notebook in the database.. can you please insert its devices separately too? Thanks!</p> +</div>
\ No newline at end of file diff --git a/h-source/Application/Views/talk.php b/h-source/Application/Views/talk.php new file mode 100644 index 0000000..6ae3bca --- /dev/null +++ b/h-source/Application/Views/talk.php @@ -0,0 +1,140 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <script> + + $(document).ready(function() { + + $("#bb_code").markItUp(mySettings); + + }); + + </script> + + <div class="notebooks_viewall"> + + <?php foreach ($table as $message) { ?> + + <?php if (strcmp($message['talk']['deleted'],'no') === 0) { ?> + + <div class="talk_message_item"> + + <div class="talk_message_item_title_date"> + <?php if ($ismoderator) { ?> + <a id="<?php echo $message['talk']['id_talk'];?>" class="hide_talk hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png">hide</a> + <?php } ?> + + <div class="talk_message_item_title"> + <?php echo eg_strtoupper($message['talk']['title']);?> + </div> + + <div class="talk_message_item_date"> + by <?php echo getLinkToUser($u->getUser($message['talk']['created_by']));?>, <?php echo smartDate($message['talk']['creation_date']);?> + </div> + </div> + + <div class="talk_message_item_content"> + <?php echo decodeWikiText($message['talk']['message']);?> + </div> + + <?php if ($ismoderator) { ?> + <!--view details--> + <div class="show_hidden_box_ext"> + <div class="md_type">talk</div> + <a id="<?php echo $message['talk']['id_talk'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a> + <div class="moderation_details_box"></div> + </div> + <?php } ?> + + </div> + + <?php } else { ?> + + <div class="talk_message_item_hidden"> + this message has been deleted + <?php if ($ismoderator) { ?> + <a id="<?php echo $message['talk']['id_talk'];?>" class="show_talk hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a> + + <!--view details--> + <div class="show_hidden_box_ext"> + <div class="md_type">talk</div> + + <a id="<?php echo $message['talk']['id_talk'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a> + + <div class="details_of_hidden_message"> + <div class="details_of_hidden_message_inner"> + <div class="talk_message_item_date"> + submitted by <?php echo getLinkToUser($u->getUser($message['talk']['created_by']));?>, <?php echo smartDate($message['talk']['creation_date']);?> + </div> + <div class="message_view_description_hidden"> + <?php echo decodeWikiText($message['talk']['message']);?> + </div> + </div> + <div class="moderation_details_box"></div> + </div> + </div> + + <?php } ?> + </div> + + <?php } ?> + + <?php } ?> + </div> + + <?php if ($islogged === 'yes') { ?> + + <div class="talk_form_external_box"> + <div class="talk_login_notice"> + <a name="form">Add a message</a> + </div> + + <?php echo $notice;?> + + <div class="notebooks_insert_form"> + <form action="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>#form" method="POST"> + + <div class="edit_form"> + + <div class="form_entry"> + <div class="entry_label">Title:</div> + <?php echo Html_Form::input('title',$values['title'],'talk_input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label">Message:</div> + <?php echo Html_Form::textarea('message',$values['message'],'talk_textarea_entry','bb_code');?> + </div> + + <input type="submit" name="insertAction" value="Save"> + + </div> + + </form> + </div> + </div> + + <?php } else { ?> + + <div class="talk_login_notice"> + <a name="form">You have to <a href="<?php echo $this->baseUrl."/users/login/$lang/".$this->controller."/view/$id_hard";?>">login</a> in order to add a message</a> + </div> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/Views/top_left.php b/h-source/Application/Views/top_left.php new file mode 100644 index 0000000..3c7bede --- /dev/null +++ b/h-source/Application/Views/top_left.php @@ -0,0 +1,142 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/hardware/catalogue/$lang";?>">Hardware</a> » <?php echo $tree;?> + </div> + + <?php if (strcmp($this->action,'view') === 0) { ?> + + <div class="notebook_view_title"> + Specifications of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <b><?php echo $ne_name;?></b> + </div> + + <div class="notebook_insert_link"> + <div class="view_page_back_button"> + <a title="Back to the list of <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>s" href="<?php echo $this->baseUrl."/".$this->controller."/catalogue/$lang".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <div class="view_page_history_button"> + <a title="talk page" href="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>"><img class="top_left_note_image" src="<?php echo $this->baseUrl;?>/Public/Img/talk-60.png"></a> + </div> + + <div class="view_page_history_button"> + <a title="history page" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_note_image" src="<?php echo $this->baseUrl;?>/Public/Img/history-60.png"></a> + </div> + + <?php if (strcmp($isDeleted,'no') === 0) { ?> + <div class="view_page_update_button"> + <form action="<?php echo $this->baseUrl."/".$this->controller."/update/$lang/$token".$this->viewStatus;?>" method="POST"> + <input title="edit page" class="update_submit_class" type="image" src="<?php echo $this->baseUrl;?>/Public/Img/edit-60.png" value="xedit"> + <input type="hidden" name="id_hard" value="<?php echo $id_hard;?>"> + </form> + </div> + <?php } ?> + </div> + + <div class="talk_numb_ext"> + <a href="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>">talk messages: <?php echo $talk_number;?></a> + </div> + + <?php } else if (strcmp($this->action,'catalogue') === 0) { ?> + + <div class="notebook_view_title"> + List of <b><?php echo MyStrings::$view[$lang][$this->controller]['element'];?>s</b> in the archive + </div> + + <div class="notebook_insert_link"> + <a title="Insert a new <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>" href="<?php echo $this->baseUrl."/".$this->controller."/insert/$lang/$token".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/new-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'history') === 0) { ?> + + <div class="notebook_view_title"> + History of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?> + </div> + + <div class="notebook_insert_link"> + <a title="Back to the specifications of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' '.$name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id/$name".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'differences') === 0) { ?> + + <?php if ($showDiff === true) { ?> + <div class="notebook_view_title"> + Differences between the revision of <b><?php echo smartDate($update_new);?></b>, created by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b>, and the revision of <b><?php echo smartDate($update_old);?></b> + </div> + <?php } ?> + + <div class="notebook_insert_link"> + <a title="Back to the history of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <?php echo $name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'climb') === 0) { ?> + + <div class="notebook_view_title"> + Make current this revision of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?> + </div> + + <div class="notebook_insert_link"> + <a title="Back to the history of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <?php echo $name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'revision') === 0) { ?> + + <div class="notebook_view_title"> + Revision of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?> + </div> + + <div class="notebook_insert_link"> + <a title="Back to the history of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <?php echo $name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'insert') === 0) { ?> + + <div class="notebook_view_title"> + Insert a new <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> + </div> + + <div class="notebook_insert_link"> + <a title="Back to the list of <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>s" href="<?php echo $this->baseUrl."/".$this->controller."/catalogue/$lang".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'update') === 0) { ?> + + <div class="notebook_view_title"> + Edit the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?> + </div> + + <div class="notebook_insert_link"> + <a title="Back to the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> specifications" href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$id_hard."/$name".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } else if (strcmp($this->action,'talk') === 0) { ?> + + <div class="notebook_view_title"> + Talk page of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?> + </div> + + <div class="notebook_insert_link"> + <a title="Back to the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> specifications" href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$id_hard."/$name".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a> + </div> + + <?php } ?>
\ No newline at end of file diff --git a/h-source/Application/index.html b/h-source/Application/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Application/index.html @@ -0,0 +1 @@ + diff --git a/h-source/COPYRIGHT.txt b/h-source/COPYRIGHT.txt new file mode 100755 index 0000000..63dbdc9 --- /dev/null +++ b/h-source/COPYRIGHT.txt @@ -0,0 +1,24 @@ +EasyGiant is a PHP framework for creating and managing dynamic content +Copyright (C) 2009 - 2010 Antonio Gallo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + + +EasyGiant includes works distributed under the licenses listed below. + +FreeFont +------- +License: GNU GPL version 3 or later +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +link: http://savannah.gnu.org/projects/freefont/ diff --git a/h-source/Config/Autoload.php b/h-source/Config/Autoload.php new file mode 100644 index 0000000..56bb9f6 --- /dev/null +++ b/h-source/Config/Autoload.php @@ -0,0 +1,23 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + +//class containing all the PHP files that have to be loaded at the beginning of the EasyGiant execution +//the files have to be saved in Application/Include +//all the files have to be PHP files!! +class Autoload +{ + + public static $files = array( + 'params.php', + 'distributions.php', + 'myFunctions.php', + 'hardware.php', + 'languages.php', + ); + +}
\ No newline at end of file diff --git a/h-source/Config/Config.php b/h-source/Config/Config.php new file mode 100755 index 0000000..e5c1e02 --- /dev/null +++ b/h-source/Config/Config.php @@ -0,0 +1,41 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + +define('DB', ''); +define('USER', ''); +define('PWD', ''); +define('HOST', ''); + +/*default controller name*/ +define('DEFAULT_CONTROLLER','home'); + +/*default action*/ +define('DEFAULT_ACTION','index'); + +/*website parameters*/ +define('DOMAIN_NAME','h-source'); + +/*type of database.*/ +//it can be: Mysql, Mysqli or None (first letter in uppercase) +define('DATABASE_TYPE','Mysqli'); + +/*error controller*/ +/*if you set ERROR_CONTROLLER to false, than EasyGiant will set ERROR_CONTROLLER equal to DEFAULT_CONTROLLER*/ +define('ERROR_CONTROLLER','home'); + +/*error action*/ +/*if you set ERROR_ACTION to false, than EasyGiant will set ERROR_ACTION equal to DEFAULT_ACTION*/ +define('ERROR_ACTION','index'); + +/*charset*/ +// set the charset used by all the functions that manage multi byte strings (mb_string functions, htmlentitites, etc) +define('DEFAULT_CHARSET','UTF-8'); + +/*rewrite settings*/ +//set MOD_REWRITE_MODULE to true if you have installed the mod_rewrite module of the server, otherwise MOD_REWRITE_MODULE to false +define('MOD_REWRITE_MODULE',true);
\ No newline at end of file diff --git a/h-source/Config/Reporting.php b/h-source/Config/Reporting.php new file mode 100755 index 0000000..56acc1d --- /dev/null +++ b/h-source/Config/Reporting.php @@ -0,0 +1,41 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + +//ERROR REPORTING DIRECTIVES + +//set RUNTIME_CONFIGURATION to true if you can't access the php.ini file of your PHP installation and you need to modify some PHP directives +//set RUNTIME_CONFIGURATION to false if you can access the php.ini file. In this case, modify the PHP directives in the php.ini file. +define ('RUNTIME_CONFIGURATION',true); + +// !!! the following four directives will be applied only if RUNTIME_CONFIGURATION has been set to true !!! + +//set the php.ini error_reporting directive +define ('ERROR_REPORTING_DIRECTIVE',E_ALL); + +//set the php.ini display_errors directive +//set to On or Off +define ('DISPLAY_ERRORS','On'); + +//set if the error file (see the next directive) has to be created or not +//set ERROR_REPORTING_FILE to true if you want that EasyGiant saves the errors in the LOG_ERROR_FILE (next), otherwise set ERROR_REPORTING_FILE to false +define ('ERROR_REPORTING_FILE',true); + +//only if ERROR_REPORTING_FILE has been set to true +//set the file where the errors will be saved +//default: EasyGiant_root/Logs/Errors.log +//check that the LOG_ERROR_FILE is writeble (by the apache user if you are using mod_apache) +define ('LOG_ERROR_FILE','default'); + + +//max length of each $_POST element +//set MAX_POST_LENGTH equal to 0 if you don't want any checks upon the $_POST elements +define ('MAX_POST_LENGTH',50000); + +//max length of the REQUEST_URI +//set MAX_REQUEST_URI_LENGTH equal to 0 if you don't want to set an upper limit in the length of the REQUEST_URI +define ('MAX_REQUEST_URI_LENGTH',200);
\ No newline at end of file diff --git a/h-source/Config/Restricted.php b/h-source/Config/Restricted.php new file mode 100755 index 0000000..9684f08 --- /dev/null +++ b/h-source/Config/Restricted.php @@ -0,0 +1,94 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + + +//RESRICTED ACCESS PARAMETERS + +//define the hash algoritm to be used in order to protect your password +//only md5 and sha1 are supported +define('PASSWORD_HASH','sha1'); + + + +//ADMINISTRATOR USERS LOGIN DIRECTIVES: + +//time that has to pass after a login failure before the user is allowed to try to login another time (in seconds) +define('ADMIN_TIME_AFTER_FAILURE','5'); + +//redirect to panel when successfully logged in: +define('ADMIN_PANEL_CONTROLLER', 'panel'); +define('ADMIN_PANEL_MAIN_ACTION', 'main'); + +//redirect to login form if access not allowed: +define('ADMIN_USERS_CONTROLLER', 'adminusers'); +define('ADMIN_USERS_LOGIN_ACTION', 'login'); + +//admin cookie: +define('ADMIN_COOKIE_NAME','uid'); +define('ADMIN_SESSION_EXPIRE', '3600'); +define('ADMIN_COOKIE_PATH', '/'); +define('ADMIN_COOKIE_DOMAIN', ''); +define('ADMIN_COOKIE_SECURE', false); + +//tables: +define('ADMIN_USERS_TABLE','adminusers'); +define('ADMIN_GROUPS_TABLE','admingroups'); +define('ADMIN_SESSIONS_TABLE','adminsessions'); +define('ADMIN_MANYTOMANY_TABLE','adminusers_groups'); +define('ADMIN_ACCESSES_TABLE','accesses'); + +//hijacking checks +define('ADMIN_HIJACKING_CHECK',true); //can be true or false +//session hijacking +//set ADMIN_ON_HIJACKING_EVENT equal to 'forceout' if you want to cause the logout of the user if there is the suspect of a session hijacking +//set ADMIN_ON_HIJACKING_EVENT equal to 'redirect' if you want to redirect the user to the ADMIN_HIJACKING_ACTION (see later) if there is the suspect of a session hijacking +define('ADMIN_ON_HIJACKING_EVENT','forceout'); //it can be 'forceout' or 'redirect' +//only if ADMIN_ON_HIJACKING_EVENT = 'redirect' +//redirect the user to ADMIN_USERS_CONTROLLER/ADMIN_HIJACKING_ACTION if there is the suspect of a session hijacking +define('ADMIN_HIJACKING_ACTION','retype'); + + + + +//REGISTERED USERS LOGIN DIRECTIVES: + +//time that has to pass after a login failure before the user is allowed to try to login another time (in seconds) +define('REG_TIME_AFTER_FAILURE','5'); + +//redirect to home when successfully logged in: +define('REG_PANEL_CONTROLLER', 'home'); +define('REG_PANEL_MAIN_ACTION', 'index'); + +//redirect to login form if access not allowed: +define('REG_USERS_CONTROLLER', 'users'); +define('REG_USERS_LOGIN_ACTION', 'login'); + +//registered cookie: +//NB: REG_COOKIE_NAME must be different from ADMIN_COOKIE_NAME!!! +define('REG_COOKIE_NAME','uidr'); +define('REG_SESSION_EXPIRE', '3600'); +define('REG_COOKIE_PATH', '/'); +define('REG_COOKIE_DOMAIN', ''); +define('REG_COOKIE_SECURE', false); + +//tables: +define('REG_USERS_TABLE','regusers'); +define('REG_GROUPS_TABLE','reggroups'); +define('REG_SESSIONS_TABLE','regsessions'); +define('REG_MANYTOMANY_TABLE','regusers_groups'); +define('REG_ACCESSES_TABLE','regaccesses'); + +//hijacking checks +define('REG_HIJACKING_CHECK',true); //can be true or false +//session hijacking +//set ADMIN_ON_HIJACKING_EVENT equal to 'forceout' if you want to cause the logout of the user if there is the suspect of a session hijacking +//set ADMIN_ON_HIJACKING_EVENT equal to 'redirect' if you want to redirect the user to the ADMIN_HIJACKING_ACTION (see later) if there is the suspect of a session hijacking +define('REG_ON_HIJACKING_EVENT','forceout'); //it can be 'forceout' or 'redirect' +//only if ADMIN_ON_HIJACKING_EVENT = 'redirect' +//redirect the user to ADMIN_USERS_CONTROLLER/ADMIN_HIJACKING_ACTION if there is the suspect of a session hijacking +define('REG_HIJACKING_ACTION','retype'); diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php new file mode 100644 index 0000000..cc0dcaf --- /dev/null +++ b/h-source/Config/Route.php @@ -0,0 +1,106 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Route +{ + + //controller,action couples that can be reached by the browser + //set 'all' if you want that all the controller,action couples can be reached by the browser + public static $allowed = array( + 'contact,index', + 'credits,index', + 'hardware,catalogue', + 'help,index', + 'home,index', + 'image,captcha', + 'issues,viewall', + 'issues,view', + 'my,home', + 'my,password', + 'my,email', + 'my,profile', + 'my,goodbye', + 'notebooks,catalogue', + 'notebooks,view', + 'notebooks,history', + 'notebooks,revision', + 'notebooks,insert', + 'notebooks,update', + 'notebooks,differences', + 'notebooks,climb', + 'notebooks,talk', + 'project,index', + 'users,login', + 'users,logout', + 'users,add', + 'users,confirm', + 'users,change', + 'users,forgot', + 'users,notice', + 'users,meet', + 'users,contributions', + 'wifi,catalogue', + 'wifi,view', + 'wifi,history', + 'wifi,revision', + 'wifi,insert', + 'wifi,update', + 'wifi,differences', + 'wifi,climb', + 'wifi,talk', + 'videocards,catalogue', + 'videocards,view', + 'videocards,history', + 'videocards,revision', + 'videocards,insert', + 'videocards,update', + 'videocards,differences', + 'videocards,climb', + 'videocards,talk', + 'printers,catalogue', + 'printers,view', + 'printers,history', + 'printers,revision', + 'printers,insert', + 'printers,update', + 'printers,differences', + 'printers,climb', + 'printers,talk', + 'scanners,catalogue', + 'scanners,view', + 'scanners,history', + 'scanners,revision', + 'scanners,insert', + 'scanners,update', + 'scanners,differences', + 'scanners,climb', + 'scanners,talk', + 'search,form', + 'search,results', + 'generic,del', + 'news,index', + 'download,index', + 'download,all', + 'download,notebooks', + 'download,wifi', + 'download,videocards', + 'download,printers', + 'download,scanners', + 'history,hide', + 'history,show', + 'history,viewall', + ); + + //it can be 'yes' or 'no' + //set $rewrite to 'yes' if you want that EasyGiant rewrites the URLs according to what specified in $map + public static $rewrite = 'no'; + + //define the urls of your website + //you have to set $rewrite to 'yes' + public static $map = array(); + +}
\ No newline at end of file diff --git a/h-source/Credits.txt b/h-source/Credits.txt new file mode 100644 index 0000000..0e2adb1 --- /dev/null +++ b/h-source/Credits.txt @@ -0,0 +1,34 @@ +jQuery: +The jQuery JavaScript Library v1.4.2 have been used through the website (see Public/Js/jquery) +http://jquery.com/ +Copyright 2010, John Resig +Dual licensed under the MIT or GPL Version 2 licenses (http://jquery.org/license) +Includes Sizzle.js (http://sizzlejs.com/) +Copyright 2010, The Dojo Foundation +Released under the MIT, BSD, and GPL Licenses. + +jQuery UI 1.8.4 +Copyright 2010 (http://jqueryui.com/about) +Dual licensed under the MIT or GPL Version 2 licenses (http://jquery.org/license) +http://docs.jquery.com/UI + +markitup: +The markitup jQuery plugin (licensed under MIT/GPL) has been used in order to help the user to insert wiki tags (see Public/Js/jquery/markitup) +Copyright (C) 2007-2010 Jay Salvat +Dual licensed under the MIT and GPL licenses. +http://markitup.jaysalvat.com/ + +php diff algoritm: +Paul's Simple Diff Algorithm v 0.1 algorithm (licensed under the zlib free license) has been used in order to highlight the differences between two different revisions of the same hadrware model (<http://www.paulbutler.org/>) +(C) Paul Butler 2007 <http://www.paulbutler.org/> +May be used and distributed under the zlib/libpng license. + +swiftmailer: +the swiftmailer program has been used to send mail from h-node.com (see the folder external) +© 2009 Chris Corbyn +see http://swiftmailer.org/ +license: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 + +Icons: +The icons used inside h-node.com are taken from the ACUN Simgeleri 0.7 incon theme (http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018) and from the H2O Icon Theme 0.0.5 (http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018), both licensed under the GNU GPL license, from the Crystal Projects icons (http://www.everaldo.com/crystal/?action=downloads), licensed under the LGPL, from the glaze icons set (http://www.notmart.org/index.php/Graphics) (LGPL) and from the DarkGlass_Reworked icons theme (http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902) (GPL). The flag icons are taken from the FAMFAMFAM (http://www.famfamfam.com/lab/icons/flags/) icons set (Public Domain) + diff --git a/h-source/Examples/Controllers/TestController.php b/h-source/Examples/Controllers/TestController.php new file mode 100644 index 0000000..9372e71 --- /dev/null +++ b/h-source/Examples/Controllers/TestController.php @@ -0,0 +1,9 @@ +<?php + +class TestController extends Controller { + + function index() { + echo '<h2>It works!</h2>'; + } + +}
\ No newline at end of file diff --git a/h-source/Examples/Tables/mysql/admin_session.txt b/h-source/Examples/Tables/mysql/admin_session.txt new file mode 100755 index 0000000..8e5f604 --- /dev/null +++ b/h-source/Examples/Tables/mysql/admin_session.txt @@ -0,0 +1,52 @@ +tables: + +#default admin session tables + +create table adminusers ( + id_user INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(80) binary NOT NULL, + password CHAR(40) binary NOT NULL, + last_failure INT UNSIGNED NOT NULL, + has_confirmed INT UNSIGNED NOT NULL, + unique(username), + index(username, password) +)engine=innodb; + +create table admingroups ( + id_group INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(30) binary NOT NULL, + unique(name) +)engine=innodb; + +create table adminusers_groups ( + id_user int(11) UNSIGNED not null, + id_group int(11) UNSIGNED not null, + index group_indx(id_group), + index user_indx(id_user), + foreign key group_fky(id_group) references admingroups (id_group), + foreign key user_fky(id_user) references adminusers (id_user), + unique (id_group,id_user) +)engine=innodb; + + +insert into adminusers (username,password) values ('admin',sha1('admin')); + + +CREATE TABLE adminsessions ( + uid CHAR(32) NOT NULL, + token CHAR(32) NOT NULL, + id_user INT UNSIGNED NOT NULL, + creation_date INT UNSIGNED NOT NULL, + user_agent CHAR(32) NOT NULL, + INDEX(uid) +)engine=innodb; + + +create table accesses ( + id int(12) not null auto_increment primary key, + ip char(20) not null,data char(10) not null, + ora char(8) not null, + username varchar(30) not null +); + + diff --git a/h-source/Examples/Tables/mysql/reg_session.txt b/h-source/Examples/Tables/mysql/reg_session.txt new file mode 100755 index 0000000..f5c4713 --- /dev/null +++ b/h-source/Examples/Tables/mysql/reg_session.txt @@ -0,0 +1,63 @@ +tables: + +#default registered session tables + +create table regusers ( + id_user INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(80) binary NOT NULL, + password CHAR(40) binary NOT NULL, + last_failure INT UNSIGNED NOT NULL, + has_confirmed INT UNSIGNED NOT NULL, + + e_mail VARCHAR(60) binary NOT NULL, + confirmation_token CHAR(32) NOT NULL, + creation_date timestamp default CURRENT_TIMESTAMP, + creation_time INT UNSIGNED NOT NULL, + temp_field CHAR(32) NOT NULL, + deleted CHAR(4) NOT NULL default 'no', + + forgot_token CHAR(32) NOT NULL, + forgot_time INT UNSIGNED NOT NULL, + + unique(username), + index(username, password) +)engine=innodb; + +create table reggroups ( + id_group INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(30) binary NOT NULL, + unique(name) +)engine=innodb; + +create table regusers_groups ( + id_user int(11) UNSIGNED not null, + id_group int(11) UNSIGNED not null, + index group_indx(id_group), + index user_indx(id_user), + foreign key group_fky(id_group) references reggroups (id_group), + foreign key user_fky(id_user) references regusers (id_user), + unique (id_group,id_user) +)engine=innodb; + + +insert into regusers (username,password) values ('user',sha1('user')); + + +CREATE TABLE regsessions ( + uid CHAR(32) NOT NULL, + token CHAR(32) NOT NULL, + id_user INT UNSIGNED NOT NULL, + creation_date INT UNSIGNED NOT NULL, + user_agent CHAR(32) NOT NULL, + INDEX(uid) +)engine=innodb; + + +create table regaccesses ( + id int(12) not null auto_increment primary key, + ip char(20) not null,data char(10) not null, + ora char(8) not null, + username varchar(30) not null +); + + diff --git a/h-source/Examples/Views/footer.php b/h-source/Examples/Views/footer.php new file mode 100755 index 0000000..42e09f0 --- /dev/null +++ b/h-source/Examples/Views/footer.php @@ -0,0 +1,3 @@ +</div> <!--container--> +</body> +</html> diff --git a/h-source/Examples/Views/post/form.php b/h-source/Examples/Views/post/form.php new file mode 100755 index 0000000..5ef5aff --- /dev/null +++ b/h-source/Examples/Views/post/form.php @@ -0,0 +1,28 @@ +<div class='mainMenu'> + <?php echo $topMenu;?> +</div> + +<?php echo $notice; ?> + +<div> + <form action='<?php echo $action;?>' method='POST'> + <table> + <tr> + <td>Titolo:</td> + <td><input type='text' name='titolo' value='<?php echo $values['titolo'];?>'></td> + </tr> + <tr> + <td>Autore:</td> + <td><input type='text' name='autore' value='<?php echo $values['autore'];?>'></td> + </tr> + <tr> + <td>Titolo:</td> + <td><textarea name='testo'><?php echo $values['testo'];?></textarea></td> + </tr> + <?php echo $hidden;?> + <tr> + <td><input type='submit' name='<?php echo $submit;?>' value='salva'></td> + </tr> + </table> + </form> +</div> diff --git a/h-source/Examples/Views/post/form_associate.php b/h-source/Examples/Views/post/form_associate.php new file mode 100644 index 0000000..5794153 --- /dev/null +++ b/h-source/Examples/Views/post/form_associate.php @@ -0,0 +1,19 @@ +<div class='mainMenu'> + <?php echo $menu;?> +</div> + +<?php echo $notice;?> + +<div> + <form action = '<?php echo $action;?>' method = 'POST'> + + <select name='id_arg'> + <?php foreach ($argomenti as $name => $value) {?> + <option value='<?php echo $value;?>'><?php echo $name;?></option> + <?php } ?> + </select> + <br /> + <input type='submit' name='associate' value='associate'> + <input type='submit' name='dissociate' value='dissociate'> + </form> +</div>
\ No newline at end of file diff --git a/h-source/Examples/Views/post/header.php b/h-source/Examples/Views/post/header.php new file mode 100755 index 0000000..606de2e --- /dev/null +++ b/h-source/Examples/Views/post/header.php @@ -0,0 +1,16 @@ +<html> + +<header> + +<title>prova</title> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/style.css');?>"></style> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/mainmenu.css');?>"></style> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/popupmenu.css');?>"></style> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/form.css');?>"></style> + +</header> + +<body> + +<div id="container"> + diff --git a/h-source/Examples/Views/post/modify.php b/h-source/Examples/Views/post/modify.php new file mode 100755 index 0000000..dc948e1 --- /dev/null +++ b/h-source/Examples/Views/post/modify.php @@ -0,0 +1 @@ +<?php echo $form;?>
\ No newline at end of file diff --git a/h-source/Examples/Views/post/popup.php b/h-source/Examples/Views/post/popup.php new file mode 100755 index 0000000..ba543a4 --- /dev/null +++ b/h-source/Examples/Views/post/popup.php @@ -0,0 +1,3 @@ +<div class='verticalMenu'> + <?php echo $popup; ?> +</div>
\ No newline at end of file diff --git a/h-source/Examples/Views/post/view.php b/h-source/Examples/Views/post/view.php new file mode 100755 index 0000000..3f67f2f --- /dev/null +++ b/h-source/Examples/Views/post/view.php @@ -0,0 +1 @@ +<?php echo $scaffold;?> diff --git a/h-source/Examples/Views/post2/form.php b/h-source/Examples/Views/post2/form.php new file mode 100755 index 0000000..5ef5aff --- /dev/null +++ b/h-source/Examples/Views/post2/form.php @@ -0,0 +1,28 @@ +<div class='mainMenu'> + <?php echo $topMenu;?> +</div> + +<?php echo $notice; ?> + +<div> + <form action='<?php echo $action;?>' method='POST'> + <table> + <tr> + <td>Titolo:</td> + <td><input type='text' name='titolo' value='<?php echo $values['titolo'];?>'></td> + </tr> + <tr> + <td>Autore:</td> + <td><input type='text' name='autore' value='<?php echo $values['autore'];?>'></td> + </tr> + <tr> + <td>Titolo:</td> + <td><textarea name='testo'><?php echo $values['testo'];?></textarea></td> + </tr> + <?php echo $hidden;?> + <tr> + <td><input type='submit' name='<?php echo $submit;?>' value='salva'></td> + </tr> + </table> + </form> +</div> diff --git a/h-source/Examples/Views/post2/header.php b/h-source/Examples/Views/post2/header.php new file mode 100755 index 0000000..0d9a131 --- /dev/null +++ b/h-source/Examples/Views/post2/header.php @@ -0,0 +1,30 @@ +<html> + +<header> + +<title>prova</title> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/style.css');?>"></style> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/mainmenu.css');?>"></style> +<link rel="stylesheet" type="text/css" href="<?php echo url::getRoot('public/css/form.css');?>"></style> +<script type="text/javascript" src="<?php echo url::getRoot('external/jquery/jquery-1.3.2.js');?>"></script> + +<script> +$(document).ready(function(){ + + $("ul#menuBlock li").mouseover(function () { + $(this).children().css({'display' : 'block'}); + }); + + $("ul#menuBlock li").mouseout(function () { + $('ul#menuBlock li ul').css({'display' : 'none'}); + }); + +}); +</script> + +</header> + +<body> + +<div id="container"> + diff --git a/h-source/Examples/Views/post2/modify.php b/h-source/Examples/Views/post2/modify.php new file mode 100755 index 0000000..dc948e1 --- /dev/null +++ b/h-source/Examples/Views/post2/modify.php @@ -0,0 +1 @@ +<?php echo $form;?>
\ No newline at end of file diff --git a/h-source/Examples/Views/post2/view.php b/h-source/Examples/Views/post2/view.php new file mode 100755 index 0000000..3f67f2f --- /dev/null +++ b/h-source/Examples/Views/post2/view.php @@ -0,0 +1 @@ +<?php echo $scaffold;?> diff --git a/h-source/Examples/articles.txt b/h-source/Examples/articles.txt new file mode 100755 index 0000000..db3f022 --- /dev/null +++ b/h-source/Examples/articles.txt @@ -0,0 +1,8 @@ +create table articles ( + id int(5) not null auto_increment primary key, + title varchar(100) not null, + author varchar(100) not null, + category varchar(100) not null, + abstract text CHARACTER SET utf8 not null, + content text CHARACTER SET utf8 not null +);
\ No newline at end of file diff --git a/h-source/Examples/boxes.txt b/h-source/Examples/boxes.txt new file mode 100644 index 0000000..f27d7b1 --- /dev/null +++ b/h-source/Examples/boxes.txt @@ -0,0 +1,5 @@ +create table boxes ( + id int(5) not null auto_increment primary key, + title varchar(100) not null, + xml text CHARACTER SET utf8 not null +); diff --git a/h-source/Examples/index.html b/h-source/Examples/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Examples/index.html @@ -0,0 +1 @@ + diff --git a/h-source/External/Fonts/FreeFont/AUTHORS b/h-source/External/Fonts/FreeFont/AUTHORS new file mode 100644 index 0000000..4148c93 --- /dev/null +++ b/h-source/External/Fonts/FreeFont/AUTHORS @@ -0,0 +1,208 @@ +-*- mode:text; coding:utf-8; -*- + GNU FreeFont Authors + ==================== + +The FreeFont collection is being maintained by + Steve White <stevan.white AT googlemail.com> +The folowing list cites the other contributors that contributed to +particular ISO 10646 blocks. + +* URW++ Design & Development GmbH <http://www.urwpp.de/> + + Basic Latin (U+0041-U+007A) + Latin-1 Supplement (U+00C0-U+00FF) (most) + Latin Extended-A (U+0100-U+017F) + Spacing Modifier Letters (U+02B0-U+02FF) + Mathematical Operators (U+2200-U+22FF) (parts) + Block Elements (U+2580-U+259F) + Dingbats (U+2700-U+27BF) + +* Yannis Haralambous <yannis.haralambous AT enst-bretagne.fr> and John + Plaice <plaice AT omega.cse.unsw.edu.au> + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Greek (U+0370-U+03FF) + Armenian (U+0530-U+058F) + Hebrew (U+0590-U+05FF) + Arabic (U+0600-U+06FF) + Currency Symbols (U+20A0-U+20CF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +* Young U. Ryu <ryoung AT utdallas.edu> + + Arrows (U+2190-U+21FF) + Mathematical Symbols (U+2200-U+22FF) + Mathematical Alphanumeric Symbols (U+1D400-U+1D7FF) + +* Valek Filippov <frob AT df.ru> + + Cyrillic (U+0400-U+04FF) + +* Wadalab Kanji Comittee + + Hiragana (U+3040-U+309F) + Katakana (U+30A0-U+30FF) + +* Angelo Haritsis <ah AT computer.org> + + Greek (U+0370-U+03FF) + +* Yannis Haralambous and Virach Sornlertlamvanich + + Thai (U+0E00-U+0E7F) + +* Shaheed R. Haque <srhaque AT iee.org> + + Bengali (U+0980-U+09FF) + +* Sam Stepanyan <sam AT arminco.com> + + Armenian (U+0530-U+058F) + +* Mohamed Ishan <ishan AT mitf.f2s.com> + + Thaana (U+0780-U+07BF) + +* Sushant Kumar Dash <sushant AT writeme.com> + + Oriya (U+0B00-U+0B7F) + +* Harsh Kumar <harshkumar AT vsnl.com> + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + +* Prasad A. Chodavarapu <chprasad AT hotmail.com> + + Telugu (U+0C00-U+0C7F) + +* Frans Velthuis <velthuis AT rc.rug.nl> and Anshuman Pandey + <apandey AT u.washington.edu> + + Devanagari (U+0900-U+097F) + +* Hardip Singh Pannu <HSPannu AT aol.com> + + Gurmukhi (U+0A00-U+0A7F) + +* Jeroen Hellingman <jehe AT kabelfoon.nl> + + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + +* Thomas Ridgeway <email needed> + + Tamil (U+0B80-U+0BFF) + +* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>, + Prof. Dr. Manfred Kudlek <kudlek AT informatik.uni-hamburg.de>, Olaf + Kummer <kummer AT informatik.uni-hamburg.de>, and Jochen Metzinger <?> + + Ethiopic (U+1200-U+137F) + +* Maxim Iorsh <iorsh AT users.sourceforge.net> + + Hebrew (U+0590-U+05FF) + +* Vyacheslav Dikonov <sdiconov AT mail.ru> + + Syriac (U+0700-U+074A) + Braille (U+2800-U+28FF) + +* Panayotis Katsaloulis <panayotis AT panayotis.com> + + Greek Extended (U+1F00-U+1FFF) + +* M.S. Sridhar <mssridhar AT vsnl.com> + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Tamil (U+0B80-U+0BFF) + Telugu (U+0C00-U+0C7F) + Kannada (U+0C80-U+0CFF) + Malayalam (U+0D00-U+0D7F) + +* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt + <nlevitt AT columbia.edu> + + Sinhala (U+0D80-U+0DFF) + +* Dan Shurovich Chirkov <dansh AT chirkov.com> + + Cyrillic (U+0400-U+04FF) + +* Abbas Izad <abbasizad AT hotmail.com> + + Arabic (U+0600-U+06FF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +* Denis Jacquerye <moyogo AT gmail.com> + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + +* K.H. Hussain <hussain AT kfri.org> and R. Chitrajan + + Malayalam (U+0D00-U+0D7F) + +* Solaiman Karim <solaiman AT ekushey.org> and Omi Azad <omi AT ekushey.org> + + Bengali (U+0980-U+09FF) + +* Sonali Sonania <sonalisonania AT gmail.com> and Monika Shah + <monikapatira AT gmail.com> + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + +* Pravin Satpute <pravin_ind21 AT hotmail.com>, Bageshri Salvi + <sbagrshri AT yahoo.co.in>, Rahul Bhalerao <rahul_pb_india AT + yahoo.com> and Sandeep Shedmake <surgs2k47 AT yahoo.co.in> + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + Tamil (U+0B80-U+0BFF) + +* Kulbir Singh Thind + + Gurmukhi (U+0A00-U+0A7F) + +* Gia Shervashidze <giasher AT telenet.ge> + + Georgian (U+10A0-U+10FF) + +* Daniel Johnson + + Cherokee (U+13A0-U+13FF) + +* George Douros + + Gothic (U+10330-U+1034F) + Phoenecian (U+10900-U+1091F) + Byzantine Musical Symbols (U+1D000-U+1D0FF) + Western Musical Symbols (U+1D100-U+1D1DF) + Mathematical Alphanumeric Symbols (U+1D400-U+1D7FF) + Mah Jong Tiles (U+1F000-U+1F02B) + Dominoes (U+1F030-U+1F093) + +* Steve White <stevan_white AT gmail.com> + Coptic (U+2C80-U+2CFF) + +* Primož Peterlin <primoz.peterlin AT biofiz.mf.uni-lj.si> + maintained FreeFont for several years, and is thanked for all his work. + +Please see the CREDITS file for details on who contributed particular +subsets of the glyphs in font files. + +-------------------------------------------------------------------------- +$Id: AUTHORS,v 1.18 2009/01/04 15:57:54 Stevan_White Exp $ diff --git a/h-source/External/Fonts/FreeFont/COPYING b/h-source/External/Fonts/FreeFont/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/h-source/External/Fonts/FreeFont/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/h-source/External/Fonts/FreeFont/CREDITS b/h-source/External/Fonts/FreeFont/CREDITS new file mode 100644 index 0000000..0f47440 --- /dev/null +++ b/h-source/External/Fonts/FreeFont/CREDITS @@ -0,0 +1,528 @@ +-*- mode:text; coding:utf-8; -*- + GNU FreeFont Credits + ==================== + +This file lists contributors and contributions to the GNU FreeFont project. + + +* URW++ Design & Development GmbH <http://www.urwpp.de/> + +URW++ donated a set of 35 core PostScript Type 1 fonts to the +Ghostscript project <http://www.cs.wisc.edu/~ghost/>, to be available +under the terms of GNU General Public License (GPL). + + Basic Latin (U+0041-U+007A) + Latin-1 Supplement (U+00C0-U+00FF) + Latin Extended-A (U+0100-U+017F) + Spacing Modifier Letters (U+02B0-U+02FF) + Mathematical Operators (U+2200-U+22FF) + Block Elements (U+2580-U+259F) + Dingbats (U+2700-U+27BF) + + +* Yannis Haralambous <yannis.haralambous AT enst-bretagne.fr> and John + Plaice <plaice AT omega.cse.unsw.edu.au> + +Yannis Haralambous and John Plaice are the authors of Omega typesetting +system, <http://omega.enstb.org/>. Omega is an extension of TeX. +Its first release, aims primarily at improving TeX's multilingual abilities. +In Omega all characters and pointers into data-structures are 16-bit wide, +instead of 8-bit, thereby eliminating many of the trivial limitations of TeX. +Omega also allows multiple input and output character sets, and uses +programmable filters to translate from one encoding to another, to perform +contextual analysis, etc. Internally, Omega uses the universal 16-bit Unicode +standard character set, based on ISO-10646. These improvements not only make +it a lot easier for TeX users to cope with multiple or complex languages, +like Arabic, Indic, Khmer, Chinese, Japanese or Korean, in one document, but +will also form the basis for future developments in other areas, such as +native color support and hypertext features. ... Fonts for UT1 (omlgc family) +and UT2 (omah family) are under development: these fonts are in PostScript +format and visually close to Times and Helvetica font families. +Omega fonts are available subject to GPL + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Greek (U+0370-U+03FF) + Armenian (U+0530-U+058F) + Hebrew (U+0590-U+05FF) + Arabic (U+0600-U+06FF) + Currency Symbols (U+20A0-U+20CF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +Current info: <http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=omega> + +* Valek Filippov <frob AT df.ru> + +Valek Filippov added Cyrillic glyphs and composite Latin Extended A to +the whole set of the abovementioned URW set of 35 PostScript core fonts, +<ftp://ftp.gnome.ru/fonts/urw/>. The fonts are available under GPL. + + Latin Extended-A (U+0100-U+017F) + Cyrillic (U+0400-U+04FF) + + +* Wadalab Kanji Comittee + +Between April 1990 and March 1992, Wadalab Kanji Comittee put together +a series of scalable font files with Japanese scripts, in four forms: +Sai Micho, Chu Mincho, Cho Kaku and Saimaru. The font files are +written in custom file format, while tools for conversion into +Metafont and PostScript Type 1 are also supplied. The Wadalab Kanji +Comittee has later been dismissed, and the resulting files can be now +found on the FTP server of the Depertment of Mathematical Engineering +and Information Physics, Faculty of Engineering, University of Tokyo +<ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/>. + + Hiragana (U+3040-U+309F) + Katakana (U+30A0-U+30FF) + + +* Young U. Ryu <ryoung AT utdallas.edu> + +Young Ryu is the author of Txfonts, a set of mathematical symbols +designed to accompany text typeset in Times or its variants. In the +documentation, Young adresses the design of mathematical symbols: "The +Adobe Times fonts are thicker than the CM fonts. Designing math fonts +for Times based on the rule thickness of Times = , , + , / , < , +etc. would result in too thick math symbols, in my opinion. In the TX +fonts, these glyphs are thinner than those of original Times +fonts. That is, the rule thickness of these glyphs is around 85% of +that of the Times fonts, but still thicker than that of the CM fonts." +TX fonts are are distributed under the GNU public license (GPL). +<http://www.ctan.org/tex-archive/fonts/txfonts/>. + + Arrows (U+2190-U+21FF) + Mathematical Symbols (U+2200-U+22FF) + + +* Angelo Haritsis <ah AT computer.org> + +Angelo Haritsis has compiled a set of Greek Type 1 fonts, available on +<ftp://ftp.hellug.gr/pub/unix/linux/GREEK/fonts/greekXfonts-Type1-1.1.tgz>. +The glyphs from this source has been used to compose Greek glyphs in +FreeSans and FreeMono. + +Angelo's licence says: "You can enjoy free use of these fonts for +educational or commercial purposes. All derived works should include +this paragraph. If you want to change something please let me have +your changes (via email) so that they can go into the next +version. You can also send comments etc to the above address." + + Greek (U+0370-U+03FF) + + +* Yannis Haralambous and Virach Sornlertlamvanich + +In 1999, Yannis Haralambous and Virach Sornlertlamvanich made a set of +glyphs covering the Thai national standard Nf3, in both upright and +slanted shape. The collection of glyphs have been made part of GNU +intlfonts 1.2 package and is available under the GPL at +<ftp://ftp.gnu.org/pub/gnu/intlfonts/>. + + Thai (U+0E00-U+0E7F) + + +* Shaheed R. Haque <srhaque AT iee.org> + +Shaheed Haque has developed a basic set of basic Bengali glyphs +(without ligatures), using ISO10646 encoding. They are available under +the XFree86 license at <http://www.btinternet.com/~shaheedhaque/>. + +Copyright (C) 2001 S.R.Haque <srhaque AT iee.org>. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL S.R.HAQUE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of S.R.Haque shall not be +used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +S.R.Haque. + + Bengali (U+0980-U+09FF) + + +* Sam Stepanyan <sam AT arminco.com> + +Sam Stepanyan created a set of Armenian sans serif glyphs visually +compatible with Helvetica or Arial. Available on +<http://www.editum.com.ar/mashtots/html/fonts/ara.tar.gz>. On +2002-01-24, Sam writes: "Arial Armenian font is free for +non-commercial use, so it is OK to use under GPL license." + + Armenian (U+0530-U+058F) + + +* Mohamed Ishan <ishan AT mitf.f2s.com> + +Mohamed Ishan has started a Thaana Unicode Project +<http://thaana.sourceforge.net/> and among other things created a +couple of Thaana fonts, available under FDL or BDF license. + + Thaana (U+0780-U+07BF) + + +* Sushant Kumar Dash <sushant AT writeme.com> (*) + +Sushant Dash has created a font in his mother tongue, Oriya. As he +states on his web page <http://members.tripod.com/~sushantdash/>: +"Please feel free to foreword this mail to your Oriya friends. No +copyright law is applied for this font. It is totally free!!! Feel +free to modify this using any font editing tools. This is designed for +people like me, who are away from Orissa and want to write letters +home using Computers, but suffer due to unavailability of Oriya +fonts.(Or the cost of the available packages are too much)." + + Oriya (U+0B00-U+0B7F) + + +* Harsh Kumar <harshkumar AT vsnl.com> + +Harsh Kumar has started BharatBhasha <http://www.bharatbhasha.net/> - +an effort to provide "FREE software, Tutorial, Source Codes +etc. available for working in Hindi, Marathi, Gujarati, Gurmukhi and +Bangla. You can type text, write Web pages or develop Indian Languages +Applications on Windows and on Linux. We also offer FREE help to +users, enthusiasts and software developers for their work in Indian +languages." + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + + +* Prasad A. Chodavarapu <chprasad AT hotmail.com> + +Prasad A. Chodavarapu created Tikkana, a Telugu font available in Type +1 and TrueType format on <http://chaitanya.bhaavana.net/fonts/>. +Tikkana exceeds the Unicode Telugu range with some composite glyphs. +Available under the GNU General Public License. + + Telugu (U+0C00-U+0C7F) + + +* Frans Velthuis <velthuis AT rc.rug.nl> and Anshuman Pandey + <apandey AT u.washington.edu> + +In 1991, Frans Velthuis from the Groningen University, The +Netherlands, released a Devanagari font as Metafont source, available +under the terms of GNU GPL. Later, Anshuman Pandey from the Washington +University, Seattle, USA, took over the maintenance of font. Fonts can +be found on CTAN, <ftp://ftp.dante.de/tex-archive/language/devanagari/>. I +converted the font to Type 1 format using Péter Szabó's TeXtrace +program <http://www.inf.bme.hu/~pts/textrace/> and removed some +redundant control points with PfaEdit. + + Devanagari (U+0900-U+097F) + + +* Hardip Singh Pannu <HSPannu AT aol.com> + +In 1991, Hardip Singh Pannu has created a free Gurmukhi TrueType font, +available as regular, bold, oblique and bold oblique form. Its license +says "Please remember that these fonts are copyrighted (by me) and are +for non-profit use only." + + Gurmukhi (U+0A00-U+0A7F) + + +* Jeroen Hellingman <jehe AT kabelfoon.nl> + +Jeroen Hellingman created a set of Malayalam metafonts in 1994, and a +set of Oriya metafonts in 1996. Malayalam fonts were created as +uniform stroke only, while Oriya metafonts exist in both uniform and +modulated stroke. From private communication: "It is my intention to +release the fonts under GPL, but not all copies around have this +notice on them." Metafonts can be found on CTAN, +<ftp://ftp.dante.de/tex-archive/language/oriya/> and +<ftp://ftp.dante.de/tex-archive/language/malayalam/>. + + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + + +* Thomas Ridgeway <> (*) + +Thomas Ridgeway, then at the Humanities And Arts Computing Center, +Washington University, Seattle, USA, (now defunct), created a Tamil +metafont in 1990. Anshuman Pandey from the same university took over +the maintenance of font. Fonts can be found at CTAN, +<ftp://ftp.dante.de/tex-archive/language/tamil/wntamil/>. + + Tamil (U+0B80-U+0BFF) + + +* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>, + Prof. Dr. Manfred Kudlek <kudlek AT informatik.uni-hamburg.de>, Olaf + Kummer <kummer AT informatik.uni-hamburg.de>, and Jochen Metzinger <?> + +Beyene, Kudlek, Kummer and Metzinger from the Theoretical Foundations +of Computer Science, University of Hamburg, prepared a set of Ethiopic +metafonts, found on +<ftp://ftp.dante.de/tex-archive/language/ethiopia/ethiop/>. They also +maintain home page on the Ethiopic font project, +<http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_eng.html>, +and can be reached at <ethiop AT informatik.uni-hamburg.de>. The current +version of fonts is 0.7 (1998), and they are released under GNU GPL. I +converted the fonts to Type 1 format using Péter Szabó's TeXtrace-A +program <http://www.inf.bme.hu/~pts/textrace/> and removed some +redundant control points with PfaEdit. + + Ethiopic (U+1200-U+137F) + + +* Maxim Iorsh <iorsh AT users.sourceforge.net> + +In 2002, Maxim Iorsh started the Culmus project, aiming at providing +Hebrew-speaking Linux and Unix community with a basic collection of +Hebrew fonts for X Windows. The fonts are visually compatible with +URW++ Century Schoolbook L, URW++ Nimbus Sans L and URW++ Nimbus Mono +L families, respectively, and are released under GNU GPL license. See +also <http://culmus.sourceforge.net/>. + + Hebrew (U+0590-U+05FF) + + +* Panayotis Katsaloulis <panayotis AT panayotis.com> + +Panayotis Katsaloulis helped fixing Greek accents in the Greek +Extended area. + + Greek Extended (U+1F00-U+1FFF) + + +* Vyacheslav Dikonov <sdiconov AT mail.ru> + +Vyacheslav Dikonov made a Braille unicode font that could be merged +with the UCS fonts to fill the 2800-28FF range completely. (uniform +scaling is possible to adapt it to any cell size). He also contributed +a free syriac font, whose glyphs (about half of them) are borrowed +from the "Carlo Ator" font freely downloadable from +<http://www.aacf.asso.fr/>. Vyacheslav also filled in a few missing +spots in the U+2000-U+27FF area, e.g. the box drawing section, sets of +subscript and superscript digits and capital Roman numbers. + + Syriac (U+0700-U+074A) + Box Drawing (U+2500-U+257F) + Braille (U+2800-U+28FF) + + +* M.S. Sridhar <mssridhar AT vsnl.com> + +M/S Cyberscape Multimedia Limited, Mumbai, developers of Akruti +Software for Indian Languages (http://www.akruti.com/), have released +a set of TTF fonts for nine Indian scripts (Devanagari, Gujarati, +Telugu, Tamil, Malayalam, Kannada, Bengali, Oriya, and Gurumukhi) +under the GNU General Public License (GPL). You can download the fonts +from the Free Software Foundation of India WWW site +(http://www.gnu.org.in/akruti-fonts/) or from the Akruti website. + +For any further information or assistance regarding these fonts, +please contact mssridhar AT vsnl.com. + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Tamil (U+0B80-U+0BFF) + Telugu (U+0C00-U+0C7F) + Kannada (U+0C80-U+0CFF) + Malayalam (U+0D00-U+0D7F) + + +* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt + <nlevitt AT columbia.edu> + +Noah Levitt found out that the Sinhalese fonts available on the site +<http://www.metta.lk/fonts/> are released under GNU GPL, or, +precisely, "Public Domain under GNU Licence
Produced by DMS +Electronics for The Sri Lanka Tipitaka Project" (taken from the font +comment), and took the effort of recoding the font to Unicode. + + Sinhala (U+0D80-U+0DFF) + + +* Daniel Shurovich Chirkov <dansh AT chirkov.com> + +Dan Chirkov updated the FreeSerif font with the missing Cyrillic +glyphs needed for conformance to Unicode 3.2. The effort is part of +the Slavjanskij package for Mac OS X, +<http://www.versiontracker.com/dyn/moreinfo/macosx/18680>. + + Cyrillic (U+0400-U+04FF) + + +* Denis Jacquerye <moyogo AT gmail.com> + +Denis Jacquerye added new glyphs and corrected existing ones in the +Latin Extended-B and IPA Extensions ranges. + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + + +* K.H. Hussain <hussain AT kfri.org> and R. Chitrajan + +`Rachana' in Malayalam means `to write', `to create'. Rachana Akshara Vedi, +a team of socially committed information technology professionals and +philologists, has applied developments in computer technology and desktop +publishing to resurrect the Malayalam language from the disorder, +fragmentation and degeneration it had suffered since the attempt to adapt +the Malayalam script for using with a regular mechanical typewriter, which +took place in 1967-69. K.H. Hussein at the Kerala Forest Research Institute +has released "Rachana Normal" fonts with approximately 900 glyphs required +to typeset traditional Malayalam. R. Chitrajan apparently encoded the +glyphs in the OpenType table. + +In 2008, the Malayalam ranges in FreeSerif were updated under the advise +and supervision of Hiran Venugopalan of Swathanthra Malayalam Computing, +to reflect the revised edition Rachana_04. + + Malayalam (U+0D00-U+0D7F) + + +* Solaiman Karim <solaiman AT ekushey.org> + + Bengali (U+0980-U+09FF) + +Solaiman Karim has developed several OpenType Bangla fonts and +released them under GNU GPL on <http://www.ekushey.org>. + + +* Sonali Sonania <sonalisonania AT gmail.com> and Monika Shah + <monikapatira AT gmail.com> + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + +Glyphs were drawn by Cyberscape Multimedia Ltd., #101,Mahalakshmi +Mansion 21st Main 22nd "A" Cross Banashankari 2nd stage Banglore +560070, India. Converted to OTF by IndicTrans Team, Powai, Mumbai, +lead by Prof. Jitendra Shah. Maintained by Monika Shah and Sonali +Sonania of janabhaaratii Team, C-DAC, Mumbai. This font is released +under GPL by Dr. Alka Irani and Prof Jitendra Shah, janabhaaratii +Team, C-DAC, Mumabi. janabhaaratii is localisation project at C-DAC +Mumbai (formerly National Centre for Software Technology); funded by +TDIL, Govt. of India. Contact:monika_shah AT lycos.com, +sonalisonania AT yahoo.com, jitendras AT vsnl.com, alka AT ncst.ernet.in. +website: www.janabhaaratii.org.in. + + +* Pravin Satpute <pravin_ind21 AT hotmail.com>, Bageshri Salvi + <sbagrshri AT yahoo.co.in>, Rahul Bhalerao <rahul_pb_india AT + yahoo.com> and Sandeep Shedmake <surgs2k47 AT yahoo.co.in> + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + Tamil (U+0B80-U+0BFF) + +In December 2005 the team at www.gnowledge.org released a set of two +Unicode pan-Indic fonts: "Samyak" and "Samyak Sans". "Samyak" font +belongs to serif style and is an original work of the team; "Samyak +Sans" font belongs to sans serif style and is actually a compilation +of already released Indic fonts (Gargi, Padma, Mukti, Utkal, Akruti +and ThendralUni). Both fonts are based on Unicode standard. You can +download the font files (released under GNU/GPL License) from +http://www.gnowledge.org/Gnoware/localization/font.htm + + +* Kulbir Singh Thind + + Gurmukhi (U+0A00-U+0A7F) + +Dr. Kulbir Singh Thind designed a set of Gurmukhi Unicode fonts, +AnmolUni and AnmolUni-Bold, which are available under the terms of GNU +Generel Public Licens from the Punjabu Computing Resource Center, +http://guca.sourceforge.net/typography/fonts/anmoluni/. + + +* Gia Shervashidze <giasher AT telenet.ge> + + Georgian (U+10A0-U+10FF) + +Starting in mid-1990s, Gia Shervashidze designed many +Unicode-compliant Georgian fonts: Times New Roman Georgian, Arial +Georgian, Courier New Georgian. His work on Georgian localization can +be reached at http://www.gia.ge/. + + +* Primož Peterlin <primoz.peterlin AT biofiz.mf.uni-lj.si> + +Primož Peterlin filled in missing glyphs here and there (e.g. Latin +Extended-B and IPA Extensions ranges in the FreeMono familiy), and +created the following UCS blocks: + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Arrows (U+2190-U+21FF) + Box Drawing (U+2500-U+257F) + Block Elements (U+2580-U+259F) + Geometrical Shapes (U+25A0-U+25FF) + +* Mark Williamson + +Made the MPH 2 Damase font, from which + Hanunóo (U+1720-U+173F) + Buginese (U+1A00-U+1A1F) + Tai Le (U+1950-U+197F) + Ugaritic (U+10380-U+1039F) + Old Persian (U+103A0-U+103DF) + +* Jacob Poon + +Submitted a very thorough survey of glyph problems and other suggestions. + +* Alexey Kryukov + +Made the TemporaLCGUni fonts, based on the URW++ fonts, from which at one +point FreeSerif Cyrillic, and some of the Greek, was drawn. He also provided +valuable direction about Cyrillic and Greek typesetting. + +* George Douros + +The creator of several fonts focusing on ancient scripts and symbols. +Many of the glyphs are created by making outlines from scanned images +of ancient sources. + + Aegean: Phoenecian + Analecta: Gothic (U+10330-U+1034F) + Musical: Byzantine & Western + Unicode: many Miscellaneous Symbols, Miscellaneous Technical, + supplemental Symbols, and Mathematical Alphanumeric symbols, + Mah Jong, and the outline of the Domino. + +* Daniel Johnson + +Created by hand a Cherokee range specially for FreeFont to be "in line with +the classic Cherokee typefaces used in 19th century printing", but also to +fit well with ranges previously in FreeFont. + Cherokee (U+13A0-U+13FF) + +Notes: + +*: The glyph collection looks license-compatible, but its author has + not yet replied and agreed on their work being used in part of + this glyph collection. + +-------------------------------------------------------------------------- +$Id: CREDITS,v 1.23 2009/01/04 15:57:54 Stevan_White Exp $ diff --git a/h-source/External/Fonts/FreeFont/ChangeLog b/h-source/External/Fonts/FreeFont/ChangeLog new file mode 100644 index 0000000..d5345d0 --- /dev/null +++ b/h-source/External/Fonts/FreeFont/ChangeLog @@ -0,0 +1,4525 @@ +$Id: ChangeLog,v 1.254 2009/01/04 16:12:59 Stevan_White Exp $ +2009-01-04 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added 2009 to copyright dates + + * AUTHORS, CREDITS: + + Removed Glagolitic range author + + * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added some TrueType names + +2009-01-01 Stevan_White + * FreeSerif.sfd: + + Removde Glagolitic range, since have not (yet) received OK from author. + + Added some TrueType Names + +2008-12-31 Stevan_White + * COPYING: + + Updated license to GPL v3 + +2008-12-30 Stevan_White + * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Oblique versions of Daniel Johnson's Cherokee. + + * FreeSerifBold.sfd: + + Cherokee Bold range from Daniel Johnson. + +2008-12-27 Stevan_White + * isMonoMono.py: + + 900 EM -> 800 + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd: + + Made glyphs to lie between -200 and 800 EM + + * isMonoMono.py: + + check that glyphs lie in vertical bounding boxes + + * FreeMono.sfd, FreeSerif.sfd: + + Extensible bracket characters didn't exactly line up. Fixed. + Mono: a couple of glyphs had gotten out of their bounding boxes again. + +2008-12-26 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Final pre-release cleanup + + * FreeSerif.sfd: + + Buginese vowel u was misnamed + + * FreeMono.sfd: + + Yatcyrillic somehow was a mark character ... fixed + + * FreeSans.sfd, FreeSansOblique.sfd: + + Had to un-link references in + Sans: uni02B2, uni02B5 + SansOblique: uni0363 + because validation of the TTF file said the glyph + "is drawn in wrong direction" + I would have preferred to have understand this... + + * Makefile: + + Added quick test for FontForge version. + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd: + + Removed kerning tables (?? what were they doing here anyway??) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Kerning tables for Thai. + Handles one common case: short letter followed by a tall one with + an overhang to the left. + +2008-12-25 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + More putzing with kerning tables + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Copied kerning classes + Serif -> SerifBold + SerifItalic -> SerifBoldItalic + Sans -> SansOblique SansBold SansBoldOblique + Some associated naming of characters, etc + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Additions and correction in Spacing Modifier letters and IPA Extensions + +2008-12-23 Stevan_White + * FreeSerif.sfd: + + Applied patch to Cherokee range + +2008-12-20 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Fixed kern classes that end in space (crashes FontForge) + + * FreeSerifItalic.sfd, FreeSerif.sfd: + + kerning + +2008-12-19 Stevan_White + * FreeSerifItalic.sfd: + + kerning + + * FreeSerif.sfd: + + kerning + Some adjustments to Glagolitc spacing, mark positioning + +2008-12-18 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + +2008-12-17 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + +2008-12-11 Stevan_White + * FreeSans.sfd, FreeSerif.sfd: + + kerning + +2008-12-10 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd: + + kerning + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd: + + kerning + +2008-12-09 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + +2008-12-08 Stevan_White + * FreeSansOblique.sfd: + + Slanted small final sigma. Remedies + bug #24993: U+03C2 "Greek small letter final sigma" not slanted in + Free Sans Oblique + https://savannah.gnu.org/bugs/index.php?24993 + +2008-12-07 Stevan_White + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + kerning, etc + +2008-12-06 Stevan_White + * FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + kerning + Tweek in Sans having to do with addition of Latin Extended + +2008-12-05 Stevan_White + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Tweeks to Latin Extended Additional + + * FreeSansBoldOblique.sfd: + + Added Latin Extended Additional range + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Extra space at end of kern class names has bad effect on FornForge + script that try to run through kern classes. Some FontForge call + corrupts memory. + Got rid of extra space. + +2008-12-02 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Replaced U+0387 GREEK ANO TELEIA with top dot of colon. + See bug #24987: U+0387 GREEK ANO TELEIA too low + https://savannah.gnu.org/bugs/index.php?24987 + + * FreeSerif.sfd: + + more kerning in Cyrillic (broke into two tables of classes) + +2008-12-01 Stevan_White + * FreeSerif.sfd: + + tweeks to kernin + + * FreeSerifBoldItalic.sfd: + + kerning + +2008-11-30 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Kerning for Latin and Cyrillic fairly complete in Serif faces. + Complete in sense that it looks pretty good under Pango for + English French German Spanish Polish Czech Latvian + But have not done Vietnamese (will require many more entries). + I adjust roman and italic, then copy tables by hand to bold and + bolditalic. + Misgiving: bolditalic is much too crammed + Overall, I may have over-kerned. (A difficult temptation to master.) + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + In Serif, modified widths of some extended latin glyphs + +2008-11-29 Stevan_White + * FreeSerif.sfd: + + Broke Latin kerning subtable into four, hoping it will be easier to + understand and maintain. + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, + FreeSerifItalic.sfd, FreeSerifBold.sfd, FreeSansOblique.sfd, + FreeSans.sfd: + + kerninig + +2008-11-28 Stevan_White + * FreeSans.sfd, FreeSerif.sfd: + + more kerning; + made guillemot narrower + + * FreeSansOblique.sfd, FreeSerif.sfd: + + previous commit was incomplete + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjusted width of single quotes (and apostrophe) to be "punctuation width" + More fiddling with kerning. + +2008-11-27 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + much fiddling with kerning + +2008-11-26 Stevan_White + * FreeSerifBold.sfd: + + Basic kerning, named main Cyrillic letters + + * FreeSerifItalic.sfd: + + Basic Cyrillic kerning + + * FreeSerif.sfd: + + Tweeks to Cyrillic kerning + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd, Makefile: + + Much fiddling with kerning, tables, and generating fonts whose kerning + tables work with OpenOffice. + +2008-11-24 Stevan_White + * FreeSerif.sfd: + + regularized padding in Miscellaneous symbols. + At least within related ranges tried to make similar. + Made to validate + +2008-11-23 Stevan_White + * FreeSerif.sfd: + + Filled out Miscellaneous Symbols. Used George Douros' Unicode font. + Completed Miscellaneous Symbols, with some drawings from George Douros' + Unicode Symbols, and some of mine. + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Replaced Greek Exteded psili and dasia with scaled versions of the + "bent quote" mark. I think it's distinctive enough, but not so silly. + + Remedies bug #22997: Mono: Greek Extended psili is ugly + https://savannah.gnu.org/bugs/?22997 + + * FreeSerif.sfd: + + Made some recycling symbols + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Finished with Hebrew Pointed letters in all faces. + +2008-11-22 Stevan_White + * FreeSans.sfd: + + Fiddled with Hebrew Pointed letters + + * FreeSerifItalic.sfd: + + Marks for Vietnamese + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Letter pe had strange thick middle ear that looked awful. lamed had ben + bumped at some point. Fixed. Adjusted some of the points. + +2008-11-21 Stevan_White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + repairs to Pointed Hebrew + + * FreeSerif.sfd: + + Numeral line positioning marks for Gothic + + * FreeSerifItalic.sfd: + + Added Combining Marks for Symbols (some question about obliqueness of + some symbols) + Cleaned up some empty glyphs in Pointed Hebrew. + +2008-11-20 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Provided Hebrew pointed letters, with lookups, for all Serif faces. + +2008-11-19 Stevan_White + * FreeSerifBoldItalic.sfd: + + renamed Hebrew lookups + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Completed Hebrew in Bold faces. + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + More tweeks to Hebrew points + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Adjustments corrections and additions to Hebrew points + +2008-11-18 Stevan_White + * FreeSansBold.sfd: + + Cleaned out a lot of ridiculous kernings + +2008-11-17 Stevan_White + * FreeSansBoldOblique.sfd: + + fiddled with Armenian ligatures + + * FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added Armenian (with ligatures) to BoldOblique + Fiddled with character spacing + +2008-11-16 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added U+01f9 and paragraph end marker to Georgian + Fiddled with Armenian ligatures + +2008-11-15 Stevan_White + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Another pass at letter spacing in Cyrillic. + Also went through ancient letters. + + Added Georgian paragraph separator 10FB + Added Georgian turned gan 10F9 (because it was easy) + + Re-worked letter spacing through modern Cyrillic range. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd: + + Letter spacing + +2008-11-14 Stevan_White + * FreeSerif.sfd: + + Added several characters to Cyrillic Extended-B + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Made Cyrillic hooked e U+04BC-F to look less goofy. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Based on assertion on Pechatnyj Dvor's web site, Cyrillic Fita + U+0472-3 and "Barred O" U+04E8-9 are different styles the same letter, + and the fact that the tilde in the O never looked good in Sans, I + made them all barred O's. + + * FreeSerif.sfd: + + Added Cyrillic Yn, yn (U+a65e-f) + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Synced up Cyrillic and Combining Diacritics ranges, + Couple of tweeks in Gujarati to make TT validate + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Changes to older Cyrillic letters, in response to further information. + Made omegas, omegas with titlo, and OT to all be of the same size and + shape in Serif. + Un-linked Cyrillic Psi and psi from Greek, made squarer versions. + + Some more Cyrillic diacritical marks in Sans. Re-worked U+04bc-f . + Experimenting with mark positioning for Cyrillic + +2008-11-12 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Strove to make Euro look more like the EC logo design, while making + glyph fit better with the design of its face. Bug #3576: Euro design + https://savannah.gnu.org/bugs/?23576 + + * FreeSans.sfd, FreeSerif.sfd: + + Adjustments mostly to GPOS tables having to do with Vietnamese marks. + The WAZU Vietnamese test page looks pretty good in Sans now. + Still not thrilled with below-dot when it appears with a mark over + e.g. U+0102. Pango positions one or the other but not both. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Extensive modification of GPOS lookup tables for mark positioning. + I think they're now all functional (except styled Mono faces have none). + Also added lots of marks to faces that didn't have them, and also + fiddled with Combining Diacritical Marks. + +2008-11-10 Stevan_White + * FreeSerif.sfd: + + Made one combining mark really combining + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made a few combining characters to be zero-width in Mono, + Added them to other styles. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Figured out why below marks in Thai weren't working in the lowest + letters. I think Pango and other font renderers ignore 'blwm'. + However, 'mark' works. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Tweeks to Thai marks + +2008-11-09 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Several bugfixes in Thai, mostly having to do with mark placement and + ligatures. Implemented ru-saraaa and lu-saraaa with ligatures. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + added and named dottedcircle (used by Pango to render + combining mark base) + + * FreeSerif.sfd: + + Tweeks to Coptic, after viewing more papyrus samples and web pages. + + * FreeSerif.sfd: + + Weight of Coptic small letters made to match that of Latin and Greek ones. + +2008-11-08 Stevan_White + * FreeSerif.sfd: + + Made Coptic to comply better with + http://www.wazu.jp/gallery/Test_Coptic.html + Made a flourish at foot of letters with long diagonal. + + More tweeks to Coptic; put in a mark lookup table. + + Note: for small letters I made scaled references to captials. + Results in those letters looking quite light next to the capitals and + next to small Latin letters. Also, there are a few variant forms for + capitals (Unicode samples don't show this). It would be good to + re-work + + Added Coptic alphabet in u+2C80-2CB1 and u+03E2-u+03EF, drawn/built by + me, based on Unicode samples, TeX font copte, and scans at WikiPedia. + +2008-11-07 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Further tweeks to dieresis in Greek and Cyrillic + + * FreeSerif.sfd: + + replaced Greek I dieresis with references, tweeked height of dieresis. + +2008-11-04 Stevan_White + * FreeSerif.sfd: + + Added a few Cyrillic Extended-B letters seen in web pages while looking + for Glagolitic text. + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Added a few old Cyrillic characters. + + * FreeSerif.sfd: + + Several corrections and tweeks to Glagolitic. + Still missing six slots from Unicode, but don't see them in the TeX + fonts. + On the other hand, several on-line Glagolitic pages (bibles etc) don't + seem to use these. Maybe it's OK as-is. + +2008-11-03 Stevan_White + * FreeSerif.sfd: + + Added lowercase range to Glagolitic, as a facile scaling of the + uppercase. + + Added letter to Glagolitic, scaled range. + +2008-11-02 Stevan_White + * FreeSerif.sfd: + + Replaced fraktur bold from Mathematical Alphanumeric Symbols with that + from TX Fonts by Young Ryu. + One concern: letter k is damaged (in both medium and bold). I just + hacked something up. + + Added Glagolitic "round type" font (Croation capitols only) from the + collection of Croatian fonts for LaTeX by Darko Zubrinić + ftp://ftp.dante.de/tex-archive/languages/croatian/ + http://www.tug.org/TUGboat/Articles/tb17-1/tb50zubr.pdf + + Several letters are missing besides the small letters. + + * FreeSerifBoldItalic.sfd: + + A couple of Thai references got obliqued twice. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + By popular demand, removed 'ears' from Greek Upsilon and Psi. + Copied resulting glyphs to Serif Mathematical Alphanumeric Symbols. + + * FreeSerif.sfd: + + Some pointwise cleanup of main Tamil range + + Tried some things with lookups. Didn't make much headway. + +2008-11-01 Stevan_White + * FreeMono.sfd: + + somehow made a letter with wrong width + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added similar lookups and ligatures to Thai ranges. + + * FreeSerif.sfd: + + Lookups now work no worse than those for other Thai fonts, at least + in Pango. Still perplexed by behaviour of "Required" lookups. + + For Thai, made ligatures and lookups for yoying and thothan combined + with a lower vowel. These work well. + Attempted looksups for saraaa with ru and lu, and for saraam. + Not working. + + Cleaned up a few of the Bengali ligatures + + * FreeSerifBold.sfd: + + Tweek Thai + +2008-10-31 Stevan_White + * FreeSerif.sfd: + + Fixed ligatures and mark positioning for Hanunóo. + Problem with ligatures: Gnome pango doesn't do 'rlig', only 'liga' + + * FreeSerifItalic.sfd: + + Changed lookup table scripts for Devanagari and Bengali. + Find Problems -> ATT found several problems showing lookups acting on + glyphs that weren't listed in the script ranges, including dev2, bng2 + (why not deva and beng, I don't know). + + danda and doubledanda of Devanagari I understand are to be shared among + Indic scripts. So included bng2 and dev2 in the 'aalt' table for those. + + The 'init' and 'half' tables for Bengali made active for bng2. + + The 'locl' table for Bengali didn't do anything I could see: It mapped + the Devanagari danda to itself, and the doubledanda to itself. Deleted. + + Cleaned up some kern tables. + adjustments of under 5 EM are invisible. Some others I just didn't like. + Some were putting a letter beneath another, with is wrong. + + * FreeSerifBoldItalic.sfd: + + Added Thai + + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Changes to mark positioning lookups, esp. in Italic. + Widened numerals in Bold + +2008-10-27 Stevan_White + * FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Tweeks regarding Armenian and lookups + + * FreeSansBold.sfd: + + Added Armenian ligatures FB13-FB17 with lookups + Also made a historical ligature ('hlig') table for u+0587. + + Toward bug #15183: missing characters from Armenian range + https://savannah.gnu.org/bugs/index.php?15183 + + * FreeSansOblique.sfd: + + Added Armenian ligatures, lookups. Cleaned up contours. + + * FreeSans.sfd: + + Added 5 Armenian ligatures to U+FB13 – FB17, and made corresponding + 'liga' lookup. Found there one ligature u+0587 that according to + http://en.wikipedia.org/wiki/Armenian_alphabet + + "in new orthography the և character is not a typographical ligature anymore, and must never be treated as such. It is a distinct letter and has its place in the new alphabetic sequence." + So moved this out of the 'liga' lookup and into a new 'hlig' lookup. + +2008-10-26 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Lots of improvements to Thai. + Completely revised letter spacing in Italic, and fiddled with combining + marks in all. + Still aren't working quite right, especially in Italic. + Still need to work over digits (in Bold they aren't even bold yet) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Bold Thai : added (painstakingly) constructed glyphs, lookups + roman Thai: tweeks + Italic Thai: tweeks (Note this still has multiple problems) + +2008-10-25 Stevan_White + * FreeSerif.sfd: + + WAZU says + http://www.wazu.jp/gallery/Fonts_Hanunoo.html + + MPH 2B Damase doesn't support the consonant-vowel ligatures necessary + to render Buhid writing. + + OK, so I made 'mark' lookups for combining marks and a bunch of + ligatures in an 'rlig' lookup. The latter still not working: + don't know why. + + Made page to match the example of the combining forms at + http://www.omniglot.com/writing/hanunoo.htm + +2008-10-24 Stevan_White + * FreeSerif.sfd: + + Removed some marks from Mathematical Alphanumeric Symbols + + * FreeSerif.sfd: + + Tweeked combining marks for Vietnamese. Made to satisfy + WAZU JAPAN Comprehensive Unicode Test Page for Vietnamese + http://www.wazu.jp/gallery/Test_Vietnamese.html + Could still use some tweeking... + + * FreeSerif.sfd: + + Added marks for composition of Vietnamese + + * FreeMono.sfd, FreeSerif.sfd: + + Put "below" combining mark on lots of vowels and derivatives, + for Vietnamese. + Named a bunch of composit Latin, expecting to make substitutions. + +2008-10-23 Stevan_White + * FreeSerif.sfd: + + Thai spacing alterations based on advice of a native speaker. + +2008-10-22 Stevan_White + * FreeSerif.sfd: + + re-named Thai lookups according to order + +2008-10-21 Stevan_White + * FreeSans.sfd: + + Cleanup of glyphs in Gujarati, Devanagari. + + Note: Serious problem with Sans GPOS abvm in Devanagari + "'abvm' Above Base Mark in Devanagari subtable" "gujr-0" + But all the characters that list gujr-0 are in Gujarati. + Not sure how this got broken or how to fix it. + + * FreeSerif.sfd: + + Fiddled with Thai mark positioning: passes my tests now OK. + Made a few more references in Math Symbols; more regularization of + stroke. + + * FreeSerif.sfd: + + Added mark class for Vietnamese "horn" + Several references made in General Punctuation, Arrows + + * FreeMono.sfd: + + added some Combining Diacritical Marks + +2008-10-20 Stevan_White + * FreeSerif.sfd: + + Made some references from serifed Latin capitals to Greek counterparts. + + * FreeSerif.sfd: + + Made a few repeated glyphs into references in Musical Symbols + +2008-10-19 Stevan_White + * FreeSerif.sfd: + + Moved several glypns from Mathematical Alphanumeric Symbols to + Letterlike Symbols. + Couple tweeks in Mathematical Symbols. + + * FreeMono.sfd, FreeSerif.sfd: + + Fiddling with Mathematical Symbols. + In Serif, trying to make stroke width more consistent. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd: + + Added some Greek symbols in Mono and Sans to make a little more regular + and correspond better with TeX. + Tweek of serif. + + * FreeSansBold.sfd: + + a few more improvements. + + One problem with the Mathematical Alphanumeric area is, one must + remember to change it any time another face is altered... + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerifBold.sfd: + + Several improvements and additions to Sans faces (mostly in Greek) from + experience of pasting into FreeSerif Mathematical Alphanumeric Symbols. + + * FreeSerif.sfd: + + Replaced most of Mathematical Alphanumeric Symbols + roman italic bold (latin and greek) + gothic italic bold (latin and greek) + typewriter + and numerals + with glyphs from FreeFont. These were scaled to uniform height. + + Remains: Blackboard Bold, Fraktur, Calligraphic, Script + + * FreeSerif.sfd: + + Tidied lookup table names for Malayalam + + * FreeSerif.sfd: + + Applied Malayalam patch from Hiran Venugopalan + + * FreeMono.sfd: + + Added/corrected many Mathematical Symbols + + * FreeSansOblique.sfd: + + more IPA + +2008-10-18 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made lots more IPA and Phonetic Extensions + Note: fontforge is reporting an error in a few glyphs made by scaling + another, that the glyphs are drawn in the wrong direction--only in + TrueType though. Suspect a FontForge bug. + + Added several Combining Diacritical Marks + +2008-10-17 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made several Spacing Modifier Letters, Combining Diacritical Marks, + and IPA and Phonetic Extensions + +2008-10-16 Stevan_White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added some Superscripts and Subscripts + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Finished off Superscripts and subscripts + + Completed General Punctuation for Mono faces + + Added some General Punctuation + +2008-10-15 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + more Letterlike Symbols, Currency Symbols + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made some Combining Diacritical Marks for Symbols, Letterlike Symbols + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Added some General Punctuation + +2008-10-14 Stevan_White + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added double slanted hyphen, made General Punctuaton Supplement like + Serif's + + * FreeSansBoldOblique.sfd: + + Filled out Greek Extended + + * FreeMono.sfd, FreeSerifItalic.sfd: + + fixes to last 2 commits + + * FreeSerifItalic.sfd: + + Last character to General Punctuation + + * FreeMono.sfd: + + Built some Enclosed Alphanumerics (1-10) + + * FreeSerif.sfd: + + Copied in Daniel Johnson's changes to Cherokee. + +2008-10-12 Stevan_White + * FreeSerif.sfd: + + Included Daniel Johnson's Cherokee glyphs. + +2008-10-05 Stevan_White + * FreeMono.sfd: + + Further corrections to diaresis in Cyrillic -- legibility in small sizes + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSerif.sfd: + + Regularized placement of diaresis in Cyrillic + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added same set of glyphs to Cyrillic Supplement + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added some of the easier letters from Cyrillic Supplement + +2008-10-04 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSerifItalic.sfd: + + Finished high Cyrillic range for MonoBold and MonoBoldOblique. + (Remaining: historic ranges, Cyrillic extensions) + Tweeked others. + + * FreeMonoBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif*Italic: Added last Abkhazian letters to Cyrillic + MonoBold: tweek + +2008-10-03 Stevan_White + * FreeMono.sfd, FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifBoldItalic.sfd: + + Mono: Some additions to historic letters + + * FreeSerif.sfd: + + Added some punctuation and combining numeric marks from + Cyrillic Extended B + + * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Various technical tweeks, mostly concerning recent additions. + Also did a bit more "Points too close" and "irrelevant control points". + Cyrillic millions redesign meant could not maintain use of refrences + for it. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More high Cyrillic + Included old Cyrillic millions combining mark in Sans, changed design + in Serif + +2008-10-02 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + More high Cyrillic + + * FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd: + + More high Cyrillic glyphs + + * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More glyphs in high Cyrillic. Remains only some whose form I'm unsure + of in italic. + + * FreeSerifBoldItalic.sfd: + + More glyphs in higher Cyrillic range + + * FreeSerifItalic.sfd: + + Same process of tightening el, em, ge (but a P.S. to previous commit: + also did ya, ze for SerifBold.) + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + BoldItalic: Tightened up spacing on left of el, em, ge (could go + farther, but it is partly a problem with glyph design... + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More additions to Cyrillic. Finished SerifBold except for Nivkh + additions. + Used references on number combining forms. + +2008-09-30 Stevan_White + * FreeSerif.sfd: + + Added four (obsolete) Chuvash letters to Cyrillic Supplement + - completing it. + +2008-09-29 Stevan_White + * FreeSerif.sfd: + + Greek adjustments + Adjusted spacing of kappa slightly + Got rid of ears on Psi, following similar request for Upsilon. + +2008-09-28 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Adding and fiddling with Spacing Modifiers and Combining Diacriticals + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Revisions of several Combining Diacritical marks + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + A few Combining Diacriticals and Spacing Modifiers + + MonoBoldOblique: Primarily filling out Spacing Modifier Letters + others: little fixes found along the way + +2008-09-27 Stevan_White + * FreeSerif.sfd: + + Replaced Malayalam range with that from Rachana_04 found on + Swathanthra Malayalam Computing project page + http://savannah.nongnu.org/projects/smc/ + Besides scaling and converting to cubic, performed much clean-up of + glyphs, added an r2 character, and re-named a bunch of characters. + +2008-09-22 Stevan_White + * FreeSerif.sfd: + + Filled in as much of Phonetic Extensions as I could without artistic + abilities. + Note 1D48-9 are not references due to apparent FontForge bug, that says + scaled references go in wrong direction. + + * FreeSerif.sfd: + + Cleaup of some Bengali glyphs. + Note many of the ligatures remain very very messy. + + * Makefile: + + added more validations + made to work with GenerateOpenType + + * FreeSerif.sfd: + + Built two more easy Phonetic Extensions + + * FreeSerif.sfd: + + Built some Phonetic Extensions letters, those with middle tilde + +2008-09-21 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added lots of Spacing Modifier Letters and Combining Diacritical Marks. + + * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSerif.sfd: + + Wrote script to check if glyph encodings were in stated ranges, fixed + most discrepancies. + + There were a bunch of incompletely deleted characters in several faces. + + Sans: found several other problems in the process + # Tamil + Four slots labelled 0BDA-D have glyphs, not in Unicode. also 0BE1 + I think they are misplaced; added 0010 to each of them + + # Devanagari + Slot labelled U+093B is not in Unicode--can't find glyph: deleted + likewise 094F (may have been meant to be 0954) + 0955, 0973-0976 + + 0954 should be a combining mark, but it appears on the wrong side of 0. + 0971 was just wrong--made into simple dot. + 0972 is also wrong--made my own Candra A. + + # Gujarati + Slots labelled 0AE4-5 are not in Unicode; seem not to belong at all. + Deleted. 2800 is a dup of 2790. Deleted + + Serif: phillipine_double u1736 was misplaced + + A bunch of the Math Alphanumeric symbols are empty in the standard, + because they're represented elsewhere. These should be deleted + First need to make style consistent with existing symbols. + + * FreeSerif.sfd: + + Applied patch from Daniel J + Remedies bug + FreeSerif: Missing glyphs with palatal hook + https://savannah.gnu.org/bugs/index.php?24298 + Adding several letters to Phoenetic Extensions range U+1D80-BF + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made four characters U+200C-F to be zero-width + Remedy to bug #23593: Mono 0-width chars: zero-width or space? + https://savannah.gnu.org/bugs/index.php?23593 + + * FreeSerif.sfd: + + Made Mahjong tiles to take up less space using references + Cleaned up several validation problems + +2008-09-19 Stevan_White + * FreeSerif.sfd: + + Added several Hebrew Alphabetic Presentation Forms (some easy ones), to + make its coverage the same as Serif Bold. + + * FreeSerifBold.sfd: + + Re-encoded. + Deleted several glyphs in Hebrew Alphabetic Presentation Forms that + didn't correspond valid Unicode + + * FreeMonoBold.sfd, FreeSans.sfd, FreeSerifItalic.sfd: + + Ran script to find mis-numbered glyphs. Several were simply typos, + some offset by one. + + * FreeSansOblique.sfd: + + Numerous cases of glyphs in Private Use area incorrectly assigned + Unicode numbers and names. Gave all -1 for Unicode and named like + "slot.XXXX". + + * FreeSerif.sfd: + + Adapted Mahjong Tiles from George Douros' Unicode Symbols font. + + * FreeSerif.sfd: + + Added Domino Tiles. Domino outline is copied from George Douros' + Unicode Symbols, but the rest I preferred to do with references. + +2008-09-18 Stevan_White + * FreeSerif.sfd: + + Adapted Mathematical Alphanumeric Symbols from George Douros' Unicode + Symbols font. + + * FreeMonoBoldOblique.sfd: + + This one got away from me--I don't know what I did. + Looks like some small contour edits. + + * FreeSansBoldOblique.sfd: + + Fixed one mis-numberd character in Latin Extended-B + + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Fixed several mis-numbered characters. + + * FreeSansBold.sfd: + + SansBold: one Georgian letter with no name, one Zapf Dingbat was + unnumbered + ATT test shows a bunch of problems with Gurmukhi and 'blwf' table + indeed shows those letters at 0x10000+ + Sans names them like uni0A30_uni0A4D.blwf: they are in range + ECC6 to ED06 + + I meant to move this range into Private Use in last release, and + missed it. So now it is moved, into same range as Sans. + + Both Sans and SansBold in nukt table for Gurmukhi have duplicate + entries for uni0A15 uni0A3C. Deleted dups. + + * FreeMonoOblique.sfd: + + fixed a number of Unassigned Code Points in Greek Extended + + * FreeSansOblique.sfd: + + mis-numbered Combining Diacritics + + * FreeSansOblique.sfd: + + Several chars in Latin Extended hadn't been named. + One spurious letter in Letterlike Symbols + +2008-09-16 Stevan_White + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd: + + Lots of additions: unless otherwise noted, they are from George Duros' + fonts Analecta, Music, and Unicode (haven't got final confirmation of + the eligibility of these glyphs, so this is just for testing.) + + Added some combining marks, fiddled a bit. In both Serif & Mono, tried + to get a key symbol characters to fit inside the key combining mark + + Serif + Got rid of ears on Upsilon + Added: + # Gothic + # Western & Byzantine Musical Symbols + + # Misc Symbols, Misc Technical Symbols (drew many myself) + # Supplemental Symbols and Arrows + + Mono + Added: + # lotsa Misc Technical Symbols + # OCR Symbols + # drew many Supplemental Symbols and Arrows, Misc Technical + + Sans + Added # Phoenecian + Made a few Letterlike Symbols; Made Re and Im to be sans-serif. + +2008-09-11 Stevan_White + * FreeSerif.sfd: + + Removed pointless entries from Latin kern table + + Tidied points in Sinhala + +2008-09-07 Stevan_White + * FreeSerif.sfd: + + Tidied up Tamil ligatures EEA8-EEAB to fix TT build warning + "MonotonicFindAlong: Never found our spline." + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, Makefile: + + + Added APL characters to FreeMono (why?...) + + Fixed several last-minute problems, including + + Serif: Tweeked GPOS mark table for Cyrillic + Sans: Added a GPOS table for Cyrillic (but several diacritics missing) + + Serif, Mono: tweeked some bugs in extensible brackets & integrals + + Serif: Vietnamese o circumflex: accent was a bit high. fixed. + + MonoBoldOblique OTF build + uni213b intersects self + + Generation of TT fonts complains about several things to stderr, + including: + + SerifBold: "There exists a 'fpgm' code that seems incompatible with FontForge's. Instructions generated will be of lower quality. If legacy hinting is to be scrapped, it is suggested to clear the `fpgm` and repeat autoinstructing. It will be then possible to append user's code to FontForge's 'fpgm', but due to possible future updates, it is extremely advised to use high numbers for user's functions." + Probably has been there since I first copied the TT instructions in. + Just repeated the copying process carefully, and the warning went away. + + Serif: "FindMatchingHVEdge fell into an impossible position" + fixed a bunch of point too close + + REMAINING PROBLEM in Serif TT build + "MonotonicFindAlong: Never found our spline." + fixed several bad TT matrices-- there are several more + fixed many "control points too close" no luck + +2008-09-03 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd: + + Added/corrected some Misc. Symbols by copying from Serif. + Note this is only a stopgap solution. Want real sans-serif symbols. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added minimal Miscellaneous Symbols: card suites and some musical notes. + Note not happy with shapes...some I just drew. Sans isn't really sans. + + Fixed one APL symbol in Mono so it verified in OTF version + +2008-08-31 Stevan_White + * FreeMono.sfd: + + Built set of APL symbols. + +2008-08-30 Stevan_White + * FreeSans.sfd: + + Un-linked references in uni02B2 and uni02B5, because when validating the + TrueType version, FontForge gave an error "is drawn in wrong direction". + I suspect a bug in FontForge. Other similar glyphs make no errors. + + Fixed missing extrema in TrueType. + These were the last cases being reported by validate in all the faces. + + * FreeSerifItalic.sfd: + + fixed last missing extrema in TrueType + + * Makefile: + + restructured validation to look in a directory + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd: + + Fixed missing extrema in TrueType versions + +2008-08-15 Stevan_White + * FreeSans.sfd: + + Same problem with uni0A83 as with bn_llikaar. Just made zero-width. + +2008-08-14 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd: + + Glyph bn_llikaar, U+09E3 BENGALI VOWEL SIGN VOCALIC LL, + has right bound positioned far into the negative. Causes a warning in + FontForge when opening OTF version. + Comparing with other fonts supporting Bengali, found no others that + do this. + Serif makes glyph width 0 (which sounds right according to Unicode) + and puts glyph wholly to left of 0. But, I haven't found this letter + in text anywhere. I wonder if it is really used in writing. + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Further TrueType validation fixes. + Sans still has two glyps in wrong direction. + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Fixed more TrueType problems...all missing extrema in TTF validation + +2008-08-13 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + fixed all the TrueType validation problems of type "intersects itself" + and all but two of the "wrong directions", as well as a lot of + "missing extrema". But there remain hundreds of missing extrema in the + TrueType version. + Also, bn_llikaar in Sans and Oblique still has a problem in OTF version. + + * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Made .ttf files to validate. Other faces have many more problems still. + +2008-08-12 Stevan_White + * FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Continuing to make OTF versions validate. + + * FreeMonoOblique.sfd: + lots of missing points at extrema + * FreeSerif.sfd: + 12 wrong directions, 1 missing extrema + * FreeSerifItalic.sfd: + many missing points at extrema, 1 self-intersecting + + What was wrong: in several oblique cases, an already-italic glyph was + made more italic, thereby fouling up extrema (although why it passed + validation in the SFD I don't know). Some glyphs were + overly-complicated with many near points. Cleaned up, rounded to int. + + Remaining problem: OTF FreeSansOblique FreeSans. one Bengali glyph in + each whose advance width and htmx don't match. + + Moral of story: validate the OTF and TTF versions too before a release. + + * FreeSansOblique.sfd: + + Reverse a mistake from last commit: somehow this file was converted to + quadratic, or something. + +2008-08-11 Stevan_White + * FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Found that SFD files that validated produced OpenType files that don't. + These represent the easy fixes. Some were result of conversion to + quadratic; some shouldn't have validated in the SFD... + + * MonoBoldOblique: uni0250 missing pts at extrema [reference glyph rotated...] + * Sans: uni0AC4 wrong direction [simplified, rounded to int] + * SansOblique: uni01EA wrong direction [rounded to int] + * SerifBold: uni023f wrong direction [round to int] + * SerifBoldItalic: uni0245 missing pts at extrema [ungrouped ref, added extrema] + +2008-08-06 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd: + + Re-set font metrics, which were somehow making uneven vertical spacing. + +2008-06-22 Steve White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Made to validate + + * ranges.py: + + Brought more into line with OpenType + Added some ranges + Fixed bug with ranges outside of font + + * CREDITS: + + 3 new ranges + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Cyrillic: tweeked accents for consistency, and for readability in small + sizes. + + * FreeSerif.sfd: + + Thanna range: tweeking + + Thaana range: Scaled up by about 15%, raised by 100EM, tightened + some of the diacritics to get inside 900 to -300 EM limits. + + * FreeSans.sfd: + + Added Old Persian and Ugaritic from MPH2BDamase font. + +2008-06-21 Steve White + * FreeSerif.sfd: + + Added Tai Le range adapted from MPH2BDamase font. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Added some ancient Greek numerals from Tempora to high Unicode area, + (partly just to show it can now be done.) + + * FreeSerifItalic.sfd: + + Couple of tweeks putting glyphs above -300EM. + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Surgery to Thai letter 'tho than', u+0e10, to push it above -300 EM. + This makes Thai range completely between 900 and -300 EM. + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Many auxilary characters (esp. for Malayalam, Bengla, and Tamil) + representing ligatures and alternative forms without their own Unicode, + were moved from + ranges above 0xFFFF (which ought to have been slots for other defined + Unicode ranges) into the Private Use area. + + In Serif, I segregated the scripts, in Sans it was hard to see where one + began and another ended, so I moved them en masse. + + Note several problems with wrongly-named characters: + I already re-named glyph570 and glyph582. + But there are others with names starting with A... + + * FreeSansBold.sfd, FreeSansOblique.sfd: + + Fixed (I hope the last) problem with scripts in lookups + Find Problems -> ATT (all selected) finds multiple issues, + + * FreeSansBold.sfd: + In addition to script 'guru', added 'gur2' to the scripts for these + lookups + 'nukt' Nukta forms in Gurmukhi + 'blwf' Below Base Forms in Gurmukhi + 'pstf' Post Base Forms in Gurmukhi + 'blws' Below Base Substitutions in Gurmukhi + 'abvs' Above Base Substitutions in Gurmukhi + 'psts' Post Base Substitutions in Gurmukhi + + * FreeSansOblique.sfd: + In addition to script 'beng', added 'bng2' to the scripts for the lookup + 'half' Half Forms in Bengali + + Moreover, the lookup + 'aalt' Access All Alternates in Latin + contains only Bengali letters. + Re-named as Bengali, made to work on beng, bng2 scripts + +2008-06-20 Steve White + * FreeSerif.sfd: + + Scaled Sinhala range. + Remedies bug #23656: Sinhala letters over-sized + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Mostly messing with Greek Extended accents again. + re-positioned ypogegrammani on advice of Alexey Kryukov + Put prosgegrammani beneath main letters in Mono, to make narrower glyphs + Implemented more distinction between tonos and acute. + +2008-06-19 Steve White + * FreeMonoBoldOblique.sfd: + + Completed fit of Mono to 800 to -200 EM. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd: + + Set Metrics to recommended values + + * FreeMonoOblique.sfd: + + Now Mono Oblique, as well as roman and Bold, are within 800 to -200 EM. + Just BoldOblique to go. + + * FreeMono.sfd, FreeMonoBold.sfd: + + More toward fitting to 800 to -200 EM. + Basically, reduced Georgian by 92%. + Also made an over-all offset, so Georgian is somehow centered (Bold...I + guess I already did this in roman). + Want to also do an emboldening to make stroke like rest of font, but + current FontForge has a nasty crash that loses data on this function. + + * FreeMono.sfd: + + In effort to make fit in 800 to -200 EM, + Scaled Georgian by 92%, centered on 600 wide box. + Next: Embolden a bit. + +2008-06-18 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Toward making all glyphs lie between -200 and 800 EM. + Numerous small changes, especially raising descenders of some Hebrew + letters. + Georgian remains a problem + +2008-06-13 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Moved prosgegrammeni up to baseline, + (and then moved all references down to baseline) + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added Control Picture "blank" to all faces. + Switched U+0222-3 from TemporaLGCUni + +2008-06-11 Steve White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More fiddling with Greek Extended accents + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Tweeks to accents etc in Greek Extended and Cyrillic + +2008-06-10 Steve White + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Fixed a few big horizontal spacing problems + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Implemented TemporaLCGUni glyphs in Cyrillic ranges. + Added a breve_cyrillic for the moustache breve mark. + +2008-06-08 Steve White + * FreeSerif.sfd: + + Replaced most of Cyrillic range with TemporaLGCUni. + Remodelled many of the derived Cyrillic characters after these. + Fiddled globally with spacing of small letters. + Unclear on diacritics 485-6, unhappy with breve. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Started implementing TemporaLCGUni in Greek ranges. + + Replaced 3DC-3E1 from Tempora, because I thought they looked nicer and + more like the other existing FreeFont glyphs. + Replaced 3DA-B from Tempora, because they look more like Unicode + samples, and nicer. + Added 03f3-4, 03F7-F. + Prefer my own lunate epsilon. + Replaced Phi and Omega from Tempora. + These plainly fit the other FreeFont glyphs better than the origninals. + (How did this happen?) + + In bold, replaced U+03D7 + + Copied lbbar u+2114 + + Small italic greek--replaced most except phi, psi, omega + + Based on new information, broke the identification of oxia with Latin + acute. + +2008-06-07 Steve White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Efforts to control heights of characters + +2008-06-06 Steve White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made to validate + +2008-06-05 Steve White + * FreeSans.sfd: + + Fixed undefined character in kerning classes + +2008-06-04 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + tweeks and additions to General Punctuation + +2008-06-03 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansOblique.sfd: + + Completed/tweeked Number Forms + + * FreeMono.sfd, FreeSerif.sfd: + + Added some Miscellaneous Technical symbols + +2008-06-02 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Tweeks...mostly Letterlike + +2008-06-01 Steve White + * FreeMono.sfd, FreeSerif.sfd: + + Added Box Drawing characters to Serif. + Tweeked a glyph in Mono + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added several glyphs to Letterlike Characters + +2008-05-31 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Validation pass + + SansOblique and SansBoldOblique had validation problem with BlueValues + Private Dictionary + Elements in BlueValues/OtherBlues array are disordered + Elements in BlueValues/OtherBlues array are too close + (Change BlueFuzz) + StemSnapV does not contain StdVW value. + So I ordered the array, and based on other slanted fonts, + removed StemSnapV. + + Note however, I still think the two top Blues lines are too close + But I don't even know what the second-to-top line is meant to do. + + * FreeSerif.sfd: + + Added to Block Elements, Geometric Shapes + Made to validate + +2008-05-29 Steve White + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Looking at special symbols. + Drew several Miscellaneous Symbols in Mono and Serif + > Completed/corrected planetary symbols, added Dice, + some other easy ones + > Completed Dingbats in Serif (using URW Dingbats) + Added some Block Elements to Serif + +2008-05-26 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More changes stemming from J. Poon's report. + +2008-05-25 Steve White + * FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Height surgery on SerifBoldItalic. + More fiddling with accents in others. + + * FreeSerifItalic.sfd: + + More height surgery. Only a few left in Benglai and Thai + + * FreeSerifBold.sfd: + + Re-applied surgery to make glyphs between 900 and -300EM + + *** Regression + Inadvertently un-linked all references in SerifBold in r1.83. + This reverses that error (but also un-does the surgery mentioned there) + + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Applied surgery to make Latin letters go under 900EM. + One exception yet... + +2008-05-24 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif: much fiddling with accents in Latin ranges. + Re-thought some glyphs (there are still a few messy ones, especially + in bold) + Checked horizontal spacing...fixed a number of problems. + +2008-05-23 Steve White + * FreeSansBold.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Made Latin Extended-B coverage consistent across Serif; cleaned up some + glyphs + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Filled more of General Punctuation in Sans and Serif + Made all agree on coverage of Latin Extended Additional + +2008-05-22 Steve White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Added Latin Extended Additional to SansOblique. + Made Latin Extended Additional coverage consistent across Sans, B, I + Made Latin Extended-B coverage same in SerifBold. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSansBold.sfd: + + Mono* made Latin-B coverage consistent across faces + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made set of Latin Extended-B consistent across Sans faces + + * FreeSans.sfd, FreeSansBold.sfd: + + More filling in General Punctuation + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Another bunch of J. Poon's reports + also, filling in some Combining Diacriticals, Spacing Modifiers, and + General Punctuation in bold faces + +2008-05-21 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Mucking about with mark tables in Thai (Serif) + Other faces: Making changes from J. Poon's report + +2008-05-20 Steve White + * CREDITS: + + Mark Williamson + Jacob Poon + + * Makefile: + + added tests target + +2008-05-18 Steve White + * ranges.py: + + Put table explanation back in + + Improved behaviour for high Unicode + + * FreeSans.sfd: + + Revision of kerning + + * FreeSerif.sfd: + + Made Latin kerning a little more reasonable: + reduced many excessive kerns (some had letters apparently + overlapping, which shouldn't happen) + made kerns increment by 5EM for ease of reading + got rid of kerns too small to be seen + + * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerifBold.sfd: + + Made to verify + +2008-05-13 Steve White + * FreeSerif.sfd: + + Made to validate + + * FreeSerif.sfd: + + Gurmukhi: filled range in Serif, taking glyphs from the original + Punjabi font by Hardip Singh Pannu + http://members.aol.com/hspannu/punjabi.html (file pb_win95.exe) + +2008-05-12 Steve White + * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Hebrew, basic. Some faces missing punctuation marks, added. + + * FreeMono.sfd, FreeSans.sfd: + + Armenian: Sans tried to make verticals and horizontals of more uniform + width both, finddled with punctuation + + * FreeMonoOblique.sfd: + + made to validate + + * FreeMonoBold.sfd: + + made to validate + + * FreeSans.sfd, FreeSansBold.sfd: + + Armenian in Sans: regularized letter spacing + + * FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd: + + Armenian: fill out ranges and clean up + SansBold especially had a lot of incorrect references. + Now all the ranges with Armenian at least share the same set of + characters. + + * FreeMono.sfd: + + Fixed glyph with wrong width. + +2008-05-11 Steve White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifItalic.sfd: + + 1) made to validate + 2) Mono: copied in Spacing Modifier Letters (glyphs not yet named) + 3) SerifItalic: Filled in General Punctuation + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made to validate, and pass all other FontForge tests. + Expedient: rounded everything to int + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Made to have the same Greek Symbols, + Made to validate + + * FreeSans.sfd, FreeSansBold.sfd: + + Made Greek Symbols as full as rest of Sans. Changed a name in Sans. + + * FreeMonoOblique.sfd: + + Made Greek as full as other faces + Made to validate + + * FreeSansBold.sfd: + + Deleted seven orphaned Arabic characters; looks like somebody started, + didn't get very far, putting Arabic in bold. + + Deleted orphaned Arabic glyph from Arabic Presentation forms-B + + * FreeSerifBold.sfd: + + Deleted the single Arabic character: it was clearly there by mistake. + + * FreeSansOblique.sfd: + + Made Greek Symbols as full as rest of Sans + + Tweeks to Armenian + + Comment from previous commit of FreeSans was meant for FreeSansOblique. + In FreeSans, only tweeked a few letters during putting more characters + in this face. + + Filled in Spacing Modifier Letters, increased General Punctuation. + + * FreeSans.sfd: + + Filled in Spacing Modifier Letters, increased General Punctuation + + * FreeMono.sfd: + + Made Armenian as full as other roman faces. + + Completed Spacing Modifier Letters + Added a couple of Greek Punctuation + + added more Spacing Modifier Letters + +2008-05-10 Steve White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Did same process of scaling and sizing for Thai in Sans as in Serif. + Added mark tables to Sans. Improvement, but there are questions... + + * FreeSans.sfd: + + Tidied some Gurmukhi glyphs, validated. + + Deleted ranges for Oriya, Kannada, on account of + 1) they only contained a subset of the consonant glyphs of the scripts, + few if any vowels, and had no ligature lookups as required + 2) Kannada was based on the Akurti fonts, which have copyright issues. + + See + bug #23225: Oriya range only partial + bug #23224: Kannada range only partial + + * FreeMonoBoldOblique.sfd: + + Made metrics like rest of Mono + +2008-05-09 Steve White + * ranges.py: + + More info on range intervals + + * FreeSerif.sfd: + + Deleted Telugu range. + It didn't represent a complete writing system for the language. + + See notes at https://savannah.gnu.org/bugs/index.php?23202 + Serif: Telugu range missing many characters; many wrong + + Got a copy of the original Tikkana font, + Copied in remaining consonants and vowels that I could find there. + I think one vowel 0C55 is missing according to unicode). + Strangely, the Telugu digits are alo missing. + In Tikkana, the default "checkmark" structural mark is missing from many + consonants, according to Unicode, but is a separate glyph. I put + the checkmark on. + This, and scaled up by 150% and cleaned up intersecting glyphs and + many unnecessary points. + +2008-05-08 Steve White + * FreeSerif.sfd: + + Filled out Telugu consonants. + Vowels still need to be done + +2008-05-07 Steve White + * FreeSerif.sfd: + + Operated on Latin glyphs with stacked accents to make them fit under + 900EM. + Scaled Telugu bu 150%. + +2008-05-06 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeSansBold.sfd, FreeSerif.sfd: + + Corrected further fontforge "find problems" + Added some math characters to FreeSerif + +2008-05-05 Steve White + * FreeSansBold.sfd: + + Made to validate, and fixed bad TT transformations + +2008-05-04 Steve White + * FreeMono.sfd, FreeSerif.sfd: + + Mainly TeX additions trying to satisfy Markus Kuhn's TeX-as-Unicode page + + * FreeMono.sfd: + + Adjusted heights of extensible brackets + + Fixed problems with extensible brackets, thanks to Markus Kuhn's page + http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt + + * ranges.py: + + fiddled with ranges, doc + + made some ranges more correct? + + fixed some bugs in ranges + better error reporting + + Got rid of Unicode 1.1 references + + made to use OpenType table + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd: + + made to validate + +2008-05-03 Steve White + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Removed digits from Private Use Area. + See bug 23050. + + * FreeMono.sfd, FreeSans.sfd: + + Completed General Punctuation + + * FreeSans.sfd: + + Completed IPA Extensions + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd: + + More work on Superscripts and Subscripts, Spacing Modifiers. + Sans is now complete in both. + Added Pfennig to Sans and Mono. + + * ranges.py: + + Restructure text output + Rearrangement and cosmetic ...except I had broken it. now fixed + Seems to be in a useful form at this point. + More docs, date + + * FreeSerif.sfd: + + Added a hand-drawn old German Pfennig to Currency Symbols + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Further additions to General Punctuation, Super and Sub Scripts, + Spacing Modifiers, etc. + +2008-05-02 Steve White + * FreeSans.sfd: + + additions to Spacing Modifiers, IPA + + * FreeSerifItalic.sfd: + + Shortening stacked accents to maintain readability when clipped + +2008-05-01 Steve White + * FreeSans.sfd: + + Additions to Spacing Modifiers and changes to Combining Diacritics + + * FreeSerif.sfd: + + Made sure all the half rings in Combining Diacriticals and Spacing + Modifiers were really half rings (J. Poon had complained about this) + + Filled out General Punctuation + Some work on Spacing Modifiers + + Filled out Mathematical Operators + still needs lots of work + Made to validate + + Filled out Latin Extended B + Added some letters with curls to Latin Extended B + More fiddling with Latin Extended B accents + +2008-04-30 Steve White + * FreeSerif.sfd: + + Added Hanunóo script, with characters based on those in + font MPH2BDamase, on request from the maintainer of that font, + http://packages.debian.org/sid/ttf-mph-2b-damase + + Glyphs are simple vector strokes. Could be a little more uniform. + + Added Buginese script "Lontara", with characters based on those in + font MPH2BDamase, on request from the maintainer of that font, + http://packages.debian.org/sid/ttf-mph-2b-damase + + Note the glyphs are pretty rough, clearly a digitization of handwriting. + I just cleaned them up, and corrected discrepancies with Unicode, + and compared with some pictorial samples of the script I could find. + +2008-04-29 Steve White + * ranges.py: + + Improved look a lot--still unhappy with some ranges + OS/2 seems sometimes bang-on, sometimes unrelated to anything (including + fontforge's OS/2 listing) + + * FreeSerif.sfd: + + Much fiddling with Tamil range. + First scaled to 78% (avoiding the references) + This gets it in the ballpark height-wise. [A bit taller than the Latin + letters, but the stroke is narrower, but then the glyphs are busier.] + Then had to re-align combined references, the trickiest being the + halants. + Checked with other fonts with Tamil text. + +2008-04-28 Steve White + * FreeSans.sfd, FreeSerif.sfd: + + Cleanup of control points in Arabic and Thaana + + * FreeSerif.sfd: + + Cleanup of missing extrema in Arabic and Thaana + + Many changes to Thai, trying to make the script fit between some lines, + so accents won't get clipped, etc. + Also, stroke weight was heavier than that of Latin. + + Scaled whole thing by 93%. + Shrank the tallest letters 0E42-4 to get them under 900EM. + Shaved off top of maiek. + Fiddled with positioning of all accents. + Made positioning tables for accents. + Note: unclear these are working correctly + + Fixed a bug having to do with character replacements for characters + named 'ng' and 'nj'; these names had been taken on by other characters. + + Made to validate + + Unicode positions of two Cyrillic Extended characters were switched. + Fiddled with a couple of Cyrillic combining diacritics + +2008-04-27 Steve White + * FreeSans.sfd: + + bugfix: a left harpoon mysteriously appeared to the left of letter p! + +2008-04-26 Steve White + * FreeMono.sfd: + + Made to validate + + * FreeSans.sfd: + + Made to validate + + Toward J. Poons report + Made 032B more like proper double-arches (and distinct fro 033C seagull) + Made 032b more like a seagull + + * FreeSans.sfd, FreeSansBold.sfd: + + Sans: fiddling with widths and terminators of math symbols, + toward J. Poon's report + R & B: removed u+2741 because it didn't match the Unicode description + + * FreeMono.sfd: + + Extensible parenthesis symbols weight/terminators + Toward bug # 23064: https://savannah.gnu.org/bugs/index.php?23064 + Rounded a bunch of terminators + +2008-04-22 Steve White + * FreeSerif.sfd: + + Small alignment problem in Greek Extended + + One more tweek to spacing in Cyrillic Extended + + Corrected spacing in Cyrillic Supplement + + Added Cyrillic Supplement letters for + Enets, Khanty, Chukchi, Itelmen, Mordvin, Kurdish, Aleut + + Added Cyrillic letters for Nivkh (completing Cyrillic range) + More tightening of accents in Latin Extended. + + * FreeSans.sfd: + + Fiddled with math--consequences of changing the "similar" operator + + More tightening of accents + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjustments to h and k with caron and cedilla in Latin A and B + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd: + + FreeSerifBold: deleted 3 dotted Hebrew letters in Private/Corporate use + (E801-3). They weren't ligatures or in any other lookup, and they + weren't present in FreeSerif. + + * FreeSansBold: + Unlinked and deleted F6C3, which called itself commaaccent. + Made some new spacing and non-spacing accents to make up for it. + + * FreeSansBoldOblique: + Made references of many Latin Extended. + Also corrected several wrong ones. + + * Freeserif: + Re-named commaaccent + +2008-04-21 Steve White + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd: + + Deleted Hiragana and Katakana ranges, as discussed on bugs list. + Cleaned up some encoding issues, unnamed glyphs + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Roman: added 'sine' -- not beautiful, but I liked drawing it + All: Made special lookup for Dutch ligatures 'IJ' and 'ij' + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Roman: ffi etc Latin ligatures from 'liga' to 'dlig' (these weren't + really ligatures anyway, and only looked very bad when used. + Retain for condensed type. + Others: deleted Latin 'liga' table altogether + BoldOblique : added j to ij ligature + + Toward J. Poon's Report: + Except for issues of terminators not always vertical or horizontal, + and a few things that were too hard or I was unsure of. + +2008-04-20 Steve White + * FreeSerif.sfd: + + Futzing with accents in Latin Extended Additional and Latin Extended-B + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Added primemod character, referenced by Greek number sign + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Following J. Poon's report, disconnected NJ (01CA) + +2008-04-19 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + First pass throught J. Poon's bug list. + See bug reports for details. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made underscore slanted in Oblique faces, made all to be width of + space character. + Towards J. Poon's report. + Disturbed that xterm and some other apps put small space between + characters when none was called for. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSansOblique.sfd: + + Corrections on Currency Symbols + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More corrections, additions to Currency Symbols + + * FreeSans.sfd, FreeSerif.sfd: + + Filled out and corrected Currency Symbols + +2008-04-18 Steve White + * FreeSans.sfd, FreeSerif.sfd: + + Adjustments to Combining Marks for Symbols + Additions to range in Sans, and re-structured its marks table so that + "middle" can apply to any range + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Made reference between combining koronis and lenis of Greek Extended. + In Serif, re-worked combining marks lookup tables, added anchors in + Latin, moved so without marks they work in kedit (but now I'm doubting + kedit does a reasonable thing...what is a better application for + testing this?) + +2008-04-16 Steve White + * FreeSerifItalic.sfd: + + Adjusting of spacing and accents in Greek + + * FreeMono.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd: + + Much futzing with Greek letter spacing and accents. + Added lenis to FreeMono. + + * FreeMono.sfd, FreeSerif.sfd: + + Adjusted spacing of dots of Greek dieresistonons in Serif + Whipped up something for Greek kappascript in Mono (could use revision) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Raised dots on double-dotted Cyrillic i, to match that of i and j. + +2008-04-14 Steve White + * FreeMono.sfd: + + Corrected 27e6-7 "white bracket" + Note it is probably a FontForge bug these symbols aren't showing up. + FontForge thinks they are in Supplemental Arrows, but they should be + in Supplemental Math-A + + Named some Greek characters + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Spacing of some Cyrillic characters + +2008-04-13 Steve White + * FreeSerif.sfd: + + Some fiddling with accents + 'yogh' was too wide + + * FreeSansBold.sfd, FreeSansOblique.sfd: + + Character spacing was chaos--tried to improve. BoldOblique also needs + it. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Completed the fix of bug #12798, Greek glyphs with accents to side + Much mucking with accents here, and fixed a few things that were just + wrong. + +2008-04-12 Steve White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made Mono curly quotes "bent" + + * FreeMono.sfd: + + More fiddling with Greek accents + Made quotes "bent" + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjustments on Greek diaresistonos etc. + Adjustments in Serif on combining marks for symbols + + * FreeSerif.sfd: + + More additions to Combining marks for Symbols + + Additions to Combining marks for Symbols -- now mostly full. + Lots of adjustments to middle anchor point in Latin to make big circle + (nearly) encircle preceding latter + +2008-04-11 Steve White + * FreeMono.sfd: + + Bugfix: + Had indroduce a glyph of width other than 600, making kterminal not + recognize it as a monospace font. + +2008-04-10 Steve White + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More messing with accents. + Further to bug #12798, Greek glyphs with accents to side + Much messing with glyphs in Greek Extended range + +2008-04-09 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerif.sfd: + + Revisited Latin-1 and Latin-A accents. + Glyph B7 was called "periodcentered", but Unicode callse it Mid Dot, + and the description doesn't refer to the period. I made it like the + dot accent. throughout, and referred L-dot to it. + + Also double-checked "commaaccent" characters (some in Unicode called + cedilla, but the Unicode example shows a comma...mystery) + + Also the funny IPA upside-down f often had two bars, incorrectly. + + To do: go through rest of Serif, and Sans + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Completed re-structuring of stacked Latin accents in Mono. + Also: lots of associated adjustments of Greek Extended accents. + (Trying to at least center extremely wide characters on their box) + Repaired some victems of "find overlaps" sweeps + Worked on glyphs with apostrope/comma parts + Corrected a few wrong glyphs. + + Trying out a "bent quotes" solution to making primes distinct from + quotes. + +2008-04-08 Steve White + * FreeMonoOblique.sfd: + + Toward reducing overall height + Did similar process as for Mono, fixing a few errors along the way. + Also the Greek Extended range was very messed up vertical and + horizontally. + Horizonal spacing of the heavily accented Greek is a real problem in + Mono... + To do: + revisit "commaaccent" characters in all faces: do some have + edillas? + some Hebrew glyphs are a little low + Georgian generally is way out of bounds + +2008-04-07 Steve White + * INSTALL: + + Various updates and corrections, tweeked formatting + + * FreeMonoBold.sfd: + + Tweeking of accents + +2008-04-06 Steve White + * FreeMono.sfd, FreeMonoBold.sfd: + + Re-worked accents in FreeMonoBold.sfd to make Latin ranges lie between + 800 and -200 EM, as with FreeMono. + + * FreeMono.sfd: + + Latin Extended ranges: Implemented new policy of shortening the letters + of the characters with the highest-stacked accents. + + At this point all the Latin glyphs lie betweeen 800 and -200 EM. + + Also checked for readability of all the Latin extended letters in xterm. + (Issue: it chops letters outside their bounding boxes; many accents had + been a bit outside. Made sure that if they were chopped, they were at + least still recognizable.) + +2008-04-05 Steve White + * FreeMono.sfd: + + Following exchange about Mono on freefont-bugs with Joe Wells, who + > doesn't like the curly quote marks + > wants combining diacritics to work + > wants tight line spacing + + Trying to reduce font height: + > exclamdown was below -200 + > Throughout Extended Greek, ypogegrammeni were too low. Shortened + glyph, and raised all references. + > Lots of messing with Latin Extended ranges to make glyphs mostly + fit into 800 height. Mostly succeeded. A couple will get chopped. + > Messed with "commaaccent" glyphs, which were very low + > Cyrillic 04B1 had a tail that was incorrectly low + > Much mucking with Georgian range. Moved up by 95 (read that Georgian + is written as though centered between two horizontal lines, rather than + as sitting on a baseline) There are still a few very high glyphs. + + FontForge U+0122 called Gcommaaccent, glyph looks like that, but + Unicode says it's Gcedilla. Made the ones called cedilla by Unicode + to be cedillas + + Note bug in Unicode: standard for 0122, 0123, 0136, 0137, 013B, 013C, + 0145, 0146, 0156, 0157 all talk about cedilla, say to make it with + cedilla, but example shows comma. + + By the way: + > Got rid of commaaccent and dotlessj in Corporate Use + > Replaced shadedark, with little squares now not overlapping. + > Corrected IPA symbol 'ts' 02A6, added 02a8, 02a9, 02aa, 02ab, 02ac, + 02ad, 02ae, 02af + + (so many changes...the CVS server was down...) + + * FreeSerif.sfd: + + Re-named arabic and hebrew characters + Big adjustment to comma-accents. Mostly effects Greek Extended. + Made such accents to be like comma, rather than like Russian apostrophe + (and de-referenced that symbol) + +2008-04-04 Steve White + * FreeMono.sfd, FreeSerif.sfd: + + Raised dot on superscript i (2071) -- more distinct at small sizes + + * FreeMono.sfd: + + added two IPA symbols + +2008-04-02 Steve White + * FreeSerif.sfd: + + fixed a few more control points too close + + Fixed names of languages in ligature table for latn "w/i". + This fixes a crash when FontForge opened the ttf table + + Motivated by bug crashing FontForge when opening ttf file, + started cleanup of useless control points. Not finished. + Got partway through Sinhala + +2008-03-31 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Fixed various "Find Problems", including glyphs with mixed-up names, + and bad TT matrices. (lots more bad TT matrices remain) + + * FreeSerif.sfd: + + Re-named a bunch of Cyrillic letters + + * FreeSerif.sfd: + + Put above mark on Cyrillic i and double-dot i for Slavonic number forms + +2008-03-30 Steve White + * FreeSans.sfd: + + Tightened spacing on glyphs of last commit + + * FreeSans.sfd, FreeSerif.sfd: + + Concerning bug #16120, Include upper case Wynn and upper case Yogh + Adapted Herman Miller's Thyromanes letters 01F7 021C 021D for Serif + Drew my own versions for Sans. + + * FreeSerif.sfd: + + Added 04F6,7 + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Made more Cyrillic diacritics really combine. + Made a mark lookup just for Cyrillic diacritics, + Marked most of the unadorned Cyrillic alphabet. + + Still not clear on correct shapes for some of the marks. + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Tweeks to accents + +2008-03-29 Steve White + * FreeSans.sfd, FreeSerifItalic.sfd: + + Small adjustments in Cyrillic + + * FreeSerif.sfd: + + Corrected small palochka + Made Cyrillic combining hundred-thousands and millions really combine + Named some combining diacriticals + + * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Mostly adjusted horizontal spacing of mono oblique faces + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More cleanup of Cyrillic ranges + + Completely re-did horizontal spacing of SerifItalic and SerifBoldItalic. + See bug #17912, poor kerning in Cyrillic oblique... + https://savannah.gnu.org/bugs/index.php?17912 + It looked like chaos to me. + Only so much can be done: the font is flawed. + But I think the changes make text readable in these faces. + + There were dozens of incorrect glyphs in higher-numbered characters. + I deleted all those I found. No glyph is better than a wrong glyph. + + Futzt with accents, shooting for consistency and readability. + + A maintenance thing: making correct references (acyrillic vs a, + although they may be the same glyph) I made a lot of headway, but + it isn't finished. + + Likewise, a large fraction of these are compound characters, which can + be made with references, resulting in easier maintenance, reduced + likelihood of errors, and smaller files. I replaced many. + + * FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic italic + Added italic, bolditalic + 0493, 04a7, 04AD + because their form clearly varies in italic. But was just guessing... + + * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic italic + + Added italic, bolditalic + 0493, 04AD + because their form clearly varies in italic. + But was just guessing as to exact form. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Overhaul of Cyrillic + + Italic, BoldItalic + added small yat for bug #22588 (note Times New Roman doesn't use + alternate form in Italic) + + All forms of Serif have big problems in Cyrillic. + + The ugliest is in roman. The letters, even of the Russian alphabet, are + of inconsistent height (awfully, small 0438 (ii) 0446 (tse)) + and they vary from the height of Latin + and they vary from the height of italic and bold. + They are a mish-mash of letters from several fonts, of similar (but not + quite identical) weight, and similar, (but not quite identical) size. + + I think the best solution would be to identify the face that best + matches Latin, and fill the range with that. I think this is possible + because the rarer letters seem to be better: the common letters are the + ones that are wrong. + + For now, I just increased the sized of 0438 and 0446, and 048a, 048b, + also 0459 (lje) 045A (nje) 0464 (dje) + + Other issues + +2008-03-27 Steve White + * FreeSerifBoldItalic.sfd: + + Moving all Greek capitals with accent so they don't cover previous + letter. Remedies bug #12798 + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Various tweeks to accented Latin letters. + Connected O-ogonek correctly + + * FreeSerifItalic.sfd: + + Accents of numerous accented Latin letters got shifted in a previous + commit. This fixes it. + + * FreeSerif.sfd: + + Adjusted combining tack left and right (0318-0319) to be above -300 EM. + + * FreeSans.sfd, FreeSerif.sfd: + + Added some "middle" marks for positioning of diacritics + + * FreeSans.sfd: + + Copied 4 enclosing combining diacriticals from Serif 20DD - 20E0 + + * FreeSerif.sfd: + + Adjusted and added some enclosing diacritics 20DD - 20E0 + In response to Debian bug #472566 + ttf-freefont: U+20DD COMBINING ENCOLSING CIRCLE doesn't combine + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472566 + +2008-03-26 Steve White + * FreeSerif.sfd: + + Lowered a few over-high Latin accents + + * FreeSansBold: + + Devangari--only digits 1 and 2, and nothing else. Deleted + + * FreeMonoBold, FreeMonoOblique, + FreeSerifBold, FreeSeriftalic, FreeSerifBoldItalic, + FreeSansOblique, FreeSansBold, FreeSansBoldOblique: + + Got rid of dotlessj, comma in Corporate Use + Single Substitution lookup, ccmp table + Made proper dotlessj, re-linked j-circumflex + + Note: + FreeSansBold has a commaaccent in Corporate Use, used by several other + characers. Haven't done anything about this. + +2008-03-25 Steve White + * FreeSerif.sfd: + + Added/corrected glyphs for yeh hamza in Arabic, + Added init and medi lookups for yeh hamza. + +2008-03-24 Steve White + * FreeSerif.sfd: + + Added isolated and final forms for + 0629 teh marbuta + 0624 waw hamza + 0626 yeh hamza + 0649 alef maksura + A previous commit had added lookups that referred to these, + + More fiddling with super/subscripts + + * Makefile, Makefile, GenerateTrueType: + + Scripts and Make targets to generate OpenType fonts and zip file + + * maintenance.txt: + + Added gnupload and info about tagging + +2008-03-23 Steve White + * FreeSerif.sfd: + + Last of Find Problems -> ATT + 'mark' Latin lookup: afii10026 is in 'cyrl', also afii10074 + Upper and lower Cyrillic i. Just removed mark from both letters. + + 'half' Bengali lookup Khanda_Ta is in 'bng2'. Added bng2 to lookup + Added TtTable etc + + Clean-up of Points too Close through to end of font. + This episode completes the paths/points clean-up of Serif. + But note: many ranges, esp. Ethiopic, Japanese, and Indic, have way + too many points, resulting in lumpiness. + + At this point, FontForge can convert splines to quadratic, auto-hint, + and auto-instrument without segfault. + + * Makefile, sfd/Makefile, tools/GenerateTrueType: + + Alterations to build process: added a Makefile, and made to work + on my system. Now auto-hints before generating TrueType. + +2008-03-22 Steve White + * sfd/FreeSans.sfd: + Lots of additions of math characters. Should complete for + LaTeX 2e, except for extensible brackets. + +2008-03-21 Steve White + * *.sfd: + + Regularized stacking of accents in Latin Extended Additional + Changed name of 00B5 from 'mu' to 'micro', + 2206 from 'Delta' to 'Delta.math', + 0308 from 'diaerisis' to 'diaerisiscomb' + + * FreeMono.sfd: + + additions to IPA + + * FreeMonoBoldOblique.sfd: + + Moved dotlessj from Corporate Use, + Deleted commaaccent there + Fixed mis-named glyphs tcommaaccent, Tcommaaccent + Changed name of 030A from 'dieresis' to 'ringcomb' + + * FreeSans.sfd: + + Added some arrows, and a couple of blackboard bold characters + + Several characters in U+F600 Corporate Use range + dotlessj, onefitted, commaaccent + + dotlessj referred to by: jcircumflex, uni01F0: + renamed it to uFFFF, re-linked others by hand + + commaaccent + http://diacritics.typo.cz/index.php?id=9 + should be u+0326 but wasn't linked to anything + + * FreeSansBold.sfd: + + U+0617 etc: read glyphs "4GWglm". It should be Arabic. Deleted + + * FreeSansBold.sfd, FreeSansOblique.sfd, FreeSansBoldOblique.sfd: + + Removed bogus glyphs for 200C 200D, ZWJ and ZWNJ + + * FreeSerif.sfd: + + Split lookup for ligatures in latin into two classes; + ff, ffl, fl which are appropriate for all languages, + and fi, ffi, which are not appropriate in Turkish (due to distinction + between short and long i) + Needs to be done for other faces. + + Filled set of extensible brackets in Miscellaneous Technical + + Think IPA is now complete. + +2008-03-18 Steve White + * FreeSans.sfd: + + clean-up of all path issues and points too close + +2008-03-18 Steve White + * FreeSans.sfd: + + Something was causing crashing effects in Windows. Cleanup of + problems eventually made it go away. Now works well. + + Cleaned up many "points too close" + + Cleaned up all ATT problems, of which there were many and various. + + # Incorrectly labelled zero-width joiner used in a ligature + + # Incorrect substitution of dotlessi and dotlessj with i and j was + somehow connected with FontForge crash. Attemts to remove the + substitution would damage a 'ccmp' table; subsequent changes would + result in FontForge crashing on save, and truncating the sfd file. + Surgically removed with vi. + + # A couple of Indic lookups had incorrect script DFLT; one had 'latn'. + + # Don't understand why there are scripts named + dev2 bng2 grj2 gur2 when there are already deva beng gurj guru + But anyway, lots of 'vatu' 'pres' 'haln' and 'liga' lookups contained + characters in the '2' scripts but were lablled only for the 'non-2' + ones. Added the '2' scripts to all these lookups. Suspect a mistake. + + Note: several of these problems are repeated in other Sans faces. + +2008-03-16 Steve White + * FreeMono.sfd: + + Cleanup of many path problems "points too close" + + Strove to make accents Latin Extended range legible at small sizes + + Named some unnamed characters; removed a duplicate + + At this point, all fonts are passing FontForge Validate. + +2008-03-15 Steve White + * FreeSerif.sfd: + + CJK punctuation: made some of the very high glyphs smaller (under 900EM) + The brackets in Sans were very ugly, and not even Sans-serif. + Serif: added extensible square brackets, diddled with integral + corrected direction of some added glyphs + + Several bugs having to do with missing glyphs in Tamil range. + Also a buggy ligature in Devangari. + + Shortened names of many lookup tables + + Futzt with some combining diacriticals + + Added extensible square brackets. + + * FreeSans.sfd: + + Changed names of a bunch of glyphs with invalid + TrueType names, in range 0x1025f+ (not real Unicode). + Took pains to retain information contained in the names. + Wonder if these glyphs have ever been of any use. + + CJK Punctuation: brackets were hand-drawn and very ugly. Improved. + + * *.sfd: + + Set OS/2 Metrics back to absolute 900/300. Offsets are not + interpreted uniformly. + + Cleanup of many path problems up to extrema and self-intersecting + + Ordered PS Blue values. + +2008-03-14 Steve White + * FreeSerif.sfd: + + Got rid of mixed references and contours + Cleanup of many path problems "points too close" + + Started clean-up to satisfy FontForge Validate + + Changed names of three glyphs in the + Tamil ligatures range...all clearly bugs. + + * FreeSans.sfd: + + Added slanted-hyphen + + * *.sfd: + + Unified OS/2 Metrics + Added Grid Fit + +2008-03-13 Steve White + * FreeSans.sfd: + + Rearranged PS BluesValues so they were in increasing order, + Made all 20 in width. + +2008-03-12 Steve White + * FreeSans.sfd, FreeMono.sfd: + + Added TrueType hinting tables. + Fixed glyphs that didn't convert well to quadratics + Got rid of mixed contours and refs + + * FreeSerifBold.sfd: + + Cleanup of path problems + +2008-03-11 Steve White + * FreeMonoOblique.sfd: + + Cleanup of path problems + +2008-03-09 Steve White + * FreeSerif.sfd: + + Corrected L-dot + Further cleanup of path/ref problems + + Found several ligatures that referred to a missing glyph "ZWJ". + Took this to mean the "zero width joiner" u+200D + + * *.sfd: + + Changed OS/2 metrics to be absolute 900/300 + + * FreeSerifItalic.sfd: + + Added Greek lunate epsilon + + * FreeMono.sfd: + + Many additions in math range + Reduced size of binary union, intersection, vee, wedge + Corrected empty set + Corrected logical 'assert' relations, etc. 22a2-22af + Efforts to make Math glyphs legible at small point sizes + + * FreeSans.sfd: + + Added Greek lunate epsilon and rho symbol + Unstacked more stacked diacriticals + + Further cleanup of path/reference problems + +2008-03-08 Steve White + * FreeSans.sfd, FreeSerif.sfd: + + Added some "n-ary" Math operators + + * FreeSerif.sfd: + + Further clean-up of path problems...up to Ethiopic + > Started adding and correcting Math operators for LaTeX 2e + > Corrected n-ary union, intersection, and spikes to be larger + than the binary operators + > Made (many of) the operators based on + - = to use those + symbols directly (by reference or copying). + > Added lunate epsilon + > Corrected empty set + > Tightened up spacing of some other technical characters + > Worked on some more math operators involving = + > triangle + > Several arrows + > Supplemental Arrows-A + + * FreeSans.sfd: + + Clean-up of font paths + Open self-intersecting outermost-clockwise missing-extrema + also flipped references (unlinked) + + Added Greek lunate epsilon and rho symbol + +2008-03-06 Steve White + * sfd/FreeSerif.sfd: Shortened and thickened the combining hook mark, + U+0309, to make more like Unicode samples. + Also see (bug #22499) un-stacked incorrectly stacked accents + +2008-03-05 Steve White + * sfd/FreeSerif.sfd: vertical lines: combining diacritical marks + corrected 0300 030D 0329 0348 (were rendered as straight apostrophes) + Spacing Modifier letters added 02C8 02CC + 02B9 02Ba prime and double-prime + Fixed positioning U+1EC8, 9, I with hook above + +2008-03-03 Steve White + * sfd/FreeSerif.sfd: TT strings updates. + updated Copyright to 2008 + Added Vendor URL as the Savannah freefont site + * sfd/FreeMono.sfd: A standard pangram as the Sample Text for Russian + It reads: In the thickets of the South once there was a citrus + ...--yes, but a fake specimen! + * sfd/*.sfd: Set the OS/2 Sup/Sub settings, which by default looked + like random trash. + +2008-03-02 Steve White + * sfd/FreeSerif.sfd: began cleanup of problems given by FontForge + "Find Problems" feature. (bug #22454) + +2008-03-01 Steve White + * sfd/FreeSerif.sfd: made Arabic work for text display (bug #22329) + Added required contextual replacement tables, + Made a few missing characters, + * sfd/*.sfd: Removde all back layers from glyphs that had them. + +2008-02-27 Steve White + * sfd/FreeSans.sfd: filled in Combining Diacriticals + * sfd/FreeSerif.sfd: shifted whole Arabic range down by 200EM. + +2008-02-26 Steve White + * sfd/FreeSerif.sfd: enabled DPOS table. + +2008-02-24 Steve White + * sfd/*.sfd: Much fiddling with the "combining diacriticals" + range 0300-036F. Made to align with medium-size lowercase + preceding character if not using DPOS table. + +2008-02-23 Steve White + * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug #21784) Filled + in set of HTML 4 Character Entities. + + * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug #18413) + undertie too low -- went on to tidy other similar characters in + Combining Diacriticals range. + +2008-02-21 Steve White + * sfd/*.sfd: Moved capital Greek letters with tonos so tonos doesn't + cover preceding letter (bug #12798) + + * sfd/FreeSerif.sfd, FreeSans.sfd: (bug #13370) made extended + integrals to line up. + +2008-02-20 Steve White + * sfd/*.sfd: started removing glyphs with back layers (printing bug) + * sfd/*.sfd: adjusted vulgar fractions (bug #17756) + * sfd/*.sfd: adjusted numerical superscripts (bug #20278) + +2008-02-18 Steve White + * sfd/FreeSerif.sfd: Offset Hiragana and Katakana ranges (bug #22326) + * sfd/FreeSerif.sfd: U+30FB, KATAKANA MIDDLE DOT to be full width + (bug #18326) + + * sfd/FreeSerif.sfd: Re-promoted + ff ffi ffl fi fl + as standard ligatures in Latin. + +2008-02-17 Steve White + * sfd/*.sfd: committed to FontForge Spline Font Database (SFD) 2 + format. + +2008-02-10 Steve White + * sfd/*.sfd: brought into line with Debian ttf-freefont + Deleted a couple of patches, and applied those applied to Debian. + +2006-09-20 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * INSTALL: added installation procedure for MacOS X, courtesy + Philipp Kempgen. + +2006-05-04 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd: deleted Russian sample text, which did not + conform to UTF-7. + +2006-04-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd: corrected U+10D3. + + * sfd/FreeSans.sfd: ligature U+FB06 (LATIN SMALL LIGATURE S T) + changed from mandatory ("liga") to discretionary ("dlig") (bug + #16253). + + * sfd/FreeMono.sfd: deleted incomplete glyph U+FB06 (LATIN SMALL + LIGATURE S T); deleted U+FB00, U+FB01, U+FB02, U+FB05 as + ligatures (bug #16253). + + * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBoldOblique.sfd: added + U+FB00; deleted U+FB01, U+FB02 as ligatures (bug #16253). + + * sfd/FreeMonoBold.sfd: deleted U+FB00, U+FB01, U+FB02 as + ligatures (bug #16253). + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd: added Georgian letters, donated by + Gia Shervashidze + +2006-02-22 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd: ligature U+FB4F + changed from mandatory ("liga") to discretionary ("dlig"). This is + respons to Bug#349657: [bug #15792] Freefont Alef and Lamed + combine + +2006-02-21 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd, + sfd/FreeSansBold.sfd: ligature U+FB4F changed from mandatory + ("liga") to discretionary ("dlig"). This is respons to Bug#349657: + [bug #15792] Freefont Alef and Lamed combine + + * sfd/FreeSerif.sfd: corrected bug#275759: [bug #15790] FreeSerif + glyphs for U+2198/U+2199 were reversed. + +2006-02-15 Denis Jacquerye <moyogo@gmail.com> + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: removed ij + and IJ ligatures. + +2006-02-10 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd: added small Georgian letters (mkhedruli), + donated by Gia Shervashidze + + * AUTHORS: Added Gia Shervashidze + + * CREDITS: Added Gia Shervashidze + +2006-01-26 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * notes/maintenance.txt: Added information on the Makefile now + used; username for FTP login is anonymous. + + * sfd/FreeSansBold.sfd: added U+0569, U+0571, U+0579, U+057B, + U+0586. Armenian small letters completed. + + * sfd/FreeSerif.sfd: added U+0297, U+02AD-02AF. IPA Extensions + section is now complete. Copied a dozen of glyphs from Omega IPA + to Phonetic Extension section. + +2006-01-25 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: added U+01A, U+01A3, U+01A6, U+01B2, U+01BA, + U+01BB, U+01BE, U+01BF. + + * sfd/FreeSans.sfd: aligned small Armenian letters to x-height in + response to bug #15480. Armenian in Free Sans needs a major + cleanup. + +2006-01-24 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd: changed U+0452, U+045B. Cleanup: U+0460, + U+0461, U+04Bc, U+04BD, U+0508. + + * sfd/FreeSansOblique.sfd: replaced accented chars in Latin-1 and + Latin Extended-B sections with references, where possible. + + * sfd/FreeSerif.sfd: changed U+0285. + +2006-01-23 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: added U+0195, U+01AA, U+0297, U+03D7, + U+03F0. Several flipped references replaced by outlines. + + * sfd/FreeSansOblique.sfd: Latin Extended-B section more or less + brought in sync with FreeSans. + + * sfd/FreeMonoBoldOblique.sfd: added glyphs from FreeMonoBold in + the Latin Extended-B and IPA Extensions sections. + + * sfd/FreeSerifBold.sfd: Added U+0224, U+0225. Changed U+01B7, + U+01B8, U+04E0, U+0452, U+045B. Replaced accented characters in + the Cyrillic region with references. + +2006-01-21 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: added U+0255, U+0264, U+0277, U+0286, + U+029D. Changed U+0261. Deleted spurious glyphs in the control + code area. + +2006-01-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: replaced Hardip Pannu Singh's Gurmukhi with + AnmolUni by Kulbir Singh Thind. + +2006-01-17 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd: Added U+018D, U+0194, U+01B5, U+01B6, + U+01BE, U+0262, U+02A2. + + * sfd/FreeSansBold.sfd: Changed U+0261 in order to distinguish it + from U+0067. Changed U+0251, U+0252. + + * sfd/FreeSerifBold.sfd: Small changes in the Cyrillic + section. Added U+0183, U+018C. + + * sfd/FreeSans.sfd: Added U+2045, U+2046. + + * sfd/FreeSansBold.sfd: Filled in the Gurkmukhi part with the + AnmolUni-Bold by Kulbir Singh Thind. Also some minor corrections + in the Cyrillic part. + + * CREDITS: Added Kulbir Singh Thind. + + * AUTHORS: Added Kulbir Singh Thind. + +2006-01-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd: Thomas Ridgeway's Tamil characters replaced + by the ones released by the Samyak font project. + + * CREDITS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao + and Sandeep Shedmake + + * AUTHORS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao + and Sandeep Shedmake + +2006-01-08 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd, sfd/FreeMonoBoldOblique.sfd: minor changes. + +2006-01-05 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd: added cedi sign U+20B5, Ghanaian + currency + +2005-12-29 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: minor cleanup in the Gujarati part. + +2005-12-22 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: Devanagari and Gujarati parts cleared; once + again merged with Gargi 1.9 and Padmaa 0.6, this time correctly so + that the anchor points survived the merger. + +2005-12-16 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: added U+0577. + +2005-12-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: added U+0559, U+055F, U+2024. + + * sfd/FreeSansBold.sfd: added U+056E, U+0573. + +2005-12-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: Merged with Gargi 1.9 and Padmaa 0.6, + courtesy Monika Shah and Sonali Sonania from C-DAC, Mumbai. + + * CREDITS: Added Monika Shah and Sonali Sonania. + + * AUTHORS: Added Monika Shah and Sonali Sonania. + +2005-12-13 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Removed Sinhala glyphs. + + * sfd/FreeSerif.sfd - Added Sinhala glyphs, formerly in FreeSans. + +2005-12-09 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd: added U+20AF, U+211E. Changed U+20AC (EURO + SIGN). + + * tools/freefont-ttf.spec: Added specification file for building + RPM package, courtesy Rok Papez. + + * sfd/FreeSerifBold.sfd: added more glyphs from Txfonts to the + Arrows and Mathematical Symbols ranges. + + * sfd/FreeSerifBoldItalic.sfd: added U+03F5 from Txfonts. + +2005-12-08 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: added U+0567, U+056A, U+056C, U+0582. + + * sfd/FreeSerifBold.sfd: copied Box Drawing range from FreeSans. + + * sfd/FreeSerifBold.sfd: added glyphs from Txfonts to the Arrows + and Mathematical Symbols ranges. + + * sfd/FreeSerif.sfd: added U+2259-225A, U+22BA, U+2308-230B, + U+2322-2323. Cyrillic composite characters replaced with + references. + +2005-12-07 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd: added U+025A, U+025D, U+026B, U+029B, + U+02AE, U+02AF, U+02DE. + + * sfd/FreeSerifBold.sfd: updated Hebrew part with Drugulin font + from the Culmus project. + + * sfd/FreeSerif.sfd: added U+207A-207C, U+208A-208C, U+2215-2216. + + * sfd/FreeSans.sfd: added U+2320 TOP HALF INTEGRAL, U+23AE + INTEGRAL EXTENSION, U+2321 BOTTOM HALF INTEGRAL (bug #13370). + +2005-12-07 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd: added U+0294-0296, U+02A1-02A2. Started + adding "below" anchors. Performed hinting on characters that were + not hinted "en masse". + +2005-12-06 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: fixed some more metrics problems in the + Extended Greek area; performed hinting on characters that were not + hinted "en masse". + + * Makefile: clean also signature files. + + * sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: cosmetic + changes; cleaning background of referenced composed characters. + +2005-12-05 Panayotis Katsaloulis <panayotis@panayotis.com> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd: Some changes to the greek glyphs, + mostly having to do with "tonos" (accent) + +2005-12-05 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: minor cosmetic changes. + + * sfd/FreeSans.sfd: adjusted widths of characters in the Extended + Greek range; accents are not any more considerably overhanging on + the left side. Added U+1EDA-1EE3, U+1EE8-1EF1. + + * sfd/FreeSans.sfd: continued working on Extended Greek range; + metrics still not finished. + +2005-12-03 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd: fixed combined Greek accents (bug + #12800). Width of characters still need to be adjusted as in + FreeSerif. + + * sfd/FreeSerif.sfd: fixed positions of Greek accents (bug #12798). + + * CREDITS: Added Panayotis Katsaloulis. + + * AUTHORS: Added Panayotis Katsaloulis. + + * Makefile: minor changes; now creating also a tarfile with sfds. + +2005-12-01 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifItalic.sfd: added U+0183, U+018C, U+01C0, U+01C1, + U+01C3, U+01E0, U+01E1, U+01F8, U+01F9. + + * Makefile: created a Makefile to assist building. + + * README: an update. + + * COPYING: added GNU General Public License, version 2. + + * tools/GenerateTrueType: wrote a FontForge script for conversion + to TrueType. + + * sfd/FreeSerif.sfd: merged with SolaimanLipi Bangla OpenType font + from www.ekushey.org, courtesy Solaiman Karim. + + * sfd/FreeSerifItalic.sfd: merged with SolaimanLipi Bangla + OpenType font from www.ekushey.org, slanted by 15.5 degrees. + + * sfd/FreeSans.sfd: merged with Rupali Bangla OpenType font from + www.ekushey.org + + * sfd/FreeSansOblique.sfd: merged with Rupali Bangla OpenType font from + www.ekushey.org, slanted by 12 degrees. + + * CREDITS: added Solaiman Karim + + * AUTHORS: added Solaiman Karim + +2005-11-30 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd: merged with the Rachana Normal. + + * AUTHORS: added K.H. Hussain and R. Chitrajan + + * CREDITS: added K.H. Hussain and R. Chitrajan + +2005-11-23 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - cleaned some background images. + + * sfd/FreeSans.sfd - added U+01A0-01A1, U+01AF-01B0, U+026E, + U+028F, U+0291, U+02A3-02A5, U+031B. Modified U+0198. + +2005-11-22 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - added U+2504-250B. + + * sfd/FreeSans.sfd - added U+2591-25A1, U+25A3-25A5, U+25AA, U+25AC. + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - added U+0263. + +2005-11-21 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - corrected positions of some Greek diacritics + on page 0x1F. + + * sfd/FreeMonoOblique.sfd - working on bringing it in sync with + FreeMono.sfd. + + * sfd/FreeSerifBoldItalic.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Added a couple of + glyphs in the IPA Extensions region. + + * sfd/FreeSansBold.sfd - added U+0574, U+0576. Removed overlaps. + +2005-11-20 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - added U+02AA-02AC, U+02B0-02B2. + +2005-11-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - added U+01B7-01B9, U+0196, U+019A, U+01C3, + U+0224-0225, U+025E, U+029A, U+2422. Changed U+0184-0185, U+0192, + U+01B4, U+0282, U+0284. + +2005-11-18 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - added U+02EE, U+207F. + + * sfd/FreeSans.sfd - started Box Drawing area. + +2005-11-17 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd - added glyphs from the Omega project to + Latin Extended-B, IPA Extensions and Greek ranges. + + * sfd/FreeSerifBoldItalic.sfd - added glyphs from the Omega + project to Latin Extended-B, IPA Extensions and Greek ranges. + + * sfd/FreeSerifItalic.sfd - added glyphs from the Omega + project to Latin Extended-B, IPA Extensions and Greek ranges. + + * sfd/FreeSerifItalic.sfd - added U+018B, U+025C, U+0265, U+026F, + U+0279, U+0287, U+028C-028E, U+029E. + + * sfd/FreeSerifBoldItalic.sfd - added U+1EDA-1EE3, U+1EE8-1EF1, + U+2190-219B, U+219E-21A8, U+21B9-21BA, U+21C4-21CA, U+21E4-21E5, + U+2669-266F. MES-1 compliant. + + * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - added U+FFFD. + + * sfd/FreeSerif.sfd - removed overlaps in Latin Extended-B and IPA + Extensions ranges. + +2005-11-16 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifItalic.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. + + * sfd/papers/eurotex2003/freefont.tex, + sfd/papers/eurotex2003/freefont.bib - Revised version, sent back + by Karl Berry on 20050110, that should match the one published in + TUGboat. + + * sfd/FreeSerifItalic.sfd - started added accent anchors. Added a + handful of Greek letters from Omega font collection. + + * sfd/FreeSerif.sfd - added a handful of letters in the Latin + Extended-B and IPA Extension ranges from the Omega font collection. + +2005-11-16 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeSerif.sfd - moved U+0263 to U+0264; added U+0263 + + * sfd/FreeSerifItalic.sfd - fixe U+01EE; added U+01B7-U+01B9 + +2005-11-16 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Made small Greek letters the same height as + Latin and Cyrillic ones and replaced them with references, where + applicable. + + * sfd/FreeSerif.sfd - replaced Greek letters with references, + where applicable. Added U+03D7, U+03F0-03F2. + + * sfd/FreeSerif.sfd - added U+0255, U+025A, U+025D, U+025F, + U+0262-0263, U+026B-026C, U+0274, U+0276-0277, U+028F, U+0291, + U+029D. + + * sfd/FreeMonoOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Added U+F6BE. + + * sfd/FreeSansOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. + + * sfd/FreeSans.sfd - changed U+01A5. + +2005-11-16 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - applied the sequence suggested by Werner + Lemberg for reducing redundant points. Replaced accented glyphs in + the Latin-1 and Latin Extended-A areas with references. Made + capital Greek letters the same height as Latin and Cyrillic ones + and replaced them with references, where applicable. + +2005-11-15 Denis Jacquerye <moyog@gmail.com> + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSansOblique.sfd - fixed + U+026A, it was a dotlessi and therefore like U+0069 when + accented. + +2005-11-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoBold.sfd - corrected Greek tonos (slanted instead of + a vertical line). + + * sfd/FreeMonoBoldOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Replaced accented + glyphs in the Latin-1 and Latin Extended-A areas with references. + +2005-11-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Added 2005 in copyright info. + + * sfd/FreeSansBoldOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Replaced accented + glyphs in the Latin-1 area with references. + + * sfd/FreeSansBoldOblique.sfd - added U+0180, U+0184, U+0185, + U+0195, U+01A0-01A2, U+01AF-01B0, U+025E, U+026E, U+0292, + U+0294-0296, U+029A, U+02A1, U+2126-2127, U+2190-219B, + U+219E-21A8, U+21C4-21CA, U+2669-266F. MES-1 compliant. + + * sfd/FreeMono.sfd - Replaced accented glyphs in the Greek and + Cyrillic areas with references. + + * sfd/FreeMonoBold.sfd - applied the sequence suggested by Werner + Lemberg for reducing redundant points. Replaced accented glyphs in + the Latin-1 and Latin Extended-A areas with references. + +2005-11-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - applied the sequence suggested by Werner + Lemberg for reducing redundant points. + + * sfd/FreeSansBold.sfd - added U+219A, U+219B, U+2669-266F. + + * sfd/FreeSerifBold.sfd - added U+2669-266F. + +2005-11-12 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - added U+0180, U+0181, U+0183, U+0187, + U+0188, U+018A, U+018C, U+018D, U+0193, U+019C, U+01A0, U+01A1, + U+01AC, U+01AF, U+01B0, U+025C, U+0260, U+026E, U+0277, U+0281, + U+0284. + +2005-11-11 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - added U+195, U+1A6, U+025E, U+026E, + U+029A, U+0313, U+0314, U+0342, U+0344, U+0345. Started adding + accent anchors. + + * sfd/FreeMono.sfd - applied the sequence for reducing redundant + points, suggested by Werner Lemberg. + + * sfd/FreeMono.sfd - corrected Greek letters (using tonos instead + of a vertical line). Added U+026E, U+F6BE. Accented characters in + Latin 1, Latin Extended A and partly Latin Extended B replaced by + references. + + * sfd/FreeSerifBold.sfd - applied the sequence for reducing + redundant points, suggested by Werner Lemberg. Added U+01A5, + U+02A0, U+2190-219B, U+219E-21A8, U+21B8, U+21B9, U+21C4-21CA, + U+21E4, U+21E5. + +2005-11-10 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansOblique - changed U+0192, U+01A5; added U+01C0-01C3. + + * sfd/FreeSansBold.sfd - replaced glyphs with references in the + Cyrillic area. Removed U+04A8, U+04A9. Added U+04C5, U+04C6, + U+04C9, U+04CA, U+04CD, U+04CE, U+0535, U+053F, U+0546, U+0565, + U+0584, U+0587, U+0589. + +2005-11-10 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeSans.sfd - added U+028A-U+028B + + * sfd/FreeSansOblique - added U+028A-U+028B, U+0276, + U+0292, U+0294-U+0296, U+0298-U+0299 and U+029B; fixed some + other glyphs + +2005-11-10 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - added U+01A6. Simplified outlines in the + ASCII range. + + * sfd/FreeSansBold.sfd - added U+00A0, U+00AD, U+0531, U+2126, + U+2190-2199, U+219E-21A8, U+21C4-21CA. + + * sfd/FreeSansBold.sfd - applied the sequence for reducing + redundant points, suggested by Werner Lemberg. Added automatically + constructed accented characters in page 0x1E. + +2005-11-09 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - added U+0183, U+018C. + + * sfd/FreeSans.sfd - added U+1EA2, U+1EA3, U+1EA8, U+1EA9, U+1EB2, + U+1EB3, U+1EBA, U+1EBB, U+1EC2, U+1EC3, U+1EC8, U+1EC9, U+1ECE, + U+1ECF, U+1ED4, U+1ED5, U+1EE6, U+1EE7, U+1EF6, U+1EF7, U+220A, + U+220B, U+220D, U+2272, U+2273, U+2282, U+2283. + + * sfd/FreeSerifItalic.sfd - changed U+03D5. + + * sfd/FreeSerifBoldItalic.sfd - changed U+03C6; added U+2070, + U+2075-2079, U+207F, U+2080, U+2085-2089, U+2155-217F. + + * sfd/FreeSerif.sfd - added U+0184, U+0185, U+018D, U+0195, + U+0197, U+019A, U+019B, U+01A0, U+01A1, U+01AC, U+01B5, U+01B6, + U+01C0, U+01C1, U+01C3, U+01F6, U+0294-0296, U+1E9A, U+1EDA-1EE3, + U+1EE8-1EF1. + +2005-11-07 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - added U+0562, U+056D. U+0575. + + * sfd/FreeMono.sfd - added U+0589. + +2005-11-06 Primoz Peterlin <peterlin@localhost.localdomain> + + * sfd/FreeSans.sfd - added U+0278, U+03D5, U+2248. Corrected + U+2071, U+222E, U+2242, U+2243 in response to bug reports + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276118 + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276120 + + * sfd/FreeMono.sfd - added U+2227, U+2228, U+2262. Corrected + U+2299-229D in response to bug report + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276121 + + * sfd/FreeMonoBold.sfd - added U+2010, U+2012 in response to bug + report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289032 + Swapped U+03C6 (Greek small letter phi) and U+03D5 (Greek phi + symbol) in order to conform to Unicode standard. Simplified glyph + shapes in ASCII range. Started adding "above" and "below" anchors. + +2005-11-05 Primoz Peterlin <peterlin@localhost.localdomain> + + * sfd/FreeSerif.sfd - accented letters in Latin Extended-A + replaced by references wherever possible. + + * sfd/FreeSerif.sfd - added U+0180, U+0181, U+0187, U+0188, + U+018A, U+0193, U+019C, U+01A4, U+01A5, U+01A7, U+01A8, U+01AF, + U+01B0, U+026E, U+0270, U+0278, U+0280, U+0281, U+028B, U+0299, + U+029C, U+029F. + +2005-11-03 Primoz Peterlin <peterlin@localhost.localdomain> + + * sfd/FreeSansBold.sfd - added U+0180, U+0184, U+0185, U+0192, + U+019B, U+01A0-01A2, U+01AF, U+01B0, U+01EE, U+01EF, U+0292, + U+0294-0296, U+02A1, U+0532, U+054C, U+057C, U+222B. Changed + U+014B, U+01A5, U+01B4, U+03BB. + + * sfd/FreeSans.sfd - added U+04C5, U+04C6, U+04C9, U+04CA, U+04D, + U+04CE. + + * sfd/FreeSansBold.sfd - cleaner Arabic outlines. Added U+01E4, + U+01E5. + +2005-11-02 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - started Armenian; added U+0538, U+0542, + U+0544, U+0548, U+054D, U+054F, U+0550, U+0553, U+0555, U+0561, + U+0563, U+0564, U+0566, U+0568 U+056B, U+056F, U+0570, U+0572, + U+0578, U+057A, U+057D-057F, U+0580, U+0581, U+0583, U+0585. + + * sfd/FreeMono.sfd - swapped U+03C6 (Greek small letter phi) and + U+03D5 (Greek phi symbol) in order to conform to Unicode standard. + Added U+04C5, U+04C6, U+04C9, U+04CA, U+04D, U+04CE. + +2005-11-01 Primoz Peterlin <peterlin@localhost.localdomain> + + * sfd/FreeSansBold.sfd - modified U+019C. + + * sfd/FreeSansBoldOblique.sfd - added U+00A0, U+00AD, U+019C, + U+01B7, U+01B8, U+0275, U+0278, U+0298, U+2012, U+2015, + U+2070-207F, U+2080-208E, U+2153-217F, U+2213, U+2215. + +2005-10-31 Primoz Peterlin <peterlin@localhost.localdomain> + + * sfd/FreeSerif.sfd - added U+0199, U+01AB, U+0265, U+0282, + U+0288, U+028C-028E, U+0290, U+029E, U+02A0. + +2005-10-28 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd - added U+019E, U+01AB, U+01AD, U+01B1, + U+0256, U+025F, U+0265, U+0269, U+026F, U+0270, U+0279-027F, + U+0282, U+0287, U+0288, U+028C-028E, U+0290. + + * sfd/FreeSerifBold.sfd - added U+2070, U+2075-2079, U+2080, + U+2085-2089, U+2153-215E, U+2113-2115, U+2119. + + * sfd/FreeSerifBold.sfd - added U+0199, U+019B, U+01B8, U+01B9, + U+01BE, U+01C0, U+0262, U+0274, U+0278, U+0280, U+028F, U+0298, + U+0299, U+029C, U+029E, U+029F, U+2012, U+2015, U+2016, U+2129, + U+2217. + +2005-10-27 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - added U+018D, U+0194, U+019B, U+019C, U+01B5, + U+01B6, U+0295, U+0296, U+029B, U+02A2, U+0472, U+0473, U+2114, + U+2119. + + * sfd/FreeSerifItalic.sfd - minor cleanup in the superscript range + (U+2070-2079). + + * sfd/FreeSansBold.sfd - added subscripts and superscripts + (U+2070-208F), completed fractions (U+2152-215F) and Roman + numerals (U+2160-217F). + + * sfd/FreeSerifBold.sfd - added U+018B, U+018E, U+018F, U+0191, + U+019D, U+01A7, U+01A8, U+01AE, U+0253, U+0266, U+0267, U+026A, + U+0271-0273, U+0283, U+0285. + +2005-10-26 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - added "above" anchors to selected Cyrillic + characters. Added U+0294, U+02A1. + + * sfd/FreeMono.sfd - added U+2011, U+2012, U+203B, U+204A, U+2071, + U+2129, U+2232, U+2233. Changed and/or corrected U+2106, U+211E, + U+2126, U+2127, U+2153-215F, U+2202. + + * sfd/FreeMono.sfd - a try to imitate Denis' work on adding + anchors by adding "above" anchor to a couple of basic Latin + characters. + + * sfd/FreeSansBold.sfd - added U+0278, U+0298. Cleaned up outlines + of most Greek letters. + + * sfd/FreeSansBold.sfd - Added U+2010-2012, U+2015, U+2032, + U+203C, U+2047-2049. + + * sfd/FreeSans.sfd - Added U+01C0-01C2, U+0276, U+0292, + U+0298. Changed U+0251, U+0294, U+02A1. + +2005-10-25 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifItalic.sfd - added U+00A0, U+00AD, U+2010-2012, + U+2015, U+2126, U+2127, U+2153-215E, U+2160-217F, U+2190-2193, + U+2669-266F. FreeSerifItalic is now MES-1 compliant. + + * sfd/FreeSerif.sfd - added U+0191, U+019D, U+01AE, U+027E, + U+027F, U+0283, U+0285. + + * sfd/FreeSerif.sfd - added U+019E, U+01AD, U+01B8, U+01B9, + U+0253, U+0256, U+0257, U+025C, U+0260, U+0266, U+0267, U+0269, + U+026D, U+0271-0273, U+0279-027D. + + * sfd/FreeSerifBoldItalic.sfd - added U+00A0, U+00AD, U+2010-2012, + U+2015, U+2032-2034, U+203C, U+2047-204A, U+2074, U+2081-2084, + U+2126, U+2153, U+2154, U+215F, U+2215. Corrected positions of + diacritics on U+0200-0217. + + * sfd/FreeSansOblique.sfd, sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBoldOblique.sfd, + sfd/FreeMonoBold.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd sfd/FreeSerifBoldItalic.sfd - brought in + sync with Valek Filipov's urw-fonts-1.0.7pre41. + + * sfd/FreeSansOblique.sfd - added U+00A0, U+2011-2012, U+2015, + U+2070, U+2071, U+2074-2079, U+2080-2089, U+2126, U+2153-215F, + U+2190-2195, U+2215, U+266A. FreeSansOblique is now MES-1 + compliant. + +2005-10-24 Denis Jacquerye <moyogo@altern.org> + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - added + ccmp for i and j to be substituted with dotless i or j when + followed by above diacritic + +2005-10-24 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - added U+2011, U+2012, U+2015. FreeSans is now + MES-1 conformant. + +2005-10-23 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeSans.sfd - added above, below, abovemk and belowmk + anchors for diacritics placement to many Basic Latin characters, + some Latin Extented A and B, and some IPA characters; fixed a + couple of precomposed characters to have diacritics at the same + height as similar characters. + +2005-10-21 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - added U+02B9, U+02BA, U+02CD, U+2017, + U+2036, U+2037, U+203C, U+203E, U+2047-204A. + +2005-10-20 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd - added U+0182, U+0189, U+0192, U+019F, + U+01A9, U+01B7, U+01C4-01CC, U+01E0-1E2, U+01F0-01F3, U+F6BE. + Corrected position of diacritics on U+0200-0217. + + * sfd/FreeSerif.sfd - added U+00A0, U+00AD, U+0182, U+0189, + U+018B, U+018E, U+018F, U+0192, U+019F, U+01A9, U+01B1, U+01B7, + U+01DD, U+2010-2013, U+2015. FreeSerif is now MES-1 conformant. + +2005-10-19 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeSerif.sfd - added U+0268, U+026A, U+0289, U+0292; and + anchor "above" to more base glyphs. + + * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBoldItalic.sfd - added U+0250-0252, U+0258-0259, + U+0261, U+0268, U+026A, U+0279, U+0289 + + * sfd/FreeSerifBold.sfd - added anchor "above" to marks + U+0300-0314, and to base glyphs (vowels). + +2005-10-18 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeSerif.sfd - added anchor "above" to marks U+0300-0314, + and bases vowel of the U+0041-007A range, U+00E6, U+0186, U+0190, + U+0254 and U+025B; fixed Latin-1 Supplement block accented glyphs + to use references. + +2005-10-17 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - added U+01B7, U+01B8, U+0275. + +2005-10-16 Denis Jacquerye <moyogo@gmail.com> + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added some Latin + Extended-B African letters: U+0181, U+018A, U+0197-0198, U+01A4, + U+01AC, U+01B1, U+01B3-01B4; + + * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added Latin + Extended-B U+0187, 018E-018F, U+0191, U+0193, U+0197-0199, + U+019D-019F, U+01AB-01AE; correcting width of non-space + Combining Diacrtical Marks; added more glyphs to IPA Extensions + to match non Bold + + * sfd/FreeSansBoldOblique.sfd - added many accented glyphs to + Latin Extended-B + +2005-10-15 Denis Jacquerye <moyogo@gmail.com> + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added IPA Extensions + U+0262,U+0274,U+0280-0281, U+0299, U+029F, and Spacing Modifier + Letters U+02C9-02CB; fixed U+0287,029E height to baseline; added + stroke to U+0268 + + * sfd/FreeSansOblique.sfd - fixed skew on U+027F + + * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added to Latin + Extended-B U+01A7-01A8, IPA Extensions U+0251-0253, U+0256-0257, + U+0261, U+0265-026A, U+026F-0273, U+0289, U+028C-028E + + * sfd/FreeSansBoldOblique.sfd - added to Latin extended-B U+0189, + U+01A8, U+01B1, U+0283, U+02C9 and Spacing Modifiers U+02C9-02CB + +2005-10-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - Added a couple of composite glyphs, + mostly in the IPA and Latin Extended B ranges. + +2005-10-13 Denis Jacquerye <moyogo@gmail.com> + + * FreeSans.sfd - removed overlap and simplified U+0187, 0191, + 0193, 01A5, 01AE, 0260, 0271, 0272, 0273, 027B; fixed diacritics + placement on U+0200-0217; fixed glyph for U+0283 to correct esh + without stroke; added U+025F and fixed U+025F from it; fixed + height of glyph at U+0285; arranged U+027E,027F to make more + distinguishable from U+0072. + + * FreeSansOblique.sfd - added the corrected or new glyphs from + FreeSans; diacritics on U+200-0217 will need height readjustements. + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd - added U+0186, 0190, + 0250, 0254, 0258, 0259, 025B, 025C + +2005-10-13 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Minor changes: U+22A2, U+22A3, U+22A6, U+23AE. + Added U+0250, U+0251, U+0258, U+0259, U+0275. + + * sfd/FreeSerifItalic.sfd - Added glyphs U+222B-U+222F, U+2320, + U+2321. Fixed diacritics on U+0200-U+0217. + +2005-10-12 Denis Jacquerye <moyogo@gmail.com> + + * sfd/FreeSerif.sfd - Corrected diacritics position on + U+01D5-01D9,01DB,01EA-01ED,0200-0217 and U+022A. + + * sfd/FreeSerif.sfd, sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBoldItalic.sfd - added U+0186,0190,0254 and U+025B. + +2005-10-11 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Fixed bug #13399 (glyphs for U+0360 and + U+0361 were swapped). + + * sfd/FreeSerif.sfd - Attempt to correct bug #13370: INTEGRAL + EXTENSION does not align with TOP/BOTTOM HALF INTEGRAL; added + glyph U+23AE. + +2005-05-16 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Corrected shapes for Cross of Lorraine and + Cross of Jerusalem. + +2005-04-07 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSansBold.sfd - Added some combining accents, just to + test the a version of FontForge. + +2003-12-05 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Some composite Latin characters rebuilt, as + they had accents 600 points to the left due to changes on October + 2. Some other minor changes in the mathematics area. + +2003-10-08 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoOblique.sfd, sfd/FreeSerifBoldItalic.sfd, + FreeSerifItalic.sfd - applied Josef Segur's corrections from + Oct. 5. + +2003-10-02 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Abbas Izad's contributed Arabic/Farsi + characters added. + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Combining characters (U+0300 - + U+036F) moved left, so that they have negative horizontal values + and zero advance width. + +2003-09-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd - Started working + on super- and subscripts. + +2003-09-12 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd, sfd/FreeSerif.sfd - Added some missing + Hiragana and Katakana characters. + + * sfd/FreeSansBold.sfd - Cleared background characters in Latin + Extended-A. Added some automatically constructed characters in + Latin Extended-B. Started with superscripts and subscripts. + + * sfd/FreeSans.sfd - Subscript numerals (U+2080-U+2089) completed. + +2003-05-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Thai characters po pla and bo baimai + swapped; Thai character fongman corrected; all courtesy Theppitak + Karoonboonyanan. + +2003-05-17 Panayotis Katsaloulis <panayotis@panayotis.com> + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - Full support + of all ancient greek glyphs + +2003-05-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * tools/KerningNumerals.pl - A Perl script for moving kerning + information from ASCII numerals (U+0030...) to characters in the + Adobe corporate use area (U+F6xx). + + * sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBoldOblique.sfd - Created kerned numerals in the Adobe + corporate use area (U+F6xx) and moved kerning information from + ASCII numerals to the kerned numerals. + +2003-05-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - First approximation of super- and subscript + numerals and vulgar fractions. + + * sfd/FreeSerif.sfd - Super- and subscript numerals complete, + vulgar fractions completed and redone as references rather than + outlines. + +2003-05-12 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Clean-up of the Cyrillic letters added on + March 27; super- and subscripts, vulgar fractions. + +2003-05-09 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoBold.sfd - Added a couple of characters to + the Latin Extended-B area and the IPA extensions area. + +2003-05-08 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifBoldItalic.sfd - Added a couple of characters to + the Latin Extended-B area. + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - ASCII + numerals now monospaced; kerned numerals moved to Adobe corporate + use area + (U+F6xx). + +2003-05-07 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Roman numerals now more complete. + + * sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - Accented + characters added in the Latin Extended-B area. + + * sfd/FreeSans.sfd - Greek accents added in the Greek Extended + area, characters added in the Latin Extended-B area, Roman + numerals added. + + * sfd/FreeMonoOblique.sfd - Kerning pairs removed (what were they + doing in a monospaced font, anyway?). + + * sfd/FreeMonoBoldOblique.sfd - Additions in Latin Extended-B and + Basic Greek. + + * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBoldOblique.sfd - Major cleanup (fixed widths, open + paths, path directions (clockwise/counter-clockwise), points + rounded to integer values; outlines simplified etc.) + +2003-05-06 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * tools/OS2UnicodeRange - A simple script to display OS/2 Unicode + range table in TrueType fonts. + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - ASCII numerals now + monospaced; kerned numerals moved to Adobe corporate use area + (U+F6xx). FreeSans is done, FreeSansBold half-way. + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Added 2003 in copyright info. + +2003-03-27 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Cyrillic and Cyrillic Supplement blocks + brought to conformance with Unicode 3.2, courtesy Daniel Shurovich + Chirkov. + +2003-03-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - somewhat wider + germandbls (U+00DF), due to complaints by Walter Schmidt. + +2003-03-18 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Added Sinhala glyphs from the Tipitaka + project <http://www.metta.lk>, recoded to Unicode by Noah Levitt. + +2003-02-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Minor changes on mathematical operators. + +2003-02-18 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - minor cleanup of glyph backgrounds; changed + integral signs (U+222B - U+2230) + +2003-02-05 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - added a couple of glyphs in the IPA and + African Latin ranges. + +2003-01-30 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd - Corrected Maltese Hbar (U+0126) + and/or hbar (U+0127). + +2003-01-28 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerifItalic.sfd - Corrected Maltese hbar (U+0127). + +2002-12-18 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * tools/ConvertFont - PfaEdit script for converting SFD files to + TrueType fonts. + + * sfd/FreeSans.sfd - Added Tamil and Kannada glyphs from the + Akruti Indic fonts. + +2002-12-17 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Added Devanagari and Gujarati glyphs from the + Akruti Indic fonts. + + * www/index.html - Added information on Rogier van Dalen's tools. + + * AUTHORS - Added M.S. Sridhar. + + * CREDITS - Correct spelling of Culmus project. Added M.S. Sridhar. + +2002-12-06 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Added Braille glyphs, courtesy Vyacheslav + Dikonov. + + * sfd/FreeSans.sfd - Added Unicode Syriac glyphs, courtesy + Vyacheslav Dikonov. + +2002-10-11 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * www/index.html - Added information on the availability of the + Debian GNU/Linux package. + + * sfd/FreeSerif.sfd, sfd/FreeSans.sfd - added some kern pairs + beyond Latin-1 area. + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - re-introduced + all the emtpy glyph slots (changes from Sep 23 made PfaEdit + crash). + +2002-09-23 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - imported + kerning information from the URW++ AFM files + +2002-09-11 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoOblique.sfd - updated Hebrew parts to comply with + Culmus v0.6. + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansOblique.sfd - Added Danilo Segan's Serbian Cyrillic + glyphs; updated Hebrew parts to comply with Culmus v0.6. + +2002-09-09 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansOblique.sfd - Updated Cyrillic part to match + Filippov's 1.0.7pre14 + + * sfd/FreeSansOblique.sfd - added Sam Stepanyan's Armenian glyphs + from FreeSans (skewed for 12 degrees). + +2002-09-06 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd - Added Maxim + Iorsh's Hebrew characters. + +2002-08-29 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, + sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd - Added Maxim + Iorsh's Hebrew characters. + + * AUTHORS, CREDITS - Added Maxim Iorsh as author. + +2002-08-28 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * www/index.html - Added information of Microsoft's withdrawal of + freely available Unicode TrueType fonts + + * www/resources.html - Added link to Maxim Iorsh's Culmus project. + +2002-07-26 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Added a couple of characters (Arrows area). + +2002-06-11 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning + perispomeni in Greek politoniko. + +2002-05-23 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning + psili in Greek politoniko. Also added two working variants of + chars in the IPA range. + +2002-05-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifBold.sfd - Deleted explicit ".notdef" character with + no contours. + +2002-05-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - The new version of PfaEdit saves + correctly formed Panose and LineGap lines. + + * sfd/FreeSansBoldOblique.sfd - Filled-in the missing TTFWidth and + TTFWeight values. + +2002-05-09 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Added diacritics to the Spacing Modifier + Letters and Combining Diacritical Marks areas. Added composed + glyphs to the Latin Extended-B area. + +2002-05-07 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Updated Panose information with data + provided by Josef W. Segur. Updated TTF headers with English and + Slovenian text. + +2002-04-30 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoBold.sfd - Working on Greek small letters. Several + minor changes (lower carons etc.) + +2002-04-29 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * FreeMonoBoldOblique.sfd - Started adding Greek. + + * sfd/FreeMonoBold.sfd - Added glyphs in the Geometrical Shapes + and Miscellaneous Symbols area. Harmonizing Greek with Latin. Done + with capitals. + + * sfd/FreeMono.sfd - Deleted the explicit .notdef character. Added + one glyph to the Geometrical Shapes area, which is now completed; + added three glyphs to the Miscellaneous Symbols area. Harmonizing + Greek with Latin. Done with the capitals. + +2002-04-26 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - Adjusted accent positions on several glyphs + in the Latin Extended-A area. + +2002-04-25 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoBold.sfd - Box Drawing area completed. Added a + couple of glyphs in the Geometrical Shapes area. + + * sfd/FreeMono.sfd - Small corrections in the Box Drawing area. + +2002-04-24 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Box Drawing area completed. + +2002-04-23 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * tools/WGL4.lst - corrected. + + * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Box Drawing + area. + +2002-04-22 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Latin + Extended-B and Greek. + +2002-04-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Somewhat cleaner chess figures. + + * tools/MES-2.txt, tools/MES-2.lst - Corrected list (it is not + 203C-203E, it is 203C and 203E). + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Changed "Family Name" from Free to + FreeSerif, FreeSans and FreeMono, as appropriate. Changed Font + Modifiers from MonoBold etc. to Bold, Italic, Oblique, BoldOblique + and BoldItalic. + +2002-04-18 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd - Corrected metrics; now all character + widths are set to 600. + +2002-04-17 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Corrected glyphs in the Box Drawing area and + Block Elements area, which should extend through the ascender *and + descender* height. + + * sfd/FreeMonoBold.sfd - Continued working on harmonizing Greek + letters with Latin and Cyrillic. + + * sfd/FreeMonoBold.sfd - Added some box drawing characters. + +2002-04-16 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * www/design-notes.html - Updated notes on stroke width for + symbols in Free Mono Bold. + + * sfd/FreeMono.sfd - Added a handful of characters in the + Miscellaneous Symbols area. + + * sfd/FreeMonoBoldOblique.sfd - Added subscripts, superscripts and + vulgar fractions. + + * sfd/FreeMonoBold.sfd - Started harmonizing Greek letters with + Latin and Cyrillic. + + * sfd/FreeMonoBold.sfd - Added subscripts, superscripts and vulgar + fractions. + +2002-04-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * www/design-notes.html - Updated notes on super-/subscripts in + Free Mono Bold. Separate subsections for Free Mono regular and + Free Mono Bold. + +2002-04-12 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Added Ethiopian glyphs, converted from the + Metafont sources from TGI, Universität Hamburg (authors Berhanu + Beyene, Prof. Dr. Manfred Kudlek, Olaf Kummer, and Jochen + Metzinger) using Szabo's TeXtrace and retouched using + PfaEdit. Ethiopian metafonts are released under GNU GPL, + <http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_eng.html>. + + * sfd/FreeMonoBold.sfd - Added 40 characters, mostly in the Latin + Extended-B and IPA Extensions areas. + +2002-04-11 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Added a handful of characters in the Latin + Extended-B, IPA Extensions, Currency Symbols and Miscellaneous + Symbols areas. + +2002-04-09 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Correcting accent positioning in the Extended + Greek area; adding a couple of characters here and there. Still 20 + characters short of MES-2 conformance. + +2002-04-08 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Added some characters in the Arrows area; + more or less completed Extended Greek area (accents still need to + be fine-tuned). + +2002-04-05 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Modern non-Russian Cyrilic mostly completed. + + * sfd/FreeMonoOblique.sfd - Synchronized with FreeMono. + + * sfd/FreeSerif.sfd - Added Thomas Ridgeway's Tamil characters + (converted from Metafont and edited somehwat). + +2002-04-04 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoOblique.sfd - Armenian letters added. + + * sfd/FreeMonoBold.sfd - Serbian Cyrillic letters dje, tshe, lje + and nje corrected. + + * sfd/FreeMono.sfd - Serbian Cyrillic letters dje and tshe + corrected. Some other non-Russian Cyrillic letters modified and + "welded together". + +2002-04-03 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Added more or less complete Armenian + area. The glyphs are a tidied-up version based on the Armenian + Courier on the <http://www.cilicia.com/armo8.html>. Now we have + 1673 characters. + +2002-03-28 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Added some mathematical symbols. + +2002-03-26 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSans.sfd - took H.S. Pannu's Gurmukhi from FreeSerif. It + actually fits to FreeSans much better. It seems I'll have to look + for another Gurmukhi font with modulated stroke for FreeSerif. + + * sfd/FreeSerifItalic.sfd - replaced existing Hebrew glyphs by + those from FreeSerif (slanted for 15.5 degrees). + + * sfd/FreeSerif.sfd - Added dotted Hebrew letters. Changed barred H. + + * sfd/FreeMono.sfd - Completed vulgar fractions; minor changes in + Greek; added some mathematical operators. + + * sfd/FreeMonoBold.sfd - added 12 characters to Latin Extended-B + and IPA Extensions areas (total 984). + +2002-03-25 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMonoBold.sfd - started adding Latin Extended-B and IPA + Extensions. + + * sfd/FreeMono.sfd - Minor cosmetic changes; cleaning up Greek + (removing redundant control points), added some non-European + Cyrillic glyphs as a test. + +2002-03-22 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - Some minor modifications; letters in Latin + Extended-B area "welded" together. + +2002-03-20 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * www/index.html - finally linked the resources and design notes + pages. + + * www/design-notes.html - added scaling information for super- and + subscript numerals in FreeMono. + +2002-03-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - the Latin Extended-B and IPA Extension area + characters moved from FreeMono and skewed for 12 degrees. + +2002-03-18 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - added a dozen or two of new characters, in + particular in the Latin Extended-B and IPA Extension area. + +2002-03-15 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - added a dozen of two of new characters, in + particular in the IPA Extension area. + + * www/design-notes.html - Corrected data for x-height in FreeMono; + information on constructing small caps. + +2002-03-14 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeMono.sfd - added three smiley characters to the + Miscallaneous Symbols area. + +2002-03-10 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Anshuman Pandey has only converted Gurmukhi + from TrueType to Metafont; the original author of Gurkmukhi font + is Hardip Singh Pannu <http://members.aol.com/hspannu/punjabi.html>. + Got the permission from him to include the Gurmukhi glyph set. + +2002-03-08 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Added some more glyphs in the Mathematical + Symbols area to a total number of 3374. + +2002-03-06 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Added a basic Gurmukhi set. + + * www/design-notes.html - started a page on design notes + + * sfd/FreeMono.sfd - realized that glyphs in the Box Drawing area + and Block Elements area should extend through the ascender *and + descender* height, and corrected it. + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd - added some musical + glyphs, linking "no-break space" to space, "soft hyphen" to + hyphen-minus etc. + +2002-03-05 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * tools/WGL4.lst - Added Windows Glyph List 4.0 + + * tools/LigatureList.pl - Wrote a Perl script, which lists the + GSUB list (ligature list) of a OpenType font. + + * sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd, + sfd/FreeSerifItalic.sfd - auxilliary Hebrew glyphs added. They are + too light compared with Latin and will be substituted with better + ones. + +2002-03-04 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Added some more glyphs to the Mathematical + Operators area (page 0x22). + + * sfd/FreeSerif.sfd - Incomplete and fragmentary support for + Devanagari, originating from Harsh Kumar's Shusha fonts was + replaced by Frans Velthuis' Devanagari metafont, now maintained by + Anshuman Pandey <apandey@u.washington.edu> and available under + GPL. Until I figure out how to provide glyph substitution table in + OpenType, only the Unicode part is there. + +2002-02-28 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * ChangeLog file created + + * sfd/FreeSerif.sfd - Added some Telugu glyphs to page 0x0C, + courtesy Prasad A. Chodavarapu <http://chaitanya.bhaavana.net/fonts/> + + * sfd/FreeSerif.sfd - Added some glyphs to the Miscellaneous + Symbols page (0x26). + +2002-02-26 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * mailing lists freefont-announce and freefont-bugs created + +2002-02-25 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/FreeSerif.sfd - Added a couple of glyphs in Mathematics + Operators area. + + * sfd/FreeMono.sfd + - Added some more glyphs, in particular in the Mathematical + Operators section. + - Changed FamilyName to Free, FontName to FreeMono, and Full name + to "Free Monospaced". + +2002-02-20 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * sfd/ directory added containing FreeSerif, FreeSans and FreeMono + families. + + * tools/ directory added containing lists with characters required + for MES (Multilinguag European Subset) compliance. + + * tools/mes-list-expand.pl created - a Perl script for expanding MES + ranges into simple one-char-per-line format + + * tools/CheckConformance.pl created - a Perl script for checking + conformance of a font file with a given coded character set + + * homepage <http://www.freesoftware.fsf.org/freefont/> created + +2002-02-19 Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> + + * freefont (Free UCS Scalable Fonts) project approved on + savannah.gnu.org: <http://savannah.gnu.org/projects/freefont/> diff --git a/h-source/External/Fonts/FreeFont/FreeMono.ttf b/h-source/External/Fonts/FreeFont/FreeMono.ttf Binary files differnew file mode 100644 index 0000000..ba90adb --- /dev/null +++ b/h-source/External/Fonts/FreeFont/FreeMono.ttf diff --git a/h-source/External/Fonts/FreeFont/INSTALL b/h-source/External/Fonts/FreeFont/INSTALL new file mode 100644 index 0000000..fbbbe80 --- /dev/null +++ b/h-source/External/Fonts/FreeFont/INSTALL @@ -0,0 +1,86 @@ + Installing GNU FreeFont + ======================= + +GNU FreeFont can be used in any modern operating system. + +This document explains how to install FreeFont on some common systems. + +UNIX/GNU/Linux/BSD Systems +-------------------------- + +FreeFont works with any system using the free font rasterizer FreeType +<http://www.freetype.org/>. + +* Debian GNU/Linux + +Users of Debian GNU/Linux system will probably want to use the Debian package, +available from the Debian site, + + <http://packages.debian.org/unstable/x11/ttf-freefont.html>, + +or any of its mirrors. + +Install them by issuing the command + apt-get install ttf-freefont + + +* KDE local installation + +Users of KDE can install .ttf files on a per-user basis using the KDE +Control Center module "kcmfontinst", which may appear in the menu as + + Settings -> System Administration -> Font Installer + +This is especially helpful for developers and testers. + + +* Generic X-windows + + 1) Fetch the freefont-ttf.tar.gz package with Free UCS outline fonts + in the TrueType format. + + 2) Unpack TrueType fonts into a suitable directory, + e.g. /usr/local/share/fonts/default/TrueType/ + + 3) If you have chosen any other directory, make sure the directory you + used to install the fonts is listed in the path searched by the X + Font Server by editing the config file in /etc/X11/. + + In some systems, you list the directory in the item "catalogue=" + in the file /etc/X11/fs/config. + + 4) Run ttmkfdir in the directory where you unpacked the fonts. + + +Windows 95/98/NT/2000/XP; Vista +------------------------------- + +Note that in at least Vista, XP and 2000, the OpenType versions perform much +better than, and are recommended over, the TrueType ones. + +* Vista: + 1) From the Start menu, open Control Panels + 2) Drag-n-drop font files onto Fonts control panel + You may get a dialog saying + "Windows needs your permission to continue" + a) Click Continue + +* 95/98/NT: + The font installation is similar to Vista. + + In order to use OpenType, users of Windows 95, 98 and NT 4.0 can + install Adobe's 'Type Manager Light'. It is available for download + without cost from Adobe's web site. + + Otherwise, use the TrueType versions. + +Mac OS X +-------- + +Installing on Mac OS X consists of moving the .ttf files to either + /Library/Fonts/ or ~/Library/Fonts/ +depending on whether they should be available to all users on your system +or just to yourself. + +-------------------------------------------------------------------------- +$Id: INSTALL,v 1.7 2008/12/26 12:33:31 Stevan_White Exp $ diff --git a/h-source/External/Fonts/FreeFont/README b/h-source/External/Fonts/FreeFont/README new file mode 100644 index 0000000..60e67f2 --- /dev/null +++ b/h-source/External/Fonts/FreeFont/README @@ -0,0 +1,108 @@ +-*-text-*- + GNU FreeFont + +The GNU FreeFont project aims to provide a useful set of free scalable +(i.e., OpenType) fonts covering as much as possible of the ISO 10646/Unicode +UCS (Universal Character Set). + +Statement of Purpose +-------------------- + +The practical reason for putting glyphs together in a single font face is +to conveniently mix symbols and characters from different writing systems, +without having to switch fonts. + +Coverage +-------- + +FreeFont covers the following character sets + +* ISO 8859 parts 1-15 +* CEN MES-3 European Unicode Subset + http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf +* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more +* Microsoft/Adobe Windows Glyph List 4 (WGL4) + http://www.microsoft.com/typography/otspec/WGL4.htm +* KOI8-R and KOI8-RU +* DEC VT100 graphics symbols +* International Phonetic Alphabet +* Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets, + including Arabic presentation forms A/B +* mathematical symbols, including the whole TeX repertoire of symbols +* APL symbols + etc. + +Editing +------- + +The free outline font editor, George Williams's FontForge +<http://fontforge.sourceforge.net/> is used for editing the fonts. + +Design Issues +------------- + +Which font shapes should be made? Historical style terms like Renaissance +or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek +scripts to any greater extent than Kufi or Nashki can be applied beyond +Arabic script; "italic" is really only meaningful for Latin letters. + +However, most modern writing systems have typographic formulations for +contrasting uniform and modulated character stroke widths, and have some +history with "oblique", faces. Since the advent of the typewriter, most +have developed a typographic style with uniform-width characters. + +Accordingly, the FreeFont family has one monospaced - FreeMono - and two +proportional faces (one with uniform stroke - FreeSans - and one with +modulated stroke - FreeSerif). + +To make text from different writing systems look good side-by-side, each +FreeFont face is meant to contain characters of similar style and weight. + +Licensing +--------- + +Free UCS scalable fonts is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published +by the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +The fonts are distributed in the hope that they will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +As a special exception, if you create a document which uses this font, and +embed this font or unaltered portions of this font into the document, this +font does not by itself cause the resulting document to be covered by the +GNU General Public License. This exception does not however invalidate any +other reasons why the document might be covered by the GNU General Public +License. If you modify this font, you may extend this exception to your +version of the font, but you are not obligated to do so. If you do not +wish to do so, delete this exception statement from your version. + + +Files and their suffixes +------------------------ + +The files with .sfd (Spline Font Database) are in FontForge's native format. +Please use these if you plan to modify the font files. + +TrueType fonts for immediate consumption are the files with the .ttf +(TrueType Font) suffix. These are ready to use in Xwindows based +systems using FreeType, on Mac OS, and on older Windows systems. + +OpenType fonts (with suffix .otf) are for use in Windows Vista. +Note that although they can be installed on Linux, but many applications +in Linux still don't support them. + + +-------------------------------------------------------------------------- +Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si> +Steve White <stevan.white@googlemail.com> + +Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/ +$Id: README,v 1.6 2008/12/25 12:51:41 Stevan_White Exp $ diff --git a/h-source/External/swiftmailer/lib/classes/Swift.php b/h-source/External/swiftmailer/lib/classes/Swift.php new file mode 100644 index 0000000..77abbbf --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift.php @@ -0,0 +1,57 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * General utility class in Swift Mailer, not to be instantiated. + * + * @package Swift + * + * @author Chris Corbyn + */ +abstract class Swift +{ + + /** Swift Mailer Version number generated during dist release process */ + const VERSION = '4.0.6'; + + /** + * Internal autoloader for spl_autoload_register(). + * + * @param string $class + */ + public static function autoload($class) + { + //Don't interfere with other autoloaders + if (0 !== strpos($class, 'Swift')) + { + return false; + } + + $path = dirname(__FILE__).'/'.str_replace('_', '/', $class).'.php'; + + if (!file_exists($path)) + { + return false; + } + + require_once $path; + } + + /** + * Configure autoloading using Swift Mailer. + * + * This is designed to play nicely with other autoloaders. + */ + public static function registerAutoload() + { + spl_autoload_register(array('Swift', 'autoload')); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Attachment.php b/h-source/External/swiftmailer/lib/classes/Swift/Attachment.php new file mode 100644 index 0000000..d3779bf --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Attachment.php @@ -0,0 +1,75 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Attachment.php'; +//@require 'Swift/ByteStream/FileByteStream.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * Attachment class for attaching files to a {@link Swift_Mime_Message}. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Attachment extends Swift_Mime_Attachment +{ + + /** + * Create a new Attachment. + * Details may be optionally provided to the constructor. + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + */ + public function __construct($data = null, $filename = null, + $contentType = null) + { + call_user_func_array( + array($this, 'Swift_Mime_Attachment::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('mime.attachment') + ); + + $this->setBody($data); + $this->setFilename($filename); + if ($contentType) + { + $this->setContentType($contentType); + } + } + + /** + * Create a new Attachment. + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + * @return Swift_Mime_Attachment + */ + public static function newInstance($data = null, $filename = null, + $contentType = null) + { + return new self($data, $filename, $contentType); + } + + /** + * Create a new Attachment from a filesystem path. + * @param string $path + * @param string $contentType optional + * @return Swift_Mime_Attachment + */ + public static function fromPath($path, $contentType = null) + { + return self::newInstance()->setFile( + new Swift_ByteStream_FileByteStream($path), + $contentType + ); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php b/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php new file mode 100644 index 0000000..71bc3f1 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php @@ -0,0 +1,178 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/Filterable.php'; +//@require 'Swift/StreamFilter.php'; + +/** + * Provides the base functionality for an InputStream supporting filters. + * @package Swift + * @subpackage ByteStream + * @author Chris Corbyn + */ +abstract class Swift_ByteStream_AbstractFilterableInputStream + implements Swift_InputByteStream, Swift_Filterable +{ + + /** Write sequence */ + private $_sequence = 0; + + /** StreamFilters */ + private $_filters = array(); + + /** A buffer for writing */ + private $_writeBuffer = ''; + + /** Bound streams */ + private $_mirrors = array(); + + /** + * Commit the given bytes to the storage medium immediately. + * @param string $bytes + * @access protected + */ + abstract protected function _commit($bytes); + + /** + * Flush any buffers/content with immediate effect. + * @access protected + */ + abstract protected function _flush(); + + /** + * Add a StreamFilter to this InputByteStream. + * @param Swift_StreamFilter $filter + * @param string $key + */ + public function addFilter(Swift_StreamFilter $filter, $key) + { + $this->_filters[$key] = $filter; + } + + /** + * Remove an already present StreamFilter based on its $key. + * @param string $key + */ + public function removeFilter($key) + { + unset($this->_filters[$key]); + } + + /** + * Writes $bytes to the end of the stream. + * @param string $bytes + * @throws Swift_IoException + */ + public function write($bytes) + { + $this->_writeBuffer .= $bytes; + foreach ($this->_filters as $filter) + { + if ($filter->shouldBuffer($this->_writeBuffer)) + { + return; + } + } + $this->_doWrite($this->_writeBuffer); + return ++$this->_sequence; + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + * + * @throws Swift_IoException + */ + public function commit() + { + $this->_doWrite($this->_writeBuffer); + } + + /** + * Attach $is to this stream. + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + $this->_mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->_mirrors as $k => $stream) + { + if ($is === $stream) + { + if ($this->_writeBuffer !== '') + { + $stream->write($this->_filter($this->_writeBuffer)); + } + unset($this->_mirrors[$k]); + } + } + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * @throws Swift_IoException + */ + public function flushBuffers() + { + if ($this->_writeBuffer !== '') + { + $this->_doWrite($this->_writeBuffer); + } + $this->_flush(); + + foreach ($this->_mirrors as $stream) + { + $stream->flushBuffers(); + } + } + + // -- Private methods + + /** Run $bytes through all filters */ + private function _filter($bytes) + { + foreach ($this->_filters as $filter) + { + $bytes = $filter->filter($bytes); + } + return $bytes; + } + + /** Just write the bytes to the stream */ + private function _doWrite($bytes) + { + $this->_commit($this->_filter($bytes)); + + foreach ($this->_mirrors as $stream) + { + $stream->write($bytes); + } + + $this->_writeBuffer = ''; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php b/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php new file mode 100644 index 0000000..f918889 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php @@ -0,0 +1,190 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStream.php'; + +/** + * Allows reading and writing of bytes to and from an array. + * @package Swift + * @subpackage ByteStream + * @author Chris Corbyn + */ +class Swift_ByteStream_ArrayByteStream + implements Swift_InputByteStream, Swift_OutputByteStream +{ + + /** + * The internal stack of bytes. + * @var string[] + * @access private + */ + private $_array = array(); + + /** + * The size of the stack + * @var int + * @access private + */ + private $_arraySize = 0; + + /** + * The internal pointer offset. + * @var int + * @access private + */ + private $_offset = 0; + + /** Bound streams */ + private $_mirrors = array(); + + /** + * Create a new ArrayByteStream. + * If $stack is given the stream will be populated with the bytes it contains. + * @param mixed $stack of bytes in string or array form, optional + */ + public function __construct($stack = null) + { + if (is_array($stack)) + { + $this->_array = $stack; + $this->_arraySize = count($stack); + } + elseif (is_string($stack)) + { + $this->write($stack); + } + else + { + $this->_array = array(); + } + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * @param int $length + * @return string + */ + public function read($length) + { + if ($this->_offset == $this->_arraySize) + { + return false; + } + + // Don't use array slice + $end = $length + $this->_offset; + $end = $this->_arraySize<$end + ?$this->_arraySize + :$end; + $ret = ''; + for (; $this->_offset < $end; ++$this->_offset) + { + $ret .= $this->_array[$this->_offset]; + } + return $ret; + } + + /** + * Writes $bytes to the end of the stream. + * @param string $bytes + */ + public function write($bytes) + { + $to_add = str_split($bytes); + foreach ($to_add as $value) + { + $this->_array[] = $value; + } + $this->_arraySize = count($this->_array); + + foreach ($this->_mirrors as $stream) + { + $stream->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Attach $is to this stream. + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + $this->_mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->_mirrors as $k => $stream) + { + if ($is === $stream) + { + unset($this->_mirrors[$k]); + } + } + } + + /** + * Move the internal read pointer to $byteOffset in the stream. + * @param int $byteOffset + * @return boolean + */ + public function setReadPointer($byteOffset) + { + if ($byteOffset > $this->_arraySize) + { + $byteOffset = $this->_arraySize; + } + elseif ($byteOffset < 0) + { + $byteOffset = 0; + } + + $this->_offset = $byteOffset; + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + */ + public function flushBuffers() + { + $this->_offset = 0; + $this->_array = array(); + $this->_arraySize = 0; + + foreach ($this->_mirrors as $stream) + { + $stream->flushBuffers(); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php b/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php new file mode 100644 index 0000000..14773c2 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php @@ -0,0 +1,177 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/ByteStream/AbstractFilterableInputStream.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/FileStream.php'; +//@require 'Swift/IoException.php'; + +/** + * Allows reading and writing of bytes to and from a file. + * @package Swift + * @subpackage ByteStream + * @author Chris Corbyn + */ +class Swift_ByteStream_FileByteStream + extends Swift_ByteStream_AbstractFilterableInputStream + implements Swift_FileStream +{ + + /** The internal pointer offset */ + private $_offset = 0; + + /** The path to the file */ + private $_path; + + /** The mode this file is opened in for writing */ + private $_mode; + + /** A lazy-loaded resource handle for reading the file */ + private $_reader; + + /** A lazy-loaded resource handle for writing the file */ + private $_writer; + + /** If magic_quotes_runtime is on, this will be true */ + private $_quotes = false; + + /** + * Create a new FileByteStream for $path. + * @param string $path + * @param string $writable if true + */ + public function __construct($path, $writable = false) + { + $this->_path = $path; + $this->_mode = $writable ? 'w+b' : 'rb'; + $this->_quotes = get_magic_quotes_runtime(); + } + + /** + * Get the complete path to the file. + * @return string + */ + public function getPath() + { + return $this->_path; + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * @param int $length + * @return string + * @throws Swift_IoException + */ + public function read($length) + { + $fp = $this->_getReadHandle(); + if (!feof($fp)) + { + if ($this->_quotes) + { + set_magic_quotes_runtime(0); + } + $bytes = fread($fp, $length); + if ($this->_quotes) + { + set_magic_quotes_runtime(1); + } + $this->_offset = ftell($fp); + return $bytes; + } + else + { + return false; + } + } + + /** + * Move the internal read pointer to $byteOffset in the stream. + * @param int $byteOffset + * @return boolean + */ + public function setReadPointer($byteOffset) + { + if (isset($this->_reader)) + { + fseek($this->_reader, $byteOffset, SEEK_SET); + } + $this->_offset = $byteOffset; + } + + // -- Private methods + + /** Just write the bytes to the file */ + protected function _commit($bytes) + { + fwrite($this->_getWriteHandle(), $bytes); + $this->_resetReadHandle(); + } + + /** Not used */ + protected function _flush() + { + } + + /** Get the resource for reading */ + private function _getReadHandle() + { + if (!isset($this->_reader)) + { + if (!$this->_reader = fopen($this->_path, 'rb')) + { + throw new Swift_IoException( + 'Unable to open file for reading [' . $this->_path . ']' + ); + } + fseek($this->_reader, $this->_offset, SEEK_SET); + } + return $this->_reader; + } + + /** Get the resource for writing */ + private function _getWriteHandle() + { + if (!isset($this->_writer)) + { + if (!$this->_writer = fopen($this->_path, $this->_mode)) + { + throw new Swift_IoException( + 'Unable to open file for writing [' . $this->_path . ']' + ); + } + } + return $this->_writer; + } + + /** Force a reload of the resource for writing */ + private function _resetWriteHandle() + { + if (isset($this->_writer)) + { + fclose($this->_writer); + $this->_writer = null; + } + } + + /** Force a reload of the resource for reading */ + private function _resetReadHandle() + { + if (isset($this->_reader)) + { + fclose($this->_reader); + $this->_reader = null; + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader.php new file mode 100644 index 0000000..53d39ec --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader.php @@ -0,0 +1,60 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Analyzes characters for a specific character set. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + * @author Xavier De Cock <xdecock@gmail.com> + */ +interface Swift_CharacterReader +{ + const MAP_TYPE_INVALID = 0x01; + const MAP_TYPE_FIXED_LEN = 0x02; + const MAP_TYPE_POSITIONS = 0x03; + + /** + * Returns the complete charactermap + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars); + + /** + * Returns mapType + * @int mapType + */ + public function getMapType(); + + /** + * Returns an integer which specifies how many more bytes to read. + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * @param int[] $bytes + * @return int + */ + public function validateByteSequence($bytes, $size); + + /** + * Returns the number of bytes which should be read to start each character. + * For fixed width character sets this should be the number of + * octets-per-character. For multibyte character sets this will probably be 1. + * @return int + */ + public function getInitialByteSize(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php new file mode 100644 index 0000000..26b13ff --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php @@ -0,0 +1,96 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/CharacterReader.php'; + +/** + * Provides fixed-width byte sizes for reading fixed-width character sets. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + * @author Xavier De Cock <xdecock@gmail.com> + */ +class Swift_CharacterReader_GenericFixedWidthReader + implements Swift_CharacterReader +{ + + /** + * The number of bytes in a single character. + * @var int + * @access private + */ + private $_width; + + /** + * Creates a new GenericFixedWidthReader using $width bytes per character. + * @param int $width + */ + public function __construct($width) + { + $this->_width = $width; + } + + /** + * Returns the complete charactermap + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * @return $int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + $strlen = strlen($string); + // % and / are CPU intensive, so, maybe find a better way + $ignored = $strlen%$this->_width; + $ignoredChars = substr($string, - $ignored); + $currentMap = $this->_width; + return ($strlen - $ignored)/$this->_width; + + } + + /** + * Returns mapType + * @int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_FIXED_LEN; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * @param string $bytes + * @return int + */ + public function validateByteSequence($bytes, $size) + { + $needed = $this->_width - $size; + return ($needed > -1) + ? $needed + : -1 + ; + } + + /** + * Returns the number of bytes which should be read to start each character. + * @return int + */ + public function getInitialByteSize() + { + return $this->_width; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php new file mode 100644 index 0000000..3e0228a --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php @@ -0,0 +1,83 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/CharacterReader.php'; + +/** + * Analyzes US-ASCII characters. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +class Swift_CharacterReader_UsAsciiReader + implements Swift_CharacterReader +{ + /** + * Returns the complete charactermap + * + * @param string $string + * @param int $startOffset + * @param string $ignoredChars + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + $strlen=strlen($string); + $ignoredChars=''; + for( $i = 0; $i < $strlen; ++$i) + { + if ($string[$i]>"\x07F") + { // Invalid char + $currentMap[$i+$startOffset]=$string[$i]; + } + } + return $strlen; + } + + /** + * Returns mapType + * @int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_INVALID; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * @param string $bytes + * @return int + */ + public function validateByteSequence($bytes, $size) + { + $byte = reset($bytes); + if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) + { + return 0; + } + else + { + return -1; + } + } + + /** + * Returns the number of bytes which should be read to start each character. + * @return int + */ + public function getInitialByteSize() + { + return 1; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php new file mode 100644 index 0000000..54ea9a4 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php @@ -0,0 +1,183 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/CharacterReader.php'; + +/** + * Analyzes UTF-8 characters. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + * @author Xavier De Cock <xdecock@gmail.com> + */ +class Swift_CharacterReader_Utf8Reader + implements Swift_CharacterReader +{ + + /** Pre-computed for optimization */ + private static $length_map=array( +//N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x0N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x1N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x2N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x3N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x4N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x5N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x6N + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x7N + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x8N + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x9N + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xAN + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xBN + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xCN + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xDN + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, //0xEN + 4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0 //0xFN + ); + private static $s_length_map=array( + "\x00"=>1, "\x01"=>1, "\x02"=>1, "\x03"=>1, "\x04"=>1, "\x05"=>1, "\x06"=>1, "\x07"=>1, + "\x08"=>1, "\x09"=>1, "\x0a"=>1, "\x0b"=>1, "\x0c"=>1, "\x0d"=>1, "\x0e"=>1, "\x0f"=>1, + "\x10"=>1, "\x11"=>1, "\x12"=>1, "\x13"=>1, "\x14"=>1, "\x15"=>1, "\x16"=>1, "\x17"=>1, + "\x18"=>1, "\x19"=>1, "\x1a"=>1, "\x1b"=>1, "\x1c"=>1, "\x1d"=>1, "\x1e"=>1, "\x1f"=>1, + "\x20"=>1, "\x21"=>1, "\x22"=>1, "\x23"=>1, "\x24"=>1, "\x25"=>1, "\x26"=>1, "\x27"=>1, + "\x28"=>1, "\x29"=>1, "\x2a"=>1, "\x2b"=>1, "\x2c"=>1, "\x2d"=>1, "\x2e"=>1, "\x2f"=>1, + "\x30"=>1, "\x31"=>1, "\x32"=>1, "\x33"=>1, "\x34"=>1, "\x35"=>1, "\x36"=>1, "\x37"=>1, + "\x38"=>1, "\x39"=>1, "\x3a"=>1, "\x3b"=>1, "\x3c"=>1, "\x3d"=>1, "\x3e"=>1, "\x3f"=>1, + "\x40"=>1, "\x41"=>1, "\x42"=>1, "\x43"=>1, "\x44"=>1, "\x45"=>1, "\x46"=>1, "\x47"=>1, + "\x48"=>1, "\x49"=>1, "\x4a"=>1, "\x4b"=>1, "\x4c"=>1, "\x4d"=>1, "\x4e"=>1, "\x4f"=>1, + "\x50"=>1, "\x51"=>1, "\x52"=>1, "\x53"=>1, "\x54"=>1, "\x55"=>1, "\x56"=>1, "\x57"=>1, + "\x58"=>1, "\x59"=>1, "\x5a"=>1, "\x5b"=>1, "\x5c"=>1, "\x5d"=>1, "\x5e"=>1, "\x5f"=>1, + "\x60"=>1, "\x61"=>1, "\x62"=>1, "\x63"=>1, "\x64"=>1, "\x65"=>1, "\x66"=>1, "\x67"=>1, + "\x68"=>1, "\x69"=>1, "\x6a"=>1, "\x6b"=>1, "\x6c"=>1, "\x6d"=>1, "\x6e"=>1, "\x6f"=>1, + "\x70"=>1, "\x71"=>1, "\x72"=>1, "\x73"=>1, "\x74"=>1, "\x75"=>1, "\x76"=>1, "\x77"=>1, + "\x78"=>1, "\x79"=>1, "\x7a"=>1, "\x7b"=>1, "\x7c"=>1, "\x7d"=>1, "\x7e"=>1, "\x7f"=>1, + "\x80"=>0, "\x81"=>0, "\x82"=>0, "\x83"=>0, "\x84"=>0, "\x85"=>0, "\x86"=>0, "\x87"=>0, + "\x88"=>0, "\x89"=>0, "\x8a"=>0, "\x8b"=>0, "\x8c"=>0, "\x8d"=>0, "\x8e"=>0, "\x8f"=>0, + "\x90"=>0, "\x91"=>0, "\x92"=>0, "\x93"=>0, "\x94"=>0, "\x95"=>0, "\x96"=>0, "\x97"=>0, + "\x98"=>0, "\x99"=>0, "\x9a"=>0, "\x9b"=>0, "\x9c"=>0, "\x9d"=>0, "\x9e"=>0, "\x9f"=>0, + "\xa0"=>0, "\xa1"=>0, "\xa2"=>0, "\xa3"=>0, "\xa4"=>0, "\xa5"=>0, "\xa6"=>0, "\xa7"=>0, + "\xa8"=>0, "\xa9"=>0, "\xaa"=>0, "\xab"=>0, "\xac"=>0, "\xad"=>0, "\xae"=>0, "\xaf"=>0, + "\xb0"=>0, "\xb1"=>0, "\xb2"=>0, "\xb3"=>0, "\xb4"=>0, "\xb5"=>0, "\xb6"=>0, "\xb7"=>0, + "\xb8"=>0, "\xb9"=>0, "\xba"=>0, "\xbb"=>0, "\xbc"=>0, "\xbd"=>0, "\xbe"=>0, "\xbf"=>0, + "\xc0"=>2, "\xc1"=>2, "\xc2"=>2, "\xc3"=>2, "\xc4"=>2, "\xc5"=>2, "\xc6"=>2, "\xc7"=>2, + "\xc8"=>2, "\xc9"=>2, "\xca"=>2, "\xcb"=>2, "\xcc"=>2, "\xcd"=>2, "\xce"=>2, "\xcf"=>2, + "\xd0"=>2, "\xd1"=>2, "\xd2"=>2, "\xd3"=>2, "\xd4"=>2, "\xd5"=>2, "\xd6"=>2, "\xd7"=>2, + "\xd8"=>2, "\xd9"=>2, "\xda"=>2, "\xdb"=>2, "\xdc"=>2, "\xdd"=>2, "\xde"=>2, "\xdf"=>2, + "\xe0"=>3, "\xe1"=>3, "\xe2"=>3, "\xe3"=>3, "\xe4"=>3, "\xe5"=>3, "\xe6"=>3, "\xe7"=>3, + "\xe8"=>3, "\xe9"=>3, "\xea"=>3, "\xeb"=>3, "\xec"=>3, "\xed"=>3, "\xee"=>3, "\xef"=>3, + "\xf0"=>4, "\xf1"=>4, "\xf2"=>4, "\xf3"=>4, "\xf4"=>4, "\xf5"=>4, "\xf6"=>4, "\xf7"=>4, + "\xf8"=>5, "\xf9"=>5, "\xfa"=>5, "\xfb"=>5, "\xfc"=>6, "\xfd"=>6, "\xfe"=>0, "\xff"=>0, + ); + + /** + * Returns the complete charactermap + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + if (!isset($currentMap['i']) || !isset($currentMap['p'])) + { + $currentMap['p'] = $currentMap['i'] = array(); + } + $strlen=strlen($string); + $charPos=count($currentMap['p']); + $foundChars=0; + $invalid=false; + for ($i=0; $i<$strlen; ++$i) + { + $char=$string[$i]; + $size=self::$s_length_map[$char]; + if ($size==0) + { + /* char is invalid, we must wait for a resync */ + $invalid=true; + continue; + } + else + { + if ($invalid==true) + { + /* We mark the chars as invalid and start a new char */ + $currentMap['p'][$charPos+$foundChars]=$startOffset+$i; + $currentMap['i'][$charPos+$foundChars]=true; + ++$foundChars; + $invalid=false; + } + if (($i+$size) > $strlen){ + $ignoredChars=substr($string, $i); + break; + } + for ($j=1; $j<$size; ++$j) + { + $char=$string[$i+$j]; + if ($char>"\x7F" && $char<"\xC0") + { + // Valid - continue parsing + } + else + { + /* char is invalid, we must wait for a resync */ + $invalid=true; + continue 2; + } + } + /* Ok we got a complete char here */ + $lastChar=$currentMap['p'][$charPos+$foundChars]=$startOffset+$i+$size; + $i+=$j-1; + ++$foundChars; + } + } + return $foundChars; + } + + /** + * Returns mapType + * @int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_POSITIONS; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * @param string $bytes + * @return int + */ + public function validateByteSequence($bytes, $size) + { + if ($size<1){ + return -1; + } + $needed = self::$length_map[$bytes[0]] - $size; + return ($needed > -1) + ? $needed + : -1 + ; + } + + /** + * Returns the number of bytes which should be read to start each character. + * @return int + */ + public function getInitialByteSize() + { + return 1; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php new file mode 100644 index 0000000..9e01de1 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/CharacterReader.php'; + +/** + * A factory for creating CharacterReaders. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +interface Swift_CharacterReaderFactory +{ + + /** + * Returns a CharacterReader suitable for the charset applied. + * @param string $charset + * @return Swift_CharacterReader + */ + public function getReaderFor($charset); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php new file mode 100644 index 0000000..a6f9f94 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php @@ -0,0 +1,119 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/CharacterReaderFactory.php'; + +/** + * Standard factory for creating CharacterReaders. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory + implements Swift_CharacterReaderFactory +{ + + /** + * A map of charset patterns to their implementation classes. + * @var array + * @access private + */ + private $_map = array(); + + /** + * Factories which have already been loaded. + * @var Swift_CharacterReaderFactory[] + * @access private + */ + private $_loaded = array(); + + /** + * Creates a new CharacterReaderFactory. + */ + public function __construct() + { + $prefix = 'Swift_CharacterReader_'; + + $singleByte = array( + 'class' => $prefix . 'GenericFixedWidthReader', + 'constructor' => array(1) + ); + + $doubleByte = array( + 'class' => $prefix . 'GenericFixedWidthReader', + 'constructor' => array(2) + ); + + $fourBytes = array( + 'class' => $prefix . 'GenericFixedWidthReader', + 'constructor' => array(4) + ); + + //Utf-8 + $this->_map['utf-?8'] = array( + 'class' => $prefix . 'Utf8Reader', + 'constructor' => array() + ); + + //7-8 bit charsets + $this->_map['(us-)?ascii'] = $singleByte; + $this->_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; + $this->_map['windows-?125[0-9]'] = $singleByte; + $this->_map['cp-?[0-9]+'] = $singleByte; + $this->_map['ansi'] = $singleByte; + $this->_map['macintosh'] = $singleByte; + $this->_map['koi-?7'] = $singleByte; + $this->_map['koi-?8-?.+'] = $singleByte; + $this->_map['mik'] = $singleByte; + $this->_map['(cork|t1)'] = $singleByte; + $this->_map['v?iscii'] = $singleByte; + + //16 bits + $this->_map['(ucs-?2|utf-?16)'] = $doubleByte; + + //32 bits + $this->_map['(ucs-?4|utf-?32)'] = $fourBytes; + + //Fallback + $this->_map['.*'] = $singleByte; + } + + /** + * Returns a CharacterReader suitable for the charset applied. + * @param string $charset + * @return Swift_CharacterReader + */ + public function getReaderFor($charset) + { + $charset = trim(strtolower($charset)); + foreach ($this->_map as $pattern => $spec) + { + $re = '/^' . $pattern . '$/D'; + if (preg_match($re, $charset)) + { + if (!array_key_exists($pattern, $this->_loaded)) + { + $reflector = new ReflectionClass($spec['class']); + if ($reflector->getConstructor()) + { + $reader = $reflector->newInstanceArgs($spec['constructor']); + } + else + { + $reader = $reflector->newInstance(); + } + $this->_loaded[$pattern] = $reader; + } + return $this->_loaded[$pattern]; + } + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream.php new file mode 100644 index 0000000..bf91528 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream.php @@ -0,0 +1,86 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +require_once dirname(__FILE__) . '/OutputByteStream.php'; +require_once dirname(__FILE__) . '/CharacterReaderFactory.php'; + + +/** + * An abstract means of reading and writing data in terms of characters as opposed + * to bytes. + * Classes implementing this interface may use a subsystem which requires less + * memory than working with large strings of data. + * @package Swift + * @subpackage CharacterStream + * @author Chris Corbyn + */ +interface Swift_CharacterStream +{ + + /** + * Set the character set used in this CharacterStream. + * @param string $charset + */ + public function setCharacterSet($charset); + + /** + * Set the CharacterReaderFactory for multi charset support. + * @param Swift_CharacterReaderFactory $factory + */ + public function setCharacterReaderFactory( + Swift_CharacterReaderFactory $factory); + + /** + * Overwrite this character stream using the byte sequence in the byte stream. + * @param Swift_OutputByteStream $os output stream to read from + */ + public function importByteStream(Swift_OutputByteStream $os); + + /** + * Import a string a bytes into this CharacterStream, overwriting any existing + * data in the stream. + * @param string $string + */ + public function importString($string); + + /** + * Read $length characters from the stream and move the internal pointer + * $length further into the stream. + * @param int $length + * @return string + */ + public function read($length); + + /** + * Read $length characters from the stream and return a 1-dimensional array + * containing there octet values. + * @param int $length + * @return int[] + */ + public function readBytes($length); + + /** + * Write $chars to the end of the stream. + * @param string $chars + */ + public function write($chars); + + /** + * Move the internal pointer to $charOffset in the stream. + * @param int $charOffset + */ + public function setPointer($charOffset); + + /** + * Empty the stream and reset the internal pointer. + */ + public function flushContents(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php new file mode 100644 index 0000000..9612365 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php @@ -0,0 +1,319 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/CharacterStream.php'; +//@require 'Swift/OutputByteStream.php'; + + +/** + * A CharacterStream implementation which stores characters in an internal array. + * @package Swift + * @subpackage CharacterStream + * @author Chris Corbyn + */ +class Swift_CharacterStream_ArrayCharacterStream + implements Swift_CharacterStream +{ + + /** A map of byte values and their respective characters */ + private static $_charMap; + + /** A map of characters and their derivative byte values */ + private static $_byteMap; + + /** The char reader (lazy-loaded) for the current charset */ + private $_charReader; + + /** A factory for creatiing CharacterReader instances */ + private $_charReaderFactory; + + /** The character set this stream is using */ + private $_charset; + + /** Array of characters */ + private $_array = array(); + + /** Size of the array of character */ + private $_array_size = array(); + + /** The current character offset in the stream */ + private $_offset = 0; + + /** + * Create a new CharacterStream with the given $chars, if set. + * @param Swift_CharacterReaderFactory $factory for loading validators + * @param string $charset used in the stream + */ + public function __construct(Swift_CharacterReaderFactory $factory, + $charset) + { + self::_initializeMaps(); + $this->setCharacterReaderFactory($factory); + $this->setCharacterSet($charset); + } + + /** + * Set the character set used in this CharacterStream. + * @param string $charset + */ + public function setCharacterSet($charset) + { + $this->_charset = $charset; + $this->_charReader = null; + } + + /** + * Set the CharacterReaderFactory for multi charset support. + * @param Swift_CharacterReaderFactory $factory + */ + public function setCharacterReaderFactory( + Swift_CharacterReaderFactory $factory) + { + $this->_charReaderFactory = $factory; + } + + /** + * Overwrite this character stream using the byte sequence in the byte stream. + * @param Swift_OutputByteStream $os output stream to read from + */ + public function importByteStream(Swift_OutputByteStream $os) + { + if (!isset($this->_charReader)) + { + $this->_charReader = $this->_charReaderFactory + ->getReaderFor($this->_charset); + } + + $startLength = $this->_charReader->getInitialByteSize(); + while (false !== $bytes = $os->read($startLength)) + { + $c = array(); + for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) + { + $c[] = self::$_byteMap[$bytes[$i]]; + } + $size = count($c); + $need = $this->_charReader + ->validateByteSequence($c, $size); + if ($need > 0 && + false !== $bytes = $os->read($need)) + { + for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) + { + $c[] = self::$_byteMap[$bytes[$i]]; + } + } + $this->_array[] = $c; + ++$this->_array_size; + } + } + + /** + * Import a string a bytes into this CharacterStream, overwriting any existing + * data in the stream. + * @param string $string + */ + public function importString($string) + { + $this->flushContents(); + $this->write($string); + } + + /** + * Read $length characters from the stream and move the internal pointer + * $length further into the stream. + * @param int $length + * @return string + */ + public function read($length) + { + if ($this->_offset == $this->_array_size) + { + return false; + } + + // Don't use array slice + $arrays = array(); + $end = $length + $this->_offset; + for ($i = $this->_offset; $i < $end; ++$i) + { + if (!isset($this->_array[$i])) + { + break; + } + $arrays[] = $this->_array[$i]; + } + $this->_offset += $i - $this->_offset; // Limit function calls + $chars = false; + foreach ($arrays as $array) + { + $chars .= implode('', array_map('chr', $array)); + } + return $chars; + } + + /** + * Read $length characters from the stream and return a 1-dimensional array + * containing there octet values. + * @param int $length + * @return int[] + */ + public function readBytes($length) + { + if ($this->_offset == $this->_array_size) + { + return false; + } + $arrays = array(); + $end = $length + $this->_offset; + for ($i = $this->_offset; $i < $end; ++$i) + { + if (!isset($this->_array[$i])) + { + break; + } + $arrays[] = $this->_array[$i]; + } + $this->_offset += ($i - $this->_offset); // Limit function calls + return call_user_func_array('array_merge', $arrays); + } + + /** + * Write $chars to the end of the stream. + * @param string $chars + */ + public function write($chars) + { + if (!isset($this->_charReader)) + { + $this->_charReader = $this->_charReaderFactory->getReaderFor( + $this->_charset); + } + + $startLength = $this->_charReader->getInitialByteSize(); + + $fp = fopen('php://memory', 'w+b'); + fwrite($fp, $chars); + unset($chars); + fseek($fp, 0, SEEK_SET); + + $buffer = array(0); + $buf_pos = 1; + $buf_len = 1; + $has_datas = true; + do + { + $bytes = array(); + // Buffer Filing + if ($buf_len - $buf_pos < $startLength) + { + $buf = array_splice($buffer, $buf_pos); + $new = $this->_reloadBuffer($fp, 100); + if ($new) + { + $buffer = array_merge($buf, $new); + $buf_len = count($buffer); + $buf_pos = 0; + } + else + { + $has_datas = false; + } + } + if ($buf_len - $buf_pos > 0) + { + $size = 0; + for ($i = 0; $i < $startLength && isset($buffer[$buf_pos]); ++$i) + { + ++$size; + $bytes[] = $buffer[$buf_pos++]; + } + $need = $this->_charReader->validateByteSequence( + $bytes, $size); + if ($need > 0) + { + if ($buf_len - $buf_pos < $need) + { + $new = $this->_reloadBuffer($fp, $need); + + if ($new) + { + $buffer = array_merge($buffer, $new); + $buf_len = count($buffer); + } + } + for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) + { + $bytes[] = $buffer[$buf_pos++]; + } + } + $this->_array[] = $bytes; + ++$this->_array_size; + } + } + while ($has_datas); + + fclose($fp); + } + + /** + * Move the internal pointer to $charOffset in the stream. + * @param int $charOffset + */ + public function setPointer($charOffset) + { + if ($charOffset > $this->_array_size) + { + $charOffset = $this->_array_size; + } + elseif ($charOffset < 0) + { + $charOffset = 0; + } + $this->_offset = $charOffset; + } + + /** + * Empty the stream and reset the internal pointer. + */ + public function flushContents() + { + $this->_offset = 0; + $this->_array = array(); + $this->_array_size = 0; + } + + private function _reloadBuffer($fp, $len) + { + if (!feof($fp) && ($bytes = fread($fp, $len)) !== false) + { + $buf = array(); + for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) + { + $buf[] = self::$_byteMap[$bytes[$i]]; + } + return $buf; + } + return false; + } + + private static function _initializeMaps() + { + if (!isset(self::$_charMap)) + { + self::$_charMap = array(); + for ($byte = 0; $byte < 256; ++$byte) + { + self::$_charMap[$byte] = chr($byte); + } + self::$_byteMap = array_flip(self::$_charMap); + } + } +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php b/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php new file mode 100644 index 0000000..f090aa7 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php @@ -0,0 +1,300 @@ +<?php + +/* + CharacterStream implementation using an array in Swift Mailer. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + */ + +//@require 'Swift/CharacterStream.php'; +//@require 'Swift/OutputByteStream.php'; + + +/** + * A CharacterStream implementation which stores characters in an internal array. + * @package Swift + * @subpackage CharacterStream + * @author Xavier De Cock <xdecock@gmail.com> + */ + +Class Swift_CharacterStream_NgCharacterStream + implements Swift_CharacterStream +{ + + /** + * The char reader (lazy-loaded) for the current charset. + * @var Swift_CharacterReader + * @access private + */ + private $_charReader; + + /** + * A factory for creatiing CharacterReader instances. + * @var Swift_CharacterReaderFactory + * @access private + */ + private $_charReaderFactory; + + /** + * The character set this stream is using. + * @var string + * @access private + */ + private $_charset; + + /** + * The datas stored as is + * + * @var string + */ + private $_datas = ""; + + /** + * Number of bytes in the stream + * + * @var int + */ + private $_datasSize = 0; + + /** + * Map + * + * @var mixed + */ + private $_map; + + /** + * Map Type + * + * @var int + */ + private $_mapType = 0; + + /** + * Number of characters in the stream + * + * @var int + */ + private $_charCount = 0; + + /** + * Position in the stream + * + * @var unknown_type + */ + private $_currentPos = 0; + + /** + * The constructor + * + * @param Swift_CharacterReaderFactory $factory + * @param unknown_type $charset + */ + public function __construct(Swift_CharacterReaderFactory $factory, + $charset) + { + $this->setCharacterReaderFactory($factory); + $this->setCharacterSet($charset); + } + + /* -- Changing parameters of the stream -- */ + + /** + * Set the character set used in this CharacterStream. + * @param string $charset + */ + public function setCharacterSet($charset) + { + $this->_charset = $charset; + $this->_charReader = null; + $this->_mapType = 0; + } + + /** + * Set the CharacterReaderFactory for multi charset support. + * @param Swift_CharacterReaderFactory $factory + */ + public function setCharacterReaderFactory( + Swift_CharacterReaderFactory $factory) + { + $this->_charReaderFactory = $factory; + } + + /** + * @see Swift_CharacterStream::flushContents() + * + */ + public function flushContents() + { + $this->_datas = null; + $this->_map = null; + $this->_charCount = 0; + $this->_currentPos = 0; + $this->_datasSize = 0; + } + + /** + * @see Swift_CharacterStream::importByteStream() + * + * @param Swift_OutputByteStream $os + */ + public function importByteStream(Swift_OutputByteStream $os) + { + $this->flushContents(); + $blocks=512; + $os->setReadPointer(0); + while(false!==($read = $os->read($blocks))) + $this->write($read); + } + + /** + * @see Swift_CharacterStream::importString() + * + * @param string $string + */ + public function importString($string) + { + $this->flushContents(); + $this->write($string); + } + + /** + * @see Swift_CharacterStream::read() + * + * @param int $length + * @return string + */ + public function read($length) + { + if ($this->_currentPos>=$this->_charCount) + { + return false; + } + $ret=false; + $length = ($this->_currentPos+$length > $this->_charCount) + ? $this->_charCount - $this->_currentPos + : $length; + switch ($this->_mapType) + { + case Swift_CharacterReader::MAP_TYPE_FIXED_LEN: + $len = $length*$this->_map; + $ret = substr($this->_datas, + $this->_currentPos * $this->_map, + $len); + $this->_currentPos += $length; + break; + + case Swift_CharacterReader::MAP_TYPE_INVALID: + $end = $this->_currentPos + $length; + $end = $end > $this->_charCount + ?$this->_charCount + :$end; + $ret = ''; + for (; $this->_currentPos < $length; ++$this->_currentPos) + { + if (isset ($this->_map[$this->_currentPos])) + { + $ret .= '?'; + } + else + { + $ret .= $this->_datas[$this->_currentPos]; + } + } + break; + + case Swift_CharacterReader::MAP_TYPE_POSITIONS: + $end = $this->_currentPos + $length; + $end = $end > $this->_charCount + ?$this->_charCount + :$end; + $ret = ''; + $start = 0; + if ($this->_currentPos>0) + { + $start = $this->_map['p'][$this->_currentPos-1]; + } + $to = $start; + for (; $this->_currentPos < $end; ++$this->_currentPos) + { + if (isset($this->_map['i'][$this->_currentPos])) { + $ret .= substr($this->_datas, $start, $to - $start).'?'; + $start = $this->_map['p'][$this->_currentPos]; + } else { + $to = $this->_map['p'][$this->_currentPos]; + } + } + $ret .= substr($this->_datas, $start, $to - $start); + break; + } + return $ret; + } + + /** + * @see Swift_CharacterStream::readBytes() + * + * @param int $length + * @return int[] + */ + public function readBytes($length) + { + $read=$this->read($length); + if ($read!==false) + { + $ret = array_map('ord', str_split($read, 1)); + return $ret; + } + return false; + } + + /** + * @see Swift_CharacterStream::setPointer() + * + * @param int $charOffset + */ + public function setPointer($charOffset) + { + if ($this->_charCount<$charOffset){ + $charOffset=$this->_charCount; + } + $this->_currentPos = $charOffset; + } + + /** + * @see Swift_CharacterStream::write() + * + * @param string $chars + */ + public function write($chars) + { + if (!isset($this->_charReader)) + { + $this->_charReader = $this->_charReaderFactory->getReaderFor( + $this->_charset); + $this->_map = array(); + $this->_mapType = $this->_charReader->getMapType(); + } + $ignored=''; + $this->_datas .= $chars; + $this->_charCount += $this->_charReader->getCharPositions(substr($this->_datas, $this->_datasSize), $this->_datasSize, $this->_map, $ignored); + if ($ignored!==false) { + $this->_datasSize=strlen($this->_datas)-strlen($ignored); + } + else + { + $this->_datasSize=strlen($this->_datas); + } + } +}
\ No newline at end of file diff --git a/h-source/External/swiftmailer/lib/classes/Swift/DependencyContainer.php b/h-source/External/swiftmailer/lib/classes/Swift/DependencyContainer.php new file mode 100644 index 0000000..b6ba554 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/DependencyContainer.php @@ -0,0 +1,349 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/DependencyException.php'; + +/** + * Dependency Injection container. + * @package Swift + * @author Chris Corbyn + */ +class Swift_DependencyContainer +{ + + /** Constant for literal value types */ + const TYPE_VALUE = 0x0001; + + /** Constant for new instance types */ + const TYPE_INSTANCE = 0x0010; + + /** Constant for shared instance types */ + const TYPE_SHARED = 0x0100; + + /** Constant for aliases */ + const TYPE_ALIAS = 0x1000; + + /** Singleton instance */ + private static $_instance = null; + + /** The data container */ + private $_store = array(); + + /** The current endpoint in the data container */ + private $_endPoint; + + /** + * Constructor should not be used. + * Use {@link getInstance()} instead. + */ + public function __construct() { } + + /** + * Returns a singleton of the DependencyContainer. + * @return Swift_DependencyContainer + */ + public static function getInstance() + { + if (!isset(self::$_instance)) + { + self::$_instance = new self(); + } + return self::$_instance; + } + + /** + * List the names of all items stored in the Container. + * @return array + */ + public function listItems() + { + return array_keys($this->_store); + } + + /** + * Test if an item is registered in this container with the given name. + * @param string $itemName + * @return boolean + * @see register() + */ + public function has($itemName) + { + return array_key_exists($itemName, $this->_store) + && isset($this->_store[$itemName]['lookupType']); + } + + /** + * Lookup the item with the given $itemName. + * @param string $itemName + * @return mixed + * @throws Swift_DependencyException If the dependency is not found + * @see register() + */ + public function lookup($itemName) + { + if (!$this->has($itemName)) + { + throw new Swift_DependencyException( + 'Cannot lookup dependency "' . $itemName . '" since it is not registered.' + ); + } + + switch ($this->_store[$itemName]['lookupType']) + { + case self::TYPE_ALIAS: + return $this->_createAlias($itemName); + case self::TYPE_VALUE: + return $this->_getValue($itemName); + case self::TYPE_INSTANCE: + return $this->_createNewInstance($itemName); + case self::TYPE_SHARED: + return $this->_createSharedInstance($itemName); + } + } + + /** + * Create an array of arguments passed to the constructor of $itemName. + * @param string $itemName + * @return array + */ + public function createDependenciesFor($itemName) + { + $args = array(); + if (isset($this->_store[$itemName]['args'])) + { + $args = $this->_resolveArgs($this->_store[$itemName]['args']); + } + return $args; + } + + /** + * Register a new dependency with $itemName. + * This method returns the current DependencyContainer instance because it + * requires the use of the fluid interface to set the specific details for the + * dependency. + * + * @param string $itemName + * @return Swift_DependencyContainer + * @see asNewInstanceOf(), asSharedInstanceOf(), asValue() + */ + public function register($itemName) + { + $this->_store[$itemName] = array(); + $this->_endPoint =& $this->_store[$itemName]; + return $this; + } + + /** + * Specify the previously registered item as a literal value. + * {@link register()} must be called before this will work. + * + * @param mixed $value + * @return Swift_DependencyContainer + */ + public function asValue($value) + { + $endPoint =& $this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_VALUE; + $endPoint['value'] = $value; + return $this; + } + + /** + * Specify the previously registered item as an alias of another item. + * @param string $lookup + * @return Swift_DependencyContainer + */ + public function asAliasOf($lookup) + { + $endPoint =& $this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_ALIAS; + $endPoint['ref'] = $lookup; + return $this; + } + + /** + * Specify the previously registered item as a new instance of $className. + * {@link register()} must be called before this will work. + * Any arguments can be set with {@link withDependencies()}, + * {@link addConstructorValue()} or {@link addConstructorLookup()}. + * + * @param string $className + * @return Swift_DependencyContainer + * @see withDependencies(), addConstructorValue(), addConstructorLookup() + */ + public function asNewInstanceOf($className) + { + $endPoint =& $this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_INSTANCE; + $endPoint['className'] = $className; + return $this; + } + + /** + * Specify the previously registered item as a shared instance of $className. + * {@link register()} must be called before this will work. + * @param string $className + * @return Swift_DependencyContainer + */ + public function asSharedInstanceOf($className) + { + $endPoint =& $this->_getEndPoint(); + $endPoint['lookupType'] = self::TYPE_SHARED; + $endPoint['className'] = $className; + return $this; + } + + /** + * Specify a list of injected dependencies for the previously registered item. + * This method takes an array of lookup names. + * + * @param array $lookups + * @return Swift_DependencyContainer + * @see addConstructorValue(), addConstructorLookup() + */ + public function withDependencies(array $lookups) + { + $endPoint =& $this->_getEndPoint(); + $endPoint['args'] = array(); + foreach ($lookups as $lookup) + { + $this->addConstructorLookup($lookup); + } + return $this; + } + + /** + * Specify a literal (non looked up) value for the constructor of the + * previously registered item. + * + * @param mixed $value + * @return Swift_DependencyContainer + * @see withDependencies(), addConstructorLookup() + */ + public function addConstructorValue($value) + { + $endPoint =& $this->_getEndPoint(); + if (!isset($endPoint['args'])) + { + $endPoint['args'] = array(); + } + $endPoint['args'][] = array('type' => 'value', 'item' => $value); + return $this; + } + + /** + * Specify a dependency lookup for the constructor of the previously + * registered item. + * + * @param string $lookup + * @return Swift_DependencyContainer + * @see withDependencies(), addConstructorValue() + */ + public function addConstructorLookup($lookup) + { + $endPoint =& $this->_getEndPoint(); + if (!isset($this->_endPoint['args'])) + { + $endPoint['args'] = array(); + } + $endPoint['args'][] = array('type' => 'lookup', 'item' => $lookup); + return $this; + } + + // -- Private methods + + /** Get the literal value with $itemName */ + private function _getValue($itemName) + { + return $this->_store[$itemName]['value']; + } + + /** Resolve an alias to another item */ + private function _createAlias($itemName) + { + return $this->lookup($this->_store[$itemName]['ref']); + } + + /** Create a fresh instance of $itemName */ + private function _createNewInstance($itemName) + { + $reflector = new ReflectionClass($this->_store[$itemName]['className']); + if ($reflector->getConstructor()) + { + return $reflector->newInstanceArgs( + $this->createDependenciesFor($itemName) + ); + } + else + { + return $reflector->newInstance(); + } + } + + /** Create and register a shared instance of $itemName */ + private function _createSharedInstance($itemName) + { + if (!isset($this->_store[$itemName]['instance'])) + { + $this->_store[$itemName]['instance'] = $this->_createNewInstance($itemName); + } + return $this->_store[$itemName]['instance']; + } + + /** Get the current endpoint in the store */ + private function &_getEndPoint() + { + if (!isset($this->_endPoint)) + { + throw new BadMethodCallException( + 'Component must first be registered by calling register()' + ); + } + return $this->_endPoint; + } + + /** Get an argument list with dependencies resolved */ + private function _resolveArgs(array $args) + { + $resolved = array(); + foreach ($args as $argDefinition) + { + switch ($argDefinition['type']) + { + case 'lookup': + $resolved[] = $this->_lookupRecursive($argDefinition['item']); + break; + case 'value': + $resolved[] = $argDefinition['item']; + break; + } + } + return $resolved; + } + + /** Resolve a single dependency with an collections */ + private function _lookupRecursive($item) + { + if (is_array($item)) + { + $collection = array(); + foreach ($item as $k => $v) + { + $collection[$k] = $this->_lookupRecursive($v); + } + return $collection; + } + else + { + return $this->lookup($item); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/DependencyException.php b/h-source/External/swiftmailer/lib/classes/Swift/DependencyException.php new file mode 100644 index 0000000..bb1681c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/DependencyException.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/SwiftException.php'; + +/** + * DependencyException thrown when a requested dependeny is missing. + * @package Swift + * @author Chris Corbyn + */ +class Swift_DependencyException extends Swift_SwiftException +{ + + /** + * Create a new DependencyException with $message. + * @param string $message + */ + public function __construct($message) + { + parent::__construct($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/EmbeddedFile.php b/h-source/External/swiftmailer/lib/classes/Swift/EmbeddedFile.php new file mode 100644 index 0000000..34d096c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/EmbeddedFile.php @@ -0,0 +1,73 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Attachment.php'; +//@require 'Swift/DependencyContainer.php'; +//@require 'Swift/ByteStream/FileByteStream.php'; + +/** + * An embedded file, in a multipart message. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_EmbeddedFile extends Swift_Mime_EmbeddedFile +{ + + /** + * Create a new EmbeddedFile. + * Details may be optionally provided to the constructor. + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + */ + public function __construct($data = null, $filename = null, + $contentType = null) + { + call_user_func_array( + array($this, 'Swift_Mime_EmbeddedFile::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('mime.embeddedfile') + ); + + $this->setBody($data); + $this->setFilename($filename); + if ($contentType) + { + $this->setContentType($contentType); + } + } + + /** + * Create a new EmbeddedFile. + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + * @return Swift_Mime_EmbeddedFile + */ + public static function newInstance($data = null, $filename = null, + $contentType = null) + { + return new self($data, $filename, $contentType); + } + + /** + * Create a new EmbeddedFile from a filesystem path. + * @param string $path + * @return Swift_Mime_EmbeddedFile + */ + public static function fromPath($path) + { + return self::newInstance()->setFile( + new Swift_ByteStream_FileByteStream($path) + ); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Encoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Encoder.php new file mode 100644 index 0000000..32aa96a --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Encoder.php @@ -0,0 +1,32 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/CharsetObserver.php'; + +/** + * Interface for all Encoder schemes. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +interface Swift_Encoder extends Swift_Mime_CharsetObserver +{ + + /** + * Encode a given string to produce an encoded string. + * @param string $string + * @param int $firstLineOffset if first line needs to be shorter + * @param int $maxLineLength - 0 indicates the default length for this encoding + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, + $maxLineLength = 0); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Encoder/Base64Encoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Encoder/Base64Encoder.php new file mode 100644 index 0000000..09c71ba --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Encoder/Base64Encoder.php @@ -0,0 +1,63 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Encoder.php'; + +/** + * Handles Base 64 Encoding in Swift Mailer. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +class Swift_Encoder_Base64Encoder implements Swift_Encoder +{ + + /** + * Takes an unencoded string and produces a Base64 encoded string from it. + * Base64 encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * @param string $string to encode + * @param int $firstLineOffset + * @param int $maxLineLength, optional, 0 indicates the default of 76 bytes + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, + $maxLineLength = 0) + { + if (0 >= $maxLineLength || 76 < $maxLineLength) + { + $maxLineLength = 76; + } + + $encodedString = base64_encode($string); + $firstLine = ''; + + if (0 != $firstLineOffset) + { + $firstLine = substr( + $encodedString, 0, $maxLineLength - $firstLineOffset + ) . "\r\n"; + $encodedString = substr( + $encodedString, $maxLineLength - $firstLineOffset + ); + } + + return $firstLine . trim(chunk_split($encodedString, $maxLineLength, "\r\n")); + } + + /** + * Does nothing. + */ + public function charsetChanged($charset) + { + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php new file mode 100644 index 0000000..6914f6c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php @@ -0,0 +1,263 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Encoder.php'; +//@require 'Swift/CharacterStream.php'; + +/** + * Handles Quoted Printable (QP) Encoding in Swift Mailer. + * Possibly the most accurate RFC 2045 QP implementation found in PHP. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +class Swift_Encoder_QpEncoder implements Swift_Encoder +{ + + /** + * The CharacterStream used for reading characters (as opposed to bytes). + * @var Swift_CharacterStream + * @access protected + */ + protected $_charStream; + + /** + * A filter used if input should be canonicalized. + * @var Swift_StreamFilter + * @access protected + */ + protected $_filter; + + /** + * Pre-computed QP for HUGE optmization. + * @var string[] + * @access protected + */ + protected static $_qpMap = array( + 0 => '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04', + 5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09', + 10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E', + 15 => '=0F', 16 => '=10', 17 => '=11', 18 => '=12', 19 => '=13', + 20 => '=14', 21 => '=15', 22 => '=16', 23 => '=17', 24 => '=18', + 25 => '=19', 26 => '=1A', 27 => '=1B', 28 => '=1C', 29 => '=1D', + 30 => '=1E', 31 => '=1F', 32 => '=20', 33 => '=21', 34 => '=22', + 35 => '=23', 36 => '=24', 37 => '=25', 38 => '=26', 39 => '=27', + 40 => '=28', 41 => '=29', 42 => '=2A', 43 => '=2B', 44 => '=2C', + 45 => '=2D', 46 => '=2E', 47 => '=2F', 48 => '=30', 49 => '=31', + 50 => '=32', 51 => '=33', 52 => '=34', 53 => '=35', 54 => '=36', + 55 => '=37', 56 => '=38', 57 => '=39', 58 => '=3A', 59 => '=3B', + 60 => '=3C', 61 => '=3D', 62 => '=3E', 63 => '=3F', 64 => '=40', + 65 => '=41', 66 => '=42', 67 => '=43', 68 => '=44', 69 => '=45', + 70 => '=46', 71 => '=47', 72 => '=48', 73 => '=49', 74 => '=4A', + 75 => '=4B', 76 => '=4C', 77 => '=4D', 78 => '=4E', 79 => '=4F', + 80 => '=50', 81 => '=51', 82 => '=52', 83 => '=53', 84 => '=54', + 85 => '=55', 86 => '=56', 87 => '=57', 88 => '=58', 89 => '=59', + 90 => '=5A', 91 => '=5B', 92 => '=5C', 93 => '=5D', 94 => '=5E', + 95 => '=5F', 96 => '=60', 97 => '=61', 98 => '=62', 99 => '=63', + 100 => '=64', 101 => '=65', 102 => '=66', 103 => '=67', 104 => '=68', + 105 => '=69', 106 => '=6A', 107 => '=6B', 108 => '=6C', 109 => '=6D', + 110 => '=6E', 111 => '=6F', 112 => '=70', 113 => '=71', 114 => '=72', + 115 => '=73', 116 => '=74', 117 => '=75', 118 => '=76', 119 => '=77', + 120 => '=78', 121 => '=79', 122 => '=7A', 123 => '=7B', 124 => '=7C', + 125 => '=7D', 126 => '=7E', 127 => '=7F', 128 => '=80', 129 => '=81', + 130 => '=82', 131 => '=83', 132 => '=84', 133 => '=85', 134 => '=86', + 135 => '=87', 136 => '=88', 137 => '=89', 138 => '=8A', 139 => '=8B', + 140 => '=8C', 141 => '=8D', 142 => '=8E', 143 => '=8F', 144 => '=90', + 145 => '=91', 146 => '=92', 147 => '=93', 148 => '=94', 149 => '=95', + 150 => '=96', 151 => '=97', 152 => '=98', 153 => '=99', 154 => '=9A', + 155 => '=9B', 156 => '=9C', 157 => '=9D', 158 => '=9E', 159 => '=9F', + 160 => '=A0', 161 => '=A1', 162 => '=A2', 163 => '=A3', 164 => '=A4', + 165 => '=A5', 166 => '=A6', 167 => '=A7', 168 => '=A8', 169 => '=A9', + 170 => '=AA', 171 => '=AB', 172 => '=AC', 173 => '=AD', 174 => '=AE', + 175 => '=AF', 176 => '=B0', 177 => '=B1', 178 => '=B2', 179 => '=B3', + 180 => '=B4', 181 => '=B5', 182 => '=B6', 183 => '=B7', 184 => '=B8', + 185 => '=B9', 186 => '=BA', 187 => '=BB', 188 => '=BC', 189 => '=BD', + 190 => '=BE', 191 => '=BF', 192 => '=C0', 193 => '=C1', 194 => '=C2', + 195 => '=C3', 196 => '=C4', 197 => '=C5', 198 => '=C6', 199 => '=C7', + 200 => '=C8', 201 => '=C9', 202 => '=CA', 203 => '=CB', 204 => '=CC', + 205 => '=CD', 206 => '=CE', 207 => '=CF', 208 => '=D0', 209 => '=D1', + 210 => '=D2', 211 => '=D3', 212 => '=D4', 213 => '=D5', 214 => '=D6', + 215 => '=D7', 216 => '=D8', 217 => '=D9', 218 => '=DA', 219 => '=DB', + 220 => '=DC', 221 => '=DD', 222 => '=DE', 223 => '=DF', 224 => '=E0', + 225 => '=E1', 226 => '=E2', 227 => '=E3', 228 => '=E4', 229 => '=E5', + 230 => '=E6', 231 => '=E7', 232 => '=E8', 233 => '=E9', 234 => '=EA', + 235 => '=EB', 236 => '=EC', 237 => '=ED', 238 => '=EE', 239 => '=EF', + 240 => '=F0', 241 => '=F1', 242 => '=F2', 243 => '=F3', 244 => '=F4', + 245 => '=F5', 246 => '=F6', 247 => '=F7', 248 => '=F8', 249 => '=F9', + 250 => '=FA', 251 => '=FB', 252 => '=FC', 253 => '=FD', 254 => '=FE', + 255 => '=FF' + ); + + /** + * A map of non-encoded ascii characters. + * @var string[] + * @access protected + */ + protected static $_safeMap = array(); + + /** + * Creates a new QpEncoder for the given CharacterStream. + * @param Swift_CharacterStream $charStream to use for reading characters + * @param Swift_StreamFilter $filter if input should be canonicalized + */ + public function __construct(Swift_CharacterStream $charStream, + Swift_StreamFilter $filter = null) + { + $this->_charStream = $charStream; + if (empty(self::$_safeMap)) + { + foreach (array_merge( + array(0x09, 0x20), range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) + { + self::$_safeMap[$byte] = chr($byte); + } + } + $this->_filter = $filter; + } + + /** + * Takes an unencoded string and produces a QP encoded string from it. + * QP encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * @param string $string to encode + * @param int $firstLineOffset, optional + * @param int $maxLineLength, optional, 0 indicates the default of 76 chars + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, + $maxLineLength = 0) + { + if ($maxLineLength > 76 || $maxLineLength <= 0) + { + $maxLineLength = 76; + } + + $thisLineLength = $maxLineLength - $firstLineOffset; + + $lines = array(); + $lNo = 0; + $lines[$lNo] = ''; + $currentLine =& $lines[$lNo++]; + $size=$lineLen=0; + + $this->_charStream->flushContents(); + $this->_charStream->importString($string); + + //Fetching more than 4 chars at one is slower, as is fetching fewer bytes + // Conveniently 4 chars is the UTF-8 safe number since UTF-8 has up to 6 + // bytes per char and (6 * 4 * 3 = 72 chars per line) * =NN is 3 bytes + while (false !== $bytes = $this->_nextSequence()) + { + //If we're filtering the input + if (isset($this->_filter)) + { + //If we can't filter because we need more bytes + while ($this->_filter->shouldBuffer($bytes)) + { + //Then collect bytes into the buffer + if (false === $moreBytes = $this->_nextSequence(1)) + { + break; + } + + foreach ($moreBytes as $b) + { + $bytes[] = $b; + } + } + //And filter them + $bytes = $this->_filter->filter($bytes); + } + + $enc = $this->_encodeByteSequence($bytes, $size); + if ($currentLine && $lineLen+$size >= $thisLineLength) + { + $lines[$lNo] = ''; + $currentLine =& $lines[$lNo++]; + $thisLineLength = $maxLineLength; + $lineLen=0; + } + $lineLen+=$size; + $currentLine .= $enc; + } + + return $this->_standardize(implode("=\r\n", $lines)); + } + + /** + * Updates the charset used. + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_charStream->setCharacterSet($charset); + } + + // -- Protected methods + + /** + * Encode the given byte array into a verbatim QP form. + * @param int[] $bytes + * @return string + * @access protected + */ + protected function _encodeByteSequence(array $bytes, &$size) + { + $ret = ''; + $size=0; + foreach ($bytes as $b) + { + if (isset(self::$_safeMap[$b])) + { + $ret .= self::$_safeMap[$b]; + ++$size; + } + else + { + $ret .= self::$_qpMap[$b]; + $size+=3; + } + } + return $ret; + } + + /** + * Get the next sequence of bytes to read from the char stream. + * @param int $size number of bytes to read + * @return int[] + * @access protected + */ + protected function _nextSequence($size = 4) + { + return $this->_charStream->readBytes($size); + } + + /** + * Make sure CRLF is correct and HT/SPACE are in valid places. + * @param string $string + * @return string + * @access protected + */ + protected function _standardize($string) + { + $string = str_replace(array("\t=0D=0A", " =0D=0A", "=0D=0A"), + array("=09\r\n", "=20\r\n", "\r\n"), $string + ); + switch ($end = ord(substr($string, -1))) + { + case 0x09: + case 0x20: + $string = substr_replace($string, self::$_qpMap[$end], -1); + } + return $string; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php new file mode 100644 index 0000000..febc6ba --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php @@ -0,0 +1,89 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Encoder.php'; +//@require 'Swift/CharacterStream.php'; + +/** + * Handles RFC 2231 specified Encoding in Swift Mailer. + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +class Swift_Encoder_Rfc2231Encoder implements Swift_Encoder +{ + + /** + * A character stream to use when reading a string as characters instead of bytes. + * @var Swift_CharacterStream + * @access private + */ + private $_charStream; + + /** + * Creates a new Rfc2231Encoder using the given character stream instance. + * @param Swift_CharacterStream + */ + public function __construct(Swift_CharacterStream $charStream) + { + $this->_charStream = $charStream; + } + + /** + * Takes an unencoded string and produces a string encoded according to + * RFC 2231 from it. + * @param string $string to encode + * @param int $firstLineOffset + * @param int $maxLineLength, optional, 0 indicates the default of 75 bytes + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, + $maxLineLength = 0) + { + $lines = array(); $lineCount = 0; + $lines[] = ''; + $currentLine =& $lines[$lineCount++]; + + if (0 >= $maxLineLength) + { + $maxLineLength = 75; + } + + $this->_charStream->flushContents(); + $this->_charStream->importString($string); + + $thisLineLength = $maxLineLength - $firstLineOffset; + + while (false !== $char = $this->_charStream->read(4)) + { + $encodedChar = rawurlencode($char); + if (0 != strlen($currentLine) + && strlen($currentLine . $encodedChar) > $thisLineLength) + { + $lines[] = ''; + $currentLine =& $lines[$lineCount++]; + $thisLineLength = $maxLineLength; + } + $currentLine .= $encodedChar; + } + + return implode("\r\n", $lines); + } + + /** + * Updates the charset used. + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_charStream->setCharacterSet($charset); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Encoding.php b/h-source/External/swiftmailer/lib/classes/Swift/Encoding.php new file mode 100644 index 0000000..1849a82 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Encoding.php @@ -0,0 +1,70 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/DependencyContainer.php'; + +/** + * Provides quick access to each encoding type. + * + * @package Swift + * @subpackage Encoder + * @author Chris Corbyn + */ +class Swift_Encoding +{ + + /** + * Get the Encoder that provides 7-bit encoding. + * + * @return Swift_Mime_ContentEncoder + */ + public static function get7BitEncoding() + { + return self::_lookup('mime.7bitcontentencoder'); + } + + /** + * Get the Encoder that provides 8-bit encoding. + * + * @return Swift_Mime_ContentEncoder + */ + public static function get8BitEncoding() + { + return self::_lookup('mime.8bitcontentencoder'); + } + + /** + * Get the Encoder that provides Quoted-Printable (QP) encoding. + * + * @return Swift_Mime_ContentEncoder + */ + public static function getQpEncoding() + { + return self::_lookup('mime.qpcontentencoder'); + } + + /** + * Get the Encoder that provides Base64 encoding. + * + * @return Swift_Mime_ContentEncoder + */ + public static function getBase64Encoding() + { + return self::_lookup('mime.base64contentencoder'); + } + + // -- Private Static Methods + + private static function _lookup($key) + { + return Swift_DependencyContainer::getInstance()->lookup($key); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/CommandEvent.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/CommandEvent.php new file mode 100644 index 0000000..73eb585 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/CommandEvent.php @@ -0,0 +1,67 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventObject.php'; +//@require 'Swift/Transport.php'; + +/** + * Generated when a command is sent over an SMTP connection. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_CommandEvent extends Swift_Events_EventObject +{ + + /** + * The command sent to the server. + * @var string + */ + private $_command; + + /** + * An array of codes which a successful response will contain. + * @var int[] + */ + private $_successCodes = array(); + + /** + * Create a new CommandEvent for $source with $command. + * @param Swift_Transport $source + * @param string $command + * @param array $successCodes + */ + public function __construct(Swift_Transport $source, + $command, $successCodes = array()) + { + parent::__construct($source); + $this->_command = $command; + $this->_successCodes = $successCodes; + } + + /** + * Get the command which was sent to the server. + * @return string + */ + public function getCommand() + { + return $this->_command; + } + + /** + * Get the numeric response codes which indicate success for this command. + * @return int[] + */ + public function getSuccessCodes() + { + return $this->_successCodes; + } + +}
\ No newline at end of file diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/CommandListener.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/CommandListener.php new file mode 100644 index 0000000..2fd7117 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/CommandListener.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Events/CommandEvent.php'; + +/** + * Listens for Transports to send commands to the server. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_CommandListener extends Swift_Events_EventListener +{ + + /** + * Invoked immediately following a command being sent. + * @param Swift_Events_ResponseEvent $evt + */ + public function commandSent(Swift_Events_CommandEvent $evt); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/Event.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/Event.php new file mode 100644 index 0000000..c6726a7 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/Event.php @@ -0,0 +1,39 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * The minimum interface for an Event. + * + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_Event +{ + + /** + * Get the source object of this event. + * @return object + */ + public function getSource(); + + /** + * Prevent this Event from bubbling any further up the stack. + * @param boolean $cancel, optional + */ + public function cancelBubble($cancel = true); + + /** + * Returns true if this Event will not bubble any further up the stack. + * @return boolean + */ + public function bubbleCancelled(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php new file mode 100644 index 0000000..aaf1211 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php @@ -0,0 +1,81 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Event.php'; + +/** + * Interface for the EventDispatcher which handles the event dispatching layer. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_EventDispatcher +{ + + /** + * Create a new SendEvent for $source and $message. + * @param Swift_Transport $source + * @param Swift_Mime_Message + * @return Swift_Events_SendEvent + */ + public function createSendEvent(Swift_Transport $source, + Swift_Mime_Message $message); + + /** + * Create a new CommandEvent for $source and $command. + * @param Swift_Transport $source + * @param string $command That will be executed + * @param array $successCodes That are needed + * @return Swift_Events_CommandEvent + */ + public function createCommandEvent(Swift_Transport $source, + $command, $successCodes = array()); + + /** + * Create a new ResponseEvent for $source and $response. + * @param Swift_Transport $source + * @param string $response + * @param boolean $valid If the response is valid + * @return Swift_Events_ResponseEvent + */ + public function createResponseEvent(Swift_Transport $source, + $response, $valid); + + /** + * Create a new TransportChangeEvent for $source. + * @param Swift_Transport $source + * @return Swift_Events_TransportChangeEvent + */ + public function createTransportChangeEvent(Swift_Transport $source); + + /** + * Create a new TransportExceptionEvent for $source. + * @param Swift_Transport $source + * @param Swift_TransportException $ex + * @return Swift_Events_TransportExceptionEvent + */ + public function createTransportExceptionEvent(Swift_Transport $source, + Swift_TransportException $ex); + + /** + * Bind an event listener to this dispatcher. + * @param Swift_Events_EventListener $listener + */ + public function bindEventListener(Swift_Events_EventListener $listener); + + /** + * Dispatch the given Event to all suitable listeners. + * @param Swift_Events_EventObject $evt + * @param string $target method + */ + public function dispatchEvent(Swift_Events_EventObject $evt, $target); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/EventListener.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/EventListener.php new file mode 100644 index 0000000..00fb799 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/EventListener.php @@ -0,0 +1,19 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * An identity interface which all EventListeners must extend. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_EventListener +{ +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/EventObject.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/EventObject.php new file mode 100644 index 0000000..5d494fe --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/EventObject.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/Event.php'; + +/** + * A base Event which all Event classes inherit from. + * + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_EventObject implements Swift_Events_Event +{ + + /** The source of this Event */ + private $_source; + + /** The state of this Event (should it bubble up the stack?) */ + private $_bubbleCancelled = false; + + /** + * Create a new EventObject originating at $source. + * @param object $source + */ + public function __construct($source) + { + $this->_source = $source; + } + + /** + * Get the source object of this event. + * @return object + */ + public function getSource() + { + return $this->_source; + } + + /** + * Prevent this Event from bubbling any further up the stack. + * @param boolean $cancel, optional + */ + public function cancelBubble($cancel = true) + { + $this->_bubbleCancelled = $cancel; + } + + /** + * Returns true if this Event will not bubble any further up the stack. + * @return boolean + */ + public function bubbleCancelled() + { + return $this->_bubbleCancelled; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php new file mode 100644 index 0000000..addf9e7 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventObject.php'; + +/** + * Generated when a response is received on a SMTP connection. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_ResponseEvent extends Swift_Events_EventObject +{ + + /** + * The overall result. + * @var boolean + */ + private $_valid; + + /** + * The response received from the server. + * @var string + */ + private $_response; + + /** + * Create a new ResponseEvent for $source and $response. + * @param Swift_Transport $source + * @param string $response + * @param boolean $valid + */ + public function __construct(Swift_Transport $source, $response, $valid = false) + { + parent::__construct($source); + $this->_response = $response; + $this->_valid = $valid; + } + + /** + * Get the response which was received from the server. + * @return string + */ + public function getResponse() + { + return $this->_response; + } + + /** + * Get the success status of this Event. + * @return boolean + */ + public function isValid() + { + return $this->_valid; + } + +}
\ No newline at end of file diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/ResponseListener.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/ResponseListener.php new file mode 100644 index 0000000..092385b --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/ResponseListener.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Events/ResponseEvent.php'; + +/** + * Listens for responses from a remote SMTP server. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_ResponseListener extends Swift_Events_EventListener +{ + + /** + * Invoked immediately following a response coming back. + * @param Swift_Events_ResponseEvent $evt + */ + public function responseReceived(Swift_Events_ResponseEvent $evt); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/SendEvent.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/SendEvent.php new file mode 100644 index 0000000..49a8351 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/SendEvent.php @@ -0,0 +1,127 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventObject.php'; + +/** + * Generated when a message is being sent. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_SendEvent extends Swift_Events_EventObject +{ + + /** Sending has yet to occur */ + const RESULT_PENDING = 0x0001; + + /** Sending was successful */ + const RESULT_SUCCESS = 0x0010; + + /** Sending worked, but there were some failures */ + const RESULT_TENTATIVE = 0x0100; + + /** Sending failed */ + const RESULT_FAILED = 0x1000; + + /** + * The Message being sent. + * @var Swift_Mime_Message + */ + private $_message; + + /** + * The Transport used in sending. + * @var Swift_Transport + */ + private $_transport; + + /** + * Any recipients which failed after sending. + * @var string[] + */ + private $failedRecipients = array(); + + /** + * The overall result as a bitmask from the class constants. + * @var int + */ + private $result; + + /** + * Create a new SendEvent for $source and $message. + * @param Swift_Transport $source + * @param Swift_Mime_Message $message + */ + public function __construct(Swift_Transport $source, + Swift_Mime_Message $message) + { + parent::__construct($source); + $this->_message = $message; + $this->_result = self::RESULT_PENDING; + } + + /** + * Get the Transport used to send the Message. + * @return Swift_Transport + */ + public function getTransport() + { + return $this->getSource(); + } + + /** + * Get the Message being sent. + * @return Swift_Mime_Message + */ + public function getMessage() + { + return $this->_message; + } + + /** + * Set the array of addresses that failed in sending. + * @param array $recipients + */ + public function setFailedRecipients($recipients) + { + $this->_failedRecipients = $recipients; + } + + /** + * Get an recipient addresses which were not accepted for delivery. + * @return string[] + */ + public function getFailedRecipients() + { + return $this->_failedRecipients; + } + + /** + * Set the result of sending. + * @return int + */ + public function setResult($result) + { + $this->_result = $result; + } + + /** + * Get the result of this Event. + * The return value is a bitmask from + * {@link RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} + * @return int + */ + public function getResult() + { + return $this->_result; + } + +}
\ No newline at end of file diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/SendListener.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/SendListener.php new file mode 100644 index 0000000..a8f0cc3 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/SendListener.php @@ -0,0 +1,35 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Events/SendEvent.php'; + +/** + * Listens for Messages being sent from within the Transport system. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_SendListener extends Swift_Events_EventListener +{ + + /** + * Invoked immediately before the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt); + + /** + * Invoked immediately after the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php new file mode 100644 index 0000000..3e6c0be --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php @@ -0,0 +1,175 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventDispatcher.php'; +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Events/EventObject.php'; +//@require 'Swift/Events/CommandEvent.php'; +//@require 'Swift/Events/ResponseEvent.php'; +//@require 'Swift/Events/SendEvent.php'; +//@require 'Swift/Events/TransportChangeEvent.php'; +//@require 'Swift/Events/TransportExceptionEvent.php'; + +/** + * The EventDispatcher which handles the event dispatching layer. + * + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_SimpleEventDispatcher implements Swift_Events_EventDispatcher +{ + + /** A map of event types to their associated listener types */ + private $_eventMap = array(); + + /** Event listeners bound to this dispatcher */ + private $_listeners = array(); + + /** Listeners queued to have an Event bubbled up the stack to them */ + private $_bubbleQueue = array(); + + /** + * Create a new EventDispatcher. + */ + public function __construct() + { + $this->_eventMap = array( + 'Swift_Events_CommandEvent' => 'Swift_Events_CommandListener', + 'Swift_Events_ResponseEvent' => 'Swift_Events_ResponseListener', + 'Swift_Events_SendEvent' => 'Swift_Events_SendListener', + 'Swift_Events_TransportChangeEvent' => 'Swift_Events_TransportChangeListener', + 'Swift_Events_TransportExceptionEvent' => 'Swift_Events_TransportExceptionListener' + ); + } + + /** + * Create a new SendEvent for $source and $message. + * + * @param Swift_Transport $source + * @param Swift_Mime_Message + * @return Swift_Events_SendEvent + */ + public function createSendEvent(Swift_Transport $source, + Swift_Mime_Message $message) + { + return new Swift_Events_SendEvent($source, $message); + } + + /** + * Create a new CommandEvent for $source and $command. + * + * @param Swift_Transport $source + * @param string $command That will be executed + * @param array $successCodes That are needed + * @return Swift_Events_CommandEvent + */ + public function createCommandEvent(Swift_Transport $source, + $command, $successCodes = array()) + { + return new Swift_Events_CommandEvent($source, $command, $successCodes); + } + + /** + * Create a new ResponseEvent for $source and $response. + * + * @param Swift_Transport $source + * @param string $response + * @param boolean $valid If the response is valid + * @return Swift_Events_ResponseEvent + */ + public function createResponseEvent(Swift_Transport $source, + $response, $valid) + { + return new Swift_Events_ResponseEvent($source, $response, $valid); + } + + /** + * Create a new TransportChangeEvent for $source. + * + * @param Swift_Transport $source + * @return Swift_Events_TransportChangeEvent + */ + public function createTransportChangeEvent(Swift_Transport $source) + { + return new Swift_Events_TransportChangeEvent($source); + } + + /** + * Create a new TransportExceptionEvent for $source. + * + * @param Swift_Transport $source + * @param Swift_TransportException $ex + * @return Swift_Events_TransportExceptionEvent + */ + public function createTransportExceptionEvent(Swift_Transport $source, + Swift_TransportException $ex) + { + return new Swift_Events_TransportExceptionEvent($source, $ex); + } + + /** + * Bind an event listener to this dispatcher. + * + * @param Swift_Events_EventListener $listener + */ + public function bindEventListener(Swift_Events_EventListener $listener) + { + foreach ($this->_listeners as $l) + { + //Already loaded + if ($l === $listener) + { + return; + } + } + $this->_listeners[] = $listener; + } + + /** + * Dispatch the given Event to all suitable listeners. + * + * @param Swift_Events_EventObject $evt + * @param string $target method + */ + public function dispatchEvent(Swift_Events_EventObject $evt, $target) + { + $this->_prepareBubbleQueue($evt); + $this->_bubble($evt, $target); + } + + // -- Private methods + + /** Queue listeners on a stack ready for $evt to be bubbled up it */ + private function _prepareBubbleQueue(Swift_Events_EventObject $evt) + { + $this->_bubbleQueue = array(); + $evtClass = get_class($evt); + foreach ($this->_listeners as $listener) + { + if (array_key_exists($evtClass, $this->_eventMap) + && ($listener instanceof $this->_eventMap[$evtClass])) + { + $this->_bubbleQueue[] = $listener; + } + } + } + + /** Bubble $evt up the stack calling $target() on each listener */ + private function _bubble(Swift_Events_EventObject $evt, $target) + { + if (!$evt->bubbleCancelled() && $listener = array_shift($this->_bubbleQueue)) + { + $listener->$target($evt); + $this->_bubble($evt, $target); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php new file mode 100644 index 0000000..f069a4c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventObject.php'; + +/** + * Generated when the state of a Transport is changed (i.e. stopped/started). + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_TransportChangeEvent extends Swift_Events_EventObject +{ + + /** + * Get the Transport. + * @return Swift_Transport + */ + public function getTransport() + { + return $this->getSource(); + } + +}
\ No newline at end of file diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php new file mode 100644 index 0000000..ba729d0 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php @@ -0,0 +1,53 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Events/TransportChangeEvent.php'; + +/** + * Listens for changes within the Transport system. + * + * @package Swift + * @subpackage Events + * + * @author Chris Corbyn + */ +interface Swift_Events_TransportChangeListener extends Swift_Events_EventListener +{ + + /** + * Invoked just before a Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt); + + /** + * Invoked immediately after the Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt); + + /** + * Invoked just before a Transport is stopped. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt); + + /** + * Invoked immediately after the Transport is stopped. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php new file mode 100644 index 0000000..a1bf7d2 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php @@ -0,0 +1,50 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventObject.php'; +//@require 'Swift/TransportException.php'; + +/** + * Generated when a TransportException is thrown from the Transport system. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +class Swift_Events_TransportExceptionEvent extends Swift_Events_EventObject +{ + + /** + * The Exception thrown. + * @var Swift_TransportException + */ + private $_exception; + + /** + * Create a new TransportExceptionEvent for $transport. + * @param Swift_Transport $transport + * @param Swift_TransportException $ex + */ + public function __construct(Swift_Transport $transport, + Swift_TransportException $ex) + { + parent::__construct($transport); + $this->_exception = $ex; + } + + /** + * Get the TransportException thrown. + * @return Swift_TransportException + */ + public function getException() + { + return $this->_exception; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php new file mode 100644 index 0000000..d6dce94 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/EventListener.php'; +//@require 'Swift/Events/TransportExceptionEvent.php'; + +/** + * Listens for Exceptions thrown from within the Transport system. + * @package Swift + * @subpackage Events + * @author Chris Corbyn + */ +interface Swift_Events_TransportExceptionListener + extends Swift_Events_EventListener +{ + + /** + * Invoked as a TransportException is thrown in the Transport system. + * @param Swift_Events_TransportExceptionEvent $evt + */ + public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/FailoverTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/FailoverTransport.php new file mode 100644 index 0000000..6e6b7a8 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/FailoverTransport.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/FailoverTransport.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * Contains a list of redundant Transports so when one fails, the next is used. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_FailoverTransport extends Swift_Transport_FailoverTransport +{ + + /** + * Creates a new FailoverTransport with $transports. + * @param array $transports + */ + public function __construct($transports = array()) + { + call_user_func_array( + array($this, 'Swift_Transport_FailoverTransport::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.failover') + ); + + $this->setTransports($transports); + } + + /** + * Create a new FailoverTransport instance. + * @param string $transports + * @return Swift_FailoverTransport + */ + public static function newInstance($transports = array()) + { + return new self($transports); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/FileStream.php b/h-source/External/swiftmailer/lib/classes/Swift/FileStream.php new file mode 100644 index 0000000..a7f894d --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/FileStream.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/OutputByteStream.php'; + +/** + * An OutputByteStream which specifically reads from a file. + * @package Swift + * @subpackage ByteStream + * @author Chris Corbyn + */ +interface Swift_FileStream extends Swift_OutputByteStream +{ + + /** + * Get the complete path to the file. + * @return string + */ + public function getPath(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Filterable.php b/h-source/External/swiftmailer/lib/classes/Swift/Filterable.php new file mode 100644 index 0000000..c047967 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Filterable.php @@ -0,0 +1,34 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/StreamFilter.php'; + +/** + * Allows StreamFilters to operate on a stream. + * @package Swift + * @author Chris Corbyn + */ +interface Swift_Filterable +{ + + /** + * Add a new StreamFilter, referenced by $key. + * @param Swift_StreamFilter $filter + * @param string $key + */ + public function addFilter(Swift_StreamFilter $filter, $key); + + /** + * Remove an existing filter using $key. + * @param string $key + */ + public function removeFilter($key); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Image.php b/h-source/External/swiftmailer/lib/classes/Swift/Image.php new file mode 100644 index 0000000..c161d7a --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Image.php @@ -0,0 +1,62 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Image.php'; +//@require 'Swift/ByteStream/FileByteStream.php'; + +/** + * An image, embedded in a multipart message. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Image extends Swift_EmbeddedFile +{ + + /** + * Create a new EmbeddedFile. + * Details may be optionally provided to the constructor. + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + */ + public function __construct($data = null, $filename = null, + $contentType = null) + { + parent::__construct($data, $filename, $contentType); + } + + /** + * Create a new Image. + * @param string|Swift_OutputByteStream $data + * @param string $filename + * @param string $contentType + * @return Swift_Mime_EmbeddedFile + */ + public static function newInstance($data = null, $filename = null, + $contentType = null) + { + return new self($data, $filename, $contentType); + } + + /** + * Create a new Image from a filesystem path. + * @param string $path + * @return Swift_Mime_EmbeddedFile + */ + public static function fromPath($path) + { + $image = self::newInstance()->setFile( + new Swift_ByteStream_FileByteStream($path) + ); + return $image; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php b/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php new file mode 100644 index 0000000..e8f45f4 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php @@ -0,0 +1,72 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * An abstract means of writing data. + * Classes implementing this interface may use a subsystem which requires less + * memory than working with large strings of data. + * @package Swift + * @subpackage ByteStream + * @author Chris Corbyn + */ +interface Swift_InputByteStream +{ + + /** + * Writes $bytes to the end of the stream. + * + * Writing may not happen immediately if the stream chooses to buffer. If + * you want to write these bytes with immediate effect, call {@link commit()} + * after calling write(). + * + * This method returns the sequence ID of the write (i.e. 1 for first, 2 for + * second, etc etc). + * + * @param string $bytes + * @return int + * @throws Swift_IoException + */ + public function write($bytes); + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + * + * @throws Swift_IoException + */ + public function commit(); + + /** + * Attach $is to this stream. + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is); + + /** + * Remove an already bound stream. + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is); + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * @throws Swift_IoException + */ + public function flushBuffers(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/IoException.php b/h-source/External/swiftmailer/lib/classes/Swift/IoException.php new file mode 100644 index 0000000..88a5b0d --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/IoException.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/SwiftException.php'; + +/** + * I/O Exception class. + * @package Swift + * @author Chris Corbyn + */ +class Swift_IoException extends Swift_SwiftException +{ + + /** + * Create a new IoException with $message. + * @param string $message + */ + public function __construct($message) + { + parent::__construct($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/KeyCache.php b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache.php new file mode 100644 index 0000000..b942663 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache.php @@ -0,0 +1,99 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStream.php'; + +/** + * Provides a mechanism for storing data using two keys. + * @package Swift + * @subpackage KeyCache + * @author Chris Corbyn + */ +interface Swift_KeyCache +{ + + /** Mode for replacing existing cached data */ + const MODE_WRITE = 1; + + /** Mode for appending data to the end of existing cached data */ + const MODE_APPEND = 2; + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + */ + public function setString($nsKey, $itemKey, $string, $mode); + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param Swift_OutputByteStream $os + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, + $mode); + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * NOTE: The stream will always write in append mode. + * If the optional third parameter is passed all writes will go through $is. + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is, optional + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, + Swift_InputByteStream $is = null); + + /** + * Get data back out of the cache as a string. + * @param string $nsKey + * @param string $itemKey + * @return string + */ + public function getString($nsKey, $itemKey); + + /** + * Get data back out of the cache as a ByteStream. + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is); + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @return boolean + */ + public function hasKey($nsKey, $itemKey); + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey); + + /** + * Clear all data in the namespace $nsKey if it exists. + * @param string $nsKey + */ + public function clearAll($nsKey); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php new file mode 100644 index 0000000..fe3b7c9 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php @@ -0,0 +1,209 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/KeyCache.php'; +//@require 'Swift/KeyCacheInputStream.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStrean.php'; +//@require 'Swift/SwiftException.php'; + +/** + * A basic KeyCache backed by an array. + * @package Swift + * @subpackage KeyCache + * @author Chris Corbyn + */ +class Swift_KeyCache_ArrayKeyCache implements Swift_KeyCache +{ + + /** + * Cache contents. + * @var array + * @access private + */ + private $_contents = array(); + + /** + * An InputStream for cloning. + * @var Swift_KeyCache_KeyCacheInputStream + * @access private + */ + private $_stream; + + /** + * Create a new ArrayKeyCache with the given $stream for cloning to make + * InputByteStreams. + * @param Swift_KeyCache_KeyCacheInputStream $stream + */ + public function __construct(Swift_KeyCache_KeyCacheInputStream $stream) + { + $this->_stream = $stream; + } + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) + { + case self::MODE_WRITE: + $this->_contents[$nsKey][$itemKey] = $string; + break; + case self::MODE_APPEND: + if (!$this->hasKey($nsKey, $itemKey)) + { + $this->_contents[$nsKey][$itemKey] = ''; + } + $this->_contents[$nsKey][$itemKey] .= $string; + break; + default: + throw new Swift_SwiftException( + 'Invalid mode [' . $mode . '] used to set nsKey='. + $nsKey . ', itemKey=' . $itemKey + ); + } + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param Swift_OutputByteStream $os + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, + $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) + { + case self::MODE_WRITE: + $this->clearKey($nsKey, $itemKey); + case self::MODE_APPEND: + if (!$this->hasKey($nsKey, $itemKey)) + { + $this->_contents[$nsKey][$itemKey] = ''; + } + while (false !== $bytes = $os->read(8192)) + { + $this->_contents[$nsKey][$itemKey] .= $bytes; + } + break; + default: + throw new Swift_SwiftException( + 'Invalid mode [' . $mode . '] used to set nsKey='. + $nsKey . ', itemKey=' . $itemKey + ); + } + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * NOTE: The stream will always write in append mode. + * @param string $nsKey + * @param string $itemKey + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, + Swift_InputByteStream $writeThrough = null) + { + $is = clone $this->_stream; + $is->setKeyCache($this); + $is->setNsKey($nsKey); + $is->setItemKey($itemKey); + if (isset($writeThrough)) + { + $is->setWriteThroughStream($writeThrough); + } + return $is; + } + + /** + * Get data back out of the cache as a string. + * @param string $nsKey + * @param string $itemKey + * @return string + */ + public function getString($nsKey, $itemKey) + { + $this->_prepareCache($nsKey); + if ($this->hasKey($nsKey, $itemKey)) + { + return $this->_contents[$nsKey][$itemKey]; + } + } + + /** + * Get data back out of the cache as a ByteStream. + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + $this->_prepareCache($nsKey); + $is->write($this->getString($nsKey, $itemKey)); + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @return boolean + */ + public function hasKey($nsKey, $itemKey) + { + $this->_prepareCache($nsKey); + return array_key_exists($itemKey, $this->_contents[$nsKey]); + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + unset($this->_contents[$nsKey][$itemKey]); + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * @param string $nsKey + */ + public function clearAll($nsKey) + { + unset($this->_contents[$nsKey]); + } + + // -- Private methods + + /** + * Initialize the namespace of $nsKey if needed. + * @param string $nsKey + * @access private + */ + private function _prepareCache($nsKey) + { + if (!array_key_exists($nsKey, $this->_contents)) + { + $this->_contents[$nsKey] = array(); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php new file mode 100644 index 0000000..599fd6c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php @@ -0,0 +1,316 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/KeyCache.php'; +//@require 'Swift/KeyCacheInputStream.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStrean.php'; +//@require 'Swift/SwiftException.php'; +//@require 'Swift/IoException.php'; + +/** + * A KeyCache which streams to and from disk. + * @package Swift + * @subpackage KeyCache + * @author Chris Corbyn + */ +class Swift_KeyCache_DiskKeyCache implements Swift_KeyCache +{ + + /** Signal to place pointer at start of file */ + const POSITION_START = 0; + + /** Signal to place pointer at end of file */ + const POSITION_END = 1; + + /** + * An InputStream for cloning. + * @var Swift_KeyCache_KeyCacheInputStream + * @access private + */ + private $_stream; + + /** + * A path to write to. + * @var string + * @access private + */ + private $_path; + + /** + * Stored keys. + * @var array + * @access private + */ + private $_keys = array(); + + /** + * Will be true if magic_quotes_runtime is turned on. + * @var boolean + * @access private + */ + private $_quotes = false; + + /** + * Create a new DiskKeyCache with the given $stream for cloning to make + * InputByteStreams, and the given $path to save to. + * @param Swift_KeyCache_KeyCacheInputStream $stream + * @param string $path to save to + */ + public function __construct(Swift_KeyCache_KeyCacheInputStream $stream, $path) + { + $this->_stream = $stream; + $this->_path = $path; + $this->_quotes = get_magic_quotes_runtime(); + } + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + * @throws Swift_IoException + * @see MODE_WRITE, MODE_APPEND + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) + { + case self::MODE_WRITE: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + break; + case self::MODE_APPEND: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); + break; + default: + throw new Swift_SwiftException( + 'Invalid mode [' . $mode . '] used to set nsKey='. + $nsKey . ', itemKey=' . $itemKey + ); + break; + } + fwrite($fp, $string); + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param Swift_OutputByteStream $os + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + * @throws Swift_IoException + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, + $mode) + { + $this->_prepareCache($nsKey); + switch ($mode) + { + case self::MODE_WRITE: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + break; + case self::MODE_APPEND: + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); + break; + default: + throw new Swift_SwiftException( + 'Invalid mode [' . $mode . '] used to set nsKey='. + $nsKey . ', itemKey=' . $itemKey + ); + break; + } + while (false !== $bytes = $os->read(8192)) + { + fwrite($fp, $bytes); + } + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * NOTE: The stream will always write in append mode. + * @param string $nsKey + * @param string $itemKey + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, + Swift_InputByteStream $writeThrough = null) + { + $is = clone $this->_stream; + $is->setKeyCache($this); + $is->setNsKey($nsKey); + $is->setItemKey($itemKey); + if (isset($writeThrough)) + { + $is->setWriteThroughStream($writeThrough); + } + return $is; + } + + /** + * Get data back out of the cache as a string. + * @param string $nsKey + * @param string $itemKey + * @return string + * @throws Swift_IoException + */ + public function getString($nsKey, $itemKey) + { + $this->_prepareCache($nsKey); + if ($this->hasKey($nsKey, $itemKey)) + { + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + if ($this->_quotes) + { + set_magic_quotes_runtime(0); + } + $str = ''; + while (!feof($fp) && false !== $bytes = fread($fp, 8192)) + { + $str .= $bytes; + } + if ($this->_quotes) + { + set_magic_quotes_runtime(1); + } + return $str; + } + } + + /** + * Get data back out of the cache as a ByteStream. + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + if ($this->hasKey($nsKey, $itemKey)) + { + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); + if ($this->_quotes) + { + set_magic_quotes_runtime(0); + } + while (!feof($fp) && false !== $bytes = fread($fp, 8192)) + { + $is->write($bytes); + } + if ($this->_quotes) + { + set_magic_quotes_runtime(1); + } + } + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @return boolean + */ + public function hasKey($nsKey, $itemKey) + { + return is_file($this->_path . '/' . $nsKey . '/' . $itemKey); + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + if ($this->hasKey($nsKey, $itemKey)) + { + $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); + fclose($fp); + unlink($this->_path . '/' . $nsKey . '/' . $itemKey); + } + unset($this->_keys[$nsKey][$itemKey]); + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * @param string $nsKey + */ + public function clearAll($nsKey) + { + if (array_key_exists($nsKey, $this->_keys)) + { + foreach ($this->_keys[$nsKey] as $itemKey=>$null) + { + $this->clearKey($nsKey, $itemKey); + } + rmdir($this->_path . '/' . $nsKey); + unset($this->_keys[$nsKey]); + } + } + + // -- Private methods + + /** + * Initialize the namespace of $nsKey if needed. + * @param string $nsKey + * @access private + */ + private function _prepareCache($nsKey) + { + $cacheDir = $this->_path . '/' . $nsKey; + if (!is_dir($cacheDir)) + { + if (!mkdir($cacheDir)) + { + throw new Swift_IoException('Failed to create cache directory ' . $cacheDir); + } + $this->_keys[$nsKey] = array(); + } + } + + /** + * Get a file handle on the cache item. + * @param string $nsKey + * @param string $itemKey + * @param int $position + * @return resource + * @access private + */ + private function _getHandle($nsKey, $itemKey, $position) + { + if (!isset($this->_keys[$nsKey]) || !array_key_exists($itemKey, $this->_keys[$nsKey])) + { + $fp = fopen($this->_path . '/' . $nsKey . '/' . $itemKey, 'w+b'); + $this->_keys[$nsKey][$itemKey] = $fp; + } + if (self::POSITION_START == $position) + { + fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_SET); + } + else + { + fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_END); + } + return $this->_keys[$nsKey][$itemKey]; + } + + /** + * Destructor. + */ + public function __destruct() + { + foreach ($this->_keys as $nsKey=>$null) + { + $this->clearAll($nsKey); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php new file mode 100644 index 0000000..a1f4440 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php @@ -0,0 +1,53 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/KeyCache.php'; +//@require 'Swift/InputByteStream.php'; + +/** + * Writes data to a KeyCache using a stream. + * @package Swift + * @subpackage KeyCache + * @author Chris Corbyn + */ +interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream +{ + + /** + * Set the KeyCache to wrap. + * @param Swift_KeyCache $keyCache + */ + public function setKeyCache(Swift_KeyCache $keyCache); + + /** + * Set the nsKey which will be written to. + * @param string $nsKey + */ + public function setNsKey($nsKey); + + /** + * Set the itemKey which will be written to. + * @param string $itemKey + */ + public function setItemKey($itemKey); + + /** + * Specify a stream to write through for each write(). + * @param Swift_InputByteStream $is + */ + public function setWriteThroughStream(Swift_InputByteStream $is); + + /** + * Any implementation should be cloneable, allowing the clone to access a + * separate $nsKey and $itemKey. + */ + public function __clone(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php new file mode 100644 index 0000000..2646522 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php @@ -0,0 +1,110 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/KeyCache.php'; +//@require 'Swift/KeyCacheInputStream.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStrean.php'; + +/** + * A null KeyCache that does not cache at all. + * @package Swift + * @subpackage KeyCache + * @author Chris Corbyn + */ +class Swift_KeyCache_NullKeyCache implements Swift_KeyCache +{ + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @param Swift_OutputByteStream $os + * @param int $mode + * @see MODE_WRITE, MODE_APPEND + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, + $mode) + { + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * NOTE: The stream will always write in append mode. + * @param string $nsKey + * @param string $itemKey + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, + Swift_InputByteStream $writeThrough = null) + { + } + + /** + * Get data back out of the cache as a string. + * @param string $nsKey + * @param string $itemKey + * @return string + */ + public function getString($nsKey, $itemKey) + { + } + + /** + * Get data back out of the cache as a ByteStream. + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * @param string $nsKey + * @param string $itemKey + * @return boolean + */ + public function hasKey($nsKey, $itemKey) + { + return false; + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * @param string $nsKey + */ + public function clearAll($nsKey) + { + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php new file mode 100644 index 0000000..87cdced --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php @@ -0,0 +1,131 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/KeyCache.php'; +//@require 'Swift/KeyCacheInputStream.php'; + +/** + * Writes data to a KeyCache using a stream. + * @package Swift + * @subpackage KeyCache + * @author Chris Corbyn + */ +class Swift_KeyCache_SimpleKeyCacheInputStream + implements Swift_KeyCache_KeyCacheInputStream +{ + + /** The KeyCache being written to */ + private $_keyCache; + + /** The nsKey of the KeyCache being written to */ + private $_nsKey; + + /** The itemKey of the KeyCache being written to */ + private $_itemKey; + + /** A stream to write through on each write() */ + private $_writeThrough = null; + + /** + * Set the KeyCache to wrap. + * @param Swift_KeyCache $keyCache + */ + public function setKeyCache(Swift_KeyCache $keyCache) + { + $this->_keyCache = $keyCache; + } + + /** + * Specify a stream to write through for each write(). + * @param Swift_InputByteStream $is + */ + public function setWriteThroughStream(Swift_InputByteStream $is) + { + $this->_writeThrough = $is; + } + + /** + * Writes $bytes to the end of the stream. + * @param string $bytes + * @param Swift_InputByteStream $is, optional + */ + public function write($bytes, Swift_InputByteStream $is = null) + { + $this->_keyCache->setString( + $this->_nsKey, $this->_itemKey, $bytes, Swift_KeyCache::MODE_APPEND + ); + if (isset($is)) + { + $is->write($bytes); + } + if (isset($this->_writeThrough)) + { + $this->_writeThrough->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Not used. + */ + public function bind(Swift_InputByteStream $is) + { + } + + /** + * Not used. + */ + public function unbind(Swift_InputByteStream $is) + { + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + */ + public function flushBuffers() + { + $this->_keyCache->clearKey($this->_nsKey, $this->_itemKey); + } + + /** + * Set the nsKey which will be written to. + * @param string $nsKey + */ + public function setNsKey($nsKey) + { + $this->_nsKey = $nsKey; + } + + /** + * Set the itemKey which will be written to. + * @param string $itemKey + */ + public function setItemKey($itemKey) + { + $this->_itemKey = $itemKey; + } + + /** + * Any implementation should be cloneable, allowing the clone to access a + * separate $nsKey and $itemKey. + */ + public function __clone() + { + $this->_writeThrough = null; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php new file mode 100644 index 0000000..14ae292 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/LoadBalancedTransport.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * Redudantly and rotationally uses several Transport implementations when sending. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_LoadBalancedTransport extends Swift_Transport_LoadBalancedTransport +{ + + /** + * Creates a new LoadBalancedTransport with $transports. + * @param array $transports + */ + public function __construct($transports = array()) + { + call_user_func_array( + array($this, 'Swift_Transport_LoadBalancedTransport::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.loadbalanced') + ); + + $this->setTransports($transports); + } + + /** + * Create a new LoadBalancedTransport instance. + * @param string $transports + * @return Swift_LoadBalancedTransport + */ + public static function newInstance($transports = array()) + { + return new self($transports); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/MailTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/MailTransport.php new file mode 100644 index 0000000..afe29c6 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/MailTransport.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/MailTransport.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * Sends Messages using the mail() function. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_MailTransport extends Swift_Transport_MailTransport +{ + + /** + * Create a new MailTransport, optionally specifying $extraParams. + * @param string $extraParams + */ + public function __construct($extraParams = '-f%s') + { + call_user_func_array( + array($this, 'Swift_Transport_MailTransport::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.mail') + ); + + $this->setExtraParams($extraParams); + } + + /** + * Create a new MailTransport instance. + * @param string $extraParams To be passed to mail() + * @return Swift_MailTransport + */ + public static function newInstance($extraParams = '-f%s') + { + return new self($extraParams); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mailer.php b/h-source/External/swiftmailer/lib/classes/Swift/Mailer.php new file mode 100644 index 0000000..c92feb4 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mailer.php @@ -0,0 +1,173 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport.php'; +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Mailer/RecipientIterator.php'; +//@require 'Swift/Events/EventListener.php'; + +/** + * Swift Mailer class. + * + * @package Swift + * @author Chris Corbyn + */ +class Swift_Mailer +{ + + /** The Transport used to send messages */ + private $_transport; + + /** + * Create a new Mailer using $transport for delivery. + * + * @param Swift_Transport $transport + */ + public function __construct(Swift_Transport $transport) + { + $this->_transport = $transport; + } + + /** + * Create a new Mailer instance. + * + * @param Swift_Transport $transport + * @return Swift_Mailer + */ + public static function newInstance(Swift_Transport $transport) + { + return new self($transport); + } + + /** + * Send the given Message like it would be sent in a mail client. + * + * All recipients (with the exception of Bcc) will be able to see the other + * recipients this message was sent to. + * + * If you need to send to each recipient without disclosing details about the + * other recipients see {@link batchSend()}. + * + * Recipient/sender data will be retreived from the Message object. + * + * The return value is the number of recipients who were accepted for + * delivery. + * + * @param Swift_Mime_Message $message + * @param array &$failedRecipients, optional + * @return int + * @see batchSend() + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + + if (!$this->_transport->isStarted()) + { + $this->_transport->start(); + } + + return $this->_transport->send($message, $failedRecipients); + } + + /** + * Send the given Message to all recipients individually. + * + * This differs from {@link send()} in the way headers are presented to the + * recipient. The only recipient in the "To:" field will be the individual + * recipient it was sent to. + * + * If an iterator is provided, recipients will be read from the iterator + * one-by-one, otherwise recipient data will be retreived from the Message + * object. + * + * Sender information is always read from the Message object. + * + * The return value is the number of recipients who were accepted for + * delivery. + * + * @param Swift_Mime_Message $message + * @param array &$failedRecipients, optional + * @param Swift_Mailer_RecipientIterator $it, optional + * @return int + * @see send() + */ + public function batchSend(Swift_Mime_Message $message, + &$failedRecipients = null, + Swift_Mailer_RecipientIterator $it = null) + { + $failedRecipients = (array) $failedRecipients; + + $sent = 0; + $to = $message->getTo(); + $cc = $message->getCc(); + $bcc = $message->getBcc(); + + if (!empty($cc)) + { + $message->setCc(array()); + } + if (!empty($bcc)) + { + $message->setBcc(array()); + } + + //Use an iterator if set + if (isset($it)) + { + while ($it->hasNext()) + { + $message->setTo($it->nextRecipient()); + $sent += $this->send($message, $failedRecipients); + } + } + else + { + foreach ($to as $address => $name) + { + $message->setTo(array($address => $name)); + $sent += $this->send($message, $failedRecipients); + } + } + + $message->setTo($to); + + if (!empty($cc)) + { + $message->setCc($cc); + } + if (!empty($bcc)) + { + $message->setBcc($bcc); + } + + return $sent; + } + + /** + * Register a plugin using a known unique key (e.g. myPlugin). + * + * @param Swift_Events_EventListener $plugin + * @param string $key + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_transport->registerPlugin($plugin); + } + + /** + * The Transport used to send messages. + * @return Swift_Transport + */ + public function getTransport() + { + return $this->_transport; + } +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php b/h-source/External/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php new file mode 100644 index 0000000..65d60c1 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php @@ -0,0 +1,59 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mailer/RecipientIterator.php'; + +/** + * Wraps a standard PHP array in an interator. + * @package Swift + * @subpackage Mailer + * @author Chris Corbyn + */ +class Swift_Mailer_ArrayRecipientIterator + implements Swift_Mailer_RecipientIterator +{ + + /** + * The list of recipients. + * @var array + * @access private + */ + private $_recipients = array(); + + /** + * Create a new ArrayRecipientIterator from $recipients. + * @param array $recipients + */ + public function __construct(array $recipients) + { + $this->_recipients = $recipients; + } + + /** + * Returns true only if there are more recipients to send to. + * @return boolean + */ + public function hasNext() + { + return !empty($this->_recipients); + } + + /** + * Returns an array where the keys are the addresses of recipients and the + * values are the names. + * e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL) + * @return array + */ + public function nextRecipient() + { + return array_splice($this->_recipients, 0, 1); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php b/h-source/External/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php new file mode 100644 index 0000000..2713841 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php @@ -0,0 +1,34 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Provides an abstract way of specifying recipients for batch sending. + * @package Swift + * @subpackage Mailer + * @author Chris Corbyn + */ +interface Swift_Mailer_RecipientIterator +{ + + /** + * Returns true only if there are more recipients to send to. + * @return boolean + */ + public function hasNext(); + + /** + * Returns an array where the keys are the addresses of recipients and the + * values are the names. + * e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL) + * @return array + */ + public function nextRecipient(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Message.php b/h-source/External/swiftmailer/lib/classes/Swift/Message.php new file mode 100644 index 0000000..e8183ea --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Message.php @@ -0,0 +1,82 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/SimpleMessage.php'; +//@require 'Swift/MimePart.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * The Message class for building emails. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Message extends Swift_Mime_SimpleMessage +{ + + /** + * Create a new Message. + * Details may be optionally passed into the constructor. + * @param string $subject + * @param string $body + * @param string $contentType + * @param string $charset + */ + public function __construct($subject = null, $body = null, + $contentType = null, $charset = null) + { + call_user_func_array( + array($this, 'Swift_Mime_SimpleMessage::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('mime.message') + ); + + if (!isset($charset)) + { + $charset = Swift_DependencyContainer::getInstance() + ->lookup('properties.charset'); + } + $this->setSubject($subject); + $this->setBody($body); + $this->setCharset($charset); + if ($contentType) + { + $this->setContentType($contentType); + } + } + + /** + * Create a new Message. + * @param string $subject + * @param string $body + * @param string $contentType + * @param string $charset + * @return Swift_Mime_Message + */ + public static function newInstance($subject = null, $body = null, + $contentType = null, $charset = null) + { + return new self($subject, $body, $contentType, $charset); + } + + /** + * Add a MimePart to this Message. + * @param string|Swift_OutputByteStream $body + * @param string $contentType + * @param string $charset + */ + public function addPart($body, $contentType = null, $charset = null) + { + return $this->attach(Swift_MimePart::newInstance( + $body, $contentType, $charset + )); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Attachment.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Attachment.php new file mode 100644 index 0000000..25ef68b --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Attachment.php @@ -0,0 +1,143 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/SimpleMimeEntity.php'; +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/Mime/HeaderSet.php'; +//@require 'Swift/FileStream.php'; +//@require 'Swift/KeyCache.php'; + +/** + * An attachment, in a multipart message. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Attachment extends Swift_Mime_SimpleMimeEntity +{ + + /** Recognized MIME types */ + private $_mimeTypes = array(); + + /** + * Create a new Attachment with $headers, $encoder and $cache. + * @param Swift_Mime_HeaderSet $headers + * @param Swift_Mime_ContentEncoder $encoder + * @param Swift_KeyCache $cache + * @param array $mimeTypes optional + */ + public function __construct(Swift_Mime_HeaderSet $headers, + Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, + $mimeTypes = array()) + { + parent::__construct($headers, $encoder, $cache); + $this->setDisposition('attachment'); + $this->setContentType('application/octet-stream'); + $this->_mimeTypes = $mimeTypes; + } + + /** + * Get the nesting level used for this attachment. + * Always returns {@link LEVEL_MIXED}. + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_MIXED; + } + + /** + * Get the Content-Disposition of this attachment. + * By default attachments have a disposition of "attachment". + * @return string + */ + public function getDisposition() + { + return $this->_getHeaderFieldModel('Content-Disposition'); + } + + /** + * Set the Content-Disposition of this attachment. + * @param string $disposition + */ + public function setDisposition($disposition) + { + if (!$this->_setHeaderFieldModel('Content-Disposition', $disposition)) + { + $this->getHeaders()->addParameterizedHeader( + 'Content-Disposition', $disposition + ); + } + return $this; + } + + /** + * Get the filename of this attachment when downloaded. + * @return string + */ + public function getFilename() + { + return $this->_getHeaderParameter('Content-Disposition', 'filename'); + } + + /** + * Set the filename of this attachment. + * @param string $filename + */ + public function setFilename($filename) + { + $this->_setHeaderParameter('Content-Disposition', 'filename', $filename); + $this->_setHeaderParameter('Content-Type', 'name', $filename); + return $this; + } + + /** + * Get the file size of this attachment. + * @return int + */ + public function getSize() + { + return $this->_getHeaderParameter('Content-Disposition', 'size'); + } + + /** + * Set the file size of this attachment. + * @param int $size + */ + public function setSize($size) + { + $this->_setHeaderParameter('Content-Disposition', 'size', $size); + return $this; + } + + /** + * Set the file that this attachment is for. + * @param Swift_FileStream $file + * @param string $contentType optional + */ + public function setFile(Swift_FileStream $file, $contentType = null) + { + $this->setFilename(basename($file->getPath())); + $this->setBody($file, $contentType); + if (!isset($contentType)) + { + $extension = strtolower(substr( + $file->getPath(), strrpos($file->getPath(), '.') + 1 + )); + + if (array_key_exists($extension, $this->_mimeTypes)) + { + $this->setContentType($this->_mimeTypes[$extension]); + } + } + return $this; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php new file mode 100644 index 0000000..c26009f --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Observes changes in an Mime entity's character set. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_CharsetObserver +{ + + /** + * Notify this observer that the entity's charset has changed. + * @param string $charset + */ + public function charsetChanged($charset); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder.php new file mode 100644 index 0000000..e1c99c5 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder.php @@ -0,0 +1,41 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Encoder.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStream.php'; + +/** + * Interface for all Transfer Encoding schemes. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_ContentEncoder extends Swift_Encoder +{ + + /** + * Encode $in to $out. + * @param Swift_OutputByteStream $os to read from + * @param Swift_InputByteStream $is to write to + * @param int $firstLineOffset + * @param int $maxLineLength - 0 indicates the default length for this encoding + */ + public function encodeByteStream( + Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, + $maxLineLength = 0); + + /** + * Get the MIME name of this content encoding scheme. + * @return string + */ + public function getName(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php new file mode 100644 index 0000000..e89938e --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php @@ -0,0 +1,81 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/Encoder/Base64Encoder.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStream.php'; + +/** + * Handles Base 64 Transfer Encoding in Swift Mailer. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_ContentEncoder_Base64ContentEncoder + extends Swift_Encoder_Base64Encoder + implements Swift_Mime_ContentEncoder +{ + + /** + * Encode stream $in to stream $out. + * @param Swift_OutputByteStream $in + * @param Swift_InputByteStream $out + * @param int $firstLineOffset + * @param int $maxLineLength, optional, 0 indicates the default of 76 bytes + */ + public function encodeByteStream( + Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, + $maxLineLength = 0) + { + if (0 >= $maxLineLength || 76 < $maxLineLength) + { + $maxLineLength = 76; + } + + $remainder = 0; + + while (false !== $bytes = $os->read(8190)) + { + $encoded = base64_encode($bytes); + $encodedTransformed = ''; + $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; + + while ($thisMaxLineLength < strlen($encoded)) + { + $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n"; + $firstLineOffset = 0; + $encoded = substr($encoded, $thisMaxLineLength); + $thisMaxLineLength = $maxLineLength; + $remainder = 0; + } + + if (0 < $remainingLength = strlen($encoded)) + { + $remainder += $remainingLength; + $encodedTransformed .= $encoded; + $encoded = null; + } + + $is->write($encodedTransformed); + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'base64'. + * @return string + */ + public function getName() + { + return 'base64'; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php new file mode 100644 index 0000000..4a725d8 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php @@ -0,0 +1,175 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStream.php'; + +/** + * Handles binary/7/8-bit Transfer Encoding in Swift Mailer. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_ContentEncoder_PlainContentEncoder + implements Swift_Mime_ContentEncoder +{ + + /** + * The name of this encoding scheme (probably 7bit or 8bit). + * @var string + * @access private + */ + private $_name; + + /** + * True if canonical transformations should be done. + * @var boolean + * @access private + */ + private $_canonical; + + /** + * Creates a new PlainContentEncoder with $name (probably 7bit or 8bit). + * @param string $name + * @param boolean $canonical If canonicalization transformation should be done. + */ + public function __construct($name, $canonical = false) + { + $this->_name = $name; + $this->_canonical = $canonical; + } + + /** + * Encode a given string to produce an encoded string. + * @param string $string + * @param int $firstLineOffset, ignored + * @param int $maxLineLength - 0 means no wrapping will occur + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, + $maxLineLength = 0) + { + if ($this->_canonical) + { + $string = $this->_canonicalize($string); + } + return $this->_safeWordWrap($string, $maxLineLength, "\r\n"); + } + + /** + * Encode stream $in to stream $out. + * @param Swift_OutputByteStream $in + * @param Swift_InputByteStream $out + * @param int $firstLineOffset, ignored + * @param int $maxLineLength, optional, 0 means no wrapping will occur + */ + public function encodeByteStream( + Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, + $maxLineLength = 0) + { + $leftOver = ''; + while (false !== $bytes = $os->read(8192)) + { + $toencode = $leftOver . $bytes; + if ($this->_canonical) + { + $toencode = $this->_canonicalize($toencode); + } + $wrapped = $this->_safeWordWrap($toencode, $maxLineLength, "\r\n"); + $lastLinePos = strrpos($wrapped, "\r\n"); + $leftOver = substr($wrapped, $lastLinePos); + $wrapped = substr($wrapped, 0, $lastLinePos); + + $is->write($wrapped); + } + if (strlen($leftOver)) + { + $is->write($leftOver); + } + } + + /** + * Get the name of this encoding scheme. + * @return string + */ + public function getName() + { + return $this->_name; + } + + /** + * Not used. + */ + public function charsetChanged($charset) + { + } + + // -- Private methods + + /** + * A safer (but weaker) wordwrap for unicode. + * @param string $string + * @param int $length + * @param string $le + * @return string + * @access private + */ + private function _safeWordwrap($string, $length = 75, $le = "\r\n") + { + if (0 >= $length) + { + return $string; + } + + $originalLines = explode($le, $string); + + $lines = array(); + $lineCount = 0; + + foreach ($originalLines as $originalLine) + { + $lines[] = ''; + $currentLine =& $lines[$lineCount++]; + + //$chunks = preg_split('/(?<=[\ \t,\.!\?\-&\+\/])/', $originalLine); + $chunks = preg_split('/(?<=\s)/', $originalLine); + + foreach ($chunks as $chunk) + { + if (0 != strlen($currentLine) + && strlen($currentLine . $chunk) > $length) + { + $lines[] = ''; + $currentLine =& $lines[$lineCount++]; + } + $currentLine .= $chunk; + } + } + + return implode("\r\n", $lines); + } + + /** + * Canonicalize string input (fix CRLF). + * @param string $string + * @return string + * @access private + */ + private function _canonicalize($string) + { + return str_replace( + array("\r\n", "\r", "\n"), + array("\n", "\n", "\r\n"), + $string + ); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php new file mode 100644 index 0000000..3beeb63 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php @@ -0,0 +1,117 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/Encoder/QpEncoder.php'; +//@require 'Swift/InputByteStrean.php'; +//@require 'Swift/OutputByteStream.php'; +//@require 'Swift/CharacterStream.php'; + +/** + * Handles Quoted Printable (QP) Transfer Encoding in Swift Mailer. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_ContentEncoder_QpContentEncoder extends Swift_Encoder_QpEncoder + implements Swift_Mime_ContentEncoder +{ + + /** + * Creates a new QpContentEncoder for the given CharacterStream. + * @param Swift_CharacterStream $charStream to use for reading characters + * @param Swift_StreamFilter $filter if canonicalization should occur + */ + public function __construct(Swift_CharacterStream $charStream, + Swift_StreamFilter $filter = null) + { + parent::__construct($charStream, $filter); + } + + /** + * Encode stream $in to stream $out. + * QP encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * @param Swift_OutputByteStream $os output stream + * @param Swift_InputByteStream $is input stream + * @param int $firstLineOffset + * @param int $maxLineLength + */ + public function encodeByteStream( + Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, + $maxLineLength = 0) + { + if ($maxLineLength > 76 || $maxLineLength <= 0) + { + $maxLineLength = 76; + } + + $thisLineLength = $maxLineLength - $firstLineOffset; + + $this->_charStream->flushContents(); + $this->_charStream->importByteStream($os); + + $currentLine = ''; + $prepend = ''; + $size=$lineLen=0; + + while (false !== $bytes = $this->_nextSequence()) + { + //If we're filtering the input + if (isset($this->_filter)) + { + //If we can't filter because we need more bytes + while ($this->_filter->shouldBuffer($bytes)) + { + //Then collect bytes into the buffer + if (false === $moreBytes = $this->_nextSequence(1)) + { + break; + } + + foreach ($moreBytes as $b) + { + $bytes[] = $b; + } + } + //And filter them + $bytes = $this->_filter->filter($bytes); + } + + $enc = $this->_encodeByteSequence($bytes, $size); + if ($currentLine && $lineLen+$size >= $thisLineLength) + { + $is->write($prepend . $this->_standardize($currentLine)); + $currentLine = ''; + $prepend = "=\r\n"; + $thisLineLength = $maxLineLength; + $lineLen=0; + } + $lineLen+=$size; + $currentLine .= $enc; + } + if (strlen($currentLine)) + { + $is->write($prepend . $this->_standardize($currentLine)); + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'quoted-printable'. + * @return string + */ + public function getName() + { + return 'quoted-printable'; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php new file mode 100644 index 0000000..983b78d --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php @@ -0,0 +1,51 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Attachment.php'; +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/KeyCache.php'; +//@require + +/** + * An embedded file, in a multipart message. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_EmbeddedFile extends Swift_Mime_Attachment +{ + + /** + * Creates a new Attachment with $headers and $encoder. + * @param Swift_Mime_HeaderSet $headers + * @param Swift_Mime_ContentEncoder $encoder + * @param Swift_KeyCache $cache + * @param array $mimeTypes optional + */ + public function __construct(Swift_Mime_HeaderSet $headers, + Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, + $mimeTypes = array()) + { + parent::__construct($headers, $encoder, $cache, $mimeTypes); + $this->setDisposition('inline'); + $this->setId($this->getId()); + } + + /** + * Get the nesting level of this EmbeddedFile. + * Returns {@link LEVEL_RELATED}. + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_RELATED; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php new file mode 100644 index 0000000..50472db --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/ContentEncoder.php'; + +/** + * Observes changes for a Mime entity's ContentEncoder. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_EncodingObserver +{ + + /** + * Notify this observer that the observed entity's ContentEncoder has changed. + * @param Swift_Mime_ContentEncoder $encoder + */ + public function encoderChanged(Swift_Mime_ContentEncoder $encoder); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Header.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Header.php new file mode 100644 index 0000000..38fc40c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Header.php @@ -0,0 +1,85 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * A MIME Header. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_Header +{ + + /** Text headers */ + const TYPE_TEXT = 2; + + /** Parameterized headers (text + params) */ + const TYPE_PARAMETERIZED = 6; + + /** Mailbox and address headers */ + const TYPE_MAILBOX = 8; + + /** Date and time headers */ + const TYPE_DATE = 16; + + /** Identification headers */ + const TYPE_ID = 32; + + /** Address path headers */ + const TYPE_PATH = 64; + + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType(); + + /** + * Set the model for the field body. + * The actual types needed will vary depending upon the type of Header. + * @param mixed $model + */ + public function setFieldBodyModel($model); + + /** + * Set the charset used when rendering the Header. + * @param string $charset + */ + public function setCharset($charset); + + /** + * Get the model for the field body. + * The return type depends on the specifics of the Header. + * @return mixed + */ + public function getFieldBodyModel(); + + /** + * Get the name of this header (e.g. Subject). + * The name is an identifier and as such will be immutable. + * @return string + */ + public function getFieldName(); + + /** + * Get the field body, prepared for folding into a final header value. + * @return string + */ + public function getFieldBody(); + + /** + * Get this Header rendered as a compliant string. + * @return string + */ + public function toString(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder.php new file mode 100644 index 0000000..cc70c5f --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Encoder.php'; + +/** + * Interface for all Header Encoding schemes. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_HeaderEncoder extends Swift_Encoder +{ + + /** + * Get the MIME name of this content encoding scheme. + * @return string + */ + public function getName(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php new file mode 100644 index 0000000..feaba98 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +require_once dirname(__FILE__) . '/../HeaderEncoder.php'; +require_once dirname(__FILE__) . '/../../Encoder/Base64Encoder.php'; + + +/** + * Handles Base64 (B) Header Encoding in Swift Mailer. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_HeaderEncoder_Base64HeaderEncoder + extends Swift_Encoder_Base64Encoder + implements Swift_Mime_HeaderEncoder +{ + + /** + * Get the name of this encoding scheme. + * Returns the string 'B'. + * @return string + */ + public function getName() + { + return 'B'; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php new file mode 100644 index 0000000..d727da0 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php @@ -0,0 +1,99 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +require_once dirname(__FILE__) . '/../HeaderEncoder.php'; +require_once dirname(__FILE__) . '/../../Encoder/QpEncoder.php'; +require_once dirname(__FILE__) . '/../../CharacterStream.php'; + +/** + * Handles Quoted Printable (Q) Header Encoding in Swift Mailer. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_HeaderEncoder_QpHeaderEncoder extends Swift_Encoder_QpEncoder + implements Swift_Mime_HeaderEncoder +{ + + private static $_headerSafeMap = array(); + + /** + * Creates a new QpHeaderEncoder for the given CharacterStream. + * @param Swift_CharacterStream $charStream to use for reading characters + */ + public function __construct(Swift_CharacterStream $charStream) + { + parent::__construct($charStream); + if (empty(self::$_headerSafeMap)) + { + foreach (array_merge( + range(0x61, 0x7A), range(0x41, 0x5A), + range(0x30, 0x39), array(0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F) + ) as $byte) + { + self::$_headerSafeMap[$byte] = chr($byte); + } + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'Q'. + * @return string + */ + public function getName() + { + return 'Q'; + } + + /** + * Takes an unencoded string and produces a Q encoded string from it. + * @param string $string to encode + * @param int $firstLineOffset, optional + * @param int $maxLineLength, optional, 0 indicates the default of 76 chars + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, + $maxLineLength = 0) + { + return str_replace(array(' ', '=20', "=\r\n"), array('_', '_', "\r\n"), + parent::encodeString($string, $firstLineOffset, $maxLineLength) + ); + } + + // -- Overridden points of extension + + /** + * Encode the given byte array into a verbatim QP form. + * @param int[] $bytes + * @return string + * @access protected + */ + protected function _encodeByteSequence(array $bytes, &$size) + { + $ret = ''; + $size=0; + foreach ($bytes as $b) + { + if (isset(self::$_headerSafeMap[$b])) + { + $ret .= self::$_headerSafeMap[$b]; + ++$size; + } + else + { + $ret .= self::$_qpMap[$b]; + $size+=3; + } + } + return $ret; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php new file mode 100644 index 0000000..83bb35a --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php @@ -0,0 +1,72 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/CharsetObserver.php'; + +/** + * Creates MIME headers. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_HeaderFactory extends Swift_Mime_CharsetObserver +{ + + /** + * Create a new Mailbox Header with a list of $addresses. + * @param string $name + * @param array|string $addresses + * @return Swift_Mime_Header + */ + public function createMailboxHeader($name, $addresses = null); + + /** + * Create a new Date header using $timestamp (UNIX time). + * @param string $name + * @param int $timestamp + * @return Swift_Mime_Header + */ + public function createDateHeader($name, $timestamp = null); + + /** + * Create a new basic text header with $name and $value. + * @param string $name + * @param string $value + * @return Swift_Mime_Header + */ + public function createTextHeader($name, $value = null); + + /** + * Create a new ParameterizedHeader with $name, $value and $params. + * @param string $name + * @param string $value + * @param array $params + * @return Swift_Mime_ParameterizedHeader + */ + public function createParameterizedHeader($name, $value = null, + $params = array()); + + /** + * Create a new ID header for Message-ID or Content-ID. + * @param string $name + * @param string|array $ids + * @return Swift_Mime_Header + */ + public function createIdHeader($name, $ids = null); + + /** + * Create a new Path header with an address (path) in it. + * @param string $name + * @param string $path + * @return Swift_Mime_Header + */ + public function createPathHeader($name, $path = null); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderSet.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderSet.php new file mode 100644 index 0000000..81e7a97 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/HeaderSet.php @@ -0,0 +1,170 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/CharsetObserver.php'; + +/** + * A collection of MIME headers. + * + * @package Swift + * @subpackage Mime + * + * @author Chris Corbyn + */ +interface Swift_Mime_HeaderSet extends Swift_Mime_CharsetObserver +{ + + /** + * Add a new Mailbox Header with a list of $addresses. + * + * @param string $name + * @param array|string $addresses + */ + public function addMailboxHeader($name, $addresses = null); + + /** + * Add a new Date header using $timestamp (UNIX time). + * + * @param string $name + * @param int $timestamp + */ + public function addDateHeader($name, $timestamp = null); + + /** + * Add a new basic text header with $name and $value. + * + * @param string $name + * @param string $value + */ + public function addTextHeader($name, $value = null); + + /** + * Add a new ParameterizedHeader with $name, $value and $params. + * + * @param string $name + * @param string $value + * @param array $params + */ + public function addParameterizedHeader($name, $value = null, + $params = array()); + + /** + * Add a new ID header for Message-ID or Content-ID. + * + * @param string $name + * @param string|array $ids + */ + public function addIdHeader($name, $ids = null); + + /** + * Add a new Path header with an address (path) in it. + * + * @param string $name + * @param string $path + */ + public function addPathHeader($name, $path = null); + + /** + * Returns true if at least one header with the given $name exists. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + * + * @return boolean + */ + public function has($name, $index = 0); + + /** + * Set a header in the HeaderSet. + * + * The header may be a previously fetched header via {@link get()} or it may + * be one that has been created separately. + * + * If $index is specified, the header will be inserted into the set at this + * offset. + * + * @param Swift_Mime_Header $header + * @param int $index + */ + public function set(Swift_Mime_Header $header, $index = 0); + + /** + * Get the header with the given $name. + * If multiple headers match, the actual one may be specified by $index. + * Returns NULL if none present. + * + * @param string $name + * @param int $index + * + * @return Swift_Mime_Header + */ + public function get($name, $index = 0); + + /** + * Get all headers with the given $name. + * + * @param string $name + * + * @return array + */ + public function getAll($name = null); + + /** + * Remove the header with the given $name if it's set. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + */ + public function remove($name, $index = 0); + + /** + * Remove all headers with the given $name. + * + * @param string $name + */ + public function removeAll($name); + + /** + * Create a new instance of this HeaderSet. + * + * @return Swift_Mime_HeaderSet + */ + public function newInstance(); + + /** + * Define a list of Header names as an array in the correct order. + * + * These Headers will be output in the given order where present. + * + * @param array $sequence + */ + public function defineOrdering(array $sequence); + + /** + * Set a list of header names which must always be displayed when set. + * + * Usually headers without a field value won't be output unless set here. + * + * @param array $names + */ + public function setAlwaysDisplayed(array $names); + + /** + * Returns a string with a representation of all headers. + * + * @return string + */ + public function toString(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php new file mode 100644 index 0000000..c3049c2 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php @@ -0,0 +1,596 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Header.php'; +//@require 'Swift/Mime/HeaderEncoder.php'; +//@require 'Swift/RfcComplianceException.php'; + +/** + * An abstract base MIME Header. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header +{ + + /** + * Special characters used in the syntax which need to be escaped. + * @var string[] + * @access private + */ + private $_specials = array(); + + /** + * Tokens defined in RFC 2822 (and some related RFCs). + * @var string[] + * @access private + */ + private $_grammar = array(); + + /** + * The name of this Header. + * @var string + * @access private + */ + private $_name; + + /** + * The Encoder used to encode this Header. + * @var Swift_Encoder + * @access private + */ + private $_encoder; + + /** + * The maximum length of a line in the header. + * @var int + * @access private + */ + private $_lineLength = 78; + + /** + * The language used in this Header. + * @var string + */ + private $_lang; + + /** + * The character set of the text in this Header. + * @var string + * @access private + */ + private $_charset = 'utf-8'; + + /** + * The value of this Header, cached. + * @var string + * @access private + */ + private $_cachedValue = null; + + /** + * Set the character set used in this Header. + * @param string $charset + */ + public function setCharset($charset) + { + $this->clearCachedValueIf($charset != $this->_charset); + $this->_charset = $charset; + if (isset($this->_encoder)) + { + $this->_encoder->charsetChanged($charset); + } + } + + /** + * Get the character set used in this Header. + * @return string + */ + public function getCharset() + { + return $this->_charset; + } + + /** + * Set the language used in this Header. + * For example, for US English, 'en-us'. + * This can be unspecified. + * @param string $lang + */ + public function setLanguage($lang) + { + $this->clearCachedValueIf($this->_lang != $lang); + $this->_lang = $lang; + } + + /** + * Get the language used in this Header. + * @return string + */ + public function getLanguage() + { + return $this->_lang; + } + + /** + * Set the encoder used for encoding the header. + * @param Swift_Mime_HeaderEncoder $encoder + */ + public function setEncoder(Swift_Mime_HeaderEncoder $encoder) + { + $this->_encoder = $encoder; + $this->setCachedValue(null); + } + + /** + * Get the encoder used for encoding this Header. + * @return Swift_Mime_HeaderEncoder + */ + public function getEncoder() + { + return $this->_encoder; + } + + /** + * Get the name of this header (e.g. charset). + * @return string + */ + public function getFieldName() + { + return $this->_name; + } + + /** + * Set the maximum length of lines in the header (excluding EOL). + * @param int $lineLength + */ + public function setMaxLineLength($lineLength) + { + $this->clearCachedValueIf($this->_lineLength != $lineLength); + $this->_lineLength = $lineLength; + } + + /** + * Get the maximum permitted length of lines in this Header. + * @return int + */ + public function getMaxLineLength() + { + return $this->_lineLength; + } + + /** + * Get this Header rendered as a RFC 2822 compliant string. + * @return string + * @throws Swift_RfcComplianceException + */ + public function toString() + { + return $this->_tokensToString($this->toTokens()); + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + // -- Points of extension + + /** + * Set the name of this Header field. + * @param string $name + * @access protected + */ + protected function setFieldName($name) + { + $this->_name = $name; + } + + /** + * Initialize some RFC 2822 (and friends) ABNF grammar definitions. + * @access protected + */ + protected function initializeGrammar() + { + $this->_specials = array( + '(', ')', '<', '>', '[', ']', + ':', ';', '@', ',', '.', '"' + ); + + /*** Refer to RFC 2822 for ABNF grammar ***/ + + //All basic building blocks + $this->_grammar['NO-WS-CTL'] = '[\x01-\x08\x0B\x0C\x0E-\x19\x7F]'; + $this->_grammar['WSP'] = '[ \t]'; + $this->_grammar['CRLF'] = '(?:\r\n)'; + $this->_grammar['FWS'] = '(?:(?:' . $this->_grammar['WSP'] . '*' . + $this->_grammar['CRLF'] . ')?' . $this->_grammar['WSP'] . ')'; + $this->_grammar['text'] = '[\x00-\x08\x0B\x0C\x0E-\x7F]'; + $this->_grammar['quoted-pair'] = '(?:\\\\' . $this->_grammar['text'] . ')'; + $this->_grammar['ctext'] = '(?:' . $this->_grammar['NO-WS-CTL'] . + '|[\x21-\x27\x2A-\x5B\x5D-\x7E])'; + //Uses recursive PCRE (?1) -- could be a weak point?? + $this->_grammar['ccontent'] = '(?:' . $this->_grammar['ctext'] . '|' . + $this->_grammar['quoted-pair'] . '|(?1))'; + $this->_grammar['comment'] = '(\((?:' . $this->_grammar['FWS'] . '|' . + $this->_grammar['ccontent']. ')*' . $this->_grammar['FWS'] . '?\))'; + $this->_grammar['CFWS'] = '(?:(?:' . $this->_grammar['FWS'] . '?' . + $this->_grammar['comment'] . ')*(?:(?:' . $this->_grammar['FWS'] . '?' . + $this->_grammar['comment'] . ')|' . $this->_grammar['FWS'] . '))'; + $this->_grammar['qtext'] = '(?:' . $this->_grammar['NO-WS-CTL'] . + '|[\x21\x23-\x5B\x5D-\x7E])'; + $this->_grammar['qcontent'] = '(?:' . $this->_grammar['qtext'] . '|' . + $this->_grammar['quoted-pair'] . ')'; + $this->_grammar['quoted-string'] = '(?:' . $this->_grammar['CFWS'] . '?"' . + '(' . $this->_grammar['FWS'] . '?' . $this->_grammar['qcontent'] . ')*' . + $this->_grammar['FWS'] . '?"' . $this->_grammar['CFWS'] . '?)'; + $this->_grammar['atext'] = '[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]'; + $this->_grammar['atom'] = '(?:' . $this->_grammar['CFWS'] . '?' . + $this->_grammar['atext'] . '+' . $this->_grammar['CFWS'] . '?)'; + $this->_grammar['dot-atom-text'] = '(?:' . $this->_grammar['atext'] . '+' . + '(\.' . $this->_grammar['atext'] . '+)*)'; + $this->_grammar['dot-atom'] = '(?:' . $this->_grammar['CFWS'] . '?' . + $this->_grammar['dot-atom-text'] . '+' . $this->_grammar['CFWS'] . '?)'; + $this->_grammar['word'] = '(?:' . $this->_grammar['atom'] . '|' . + $this->_grammar['quoted-string'] . ')'; + $this->_grammar['phrase'] = '(?:' . $this->_grammar['word'] . '+?)'; + $this->_grammar['no-fold-quote'] = '(?:"(?:' . $this->_grammar['qtext'] . + '|' . $this->_grammar['quoted-pair'] . ')*")'; + $this->_grammar['dtext'] = '(?:' . $this->_grammar['NO-WS-CTL'] . + '|[\x21-\x5A\x5E-\x7E])'; + $this->_grammar['no-fold-literal'] = '(?:\[(?:' . $this->_grammar['dtext'] . + '|' . $this->_grammar['quoted-pair'] . ')*\])'; + + //Message IDs + $this->_grammar['id-left'] = '(?:' . $this->_grammar['dot-atom-text'] . '|' . + $this->_grammar['no-fold-quote'] . ')'; + $this->_grammar['id-right'] = '(?:' . $this->_grammar['dot-atom-text'] . '|' . + $this->_grammar['no-fold-literal'] . ')'; + + //Addresses, mailboxes and paths + $this->_grammar['local-part'] = '(?:' . $this->_grammar['dot-atom'] . '|' . + $this->_grammar['quoted-string'] . ')'; + $this->_grammar['dcontent'] = '(?:' . $this->_grammar['dtext'] . '|' . + $this->_grammar['quoted-pair'] . ')'; + $this->_grammar['domain-literal'] = '(?:' . $this->_grammar['CFWS'] . '?\[(' . + $this->_grammar['FWS'] . '?' . $this->_grammar['dcontent'] . ')*?' . + $this->_grammar['FWS'] . '?\]' . $this->_grammar['CFWS'] . '?)'; + $this->_grammar['domain'] = '(?:' . $this->_grammar['dot-atom'] . '|' . + $this->_grammar['domain-literal'] . ')'; + $this->_grammar['addr-spec'] = '(?:' . $this->_grammar['local-part'] . '@' . + $this->_grammar['domain'] . ')'; + } + + /** + * Get the grammar defined for $name token. + * @param string $name execatly as written in the RFC + * @return string + */ + protected function getGrammar($name) + { + if (array_key_exists($name, $this->_grammar)) + { + return $this->_grammar[$name]; + } + else + { + throw new Swift_RfcComplianceException( + "No such grammar '" . $name . "' defined." + ); + } + } + + /** + * Escape special characters in a string (convert to quoted-pairs). + * @param string $token + * @param string[] $include additonal chars to escape + * @param string[] $exclude chars from escaping + * @return string + */ + protected function escapeSpecials($token, $include = array(), + $exclude = array()) + { + foreach ( + array_merge(array('\\'), array_diff($this->_specials, $exclude), $include) as $char) + { + $token = str_replace($char, '\\' . $char, $token); + } + return $token; + } + + /** + * Produces a compliant, formatted RFC 2822 'phrase' based on the string given. + * @param Swift_Mime_Header $header + * @param string $string as displayed + * @param string $charset of the text + * @param Swift_Mime_HeaderEncoder $encoder + * @param boolean $shorten the first line to make remove for header name + * @return string + */ + protected function createPhrase(Swift_Mime_Header $header, $string, $charset, + Swift_Mime_HeaderEncoder $encoder = null, $shorten = false) + { + //Treat token as exactly what was given + $phraseStr = $string; + //If it's not valid + if (!preg_match('/^' . $this->_grammar['phrase'] . '$/D', $phraseStr)) + { + // .. but it is just ascii text, try escaping some characters + // and make it a quoted-string + if (preg_match('/^' . $this->_grammar['text'] . '*$/D', $phraseStr)) + { + $phraseStr = $this->escapeSpecials( + $phraseStr, array('"'), $this->_specials + ); + $phraseStr = '"' . $phraseStr . '"'; + } + else // ... otherwise it needs encoding + { + //Determine space remaining on line if first line + if ($shorten) + { + $usedLength = strlen($header->getFieldName() . ': '); + } + else + { + $usedLength = 0; + } + $phraseStr = $this->encodeWords($header, $string, $usedLength); + } + } + + return $phraseStr; + } + + /** + * Encode needed word tokens within a string of input. + * @param string $input + * @param string $usedLength, optional + * @return string + */ + protected function encodeWords(Swift_Mime_Header $header, $input, + $usedLength = -1) + { + $value = ''; + + $tokens = $this->getEncodableWordTokens($input); + + foreach ($tokens as $token) + { + //See RFC 2822, Sect 2.2 (really 2.2 ??) + if ($this->tokenNeedsEncoding($token)) + { + //Don't encode starting WSP + $firstChar = substr($token, 0, 1); + switch($firstChar) + { + case ' ': + case "\t": + $value .= $firstChar; + $token = substr($token, 1); + } + + if (-1 == $usedLength) + { + $usedLength = strlen($header->getFieldName() . ': ') + strlen($value); + } + $value .= $this->getTokenAsEncodedWord($token, $usedLength); + + $header->setMaxLineLength(76); //Forefully override + } + else + { + $value .= $token; + } + } + + return $value; + } + + /** + * Test if a token needs to be encoded or not. + * @param string $token + * @return boolean + */ + protected function tokenNeedsEncoding($token) + { + return preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $token); + } + + /** + * Splits a string into tokens in blocks of words which can be encoded quickly. + * @param string $string + * @return string[] + */ + protected function getEncodableWordTokens($string) + { + $tokens = array(); + + $encodedToken = ''; + //Split at all whitespace boundaries + foreach (preg_split('~(?=[\t ])~', $string) as $token) + { + if ($this->tokenNeedsEncoding($token)) + { + $encodedToken .= $token; + } + else + { + if (strlen($encodedToken) > 0) + { + $tokens[] = $encodedToken; + $encodedToken = ''; + } + $tokens[] = $token; + } + } + if (strlen($encodedToken)) + { + $tokens[] = $encodedToken; + } + + return $tokens; + } + + /** + * Get a token as an encoded word for safe insertion into headers. + * @param string $token to encode + * @param int $firstLineOffset, optional + * @return string + */ + protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) + { + //Adjust $firstLineOffset to account for space needed for syntax + $charsetDecl = $this->_charset; + if (isset($this->_lang)) + { + $charsetDecl .= '*' . $this->_lang; + } + $encodingWrapperLength = strlen( + '=?' . $charsetDecl . '?' . $this->_encoder->getName() . '??=' + ); + + if ($firstLineOffset >= 75) //Does this logic need to be here? + { + $firstLineOffset = 0; + } + + $encodedTextLines = explode("\r\n", + $this->_encoder->encodeString( + $token, $firstLineOffset, 75 - $encodingWrapperLength + ) + ); + + foreach ($encodedTextLines as $lineNum => $line) + { + $encodedTextLines[$lineNum] = '=?' . $charsetDecl . + '?' . $this->_encoder->getName() . + '?' . $line . '?='; + } + + return implode("\r\n ", $encodedTextLines); + } + + /** + * Generates tokens from the given string which include CRLF as individual tokens. + * @param string $token + * @return string[] + * @access protected + */ + protected function generateTokenLines($token) + { + return preg_split('~(\r\n)~', $token, -1, PREG_SPLIT_DELIM_CAPTURE); + } + + /** + * Set a value into the cache. + * @param string $value + * @access protected + */ + protected function setCachedValue($value) + { + $this->_cachedValue = $value; + } + + /** + * Get the value in the cache. + * @return string + * @access protected + */ + protected function getCachedValue() + { + return $this->_cachedValue; + } + + /** + * Clear the cached value if $condition is met. + * @param boolean $condition + * @access protected + */ + protected function clearCachedValueIf($condition) + { + if ($condition) + { + $this->setCachedValue(null); + } + } + + // -- Private methods + + /** + * Generate a list of all tokens in the final header. + * @param string $string input, optional + * @return string[] + * @access private + */ + protected function toTokens($string = null) + { + if (is_null($string)) + { + $string = $this->getFieldBody(); + } + + $tokens = array(); + + //Generate atoms; split at all invisible boundaries followed by WSP + foreach (preg_split('~(?=[ \t])~', $string) as $token) + { + $tokens = array_merge($tokens, $this->generateTokenLines($token)); + } + + return $tokens; + } + + /** + * Takes an array of tokens which appear in the header and turns them into + * an RFC 2822 compliant string, adding FWSP where needed. + * @param string[] $tokens + * @return string + * @access private + */ + private function _tokensToString(array $tokens) + { + $lineCount = 0; + $headerLines = array(); + $headerLines[] = $this->_name . ': '; + $currentLine =& $headerLines[$lineCount++]; + + //Build all tokens back into compliant header + foreach ($tokens as $i => $token) + { + //Line longer than specified maximum or token was just a new line + if (("\r\n" == $token) || + ($i > 0 && strlen($currentLine . $token) > $this->_lineLength) + && 0 < strlen($currentLine)) + { + $headerLines[] = ''; + $currentLine =& $headerLines[$lineCount++]; + } + + //Append token to the line + if ("\r\n" != $token) + { + $currentLine .= $token; + } + } + + //Implode with FWS (RFC 2822, 2.2.3) + return implode("\r\n", $headerLines) . "\r\n"; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php new file mode 100644 index 0000000..598c0c5 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php @@ -0,0 +1,118 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Headers/AbstractHeader.php'; + + +/** + * A Date MIME Header for Swift Mailer. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Headers_DateHeader extends Swift_Mime_Headers_AbstractHeader +{ + + /** + * The UNIX timestamp value of this Header. + * @var int + * @access private + */ + private $_timestamp; + + /** + * Creates a new DateHeader with $name and $timestamp. + * Example: + * <code> + * <?php + * $header = new Swift_Mime_Headers_DateHeader('Date', time()); + * ?> + * </code> + * @param string $name of Header + */ + public function __construct($name) + { + $this->setFieldName($name); + } + + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType() + { + return self::TYPE_DATE; + } + + /** + * Set the model for the field body. + * This method takes a UNIX timestamp. + * @param int $model + */ + public function setFieldBodyModel($model) + { + $this->setTimestamp($model); + } + + /** + * Get the model for the field body. + * This method returns a UNIX timestamp. + * @return mixed + */ + public function getFieldBodyModel() + { + return $this->getTimestamp(); + } + + /** + * Get the UNIX timestamp of the Date in this Header. + * @return int + */ + public function getTimestamp() + { + return $this->_timestamp; + } + + /** + * Set the UNIX timestamp of the Date in this Header. + * @param int $timestamp + */ + public function setTimestamp($timestamp) + { + if (!is_null($timestamp)) + { + $timestamp = (int) $timestamp; + } + $this->clearCachedValueIf($this->_timestamp != $timestamp); + $this->_timestamp = $timestamp; + } + + /** + * Get the string value of the body in this Header. + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * @return string + * @see toString() + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) + { + if (isset($this->_timestamp)) + { + $this->setCachedValue(date('r', $this->_timestamp)); + } + } + return $this->getCachedValue(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php new file mode 100644 index 0000000..55ff737 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php @@ -0,0 +1,161 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Headers/AbstractHeader.php'; +//@require 'Swift/RfcComplianceException.php'; + +/** + * An ID MIME Header for something like Message-ID or Content-ID. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Headers_IdentificationHeader + extends Swift_Mime_Headers_AbstractHeader +{ + + /** + * The IDs used in the value of this Header. + * This may hold multiple IDs or just a single ID. + * @var string[] + * @access private + */ + private $_ids = array(); + + /** + * Creates a new IdentificationHeader with the given $name and $id. + * @param string $name + */ + public function __construct($name) + { + $this->setFieldName($name); + $this->initializeGrammar(); + } + + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType() + { + return self::TYPE_ID; + } + + /** + * Set the model for the field body. + * This method takes a string ID, or an array of IDs + * @param mixed $model + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setId($model); + } + + /** + * Get the model for the field body. + * This method returns an array of IDs + * @return array + */ + public function getFieldBodyModel() + { + return $this->getIds(); + } + + /** + * Set the ID used in the value of this header. + * @param string $id + * @throws Swift_RfcComplianceException + */ + public function setId($id) + { + return $this->setIds(array($id)); + } + + /** + * Get the ID used in the value of this Header. + * If multiple IDs are set only the first is returned. + * @return string + */ + public function getId() + { + if (count($this->_ids) > 0) + { + return $this->_ids[0]; + } + } + + /** + * Set a collection of IDs to use in the value of this Header. + * @param string[] $ids + * @throws Swift_RfcComplianceException + */ + public function setIds(array $ids) + { + $actualIds = array(); + + foreach ($ids as $k => $id) + { + if (preg_match( + '/^' . $this->getGrammar('id-left') . '@' . + $this->getGrammar('id-right') . '$/D', + $id + )) + { + $actualIds[] = $id; + } + else + { + throw new Swift_RfcComplianceException( + 'Invalid ID given <' . $id . '>' + ); + } + } + + $this->clearCachedValueIf($this->_ids != $actualIds); + $this->_ids = $actualIds; + } + + /** + * Get the list of IDs used in this Header. + * @return string[] + */ + public function getIds() + { + return $this->_ids; + } + + /** + * Get the string value of the body in this Header. + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * @return string + * @see toString() + * @throws Swift_RfcComplianceException + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) + { + $angleAddrs = array(); + + foreach ($this->_ids as $id) + { + $angleAddrs[] = '<' . $id . '>'; + } + + $this->setCachedValue(implode(' ', $angleAddrs)); + } + return $this->getCachedValue(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php new file mode 100644 index 0000000..77d3bba --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php @@ -0,0 +1,316 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Headers/AbstractHeader.php'; +//@require 'Swift/Mime/HeaderEncoder.php'; + +/** + * A Mailbox Address MIME Header for something like From or Sender. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Headers_MailboxHeader extends Swift_Mime_Headers_AbstractHeader +{ + + /** + * The mailboxes used in this Header. + * @var string[] + * @access private + */ + private $_mailboxes = array(); + + /** + * Creates a new MailboxHeader with $name. + * @param string $name of Header + * @param Swift_Mime_HeaderEncoder $encoder + */ + public function __construct($name, Swift_Mime_HeaderEncoder $encoder) + { + $this->setFieldName($name); + $this->setEncoder($encoder); + $this->initializeGrammar(); + } + + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType() + { + return self::TYPE_MAILBOX; + } + + /** + * Set the model for the field body. + * This method takes a string, or an array of addresses. + * @param mixed $model + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setNameAddresses($model); + } + + /** + * Get the model for the field body. + * This method returns an associative array like {@link getNameAddresses()} + * @return array + * @throws Swift_RfcComplianceException + */ + public function getFieldBodyModel() + { + return $this->getNameAddresses(); + } + + /** + * Set a list of mailboxes to be shown in this Header. + * The mailboxes can be a simple array of addresses, or an array of + * key=>value pairs where (email => personalName). + * Example: + * <code> + * <?php + * //Sets two mailboxes in the Header, one with a personal name + * $header->setNameAddresses(array( + * 'chris@swiftmailer.org' => 'Chris Corbyn', + * 'mark@swiftmailer.org' //No associated personal name + * )); + * ?> + * </code> + * @param string|string[] $mailboxes + * @throws Swift_RfcComplianceException + * @see __construct() + * @see setAddresses() + * @see setValue() + */ + public function setNameAddresses($mailboxes) + { + $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes); + $this->setCachedValue(null); //Clear any cached value + } + + /** + * Get the full mailbox list of this Header as an array of valid RFC 2822 strings. + * Example: + * <code> + * <?php + * $header = new Swift_Mime_Headers_MailboxHeader('From', + * array('chris@swiftmailer.org' => 'Chris Corbyn', + * 'mark@swiftmailer.org' => 'Mark Corbyn') + * ); + * print_r($header->getNameAddressStrings()); + * // array ( + * // 0 => Chris Corbyn <chris@swiftmailer.org>, + * // 1 => Mark Corbyn <mark@swiftmailer.org> + * // ) + * ?> + * </code> + * @return string[] + * @throws Swift_RfcComplianceException + * @see getNameAddresses() + * @see toString() + */ + public function getNameAddressStrings() + { + return $this->_createNameAddressStrings($this->getNameAddresses()); + } + + /** + * Get all mailboxes in this Header as key=>value pairs. + * The key is the address and the value is the name (or null if none set). + * Example: + * <code> + * <?php + * $header = new Swift_Mime_Headers_MailboxHeader('From', + * array('chris@swiftmailer.org' => 'Chris Corbyn', + * 'mark@swiftmailer.org' => 'Mark Corbyn') + * ); + * print_r($header->getNameAddresses()); + * // array ( + * // chris@swiftmailer.org => Chris Corbyn, + * // mark@swiftmailer.org => Mark Corbyn + * // ) + * ?> + * </code> + * @return string[] + * @see getAddresses() + * @see getNameAddressStrings() + */ + public function getNameAddresses() + { + return $this->_mailboxes; + } + + /** + * Makes this Header represent a list of plain email addresses with no names. + * Example: + * <code> + * <?php + * //Sets three email addresses as the Header data + * $header->setAddresses( + * array('one@domain.tld', 'two@domain.tld', 'three@domain.tld') + * ); + * ?> + * </code> + * @param string[] $addresses + * @throws Swift_RfcComplianceException + * @see setNameAddresses() + * @see setValue() + */ + public function setAddresses($addresses) + { + return $this->setNameAddresses(array_values((array) $addresses)); + } + + /** + * Get all email addresses in this Header. + * @return string[] + * @see getNameAddresses() + */ + public function getAddresses() + { + return array_keys($this->_mailboxes); + } + + /** + * Remove one or more addresses from this Header. + * @param string|string[] $addresses + */ + public function removeAddresses($addresses) + { + $this->setCachedValue(null); + foreach ((array) $addresses as $address) + { + unset($this->_mailboxes[$address]); + } + } + + /** + * Get the string value of the body in this Header. + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * @return string + * @throws Swift_RfcComplianceException + * @see toString() + */ + public function getFieldBody() + { + //Compute the string value of the header only if needed + if (is_null($this->getCachedValue())) + { + $this->setCachedValue($this->createMailboxListString($this->_mailboxes)); + } + return $this->getCachedValue(); + } + + // -- Points of extension + + /** + * Normalizes a user-input list of mailboxes into consistent key=>value pairs. + * @param string[] $mailboxes + * @return string[] + * @access protected + */ + protected function normalizeMailboxes(array $mailboxes) + { + $actualMailboxes = array(); + + foreach ($mailboxes as $key => $value) + { + if (is_string($key)) //key is email addr + { + $address = $key; + $name = $value; + } + else + { + $address = $value; + $name = null; + } + $this->_assertValidAddress($address); + $actualMailboxes[$address] = $name; + } + + return $actualMailboxes; + } + + /** + * Produces a compliant, formatted display-name based on the string given. + * @param string $displayName as displayed + * @param boolean $shorten the first line to make remove for header name + * @return string + * @access protected + */ + protected function createDisplayNameString($displayName, $shorten = false) + { + return $this->createPhrase($this, $displayName, + $this->getCharset(), $this->getEncoder(), $shorten + ); + } + + /** + * Creates a string form of all the mailboxes in the passed array. + * @param string[] $mailboxes + * @return string + * @throws Swift_RfcComplianceException + * @access protected + */ + protected function createMailboxListString(array $mailboxes) + { + return implode(', ', $this->_createNameAddressStrings($mailboxes)); + } + + // -- Private methods + + /** + * Return an array of strings conforming the the name-addr spec of RFC 2822. + * @param string[] $mailboxes + * @return string[] + * @access private + */ + private function _createNameAddressStrings(array $mailboxes) + { + $strings = array(); + + foreach ($mailboxes as $email => $name) + { + $mailboxStr = $email; + if (!is_null($name)) + { + $nameStr = $this->createDisplayNameString($name, empty($strings)); + $mailboxStr = $nameStr . ' <' . $mailboxStr . '>'; + } + $strings[] = $mailboxStr; + } + + return $strings; + } + + /** + * Throws an Exception if the address passed does not comply with RFC 2822. + * @param string $address + * @throws Exception If invalid. + * @access protected + */ + private function _assertValidAddress($address) + { + if (!preg_match('/^' . $this->getGrammar('addr-spec') . '$/D', + $address)) + { + throw new Swift_RfcComplianceException( + 'Address in mailbox given [' . $address . + '] does not comply with RFC 2822, 3.6.2.' + ); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php new file mode 100644 index 0000000..974b44e --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php @@ -0,0 +1,274 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Headers/UnstructuredHeader.php'; +//@require 'Swift/Mime/HeaderEncoder.php'; +//@require 'Swift/Mime/ParameterizedHeader.php'; +//@require 'Swift/Encoder.php'; + +/** + * An abstract base MIME Header. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Headers_ParameterizedHeader + extends Swift_Mime_Headers_UnstructuredHeader + implements Swift_Mime_ParameterizedHeader +{ + + /** + * The Encoder used to encode the parameters. + * @var Swift_Encoder + * @access private + */ + private $_paramEncoder; + + /** + * The parameters as an associative array. + * @var string[] + * @access private + */ + private $_params = array(); + + /** + * RFC 2231's definition of a token. + * @var string + * @access private + */ + private $_tokenRe; + + /** + * Creates a new ParameterizedHeader with $name. + * @param string $name + * @param Swift_Mime_HeaderEncoder $encoder + * @param Swift_Encoder $paramEncoder, optional + */ + public function __construct($name, Swift_Mime_HeaderEncoder $encoder, + Swift_Encoder $paramEncoder = null) + { + $this->setFieldName($name); + $this->setEncoder($encoder); + $this->_paramEncoder = $paramEncoder; + $this->initializeGrammar(); + $this->_tokenRe = '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)'; + } + + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType() + { + return self::TYPE_PARAMETERIZED; + } + + /** + * Set the character set used in this Header. + * @param string $charset + */ + public function setCharset($charset) + { + parent::setCharset($charset); + if (isset($this->_paramEncoder)) + { + $this->_paramEncoder->charsetChanged($charset); + } + } + + /** + * Set the value of $parameter. + * @param string $parameter + * @param string $value + */ + public function setParameter($parameter, $value) + { + $this->setParameters(array_merge($this->getParameters(), array($parameter => $value))); + } + + /** + * Get the value of $parameter. + * @return string + */ + public function getParameter($parameter) + { + $params = $this->getParameters(); + return array_key_exists($parameter, $params) + ? $params[$parameter] + : null; + } + + /** + * Set an associative array of parameter names mapped to values. + * @param string[] + */ + public function setParameters(array $parameters) + { + $this->clearCachedValueIf($this->_params != $parameters); + $this->_params = $parameters; + } + + /** + * Returns an associative array of parameter names mapped to values. + * @return string[] + */ + public function getParameters() + { + return $this->_params; + } + + /** + * Get the value of this header prepared for rendering. + * @return string + */ + public function getFieldBody() //TODO: Check caching here + { + $body = parent::getFieldBody(); + foreach ($this->_params as $name => $value) + { + if (!is_null($value)) + { + //Add the parameter + $body .= '; ' . $this->_createParameter($name, $value); + } + } + return $body; + } + + // -- Protected methods + + /** + * Generate a list of all tokens in the final header. + * This doesn't need to be overridden in theory, but it is for implementation + * reasons to prevent potential breakage of attributes. + * @return string[] + * @access protected + */ + protected function toTokens($string = null) + { + $tokens = parent::toTokens(parent::getFieldBody()); + + //Try creating any parameters + foreach ($this->_params as $name => $value) + { + if (!is_null($value)) + { + //Add the semi-colon separator + $tokens[count($tokens)-1] .= ';'; + $tokens = array_merge($tokens, $this->generateTokenLines( + ' ' . $this->_createParameter($name, $value) + )); + } + } + + return $tokens; + } + + // -- Private methods + + /** + * Render a RFC 2047 compliant header parameter from the $name and $value. + * @param string $name + * @param string $value + * @return string + * @access private + */ + private function _createParameter($name, $value) + { + $origValue = $value; + + $encoded = false; + //Allow room for parameter name, indices, "=" and DQUOTEs + $maxValueLength = $this->getMaxLineLength() - strlen($name . '=*N"";') - 1; + $firstLineOffset = 0; + + //If it's not already a valid parameter value... + if (!preg_match('/^' . $this->_tokenRe . '$/D', $value)) + { + //TODO: text, or something else?? + //... and it's not ascii + if (!preg_match('/^' . $this->getGrammar('text') . '*$/D', $value)) + { + $encoded = true; + //Allow space for the indices, charset and language + $maxValueLength = $this->getMaxLineLength() - strlen($name . '*N*="";') - 1; + $firstLineOffset = strlen( + $this->getCharset() . "'" . $this->getLanguage() . "'" + ); + } + } + + //Encode if we need to + if ($encoded || strlen($value) > $maxValueLength) + { + if (isset($this->_paramEncoder)) + { + $value = $this->_paramEncoder->encodeString( + $origValue, $firstLineOffset, $maxValueLength + ); + } + else //We have to go against RFC 2183/2231 in some areas for interoperability + { + $value = $this->getTokenAsEncodedWord($origValue); + $encoded = false; + } + } + + $valueLines = isset($this->_paramEncoder) ? explode("\r\n", $value) : array($value); + + //Need to add indices + if (count($valueLines) > 1) + { + $paramLines = array(); + foreach ($valueLines as $i => $line) + { + $paramLines[] = $name . '*' . $i . + $this->_getEndOfParameterValue($line, $encoded, $i == 0); + } + return implode(";\r\n ", $paramLines); + } + else + { + return $name . $this->_getEndOfParameterValue( + $valueLines[0], $encoded, true + ); + } + } + + /** + * Returns the parameter value from the "=" and beyond. + * @param string $value to append + * @param boolean $encoded + * @param boolean $firstLine + * @return string + * @access private + */ + private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false) + { + if (!preg_match('/^' . $this->_tokenRe . '$/D', $value)) + { + $value = '"' . $value . '"'; + } + $prepend = '='; + if ($encoded) + { + $prepend = '*='; + if ($firstLine) + { + $prepend = '*=' . $this->getCharset() . "'" . $this->getLanguage() . + "'"; + } + } + return $prepend . $value; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php new file mode 100644 index 0000000..0a8a100 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php @@ -0,0 +1,126 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Headers/AbstractHeader.php'; +//@require 'Swift/RfcComplianceException.php'; + +/** + * A Path Header in Swift Mailer, such a Return-Path. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Headers_PathHeader extends Swift_Mime_Headers_AbstractHeader +{ + + /** + * The address in this Header (if specified). + * @var string + * @access private + */ + private $_address; + + /** + * Creates a new PathHeader with the given $name. + * @param string $name + */ + public function __construct($name) + { + $this->setFieldName($name); + $this->initializeGrammar(); + } + + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType() + { + return self::TYPE_PATH; + } + + /** + * Set the model for the field body. + * This method takes a string for an address. + * @param string $model + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setAddress($model); + } + + /** + * Get the model for the field body. + * This method returns a string email address. + * @return mixed + */ + public function getFieldBodyModel() + { + return $this->getAddress(); + } + + /** + * Set the Address which should appear in this Header. + * @param string $address + * @throws Swift_RfcComplianceException + */ + public function setAddress($address) + { + if (is_null($address)) + { + $this->_address = null; + } + elseif ('' == $address + || preg_match('/^' . $this->getGrammar('addr-spec') . '$/D', $address)) + { + $this->_address = $address; + } + else + { + throw new Swift_RfcComplianceException( + 'Address set in PathHeader does not comply with addr-spec of RFC 2822.' + ); + } + $this->setCachedValue(null); + } + + /** + * Get the address which is used in this Header (if any). + * Null is returned if no address is set. + * @return string + */ + public function getAddress() + { + return $this->_address; + } + + /** + * Get the string value of the body in this Header. + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * @return string + * @see toString() + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) + { + if (isset($this->_address)) + { + $this->setCachedValue('<' . $this->_address . '>'); + } + } + return $this->getCachedValue(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php new file mode 100644 index 0000000..fdcc21e --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php @@ -0,0 +1,108 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Headers/AbstractHeader.php'; +//@require 'Swift/Mime/HeaderEncoder.php'; + +/** + * A Simple MIME Header. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_Headers_UnstructuredHeader + extends Swift_Mime_Headers_AbstractHeader +{ + + /** + * The value of this Header. + * @var string + * @access private + */ + private $_value; + + /** + * Creates a new SimpleHeader with $name. + * @param string $name + * @param Swift_Mime_HeaderEncoder $encoder + */ + public function __construct($name, Swift_Mime_HeaderEncoder $encoder) + { + $this->setFieldName($name); + $this->setEncoder($encoder); + } + /** + * Get the type of Header that this instance represents. + * @return int + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + */ + public function getFieldType() + { + return self::TYPE_TEXT; + } + + /** + * Set the model for the field body. + * This method takes a string for the field value. + * @param string $model + */ + public function setFieldBodyModel($model) + { + $this->setValue($model); + } + + /** + * Get the model for the field body. + * This method returns a string. + * @return string + */ + public function getFieldBodyModel() + { + return $this->getValue(); + } + + /** + * Get the (unencoded) value of this header. + * @return string + */ + public function getValue() + { + return $this->_value; + } + + /** + * Set the (unencoded) value of this header. + * @param string $value + */ + public function setValue($value) + { + $this->clearCachedValueIf($this->_value != $value); + $this->_value = $value; + } + + /** + * Get the value of this header prepared for rendering. + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) + { + $this->setCachedValue( + str_replace('\\', '\\\\', $this->encodeWords( + $this, $this->_value, -1, $this->getCharset(), $this->getEncoder() + )) + ); + } + return $this->getCachedValue(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/Message.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Message.php new file mode 100644 index 0000000..0496c08 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/Message.php @@ -0,0 +1,230 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/MimeEntity.php'; + +/** + * A Message (RFC 2822) object. + * + * @package Swift + * @subpackage Mime + * + * @author Chris Corbyn + */ +interface Swift_Mime_Message extends Swift_Mime_MimeEntity +{ + + /** + * Generates a valid Message-ID and switches to it. + * + * @return string + */ + public function generateId(); + + /** + * Set the subject of the message. + * + * @param string $subject + */ + public function setSubject($subject); + + /** + * Get the subject of the message. + * + * @return string + */ + public function getSubject(); + + /** + * Set the origination date of the message as a UNIX timestamp. + * + * @param int $date + */ + public function setDate($date); + + /** + * Get the origination date of the message as a UNIX timestamp. + * + * @return int + */ + public function getDate(); + + /** + * Set the return-path (bounce-detect) address. + * + * @param string $address + */ + public function setReturnPath($address); + + /** + * Get the return-path (bounce-detect) address. + * + * @return string + */ + public function getReturnPath(); + + /** + * Set the sender of this message. + * + * If multiple addresses are present in the From field, this SHOULD be set. + * + * According to RFC 2822 it is a requirement when there are multiple From + * addresses, but Swift itself does not require it directly. + * + * An associative array (with one element!) can be used to provide a display- + * name: i.e. array('email@address' => 'Real Name'). + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $address + * @param string $name optional + */ + public function setSender($address, $name = null); + + /** + * Get the sender address for this message. + * + * This has a higher significance than the From address. + * + * @return string + */ + public function getSender(); + + /** + * Set the From address of this message. + * + * It is permissible for multiple From addresses to be set using an array. + * + * If multiple From addresses are used, you SHOULD set the Sender address and + * according to RFC 2822, MUST set the sender address. + * + * An array can be used if display names are to be provided: i.e. + * array('email@address.com' => 'Real Name'). + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setFrom($addresses, $name = null); + + /** + * Get the From address(es) of this message. + * + * This method always returns an associative array where the keys are the + * addresses. + * + * @return string[] + */ + public function getFrom(); + + /** + * Set the Reply-To address(es). + * + * Any replies from the receiver will be sent to this address. + * + * It is permissible for multiple reply-to addresses to be set using an array. + * + * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setReplyTo($addresses, $name = null); + + /** + * Get the Reply-To addresses for this message. + * + * This method always returns an associative array where the keys provide the + * email addresses. + * + * @return string[] + */ + public function getReplyTo(); + + /** + * Set the To address(es). + * + * Recipients set in this field will receive a copy of this message. + * + * This method has the same synopsis as {@link setFrom()} and {@link setCc()}. + * + * If the second parameter is provided and the first is a string, then $name + * is associated with the address. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setTo($addresses, $name = null); + + /** + * Get the To addresses for this message. + * + * This method always returns an associative array, whereby the keys provide + * the actual email addresses. + * + * @return string[] + */ + public function getTo(); + + /** + * Set the Cc address(es). + * + * Recipients set in this field will receive a 'carbon-copy' of this message. + * + * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setCc($addresses, $name = null); + + /** + * Get the Cc addresses for this message. + * + * This method always returns an associative array, whereby the keys provide + * the actual email addresses. + * + * @return string[] + */ + public function getCc(); + + /** + * Set the Bcc address(es). + * + * Recipients set in this field will receive a 'blind-carbon-copy' of this + * message. + * + * In other words, they will get the message, but any other recipients of the + * message will have no such knowledge of their receipt of it. + * + * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. + * + * @param mixed $addresses + * @param string $name optional + */ + public function setBcc($addresses, $name = null); + + /** + * Get the Bcc addresses for this message. + * + * This method always returns an associative array, whereby the keys provide + * the actual email addresses. + * + * @return string[] + */ + public function getBcc(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php new file mode 100644 index 0000000..2b08009 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php @@ -0,0 +1,108 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/Mime/EncodingObserver.php'; +//@require 'Swift/Mime/CharsetObserver.php'; + +/** + * A MIME entity, such as an attachment. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_MimeEntity + extends Swift_Mime_CharsetObserver, Swift_Mime_EncodingObserver +{ + + /** Main message document; there can only be one of these */ + const LEVEL_TOP = 16; + + /** An entity which nests with the same precedence as an attachment */ + const LEVEL_MIXED = 256; + + /** An entity which nests with the same precedence as a mime part */ + const LEVEL_ALTERNATIVE = 4096; + + /** An entity which nests with the same precedence as embedded content */ + const LEVEL_RELATED = 65536; + + /** + * Get the level at which this entity shall be nested in final document. + * The lower the value, the more outermost the entity will be nested. + * @return int + * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE + */ + public function getNestingLevel(); + + /** + * Get the qualified content-type of this mime entity. + * @return string + */ + public function getContentType(); + + /** + * Returns a unique ID for this entity. + * For most entities this will likely be the Content-ID, though it has + * no explicit semantic meaning and can be considered an identifier for + * programming logic purposes. + * If a Content-ID header is present, this value SHOULD match the value of + * the header. + * @return string + */ + public function getId(); + + /** + * Get all children nested inside this entity. + * These are not just the immediate children, but all children. + * @return Swift_Mime_MimeEntity[] + */ + public function getChildren(); + + /** + * Set all children nested inside this entity. + * This includes grandchildren. + * @param Swift_Mime_MimeEntity[] $children + */ + public function setChildren(array $children); + + /** + * Get the collection of Headers in this Mime entity. + * @return Swift_Mime_Header[] + */ + public function getHeaders(); + + /** + * Get the body content of this entity as a string. + * Returns NULL if no body has been set. + * @return string + */ + public function getBody(); + + /** + * Set the body content of this entity as a string. + * @param string $body + * @param string $contentType optional + */ + public function setBody($body, $contentType = null); + + /** + * Get this entire entity in its string form. + * @return string + */ + public function toString(); + + /** + * Get this entire entity as a ByteStream. + * @param Swift_InputByteStream $is to write to + */ + public function toByteStream(Swift_InputByteStream $is); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/MimePart.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/MimePart.php new file mode 100644 index 0000000..78c6fe0 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/MimePart.php @@ -0,0 +1,196 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/SimpleMimeEntity.php'; +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/Mime/HeaderSet.php'; +//@require 'Swift/KeyCache.php'; + +/** + * A MIME part, in a multipart message. + * + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_MimePart extends Swift_Mime_SimpleMimeEntity +{ + + /** The format parameter last specified by the user */ + protected $_userFormat; + + /** The charset last specified by the user */ + protected $_userCharset; + + /** The delsp parameter last specified by the user */ + protected $_userDelSp; + + /** The nesting level of this MimePart */ + private $_nestingLevel = self::LEVEL_ALTERNATIVE; + + /** + * Create a new MimePart with $headers, $encoder and $cache. + * + * @param Swift_Mime_HeaderSet $headers + * @param Swift_Mime_ContentEncoder $encoder + * @param Swift_KeyCache $cache + * @param string $charset + */ + public function __construct(Swift_Mime_HeaderSet $headers, + Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, $charset = null) + { + parent::__construct($headers, $encoder, $cache); + $this->setContentType('text/plain'); + if (!is_null($charset)) + { + $this->setCharset($charset); + } + } + + /** + * Set the body of this entity, either as a string, or as an instance of + * {@link Swift_OutputByteStream}. + * + * @param mixed $body + * @param string $contentType optional + * @param string $charset optional + */ + public function setBody($body, $contentType = null, $charset = null) + { + parent::setBody($body, $contentType); + if (isset($charset)) + { + $this->setCharset($charset); + } + return $this; + } + + /** + * Get the character set of this entity. + * + * @return string + */ + public function getCharset() + { + return $this->_getHeaderParameter('Content-Type', 'charset'); + } + + /** + * Set the character set of this entity. + * + * @param string $charset + */ + public function setCharset($charset) + { + $this->_setHeaderParameter('Content-Type', 'charset', $charset); + if ($charset !== $this->_userCharset) + { + $this->_clearCache(); + } + $this->_userCharset = $charset; + parent::charsetChanged($charset); + return $this; + } + + /** + * Get the format of this entity (i.e. flowed or fixed). + * + * @return string + */ + public function getFormat() + { + return $this->_getHeaderParameter('Content-Type', 'format'); + } + + /** + * Set the format of this entity (flowed or fixed). + * + * @param string $format + */ + public function setFormat($format) + { + $this->_setHeaderParameter('Content-Type', 'format', $format); + $this->_userFormat = $format; + return $this; + } + + /** + * Test if delsp is being used for this entity. + * + * @return boolean + */ + public function getDelSp() + { + return ($this->_getHeaderParameter('Content-Type', 'delsp') == 'yes') + ? true + : false; + } + + /** + * Turn delsp on or off for this entity. + * + * @param boolean $delsp + */ + public function setDelSp($delsp = true) + { + $this->_setHeaderParameter('Content-Type', 'delsp', $delsp ? 'yes' : null); + $this->_userDelSp = $delsp; + return $this; + } + + /** + * Get the nesting level of this entity. + * + * @return int + * @see LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED + */ + public function getNestingLevel() + { + return $this->_nestingLevel; + } + + /** + * Receive notification that the charset has changed on this document, or a + * parent document. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->setCharset($charset); + } + + // -- Protected methods + + /** Fix the content-type and encoding of this entity */ + protected function _fixHeaders() + { + parent::_fixHeaders(); + if (count($this->getChildren())) + { + $this->_setHeaderParameter('Content-Type', 'charset', null); + $this->_setHeaderParameter('Content-Type', 'format', null); + $this->_setHeaderParameter('Content-Type', 'delsp', null); + } + else + { + $this->setCharset($this->_userCharset); + $this->setFormat($this->_userFormat); + $this->setDelSp($this->_userDelSp); + } + } + + /** Set the nesting level of this entity */ + protected function _setNestingLevel($level) + { + $this->_nestingLevel = $level; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php new file mode 100644 index 0000000..da65ca9 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php @@ -0,0 +1,35 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Header.php'; + +/** + * A MIME Header with parameters. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +interface Swift_Mime_ParameterizedHeader extends Swift_Mime_Header +{ + + /** + * Set the value of $parameter. + * @param string $parameter + * @param string $value + */ + public function setParameter($parameter, $value); + + /** + * Get the value of $parameter. + * @return string + */ + public function getParameter($parameter); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php new file mode 100644 index 0000000..6954ac5 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php @@ -0,0 +1,187 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/HeaderFactory.php'; +//@require 'Swift/Mime/HeaderEncoder.php'; +//@require 'Swift/Encoder.php'; +//@require 'Swift/Mime/Headers/MailboxHeader.php'; +//@require 'Swift/Mime/Headers/DateHeader.php'; +//@require 'Swift/Mime/Headers/UnstructuredHeader.php'; +//@require 'Swift/Mime/Headers/ParameterizedHeader.php'; +//@require 'Swift/Mime/Headers/IdentificationHeader.php'; +//@require 'Swift/Mime/Headers/PathHeader.php'; + +/** + * Creates MIME headers. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_SimpleHeaderFactory implements Swift_Mime_HeaderFactory +{ + + /** The HeaderEncoder used by these headers */ + private $_encoder; + + /** The Encoder used by parameters */ + private $_paramEncoder; + + /** The charset of created Headers */ + private $_charset; + + /** + * Creates a new SimpleHeaderFactory using $encoder and $paramEncoder. + * @param Swift_Mime_HeaderEncoder $encoder + * @param Swift_Encoder $paramEncoder + * @param string $charset + */ + public function __construct(Swift_Mime_HeaderEncoder $encoder, + Swift_Encoder $paramEncoder, $charset = null) + { + $this->_encoder = $encoder; + $this->_paramEncoder = $paramEncoder; + $this->_charset = $charset; + } + + /** + * Create a new Mailbox Header with a list of $addresses. + * @param string $name + * @param array|string $addresses + * @return Swift_Mime_Header + */ + public function createMailboxHeader($name, $addresses = null) + { + $header = new Swift_Mime_Headers_MailboxHeader($name, $this->_encoder); + if (isset($addresses)) + { + $header->setFieldBodyModel($addresses); + } + $this->_setHeaderCharset($header); + return $header; + } + + /** + * Create a new Date header using $timestamp (UNIX time). + * @param string $name + * @param int $timestamp + * @return Swift_Mime_Header + */ + public function createDateHeader($name, $timestamp = null) + { + $header = new Swift_Mime_Headers_DateHeader($name); + if (isset($timestamp)) + { + $header->setFieldBodyModel($timestamp); + } + $this->_setHeaderCharset($header); + return $header; + } + + /** + * Create a new basic text header with $name and $value. + * @param string $name + * @param string $value + * @return Swift_Mime_Header + */ + public function createTextHeader($name, $value = null) + { + $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->_encoder); + if (isset($value)) + { + $header->setFieldBodyModel($value); + } + $this->_setHeaderCharset($header); + return $header; + } + + /** + * Create a new ParameterizedHeader with $name, $value and $params. + * @param string $name + * @param string $value + * @param array $params + * @return Swift_Mime_ParameterizedHeader + */ + public function createParameterizedHeader($name, $value = null, + $params = array()) + { + $header = new Swift_Mime_Headers_ParameterizedHeader($name, + $this->_encoder, (strtolower($name) == 'content-disposition') + ? $this->_paramEncoder + : null + ); + if (isset($value)) + { + $header->setFieldBodyModel($value); + } + foreach ($params as $k => $v) + { + $header->setParameter($k, $v); + } + $this->_setHeaderCharset($header); + return $header; + } + + /** + * Create a new ID header for Message-ID or Content-ID. + * @param string $name + * @param string|array $ids + * @return Swift_Mime_Header + */ + public function createIdHeader($name, $ids = null) + { + $header = new Swift_Mime_Headers_IdentificationHeader($name); + if (isset($ids)) + { + $header->setFieldBodyModel($ids); + } + $this->_setHeaderCharset($header); + return $header; + } + + /** + * Create a new Path header with an address (path) in it. + * @param string $name + * @param string $path + * @return Swift_Mime_Header + */ + public function createPathHeader($name, $path = null) + { + $header = new Swift_Mime_Headers_PathHeader($name); + if (isset($path)) + { + $header->setFieldBodyModel($path); + } + $this->_setHeaderCharset($header); + return $header; + } + + /** + * Notify this observer that the entity's charset has changed. + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_charset = $charset; + $this->_encoder->charsetChanged($charset); + $this->_paramEncoder->charsetChanged($charset); + } + + // -- Private methods + + /** Apply the charset to the Header */ + private function _setHeaderCharset(Swift_Mime_Header $header) + { + if (isset($this->_charset)) + { + $header->setCharset($this->_charset); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php new file mode 100644 index 0000000..eeb0221 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php @@ -0,0 +1,396 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/HeaderSet.php'; +//@require 'Swift/Mime/HeaderFactory.php'; + +/** + * A collection of MIME headers. + * + * @package Swift + * @subpackage Mime + * + * @author Chris Corbyn + */ +class Swift_Mime_SimpleHeaderSet implements Swift_Mime_HeaderSet +{ + + /** HeaderFactory */ + private $_factory; + + /** Collection of set Headers */ + private $_headers = array(); + + /** Field ordering details */ + private $_order = array(); + + /** List of fields which are required to be displayed */ + private $_required = array(); + + /** The charset used by Headers */ + private $_charset; + + /** + * Create a new SimpleHeaderSet with the given $factory. + * + * @param Swift_Mime_HeaderFactory $factory + * @param string $charset + */ + public function __construct(Swift_Mime_HeaderFactory $factory, + $charset = null) + { + $this->_factory = $factory; + if (isset($charset)) + { + $this->setCharset($charset); + } + } + + /** + * Set the charset used by these headers. + * + * @param string $charset + */ + public function setCharset($charset) + { + $this->_charset = $charset; + $this->_factory->charsetChanged($charset); + $this->_notifyHeadersOfCharset($charset); + } + + /** + * Add a new Mailbox Header with a list of $addresses. + * + * @param string $name + * @param array|string $addresses + */ + public function addMailboxHeader($name, $addresses = null) + { + $this->_storeHeader($name, + $this->_factory->createMailboxHeader($name, $addresses)); + } + + /** + * Add a new Date header using $timestamp (UNIX time). + * + * @param string $name + * @param int $timestamp + */ + public function addDateHeader($name, $timestamp = null) + { + $this->_storeHeader($name, + $this->_factory->createDateHeader($name, $timestamp)); + } + + /** + * Add a new basic text header with $name and $value. + * + * @param string $name + * @param string $value + */ + public function addTextHeader($name, $value = null) + { + $this->_storeHeader($name, + $this->_factory->createTextHeader($name, $value)); + } + + /** + * Add a new ParameterizedHeader with $name, $value and $params. + * + * @param string $name + * @param string $value + * @param array $params + */ + public function addParameterizedHeader($name, $value = null, + $params = array()) + { + $this->_storeHeader($name, + $this->_factory->createParameterizedHeader($name, $value, + $params)); + } + + /** + * Add a new ID header for Message-ID or Content-ID. + * + * @param string $name + * @param string|array $ids + */ + public function addIdHeader($name, $ids = null) + { + $this->_storeHeader($name, $this->_factory->createIdHeader($name, $ids)); + } + + /** + * Add a new Path header with an address (path) in it. + * + * @param string $name + * @param string $path + */ + public function addPathHeader($name, $path = null) + { + $this->_storeHeader($name, $this->_factory->createPathHeader($name, $path)); + } + + /** + * Returns true if at least one header with the given $name exists. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + * + * @return boolean + */ + public function has($name, $index = 0) + { + $lowerName = strtolower($name); + return array_key_exists($lowerName, $this->_headers) + && array_key_exists($index, $this->_headers[$lowerName]); + } + + /** + * Set a header in the HeaderSet. + * + * The header may be a previously fetched header via {@link get()} or it may + * be one that has been created separately. + * + * If $index is specified, the header will be inserted into the set at this + * offset. + * + * @param Swift_Mime_Header $header + * @param int $index + */ + public function set(Swift_Mime_Header $header, $index = 0) + { + $this->_storeHeader($header->getFieldName(), $header, $index); + } + + /** + * Get the header with the given $name. + * + * If multiple headers match, the actual one may be specified by $index. + * Returns NULL if none present. + * + * @param string $name + * @param int $index + * + * @return Swift_Mime_Header + */ + public function get($name, $index = 0) + { + if ($this->has($name, $index)) + { + $lowerName = strtolower($name); + return $this->_headers[$lowerName][$index]; + } + } + + /** + * Get all headers with the given $name. + * + * @param string $name + * + * @return array + */ + public function getAll($name = null) + { + if (!isset($name)) + { + $headers = array(); + foreach ($this->_headers as $collection) + { + $headers = array_merge($headers, $collection); + } + return $headers; + } + + $lowerName = strtolower($name); + if (!array_key_exists($lowerName, $this->_headers)) + { + return array(); + } + return $this->_headers[$lowerName]; + } + + /** + * Remove the header with the given $name if it's set. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + */ + public function remove($name, $index = 0) + { + $lowerName = strtolower($name); + unset($this->_headers[$lowerName][$index]); + } + + /** + * Remove all headers with the given $name. + * + * @param string $name + */ + public function removeAll($name) + { + $lowerName = strtolower($name); + unset($this->_headers[$lowerName]); + } + + /** + * Create a new instance of this HeaderSet. + * + * @return Swift_Mime_HeaderSet + */ + public function newInstance() + { + return new self($this->_factory); + } + + /** + * Define a list of Header names as an array in the correct order. + * + * These Headers will be output in the given order where present. + * + * @param array $sequence + */ + public function defineOrdering(array $sequence) + { + $this->_order = array_flip(array_map('strtolower', $sequence)); + } + + /** + * Set a list of header names which must always be displayed when set. + * + * Usually headers without a field value won't be output unless set here. + * + * @param array $names + */ + public function setAlwaysDisplayed(array $names) + { + $this->_required = array_flip(array_map('strtolower', $names)); + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->setCharset($charset); + } + + /** + * Returns a string with a representation of all headers. + * + * @return string + */ + public function toString() + { + $string = ''; + $headers = $this->_headers; + if ($this->_canSort()) + { + uksort($headers, array($this, '_sortHeaders')); + } + foreach ($headers as $collection) + { + foreach ($collection as $header) + { + if ($this->_isDisplayed($header) || $header->getFieldBody() != '') + { + $string .= $header->toString(); + } + } + } + return $string; + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + // -- Private methods + + /** Save a Header to the internal collection */ + private function _storeHeader($name, Swift_Mime_Header $header, $offset = null) + { + if (!isset($this->_headers[strtolower($name)])) + { + $this->_headers[strtolower($name)] = array(); + } + if (!isset($offset)) + { + $this->_headers[strtolower($name)][] = $header; + } + else + { + $this->_headers[strtolower($name)][$offset] = $header; + } + } + + /** Test if the headers can be sorted */ + private function _canSort() + { + return count($this->_order) > 0; + } + + /** uksort() algorithm for Header ordering */ + private function _sortHeaders($a, $b) + { + $lowerA = strtolower($a); + $lowerB = strtolower($b); + $aPos = array_key_exists($lowerA, $this->_order) + ? $this->_order[$lowerA] + : -1; + $bPos = array_key_exists($lowerB, $this->_order) + ? $this->_order[$lowerB] + : -1; + + if ($aPos == -1) + { + return 1; + } + elseif ($bPos == -1) + { + return -1; + } + + return ($aPos < $bPos) ? -1 : 1; + } + + /** Test if the given Header is always displayed */ + private function _isDisplayed(Swift_Mime_Header $header) + { + return array_key_exists(strtolower($header->getFieldName()), $this->_required); + } + + /** Notify all Headers of the new charset */ + private function _notifyHeadersOfCharset($charset) + { + foreach ($this->_headers as $headerGroup) + { + foreach ($headerGroup as $header) + { + $header->setCharset($charset); + } + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php new file mode 100644 index 0000000..bbe1e8f --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php @@ -0,0 +1,609 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Mime/MimePart.php'; +//@require 'Swift/Mime/MimeEntity.php'; +//@require 'Swift/Mime/HeaderSet.php'; +//@require 'Swift/Mime/ContentEncoder.php'; + +/** + * The default email message class. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart + implements Swift_Mime_Message +{ + + /** + * Create a new SimpleMessage with $headers, $encoder and $cache. + * @param Swift_Mime_HeaderSet $headers + * @param Swift_Mime_ContentEncoder $encoder + * @param Swift_KeyCache $cache + * @param string $charset + */ + public function __construct(Swift_Mime_HeaderSet $headers, + Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, $charset = null) + { + parent::__construct($headers, $encoder, $cache, $charset); + $this->getHeaders()->defineOrdering(array( + 'Return-Path', + 'Sender', + 'Message-ID', + 'Date', + 'Subject', + 'From', + 'Reply-To', + 'To', + 'Cc', + 'Bcc', + 'MIME-Version', + 'Content-Type', + 'Content-Transfer-Encoding' + )); + $this->getHeaders()->setAlwaysDisplayed( + array('Date', 'Message-ID', 'From') + ); + $this->getHeaders()->addTextHeader('MIME-Version', '1.0'); + $this->setDate(time()); + $this->setId($this->getId()); + $this->getHeaders()->addMailboxHeader('From'); + } + + /** + * Always returns {@link LEVEL_TOP} for a message instance. + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_TOP; + } + + /** + * Set the subject of this message. + * @param string $subject + */ + public function setSubject($subject) + { + if (!$this->_setHeaderFieldModel('Subject', $subject)) + { + $this->getHeaders()->addTextHeader('Subject', $subject); + } + return $this; + } + + /** + * Get the subject of this message. + * @return string + */ + public function getSubject() + { + return $this->_getHeaderFieldModel('Subject'); + } + + /** + * Set the date at which this message was created. + * @param int $date + */ + public function setDate($date) + { + if (!$this->_setHeaderFieldModel('Date', $date)) + { + $this->getHeaders()->addDateHeader('Date', $date); + } + return $this; + } + + /** + * Get the date at which this message was created. + * @return int + */ + public function getDate() + { + return $this->_getHeaderFieldModel('Date'); + } + + /** + * Set the return-path (the bounce address) of this message. + * @param string $address + */ + public function setReturnPath($address) + { + if (!$this->_setHeaderFieldModel('Return-Path', $address)) + { + $this->getHeaders()->addPathHeader('Return-Path', $address); + } + return $this; + } + + /** + * Get the return-path (bounce address) of this message. + * @return string + */ + public function getReturnPath() + { + return $this->_getHeaderFieldModel('Return-Path'); + } + + /** + * Set the sender of this message. + * This does not override the From field, but it has a higher significance. + * @param string $sender + * @param string $name optional + */ + public function setSender($address, $name = null) + { + if (!is_array($address) && isset($name)) + { + $address = array($address => $name); + } + + if (!$this->_setHeaderFieldModel('Sender', (array) $address)) + { + $this->getHeaders()->addMailboxHeader('Sender', (array) $address); + } + return $this; + } + + /** + * Get the sender of this message. + * @return string + */ + public function getSender() + { + return $this->_getHeaderFieldModel('Sender'); + } + + /** + * Add a From: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + */ + public function addFrom($address, $name = null) + { + $current = $this->getFrom(); + $current[$address] = $name; + return $this->setFrom($current); + } + + /** + * Set the from address of this message. + * + * You may pass an array of addresses if this message is from multiple people. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param string $addresses + * @param string $name optional + */ + public function setFrom($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) + { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('From', (array) $addresses)) + { + $this->getHeaders()->addMailboxHeader('From', (array) $addresses); + } + return $this; + } + + /** + * Get the from address of this message. + * + * @return string + */ + public function getFrom() + { + return $this->_getHeaderFieldModel('From'); + } + + /** + * Add a Reply-To: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + */ + public function addReplyTo($address, $name = null) + { + $current = $this->getReplyTo(); + $current[$address] = $name; + return $this->setReplyTo($current); + } + + /** + * Set the reply-to address of this message. + * + * You may pass an array of addresses if replies will go to multiple people. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param string $addresses + * @param string $name optional + */ + public function setReplyTo($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) + { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('Reply-To', (array) $addresses)) + { + $this->getHeaders()->addMailboxHeader('Reply-To', (array) $addresses); + } + return $this; + } + + /** + * Get the reply-to address of this message. + * + * @return string + */ + public function getReplyTo() + { + return $this->_getHeaderFieldModel('Reply-To'); + } + + /** + * Add a To: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + */ + public function addTo($address, $name = null) + { + $current = $this->getTo(); + $current[$address] = $name; + return $this->setTo($current); + } + + /** + * Set the to addresses of this message. + * + * If multiple recipients will receive the message and array should be used. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param array $addresses + * @param string $name optional + */ + public function setTo($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) + { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('To', (array) $addresses)) + { + $this->getHeaders()->addMailboxHeader('To', (array) $addresses); + } + return $this; + } + + /** + * Get the To addresses of this message. + * + * @return array + */ + public function getTo() + { + return $this->_getHeaderFieldModel('To'); + } + + /** + * Add a Cc: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + */ + public function addCc($address, $name = null) + { + $current = $this->getCc(); + $current[$address] = $name; + return $this->setCc($current); + } + + /** + * Set the Cc addresses of this message. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param array $addresses + * @param string $name optional + */ + public function setCc($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) + { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('Cc', (array) $addresses)) + { + $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses); + } + return $this; + } + + /** + * Get the Cc address of this message. + * + * @return array + */ + public function getCc() + { + return $this->_getHeaderFieldModel('Cc'); + } + + /** + * Add a Bcc: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + */ + public function addBcc($address, $name = null) + { + $current = $this->getBcc(); + $current[$address] = $name; + return $this->setBcc($current); + } + + /** + * Set the Bcc addresses of this message. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param array $addresses + * @param string $name optional + */ + public function setBcc($addresses, $name = null) + { + if (!is_array($addresses) && isset($name)) + { + $addresses = array($addresses => $name); + } + + if (!$this->_setHeaderFieldModel('Bcc', (array) $addresses)) + { + $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses); + } + return $this; + } + + /** + * Get the Bcc addresses of this message. + * + * @return array + */ + public function getBcc() + { + return $this->_getHeaderFieldModel('Bcc'); + } + + /** + * Set the priority of this message. + * The value is an integer where 1 is the highest priority and 5 is the lowest. + * @param int $priority + */ + public function setPriority($priority) + { + $priorityMap = array( + 1 => 'Highest', + 2 => 'High', + 3 => 'Normal', + 4 => 'Low', + 5 => 'Lowest' + ); + $pMapKeys = array_keys($priorityMap); + if ($priority > max($pMapKeys)) + { + $priority = max($pMapKeys); + } + elseif ($priority < min($pMapKeys)) + { + $priority = min($pMapKeys); + } + if (!$this->_setHeaderFieldModel('X-Priority', + sprintf('%d (%s)', $priority, $priorityMap[$priority]))) + { + $this->getHeaders()->addTextHeader('X-Priority', + sprintf('%d (%s)', $priority, $priorityMap[$priority])); + } + return $this; + } + + /** + * Get the priority of this message. + * The returned value is an integer where 1 is the highest priority and 5 + * is the lowest. + * @return int + */ + public function getPriority() + { + list($priority) = sscanf($this->_getHeaderFieldModel('X-Priority'), + '%[1-5]' + ); + return isset($priority) ? $priority : 3; + } + + /** + * Ask for a delivery receipt from the recipient to be sent to $addresses + * @param array $addresses + */ + public function setReadReceiptTo($addresses) + { + if (!$this->_setHeaderFieldModel('Disposition-Notification-To', $addresses)) + { + $this->getHeaders() + ->addMailboxHeader('Disposition-Notification-To', $addresses); + } + return $this; + } + + /** + * Get the addresses to which a read-receipt will be sent. + * @return string + */ + public function getReadReceiptTo() + { + return $this->_getHeaderFieldModel('Disposition-Notification-To'); + } + + /** + * Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart. + * @param Swift_Mime_MimeEntity $entity + */ + public function attach(Swift_Mime_MimeEntity $entity) + { + $this->setChildren(array_merge($this->getChildren(), array($entity))); + return $this; + } + + /** + * Remove an already attached entity. + * @param Swift_Mime_MimeEntity $entity + */ + public function detach(Swift_Mime_MimeEntity $entity) + { + $newChildren = array(); + foreach ($this->getChildren() as $child) + { + if ($entity !== $child) + { + $newChildren[] = $child; + } + } + $this->setChildren($newChildren); + return $this; + } + + /** + * Attach a {@link Swift_Mime_MimeEntity} and return it's CID source. + * This method should be used when embedding images or other data in a message. + * @param Swift_Mime_MimeEntity $entity + * @return string + */ + public function embed(Swift_Mime_MimeEntity $entity) + { + $this->attach($entity); + return 'cid:' . $entity->getId(); + } + + /** + * Get this message as a complete string. + * @return string + */ + public function toString() + { + if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') + { + $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); + $string = parent::toString(); + $this->setChildren($children); + } + else + { + $string = parent::toString(); + } + return $string; + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Write this message to a {@link Swift_InputByteStream}. + * @param Swift_InputByteStream $is + */ + public function toByteStream(Swift_InputByteStream $is) + { + if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') + { + $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); + parent::toByteStream($is); + $this->setChildren($children); + } + else + { + parent::toByteStream($is); + } + } + + // -- Protected methods + + /** @see Swift_Mime_SimpleMimeEntity::_getIdField() */ + protected function _getIdField() + { + return 'Message-ID'; + } + + // -- Private methods + + /** Turn the body of this message into a child of itself if needed */ + private function _becomeMimePart() + { + $part = new parent($this->getHeaders()->newInstance(), $this->getEncoder(), + $this->_getCache(), $this->_userCharset + ); + $part->setContentType($this->_userContentType); + $part->setBody($this->getBody()); + $part->setFormat($this->_userFormat); + $part->setDelSp($this->_userDelSp); + $part->_setNestingLevel($this->_getTopNestingLevel()); + return $part; + } + + /** Get the highest nesting level nested inside this message */ + private function _getTopNestingLevel() + { + $highestLevel = $this->getNestingLevel(); + foreach ($this->getChildren() as $child) + { + $childLevel = $child->getNestingLevel(); + if ($highestLevel < $childLevel) + { + $highestLevel = $childLevel; + } + } + return $highestLevel; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php new file mode 100644 index 0000000..1615822 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php @@ -0,0 +1,803 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/HeaderSet.php'; +//@require 'Swift/OutputByteStream.php'; +//@require 'Swift/Mime/ContentEncoder.php'; +//@require 'Swift/KeyCache.php'; + +/** + * A MIME entity, in a multipart message. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_Mime_SimpleMimeEntity implements Swift_Mime_MimeEntity +{ + + /** A collection of Headers for this mime entity */ + private $_headers; + + /** The body as a string, or a stream */ + private $_body; + + /** The encoder that encodes the body into a streamable format */ + private $_encoder; + + /** A mime bounary, if any is used */ + private $_boundary; + + /** Mime types to be used based on the nesting level */ + private $_compositeRanges = array( + 'multipart/mixed' => array(self::LEVEL_TOP, self::LEVEL_MIXED), + 'multipart/alternative' => array(self::LEVEL_MIXED, self::LEVEL_ALTERNATIVE), + 'multipart/related' => array(self::LEVEL_ALTERNATIVE, self::LEVEL_RELATED) + ); + + /** A set of filter rules to define what level an entity should be nested at */ + private $_compoundLevelFilters = array(); + + /** The nesting level of this entity */ + private $_nestingLevel = self::LEVEL_ALTERNATIVE; + + /** A KeyCache instance used during encoding and streaming */ + private $_cache; + + /** Direct descendants of this entity */ + private $_immediateChildren = array(); + + /** All descendants of this entity */ + private $_children = array(); + + /** The maximum line length of the body of this entity */ + private $_maxLineLength = 78; + + /** The order in which alternative mime types should appear */ + private $_alternativePartOrder = array( + 'text/plain' => 1, + 'text/html' => 2, + 'multipart/related' => 3 + ); + + /** The CID of this entity */ + private $_id; + + /** The key used for accessing the cache */ + private $_cacheKey; + + protected $_userContentType; + + /** + * Create a new SimpleMimeEntity with $headers, $encoder and $cache. + * @param Swift_Mime_HeaderSet $headers + * @param Swift_Mime_ContentEncoder $encoder + * @param Swift_KeyCache $cache + */ + public function __construct(Swift_Mime_HeaderSet $headers, + Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache) + { + $this->_cacheKey = uniqid(); + $this->_cache = $cache; + $this->_headers = $headers; + $this->setEncoder($encoder); + $this->_headers->defineOrdering( + array('Content-Type', 'Content-Transfer-Encoding') + ); + + // This array specifies that, when the entire MIME document contains + // $compoundLevel, then for each child within $level, if its Content-Type + // is $contentType then it should be treated as if it's level is + // $neededLevel instead. I tried to write that unambiguously! :-\ + // Data Structure: + // array ( + // $compoundLevel => array( + // $level => array( + // $contentType => $neededLevel + // ) + // ) + // ) + + $this->_compoundLevelFilters = array( + (self::LEVEL_ALTERNATIVE + self::LEVEL_RELATED) => array( + self::LEVEL_ALTERNATIVE => array( + 'text/plain' => self::LEVEL_ALTERNATIVE, + 'text/html' => self::LEVEL_RELATED + ) + ) + ); + + $this->_id = $this->getRandomId(); + } + + /** + * Generate a new Content-ID or Message-ID for this MIME entity. + * @return string + */ + public function generateId() + { + $this->setId($this->getRandomId()); + return $this->_id; + } + + /** + * Get the {@link Swift_Mime_HeaderSet} for this entity. + * @return Swift_Mime_HeaderSet + */ + public function getHeaders() + { + return $this->_headers; + } + + /** + * Get the nesting level of this entity. + * @return int + * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE + */ + public function getNestingLevel() + { + return $this->_nestingLevel; + } + + /** + * Get the Content-type of this entity. + * @return string + */ + public function getContentType() + { + return $this->_getHeaderFieldModel('Content-Type'); + } + + /** + * Set the Content-type of this entity. + * @param string $type + */ + public function setContentType($type) + { + $this->_setContentTypeInHeaders($type); + // Keep track of the value so that if the content-type changes automatically + // due to added child entities, it can be restored if they are later removed + $this->_userContentType = $type; + return $this; + } + + /** + * Get the CID of this entity. + * The CID will only be present in headers if a Content-ID header is present. + * @return string + */ + public function getId() + { + return $this->_headers->has($this->_getIdField()) + ? current((array) $this->_getHeaderFieldModel($this->_getIdField())) + : $this->_id; + } + + /** + * Set the CID of this entity. + * @param string $id + */ + public function setId($id) + { + if (!$this->_setHeaderFieldModel($this->_getIdField(), $id)) + { + $this->_headers->addIdHeader($this->_getIdField(), $id); + } + $this->_id = $id; + return $this; + } + + /** + * Get the description of this entity. + * This value comes from the Content-Description header if set. + * @return string + */ + public function getDescription() + { + return $this->_getHeaderFieldModel('Content-Description'); + } + + /** + * Set the description of this entity. + * This method sets a value in the Content-ID header. + * @param string $description + */ + public function setDescription($description) + { + if (!$this->_setHeaderFieldModel('Content-Description', $description)) + { + $this->_headers->addTextHeader('Content-Description', $description); + } + return $this; + } + + /** + * Get the maximum line length of the body of this entity. + * @return int + */ + public function getMaxLineLength() + { + return $this->_maxLineLength; + } + + /** + * Set the maximum line length of lines in this body. + * Though not enforced by the library, lines should not exceed 1000 chars. + * @param int $length + */ + public function setMaxLineLength($length) + { + $this->_maxLineLength = $length; + return $this; + } + + /** + * Get all children added to this entity. + * @return array of Swift_Mime_Entity + */ + public function getChildren() + { + return $this->_children; + } + + /** + * Set all children of this entity. + * @param array $children Swiift_Mime_Entity instances + * @param int $compoundLevel For internal use only + */ + public function setChildren(array $children, $compoundLevel = null) + { + //TODO: Try to refactor this logic + + $compoundLevel = isset($compoundLevel) + ? $compoundLevel + : $this->_getCompoundLevel($children) + ; + + $immediateChildren = array(); + $grandchildren = array(); + $newContentType = $this->_userContentType; + + foreach ($children as $child) + { + $level = $this->_getNeededChildLevel($child, $compoundLevel); + if (empty($immediateChildren)) //first iteration + { + $immediateChildren = array($child); + } + else + { + $nextLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); + if ($nextLevel == $level) + { + $immediateChildren[] = $child; + } + elseif ($level < $nextLevel) + { + //Re-assign immediateChildren to grandchilden + $grandchildren = array_merge($grandchildren, $immediateChildren); + //Set new children + $immediateChildren = array($child); + } + else + { + $grandchildren[] = $child; + } + } + } + + if (!empty($immediateChildren)) + { + $lowestLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); + + //Determine which composite media type is needed to accomodate the + // immediate children + foreach ($this->_compositeRanges as $mediaType => $range) + { + if ($lowestLevel > $range[0] + && $lowestLevel <= $range[1]) + { + $newContentType = $mediaType; + break; + } + } + + //Put any grandchildren in a subpart + if (!empty($grandchildren)) + { + $subentity = $this->_createChild(); + $subentity->_setNestingLevel($lowestLevel); + $subentity->setChildren($grandchildren, $compoundLevel); + array_unshift($immediateChildren, $subentity); + } + } + + $this->_immediateChildren = $immediateChildren; + $this->_children = $children; + $this->_setContentTypeInHeaders($newContentType); + $this->_fixHeaders(); + $this->_sortChildren(); + + return $this; + } + + /** + * Get the body of this entity as a string. + * @return string + */ + public function getBody() + { + return ($this->_body instanceof Swift_OutputByteStream) + ? $this->_readStream($this->_body) + : $this->_body; + } + + /** + * Set the body of this entity, either as a string, or as an instance of + * {@link Swift_OutputByteStream}. + * @param mixed $body + * @param string $contentType optional + */ + public function setBody($body, $contentType = null) + { + if ($body !== $this->_body) + { + $this->_clearCache(); + } + + $this->_body = $body; + if (isset($contentType)) + { + $this->setContentType($contentType); + } + return $this; + } + + /** + * Get the encoder used for the body of this entity. + * @return Swift_Mime_ContentEncoder + */ + public function getEncoder() + { + return $this->_encoder; + } + + /** + * Set the encoder used for the body of this entity. + * @param Swift_Mime_ContentEncoder $encoder + */ + public function setEncoder(Swift_Mime_ContentEncoder $encoder) + { + if ($encoder !== $this->_encoder) + { + $this->_clearCache(); + } + + $this->_encoder = $encoder; + $this->_setEncoding($encoder->getName()); + $this->_notifyEncoderChanged($encoder); + return $this; + } + + /** + * Get the boundary used to separate children in this entity. + * @return string + */ + public function getBoundary() + { + if (!isset($this->_boundary)) + { + $this->_boundary = '_=_swift_v4_' . time() . uniqid() . '_=_'; + } + return $this->_boundary; + } + + /** + * Set the boundary used to separate children in this entity. + * @param string $boundary + * @throws Swift_RfcComplianceException + */ + public function setBoundary($boundary) + { + $this->_assertValidBoundary($boundary); + $this->_boundary = $boundary; + return $this; + } + + /** + * Receive notification that the charset of this entity, or a parent entity + * has changed. + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->_notifyCharsetChanged($charset); + } + + /** + * Receive notification that the encoder of this entity or a parent entity + * has changed. + * @param Swift_Mime_ContentEncoder $encoder + */ + public function encoderChanged(Swift_Mime_ContentEncoder $encoder) + { + $this->_notifyEncoderChanged($encoder); + } + + /** + * Get this entire entity as a string. + * @return string + */ + public function toString() + { + $string = $this->_headers->toString(); + if (isset($this->_body) && empty($this->_immediateChildren)) + { + if ($this->_cache->hasKey($this->_cacheKey, 'body')) + { + $body = $this->_cache->getString($this->_cacheKey, 'body'); + } + else + { + $body = "\r\n" . $this->_encoder->encodeString($this->getBody(), 0, + $this->getMaxLineLength() + ); + $this->_cache->setString($this->_cacheKey, 'body', $body, + Swift_KeyCache::MODE_WRITE + ); + } + $string .= $body; + } + + if (!empty($this->_immediateChildren)) + { + foreach ($this->_immediateChildren as $child) + { + $string .= "\r\n\r\n--" . $this->getBoundary() . "\r\n"; + $string .= $child->toString(); + } + $string .= "\r\n\r\n--" . $this->getBoundary() . "--\r\n"; + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Write this entire entity to a {@link Swift_InputByteStream}. + * @param Swift_InputByteStream + */ + public function toByteStream(Swift_InputByteStream $is) + { + $is->write($this->_headers->toString()); + $is->commit(); + + if (empty($this->_immediateChildren)) + { + if (isset($this->_body)) + { + if ($this->_cache->hasKey($this->_cacheKey, 'body')) + { + $this->_cache->exportToByteStream($this->_cacheKey, 'body', $is); + } + else + { + $cacheIs = $this->_cache->getInputByteStream($this->_cacheKey, 'body'); + if ($cacheIs) + { + $is->bind($cacheIs); + } + + $is->write("\r\n"); + + if ($this->_body instanceof Swift_OutputByteStream) + { + $this->_body->setReadPointer(0); + + $this->_encoder->encodeByteStream($this->_body, $is, 0, + $this->getMaxLineLength() + ); + } + else + { + $is->write($this->_encoder->encodeString( + $this->getBody(), 0, $this->getMaxLineLength() + )); + } + + if ($cacheIs) + { + $is->unbind($cacheIs); + } + } + } + } + + if (!empty($this->_immediateChildren)) + { + foreach ($this->_immediateChildren as $child) + { + $is->write("\r\n\r\n--" . $this->getBoundary() . "\r\n"); + $child->toByteStream($is); + } + $is->write("\r\n\r\n--" . $this->getBoundary() . "--\r\n"); + } + } + + // -- Protected methods + + /** + * Get the name of the header that provides the ID of this entity */ + protected function _getIdField() + { + return 'Content-ID'; + } + + /** + * Get the model data (usually an array or a string) for $field. + */ + protected function _getHeaderFieldModel($field) + { + if ($this->_headers->has($field)) + { + return $this->_headers->get($field)->getFieldBodyModel(); + } + } + + /** + * Set the model data for $field. + */ + protected function _setHeaderFieldModel($field, $model) + { + if ($this->_headers->has($field)) + { + $this->_headers->get($field)->setFieldBodyModel($model); + return true; + } + else + { + return false; + } + } + + /** + * Get the parameter value of $parameter on $field header. + */ + protected function _getHeaderParameter($field, $parameter) + { + if ($this->_headers->has($field)) + { + return $this->_headers->get($field)->getParameter($parameter); + } + } + + /** + * Set the parameter value of $parameter on $field header. + */ + protected function _setHeaderParameter($field, $parameter, $value) + { + if ($this->_headers->has($field)) + { + $this->_headers->get($field)->setParameter($parameter, $value); + return true; + } + else + { + return false; + } + } + + /** + * Re-evaluate what content type and encoding should be used on this entity. + */ + protected function _fixHeaders() + { + if (count($this->_immediateChildren)) + { + $this->_setHeaderParameter('Content-Type', 'boundary', + $this->getBoundary() + ); + $this->_headers->remove('Content-Transfer-Encoding'); + } + else + { + $this->_setHeaderParameter('Content-Type', 'boundary', null); + $this->_setEncoding($this->_encoder->getName()); + } + } + + /** + * Get the KeyCache used in this entity. + */ + protected function _getCache() + { + return $this->_cache; + } + + /** + * Empty the KeyCache for this entity. + */ + protected function _clearCache() + { + $this->_cache->clearKey($this->_cacheKey, 'body'); + } + + /** + * Returns a random Content-ID or Message-ID. + * @return string + */ + protected function getRandomId() + { + $idLeft = time() . '.' . uniqid(); + $idRight = !empty($_SERVER['SERVER_NAME']) + ? $_SERVER['SERVER_NAME'] + : 'swift.generated'; + return $idLeft . '@' . $idRight; + } + + // -- Private methods + + private function _readStream(Swift_OutputByteStream $os) + { + $string = ''; + while (false !== $bytes = $os->read(8192)) + { + $string .= $bytes; + } + return $string; + } + + private function _setEncoding($encoding) + { + if (!$this->_setHeaderFieldModel('Content-Transfer-Encoding', $encoding)) + { + $this->_headers->addTextHeader('Content-Transfer-Encoding', $encoding); + } + } + + private function _assertValidBoundary($boundary) + { + if (!preg_match( + '/^[a-z0-9\'\(\)\+_\-,\.\/:=\?\ ]{0,69}[a-z0-9\'\(\)\+_\-,\.\/:=\?]$/Di', + $boundary)) + { + throw new Swift_RfcComplianceException('Mime boundary set is not RFC 2046 compliant.'); + } + } + + private function _setContentTypeInHeaders($type) + { + if (!$this->_setHeaderFieldModel('Content-Type', $type)) + { + $this->_headers->addParameterizedHeader('Content-Type', $type); + } + } + + private function _setNestingLevel($level) + { + $this->_nestingLevel = $level; + } + + private function _getCompoundLevel($children) + { + $level = 0; + foreach ($children as $child) + { + $level |= $child->getNestingLevel(); + } + return $level; + } + + private function _getNeededChildLevel($child, $compoundLevel) + { + $filter = array(); + foreach ($this->_compoundLevelFilters as $bitmask => $rules) + { + if (($compoundLevel & $bitmask) === $bitmask) + { + $filter = $rules + $filter; + } + } + + $realLevel = $child->getNestingLevel(); + $lowercaseType = strtolower($child->getContentType()); + + if (isset($filter[$realLevel]) + && isset($filter[$realLevel][$lowercaseType])) + { + return $filter[$realLevel][$lowercaseType]; + } + else + { + return $realLevel; + } + } + + private function _createChild() + { + return new self($this->_headers->newInstance(), + $this->_encoder, $this->_cache); + } + + private function _notifyEncoderChanged(Swift_Mime_ContentEncoder $encoder) + { + foreach ($this->_immediateChildren as $child) + { + $child->encoderChanged($encoder); + } + } + + private function _notifyCharsetChanged($charset) + { + $this->_encoder->charsetChanged($charset); + $this->_headers->charsetChanged($charset); + foreach ($this->_immediateChildren as $child) + { + $child->charsetChanged($charset); + } + } + + private function _sortChildren() + { + $shouldSort = false; + foreach ($this->_immediateChildren as $child) + { + //NOTE: This include alternative parts moved into a related part + if ($child->getNestingLevel() == self::LEVEL_ALTERNATIVE) + { + $shouldSort = true; + break; + } + } + + //Sort in order of preference, if there is one + if ($shouldSort) + { + usort($this->_immediateChildren, array($this, '_childSortAlgorithm')); + } + } + + private function _childSortAlgorithm($a, $b) + { + $typePrefs = array(); + $types = array( + strtolower($a->getContentType()), + strtolower($b->getContentType()) + ); + foreach ($types as $type) + { + $typePrefs[] = (array_key_exists($type, $this->_alternativePartOrder)) + ? $this->_alternativePartOrder[$type] + : (max($this->_alternativePartOrder) + 1); + } + return ($typePrefs[0] >= $typePrefs[1]) ? 1 : -1; + } + + // -- Destructor + + /** + * Empties it's own contents from the cache. + */ + public function __destruct() + { + $this->_cache->clearAll($this->_cacheKey); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/MimePart.php b/h-source/External/swiftmailer/lib/classes/Swift/MimePart.php new file mode 100644 index 0000000..60b6d56 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/MimePart.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/MimePart.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * A MIME part, in a multipart message. + * @package Swift + * @subpackage Mime + * @author Chris Corbyn + */ +class Swift_MimePart extends Swift_Mime_MimePart +{ + + /** + * Create a new MimePart. + * Details may be optionally passed into the constructor. + * @param string $body + * @param string $contentType + * @param string $charset + */ + public function __construct($body = null, $contentType = null, + $charset = null) + { + call_user_func_array( + array($this, 'Swift_Mime_MimePart::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('mime.part') + ); + + if (!isset($charset)) + { + $charset = Swift_DependencyContainer::getInstance() + ->lookup('properties.charset'); + } + $this->setBody($body); + $this->setCharset($charset); + if ($contentType) + { + $this->setContentType($contentType); + } + } + + /** + * Create a new MimePart. + * @param string $body + * @param string $contentType + * @param string $charset + * @return Swift_Mime_MimePart + */ + public static function newInstance($body = null, $contentType = null, + $charset = null) + { + return new self($body, $contentType, $charset); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/OutputByteStream.php b/h-source/External/swiftmailer/lib/classes/Swift/OutputByteStream.php new file mode 100644 index 0000000..951b838 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/OutputByteStream.php @@ -0,0 +1,41 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * An abstract means of reading data. + * Classes implementing this interface may use a subsystem which requires less + * memory than working with large strings of data. + * @package Swift + * @subpackage ByteStream + * @author Chris Corbyn + */ +interface Swift_OutputByteStream +{ + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * @param int $length + * @return string + * @throws Swift_IoException + */ + public function read($length); + + /** + * Move the internal read pointer to $byteOffset in the stream. + * @param int $byteOffset + * @return boolean + * @throws Swift_IoException + */ + public function setReadPointer($byteOffset); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/AntiFloodPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/AntiFloodPlugin.php new file mode 100644 index 0000000..46a7f44 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/AntiFloodPlugin.php @@ -0,0 +1,147 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/SendListener.php'; +//@require 'Swift/Events/SendEvent.php'; +//@require 'Swift/Plugins/Sleeper.php'; + +/** + * Reduces network flooding when sending large amounts of mail. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +class Swift_Plugins_AntiFloodPlugin + implements Swift_Events_SendListener, Swift_Plugins_Sleeper +{ + + /** + * The number of emails to send before restarting Transport. + * @var int + * @access private + */ + private $_threshold; + + /** + * The number of seconds to sleep for during a restart. + * @var int + * @access private + */ + private $_sleep; + + /** + * The internal counter. + * @var int + * @access private + */ + private $_counter = 0; + + /** + * The Sleeper instance for sleeping. + * @var Swift_Plugins_Sleeper + * @access private + */ + private $_sleeper; + + /** + * Create a new AntiFloodPlugin with $threshold and $sleep time. + * @param int $threshold + * @param int $sleep time + * @param Swift_Plugins_Sleeper $sleeper (not needed really) + */ + public function __construct($threshold = 99, $sleep = 0, + Swift_Plugins_Sleeper $sleeper = null) + { + $this->setThreshold($threshold); + $this->setSleepTime($sleep); + $this->_sleeper = $sleeper; + } + + /** + * Set the number of emails to send before restarting. + * @param int $threshold + */ + public function setThreshold($threshold) + { + $this->_threshold = $threshold; + } + + /** + * Get the number of emails to send before restarting. + * @return int + */ + public function getThreshold() + { + return $this->_threshold; + } + + /** + * Set the number of seconds to sleep for during a restart. + * @param int $sleep time + */ + public function setSleepTime($sleep) + { + $this->_sleep = $sleep; + } + + /** + * Get the number of seconds to sleep for during a restart. + * @return int + */ + public function getSleepTime() + { + return $this->_sleep; + } + + /** + * Invoked immediately before the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + ++$this->_counter; + if ($this->_counter >= $this->_threshold) + { + $transport = $evt->getTransport(); + $transport->stop(); + if ($this->_sleep) + { + $this->sleep($this->_sleep); + } + $transport->start(); + $this->_counter = 0; + } + } + + /** + * Sleep for $seconds. + * @param int $seconds + */ + public function sleep($seconds) + { + if (isset($this->_sleeper)) + { + $this->_sleeper->sleep($seconds); + } + else + { + sleep($seconds); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php new file mode 100644 index 0000000..501cd80 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php @@ -0,0 +1,173 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/SendListener.php'; +//@require 'Swift/Events/SendEvent.php'; +//@require 'Swift/Events/CommandListener.php'; +//@require 'Swift/Events/CommandEvent.php'; +//@require 'Swift/Events/ResponseListener.php'; +//@require 'Swift/Events/ResponseEvent.php'; +//@require 'Swift/InputByteStream.php'; + +/** + * Reduces network flooding when sending large amounts of mail. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +class Swift_Plugins_BandwidthMonitorPlugin + implements Swift_Events_SendListener, Swift_Events_CommandListener, + Swift_Events_ResponseListener, Swift_InputByteStream +{ + + /** + * The outgoing traffic counter. + * @var int + * @access private + */ + private $_out = 0; + + /** + * The incoming traffic counter. + * @var int + * @access private + */ + private $_in = 0; + + /** Bound byte streams */ + private $_mirrors = array(); + + /** + * Not used. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $message->toByteStream($this); + } + + /** + * Invoked immediately following a command being sent. + * @param Swift_Events_ResponseEvent $evt + */ + public function commandSent(Swift_Events_CommandEvent $evt) + { + $command = $evt->getCommand(); + $this->_out += strlen($command); + } + + /** + * Invoked immediately following a response coming back. + * @param Swift_Events_ResponseEvent $evt + */ + public function responseReceived(Swift_Events_ResponseEvent $evt) + { + $response = $evt->getResponse(); + $this->_in += strlen($response); + } + + /** + * Called when a message is sent so that the outgoing counter can be increased. + * @param string $bytes + */ + public function write($bytes) + { + $this->_out += strlen($bytes); + foreach ($this->_mirrors as $stream) + { + $stream->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Attach $is to this stream. + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @param Swift_InputByteStream $is + */ + public function bind(Swift_InputByteStream $is) + { + $this->_mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @param Swift_InputByteStream $is + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->_mirrors as $k => $stream) + { + if ($is === $stream) + { + unset($this->_mirrors[$k]); + } + } + } + + /** + * Not used. + */ + public function flushBuffers() + { + foreach ($this->_mirrors as $stream) + { + $stream->flushBuffers(); + } + } + + /** + * Get the total number of bytes sent to the server. + * @return int + */ + public function getBytesOut() + { + return $this->_out; + } + + /** + * Get the total number of bytes received from the server. + * @return int + */ + public function getBytesIn() + { + return $this->_in; + } + + /** + * Reset the internal counters to zero. + */ + public function reset() + { + $this->_out = 0; + $this->_in = 0; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php new file mode 100644 index 0000000..9735d0a --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Allows customization of Messages on-the-fly. + * + * @package Swift + * @subpackage Plugins + * + * @author Chris Corbyn + */ +interface Swift_Plugins_Decorator_Replacements +{ + + /** + * Return the array of replacements for $address. + * + * This method is invoked once for every single recipient of a message. + * + * If no replacements can be found, an empty value (NULL) should be returned + * and no replacements will then be made on the message. + * + * @param string $address + * + * @return array + */ + public function getReplacementsFor($address); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php new file mode 100644 index 0000000..da1a307 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php @@ -0,0 +1,201 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/SendListener.php'; +//@require 'Swift/Events/SendEvent.php'; +//@require 'Swift/Plugins/Decorator/Replacements.php'; + +/** + * Allows customization of Messages on-the-fly. + * + * @package Swift + * @subpackage Plugins + * + * @author Chris Corbyn + */ +class Swift_Plugins_DecoratorPlugin + implements Swift_Events_SendListener, Swift_Plugins_Decorator_Replacements +{ + + /** The replacement map */ + private $_replacements; + + /** The body as it was before replacements */ + private $_orginalBody; + + /** The original subject of the message, before replacements */ + private $_originalSubject; + + /** Bodies of children before they are replaced */ + private $_originalChildBodies = array(); + + /** The Message that was last replaced */ + private $_lastMessage; + + /** + * Create a new DecoratorPlugin with $replacements. + * + * The $replacements can either be an associative array, or an implementation + * of {@link Swift_Plugins_Decorator_Replacements}. + * + * When using an array, it should be of the form: + * <code> + * $replacements = array( + * "address1@domain.tld" => array("{a}" => "b", "{c}" => "d"), + * "address2@domain.tld" => array("{a}" => "x", "{c}" => "y") + * ) + * </code> + * + * When using an instance of {@link Swift_Plugins_Decorator_Replacements}, + * the object should return just the array of replacements for the address + * given to {@link Swift_Plugins_Decorator_Replacements::getReplacementsFor()}. + * + * @param mixed $replacements + */ + public function __construct($replacements) + { + if (!($replacements instanceof Swift_Plugins_Decorator_Replacements)) + { + $this->_replacements = (array) $replacements; + } + else + { + $this->_replacements = $replacements; + } + } + + /** + * Invoked immediately before the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $this->_restoreMessage($message); + $to = array_keys($message->getTo()); + $address = array_shift($to); + if ($replacements = $this->getReplacementsFor($address)) + { + $body = $message->getBody(); + $search = array_keys($replacements); + $replace = array_values($replacements); + $bodyReplaced = str_replace( + $search, $replace, $body + ); + if ($body != $bodyReplaced) + { + $this->_originalBody = $body; + $message->setBody($bodyReplaced); + } + $subject = $message->getSubject(); + $subjectReplaced = str_replace( + $search, $replace, $subject + ); + if ($subject != $subjectReplaced) + { + $this->_originalSubject = $subject; + $message->setSubject($subjectReplaced); + } + $children = (array) $message->getChildren(); + foreach ($children as $child) + { + list($type, ) = sscanf($child->getContentType(), '%[^/]/%s'); + if ('text' == $type) + { + $body = $child->getBody(); + $bodyReplaced = str_replace( + $search, $replace, $body + ); + if ($body != $bodyReplaced) + { + $child->setBody($bodyReplaced); + $this->_originalChildBodies[$child->getId()] = $body; + } + } + } + $this->_lastMessage = $message; + } + } + + /** + * Find a map of replacements for the address. + * + * If this plugin was provided with a delegate instance of + * {@link Swift_Plugins_Decorator_Replacements} then the call will be + * delegated to it. Otherwise, it will attempt to find the replacements + * from the array provided in the constructor. + * + * If no replacements can be found, an empty value (NULL) is returned. + * + * @param string $address + * + * @return array + */ + public function getReplacementsFor($address) + { + if ($this->_replacements instanceof Swift_Plugins_Decorator_Replacements) + { + return $this->_replacements->getReplacementsFor($address); + } + else + { + return isset($this->_replacements[$address]) + ? $this->_replacements[$address] + : null + ; + } + } + + /** + * Invoked immediately after the Message is sent. + * + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $this->_restoreMessage($evt->getMessage()); + } + + // -- Private methods + + /** Restore a changed message back to its original state */ + private function _restoreMessage(Swift_Mime_Message $message) + { + if ($this->_lastMessage === $message) + { + if (isset($this->_originalBody)) + { + $message->setBody($this->_originalBody); + $this->_originalBody = null; + } + if (isset($this->_originalSubject)) + { + $message->setSubject($this->_originalSubject); + $this->_originalSubject = null; + } + if (!empty($this->_originalChildBodies)) + { + $children = (array) $message->getChildren(); + foreach ($children as $child) + { + $id = $child->getId(); + if (array_key_exists($id, $this->_originalChildBodies)) + { + $child->setBody($this->_originalChildBodies[$id]); + } + } + $this->_originalChildBodies = array(); + } + $this->_lastMessage = null; + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Logger.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Logger.php new file mode 100644 index 0000000..9864da0 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Logger.php @@ -0,0 +1,37 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Logs events in the Transport system. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Plugins_Logger +{ + + /** + * Add a log entry. + * @param string $entry + */ + public function add($entry); + + /** + * Clear the log contents. + */ + public function clear(); + + /** + * Get this log as a string. + * @return string + */ + public function dump(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php new file mode 100644 index 0000000..d595f26 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php @@ -0,0 +1,160 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/CommandListener.php'; +//@require 'Swift/Events/CommandEvent.php'; +//@require 'Swift/Events/ResponseListener.php'; +//@require 'Swift/Events/ResponseEvent.php'; +//@require 'Swift/Events/TransportChangeListener.php'; +//@require 'Swift/Events/TransportChangeEvent.php'; +//@require 'Swift/Events/TransportExceptionEvent.php'; +//@require 'Swift/Events/TransportExceptionListener.php'; +//@require 'Swift/Events/TransportException.php'; +//@require 'Swift/Plugins/Logger.php'; + +/** + * Does real time logging of Transport level information. + * + * @package Swift + * @subpackage Plugins + * + * @author Chris Corbyn + */ +class Swift_Plugins_LoggerPlugin + implements Swift_Events_CommandListener, Swift_Events_ResponseListener, + Swift_Events_TransportChangeListener, Swift_Events_TransportExceptionListener, + Swift_Plugins_Logger +{ + + /** The logger which is delegated to */ + private $_logger; + + /** + * Create a new LoggerPlugin using $logger. + * + * @param Swift_Plugins_Logger $logger + */ + public function __construct(Swift_Plugins_Logger $logger) + { + $this->_logger = $logger; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + $this->_logger->add($entry); + } + + /** + * Clear the log contents. + */ + public function clear() + { + $this->_logger->clear(); + } + + /** + * Get this log as a string. + * + * @return string + */ + public function dump() + { + return $this->_logger->dump(); + } + + /** + * Invoked immediately following a command being sent. + * + * @param Swift_Events_ResponseEvent $evt + */ + public function commandSent(Swift_Events_CommandEvent $evt) + { + $command = $evt->getCommand(); + $this->_logger->add(sprintf(">> %s", $command)); + } + + /** + * Invoked immediately following a response coming back. + * + * @param Swift_Events_ResponseEvent $evt + */ + public function responseReceived(Swift_Events_ResponseEvent $evt) + { + $response = $evt->getResponse(); + $this->_logger->add(sprintf("<< %s", $response)); + } + + /** + * Invoked just before a Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf("++ Starting %s", $transportName)); + } + + /** + * Invoked immediately after the Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf("++ %s started", $transportName)); + } + + /** + * Invoked just before a Transport is stopped. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf("++ Stopping %s", $transportName)); + } + + /** + * Invoked immediately after the Transport is stopped. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt) + { + $transportName = get_class($evt->getSource()); + $this->_logger->add(sprintf("++ %s stopped", $transportName)); + } + + /** + * Invoked as a TransportException is thrown in the Transport system. + * + * @param Swift_Events_TransportExceptionEvent $evt + */ + public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt) + { + $e = $evt->getException(); + $message = $e->getMessage(); + $this->_logger->add(sprintf("!! %s", $message)); + $message .= PHP_EOL; + $message .= 'Log data:' . PHP_EOL; + $message .= $this->_logger->dump(); + $evt->cancelBubble(); + throw new Swift_TransportException($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php new file mode 100644 index 0000000..930eca2 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php @@ -0,0 +1,73 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Logs to an Array backend. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger +{ + + /** + * The log contents. + * @var array + * @access private + */ + private $_log = array(); + + /** + * Max size of the log. + * @var int + * @access private + */ + private $_size = 0; + + /** + * Create a new ArrayLogger with a maximum of $size entries. + * @var int $size + */ + public function __construct($size = 50) + { + $this->_size = $size; + } + + /** + * Add a log entry. + * @param string $entry + */ + public function add($entry) + { + $this->_log[] = $entry; + while (count($this->_log) > $this->_size) + { + array_shift($this->_log); + } + } + + /** + * Clear the log contents. + */ + public function clear() + { + $this->_log = array(); + } + + /** + * Get this log as a string. + * @return string + */ + public function dump() + { + return implode(PHP_EOL, $this->_log); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php new file mode 100644 index 0000000..83dd54b --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php @@ -0,0 +1,64 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Prints all log messages in real time. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Plugins_Loggers_EchoLogger implements Swift_Plugins_Logger +{ + + /** Whether or not HTML should be output */ + private $_isHtml; + + /** + * Create a new EchoLogger. + * + * @param boolean $isHtml + */ + public function __construct($isHtml = true) + { + $this->_isHtml = $isHtml; + } + + /** + * Add a log entry. + * @param string $entry + */ + public function add($entry) + { + if ($this->_isHtml) + { + printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '<br />', PHP_EOL); + } + else + { + printf('%s%s', $entry, PHP_EOL); + } + } + + /** + * Not implemented. + */ + public function clear() + { + } + + /** + * Not implemented. + */ + public function dump() + { + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php new file mode 100644 index 0000000..1c96dcf --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Pop3Connection interface for connecting and disconnecting to a POP3 host. + * + * @package Swift + * @subpackage Plugins + * + * @author Chris Corbyn + */ +interface Swift_Plugins_Pop_Pop3Connection +{ + + /** + * Connect to the POP3 host and throw an Exception if it fails. + * + * @throws Swift_Plugins_Pop_Pop3Exception + */ + public function connect(); + + /** + * Disconnect from the POP3 host and throw an Exception if it fails. + * + * @throws Swift_Plugins_Pop_Pop3Exception + */ + public function disconnect(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Exception.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Exception.php new file mode 100644 index 0000000..e0205f4 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Exception.php @@ -0,0 +1,34 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/IoException.php'; + +/** + * Pop3Exception thrown when an error occurs connecting to a POP3 host. + * + * @package Swift + * @subpackage Transport + * + * @author Chris Corbyn + */ +class Swift_Plugins_Pop_Pop3Exception extends Swift_IoException +{ + + /** + * Create a new Pop3Exception with $message. + * + * @param string $message + */ + public function __construct($message) + { + parent::__construct($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php new file mode 100644 index 0000000..fd1cf46 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php @@ -0,0 +1,288 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/TransportChangeListener.php'; +//@require 'Swift/Events/TransportChangeEvent.php'; + +/** + * Makes sure a connection to a POP3 host has been established prior to connecting to SMTP. + * + * @package Swift + * @subpackage Plugins + * + * @author Chris Corbyn + */ +class Swift_Plugins_PopBeforeSmtpPlugin + implements Swift_Events_TransportChangeListener, Swift_Plugins_Pop_Pop3Connection +{ + + /** A delegate connection to use (mostly a test hook) */ + private $_connection; + + /** Hostname of the POP3 server */ + private $_host; + + /** Port number to connect on */ + private $_port; + + /** Encryption type to use (if any) */ + private $_crypto; + + /** Username to use (if any) */ + private $_username; + + /** Password to use (if any) */ + private $_password; + + /** Established connection via TCP socket */ + private $_socket; + + /** Connect timeout in seconds */ + private $_timeout = 10; + + /** SMTP Transport to bind to */ + private $_transport; + + /** + * Create a new PopBeforeSmtpPlugin for $host and $port. + * + * @param string $host + * @param int $port + * @param string $cypto as "tls" or "ssl" + */ + public function __construct($host, $port = 110, $crypto = null) + { + $this->_host = $host; + $this->_port = $port; + $this->_crypto = $crypto; + } + + /** + * Create a new PopBeforeSmtpPlugin for $host and $port. + * + * @param string $host + * @param int $port + * @param string $cypto as "tls" or "ssl" + * + * @return Swift_Plugins_PopBeforeSmtpPlugin + */ + public static function newInstance($host, $port = 110, $crypto = null) + { + return new self($host, $port, $crypto); + } + + /** + * Set a Pop3Connection to delegate to instead of connecting directly. + * + * @param Swift_Plugins_Pop_Pop3Connection $connection + */ + public function setConnection(Swift_Plugins_Pop_Pop3Connection $connection) + { + $this->_connection = $connection; + return $this; + } + + /** + * Bind this plugin to a specific SMTP transport instance. + * + * @param Swift_Transport + */ + public function bindSmtp(Swift_Transport $smtp) + { + $this->_transport = $smtp; + } + + /** + * Set the connection timeout in seconds (default 10). + * + * @param int $timeout + */ + public function setTimeout($timeout) + { + $this->_timeout = (int) $timeout; + return $this; + } + + /** + * Set the username to use when connecting (if needed). + * + * @param string $username + */ + public function setUsername($username) + { + $this->_username = $username; + return $this; + } + + /** + * Set the password to use when connecting (if needed). + * + * @param string $password + */ + public function setPassword($password) + { + $this->_password = $password; + return $this; + } + + /** + * Connect to the POP3 host and authenticate. + * + * @throws Swift_Plugins_Pop_Pop3Exception if connection fails + */ + public function connect() + { + if (isset($this->_connection)) + { + $this->_connection->connect(); + } + else + { + if (!isset($this->_socket)) + { + if (!$socket = fsockopen( + $this->_getHostString(), $this->_port, $errno, $errstr, $this->_timeout)) + { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to connect to POP3 host [%s]: %s', $this->_host, $errstr) + ); + } + $this->_socket = $socket; + + if (false === $greeting = fgets($this->_socket)) + { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to connect to POP3 host [%s]', trim($greeting)) + ); + } + + $this->_assertOk($greeting); + + if ($this->_username) + { + $this->_command(sprintf("USER %s\r\n", $this->_username)); + $this->_command(sprintf("PASS %s\r\n", $this->_password)); + } + } + } + } + + /** + * Disconnect from the POP3 host. + */ + public function disconnect() + { + if (isset($this->_connection)) + { + $this->_connection->disconnect(); + } + else + { + $this->_command("QUIT\r\n"); + if (!fclose($this->_socket)) + { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('POP3 host [%s] connection could not be stopped', $this->_host) + ); + } + $this->_socket = null; + } + } + + /** + * Invoked just before a Transport is started. + * + * @param Swift_Events_TransportChangeEvent $evt + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) + { + if (isset($this->_transport)) + { + if ($this->_transport !== $evt->getTransport()) + { + return; + } + } + + $this->connect(); + $this->disconnect(); + } + + /** + * Not used. + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt) + { + } + + /** + * Not used. + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) + { + } + + /** + * Not used. + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt) + { + } + + // -- Private Methods + + private function _command($command) + { + if (!fwrite($this->_socket, $command)) + { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to write command [%s] to POP3 host', trim($command)) + ); + } + + if (false === $response = fgets($this->_socket)) + { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('Failed to read from POP3 host after command [%s]', trim($command)) + ); + } + + $this->_assertOk($response); + + return $response; + } + + private function _assertOk($response) + { + if (substr($response, 0, 3) != '+OK') + { + throw new Swift_Plugins_Pop_Pop3Exception( + sprintf('POP3 command failed [%s]', trim($response)) + ); + } + } + + private function _getHostString() + { + $host = $this->_host; + switch (strtolower($this->_crypto)) + { + case 'ssl': + $host = 'ssl://' . $host; + break; + + case 'tls': + $host = 'tls://' . $host; + break; + } + return $host; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporter.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporter.php new file mode 100644 index 0000000..00d5765 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporter.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Message.php'; + +/** + * The Reporter plugin sends pass/fail notification to a Reporter. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +interface Swift_Plugins_Reporter +{ + + /** The recipient was accepted for delivery */ + const RESULT_PASS = 0x01; + + /** The recipient could not be accepted */ + const RESULT_FAIL = 0x10; + + /** + * Notifies this ReportNotifier that $address failed or succeeded. + * @param Swift_Mime_Message $message + * @param string $address + * @param int $result from {@link RESULT_PASS, RESULT_FAIL} + */ + public function notify(Swift_Mime_Message $message, $address, $result); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php new file mode 100644 index 0000000..1beac5b --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php @@ -0,0 +1,82 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/SendListener.php'; +//@require 'Swift/Events/SendEvent.php'; +//@require 'Swift/Plugins/Reporter.php'; + +/** + * Does real time reporting of pass/fail for each recipient. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +class Swift_Plugins_ReporterPlugin + implements Swift_Events_SendListener +{ + + /** + * The reporter backend which takes notifications. + * @var Swift_Plugin_Reporter + * @access private + */ + private $_reporter; + + /** + * Create a new ReporterPlugin using $reporter. + * @param Swift_Plugins_Reporter $reporter + */ + public function __construct(Swift_Plugins_Reporter $reporter) + { + $this->_reporter = $reporter; + } + + /** + * Not used. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $failures = array_flip($evt->getFailedRecipients()); + foreach ((array) $message->getTo() as $address => $null) + { + $this->_reporter->notify( + $message, $address, (array_key_exists($address, $failures) + ? Swift_Plugins_Reporter::RESULT_FAIL + : Swift_Plugins_Reporter::RESULT_PASS) + ); + } + foreach ((array) $message->getCc() as $address => $null) + { + $this->_reporter->notify( + $message, $address, (array_key_exists($address, $failures) + ? Swift_Plugins_Reporter::RESULT_FAIL + : Swift_Plugins_Reporter::RESULT_PASS) + ); + } + foreach ((array) $message->getBcc() as $address => $null) + { + $this->_reporter->notify( + $message, $address, (array_key_exists($address, $failures) + ? Swift_Plugins_Reporter::RESULT_FAIL + : Swift_Plugins_Reporter::RESULT_PASS) + ); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php new file mode 100644 index 0000000..0022f5e --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php @@ -0,0 +1,63 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Plugins/Reporter.php'; +//@require 'Swift/Mime/Message.php'; + +/** + * A reporter which "collects" failures for the Reporter plugin. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +class Swift_Plugins_Reporters_HitReporter implements Swift_Plugins_Reporter +{ + + /** + * The list of failures. + * @var array + * @access private + */ + private $_failures = array(); + private $_failures_cache = array(); + + /** + * Notifies this ReportNotifier that $address failed or succeeded. + * @param Swift_Mime_Message $message + * @param string $address + * @param int $result from {@link RESULT_PASS, RESULT_FAIL} + */ + public function notify(Swift_Mime_Message $message, $address, $result) + { + if (self::RESULT_FAIL == $result && !isset($this->_failures_cache[$address])) + { + $this->_failures[] = $address; + $this->_failures_cache[$address] = true; + } + } + + /** + * Get an array of addresses for which delivery failed. + * @return array + */ + public function getFailedRecipients() + { + return $this->_failures; + } + + /** + * Clear the buffer (empty the list). + */ + public function clear() + { + $this->_failures = $this->_failures_cache = array(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php new file mode 100644 index 0000000..7370078 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php @@ -0,0 +1,47 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Plugins/Reporter.php'; +//@require 'Swift/Mime/Message.php'; + +/** + * A HTML output reporter for the Reporter plugin. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +class Swift_Plugins_Reporters_HtmlReporter implements Swift_Plugins_Reporter +{ + + /** + * Notifies this ReportNotifier that $address failed or succeeded. + * @param Swift_Mime_Message $message + * @param string $address + * @param int $result from {@link RESULT_PASS, RESULT_FAIL} + */ + public function notify(Swift_Mime_Message $message, $address, $result) + { + if (self::RESULT_PASS == $result) + { + echo "<div style=\"color: #fff; background: #006600; padding: 2px; margin: 2px;\">" . PHP_EOL; + echo "PASS " . $address . PHP_EOL; + echo "</div>" . PHP_EOL; + flush(); + } + else + { + echo "<div style=\"color: #fff; background: #880000; padding: 2px; margin: 2px;\">" . PHP_EOL; + echo "FAIL " . $address . PHP_EOL; + echo "</div>" . PHP_EOL; + flush(); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php new file mode 100644 index 0000000..148cbd3 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Sleeps for a duration of time. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +interface Swift_Plugins_Sleeper +{ + + /** + * Sleep for $seconds. + * @param int $seconds + */ + public function sleep($seconds); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php new file mode 100644 index 0000000..43bb1f4 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php @@ -0,0 +1,188 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Events/SendEvent.php'; +//@require 'Swift/Plugins/BandwidthMonitorPlugin.php'; +//@require 'Swift/Plugins/Sleeper.php'; +//@require 'Swift/Plugins/Timer.php'; + +/** + * Throttles the rate at which emails are sent. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +class Swift_Plugins_ThrottlerPlugin + extends Swift_Plugins_BandwidthMonitorPlugin + implements Swift_Plugins_Sleeper, Swift_Plugins_Timer +{ + + /** Flag for throttling in bytes per minute */ + const BYTES_PER_MINUTE = 0x01; + + /** Flag for throttling in emails per minute */ + const MESSAGES_PER_MINUTE = 0x10; + + /** + * The Sleeper instance for sleeping. + * @var Swift_Plugins_Sleeper + * @access private + */ + private $_sleeper; + + /** + * The Timer instance which provides the timestamp. + * @var Swift_Plugins_Timer + * @access private + */ + private $_timer; + + /** + * The time at which the first email was sent. + * @var int + * @access private + */ + private $_start; + + /** + * The rate at which messages should be sent. + * @var int + * @access private + */ + private $_rate; + + /** + * The mode for throttling. + * This is {@link BYTES_PER_MINUTE} or {@link MESSAGES_PER_MINUTE} + * @var int + * @access private + */ + private $_mode; + + /** + * An internal counter of the number of messages sent. + * @var int + * @access private + */ + private $_messages = 0; + + /** + * Create a new ThrottlerPlugin. + * @param int $rate + * @param int $mode, defaults to {@link BYTES_PER_MINUTE} + * @param Swift_Plugins_Sleeper $sleeper (only needed in testing) + * @param Swift_Plugins_Timer $timer (only needed in testing) + */ + public function __construct($rate, $mode = self::BYTES_PER_MINUTE, + Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null) + { + $this->_rate = $rate; + $this->_mode = $mode; + $this->_sleeper = $sleeper; + $this->_timer = $timer; + } + + /** + * Invoked immediately before the Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $time = $this->getTimestamp(); + if (!isset($this->_start)) + { + $this->_start = $time; + } + $duration = $time - $this->_start; + + if (self::BYTES_PER_MINUTE == $this->_mode) + { + $sleep = $this->_throttleBytesPerMinute($duration); + } + else + { + $sleep = $this->_throttleMessagesPerMinute($duration); + } + + if ($sleep > 0) + { + $this->sleep($sleep); + } + } + + /** + * Invoked when a Message is sent. + * @param Swift_Events_SendEvent $evt + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + parent::sendPerformed($evt); + ++$this->_messages; + } + + /** + * Sleep for $seconds. + * @param int $seconds + */ + public function sleep($seconds) + { + if (isset($this->_sleeper)) + { + $this->_sleeper->sleep($seconds); + } + else + { + sleep($seconds); + } + } + + /** + * Get the current UNIX timestamp + * @return int + */ + public function getTimestamp() + { + if (isset($this->_timer)) + { + return $this->_timer->getTimestamp(); + } + else + { + return time(); + } + } + + // -- Private methods + + /** + * Get a number of seconds to sleep for. + * @param int $timePassed + * @return int + * @access private + */ + private function _throttleBytesPerMinute($timePassed) + { + $expectedDuration = $this->getBytesOut() / ($this->_rate / 60); + return (int) ceil($expectedDuration - $timePassed); + } + + /** + * Get a number of seconds to sleep for. + * @param int $timePassed + * @return int + * @access private + */ + private function _throttleMessagesPerMinute($timePassed) + { + $expectedDuration = $this->_messages / ($this->_rate / 60); + return (int) ceil($expectedDuration - $timePassed); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Timer.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Timer.php new file mode 100644 index 0000000..92207bf --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/Timer.php @@ -0,0 +1,26 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Provides timestamp data. + * @package Swift + * @subpackage Plugins + * @author Chris Corbyn + */ +interface Swift_Plugins_Timer +{ + + /** + * Get the current UNIX timestamp. + * @return int + */ + public function getTimestamp(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Preferences.php b/h-source/External/swiftmailer/lib/classes/Swift/Preferences.php new file mode 100644 index 0000000..20a2e5f --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Preferences.php @@ -0,0 +1,76 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/DependencyContainer.php'; + +/** + * Changes some global preference settings in Swift Mailer. + * @package Swift + * @author Chris Corbyn + */ +class Swift_Preferences +{ + + /** Singleton instance */ + private static $_instance = null; + + /** Constructor not to be used */ + private function __construct() { } + + /** + * Get a new instance of Preferences. + * @return Swift_Preferences + */ + public static function getInstance() + { + if (!isset(self::$_instance)) + { + self::$_instance = new self(); + } + return self::$_instance; + } + + /** + * Set the default charset used. + * @param string + * @return Swift_Preferences + */ + public function setCharset($charset) + { + Swift_DependencyContainer::getInstance() + ->register('properties.charset')->asValue($charset); + return $this; + } + + /** + * Set the directory where temporary files can be saved. + * @param string $dir + * @return Swift_Preferences + */ + public function setTempDir($dir) + { + Swift_DependencyContainer::getInstance() + ->register('tempdir')->asValue($dir); + return $this; + } + + /** + * Set the type of cache to use (i.e. "disk" or "array"). + * @param string $type + * @return Swift_Preferences + */ + public function setCacheType($type) + { + Swift_DependencyContainer::getInstance() + ->register('cache')->asAliasOf(sprintf('cache.%s', $type)); + return $this; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php b/h-source/External/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php new file mode 100644 index 0000000..db29e6d --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php @@ -0,0 +1,27 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Creates StreamFilters. + * @package Swift + * @author Chris Corbyn + */ +interface Swift_ReplacementFilterFactory +{ + + /** + * Create a filter to replace $search with $replace. + * @param mixed $search + * @param mixed $replace + * @return Swift_StreamFilter + */ + public function createFilter($search, $replace); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/RfcComplianceException.php b/h-source/External/swiftmailer/lib/classes/Swift/RfcComplianceException.php new file mode 100644 index 0000000..5bb394b --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/RfcComplianceException.php @@ -0,0 +1,30 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/SwiftException.php'; + +/** + * RFC Compliance Exception class. + * @package Swift + * @author Chris Corbyn + */ +class Swift_RfcComplianceException extends Swift_SwiftException +{ + + /** + * Create a new RfcComplianceException with $message. + * @param string $message + */ + public function __construct($message) + { + parent::__construct($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/SendmailTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/SendmailTransport.php new file mode 100644 index 0000000..60a7000 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/SendmailTransport.php @@ -0,0 +1,48 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/SendmailTransport.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_SendmailTransport extends Swift_Transport_SendmailTransport +{ + + /** + * Create a new SendmailTransport, optionally using $command for sending. + * @param string $command + */ + public function __construct($command = '/usr/sbin/sendmail -bs') + { + call_user_func_array( + array($this, 'Swift_Transport_SendmailTransport::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.sendmail') + ); + + $this->setCommand($command); + } + + /** + * Create a new SendmailTransport instance. + * @param string $command + * @return Swift_SendmailTransport + */ + public static function newInstance($command = '/usr/sbin/sendmail -bs') + { + return new self($command); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/SmtpTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/SmtpTransport.php new file mode 100644 index 0000000..65180d5 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/SmtpTransport.php @@ -0,0 +1,56 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/EsmtpTransport.php'; +//@require 'Swift/DependencyContainer.php'; + +/** + * Sends Messages over SMTP with ESMTP support. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport +{ + + /** + * Create a new SmtpTransport, optionally with $host, $port and $security. + * @param string $host + * @param int $port + * @param int $security + */ + public function __construct($host = 'localhost', $port = 25, + $security = null) + { + call_user_func_array( + array($this, 'Swift_Transport_EsmtpTransport::__construct'), + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.smtp') + ); + + $this->setHost($host); + $this->setPort($port); + $this->setEncryption($security); + } + + /** + * Create a new SmtpTransport instance. + * @param string $host + * @param int $port + * @param int $security + * @return Swift_SmtpTransport + */ + public static function newInstance($host = 'localhost', $port = 25, + $security = null) + { + return new self($host, $port, $security); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/StreamFilter.php b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilter.php new file mode 100644 index 0000000..6c262ce --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilter.php @@ -0,0 +1,33 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Processes bytes as they pass through a stream and performs filtering. + * @package Swift + * @author Chris Corbyn + */ +interface Swift_StreamFilter +{ + + /** + * Based on the buffer given, this returns true if more buffering is needed. + * @param mixed $buffer + * @return boolean + */ + public function shouldBuffer($buffer); + + /** + * Filters $buffer and returns the changes. + * @param mixed $buffer + * @return mixed + */ + public function filter($buffer); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php new file mode 100644 index 0000000..2df52be --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php @@ -0,0 +1,188 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/StreamFilter.php'; + +/** + * Processes bytes as they pass through a buffer and replaces sequences in it. + * This stream filter deals with Byte arrays rather than simple strings. + * @package Swift + * @author Chris Corbyn + */ +class Swift_StreamFilters_ByteArrayReplacementFilter + implements Swift_StreamFilter +{ + + /** The needle(s) to search for */ + private $_search; + + /** The replacement(s) to make */ + private $_replace; + + /** The Index for searching */ + private $_index; + + /** The Search Tree */ + private $_tree = array(); + + /** Gives the size of the largest search */ + private $_treeMaxLen = 0; + + private $_repSize; + + /** + * Create a new ByteArrayReplacementFilter with $search and $replace. + * @param array $search + * @param array $replace + */ + public function __construct($search, $replace) + { + $this->_search = $search; + $this->_index = array(); + $this->_tree = array(); + $this->_replace = array(); + $this->_repSize = array(); + + $tree = null; + $i = null; + $last_size = $size = 0; + foreach ($search as $i => $search_element) + { + if ($tree !== null) + { + $tree[-1] = min (count($replace) - 1, $i - 1); + $tree[-2] = $last_size; + } + $tree = &$this->_tree; + if (is_array ($search_element)) + { + foreach ($search_element as $k => $char) + { + $this->_index[$char] = true; + if (!isset($tree[$char])) + { + $tree[$char] = array(); + } + $tree = &$tree[$char]; + } + $last_size = $k+1; + $size = max($size, $last_size); + } + else + { + $last_size = 1; + if (!isset($tree[$search_element])) + { + $tree[$search_element] = array(); + } + $tree = &$tree[$search_element]; + $size = max($last_size, $size); + $this->_index[$search_element] = true; + } + } + if ($i !== null) + { + $tree[-1] = min (count ($replace) - 1, $i); + $tree[-2] = $last_size; + $this->_treeMaxLen = $size; + } + foreach ($replace as $rep) + { + if (!is_array($rep)) + { + $rep = array ($rep); + } + $this->_replace[] = $rep; + } + for ($i = count($this->_replace) - 1; $i >= 0; --$i) + { + $this->_replace[$i] = $rep = $this->filter($this->_replace[$i], $i); + $this->_repSize[$i] = count($rep); + } + } + + /** + * Returns true if based on the buffer passed more bytes should be buffered. + * @param array $buffer + * @return boolean + */ + public function shouldBuffer($buffer) + { + $endOfBuffer = end($buffer); + return isset ($this->_index[$endOfBuffer]); + } + + /** + * Perform the actual replacements on $buffer and return the result. + * @param array $buffer + * @return array + */ + public function filter($buffer, $_minReplaces = -1) + { + if ($this->_treeMaxLen == 0) + { + return $buffer; + } + + $newBuffer = array(); + $buf_size = count($buffer); + for ($i = 0; $i < $buf_size; ++$i) + { + $search_pos = $this->_tree; + $last_found = PHP_INT_MAX; + // We try to find if the next byte is part of a search pattern + for ($j = 0; $j <= $this->_treeMaxLen; ++$j) + { + // We have a new byte for a search pattern + if (isset ($buffer [$p = $i + $j]) && isset($search_pos[$buffer[$p]])) + { + $search_pos = $search_pos[$buffer[$p]]; + // We have a complete pattern, save, in case we don't find a better match later + if (isset($search_pos[- 1]) && $search_pos[-1] < $last_found + && $search_pos[-1] > $_minReplaces) + { + $last_found = $search_pos[-1]; + $last_size = $search_pos[-2]; + } + } + // We got a complete pattern + elseif ($last_found !== PHP_INT_MAX) + { + // Adding replacement datas to output buffer + $rep_size = $this->_repSize[$last_found]; + for ($j = 0; $j < $rep_size; ++$j) + { + $newBuffer[] = $this->_replace[$last_found][$j]; + } + // We Move cursor forward + $i += $last_size - 1; + // Edge Case, last position in buffer + if ($i >= $buf_size) + { + $newBuffer[] = $buffer[$i]; + } + + // We start the next loop + continue 2; + } + else + { + // this byte is not in a pattern and we haven't found another pattern + break; + } + } + // Normal byte, move it to output buffer + $newBuffer[] = $buffer[$i]; + } + + return $newBuffer; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php new file mode 100644 index 0000000..9ab6c30 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php @@ -0,0 +1,66 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/StreamFilter.php'; + +/** + * Processes bytes as they pass through a buffer and replaces sequences in it. + * @package Swift + * @author Chris Corbyn + */ +class Swift_StreamFilters_StringReplacementFilter implements Swift_StreamFilter +{ + + /** The needle(s) to search for */ + private $_search; + + /** The replacement(s) to make */ + private $_replace; + + /** + * Create a new StringReplacementFilter with $search and $replace. + * @param string|array $search + * @param string|array $replace + */ + public function __construct($search, $replace) + { + $this->_search = $search; + $this->_replace = $replace; + } + + /** + * Returns true if based on the buffer passed more bytes should be buffered. + * @param string $buffer + * @return boolean + */ + public function shouldBuffer($buffer) + { + $endOfBuffer = substr($buffer, -1); + foreach ((array) $this->_search as $needle) + { + if (false !== strpos($needle, $endOfBuffer)) + { + return true; + } + } + return false; + } + + /** + * Perform the actual replacements on $buffer and return the result. + * @param string $buffer + * @return string + */ + public function filter($buffer) + { + return str_replace($this->_search, $this->_replace, $buffer); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php new file mode 100644 index 0000000..fcd4b83 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php @@ -0,0 +1,53 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/StreamFilters/StringReplacementFilter.php'; +//@require 'Swift/StreamFilterFactory.php'; + +/** + * Creates filters for replacing needles in a string buffer. + * @package Swift + * @author Chris Corbyn + */ +class Swift_StreamFilters_StringReplacementFilterFactory + implements Swift_ReplacementFilterFactory +{ + + /** Lazy-loaded filters */ + private $_filters = array(); + + /** + * Create a new StreamFilter to replace $search with $replace in a string. + * @param string $search + * @param string $replace + * @return Swift_StreamFilter + */ + public function createFilter($search, $replace) + { + if (!isset($this->_filters[$search][$replace])) + { + if (!isset($this->_filters[$search])) + { + $this->_filters[$search] = array(); + } + + if (!isset($this->_filters[$search][$replace])) + { + $this->_filters[$search][$replace] = array(); + } + + $this->_filters[$search][$replace] + = new Swift_StreamFilters_StringReplacementFilter($search, $replace); + } + + return $this->_filters[$search][$replace]; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/SwiftException.php b/h-source/External/swiftmailer/lib/classes/Swift/SwiftException.php new file mode 100644 index 0000000..bd3b656 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/SwiftException.php @@ -0,0 +1,28 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Base Exception class. + * @package Swift + * @author Chris Corbyn + */ +class Swift_SwiftException extends Exception +{ + + /** + * Create a new SwiftException with $message. + * @param string $message + */ + public function __construct($message) + { + parent::__construct($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport.php new file mode 100644 index 0000000..9b54752 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport.php @@ -0,0 +1,60 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Events/EventListener.php'; + +/** + * Sends Messages via an abstract Transport subsystem. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Transport +{ + + /** + * Test if this Transport mechanism has started. + * + * @return boolean + */ + public function isStarted(); + + /** + * Start this Transport mechanism. + */ + public function start(); + + /** + * Stop this Transport mechanism. + */ + public function stop(); + + /** + * Send the given Message. + * + * Recipient/sender data will be retreived from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] &$failedRecipients to collect failures by-reference + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null); + + /** + * Register a plugin in the Transport. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php new file mode 100644 index 0000000..3329d34 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php @@ -0,0 +1,543 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport.php'; +//@require 'Swift/Transport/IoBuffer.php'; +//@require 'Swift/Transport/CommandSentException.php'; +//@require 'Swift/TransportException.php'; +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Events/EventDispatcher.php'; +//@require 'Swift/Events/EventListener.php'; + +/** + * Sends Messages over SMTP. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +abstract class Swift_Transport_AbstractSmtpTransport + implements Swift_Transport +{ + + /** Input-Output buffer for sending/receiving SMTP commands and responses */ + protected $_buffer; + + /** Connection status */ + protected $_started = false; + + /** The domain name to use in HELO command */ + protected $_domain = '[127.0.0.1]'; + + /** The event dispatching layer */ + protected $_eventDispatcher; + + /** Return an array of params for the Buffer */ + abstract protected function _getBufferParams(); + + /** + * Creates a new EsmtpTransport using the given I/O buffer. + * + * @param Swift_Transport_IoBuffer $buf + * @param Swift_Events_EventDispatcher $dispatcher + */ + public function __construct(Swift_Transport_IoBuffer $buf, + Swift_Events_EventDispatcher $dispatcher) + { + $this->_eventDispatcher = $dispatcher; + $this->_buffer = $buf; + $this->_lookupHostname(); + } + + /** + * Set the name of the local domain which Swift will identify itself as. + * This should be a fully-qualified domain name and should be truly the domain + * you're using. If your server doesn't have a domain name, use the IP in square + * brackets (i.e. [127.0.0.1]). + * + * @param string $domain + */ + public function setLocalDomain($domain) + { + $this->_domain = $domain; + return $this; + } + + /** + * Get the name of the domain Swift will identify as. + * + * @return string + */ + public function getLocalDomain() + { + return $this->_domain; + } + + /** + * Start the SMTP connection. + */ + public function start() + { + if (!$this->_started) + { + if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted'); + if ($evt->bubbleCancelled()) + { + return; + } + } + + try + { + $this->_buffer->initialize($this->_getBufferParams()); + } + catch (Swift_TransportException $e) + { + $this->_throwException($e); + } + $this->_readGreeting(); + $this->_doHeloCommand(); + + if ($evt) + { + $this->_eventDispatcher->dispatchEvent($evt, 'transportStarted'); + } + + $this->_started = true; + } + } + + /** + * Test if an SMTP connection has been established. + * + * @return boolean + */ + public function isStarted() + { + return $this->_started; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retreived from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] &$failedRecipients to collect failures by-reference + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $sent = 0; + $failedRecipients = (array) $failedRecipients; + + if (!$reversePath = $this->_getReversePath($message)) + { + throw new Swift_TransportException( + 'Cannot send message without a sender address' + ); + } + + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) + { + return 0; + } + } + + $to = (array) $message->getTo(); + $cc = (array) $message->getCc(); + $bcc = (array) $message->getBcc(); + + $message->setBcc(array()); + + try + { + $sent += $this->_sendTo($message, $reversePath, $to, $failedRecipients); + $sent += $this->_sendCc($message, $reversePath, $cc, $failedRecipients); + $sent += $this->_sendBcc($message, $reversePath, $bcc, $failedRecipients); + } + catch (Exception $e) + { + $message->setBcc($bcc); + throw $e; + } + + $message->setBcc($bcc); + + if ($evt) + { + if ($sent == count($to) + count($cc) + count($bcc)) + { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + } + elseif ($sent > 0) + { + $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); + } + else + { + $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); + } + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); //Make sure a new Message ID is used + + return $sent; + } + + /** + * Stop the SMTP connection. + */ + public function stop() + { + if ($this->_started) + { + if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped'); + if ($evt->bubbleCancelled()) + { + return; + } + } + + try + { + $this->executeCommand("QUIT\r\n", array(221)); + } + catch (Swift_TransportException $e) {} + + try + { + $this->_buffer->terminate(); + + if ($evt) + { + $this->_eventDispatcher->dispatchEvent($evt, 'transportStopped'); + } + } + catch (Swift_TransportException $e) + { + $this->_throwException($e); + } + } + $this->_started = false; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_eventDispatcher->bindEventListener($plugin); + } + + /** + * Reset the current mail transaction. + */ + public function reset() + { + $this->executeCommand("RSET\r\n", array(250)); + } + + /** + * Get the IoBuffer where read/writes are occurring. + * + * @return Swift_Transport_IoBuffer + */ + public function getBuffer() + { + return $this->_buffer; + } + + /** + * Run a command against the buffer, expecting the given response codes. + * + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * + * @param string $command + * @param int[] $codes + * @param string[] &$failures + * @return string + */ + public function executeCommand($command, $codes = array(), &$failures = null) + { + $failures = (array) $failures; + $seq = $this->_buffer->write($command); + $response = $this->_getFullResponse($seq); + if ($evt = $this->_eventDispatcher->createCommandEvent($this, $command, $codes)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'commandSent'); + } + $this->_assertResponseCode($response, $codes); + return $response; + } + + // -- Protected methods + + /** Read the opening SMTP greeting */ + protected function _readGreeting() + { + $this->_assertResponseCode($this->_getFullResponse(0), array(220)); + } + + /** Send the HELO welcome */ + protected function _doHeloCommand() + { + $this->executeCommand( + sprintf("HELO %s\r\n", $this->_domain), array(250) + ); + } + + /** Send the MAIL FROM command */ + protected function _doMailFromCommand($address) + { + $this->executeCommand( + sprintf("MAIL FROM: <%s>\r\n", $address), array(250) + ); + } + + /** Send the RCPT TO command */ + protected function _doRcptToCommand($address) + { + $this->executeCommand( + sprintf("RCPT TO: <%s>\r\n", $address), array(250, 251, 252) + ); + } + + /** Send the DATA command */ + protected function _doDataCommand() + { + $this->executeCommand("DATA\r\n", array(354)); + } + + /** Stream the contents of the message over the buffer */ + protected function _streamMessage(Swift_Mime_Message $message) + { + $this->_buffer->setWriteTranslations(array("\r\n." => "\r\n..")); + try + { + $message->toByteStream($this->_buffer); + $this->_buffer->flushBuffers(); + } + catch (Swift_TransportException $e) + { + $this->_throwException($e); + } + $this->_buffer->setWriteTranslations(array()); + $this->executeCommand("\r\n.\r\n", array(250)); + } + + /** Determine the best-use reverse path for this message */ + protected function _getReversePath(Swift_Mime_Message $message) + { + $return = $message->getReturnPath(); + $sender = $message->getSender(); + $from = $message->getFrom(); + $path = null; + if (!empty($return)) + { + $path = $return; + } + elseif (!empty($sender)) + { + // Don't use array_keys + reset($sender); // Reset Pointer to first pos + $path = key($sender); // Get key + } + elseif (!empty($from)) + { + reset($from); // Reset Pointer to first pos + $path = key($from); // Get key + } + return $path; + } + + /** Throw a TransportException, first sending it to any listeners */ + protected function _throwException(Swift_TransportException $e) + { + if ($evt = $this->_eventDispatcher->createTransportExceptionEvent($this, $e)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); + if (!$evt->bubbleCancelled()) + { + throw $e; + } + } + else + { + throw $e; + } + } + + /** Throws an Exception if a response code is incorrect */ + protected function _assertResponseCode($response, $wanted) + { + list($code, $separator, $text) = sscanf($response, '%3d%[ -]%s'); + $valid = (empty($wanted) || in_array($code, $wanted)); + + if ($evt = $this->_eventDispatcher->createResponseEvent($this, $response, + $valid)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'responseReceived'); + } + + if (!$valid) + { + $this->_throwException( + new Swift_TransportException( + 'Expected response code ' . implode('/', $wanted) . ' but got code ' . + '"' . $code . '", with message "' . $response . '"' + ) + ); + } + } + + /** Get an entire multi-line response using its sequence number */ + protected function _getFullResponse($seq) + { + $response = ''; + try + { + do + { + $line = $this->_buffer->readLine($seq); + $response .= $line; + } + while (null !== $line && false !== $line && ' ' != $line{3}); + } + catch (Swift_TransportException $e) + { + $this->_throwException($e); + } + return $response; + } + + // -- Private methods + + /** Send an email to the given recipients from the given reverse path */ + private function _doMailTransaction($message, $reversePath, + array $recipients, array &$failedRecipients) + { + $sent = 0; + $this->_doMailFromCommand($reversePath); + foreach ($recipients as $forwardPath) + { + try + { + $this->_doRcptToCommand($forwardPath); + $sent++; + } + catch (Swift_TransportException $e) + { + $failedRecipients[] = $forwardPath; + } + } + + if ($sent != 0) + { + $this->_doDataCommand(); + $this->_streamMessage($message); + } + else + { + $this->reset(); + } + + return $sent; + } + + /** Send a message to the given To: recipients */ + private function _sendTo(Swift_Mime_Message $message, $reversePath, + array $to, array &$failedRecipients) + { + if (empty($to)) + { + return 0; + } + return $this->_doMailTransaction($message, $reversePath, array_keys($to), + $failedRecipients); + } + + /** Send a message to the given Cc: recipients */ + private function _sendCc(Swift_Mime_Message $message, $reversePath, + array $cc, array &$failedRecipients) + { + if (empty($cc)) + { + return 0; + } + return $this->_doMailTransaction($message, $reversePath, array_keys($cc), + $failedRecipients); + } + + /** Send a message to all Bcc: recipients */ + private function _sendBcc(Swift_Mime_Message $message, $reversePath, + array $bcc, array &$failedRecipients) + { + $sent = 0; + foreach ($bcc as $forwardPath => $name) + { + $message->setBcc(array($forwardPath => $name)); + $sent += $this->_doMailTransaction( + $message, $reversePath, array($forwardPath), $failedRecipients + ); + } + return $sent; + } + + /** Try to determine the hostname of the server this is run on */ + private function _lookupHostname() + { + if (!empty($_SERVER['SERVER_NAME']) + && $this->_isFqdn($_SERVER['SERVER_NAME'])) + { + $this->_domain = $_SERVER['SERVER_NAME']; + } + elseif (!empty($_SERVER['SERVER_ADDR'])) + { + $this->_domain = sprintf('[%s]', $_SERVER['SERVER_ADDR']); + } + } + + /** Determine is the $hostname is a fully-qualified name */ + private function _isFqdn($hostname) + { + //We could do a really thorough check, but there's really no point + if (false !== $dotPos = strpos($hostname, '.')) + { + return ($dotPos > 0) && ($dotPos != strlen($hostname) - 1); + } + else + { + return false; + } + } + + /** + * Destructor. + */ + public function __destruct() + { + $this->stop(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php new file mode 100644 index 0000000..4c7e0f2 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php @@ -0,0 +1,88 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/Esmtp/Authenticator.php'; +//@require 'Swift/Transport/SmtpAgent.php'; +//@require 'Swift/TransportException.php'; + +/** + * Handles CRAM-MD5 authentication. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_Esmtp_Auth_CramMd5Authenticator + implements Swift_Transport_Esmtp_Authenticator +{ + + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * @return string + */ + public function getAuthKeyword() + { + return 'CRAM-MD5'; + } + + /** + * Try to authenticate the user with $username and $password. + * @param Swift_Transport_SmtpAgent $agent + * @param string $username + * @param string $password + * @return boolean + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, + $username, $password) + { + try + { + $challenge = $agent->executeCommand("AUTH CRAM-MD5\r\n", array(334)); + $challenge = base64_decode(substr($challenge, 4)); + $message = base64_encode( + $username . ' ' . $this->_getResponse($password, $challenge) + ); + $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); + return true; + } + catch (Swift_TransportException $e) + { + $agent->executeCommand("RSET\r\n", array(250)); + return false; + } + } + + /** + * Generate a CRAM-MD5 response from a server challenge. + * @param string $secret + * @param string $challenge + * @return string + */ + private function _getResponse($secret, $challenge) + { + if (strlen($secret) > 64) + { + $secret = pack('H32', md5($secret)); + } + + if (strlen($secret) < 64) + { + $secret = str_pad($secret, 64, chr(0)); + } + + $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); + $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); + + $inner = pack('H32', md5($k_ipad . $challenge)); + $digest = md5($k_opad . $inner); + + return $digest; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php new file mode 100644 index 0000000..bd22617 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php @@ -0,0 +1,58 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/Esmtp/Authenticator.php'; +//@require 'Swift/Transport/SmtpAgent.php'; +//@require 'Swift/TransportException.php'; + +/** + * Handles LOGIN authentication. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_Esmtp_Auth_LoginAuthenticator + implements Swift_Transport_Esmtp_Authenticator +{ + + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * @return string + */ + public function getAuthKeyword() + { + return 'LOGIN'; + } + + /** + * Try to authenticate the user with $username and $password. + * @param Swift_Transport_SmtpAgent $agent + * @param string $username + * @param string $password + * @return boolean + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, + $username, $password) + { + try + { + $agent->executeCommand("AUTH LOGIN\r\n", array(334)); + $agent->executeCommand(sprintf("%s\r\n", base64_encode($username)), array(334)); + $agent->executeCommand(sprintf("%s\r\n", base64_encode($password)), array(235)); + return true; + } + catch (Swift_TransportException $e) + { + $agent->executeCommand("RSET\r\n", array(250)); + return false; + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php new file mode 100644 index 0000000..ddd8094 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php @@ -0,0 +1,57 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/Esmtp/Authenticator.php'; +//@require 'Swift/Transport/SmtpAgent.php'; +//@require 'Swift/TransportException.php'; + +/** + * Handles PLAIN authentication. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_Esmtp_Auth_PlainAuthenticator + implements Swift_Transport_Esmtp_Authenticator +{ + + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * @return string + */ + public function getAuthKeyword() + { + return 'PLAIN'; + } + + /** + * Try to authenticate the user with $username and $password. + * @param Swift_Transport_SmtpAgent $agent + * @param string $username + * @param string $password + * @return boolean + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, + $username, $password) + { + try + { + $message = base64_encode($username . chr(0) . $username . chr(0) . $password); + $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); + return true; + } + catch (Swift_TransportException $e) + { + $agent->executeCommand("RSET\r\n", array(250)); + return false; + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php new file mode 100644 index 0000000..a223169 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php @@ -0,0 +1,262 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/TransportException.php'; +//@require 'Swift/Transport/EsmtpHandler.php'; +//@require 'Swift/Transport/SmtpAgent.php'; + +/** + * An ESMTP handler for AUTH support. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_Esmtp_AuthHandler implements Swift_Transport_EsmtpHandler +{ + + /** + * Authenticators available to process the request. + * @var Swift_Transport_Esmtp_Authenticator[] + * @access private + */ + private $_authenticators = array(); + + /** + * The username for authentication. + * @var string + * @access private + */ + private $_username; + + /** + * The password for authentication. + * @var string + * @access private + */ + private $_password; + + /** + * The auth mode for authentication. + * @var string + * @access private + */ + private $_auth_mode; + + /** + * The ESMTP AUTH parameters available. + * @var string[] + * @access private + */ + private $_esmtpParams = array(); + + /** + * Create a new AuthHandler with $authenticators for support. + * @param Swift_Transport_Esmtp_Authenticator[] $authenticators + */ + public function __construct(array $authenticators) + { + $this->setAuthenticators($authenticators); + } + + /** + * Set the Authenticators which can process a login request. + * @param Swift_Transport_Esmtp_Authenticator[] $authenticators + */ + public function setAuthenticators(array $authenticators) + { + $this->_authenticators = $authenticators; + } + + /** + * Get the Authenticators which can process a login request. + * @return Swift_Transport_Esmtp_Authenticator[] + */ + public function getAuthenticators() + { + return $this->_authenticators; + } + + /** + * Set the username to authenticate with. + * @param string $username + */ + public function setUsername($username) + { + $this->_username = $username; + } + + /** + * Get the username to authenticate with. + * @return string + */ + public function getUsername() + { + return $this->_username; + } + + /** + * Set the password to authenticate with. + * @param string $password + */ + public function setPassword($password) + { + $this->_password = $password; + } + + /** + * Get the password to authenticate with. + * @return string + */ + public function getPassword() + { + return $this->_password; + } + + /** + * Set the auth mode to use to authenticate. + * @param string $mode + */ + public function setAuthMode($mode) + { + $this->_auth_mode = $mode; + } + + /** + * Get the auth mode to use to authenticate. + * @return string + */ + public function getAuthMode() + { + return $this->_auth_mode; + } + + /** + * Get the name of the ESMTP extension this handles. + * @return boolean + */ + public function getHandledKeyword() + { + return 'AUTH'; + } + + /** + * Set the parameters which the EHLO greeting indicated. + * @param string[] $parameters + */ + public function setKeywordParams(array $parameters) + { + $this->_esmtpParams = $parameters; + } + + /** + * Runs immediately after a EHLO has been issued. + * @param Swift_Transport_SmtpAgent $agent to read/write + */ + public function afterEhlo(Swift_Transport_SmtpAgent $agent) + { + if ($this->_username) + { + $count = 0; + foreach ($this->_getAuthenticatorsForAgent() as $authenticator) + { + if (in_array(strtolower($authenticator->getAuthKeyword()), + array_map('strtolower', $this->_esmtpParams))) + { + $count++; + if ($authenticator->authenticate($agent, $this->_username, $this->_password)) + { + return; + } + } + } + throw new Swift_TransportException( + 'Failed to authenticate on SMTP server with username "' . + $this->_username . '" using ' . $count . ' possible authenticators' + ); + } + } + + /** + * Not used. + */ + public function getMailParams() + { + return array(); + } + + /** + * Not used. + */ + public function getRcptParams() + { + return array(); + } + + /** + * Not used. + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, + $command, $codes = array(), &$failedRecipients = null, &$stop = false) + { + } + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * This method is called to ensure extensions can be execute in an appropriate order. + * @param string $esmtpKeyword to compare with + * @return int + */ + public function getPriorityOver($esmtpKeyword) + { + return 0; + } + + /** + * Returns an array of method names which are exposed to the Esmtp class. + * @return string[] + */ + public function exposeMixinMethods() + { + return array('setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode'); + } + + /** + * Not used. + */ + public function resetState() + { + } + + // -- Protected methods + + /** + * Returns the authenticator list for the given agent. + * @param Swift_Transport_SmtpAgent $agent + * @return array + * @access protected + */ + protected function _getAuthenticatorsForAgent() + { + if (!$mode = strtolower($this->_auth_mode)) + { + return $this->_authenticators; + } + + foreach ($this->_authenticators as $authenticator) + { + if (strtolower($authenticator->getAuthKeyword()) == $mode) + { + return array($authenticator); + } + } + + throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); + } +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php new file mode 100644 index 0000000..bf166d3 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php @@ -0,0 +1,38 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/SmtpAgent.php'; + +/** + * An Authentication mechanism. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Transport_Esmtp_Authenticator +{ + + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * @return string + */ + public function getAuthKeyword(); + + /** + * Try to authenticate the user with $username and $password. + * @param Swift_Transport_SmtpAgent $agent + * @param string $username + * @param string $password + * @return boolean + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, + $username, $password); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php new file mode 100644 index 0000000..e96f95f --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php @@ -0,0 +1,82 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/EsmtpBufferWrapper.php'; + +/** + * An ESMTP handler. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Transport_EsmtpHandler +{ + + /** + * Get the name of the ESMTP extension this handles. + * @return boolean + */ + public function getHandledKeyword(); + + /** + * Set the parameters which the EHLO greeting indicated. + * @param string[] $parameters + */ + public function setKeywordParams(array $parameters); + + /** + * Runs immediately after a EHLO has been issued. + * @param Swift_Transport_SmtpAgent $agent to read/write + */ + public function afterEhlo(Swift_Transport_SmtpAgent $agent); + + /** + * Get params which are appended to MAIL FROM:<>. + * @return string[] + */ + public function getMailParams(); + + /** + * Get params which are appended to RCPT TO:<>. + * @return string[] + */ + public function getRcptParams(); + + /** + * Runs when a command is due to be sent. + * @param Swift_Transport_SmtpAgent $agent to read/write + * @param string $command to send + * @param int[] $codes expected in response + * @param string[] &$failedRecipients + * @param boolean &$stop to be set true if the command is now sent + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, + $command, $codes = array(), &$failedRecipients = null, &$stop = false); + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * This method is called to ensure extensions can be execute in an appropriate order. + * @param string $esmtpKeyword to compare with + * @return int + */ + public function getPriorityOver($esmtpKeyword); + + /** + * Returns an array of method names which are exposed to the Esmtp class. + * @return string[] + */ + public function exposeMixinMethods(); + + /** + * Tells this handler to clear any buffers and reset its state. + */ + public function resetState(); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php new file mode 100644 index 0000000..c7833c3 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php @@ -0,0 +1,340 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/AbstractSmtpTransport.php'; +//@require 'Swift/Transport/EsmtpHandler.php'; +//@require 'Swift/Transport/IoBuffer.php'; +//@require 'Swift/Transport/SmtpAgent.php'; +//@require 'Swift/TransportException.php'; +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Events/EventDispatcher.php'; + +/** + * Sends Messages over SMTP with ESMTP support. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_EsmtpTransport + extends Swift_Transport_AbstractSmtpTransport + implements Swift_Transport_SmtpAgent +{ + + /** + * ESMTP extension handlers. + * @var Swift_Transport_EsmtpHandler[] + * @access private + */ + private $_handlers = array(); + + /** + * ESMTP capabilities. + * @var string[] + * @access private + */ + private $_capabilities = array(); + + /** + * Connection buffer parameters. + * @var array + * @access protected + */ + private $_params = array( + 'protocol' => 'tcp', + 'host' => 'localhost', + 'port' => 25, + 'timeout' => 30, + 'blocking' => 1, + 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET + ); + + /** + * Creates a new EsmtpTransport using the given I/O buffer. + * @param Swift_Transport_IoBuffer $buf + * @param Swift_Transport_EsmtpHandler[] $extensionHandlers + * @param Swift_Events_EventDispatcher $dispatcher + */ + public function __construct(Swift_Transport_IoBuffer $buf, + array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher) + { + parent::__construct($buf, $dispatcher); + $this->setExtensionHandlers($extensionHandlers); + } + + /** + * Set the host to connect to. + * @param string $host + */ + public function setHost($host) + { + $this->_params['host'] = $host; + return $this; + } + + /** + * Get the host to connect to. + * @return string + */ + public function getHost() + { + return $this->_params['host']; + } + + /** + * Set the port to connect to. + * @param int $port + */ + public function setPort($port) + { + $this->_params['port'] = (int) $port; + return $this; + } + + /** + * Get the port to connect to. + * @return int + */ + public function getPort() + { + return $this->_params['port']; + } + + /** + * Set the connection timeout. + * @param int $timeout seconds + */ + public function setTimeout($timeout) + { + $this->_params['timeout'] = (int) $timeout; + return $this; + } + + /** + * Get the connection timeout. + * @return int + */ + public function getTimeout() + { + return $this->_params['timeout']; + } + + /** + * Set the encryption type (tls or ssl) + * @param string $encryption + */ + public function setEncryption($enc) + { + $this->_params['protocol'] = $enc; + return $this; + } + + /** + * Get the encryption type. + * @return string + */ + public function getEncryption() + { + return $this->_params['protocol']; + } + + /** + * Set ESMTP extension handlers. + * @param Swift_Transport_EsmtpHandler[] $handlers + */ + public function setExtensionHandlers(array $handlers) + { + $assoc = array(); + foreach ($handlers as $handler) + { + $assoc[$handler->getHandledKeyword()] = $handler; + } + uasort($assoc, array($this, '_sortHandlers')); + $this->_handlers = $assoc; + $this->_setHandlerParams(); + return $this; + } + + /** + * Get ESMTP extension handlers. + * @return Swift_Transport_EsmtpHandler[] + */ + public function getExtensionHandlers() + { + return array_values($this->_handlers); + } + + /** + * Run a command against the buffer, expecting the given response codes. + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * @param string $command + * @param int[] $codes + * @param string[] &$failures + * @return string + */ + public function executeCommand($command, $codes = array(), &$failures = null) + { + $failures = (array) $failures; + $stopSignal = false; + $response = null; + foreach ($this->_getActiveHandlers() as $handler) + { + $response = $handler->onCommand( + $this, $command, $codes, $failures, $stopSignal + ); + if ($stopSignal) + { + return $response; + } + } + return parent::executeCommand($command, $codes, $failures); + } + + // -- Mixin invocation code + + /** Mixin handling method for ESMTP handlers */ + public function __call($method, $args) + { + foreach ($this->_handlers as $handler) + { + if (in_array(strtolower($method), + array_map('strtolower', (array) $handler->exposeMixinMethods()) + )) + { + $return = call_user_func_array(array($handler, $method), $args); + //Allow fluid method calls + if (is_null($return) && substr($method, 0, 3) == 'set') + { + return $this; + } + else + { + return $return; + } + } + } + trigger_error('Call to undefined method ' . $method, E_USER_ERROR); + } + + // -- Protected methods + + /** Get the params to initialize the buffer */ + protected function _getBufferParams() + { + return $this->_params; + } + + /** Overridden to perform EHLO instead */ + protected function _doHeloCommand() + { + try + { + $response = $this->executeCommand( + sprintf("EHLO %s\r\n", $this->_domain), array(250) + ); + } + catch (Swift_TransportException $e) + { + return parent::_doHeloCommand(); + } + + $this->_capabilities = $this->_getCapabilities($response); + $this->_setHandlerParams(); + foreach ($this->_getActiveHandlers() as $handler) + { + $handler->afterEhlo($this); + } + } + + /** Overridden to add Extension support */ + protected function _doMailFromCommand($address) + { + $handlers = $this->_getActiveHandlers(); + $params = array(); + foreach ($handlers as $handler) + { + $params = array_merge($params, (array) $handler->getMailParams()); + } + $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; + $this->executeCommand( + sprintf("MAIL FROM: <%s>%s\r\n", $address, $paramStr), array(250) + ); + } + + /** Overridden to add Extension support */ + protected function _doRcptToCommand($address) + { + $handlers = $this->_getActiveHandlers(); + $params = array(); + foreach ($handlers as $handler) + { + $params = array_merge($params, (array) $handler->getRcptParams()); + } + $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; + $this->executeCommand( + sprintf("RCPT TO: <%s>%s\r\n", $address, $paramStr), array(250, 251, 252) + ); + } + + // -- Private methods + + /** Determine ESMTP capabilities by function group */ + private function _getCapabilities($ehloResponse) + { + $capabilities = array(); + $ehloResponse = trim($ehloResponse); + $lines = explode("\r\n", $ehloResponse); + array_shift($lines); + foreach ($lines as $line) + { + if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) + { + $keyword = strtoupper($matches[1]); + $paramStr = strtoupper(ltrim($matches[2], ' =')); + $params = !empty($paramStr) ? explode(' ', $paramStr) : array(); + $capabilities[$keyword] = $params; + } + } + return $capabilities; + } + + /** Set parameters which are used by each extension handler */ + private function _setHandlerParams() + { + foreach ($this->_handlers as $keyword => $handler) + { + if (array_key_exists($keyword, $this->_capabilities)) + { + $handler->setKeywordParams($this->_capabilities[$keyword]); + } + } + } + + /** Get ESMTP handlers which are currently ok to use */ + private function _getActiveHandlers() + { + $handlers = array(); + foreach ($this->_handlers as $keyword => $handler) + { + if (array_key_exists($keyword, $this->_capabilities)) + { + $handlers[] = $handler; + } + } + return $handlers; + } + + /** Custom sort for extension handler ordering */ + private function _sortHandlers($a, $b) + { + return $a->getPriorityOver($b->getHandledKeyword()); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php new file mode 100644 index 0000000..e62491c --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php @@ -0,0 +1,97 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/LoadBalancedTransport.php'; +//@require 'Swift/Mime/Message.php'; + +/** + * Contains a list of redundant Transports so when one fails, the next is used. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_FailoverTransport + extends Swift_Transport_LoadBalancedTransport +{ + + /** + * Registered transport curently used. + * @var Swift_Transport + * @access private + */ + private $_currentTransport; + + /** + * Creates a new FailoverTransport. + */ + public function __construct() + { + parent::__construct(); + } + + /** + * Send the given Message. + * Recipient/sender data will be retreived from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * @param Swift_Mime_Message $message + * @param string[] &$failedRecipients to collect failures by-reference + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $maxTransports = count($this->_transports); + $sent = 0; + + for ($i = 0; $i < $maxTransports + && $transport = $this->_getNextTransport(); ++$i) + { + try + { + if (!$transport->isStarted()) + { + $transport->start(); + } + + return $transport->send($message, $failedRecipients); + } + catch (Swift_TransportException $e) + { + $this->_killCurrentTransport(); + } + } + + if (count($this->_transports) == 0) + { + throw new Swift_TransportException( + 'All Transports in FailoverTransport failed, or no Transports available' + ); + } + + return $sent; + } + + // -- Protected methods + + protected function _getNextTransport() + { + if (!isset($this->_currentTransport)) + { + $this->_currentTransport = parent::_getNextTransport(); + } + return $this->_currentTransport; + } + + protected function _killCurrentTransport() + { + $this->_currentTransport = null; + parent::_killCurrentTransport(); + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php new file mode 100644 index 0000000..ac66ef0 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php @@ -0,0 +1,65 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/InputByteStream.php'; +//@require 'Swift/OutputByteStream.php'; + +/** + * Buffers input and output to a resource. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Transport_IoBuffer + extends Swift_InputByteStream, Swift_OutputByteStream +{ + + /** A socket buffer over TCP */ + const TYPE_SOCKET = 0x0001; + + /** A process buffer with I/O support */ + const TYPE_PROCESS = 0x0010; + + /** + * Perform any initialization needed, using the given $params. + * Parameters will vary depending upon the type of IoBuffer used. + * @param array $params + */ + public function initialize(array $params); + + /** + * Set an individual param on the buffer (e.g. switching to SSL). + * @param string $param + * @param mixed $value + */ + public function setParam($param, $value); + + /** + * Perform any shutdown logic needed. + */ + public function terminate(); + + /** + * Set an array of string replacements which should be made on data written + * to the buffer. This could replace LF with CRLF for example. + * @param string[] $replacements + */ + public function setWriteTranslations(array $replacements); + + /** + * Get a line of output (including any CRLF). + * The $sequence number comes from any writes and may or may not be used + * depending upon the implementation. + * @param int $sequence of last write to scan from + * @return string + */ + public function readLine($sequence); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php new file mode 100644 index 0000000..367981b --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php @@ -0,0 +1,188 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport.php'; +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Events/EventListener.php'; + +/** + * Redudantly and rotationally uses several Transports when sending. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_LoadBalancedTransport implements Swift_Transport +{ + + /** Transports which are deemed useless */ + private $_deadTransports = array(); + + /** + * The Transports which are used in rotation. + * + * @var array Swift_Transport + * @access protected + */ + protected $_transports = array(); + + /** + * Creates a new LoadBalancedTransport. + */ + public function __construct() + { + } + + /** + * Set $transports to delegate to. + * + * @param array $transports Swift_Transport + */ + public function setTransports(array $transports) + { + $this->_transports = $transports; + $this->_deadTransports = array(); + } + + /** + * Get $transports to delegate to. + * + * @return array Swift_Transport + */ + public function getTransports(array $transports) + { + return array_merge($this->_transports, $this->_deadTransports); + } + + /** + * Test if this Transport mechanism has started. + * + * @return boolean + */ + public function isStarted() + { + return count($this->_transports) > 0; + } + + /** + * Start this Transport mechanism. + */ + public function start() + { + $this->_transports = array_merge($this->_transports, $this->_deadTransports); + } + + /** + * Stop this Transport mechanism. + */ + public function stop() + { + foreach ($this->_transports as $transport) + { + $transport->stop(); + } + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retreived from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] &$failedRecipients to collect failures by-reference + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $maxTransports = count($this->_transports); + $sent = 0; + + for ($i = 0; $i < $maxTransports + && $transport = $this->_getNextTransport(); ++$i) + { + try + { + if (!$transport->isStarted()) + { + $transport->start(); + } + if ($sent = $transport->send($message, $failedRecipients)) + { + break; + } + } + catch (Swift_TransportException $e) + { + $this->_killCurrentTransport(); + } + } + + if (count($this->_transports) == 0) + { + throw new Swift_TransportException( + 'All Transports in LoadBalancedTransport failed, or no Transports available' + ); + } + + return $sent; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + foreach ($this->_transports as $transport) + { + $transport->registerPlugin($plugin); + } + } + + // -- Protected methods + + /** + * Rotates the transport list around and returns the first instance. + * + * @return Swift_Transport + * @access protected + */ + protected function _getNextTransport() + { + if ($next = array_shift($this->_transports)) + { + $this->_transports[] = $next; + } + return $next; + } + + /** + * Tag the currently used (top of stack) transport as dead/useless. + * + * @access protected + */ + protected function _killCurrentTransport() + { + if ($transport = array_pop($this->_transports)) + { + try + { + $transport->stop(); + } + catch (Exception $e) + { + } + $this->_deadTransports[] = $transport; + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php new file mode 100644 index 0000000..dda882f --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * This interface intercepts calls to the mail() function. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Transport_MailInvoker +{ + + /** + * Send mail via the mail() function. + * + * This method takes the same arguments as PHP mail(). + * + * @param string $to + * @param string $subject + * @param string $body + * @param string $headers + * @param string $extraParams + * + * @return boolean + */ + public function mail($to, $subject, $body, $headers = null, $extraParams = null); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/MailTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/MailTransport.php new file mode 100644 index 0000000..eca59e1 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/MailTransport.php @@ -0,0 +1,242 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport.php'; +//@require 'Swift/Transport/MailInvoker.php'; +//@require 'Swift/Mime/Message.php'; +//@require 'Swift/Events/EventListener.php'; + +/** + * Sends Messages using the mail() function. + * + * It is advised that users do not use this transport if at all possible + * since a number of plugin features cannot be used in conjunction with this + * transport due to the internal interface in PHP itself. + * + * The level of error reporting with this transport is incredibly weak, again + * due to limitations of PHP's internal mail() function. You'll get an + * all-or-nothing result from sending. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_MailTransport implements Swift_Transport +{ + + /** Addtional parameters to pass to mail() */ + private $_extraParams = '-f%s'; + + /** The event dispatcher from the plugin API */ + private $_eventDispatcher; + + /** An invoker that calls the mail() function */ + private $_invoker; + + /** + * Create a new MailTransport with the $log. + * @param Swift_Transport_Log $log + */ + public function __construct(Swift_Transport_MailInvoker $invoker, + Swift_Events_EventDispatcher $eventDispatcher) + { + $this->_invoker = $invoker; + $this->_eventDispatcher = $eventDispatcher; + } + + /** + * Not used. + */ + public function isStarted() + { + return false; + } + + /** + * Not used. + */ + public function start() + { + } + + /** + * Not used. + */ + public function stop() + { + } + + /** + * Set the additional parameters used on the mail() function. + * + * This string is formatted for sprintf() where %s is the sender address. + * + * @param string $params + */ + public function setExtraParams($params) + { + $this->_extraParams = $params; + return $this; + } + + /** + * Get the additional parameters used on the mail() function. + * + * This string is formatted for sprintf() where %s is the sender address. + * + * @return string + */ + public function getExtraParams() + { + return $this->_extraParams; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retreived from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param Swift_Mime_Message $message + * @param string[] &$failedRecipients to collect failures by-reference + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) + { + return 0; + } + } + + $count = ( + count((array) $message->getTo()) + + count((array) $message->getCc()) + + count((array) $message->getBcc()) + ); + + $toHeader = $message->getHeaders()->get('To'); + $subjectHeader = $message->getHeaders()->get('Subject'); + + $to = $toHeader->getFieldBody(); + $subject = $subjectHeader->getFieldBody(); + + $reversePath = $this->_getReversePath($message); + + //Remove headers that would otherwise be duplicated + $message->getHeaders()->remove('To'); + $message->getHeaders()->remove('Subject'); + + $messageStr = $message->toString(); + + $message->getHeaders()->set($toHeader); + $message->getHeaders()->set($subjectHeader); + + //Separate headers from body + if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) + { + $headers = substr($messageStr, 0, $endHeaders) . "\r\n"; //Keep last EOL + $body = substr($messageStr, $endHeaders + 4); + } + else + { + $headers = $messageStr . "\r\n"; + $body = ''; + } + + unset($messageStr); + + if ("\r\n" != PHP_EOL) //Non-windows (not using SMTP) + { + $headers = str_replace("\r\n", PHP_EOL, $headers); + $body = str_replace("\r\n", PHP_EOL, $body); + } + else //Windows, using SMTP + { + $headers = str_replace("\r\n.", "\r\n..", $headers); + $body = str_replace("\r\n.", "\r\n..", $body); + } + + if ($this->_invoker->mail($to, $subject, $body, $headers, + sprintf($this->_extraParams, $reversePath))) + { + if ($evt) + { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + } + else + { + $failedRecipients = array_merge( + $failedRecipients, + array_keys((array) $message->getTo()), + array_keys((array) $message->getCc()), + array_keys((array) $message->getBcc()) + ); + + if ($evt) + { + $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); + + $count = 0; + } + + return $count; + } + + /** + * Register a plugin. + * + * @param Swift_Events_EventListener $plugin + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->_eventDispatcher->bindEventListener($plugin); + } + + // -- Private methods + + /** Determine the best-use reverse path for this message */ + private function _getReversePath(Swift_Mime_Message $message) + { + $return = $message->getReturnPath(); + $sender = $message->getSender(); + $from = $message->getFrom(); + $path = null; + if (!empty($return)) + { + $path = $return; + } + elseif (!empty($sender)) + { + $keys = array_keys($sender); + $path = array_shift($keys); + } + elseif (!empty($from)) + { + $keys = array_keys($from); + $path = array_shift($keys); + } + return $path; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php new file mode 100644 index 0000000..aae8bde --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php @@ -0,0 +1,173 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/Transport/EsmtpTransport.php'; +//@require 'Swift/Transport/IoBuffer.php'; +//@require 'Swift/Transport/Log.php'; +//@require 'Swift/Events/EventDispatcher.php'; + +/** + * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary. + * + * Supported modes are -bs and -t, with any additional flags desired. + * It is advised to use -bs mode since error reporting with -t mode is not + * possible. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_SendmailTransport + extends Swift_Transport_AbstractSmtpTransport +{ + + /** + * Connection buffer parameters. + * @var array + * @access protected + */ + private $_params = array( + 'timeout' => 30, + 'blocking' => 1, + 'command' => '/usr/sbin/sendmail -bs', + 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS + ); + + /** + * Create a new SendmailTransport with $buf for I/O. + * @param Swift_Transport_IoBuffer $buf + * @param Swift_Events_EventDispatcher $dispatcher + */ + public function __construct(Swift_Transport_IoBuffer $buf, + Swift_Events_EventDispatcher $dispatcher) + { + parent::__construct($buf, $dispatcher); + } + + /** + * Start the standalone SMTP session if running in -bs mode. + */ + public function start() + { + if (false !== strpos($this->getCommand(), ' -bs')) + { + parent::start(); + } + } + + /** + * Set the command to invoke. + * If using -t mode you are strongly advised to include -oi or -i in the + * flags. For example: /usr/sbin/sendmail -oi -t + * Swift will append a -f<sender> flag if one is not present. + * The recommended mode is "-bs" since it is interactive and failure notifications + * are hence possible. + * @param string $command + */ + public function setCommand($command) + { + $this->_params['command'] = $command; + return $this; + } + + /** + * Get the sendmail command which will be invoked. + * @return string + */ + public function getCommand() + { + return $this->_params['command']; + } + + /** + * Send the given Message. + * Recipient/sender data will be retreived from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * NOTE: If using 'sendmail -t' you will not be aware of any failures until + * they bounce (i.e. send() will always return 100% success). + * @param Swift_Mime_Message $message + * @param string[] &$failedRecipients to collect failures by-reference + * @return int + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + $command = $this->getCommand(); + $buffer = $this->getBuffer(); + + if (false !== strpos($command, ' -t')) + { + if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) + { + $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) + { + return 0; + } + } + + if (false === strpos($command, ' -f')) + { + $command .= ' -f' . $this->_getReversePath($message); + } + + $buffer->initialize(array_merge($this->_params, array('command' => $command))); + + if (false === strpos($command, ' -i') && false === strpos($command, ' -oi')) + { + $buffer->setWriteTranslations(array("\r\n" => "\n", "\n." => "\n..")); + } + else + { + $buffer->setWriteTranslations(array("\r\n"=>"\n")); + } + + $count = count((array) $message->getTo()) + + count((array) $message->getCc()) + + count((array) $message->getBcc()) + ; + $message->toByteStream($buffer); + $buffer->flushBuffers(); + $buffer->setWriteTranslations(array()); + $buffer->terminate(); + + if ($evt) + { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $evt->setFailedRecipients($failedRecipients); + $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); + } + elseif (false !== strpos($command, ' -bs')) + { + $count = parent::send($message, $failedRecipients); + } + else + { + $this->_throwException(new Swift_TransportException( + 'Unsupported sendmail command flags [' . $command . ']. ' . + 'Must be one of "-bs" or "-t" but can include additional flags.' + )); + } + + return $count; + } + + // -- Protected methods + + /** Get the params to initialize the buffer */ + protected function _getBufferParams() + { + return $this->_params; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php new file mode 100644 index 0000000..271ba84 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php @@ -0,0 +1,58 @@ +<?php + +/* + Invokes the mail() function in Swift Mailer. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + */ + +//@require 'Swift/Transport/MailInvoker.php'; + +/** + * This is the implementation class for {@link Swift_Transport_MailInvoker}. + * + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_SimpleMailInvoker implements Swift_Transport_MailInvoker +{ + + /** + * Send mail via the mail() function. + * + * This method takes the same arguments as PHP mail(). + * + * @param string $to + * @param string $subject + * @param string $body + * @param string $headers + * @param string $extraParams + * + * @return boolean + */ + public function mail($to, $subject, $body, $headers = null, $extraParams = null) + { + if (!ini_get('safe_mode')) + { + return mail($to, $subject, $body, $headers, $extraParams); + } + else + { + return mail($to, $subject, $body, $headers); + } + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php new file mode 100644 index 0000000..ee9b8ed --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php @@ -0,0 +1,36 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Wraps an IoBuffer to send/receive SMTP commands/responses. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +interface Swift_Transport_SmtpAgent +{ + + /** + * Get the IoBuffer where read/writes are occurring. + * @return Swift_Transport_IoBuffer + */ + public function getBuffer(); + + /** + * Run a command against the buffer, expecting the given response codes. + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * @param string $command + * @param int[] $codes + * @param string[] &$failures + */ + public function executeCommand($command, $codes = array(), &$failures = null); + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php new file mode 100644 index 0000000..01ae8a5 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php @@ -0,0 +1,276 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/ByteStream/AbstractFilterableInputStream.php'; +//@require 'Swift/ReplacementFilterFactory.php'; +//@require 'Swift/Transport/IoBuffer.php'; +//@require 'Swift/TransportException.php'; + +/** + * A generic IoBuffer implementation supporting remote sockets and local processes. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_Transport_StreamBuffer + extends Swift_ByteStream_AbstractFilterableInputStream + implements Swift_Transport_IoBuffer +{ + + /** A primary socket */ + private $_stream; + + /** The input stream */ + private $_in; + + /** The output stream */ + private $_out; + + /** Buffer initialization parameters */ + private $_params = array(); + + /** The ReplacementFilterFactory */ + private $_replacementFactory; + + /** Translations performed on data being streamed into the buffer */ + private $_translations = array(); + + /** + * Create a new StreamBuffer using $replacementFactory for transformations. + * @param Swift_ReplacementFilterFactory $replacementFactory + */ + public function __construct( + Swift_ReplacementFilterFactory $replacementFactory) + { + $this->_replacementFactory = $replacementFactory; + } + + /** + * Perform any initialization needed, using the given $params. + * Parameters will vary depending upon the type of IoBuffer used. + * @param array $params + */ + public function initialize(array $params) + { + $this->_params = $params; + switch ($params['type']) + { + case self::TYPE_PROCESS: + $this->_establishProcessConnection(); + break; + case self::TYPE_SOCKET: + default: + $this->_establishSocketConnection(); + break; + } + } + + /** + * Set an individual param on the buffer (e.g. switching to SSL). + * @param string $param + * @param mixed $value + */ + public function setParam($param, $value) + { + if (isset($this->_stream)) + { + switch ($param) + { + case 'protocol': + if (!array_key_exists('protocol', $this->_params) + || $value != $this->_params['protocol']) + { + if ('tls' == $value) + { + stream_socket_enable_crypto( + $this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT + ); + } + } + break; + } + } + $this->_params[$param] = $value; + } + + /** + * Perform any shutdown logic needed. + */ + public function terminate() + { + if (isset($this->_stream)) + { + switch ($this->_params['type']) + { + case self::TYPE_PROCESS: + fclose($this->_in); + fclose($this->_out); + proc_close($this->_stream); + break; + case self::TYPE_SOCKET: + default: + fclose($this->_stream); + break; + } + } + $this->_stream = null; + $this->_out = null; + $this->_in = null; + } + + /** + * Set an array of string replacements which should be made on data written + * to the buffer. This could replace LF with CRLF for example. + * @param string[] $replacements + */ + public function setWriteTranslations(array $replacements) + { + foreach ($this->_translations as $search => $replace) + { + if (!isset($replacements[$search])) + { + $this->removeFilter($search); + unset($this->_translations[$search]); + } + } + + foreach ($replacements as $search => $replace) + { + if (!isset($this->_translations[$search])) + { + $this->addFilter( + $this->_replacementFactory->createFilter($search, $replace), $search + ); + $this->_translations[$search] = true; + } + } + } + + /** + * Get a line of output (including any CRLF). + * The $sequence number comes from any writes and may or may not be used + * depending upon the implementation. + * @param int $sequence of last write to scan from + * @return string + */ + public function readLine($sequence) + { + if (isset($this->_out) && !feof($this->_out)) + { + $line = fgets($this->_out); + return $line; + } + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * @param int $length + * @return string + */ + public function read($length) + { + if (isset($this->_out) && !feof($this->_out)) + { + $ret = fread($this->_out, $length); + return $ret; + } + } + + /** Not implemented */ + public function setReadPointer($byteOffset) + { + } + + // -- Protected methods + + /** Flush the stream contents */ + protected function _flush() + { + if (isset($this->_in)) + { + fflush($this->_in); + } + } + + /** Write this bytes to the stream */ + protected function _commit($bytes) + { + if (isset($this->_in) + && fwrite($this->_in, $bytes)) + { + return ++$this->_sequence; + } + } + + // -- Private methods + + /** + * Establishes a connection to a remote server. + * @access private + */ + private function _establishSocketConnection() + { + $host = $this->_params['host']; + if (!empty($this->_params['protocol'])) + { + $host = $this->_params['protocol'] . '://' . $host; + } + $timeout = 15; + if (!empty($this->_params['timeout'])) + { + $timeout = $this->_params['timeout']; + } + if (!$this->_stream = fsockopen($host, $this->_params['port'], $errno, $errstr, $timeout)) + { + throw new Swift_TransportException( + 'Connection could not be established with host ' . $this->_params['host'] . + ' [' . $errstr . ' #' . $errno . ']' + ); + } + if (!empty($this->_params['blocking'])) + { + stream_set_blocking($this->_stream, 1); + } + else + { + stream_set_blocking($this->_stream, 0); + } + $this->_in =& $this->_stream; + $this->_out =& $this->_stream; + } + + /** + * Opens a process for input/output. + * @access private + */ + private function _establishProcessConnection() + { + $command = $this->_params['command']; + $descriptorSpec = array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ); + $this->_stream = proc_open($command, $descriptorSpec, $pipes); + stream_set_blocking($pipes[2], 0); + if ($err = stream_get_contents($pipes[2])) + { + throw new Swift_TransportException( + 'Process could not be started [' . $err . ']' + ); + } + $this->_in =& $pipes[0]; + $this->_out =& $pipes[1]; + } + +} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/TransportException.php b/h-source/External/swiftmailer/lib/classes/Swift/TransportException.php new file mode 100644 index 0000000..b7cd658 --- /dev/null +++ b/h-source/External/swiftmailer/lib/classes/Swift/TransportException.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +//@require 'Swift/IoException.php'; + +/** + * TransportException thrown when an error occurs in the Transport subsystem. + * @package Swift + * @subpackage Transport + * @author Chris Corbyn + */ +class Swift_TransportException extends Swift_IoException +{ + + /** + * Create a new TransportException with $message. + * @param string $message + */ + public function __construct($message) + { + parent::__construct($message); + } + +} diff --git a/h-source/External/swiftmailer/lib/dependency_maps/cache_deps.php b/h-source/External/swiftmailer/lib/dependency_maps/cache_deps.php new file mode 100644 index 0000000..6058206 --- /dev/null +++ b/h-source/External/swiftmailer/lib/dependency_maps/cache_deps.php @@ -0,0 +1,25 @@ +<?php + +Swift_DependencyContainer::getInstance() + + -> register('cache') + -> asAliasOf('cache.array') + + -> register('tempdir') + -> asValue('/tmp') + + -> register('cache.null') + -> asSharedInstanceOf('Swift_KeyCache_NullKeyCache') + + -> register('cache.array') + -> asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache') + -> withDependencies(array('cache.inputstream')) + + -> register('cache.disk') + -> asSharedInstanceOf('Swift_KeyCache_DiskKeyCache') + -> withDependencies(array('cache.inputstream', 'tempdir')) + + -> register('cache.inputstream') + -> asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream') + + ; diff --git a/h-source/External/swiftmailer/lib/dependency_maps/mime_deps.php b/h-source/External/swiftmailer/lib/dependency_maps/mime_deps.php new file mode 100644 index 0000000..e03927a --- /dev/null +++ b/h-source/External/swiftmailer/lib/dependency_maps/mime_deps.php @@ -0,0 +1,97 @@ +<?php + +require_once dirname(__FILE__) . '/../mime_types.php'; + +Swift_DependencyContainer::getInstance() + + -> register('properties.charset') + -> asValue('utf-8') + + -> register('mime.message') + -> asNewInstanceOf('Swift_Mime_SimpleMessage') + -> withDependencies(array( + 'mime.headerset', + 'mime.qpcontentencoder', + 'cache', + 'properties.charset' + )) + + -> register('mime.part') + -> asNewInstanceOf('Swift_Mime_MimePart') + -> withDependencies(array( + 'mime.headerset', + 'mime.qpcontentencoder', + 'cache', + 'properties.charset' + )) + + -> register('mime.attachment') + -> asNewInstanceOf('Swift_Mime_Attachment') + -> withDependencies(array( + 'mime.headerset', + 'mime.base64contentencoder', + 'cache' + )) + -> addConstructorValue($swift_mime_types) + + -> register('mime.embeddedfile') + -> asNewInstanceOf('Swift_Mime_EmbeddedFile') + -> withDependencies(array( + 'mime.headerset', + 'mime.base64contentencoder', + 'cache' + )) + -> addConstructorValue($swift_mime_types) + + -> register('mime.headerfactory') + -> asNewInstanceOf('Swift_Mime_SimpleHeaderFactory') + -> withDependencies(array( + 'mime.qpheaderencoder', + 'mime.rfc2231encoder', + 'properties.charset' + )) + + -> register('mime.headerset') + -> asNewInstanceOf('Swift_Mime_SimpleHeaderSet') + -> withDependencies(array('mime.headerfactory', 'properties.charset')) + + -> register('mime.qpheaderencoder') + -> asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder') + -> withDependencies(array('mime.charstream')) + + -> register('mime.charstream') + -> asNewInstanceOf('Swift_CharacterStream_NgCharacterStream') + -> withDependencies(array('mime.characterreaderfactory', 'properties.charset')) + + -> register('mime.bytecanonicalizer') + -> asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter') + -> addConstructorValue(array(array(0x0D, 0x0A), array(0x0D), array(0x0A))) + -> addConstructorValue(array(array(0x0A), array(0x0A), array(0x0D, 0x0A))) + + -> register('mime.characterreaderfactory') + -> asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory') + + -> register('mime.qpcontentencoder') + -> asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') + -> withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) + + -> register('mime.7bitcontentencoder') + -> asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') + -> addConstructorValue('7bit') + -> addConstructorValue(true) + + -> register('mime.8bitcontentencoder') + -> asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') + -> addConstructorValue('8bit') + -> addConstructorValue(true) + + -> register('mime.base64contentencoder') + -> asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder') + + -> register('mime.rfc2231encoder') + -> asNewInstanceOf('Swift_Encoder_Rfc2231Encoder') + -> withDependencies(array('mime.charstream')) + + ; + +unset($swift_mime_types); diff --git a/h-source/External/swiftmailer/lib/dependency_maps/transport_deps.php b/h-source/External/swiftmailer/lib/dependency_maps/transport_deps.php new file mode 100644 index 0000000..32881d6 --- /dev/null +++ b/h-source/External/swiftmailer/lib/dependency_maps/transport_deps.php @@ -0,0 +1,62 @@ +<?php + +Swift_DependencyContainer::getInstance() + + -> register('transport.smtp') + -> asNewInstanceOf('Swift_Transport_EsmtpTransport') + -> withDependencies(array( + 'transport.buffer', + array('transport.authhandler'), + 'transport.eventdispatcher' + )) + + -> register('transport.sendmail') + -> asNewInstanceOf('Swift_Transport_SendmailTransport') + -> withDependencies(array( + 'transport.buffer', + 'transport.eventdispatcher' + )) + + -> register('transport.mail') + -> asNewInstanceOf('Swift_Transport_MailTransport') + -> withDependencies(array('transport.mailinvoker', 'transport.eventdispatcher')) + + -> register('transport.loadbalanced') + -> asNewInstanceOf('Swift_Transport_LoadBalancedTransport') + + -> register('transport.failover') + -> asNewInstanceOf('Swift_Transport_FailoverTransport') + + -> register('transport.mailinvoker') + -> asSharedInstanceOf('Swift_Transport_SimpleMailInvoker') + + -> register('transport.buffer') + -> asNewInstanceOf('Swift_Transport_StreamBuffer') + -> withDependencies(array('transport.replacementfactory')) + + -> register('transport.authhandler') + -> asNewInstanceOf('Swift_Transport_Esmtp_AuthHandler') + -> withDependencies(array( + array( + 'transport.crammd5auth', + 'transport.loginauth', + 'transport.plainauth' + ) + )) + + -> register('transport.crammd5auth') + -> asNewInstanceOf('Swift_Transport_Esmtp_Auth_CramMd5Authenticator') + + -> register('transport.loginauth') + -> asNewInstanceOf('Swift_Transport_Esmtp_Auth_LoginAuthenticator') + + -> register('transport.plainauth') + -> asNewInstanceOf('Swift_Transport_Esmtp_Auth_PlainAuthenticator') + + -> register('transport.eventdispatcher') + -> asNewInstanceOf('Swift_Events_SimpleEventDispatcher') + + -> register('transport.replacementfactory') + -> asSharedInstanceOf('Swift_StreamFilters_StringReplacementFilterFactory') + + ; diff --git a/h-source/External/swiftmailer/lib/mime_types.php b/h-source/External/swiftmailer/lib/mime_types.php new file mode 100644 index 0000000..65c9aa0 --- /dev/null +++ b/h-source/External/swiftmailer/lib/mime_types.php @@ -0,0 +1,76 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * List of MIME type automatically detected in Swift Mailer. + */ + +//You may add or take away what you like (lowercase required) + +$swift_mime_types = array( + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'avi' => 'video/avi', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bz2', + 'csv' => 'text/csv', + 'dmg' => 'application/x-apple-diskimage', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'eml' => 'message/rfc822', + 'aps' => 'application/postscript', + 'exe' => 'application/x-ms-dos-executable', + 'flv' => 'video/x-flv', + 'gif' => 'image/gif', + 'gz' => 'application/x-gzip', + 'hqx' => 'application/stuffit', + 'htm' => 'text/html', + 'html' => 'text/html', + 'jar' => 'application/x-java-archive', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'm3u' => 'audio/x-mpegurl', + 'm4a' => 'audio/mp4', + 'mdb' => 'application/x-msaccess', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'odg' => 'vnd.oasis.opendocument.graphics', + 'odp' => 'vnd.oasis.opendocument.presentation', + 'odt' => 'vnd.oasis.opendocument.text', + 'ods' => 'vnd.oasis.opendocument.spreadsheet', + 'ogg' => 'audio/ogg', + 'pdf' => 'application/pdf', + 'png' => 'image/png', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'rar' => 'application/x-rar-compressed', + 'rtf' => 'application/rtf', + 'tar' => 'application/x-tar', + 'sit' => 'application/x-stuffit', + 'svg' => 'image/svg+xml', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'ttf' => 'application/x-font-truetype', + 'txt' => 'text/plain', + 'vcf' => 'text/x-vcard', + 'wav' => 'audio/wav', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'audio/x-ms-wmv', + 'xls' => 'application/excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'zip' => 'application/zip' +); diff --git a/h-source/External/swiftmailer/lib/preferences.php b/h-source/External/swiftmailer/lib/preferences.php new file mode 100644 index 0000000..0b9e4b1 --- /dev/null +++ b/h-source/External/swiftmailer/lib/preferences.php @@ -0,0 +1,20 @@ +<?php + +/****************************************************************************/ +/* */ +/* YOU MAY WISH TO MODIFY OR REMOVE THE FOLLOWING LINES WHICH SET DEFAULTS */ +/* */ +/****************************************************************************/ + +// Sets the default charset so that setCharset() is not needed elsewhere +Swift_Preferences::getInstance()->setCharset('utf-8'); + +// Without these lines the default caching mechanism is "array" but this uses +// a lot of memory. +// If possible, use a disk cache to enable attaching large attachments etc +if (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir())) +{ + Swift_Preferences::getInstance() + -> setTempDir(sys_get_temp_dir()) + -> setCacheType('disk'); +} diff --git a/h-source/External/swiftmailer/lib/swift_init.php b/h-source/External/swiftmailer/lib/swift_init.php new file mode 100644 index 0000000..fe624a9 --- /dev/null +++ b/h-source/External/swiftmailer/lib/swift_init.php @@ -0,0 +1,21 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Dependency injection initialization for Swift Mailer. + */ + +//Load in dependency maps +require_once dirname(__FILE__) . '/dependency_maps/cache_deps.php'; +require_once dirname(__FILE__) . '/dependency_maps/mime_deps.php'; +require_once dirname(__FILE__) . '/dependency_maps/transport_deps.php'; + +//Load in global library preferences +require_once dirname(__FILE__) . '/preferences.php'; diff --git a/h-source/External/swiftmailer/lib/swift_required.php b/h-source/External/swiftmailer/lib/swift_required.php new file mode 100644 index 0000000..ad1a4ad --- /dev/null +++ b/h-source/External/swiftmailer/lib/swift_required.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Autoloader and dependency injection initialization for Swift Mailer. + */ + +//Load Swift utility class +require_once dirname(__FILE__) . '/classes/Swift.php'; + +//Start the autoloader +Swift::registerAutoload(); + +//Load the init script to set up dependency injection +require_once dirname(__FILE__) . '/swift_init.php'; diff --git a/h-source/External/swiftmailer/lib/swift_required_pear.php b/h-source/External/swiftmailer/lib/swift_required_pear.php new file mode 100644 index 0000000..20a6159 --- /dev/null +++ b/h-source/External/swiftmailer/lib/swift_required_pear.php @@ -0,0 +1,22 @@ +<?php + +/* + * This file is part of SwiftMailer. + * (c) 2004-2009 Chris Corbyn + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Autoloader and dependency injection initialization for Swift Mailer. + */ + +//Load Swift utility class +require_once dirname(__FILE__) . '/Swift.php'; + +//Start the autoloader +Swift::registerAutoload(); + +//Load the init script to set up dependency injection +require_once dirname(__FILE__) . '/swift_init.php'; diff --git a/h-source/Library/Array/Validate/Base.php b/h-source/Library/Array/Validate/Base.php new file mode 100644 index 0000000..3366097 --- /dev/null +++ b/h-source/Library/Array/Validate/Base.php @@ -0,0 +1,241 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to validate associative arrays +class Array_Validate_Base +{ + + public $errorString = null; //string containing the list fields not found + public $errorsNumb = null; //numbers of errors + + protected $_lang; //language of notices + protected $_resultString; //reference to the class arraycheckStrings containing all the result strings + + + public function __construct($lang = 'Eng') + { + $this->_lang = $lang; + $stringClass = 'Lang_'.$this->_lang.'_ValCondStrings'; + if (!class_exists($stringClass)) + { + $stringClass = 'Lang_Eng_ValCondStrings'; + } + $this->_resultString = new $stringClass(); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are not '' and are equal (===) to each other + public function checkEqual($associativeArray,$keyString) + { + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + + //set the first value to null + $firstValue = null; + + foreach ($keyArray as $key) + { + if (array_key_exists($key,$associativeArray)) + { + $firstValue = $associativeArray[$key]; + break; + } + } + + if (isset($firstValue)) + { + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + if (strcmp($associativeArray[$keyArray[$i]],$firstValue) !== 0) + { + $numb++; + $errorString = $this->_resultString->getNotEqualResultString($keyString); + } + } + } + } + + $this->errorString = $errorString; + return $numb === 0 ? true : false; + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are alphabetic values + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + public function checkAlpha($associativeArray,$keyString,$strength = 'strong') + { + return $this->checkGeneric($associativeArray,$keyString,$strength,'ctype_alpha','getNotAlphabeticResultString'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are alphanumeric values + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + public function checkAlphaNum($associativeArray,$keyString,$strength = 'strong') + { + return $this->checkGeneric($associativeArray,$keyString,$strength,'ctype_alnum','getNotAlphanumericResultString'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are decimal digits + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + public function checkDigit($associativeArray,$keyString,$strength = 'strong') + { + return $this->checkGeneric($associativeArray,$keyString,$strength,'ctype_digit','getNotDecimalDigitResultString'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) have mail format + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + public function checkMail($associativeArray,$keyString,$strength = 'strong') + { + return $this->checkGeneric($associativeArray,$keyString,$strength,'checkMail','getNotMailFormatResultString'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) is a number (integer or number). It makes use of the is_numeric PHP built-in function + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + public function checkNumeric($associativeArray,$keyString,$strength = 'strong') + { + return $this->checkGeneric($associativeArray,$keyString,$strength,'is_numeric','getNotNumericResultString'); + } + + + //apply a generic check function + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + //$func: the function to apply + //$strFunc: the method of the object $this->_resultString to apply + private function checkGeneric($associativeArray,$keyString,$strength,$func,$strFunc) + { + + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + if (strcmp($associativeArray[$keyArray[$i]],'') !== 0 or $strength === 'strong') + { + if (!call_user_func($func,$associativeArray[$keyArray[$i]])) + { + $numb++; + $errorString .= call_user_func(array($this->_resultString,$strFunc),$keyArray[$i]); + } + } + } + } + + $this->errorString = $errorString; + return $numb === 0 ? true : false; + + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) have a number of chars smaller than $maxLenght + public function checkLength($associativeArray,$keyString,$maxLength = 10) + { + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + if (eg_strlen($associativeArray[$keyArray[$i]]) > $maxLength) + { + $numb++; + $errorString .= $this->_resultString->getLengthExceedsResultString($keyArray[$i],$maxLength); + } + } + } + $this->errorString = $errorString; + return $numb === 0 ? true : false; + + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are different from the values indicated in the argument $strings (a comma-separated list of words) + public function checkIsNotStrings($associativeArray,$keyString,$strings = '') + { + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + //get the array from the comma-separated list of strings + $stringsArray = explode(',',$strings); + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + foreach ($stringsArray as $string) + { + if (strcmp($associativeArray[$keyArray[$i]],$string) === 0) + { + $numb++; + $errorString .= $this->_resultString->getIsForbiddenStringResultString($keyArray[$i],$strings); + } + } + } + } + $this->errorString = $errorString; + return $numb === 0 ? true : false; + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are one of the values indicated in the argument $strings (a comma-separated list of words) + //$strength: hard or soft. If $strength is set equal to soft than non check is made upon array values equalt to '' or null + public function checkIsStrings($associativeArray,$keyString,$strings = '',$strength = 'strong') + { + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + //get the array from the comma-separated list of strings + $stringsArray = explode(',',$strings); + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + if (strcmp($associativeArray[$keyArray[$i]],'') !== 0 or $strength === 'strong') + { + if (!in_array($associativeArray[$keyArray[$i]],$stringsArray)) + { + $numb++; + $errorString .= $this->_resultString->getIsNotStringResultString($keyArray[$i],$strings); + } + } + } + } + $this->errorString = $errorString; + return $numb === 0 ? true : false; + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) match the regular expression $regExp + public function checkMatch($associativeArray,$keyString,$regExp = '/./',$strength = 'strong') + { + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + if (strcmp($associativeArray[$keyArray[$i]],'') !== 0 or $strength === 'strong') + { + if (!preg_match($regExp,$associativeArray[$keyArray[$i]])) + { + $numb++; + $errorString .= $this->_resultString->getDoesntMatchResultString($keyArray[$i],$regExp); + } + } + } + } + $this->errorString = $errorString; + return $numb === 0 ? true : false; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Array/Validate/Soft.php b/h-source/Library/Array/Validate/Soft.php new file mode 100644 index 0000000..95e208d --- /dev/null +++ b/h-source/Library/Array/Validate/Soft.php @@ -0,0 +1,85 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to validate associative arrays +class Array_Validate_Soft extends Array_Validate_Base +{ + + public function __construct($lang = 'Eng') + { + parent::__construct($lang); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are not '' and are equal (===) to each other + public function checkEqual($associativeArray,$keyString) + { + return parent::checkEqual($associativeArray,$keyString); + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are alphabetic values + public function checkAlpha($associativeArray,$keyString) + { + return parent::checkAlpha($associativeArray,$keyString,'soft'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are alphanumeric values + public function checkAlphaNum($associativeArray,$keyString) + { + return parent::checkAlphaNum($associativeArray,$keyString,'soft'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are decimal digits + public function checkDigit($associativeArray,$keyString) + { + return parent::checkDigit($associativeArray,$keyString,'soft'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) have mail format + public function checkMail($associativeArray,$keyString) + { + return parent::checkMail($associativeArray,$keyString,'soft'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) is a number (integer or number). It makes use of the is_numeric PHP built-in function + public function checkNumeric($associativeArray,$keyString) + { + return parent::checkNumeric($associativeArray,$keyString,'soft'); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) have a number of chars smaller than $maxLenght + public function checkLength($associativeArray,$keyString,$maxLength = 10) + { + return parent::checkLength($associativeArray,$keyString,$maxLength); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are different from the values indicated in the argument $strings (a comma-separated list of words) + public function checkIsNotStrings($associativeArray,$keyString,$strings = '') + { + return parent::checkIsNotStrings($associativeArray,$keyString,$strings); + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are one of the values indicated in the argument $strings (a comma-separated list of words) + public function checkIsStrings($associativeArray,$keyString,$strings = '') + { + return parent::checkIsStrings($associativeArray,$keyString,$strings,'soft'); + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) match the regular expression $regExp + public function checkMatch($associativeArray,$keyString,$regExp = '/./') + { + return parent::checkMatch($associativeArray,$keyString,$regExp,'soft'); + } + +}
\ No newline at end of file diff --git a/h-source/Library/Array/Validate/Strong.php b/h-source/Library/Array/Validate/Strong.php new file mode 100644 index 0000000..6494483 --- /dev/null +++ b/h-source/Library/Array/Validate/Strong.php @@ -0,0 +1,180 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage arrays +class Array_Validate_Strong extends Array_Validate_Base +{ + + public function __construct($lang = 'Eng') + { + parent::__construct($lang); + } + + + public function checkNotEmpty($associativeArray,$keyString) + { + $errorString = null; + $keyArray = explode(',',$keyString); + $numb = 0; + for ($i = 0; $i < count($keyArray); $i++) + { + if (array_key_exists($keyArray[$i],$associativeArray)) + { + if (strcmp(trim($associativeArray[$keyArray[$i]]),'') === 0) + { + $errorString .= $this->_resultString->getNotDefinedResultString($keyArray[$i]); + $numb++; + } + } + else + { + $errorString .= $this->_resultString->getNotDefinedResultString($keyArray[$i]); + $numb++; + } + } + $this->errorString = $errorString; + $this->errorNumb = $numb; + return $numb === 0 ? true : false; + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are not '' and are equal (===) to each other + public function checkEqual($associativeArray,$keyString) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkEqual($associativeArray,$keyString); + + } else { + return false; + } + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are alphabetic values + public function checkAlpha($associativeArray,$keyString) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkAlpha($associativeArray,$keyString,'strong'); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are alphanumeric values + public function checkAlphaNum($associativeArray,$keyString) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkAlphaNum($associativeArray,$keyString,'strong'); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are decimal digits + public function checkDigit($associativeArray,$keyString) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkDigit($associativeArray,$keyString,'strong'); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) have mail format + public function checkMail($associativeArray,$keyString) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkMail($associativeArray,$keyString,'strong'); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) is a number (integer or number). It makes use of the is_numeric PHP built-in function + public function checkNumeric($associativeArray,$keyString) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkNumeric($associativeArray,$keyString,'strong'); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) have a number of chars smaller than $maxLenght + public function checkLength($associativeArray,$keyString,$maxLength = 10) + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkLength($associativeArray,$keyString,$maxLength); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are different from the values indicated in the argument $strings (a comma-separated list of words) + public function checkIsNotStrings($associativeArray,$keyString,$strings = '') + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkIsNotStrings($associativeArray,$keyString,$strings); + + } else { + return false; + } + } + + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) are one of the values indicated in the argument $strings (a comma-separated list of words) + public function checkIsStrings($associativeArray,$keyString,$strings = '') + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkIsStrings($associativeArray,$keyString,$strings,'strong'); + + } else { + return false; + } + } + + //verify that the values of the associative array ($associativeArray) indicated by the key string ($keyString) match the regular expression $regExp + public function checkMatch($associativeArray,$keyString,$regExp = '/./') + { + if ($this->checkNotEmpty($associativeArray,$keyString)) + { + + return parent::checkMatch($associativeArray,$keyString,$regExp,'strong'); + + } else { + return false; + } + } +}
\ No newline at end of file diff --git a/h-source/Library/Array/Validate/index.html b/h-source/Library/Array/Validate/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Array/Validate/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Array/index.html b/h-source/Library/Array/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Array/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/ArrayExt.php b/h-source/Library/ArrayExt.php new file mode 100755 index 0000000..93eca91 --- /dev/null +++ b/h-source/Library/ArrayExt.php @@ -0,0 +1,63 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage arrays +class ArrayExt { + + public $errorString = null; //string containing the list fields not found + public $errorsNumb = null; //numbers of errors + + //get the subset of the associative array $associativeArray defined by the keys in the string $keyString (keys separated by comma) + public function subset($associativeArray,$keyString,$func = 'none') { + if (!in_array($func,explode(',',Params::$allowedSanitizeFunc))) { + throw new Exception('"'.$func. '" argument not allowed in '.__METHOD__.' method'); + } + $tempArray = array(); + if (strcmp($keyString,'') !== 0) { + $keyArray=explode(',',$keyString); + for ($i = 0; $i < count($keyArray); $i++) + { + $temp = array(); + //extract the function after the colon + if (strstr($keyArray[$i],':')) { + $temp = explode(':',$keyArray[$i]); + } else { + $temp[0] = $keyArray[$i]; + $temp[1] = 'none'; + } + //exception + if (!in_array($temp[1],explode(',',Params::$allowedSanitizeFunc))) { + throw new Exception('"'.$temp[1]. '" function not allowed'); + } + if (array_key_exists($temp[0],$associativeArray)) { + $tempArray[$temp[0]] = call_user_func($temp[1],$associativeArray[$temp[0]]); + } else { + $tempArray[$temp[0]] = ''; + } + } + } + return call_user_func($func.'Deep',$tempArray); //clean the array values + } + + //exctract the complementary subset from an associative array ($associativeArray) of the subset identified by the keys $keyString + public function subsetComplementary($associativeArray,$keyString,$func = 'none') { + if (!in_array($func,explode(',',Params::$allowedSanitizeFunc))) { + throw new Exception('"'.$func. '" argument not allowed in '.__METHOD__.' method'); + } + $keyArray=explode(',',$keyString); + $complementaryKeyArray = array(); + $keys = array_keys($associativeArray); + foreach ($keys as $key) { + if (!in_array($key,$keyArray)) { + $complementaryKeyArray[] = $key; + } + } + $complementaryKeyString = implode(',',$complementaryKeyArray); + return $this->subset($associativeArray,$complementaryKeyString,$func); + } + +} diff --git a/h-source/Library/Bootstrap.php b/h-source/Library/Bootstrap.php new file mode 100755 index 0000000..796b22f --- /dev/null +++ b/h-source/Library/Bootstrap.php @@ -0,0 +1,14 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +require_once (ROOT . DS . 'Config' . DS . 'Reporting.php'); +require_once (ROOT . DS . 'Config' . DS . 'Restricted.php'); +require_once (ROOT . DS . 'Config' . DS . 'Autoload.php'); +require_once (ROOT . DS . 'Library' . DS . 'Functions.php'); +require_once (ROOT . DS . 'Library' . DS . 'Strings' . DS . 'Functions.php'); +require_once (ROOT . DS . 'Library' . DS . 'ErrorReporting.php'); +require_once (ROOT . DS . 'Library' . DS . 'Call.php'); diff --git a/h-source/Library/BoxParser.php b/h-source/Library/BoxParser.php new file mode 100644 index 0000000..90d2426 --- /dev/null +++ b/h-source/Library/BoxParser.php @@ -0,0 +1,69 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to parse an XML text in order to create the modules corresponding to the elements of the XML text. +//the <type>module name</type> tag defines the name of the object that has to be instantiate and saved in the +//$modules property (that is an array referencing different module objects) array(moduleObj1,moduleObj2, ...) +//if the module class corresponding ot the <type>module name</type> tag does not exists, than no module is created and the next <type>module name</type> is checked +class BoxParser { + + public $modules = array(); //array referencing different module classes --> array(moduleObj1,moduleObj2, ...) See files inside the Application/Modules folder + + //$simpleXMLText: it has to be an XML text + //$type; it can be string or file. + public function __construct($simpleXMLText, $type = 'string') + { + if ($type === 'string') + { + if (@simplexml_load_string($simpleXMLText)) + { + $simpleXmlObj = simplexml_load_string($simpleXMLText); + $this->populate($simpleXmlObj); + } + } + else if ($type === 'file') + { + if (@simplexml_load_file($simpleXMLText)) + { + $simpleXmlObj = simplexml_load_file($simpleXMLText); + $this->populate($simpleXmlObj); + } + } + } + + //inistantiate the module objects and save them in the $this->modules property array + private function populate($simpleXmlObj) + { + foreach ($simpleXmlObj as $mod) + { + $className = 'Mod'.ucwords((string)$mod->type); + if (class_exists($className)) + { + if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Modules' . DS . $className . '.php')) + { + $newModule = new $className($mod); + if ($newModule instanceof ModAbstract) + { + $this->modules[] = $newModule; + } + } + } + } + } + + //create the HTML of the modules + public function render() + { + $HTML = null; + foreach ($this->modules as $module) + { + $HTML .= $module->render(); + } + return $HTML; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Call.php b/h-source/Library/Call.php new file mode 100755 index 0000000..d80f1d4 --- /dev/null +++ b/h-source/Library/Call.php @@ -0,0 +1,321 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + +/* SANITIZE SUPERGLOBAL ARRAYS */ +function sanitizeSuperGlobal() +{ + $_GET = stripslashesDeep($_GET); + + $_POST = stripslashesDeep($_POST); + + $_COOKIE = stripslashesDeep($_COOKIE); + + $_SERVER = stripslashesDeep($_SERVER); +} + + + +function checkPostLength() +{ + if (MAX_POST_LENGTH !== 0) + { + foreach ($_POST as $key => $value) + { + if (strlen($value) > MAX_POST_LENGTH) die('the length of some of the $_POST values is too large'); + } + } +} + +function checkRequestUriLength() +{ + if (MAX_REQUEST_URI_LENGTH !== 0) + { + if (strlen($_SERVER['REQUEST_URI']) > MAX_REQUEST_URI_LENGTH) die('the length of the REQUEST_URI is too large'); + } +} + +function checkRegisterGlobals() +{ + if (ini_get('register_globals')) die('register globals is on: easyGiant works only with register globals off'); +} + +function callHook() +{ + + if (MOD_REWRITE_MODULE === true) + { + $url = isset($_GET['url']) ? $_GET['url'] : DEFAULT_CONTROLLER . '/' . DEFAULT_ACTION; + } + else + { + $url = (strcmp(getQueryString(),"") !== 0) ? getQueryString() : DEFAULT_CONTROLLER . '/' . DEFAULT_ACTION; + } + + //rewrite the URL +// if (Route::$rewrite === 'yes') +// { +// $url = rewrite($url); +// } + +// echo $url; + + $urlArray = array(); + $urlArray = explode("/",$url); + + $controller = DEFAULT_CONTROLLER; + $action = DEFAULT_ACTION; + + if (isset($urlArray[0])) + { + $controller = (strcmp($urlArray[0],'') !== 0) ? strtolower(trim($urlArray[0])) : DEFAULT_CONTROLLER; + } + + array_shift($urlArray); + + if (isset($urlArray[0])) + { + $action = (strcmp($urlArray[0],'') !== 0) ? strtolower(trim($urlArray[0])) : DEFAULT_ACTION; + } + + //set ERROR_CONTROLLER and ERROR_ACTION + $errorController = ERROR_CONTROLLER !== false ? ERROR_CONTROLLER : DEFAULT_CONTROLLER; + $errorAction = ERROR_ACTION !== false ? ERROR_ACTION : DEFAULT_ACTION; + + /* + VERIFY THE ACTION NAME + */ + if (method_exists('Controller', $action) or !ctype_alnum($action) or (strcmp($action,'') === 0)) + { + $controller = $errorController; + $action = $errorAction; + $urlArray = array(); + } + + /* + VERIFY THE CONTROLLER NAME + */ + if (!ctype_alnum($controller) or (strcmp($controller,'') === 0)) + { + $controller = $errorController; + $action = $errorAction; + $urlArray = array(); + } + + //check that the controller class belongs to the application/controllers folder + //otherwise set the controller to the default controller + if (!file_exists(ROOT.DS.APPLICATION_PATH.DS.'Controllers'.DS.ucwords($controller).'Controller.php')) + { + $controller = $errorController; + $action = $errorAction; + $urlArray = array(); + } + + //set the controller class to DEFAULT_CONTROLLER if it doesn't exists + if (!class_exists(ucwords($controller).'Controller')) + { + $controller = $errorController; + $action = $errorAction; + $urlArray = array(); + } + + //set the action to DEFAULT_ACTION if it doesn't exists + if (!method_exists(ucwords($controller).'Controller', $action)) + { + $controller = $errorController; + $action = $errorAction; + $urlArray = array(); + } + + /* + CHECK COUPLES CONTROLLER,ACTION + */ + if (!in_array('all',Route::$allowed)) + { + $couple = "$controller,$action"; + if (!in_array($couple,Route::$allowed)) + { + $controller = $errorController; + $action = $errorAction; + $urlArray = array(); + } + } + + array_shift($urlArray); + $queryString = $urlArray; + //set the name of the application + $application = $controller; + $controller = ucwords($controller); + $model = $controller; + $controller .= 'Controller'; + $model .= 'Model'; + + //include the file containing the set of actions to carry out before the initialization of the controller class + Hooks::load(ROOT . DS . APPLICATION_PATH . DS . 'Hooks' . DS . 'BeforeInitialization.php'); + + if (class_exists($controller)) + { + $dispatch = new $controller($model,$application,$queryString); + + //pass the action to the controller object + $dispatch->action = $action; + $dispatch->currPage = $dispatch->baseUrl.'/'.$dispatch->controller.'/'.$dispatch->action; + + //require the file containing the set of actions to carry out after the initialization of the controller class + Hooks::load(ROOT . DS . APPLICATION_PATH . DS . 'Hooks' . DS . 'AfterInitialization.php'); + + $templateFlag= true; + + if (method_exists($controller, $action)) + { + //pass the action to the theme object + $dispatch->theme->action = $action; + $dispatch->theme->currPage = $dispatch->baseUrl.'/'.$dispatch->controller.'/'.$dispatch->action; + + call_user_func_array(array($dispatch,$action),$queryString); + } + else + { + $templateFlag= false; + } + + if ($templateFlag) + { + $dispatch->theme->render(); + } + + } + else + { + echo "<h2>the '$controller' controller is not present!</h2>"; + } + +} + + +// //rewrite the URL +// function rewrite($url) +// { +// foreach (Route::$map as $key => $address) +// { +// if (preg_match('/^'.$key.'/',$url)) +// { +// return preg_replace('/^'.$key.'/',$address,$url); +// } +// } +// return ERROR_CONTROLLER.'/'.ERROR_ACTION; +// } + +function getQueryString() +{ + + if (strstr($_SERVER['REQUEST_URI'],'index.php/')) + { + return Params::$mbStringLoaded === true ? mb_substr(mb_strstr($_SERVER['REQUEST_URI'],'index.php/'),10) : substr(strstr($_SERVER['REQUEST_URI'],'index.php/'),10); + } + + return ''; +} + +function __autoload($className) +{ + + $backupName = $className; + + if (strstr($className,'_')) + { + $parts = explode('_',$className); + $className = implode(DS,$parts); + } + + if (file_exists(ROOT . DS . 'Library' . DS . $className . '.php')) + { + require_once(ROOT . DS . 'Library' . DS . $className . '.php'); + } + else if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Controllers' . DS . $backupName . '.php')) + { + require_once(ROOT . DS . APPLICATION_PATH . DS . 'Controllers' . DS . $backupName . '.php'); + } + else if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Models' . DS . $backupName . '.php')) + { + require_once(ROOT . DS . APPLICATION_PATH . DS . 'Models' . DS . $backupName . '.php'); + } + else if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Modules' . DS . $backupName . '.php')) + { + require_once(ROOT . DS . APPLICATION_PATH . DS . 'Modules' . DS . $backupName . '.php'); + } + else if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Strings' . DS . $className . '.php')) + { + require_once(ROOT . DS . APPLICATION_PATH . DS . 'Strings' . DS . $className . '.php'); + } + +} + +try { + + //check the length of the $_POST values + checkPostLength(); + + //check the length of the REQUEST_URI + checkRequestUriLength(); + + //connect to the database + Factory_Db::getInstance(DATABASE_TYPE,array(HOST,USER,PWD,DB)); + + //set htmlentities charset + switch (DEFAULT_CHARSET) + { + case 'SJIS': + Params::$htmlentititiesCharset = 'Shift_JIS'; + break; + } + + $allowedCharsets = array('UTF-8','ISO-8859-1','EUC-JP','SJIS'); + if (!in_array(DEFAULT_CHARSET,$allowedCharsets)) die('charset not-allowed'); + + //check if the mbstring extension is loaded + if (extension_loaded('mbstring')) + { + //set the internal encoding + mb_internal_encoding(DEFAULT_CHARSET); + Params::$mbStringLoaded = true; + } + + //load the files defined inside Config/Autoload.php + foreach (Autoload::$files as $file) + { + $ext = strtolower(end(explode('.', $file))); + $path = ROOT . DS . APPLICATION_PATH . DS . 'Include' . DS . $file; + if (file_exists($path) and $ext === 'php') + { + require_once($path); + } + } + + //include the file containing the set of actions to carry out before the check of the super global array + Hooks::load(ROOT . DS . APPLICATION_PATH . DS . 'Hooks' . DS . 'BeforeChecks.php'); + + //sanitize super global arrays + sanitizeSuperGlobal(); + + //report errors + ErrorReporting(); + + //verify that register globals is not active + checkRegisterGlobals(); + + //call the main hook + callHook(); + + //disconnect to the database + Factory_Db::disconnect(DATABASE_TYPE); + +} catch (Exception $e) { + + echo '<div class="alert">Message: '.$e->getMessage().'</div>'; + +}
\ No newline at end of file diff --git a/h-source/Library/Controller.php b/h-source/Library/Controller.php new file mode 100755 index 0000000..9ceaa5f --- /dev/null +++ b/h-source/Library/Controller.php @@ -0,0 +1,291 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Controller { + + protected $m = array(); //associative array referencing different models + protected $h = array(); //associative array referencing different helpers + protected $s = array(); //associative array referencing different sessions objects (users_checkAdmin objects: see library/users/checkAdmin.php) + protected $c = array(); //associative array referencing different controllers + + protected $_queryString = array(); //the array of args coming from the url + + public $controller; + public $action; + public $currPage; //the URL of the current page + + public $request = null; //reference to a Request object + + public $modelName; + + public $argKeys = array(); //the array of keys representing the status args of the view action of the controller (validate function after colon) + public $argDefault = array(); //the array containing the default values of the $viewArgs array + public $viewArgs = array(); //the associative array representing the status args of the main action of the controller. It is the combination of $argKeys and $queryString + public $viewStatus = ''; //string containing the additional url string to get the status of the view action of the controller (derived from $this->viewArgs) + + public $theme; + public $baseUrl = null; //the base url of the website: http://domainname + public $baseUrlSrc = null; //the base url of the website (http://domainname) if MOD_REWRITE_MODULE has been set to false + + public $headerObj; //reference to headerObj class + +// protected $_users; //object to manage access + + protected $scaffold = null; //the reference to the scaffold object + + function __construct($model, $controller, $queryString = array()) { + + $this->controller = $controller; + $this->modelName = $model; + $this->_queryString = $queryString; + + $this->theme = new Theme($controller); + $this->baseUrl = $this->theme->baseUrl; + $this->baseUrlSrc = $this->theme->baseUrlSrc; + + $this->headerObj = new HeaderObj(DOMAIN_NAME); + $this->request = new Request(); + } + + //redirect to $path after the time $time + final public function redirect($path,$time = 0,$string = null) + { + $this->headerObj->redirect($path,$time,$string); + } + + //set the $_data structure of the theme + final public function set($value) + { + $this->theme->set($value); + } + + //append values to the $_data structure of the theme + final public function append($value) + { + $this->theme->append($value); + } + + //load a view file + final public function load($viewFile,$option = 'none') { + $this->theme->load($viewFile,$option); + } + + //clean the array containing the view files to load + final public function clean() { + $this->theme->clean(); + } + + //load an helper class + final function helper($helperName) { + $args = func_get_args(); + array_shift($args); + $name = 'Helper_'.$helperName; + if (class_exists($name)) + { + $this->h[$helperName] = new $name(); + + if ($this->h[$helperName] instanceof Helper_Html) { + $this->h[$helperName]->viewArgs = $this->viewArgs; + $this->h[$helperName]->viewStatus = $this->viewStatus; + } + + if (method_exists($this->h[$helperName], 'build')) { + call_user_func_array(array($this->h[$helperName],'build'),$args); + } + } + + } + + //load a model class + //$name: the name of the model class + final public function model($name = null) { + $modelName = isset($name) ? $name : $this->modelName; + if (class_exists($modelName)) { + $this->m[$modelName] = new $modelName(); + } else { + throw new Exception('Error in '.__METHOD__.': class "'.$modelName.'" has not been defined'); + } + } + + //load a controller + //$controllerName: the name of the controller class to load + final public function controller($controller) + { + if (class_exists($controller)) { + $model = str_replace('Controller',null,$controller).'Model'; + $application = strtolower(str_replace('Controller',null,$controller)); + $this->c[$controller] = new $controller($model,$application,array()); + $this->c[$controller]->theme = $this->theme; + } + } + + //load a users_checkAdmin class + //$sessonType: the type of session. It can be 'admin' (in the case of the access of an admin user) or 'registered' (in the case of the access of a registerd user) + final public function session($sessionType = 'admin') { + $sessionTypeArray = array('admin','registered'); + if (!in_array($sessionType,$sessionTypeArray)) { + throw new Exception('Error in '.__METHOD__.': the session type can be \'admin\' or \'registered\' only'); + } + //admin session + if ($sessionType === 'admin') { + $params = array( + 'users_controller' => ADMIN_USERS_CONTROLLER, + 'users_login_action' => ADMIN_USERS_LOGIN_ACTION, + 'panel_controller' => ADMIN_PANEL_CONTROLLER, + 'panel_main_action' => ADMIN_PANEL_MAIN_ACTION, + 'cookie_name' => ADMIN_COOKIE_NAME, + 'sessionsTable' => ADMIN_SESSIONS_TABLE, + 'usersTable' => ADMIN_USERS_TABLE, + 'groupsTable' => ADMIN_GROUPS_TABLE, + 'manyToManyTable' => ADMIN_MANYTOMANY_TABLE, + 'accessesTable' => ADMIN_ACCESSES_TABLE, + 'session_expire' => ADMIN_SESSION_EXPIRE, + 'cookie_path' => ADMIN_COOKIE_PATH, + 'database_type' => DATABASE_TYPE, + 'hijacking_check' => ADMIN_HIJACKING_CHECK, + 'on_hijacking_event' => ADMIN_ON_HIJACKING_EVENT, + 'hijacking_action' => ADMIN_HIJACKING_ACTION, + 'time_after_failure' => ADMIN_TIME_AFTER_FAILURE, + 'password_hash' => PASSWORD_HASH, + 'cookie_domain' => ADMIN_COOKIE_DOMAIN, + 'cookie_secure' => ADMIN_COOKIE_SECURE + ); + $this->s['admin'] = new Users_CheckAdmin($params); + } + //registered session + if ($sessionType === 'registered') { + $params = array( + 'users_controller' => REG_USERS_CONTROLLER, + 'users_login_action' => REG_USERS_LOGIN_ACTION, + 'panel_controller' => REG_PANEL_CONTROLLER, + 'panel_main_action' => REG_PANEL_MAIN_ACTION, + 'cookie_name' => REG_COOKIE_NAME, + 'sessionsTable' => REG_SESSIONS_TABLE, + 'usersTable' => REG_USERS_TABLE, + 'groupsTable' => REG_GROUPS_TABLE, + 'manyToManyTable' => REG_MANYTOMANY_TABLE, + 'accessesTable' => REG_ACCESSES_TABLE, + 'session_expire' => REG_SESSION_EXPIRE, + 'cookie_path' => REG_COOKIE_PATH, + 'database_type' => DATABASE_TYPE, + 'hijacking_check' => REG_HIJACKING_CHECK, + 'on_hijacking_event' => REG_ON_HIJACKING_EVENT, + 'hijacking_action' => REG_HIJACKING_ACTION, + 'time_after_failure' => REG_TIME_AFTER_FAILURE, + 'password_hash' => PASSWORD_HASH, + 'cookie_domain' => REG_COOKIE_DOMAIN, + 'cookie_secure' => REG_COOKIE_SECURE + ); + $this->s['registered'] = new Users_CheckAdmin($params); + } + } + + //method to set $this->argKeys. Chenge the string in the array! + final public function setArgKeys($argKeys) { +// $this->argKeys = explode(',',$argKeys); + $this->argKeys = array_keys($argKeys); + $this->argDefault = array_values($argKeys); + } + + //shift the $this->_queryString array a number of times equal to the number indicated by the $number variable and build the $this->viewArgs array and the $this->viewStatus string (additional url) + final public function shift($number = 0) { + + //save the query string array + $oldQueryString = $this->_queryString; + + for ($i = 0; $i < $number; $i++) + { + array_shift($this->_queryString); + } + $this->callInArgKeysFunc(); + for ($i = 0; $i < count($this->argKeys); $i++) + { + if (!isset($this->_queryString[$i])) { + $this->viewArgs[$this->argKeys[$i]] = isset($this->argDefault[$i]) ? $this->argDefault[$i] : null; + continue; + } + $this->viewArgs[$this->argKeys[$i]] = $this->_queryString[$i]; + } + $this->viewStatus = Url::createUrl(array_values($this->viewArgs)); + $this->updateHelpers(); + + //update the theme + $this->theme->viewStatus = $this->viewStatus; + $this->theme->viewArgs = $this->viewArgs; + + //restore the query string array + $this->_queryString = $oldQueryString; + } + + //call the functions defined in $this->argKeys after the colon (ex- 'page:forceInt' => apply the forceInt() function upon the $page arg) + final public function callInArgKeysFunc() { + for ($i = 0; $i < count($this->argKeys); $i++) { + if (strstr($this->argKeys[$i],':')) { + $temp = explode(':',$this->argKeys[$i]); + //exception + if (!in_array($temp[1],explode(',',params::$allowedSanitizeFunc))) { + throw new Exception('"'.$temp[1]. '" function not allowed in $this->argKeys'); + } + $this->argKeys[$i] = $temp[0]; + if (!isset($this->_queryString[$i])) { + continue; + } + $this->_queryString[$i] = call_user_func($temp[1],$this->_queryString[$i]); + } + } + } + + //function to update all the Helper that are instance of the HtmlHelper class. This function update the $viesArgs and $viewStatus properties. This function is called by the shift method. + final public function updateHelpers() { + foreach ($this->h as $Helper) { + if ($Helper instanceof Helper_Html) { + $Helper->viewArgs = $this->viewArgs; + $Helper->viewStatus = $this->viewStatus; + } + } + } + + //create the viewStatus property + final public function buildStatus() + { + $this->viewStatus = Url::createUrl(array_values($this->viewArgs)); + //update the theme + $this->theme->viewStatus = $this->viewStatus; + $this->theme->viewArgs = $this->viewArgs; + } + + //method to instanciate the scaffold + final public function loadScaffold($type,$params = null) { + + $typeArray = array('main','form'); + if (!in_array($type,$typeArray)) { + throw new Exception("the type '$type' is not allowed in ".__METHOD__); + } + $this->scaffold = new Scaffold($type,$this->controller,$this->m[$this->modelName],$this->viewArgs,$params); + + $this->helper('Menu',$this->controller,$this->scaffold->params['panelController']); + $this->scaffold->mainMenu = $this->h['Menu']; + + $this->m[$this->modelName]->popupBuild(); + $popupArray = $this->m[$this->modelName]->popupArray; + + if ($type === 'main') { + + $here = $this->controller.'/'.$this->scaffold->params['mainAction']; + $this->helper('Pages',$here,$this->scaffold->params['pageVariable']); + $this->helper('List',$this->m[$this->modelName]->identifierName); + + + $this->helper('Popup',$here,$popupArray,$this->scaffold->params['popupType'],$this->scaffold->params['pageVariable']); + + $this->scaffold->pageList = $this->h['Pages']; + $this->scaffold->itemList = $this->h['List']; + $this->scaffold->popupMenu = $this->h['Popup']; + } + } + +}
\ No newline at end of file diff --git a/h-source/Library/Db/Mysql.php b/h-source/Library/Db/Mysql.php new file mode 100755 index 0000000..8b96f44 --- /dev/null +++ b/h-source/Library/Db/Mysql.php @@ -0,0 +1,394 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage the database +//singleton! +class Db_Mysql { + + public $query = null; //the last query executed + public $charsetError = true; //true: non eccor occurred during the modification of the connection charset, false: one error occurred + public $charset = null; //the charset of the client connection + + private static $instance = null; //instance of this class + + private $dblink; + private $fieldsType = array('tinyint','smallint','int','mediumint','bigint','float','double'); + /** + + *connect to the database + *'host','user','password','db_name' + + */ + + //PHP-Mysql charset translation table + private $charsetTranslationTable = array( + 'UTF-8' => 'utf8', + 'ISO-8859-1' => 'latin1', + 'EUC-JP' => 'ujis', + 'SJIS' => 'sjis' + ); + + private function __construct($host,$user,$pwd,$db_name) + { + + $this->dblink = mysql_connect($host,$user,$pwd); + + if ($this->dblink === FALSE) { + die ("Connection error. Verify parameters in config.php"); + } + + $db2 = mysql_select_db($db_name, $this->dblink) + or die ("Database selection error. Verify parameters in config.php"); + + $charset = array_key_exists(DEFAULT_CHARSET,$this->charsetTranslationTable) ? $this->charsetTranslationTable[DEFAULT_CHARSET] : 'utf8'; + + if (!@mysql_set_charset($charset,$this->dblink)) $this->charsetError = false; + + $this->charset = mysql_client_encoding(); + } + + public static function getInstance($host = null, $user = null, $pwd = null, $db_name = null) + { + if (!isset(self::$instance)) { + $className = __CLASS__; + self::$instance = new $className($host,$user,$pwd,$db_name); + } + + return self::$instance; + } + + + //close the connection + public function disconnect() + { + mysql_close($this->dblink); + } + + //the text of the error message from previous MySQL operation + public function getError() + { + return mysql_error($this->dblink); + } + + //the numerical value of the error message from previous MySQL operation + public function getErrno() + { + return mysql_errno($this->dblink); + } + + public function createSelectQuery($table,$fields='*',$where=null,$group_by=null,$order_by=null,$limit=null,$on=null,$using=null) + { + if (isset($where)) + { + $where='WHERE '.$where; + } + if (isset($using)) + { + $using ='USING ('.$using.')'; + $on = null; + } + if (isset($on) and !isset($using)) + { + $on='ON '.$on; + } + if (isset($order_by)) { + $order_by='ORDER BY '.$order_by; + } + if (isset($group_by)) { + $group_by='GROUP BY '.$group_by; + } + if (isset($limit)) { + $limit='LIMIT '.$limit; + } + + $query="SELECT $fields FROM $table $on $using $where $group_by $order_by $limit;"; + return $query; + } + + public function get_num_rows($table,$where=null,$group_by=null,$on=null,$using=null) { + + $query = $this->createSelectQuery($table,'*',$where,$group_by,null,null,$on,$using); + + $this->query=$query; + + $ris = mysql_query($query); + if ($ris) { + $num_rows = mysql_num_rows($ris); + return $num_rows; + } else { + return false; + } + } + + //get the maximum value of the field $field of the table $table having the $where conditions + public function getMath($func,$table,$field,$where=null,$group_by = null, $on=null,$using=null) + { + $query = $this->createSelectQuery($table,"$func($field) AS m",$where,$group_by,null,null,$on,$using); + + $this->query = $query; + $result = mysql_query($query); + if ($result) + { + $row = mysql_fetch_array($result); + return $row['m']; + } + else + { + return false; + } + } + + //get the maximum value of the field $field of the table $table having the $where conditions + public function getMax($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('MAX',$table,$field,$where,$group_by,$on,$using); + } + + //get the minimum value of the field $field of the table $table having the $where conditions + public function getMin($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('MIN',$table,$field,$where,$group_by,$on,$using); + } + + //get the sum of the fields + public function getSum($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('SUM',$table,$field,$where,$group_by,$on,$using); + } + + //get the average of the fields + public function getAvg($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('AVG',$table,$field,$where,$group_by,$on,$using); + } + + public function select($table,$fields='*',$where=null,$group_by=null,$order_by=null,$limit=null,$on=null,$using=null) + { + $query = $this->createSelectQuery($table,$fields,$where,$group_by,$order_by,$limit,$on,$using); + + $this->query = $query; + $result = mysql_query($query); + return $this->getData($result); + } + + +// public function select($table,$fields='*',$where=null,$group_by=null,$order_by=null,$limit=null) { +// $query = $this->selectQuery($table,$fields,$where,$group_by,$order_by,$limit); +// return $this->getData($query); +// } + + + //obtain an associative array containing the result values (keys:tableName_fieldsName) + //$par = 'single/multi' single table,multi table + public function getData($result) + { + $data = array(); //data from the query + $temp = array(); //temporary array (values of a single record) +// $result = mysql_query($query); + if ($result) + { + $fieldsNumber = mysql_num_fields($result); + while ($row = mysql_fetch_array($result)) + { + for ($i = 0;$i < $fieldsNumber;$i++) + { + $tableName = mysql_field_table($result, $i); + if (strcmp($tableName,'') === 0) $tableName = Params::$aggregateKey; + $fieldName = mysql_field_name($result, $i); + $temp[$tableName][$fieldName] = $row[$i]; + } + array_push($data,$temp); + } + return $data; + } + else + { + return false; + } + } + + //return an array containing all the types of the fields (indicated in $fields) of a table (indicated in $table) + public function getTypes($table, $fields) + { + $query = "DESCRIBE $table;"; + $result = mysql_query($query); + $temp = array(); + while ($row = mysql_fetch_assoc($result)) { + $temp[$row['Field']] = reset(explode('(',$row['Type'])); + } + + $types = array(); + $fields = explode(',',$fields); + for ($i = 0; $i < count($fields); $i++) + { + if (!array_key_exists($fields[$i],$temp)) return false; + $types[] = $temp[$fields[$i]]; + } + + return $types; + } + + public function insert($table,$fields,$values) { + + #$table is a string + #$fields has to be a string with comma as separator: name1,name2,... + #$values has to be an array + $values = array_values($values); + if (strcmp($fields,'') !== 0) + { + //get the type of the fields + $types = $this->getTypes($table,$fields); + if (!$types) return false; + + for($i = 0; $i < count($values); $i++) + { + if (!in_array($types[$i],$this->fieldsType)) + { + $values[$i] = '"'.$values[$i].'"'; + } + else + { + if (strcmp($values[$i],'') === 0) $values[$i] = '"'.$values[$i].'"'; + } + } + + $values = implode(',',$values); + $query="INSERT INTO $table ($fields) VALUES ($values);"; + $this->query = $query; + $ris = mysql_query($query); + + #check the result + if ($ris) { + return true; + } else { + return false; + } + + } else { + return false; + } + } + + // Retrieves the ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT). + public function lastId() + { + return mysql_insert_id(); + } + + public function update($table,$fields,$values,$where) { + + #$table and $where are two strings + #$fields has to be a string with comma as separator: name1,name2,... + #$values has to be an array + $values = array_values($values); +// if (isset($where)) { + $where='WHERE '.$where; +// } + #get the array from the $fields string + if (strcmp($fields,'') !== 0) + { + //get the type of the fields + $types = $this->getTypes($table,$fields); + if (!$types) return false; + + $fields=explode(',',$fields); + $str=array(); + + for ($i=0;$i<count($fields);$i++) { + if (!in_array($types[$i],$this->fieldsType)) + { + $values[$i] = '"'.$values[$i].'"'; + } + else + { + if (strcmp($values[$i],'') === 0) $values[$i] = '"'.$values[$i].'"'; + } + $str[$i]= $fields[$i].'='.$values[$i]; + } + + #set the string name1=value1,name2=... + $str=implode(',',$str); + $query="UPDATE $table SET $str $where;"; + $this->query=$query; + $ris = mysql_query($query); + + #check the result + if ($ris) { + return true; + } else { + return false; + } + } else { + return false; + } + + } + + + public function del($table,$where) { + + #$table and $where are two strings +// if (isset($where)) { + $where='WHERE '.$where; +// } + $query="DELETE FROM $table $where;"; + $this->query=$query; + $ris = mysql_query($query); + #check the result + + if ($ris) { + return true; + } else { + return false; + } + + } + + // function to check if exist the record having the field $id_name=$id_value + public function recordExists($table,$fieldName,$fieldValue,$where = null,$groupBy=null,$on=null,$using=null) + { + if (isset($where)) + { + $where=' AND '.$where; + } + + $fieldValue = '"'.$fieldValue.'"'; + + $num=$this->get_num_rows($table,$fieldName.'='.$fieldValue.$where,$groupBy,$on,$using); + $res=($num>0) ? true : false; + return $res; + + } + + + //send a generic query to the database + //$query: the query to be sent + public function query($query) + { + $this->query = $query; + $result = mysql_query($query); + if ($result === false) + { + return false; + } + else if ($result === true) + { + return true; + } + else if (@get_resource_type($result)) + { + return $this->getData($result); + } + } + + // Prevent users to clone the instance + public function __clone() + { + throw new Exception('error in '. __METHOD__.': clone is not allowed'); + } + +}
\ No newline at end of file diff --git a/h-source/Library/Db/Mysqli.php b/h-source/Library/Db/Mysqli.php new file mode 100644 index 0000000..4e4c528 --- /dev/null +++ b/h-source/Library/Db/Mysqli.php @@ -0,0 +1,400 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage the database +//singleton! +class Db_Mysqli +{ + + public $query = null; //the last query executed + public $charsetError = true; //true: non eccor occurred during the modification of the connection charset, false: one error occurred + public $charset = null; //the charset of the client connection + + private static $instance = null; //instance of this class + + private $db; + private $fieldsType = array('tinyint','smallint','int','mediumint','bigint','float','double'); + + //PHP-Mysql charset translation table + private $charsetTranslationTable = array( + 'UTF-8' => 'utf8', + 'ISO-8859-1' => 'latin1', + 'EUC-JP' => 'ujis', + 'SJIS' => 'sjis' + ); + + /** + + *connect to the database + *'host','user','password','db_name' + + */ + + private function __construct($host,$user,$pwd,$db_name) + { + + $this->db = new mysqli($host,$user,$pwd,$db_name); + + if (mysqli_connect_error()) + { + die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); + } + + $charset = array_key_exists(DEFAULT_CHARSET,$this->charsetTranslationTable) ? $this->charsetTranslationTable[DEFAULT_CHARSET] : 'utf8'; + + if (!@$this->db->set_charset($charset)) $this->charsetError = false; + + $this->charset = $this->db->character_set_name(); + + } + + //return the $this->db property + public function getDb() + { + return $this->db; + } + + public static function getInstance($host = null, $user = null, $pwd = null, $db_name = null) + { + if (!isset(self::$instance)) { + $className = __CLASS__; + self::$instance = new $className($host,$user,$pwd,$db_name); + } + + return self::$instance; + } + + + //close the connection + public function disconnect() + { + $this->db->close(); + } + + //the text of the error message from previous MySQL operation + public function getError() + { + return $this->db->error; + } + + //the numerical value of the error message from previous MySQL operation + public function getErrno() + { + return $this->db->errno; + } + + public function createSelectQuery($table,$fields='*',$where=null,$group_by=null,$order_by=null,$limit=null,$on=null,$using=null) + { + if (isset($where)) + { + $where='WHERE '.$where; + } + if (isset($using)) + { + $using ='USING ('.$using.')'; + $on = null; + } + if (isset($on) and !isset($using)) + { + $on='ON '.$on; + } + if (isset($order_by)) { + $order_by='ORDER BY '.$order_by; + } + if (isset($group_by)) { + $group_by='GROUP BY '.$group_by; + } + if (isset($limit)) { + $limit='LIMIT '.$limit; + } + + $query="SELECT $fields FROM $table $on $using $where $group_by $order_by $limit;"; + return $query; + } + + public function get_num_rows($table,$where=null,$group_by=null,$on=null,$using=null) { + + $query = $this->createSelectQuery($table,'*',$where,$group_by,null,null,$on,$using); + + $this->query = $query; + $ris = $this->db->query($query); + if ($ris) { + $num_rows = $ris->num_rows; + $ris->close(); + return $num_rows; + } else { + return false; + } + } + + public function getMath($func,$table,$field,$where=null,$group_by = null, $on=null,$using=null) + { + $query = $this->createSelectQuery($table,"$func($field) AS m",$where,$group_by,null,null,$on,$using); + + $this->query = $query; + $result = $this->db->query($query); + if ($result) + { + $row = $result->fetch_array(); + $result->close(); + return $row['m']; + } + else + { + return false; + } + } + + //get the maximum value of the field $field of the table $table having the $where conditions + public function getMax($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('MAX',$table,$field,$where,$group_by,$on,$using); + } + + //get the minimum value of the field $field of the table $table having the $where conditions + public function getMin($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('MIN',$table,$field,$where,$group_by,$on,$using); + } + + //get the sum of the fields + public function getSum($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('SUM',$table,$field,$where,$group_by,$on,$using); + } + + //get the average of the fields + public function getAvg($table,$field,$where=null,$group_by = null,$on=null,$using=null) + { + return $this->getMath('AVG',$table,$field,$where,$group_by,$on,$using); + } + + public function select($table,$fields='*',$where=null,$group_by=null,$order_by=null,$limit=null,$on=null,$using=null) + { + $query = $this->createSelectQuery($table,$fields,$where,$group_by,$order_by,$limit,$on,$using); + + $this->query = $query; + $result = $this->db->query($query); + return $this->getData($result); + } + + +// public function select($table,$fields='*',$where=null,$group_by=null,$order_by=null,$limit=null) { +// $query = $this->selectQuery($table,$fields,$where,$group_by,$order_by,$limit); +// return $this->getData($query); +// } + + + //obtain an associative array containing the result values (keys:tableName_fieldsName) + //$par = 'single/multi' single table,multi table + public function getData($result) { + $data = array(); //data from the query + $temp = array(); //temporary array (values of a single record) +// $result = $this->db->query($query); + if ($result) { + $fieldsNumber = $result->field_count; + while ($row = $result->fetch_array()) { + for ($i = 0;$i < $fieldsNumber;$i++) { + $finfo = $result->fetch_field_direct($i); + $tableName = $finfo->table; + if (strcmp($tableName,'') === 0) $tableName = Params::$aggregateKey; + $fieldName = $finfo->name; + $temp[$tableName][$fieldName] = $row[$i]; + } + array_push($data,$temp); + } + $result->close(); + return $data; + } else { + return false; + } + } + + //return an array containing all the types of the fields (indicated in $fields) of a table (indicated in $table) + public function getTypes($table, $fields) + { + $query = "DESCRIBE $table;"; + $result = $this->db->query($query); + $temp = array(); + while ($row = $result->fetch_assoc()) { + $temp[$row['Field']] = reset(explode('(',$row['Type'])); + } + $result->close(); + + $types = array(); + $fields = explode(',',$fields); + for ($i = 0; $i < count($fields); $i++) + { + if (!array_key_exists($fields[$i],$temp)) return false; + $types[] = $temp[$fields[$i]]; + } + + return $types; + } + + public function insert($table,$fields,$values) { + + #$table is a string + #$fields has to be a string with comma as separator: name1,name2,... + #$values has to be an array + $values = array_values($values); + if (strcmp($fields,'') !== 0) + { + //get the type of the fields + $types = $this->getTypes($table,$fields); + if (!$types) return false; + + for($i = 0; $i < count($values); $i++) + { + if (!in_array($types[$i],$this->fieldsType)) + { + $values[$i] = '"'.$values[$i].'"'; + } + else + { + if (strcmp($values[$i],'') === 0) $values[$i] = '"'.$values[$i].'"'; + } + } + + $values = implode(',',$values); + $query="INSERT INTO $table ($fields) VALUES ($values);"; + $this->query=$query; + + $ris = $this->db->query($query); + + #check the result + if ($ris) { + return true; + } else { + return false; + } + + } else { + return false; + } + } + + // Retrieves the ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT). + public function lastId() + { + return $this->db->insert_id; + } + + public function update($table,$fields,$values,$where) { + + #$table and $where are two strings + #$fields has to be a string with comma as separator: name1,name2,... + #$values has to be an array + $values = array_values($values); +// if (isset($where)) { + $where='WHERE '.$where; +// } + #get the array from the $fields string + if (strcmp($fields,'') !== 0) + { + //get the type of the fields + $types = $this->getTypes($table,$fields); + if (!$types) return false; + + $fields = explode(',',$fields); + $str = array(); + + for ($i=0;$i<count($fields);$i++) { + if (!in_array($types[$i],$this->fieldsType)) + { + $values[$i] = '"'.$values[$i].'"'; + } + else + { + if (strcmp($values[$i],'') === 0) $values[$i] = '"'.$values[$i].'"'; + } + $str[$i]= $fields[$i].'='.$values[$i]; + } + + #set the string name1=value1,name2=... + $str=implode(',',$str); + $query="UPDATE $table SET $str $where;"; + $this->query=$query; + $ris = $this->db->query($query); + + #check the result + if ($ris) { + return true; + } else { + return false; + } + } else { + return false; + } + + } + + + public function del($table,$where) { + + #$table and $where are two strings +// if (isset($where)) { + $where='WHERE '.$where; +// } + $query="DELETE FROM $table $where;"; + $this->query=$query; + $ris = $this->db->query($query); + #check the result + + if ($ris) { + return true; + } else { + return false; + } + + } + + + //function to check if exist the record having the field $id_name=$id_value + public function recordExists($table,$fieldName,$fieldValue,$where = null,$groupBy=null,$on=null,$using=null) + { + if (isset($where)) + { + $where=' AND '.$where; + } + + $fieldValue = '"'.$fieldValue.'"'; + + $num = $this->get_num_rows($table,$fieldName.'='.$fieldValue.$where,$groupBy,$on,$using); + $res=($num>0) ? true : false; + return $res; + + } + + + //send a generic query to the database + //$query: the query to be sent + public function query($query) + { + $this->query = $query; + $result = $this->db->query($query); + if ($result === true) + { + return true; + } + else if ($result === false) + { + return false; + } + else if ($result instanceof MySQLi_Result) + { + return $this->getData($result); + } + } + + // Prevent users to clone the instance + public function __clone() + { + throw new Exception('error in '. __METHOD__.': clone is not allowed'); + } + +}
\ No newline at end of file diff --git a/h-source/Library/Db/index.html b/h-source/Library/Db/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Db/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Email.php b/h-source/Library/Email.php new file mode 100644 index 0000000..c948098 --- /dev/null +++ b/h-source/Library/Email.php @@ -0,0 +1,229 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to send an e-mail +class Email { + + //sent to parameters (array) + private $_sendTo = array(); + + //cc parameters (array) + private $_cc = array(); + + //bcc parameters (array) + private $_bcc = array(); + + //the address of the sender + private $_from = null; + + //subject (string) + private $_subject = null; + + //charset + private $_charset = "iso-8859-1"; + + //Content-Transfer-Encoding + private $_ctencoding = "7bit"; + + //body + private $_body = ''; + + //headers + private $_headers = null; + + //check flag. If _check = true than check the mail addresses + private $_check = null; + + //regular expression to check each e-mail address + private $_addressRegExp = null; + + //array containing all the errors encountered during the execution + public $errorsArray = array(); + + public function __construct($bool = true) + { + $this->_check = $bool; + } + + //set the sentTo addresses array + //$addresses: array of e-mail addresses or a string + public function sendTo($addresses) + { + $this->_sendTo = explode(',',$addresses); + } + + //set the subject + public function subject($subject) + { + $this->_subject = $subject; + } + + //set the cc addresses array + //$addresses: array of e-mail addresses or a string + public function cc($addresses) + { + $this->_cc = explode(',',$addresses); + } + + //set the bcc addresses array + //$addresses: array of e-mail addresses or a string + public function bcc($addresses) + { + $this->_bcc = explode(',',$addresses); + } + + //set the address of the sender + public function from($address) + { + $this->_from = $address; + } + + //set the charset + public function charset($charset) + { + $this->_charset = $charset; + } + + //set the Content-Transfer-Encoding + public function ctencoding($ctencoding) + { + $this->_ctencoding = $ctencoding; + } + + //set the text body + public function body($body) + { + $this->_body = $body; + } + + //set the address regular expression + public function addressRegExp($regExp) + { + $this->_addressRegExp = $regExp; + } + + //check if the mail address is valid + public function isValidAddress($address) + { + + if( preg_match( '/^[^<>]*<(.+)>$/', $address, $matches ) ) + { + $address = $matches[1]; + } + + if (isset($this->_addressRegExp)) + { + if (preg_match($this->_addressRegExp,$address)) + { + return true; + } + else + { + return false; + } + } + else + { + if (checkMail($address)) return true; + } + + return false; + + } + + //check the addresses inside the $addresses array + public function checkAddresses($addresses) + { + foreach ($addresses as $address) + { + if(!$this->isValidAddress($address)) return false; + } + return true; + } + + //build the mail + public function buildMail() + { + + if (empty($this->_sendTo)) + { + $this->errorsArray[] = 'no address specified'; + return false; + } + + if ($this->_check) + { + if (!$this->checkAddresses($this->_sendTo)) + { + $this->errorsArray[] = 'errors in the sendTo address validation'; + return false; + } + + if (!empty($this->_cc)) + { + if (!$this->checkAddresses($this->_cc)) + { + $this->errorsArray[] = 'errors in the cc address validation'; + return false; + } + } + + if (!empty($this->_bcc)) + { + if (!$this->checkAddresses($this->_bcc)) + { + $this->errorsArray[] = 'errors in the bcc address validation'; + return false; + } + } + + if (isset($this->_from)) + { + if (!$this->checkAddresses(array($this->_from))) + { + $this->errorsArray[] = 'errors in the from address validation'; + return false; + } + } + } + + if (strcmp($this->_subject,'') === 0) + { + $this->errorsArray[] = 'no subject specified'; + return false; + } + + $headers = null; + if (isset($this->_from)) $headers .= "From: ".$this->_from."\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-Type: text/plain; charset=\"".$this->_charset."\"\r\n"; + $headers .= "Content-Transfer-Encoding: ".$this->_ctencoding."\r\n"; + if (!empty($this->_cc)) $headers .= "CC: ".implode(',',$this->_cc)."\r\n"; + if (!empty($this->_bcc)) $headers .= "Bcc: ".implode(',',$this->_bcc)."\r\n"; + + $this->_headers = $headers; + + return true; + + } + + public function send() + { + if (!$this->buildMail()) return false; + + $to = implode(',',$this->_sendTo); + + if (!@mail($to,$this->_subject,$this->_body,$this->_headers)) + { + $this->errorsArray[] = 'error in the send process'; + return false; + } + + return true; + } + +}
\ No newline at end of file diff --git a/h-source/Library/ErrorReporting.php b/h-source/Library/ErrorReporting.php new file mode 100644 index 0000000..bc541bc --- /dev/null +++ b/h-source/Library/ErrorReporting.php @@ -0,0 +1,25 @@ +<?php + +//function to set the error reporting parameters + +function ErrorReporting() { + if (RUNTIME_CONFIGURATION === true) + { + error_reporting(ERROR_REPORTING_DIRECTIVE); + if (DISPLAY_ERRORS === 'On') { + ini_set('display_errors','On'); + } else { + ini_set('display_errors','Off'); + } + + if (ERROR_REPORTING_FILE === true) + { + if (LOG_ERROR_FILE === 'default') + { + ini_set('error_log',ROOT.DS.'Logs/Errors.log'); + } else { + ini_set('error_log',LOG_ERROR_FILE); + } + } + } +} diff --git a/h-source/Library/Factory/Db.php b/h-source/Library/Factory/Db.php new file mode 100755 index 0000000..3a988dd --- /dev/null +++ b/h-source/Library/Factory/Db.php @@ -0,0 +1,52 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to create the database layer class +class Factory_Db { + + //start the database connection + //$dbType: mysql,mysqli,pg + //$dbArrayParams: array containing the HOST, the USER, the PWD, and the DB of the database (see config.php) + public static function getInstance($dbType,$dbArrayParams = array()) { + if (!in_array($dbType,Params::$allowedDb)) { + throw new Exception('error in ' . __METHOD__ . ' : the database type has to be '.implode(' or ',Params::$allowedDb)); + } + switch ($dbType) { + case 'Mysql': + return call_user_func_array(array('Db_'.$dbType,'getInstance'),$dbArrayParams); + break; + case 'Mysqli': + return call_user_func_array(array('Db_'.$dbType,'getInstance'),$dbArrayParams); + break; + case 'None': + return null; + break; + } + } + + //close the database connection + public static function disconnect($dbType) + { + if (!in_array($dbType,Params::$allowedDb)) { + throw new Exception('error in ' . __METHOD__ . ' : the database type has to be '.implode(' or ',Params::$allowedDb)); + } + switch ($dbType) { + case 'Mysql': + $mysql = Db_Mysql::getInstance(); + $mysql->disconnect(); + break; + case 'Mysqli': + $mysqli = Db_Mysqli::getInstance(); + $mysqli->disconnect(); + break; + case 'None': + return null; + break; + } + } + +} diff --git a/h-source/Library/Factory/index.html b/h-source/Library/Factory/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Factory/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Files/Log.php b/h-source/Library/Files/Log.php new file mode 100644 index 0000000..895c26d --- /dev/null +++ b/h-source/Library/Files/Log.php @@ -0,0 +1,97 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage a file di log +//this is a singleton class +class Files_Log +{ + + const DS = DIRECTORY_SEPARATOR; + + // array of instances of the class + //key: name of the instance, value:instance. The name of the instance is also the name of the log file to open + private static $instance = array(); + + public static $logFolder = './'; //the log folder + public static $logExtension = '.log'; //the extension of the log files + public static $logPermission = 0777; + + private $splFile; //SplFileObject + + //$fileName: the file to open + private function __construct($fileName) + { + $finalChar = self::$logFolder[strlen(self::$logFolder) - 1]; + if (strcmp($finalChar,self::DS) !== 0) self::$logFolder .= self::DS; + + $path = self::$logFolder . $fileName . self::$logExtension; + $this->splFile = new SplFileObject($path,'a+'); + //change the permission of the file + @chmod($path,self::$logPermission); + } + + // The singleton method + // $instanceName: name of the key of self::$instance. It is also the name of the log file to open + public static function getInstance($instanceName) + { + if (!isset(self::$instance[$instanceName])) { + $className = __CLASS__; + self::$instance[$instanceName] = new $className($instanceName); + } + + return self::$instance[$instanceName]; + } + + //write the string $string at the end of the file + public function writeString($string,$format = 'Y-m-d H:i:s') + { + $date = date($format); + $this->splFile->fwrite("[$date]\t".$string."\n"); + } + + //get the date string of the line $line + public function getDateString($line) + { + if (preg_match('/^[\[]{1}([a-zA-Z0-9:\-\s])*[\]]{1}/',$line,$match)) + { + $match[0] = str_replace('[',null,$match[0]); + $match[0] = str_replace(']',null,$match[0]); + return $match[0]; + } + else + { + return false; + } + } + + //delete all the lines older than a number of days equal to $days + public function clearBefore($days = 30) + { + $tempArray = array(); + $newTime = time() - (int)$days * 24 * 3600; + foreach ($this->splFile as $line) + { + $lineTime = strtotime($this->getDateString($line)); + if ($lineTime !== false and $lineTime > $newTime) + { + $tempArray[] = $line; + } + } + $this->splFile->ftruncate(0); + foreach ($tempArray as $row) + { + $this->splFile->fwrite($row); + } + } + + // Prevent users to clone the instance + public function __clone() + { + throw new Exception('error in '. __METHOD__.': clone is not allowed'); + } + +}
\ No newline at end of file diff --git a/h-source/Library/Files/Upload.php b/h-source/Library/Files/Upload.php new file mode 100755 index 0000000..47289fd --- /dev/null +++ b/h-source/Library/Files/Upload.php @@ -0,0 +1,451 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage upload files +class Files_Upload +{ + + const DS = DIRECTORY_SEPARATOR; + + private $base = null; //root directory + private $directory = null; //current directory. Path relative to the base directory (Files_Upload::base) + private $parentDir = null; //parent folder + private $subDir = array(); //subdirectories of the current directory + private $relSubDir = array(); //subfolders of $this->directory. The path starts from the $base folder + private $files = array(); //files inside the current directory + private $relFiles = array(); //files inside $this->directory. The path starts from the $base directory + private $params; //class parameters + private $pattern = null; //the pattern for the preg_match function + + protected $_resultString; //reference to the class uploadStrings containing all the result strings + + public $fileName = null; //the name of the last file that has been uploaded + public $notice = null; //the result string of the operation + + public function __construct($base,$params = null, $directory = null) { + + $this->base = $this->addTrailingSlash($base); + + //set the match pattern + $tmp = str_replace(self::DS,'\\'.self::DS,$this->base); + $this->pattern = "/^(".$tmp.")/"; + + $defaultParams = array( + 'filesPermission'=>0777, + 'delFolderAction'=>'delFolderAction', + 'delFileAction'=>'delFileAction', + 'createFolderAction'=>'createFolderAction', + 'uploadFileAction'=>'uploadFileAction', + 'maxFileSize' => 3000000, + 'language' => 'eng', + 'allowedExtensions'=>'jpg,jpeg,png,gif,txt', + 'fileUploadKey' => 'userfile' + ); + + //set the $this->scaffold->params array + if (is_array($params)) + { + foreach ($params as $key => $value) + { + $defaultParams[$key] = $value; + } + } + $this->params = $defaultParams; + + //instantiate the $_resultString object + $stringClass = 'Lang_'.$this->params['language'].'_UploadStrings'; + if (!class_exists($stringClass)) + { + $stringClass = 'Lang_Eng_UploadStrings'; + } + $this->_resultString = new $stringClass(); + + $this->setDirectory($directory); + + } + + //obtain the current directory + public function setDirectory($directory = null) + { + $relDir = (strcmp($directory,"") !== 0) ? $this->addTrailingSlash($directory) : null; + $absDir = $this->addTrailingSlash($this->base.$directory); + + if (is_dir($absDir)) + { + if ($this->isValidFolder($absDir)) + { + $this->directory = $relDir; + return true; + } + else + { + $this->notice = $this->_resultString->getString('not-child'); + } + } + else + { + $this->directory = null; + $this->notice = $this->_resultString->getString('not-dir'); + } + return false; + } + + //check if $folder is a folder and is subfolder of $this->base + protected function isValidFolder($folder) + { + if (is_dir($folder)) + { + $folder = $this->addTrailingSlash(realpath($folder)); + if ($this->isMatching($folder)) return true; + } + return false; + } + + protected function isMatching($path) + { + if (preg_match($this->pattern,$path)) + { + if (strstr($path,'..')) return false; + return true; + } + return false; + } + + public function getDirectory() { + return $this->directory; + } + + public function getBase() + { + return $this->base; + } + + public function getSubDir() { + return $this->subDir; + } + + public function getRelSubDir() + { + return $this->relSubDir; + } + + public function getFiles() { + return $this->files; + } + + public function getRelFiles() + { + return $this->relFiles; + } + + public function getParentDir() { + return $this->parentDir; + } + + //add the trailing slash to the string + protected function addTrailingSlash($string) + { + $finalChar = $string[strlen($string) - 1]; + if (strcmp($finalChar,self::DS) !== 0) + { + return $string.self::DS; + } + return $string; + } + + protected function urlDeep($dir) { #funzione per creare l'indirizzo completo della cartella all'interno della quale voglio entrare + #$dir:cartella all'interno della quale voglio entrare + return $this->base.$this->directory.$dir.self::DS; + } + + public function listFiles() { #creo la lista di file e cartelle all'interno della directory corrente + $items = scandir($this->base.$this->directory); + foreach( $items as $this_file ) { + if( strcmp($this_file,".") !== 0 && strcmp($this_file,"..") !== 0 ) { + if (is_dir($this->urlDeep($this_file))) { + $this->subDir[] = $this_file; + $this->relSubDir[] = $this->directory.$this_file; + } else { + $this->files[] = $this_file; + $this->relFiles[] = $this->directory.$this_file; + } + } + } + //get the parent dir + $this->parentDir(); + } + + //get the extension of the file + protected function getFileExtension($file) + { + return strtolower(end(explode('.', $file))); + } + + protected function parentDir() { #individuo la cartella madre + + $folders = explode(self::DS,$this->directory); + array_pop($folders); + array_pop($folders); + $parent = implode(self::DS,$folders); + $parent = (strcmp($parent,"") !== 0) ? $this->addTrailingSlash($parent) : null; + + if ($this->isValidFolder($this->base.$parent)) + { + $this->parentDir = $parent; + } + else + { + $this->parentDir = null; + } + } + + //create the $name subfolder of the $this->directory folder + public function createFolder($name) { #funzione per creare una cartella nella directory corrente + $name = basename($name); + if (strcmp(trim($name),'') !== 0) + { + if (is_writable($this->base.$this->directory)) + { + $path = $this->base.$this->directory.$name; + + if ($this->isMatching($path)) + { + if (!file_exists($path)) + { + if (@mkdir($path,$this->params['filesPermission'])) + { + @chmod($path, $this->params['filesPermission']); + $this->notice = $this->_resultString->getString('executed'); + return true; + } + else + { + $this->notice = $this->_resultString->getString('error'); + } + } + else + { + $this->notice = $this->_resultString->getString('dir-exists'); + } + } + else + { + $this->notice = $this->_resultString->getString('not-child'); + } + } + else + { + $this->notice = $this->_resultString->getString('not-writable'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-folder-specified'); + } + return false; + } + + //check if the $name folder is empty or not + protected function isEmpty($name) + { + $items = scandir($name); + foreach( $items as $this_file ) { + if( strcmp($this_file,".") !== 0 && strcmp($this_file,"..") !== 0 ) { + return false; + } + } + return true; + } + + public function removeFile($name) + { + $name = basename($name); + if (strcmp(trim($name),'') !== 0) + { + $path = $this->base.$this->directory.$name; + if ($this->isMatching($path)) + { + if ($this->removeAbsFile($path)) return true; + } + else + { + $this->notice = $this->_resultString->getString('not-child'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-file-specified'); + } + return false; + } + + //remove the $name file + protected function removeAbsFile($name) + { + if (strcmp(trim($name),'') !== 0) + { + if (is_writable($name)) + { + if (@unlink($name)) + { + $this->notice = $this->_resultString->getString('executed'); + return true; + } + else + { + $this->notice = $this->_resultString->getString('error'); + } + } + else + { + $this->notice = $this->_resultString->getString('not-writable-file'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-file-specified'); + } + return false; + } + + public function removeFolder($name) + { + $name = basename($name); + if (strcmp(trim($name),'') !== 0) + { + $dir = $this->base.$this->directory.$name; + if ($this->isMatching($dir)) + { + if ($this->removeAbsFolder($dir)) return true; + } + else + { + $this->notice = $this->_resultString->getString('not-child'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-folder-specified'); + } + return false; + } + + //remove the $name folder + protected function removeAbsFolder($name) { + if (strcmp(trim($name),'') !== 0) { + if (is_writable($name)) + { + if ($this->isEmpty($name)) + { + if (@rmdir($name)) + { + $this->notice = $this->_resultString->getString('executed'); + return true; + } + else + { + $this->notice = $this->_resultString->getString('error'); + } + } + else + { + $this->notice = $this->_resultString->getString('not-empty'); + } + } + else + { + $this->notice = $this->_resultString->getString('not-writable'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-folder-specified'); + } + return false; + } + + //upload a file in the current directory + //$fileName: name of the file + public function uploadFile($fileName = null) { + $userfile = $this->params['fileUploadKey']; + $ext = $this->getFileExtension($_FILES[$userfile]["name"]); + $fileName = isset($fileName) ? $fileName.".$ext" : basename($_FILES[$userfile]["name"]); + + $this->fileName = $fileName; + + if(strcmp(trim($_FILES[$userfile]["name"]),"") !== 0) + { + if(@is_uploaded_file($_FILES[$userfile]["tmp_name"])) { + if ($_FILES[$userfile]["size"] <= $this->params['maxFileSize']) + { + //check the extension of the file + $AllowedExtensionsArray = explode(',',$this->params['allowedExtensions']); + + if (in_array($ext,$AllowedExtensionsArray)) + { + //check if the file doesn't exists + if (!file_exists($this->base.$this->directory.$fileName)) + { + if (@move_uploaded_file($_FILES[$userfile]["tmp_name"],$this->base.$this->directory.$fileName)) + { + @chmod($this->base.$this->directory.$fileName, $this->params['filesPermission']); + $this->notice = $this->_resultString->getString('executed'); + return true; + } + else + { + $this->notice = $this->_resultString->getString('error'); + } + } + else + { + $this->notice = $this->_resultString->getString('file-exists'); + } + } + else + { + $this->notice = $this->_resultString->getString('not-allowed-ext'); + } + } + else + { + $this->notice = $this->_resultString->getString('size-over'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-upload-file'); + } + } + else + { + $this->notice = $this->_resultString->getString('no-upload-file'); + } + return false; + } + + //update the folder tree + public function updateTree() { + + if (isset($_POST[$this->params['delFolderAction']])) { + $this->removeFolder($_POST[$this->params['delFolderAction']]); + } + + if (isset($_POST[$this->params['delFileAction']])) { + $this->removeFile($_POST[$this->params['delFileAction']]); + } + + if (isset($_POST[$this->params['createFolderAction']])) { + $this->createFolder($_POST['folderName']); + } + + if (isset($_POST[$this->params['uploadFileAction']])) { + $this->uploadFile(); + } + + } +}
\ No newline at end of file diff --git a/h-source/Library/Files/index.html b/h-source/Library/Files/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Files/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Form/Checkbox.php b/h-source/Library/Form/Checkbox.php new file mode 100755 index 0000000..5df1917 --- /dev/null +++ b/h-source/Library/Form/Checkbox.php @@ -0,0 +1,41 @@ +<?php + +/** + * EasyGiant + * + * LICENSE + * + * All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * See COPYRIGHT.txt and LICENSE.txt. + * + * @package EasyGiant + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License version 3 or any later version + */ + +if (!defined('EG')) die('Direct access not allowed!'); + +/** create the HTML of an input text entry */ +class Form_Checkbox extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements(); + $returnString = "<div class='".$this->getEntryClass()."'>\n\t"; + $returnString .= $wrap[0]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[1]; + $returnString .= Html_Form::checkbox($this->entryName, $value, $this->options, $this->className,$this->idName); + $returnString .= $wrap[2]; + $returnString .="</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/Entry.php b/h-source/Library/Form/Entry.php new file mode 100755 index 0000000..725235a --- /dev/null +++ b/h-source/Library/Form/Entry.php @@ -0,0 +1,45 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//base class of the form entries +abstract class Form_Entry { + + public $entryName = null; //the name of the entry + public $entryClass = null; //the class of the entry + public $idName = null; //the id of the input entry + public $className = null; //the class of the input entry + public $labelString = null; //label of the form + public $labelClass = null; //the class of the tag of the label + public $options = array(); //options (if the entry is a <select> entry or a radio button). Associative array or comma-divided list. + public $defaultValue = ''; + public $wrap = array(); + public $type = null; //the type of the entry + + //create the label of each entry of the form + public function getLabelTag() + { + $labelTagClass = isset($this->labelClass) ? $this->labelClass : 'entryLabel'; + return isset($this->labelString) ? "<label class='$labelTagClass'>".$this->labelString."</label>\n\t" : null; + } + + //get the class of the entry + public function getEntryClass() + { + return isset($this->entryClass) ? $this->entryClass : 'formEntry'; + } + + public function getWrapElements() + { + $wrap[0] = isset($this->wrap[0]) ? $this->wrap[0] : null; + $wrap[1] = isset($this->wrap[1]) ? $this->wrap[1] : null; + $wrap[2] = isset($this->wrap[2]) ? $this->wrap[2] : null; + return $wrap; + } + + abstract public function render($value = null); + +} diff --git a/h-source/Library/Form/Form.php b/h-source/Library/Form/Form.php new file mode 100755 index 0000000..00e27d4 --- /dev/null +++ b/h-source/Library/Form/Form.php @@ -0,0 +1,116 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of the whole form +class Form_Form { + + public $entry = array(); //associative array containing the entries of the form (objects that inherit the class form_entryModel). Each element of the array corresponds to one field of the table + + public $action = null; //the action of the form + public $name = null; //the name of the form + public $className = 'formClass'; //the class of the form + public $id = null; + public $submit = array(); //the submit entries array('name'=>'value') + public $method = 'POST'; //the transmission method: POST/GET + + public function __construct($action,$submit = array('generalAction'=>'save'),$method = 'POST') + { + $this->action = $action; //action of the form: controller/action + $this->submit = $submit; + $this->method = $method; + } + + //method to manage the $this->entry associative array + //entryType: the type of the object to be initialized, $entryName: the name of the entry + //$options: the list of options (if the entry is a <select> entry) + public function setEntry($entryName,$entryType,$options = null) + { + $entryObjName = 'Form_'.$entryType; + if (!class_exists($entryObjName)) + { + throw new Exception("class <b>$entryObjName</b> not defined: the entry <b>$entryName</b> can't be set"); + } + $this->entry[$entryName] = new $entryObjName($entryName); + $this->entry[$entryName]->labelString = $entryName.':'; + //set the type + $this->entry[$entryName]->type = $entryType; + if (isset($options)) + { + $this->entry[$entryName]->options = $options; + } + } + + //set all the entries + //$entryStruct : the struct of the entries + public function setEntries($entryStruct = array()) + { + foreach ($entryStruct as $name => $entry) + { + $type = array_key_exists('type',$entry) ? $entry['type'] : 'InputText'; + $options = array_key_exists('options',$entry) ? $entry['options'] : null; + $this->setEntry($name,$type,$options); + + $entryClass = array_key_exists('entryClass',$entry) ? $entry['entryClass'] : null; + $labelString = array_key_exists('labelString',$entry) ? $entry['labelString'] : "$name:"; + $idName = array_key_exists('idName',$entry) ? $entry['idName'] : null; + $className = array_key_exists('className',$entry) ? $entry['className'] : null; + $labelClass = array_key_exists('labelClass',$entry) ? $entry['labelClass'] : null; + $defaultValue = array_key_exists('defaultValue',$entry) ? $entry['defaultValue'] : null; + $wrap = array_key_exists('wrap',$entry) ? $entry['wrap'] : array(); + + $this->entry[$name]->entryClass = $entryClass; + $this->entry[$name]->labelString = $labelString; + $this->entry[$name]->idName = $idName; + $this->entry[$name]->className = $className; + $this->entry[$name]->labelClass = $labelClass; + $this->entry[$name]->defaultValue = $defaultValue; + $this->entry[$name]->wrap = $wrap; + } + } + + //function to create the HTML of the form + //$values: an associative array ('entryName'=>'value') + //$subset: subset to print + public function render($values = null, $subset = null) + { + + if ($values === null) + { + $values = array(); + foreach ($this->entry as $key => $value) + { + $values[$key] = $value->defaultValue; + } + } + + $fid = isset($this->id) ? "id='".$this->id."'" : null; + $fname = isset($this->name) ? "name='".$this->name."'" : null; + $fclass = isset($this->className) ? "class='".$this->className."'" : null; + $htmlForm = "<form $fname $fclass $fid action='".Url::getRoot($this->action)."' method='".$this->method."'>\n"; + + $subset = (isset($subset)) ? explode(',',$subset) : array_keys($values); + + foreach ($subset as $entry) + { + + if (array_key_exists($entry,$this->entry)) + { + $value = array_key_exists($entry,$values) ? $values[$entry] : $this->entry[$entry]->defaultValue; + $htmlForm .= $this->entry[$entry]->render($value); + } + + } + + foreach ($this->submit as $name => $value) + { + $htmlForm .= "<div class='inputEntry'>\n<input id='".$name."' type='submit' name='$name' value='$value'>\n</div>\n"; + } + $htmlForm .= "</form>\n"; + return $htmlForm; + } + +} diff --git a/h-source/Library/Form/Hidden.php b/h-source/Library/Form/Hidden.php new file mode 100755 index 0000000..fb81b30 --- /dev/null +++ b/h-source/Library/Form/Hidden.php @@ -0,0 +1,23 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of an input hidden entry +class Form_Hidden extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $returnString = Html_Form::hidden($this->entryName, $value); + return $returnString; + } + +} diff --git a/h-source/Library/Form/Html.php b/h-source/Library/Form/Html.php new file mode 100644 index 0000000..dce91c6 --- /dev/null +++ b/h-source/Library/Form/Html.php @@ -0,0 +1,23 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of an input text entry +class Form_Html extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $returnString = "<div class='".$this->getEntryClass()."'>\n\t$value\n</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/InputText.php b/h-source/Library/Form/InputText.php new file mode 100755 index 0000000..fb98336 --- /dev/null +++ b/h-source/Library/Form/InputText.php @@ -0,0 +1,30 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of an input text entry +class Form_InputText extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements(); + $returnString = "<div class='".$this->getEntryClass()."'>\n\t"; + $returnString .= $wrap[0]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[1]; + $returnString .= Html_Form::input($this->entryName, $value, $this->className, $this->idName); + $returnString .= $wrap[2]; + $returnString .="</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/Password.php b/h-source/Library/Form/Password.php new file mode 100644 index 0000000..76bc735 --- /dev/null +++ b/h-source/Library/Form/Password.php @@ -0,0 +1,30 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of an input text entry +class Form_Password extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements(); + $returnString = "<div class='".$this->getEntryClass()."'>\n\t"; + $returnString .= $wrap[0]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[1]; + $returnString .= Html_Form::password($this->entryName, null, $this->className); + $returnString .= $wrap[2]; + $returnString .="</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/Radio.php b/h-source/Library/Form/Radio.php new file mode 100755 index 0000000..fb20677 --- /dev/null +++ b/h-source/Library/Form/Radio.php @@ -0,0 +1,30 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of a radio entry +class Form_Radio extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements(); + $returnString = "<div class='".$this->getEntryClass()."'>\n\t"; + $returnString .= $wrap[0]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[1]; + $returnString .= Html_Form::radio($this->entryName,$value,$this->options,$this->className, 'after', $this->idName); + $returnString .= $wrap[2]; + $returnString .="</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/Select.php b/h-source/Library/Form/Select.php new file mode 100755 index 0000000..558fd57 --- /dev/null +++ b/h-source/Library/Form/Select.php @@ -0,0 +1,30 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of an select entry +class Form_Select extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements(); + $returnString = "<div class='".$this->getEntryClass()."'>\n\t"; + $returnString .= $wrap[0]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[1]; + $returnString .= Html_Form::select($this->entryName,$value,$this->options,$this->className, $this->idName); + $returnString .= $wrap[2]; + $returnString .="</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/Textarea.php b/h-source/Library/Form/Textarea.php new file mode 100755 index 0000000..d81cc84 --- /dev/null +++ b/h-source/Library/Form/Textarea.php @@ -0,0 +1,30 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of a textarea entry +class Form_Textarea extends Form_Entry +{ + + public function __construct($entryName = null) + { + $this->entryName = $entryName; + } + + public function render($value = null) + { + $wrap = $this->getWrapElements(); + $returnString = "<div class='".$this->getEntryClass()."'>\n\t"; + $returnString .= $wrap[0]; + $returnString .= $this->getLabelTag(); + $returnString .= $wrap[1]; + $returnString .= Html_Form::textarea($this->entryName, $value, $this->className, $this->idName); + $returnString .= $wrap[2]; + $returnString .="</div>\n"; + return $returnString; + } + +} diff --git a/h-source/Library/Form/index.html b/h-source/Library/Form/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Form/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Functions.php b/h-source/Library/Functions.php new file mode 100755 index 0000000..414770f --- /dev/null +++ b/h-source/Library/Functions.php @@ -0,0 +1,279 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + +/* + SANITIZE FUNCTIONS +*/ + +function none($string) { + return $string; +} + +function forceInt($string) { + return (int)$string; +} + +function forceNat($string) +{ + $string = (int)$string; + if ($string <= 0) return 1; + return $string; +} + +function sanitizeDb($stringa) { + + if (DATABASE_TYPE === 'Mysql') + { + $stringa = mysql_real_escape_string($stringa); + return $stringa; + } + + if (DATABASE_TYPE === 'Mysqli') + { + $mysqli = Db_Mysqli::getInstance(); + $db = $mysqli->getDb(); + $stringa = $db->real_escape_string($stringa); + return $stringa; + } + + return $stringa; +} + +function sanitizeAll($stringa) { + + $stringa=sanitizeHtml($stringa); + $stringa=sanitizeDb($stringa); + return $stringa; + +} + +function sanitizeHtml($stringa) { + + $charset = Params::$htmlentititiesCharset; + $stringa=htmlentities($stringa,ENT_QUOTES,$charset); + return $stringa; + +} + +//check if only alphabetic + optional characters are present in the string $string. Set $string to $altString if other characters are found +//$optChar: allowed characters divided by '|' Ex: '+|-|;' +function sanitizeCustom($string,$optChar,$altString = 'EasyGiant') +{ + + $optChar = html_entity_decode($optChar,ENT_QUOTES); + $optCharArray = explode('|',$optChar); + $temp = $string; + foreach($optCharArray as $char) + { + $temp = str_replace($char,null,$temp); + } + if (ctype_alnum($temp)) + { + return $string; + } + else + { + return $altString; + } +} + + + + +/* +SANITIZE DEEP +*/ + +function stripslashesDeep($value) { + if(get_magic_quotes_gpc()) {#if stripslashes + return array_map('stripslashes', $value); + } + return $value; +} + + +function sanitizeHtmlDeep($value) { + return array_map('sanitizeHtml', $value); +} + + +function sanitizeDbDeep($value) { + return array_map('sanitizeDb', $value); +} + + +function sanitizeCustomDeep($stringArray,$optChar,$altString = 'EasyGiant') +{ + $result = array(); + foreach ($stringArray as $key => $value) + { + $result[$key] = sanitizeCustom($value,$optChar,$altString); + } + return $result; +} + + +function sanitizeAllDeep($value) { + return array_map('sanitizeAll', $value); +} + + +function forceIntDeep($value) { + return array_map('forceInt', $value); +} + +function forceNatDeep($value) { + return array_map('forceNat', $value); +} + +function noneDeep($value) { + return array_map('none', $value); +} + + +function md5Deep($value) +{ + return array_map('md5', $value); +} + +function sha1Deep($value) +{ + return array_map('sha1', $value); +} + + + + + + + +function sanitizeAlnum($string) +{ + return ctype_alnum($string) ? sanitizeAll($string) : ''; +} + + +function sanitizeIp($ip) +{ + return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/',$ip) ? sanitizeAll($ip) : ''; +} + + +/* + CHECK FUNCTIONS +*/ + +//check if a string has the mail format (abc.efg@hij.klm.on) +//modification of the rule found at http://www.sastgroup.com/tutorials/8-espressioni-regolari-per-validare-un-po-di-tutto +//original rule: /^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/ +function checkMail($string) +{ + if (preg_match('/^[a-zA-Z0-9_\-]+([.][a-zA-Z0-9_\-]+){0,2}[@][a-zA-Z0-9_\-]+([.][a-zA-Z0-9_\-]+){0,2}[.][a-zA-Z]{2,4}$/',$string)) + { + return true; + } + else + { + return false; + } +} + + + +function wrap($string,$tag_class) {#wrap the string with the tag and its class + #$tag_class has to be an associative array (tag1=>class1,$tag2=>class2,.. )!! + $str_front=null; + $str_rear=null; + if (is_array($tag_class)) { + foreach ($tag_class as $tag => $class) { + $tag = str_replace('+','',$tag); + $str_class=isset($class) ? " class=\"".$class."\"" : null; + $str_front.="<".$tag.$str_class.">\n"; + $str_rear.="</".$tag.">\n"; + } + } + return $str_front.$string.$str_rear; +} + +//generate a random password +//$start: start number of mt_rand +//$end: end number of mt_rand +function randString($length,$start = 33, $end = 126) +{ + $random = ''; + for ($i = 0; $i < $length; $i++) + { + $random .= chr(mt_rand($start, $end)); + } + return $random; +} + +//generate a random string +//$charNumb:number of characters of the final string +//$allowedChars: allowed characters +function generateString($charNumb = 8,$allowedChars = '0123456789abcdefghijklmnopqrstuvwxyz') +{ + $str = null; + for ($i = 0; $i < $charNumb; $i++) + { + $str .= substr($allowedChars, mt_rand(0, strlen($allowedChars)-1), 1); + } + return $str; +} + + +function getIp() +{ + $ip = ""; + + if (isset($_SERVER)) + { + if (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) + { + $ip = sanitizeIp($_SERVER["HTTP_X_FORWARDED_FOR"]); + } else if (!empty($_SERVER["HTTP_CLIENT_IP"])) { + $ip = sanitizeIp($_SERVER["HTTP_CLIENT_IP"]); + } else { + $ip = sanitizeIp($_SERVER["REMOTE_ADDR"]); + } + } else { + if ( getenv( 'HTTP_X_FORWARDED_FOR' ) !== false ) { + $ip = sanitizeIp(getenv( 'HTTP_X_FORWARDED_FOR' )); + } else if ( getenv( 'HTTP_CLIENT_IP' ) !== false ) { + $ip = sanitizeIp(getenv( 'HTTP_CLIENT_IP' )); + } else { + $ip = sanitizeIp(getenv( 'REMOTE_ADDR' )); + } + } + return $ip; +} + + + +function getUserAgent() { + if (isset($_SERVER['HTTP_USER_AGENT'])) + { + return md5($_SERVER['HTTP_USER_AGENT']); + } + else + { + return md5('firefox'); + } +} + + +function xml_encode($string) +{ + $trans = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); + foreach ($trans as $k=>$v) + { + $trans[$k]= "&#".ord($k).";"; + } + + return strtr($string, $trans); +}
\ No newline at end of file diff --git a/h-source/Library/HeaderObj.php b/h-source/Library/HeaderObj.php new file mode 100644 index 0000000..f4fe65b --- /dev/null +++ b/h-source/Library/HeaderObj.php @@ -0,0 +1,28 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//manage the header +class HeaderObj { + + private $domainName; //the base path of the website (domainname) + + public function __construct($domainName) + { + $this->domainName = $domainName; + } + + //redirect to $path after the time $time + //string that appears until the page is redirected + public function redirect($path,$time = 0,$string = null) + { + $completePath = Url::getRoot().$path; + header('Refresh: '.$time.';url='.$completePath); + if (isset($string)) echo $string; + exit; + } + +} diff --git a/h-source/Library/Helper/Array.php b/h-source/Library/Helper/Array.php new file mode 100755 index 0000000..32a4c27 --- /dev/null +++ b/h-source/Library/Helper/Array.php @@ -0,0 +1,11 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//Helper class to manage arrays +class Helper_Array extends ArrayExt { + +}
\ No newline at end of file diff --git a/h-source/Library/Helper/Html.php b/h-source/Library/Helper/Html.php new file mode 100755 index 0000000..b3648be --- /dev/null +++ b/h-source/Library/Helper/Html.php @@ -0,0 +1,14 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//base class of all the Helper classes that returns HTML +class Helper_Html { + + public $viewArgs = array(); //arguments of the view action (to mantain the status, ex: page,language,etc) + public $viewStatus = null; //additional string to the url to define the status of the view action (ex: page,language,etc) + +}
\ No newline at end of file diff --git a/h-source/Library/Helper/List.php b/h-source/Library/Helper/List.php new file mode 100755 index 0000000..660ac67 --- /dev/null +++ b/h-source/Library/Helper/List.php @@ -0,0 +1,278 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to create the HTML for the view action +class Helper_List extends Helper_Html { + + protected $_itemsList = array(); //2-dimensional associative array containing the list items + //keys: type,table:field,controller/action,value + protected $_head = array(); //2-dimensional array containing the head of the table + protected $_identifierName; + + protected $_recordNumber = null; //number of records from the table + + protected $_allowedItems = array('simpleLink','simpleText','delForm','editForm','associateForm','moveupForm','movedownForm'); //type of items allowed + + //set if the submit buttons have to be images or not (it can be yse or not) + public $submitImageType = 'no'; + + //set the files of the images + public $submitImages = array( + 'edit' => null, + 'del' => null, + 'up' => null, + 'down' => null, + 'link' => null + ); + + //set the titles of the input:submit + public $submitTitles = array( + 'edit' => 'edit the record', + 'del' => 'delete the record', + 'up' => 'move up the record', + 'down' => 'move down the record', + 'link' => 'associate the record' + ); + + //$position: array. First element: page number, second element: number of pages + public $position = array(); + + //it can be: both, top, bottom, none + protected $_boundaries = 'none'; + + public function build($identifierName = 'identifier') + { + $this->_identifierName = $identifierName; + } + + public function setIdentifierName($identifierName) + { + $this->_identifierName = $identifierName; + } + + //add a list Item. $type: the type of the item, $field: the table.field to exctract (use colon to separate the table and the field),$action: controller/action,$value=if type == link->the value of the link + public function addItem($type, $action = '', $field = '', $name = '') { + if (!in_array($type,$this->_allowedItems)) { + throw new Exception('"'.$type. '" argument not allowed in '.__METHOD__.' method'); + } + $temp=array(); + $temp['type'] = $type; + $temp['action'] = $action; + $temp['field'] = $field; + $temp['name'] = $name; + $this->_itemsList[] = $temp; + + //set the $this->_head array + $head = array(); + $head['type'] = $type; + + if ($type === 'simpleText') { + $head['action'] = $this->extractFieldName($action); + } else { + $head['action'] = ' '; + } + $this->_head[] = $head; + } + + + //set the head of the table + //$columnsName: name of the columns. It has to be a comma-separated list of strings + public function setHead($columnsName = '') + { + //get the array from the list + $columnsArray = explode(',',$columnsName); + for ($i = 0; $i < count($columnsArray); $i++) + { + if ($i < count($this->_itemsList)) $this->_head[$i]['action'] = $columnsArray[$i]; + } + } + + + //$method to extract the field name from the $action string (;table:field;) + public function extractFieldName($string) { + $string = str_replace(';','',$string); + return $string; + } + + //replace the strings wrapped by ; with their correspondent value taken by the $recordArray associative array (a row of the select query) + public function replaceFields($string,$rowArray) { + $stringArray = explode(';',$string); + for ($i = 0; $i < count($stringArray); $i++) { + if (strstr($stringArray[$i],':')) { + //check if a function has been indicated + if (strstr($stringArray[$i],'|')) + { + //get the function + $firstArray = explode('|',$stringArray[$i]); + $func = $firstArray[0]; + //replace the fields + $temp = explode(':',$firstArray[1]); + $stringArray[$i] = $rowArray[$temp[0]][$temp[1]]; + + if (!function_exists($func)) { + throw new Exception('Error in <b>'.__METHOD__.'</b>: function <b>'.$func.'</b> does not exists..'); + } + //apply the function + $stringArray[$i] = call_user_func($func,$stringArray[$i]); + } + else + { + $temp = explode(':',$stringArray[$i]); + $stringArray[$i] = $rowArray[$temp[0]][$temp[1]]; + } + } + } + return implode('',$stringArray); + } + + //call the method replaceFields upon the $items array using the associative array $rowArray + public function replaceAll($item,$rowArray) { + $item['action'] = $this->replaceFields($item['action'],$rowArray); + $item['field'] = $this->replaceFields($item['field'],$rowArray); + $item['name'] = $this->replaceFields($item['name'],$rowArray); + return $item; + } + + //wrap the column with the tag td + public function wrapColumn($string, $className = null) { + return wrap($string,array('td'=>$className)); + } + + //wrap the row with the tag tr + public function wrapRow($string,$className = null) { + return wrap($string,array('tr'=>$className)); + } + + public function wrapList($string) { + return wrap($string,array('table'=>'listTable')); + } + + //method to create the HTML of the head of the table + public function createHead() { + $htmlHead = null; + foreach ($this->_head as $item) { + $temp = $item['action']; + $htmlHead .= $this->wrapColumn($temp,$item['type']); + } + return $htmlHead; + } + + //create the HTML of a single row (values taken from the associative array $rowArray) + public function getRowList($rowArray) { + $htmlList = null; + foreach ($this->_itemsList as $item) { + $item = $this->replaceAll($item,$rowArray); + + if (($this->_boundaries === 'top' and $item['type'] === 'moveupForm') or ($this->_boundaries === 'bottom' and $item['type'] === 'movedownForm') or ($this->_boundaries === 'both' and ($item['type'] === 'moveupForm' or $item['type'] === 'movedownForm'))) + { + $htmlList .= $this->wrapColumn(' ',$item['type']); + } + else + { + $temp = call_user_func_array(array($this,$item['type']),array($item)); + $htmlList .= $this->wrapColumn($temp,$item['type']); + } + } + return $htmlList; + } + + //$index: record number + public function ifInBoundaries($index) + { + $this->_boundaries = 'none'; + + if (!empty($this->position)) + { + if ($this->_recordNumber === 1 and strcmp($this->position[0],1) === 0) + { + $this->_boundaries = 'both'; + } + else if ($index === 0 and strcmp($this->position[0],1) === 0) + { + $this->_boundaries = 'top'; + } + else if ($index === ($this->_recordNumber-1) and strcmp($this->position[0],$this->position[1]) === 0) + { + $this->_boundaries = 'bottom'; + } + } + + } + + //create the HTML of the entire list. $queryResult: the array coming from the select query + public function render($queryResult) + { + //set the number of records + $this->_recordNumber = count($queryResult); + $htmlList = null; + //create the HTML of the head of the record list + $htmlList .= $this->wrapRow($this->createHead(),'listHead'); + for ($i = 0; $i < count($queryResult); $i++) + { + $this->ifInBoundaries($i); + $temp = $this->getRowList($queryResult[$i]); + $htmlList .= $this->wrapRow($temp,'listRow'); + } + return $this->wrapList($htmlList); + } + + public function generalForm($itemArray, $submitName, $submitValue) + { + $string = "<form class='listItemForm' action='".Url::getRoot(null).$itemArray['action'].$this->viewStatus."' method='POST'>\n"; + $name = (strcmp($itemArray['name'],'') !== 0) ? $itemArray['name'] : $submitName; + + if (strcmp($this->submitImageType,'yes') === 0) + { + $string .= "<input type='image' title='".$this->submitTitles[$submitValue]."' src='".$this->submitImages[$submitValue]."' value='$submitValue'>\n"; + $string .= "<input type='hidden' name='".$name."' value='$submitValue'>\n"; + } + else + { + $string .= "<input type='submit' title='".$this->submitTitles[$submitValue]."' name='".$name."' value='$submitValue'>\n"; + } + + $string .= "<input type='hidden' name='".$this->_identifierName."' value='".$itemArray['field']."'>\n"; + $string .= "</form>\n"; + return $string; + } + + public function moveupForm($itemArray) + { + return $this->generalForm($itemArray, 'moveupAction', 'up'); + } + + public function movedownForm($itemArray) + { + return $this->generalForm($itemArray, 'movedownAction', 'down'); + } + + public function editForm($itemArray) + { + return $this->generalForm($itemArray, 'generalAction', 'edit'); + } + + public function delForm($itemArray) + { + return $this->generalForm($itemArray, 'delAction', 'del'); + } + + public function associateForm($itemArray) + { + return $this->generalForm($itemArray, 'generalAction', 'link'); + } + + public function simpleText($itemArray) { + $string = "<span class='textItem'>".$itemArray['action']."</span>\n"; + return $string; + } + + public function simpleLink($itemArray) { + $string = "<a class='linkItem' href='".Url::getRoot(null).$itemArray['action'].$this->viewStatus."'>".$itemArray['name']."</a>\n"; + return $string; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Helper/Menu.php b/h-source/Library/Helper/Menu.php new file mode 100755 index 0000000..119ada8 --- /dev/null +++ b/h-source/Library/Helper/Menu.php @@ -0,0 +1,75 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to write the top menù of the view files +class Helper_Menu extends Helper_Html +{ + + public $panelController; //panel controller + public $controller; + + public $links = array( + + 'back' => array( + 'title' => 'back', + 'class' => 'mainMenuItem', + 'text' => 'Back', + 'url' => 'main' + ), + + 'add' => array( + 'title' => 'add a new record', + 'class' => 'mainMenuItem', + 'text' => 'Add', + 'url' => 'form/insert' + ), + + 'panel' => array( + 'title' => 'back to the Panel', + 'class' => 'mainMenuItem', + 'text' => 'Panel', + 'url' => 'main' + ) + + ); + + public function build($controller = null, $panelController = null) + { + $this->controller = $controller; + $this->panelController = $panelController; + } + + //$voices: comma-separated list of links you want to print + public function render($linksList) + { + $linksArray = explode(',',$linksList); + $menu = null; + foreach ($linksArray as $linkName) + { + //check that the voice exists + if (array_key_exists($linkName,$this->links)) + { + //check that the text and the ure are defined + if (isset($this->links[$linkName]['text']) and isset($this->links[$linkName]['url'])) + { + $title = isset($this->links[$linkName]['title']) ? "title='".$this->links[$linkName]['title']."'" : null; + $class = isset($this->links[$linkName]['class']) ? "class='".$this->links[$linkName]['class']."'" : null; + + //choose the controller (current or panel) + $controller = (strcmp($linkName,'panel') === 0) ? $this->panelController.'/' : $this->controller.'/'; + $viewStatus = (strcmp($linkName,'panel') === 0) ? null : $this->viewStatus; + + $href = Url::getRoot($controller.$this->links[$linkName]['url'].$viewStatus); + $text = $this->links[$linkName]['text']; + $menu .= "<div $class><a $title href='$href'>$text</a></div>\n"; + } + } + } + return $menu; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Helper/Pages.php b/h-source/Library/Helper/Pages.php new file mode 100755 index 0000000..eec58f6 --- /dev/null +++ b/h-source/Library/Helper/Pages.php @@ -0,0 +1,108 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//Helper class to create the HTML of the page division list +class Helper_Pages extends Helper_Html +{ + + protected $_urlViewAction; //url of the current page + protected $_currentPage; //number of the page + protected $_numbOfPages; //number of pages + protected $_variableArg = ''; //value of the $viewArgs key that has to be modified + + public $previousString; //string of the link to the previous page + public $nextString; //string of the link to the next page + + public function build($urlViewAction = '' , $variableArg = 'page', $previousString = 'previous', $nextString = 'next') + { + + $this->_variableArg = $variableArg; + $this->_urlViewAction =$urlViewAction; //url of the controller and (/) main action + $this->previousString = $previousString; + $this->nextString = $nextString; + + } + + //return the number of pages + public function getNumbOfPages() + { + return $this->_numbOfPages; + } + + //get the limit of the select query clause + public function getLimit($currentPage,$recordNumber,$recordPerPage) + { + $this->_currentPage = $currentPage; + $this->_numbOfPages=(($recordNumber%$recordPerPage)===0) ? (int) ($recordNumber/$recordPerPage) : ((int) ($recordNumber/$recordPerPage))+1; + $start=(($currentPage-1)*$recordPerPage); + return "$start,$recordPerPage"; + } + + //return the page list string + public function render($pageNumber,$numberOfPages) + { + $pageList = null; + $pageList .= $this->pageLink($this->_currentPage-1,$this->previousString); + $pageList .= $this->recursiveLink($pageNumber,$numberOfPages); + $pageList .= $this->pageLink($this->_currentPage+1,$this->nextString); + return $pageList; + } + + //recorsive function in order to write the page list + public function recursiveLink($pageNumber,$numberOfPages) + { + + if ($numberOfPages === 0) return null; + + if ($numberOfPages === 1) { + return $this->pageLink($pageNumber); + } else { + return $this->pageLink($pageNumber) . $this->recursiveLink($pageNumber+1,$numberOfPages-1); + } + } + + public function pageLink($pageNumber, $string = null) { + if ($pageNumber > 0 and $pageNumber <= $this->_numbOfPages) { + return $this->html($pageNumber,$string); + } else { + return null; + } + } + + //return the html link + public function html($pageNumber,$string = null) { + if (isset($string)) { + $strNumber = $string; + $strClass = "class='itemListPage'"; + } else { + if ($pageNumber === $this->_currentPage) + { + $strNumber = $pageNumber; + $strClass = "class='currentPage'"; + } + else + { + $strNumber = $pageNumber; + $strClass = "class='itemListPage'"; + } + } + $this->viewArgs[$this->_variableArg] = $pageNumber; + $viewStatus = Url::createUrl(array_values($this->viewArgs)); + $href= Url::getRoot(null) . $this->_urlViewAction .$viewStatus; + return $this->getATag($href,$strNumber,$strClass); + } + + //get the HTMl of the tag + //$href: href of the link + //$text: the text of the link + //$strClass: the class of the link + public function getATag($href,$text,$strClass) + { + return "<a $strClass href='$href'>$text</a>"; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Helper/Popup.php b/h-source/Library/Helper/Popup.php new file mode 100755 index 0000000..9ceac72 --- /dev/null +++ b/h-source/Library/Helper/Popup.php @@ -0,0 +1,87 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to create the popup menu +class Helper_Popup extends Helper_Html { + + public $popupArray = array(); //array of popup objects (see popup.php) + public $url = null; //the url (controller/action) to link by means of the popup menù +// public $fieldArg = null; //the key of the viewArgs array to set to the field in the where clause +// public $valueArg = null; //the key of the viewArgs array to be set to the value in the where clause + public $pageArg = null; //the key of the viewArgs array representing the page number. $this->viewArgs[$this->pageArg] is set to 1 if $this->pageArg !== null + + //the type of the popup. If type !=exclusive, than each voice selected is added to the where clause. If type=exclusive, the selection of a popup voice causes the unselection of the other voices + public $type = null; + + //list of popup names + public $popupItems = array(); + + public function build($url, $popupArray = null, $type = 'exclusive', $pageArg = null) { + $this->url = $url; + $this->popupArray = $popupArray; + $this->pageArg = $pageArg; + $this->type = $type; + + foreach ($this->popupArray as $field => $popup) + { + $this->popupItems[] = $field; + } + } + + //check that the ViewArgs array is complete + public function checkViewArgs() + { + foreach ($this->popupArray as $field => $popup) + { + if (!array_key_exists($field,$this->viewArgs)) return false; + } + return true; + } + + //unselect the voices different from the current one + public function unselect($currentVoice) + { + foreach ($this->popupItems as $item) + { + if (strcmp($item,$currentVoice) !== 0) $this->viewArgs[$item] = Params::$nullQueryValue; + } + } + + public function render() { + $returnString = null; + if ($this->checkViewArgs()) + { + if (isset($this->viewArgs[$this->pageArg])) + { + $this->viewArgs[$this->pageArg] = 1; + } + foreach ($this->popupArray as $field => $popup) + { + if ($this->type === 'exclusive') $this->unselect($field); + //save the value of the current ViewArg + $tempArg = $this->viewArgs[$field]; + $returnString .= "<ul onMouseOver='DisplayTag(this,\"block\");' onMouseOut='DisplayTag(this,\"none\");' id='menuBlock'><li class='innerItem'>".$popup->name."<ul class='innerList'>\n"; + for ($i = 0; $i < count($popup->itemsValue); $i++) + { + $this->viewArgs[$field] = $popup->itemsValue[$i]; + $viewStatus = Url::createUrl(array_values($this->viewArgs)); + $returnString .= "<li><a href='".Url::getRoot($this->url).$viewStatus."'>".$popup->itemsName[$i]."</a></li>\n"; + } + $this->viewArgs[$field] = Params::$nullQueryValue; + $viewStatus = Url::createUrl(array_values($this->viewArgs)); + $returnString .= "<li><a href='".Url::getRoot($this->url).$viewStatus."'>All</a></li>\n"; + $returnString .= "</ul>\n</li>\n</ul>\n"; + $this->viewArgs[$field] = $tempArg; + } + if (count($this->popupArray)>0) { + $returnString .= "<script type=\"text/javascript\" src=\"http://".DOMAIN_NAME."/Public/Js/DisplayTag.js\"></script>\n"; + } + } + return $returnString; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Helper/index.html b/h-source/Library/Helper/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Helper/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Hooks.php b/h-source/Library/Hooks.php new file mode 100644 index 0000000..fa005b9 --- /dev/null +++ b/h-source/Library/Hooks.php @@ -0,0 +1,21 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to call the hooks +class Hooks +{ + + //include an hook file + public static function load($path) + { + if (file_exists($path)) + { + include_once($path); + } + } + +}
\ No newline at end of file diff --git a/h-source/Library/Html/Form.php b/h-source/Library/Html/Form.php new file mode 100644 index 0000000..bddc13f --- /dev/null +++ b/h-source/Library/Html/Form.php @@ -0,0 +1,168 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//create the HTML of the inputs of a form +class Html_Form { + + //return the HTML of a select + //$name: name of the select + //$value: the selected value of the select (set $value equal to null if you don't want to select an option) + //$options: options of the select. This param can be a comma-separated list of options or an associative array ('name'=>'value') + //$className: the class name of the select + //$idName: name of the id + static public function select($name, $value, $options, $className = null, $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + $returnString = null; + $returnString .= "<select ".$idStr." $strClass name='".$name."'>\n"; + if (is_string($options)) { + $tempArray = explode(',',$options); + foreach ($tempArray as $item) + { + if (strstr($item,'optgroupOpen:')) + { + $temp = explode(':',$item); + $optionsArray[$temp[1]] = "optgroupOpen"; + } + else + { + $optionsArray[$item] = $item; + } + } + } + else + { + $optionsArray = $options; + } + + $flag = 0; + foreach ($optionsArray as $optionName => $optionValue) { + if (strcmp($optionValue,'optgroupOpen') === 0) + { + if ($flag === 1) $returnString .= "</optgroup>\n"; + $returnString .= "<optgroup label=" . $optionName . ">\n"; + $flag = 1; + } + else + { + $str= (strcmp($value,$optionValue) === 0) ? "selected='$optionValue'" : null; + $returnString .= "<option value='".$optionValue."' $str>$optionName</option>\n"; + } + } + if ($flag === 1) $returnString .= "</optgroup>\n"; + $returnString .= "</select>\n"; + return $returnString; + } + + //return the HTML of an <input type='text' ...> + //$name: the name of the input + //$value: the value of the input + //$className: the class name of the input + //$idName: name of the id + static public function input($name, $value, $className = null, $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + $returnString ="<input ".$idStr." $strClass type='text' name='" .$name. "' value = '$value'>\n"; + return $returnString; + } + + //return the HTML of a checkBox + //$name: name of the checkBox (string) + //$value: the value of the checkBox (string or number) + //$option: option of the checkBox (string or number) + //$className: the class name of the checkBox (string) + //$idName: name of the id + static public function checkbox($name, $value, $option, $className = null, $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + $str = (strcmp($value,$option) === 0) ? "checked = 'checked'" : null; + return "<input ".$idStr." $strClass type='checkbox' name='".$name."' value='".$option."' $str>\n"; + } + + //return the HTML of a hidden entry + //$name: name of the hidden entry (string) + //$value: the value of the hidden entry (string or number) + static public function hidden($name, $value) + { + return "<input type='hidden' name='" .$name. "' value = '$value'>\n"; + } + + //return the HTML of a password entry + //$name: name of the password entry (string) + //$value: the value of the password entry (string or number) + //$idName: name of the id + static public function password($name, $value, $className = null, $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + return "<input ".$idStr." $strClass type='password' name='" .$name. "' value='$value'>\n"; + } + + //return the HTML of a textarea + //$name: name of the textarea (string) + //$value: the value of the textarea (string or number) + //$idName: name of the id + static public function textarea($name, $value, $className = null, $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + return "<textarea ".$idStr." $strClass name='" .$name. "'>$value</textarea>\n"; + } + + //return the HTML of a radio button + //$name: name of the radio button + //$value: the selected value of the radio button (set $value equal to null if you don't want to select an option) + //$options: options of the radio button. This param can be a comma-separated list of options or an associative array ('name'=>'value') + //$className: the class name of the radio button + //$position: position of the strings of the radio with respect to the "circles". It can be before or after + //$idName: name of the id + static public function radio($name, $value, $options, $className = null, $position = 'after', $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + $returnString = null; + + if (is_string($options)) { + $tempArray = explode(',',$options); + foreach ($tempArray as $item) + { + $optionsArray[$item] = $item; + } + } else { + $optionsArray = $options; + } + + foreach ($optionsArray as $optionName => $optionValue) { + + if ($position === 'before') + { + $before = $optionName; + $after = null; + } + else + { + $before = null; + $after = $optionName; + } + + $str= (strcmp($value,$optionValue) === 0) ? "checked='checked'" : null; + $returnString .= "$before<input ".$idStr." $strClass type='radio' name='".$name."' value='".$optionValue."' $str>$after\n"; + } + + return $returnString; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Html/index.html b/h-source/Library/Html/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Html/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Image/Gd/Captcha.php b/h-source/Library/Image/Gd/Captcha.php new file mode 100644 index 0000000..ace4806 --- /dev/null +++ b/h-source/Library/Image/Gd/Captcha.php @@ -0,0 +1,85 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to create a captcha +//you have to call session_start() before to initialize a captcha object +class Image_Gd_Captcha +{ + + private $params = array(); //parameters of the object + private $string = null; //the text string of the captcha + + public function __construct($params = null) + { + $here = realpath('.'); + + $defaultParams = array( + 'boxWidth' => 150, + 'boxHeight' => 100, + 'charNumber' => 6, + 'fontPath' => $here.'/External/Fonts/FreeFont/FreeMono.ttf', + 'undulation' => true, + 'align' => false, + 'charHeight' => 28 + ); + + //set the $this->scaffold->params array + if (is_array($params)) + { + foreach ($params as $key => $value) + { + $defaultParams[$key] = $value; + } + } + $this->params = $defaultParams; + + $this->string = generateString($this->params['charNumber']); + } + + public function render() + { + //space among characters + $space = $this->params['boxWidth'] / ($this->params['charNumber']+1); + //create the image box + $img = imagecreatetruecolor($this->params['boxWidth'],$this->params['boxHeight']); + + $background = imagecolorallocate($img,255,255,255); + $border = imagecolorallocate($img,0,0,0); + $colors[] = imagecolorallocate($img,mt_rand(0,125),mt_rand(0,125),mt_rand(0,125)); + $colors[] = imagecolorallocate($img,mt_rand(0,125),mt_rand(0,125),mt_rand(0,125)); + $colors[] = imagecolorallocate($img,mt_rand(0,125),mt_rand(0,125),mt_rand(0,125)); + + //create the background + imagefilledrectangle($img,1,1,$this->params['boxWidth']-2,$this->params['boxHeight']-2,$background); + imagerectangle($img,0,0,$this->params['boxWidth']-1,$this->params['boxHeight']-2,$border); + + //set the text + for ($i=0; $i< $this->params['charNumber']; $i++) + { + $color = $colors[$i % count($colors)]; + $char = substr($this->string,$i,1); + $fontPath = $this->params['fontPath']; + $angle = $this->params['undulation'] === false ? 0 : -20+rand(0,40); + $yposFixed = (int)(($this->params['boxHeight'])/2); + $ypos = $this->params['align'] === true ? $yposFixed : $yposFixed + mt_rand(0,10); + $charHeight = $this->params['charHeight']; + imagettftext($img,$charHeight + rand(0,8),$angle,($i+0.3)*$space,$ypos,$color,$fontPath,$char); + } + + $noiseColor = imagecolorallocate($img, mt_rand(125,255), mt_rand(125,255), mt_rand(125,255)); + /* generate random dots in background */ + for( $i=0; $i<($this->params['boxWidth'] * $this->params['boxHeight'])/7; $i++ ) { + imagefilledellipse($img, mt_rand(0,$this->params['boxWidth']), mt_rand(0,$this->params['boxHeight']), 1, 1, $noiseColor); + } + + $_SESSION['captchaString'] = $this->string; + header('Content-Type: image/png'); + imagepng($img); + imagedestroy($img); + } + +}
\ No newline at end of file diff --git a/h-source/Library/Image/Gd/Thumbnail.php b/h-source/Library/Image/Gd/Thumbnail.php new file mode 100644 index 0000000..5981175 --- /dev/null +++ b/h-source/Library/Image/Gd/Thumbnail.php @@ -0,0 +1,151 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to create a thumbnail +class Image_Gd_Thumbnail +{ + const DS = DIRECTORY_SEPARATOR; + + private $params = array(); //parameters of the object + private $basePath = null; //the path of the folder inside which the images are saved + + public function __construct($basePath,$params = null) + { + $finalChar = $basePath[strlen($basePath) - 1]; + if (strcmp($finalChar,self::DS) !== 0) $basePath .= self::DS; + + $this->basePath = $basePath; + + $defaultParams = array( + 'imgWidth' => 100, + 'imgHeight' => 100, + 'defaultImage' => null, + 'cropImage' => 'no', + 'horizAlign' => 'left', + 'vertAlign' => 'top' + ); + + //set the $this->scaffold->params array + if (is_array($params)) + { + foreach ($params as $key => $value) + { + $defaultParams[$key] = $value; + } + } + $this->params = $defaultParams; + } + + //create the thumbnail + //$imageName: the name of the file inside $this->basePath + public function render($imageFile) + { + $imagePath = $this->basePath . basename($imageFile); + + if (!file_exists($imagePath) and isset($this->params['defaultImage'])) $imagePath = $this->params['defaultImage']; + + $img = null; + $ext = strtolower(end(explode('.', $imagePath))); + + if (strcmp($ext,'jpg') === 0 or strcmp($ext,'jpeg') === 0) { + $img = @imagecreatefromjpeg($imagePath); + } else if (strcmp($ext,'png') === 0) { + $img = @imagecreatefrompng($imagePath); + } else if (strcmp($ext,'gif') === 0) { + $img = @imagecreatefromgif($imagePath); + } + + //If an image was successfully loaded, test the image for size + if ($img) { + //image size + $width = imagesx($img); + $height = imagesy($img); + + if ($this->params['cropImage'] === 'no') + { + $scale = min($this->params['imgWidth']/$width, $this->params['imgHeight']/$height); + } + else if ($this->params['cropImage'] === 'yes') + { + $scale = max($this->params['imgWidth']/$width, $this->params['imgHeight']/$height); + } + + if ($scale < 1) { + + $xSrc = 0; + $ySrc = 0; + + if ($this->params['cropImage'] === 'no') + { + $newWidth = floor($scale*$width); + $newHeight = floor($scale*$height); + } + else if ($this->params['cropImage'] === 'yes') + { + + $newWidth = $this->params['imgWidth']; + $newHeight = $this->params['imgHeight']; + $oldWidth = $width; + $oldHeight = $height; + $width = floor($newWidth/$scale); + $height = floor($newHeight/$scale); + + switch ($this->params['horizAlign']) + { + case 'left': + $xSrc = 0; + break; + case 'right': + $xSrc = floor(($oldWidth-$width)); + break; + case 'center': + $xSrc = floor(($oldWidth-$width)/2); + break; + default: + $xSrc = $this->params['horizAlign']; + } + + switch ($this->params['vertAlign']) + { + case 'top': + $ySrc = 0; + break; + case 'bottom': + $ySrc = floor(($oldHeight-$height)); + break; + case 'center': + $ySrc = floor(($oldHeight-$height)/2); + break; + default: + $ySrc = $this->params['vertAlign']; + } + + } + + //temp image + $tmpImg = imagecreatetruecolor($newWidth, $newHeight); + + //copy and resize + imagecopyresized($tmpImg, $img, 0, 0, $xSrc, $ySrc,$newWidth, $newHeight, $width, $height); + imagedestroy($img); + $img = $tmpImg; + } + + } + + if (!$img) { + $img = imagecreate($this->params['imgWidth'], $this->params['imgHeight']); + imagecolorallocate($img,200,200,200); + } + + //print the image + header("Content-type: image/jpeg"); + imagejpeg($img); + + } + +}
\ No newline at end of file diff --git a/h-source/Library/Image/Gd/index.html b/h-source/Library/Image/Gd/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Image/Gd/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Image/index.html b/h-source/Library/Image/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Image/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Lang/Eng/DbCondStrings.php b/h-source/Library/Lang/Eng/DbCondStrings.php new file mode 100644 index 0000000..1edae98 --- /dev/null +++ b/h-source/Library/Lang/Eng/DbCondStrings.php @@ -0,0 +1,17 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//error strings in the case database conditions are not satisfied +class Lang_Eng_DbCondStrings { + + //get the error string in the case that the value of the field $field is already present in the table $table + public function getNotUniqueString($field) + { + return "<div class='alert'>The value of <i>". $field ."</i> is already present. Please choose a different value.</div>\n"; + } + +} diff --git a/h-source/Library/Lang/Eng/ModelStrings.php b/h-source/Library/Lang/Eng/ModelStrings.php new file mode 100644 index 0000000..411d196 --- /dev/null +++ b/h-source/Library/Lang/Eng/ModelStrings.php @@ -0,0 +1,19 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_Eng_ModelStrings extends Lang_ResultStrings { + + public $string = array( + "error" => "<div class='alert'>Query error: Contact the administrator!</div>\n", + "executed" => "<div class='executed'>Operation executed!</div>\n", + "associate" => "<div class='alert'>Referential integrity problem: record associated to some other record in a child table. Break the association before.</div>\n", + "no-id" => "<div class='alert'>Alert: record identifier not defined!</div>\n", + "not-linked" => "<div class='alert'>The Item is not associated : you can't dissociate it</div>", + "linked" => "<div class='alert'>The Item is already associated: you can't associate it another time</div>" + ); + +} diff --git a/h-source/Library/Lang/Eng/UploadStrings.php b/h-source/Library/Lang/Eng/UploadStrings.php new file mode 100644 index 0000000..195fd5f --- /dev/null +++ b/h-source/Library/Lang/Eng/UploadStrings.php @@ -0,0 +1,27 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_Eng_UploadStrings extends Lang_ResultStrings { + + public $string = array( + "error" => "<div class='alert'>Error: verify the permissions of the file/directory</div>\n", + "executed" => "<div class='executed'>Operation executed!</div>\n", + "not-child" => "<div class='alert'>The selected directory is not a child of the base directory</div>\n", + "not-dir" => "<div class='alert'>The selected directory is not a directory</div>\n", + "not-empty" => "<div class='alert'>The selected directory is not empty</div>\n", + "no-folder-specified" => "<div class='alert'>No folder has been specified</div>\n", + "no-file-specified" => "<div class='alert'>No file has been specified</div>\n", + "not-writable" => "<div class='alert'>The folder is not writable</div>\n", + "not-writable-file" => "<div class='alert'>The file is not writable</div>\n", + "dir-exists" => "<div class='alert'>The directory is already present in the current folder</div>\n", + "no-upload-file" => "<div class='alert'>There is no file to upload</div>\n", + "size-over" => "<div class='alert'>The size of the file is too big</div>\n", + "not-allowed-ext" => "<div class='alert'>The extension of the file you want to upload is not allowed</div>\n", + "file-exists" => "<div class='alert'>The file is already present in the current folder</div>\n" + ); + +} diff --git a/h-source/Library/Lang/Eng/ValCondStrings.php b/h-source/Library/Lang/Eng/ValCondStrings.php new file mode 100644 index 0000000..b9d132e --- /dev/null +++ b/h-source/Library/Lang/Eng/ValCondStrings.php @@ -0,0 +1,76 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_Eng_ValCondStrings { + + //if the element is not defined + public function getNotDefinedResultString($element) + { + return "<div class='alert'>". $element ." not defined!</div>\n"; + } + + //if the elements are not equal + public function getNotEqualResultString($element) + { + return "<div class='alert'>Different values: $element</div>\n"; + } + + //if the element is not alphabetic + public function getNotAlphabeticResultString($element) + { + return "<div class='alert'>".$element." has to be alphabetic</div>\n"; + } + + //if the element is not alphanumeric + public function getNotAlphanumericResultString($element) + { + return "<div class='alert'>".$element." has to be alphanumeric</div>\n"; + } + + //if the element is not a decimal digit + public function getNotDecimalDigitResultString($element) + { + return "<div class='alert'>".$element." has to be a decimal digit</div>\n"; + } + + //if the element has the mail format + public function getNotMailFormatResultString($element) + { + return "<div class='alert'>".$element." doesn't seem an e-mail address</div>\n"; + } + + //if the element is numeric + public function getNotNumericResultString($element) + { + return "<div class='alert'>".$element." has to be a numeric</div>\n"; + } + + //if the element (string) length exceeds the value of characters (defined by $maxLength) + public function getLengthExceedsResultString($element,$maxLength) + { + return "<div class='alert'>".$element." exceeds the value of $maxLength characters</div>\n"; + } + + //if the element is one of the strings indicated by $stringList (a comma-separated list of strings) + public function getIsForbiddenStringResultString($element,$stringList) + { + return "<div class='alert'>".$element." can't be one of the following strings: $stringList</div>\n"; + } + + //if the element is not one of the strings indicated by $stringList (a comma-separated list of strings) + public function getIsNotStringResultString($element,$stringList) + { + return "<div class='alert'>".$element." has to be one of the following strings: $stringList</div>\n"; + } + + //if the element is not one of the strings indicated by $stringList (a comma-separated list of strings) + public function getDoesntMatchResultString($element,$regExp) + { + return "<div class='alert'>".$element." has to match the following regular expression: $regExp</div>\n"; + } + +} diff --git a/h-source/Library/Lang/Eng/index.html b/h-source/Library/Lang/Eng/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Lang/Eng/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Lang/ResultStrings.php b/h-source/Library/Lang/ResultStrings.php new file mode 100644 index 0000000..db1095c --- /dev/null +++ b/h-source/Library/Lang/ResultStrings.php @@ -0,0 +1,25 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Lang_ResultStrings { + + public $string = array(); + + //method to get the string $stringName + public function getString($stringName) + { + if (isset($this->string[$stringName])) + { + return $this->string[$stringName]; + } + else + { + return 'result string not defined!'; + } + } + +} diff --git a/h-source/Library/Lang/index.html b/h-source/Library/Lang/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Lang/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/ModAbstract.php b/h-source/Library/ModAbstract.php new file mode 100644 index 0000000..885f64f --- /dev/null +++ b/h-source/Library/ModAbstract.php @@ -0,0 +1,25 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//aach module class has to inherits from this abstract class +abstract class ModAbstract +{ + + //reference to a simpleXML object + protected $simpleXmlObj = null; + + //type hinting: simplexmlelement + public function __construct(SimpleXMLElement $simpleXmlObj) + { + $this->simpleXmlObj = $simpleXmlObj; + } + + //define the abstract method to render (create the HTML) of the single module + //$xmlObject: simpleXML object + abstract public function render(); + +} diff --git a/h-source/Library/Model/Base.php b/h-source/Library/Model/Base.php new file mode 100755 index 0000000..1aaadca --- /dev/null +++ b/h-source/Library/Model/Base.php @@ -0,0 +1,1140 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +abstract class Model_Base +{ + + public $fields = ''; //the fields that have to be manipulated by the update and insert query + public $values = array(); //the values that corresponding to the $this->fields fields + public $form = null; //reference to a Form_Form object + public $formStruct = null; //the form structure + + public $submitName = null; //the current submitName (from the form) + public $identifierName = 'identifier'; + + public $notice = null; //a string explaining the result of the query applied (or not if an error occured): executed, error, etc + public $result = true; //the result of validate conditions, database conditions and query. It can be 'true' or 'false' + public $queryResult = false; //the result of the query + + //conditions that have to be satisfied before applying the query + //Ex: 'update'=>'checkEmpty:titolo,autore','submitName'=>'conditions' + public $strongConditions = array(); + + //conditions that have to be satisfied before applying the query + //Ex: 'update'=>'checkEmpty:titolo,autore','submitName'=>'conditions' + //do not return error if a value is equal to '' or null + public $softConditions = array(); + + //conditions that have to be satisfied before applying the query + //check that the new values inserted satisfy some conditions + //Ex: 'update'=>'checkUniqueCompl:titolo,autore;checkUnique:titolo','insert'=>'checkUnique:titolo' + public $databaseConditions = array(); + + public $popupArray = array(); //array of popup objects (see popup.php) + + public $supplInsertValues = array(); //associative array defining supplementary values to be inserted on each insert query. It has to have the following form: array(field1 => value1,field2 => value2, ...) + + public $supplUpdateValues = array(); //associative array defining supplementary values to be inserted on each update query. It has to have the following form: array(field1 => value1,field2 => value2, ...) + + public $select = null; //fields that have to be selected in select queries + public $where = array(); //associative array containing all the where clauses ($field => $value) + //group by, order by and limit clauses + public $groupBy = null; + public $orderBy = null; + public $limit = null; + + public $from = null; //from clause of the select queries + public $on = null; //join part of the where clause of the select queries + public $using = null; //using clause + + public $toList = false; //if the result have to be given in a list format + public $listArray = array(); //array containing the $key and the $value to be used to extract a list from a resultSet + + //logic operator between statements in the where clause of select queries + public $logicalOperators = array('AND'); + + protected $_tables='itemTable,boxTable,item_boxTable'; + protected $_idFields='id_item,id_box'; + protected $_tablesArray=array(); + protected $_idFieldsArray=array(); + protected $_where = array(); + + //the name of the field that has to be used to order the rows of the main table of the model + protected $_idOrder = null; + + protected $_onDelete = 'check'; //can be 'nocheck' or 'check'. check: referential integrity check. nocheck: no referential integrity check + protected $_reference = null; //array containing the child table that have a reference to this table and the foreign key of the child table-> array($childTable,$foreignKey) + + protected $_popupItemNames = array(); //the fields to be used as names in the popupArray elements. Associative array ($itemNameField1 => $itemNameValue1, ...) + + //the labels of the pop-up menus + protected $_popupLabels = array(); + + //functions that have to be applied upon the label fields of the popup menu + protected $_popupFunctions = array(); + + protected $_popupWhere = array(); //where clause for the pupup menu + + protected $_resultString; //reference to the class containing all the result strings of the db queries + protected $_dbCondString; //reference to the class containing all the result strings of the database conditions + + protected $_backupFields = ''; //field saved after the delFields method has been applied + protected $_backupValues = array(); //values saved after the delFields method has been applied + protected $_allowedDbMethods = array('update','insert','del','moveup','movedown'); //methods that can be called by the updateTable method + + protected $submitNames = array( + 'update' => 'updateAction', + 'insert' => 'insertAction', + 'del' =>'delAction', + 'moveup' =>'moveupAction', + 'movedown' =>'movedownAction' + ); + + protected $identifierValue = null; //the value of the identifier ($_POST[$this->identifier]) + protected $arrayExt; //arrayExt object (see library/arrayExt.php) + + protected $_arrayStrongCheck; //Array_Validate_Strong object + protected $_arraySoftCheck; //Array_Validate_Soft object + + public $db; //reference to the database layer class + protected $_lang = 'Eng'; //language of notices + + + public function __construct() { + $this->_tablesArray = explode(',',$this->_tables); + $this->_idFieldsArray = explode(',',$this->_idFields); + $this->_where[$this->_idFieldsArray[0]] = $this->_tablesArray[0]; + $this->arrayExt = new ArrayExt(); + + //initialize the validate objects + $this->_arrayStrongCheck = new Array_Validate_Strong($this->_lang); + $this->_arraySoftCheck = new Array_Validate_Soft($this->_lang); + + $this->identifierName = $this->_idFieldsArray[0]; + + //create the $_resultString object (result strings of the db queries) + $modelStringClass = 'Lang_'.$this->_lang.'_ModelStrings'; + if (!class_exists($modelStringClass)) + { + $modelStringClass = 'Lang_Eng_ModelStrings'; + } + $this->_resultString = new $modelStringClass(); + + //create the $_dbCondString object (result strings of the database conditions) + $dbCondStringClass = 'Lang_'.$this->_lang.'_DbCondStrings'; + if (!class_exists($dbCondStringClass)) + { + $dbCondStringClass = 'Lang_Eng_DbCondStrings'; + } + $this->_dbCondString = new $dbCondStringClass(); + + //instantiate the database class + $this->db = Factory_Db::getInstance(DATABASE_TYPE); + } + + //set the submitNames property (array) + //$methodName : the method name, $submitName: the submit name of the submit action of the form + public function setSubmitNames($methodName,$submitName) + { + if (!in_array($methodName,$this->_allowedDbMethods)) + { + throw new Exception('query type <b>"'.$methodName. '"</b> not allowed in '. __METHOD__); + } + $this->submitNames[$methodName] = $submitName; + } + + //get the last query executed + public function getQuery() + { + return $this->db->query; + } + + //get the where clause of the select query + public function getWhereQueryClause() + { + return $this->where; + } + + //set the where clause of the select query + //whereArray = array ($table_field => $value) + public function setWhereQueryClause($whereArray) + { + $this->where = $whereArray; + } + + //append the whereArray clause to $this_->whereClause + //whereArray = array ($table_field => $value) + public function appendWhereQueryClause($whereArray) + { + $this->where = array_merge($this->where,$whereArray); + } + + //drop the char $char from the beginning of the string $string + public function dropStartChar($string,$char) + { + while(strcmp($string[0],$char) === 0) + { + $string = substr($string,1); + } + return $string; + } + + //get the table name from $this->_where. If the table is not present then return $this->_tablesArray[0] + public function getTableName($field) + { + return isset($this->_where[$field]) ? $this->_where[$field] : $this->_tablesArray[0]; + } + + //method to create the where clause of the select query from the $this->where array + //$level: level of the ricorsion + //$whereClauseLevel: array containing the field=>value statements of the where clause. If $whereClause = null than $this->where is considered + public function createWhereClause($level = 0, $whereClauseLevel = null) + { + $whereClause = null; + $whereClauseArray = array(); + + $whereClause = isset($whereClauseLevel) ? $whereClauseLevel : $this->where; + + foreach ($whereClause as $field => $value) + { + if (is_array($value)) + { + $newValue = $this->createWhereClause($level+1, $value); + if (isset($newValue)) $whereClauseArray[] = $newValue; + } + else + { + $flag = 0; //equal where clause + if (isset($field)) + { + //drop the 'n:' and '-' chars from $field + $fieldClean = str_replace('n!',null,$field); + $fieldClean = $this->dropStartChar($fieldClean,'-'); + if (strcmp($value,Params::$nullQueryValue) !== 0 or (Params::$nullQueryValue === false)) + { + foreach (params::$whereClauseSymbolArray as $symbol) + { + if (strstr($value,$symbol)) + { + //check if write or not the table name + $tableName = strstr($field,'n!') ? null : $this->getTableName($field).'.'; + $whereClauseArray[] = $tableName.$fieldClean.' '.$value; + $flag = 1; //not equal where clause + break; + } + } + if ($flag === 0) + { + $value = '"'.$value.'"'; + //check if write or not the table name + $tableName = strstr($field,'n!') ? null : $this->getTableName($field).'.'; + $whereClauseArray[] = $tableName.$fieldClean.'='.$value; + } + } + } + } + } + //get the logic operator at the current level + $logicOper = isset($this->logicalOperators[$level]) ? ' '.$this->logicalOperators[$level].' ' : ' AND '; + $whereClause = !empty($whereClauseArray) ? implode($logicOper,$whereClauseArray) : null; + $whereClause = (isset($whereClause) and $level>0) ? '('.$whereClause.')' : $whereClause; + return $whereClause; + } + + + //get the submitName having its key (the method name) + public function getSubmitName($key) + { + if (!array_key_exists($key,$this->submitNames)) + { + return 'generalAction'; +// throw new Exception('query type <b>"'.$key. '"</b> not allowed in '.__METHOD__); + } + return $this->submitNames[$key]; + + } + + + //return the values, taken from the $_POST array, to be inserted inside the forms + //$queryType: insert or update + //$func: sanitize function to apply upon each value + //$id: if $queryType='update' that the values are taken from the record (of the main table of this model) having the primary key equal to $id + //$defaultValues = associative array of the form: array($entry=>$defaultValue) + //$functionsIfFromDb = associative array of the form: array($entry=>$function_to_be_applied) + public function getFormValues($queryType = 'insert', $func = 'sanitizeHtml',$id = null,$defaultValues = array(),$functionsIfFromDb = array()) + { + $arrayType = array('update','insert'); + $values = array(); + $idName = $this->identifierName; + if (in_array($queryType,$arrayType)) + { + $ident = null; + if (isset($id)) + { + $ident = (int)$id; + } + else if (isset($_POST[$idName])) + { + $ident = (int)$_POST[$idName]; + } + if ($this->result) + { + if ($queryType === 'update') + { + if (isset($ident)) + { + $recordArray = $this->selectId($ident); + + $fieldsArray = explode(',',$this->fields); + + foreach ($fieldsArray as $field) + { + $values[$field] = array_key_exists($field,$recordArray) ? $recordArray[$field] : ''; + } + + $values[$idName] = $ident; + + //apply the functions upon entries + foreach ($functionsIfFromDb as $entry => $funcUponEntry) + { + if (array_key_exists($entry,$values)) + { + if (!function_exists($funcUponEntry)) { + throw new Exception('Error in <b>'.__METHOD__.'</b>: function <b>'.$funcUponEntry. '</b> does not exists'); + } + + $values[$entry] = call_user_func($funcUponEntry,$values[$entry]); + } + } + + } + } + else if ($queryType === 'insert') + { + + $tempArray = is_array($defaultValues) ? $defaultValues : array(); + + $values = $this->arrayExt->subset($tempArray,$this->fields,$func); + + } + } + else + { + $values = $this->arrayExt->subset($_POST,$this->fields,$func); + + if ($queryType === 'update') + { + $values[$idName] = $ident; + } + } + } + return $values; + } + + + //method to set the properties $this->fields and $this->values + public function setFields($fields,$func = 'sanitizeAll') + { + $this->values = $this->arrayExt->subset($_POST,$fields,$func); + $this->fields = $this->extractFields($fields); + + //set the backup variables + $this->_backupFields = $this->fields; + $this->_backupValues = $this->values; + } + + + //clear the fields list + public function clearFields() + { + $this->_backupFields = $this->fields; + $this->_backupValues = $this->values; + $this->fields = ''; + $this->values = array(); + } + + //del the fields written in the $list argument. The $list argument has to be of the type: field1,field2,... + public function delFields($list) + { + $this->_backupFields = $this->fields; + $this->_backupValues = $this->values; + $this->values = $this->arrayExt->subsetComplementary($this->values,$list); + $this->fields = implode(',',array_keys($this->values)); + } + + //restore the fields and values saved in $_backupFields and $_backupValues + public function restoreFields() + { + $this->fields = $this->_backupFields; + $this->values = $this->_backupValues; + } + + //method to clean the $fields string deleting the colons (and the word after the colon) + public function extractFields($fields) { + $fieldsArray = explode(',',$fields); + $resultString = array(); + foreach ($fieldsArray as $field) { + if (strstr($field,':')) { + $temp = explode(':',$field); + $resultString[] = $temp[0]; + } else { + $resultString[] = $field; + } + } + return implode(',',$resultString); + } + + //add the supplementary value on insert and update queries + //$queryType: insert or update + public function setSupplValues($queryType) + { + if ($queryType === 'insert') + { + $supplValues = $this->supplInsertValues; + } + else if ($queryType === 'update') + { + $supplValues = $this->supplUpdateValues; + } + + $baseFields = implode(',',array_keys($this->values)); + + $supplFields = implode(',',array_keys($supplValues)); + $supplFields = (strcmp($supplFields,'') === 0) ? $supplFields : ',' . $supplFields; + + $fields = $baseFields . $supplFields; + $values = array_merge(array_values($this->values),array_values($supplValues)); + + return array($fields,$values); + } + + + //method to call the update query (overriding of the base_db del method) + //update the record with the primary key equal to $id (default) + //if $whereClause is set then use $whereClause as where clause of the update query + public function update($id = null, $whereClause = null) + { + if (!is_array($this->supplUpdateValues)) + { + throw new Exception('error in <b>' . __METHOD__ . '</b>: the <b>supplUpdateValues</b> property has to be an array.'); + } + $el = $this->setSupplValues('update'); + $this->queryResult = false; + + if (isset($whereClause)) + { + $result = $this->db->update($this->_tablesArray[0],$el[0],$el[1],$whereClause); + $this->setNotice($result); + return $result; + } + else + { + if (isset($id)) + { + $where = $this->_idFieldsArray[0].'='.(int)($id); + $result = $this->db->update($this->_tablesArray[0],$el[0],$el[1],$where); + $this->setNotice($result); + return $result; + } + else + { + $this->notice = $this->_resultString->getString('no-id'); + $this->result = false; + $this->identifierValue = null; + return false; + } + } + } + + //method to call the insert query (overriding of the base_db del method) + public function insert() { + + $this->queryResult = false; + if (!is_array($this->supplInsertValues)) { + throw new Exception('error in <b>' . __METHOD__ . '</b>: the <b>supplInsertValues</b> property has to be an array.'); + } + + if (isset($this->_idOrder)) + { + $maxValue = $this->db->getMax($this->_tablesArray[0],$this->_idOrder); + $this->supplInsertValues[$this->_idOrder] = (int)$maxValue + 1; + } + + $el = $this->setSupplValues('insert'); + + $result = $this->db->insert($this->_tablesArray[0],$el[0],$el[1]); + $this->setNotice($result); + return $result; + } + + //method to call the delete query (overriding of the base_db del method) + public function del($id = null, $whereClause = null) { + + $this->queryResult = false; + + if (isset($whereClause)) + { + $result = $this->db->del($this->_tablesArray[0],$whereClause); + $this->setNotice($result); + return $result; + } + else + { + if (isset($id)) { + $where = $this->_idFieldsArray[0].'='.(int)$id; + $result = $this->db->del($this->_tablesArray[0],$where); + $this->setNotice($result); + return $result; + } else { + $this->notice = $this->_resultString->getString('no-id'); + $this->result = false; + $this->identifierValue = null; + return false; + } + } + } + + //move to the top the record having $this->_idOrder = $id + //where clause + public function moveup($id) + { + return $this->move($id,'up'); + } + + //move to the top the record having $this->_idOrder = $id + //where clause + public function movedown($id) + { + return $this->move($id,'down'); + } + + //move the record having $this->_tablesArray[0] = $id + //$par: 'up' or 'down' + //where clause + public function move($id,$par = 'up') + { + $this->queryResult = false; + if (isset($id)) + { + $increm = ($par === 'up') ? 1 : -1; + + $backupLimit = $this->limit; + $this->limit = null; + + $data = $this->getFields($this->_tablesArray[0].'.'.$this->_idFieldsArray[0].','.$this->_tablesArray[0].'.'.$this->_idOrder); + + for($i = 0; $i < count($data); $i++) + { + if (strcmp($data[$i][$this->_tablesArray[0]][$this->_idFieldsArray[0]],$id) === 0) + { + if (($par === 'up' and $i !== 0) or ($par === 'down' and $i !== (count($data)-1))) + { + $prevOrder = $data[$i-$increm][$this->_tablesArray[0]][$this->_idOrder]; + $prevId = $data[$i-$increm][$this->_tablesArray[0]][$this->_idFieldsArray[0]]; + $currentOrder = $data[$i][$this->_tablesArray[0]][$this->_idOrder]; + $currentId = $data[$i][$this->_tablesArray[0]][$this->_idFieldsArray[0]]; + + //exchange the id_order of the two record + $res1 = $this->db->update($this->_tablesArray[0],$this->_idOrder,array($prevOrder),$this->_idFieldsArray[0]."='$currentId'"); + $res2 = $this->db->update($this->_tablesArray[0],$this->_idOrder,array($currentOrder),$this->_idFieldsArray[0]."='$prevId'"); + $result = ($res1 and $res2); + $this->setNotice($result); + return $result; + } + } + } + + $this->limit = $backupLimit; + } + else + { + $this->notice = $this->_resultString->getString('no-id'); + $this->result = false; + $this->identifierValue = null; + return false; + } + return false; + } + + public function setNotice($result) { + if ($result) { + $this->notice = $this->_resultString->getString('executed'); + $this->result = true; + $this->queryResult = true; + } else { + $this->notice = $this->_resultString->getString('error'); + $this->result = false; + $this->queryResult = false; + } + } + + //method used to verify that the value of a field is not duplicated + //$fieldsList: list of fields to check. Ex: field1,field2,... + //$where: the where clause + public function checkUnique($fieldsList,$where = null) + { + $errorString = null; + $numb = 0; + $fieldsArray = explode(',',$fieldsList); + $queryFieldsArray = explode(',',$this->fields); + foreach ($fieldsArray as $field) + { + if (in_array($field,$queryFieldsArray)) + { + if ($this->db->recordExists($this->_tablesArray[0],$field,$this->values[$field],$where)) + { + $errorString .= $this->_dbCondString->getNotUniqueString($field); + $numb++; + } + } + } + $this->notice = $errorString; + return $numb === 0 ? true : false; + } + + //like checkUnique: check all the records of the table apart from the record that has to be modified + public function checkUniqueCompl($fieldsList,$id = null) + { + if (isset($id)) + { + $where = $this->_idFieldsArray[0].'!='.(int)($id); + return $this->checkUnique($fieldsList,$where); + } else { + $this->notice = $this->_resultString->getString('no-id'); + return false; + } + } + + //method to apply the database conditions listed in the $this->databaseConditions associative array + //$queryType: indicates what set of validate conditions has to be considered (it's the key of the associative array) + public function applyDatabaseConditions($queryType,$id = null) + { + if (array_key_exists($queryType,$this->databaseConditions)) + { + if (!is_array($this->databaseConditions[$queryType])) + { + throw new Exception('error in method <b>'.__METHOD__.'</b> : <b>databaseConditions['.$queryType.']</b> has to be an associative array'); + } + + foreach ($this->databaseConditions[$queryType] as $key => $values) + { + + //personalized error string + $altErrorString = null; + + //delete all the '+' chars + $key = $this->dropStartChar($key,'+'); + + if (strcmp($values,'all') === 0 or strstr($values,'all|')) + { + if (strstr($values,'all|')) + { + $values = str_replace('all|',$this->fields.'|',$values); + } + else + { + $values = $this->fields; + } + } + + if (strstr($values,'|')) + { + $temp = explode('|',$values); + $altErrorString = "<div class='".Params::$errorStringClassName."'>".$temp[1]."</div>\n"; + $values = $temp[0]; + } + + $allowedMethod = array('checkUnique','checkUniqueCompl'); + if (!in_array($key,$allowedMethod)) + { + throw new Exception('error in method '.__METHOD__.' : method "'.$key. '" not allowed in the property named databaseConditions'); + } + if (!call_user_func_array(array($this,$key),array($values,$id))) + { + if (isset($altErrorString)) $this->notice = $altErrorString; + $this->result = false; + $this->queryResult = false; + return false; + } + } + return true; + } else { + return true; + } + } + + + //method to apply the validate conditions listed in the $this->strongConditions associative array + //$queryType: indicates what set of validate conditions has to be considered (it's the key of the associative array) + //$strength: 'strong' or 'soft' + public function applyValidateConditions($queryType,$strength = 'strong') + { + if ($strength === 'strong') + { + $validateObj = $this->_arrayStrongCheck; + $conditions = $this->strongConditions; + $errString = 'strongConditions'; + } + else + { + $validateObj = $this->_arraySoftCheck; + $conditions = $this->softConditions; + $errString = 'softConditions'; + + if (Params::$nullQueryValue !== false) + { + $conditions['insert']['+++++checkIsNotStrings|'.Params::$nullQueryValue] = 'all'; + $conditions['update']['+++++checkIsNotStrings|'.Params::$nullQueryValue] = 'all'; + } + } + + if (array_key_exists($queryType,$conditions)) + { + if (!is_array($conditions[$queryType])) + { + throw new Exception('error in method <b>'.__METHOD__.'</b> : <b>'.$errString.'['.$queryType.']</b> has to be an associative array'); + } + + foreach ($conditions[$queryType] as $key => $values) + { + + //personalized error string + $altErrorString = null; + + //delete all the '+' chars + $key = $this->dropStartChar($key,'+'); + + if (strcmp($values,'all') === 0 or strstr($values,'all|')) + { + if (strstr($values,'all|')) + { + $values = str_replace('all|',$this->fields.'|',$values); + } + else + { + $values = $this->fields; + } + } + + if (strstr($values,'|')) + { + $temp = explode('|',$values); + $altErrorString = "<div class='".Params::$errorStringClassName."'>".$temp[1]."</div>\n"; + $values = $temp[0]; + } + + $baseArgs = array($_POST,$values); + + if (strstr($key,'|')) + { + $funcArray = explode('|',$key); + $funcName = $funcArray[0]; + array_shift($funcArray); + $funcArgs = array_merge($baseArgs,$funcArray); + } + else + { + $funcName = $key; + $funcArgs = $baseArgs; + } + + if (!method_exists($validateObj,$funcName) or $funcName === 'checkGeneric') + { + throw new Exception('error in method '.__METHOD__.' :method "'.$funcName. '" not allowed in '.$errString); + } + if (!call_user_func_array(array($validateObj,$funcName),$funcArgs)) + { + $this->notice .= (isset($altErrorString)) ? $altErrorString : $validateObj->errorString; + $this->result = false; + $this->queryResult = false; + return false; + } + } + return true; + } else { + return true; + } + } + + + //apply, in sequence, the strong,soft and database conditions + //$methodName: insert,update + //$id: the id of the record. It is necessary for database conditions + public function checkConditions($methodName,$id = null) + { + if ($this->applyValidateConditions($methodName,'strong')) + { + if ($this->applyValidateConditions($methodName,'soft')) + { + if ($this->applyDatabaseConditions($methodName,$id)) + { + return true; + } + } + } + return false; + } + + //method that calls the function indicated in $this->submitNames. Ex: if $_POST['delAction'] is found, then the "del" method is called. + public function updateTable($methodsList = '',$id = null) { + + $allowedMethodsArray = explode(',',$methodsList); + $resultArray = array(); + $this->identifierValue = null; + if (isset($id)) + { + $this->identifierValue = (int)$id; + } + else if (isset($_POST[$this->identifierName])) + { + $this->identifierValue = (int)$_POST[$this->identifierName]; + } + foreach ($this->submitNames as $methodName => $submitName) + { + if (array_key_exists($submitName,$_POST)) + { + $this->submitName = $submitName; + if (method_exists($this,$methodName)) + { + //if the method is allowed + if (in_array($methodName,$allowedMethodsArray)) + { + if ($this->checkConditions($methodName,$this->identifierValue)) + { + $this->notice = null; + call_user_func_array(array($this,$methodName),array($this->identifierValue)); + } + } + } + else + { + throw new Exception('method <b>'.$methodName.'</b> not defined in class <b>'.__CLASS__.'</b>; error in method <b>'.__METHOD__.'</b>'); + } + return; //only one cycle! + } + } + } + + //method to build the array of popup objects + public function popupBuild() + { + foreach ($this->_popupItemNames as $field => $itemName) + { +// if (array_key_exists($field,$this->_where)) +// { + $fieldClean = str_replace('n!',null,$field); + $itemNameClean = str_replace('n!',null,$itemName); + $fieldClean = $this->dropStartChar($fieldClean,'-'); + $itemNameClean = $this->dropStartChar($itemNameClean,'-'); + + //fields that have to be extracted + $queryFields = ($fieldClean === $itemNameClean) ? $fieldClean : $fieldClean.','.$itemNameClean; + + $table = $this->getTableName($field); + $this->popupArray[$field] = new Popup(); + + $popupWhereClause = array_key_exists($field,$this->_popupWhere) ? $this->_popupWhere[$field] : null; + + $result = $this->db->select($table,$queryFields,$popupWhereClause,$fieldClean); + + if ($result and $result !== false) + { + //get the label of the popup menu + $label = array_key_exists($field,$this->_popupLabels) ? $this->_popupLabels[$field] : $table.' : '.$itemNameClean; + $this->popupArray[$field]->name = $label; + + //get the table name + $fieldTable = isset($result[0][$table][$fieldClean]) ? $table : Params::$aggregateKey; + $itemNameTable = isset($result[0][$table][$itemNameClean]) ? $table : Params::$aggregateKey; + + foreach ($result as $row) + { + $this->popupArray[$field]->itemsValue[] = $row[$fieldTable][$fieldClean]; + + if (array_key_exists($field,$this->_popupFunctions)) + { + if (!function_exists($this->_popupFunctions[$field])) + { + throw new Exception('Error in <b>'.__METHOD__.'</b>: function <b>'.$this->_popupFunctions[$field]. '</b> does not exists'); + } + + $tempName = call_user_func($this->_popupFunctions[$field],$row[$itemNameTable][$itemNameClean]); + } + else + { + $tempName = $row[$itemNameTable][$itemNameClean]; + } + + $this->popupArray[$field]->itemsName[] = $tempName; + } + } +// } + } + } + + + //get the element before and after the current one + //$key: the key of the self::$where array that indicates the field to be used in order to find out the records before and after + //$fields: the fields that have to be extracted + public function getNeighbours($key,$fields = '') + { + //backup of the values + $tempWhere = $this->where; + $tempLimit = $this->limit; + $tempOrderBy = $this->orderBy; + $this->limit = 1; + //before + $this->where[$key] = '<'.$tempWhere[$key]; + $this->orderBy = $this->getTableName($key).'.'.$key.' DESC'; + $dataAfter = $this->getFields($fields); + //after + $this->where[$key] = '>'.$tempWhere[$key]; + $this->orderBy = $this->getTableName($key).'.'.$key; + $dataBefore = $this->getFields($fields); + //restore the previous values + $this->where = $tempWhere; + $this->limit = $tempLimit; + $this->orderBy = $tempOrderBy; + $result[0] = isset($dataBefore[0]) ? $dataBefore[0] : null; + $result[1] = isset($dataAfter[0]) ? $dataAfter[0] : null; + return $result; + } + + //set the $select property and return the current object + public function select($fields = null) + { + $this->select = $fields; + return $this; + } + + //set the $from property and return the current object + public function from($tables = null) + { + $this->from = isset($tables) ? $tables : $this->_tables; + return $this; + } + + //set the $on property and return the current object + public function on($joinClause = '-') + { + $this->on = $joinClause; + return $this; + } + + //set the $using property and return the current object + public function using($using = null) + { + $this->using = $using; + return $this; + } + + //set the $where property and return the current object + public function where($where = array()) + { + $this->where = $where; + return $this; + } + + //append the $where array to the ::where property and return the current object + public function aWhere($where = array()) + { + $this->appendWhereQueryClause($where); + return $this; + } + + //set the $groupBy property and return the current object + public function groupBy($groupBy = null) + { + $this->groupBy = $groupBy; + return $this; + } + + //set the $orderBy property and return the current object + public function orderBy($orderBy = null) + { + $this->orderBy = $orderBy; + return $this; + } + + //set the $limit property and return the current object + public function limit($limit = null) + { + $this->limit = $limit; + return $this; + } + + //set the $listArray property + public function toList($key, $value = null) + { + $this->listArray = array($key,$value); + $this->toList = true; + return $this; + } + + //reset all the clauses of the select query + public function clear() + { + $this->select = null; + $this->where = array(); + $this->groupBy = null; + $this->orderBy = null; + $this->limit = null; + $this->from = null; + $this->on = null; + $this->using = null; + $this->toList = false; + return $this; + } + + //initialize and populate the ::form property (reference to a Form_Form object) + public function setForm($defAction = null, $defSubmit = array(), $defMethod = 'POST') + { + if (isset($this->formStruct)) + { + $action = array_key_exists('action',$this->formStruct) ? $this->formStruct['action'] : $defAction; + $submit = array_key_exists('submit',$this->formStruct) ? $this->formStruct['submit'] : $defSubmit; + $entries = array_key_exists('entries',$this->formStruct) ? $this->formStruct['entries'] : null; + $method = array_key_exists('post',$this->formStruct) ? $this->formStruct['post'] : $defMethod; + + $this->form = new Form_Form($action,$submit,$method); + + if (isset($entries)) + { + $this->form->setEntries($entries); + } + + $copy = $this->form->entry; + + foreach ($copy as $name => $entry) + { + if (strcmp($entry->type,'Select') === 0 and isset($entry->options)) + { + if (!is_array($entry->options)) + { + if (strstr($entry->options,'foreign::')) + { + $elements = explode('::',$entry->options); + + for ($i = 0; $i < count($elements); $i++) + { + if (strcmp($elements[$i],'--') === 0) $elements[$i] = null; + } + //send the query + array_shift($elements); + $resultSet = call_user_func_array(array($this->db,'select'),$elements); + + $single = true; + + if (strstr($elements[1],',')) + { + $args = explode(',',$elements[1]); + //add the table name + $args[0] = $elements[0].'.'.$args[0]; + $args[1] = $elements[0].'.'.$args[1]; + //associative array + $single = false; + } + else + { + $args[0] = $elements[0].'.'.$elements[1]; + $args[1] = null; + } + + $list = $this->getList($resultSet,$args[0],$args[1]); + + $this->form->entry[$name]->options = ($single) ? implode(',',array_values($list)) : $list; + } + } + } + } + + } + else + { + $this->form = new Form_Form($defAction,$defSubmit,$defMethod); + } + } + + //get a list from a result set + //$resultSet: the result set coming from a select query + public function getList($resultSet, $key, $value = null) + { + $list = array(); + + if (strstr($key,'.')) + { + $arr = explode('.',$key); + $keyTable = $arr[0]; + $keyField = $arr[1]; + } + else + { + $keyTable = $this->_tablesArray[0]; + $keyField = $key; + } + + if (!isset($value)) + { + foreach ($resultSet as $row) + { + $list[] = $row[$keyTable][$keyField]; + } + } + else + { + if (strstr($value,'.')) + { + $arr = explode('.',$value); + $valueTable = $arr[0]; + $valueField = $arr[1]; + } + else + { + $valueTable = $this->_tablesArray[0]; + $valueField = $value; + } + + foreach ($resultSet as $row) + { + $list[$row[$keyTable][$keyField]] = $row[$valueTable][$valueField]; + } + + } + return $list; + } + + // Retrieves the ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT). + public function lastId() + { + return $this->db->lastId(); + } + + //send a free query + public function query($query) + { + return $this->db->query($query); + } + + //the text of the error message from previous MySQL operation + public function getError() + { + return $this->db->getError(); + } + + //the numerical value of the error message from previous MySQL operation + public function getErrno() + { + return $this->db->getErrno(); + } + + //define the abstract method to get the value of the record $id of the main table + abstract public function selectId($id); + + //define the abstract method to get the fields from the tables + abstract public function getFields(); + +}
\ No newline at end of file diff --git a/h-source/Library/Model/Map.php b/h-source/Library/Model/Map.php new file mode 100755 index 0000000..7a36c6f --- /dev/null +++ b/h-source/Library/Model/Map.php @@ -0,0 +1,439 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Model_Map extends Model_Base { + +// //many to many model + + public $printAssError = 'yes'; //'yes': print association error if the association/dissociation is already present. 'no': doen't print association error + public $boxIdentifierName = 'boxIdentifier';//key of the value of the $_POST array that represent the id of the Box that we want to associate with the Item having the id $_POST[$this->identifierName] + protected $_boxIdentifierValue = null; //the id of the box that has to be associated with the item + + public function __construct() + { + //add some submit names (method => form_submit_value) + $this->submitNames['associate'] = 'associateAction'; + $this->submitNames['dissociate'] = 'dissociateAction'; + //add the allowed methods + $this->_allowedDbMethods[] = 'associate'; + $this->_allowedDbMethods[] = 'dissociate'; + parent::__construct(); + } + + public function createMapWhere($choice) + { //create the where join clause + //$choice=(first,last,all) + if (isset($this->on)) + { + return $this->on; + } + else + { + $first = $this->_tablesArray[0].'.'.$this->_idFieldsArray[0].'='.$this->_tablesArray[2].'.'.$this->_idFieldsArray[0]; + $last = $this->_tablesArray[1].'.'.$this->_idFieldsArray[1].'='.$this->_tablesArray[2].'.'.$this->_idFieldsArray[1]; + switch ($choice) { + case 'first': + return $first; + break; + case 'last': + return $last; + break; + case 'all': + return $first. ' and '.$last; + break; + } + } + } + + //check if a join query is necessary or not + //$val: 0 or 1 (items or boxes) + //$whereClauseLevel: array containing the field=>value statements of the where clause. If $whereClause = null than $this->where is considered + public function checkIfJoinNeeded($val, $whereClauseLevel = null) + { + $whereClause = isset($whereClauseLevel) ? $whereClauseLevel : $this->where; + + foreach ($whereClause as $field => $value) + { + if (is_array($value)) + { + if ($this->checkIfJoinNeeded($val, $value) === true) return true; + } + else + { + if (strcmp($this->getTableName($field),$this->_tablesArray[$val]) !== 0) + { + if (strcmp($value,Params::$nullQueryValue) !== 0 or (Params::$nullQueryValue === false)) return true; + } + } + } + //return false if no where clause has been defined + return false; + } + + //method to create the where clause and the list of tables of the select query + public function mapQueryElements($val) + { +// $val = $element === 'Items' ? 0 : 1; + $tables = $this->_tablesArray[$val]; + $where = null; + $fields = $this->_tablesArray[$val].'.*'; + + if ($this->checkIfJoinNeeded($val)) + { + $tables = $this->_tables; + $fields = $this->_tablesArray[$val].'.*'; + $wherePlus = $this->createWhereClause(); + $wherePlus = isset($wherePlus) ? ' AND ' . $wherePlus : null; + $where = $this->createMapWhere('all') . $wherePlus; + } + else + { + $where = $this->createWhereClause(); + } + + return array('tables' => $tables,'where' => $where,'fields' => $fields); + } + + //$element: Items or Boxes. + //get all Item or Boxes + public function getAll($element = 'Items') + { + return $this->getFields('',$element); + } + + //method to get the values of the selected fields + //$fields: the fields that have to be excracted from the tableName + public function getFields($fields = '',$element = 'Items') + { + //get all Item or Boxes + if ((strcmp($element,'Items') !== 0) and (strcmp($element,'Boxes') !== 0)) + { + throw new Exception('<b>"'.$element. '"</b> argument not allowed in <b>'.__METHOD__.'</b> method'); + } + $val = $element === 'Items' ? 0 : 1; + + $elements = $this->mapQueryElements($val); + + $queryFields = (strcmp($fields,'') === 0) ? $elements['fields'] : $fields; + + return $row = $this->db->select($elements['tables'],$queryFields,$elements['where'],$this->groupBy,$this->orderBy,$this->limit); + + } + + public function send($element = 'Items') + { + $table = $this->getFields($this->select, $element); + + if ($this->toList) + { + $key = $this->listArray[0]; + $value = isset($this->listArray[1]) ? $this->listArray[1] : null; + $this->toList = false; + return $this->getList($table, $key, $value); + } + else + { + return $table; + } + } + + //the fields that have to be extracted from the table + public function getTable($fields = null) + { + return isset($fields) ? $this->getFields($fields) : $this->getAll(); + } + + //select the values of a specified record + //$id: the id (primary key) of the record + //$fields: the comma separated list of fields that have to be extracted + public function selectId($id,$fields = null) + { + $id = (int)$id; + $this->setWhereQueryClause(array($this->_idFieldsArray[0] => $id)); + + if (isset($fields)) + { + $values = $this->getFields($fields,'Items'); + } + else + { + $values = $this->getAll('Items'); + } + + return (count($values) > 0) ? $values[0][$this->_tablesArray[0]] : array(); + } + + //get the number of records (items or boxes) + public function recordNumber($element) + { + $val = $element === 'Items' ? 0 : 1; + + $elements = $this->mapQueryElements($val); + return $this->db->get_num_rows($elements['tables'],$elements['where'],$this->groupBy); + } + + //get the number of records (only items) + public function rowNumber() + { + return $this->recordNumber('Items'); + } + + public function getMax($field) + { + $elements = $this->mapQueryElements(0); + return $this->db->getMax($elements['tables'],$field,$elements['where'],$this->groupBy); + } + + public function getMin($field) + { + $elements = $this->mapQueryElements(0); + return $this->db->getMin($elements['tables'],$field,$elements['where'],$this->groupBy); + } + + public function getSum($field) + { + $elements = $this->mapQueryElements(0); + return $this->db->getSum($elements['tables'],$field,$elements['where'],$this->groupBy); + } + + public function getAvg($field) + { + $elements = $this->mapQueryElements(0); + return $this->db->getAvg($elements['tables'],$field,$elements['where'],$this->groupBy); + } + + //check if the table has the field $field equal to $value + public function has($field,$value) + { + $elements = $this->mapQueryElements(0); + return $this->db->recordExists($elements['tables'],$field,$value,$elements['where'],$this->groupBy); + } + + //associate an item with a box + //$idItem : name of the field of the Items table, $idGroup : name of the field of the Boxes table + public function associate($idItem = null,$idGroup = null) + { + $this->queryResult = false; + if (isset($idItem) and isset($idGroup)) + { + $idItem = (int)$idItem; + $idGroup = (int)$idGroup; + $values = array($idItem,$idGroup); //values relative to the fields $this->_idFields + $var = $this->checkAssociation($idItem,$idGroup); + if (!$var) + { + $result = $this->db->insert($this->_tablesArray[2],$this->_idFields,$values); + $this->setNotice($result); + return $result; + } + else + { + if (strcmp($this->printAssError,'yes') === 0) $this->notice = $this->_resultString->getString('linked'); + $this->result = false; + } + } + else + { + $this->notice = $this->_resultString->getString('no-id'); + $this->result = false; + } + return false; + } + + //associate an item with a box + //$idItem : name of the field of the Items table, $idGroup : name of the field of the Boxes table + public function dissociate($idItem = null,$idGroup = null) + { + $this->queryResult = false; + if (isset($idItem) and isset($idGroup)) + { + $idItem = (int)$idItem; + $idGroup = (int)$idGroup; + $var = $this->checkAssociation($idItem,$idGroup); + if ($var) + { + $result = $this->db->del($this->_tablesArray[2],$this->_idFieldsArray[0].'='.$idItem.' and '.$this->_idFieldsArray[1].'='.$idGroup); + $this->setNotice($result); + return $result; + } + else + { + if (strcmp($this->printAssError,'yes') === 0) $this->notice = $this->_resultString->getString('not-linked'); + $this->result = false; + } + } + else + { + $this->notice = $this->_resultString->getString('no-id'); + $this->result = false; + } + return false; + } + + public function checkAssociation($idItem,$idGroup) + { + $idItem = (int)$idItem; + $idGroup = (int)$idGroup; + $numRow = $this->db->get_num_rows($this->_tablesArray[2],$this->_idFieldsArray[0].'='.$idItem.' and '.$this->_idFieldsArray[1].'='.$idGroup); + if ($numRow === 1) + { + return true; + } + else + { + return false; + } + } + + //check what items are associate to a box + //itemsArray:array of items to check + public function checkAssociationDeep($itemsArray) + { + $associatedItems = array(); + $itemsArray = is_array($itemsArray) ? array_values($itemsArray) : array($itemsArray); + foreach ($itemsArray as $item) { + if ($this->db->recordExists($this->_tablesArray[2],$this->_idFieldsArray[0],$item)) + { + $associatedItems[] = $item; + } + } + return $associatedItems; + } + + //method to call the delete query (overriding of the del method of Model.php) + //check the referential integrity + public function del($id = null, $whereClause = null) + { + $this->queryResult = false; + + if (isset($whereClause)) + { + return parent::del(null,$whereClause); + } + else + { + if ($this->_onDelete === 'check') + { + if ($this->db->recordExists($this->_tablesArray[2],$this->_idFieldsArray[0],(int)$id)) + { + $this->notice = $this->_resultString->getString('associate'); + $this->identifierValue = null; + $this->result = false; + } + else + { + return parent::del((int)$id); + } + } + else if ($this->_onDelete === 'nocheck') + { + return parent::del((int)$id); + } + } + return false; + } + + //override of the updateTable method of the parent class + //method that calls the function indicated in $this->submitNames. Ex: if $_POST['delAction'] is found, then the "del" method is called. + public function updateTable($methodsList = '',$id = null) + { + $allowedMethodsArray = explode(',',$methodsList); + $resultArray = array(); + $this->identifierValue = null; + if (isset($id)) + { + $this->identifierValue = (int)$id; + } + else if (isset($_POST[$this->identifierName])) + { + $this->identifierValue = (int)$_POST[$this->identifierName]; + } + foreach ($this->submitNames as $methodName => $submitName) { + if (array_key_exists($submitName,$_POST)) + { + $this->submitName = $submitName; + if (method_exists($this,$methodName)) + { + if (in_array($methodName,$allowedMethodsArray)) + { + if ($this->checkConditions($methodName,$this->identifierValue)) + { + $this->notice = null; + $methodArray = array('associate','dissociate'); + if (in_array($methodName,$methodArray)) + { + $this->_boxIdentifierValue = null; + if (isset($_POST[$this->boxIdentifierName])) + { + $this->_boxIdentifierValue = (int)$_POST[$this->boxIdentifierName]; + } + call_user_func_array(array($this,$methodName),array($this->identifierValue,$this->_boxIdentifierValue)); + } + else + { + call_user_func_array(array($this,$methodName),array($this->identifierValue)); + } + } + } + } + else + { + throw new Exception('method "'.$methodName. '" not defined in class '.__CLASS__.'; error in method '.__METHOD__); + } + return; //only one cycle! + } + } + } + + //method to obtain one columns from the tables $this->_tablesArray as an associative array + //$valueField: the column that have to be extracted (array_values of the resulting associative array), $keyField: the column that have to play the role of array_keys + //$valueField = field:table, $keyField = field:table + public function getFieldArray($valueField,$keyField = null, $groupBy = null, $orderBy = null, $limit = null) + { + + $keyField = isset($keyField) ? $keyField : $valueField; + $valueFieldArray = explode(':',$valueField); + $keyFieldArray = explode(':',$keyField); + + $keyFieldTable = $keyFieldArray[0]; + $valueFieldTable = $valueFieldArray[0]; + + $keyFieldName = $keyFieldArray[1]; + $valueFieldName = $valueFieldArray[1]; + + $fields = implode('.',$keyFieldArray) . ',' . implode('.',$valueFieldArray); + + $temp = $this->where; //save the $this->where array + $this->where = array(); + + $val = array_search($keyFieldTable,$this->_tablesArray); + + if (strcmp($keyFieldTable,$valueFieldTable) !== 0) + { + throw new Exception("the tables '$valueFieldTable' and '$keyFieldTable' do not match in ".__METHOD__); + } + + if ($val === false or !in_array($val,array(0,1))) + { + throw new Exception("the table '$keyFieldTable' is not allowed in ".__METHOD__); + } + + $elements = $this->mapQueryElements($val); + + $table = $this->db->select($elements['tables'],$fields,$elements['where'],$groupBy,$orderBy,$limit); + $this->where = $temp; + + $returnArray = array(); + foreach ($table as $record) { + $returnArray[$record[$keyFieldTable][$keyFieldName]] = $record[$valueFieldTable][$valueFieldName]; + } + + return $returnArray; + + } + +}
\ No newline at end of file diff --git a/h-source/Library/Model/Tree.php b/h-source/Library/Model/Tree.php new file mode 100755 index 0000000..d7b655d --- /dev/null +++ b/h-source/Library/Model/Tree.php @@ -0,0 +1,287 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Model_Tree extends Model_Base { + + public function __construct() { + parent::__construct(); + } + + //method to create the first part of where clause + //$index: the index of $this->_tablesArray + public function createTreeWhere($index) { + if (isset($this->on)) + { + return $this->on; + } + else + { + $whereArray = array(); + for ($i = $index; $i < (count($this->_tablesArray)-1); $i++) + { + $whereArray[] = $this->_tablesArray[$i].'.'.$this->_idFieldsArray[$i+1].'='.$this->_tablesArray[$i+1].'.'.$this->_idFieldsArray[$i+1]; + } + $whereString = !empty($whereArray) ? implode(' and ',$whereArray) : null; + return $whereString; + } + } + + //create the list of tables of the select query + //$index: the index of $this->_tablesArray + public function createTablesList($index) { + if (isset($this->from)) + { + return $this->from; + } + else + { + $tablesString = null; + for ($i = $index; $i < (count($this->_tablesArray)-1); $i++) + { + $tablesString .= $this->_tablesArray[$i] . ','; + } + $tablesString .= $this->_tablesArray[count($this->_tablesArray)-1]; + return $tablesString; + } + } + + //method to create the list of fields of the select query + public function createFieldsList($index) { + $fieldsString = null; + for ($i = $index; $i < (count($this->_tablesArray)-1); $i++) + { + $fieldsString .= $this->_tablesArray[$i] . '.*,'; + } + $fieldsString .= $this->_tablesArray[count($this->_tablesArray)-1].'.*'; + return $fieldsString; + } + + + //method to create the where clause and the list of tables and fields of the select query + //$tableName: the table name ($this->_tablesArray) + //$choice:all->all the tables in $this->_arrayTables, other value->only the table of $this->_arrayTables ad index $index + //return: $elements = array('tables'=>$tables,'where'=>$where,'fields'=>$fields) + public function treeQueryElements($tableName,$choice = 'all') + { + $index = array_search($tableName,$this->_tablesArray); + $subArray = ($choice === 'all') ? array_slice($this->_tablesArray,$index) : array($tableName); //this array is necessary to verify that the where clause makes sense + $tables = ($choice === 'all') ? $this->createTablesList($index) : $tableName; + $where = ($choice === 'all') ? $this->createTreeWhere($index) : null; + $fields = ($choice === 'all') ? $this->createFieldsList($index) : $tableName.'.*'; + + $wherePlus = $this->createWhereClause(); + + if (!isset($this->on)) + { + $on = null; + + if (isset($where) and isset($wherePlus)) + { + $where .= ' AND ' . $wherePlus; + } + else if (!isset($where) and isset($wherePlus)) + { + $where .= $wherePlus; + } + } + else + { + $on = (strcmp($where,'-') !== 0) ? $where : null; + $where = $wherePlus; + } + + return array('tables' => $tables,'where' => $where,'fields'=>$fields,'on'=>$on); + } + + + //method to obtain the values of the whole tree + //$choice:all->all the tables in $this->_arrayTables, other value->only the table of $this->_arrayTables ad index $index + public function getAll($choice = 'all') { + return $this->getFields('',$choice); + } + + //method to get the values of the selected fields + //it walks the tree by means of a join query + //$fields: the fields that have to be excracted from the tableName + public function getFields($fields = '',$choice = 'all') + { + $elements = $this->treeQueryElements($this->_tablesArray[0],$choice); + + $queryFields = (strcmp($fields,'') === 0) ? $elements['fields'] : $fields; + + return $row = $this->db->select($elements['tables'],$queryFields,$elements['where'],$this->groupBy,$this->orderBy,$this->limit,$elements['on'],$this->using); + } + + public function send() + { + $table = $this->getFields($this->select); + + if ($this->toList) + { + $key = $this->listArray[0]; + $value = isset($this->listArray[1]) ? $this->listArray[1] : null; + $this->toList = false; + return $this->getList($table, $key, $value); + } + else + { + return $table; + } + } + + //call the getAll method with $tableName = $this->_tablesArray[0] + //the fields that have to be extracted from the table + public function getTable($fields = null) { + return isset($fields) ? $this->getFields($fields) : $this->getAll(); + } + + //select the values of a specified record + //$id: the id (primary key) of the record + //$fields: the comma separated list of fields that have to be extracted + public function selectId($id,$fields = null) { + $this->setWhereQueryClause(array($this->_idFieldsArray[0] => (int)$id)); + + $this->using = null; + + if (isset($fields)) + { + $values = $this->getFields($fields,'other'); + } + else + { + $values = $this->getAll('other'); + } + + return (count($values) > 0) ? $values[0][$this->_tablesArray[0]] : array(); + + } + + //get the number of records () + //the number of records of the table $tableName is returned + public function rowNumber() { + $elements = $this->treeQueryElements($this->_tablesArray[0]); + return $this->db->get_num_rows($elements['tables'],$elements['where'],$this->groupBy,$elements['on'],$this->using); + } + + public function getMax($field) + { + $elements = $this->treeQueryElements($this->_tablesArray[0]); + return $this->db->getMax($elements['tables'],$field,$elements['where'],$this->groupBy,$elements['on'],$this->using); + } + + public function getMin($field) + { + $elements = $this->treeQueryElements($this->_tablesArray[0]); + return $this->db->getMin($elements['tables'],$field,$elements['where'],$this->groupBy,$elements['on'],$this->using); + } + + public function getSum($field) + { + $elements = $this->treeQueryElements($this->_tablesArray[0]); + return $this->db->getSum($elements['tables'],$field,$elements['where'],$this->groupBy,$elements['on'],$this->using); + } + + public function getAvg($field) + { + $elements = $this->treeQueryElements($this->_tablesArray[0]); + return $this->db->getAvg($elements['tables'],$field,$elements['where'],$this->groupBy,$elements['on'],$this->using); + } + + //check if the table has the field $field equal to $value + public function has($field,$value) + { + $elements = $this->treeQueryElements($this->_tablesArray[0]); + return $this->db->recordExists($elements['tables'],$field,$value,$elements['where'],$this->groupBy,$elements['on'],$this->using); + } + +// //get the number of records of the table $this->_tablesArray[0] +// public function rowNumber() { +// return $this->recordNumber($this->_tablesArray[0]); +// } + + //method to call the delete query (overriding of the del method of Model.php) + //check the referential integrity + public function del($id = null, $whereClause = null) + { + $this->queryResult = false; + + if (isset($whereClause)) + { + return parent::del(null,$whereClause); + } + else + { + if ($this->_onDelete === 'check' and isset($this->_reference)) + { + if (isset($this->_reference[0]) and isset($this->_reference[1])) + { + if ($this->db->recordExists($this->_reference[0],$this->_reference[1],(int)$id)) + { + $this->notice = $this->_resultString->getString('associate'); + $this->identifierValue = null; + $this->result = false; + } + else + { + return parent::del((int)$id); + } + } + else + { + throw new Exception('you have forgotten to set \'$this->_reference\' or you have forgotten to set $this->_onDelete = \'nocheck\''); + } + } + else + { + return parent::del((int)$id); + } + } + return false; + } + + //method to obtain one columns from the tables $this->_tablesArray as an associative array + //$valueField: the column that have to be extracted (array_values of the resulting associative array), $keyField: the column that have to play the role of array_keys + public function getFieldArray($valueField,$keyField = null, $groupBy = null, $orderBy = null, $limit = null) { + + $keyField = isset($keyField) ? $keyField : $valueField; + $valueFieldArray = explode(':',$valueField); + $keyFieldArray = explode(':',$keyField); + + $keyFieldTable = $keyFieldArray[0]; + $valueFieldTable = $valueFieldArray[0]; + + $keyFieldName = $keyFieldArray[1]; + $valueFieldName = $valueFieldArray[1]; + + $fields = implode('.',$keyFieldArray) . ',' . implode('.',$valueFieldArray); + + $temp = $this->where; //save the $this->where array + $this->where = array(); + + if (strcmp($keyFieldTable,$valueFieldTable) !== 0) { + throw new Exception("the tables '$valueFieldTable' and '$keyFieldTable' do not match in ".__METHOD__); + } + + if (!in_array($keyFieldTable,$this->_tablesArray)) { + throw new Exception("the table '$keyFieldTable' is not allowed in ".__METHOD__); + } + + $elements = $this->treeQueryElements($keyFieldTable,''); + + $table = $this->db->select($elements['tables'],$fields,$elements['where'],$groupBy,$orderBy,$limit,$elements['on'],$this->using); + $this->where = $temp; + + $returnArray = array(); + foreach ($table as $record) { + $returnArray[$record[$keyFieldTable][$keyFieldName]] = $record[$valueFieldTable][$valueFieldName]; + } + + return $returnArray; + + } + +}
\ No newline at end of file diff --git a/h-source/Library/Model/index.html b/h-source/Library/Model/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Model/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/Params.php b/h-source/Library/Params.php new file mode 100644 index 0000000..9ec0ba5 --- /dev/null +++ b/h-source/Library/Params.php @@ -0,0 +1,37 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class containing all the parameters necessary to EasyGiant to work properly +class Params +{ + + public static $allowedDb = array('Mysql','Mysqli','None'); //allowed database type + + public static $allowedSanitizeFunc = 'sanitizeAll,sanitizeDb,sanitizeHtml,forceInt,forceNat,none,md5,sha1'; //allowed sanitize functions + + public static $allowedHashFunc = array('md5','sha1'); //allowed hash functions + + //conventional null value for the value of the field in the createWhereClause method of the Model class + public static $nullQueryValue = false; + + //class name of the div that contains the error strings + public static $errorStringClassName = 'alert'; + + //table name in the returning structure of the select queries in the case of an aggregate function. Ex count(*),sum(*) + public static $aggregateKey = 'aggregate'; + + //htmlentities function charset + //see http://php.net/manual/en/function.htmlentities.php for a complete list of the allowed values + public static $htmlentititiesCharset = DEFAULT_CHARSET; + + //list of symbols used in the statements of the where clause of the select queries + public static $whereClauseSymbolArray = array('<','>','!=','<=','>=','in(','not in('); + + //is the mbstring extension enabled? + public static $mbStringLoaded = false; + +}
\ No newline at end of file diff --git a/h-source/Library/Popup.php b/h-source/Library/Popup.php new file mode 100755 index 0000000..55ea7f5 --- /dev/null +++ b/h-source/Library/Popup.php @@ -0,0 +1,15 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to contain the values of the popup menù of the scaffold +class Popup { + + public $name; //the name of the popup + public $itemsName = array(); //array containing the names of the different items of the list (popup) + public $itemsValue = array(); //array containing the values of the different items of the list (popup) + +} diff --git a/h-source/Library/Request.php b/h-source/Library/Request.php new file mode 100644 index 0000000..12bf16c --- /dev/null +++ b/h-source/Library/Request.php @@ -0,0 +1,39 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//manage the associative arrays inside the request ($_GET,$_POST,$_COOKIE) +class Request +{ + + public function get($name, $default = null, $func = 'none') + { + if (!function_exists($func)) + { + throw new Exception('Error in <b>'.__METHOD__.'</b>: function <b>'.$func. '</b> does not exists'); + } + return isset($_GET[$name]) ? call_user_func($func,$_GET[$name]) : $default; + } + + public function post($name, $default = null, $func = 'none') + { + if (!function_exists($func)) + { + throw new Exception('Error in <b>'.__METHOD__.'</b>: function <b>'.$func. '</b> does not exists'); + } + return isset($_POST[$name]) ? call_user_func($func,$_POST[$name]) : $default; + } + + public function cookie($name, $default = null, $func = 'none') + { + if (!function_exists($func)) + { + throw new Exception('Error in <b>'.__METHOD__.'</b>: function <b>'.$func. '</b> does not exists'); + } + return isset($_COOKIE[$name]) ? call_user_func($func,$_COOKIE[$name]) : $default; + } + +}
\ No newline at end of file diff --git a/h-source/Library/Scaffold.php b/h-source/Library/Scaffold.php new file mode 100755 index 0000000..2ac3fa5 --- /dev/null +++ b/h-source/Library/Scaffold.php @@ -0,0 +1,272 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +//class to manage the scaffold of the controller +class Scaffold +{ + + protected $_type = null; //the type of the scaffold. It can be 'main' or 'form' + protected $_queryType = null; //it can be insert or update + + protected $_primaryKey = null; //the primary key of the table + protected $_controller = null; //the name of the controller + + public $model = null; //the reference to the model associated with the controller + + public $viewArgs = array(); //the associative array representing the status args of the main action of the controller. + + public $params = array(); //associative array containing the parameters of the scaffold + public $html = array(); //associative array containing the HTML of the scaffold ('pageList'=>HTML,..) + + public $mainMenu = null; //the reference to the MenuHelper object + public $pageList = null; //the reference to the PageDivisionHelper object + public $itemList = null; //the reference to the ListHelper object + public $popupMenu = null; //the reference to the PopupHelper object + + public $form = null; //the reference to the form object + public $entries = null; //the entries of the form (string having entries separated by comma) + public $values = array(); //the values inserted in the form (taken from the table if $this->queryType === 'update' or if an error occured during the databse query, otherwise taken from the $_POST array) + + //the list of fields of the select query + public $fields = null; + + public function __construct($type,$controller,$model,$viewArgs,$params = null) { + + $this->_type = $type; + $this->_controller = $controller; + $this->model = $model; + $this->viewArgs = $viewArgs; + + $autoParams = array( + 'mainAction' => 'main', + 'modifyAction' => 'form/update', + 'associateAction' => 'associate', + 'panelController' => 'panel', + 'pageList' => true, + 'pageVariable' => 'page', + 'recordPerPage' => 10, + 'mainMenu' => 'panel,add', + 'formMenu' => 'panel,back', + 'postSubmitValue' => 'Save', + 'popup' => false, + 'popupType' => 'exclusive' + ); + + //set the $this->scaffold->params array + if (is_array($params)) { + foreach ($params as $key => $value) { + $autoParams[$key] = $value; + } + } + $this->params = $autoParams; + + } + + //ad some clauses to the select query + //whereArray = array ($table_field => $value) + public function appendWhereQueryClause($whereArray) + { + $this->model->appendWhereQueryClause($whereArray); + } + + //set clauses to the select query + //whereArray = array ($table_field => $value) + public function setWhereQueryClause($whereArray) + { + $this->model->setWhereQueryClause($whereArray); + } + + //initialize the main scaffold (ListHelper) + //$recordList: field of the table to show, $primaryKey: the key of the table + public function loadMain($recordList,$primaryKey,$theme = 'edit,del') + { + $this->_primaryKey = $primaryKey; + + $recordListArray = explode(',',$recordList); + foreach ($recordListArray as $record) { + $this->itemList->addItem("simpleText",";$record;"); + } + + $themeArray = explode(',',$theme); + + foreach ($themeArray as $el) + { + switch ($el) + { + case 'moveup': + $this->itemList->addItem('moveupForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey); + break; + case 'movedown': + $this->itemList->addItem('movedownForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey); + break; + case 'link': + $this->itemList->addItem('associateForm',$this->_controller.'/'.$this->params['associateAction'],$primaryKey); + break; + case 'edit': + $this->itemList->addItem('editForm',$this->_controller.'/'.$this->params['modifyAction'],$primaryKey); + break; + case 'del': + $this->itemList->addItem('delForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey); + break; + } + } + + } + + //initialize the form + //$queryType = insert/update + //$action: the action of the form (controller/action/queryString) + public function loadForm($queryType,$action) + { + $this->queryType = $queryType; + $submitName = $this->model->getSubmitName($queryType); + $value = $this->params['postSubmitValue']; + $viewStatus = Url::createUrl(array_values($this->viewArgs)); + $this->model->setForm($action.$viewStatus,array($submitName => $value),'POST'); + $this->form = $this->model->form; + } + + //function to obtain the values to use in the form + //$func = function to validate the values + //$id = the id of the record (used if $_POST[$this->m[$this->model]->identifierName] is not present) + public function getFormValues($func = 'sanitizeHtml',$id = null,$defaultValues = array(),$functionsIfFromDb = array()) + { + if ($this->_type === 'form') + { + $this->values = $this->model->getFormValues($this->queryType,$func,$id,$defaultValues,$functionsIfFromDb); + } + } + + //set the head of the table + //$columnsName: name of the columns. It has to be a comma-separated list of strings + public function setHead($columnsName) + { + $this->itemList->setHead($columnsName); + } + + //method to set the type of the entries of the form + //$entries: string containing the list of the entries where each entry is separated by comma: entry1,entry2,entry3 + //$entryType: associative array that describes the entries of the form. The key is the entry name while the value is the entry type (textarea,inputText,etc) + public function setFormEntries($entries = 'model',$entryType = array(),$optionsArray = array()) + { + if ($this->_type === 'form') + { + if ($entries === 'model') + { + $this->entries = $this->model->fields; + if ($this->queryType === 'update') + { + $this->entries .= ','. $this->model->identifierName; + } + } + else + { + $this->entries = null; + } + $entriesArray = explode(',',$this->entries); + if (isset($this->form)) + { + foreach ($entriesArray as $entry) + { + $type = isset($entryType[$entry]) ? $entryType[$entry] : 'InputText'; + $options = isset($optionsArray[$entry]) ? $optionsArray[$entry] : null; + $this->form->setEntry($entry,$type,$options); + } + if ($this->queryType === 'update') + { + $this->form->setEntry($this->model->identifierName,'Hidden'); + } + } + else + { + throw new Exception('form object has not been initialized. Call the <b>scaffold->loadForm</b> method before'); + } + } + } + + //add an item to the list of items + public function addItem($type, $action = '', $field = '', $name = '') { + if ($this->_type === 'main') { + $this->itemList->addItem($type, $action, $field, $name); + } + } + + //update the table + public function update($methodsList = '',$id = null) { + $this->model->updateTable($methodsList,$id); + } + + //method to create the HTML of the scaffold + //$values: the values to insert in the from entries + public function render($values = null,$subset = null) + { + + if ($this->_type === 'main') + { + + $recordNumber = $this->model->rowNumber(); + + if (isset($this->viewArgs[$this->params['pageVariable']])) + { + $page = $this->viewArgs[$this->params['pageVariable']]; + } + else + { + $this->params['pageList'] = false; + } + + $recordPerPage = $this->params['recordPerPage']; + + if ($this->params['pageList'] === true) + { + $this->model->limit = $this->pageList->getLimit($page,$recordNumber,$recordPerPage); + $this->html['pageList'] = $this->pageList->render((int)($page-2),5); + $position = array($page,$this->pageList->getNumbOfPages()); + } + else + { + $this->model->limit = null; + $this->html['pageList'] = null; + $position = array(1,1); + } + + $values = $this->model->getTable($this->fields); + + $primaryKey = $this->_primaryKey; + + //pass the variable position + $this->itemList->position = $position; + $this->html['main'] = $this->itemList->render($values); + + $this->html['menu'] = $this->mainMenu->render($this->params['mainMenu']); + + $popupHtml = null; + if ($this->params['popup'] === true) + { + $this->html['popup'] = $this->popupMenu->render(); + $popupHtml = "<div class='verticalMenu'>\n".$this->html['popup']."\n</div>\n"; + } + + $this->html['all'] = "<div class='mainMenu'>".$this->html['menu']."</div>\n".$this->model->notice."\n $popupHtml \n<div class='recordsBox'>\n".$this->html['main']."\n</div>\n"."<div class='viewFooter'>\n<div class='pageList'>\n".$this->html['pageList']."</div>\n</div>\n\n"; + + } + else if ($this->_type === 'form') + { + + $subset = (!isset($subset)) ? $this->entries : $subset; + $values = (!isset($values)) ? $this->values : $values; + $this->html['menu'] = $this->mainMenu->render($this->params['formMenu']); + $this->html['main'] = $this->form->render($values,$subset); + $this->html['all'] = "<div class='mainMenu'>\n".$this->html['menu']."\n</div>\n".$this->model->notice."\n<div class='scaffold_form'>\n".$this->html['main']."</div>\n"; + + } + + return $this->html['all']; + + } + +}
\ No newline at end of file diff --git a/h-source/Library/Strings/Functions.php b/h-source/Library/Strings/Functions.php new file mode 100644 index 0000000..eabc0d8 --- /dev/null +++ b/h-source/Library/Strings/Functions.php @@ -0,0 +1,30 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + + +function eg_strlen($string) +{ + return Params::$mbStringLoaded === true ? mb_strlen($string,DEFAULT_CHARSET) : strlen($string); +} + + +function eg_strtoupper($string) +{ + return Params::$mbStringLoaded === true ? mb_strtoupper($string,DEFAULT_CHARSET) : strtoupper($string); +} + + +function eg_strtolower($string) +{ + return Params::$mbStringLoaded === true ? mb_strtolower($string,DEFAULT_CHARSET) : strtolower($string); +} + + +// function eg_substr($string, $start, $length) +// { +// return Params::$mbStringLoaded === true ? mb_strtolower($string,DEFAULT_CHARSET) : strtolower($string); +// }
\ No newline at end of file diff --git a/h-source/Library/Theme.php b/h-source/Library/Theme.php new file mode 100755 index 0000000..692697e --- /dev/null +++ b/h-source/Library/Theme.php @@ -0,0 +1,79 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Theme { + + protected $_data = array(); + protected $_viewFiles = array(); //view files to require + protected $_lastView = null; + + public $baseUrl = null; //the base url of the website: http://domainname + public $baseUrlSrc = null; //the base url of the website (http://domainname) in the case MOD_REWRITE_MODULE has been set to false + + public $viewArgs = array(); + public $viewStatus = ''; + public $controller = 'controller'; + public $action = ''; + public $currPage; //the URL of the current page + + function __construct($controller) { + $this->controller = $controller; + $this->baseUrl = MOD_REWRITE_MODULE === true ? 'http://' . DOMAIN_NAME : 'http://' . DOMAIN_NAME . '/index.php'; + $this->baseUrlSrc = 'http://' . DOMAIN_NAME; + } + + + public function set($values) + { + $this->_data = $values; + } + + public function append($values) + { + $this->_data = array_merge($this->_data,$values); + } + + //clean the $this->viewFiles array + public function clean() { + $this->_viewFiles = array(); + $this->_lastView = null; + } + + public function load($fileName,$option = 'none') { + if ((strcmp($option,'last') !== 0) and (strcmp($option,'none') !== 0)) { + throw new Exception('"'.$option. '" argument not allowed in '.__METHOD__.' method'); + } + if ($option === 'last') { + $this->_lastView = $fileName; + } else { + $this->_viewFiles[] = $fileName; + } + } + + + public function render() { + extract($this->_data); + + foreach ($this->_viewFiles as $file) { + if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . ucwords($this->controller) . DS . $file . '.php')) { + include (ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . ucwords($this->controller) . DS . $file . '.php'); + } else { + include (ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . $file . '.php'); + } + } + + if (isset($this->_lastView)) { + if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . ucwords($this->controller) . DS . $this->_lastView . '.php')) { + include (ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . ucwords($this->controller) . DS . $this->_lastView . '.php'); + } else { + include (ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . $this->_lastView . '.php'); + } + } + + } + +} diff --git a/h-source/Library/Url.php b/h-source/Library/Url.php new file mode 100755 index 0000000..4e2ca5e --- /dev/null +++ b/h-source/Library/Url.php @@ -0,0 +1,36 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Url { + + //get the url starting from the root folder + public static function getRoot($pathFromRootFolder = null) { + $url = MOD_REWRITE_MODULE === true ? 'http://' . DOMAIN_NAME . '/' . $pathFromRootFolder : 'http://' . DOMAIN_NAME . '/index.php/' . $pathFromRootFolder; + return $url; + } + + //create an url string (element1/element2/element4) from the values of the array $valuesArray considering only the elements indicated in the numeric string $numericString (in this case '1,2,4') + public function createUrl($valuesArray,$numericString = null) { + $elementsArray = explode(',',$numericString); + $valuesArray = array_values($valuesArray); + $urlString = null; + for ($i = 0; $i < count($valuesArray); $i++) + { + if (isset($numericString)) { + if (isset($valuesArray[$i]) and in_array($i,$elementsArray)) { + $urlString .= "/".$valuesArray[$i]; + } + } else { + if (isset($valuesArray[$i])) { + $urlString .= "/".$valuesArray[$i]; + } + } + } + return $urlString; + } + +} diff --git a/h-source/Library/Users/CheckAdmin.php b/h-source/Library/Users/CheckAdmin.php new file mode 100755 index 0000000..9a47b16 --- /dev/null +++ b/h-source/Library/Users/CheckAdmin.php @@ -0,0 +1,369 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +if (!defined('EG')) die('Direct access not allowed!'); + +class Users_CheckAdmin { + + public $status = array(); + + protected $_sessionsTable; //table containing all the sessions + protected $_usersTable; //table containing all the users + protected $_groupsTable; //table containing all the groups + protected $_manyToManyTable; //table for many to many relationships + protected $_accessesTable; //table containing all the accesses to admin side + protected $uid = null; + protected $_token = null; //token used in order to defense against CSRF (cross sire request forgeries) + protected $_login; //login action + protected $_main; //main action + protected $_retype; //retype (the password) action + protected $_db; //reference to the database layer class + protected $_params = array(); //the parameters of the object + + public function __construct($params = null) { + $this->_params = $params; + + $this->_sessionsTable = $params['sessionsTable']; + $this->_usersTable = $params['usersTable']; + $this->_groupsTable = $params['groupsTable']; + $this->_manyToManyTable = $params['manyToManyTable']; + $this->_accessesTable = $params['accessesTable']; + $this->_login = Url::getRoot(null) . $params['users_controller'] . '/' . $params['users_login_action'] ; + $this->_main = Url::getRoot(null) . $params['panel_controller'] . '/' . $params['panel_main_action'] ; + $this->_retype = Url::getRoot(null) . $params['users_controller'] . '/' . $params['hijacking_action'] ; + $this->_db = Factory_Db::getInstance($params['database_type']); + } + + private function acquireCookie() { #obtain cookie + #cookie + $this->uid = NULL; + global $_COOKIE; + $this->uid = isset($_COOKIE[$this->_params['cookie_name']]) ? sanitizeAlnum($_COOKIE[$this->_params['cookie_name']]) : null; + } + + private function cleanSessions() + { + #cancello le sessioni scadute + $row = $this->_db->select($this->_sessionsTable,'creation_date',"uid='".$this->uid."'"); + if ($row) + { + if ($row[0][$this->_sessionsTable]['creation_date']) + { + if($row[0][$this->_sessionsTable]['creation_date'] + $this->_params['session_expire'] <= time()) + { + setcookie($this->_params['cookie_name'],'',time()-3600,$this->_params['cookie_path']); + } + } + } + $this->_db->del($this->_sessionsTable,"creation_date + " . $this->_params['session_expire'] . " <= ".time()); + } + + public function checkStatus() + { #controlla se l'utente è già loggato + $this->acquireCookie(); #ottengo il cookie + $this->cleanSessions(); #elimino le sessioni vecchie + $row=$this->_db->select($this->_usersTable.','.$this->_sessionsTable,$this->_usersTable.'.id_user,username,token,user_agent',$this->_usersTable.".id_user=".$this->_sessionsTable.".id_user and uid='".$this->uid."'"); + if (count($row) === 1 and $row !== false) + { + $this->status['user']=$row[0][$this->_usersTable]['username']; + $this->status['status']='logged'; + $this->status['id_user']=$row[0][$this->_usersTable]['id_user']; + $this->status['user_agent'] = $row[0][$this->_sessionsTable]['user_agent']; + $this->status['token'] = $row[0][$this->_sessionsTable]['token']; + $this->obtainGroups(); + } else { + $this->status['user']='sconosciuto'; + $this->status['status']='not-logged'; + $this->status['id_user']=''; + $this->status['user_agent']=''; + $this->status['token'] = ''; + $this->status['groups'] = array(); + } + } + + public function redirect($val,$time = 3) { #fa il redirect dell'utente + if ($val === 'logged') { + header('Refresh: '.$time.';url='.$this->_main); + if ($time !== 0) echo "You are already logged, ".$this->status['user'].".."; + } else if ($val === 'accepted') { + header('Refresh: '.$time.';url='.$this->_main); + if ($time !== 0) echo "Hi ".$this->status['user'].".."; + } else if ($val === 'login-error') { + header('Refresh: '.$time.';url='.$this->_login); + if ($time !== 0) echo "Wrong username or password..."; + } else if ($val === 'not-logged') { + header('Refresh: '.$time.';url='.$this->_login); + if ($time !== 0) echo "Limited access... sorry"; + } else if ($val === 'not-authorized') { + header('Refresh: '.$time.';url='.$this->_main); + if ($time !== 0) echo "Your account doesn't allow you to manage this page.. sorry!"; + } else if ($val === 'stolen') { + header('Refresh: '.$time.';url='.$this->_login); + if ($time !== 0) echo "Your session have been probably intercepted! Please login another time."; + } else if ($val === 'retype') { + header('Refresh: '.$time.';url='.$this->_retype); + if ($time !== 0) echo "Your session have been probably intercepted. Please type your password another time."; + } else if ($val === 'wait') { + header('Refresh: '.$time.';url='.$this->_login); + if ($time !== 0) echo "You have to wait ".$this->_params['time_after_failure']." seconds before you can try to login another time"; + } + exit; + } + + //obtain the group of the user + private function obtainGroups() + { + $tables = $this->_usersTable.','.$this->_groupsTable.','.$this->_manyToManyTable; + $fields = $this->_groupsTable.'.name'; + $where = $this->_usersTable.'.id_user='.$this->_manyToManyTable.'.id_user and '.$this->_groupsTable.'.id_group='.$this->_manyToManyTable.'.id_group and '.$this->_usersTable.'.id_user='.$this->status['id_user']; + $groups = $this->_db->select($tables,$fields,$where); + $this->status['groups'] = array(); + foreach ($groups as $group) + { + $this->status['groups'][] = $group[$this->_groupsTable]['name']; + } + } + + //$groups: string with name of groups separated by comma; ex: base,root,users + public function checkAccess($groups) + { + $groupsArray = explode (',',$groups); + foreach ($this->status['groups'] as $group) + { + if (in_array($group,$groupsArray)) return true; + } + return false; + } + + //check that the user is logged and, if present, check the group of the user (if loggeg) + //$groups: comma-separated list of groups whose users can access the page + //$time: time before the redirect is carried out + public function check($groups = null, $time = 3) + { + $this->checkStatus(); + if (strcmp($this->status['status'],'not-logged') === 0) + { + $this->redirect('not-logged',$time); + } + else if (strcmp($this->status['status'],'logged') === 0) + { + if ($this->_params['hijacking_check']) + { + if (!$this->checkHijacking()) + { + if ($this->_params['on_hijacking_event'] === 'forceout') + { + $this->logout(); + $this->redirect('stolen',$time); + } + else if ($this->_params['on_hijacking_event'] === 'redirect') + { + $this->redirect('retype',$time); + } + } + } +// $this->obtainGroups(); + if (isset($groups)) + { + $permission = $this->checkAccess($groups); + if (!$permission) $this->redirect('not-authorized',$time); + } + } + } + + //check if someone have stolen your uid + private function checkHijacking() + { + if (array_key_exists('user_agent',$this->status)) + { + if (strcmp($this->status['user_agent'],'') !== 0) + { + if (strcmp($this->status['user_agent'],getUserAgent()) === 0) + { + return true; + } + } + } + return false; + } + + //check CSRF + //$token: token to check + public function checkCSRF($token) + { + if (strcmp($this->status['token'],'') !== 0) + { + if (strcmp($this->status['token'],$token) === 0) + { + return true; + } + } + return false; + } + + //get an array containing all the users currently logged + public function getUsersLogged() + { + $usersLogged = array(); + $data=$this->_db->select($this->_usersTable.','.$this->_sessionsTable,'DISTINCT '.$this->_usersTable.'.username',$this->_usersTable.".id_user=".$this->_sessionsTable.".id_user"); + foreach ($data as $row) + { + $usersLogged[] = $row[$this->_usersTable]['username']; + } + return $usersLogged; + } + + //get the password of the current user + public function getPassword() + { + $row=$this->_db->select($this->_usersTable,'password',"id_user=".$this->status['id_user']); + if ($row !== false) + { + return $row[0][$this->_usersTable]['password']; + } + else + { + return false; + } + } + + private function checkPassword($user,$pwd) { #check username and password + + if (!in_array($this->_params['password_hash'],Params::$allowedHashFunc)) + { + throw new Exception('Error in '.__METHOD__.' : the hash func has to be '.implode(' or ',Params::$allowedHashFunc)); + } + //calculate the hash of the password + $pwd = call_user_func($this->_params['password_hash'],$pwd); + + $row=$this->_db->select($this->_usersTable,$this->_usersTable.'.id_user,username,password',"username=\"".$user."\" and password=\"".$pwd."\" and has_confirmed=0"); + if (count($row) === 1 and $row !== false) + { + $this->status['user'] = $row[0][$this->_usersTable]['username']; + $this->status['status'] = 'accepted'; + $this->status['id_user'] = $row[0][$this->_usersTable]['id_user']; + } + else + { + $this->status['user'] = 'unknown'; + $this->status['status'] = 'login-error'; + $this->status['id_user'] = ''; + if ($this->_db->recordExists($this->_usersTable,'username',$user)) + { + $this->_db->update($this->_usersTable,'last_failure',array(time()),'username="'.$user.'"'); + } + } + } + + //check that enough time is passed since the last failure of the user + private function checkLastFailure($user) + { + //current time + $now = time(); + //max time + $max = $now - $this->_params['time_after_failure']; + $data = $this->_db->select($this->_usersTable,'last_failure','username="'.$user.'"'); + if (count($data) === 1 and $data !== false) + { + if ($data[0][$this->_usersTable]['last_failure'] < $max) + { + return true; + } + return false; + } + else + { + return true; + } + } + + public function login($user,$pwd) + { + $user = sanitizeAll($user); + $this->checkStatus(); + //check if already logged + if ($this->status['status'] === 'logged') + { +// $this->redirect('logged'); + return 'logged'; + } + else + { + if ($this->checkLastFailure($user)) + { + $this->checkPassword($user,$pwd); + if ($this->status['status']==='accepted') + { + $this->uid = md5(randString(10).uniqid(mt_rand(),true)); + $this->_token = md5(randString(12)); + $userAgent = getUserAgent(); + $this->_db->insert($this->_sessionsTable,'id_user,uid,token,creation_date,user_agent',array($this->status['id_user'],$this->uid,$this->_token,time(),$userAgent)); + setcookie($this->_params['cookie_name'],$this->uid,0,$this->_params['cookie_path']); #magic cookie + $this->updateAccesses(); + + $this->_db->del($this->_sessionsTable,'id_user='.$this->status['id_user'].' AND uid != "'.$this->uid.'"'); + +// $this->redirect('accepted'); + return 'accepted'; + } + else if ($this->status['status']==='login-error') + { +// $this->redirect('login-error'); + return 'login-error'; + } + } + else + { +// $this->redirect('wait'); + return 'wait'; + } + } +// $this->redirect('login-error'); + return 'login-error'; + } + + private function updateAccesses() + { + $ip=getIp(); #ip + $date=date('d'). "-" . date('m') . "-" . date('Y'); #date + $ora=date('H') . ":" . date('i'); #time + $values=array($ip,$date,$ora,$this->status['user']); + $res=$this->_db->insert($this->_accessesTable,'ip,data,ora,username',$values); + } + + //force out an user + //$id: the id of the user + public function forceOut($id) + { + $id = (int)$id; + if ($this->_db->del($this->_sessionsTable,'id_user='.$id)) + { + return true; + } + return false; + } + + public function logout() + { + $this->checkStatus(); + if ($this->status['status'] === 'logged') + { + setcookie ($this->_params['cookie_name'], "", time() - 3600,$this->_params['cookie_path']); + if ($this->_db->del($this->_sessionsTable,'id_user='.$this->status['id_user'])) + { + return 'was-logged'; + } + else + { + return 'error'; + } + } + else + { + return 'not-logged'; + } + } + +}
\ No newline at end of file diff --git a/h-source/Library/Users/index.html b/h-source/Library/Users/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/Users/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Library/index.html b/h-source/Library/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Library/index.html @@ -0,0 +1 @@ + diff --git a/h-source/License.txt b/h-source/License.txt new file mode 100755 index 0000000..404896a --- /dev/null +++ b/h-source/License.txt @@ -0,0 +1,201 @@ +GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/> + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. +A “covered work” means either the unmodified Program or a work based on the Program. +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. + +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: +a) The work must carry prominent notices stating that you modified it, and giving a relevant date. +b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. +c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. +d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: +a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. +b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. +c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. +d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. +e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. + +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: +a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or +b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or +c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or +d) Limiting the use for publicity purposes of names of licensors or authors of the material; or +e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or +f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. + +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. + + diff --git a/h-source/Logs/Errors.log b/h-source/Logs/Errors.log new file mode 100644 index 0000000..f2250e8 --- /dev/null +++ b/h-source/Logs/Errors.log @@ -0,0 +1,73 @@ +[06-Sep-2010 18:45:43] PHP Notice: Undefined index: Menu in /home/tonicucoz/Apache/h-node/Application/Controllers/AdminregusersController.php on line 64 +[06-Sep-2010 18:45:43] PHP Fatal error: Call to a member function render() on a non-object in /home/tonicucoz/Apache/h-node/Application/Controllers/AdminregusersController.php on line 64 +[08-Sep-2010 08:11:20] PHP Notice: Undefined index: notebook_inserted in /home/tonicucoz/Apache/h-node/Application/Controllers/GenericController.php on line 68 +[09-Sep-2010 16:14:17] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 101 +[09-Sep-2010 16:17:58] PHP Notice: Undefined index: fr in /home/tonicucoz/Apache/h-node/Application/Views/top_left.php on line 41 +[09-Sep-2010 16:17:58] PHP Notice: Undefined index: fr in /home/tonicucoz/Apache/h-node/Application/Views/top_left.php on line 45 +[09-Sep-2010 22:47:51] PHP Notice: Undefined index: es in /home/tonicucoz/Apache/h-node/Application/Views/top_left.php on line 41 +[09-Sep-2010 22:47:51] PHP Notice: Undefined index: es in /home/tonicucoz/Apache/h-node/Application/Views/top_left.php on line 45 +[11-Sep-2010 10:59:17] PHP Notice: Undefined variable: fullname in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 102 +[11-Sep-2010 10:59:17] PHP Notice: Undefined offset: 1 in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 103 +[11-Sep-2010 10:59:17] PHP Notice: Undefined variable: fullname in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 102 +[11-Sep-2010 10:59:17] PHP Notice: Undefined offset: 1 in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 103 +[11-Sep-2010 12:11:05] PHP Notice: Undefined offset: 0 in /home/tonicucoz/Apache/h-node/Application/Controllers/GenericController.php on line 340 +[11-Sep-2010 12:13:43] PHP Notice: Undefined variable: talk_number in /home/tonicucoz/Apache/h-node/Application/Views/top_left.php on line 39 +[11-Sep-2010 13:12:28] PHP Warning: Invalid argument supplied for foreach() in /home/tonicucoz/Apache/h-node/Library/Model/Base.php on line 1101 +[11-Sep-2010 13:12:28] PHP Warning: Invalid argument supplied for foreach() in /home/tonicucoz/Apache/h-node/Library/Users/CheckAdmin.php on line 211 +[13-Sep-2010 21:47:32] PHP Notice: Undefined variable: ismoderator in /home/tonicucoz/Apache/h-node/Application/Controllers/HistoryController.php on line 32 +[14-Sep-2010 19:04:26] PHP Notice: Undefined variable: title in /home/tonicucoz/Apache/h-node/Application/Views/header.php on line 9 +[14-Sep-2010 19:04:36] PHP Notice: Undefined variable: title in /home/tonicucoz/Apache/h-node/Application/Views/header.php on line 9 +[14-Sep-2010 19:14:14] PHP Notice: Undefined variable: u in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 6 +[14-Sep-2010 19:14:14] PHP Fatal error: Call to a member function getUser() on a non-object in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 6 +[14-Sep-2010 19:39:41] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 19:44:13] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 19:44:32] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 19:45:03] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 19:47:20] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 19:47:47] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 20:13:07] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 20:16:52] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 20:18:40] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[14-Sep-2010 21:01:07] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 8 +[15-Sep-2010 20:14:01] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 8 +[15-Sep-2010 20:53:35] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 8 +[15-Sep-2010 20:54:29] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[15-Sep-2010 23:40:31] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:09:55] PHP Notice: Undefined variable: md_javascript in /home/tonicucoz/Apache/h-node/Application/Views/moderator_dialog.php on line 7 +[16-Sep-2010 15:10:27] PHP Notice: Undefined variable: md_javascript in /home/tonicucoz/Apache/h-node/Application/Views/moderator_dialog.php on line 7 +[16-Sep-2010 15:16:29] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 29 +[16-Sep-2010 15:16:29] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 29 +[16-Sep-2010 15:16:44] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:16:44] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:16:56] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:16:56] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:18:49] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:18:49] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:19:02] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:19:02] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:22:03] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:22:03] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:22:15] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:22:15] PHP Notice: Undefined variable: row in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 21 +[16-Sep-2010 15:35:06] PHP Notice: Undefined index: id_mes in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 43 +[16-Sep-2010 15:35:06] PHP Notice: Undefined index: id_mes in /home/tonicucoz/Apache/h-node/Application/Views/talk.php on line 43 +[16-Sep-2010 15:44:51] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:45:10] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:46:46] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:50:46] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:52:23] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:52:48] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:53:06] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[16-Sep-2010 15:54:20] PHP Notice: Undefined index: in /home/tonicucoz/Apache/h-node/Application/Views/History/viewall.php on line 9 +[17-Sep-2010 18:27:03] PHP Notice: Undefined variable: go_to in /home/tonicucoz/Apache/h-node/Application/Views/moderator_dialog.php on line 7 +[20-Sep-2010 11:33:06] PHP Fatal error: Function name must be a string in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 112 +[20-Sep-2010 11:33:22] PHP Fatal error: Function name must be a string in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 115 +[20-Sep-2010 11:33:36] PHP Fatal error: Function name must be a string in /home/tonicucoz/Apache/h-node/Application/Controllers/BaseController.php on line 115 +[05-Oct-2010 16:44:50] PHP Parse error: syntax error, unexpected T_PUBLIC in /home/tonicucoz/Apache/h-source/Application/Models/WifiModel.php on line 49 +[14-Oct-2010 00:44:03] PHP Notice: Undefined offset: 0 in /home/tonicucoz/Apache/h-source/Application/Controllers/HomeController.php on line 41 +[14-Oct-2010 00:44:03] PHP Notice: Undefined offset: 0 in /home/tonicucoz/Apache/h-source/Application/Controllers/BaseController.php on line 102 +[14-Oct-2010 00:45:50] PHP Notice: Undefined offset: 0 in /home/tonicucoz/Apache/h-source/Application/Controllers/BaseController.php on line 102 +[14-Oct-2010 00:46:25] PHP Notice: Undefined variable: htmlRightBox in /home/tonicucoz/Apache/h-source/Application/Views/right.php on line 115 +[14-Oct-2010 00:46:29] PHP Notice: Undefined variable: htmlRightBox in /home/tonicucoz/Apache/h-source/Application/Views/right.php on line 115 +[14-Oct-2010 00:46:30] PHP Notice: Undefined variable: htmlRightBox in /home/tonicucoz/Apache/h-source/Application/Views/right.php on line 115 +[14-Oct-2010 00:46:32] PHP Notice: Undefined variable: htmlRightBox in /home/tonicucoz/Apache/h-source/Application/Views/right.php on line 115 diff --git a/h-source/Logs/index.html b/h-source/Logs/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Logs/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Logs/where.log b/h-source/Logs/where.log new file mode 100755 index 0000000..5afb91e --- /dev/null +++ b/h-source/Logs/where.log @@ -0,0 +1,1821 @@ + +[2010-04-08 00:52:52] IP:::1 URI: /easygiant/articles/index POST +[2010-04-08 00:52:59] IP:::1 URI: /easygiant/articles/index POST +[2010-04-08 00:53:37] IP:::1 URI: /easygiant/articles/view/17/$$ POST +[2010-04-08 00:53:37] IP:::1 URI: /easygiant/personal/login POST +[2010-04-08 00:53:49] IP:::1 URI: /easygiant/personal/login POST username:user password:user +[2010-04-08 00:53:52] IP:::1 URI: /easygiant/articles/index POST +[2010-04-08 00:53:58] IP:::1 URI: /easygiant/articles/view/17/$$ POST +[2010-04-08 00:54:03] IP:::1 URI: /easygiant/messages/insert/17 POST +[2010-04-08 00:54:03] IP:::1 URI: /easygiant/image/captcha POST +[2010-04-08 00:54:51] IP:::1 URI: /easygiant/messages/insert/17 POST nome:Antonio messaggio:gallo captcha:6m7p3d insertAction:send +[2010-04-08 00:54:51] IP:::1 URI: /easygiant/image/captcha POST +[2010-04-08 00:55:06] IP:::1 URI: /easygiant/personal/logout POST +[2010-04-08 00:55:15] IP:::1 URI: /easygiant/articles/index POST +[2010-04-12 17:10:37] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:10:38] IP:::1 URI: /easygiant/users/login POST +[2010-04-12 17:10:43] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-12 17:10:46] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:16:54] IP:::1 URI: /easygiant/articles/main POST +[2010-04-12 17:17:48] IP:::1 URI: /easygiant/articles/main POST +[2010-04-12 17:17:48] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:20] IP:::1 URI: /easygiant/articles/form/update/1/undef/undef POST generalAction:edit id:18 +[2010-04-12 17:23:20] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:23] IP:::1 URI: /easygiant/articles/form/update/1/undef/undef POST title:qwe author:qweqwe category:politica abstract:qwe content:<p>qeqwwe</p> id:18 updateAction:Save +[2010-04-12 17:23:23] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:24] IP:::1 URI: /easygiant/articles/main/1/undef/undef POST +[2010-04-12 17:23:24] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:26] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:23:27] IP:::1 URI: /easygiant/articles/main POST +[2010-04-12 17:23:27] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:29] IP:::1 URI: /easygiant/articles/main/2/undef/undef POST +[2010-04-12 17:23:29] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:30] IP:::1 URI: /easygiant/articles/main/1/undef/undef POST +[2010-04-12 17:23:30] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 17:23:55] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:23:56] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 17:23:58] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-12 17:24:01] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:wer tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 17:24:02] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:24:05] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-12 17:24:08] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:ert tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 17:24:11] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:etet tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 17:24:13] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:24:14] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 17:24:16] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:24:19] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 17:24:20] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:28:41] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:31:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:32:18] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:32:44] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:32:47] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST generalAction_x:0 generalAction_y:0 id_navigation:126 +[2010-04-12 17:32:49] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST name:etet tick:1 visibile:1 categoria: css: meta_ita: id_navigation:126 updateAction:Save +[2010-04-12 17:32:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:37:39] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:37:49] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:37:49] IP:::1 URI: /easygiant/category/main/1/undef/1uparrow.png POST +[2010-04-12 17:38:02] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:38:54] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:39:16] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:40:11] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:41:03] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:41:09] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST generalAction_x:50 generalAction_y:47 id_navigation:126 +[2010-04-12 17:41:11] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:41:12] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:60 moveupAction_y:65 id_navigation:125 +[2010-04-12 17:41:14] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:58 moveupAction_y:72 id_navigation:125 +[2010-04-12 17:41:20] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:61 movedownAction_y:77 id_navigation:126 +[2010-04-12 17:41:21] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:65 movedownAction_y:53 id_navigation:125 +[2010-04-12 17:41:33] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:65 movedownAction_y:53 id_navigation:125 +[2010-04-12 17:41:35] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction:up id_navigation:125 +[2010-04-12 17:41:37] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction:up id_navigation:126 +[2010-04-12 17:42:38] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:42:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:42:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:75 moveupAction_y:54 moveupAction:up id_navigation:125 +[2010-04-12 17:42:53] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:77 moveupAction_y:30 moveupAction:up id_navigation:126 +[2010-04-12 17:42:54] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:62 moveupAction_y:80 moveupAction:up id_navigation:126 +[2010-04-12 17:42:55] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:55 moveupAction_y:74 moveupAction:up id_navigation:126 +[2010-04-12 17:45:45] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:45:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:46:15] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:46:36] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:46:41] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST generalAction_x:13 generalAction_y:21 generalAction:edit id_navigation:126 +[2010-04-12 17:46:43] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:46:44] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:13 moveupAction_y:21 moveupAction:up id_navigation:125 +[2010-04-12 17:46:45] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:19 moveupAction_y:10 moveupAction:up id_navigation:126 +[2010-04-12 17:46:48] IP:::1 URI: /easygiant/category/main/1/undef/token POST delAction_x:13 delAction_y:13 delAction:del id_navigation:126 +[2010-04-12 17:46:49] IP:::1 URI: /easygiant/category/main/1/undef/token POST delAction_x:13 delAction_y:13 delAction:del id_navigation:125 +[2010-04-12 17:46:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST delAction_x:13 delAction_y:13 delAction:del id_navigation:124 +[2010-04-12 17:46:54] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:17 moveupAction_y:18 moveupAction:up id_navigation:107 +[2010-04-12 17:46:54] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:17 moveupAction_y:17 moveupAction:up id_navigation:110 +[2010-04-12 17:51:04] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:51:13] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:51:17] IP:::1 URI: /easygiant/post/main POST +[2010-04-12 17:51:38] IP:::1 URI: /easygiant/post/main POST +[2010-04-12 17:51:41] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:51:42] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 17:51:53] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:51:55] IP:::1 URI: /easygiant/users/main POST +[2010-04-12 17:51:59] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 17:54:07] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 17:56:10] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 17:56:34] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 18:33:10] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 18:33:11] IP:::1 URI: /easygiant/users/login POST +[2010-04-12 20:36:34] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 20:36:35] IP:::1 URI: /easygiant/users/login POST +[2010-04-12 20:36:40] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-12 20:36:44] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 20:36:46] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 20:37:00] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:13 moveupAction_y:25 moveupAction:up id_navigation:116 +[2010-04-12 20:37:02] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:19 moveupAction_y:17 moveupAction:up id_navigation:119 +[2010-04-12 20:39:40] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:28 moveupAction_y:24 moveupAction:up id_navigation:116 +[2010-04-12 20:39:41] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:25 moveupAction_y:19 moveupAction:up id_navigation:119 +[2010-04-12 20:39:42] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:25 moveupAction:up id_navigation:116 +[2010-04-12 20:39:43] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:25 moveupAction:up id_navigation:119 +[2010-04-12 20:39:44] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:25 moveupAction:up id_navigation:116 +[2010-04-12 20:39:45] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:25 moveupAction:up id_navigation:119 +[2010-04-12 20:39:46] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:25 moveupAction:up id_navigation:116 +[2010-04-12 20:39:47] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:25 moveupAction:up id_navigation:119 +[2010-04-12 20:39:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:15 moveupAction_y:22 moveupAction:up id_navigation:118 +[2010-04-12 20:39:51] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:14 moveupAction_y:13 moveupAction:up id_navigation:116 +[2010-04-12 20:39:53] IP:::1 URI: /easygiant/category/main/1/234234/token POST +[2010-04-12 20:39:55] IP:::1 URI: /easygiant/category/main/1/234234/token POST +[2010-04-12 20:39:56] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 20:39:58] IP:::1 URI: /easygiant/category/main/1/eee/token POST +[2010-04-12 20:39:59] IP:::1 URI: /easygiant/category/main/1/234234/token POST +[2010-04-12 20:40:00] IP:::1 URI: /easygiant/category/main/1/eee/token POST +[2010-04-12 20:40:02] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 20:41:20] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 20:41:21] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 20:41:25] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:26] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:26] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:27] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:30] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:30] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:32] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:33] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:41:35] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 20:41:37] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-12 20:41:38] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-12 20:41:40] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:58:36] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:58:37] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:58:38] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 20:58:40] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:58:41] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 20:58:43] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:58:44] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 20:58:48] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:58:49] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 20:58:50] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:58:51] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 20:58:52] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:58:54] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 20:58:57] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST generalAction:edit id_pagine:77 +[2010-04-12 20:58:58] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:erw id_navigation:109 titolo: html:wer id_pagine:77 updateAction:Save +[2010-04-12 20:59:00] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:59:01] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:59:02] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 20:59:04] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 20:59:05] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 21:00:07] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:00:21] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:00:23] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:75 +[2010-04-12 21:00:24] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:77 +[2010-04-12 21:00:28] IP:::1 URI: /easygiant/pagine/main/1/undef POST delAction:del id_pagine:77 +[2010-04-12 21:00:31] IP:::1 URI: /easygiant/pagine/main/1/undef POST delAction:del id_pagine:75 +[2010-04-12 21:07:59] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:71 +[2010-04-12 21:08:20] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:71 +[2010-04-12 21:08:21] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:76 +[2010-04-12 21:08:22] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:71 +[2010-04-12 21:13:14] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:76 +[2010-04-12 21:13:16] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:73 +[2010-04-12 21:13:17] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:73 +[2010-04-12 21:13:18] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:76 +[2010-04-12 21:13:19] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:73 +[2010-04-12 21:13:20] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:76 +[2010-04-12 21:13:22] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:71 +[2010-04-12 21:13:23] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:71 +[2010-04-12 21:13:24] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:76 +[2010-04-12 21:13:24] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:73 +[2010-04-12 21:13:28] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:13:29] IP:::1 URI: /easygiant/articles/main POST +[2010-04-12 21:13:30] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 21:13:33] IP:::1 URI: /easygiant/articles/main/2/undef/undef POST +[2010-04-12 21:13:34] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 21:13:35] IP:::1 URI: /easygiant/articles/main/1/undef/undef POST +[2010-04-12 21:13:35] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 21:13:36] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:13:37] IP:::1 URI: /easygiant/articles/main POST +[2010-04-12 21:13:38] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 21:13:40] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:13:41] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 21:13:43] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:13:44] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:13:45] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 21:13:47] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:26 moveupAction_y:9 moveupAction:up id_navigation:116 +[2010-04-12 21:13:49] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:21 moveupAction_y:21 moveupAction:up id_navigation:119 +[2010-04-12 21:13:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:21 moveupAction_y:21 moveupAction:up id_navigation:116 +[2010-04-12 21:13:51] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:19 moveupAction_y:20 moveupAction:up id_navigation:119 +[2010-04-12 21:13:51] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:19 moveupAction_y:20 moveupAction:up id_navigation:116 +[2010-04-12 21:18:04] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:22 moveupAction_y:24 moveupAction:up id_navigation:119 +[2010-04-12 21:18:05] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:18 moveupAction_y:28 moveupAction:up id_navigation:116 +[2010-04-12 21:22:20] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:17 moveupAction_y:27 moveupAction:up id_navigation:116 +[2010-04-12 21:22:21] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:19 moveupAction_y:22 moveupAction:up id_navigation:118 +[2010-04-12 21:22:22] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:20 moveupAction_y:13 moveupAction:up id_navigation:118 +[2010-04-12 21:22:23] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:10 movedownAction_y:24 movedownAction:down id_navigation:116 +[2010-04-12 21:22:25] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:17 movedownAction_y:18 movedownAction:down id_navigation:116 +[2010-04-12 21:22:25] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:24 moveupAction_y:22 moveupAction:up id_navigation:115 +[2010-04-12 21:22:26] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:25 moveupAction_y:20 moveupAction:up id_navigation:115 +[2010-04-12 21:23:02] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:25:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:26:16] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:26:18] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:27:10] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:27:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:28:00] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:28:45] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:29:04] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:29:26] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:30:06] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:30:09] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:16 movedownAction_y:18 movedownAction:down id_navigation:110 +[2010-04-12 21:30:11] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:14 movedownAction_y:21 movedownAction:down id_navigation:107 +[2010-04-12 21:30:13] IP:::1 URI: /easygiant/category/main/1/undef/token POST movedownAction_x:17 movedownAction_y:20 movedownAction:down id_navigation:110 +[2010-04-12 21:30:15] IP:::1 URI: /easygiant/category/main/1/undef/token POST moveupAction_x:24 moveupAction_y:23 moveupAction:up id_navigation:118 +[2010-04-12 21:30:24] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:30:25] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 21:30:27] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-12 21:30:31] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:qwewqe tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 21:30:35] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:qwewqe tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 21:30:37] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:werewrerw tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 21:30:40] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:retert tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-12 21:30:41] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:30:43] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:30:48] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:20 moveupAction_y:24 moveupAction:up id_navigation:110 +[2010-04-12 21:30:50] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:21 moveupAction_y:21 moveupAction:up id_navigation:107 +[2010-04-12 21:30:51] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:18 moveupAction_y:36 moveupAction:up id_navigation:110 +[2010-04-12 21:30:53] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:15 moveupAction_y:29 moveupAction:up id_navigation:107 +[2010-04-12 21:30:55] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:30:57] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:30:58] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 21:31:00] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-12 21:31:04] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:werwer id_navigation:109 titolo:wer html:wer insertAction:Save +[2010-04-12 21:31:09] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:werwer id_navigation:109 titolo: html:wer insertAction:Save +[2010-04-12 21:31:13] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:546456 id_navigation:109 titolo: html:456 insertAction:Save +[2010-04-12 21:31:15] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:6756 id_navigation:109 titolo: html:567 insertAction:Save +[2010-04-12 21:31:18] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:dfgdfg id_navigation:109 titolo: html:dfg insertAction:Save +[2010-04-12 21:31:22] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:fjh id_navigation:110 titolo: html:fj insertAction:Save +[2010-04-12 21:31:27] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:fghjgj id_navigation:110 titolo: html:ghjgj insertAction:Save +[2010-04-12 21:31:32] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:789869 id_navigation:110 titolo: html:689879 insertAction:Save +[2010-04-12 21:31:33] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:31:36] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-12 21:31:40] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-12 21:31:43] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 21:31:50] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-12 21:31:52] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 21:31:53] IP:::1 URI: /easygiant/pagine/main/1/107 POST movedownAction:down id_pagine:72 +[2010-04-12 21:31:56] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 21:31:58] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-12 21:32:07] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-12 21:32:09] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-12 21:32:11] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:32:13] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-12 21:32:14] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:32:16] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-12 21:32:18] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:32:41] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:32:43] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:32:44] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 21:32:51] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:32:59] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:33:03] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:33:05] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:33:07] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:33:08] IP:::1 URI: /easygiant/articles/main POST +[2010-04-12 21:33:08] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-12 21:33:12] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:33:13] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 21:33:18] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:33:19] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 21:33:23] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST generalAction_x:16 generalAction_y:16 generalAction:edit id_navigation:130 +[2010-04-12 21:33:25] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST name:retert tick:1 visibile:1 categoria: css: meta_ita: id_navigation:130 updateAction:Save +[2010-04-12 21:33:26] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:33:33] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:33:34] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 21:33:44] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-12 21:33:46] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 21:42:18] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 21:42:22] IP:::1 URI: /easygiant/users/login POST +[2010-04-12 21:42:24] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-12 21:42:28] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:42:31] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 21:43:18] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:43:42] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:43:45] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-12 21:43:49] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-12 21:43:52] IP:::1 URI: /easygiant/pagine/main/1/128 POST +[2010-04-12 21:43:54] IP:::1 URI: /easygiant/pagine/main/1/129 POST +[2010-04-12 21:43:57] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 21:43:59] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-12 21:44:01] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:44:02] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 21:44:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:44:05] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 21:44:07] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:44:08] IP:::1 URI: /easygiant/category/main POST +[2010-04-12 21:44:10] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:44:12] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:44:13] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:44:15] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:14 moveupAction_y:15 moveupAction:up id_navigation:107 +[2010-04-12 21:44:17] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:18 moveupAction_y:18 moveupAction:up id_navigation:109 +[2010-04-12 21:46:46] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:47:41] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:47:43] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:47:45] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:47:46] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:47:48] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:47:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:47:51] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:48:00] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-12 21:48:01] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-12 21:48:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:48:05] IP:::1 URI: /easygiant/users/main POST +[2010-04-12 21:48:08] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:48:10] IP:::1 URI: /easygiant/box/main POST +[2010-04-12 21:48:11] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:48:12] IP:::1 URI: /easygiant/news/main POST +[2010-04-12 21:48:14] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 21:48:15] IP:::1 URI: /easygiant/post/main POST +[2010-04-12 21:48:17] IP:::1 URI: /easygiant/post/main/2/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-12 21:48:19] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-12 21:48:21] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Friday/undefi POST +[2010-04-12 21:48:22] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/11/Friday/undefi POST +[2010-04-12 21:48:25] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/11/Friday/undefi POST +[2010-04-12 21:48:26] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/11/Friday/undefi POST +[2010-04-12 21:48:29] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/11/undefi/undefi POST +[2010-04-12 21:48:30] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-04-12 21:48:31] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-12 21:48:34] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-12 21:58:24] IP:::1 URI: /easygiant/post/main/2/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-12 21:58:25] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-12 22:02:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 22:02:05] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-12 22:02:11] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST generalAction:edit id_pagine:84 +[2010-04-12 22:02:24] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:789869 id_navigation:110 titolo: html:689879 id_pagine:84 updateAction:Save +[2010-04-12 22:02:25] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:789869 id_navigation:110 titolo: html:689879 id_pagine:84 updateAction:Save +[2010-04-12 22:02:29] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 22:02:31] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST generalAction:edit id_pagine:84 +[2010-04-12 22:02:46] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:789869 id_navigation:110 titolo: html:689879 id_pagine:84 updateAction:Save +[2010-04-12 22:05:07] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:789869 id_navigation:110 titolo: html:bello id_pagine:84 updateAction:Save +[2010-04-12 22:05:28] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:789869 id_navigation:110 titolo: html:cazzone id_pagine:84 updateAction:Save +[2010-04-12 22:05:30] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:789869 id_navigation:110 titolo:1 html:12 id_pagine:84 updateAction:Save +[2010-04-12 22:05:31] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 22:06:02] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST generalAction:edit id_pagine:84 +[2010-04-12 22:06:05] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:1 id_navigation:110 titolo:1 html:12 id_pagine:84 updateAction:Save +[2010-04-12 22:06:06] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-12 22:13:03] IP:::1 URI: /easygiant/panel/main POST +[2010-04-12 22:13:04] IP:::1 URI: /easygiant/post/main POST +[2010-04-12 22:13:07] IP:::1 URI: /easygiant/postnew/main POST +[2010-04-12 22:13:13] IP:::1 URI: /easygiant/postnew/main/2/undef/undef/undef POST +[2010-04-12 22:13:14] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-13 00:28:33] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:28:34] IP:::1 URI: /easygiant/users/login POST +[2010-04-13 00:28:39] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-13 00:28:42] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:29:01] IP:::1 URI: /easygiant/articles/main POST +[2010-04-13 00:29:01] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-13 00:29:03] IP:::1 URI: /easygiant/articles/main/2/undef/undef POST +[2010-04-13 00:29:03] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-13 00:29:05] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:29:05] IP:::1 URI: /easygiant/category/main POST +[2010-04-13 00:29:07] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:29:14] IP:::1 URI: /easygiant/category/main/2/undef/token POST delAction_x:15 delAction_y:17 delAction:del id_navigation:107 +[2010-04-13 00:29:16] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:29:18] IP:::1 URI: /easygiant/category/main POST +[2010-04-13 00:29:20] IP:::1 URI: /easygiant/category/main/1/undef/token POST delAction_x:18 delAction_y:16 delAction:del id_navigation:130 +[2010-04-13 00:29:22] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:29:24] IP:::1 URI: /easygiant/category/form/update/2/undef/token POST generalAction_x:19 generalAction_y:17 generalAction:edit id_navigation:110 +[2010-04-13 00:29:25] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:29:28] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-13 00:29:33] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:32:02] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:32:05] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:14 moveupAction_y:16 moveupAction:up id_navigation:110 +[2010-04-13 00:32:07] IP:::1 URI: /easygiant/category/main/2/undef/token POST moveupAction_x:11 moveupAction_y:23 moveupAction:up id_navigation:107 +[2010-04-13 00:32:08] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-13 00:32:42] IP:::1 URI: /easygiant/category/main/1/eee/token POST +[2010-04-13 00:32:53] IP:::1 URI: /easygiant/category/form/update/1/eee/token POST generalAction_x:22 generalAction_y:16 generalAction:edit id_navigation:119 +[2010-04-13 00:32:55] IP:::1 URI: /easygiant/category/main/1/eee/token POST +[2010-04-13 00:37:03] IP:::1 URI: /easygiant/category/main/1/prima/token POST +[2010-04-13 00:37:05] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:37:06] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-13 00:37:08] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-13 00:37:14] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-13 00:37:16] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-13 00:37:21] IP:::1 URI: /easygiant/pagine/form/update/1/107 POST generalAction:edit id_pagine:72 +[2010-04-13 00:37:22] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-13 00:37:24] IP:::1 URI: /easygiant/pagine/form/update/1/107 POST generalAction:edit id_pagine:72 +[2010-04-13 00:37:31] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-13 00:37:33] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:37:33] IP:::1 URI: /easygiant/users/logout POST +[2010-04-13 00:37:35] IP:::1 URI: /easygiant/users/login POST +[2010-04-13 00:37:39] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-13 00:37:42] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:37:44] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-13 00:37:47] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-13 00:37:49] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-13 00:37:52] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:37:53] IP:::1 URI: /easygiant/category/main POST +[2010-04-13 00:37:55] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:38:22] IP:::1 URI: /easygiant/category/form/update/2/undef/token POST generalAction_x:17 generalAction_y:20 generalAction:edit id_navigation:110 +[2010-04-13 00:38:23] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:38:24] IP:::1 URI: /easygiant/category/form/update/2/undef/token POST generalAction_x:19 generalAction_y:27 generalAction:edit id_navigation:110 +[2010-04-13 00:38:26] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 00:40:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 00:40:05] IP:::1 URI: /easygiant/users/logout POST +[2010-04-13 00:40:06] IP:::1 URI: /easygiant/users/login POST +[2010-04-13 20:33:54] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 20:33:55] IP:::1 URI: /easygiant/users/login POST +[2010-04-13 20:34:00] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-13 20:34:03] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 20:34:26] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-13 20:34:27] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 20:34:28] IP:::1 URI: /easygiant/category/main POST +[2010-04-13 20:35:50] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-13 20:35:51] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:15 y:18 moveupAction:up id_navigation:128 +[2010-04-13 20:35:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:14 y:14 moveupAction:up id_navigation:129 +[2010-04-13 20:35:54] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:12 y:19 moveupAction:up id_navigation:128 +[2010-04-13 20:35:56] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:18 y:19 moveupAction:up id_navigation:129 +[2010-04-13 20:35:58] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:14 y:15 movedownAction:down id_navigation:129 +[2010-04-13 20:35:59] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 20:36:01] IP:::1 URI: /easygiant/category/main/2/undef/token POST x:12 y:15 moveupAction:up id_navigation:110 +[2010-04-13 20:36:02] IP:::1 URI: /easygiant/category/main/2/undef/token POST x:18 y:17 moveupAction:up id_navigation:107 +[2010-04-13 20:36:03] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-13 20:36:46] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:7 y:16 delAction:del id_navigation:128 +[2010-04-13 20:36:49] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-13 20:36:53] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:qwe tick:1 visibile:1 categoria:qwe css:qwe meta_ita: insertAction:Save +[2010-04-13 20:37:00] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:qwe tick:1 visibile:1 categoria:11 css:11 meta_ita: insertAction:Save +[2010-04-13 20:37:01] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-13 20:37:03] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-13 20:37:04] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-13 20:37:06] IP:::1 URI: /easygiant/panel/main POST +[2010-04-13 20:37:06] IP:::1 URI: /easygiant/users/logout POST +[2010-04-13 20:37:08] IP:::1 URI: /easygiant/users/login POST +[2010-04-14 22:40:36] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 22:40:37] IP:::1 URI: /easygiant/users/login POST +[2010-04-14 22:40:41] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-14 22:40:44] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 22:46:52] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-14 22:46:53] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 22:47:41] IP:::1 URI: /easygiant/category/main POST +[2010-04-14 22:47:42] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 22:48:26] IP:::1 URI: /easygiant/category/main POST +[2010-04-14 22:49:26] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 22:49:30] IP:::1 URI: /easygiant/category/main POST +[2010-04-14 22:50:17] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 22:50:54] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:09:29] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-14 23:09:30] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:09:43] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:09:44] IP:::1 URI: /easygiant/category/main POST +[2010-04-14 23:09:44] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-14 23:09:44] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-14 23:10:57] IP:::1 URI: /easygiant/users/logout POST +[2010-04-14 23:27:00] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:27:01] IP:::1 URI: /easygiant/users/login POST +[2010-04-14 23:27:04] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-14 23:27:07] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:27:10] IP:::1 URI: /easygiant/upload/main POST +[2010-04-14 23:27:10] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:27:11] IP:::1 URI: /easygiant/upload/main POST folderName:folder name createFolderAction:create directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:27:12] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:27:13] IP:::1 URI: /easygiant/upload/main POST enter_x:29 enter_y:24 delFolderAction:/home/tonicucoz/Apache/easygiant/media/folder name directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:27:14] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:28:21] IP:::1 URI: /easygiant/upload/main POST uploadFileAction:upload MAX_FILE_SIZE:3000 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:28:39] IP:::1 URI: /easygiant/upload/main POST uploadFileAction:upload MAX_FILE_SIZE:3000 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:28:39] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:28:41] IP:::1 URI: /easygiant/upload/main POST enter_x:22 enter_y:21 delFileAction:/home/tonicucoz/Apache/easygiant/media/Untitled 1.doc directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:28:41] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:28:42] IP:::1 URI: /easygiant/upload/main POST folderName:folder name createFolderAction:create directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:28:42] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:28:44] IP:::1 URI: /easygiant/upload/main POST enter_x:31 enter_y:14 delFolderAction:/home/tonicucoz/Apache/easygiant/media/folder name directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:28:44] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:36] IP:::1 URI: /easygiant/upload/main POST folderName:folder name createFolderAction:create directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:36] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:37] IP:::1 URI: /easygiant/upload/main POST enter_x:16 enter_y:24 delFolderAction:/home/tonicucoz/Apache/easygiant/media/folder name directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:38] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:39] IP:::1 URI: /easygiant/upload/main POST folderName:folder name createFolderAction:create directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:39] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:39] IP:::1 URI: /easygiant/upload/main POST folderName:folder name createFolderAction:create directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:40] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:42] IP:::1 URI: /easygiant/upload/main POST enter_x:35 enter_y:22 directory:/home/tonicucoz/Apache/easygiant/media/folder name/ +[2010-04-14 23:29:42] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:44] IP:::1 URI: /easygiant/upload/main POST folderName:folder name createFolderAction:create directory:/home/tonicucoz/Apache/easygiant/media/folder name/ +[2010-04-14 23:29:44] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:44] IP:::1 URI: /easygiant/upload/main POST enter_x:17 enter_y:13 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:44] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:46] IP:::1 URI: /easygiant/upload/main POST enter_x:18 enter_y:33 delFolderAction:/home/tonicucoz/Apache/easygiant/media/folder name directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:46] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:48] IP:::1 URI: /easygiant/upload/main POST enter_x:28 enter_y:19 directory:/home/tonicucoz/Apache/easygiant/media/folder name/ +[2010-04-14 23:29:48] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:49] IP:::1 URI: /easygiant/upload/main POST enter_x:26 enter_y:21 delFolderAction:/home/tonicucoz/Apache/easygiant/media/folder name/folder name directory:/home/tonicucoz/Apache/easygiant/media/folder name/ +[2010-04-14 23:29:49] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:51] IP:::1 URI: /easygiant/upload/main POST enter_x:24 enter_y:10 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:51] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:52] IP:::1 URI: /easygiant/upload/main POST enter_x:22 enter_y:26 delFolderAction:/home/tonicucoz/Apache/easygiant/media/folder name directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:29:53] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:54] IP:::1 URI: /easygiant/upload/main POST enter_x:18 enter_y:26 directory:/home/tonicucoz/Apache/easygiant/media/.svn/ +[2010-04-14 23:29:54] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:56] IP:::1 URI: /easygiant/upload/main POST enter_x:29 enter_y:19 directory:/home/tonicucoz/Apache/easygiant/media/.svn/tmp/ +[2010-04-14 23:29:56] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:58] IP:::1 URI: /easygiant/upload/main POST enter_x:36 enter_y:23 directory:/home/tonicucoz/Apache/easygiant/media/.svn/tmp/text-base/ +[2010-04-14 23:29:58] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:29:59] IP:::1 URI: /easygiant/upload/main POST enter_x:14 enter_y:21 directory:/home/tonicucoz/Apache/easygiant/media/.svn/tmp/ +[2010-04-14 23:29:59] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:30:00] IP:::1 URI: /easygiant/upload/main POST enter_x:32 enter_y:15 directory:/home/tonicucoz/Apache/easygiant/media/.svn/tmp/prop-base/ +[2010-04-14 23:30:00] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:30:01] IP:::1 URI: /easygiant/upload/main POST enter_x:30 enter_y:8 directory:/home/tonicucoz/Apache/easygiant/media/.svn/tmp/ +[2010-04-14 23:30:01] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:30:01] IP:::1 URI: /easygiant/upload/main POST enter_x:30 enter_y:11 directory:/home/tonicucoz/Apache/easygiant/media/.svn/tmp/ +[2010-04-14 23:30:01] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:30:02] IP:::1 URI: /easygiant/upload/main POST enter_x:29 enter_y:12 directory:/home/tonicucoz/Apache/easygiant/media/.svn/ +[2010-04-14 23:30:02] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:30:03] IP:::1 URI: /easygiant/upload/main POST enter_x:29 enter_y:12 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:30:03] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:30:04] IP:::1 URI: /easygiant/upload/main POST enter_x:27 enter_y:20 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:30:04] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:31:41] IP:::1 URI: /easygiant/upload/main POST uploadFileAction:upload MAX_FILE_SIZE:3000 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:31:41] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:31:51] IP:::1 URI: /easygiant/upload/main POST uploadFileAction:upload MAX_FILE_SIZE:3000 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:31:51] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:31:53] IP:::1 URI: /easygiant/upload/main POST enter_x:17 enter_y:33 delFileAction:/home/tonicucoz/Apache/easygiant/media/bifido.png directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-04-14 23:31:53] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-14 23:34:52] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:34:53] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-14 23:34:54] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-14 23:34:57] IP:::1 URI: /easygiant/pagine/main/2/undef POST moveupAction:up id_pagine:74 +[2010-04-14 23:34:59] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST generalAction:edit id_pagine:70 +[2010-04-14 23:35:01] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST name:qwe id_navigation:109 titolo: html: id_pagine:70 updateAction:Save +[2010-04-14 23:35:02] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-14 23:35:03] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST generalAction:edit id_pagine:72 +[2010-04-14 23:35:06] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST name:4444 id_navigation:107 titolo: html:234324324wqeqew id_pagine:72 updateAction:Save +[2010-04-14 23:35:07] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-14 23:35:08] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-14 23:35:09] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:35:10] IP:::1 URI: /easygiant/articles/main POST +[2010-04-14 23:35:11] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-14 23:35:11] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:35:12] IP:::1 URI: /easygiant/category/main POST +[2010-04-14 23:35:14] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-14 23:35:16] IP:::1 URI: /easygiant/category/form/insert/2/undef/token POST +[2010-04-14 23:35:18] IP:::1 URI: /easygiant/category/form/insert/2/undef/token POST name:qwe categoria: css: meta_ita: insertAction:Save +[2010-04-14 23:35:20] IP:::1 URI: /easygiant/category/form/insert/2/undef/token POST name:qwe tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-14 23:35:21] IP:::1 URI: /easygiant/category/main/2/undef/token POST +[2010-04-14 23:35:23] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-14 23:35:42] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:16 y:19 delAction:del id_navigation:132 +[2010-04-14 23:35:45] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:24 y:20 delAction:del id_navigation:131 +[2010-04-14 23:35:46] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:13 y:14 delAction:del id_navigation:129 +[2010-04-14 23:35:49] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:10 y:14 delAction:del id_navigation:110 +[2010-04-14 23:35:51] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:12 y:14 delAction:del id_navigation:107 +[2010-04-14 23:35:53] IP:::1 URI: /easygiant/category/main/1/eee/token POST +[2010-04-14 23:35:55] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:38:00] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-14 23:38:02] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:38:02] IP:::1 URI: /easygiant/users/logout POST +[2010-04-14 23:38:08] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:38:09] IP:::1 URI: /easygiant/users/login POST +[2010-04-14 23:38:13] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-14 23:38:16] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:44:00] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-14 23:44:01] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:82 +[2010-04-14 23:44:02] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:82 +[2010-04-14 23:44:03] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:84 +[2010-04-14 23:44:05] IP:::1 URI: /easygiant/pagine/main/1/undef POST movedownAction:down id_pagine:84 +[2010-04-14 23:44:05] IP:::1 URI: /easygiant/pagine/main/1/undef POST movedownAction:down id_pagine:82 +[2010-04-14 23:44:08] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-14 23:44:09] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-14 23:44:12] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-14 23:44:14] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-14 23:44:16] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-14 23:44:18] IP:::1 URI: /easygiant/pagine/main/1/110 POST +[2010-04-14 23:44:20] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-14 23:44:24] IP:::1 URI: /easygiant/pagine/main/1/109 POST delAction:del id_pagine:81 +[2010-04-14 23:48:39] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-14 23:48:41] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST generalAction:edit id_pagine:80 +[2010-04-14 23:48:46] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST name:6756 id_navigation:109 titolo:1 html:567 id_pagine:80 updateAction:Save +[2010-04-14 23:48:52] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST name:6756 id_navigation:109 titolo:12 html:567 id_pagine:80 updateAction:Save +[2010-04-14 23:49:13] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST name:6756 id_navigation:109 titolo:12 html:567 id_pagine:80 updateAction:Save +[2010-04-14 23:49:19] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST name:6756 id_navigation:109 titolo:1 html:567 id_pagine:80 updateAction:Save +[2010-04-14 23:49:22] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST name:6756 id_navigation:109 titolo:2 html:567 id_pagine:80 updateAction:Save +[2010-04-14 23:49:24] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-04-14 23:49:25] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:49:26] IP:::1 URI: /easygiant/post/main POST +[2010-04-14 23:49:28] IP:::1 URI: /easygiant/post/form/insert/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-14 23:49:32] IP:::1 URI: /easygiant/post/form/insert/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qwe interop: autore:Antonio testo:qwe intero: interom: interot: interob: xxx: fff: insertAction:Save +[2010-04-14 23:49:47] IP:::1 URI: /easygiant/post/form/insert/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qwe interop:1 autore:Antonio testo:qwe intero:121212 interom:1 interot:1 interob:33 xxx:11 fff:3 insertAction:Save +[2010-04-14 23:49:52] IP:::1 URI: /easygiant/post/form/insert/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qweeqweqw interop:1 autore:Antonio testo:qwe intero:121212 interom:1 interot:1 interob:33 xxx:11 fff:3 insertAction:Save +[2010-04-14 23:50:04] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-14 23:50:06] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST generalAction:edit id:106 +[2010-04-14 23:50:10] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qweeqweqw interop:1 autore:Antonio testo:qwe intero:121212 interom:qe interot:1 interob:33 xxx:11 fff:3 id:106 updateAction:Save +[2010-04-14 23:50:21] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qweeqweqw interop:1 autore:Antonio testo:qwe intero:121212 interom:11 interot:1 interob:33 xxx:11 fff:3 id:106 updateAction:Save +[2010-04-14 23:50:24] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qweeqweqw interop:1 autore:Giulia testo:qwe intero:121212 interom:11 interot:1 interob:33 xxx:11 fff:3 id:106 updateAction:Save +[2010-04-14 23:50:26] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-14 23:50:30] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:50:32] IP:::1 URI: /easygiant/users/main POST +[2010-04-14 23:50:34] IP:::1 URI: /easygiant/users/form/update/1/0 POST generalAction:edit id_user:3 +[2010-04-14 23:50:36] IP:::1 URI: /easygiant/users/main/1/0 POST +[2010-04-14 23:50:38] IP:::1 URI: /easygiant/users/associate/1/0 POST generalAction:link id_user:3 +[2010-04-14 23:50:39] IP:::1 URI: /easygiant/users/associate/1/0 POST boxIdentifier:3 associateAction:associate id_user:3 +[2010-04-14 23:50:40] IP:::1 URI: /easygiant/users/associate/1/0 POST boxIdentifier:3 associateAction:associate id_user:3 +[2010-04-14 23:50:41] IP:::1 URI: /easygiant/users/associate/1/0 POST boxIdentifier:3 dissociateAction:dissociate id_user:3 +[2010-04-14 23:50:41] IP:::1 URI: /easygiant/users/associate/1/0 POST boxIdentifier:3 dissociateAction:dissociate id_user:3 +[2010-04-14 23:50:45] IP:::1 URI: /easygiant/users/associate/1/0 POST boxIdentifier:3 associateAction:associate id_user:3 +[2010-04-14 23:50:46] IP:::1 URI: /easygiant/users/associate/1/0 POST boxIdentifier:3 dissociateAction:dissociate id_user:3 +[2010-04-14 23:50:48] IP:::1 URI: /easygiant/users/main/1/0 POST +[2010-04-14 23:50:50] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:50:51] IP:::1 URI: /easygiant/users/logout POST +[2010-04-14 23:50:52] IP:::1 URI: /easygiant/users/login POST +[2010-04-14 23:50:56] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-14 23:50:59] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:52:52] IP:::1 URI: /easygiant/post/main POST +[2010-04-14 23:53:47] IP:::1 URI: /easygiant/postnew/main POST +[2010-04-14 23:53:50] IP:::1 URI: /easygiant/postnew/form/update/1/undef/undef/undef POST generalAction:Edit id:106 +[2010-04-14 23:53:53] IP:::1 URI: /easygiant/postnew/form/update POST titolo: autore:Giulia testo:qwe id:106 updateAction:save +[2010-04-14 23:53:57] IP:::1 URI: /easygiant/postnew/form/update POST titolo:qwewqeqwewqe autore:Giulia testo:qwe id:106 updateAction:save +[2010-04-14 23:54:00] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-14 23:58:46] IP:::1 URI: /easygiant/panel/main POST +[2010-04-14 23:58:47] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-14 23:59:02] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-14 23:59:06] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:$$ id_navigation:109 titolo: html: insertAction:Save +[2010-04-14 23:59:11] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:11 id_navigation:109 titolo: html: insertAction:Save +[2010-04-14 23:59:13] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-14 23:59:24] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST generalAction:edit id_pagine:85 +[2010-04-14 23:59:30] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:11 id_navigation:109 titolo: html:undef id_pagine:85 updateAction:Save +[2010-04-14 23:59:46] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:11 id_navigation:109 titolo: html:name id_pagine:85 updateAction:Save +[2010-04-14 23:59:49] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:11 id_navigation:109 titolo:name html:name id_pagine:85 updateAction:Save +[2010-04-14 23:59:53] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:11 id_navigation:109 titolo:1 html:name id_pagine:85 updateAction:Save +[2010-04-14 23:59:56] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:12 id_navigation:109 titolo:1 html:name id_pagine:85 updateAction:Save +[2010-04-15 00:00:14] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:my id_navigation:109 titolo:1 html:name id_pagine:85 updateAction:Save +[2010-04-15 00:00:16] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-15 00:00:17] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-15 00:00:21] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:my id_navigation:109 titolo: html: insertAction:Save +[2010-04-15 00:00:23] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-15 00:00:24] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:00:25] IP:::1 URI: /easygiant/post/main POST +[2010-04-15 00:00:41] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST generalAction:edit id:106 +[2010-04-15 00:00:46] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:qwe interop:1 autore:Giulia testo:qwe intero:121212 interom:11 interot:1 interob:33 xxx:11 fff:3 id:106 updateAction:Save +[2010-04-15 00:00:49] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-15 00:01:39] IP:::1 URI: /easygiant/postnew/main POST +[2010-04-15 00:01:42] IP:::1 URI: /easygiant/postnew/form/update/1/undef/undef/undef POST generalAction:Edit id:106 +[2010-04-15 00:01:46] IP:::1 URI: /easygiant/postnew/form/update POST titolo:qwewqeqwewqe autore:Giulia testo: id:106 updateAction:save +[2010-04-15 00:01:51] IP:::1 URI: /easygiant/postnew/form/update POST titolo:qwewqeqwewqe autore:Giulia testo:gasd id:106 updateAction:save +[2010-04-15 00:02:40] IP:::1 URI: /easygiant/postnew/form/update POST titolo: autore:Giulia testo:gasd id:106 updateAction:save +[2010-04-15 00:02:44] IP:::1 URI: /easygiant/postnew/form/update POST titolo:qweqew autore:Giulia testo:gasd id:106 updateAction:save +[2010-04-15 00:02:45] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:02:46] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:02:47] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:02:48] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:02:51] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST delAction:Delete id:107 +[2010-04-15 00:02:53] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:02:58] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:02:59] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:03:00] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:03:02] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:03:03] IP:::1 URI: /easygiant/post/main POST +[2010-04-15 00:03:05] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST generalAction:edit id:108 +[2010-04-15 00:03:21] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo: interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:03:27] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:8888 interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:03:31] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:88888888 interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:03:37] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:888888888 interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:03:48] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:888888888 interop:0 autore:Antonio testo: intero:23123 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:04:18] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-15 00:04:22] IP:::1 URI: /easygiant/post/main/2/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-15 00:04:23] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-15 00:04:24] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST generalAction:edit id:108 +[2010-04-15 00:04:32] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:rrrrrrr interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:06:29] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:rrrrrrr$$$ interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:06:38] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:1jhgsagd interop:0 autore:Antonio testo: intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:07:21] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:1jhgsagd interop:0 autore:Antonio testo:qwe intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:07:26] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:1jhgsagd interop:0123 autore:Antonio testo:qwe intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:07:34] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:1jhgsagd interop:123 autore:Antonio testo:qwe intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:09:29] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:1jhgsagd interop:123 autore:Antonio testo:qwe intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:09:34] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:1jhgsagd interop:123 autore:Antonio testo:qwe intero:24523423 interom:0 interot:0 interob:0 xxx:0 fff:0 id:108 updateAction:Save +[2010-04-15 00:09:36] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-15 00:09:46] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST generalAction:edit id:104 +[2010-04-15 00:09:50] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:888 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:09:54] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:8888 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:10:55] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:8888 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:07] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:8888 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:12] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:888 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:16] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:88 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:20] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo: interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:24] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:234234 234 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:30] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:234234234 interop:0 autore:Antonio testo:werwer intero:234234234 interom:0 interot:0 interob:0 xxx:0 fff:0 id:104 updateAction:Save +[2010-04-15 00:12:32] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-15 00:12:34] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:12:35] IP:::1 URI: /easygiant/category/main POST +[2010-04-15 00:12:37] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-15 00:12:38] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name: categoria: css: meta_ita: insertAction:Save +[2010-04-15 00:12:41] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name: visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-15 00:12:44] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name: tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-15 00:12:49] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:qwewqe visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-15 00:12:51] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST name:qwewqe tick:1 visibile:1 categoria: css: meta_ita: insertAction:Save +[2010-04-15 00:12:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-15 00:16:26] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:16:28] IP:::1 URI: /easygiant/post/main POST +[2010-04-15 00:16:31] IP:::1 URI: /easygiant/postnew/main POST +[2010-04-15 00:16:34] IP:::1 URI: /easygiant/postnew/form/update/1/undef/undef/undef POST generalAction:Edit id:108 +[2010-04-15 00:16:37] IP:::1 URI: /easygiant/postnew/form/update POST titolo:1jhgsagd autore: testo:qwe id:108 updateAction:save +[2010-04-15 00:16:44] IP:::1 URI: /easygiant/postnew/form/update POST titolo:1jhgsagd autore:Antonio testo: id:108 updateAction:save +[2010-04-15 00:16:47] IP:::1 URI: /easygiant/postnew/form/update POST titolo:1jhgsagd autore:Antonio testo:wqeqe id:108 updateAction:save +[2010-04-15 00:16:52] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:16:53] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:16:54] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:16:57] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:16:58] IP:::1 URI: /easygiant/postnew/form/update/1/undef/undef/undef POST generalAction:Edit id:109 +[2010-04-15 00:17:00] IP:::1 URI: /easygiant/postnew/form/update POST titolo: autore: testo: id:109 updateAction:save +[2010-04-15 00:17:01] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:17:03] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST delAction:Delete id:109 +[2010-04-15 00:18:02] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:18:03] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:18:59] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:19:28] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:19:54] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:20:07] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:20:12] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:20:29] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:21:19] IP:::1 URI: /easygiant/postnew/form/insert POST titolo: autore: testo: insertAction:save +[2010-04-15 00:21:24] IP:::1 URI: /easygiant/postnew/form/insert POST titolo:qwe autore: testo:qwe insertAction:save +[2010-04-15 00:21:26] IP:::1 URI: /easygiant/postnew/form/insert POST titolo:qwe autore:qweqe testo:qwe insertAction:save +[2010-04-15 00:21:27] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:21:29] IP:::1 URI: /easygiant/postnew/form/update/1/undef/undef/undef POST generalAction:Edit id:110 +[2010-04-15 00:21:31] IP:::1 URI: /easygiant/postnew/form/update POST titolo:qwe autore: testo:qwe id:110 updateAction:save +[2010-04-15 00:21:33] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:21:34] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST delAction:Delete id:110 +[2010-04-15 00:22:10] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:22:14] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:22:15] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:22:18] IP:::1 URI: /easygiant/postnew/form/insert POST titolo:6 autore:666 testo:666 insertAction:save +[2010-04-15 00:22:31] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:22:33] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST delAction:Delete id:111 +[2010-04-15 00:22:34] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-15 00:22:38] IP:::1 URI: /easygiant/postnew/form/insert POST titolo:6 autore:666 testo:666 insertAction:save +[2010-04-15 00:22:45] IP:::1 URI: /easygiant/postnew/form/insert POST titolo:5555 autore:666 testo:666 insertAction:save +[2010-04-15 00:22:46] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-15 00:23:16] IP:::1 URI: /easygiant/postnew/form/update/1/undef/undef/undef POST generalAction:Edit id:112 +[2010-04-15 00:23:19] IP:::1 URI: /easygiant/postnew/form/update POST titolo:5555 autore:666 testo:666 id:112 updateAction:save +[2010-04-15 00:23:22] IP:::1 URI: /easygiant/postnew/form/update POST titolo:55 autore:666 testo:666 id:112 updateAction:save +[2010-04-15 00:23:45] IP:::1 URI: /easygiant/postnew/form/update POST titolo:557 autore:666 testo:666 id:112 updateAction:save +[2010-04-15 00:55:25] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:55:27] IP:::1 URI: /easygiant/users/login POST +[2010-04-15 00:55:31] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-15 00:55:34] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 00:55:35] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-15 00:57:27] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-15 00:59:17] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-15 01:18:45] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 01:18:46] IP:::1 URI: /easygiant/users/login POST +[2010-04-15 01:18:50] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-15 01:18:53] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 01:18:54] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-15 01:18:56] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 01:18:57] IP:::1 URI: /easygiant/articles/main POST +[2010-04-15 01:18:58] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-15 01:18:59] IP:::1 URI: /easygiant/articles/form/insert/1/undef/undef POST +[2010-04-15 01:18:59] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-15 01:19:00] IP:::1 URI: /easygiant/articles/form/insert/1/undef/undef POST title: author: category:politica abstract: content: insertAction:Save +[2010-04-15 01:19:01] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-15 01:19:02] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 01:19:04] IP:::1 URI: /easygiant/articles/main POST +[2010-04-15 01:19:04] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-15 01:19:05] IP:::1 URI: /easygiant/articles/main/1/undef/undef POST delAction:del id:19 +[2010-04-15 01:19:05] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-15 01:19:14] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 01:19:15] IP:::1 URI: /easygiant/category/main POST +[2010-04-15 01:19:18] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST x:22 y:20 generalAction:edit id_navigation:133 +[2010-04-15 01:19:20] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST name:qwewqe visibile:1 categoria: css: meta_ita: id_navigation:133 updateAction:Save +[2010-04-15 01:19:23] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST name:qwewqe tick:1 visibile:1 categoria: css: meta_ita: id_navigation:133 updateAction:Save +[2010-04-15 01:19:23] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-15 01:19:25] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 01:19:26] IP:::1 URI: /easygiant/users/logout POST +[2010-04-15 01:19:27] IP:::1 URI: /easygiant/users/login POST +[2010-04-15 18:10:06] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 18:10:08] IP:::1 URI: /easygiant/users/login POST +[2010-04-15 18:10:12] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-15 18:10:16] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 18:10:17] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-15 18:10:54] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-15 18:10:56] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-15 18:12:03] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-15 18:12:10] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 18:12:15] IP:::1 URI: /easygiant/category/main POST +[2010-04-15 18:12:26] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-15 18:15:19] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:16:44] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:18:14] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:18:54] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:19:10] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:19:26] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:19:35] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:19:47] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-15 18:20:57] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 18:20:58] IP:::1 URI: /easygiant/post/main POST +[2010-04-15 18:21:03] IP:::1 URI: /easygiant/postnew/main POST +[2010-04-15 18:21:53] IP:::1 URI: /easygiant/panel/main POST +[2010-04-15 18:21:54] IP:::1 URI: /easygiant/users/logout POST +[2010-04-15 18:21:55] IP:::1 URI: /easygiant/users/login POST +[2010-04-15 18:21:58] IP:::1 URI: /easygiant/pagine/testinclude POST +[2010-04-16 00:54:01] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 00:54:02] IP:::1 URI: /easygiant/users/login POST +[2010-04-16 00:54:06] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-16 00:54:09] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 00:54:11] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 00:54:12] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 00:54:13] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 00:56:09] IP:::1 URI: /easygiant/post/main/2/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-16 00:56:10] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-16 00:56:12] IP:::1 URI: /easygiant/post/main/2/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-16 00:56:13] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-16 00:57:39] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST generalAction:edit id:112 +[2010-04-16 00:57:44] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:555 interop:0 autore:Antonio testo:666 intero:0 interom:0 interot:0 interob:0 xxx:0 fff:0 id:112 updateAction:Save +[2010-04-16 00:57:50] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:555r interop:0 autore:Antonio testo:666 intero:werwer interom:0 interot:0 interob:0 xxx:0 fff:0 id:112 updateAction:Save +[2010-04-16 00:57:54] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:555r interop:0 autore:Antonio testo:666 intero:121212 interom:0 interot:0 interob:0 xxx:0 fff:0 id:112 updateAction:Save +[2010-04-16 00:57:58] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/undefi/undefi/undefi/undefi POST titolo:555r interop:0 autore:Antonio testo:666 intero:12121212 interom:0 interot:0 interob:0 xxx:0 fff:0 id:112 updateAction:Save +[2010-04-16 00:58:00] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-16 00:58:03] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST moveupAction:up id:106 +[2010-04-16 00:58:05] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST moveupAction:up id:108 +[2010-04-16 00:58:07] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Friday/undefi POST +[2010-04-16 00:58:10] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/undefi POST +[2010-04-16 00:58:12] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/undefi POST moveupAction:up id:104 +[2010-04-16 00:58:13] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/undefi POST moveupAction:up id:104 +[2010-04-16 00:58:16] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-04-16 00:58:22] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 00:58:23] IP:::1 URI: /easygiant/users/logout POST +[2010-04-16 00:58:24] IP:::1 URI: /easygiant/users/login POST +[2010-04-16 20:23:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:23:06] IP:::1 URI: /easygiant/users/login POST +[2010-04-16 20:23:10] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-16 20:23:13] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:23:26] IP:::1 URI: /easygiant/articles/main POST +[2010-04-16 20:23:26] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-16 20:23:31] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:23:47] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:24:02] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:24:04] IP:::1 URI: /easygiant/category/form/update/1/undef/token POST x:13 y:24 generalAction:edit id_navigation:133 +[2010-04-16 20:24:04] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 20:24:04] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 20:24:16] IP:::1 URI: /easygiant/category//update/1/undef/token POST +[2010-04-16 20:24:16] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 20:24:16] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 20:24:29] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:38:56] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 20:38:59] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:84 +[2010-04-16 20:39:00] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:85 +[2010-04-16 20:39:01] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:39:03] IP:::1 URI: /easygiant/articles/main POST +[2010-04-16 20:39:03] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-16 20:39:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:39:05] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 20:39:07] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:39:08] IP:::1 URI: /easygiant/users/main POST +[2010-04-16 20:39:10] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:39:10] IP:::1 URI: /easygiant/users/logout POST +[2010-04-16 20:39:11] IP:::1 URI: /easygiant/users/login POST +[2010-04-16 20:51:05] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-16 20:51:08] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:51:10] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 20:51:12] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:52:50] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:52:51] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:52:52] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:52:53] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:52:56] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 20:52:58] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-16 20:52:59] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:53:00] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:53:32] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:53:40] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:53:54] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:54:16] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:54:20] IP:::1 URI: /easygiant/panel/cazzo POST +[2010-04-16 20:54:23] IP:::1 URI: /easygiant/panel/cazzo POST +[2010-04-16 20:54:25] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:54:29] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:54:30] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:54:31] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:54:32] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 20:54:33] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:54:34] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 20:54:36] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:56:41] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:56:41] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 20:56:41] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 20:56:49] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:56:49] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 20:56:49] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 20:57:02] IP:::1 URI: /easygiant/panel/cazzo POST +[2010-04-16 20:57:25] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:57:25] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 20:57:25] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 20:57:55] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:58:09] IP:::1 URI: /easygiant/panel POST +[2010-04-16 20:58:15] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:58:19] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 20:58:23] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 20:58:24] IP:::1 URI: /easygiant/groups/main POST +[2010-04-16 21:00:05] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:00:05] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:00:05] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:00:21] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:00:23] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:00:25] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST generalAction:edit id_pagine:85 +[2010-04-16 21:00:27] IP:::1 URI: /easygiant/pagine/form/update/1/undef POST name:12 id_navigation:109 titolo:1 html:name id_pagine:85 updateAction:Save +[2010-04-16 21:00:29] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-16 21:00:30] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:00:31] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 21:00:31] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:00:31] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:01:12] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:01:12] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:01:12] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:01:25] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:02:29] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:02:30] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:02:31] IP:::1 URI: /easygiant/articles/main POST +[2010-04-16 21:02:31] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:02:31] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:02:34] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 21:02:34] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:02:34] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:06:12] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:06:14] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:06:15] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:06:16] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:06:17] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:07:39] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:07:40] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-16 21:07:42] IP:::1 URI: /easygiant/pagine/form/insert/2/undef POST +[2010-04-16 21:07:42] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:07:43] IP:::1 URI: /easygiant/groups/main POST +[2010-04-16 21:07:44] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:07:49] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:07:50] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:07:50] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:07:52] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 21:07:52] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:07:52] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:07:54] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 21:07:54] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:07:54] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:07:57] IP:::1 URI: /easygiant/groups/main POST +[2010-04-16 21:07:57] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:07:57] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:07:59] IP:::1 URI: /easygiant/upload/main POST +[2010-04-16 21:07:59] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:07:59] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:01] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 21:08:01] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:01] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:03] IP:::1 URI: /easygiant/news/main POST +[2010-04-16 21:08:03] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:03] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:05] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:08:05] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:05] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:07] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 21:08:07] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:07] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:09] IP:::1 URI: /easygiant/groups/main POST +[2010-04-16 21:08:09] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:09] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:11] IP:::1 URI: /easygiant/users/main POST +[2010-04-16 21:08:11] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:11] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:13] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 21:08:13] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:13] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:15] IP:::1 URI: /easygiant/password/form POST +[2010-04-16 21:08:15] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:15] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:08:31] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:08:36] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:08:40] IP:::1 URI: /easygiant/post/main POST +[2010-04-16 21:08:41] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:08:41] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:11:07] IP:::1 URI: /easygiant/groups/main POST +[2010-04-16 21:11:07] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:11:07] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:11:09] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:11:11] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:12:13] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-16 21:12:17] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:12:42] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:13:39] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:18:29] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:18:34] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:18:44] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:19:23] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:19:39] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:41] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:44] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:45] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:46] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:48] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:52] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:52] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:19:55] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:19:57] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:19:59] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:20:14] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:20:17] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:30:59] IP:::1 URI: /easygiant/pagine/form/form/1/1 POST generalAction:Save +[2010-04-16 21:31:26] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:31:56] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 21:31:56] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:31:56] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:32:04] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:32:05] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 21:32:05] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-16 21:32:05] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-16 21:32:12] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:32:15] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-16 21:32:16] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:32:18] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:32:18] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-16 21:32:22] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-16 21:32:33] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:32:37] IP:::1 URI: /easygiant/users/logout POST +[2010-04-16 21:32:39] IP:::1 URI: /easygiant/users/login POST +[2010-04-16 21:57:16] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-16 21:57:19] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:57:20] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-16 21:57:22] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-16 21:57:23] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:57:24] IP:::1 URI: /easygiant/articles/main POST +[2010-04-16 21:57:24] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-16 21:57:26] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:57:52] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:58:38] IP:::1 URI: /easygiant/category/main POST +[2010-04-16 21:58:39] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:58:40] IP:::1 URI: /easygiant/users/main POST +[2010-04-16 21:58:41] IP:::1 URI: /easygiant/users/form/insert/1/0 POST +[2010-04-16 21:58:43] IP:::1 URI: /easygiant/users/form/insert/1/0 POST username: password: confirmation: insertAction:Save +[2010-04-16 21:58:44] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:58:45] IP:::1 URI: /easygiant/upload/main POST +[2010-04-16 21:58:45] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-16 21:58:47] IP:::1 URI: /easygiant/panel/main POST +[2010-04-16 21:58:48] IP:::1 URI: /easygiant/users/logout POST +[2010-04-16 21:58:49] IP:::1 URI: /easygiant/users/login POST +[2010-04-18 00:11:37] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 00:11:39] IP:::1 URI: /easygiant/users/login POST +[2010-04-18 00:11:42] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-18 00:11:45] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 00:11:47] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 00:12:21] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:12:22] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:13:22] IP:::1 URI: /easygiant/cazzo POST +[2010-04-18 00:13:27] IP:::1 URI: /easygiant/pene POST +[2010-04-18 00:13:34] IP:::1 URI: /easygiant/cazzo POST +[2010-04-18 00:13:36] IP:::1 URI: /easygiant/cazzoe POST +[2010-04-18 00:13:58] IP:::1 URI: /easygiant/cazzo/ POST +[2010-04-18 00:14:05] IP:::1 URI: /easygiant/cazzo/wer/erwwer/ POST +[2010-04-18 00:14:19] IP:::1 URI: /easygiant/cazzor/wer/erwwer/ POST +[2010-04-18 00:15:06] IP:::1 URI: /easygiant/cazzor/wer/erwwer/ POST +[2010-04-18 00:17:08] IP:::1 URI: /easygiant/cazzor/wer/erwwer/ POST +[2010-04-18 00:17:13] IP:::1 URI: /easygiant/cazzo/wer/erwwer/ POST +[2010-04-18 00:17:27] IP:::1 URI: /easygiant/cazzo/wer/erwwer/ POST +[2010-04-18 00:17:29] IP:::1 URI: /easygiant/cazzo/wer/erwwer/ POST +[2010-04-18 00:19:37] IP:::1 URI: /easygiant/cazzo/wer/erwwer/ POST +[2010-04-18 00:19:43] IP:::1 URI: /easygiant/cazzoe/wer/erwwer/ POST +[2010-04-18 00:19:56] IP:::1 URI: /easygiant/pene/wer/erwwer/ POST +[2010-04-18 00:20:53] IP:::1 URI: /easygiant/pene/wer/erwwer/ POST +[2010-04-18 00:20:58] IP:::1 URI: /easygiant/cazzo/wer/erwwer/ POST +[2010-04-18 00:21:09] IP:::1 URI: /easygiant/pene/wer/erwwer/ POST +[2010-04-18 00:21:24] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 00:21:38] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 00:21:40] IP:::1 URI: /easygiant/pagine/main POST +[2010-04-18 00:21:55] IP:::1 URI: /easygiant/pene POST +[2010-04-18 00:22:00] IP:::1 URI: /easygiant/pene/ POST +[2010-04-18 00:22:04] IP:::1 URI: /easygiant/pene/werewr POST +[2010-04-18 00:22:15] IP:::1 URI: /easygiant/pene/werewr/erwer/erwerew POST +[2010-04-18 00:22:36] IP:::1 URI: /easygiant/ POST +[2010-04-18 00:22:43] IP:::1 URI: /easygiant/pene POST +[2010-04-18 00:22:47] IP:::1 URI: /easygiant/pene/ POST +[2010-04-18 00:23:06] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:30:18] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:30:48] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:30:51] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:31:05] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:31:06] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:31:08] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:31:09] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:31:10] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:31:11] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:31:13] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:31:14] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:31:15] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:31:16] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:31:54] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:56:41] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:56:43] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-18 00:56:44] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:56:54] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:57:04] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 00:57:04] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 00:57:04] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:00:40] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 01:00:52] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:00:52] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:00:52] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:00:55] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:00:55] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:00:55] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:01:01] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 01:01:03] IP:::1 URI: /easygiant/box/main POST +[2010-04-18 01:01:06] IP:::1 URI: /easygiant/box/form/update/1/id/undef POST generalAction:edit id:1 +[2010-04-18 01:01:20] IP:::1 URI: /easygiant/box/form/update/1/id/undef POST allowed_titles:right title:right xml:<box>
+ <mod>
+ <type>image</type>
+ <src>http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Bundesarchiv_Bild_183-R76619%2C_Russland%2C_Kesselschlacht_Stalingrad.jpg/150px-Bundesarchiv_Bild_183-R76619%2C_Russland%2C_Kesselschlacht_Stalingrad.jpg</src>
+<width>120px</width>
+<height>100px</height>
+<title>Prima prova di title</title>
+ </mod>
+
+ <mod>
+ <type>link</type>
+ <href>http://www.internettaio.org</href>
+ <text>Internettaio</text>
+ <classname>classname</classname>
+
+ </mod>
+
+<mod>
+<type>linkimage</type>
+<href>http://www.php.net</href>
+<src>http://static.php.net/www.php.net/images/php.gif</src>
+<width>150px</width>
+</mod>
+
+<mod>
+
+<type>raw</type>
+<text><![CDATA[
+
+ciao!! <a href="http://www.easygiant.org"><b>Easy!!</b></a>
+
+]]></text>
+
+</mod>
+
+ <mod>
+ <type>link</type>
+ <href>http://www.apineindustriose.org</href>
+ <text>Apineindustriose</text>
+ <classname>classname</classname>
+
+ </mod>
+
+
+
+
+
+</box> id:1 updateAction:Save +[2010-04-18 01:01:23] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:01:23] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:01:23] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:03:28] IP:::1 URI: /easygiant/box/form/update/1/id/undef POST allowed_titles:right title:right xml:<box>
+ <mod>
+ <type>image</type>
+ <src>http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Bundesarchiv_Bild_183-R76619%2C_Russland%2C_Kesselschlacht_Stalingrad.jpg/150px-Bundesarchiv_Bild_183-R76619%2C_Russland%2C_Kesselschlacht_Stalingrad.jpg</src>
+<width>120px</width>
+<height>100px</height>
+<title>Prima prova di title</title>
+ </mod>
+
+ <mod>
+ <type>link</type>
+ <href>http://www.internettaio.org</href>
+ <text>Internettaio</text>
+ <classname>classname</classname>
+
+ </mod>
+
+<mod>
+<type>linkimage</type>
+<href>http://www.php.net</href>
+<src>http://static.php.net/www.php.net/images/php.gif</src>
+<width>150px</width>
+</mod>
+
+<mod>
+
+
+<text><![CDATA[
+
+ciao!! <a href="http://www.easygiant.org"><b>Easy!!</b></a>
+
+]]></text>
+
+</mod>
+
+ <mod>
+ <type>link</type>
+ <href>http://www.apineindustriose.org</href>
+ <text>Apineindustriose</text>
+ <classname>classname</classname>
+
+ </mod>
+
+
+
+
+
+</box> id:1 updateAction:Save +[2010-04-18 01:03:30] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:03:30] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:03:30] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:03:52] IP:::1 URI: /easygiant/box/form/update/1/id/undef POST allowed_titles:right title:right xml:<box>
+ <mod>
+ <type>image</type>
+ <src>http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Bundesarchiv_Bild_183-R76619%2C_Russland%2C_Kesselschlacht_Stalingrad.jpg/150px-Bundesarchiv_Bild_183-R76619%2C_Russland%2C_Kesselschlacht_Stalingrad.jpg</src>
+<width>120px</width>
+<height>100px</height>
+<title>Prima prova di title</title>
+ </mod>
+
+ <mod>
+ <type>link</type>
+ <href>http://www.internettaio.org</href>
+ <text>Internettaio</text>
+ <classname>classname</classname>
+
+ </mod>
+
+<mod>
+<type>linkimage</type>
+<href>http://www.php.net</href>
+<src>http://static.php.net/www.php.net/images/php.gif</src>
+<width>150px</width>
+</mod>
+
+<mod>
+
+<type>raw</type>
+<text><![CDATA[
+
+ciao!! <a href="http://www.easygiant.org"><b>Easy!!</b></a>
+
+]]></text>
+
+</mod>
+
+ <mod>
+ <type>link</type>
+ <href>http://www.apineindustriose.org</href>
+ <text>Apineindustriose</text>
+ <classname>classname</classname>
+
+ </mod>
+
+
+
+
+
+</box> id:1 updateAction:Save +[2010-04-18 01:03:55] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:03:55] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:03:55] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:08:07] IP:::1 URI: /easygiant/box/main/1/id/undef POST +[2010-04-18 01:08:13] IP:::1 URI: /easygiant/box/form/insert/1/id/undef POST +[2010-04-18 01:16:44] IP:::1 URI: /easygiant/box/main/1/id/undef POST +[2010-04-18 01:16:48] IP:::1 URI: /easygiant/users/login POST +[2010-04-18 01:16:51] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-18 01:16:55] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 01:16:55] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 01:24:22] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:24:23] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:24:23] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:24:23] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:24:24] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:24:24] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:24:24] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:24:27] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:24:27] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:24:27] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 01:24:28] IP:::1 URI: /easygiant/articles/index POST +[2010-04-18 01:24:28] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-18 01:24:28] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-18 14:15:45] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:15:47] IP:::1 URI: /easygiant/users/login POST +[2010-04-18 14:15:51] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-18 14:15:54] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:37:49] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:38:03] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:38:13] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:38:55] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:39:22] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-18 14:39:24] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-18 14:39:39] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-18 14:39:46] IP:::1 URI: /easygiant/panel/main/1/undef/token POST +[2010-04-18 14:39:47] IP:::1 URI: /easygiant/articles/main POST +[2010-04-18 14:39:48] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:49] IP:::1 URI: /easygiant/panel/main/1/undef/undef POST +[2010-04-18 14:39:51] IP:::1 URI: /easygiant/articles/main POST +[2010-04-18 14:39:51] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:52] IP:::1 URI: /easygiant/articles/form/insert/1/undef/undef POST +[2010-04-18 14:39:52] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:53] IP:::1 URI: /easygiant/articles/main/1/undef/undef POST +[2010-04-18 14:39:53] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:55] IP:::1 URI: /easygiant/articles/form/insert/1/undef/undef POST +[2010-04-18 14:39:55] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:56] IP:::1 URI: /easygiant/articles/main/1/undef/undef POST +[2010-04-18 14:39:56] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:57] IP:::1 URI: /easygiant/articles/main/1/Antonio/undef POST +[2010-04-18 14:39:58] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:39:59] IP:::1 URI: /easygiant/articles/form/insert/1/Antonio/undef POST +[2010-04-18 14:39:59] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:00] IP:::1 URI: /easygiant/articles/main/1/Antonio/undef POST +[2010-04-18 14:40:00] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:01] IP:::1 URI: /easygiant/articles/form/insert/1/Antonio/undef POST +[2010-04-18 14:40:02] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:03] IP:::1 URI: /easygiant/articles/main/1/Antonio/undef POST +[2010-04-18 14:40:03] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:04] IP:::1 URI: /easygiant/articles/main/1/Antonio/cultura POST +[2010-04-18 14:40:05] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:10] IP:::1 URI: /easygiant/articles/form/insert/1/Antonio/cultura POST +[2010-04-18 14:40:10] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:14] IP:::1 URI: /easygiant/articles/main/1/Antonio/cultura POST +[2010-04-18 14:40:14] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:16] IP:::1 URI: /easygiant/articles/main/1/Antonio/economia POST +[2010-04-18 14:40:16] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:17] IP:::1 URI: /easygiant/articles/main/1/Antonio/politica POST +[2010-04-18 14:40:17] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:19] IP:::1 URI: /easygiant/articles/form/update/1/Antonio/politica POST generalAction:edit id:17 +[2010-04-18 14:40:19] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:21] IP:::1 URI: /easygiant/articles/main/1/Antonio/politica POST +[2010-04-18 14:40:22] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:40:22] IP:::1 URI: /easygiant/panel/main/1/Antonio/politica POST +[2010-04-18 14:41:15] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:41:16] IP:::1 URI: /easygiant/panel/main/1/undef/token POST +[2010-04-18 14:41:17] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:41:25] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-18 14:41:26] IP:::1 URI: /easygiant/panel/main/1/undef/token POST +[2010-04-18 14:41:28] IP:::1 URI: /easygiant/category/main POST +[2010-04-18 14:41:29] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-18 14:41:31] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-04-18 14:41:45] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-04-18 14:41:46] IP:::1 URI: /easygiant/panel/main/1/undef/token POST +[2010-04-18 14:41:47] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 14:41:49] IP:::1 URI: /easygiant/panel/main/1/undef POST +[2010-04-18 14:41:51] IP:::1 URI: /easygiant/upload/main POST +[2010-04-18 14:41:51] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-18 14:41:53] IP:::1 URI: /easygiant/panel/main/main POST +[2010-04-18 14:41:54] IP:::1 URI: /easygiant/groups/main POST +[2010-04-18 14:41:55] IP:::1 URI: /easygiant/groups/form/insert/1/username/undefined POST +[2010-04-18 14:41:56] IP:::1 URI: /easygiant/panel/main/1/username/undefined POST +[2010-04-18 14:42:01] IP:::1 URI: /easygiant/upload/main POST +[2010-04-18 14:42:01] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-18 14:42:02] IP:::1 URI: /easygiant/panel/main/main POST +[2010-04-18 14:42:26] IP:::1 URI: /easygiant/upload/main POST +[2010-04-18 14:42:26] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-04-18 14:42:28] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:42:51] IP:::1 URI: /easygiant/post/main POST +[2010-04-18 14:42:54] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-04-18 14:43:05] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/19/undefi/undefi POST +[2010-04-18 14:43:08] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/1/19/undefi/undefi POST generalAction:edit id:105 +[2010-04-18 14:43:11] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/1/19/undefi/undefi POST titolo:qwewqe interop:123 autore:Antonio testo:123
+<<<
+
+>>>
+
+""
+
+'' intero:111123 interom:123 interot:127 interob:1 xxx:123 fff:1 id:105 updateAction:Save +[2010-04-18 14:43:20] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/1/19/undefi/undefi POST titolo:qwe interop:123 autore:Antonio testo:123
+<<<
+
+>>>
+
+""
+
+'' intero:111123 interom:123 interot:127 interob:1 xxx:123 fff:1 id:105 updateAction:Save +[2010-04-18 14:43:23] IP:::1 URI: /easygiant/post/form/update/1/undefi/undefi/1/19/undefi/undefi POST titolo:qwee interop:123 autore:Antonio testo:123
+<<<
+
+>>>
+
+""
+
+'' intero:111123 interom:123 interot:127 interob:1 xxx:123 fff:1 id:105 updateAction:Save +[2010-04-18 14:43:24] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/19/undefi/undefi POST +[2010-04-18 14:43:28] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-04-18 14:43:41] IP:::1 URI: /easygiant/panel/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-04-18 14:44:38] IP:::1 URI: /easygiant/articles/main POST +[2010-04-18 14:44:38] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:44:39] IP:::1 URI: /easygiant/articles/main/1/undef/cultura POST +[2010-04-18 14:44:39] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-04-18 14:44:45] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:45:04] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 14:45:05] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:45:07] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 14:45:08] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-18 14:45:11] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-18 14:46:40] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:46:43] IP:::1 URI: /easygiant/post/main POST +[2010-04-18 14:46:46] IP:::1 URI: /easygiant/postnew/main POST +[2010-04-18 14:46:58] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-18 14:46:59] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:47:02] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:47:21] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:47:23] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:47:44] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:48:07] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:48:10] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-18 14:48:16] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:48:18] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/1 POST +[2010-04-18 14:48:20] IP:::1 URI: /easygiant/postnew/main/1/undef/94/undef POST +[2010-04-18 14:48:23] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:49:21] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-18 14:49:40] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:49:46] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-18 14:49:47] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:49:48] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-04-18 14:49:50] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-04-18 14:51:45] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:51:47] IP:::1 URI: /easygiant/users/logout POST +[2010-04-18 14:51:48] IP:::1 URI: /easygiant/users/login POST +[2010-04-18 14:51:54] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-18 14:51:58] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:51:59] IP:::1 URI: /easygiant/users/main POST +[2010-04-18 14:52:04] IP:::1 URI: /easygiant/users/main/1/0 POST delAction:del id_user:3 +[2010-04-18 14:52:05] IP:::1 URI: /easygiant/users/form/update/1/0 POST generalAction:edit id_user:3 +[2010-04-18 14:52:07] IP:::1 URI: /easygiant/users/form/update/1/0 POST username:giulia password: confirmation: id_user:3 updateAction:Save +[2010-04-18 14:52:08] IP:::1 URI: /easygiant/users/main/1/0 POST +[2010-04-18 14:52:10] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:52:12] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-18 14:52:15] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-18 14:52:17] IP:::1 URI: /easygiant/pagine/form/insert/1/107 POST +[2010-04-18 14:52:18] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-04-18 14:52:20] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:52:21] IP:::1 URI: /easygiant/password/form POST +[2010-04-18 14:52:23] IP:::1 URI: /easygiant/password/form/update/ POST old: password: confirmation: updateAction:save +[2010-04-18 14:52:24] IP:::1 URI: /easygiant/panel/main/main POST +[2010-04-18 14:52:26] IP:::1 URI: /easygiant/news/main POST +[2010-04-18 14:52:28] IP:::1 URI: /easygiant/news/form/update/1 POST generalAction:edit id:2 +[2010-04-18 14:52:29] IP:::1 URI: /easygiant/news/main/1 POST +[2010-04-18 14:52:31] IP:::1 URI: /easygiant/news/form/insert/1 POST +[2010-04-18 14:52:38] IP:::1 URI: /easygiant/news/form/insert/1 POST title: giornale:corriere content: insertAction:Save +[2010-04-18 14:52:40] IP:::1 URI: /easygiant/news/main/1 POST +[2010-04-18 14:52:42] IP:::1 URI: /easygiant/panel/main POST +[2010-04-18 14:52:44] IP:::1 URI: /easygiant/users/logout POST +[2010-04-18 14:52:45] IP:::1 URI: /easygiant/users/login POST +[2010-04-19 23:29:19] IP:::1 URI: /easygiant/panel/main POST +[2010-04-19 23:29:21] IP:::1 URI: /easygiant/users/login POST +[2010-04-19 23:29:24] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-04-19 23:29:27] IP:::1 URI: /easygiant/panel/main POST +[2010-04-19 23:29:29] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-04-19 23:31:42] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-04-19 23:31:43] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:32:24] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:32:45] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:32:45] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-04-19 23:32:45] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-04-19 23:34:54] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:35:26] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:35:42] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:35:45] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:84 +[2010-04-19 23:35:47] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:85 +[2010-04-19 23:35:48] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:84 +[2010-04-19 23:35:52] IP:::1 URI: /easygiant/pagine/main/1/undef POST movedownAction:down id_pagine:84 +[2010-04-19 23:35:55] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:72 +[2010-04-19 23:35:58] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:74 +[2010-04-19 23:36:00] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:72 +[2010-04-19 23:36:03] IP:::1 URI: /easygiant/pagine/main/1/undef POST moveupAction:up id_pagine:74 +[2010-04-19 23:36:19] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:36:20] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:36:48] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:37:14] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:37:15] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:37:22] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:37:23] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:37:24] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name: id_navigation:109 titolo: html: insertAction:Save +[2010-04-19 23:37:27] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:werwer id_navigation:109 titolo: html: insertAction:Save +[2010-04-19 23:37:28] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:37:31] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:37:33] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name:werwer id_navigation:109 titolo: html: insertAction:Save +[2010-04-19 23:37:35] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:37:37] IP:::1 URI: /easygiant/pagine/main/1/undef POST delAction:del id_pagine:88 +[2010-04-19 23:37:38] IP:::1 URI: /easygiant/pagine/main/1/undef POST delAction:del id_pagine:87 +[2010-04-19 23:40:38] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:41:00] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:41:01] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:41:40] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:44:57] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:45:13] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:45:14] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-04-19 23:46:00] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-04-19 23:46:02] IP:::1 URI: /easygiant/panel/main POST +[2010-04-19 23:46:03] IP:::1 URI: /easygiant/category/main POST +[2010-04-19 23:46:04] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:8 y:18 moveupAction:up id_navigation:127 +[2010-04-19 23:46:06] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:15 y:16 moveupAction:up id_navigation:133 +[2010-04-19 23:46:07] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:6 y:14 moveupAction:up id_navigation:127 +[2010-04-19 23:46:07] IP:::1 URI: /easygiant/category/main/1/undef/token POST x:17 y:24 moveupAction:up id_navigation:133 +[2010-04-19 23:46:10] IP:::1 URI: /easygiant/panel/main POST +[2010-04-19 23:46:11] IP:::1 URI: /easygiant/users/logout POST +[2010-04-19 23:46:12] IP:::1 URI: /easygiant/users/login POST +[2010-05-05 18:36:53] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:36:54] IP:::1 URI: /easygiant/users/login POST +[2010-05-05 18:36:58] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-05-05 18:37:02] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:37:06] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 18:37:09] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:37:15] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 18:37:17] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:37:18] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 18:37:19] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:37:46] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 18:37:48] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 18:37:49] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:37:50] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 18:37:51] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:37:52] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:38:34] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:38:35] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:38:36] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:39:07] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:39:55] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:39:57] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:39:59] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:40:17] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:40:18] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:40:20] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST generalAction:edit id_pagine:70 +[2010-05-05 18:40:22] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST name:qwe id_navigation:109 titolo: html: id_pagine:70 updateAction:Save +[2010-05-05 18:40:24] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:44:22] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:44:23] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:44:25] IP:::1 URI: /easygiant/pagine/main/1/undef POST delAction:del id_pagine:85 +[2010-05-05 18:44:53] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:44:54] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:44:55] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:44:57] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:44:58] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 18:44:59] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-05-05 18:45:01] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST name: id_navigation:109 titolo: html: insertAction:Save +[2010-05-05 18:45:02] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:51:48] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:51:49] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:51:50] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:51:51] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:51:52] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:53:32] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:53:41] IP:::1 URI: /easygiant/pagine/form/insert/1/undef POST +[2010-05-05 18:53:42] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:53:44] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:53:45] IP:::1 URI: /easygiant/post/main POST +[2010-05-05 18:53:46] IP:::1 URI: /easygiant/post/form/insert/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-05 18:53:48] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-05 18:53:49] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:53:50] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 18:53:51] IP:::1 URI: /easygiant/category/form/insert/1/undef/token POST +[2010-05-05 18:53:52] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 18:53:53] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:53:56] IP:::1 URI: /easygiant/articles/main POST +[2010-05-05 18:53:56] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 18:53:57] IP:::1 URI: /easygiant/articles/form/insert/1/undef/undef POST +[2010-05-05 18:53:57] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 18:53:58] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:54:01] IP:::1 URI: /easygiant/box/main POST +[2010-05-05 18:54:03] IP:::1 URI: /easygiant/box/form/insert/1/id/undef POST +[2010-05-05 18:54:03] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:54:05] IP:::1 URI: /easygiant/news/main POST +[2010-05-05 18:54:06] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:54:07] IP:::1 URI: /easygiant/password/form POST +[2010-05-05 18:54:08] IP:::1 URI: /easygiant/panel/main/main POST +[2010-05-05 18:54:10] IP:::1 URI: /easygiant/users/main POST +[2010-05-05 18:54:11] IP:::1 URI: /easygiant/users/form/insert/1/0 POST +[2010-05-05 18:54:12] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:54:14] IP:::1 URI: /easygiant/post/main POST +[2010-05-05 18:54:15] IP:::1 URI: /easygiant/post/form/insert/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-05 18:54:16] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:54:19] IP:::1 URI: /easygiant/post/main POST +[2010-05-05 18:54:22] IP:::1 URI: /easygiant/postnew/main POST +[2010-05-05 18:54:24] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-05-05 18:54:25] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-05-05 18:54:27] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-05-05 18:54:30] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-05-05 18:54:31] IP:::1 URI: /easygiant/postnew/form/insert/1/undef/undef/undef POST +[2010-05-05 18:54:32] IP:::1 URI: /easygiant/postnew/main/1/undef/undef/undef POST +[2010-05-05 18:54:33] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:54:55] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 18:54:57] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 18:54:58] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 18:55:12] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:55:15] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 18:55:16] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 18:55:17] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 18:57:11] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 18:58:57] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 19:05:35] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 19:06:11] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 19:06:30] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 19:08:07] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 19:09:46] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:10:05] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:10:57] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:11:07] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:11:09] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:11:16] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:11:21] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:11:47] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:11:53] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:13:39] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 19:13:42] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 19:13:44] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 19:14:01] IP:::1 URI: /easygiant/pagine POST +[2010-05-05 19:20:59] IP:::1 URI: /easygiant/pagine POST +[2010-05-05 19:21:05] IP:::1 URI: /easygiant/pagine/ POST +[2010-05-05 19:21:09] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 19:21:11] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 19:21:12] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 19:21:14] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 19:21:15] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 19:21:16] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 19:21:20] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 19:21:21] IP:::1 URI: /easygiant/articles/main POST +[2010-05-05 19:21:21] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 19:21:22] IP:::1 URI: /easygiant/articles/main/2/undef/undef POST +[2010-05-05 19:21:22] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 19:21:48] IP:::1 URI: /easygiant/articles/main/2/undef/ POST +[2010-05-05 19:21:48] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 19:21:53] IP:::1 URI: /easygiant/articles/main/2/undef/ee POST +[2010-05-05 19:21:53] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 19:21:59] IP:::1 URI: /easygiant/articles/main/2/undef/undef POST +[2010-05-05 19:21:59] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 19:23:09] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 19:23:14] IP:::1 URI: /easygiant/panel/ POST +[2010-05-05 19:23:25] IP:::1 URI: /easygiant/panel POST +[2010-05-05 19:29:39] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 19:29:43] IP:::1 URI: /easygiant/ POST +[2010-05-05 19:29:43] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-05-05 19:29:43] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-05-05 19:29:46] IP:::1 URI: /easygiant/ POST +[2010-05-05 19:29:46] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-05-05 19:29:46] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-05-05 19:29:51] IP:::1 URI: /easygiant/ POST +[2010-05-05 19:29:51] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-05-05 19:29:51] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-05-05 19:29:53] IP:::1 URI: /easygiant/ POST +[2010-05-05 19:29:53] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-05-05 19:29:53] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-05-05 19:29:58] IP:::1 URI: /easygiant/ POST +[2010-05-05 19:29:58] IP:::1 URI: /easygiant/Public/Img/footer.png POST +[2010-05-05 19:29:58] IP:::1 URI: /easygiant/Public/Img/header.png POST +[2010-05-05 19:30:00] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 19:30:03] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST generalAction:edit id_pagine:74 +[2010-05-05 19:30:04] IP:::1 URI: /easygiant/pagine/form/update/2/undef POST name:ciao id_navigation:109 titolo: html:qweqwe id_pagine:74 updateAction:Save +[2010-05-05 19:30:05] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 21:30:33] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:30:34] IP:::1 URI: /easygiant/users/login POST +[2010-05-05 21:30:38] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-05-05 21:30:41] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:30:43] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 21:30:46] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:30:47] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:33:53] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:34:08] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:34:36] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:34:53] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:35:46] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:35:48] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:35:51] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 21:35:55] IP:::1 URI: /easygiant/suppl/main/1 POST +[2010-05-05 21:35:57] IP:::1 URI: /easygiant/suppl/main/2 POST +[2010-05-05 21:35:58] IP:::1 URI: /easygiant/suppl/main/1 POST +[2010-05-05 21:36:01] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 21:40:45] IP:::1 URI: /easygiant/suppl/main POST +[2010-05-05 21:40:49] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:40:51] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:40:52] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 21:40:54] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:40:55] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:40:58] IP:::1 URI: /easygiant/category/main/1/undef/token POST +[2010-05-05 21:40:59] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:41:00] IP:::1 URI: /easygiant/articles/main POST +[2010-05-05 21:41:00] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 21:41:02] IP:::1 URI: /easygiant/articles/main/2/undef/undef POST +[2010-05-05 21:41:02] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-05 21:41:04] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:41:05] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 21:41:06] IP:::1 URI: /easygiant/pagine/main/2/undef POST +[2010-05-05 21:41:09] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-05 21:41:11] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-05-05 21:41:13] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-05 21:41:15] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:41:16] IP:::1 URI: /easygiant/users/logout POST +[2010-05-05 21:41:18] IP:::1 URI: /easygiant/users/login POST +[2010-05-05 21:41:21] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-05-05 21:41:25] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:41:26] IP:::1 URI: /easygiant/category/main POST +[2010-05-05 21:41:30] IP:::1 URI: /easygiant/category/main/1/prima/token POST +[2010-05-05 21:41:33] IP:::1 URI: /easygiant/category/main/1/234234/token POST +[2010-05-05 21:41:35] IP:::1 URI: /easygiant/category/main/1/eee/token POST +[2010-05-05 21:41:36] IP:::1 URI: /easygiant/category/main/1/qweqwe/token POST +[2010-05-05 21:41:38] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:41:38] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-05 21:41:40] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-05 21:41:43] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST generalAction:edit id_pagine:80 +[2010-05-05 21:41:46] IP:::1 URI: /easygiant/pagine/form/update/1/109 POST name:6756 id_navigation:107 titolo:2 html:567 id_pagine:80 updateAction:Save +[2010-05-05 21:41:47] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-05 21:41:49] IP:::1 URI: /easygiant/pagine/main/1/107 POST +[2010-05-05 21:41:52] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:41:53] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:41:54] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:41:55] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:41:56] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:41:57] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:41:57] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:41:58] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:41:59] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:42:00] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:42:02] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:42:03] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:42:04] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:42:05] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:42:06] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:42:07] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:42:07] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:72 +[2010-05-05 21:42:09] IP:::1 URI: /easygiant/pagine/main/1/107 POST moveupAction:up id_pagine:80 +[2010-05-05 21:42:11] IP:::1 URI: /easygiant/panel/main POST +[2010-05-05 21:42:12] IP:::1 URI: /easygiant/users/logout POST +[2010-05-05 21:42:14] IP:::1 URI: /easygiant/users/login POST +[2010-05-10 17:53:21] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 17:53:22] IP:::1 URI: /easygiant/users/login POST +[2010-05-10 17:53:26] IP:::1 URI: /easygiant/users/login POST username:admin password:admin +[2010-05-10 17:53:29] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 17:53:31] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-10 17:55:04] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 17:55:06] IP:::1 URI: /easygiant/upload/main POST +[2010-05-10 17:55:06] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-05-10 17:55:16] IP:::1 URI: /easygiant/upload/main POST uploadFileAction:upload MAX_FILE_SIZE:3000 directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-05-10 17:55:17] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-05-10 17:55:24] IP:::1 URI: /easygiant/upload/main POST enter_x:19 enter_y:21 delFileAction:/home/tonicucoz/Apache/easygiant/media/cimg3666.jpg directory:/home/tonicucoz/Apache/easygiant/media/ +[2010-05-10 17:55:24] IP:::1 URI: /easygiant/External/jquery/jquery-1.3.2.min.js POST +[2010-05-10 18:05:27] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:05:29] IP:::1 URI: /easygiant/articles/main POST +[2010-05-10 18:05:29] IP:::1 URI: /easygiant/External/tiny_mce/tiny_mce.js POST +[2010-05-10 18:05:31] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:05:31] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-10 18:06:38] IP:::1 URI: /easygiant/pagine/main/1/undef POST +[2010-05-10 18:06:47] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-10 18:06:51] IP:::1 URI: /easygiant/pagine/main/1/109 POST moveupAction:up id_pagine:78 +[2010-05-10 18:06:53] IP:::1 URI: /easygiant/pagine/main/1/109 POST moveupAction:up id_pagine:79 +[2010-05-10 18:07:03] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-10 18:07:10] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-10 18:08:38] IP:::1 URI: /easygiant/pagine/main/1/109 POST +[2010-05-10 18:08:39] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:08:40] IP:::1 URI: /easygiant/post/main POST +[2010-05-10 18:08:42] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:08:44] IP:::1 URI: /easygiant/users/main POST +[2010-05-10 18:08:46] IP:::1 URI: /easygiant/users/main/1/2 POST +[2010-05-10 18:09:22] IP:::1 URI: /easygiant/users/main/1/2 POST +[2010-05-10 18:09:30] IP:::1 URI: /easygiant/users/main/1/2 POST +[2010-05-10 18:09:41] IP:::1 URI: /easygiant/users/main/1/2 POST +[2010-05-10 18:09:43] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:09:44] IP:::1 URI: /easygiant/pagine/main/1 POST +[2010-05-10 18:09:45] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:09:47] IP:::1 URI: /easygiant/users/main POST +[2010-05-10 18:09:57] IP:::1 URI: /easygiant/users/main/1/1 POST +[2010-05-10 18:10:20] IP:::1 URI: /easygiant/users/main/1/2 POST +[2010-05-10 18:10:23] IP:::1 URI: /easygiant/users/main/1/3 POST +[2010-05-10 18:10:26] IP:::1 URI: /easygiant/users/main/1/2 POST +[2010-05-10 18:10:29] IP:::1 URI: /easygiant/users/form/update/1/2 POST generalAction:edit id_user:3 +[2010-05-10 18:10:30] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:10:33] IP:::1 URI: /easygiant/users/main POST +[2010-05-10 18:10:34] IP:::1 URI: /easygiant/users/associate/1/0 POST generalAction:link id_user:3 +[2010-05-10 18:10:36] IP:::1 URI: /easygiant/users/main/1/0 POST +[2010-05-10 18:10:37] IP:::1 URI: /easygiant/users/associate/1/0 POST generalAction:link id_user:2 +[2010-05-10 18:10:38] IP:::1 URI: /easygiant/users/main/1/0 POST +[2010-05-10 18:10:39] IP:::1 URI: /easygiant/users/associate/1/0 POST generalAction:link id_user:1 +[2010-05-10 18:10:40] IP:::1 URI: /easygiant/users/main/1/0 POST +[2010-05-10 18:10:41] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:10:44] IP:::1 URI: /easygiant/post/main POST +[2010-05-10 18:10:49] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-05-10 18:11:32] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-05-10 18:11:34] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/11/undefi/undefi POST +[2010-05-10 18:11:37] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/1/undefi/undefi/undefi POST +[2010-05-10 18:11:39] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:11:42] IP:::1 URI: /easygiant/post/main/1/undefi/94/undefi/undefi/undefi/undefi POST +[2010-05-10 18:11:49] IP:::1 URI: /easygiant/post/main/1/undefi/93/undefi/undefi/undefi/undefi POST +[2010-05-10 18:11:52] IP:::1 URI: /easygiant/post/main/1/undefi/95/undefi/undefi/undefi/undefi POST +[2010-05-10 18:11:54] IP:::1 URI: /easygiant/post/main/1/undefi/96/undefi/undefi/undefi/undefi POST +[2010-05-10 18:11:57] IP:::1 URI: /easygiant/post/main/1/Antonio/96/undefi/undefi/undefi/undefi POST +[2010-05-10 18:12:07] IP:::1 URI: /easygiant/post/main/1/undefi/96/undefi/undefi/undefi/undefi POST +[2010-05-10 18:12:10] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:12:15] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/2/undefi/undefi/undefi POST +[2010-05-10 18:12:50] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/2/undefi/undefi/undefi POST moveupAction:up id:100 +[2010-05-10 18:12:51] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/2/undefi/undefi/undefi POST moveupAction:up id:101 +[2010-05-10 18:12:55] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:12:56] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/11/undefi/undefi POST +[2010-05-10 18:13:01] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/11/Friday/undefi POST +[2010-05-10 18:13:03] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Friday/undefi POST +[2010-05-10 18:13:05] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/undefi POST +[2010-05-10 18:13:08] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/April POST +[2010-05-10 18:13:10] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/February POST +[2010-05-10 18:13:13] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/April POST +[2010-05-10 18:13:15] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/April POST +[2010-05-10 18:13:17] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/February POST +[2010-05-10 18:13:20] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/April POST +[2010-05-10 18:13:24] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/Thursday/undefi POST +[2010-05-10 18:13:27] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:13:29] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:13:30] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:14:10] IP:::1 URI: /easygiant/post/main/2/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:14:12] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:14:24] IP:::1 URI: /easygiant/post/main/1/Antonio/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:14:26] IP:::1 URI: /easygiant/post/main/1/Antonio/undefi/undefi/undefi/undefi/undefi POST moveupAction:up id:108 +[2010-05-10 18:14:28] IP:::1 URI: /easygiant/post/main/1/undefi/undefi/undefi/undefi/undefi/undefi POST +[2010-05-10 18:14:31] IP:::1 URI: /easygiant/panel/main POST +[2010-05-10 18:14:32] IP:::1 URI: /easygiant/users/logout POST +[2010-05-10 18:14:33] IP:::1 URI: /easygiant/users/login POST diff --git a/h-source/Public/Css/comune.css b/h-source/Public/Css/comune.css new file mode 100644 index 0000000..b6ecdd3 --- /dev/null +++ b/h-source/Public/Css/comune.css @@ -0,0 +1,130 @@ +/*parte di login.css*/ + +/*controller:users*/ +/*action:login*/ +.login_box { + margin:10px 10px 20px 10px; +} +.login_box input { + border:1px solid orange; +} + +/*action:logout*/ +.logout_box { + margin:10px 10px 20px 10px; +} + +.logout_button a{ + margin:20px; + padding:10px; + background:orange; + border:1px solid black; +/* width:30px; */ +} + + +/*parte di scaffold.css*/ + +td { + font-size: 12px; +} + +td.editForm, td.delForm, td.associateForm, td.moveupForm, td.movedownForm { + width:3%; +} + +td.editForm input, td.delForm input, td.associateForm input, td.moveupForm input, td.movedownForm input +{ + height:30px; +} + +/*alert string*/ +.alert { + font:bold 12px/1.5 Verdana,arial; + padding:5px; + margin:5px 5px 15px 5px; + background:TOMATO; + border-top:2px solid MAROON; + border-bottom:2px solid MAROON; + color:MAROON; +} + +/*executed operation string*/ +.executed { + font:bold 12px/1.5 Verdana,arial; + padding:5px; + margin:5px 5px 15px 5px; + background:#E0FFFF; + border-top:2px solid #ADD8E6; + border-bottom:2px solid #ADD8E6; + color:#4169E1; +} + +/*action:main*/ +tr.listRow { + background:#E6E6FA; +} + +tr.listHead { + font-weight: bold; + background:#d1deed; + border:1px solid #4169E1; + border-bottom:1px solid #4169E1; +} + +tr.listHead td { +/* font-weight: bold; */ +/* background:#d1deed; */ + border-top:1px solid #4169E1; + border-bottom:1px solid #4169E1; +} + +.recordsBox { + margin:10px 0px; +} + +.recordsBox table { + width:100%; +} + +.listItemForm { + margin:0px; +} + +a.linkItem { +/* background:red; */ + font:bold 12px/1 Verdana,arial; +} + +/*controller:panel +/*action:main*/ +.main_box { + padding:50px 20px; + width:700px; + height:250px; +} +.top_color { + text-align:center; + width:160px; + height:35px; + margin:0; + padding:0; +} +.bottom_color { + background:lavender; + text-align:center; + width:160px; + margin:0; + padding:5px 0; +} + + + +/*box che dice dove ti trovi, in che controller*/ +.controller_info_header +{ + background:#E6E6FA; + padding:5px; + font: bold 16px/1.75em sans-serif; + border-bottom:1px solid #4169E1; +}
\ No newline at end of file diff --git a/h-source/Public/Css/explorer.css b/h-source/Public/Css/explorer.css new file mode 100644 index 0000000..0c3e7b6 --- /dev/null +++ b/h-source/Public/Css/explorer.css @@ -0,0 +1,98 @@ +ul#menuBlock li { + height:24px; +} + +ul#menuBlock li ul { + top:25px; + margin-left:3px; +} + +ul#menuBlock li ul li { + margin-top:-1px; +} + +.view_page_top_box +{ + height:32px; +} + +.update_submit_class +{ + padding:7px; +} + +.view_page_update_button +{ + width:35px; +} + +/*div that contains the update form*/ +.view_page_update_button +{ + margin-top:2px; + margin-right:5px; +} +.update_submit_class +{ + padding:2px; + width:45px; +} +.notebooks_insert_form +{ + margin-right:-30px; +} + +.notebook_insert_link +{ + margin:0px 0px 0px 5px; + padding-right:0px; + width:245px; +} +.view_page_history_button +{ + margin-left:10px; +} +.top_left_images_help +{ + height:22px; + margin-bottom:-3px; +} +ul#menuBlock li { + height:26px; +} +ul#menuBlock li ul { + left:-6px; +} +.user_logged +{ + margin-left:62px; +} +.viewall_popup_menu_status_item +{ + padding-left:10px; +} +.copyright_notice_box +{ + width:140px; +} +.language_links_box ul +{ + width:100%; + margin:-1px 5px 30px 5px; +} +.language_links_box ul li +{ + margin-bottom:5px; +} +.language_links_box ul li a +{ + height:30px; +} +.talk_numb_ext +{ + margin-top:-30px; +} +.talk_numb_ext a +{ + margin-bottom:0px; +}
\ No newline at end of file diff --git a/h-source/Public/Css/files.css b/h-source/Public/Css/files.css new file mode 100644 index 0000000..e98e681 --- /dev/null +++ b/h-source/Public/Css/files.css @@ -0,0 +1,113 @@ +form +{ + padding:0px; + margin:0px; +} + +/*external box*/ +.EGexternalBox +{ + height:500px; + overflow:scroll; +} + +/*top box containing the forms: upload,create folder,got to folder*/ +.EGformBox +{ + padding-left:10px; + padding-right:10px; + height:35px; + margin:5px; + border-top:1px solid #DC143C; + border-bottom:1px solid #DC143C; + background:#FF7F50; +} + +/*item box: folder*/ +.EGfolderBox +{ + padding-left:10px; + padding-right:10px; + height:55px; + margin:5px; +/* border-top:1px solid black; */ + background:#E6E6FA; +} + +/*item box: file*/ +.EGfileBox +{ + padding-left:10px; + padding-right:10px; + height:55px; + margin:5px; +/* border-top:1px solid black; */ + background:#E0FFFF; +} + +/*back box*/ +.EGbackBox +{ + padding-left:10px; + padding-right:10px; + height:50px; + margin:5px; + border-top:1px solid #6495ED; + border-bottom:1px solid #6495ED; + background:#ADD8E6; +} + +/*folder image and back image*/ +.EGfolderImage, .EGbackImage, .EGfileImage +{ + margin:3px; +/* padding:2px; */ + width:55px; +/* background:red; */ + float:left; +} + +/*box containing the form to create a new folder*/ +.EGcreateFolderBox +{ + margin:5px; + width:300px; + float:left; +} + +/*box containing the form to upload a file*/ +.EGuploadFileBox +{ + margin:5px; + margin-left:50px; + width:400px; + float:left; +} + +.EGcreateFolderBox input:text +{ + width:150px; +} + +/*name of the folder*/ +.EGfolderName, .EGfileName, .EGcurrentDirectory +{ + width:500px; + float:left; + font:normal 12px/1 Verdana,arial; + margin:10px; +} + +/*del image*/ +.EGfolderDelImage, .EGfileDelImage +{ + float:right; + margin:2px; +} + +/*preview of the image in upload file*/ +#imagePreview +{ + margin:10px; + height:120px; +} diff --git a/h-source/Public/Css/form.css b/h-source/Public/Css/form.css new file mode 100755 index 0000000..911af19 --- /dev/null +++ b/h-source/Public/Css/form.css @@ -0,0 +1,31 @@ +.entryLabel { + display:block; + font:bold 12px/1em Verdana,arial; + padding:3px 0px; + margin-top:10px; + background:#E6E6FA; + width:500px; +} + +.formEntry textarea{ + width:500px; + height:300px; +} + +.formEntry input,.formEntry textarea { + width:500px; + padding:3px; + border: 1px solid #4169E1; +} + +.formClass { + margin:10px; +} + +.inputEntry { + margin:10px 0px; +} + +.formEntry #abstract { + height:100px; +}
\ No newline at end of file diff --git a/h-source/Public/Css/index.html b/h-source/Public/Css/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Public/Css/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Public/Css/login.css b/h-source/Public/Css/login.css new file mode 100644 index 0000000..7c42964 --- /dev/null +++ b/h-source/Public/Css/login.css @@ -0,0 +1,21 @@ +/*controller:users*/ +/*action:login*/ +.login_box { + margin:10px 10px 20px 10px; +} +.login_box input { + border:1px solid orange; +} + +/*action:logout*/ +.logout_box { + margin:10px 10px 20px 10px; +} + +.logout_button a{ + margin:20px; + padding:10px; + background:orange; + border:1px solid black; +/* width:30px; */ +}
\ No newline at end of file diff --git a/h-source/Public/Css/mainmenu.css b/h-source/Public/Css/mainmenu.css new file mode 100755 index 0000000..615c8bf --- /dev/null +++ b/h-source/Public/Css/mainmenu.css @@ -0,0 +1,78 @@ +/*stile header di ogni view*/ +.mainMenu { + height:50px; +/* border-top:1px solid #ADD8E6; */ + border-bottom:1px solid #4169E1; + padding-top:6px; + margin-bottom:10px; + background:#d1deed; +} +.mainMenuItem { + float:left; + width:60px; + height:40px; + margin-left:5px; + border:1px outset #708090; + background:#4169E1; + text-align:center; +} + +.mainMenuItem a { +/* margin:8px 5px 1px 10px; */ + display:block; + margin-top:12px; + color:#B0E0E6; + font:bold 14px/1 Verdana,arial; +} + +.verticalMenu { + margin-bottom:30px; + margin-left:10px; +/* text-align:right;*/ +} + +ul#menuBlock { +/* float:right; */ + float:left; + margin:0px; + padding:0px; + list-style:none; + height:24px; +} + +ul#menuBlock li { + position:relative; + display:block; + float:left; + width:100px; + border:1px outset #D3D3D3; + height:21px; +# height:24px; + text-align:center; + background:#E6E6FA; + padding-top:3px; +} + +ul#menuBlock li a { + color:#696969; + font: bold 12px/1 Verdana,arial; +} + +ul#menuBlock li ul { + margin:0px; + padding:0px; + list-style:none; + position:absolute; + top:24px; +# top:25px; + left:-1px; + display:none; +} + +ul#menuBlock li ul li { +# margin-top:-3px; +} + +/*ul#menuBlock li:hover ul{ + display:block; +}*/
\ No newline at end of file diff --git a/h-source/Public/Css/pagelist.css b/h-source/Public/Css/pagelist.css new file mode 100644 index 0000000..93c8454 --- /dev/null +++ b/h-source/Public/Css/pagelist.css @@ -0,0 +1,29 @@ +/*page division*/ +.pageList { + text-align:left; + font:normal 14px/1 Verdana,arial; + padding:10px; +} + +div.pageList a { + padding:5px 10px; + border:1px outset #708090; + color:#B0E0E6; + background:#4169E1; + margin-right:5px; +} + +/*view footer*/ +.viewFooter { + height:50px; + border-top:1px solid #4169E1; + padding-top:6px; + margin-bottom:10px; + background:#d1deed; +} + +div.pageList a.currentPage +{ + font-weight:bold; + background:#0000CD; +}
\ No newline at end of file diff --git a/h-source/Public/Css/panel.css b/h-source/Public/Css/panel.css new file mode 100644 index 0000000..8b9f9a9 --- /dev/null +++ b/h-source/Public/Css/panel.css @@ -0,0 +1,74 @@ +ul { + list-style-type: none; +} + +div.mainPanel { + +} + +/*logout button*/ +.logoutButton +{ + float:left; + width:70px; + height:40px; + margin-left:5px; + border:1px outset #708090; + background:#4169E1; + text-align:center; +} +.logoutButton a +{ + display:block; + margin-top:13px; + color:#B0E0E6; + font:bold 12px/1 Verdana,arial; +} + +/*list of application in the panel main action*/ +.panelApplicationList +{ + padding:0px; +} +.panelApplicationList li +{ + display:block; + width:200px; + height:30px; + border:1px outset #708090; + margin:5px; + background:#4169E1; + padding-top:9px; +} + +.panelApplicationList li a +{ + margin:5px; + font: bold 14px/1 Verdana,arial; + color:#B0E0E6; +} + +/*list of groups an user is inserted within*/ +.groupsList +{ + margin:20px 5px 5px 5px; + font:normal 14px/1 Verdana,arial; +} +.groupsList li +{ + margin:5px 0px; + padding:0px; + font:bold 14px/1 Verdana,arial; +} +.groupsList ul +{ + padding:10px; +} + +/*list of logged users in panel*/ +.usersLoggedList +{ + margin:5px; + text-align:right; + font:normal 14px/1 Verdana,arial; +}
\ No newline at end of file diff --git a/h-source/Public/Css/popupmenu.css b/h-source/Public/Css/popupmenu.css new file mode 100755 index 0000000..66a202e --- /dev/null +++ b/h-source/Public/Css/popupmenu.css @@ -0,0 +1,49 @@ +.verticalMenu { + margin-bottom:50px; + margin-left:10px; +/* text-align:right;*/ +} + +ul#menuBlock { +/* float:right; */ + float:left; + margin:0px; + padding:0px; + list-style:none; + height:24px; +} + +ul#menuBlock li { + position:relative; + display:block; + float:left; + width:150px; + border:1px outset #D3D3D3; + height:21px; + text-align:center; + background:#E6E6FA; + padding-top:5px; + padding-bottom:-2px; +} + +ul#menuBlock li a { + color:#696969; + font: bold 12px/1 Verdana,arial; +} + +ul#menuBlock li ul { + margin:0px; + padding:0px; + list-style:none; + position:absolute; + top:24px; + left:-1px; + display:none; +} + +ul#menuBlock li ul li { +} + +/*ul#menuBlock li:hover ul{ + display:block; +}*/
\ No newline at end of file diff --git a/h-source/Public/Css/scaffold.css b/h-source/Public/Css/scaffold.css new file mode 100755 index 0000000..8cc7529 --- /dev/null +++ b/h-source/Public/Css/scaffold.css @@ -0,0 +1,105 @@ +html, body{margin: 0;padding:0} + +body{ + font-family: Verdana,arial,sans-serif; + font-size: 11px; + text-align: center; +/* background: #93045a; */ +} + +td { + font-size: 12px; +} + +img { + border:none; +} + +td.editForm, td.delForm, td.associateForm, td.moveupForm, td.movedownForm { + width:3%; +} + +td.editForm input, td.delForm input, td.associateForm input, td.moveupForm input, td.movedownForm input +{ + height:30px; +} + +/*alert string*/ +.alert { + font:bold 12px/1.5 Verdana,arial; + padding:5px; + margin:5px 5px 15px 5px; + background:TOMATO; + border-top:2px solid MAROON; + border-bottom:2px solid MAROON; + color:MAROON; +} + +/*executed operation string*/ +.executed { + font:bold 12px/1.5 Verdana,arial; + padding:5px; + margin:5px 5px 15px 5px; + background:#E0FFFF; + border-top:2px solid #ADD8E6; + border-bottom:2px solid #ADD8E6; + color:#4169E1; +} + +/*action:main*/ +tr.listRow { + background:#E6E6FA; +} + +tr.listHead { + font-weight: bold; + background:#d1deed; + border:1px solid #4169E1; + border-bottom:1px solid #4169E1; +} + +tr.listHead td { +/* font-weight: bold; */ +/* background:#d1deed; */ + border-top:1px solid #4169E1; + border-bottom:1px solid #4169E1; +} + +.recordsBox { + margin:10px 0px; +} + +.recordsBox table { + width:100%; +} + +.listItemForm { + margin:0px; +} + +a.linkItem { +/* background:red; */ + font:bold 12px/1 Verdana,arial; +} + +/*controller:panel +/*action:main*/ +.main_box { + padding:50px 20px; + width:700px; + height:250px; +} +.top_color { + text-align:center; + width:160px; + height:35px; + margin:0; + padding:0; +} +.bottom_color { + background:lavender; + text-align:center; + width:160px; + margin:0; + padding:5px 0; +}
\ No newline at end of file diff --git a/h-source/Public/Css/website.css b/h-source/Public/Css/website.css new file mode 100755 index 0000000..87bb44d --- /dev/null +++ b/h-source/Public/Css/website.css @@ -0,0 +1,1422 @@ +/*stili per il layout fisso*/ +html, body +{ + margin: 0; + padding:0; +} + +body +{ + font:normal 15px/1.3 sans-serif,Verdana,arial; + text-align: center; + background:#ffffff; +} + +img +{ + border:0px; +} + +.message_view_description li, .issues_view_description li +{ + margin-left:1em; +} + + +div#container +{ + width: 950px; + margin: 0px auto; + text-align: left; + background:white; +} + + +/*stile header grande*/ +div#external_header { + background:#b7f18c; + text-align:center; + height:80px; +} +div#header { + background:#b7f18c; + width: 950px; + margin: 0px auto; + text-align:left; + height:80px; +} + +div#top_menu_external +{ + text-align:center; + background:#015512; + margin-bottom:50px; +/* border-top:1px solid #4169E1; */ +/* border-bottom:1px solid #4169E1; */ +} + +div#top_menu +{ + font:bold 15px sans-serif,Verdana,arial; + text-align:left; + padding:0.4em 0px; + background:#015512; + width: 950px; + margin: 0px auto; +} +#top_menu .currentitem a +{ + background:#DC143C; + color:#FFF; +} + +div#top_menu a +{ + font:bold 16px sans-serif,Verdana,arial; + padding:0.4em 10px; + text-decoration:none; + font-weight:bold; + color:#FFF; +/* border-left:1px solid #4169E1; */ +} +#top_menu a:hover, +#top_menu a:focus, +#top_menu a:active +{ + background:#61c418; +} + +div#top_menu ul +{ + list-style-type: none; + display:inline; + margin:0px; + padding:0px; +} + +div#top_menu li +{ + display:inline; +/* padding:10px; */ +} + + +div#left +{ + width:730px; + float:left; +} + +div#right +{ + width:198px; + float:right; +} + +.login_username_input,.login_password_input +{ + width:150px; +} + +.login_table_box +{ + clear:left; + margin:5px; + margin-bottom:35px; +} +.statistics_ext_box +{ + margin:5px; + margin-bottom:30px; +} +.statistics_int_title +{ + margin:5px 0px 15px 0px; + padding:3px 0px; +/* background-color:#B7F18C; */ + border-bottom:2px solid #DC143C; + font-weight:bold; +} +.statistics_hard_title +{ + margin:5px 0px; + color:#808080; +} +.user_logged +{ + margin-left:55px; + color:black; + font-weight:bold; +} +.login_right_label +{ + font-weight:bold; +} +.login_right_form input +{ + border:1px solid #6495ED; + width:180px; + padding:2px; + margin:3px 0px; +} + +.login_input +{ + width:100px; +} + +.login_form_title +{ + color:black; + +/* padding:10px; */ +/* background:#5c98dc; */ +} + +.login_box +{ + margin-bottom:400px; +} + +.hardware_element +{ + margin:5px; + padding:10px; + background:#c7daef; +/* border-bottom:1px solid #6495ED; */ +} +.hardware_element_link +{ + margin:0px 10px; +} +.notebook_view_title +{ + width:400px; + height:50px; + float:left; + overflow:hidden; +/* background:red; */ + margin:10px 0px 10px 10px; + font:normal 14px/1 sans-serif,Verdana,arial; +} + +.notebook_insert_link +{ +/* border:1px solid black; */ +/* background-color:#c1e3ef; */ + width:200px; +/* background:orange; */ + float:right; + padding:3px 6px 1px 3px; + margin:0px 5px 30px 5px; + text-align:right; + overflow:hidden; + height:48px; +} + +.select_entry +{ +/* width:400px; */ + padding:2px; +/* border:1px solid #6495ED; */ +} +.input_entry, .talk_input_entry +{ + width:400px; + padding:2px; + border:1px solid #6495ED; +} +.textarea_entry, .talk_textarea_entry +{ + width:630px; + height:300px; + padding:2px; + border:1px solid #6495ED; +} +/*.talk_input_entry +{ + border:1px solid #CECECE; +}*/ +.form_entry .talk_textarea_entry +{ + width:400px; + height:200px; + border:1px solid #6495ED; +} +.notebooks_insert_form +{ + width:660px; + margin-left:10px; +} +.notebooks_insert_form .entry_label +{ + display:block; + padding:3px 0px; +/* background:#E6E6FA; */ + width:600px; + font-weight:bold; +} +.form_entry +{ + margin:20px 0px; +} + + +div#footer{ + margin:0px; + color: #000; + height:40px; + background:#b7f18c; + clear:both; +} + +/*div#navigation li{background: url(immagini/tabella1.png) no-repeat left center;}*/ +a.link_menu +{ + font: bold 16px/1.75em Verdana,"Times New Roman",sans-serif; + text-decoration: none; + color:#4169E1; + margin-left:10px; +} + + +/*box contenente i link per tornare nel pannello utente e per sloggarsi*/ +.your_status_box +{ + background:#E6E6FA; + padding:5px; +} + +.login_note +{ + color:#8080a6; + margin:10px; + padding:5px 0px; + border-top:2px solid #8080a6; + border-bottom:2px solid #8080a6; + + font: normal 16px/1.3 sans-serif,Verdana,arial; +} + +/*singolo box contentente un portatile in view all*/ +.notebooks_viewall +{ + clear:both; + clear:right; + margin:40px 0px; + padding:3px; +/* border:2px solid #7dafe7; */ + font: normal 14px/1.5 sans-serif,Verdana,arial; + +} +.model_viewall +{ + margin:40px 10px; +/* background-color:#F7F7F7; */ +/* border:1px solid #CECECE; */ +/* padding:10px; */ +} +.notebook_model +{ +/* background:orange; */ + padding:5px 0px; + margin:0px 5px; + overflow:hidden; + width:100%; +/* margin-bottom:10px; */ + font:normal 14px/1 sans-serif,arial,Verdana; + border-bottom:1px solid #7e0000; +} +.notebook_vendor, .notebook_compatibility, .notebook_kernel, .model_tested_on +{ + margin:5px 0px; +/* background:#eaebec; */ + padding:5px; + width:654px; + overflow:hidden; +/* border-top:2px solid #a4c8f1; */ +} +.inner_label +{ + float:left; + width:300px; +} +.inner_value +{ + float:left; + width:300px; + color:#1f538e; + font-weight:bold; +} +.notebook_description_label +{ +/* background:#B7F18C; */ + padding:5px 0px; + margin:0px 5px; + margin-top:1.5em; +/* margin-bottom:10px; */ + font:bold 14px/1 sans-serif,arial,Verdana; + border-bottom:1px solid #7e0000; +/* border-bottom:1px solid #228B22; */ +} +.notebook_description_value +{ +/* border-top:2px solid #a4c8f1; */ + margin:5px 0px; +/* background:#eaebec; */ + padding:5px 5px; + width:704px; + overflow:hidden; +} +.notebook_view_link +{ + margin-top:10px; +} + + +/*alert string*/ +.alert { + clear:left; + clear:right; + font:bold 12px/1.5 Verdana,arial; + padding:2px; + margin:5px 5px 15px 5px; +/* background:TOMATO; */ +/* border-top:2px solid MAROON; */ +/* border-bottom:2px solid MAROON; */ + color:MAROON; +} + +/*executed operation string*/ +.executed { + font:bold 12px/1.5 Verdana,arial; + padding:5px; + margin:5px 5px 15px 5px; + background:#E0FFFF; + border-top:2px solid #ADD8E6; + border-bottom:2px solid #ADD8E6; + color:#4169E1; +} + +.view_page_top_box +{ + overflow:hidden; + width:664px; +} +/*div that contains the update form*/ +.view_page_update_button +{ + float:right; +} +/*.view_page_update_button input +{ + height:35px; +}*/ +.view_page_update_button form +{ + width:38px; + padding:0px; +} +.view_page_back_button +{ + float:left; + width:50px; +} +/*the update submit button*/ +.update_submit_class +{ + padding:2px; + width:45px; + font:normal 14px/1 sans-serif,Verdana,arial; + cursor:pointer; +} +/*div that contains the link to the history page*/ +.view_page_history_button +{ + float:right; + width:30px; + padding:3px; + margin-left:17px; +/* border:1px solid #a4c8f1; */ +/* height:30px; */ +} +.view_page_history_button a +{ + text-decoration:none; + color:#000; +} + +.page_history +{ + margin:0px; + padding:0px; +} +.page_history_item +{ + list-style-type: none; + padding:5px; + margin:2px; + border-top:1px dashed #a4c8f1; +} +.page_history_current_item +{ + list-style-type: none; + padding:5px; + margin:5px 0px; +/* background:#ADD8E6; */ +} +.history_title +{ + font:normal 14px/1 sans-serif,Verdana; + margin:10px; + padding:3px; +} + +.revision_alert +{ + background:#f1d8d8; + padding:8px; + margin:5px; + margin-bottom:20px; + border-bottom:1px solid #d26262; + border-top:1px solid #d26262; +} + +/*page list in history*/ +.history_page_list, .history_page_list_news { + text-align:left; + font:normal 14px/1 Verdana,arial; + padding:10px; + margin-bottom:15px; +} +.history_page_list_news +{ + background:#C7DAEF; + margin:5px; +} +div.history_page_list a, div.history_page_list_news a { + padding:5px 10px; + border-left:1px outset #000; +/* border:1px outset #708090; */ +/* color:#B0E0E6; */ +/* background:#4169E1; */ +} + +div.history_page_list a.currentPage, div.history_page_list_news a.currentPage +{ + font-weight:bold; + background:#DCDCDC; +} +div.history_page_list_news a +{ + border-left:none; + color:#4169E1; + font-weight:bold; +} + +.viewall_no_items_found +{ + font:normal 14px/1 sans-serif,Verdana,arial; + margin:10px; + padding:5px; +} + + + +.viewall_popup_menu_box { + width:725px; + height:30px; + margin-bottom:0px; + margin-top:10px; + margin-left:0px; +} + +.viewall_popup_menu_status +{ + clear:left; + width:725px; + overflow:hidden; + margin-left:0px; + text-align:center; +} +.viewall_popup_menu_status_item +{ + width:139px; + float:left; + margin-left:3px; + color:#FF4500; + font-weight:bold; + font: bold 13px/1 sans-serif,arial,Verdana; +} + +ul#menuBlock { +/* float:right; */ + float:left; + margin:0px; + padding:0px; + list-style:none; + height:24px; +} + +ul#menuBlock li { + position:relative; + display:block; + float:left; + margin-left:3px; + width:139px; + height:22px; + text-align:center; + background: url('../Img/popup_back.png') no-repeat top left; +/* background:#FFA500; */ + padding-top:3px; +} + +ul#menuBlock li a { + color:#000000; + font: normal 12px/1 sans-serif,Verdana,arial; +} + +ul#menuBlock li ul { + margin:0px; + padding:0px; + list-style:none; + position:absolute; + top:24px; + left:-3px; + display:none; +} + +ul#menuBlock li ul li { + background:#ffef84; + border-top:1px solid #ec8459; +} + + +/*view files with differences*/ +.diff_ext_box +{ + margin:0px 5px 30px 5px; +} +.diff_item_label +{ +/* background:#ADD8E6; */ +/* padding:3px; */ + border-bottom:1px solid black; +} +.diff_item_text +{ + color:#7c7a7a; + background:#F0FFF0; + padding:3px; +} +del +{ + color:red; +} +ins +{ + color:green; +} + + + +/*tree navigation*/ +.position_tree_box +{ + margin:5px 5px 25px 5px; + padding:5px; + font:normal 14px/1 sans-serif,arial,Verdana; + border-top:1px solid #DC143C; + border-bottom:1px solid #DC143C; +} +.position_tree_box a +{ + text-decoration:none; + color:#DC143C; +} +.last_tree_element +{ + font-weight:bold; +} + + + +.td_with_distribution_checkboxes +{ + position:relative; + display:block; +} +.dist_checkboxes_hidden_box +{ + display:none; + position:absolute; + background:#C1E3EF; + top:20px; + left:0px; + width:400px; + padding:3px; +} +.dist_checkboxes_hidden_box_inner +{ + height:150px; + overflow:auto; + z-index:400; +} +.hidden_box_item +{ + margin-bottom:10px; +} +/*wiki code*/ +.code_pre +{ +/* width:650px; */ + max-height:300px; + overflow:auto; + background:#f9f4a7; + padding:5px 0 5px 5px; + font-size:12px; +/* color:#4169E1; */ + border:1px dashed #d4cb3b; +} + +.div_h1 +{ + font:bold 15px/1 sans-serif,arial,Verdana; + border-bottom:1px solid gray; + padding:3px 0px; + margin:10px 0px; + color:gray; +} +.div_h2 +{ + font:bold 14px/1 sans-serif,arial,Verdana; + color:gray; +} +.div_h3 +{ + font:bold 13px/1 sans-serif,arial,Verdana; + color:gray; +} + +.talk_login_notice +{ + margin:5px 5px; + padding:5px; + font:bold 14px/1 sans-serif,arial,Verdana; +/* border:1px solid #4169E1; */ +/* color:#4169E1; */ +/* background:#9acee3; */ +} +.talk_message_item +{ + margin:5px 0px 35px 5px; +} +.talk_message_item_title_date +{ + border-bottom:1px solid gray; + padding-bottom:5px; +/* width:300px; */ +} +.talk_message_item_title +{ + font:bold 14px/1 sans-serif,arial,Verdana; + margin-bottom:5px; +} +.talk_message_item_date +{ + font:normal 12px/1 sans-serif,arial,Verdana; + color:gray; +} +.talk_message_item_content +{ + padding:5px 0px; +} +.talk_form_external_box +{ + margin-bottom:20px; +} + +.model_id +{ + font:normal 12px/1 sans-serif,arial,Verdana; +/* color:gray; */ + margin:5px 3px; + padding:3px; +} + +.top_left_images +{ + height:45px; + margin-top:2px; +} +.top_left_note_image +{ + height:45px; +} +.top_left_images_help +{ + height:30px; + margin-bottom:-10px; +} + +.who_you_are_and_logout, .your_panel_link +{ + margin:5px 0px 15px 0px; + padding:5px 10px; + background-color:#B7F18C; +/* font-weight:bold; */ +/* border-top:1px solid #015512; */ +/* border-bottom:1px solid #015512; */ +} +.your_panel_link +{ + background:#DC143C; +/* color:#FFF; */ +} +.your_panel_link a +{ + font-weight:bold; + color:#FFF; +} + +/*form*/ +.entryLabel { + display:block; + font:bold 12px/1em Verdana,arial; + padding:3px 0px; + margin-top:10px; +/* background:#E6E6FA; */ + width:400px; +} + +.formEntry { + margin:20px 0px; +} + +.formEntry input,.formEntry textarea { + width:400px; + padding:3px; + border: 1px solid #CECECE; +} +.formEntry textarea +{ + height:100px; +} +.formClass { + margin:10px; + margin-right:-40px; + width:400px; +} + +.inputEntry { + margin:10px 0px; + float:left; + width:80px; + height:30px; +} + +.panel_top_box +{ + background-color:#C1E3EF; + margin:5px 5px 35px 5px; + padding:10px; + font:bold 14px/1 sans-serif,arial,Verdana; + border-bottom:1px solid #097fbc; +} +.panel_top_box a +{ + color:#097fbc; +} + +/*list of application in the panel main action*/ +.panelApplicationList +{ + padding:0px; +} +.panelApplicationList li +{ + display:block; + width:200px; + height:30px; + margin:5px; + padding-top:9px; +} + +.panelApplicationList li a +{ + margin:5px; + font: bold 14px/1 sans-serif,Verdana,arial; + color:#097fbc; +} + +.confirm_notice +{ + margin:10px; +/* padding:10px; */ + font:normal 14px/1.5 sans-serif,arial,Verdana; +} + +.meet_item +{ + margin:20px 0px; +} +.meet_item_inner +{ + border-bottom:1px dashed #ed9f4a; + font-weight:bold; +/* color:#8f0754; */ +} +.meet_contrib_link, .contrib_explain_box +{ + margin:10px; +} +.users_contrib_item +{ + margin:10px; + padding:2px 0px; + border-bottom:1px dashed #ed9f4a; +/* color:#8f0754; */ +} +.external_users_contrib +{ + margin-bottom:40px; +} +.contrib_explain_box +{ + font-weight:bold; + margin-bottom:30px; +} +.users_meet_box +{ + margin:25px 30px; + padding:5px 20px; + background:#f6ea99; + border-bottom:1px solid #ed9f4a; + border-top:1px solid #ed9f4a; +} +.delete_account_notice_box +{ + margin:25px 10px; +} +.climb_form_ext_box +{ + margin:25px 10px; +} + +.new_account_title +{ + margin:10px; +} + +.viewall_popup_menu_box_external, .edit_form +{ + clear:left; + clear:right; + margin-bottom:20px; +/* background:#E0FFFF; */ + padding:0px 10px 10px 0px; +} + +.manage_account_link_box +{ + margin:5px 0px; +} + +.login_right_box +{ + margin-bottom:15px; +} + +.mandatory_fields_notice +{ + margin:10px 0px; +} + +.help_tables_of_contents +{ + margin:10px; + padding:10px; +} + +.bottom_licence_notice +{ + font:normal 12px/1.2 sans-serif,arial,Verdana; + padding:10px; + background:#E0FFFF; + margin:25px 0px 5px 0px; +} +.top_licence_notice +{ + clear:left; + clear:right; + font:normal 12px/1.2 sans-serif,arial,Verdana; + padding:10px; + background:#E0FFFF; + margin:25px 0px 5px 0px; + text-align:left; +} + +/*.copyright_notice_box +{ + text-align:right; + font: normal 12px/1 sans-serif,arial,Verdana; + padding:14px; +}*/ + +.copyright_notice_box, .footer_credits_box +{ + width:120px; + float:right; + font: normal 12px/1 sans-serif,arial,Verdana; + padding:14px; + border-left:3px solid #FFF; +} +.footer_credits_box +{ + width:40px; + border-left:3px solid #FFF; +} +.home_objectives_description +{ + margin:5px; + overflow:hidden; + width:100%; +} +.home_objectives_description img +{ + float:left; + margin-right:5px; +} +.home_objectives_title +{ + margin:15px 5px 5px 5px; +/* background:#90EE90; */ + font-weight:bold; + padding:5px 0px; + border-bottom:1px solid #228B22; +} + +.credits_item_title +{ + margin:15px 5px 5px 5px; +/* background:#90EE90; */ + padding:5px; + border-bottom:1px solid #228B22; + font-weight:bold; +} +.credits_item_description +{ + padding:5px; + margin:5px; + overflow:hidden; + width:100%; +} + +.home_container +{ + margin:20px 0px; +} + +.issues_external_box +{ + margin:40px 5px; +} +.issues_viewall_title +{ + margin:10px 2px; + font-weight:bold; +} +.issues_viewall_table +{ + font:normal 14px/1 sans-serif,arial,Verdana; +} +.issues_viewall_table td +{ +/* background:#E6E6FA; */ + padding:5px; +/* border-bottom:1px solid #E6E6FA; */ +} +.issues_viewall_table th +{ + background:#ADD8E6; + border-top:1px solid #4169E1; + border-bottom:1px solid #4169E1; + padding:5px; +} + +.issues_view_title, .issues_view_description_title +{ + font:bold 14px/1 sans-serif,arial,Verdana; + padding:5px 0px; + border-bottom:1px solid black; +} +.issues_view_status_and_priority +{ + margin:20px 0px; + font:normal 12px/1 sans-serif,arial,Verdana; +} +.issues_view_description +{ + margin:20px 0px; +} + +.add_issue_form_title +{ + margin:30px 5px; + font-weight:bold; +} +.add_issue_form +{ + margin:30px 5px; +} + +.contact_div +{ + margin:10px; +} + +.help_external_box +{ + margin:5px; +} +.help_wiki_table thead +{ + text-align:left; +} + +.hardware_element_image +{ + height:50px; +} +.markItUpContainer +{ + z-index:0; +} + +.search_form +{ + clear:both; + margin:5px 5px 35px 5px; +} +.search_form .input_entry_search +{ + width:250px; + border: 1px solid #CECECE; + padding:2px; +} + +.search_result_item +{ + margin:5px 5px 15px 5px; + border-top:1px solid #CECECE; + padding:5px 0px; +} + +.diff_color_notice +{ + background:#f1d8d8; + padding:8px; + margin:5px; + margin-bottom:20px; + border-bottom:1px solid #d26262; + border-top:1px solid #d26262; +} + +.gray_text_notice +{ + color:#7c7a7a; +} +.credits_external_box +{ + margin-bottom:40px; +} +.notebook_model img +{ + float:left; +} +.span_model_name +{ + float:left; + margin-left:10px; + padding-top:5px; +} + +/*dialog*/ +#dialog-form, #delete_dialog +{ + display:none; +} +#suggest_dialog +{ + display:none; +} +#dialog-form table +{ + text-align:left; +} +#dialog-form input +{ + width:300px; + border:1px solid #CECECE; +} +#dialog-form textarea, #delete_dialog textarea +{ + width:300px; + height:100px; + border:1px solid #CECECE; +} +.ask_for_removal_class +{ + float:right; + padding-top:5px; +} +.deletion_motivations_title +{ + margin:15px 5px; + border-bottom:1px solid #D26262; +} + +.deletion_motivations_iternal +{ + margin:15px 5px; + padding:5px; + border:1px dashed #D26262; +} +.deletion_motivations_iternal_message +{ + +} + +.news_external_box +{ + margin:5px; + margin-bottom:40px; +} +.news_item +{ +/* background:#f8f1b2; */ +/* padding:5px; */ + margin:30px 0px; +/* border:1px solid #f99f4f; */ +} +.news_item_title +{ + font-weight:bold; + margin:0px 0px 4px 0px; + padding-bottom:5px; + border-bottom:1px solid #9d1d04; + color:#9d1d04; +} +.news_item_date +{ + font: normal 13px/1 sans-serif,arial,Verdana; +/* color:#e86a17; */ + color:gray; + margin:0px 0px 10px 0px; +} + +.discover_hardware, .download_database +{ + text-align:center; + margin-bottom:5px; +} +.download_database +{ + margin-bottom:30px; +} + +.download_table +{ + margin:10px 0px; + padding:5px; +} +.download_table td +{ + padding:5px 5px; + background:#E0FFFF; +} + +.help_external_box h1 +{ + background:#FFD700; + padding:5px 10px; + color:#800000; + border-top:1px solid #800000; + border-bottom:1px solid #800000; + font:normal 20px/1 sans-serif,arial,Verdana; +} + +.right_box_ext_box +{ + margin:5px; + margin-bottom:300px; +} + +.add_message_form_title +{ + margin:15px 0px; + font-weight:bold; + padding:5px 0px; + color:#4169E1; +} + +.issues_message_item, .issues_message_item_preview, .issues_message_item_hidden, .talk_message_item_hidden +{ + padding:10px; + margin:20px 0px; + background:#eaf2f4; + border-top:1px solid #4169E1; + border-bottom:1px solid #4169E1; +} +.issues_message_item_hidden, .talk_message_item_hidden +{ + background:#FFF; +/* background:#b5d6e0; */ + border-top:1px dashed #bcbcbc; + border-bottom:1px dashed #bcbcbc; +} +.issues_message_item_preview +{ + background:#fffdc2; + border-top:1px dashed #f9a92b; + border-bottom:1px dashed #f9a92b; +} +.talk_message_item_hidden +{ + margin-bottom:40px; +/* background:#f1f1f1; */ +} +.message_view_description +{ + clear:both; + margin-bottom:5px; +} +.message_view_description_hidden +{ + margin-top:5px; +} +.message_preview_notice +{ + margin:3px 3px; + font:bold 14px/1 sans-serif,arial,Verdana; +} +.useful_links_ext div +{ + margin:3px 0px; + padding:1px; + padding-left:20px; + background: url(../Img/link.png) no-repeat left center; +} +.useful_links_ext div a +{ + color:#000; + text-decoration:none; + font:normal 14px/1 sans-serif,arial,Verdana; +} +.issues_message_item_user +{ + overflow:hidden; + font-weight:bold; + margin-bottom:1em; +} +.issues_message_item_user_inner +{ + float:left; + width:500px; +} + +.hide_general +{ + float:right; + margin-left:10px; + font-weight:normal; + text-decoration:none; + color:black; +} +.hide_general img +{ + margin-right:5px; + margin-bottom:-2px; +} +.language_links_box ul +{ + overflow:hidden; + margin:4px 5px 20px 5px; + padding:0px; + list-style-type:none; +} +.language_links_box ul li +{ + float:left; + width:90px; +/* background:red; */ + margin-bottom:10px; +/* margin-right:10px; */ + margin-top:5px; +} +.language_links_box ul li a +{ + padding:5px; + text-decoration:none; + color:black; +} +.language_links_box ul li a span +{ + margin-left:3px; +} +.language_links_box a.current_lang +{ + border-top:1px dashed #6495ED; + border-bottom:1px dashed #6495ED; +} + +.talk_numb_ext +{ + clear:both; + text-align:left; + margin-left:10px; +} +.talk_numb_ext a +{ + display:block; + width:150px; + text-align:center; + padding:10px 0px; + text-decoration:none; + color:black; + background: url(../Img/talk_messages.png) no-repeat left center; + margin-bottom:10px; + float:right; + overflow:hidden; +} + +.details_of_hidden_message +{ + display:none; +} +.details_of_hidden_message_inner, .details_of_actions_inner +{ + margin:10px 0px; + background:#fbfbfb; + padding:5px; + border:1px solid #BCBCBC; +} +.details_of_actions_inner +{ + background:#ecfffe; + border:1px solid #7ed0cb; +} + +.md_type +{ + display:none; +} +.hidden_message_view_details +{ + font:normal 12px/1 sans-serif,Verdana,arial; +} +.deleted_message_show +{ + margin:8px 0px 0px 0px; + font:normal 13px/1 sans-serif,arial,Verdana; +}
\ No newline at end of file diff --git a/h-source/Public/Img/Acun/book.png b/h-source/Public/Img/Acun/book.png Binary files differnew file mode 100644 index 0000000..0245944 --- /dev/null +++ b/h-source/Public/Img/Acun/book.png diff --git a/h-source/Public/Img/Acun/document_properties.png b/h-source/Public/Img/Acun/document_properties.png Binary files differnew file mode 100644 index 0000000..bf4686f --- /dev/null +++ b/h-source/Public/Img/Acun/document_properties.png diff --git a/h-source/Public/Img/Acun/filenew.png b/h-source/Public/Img/Acun/filenew.png Binary files differnew file mode 100644 index 0000000..66d34b3 --- /dev/null +++ b/h-source/Public/Img/Acun/filenew.png diff --git a/h-source/Public/Img/Acun/go_previous.png b/h-source/Public/Img/Acun/go_previous.png Binary files differnew file mode 100644 index 0000000..39685ad --- /dev/null +++ b/h-source/Public/Img/Acun/go_previous.png diff --git a/h-source/Public/Img/Acun/help_hint.png b/h-source/Public/Img/Acun/help_hint.png Binary files differnew file mode 100644 index 0000000..aed2f70 --- /dev/null +++ b/h-source/Public/Img/Acun/help_hint.png diff --git a/h-source/Public/Img/Acun/note.png b/h-source/Public/Img/Acun/note.png Binary files differnew file mode 100644 index 0000000..5b4b248 --- /dev/null +++ b/h-source/Public/Img/Acun/note.png diff --git a/h-source/Public/Img/Crystal/1282042718_hardware.png b/h-source/Public/Img/Crystal/1282042718_hardware.png Binary files differnew file mode 100644 index 0000000..b971732 --- /dev/null +++ b/h-source/Public/Img/Crystal/1282042718_hardware.png diff --git a/h-source/Public/Img/Crystal/1282042976_hardware.png b/h-source/Public/Img/Crystal/1282042976_hardware.png Binary files differnew file mode 100644 index 0000000..efffd46 --- /dev/null +++ b/h-source/Public/Img/Crystal/1282042976_hardware.png diff --git a/h-source/Public/Img/Crystal/button_cancel.png b/h-source/Public/Img/Crystal/button_cancel.png Binary files differnew file mode 100755 index 0000000..e2db55f --- /dev/null +++ b/h-source/Public/Img/Crystal/button_cancel.png diff --git a/h-source/Public/Img/Crystal/button_ok.png b/h-source/Public/Img/Crystal/button_ok.png Binary files differnew file mode 100755 index 0000000..2f86f0a --- /dev/null +++ b/h-source/Public/Img/Crystal/button_ok.png diff --git a/h-source/Public/Img/Famfamfam/es.png b/h-source/Public/Img/Famfamfam/es.png Binary files differnew file mode 100755 index 0000000..c2de2d7 --- /dev/null +++ b/h-source/Public/Img/Famfamfam/es.png diff --git a/h-source/Public/Img/Famfamfam/fr.png b/h-source/Public/Img/Famfamfam/fr.png Binary files differnew file mode 100755 index 0000000..8332c4e --- /dev/null +++ b/h-source/Public/Img/Famfamfam/fr.png diff --git a/h-source/Public/Img/Famfamfam/gb.png b/h-source/Public/Img/Famfamfam/gb.png Binary files differnew file mode 100644 index 0000000..ff701e1 --- /dev/null +++ b/h-source/Public/Img/Famfamfam/gb.png diff --git a/h-source/Public/Img/Famfamfam/it.png b/h-source/Public/Img/Famfamfam/it.png Binary files differnew file mode 100755 index 0000000..89692f7 --- /dev/null +++ b/h-source/Public/Img/Famfamfam/it.png diff --git a/h-source/Public/Img/H2O/applications-internet.png b/h-source/Public/Img/H2O/applications-internet.png Binary files differnew file mode 100755 index 0000000..193c46f --- /dev/null +++ b/h-source/Public/Img/H2O/applications-internet.png diff --git a/h-source/Public/Img/H2O/computer-laptop.png b/h-source/Public/Img/H2O/computer-laptop.png Binary files differnew file mode 100755 index 0000000..b5d8bde --- /dev/null +++ b/h-source/Public/Img/H2O/computer-laptop.png diff --git a/h-source/Public/Img/H2O/computer-laptop_22.png b/h-source/Public/Img/H2O/computer-laptop_22.png Binary files differnew file mode 100755 index 0000000..f33ca30 --- /dev/null +++ b/h-source/Public/Img/H2O/computer-laptop_22.png diff --git a/h-source/Public/Img/H2O/download.png b/h-source/Public/Img/H2O/download.png Binary files differnew file mode 100755 index 0000000..ec888b8 --- /dev/null +++ b/h-source/Public/Img/H2O/download.png diff --git a/h-source/Public/Img/H2O/download_48.png b/h-source/Public/Img/H2O/download_48.png Binary files differnew file mode 100755 index 0000000..e81619b --- /dev/null +++ b/h-source/Public/Img/H2O/download_48.png diff --git a/h-source/Public/Img/H2O/network-wireless.png b/h-source/Public/Img/H2O/network-wireless.png Binary files differnew file mode 100755 index 0000000..747edc9 --- /dev/null +++ b/h-source/Public/Img/H2O/network-wireless.png diff --git a/h-source/Public/Img/H2O/network-wireless_22.png b/h-source/Public/Img/H2O/network-wireless_22.png Binary files differnew file mode 100755 index 0000000..94c4058 --- /dev/null +++ b/h-source/Public/Img/H2O/network-wireless_22.png diff --git a/h-source/Public/Img/H2O/printer.png b/h-source/Public/Img/H2O/printer.png Binary files differnew file mode 100755 index 0000000..fd48f9f --- /dev/null +++ b/h-source/Public/Img/H2O/printer.png diff --git a/h-source/Public/Img/H2O/printer_22.png b/h-source/Public/Img/H2O/printer_22.png Binary files differnew file mode 100755 index 0000000..6e110de --- /dev/null +++ b/h-source/Public/Img/H2O/printer_22.png diff --git a/h-source/Public/Img/H2O/scanner.png b/h-source/Public/Img/H2O/scanner.png Binary files differnew file mode 100755 index 0000000..4501fcf --- /dev/null +++ b/h-source/Public/Img/H2O/scanner.png diff --git a/h-source/Public/Img/H2O/scanner_22.png b/h-source/Public/Img/H2O/scanner_22.png Binary files differnew file mode 100755 index 0000000..d7b57e0 --- /dev/null +++ b/h-source/Public/Img/H2O/scanner_22.png diff --git a/h-source/Public/Img/Icons/back.png b/h-source/Public/Img/Icons/back.png Binary files differnew file mode 100644 index 0000000..6ceb852 --- /dev/null +++ b/h-source/Public/Img/Icons/back.png diff --git a/h-source/Public/Img/Icons/delete.png b/h-source/Public/Img/Icons/delete.png Binary files differnew file mode 100644 index 0000000..9b192fe --- /dev/null +++ b/h-source/Public/Img/Icons/delete.png diff --git a/h-source/Public/Img/Icons/file.png b/h-source/Public/Img/Icons/file.png Binary files differnew file mode 100644 index 0000000..443765f --- /dev/null +++ b/h-source/Public/Img/Icons/file.png diff --git a/h-source/Public/Img/Icons/folder.png b/h-source/Public/Img/Icons/folder.png Binary files differnew file mode 100644 index 0000000..89fb6d5 --- /dev/null +++ b/h-source/Public/Img/Icons/folder.png diff --git a/h-source/Public/Img/Icons/image.png b/h-source/Public/Img/Icons/image.png Binary files differnew file mode 100644 index 0000000..bbc8c82 --- /dev/null +++ b/h-source/Public/Img/Icons/image.png diff --git a/h-source/Public/Img/Icons/index.html b/h-source/Public/Img/Icons/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Public/Img/Icons/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Public/Img/back-60.png b/h-source/Public/Img/back-60.png Binary files differnew file mode 100644 index 0000000..225df8e --- /dev/null +++ b/h-source/Public/Img/back-60.png diff --git a/h-source/Public/Img/discover.png b/h-source/Public/Img/discover.png Binary files differnew file mode 100644 index 0000000..3666a10 --- /dev/null +++ b/h-source/Public/Img/discover.png diff --git a/h-source/Public/Img/download.png b/h-source/Public/Img/download.png Binary files differnew file mode 100644 index 0000000..0331d8c --- /dev/null +++ b/h-source/Public/Img/download.png diff --git a/h-source/Public/Img/download_code.png b/h-source/Public/Img/download_code.png Binary files differnew file mode 100644 index 0000000..f40fc74 --- /dev/null +++ b/h-source/Public/Img/download_code.png diff --git a/h-source/Public/Img/edit-60.png b/h-source/Public/Img/edit-60.png Binary files differnew file mode 100644 index 0000000..254ce23 --- /dev/null +++ b/h-source/Public/Img/edit-60.png diff --git a/h-source/Public/Img/history-60.png b/h-source/Public/Img/history-60.png Binary files differnew file mode 100644 index 0000000..c726964 --- /dev/null +++ b/h-source/Public/Img/history-60.png diff --git a/h-source/Public/Img/link.png b/h-source/Public/Img/link.png Binary files differnew file mode 100644 index 0000000..12f9bce --- /dev/null +++ b/h-source/Public/Img/link.png diff --git a/h-source/Public/Img/new-60.png b/h-source/Public/Img/new-60.png Binary files differnew file mode 100644 index 0000000..d484867 --- /dev/null +++ b/h-source/Public/Img/new-60.png diff --git a/h-source/Public/Img/popup_back.png b/h-source/Public/Img/popup_back.png Binary files differnew file mode 100644 index 0000000..4cb7139 --- /dev/null +++ b/h-source/Public/Img/popup_back.png diff --git a/h-source/Public/Img/tab_icon_2.ico b/h-source/Public/Img/tab_icon_2.ico Binary files differnew file mode 100644 index 0000000..1adece3 --- /dev/null +++ b/h-source/Public/Img/tab_icon_2.ico diff --git a/h-source/Public/Img/talk-60.png b/h-source/Public/Img/talk-60.png Binary files differnew file mode 100644 index 0000000..d892a8d --- /dev/null +++ b/h-source/Public/Img/talk-60.png diff --git a/h-source/Public/Img/talk_messages.png b/h-source/Public/Img/talk_messages.png Binary files differnew file mode 100644 index 0000000..6a753d5 --- /dev/null +++ b/h-source/Public/Img/talk_messages.png diff --git a/h-source/Public/Img/title.png b/h-source/Public/Img/title.png Binary files differnew file mode 100644 index 0000000..fb0b38d --- /dev/null +++ b/h-source/Public/Img/title.png diff --git a/h-source/Public/Js/DisplayTag.js b/h-source/Public/Js/DisplayTag.js new file mode 100755 index 0000000..1ba1fb7 --- /dev/null +++ b/h-source/Public/Js/DisplayTag.js @@ -0,0 +1,10 @@ +<!-- + +// this simple function is necessary to obtain the hover effect in the popup menu (because IE doesn't support hover) + +function DisplayTag(obj,propertyValue) { + var a = obj.firstChild.childNodes[1]; + a.style.display= propertyValue; +} + +//-->
\ No newline at end of file diff --git a/h-source/Public/Js/functions.js b/h-source/Public/Js/functions.js new file mode 100644 index 0000000..33f5f4d --- /dev/null +++ b/h-source/Public/Js/functions.js @@ -0,0 +1,138 @@ +<!-- + +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +function dist_list_helper() +{ + var dist_list = ""; + + $(".input_distribution").click(function(){ + + //show the form + $(".dist_checkboxes_hidden_box").css({"display" : "block","z-index" : "500"}); + + $(".hidden_x_explorer").css({"visibility" : "hidden"}); + +// $(".hidden_x_explorer").css({"visibility" : "hidden"}); + + //remove checked attribute + $(".hidden_box_input").each(function(){ + + $(this).removeAttr("checked"); + + }); + + dist_list = $(".input_distribution").attr("value"); + + //build the array by splitting the distribution string + var dist_array = dist_list.split(","); + + for (i=0; i < dist_array.length; i++) + { + var this_class = dist_array[i].replace(/^\s*/, "").replace(/\s*$/, ""); + $("." + this_class).attr({"checked" : "checked"}); + } + + }); + + $(".hidden_box_distribution_submit").click(function(){ + + $(".hidden_x_explorer").css({"visibility" : "visible"}); + + dist_list = ""; + + $(".hidden_box_input:checked").each(function(){ + + dist_list += $(this).attr("value") + " , "; + + }); + + $(".dist_checkboxes_hidden_box").css({"display" : "none"}); + + if (dist_list.slice(-2) === ", ") + { + dist_list = dist_list.slice(0,dist_list.length-2); + } + + $(".input_distribution").attr({"value" : dist_list}); + + return false; + }); + + //click cancel + $(".hidden_box_distribution_cancel").click(function(){ + + $(".hidden_x_explorer").css({"visibility" : "visible"}); + + $(".dist_checkboxes_hidden_box").css({"display" : "none"}); + + return false; + }); +} + +//md_type: message,issue,talk +//md_action:hide,show +function moderator_dialog(md_action,md_type) +{ + // Dialog Link + $("." + md_action + "_" + md_type).click(function() { + + $("#delete_dialog").css("display","block"); + + var md_id = $(this).attr("id"); + + $('#notice_dialog').dialog({ + autoOpen: false, + width: 500 + }); + + $("#delete_dialog").dialog({ + autoOpen: false, + width: 350, + buttons: { + "Send": function() { + + var md_message = encodeURIComponent($("#md_message").attr("value")); + + $.ajax({ + type: "POST", + url: base_url + "/history/" + md_action + "/" + curr_lang + "/" + csrf_token, + data: "id="+md_id+"&message="+md_message+"&type="+md_type+"&insertAction=save", + async: false, + cache:false, + dataType: "html", + success: function(html){ + $(".notice_dialog_inner").text(html); + $('#notice_dialog').dialog('open'); + } + }); + + $(this).dialog("close"); + }, + "Cancel": function() { + $(this).dialog("close"); + } + } + }); + + $("#delete_dialog").dialog('open'); + + return false; + }); +} + +//-->
\ No newline at end of file diff --git a/h-source/Public/Js/index.html b/h-source/Public/Js/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Public/Js/index.html @@ -0,0 +1 @@ + diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png Binary files differnew file mode 100755 index 0000000..82524ab --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png Binary files differnew file mode 100755 index 0000000..6aed97a --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png Binary files differnew file mode 100755 index 0000000..f11ca67 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png Binary files differnew file mode 100755 index 0000000..68306d1 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png Binary files differnew file mode 100755 index 0000000..f567c28 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png Binary files differnew file mode 100755 index 0000000..29e9965 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png Binary files differnew file mode 100755 index 0000000..9a46d19 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png Binary files differnew file mode 100755 index 0000000..f811f30 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.png Binary files differnew file mode 100755 index 0000000..755fe99 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.png Binary files differnew file mode 100755 index 0000000..98705f9 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.png Binary files differnew file mode 100755 index 0000000..2179078 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.png Binary files differnew file mode 100755 index 0000000..de76ce2 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.png b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.png Binary files differnew file mode 100755 index 0000000..42f8f99 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.png diff --git a/h-source/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css b/h-source/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css new file mode 100755 index 0000000..c4ed3ea --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css @@ -0,0 +1,315 @@ +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=segoe%20ui,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=3px&bgColorHeader=f9f9f9&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=cccccc&fcHeader=e69700&iconColorHeader=5fa5e3&bgColorContent=eeeeee&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=0a82eb&bgColorDefault=1484e6&bgTextureDefault=08_diagonals_thick.png&bgImgOpacityDefault=22&borderColorDefault=ffffff&fcDefault=ffffff&iconColorDefault=fcdd4a&bgColorHover=2293f7&bgTextureHover=08_diagonals_thick.png&bgImgOpacityHover=26&borderColorHover=2293f7&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=e69700&bgTextureActive=08_diagonals_thick.png&bgImgOpacityActive=20&borderColorActive=e69700&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=c5ddfc&bgTextureHighlight=07_diagonals_small.png&bgImgOpacityHighlight=25&borderColorHighlight=ffffff&fcHighlight=333333&iconColorHighlight=0b54d5&bgColorError=e69700&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=20&borderColorError=e69700&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=e6b900&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=e69700&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=20&thicknessShadow=0px&offsetTopShadow=6px&offsetLeftShadow=6px&cornerRadiusShadow=3px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: segoe ui, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: segoe ui, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa; background: #eeeeee url(images/ui-bg_inset-hard_100_eeeeee_1x100.png) 50% bottom repeat-x; color: #222222; } +.ui-widget-content a { color: #222222; } +.ui-widget-header { border: 1px solid #cccccc; background: #f9f9f9 url(images/ui-bg_highlight-soft_100_f9f9f9_1x100.png) 50% 50% repeat-x; color: #e69700; font-weight: bold; } +.ui-widget-header a { color: #e69700; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #ffffff; background: #1484e6 url(images/ui-bg_diagonals-thick_22_1484e6_40x40.png) 50% 50% repeat; font-weight: bold; color: #ffffff; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #2293f7; background: #2293f7 url(images/ui-bg_diagonals-thick_26_2293f7_40x40.png) 50% 50% repeat; font-weight: bold; color: #ffffff; } +.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #e69700; background: #e69700 url(images/ui-bg_diagonals-thick_20_e69700_40x40.png) 50% 50% repeat; font-weight: bold; color: #ffffff; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #ffffff; background: #c5ddfc url(images/ui-bg_diagonals-small_25_c5ddfc_40x40.png) 50% 50% repeat; color: #333333; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #333333; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #e69700; background: #e69700 url(images/ui-bg_diagonals-thick_20_e69700_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_0a82eb_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_0a82eb_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_5fa5e3_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_fcdd4a_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_0b54d5_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; } +.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; } +.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; } +.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; } +.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; } +.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; } +.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } + +/* Overlays */ +.ui-widget-overlay { background: #e6b900 url(images/ui-bg_flat_0_e6b900_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: 6px 0 0 6px; padding: 0px; background: #e69700 url(images/ui-bg_flat_0_e69700_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }/* + * jQuery UI Dialog @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/h-source/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js b/h-source/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js new file mode 100755 index 0000000..7469ef3 --- /dev/null +++ b/h-source/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js @@ -0,0 +1,87 @@ +/*! + * jQuery UI 1.8.4 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.4",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a, +b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93, +CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable", +"off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-= +parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c.style(this,h,d(this,f)+"px")})};c.fn["outer"+ +b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c.style(this,h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"== +b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}})(jQuery); +;/*! + * jQuery UI Widget 1.8.4 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,j){var k=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return k.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options); +b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}): +this.each(function(){var g=b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}); +this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}b.each(d,function(f, +h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a= +b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); +;/* + * jQuery UI Position 1.8.4 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h= +0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+= +g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k, +elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"? +-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position= +"relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery); +;/* + * jQuery UI Dialog 1.8.4 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c,j){c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title"); +if(typeof this.originalTitle!=="string")this.originalTitle="";var a=this,b=a.options,d=b.title||a.originalTitle||" ",f=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(i){a.moveToTop(false, +i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var e=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i); +return false}).appendTo(e);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",f).html(d).prependTo(e);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;e.find("*").add(e).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&& +g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog"); +b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0])d=Math.max(d,c(this).css("z-index"))});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,f=d.options;if(f.modal&&!a||!f.stack&&!f.modal)return d._trigger("focus",b);if(f.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ= +f.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;d.next().length&&d.appendTo("body");a._size();a._position(b.position);d.show(b.show); +a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(f){if(f.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),e=g.filter(":first");g=g.filter(":last");if(f.target===g[0]&&!f.shiftKey){e.focus(1);return false}else if(f.target===e[0]&&f.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._trigger("open");a._isOpen=true;return a}},_createButtons:function(a){var b=this,d=false, +f=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(f);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(e,h){e=c('<button type="button"></button>').text(e).click(function(){h.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&e.button()});f.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(e){return{position:e.position, +offset:e.offset}}var b=this,d=b.options,f=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",e,a(h))},drag:function(e,h){b._trigger("drag",e,a(h))},stop:function(e,h){d.position=[h.position.left-f.scrollLeft(),h.position.top-f.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g); +b._trigger("dragStop",e,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}a=a===j?this.options.resizable:a;var d=this,f=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:d._minHeight(), +handles:a,start:function(e,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",e,b(h))},resize:function(e,h){d._trigger("resize",e,b(h))},stop:function(e,h){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();d._trigger("resizeStop",e,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight, +a.height)},_position:function(a){var b=[],d=[0,0],f;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,e){if(+b[g]===b[g]){d[g]=b[g];b[g]=e}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(f=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(a); +f||this.uiDialog.hide()},_setOption:function(a,b){var d=this,f=d.uiDialog,g=f.is(":data(resizable)"),e=false;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);e=true;break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":f.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case "draggable":b? +d._makeDraggable():f.draggable("destroy");break;case "height":e=true;break;case "maxHeight":g&&f.resizable("option","maxHeight",b);e=true;break;case "maxWidth":g&&f.resizable("option","maxWidth",b);e=true;break;case "minHeight":g&&f.resizable("option","minHeight",b);e=true;break;case "minWidth":g&&f.resizable("option","minWidth",b);e=true;break;case "position":d._position(b);break;case "resizable":g&&!b&&f.resizable("destroy");g&&typeof b==="string"&&f.resizable("option","handles",b);!g&&b!==false&& +d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break;case "width":e=true;break}c.Widget.prototype._setOption.apply(d,arguments);e&&d._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height- +b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), +create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){return c(d.target).zIndex()>=c.ui.dialog.overlay.maxZ})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), +height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){this.oldInstances.push(this.instances.splice(c.inArray(a,this.instances),1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var b=0;c.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); +b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances, +function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery); +;
\ No newline at end of file diff --git a/h-source/Public/Js/jquery/jquery-1.4.2.min.js b/h-source/Public/Js/jquery/jquery-1.4.2.min.js new file mode 100644 index 0000000..7c24308 --- /dev/null +++ b/h-source/Public/Js/jquery/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? +e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= +j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, +"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= +true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| +c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", +L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, +"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ +a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], +d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== +a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& +!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= +true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", +i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", +" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= +this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= +e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= +null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, +"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= +a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, +isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= +{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; +if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& +!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, +u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), +function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; +if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; +for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- +1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, +CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, +relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= +l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; +h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| +!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= +h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, +gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; +c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? +a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& +this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| +u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length=== +1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); +this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a], +"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, +animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= +j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); +this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length|| +c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? +function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= +this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; +k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& +f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/h-source/Public/Js/markitup/jquery.markitup.js b/h-source/Public/Js/markitup/jquery.markitup.js new file mode 100644 index 0000000..ee8f40f --- /dev/null +++ b/h-source/Public/Js/markitup/jquery.markitup.js @@ -0,0 +1,559 @@ +// ---------------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// v 1.1.7 +// Dual licensed under the MIT and GPL licenses. +// ---------------------------------------------------------------------------- +// Copyright (C) 2007-2010 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// ---------------------------------------------------------------------------- +(function($) { + $.fn.markItUp = function(settings, extraSettings) { + var options, ctrlKey, shiftKey, altKey; + ctrlKey = shiftKey = altKey = false; + + options = { id: '', + nameSpace: '', + root: '', + previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes' + previewAutoRefresh: true, + previewPosition: 'after', + previewTemplatePath: '~/templates/preview.html', + previewParserPath: '', + previewParserVar: 'data', + resizeHandle: true, + beforeInsert: '', + afterInsert: '', + onEnter: {}, + onShiftEnter: {}, + onCtrlEnter: {}, + onTab: {}, + markupSet: [ { /* set */ } ] + }; + $.extend(options, settings, extraSettings); + + // compute markItUp! path + if (!options.root) { + $('script').each(function(a, tag) { + miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/); + if (miuScript !== null) { + options.root = miuScript[1]; + } + }); + } + + return this.each(function() { + var $$, textarea, levels, scrollPosition, caretPosition, caretOffset, + clicked, hash, header, footer, previewWindow, template, iFrame, abort; + $$ = $(this); + textarea = this; + levels = []; + abort = false; + scrollPosition = caretPosition = 0; + caretOffset = -1; + + options.previewParserPath = localize(options.previewParserPath); + options.previewTemplatePath = localize(options.previewTemplatePath); + + // apply the computed path to ~/ + function localize(data, inText) { + if (inText) { + return data.replace(/("|')~\//g, "$1"+options.root); + } + return data.replace(/^~\//, options.root); + } + + // init and build editor + function init() { + id = ''; nameSpace = ''; + if (options.id) { + id = 'id="'+options.id+'"'; + } else if ($$.attr("id")) { + id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"'; + + } + if (options.nameSpace) { + nameSpace = 'class="'+options.nameSpace+'"'; + } + $$.wrap('<div '+nameSpace+'></div>'); + $$.wrap('<div '+id+' class="markItUp"></div>'); + $$.wrap('<div class="markItUpContainer"></div>'); + $$.addClass("markItUpEditor"); + + // add the header before the textarea + header = $('<div class="markItUpHeader"></div>').insertBefore($$); + $(dropMenus(options.markupSet)).appendTo(header); + + // add the footer after the textarea + footer = $('<div class="markItUpFooter"></div>').insertAfter($$); + + // add the resize handle after textarea + if (options.resizeHandle === true && $.browser.safari !== true) { + resizeHandle = $('<div class="markItUpResizeHandle"></div>') + .insertAfter($$) + .bind("mousedown", function(e) { + var h = $$.height(), y = e.clientY, mouseMove, mouseUp; + mouseMove = function(e) { + $$.css("height", Math.max(20, e.clientY+h-y)+"px"); + return false; + }; + mouseUp = function(e) { + $("html").unbind("mousemove", mouseMove).unbind("mouseup", mouseUp); + return false; + }; + $("html").bind("mousemove", mouseMove).bind("mouseup", mouseUp); + }); + footer.append(resizeHandle); + } + + // listen key events + $$.keydown(keyPressed).keyup(keyPressed); + + // bind an event to catch external calls + $$.bind("insertion", function(e, settings) { + if (settings.target !== false) { + get(); + } + if (textarea === $.markItUp.focused) { + markup(settings); + } + }); + + // remember the last focus + $$.focus(function() { + $.markItUp.focused = this; + }); + } + + // recursively build header with dropMenus from markupset + function dropMenus(markupSet) { + var ul = $('<ul></ul>'), i = 0; + $('li:hover > ul', ul).css('display', 'block'); + $.each(markupSet, function() { + var button = this, t = '', title, li, j; + title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||''); + key = (button.key) ? 'accesskey="'+button.key+'"' : ''; + if (button.separator) { + li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul); + } else { + i++; + for (j = levels.length -1; j >= 0; j--) { + t += levels[j]+"-"; + } + li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>') + .bind("contextmenu", function() { // prevent contextmenu on mac and allow ctrl+click + return false; + }).click(function() { + return false; + }).mousedown(function() { + if (button.call) { + eval(button.call)(); + } + setTimeout(function() { markup(button) },1); + return false; + }).hover(function() { + $('> ul', this).show(); + $(document).one('click', function() { // close dropmenu if click outside + $('ul ul', header).hide(); + } + ); + }, function() { + $('> ul', this).hide(); + } + ).appendTo(ul); + if (button.dropMenu) { + levels.push(i); + $(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); + } + } + }); + levels.pop(); + return ul; + } + + // markItUp! markups + function magicMarkups(string) { + if (string) { + string = string.toString(); + string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g, + function(x, a) { + var b = a.split('|!|'); + if (altKey === true) { + return (b[1] !== undefined) ? b[1] : b[0]; + } else { + return (b[1] === undefined) ? "" : b[0]; + } + } + ); + // [![prompt]!], [![prompt:!:value]!] + string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g, + function(x, a) { + var b = a.split(':!:'); + if (abort === true) { + return false; + } + value = prompt(b[0], (b[1]) ? b[1] : ''); + if (value === null) { + abort = true; + } + return value; + } + ); + return string; + } + return ""; + } + + // prepare action + function prepare(action) { + if ($.isFunction(action)) { + action = action(hash); + } + return magicMarkups(action); + } + + // build block to insert + function build(string) { + openWith = prepare(clicked.openWith); + placeHolder = prepare(clicked.placeHolder); + replaceWith = prepare(clicked.replaceWith); + closeWith = prepare(clicked.closeWith); + if (replaceWith !== "") { + block = openWith + replaceWith + closeWith; + } else if (selection === '' && placeHolder !== '') { + block = openWith + placeHolder + closeWith; + } else { + block = openWith + (string||selection) + closeWith; + } + return { block:block, + openWith:openWith, + replaceWith:replaceWith, + placeHolder:placeHolder, + closeWith:closeWith + }; + } + + // define markup to insert + function markup(button) { + var len, j, n, i; + hash = clicked = button; + get(); + + $.extend(hash, { line:"", + root:options.root, + textarea:textarea, + selection:(selection||''), + caretPosition:caretPosition, + ctrlKey:ctrlKey, + shiftKey:shiftKey, + altKey:altKey + } + ); + // callbacks before insertion + prepare(options.beforeInsert); + prepare(clicked.beforeInsert); + if (ctrlKey === true && shiftKey === true) { + prepare(clicked.beforeMultiInsert); + } + $.extend(hash, { line:1 }); + + if (ctrlKey === true && shiftKey === true) { + lines = selection.split(/\r?\n/); + for (j = 0, n = lines.length, i = 0; i < n; i++) { + if ($.trim(lines[i]) !== '') { + $.extend(hash, { line:++j, selection:lines[i] } ); + lines[i] = build(lines[i]).block; + } else { + lines[i] = ""; + } + } + string = { block:lines.join('\n')}; + start = caretPosition; + len = string.block.length + (($.browser.opera) ? n : 0); + } else if (ctrlKey === true) { + string = build(selection); + start = caretPosition + string.openWith.length; + len = string.block.length - string.openWith.length - string.closeWith.length; + len -= fixIeBug(string.block); + } else if (shiftKey === true) { + string = build(selection); + start = caretPosition; + len = string.block.length; + len -= fixIeBug(string.block); + } else { + string = build(selection); + start = caretPosition + string.block.length ; + len = 0; + start -= fixIeBug(string.block); + } + if ((selection === '' && string.replaceWith === '')) { + caretOffset += fixOperaBug(string.block); + + start = caretPosition + string.openWith.length; + len = string.block.length - string.openWith.length - string.closeWith.length; + + caretOffset = $$.val().substring(caretPosition, $$.val().length).length; + caretOffset -= fixOperaBug($$.val().substring(0, caretPosition)); + } + $.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } ); + + if (string.block !== selection && abort === false) { + insert(string.block); + set(start, len); + } else { + caretOffset = -1; + } + get(); + + $.extend(hash, { line:'', selection:selection }); + + // callbacks after insertion + if (ctrlKey === true && shiftKey === true) { + prepare(clicked.afterMultiInsert); + } + prepare(clicked.afterInsert); + prepare(options.afterInsert); + + // refresh preview if opened + if (previewWindow && options.previewAutoRefresh) { + refreshPreview(); + } + + // reinit keyevent + shiftKey = altKey = ctrlKey = abort = false; + } + + // Substract linefeed in Opera + function fixOperaBug(string) { + if ($.browser.opera) { + return string.length - string.replace(/\n*/g, '').length; + } + return 0; + } + // Substract linefeed in IE + function fixIeBug(string) { + if ($.browser.msie) { + return string.length - string.replace(/\r*/g, '').length; + } + return 0; + } + + // add markup + function insert(block) { + if (document.selection) { + var newSelection = document.selection.createRange(); + newSelection.text = block; + } else { + $$.val($$.val().substring(0, caretPosition) + block + $$.val().substring(caretPosition + selection.length, $$.val().length)); + } + } + + // set a selection + function set(start, len) { + if (textarea.createTextRange){ + // quick fix to make it work on Opera 9.5 + if ($.browser.opera && $.browser.version >= 9.5 && len == 0) { + return false; + } + range = textarea.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', len); + range.select(); + } else if (textarea.setSelectionRange ){ + textarea.setSelectionRange(start, start + len); + } + textarea.scrollTop = scrollPosition; + textarea.focus(); + } + + // get the selection + function get() { + textarea.focus(); + + scrollPosition = textarea.scrollTop; + if (document.selection) { + selection = document.selection.createRange().text; + if ($.browser.msie) { // ie + var range = document.selection.createRange(), rangeCopy = range.duplicate(); + rangeCopy.moveToElementText(textarea); + caretPosition = -1; + while(rangeCopy.inRange(range)) { // fix most of the ie bugs with linefeeds... + rangeCopy.moveStart('character'); + caretPosition ++; + } + } else { // opera + caretPosition = textarea.selectionStart; + } + } else { // gecko & webkit + caretPosition = textarea.selectionStart; + selection = $$.val().substring(caretPosition, textarea.selectionEnd); + } + return selection; + } + + // open preview window + function preview() { + if (!previewWindow || previewWindow.closed) { + if (options.previewInWindow) { + previewWindow = window.open('', 'preview', options.previewInWindow); + } else { + iFrame = $('<iframe class="markItUpPreviewFrame"></iframe>'); + if (options.previewPosition == 'after') { + iFrame.insertAfter(footer); + } else { + iFrame.insertBefore(header); + } + previewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1]; + } + } else if (altKey === true) { + // Thx Stephen M. Redd for the IE8 fix + if (iFrame) { + iFrame.remove(); + } else { + previewWindow.close(); + } + previewWindow = iFrame = false; + } + if (!options.previewAutoRefresh) { + refreshPreview(); + } + } + + // refresh Preview window + function refreshPreview() { + renderPreview(); + } + + function renderPreview() { + var phtml; + if (options.previewParserPath !== '') { + $.ajax( { + type: 'POST', + url: options.previewParserPath, + data: options.previewParserVar+'='+encodeURIComponent($$.val()), + success: function(data) { + writeInPreview( localize(data, 1) ); + } + } ); + } else { + if (!template) { + $.ajax( { + url: options.previewTemplatePath, + success: function(data) { + writeInPreview( localize(data, 1).replace(/<!-- content -->/g, $$.val()) ); + } + } ); + } + } + return false; + } + + function writeInPreview(data) { + if (previewWindow.document) { + try { + sp = previewWindow.document.documentElement.scrollTop + } catch(e) { + sp = 0; + } + previewWindow.document.open(); + previewWindow.document.write(data); + previewWindow.document.close(); + previewWindow.document.documentElement.scrollTop = sp; + } + if (options.previewInWindow) { + previewWindow.focus(); + } + } + + // set keys pressed + function keyPressed(e) { + shiftKey = e.shiftKey; + altKey = e.altKey; + ctrlKey = (!(e.altKey && e.ctrlKey)) ? e.ctrlKey : false; + + if (e.type === 'keydown') { + if (ctrlKey === true) { + li = $("a[accesskey="+String.fromCharCode(e.keyCode)+"]", header).parent('li'); + if (li.length !== 0) { + ctrlKey = false; + setTimeout(function() { + li.triggerHandler('mousedown'); + },1); + return false; + } + } + if (e.keyCode === 13 || e.keyCode === 10) { // Enter key + if (ctrlKey === true) { // Enter + Ctrl + ctrlKey = false; + markup(options.onCtrlEnter); + return options.onCtrlEnter.keepDefault; + } else if (shiftKey === true) { // Enter + Shift + shiftKey = false; + markup(options.onShiftEnter); + return options.onShiftEnter.keepDefault; + } else { // only Enter + markup(options.onEnter); + return options.onEnter.keepDefault; + } + } + if (e.keyCode === 9) { // Tab key + if (shiftKey == true || ctrlKey == true || altKey == true) { // Thx Dr Floob. + return false; + } + if (caretOffset !== -1) { + get(); + caretOffset = $$.val().length - caretOffset; + set(caretOffset, 0); + caretOffset = -1; + return false; + } else { + markup(options.onTab); + return options.onTab.keepDefault; + } + } + } + } + + init(); + }); + }; + + $.fn.markItUpRemove = function() { + return this.each(function() { + var $$ = $(this).unbind().removeClass('markItUpEditor'); + $$.parent('div').parent('div.markItUp').parent('div').replaceWith($$); + } + ); + }; + + $.markItUp = function(settings) { + var options = { target:false }; + $.extend(options, settings); + if (options.target) { + return $(options.target).each(function() { + $(this).focus(); + $(this).trigger('insertion', [options]); + }); + } else { + $('textarea').trigger('insertion', [options]); + } + }; +})(jQuery); diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/bold.png b/h-source/Public/Js/markitup/sets/bbcode/images/bold.png Binary files differnew file mode 100644 index 0000000..889ae80 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/bold.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/clean.png b/h-source/Public/Js/markitup/sets/bbcode/images/clean.png Binary files differnew file mode 100644 index 0000000..7e7cefb --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/clean.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/code.png b/h-source/Public/Js/markitup/sets/bbcode/images/code.png Binary files differnew file mode 100644 index 0000000..63fe6ce --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/code.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/fonts.png b/h-source/Public/Js/markitup/sets/bbcode/images/fonts.png Binary files differnew file mode 100644 index 0000000..b7960db --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/fonts.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/h1.png b/h-source/Public/Js/markitup/sets/bbcode/images/h1.png Binary files differnew file mode 100644 index 0000000..9c122e9 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/h1.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/h2.png b/h-source/Public/Js/markitup/sets/bbcode/images/h2.png Binary files differnew file mode 100644 index 0000000..fbd8765 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/h2.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/h3.png b/h-source/Public/Js/markitup/sets/bbcode/images/h3.png Binary files differnew file mode 100644 index 0000000..c7836cf --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/h3.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/italic.png b/h-source/Public/Js/markitup/sets/bbcode/images/italic.png Binary files differnew file mode 100644 index 0000000..8482ac8 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/italic.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/link.png b/h-source/Public/Js/markitup/sets/bbcode/images/link.png Binary files differnew file mode 100644 index 0000000..25eacb7 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/link.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/list-bullet.png b/h-source/Public/Js/markitup/sets/bbcode/images/list-bullet.png Binary files differnew file mode 100644 index 0000000..4a8672b --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/list-bullet.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/list-item.png b/h-source/Public/Js/markitup/sets/bbcode/images/list-item.png Binary files differnew file mode 100644 index 0000000..8cb4d69 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/list-item.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/list-numeric.png b/h-source/Public/Js/markitup/sets/bbcode/images/list-numeric.png Binary files differnew file mode 100644 index 0000000..33b0b8d --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/list-numeric.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/paragraph.png b/h-source/Public/Js/markitup/sets/bbcode/images/paragraph.png Binary files differnew file mode 100644 index 0000000..95704fb --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/paragraph.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/picture.png b/h-source/Public/Js/markitup/sets/bbcode/images/picture.png Binary files differnew file mode 100644 index 0000000..4a158fe --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/picture.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/preview.png b/h-source/Public/Js/markitup/sets/bbcode/images/preview.png Binary files differnew file mode 100644 index 0000000..a9925a0 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/preview.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/quotes.png b/h-source/Public/Js/markitup/sets/bbcode/images/quotes.png Binary files differnew file mode 100644 index 0000000..e54ebeb --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/quotes.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/stroke.png b/h-source/Public/Js/markitup/sets/bbcode/images/stroke.png Binary files differnew file mode 100644 index 0000000..612058a --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/stroke.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/images/underline.png b/h-source/Public/Js/markitup/sets/bbcode/images/underline.png Binary files differnew file mode 100644 index 0000000..90d0df2 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/images/underline.png diff --git a/h-source/Public/Js/markitup/sets/bbcode/readme.txt b/h-source/Public/Js/markitup/sets/bbcode/readme.txt new file mode 100644 index 0000000..745d5dd --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/readme.txt @@ -0,0 +1,11 @@ +Markup language: +BBCode + +Description: +A basic BBCode markup set with Bold, Italic, Underline, Picture, Link, Size, List, Quotes, Code, Clean button, Preview button. + +Install: +- Download the zip file +- Unzip it in your markItUp! sets folder +- Modify your JS link to point at this set.js +- Modify your CSS link to point at this style.css
\ No newline at end of file diff --git a/h-source/Public/Js/markitup/sets/bbcode/set.js b/h-source/Public/Js/markitup/sets/bbcode/set.js new file mode 100644 index 0000000..3d16ea5 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/set.js @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------- +// markItUp! +// ---------------------------------------------------------------------------- +// Copyright (C) 2008 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +// BBCode tags example +// http://en.wikipedia.org/wiki/Bbcode +// ---------------------------------------------------------------------------- +// Feel free to add more tags +// ---------------------------------------------------------------------------- +mySettings = { + previewParserPath: '', // path to your BBCode parser + markupSet: [ + {name:'Heading 1', key:'1', openWith:'[h1]', closeWith:'[/h1]' }, + {name:'Heading 2', key:'2', openWith:'[h2]', closeWith:'[/h2]' }, + {name:'Heading 3', key:'3', openWith:'[h3]', closeWith:'[/h3]' }, + {name:'Paragraph', openWith:'[p]', closeWith:'[/p]' }, + {separator:'---------------' }, + {name:'Bold', key:'B', openWith:'[b]', closeWith:'[/b]'}, + {name:'Italic', key:'I', openWith:'[i]', closeWith:'[/i]'}, + {name:'Underline', key:'U', openWith:'[u]', closeWith:'[/u]'}, + {name:'Stroke through', key:'S', openWith:'[del]', closeWith:'[/del]' }, + {separator:'---------------' }, + {name:'Bulleted list', openWith:'[list]\n', closeWith:'\n[/list]'}, + {name:'Numeric list', openWith:'[enum]\n', closeWith:'\n[/enum]'}, + {name:'List item', openWith:'[*] ', closeWith:'[/*]'}, + {separator:'---------------' }, + {name:'Code', openWith:'[code]', closeWith:'[/code]'}, + {name:'Link', key: 'L', openWith:'[a]', closeWith:'[/a]',placeHolder:'http://the_url | the_text'}, + ] +}
\ No newline at end of file diff --git a/h-source/Public/Js/markitup/sets/bbcode/style.css b/h-source/Public/Js/markitup/sets/bbcode/style.css new file mode 100644 index 0000000..4ab6031 --- /dev/null +++ b/h-source/Public/Js/markitup/sets/bbcode/style.css @@ -0,0 +1,72 @@ +/* ------------------------------------------------------------------- +// markItUp! +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp .markItUpButton1 a { + background-image:url(images/h1.png); +} +.markItUp .markItUpButton2 a { + background-image:url(images/h2.png); +} +.markItUp .markItUpButton3 a { + background-image:url(images/h3.png); +} +.markItUp .markItUpButton4 a { + background-image:url(images/paragraph.png); +} +.markItUp .markItUpButton5 a { + background-image:url(images/bold.png); +} +.markItUp .markItUpButton6 a { + background-image:url(images/italic.png); +} +.markItUp .markItUpButton7 a { + background-image:url(images/underline.png); +} +.markItUp .markItUpButton8 a { + background-image:url(images/stroke.png); +} +.markItUp .markItUpButton9 a { + background-image:url(images/list-bullet.png); +} +.markItUp .markItUpButton10 a { + background-image:url(images/list-numeric.png); +} +.markItUp .markItUpButton11 a { + background-image:url(images/list-item.png); +} +.markItUp .markItUpButton12 a { + background-image:url(images/code.png); +} +.markItUp .markItUpButton13 a { + background-image:url(images/link.png); +} +/*.markItUp .markItUpButton4 a { + background-image:url(images/stroke.png); +}*/ + +/*.markItUp .markItUpButton4 a { + background-image:url(images/picture.png); +}*/ +/*.markItUp .markItUpButton5 a { + background-image:url(images/link.png); +} + +.markItUp .markItUpButton6 a { + background-image:url(images/fonts.png); +} + + +.markItUp .markItUpButton10 a { + background-image:url(images/quotes.png); +} +.markItUp .markItUpButton11 a { + background-image:url(images/code.png); +} + +.markItUp .clean a { + background-image:url(images/clean.png); +} +.markItUp .preview a { + background-image:url(images/preview.png); +}*/
\ No newline at end of file diff --git a/h-source/Public/Js/markitup/skins/simple/images/handle.png b/h-source/Public/Js/markitup/skins/simple/images/handle.png Binary files differnew file mode 100644 index 0000000..3993b20 --- /dev/null +++ b/h-source/Public/Js/markitup/skins/simple/images/handle.png diff --git a/h-source/Public/Js/markitup/skins/simple/images/menu.png b/h-source/Public/Js/markitup/skins/simple/images/menu.png Binary files differnew file mode 100644 index 0000000..44a07af --- /dev/null +++ b/h-source/Public/Js/markitup/skins/simple/images/menu.png diff --git a/h-source/Public/Js/markitup/skins/simple/images/submenu.png b/h-source/Public/Js/markitup/skins/simple/images/submenu.png Binary files differnew file mode 100644 index 0000000..03d1977 --- /dev/null +++ b/h-source/Public/Js/markitup/skins/simple/images/submenu.png diff --git a/h-source/Public/Js/markitup/skins/simple/style.css b/h-source/Public/Js/markitup/skins/simple/style.css new file mode 100644 index 0000000..4ff830f --- /dev/null +++ b/h-source/Public/Js/markitup/skins/simple/style.css @@ -0,0 +1,118 @@ +/* ------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp * { + margin:0px; padding:0px; + outline:none; +} +.markItUp a:link, +.markItUp a:visited { + color:#000; + text-decoration:none; +} +.markItUp { + width:700px; + margin:5px 0 5px 0; +} +.markItUpContainer { + font:11px Verdana, Arial, Helvetica, sans-serif; +} +.markItUpEditor { + font:12px 'Courier New', Courier, monospace; + padding:5px; + width:640px; + height:300px; + clear:both; display:block; + line-height:18px; + overflow:auto; +} +.markItUpPreviewFrame { + overflow:auto; + background-color:#FFF; + width:99.9%; + height:300px; + margin:5px 0; +} +.markItUpFooter { + width:100%; +} +.markItUpResizeHandle { + overflow:hidden; + width:22px; height:5px; + margin-left:auto; + margin-right:auto; + background-image:url(images/handle.png); + cursor:n-resize; +} +/***************************************************************************************/ +/* first row of buttons */ +.markItUpHeader ul li { + list-style:none; + float:left; + position:relative; +} +.markItUpHeader ul li:hover > ul{ + display:block; +} +.markItUpHeader ul .markItUpDropMenu { + background:transparent url(images/menu.png) no-repeat 115% 50%; + margin-right:5px; +} +.markItUpHeader ul .markItUpDropMenu li { + margin-right:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul { + display:none; + position:absolute; + top:18px; left:0px; + background:#FFF; + border:1px solid #000; +} +.markItUpHeader ul ul li { + float:none; + border-bottom:1px solid #000; +} +.markItUpHeader ul ul .markItUpDropMenu { + background:#FFF url(images/submenu.png) no-repeat 100% 50%; +} +.markItUpHeader ul .markItUpSeparator { + margin:0 10px; + width:1px; + height:16px; + overflow:hidden; + background-color:#CCC; +} +.markItUpHeader ul ul .markItUpSeparator { + width:auto; height:1px; + margin:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul ul { + position:absolute; + top:-1px; left:150px; +} +.markItUpHeader ul ul ul li { + float:none; +} +.markItUpHeader ul a { + display:block; + width:16px; height:16px; + text-indent:-10000px; + background-repeat:no-repeat; + padding:3px; + margin:0px; +} +.markItUpHeader ul ul a { + display:block; + padding-left:0px; + text-indent:0; + width:120px; + padding:5px 5px 5px 25px; + background-position:2px 50%; +} +.markItUpHeader ul ul a:hover { + color:#FFF; + background-color:#000; +} diff --git a/h-source/Public/Js/stats.js b/h-source/Public/Js/stats.js new file mode 100644 index 0000000..7d6be08 --- /dev/null +++ b/h-source/Public/Js/stats.js @@ -0,0 +1,35 @@ + +/*************************************************************************** + phpTrafficA @soft.ZoneO.net + Copyright (C) 2004-2008 ZoneO-soft, Butchu (email: "butchu" with the domain "zoneo.net") + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + More Info About The Licence At http://www.gnu.org/copyleft/gpl.html +****************************************************************************/ + +function encode64(inp){ +var key="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; +var chr1,chr2,chr3,enc3,enc4,i=0,out=""; +while(i<inp.length){ +chr1=inp.charCodeAt(i++);if(chr1>127) chr1=88; +chr2=inp.charCodeAt(i++);if(chr2>127) chr2=88; +chr3=inp.charCodeAt(i++);if(chr3>127) chr3=88; +if(isNaN(chr3)) {enc4=64;chr3=0;} else enc4=chr3&63; +if(isNaN(chr2)) {enc3=64;chr2=0;} else enc3=((chr2<<2)|(chr3>>6))&63; +out+=key.charAt((chr1>>2)&63)+key.charAt(((chr1<<4)|(chr2>>4))&63)+key.charAt(enc3)+key.charAt(enc4); +} +return encodeURIComponent(out); +} + +function stats(sid){ +var referer=encode64(document.referrer); +var thispage=encode64(window.location.pathname+location.search); +var date=new Date(); +var time=date.getTime(); +var resolution= screen.width + "x" + screen.height; +document.writeln("<img src=\"http://www.h-node.com/traffica/count.php?sid="+sid+"&p="+thispage+"&r="+referer+"&t="+time+"&res="+resolution+"\" alt=\"\" border=\"0\" />\n"); +} diff --git a/h-source/Public/index.html b/h-source/Public/index.html new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/h-source/Public/index.html @@ -0,0 +1 @@ + diff --git a/h-source/README.txt b/h-source/README.txt new file mode 100644 index 0000000..509d8db --- /dev/null +++ b/h-source/README.txt @@ -0,0 +1,107 @@ +== Introduction == + +h-source is a web software that can be used to build a community of people that want to share their hardware information. It is based on the EasyGiant PHP framework (www.easygiant.org) and can be considered an EasyGiant application + + +== Installation and configuration == + +In order to use h-source you have to install a web server that supports the URL rewrite feature (such as the Apache server with the mod_rewrite module installed), PHP 5.2 or newer and Mysql 5 or newer. + + +Extract the tarball inside a folder of your filesystem. + +You have to create the MySQL database used by h-source. The tables of the database that have to be created are written inside the file tables.sql. A way to carry out this operation is the following: + +Open a terminal and type: + + mysql -u <username> -p + +where <username> is the database user. Write the password and type the following command: + + create database <db>; + +where <db> is the database name you want to use. Close Mysql by typing the following command: + + exit + +Now you have to move inside the folder that contains the tables.sql file and type the following command: + + mysql -u username -ppassword <db> < tables.sql + +where username and password have to be changed with the real username and password. <db> is the name of the database just created. + +Now you have created the database named <db> + + +Open the Config/Config.php file + +You have to set the following constants: + + DB: name of the database (the database just created) + USER: database user + PWD: database password + HOST: name of the mysql server (usually localhost) + + DOMAIN_NAME: the domain name of the website (use localhost or create a virtual host in your web server) + +Now you have to copy the extracted h-source files inside the DocumentRoot of your server. You can choose to leave all the files inside the DocumentRoot or not, see the explanations in this page (http://www.easygiant.org/learn/index/6). + +You have now to assure that the allowOverride directive is active in the configuration file of your Apache server. You have to activate the allowOverride directive for the folder inside which you have saved the h-source files (and the index.php file). If you have not activated the allowOverride directive, then your URL won't be interpreted by the mod_rewrite module (you won't be able to use h-source). In a GNU/Linux system the apache configuration file is usually saved at /etc/apache2/apache2.conf. + +Direct your browser to the following URL: + + http://DOMAIN_NAME/ + +where DOMAIN_NAME is the domain name you have previously set (perhaps localhost). You should see the home page of the h-source software. + + + +== Account issues == + +If you want that the system can send e-mails you have to specify the name of the SMTP server that has to be used. Open the file Application/Include/params.php and set the following constants: + + $mailServer = ""; //set the mail server + + $generalMail = ""; //set the username of your mail account + + $mailPassword = ""; //set the password of your mail account + +You can also set these constants: + + $generalName = ""; //the string that you want to use inside the <title> tag of your website + + $projectName = ""; //the name of your project + + +== Change the homepage == + + +Modify the PHP files inside the folder Application/Views/Home + + +== Change the hardware == + + +Modify the PHP file Application/Include/hardware.php + + +== Change the allowed distributions == + + +Modify the PHP file Application/Include/distributions.php + + +== Change the allowed languages == + + +Modify the PHP file Application/Include/languages.php + + + +== Learn the EasyGiant PHP framework == + +Since h-source is an application of the EasyGiant PHP framework you can use the EasyGiant features in order to modify the h-source source code. Visit www.easygiant.org + + + + diff --git a/h-source/h-source-copyright.txt b/h-source/h-source-copyright.txt new file mode 100644 index 0000000..26a08e8 --- /dev/null +++ b/h-source/h-source-copyright.txt @@ -0,0 +1,16 @@ +The h-source software is a PHP software written thanks to the EasyGiant framework (see COPYRIGHT.txt) +Copyright (C) 2010 Antonio Gallo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + diff --git a/h-source/index.php b/h-source/index.php new file mode 100755 index 0000000..dc616db --- /dev/null +++ b/h-source/index.php @@ -0,0 +1,16 @@ +<?php + +// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +// See COPYRIGHT.txt and LICENSE.txt. + +define('EG','allowed'); + +define('DS', DIRECTORY_SEPARATOR); +define('ROOT', dirname(__FILE__)); +define('APPLICATION_PATH','Application'); //name of the folder that contains the application files + +// call the config file and the bootstrap file +require_once (ROOT . DS . 'Config' . DS . 'Config.php'); +require_once (ROOT . DS . 'Config' . DS . 'Route.php'); +require_once (ROOT . DS . 'Library' . DS . 'Bootstrap.php'); +// echo 'It works!';
\ No newline at end of file diff --git a/h-source/tables.sql b/h-source/tables.sql new file mode 100644 index 0000000..c68b26b --- /dev/null +++ b/h-source/tables.sql @@ -0,0 +1,220 @@ +# h-source, a web software to build a community of people that want to share their hardware information. +# Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +create table regusers ( + id_user INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(80) binary NOT NULL, + password CHAR(40) binary NOT NULL, + last_failure INT UNSIGNED NOT NULL, + has_confirmed INT UNSIGNED NOT NULL, + e_mail VARCHAR(60) binary NOT NULL, + confirmation_token CHAR(32) NOT NULL, + creation_date timestamp default CURRENT_TIMESTAMP, + creation_time INT UNSIGNED NOT NULL, + temp_field CHAR(32) NOT NULL, + deleted CHAR(4) NOT NULL default 'no', + forgot_token CHAR(32) NOT NULL, + forgot_time INT UNSIGNED NOT NULL, + unique(username), + index(username, password) +)engine=innodb; + +create table reggroups ( + id_group INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(30) binary NOT NULL, + unique(name) +)engine=innodb; + +create table regusers_groups ( + id_user int(11) UNSIGNED not null, + id_group int(11) UNSIGNED not null, + index group_indx(id_group), + index user_indx(id_user), + foreign key group_fky(id_group) references reggroups (id_group), + foreign key user_fky(id_user) references regusers (id_user), + unique (id_group,id_user) +)engine=innodb; + +CREATE TABLE regsessions ( + uid CHAR(32) NOT NULL, + token CHAR(32) NOT NULL, + id_user INT UNSIGNED NOT NULL, + creation_date INT UNSIGNED NOT NULL, + user_agent CHAR(32) NOT NULL, + INDEX(uid) +)engine=innodb; + + +create table regaccesses ( + id int(12) not null auto_increment primary key, + ip char(20) not null,data char(10) not null, + ora char(8) not null, + username varchar(30) not null +); + +create table hardware ( + id_hard INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + type varchar(50) not null, + subtype char(15) not null, + kernel varchar(50) not null, + vendor varchar(50) not null, + model varchar(100) not null, + created_by int not null, + updated_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + update_date datetime not null, + compatibility char(15) not null, + description text CHARACTER SET utf8 not null, + distribution varchar(300) CHARACTER SET utf8 not null, + video_card_type varchar(100) CHARACTER SET utf8 not null, + video_card_works varchar(30) CHARACTER SET utf8 not null, + wifi_type varchar(100) CHARACTER SET utf8 not null, + wifi_works varchar(30) CHARACTER SET utf8 not null, + comm_year char(15) not null, + ask_for_del char(4) not null default 'no', + deleted char(4) not null default 'no', + pci_id char(10) not null, + driver varchar(50) not null, + interface char(15) not null default 'not-specified' +)engine=innodb; + +create table revisions ( + id_rev INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + type varchar(50) not null, + subtype char(15) not null, + kernel varchar(50) not null, + vendor varchar(50) not null, + model varchar(100) not null, + created_by int not null, + updated_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + update_date datetime not null, + compatibility char(15) not null, + description text CHARACTER SET utf8 not null, + distribution varchar(300) CHARACTER SET utf8 not null, + video_card_type varchar(100) CHARACTER SET utf8 not null, + video_card_works varchar(30) CHARACTER SET utf8 not null, + wifi_type varchar(100) CHARACTER SET utf8 not null, + wifi_works varchar(30) CHARACTER SET utf8 not null, + comm_year char(15) not null, + pci_id char(10) not null, + driver varchar(50) not null, + interface char(15) not null default 'not-specified', + id_hard INT UNSIGNED NOT NULL +)engine=innodb; + +create table hardware_users ( + id_user int(11) UNSIGNED not null, + id_hard int(11) UNSIGNED not null, + index hard_indx(id_hard), + index user_indx(id_user), + foreign key hard_fky(id_hard) references hardware (id_hard), + foreign key user_fky(id_user) references regusers (id_user), + unique (id_user,id_hard) +)engine=innodb; + +create table talk ( + id_talk INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + title varchar(100) CHARACTER SET utf8 not null, + message text CHARACTER SET utf8 not null, + id_hard INT UNSIGNED NOT NULL, + deleted char(4) not null default 'no' +)engine=innodb; + +create table profile ( + id_prof INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + update_date datetime not null, + real_name varchar(100) CHARACTER SET utf8 not null, + where_you_are varchar(100) CHARACTER SET utf8 not null, + birth_date varchar(100) CHARACTER SET utf8 not null, + fav_distro varchar(100) CHARACTER SET utf8 not null, + projects text CHARACTER SET utf8 not null , + publish_mail char(4) not null default 'no', + description text CHARACTER SET utf8 not null, + website varchar(100) CHARACTER SET utf8 not null +)engine=innodb; + +create table issues ( + id_issue INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + update_date datetime not null, + topic char(35) CHARACTER SET utf8 not null, + title varchar(100) CHARACTER SET utf8 not null, + message text CHARACTER SET utf8 not null, + priority char(15) CHARACTER SET utf8 not null, + status char(15) CHARACTER SET utf8 not null, + notice text CHARACTER SET utf8 not null, + deleted char(4) not null default 'no' +)engine=innodb; + +create table deletion ( + id_del INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + object char(15) not null, + message text CHARACTER SET utf8 not null, + id_hard INT UNSIGNED NOT NULL, + id_duplicate INT UNSIGNED NOT NULL +)engine=innodb; + +create table params ( + id_par INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + updating char(4) not null default 'no' +)engine=innodb; + +insert into params (updating) values ('no'); + +create table news ( + id_news INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + creation_date timestamp default CURRENT_TIMESTAMP, + title varchar(150) not null, + message text CHARACTER SET utf8 not null +)engine=innodb; + + +create table boxes ( + id_box int not null auto_increment primary key, + creation_date timestamp default CURRENT_TIMESTAMP, + title varchar(150) not null, + message text CHARACTER SET utf8 not null +); + +create table messages ( + id_mes int not null auto_increment primary key, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + message text CHARACTER SET utf8 not null, + id_issue INT UNSIGNED NOT NULL, + deleted char(4) not null default 'no', + has_read char(4) not null default 'no' +); + +create table history ( + id_history int not null auto_increment primary key, + created_by int not null, + creation_date timestamp default CURRENT_TIMESTAMP, + type char(10) not null, + action char(10) not null, + id INT UNSIGNED NOT NULL, + message text CHARACTER SET utf8 not null +); + +insert into reggroups (name) values ('moderator'); |