aboutsummaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/.htaccess9
-rw-r--r--admin/Application/Controllers/AdminboxesController.php78
-rw-r--r--admin/Application/Controllers/AdmindeletionController.php66
-rw-r--r--admin/Application/Controllers/AdminhardwareController.php121
-rw-r--r--admin/Application/Controllers/AdminhistoryController.php68
-rw-r--r--admin/Application/Controllers/AdminissuesController.php88
-rw-r--r--admin/Application/Controllers/AdminmessagesController.php86
-rw-r--r--admin/Application/Controllers/AdminnewsController.php78
-rw-r--r--admin/Application/Controllers/AdminparamsController.php68
-rw-r--r--admin/Application/Controllers/AdminpasswordController.php88
-rw-r--r--admin/Application/Controllers/AdminregusersController.php101
-rw-r--r--admin/Application/Controllers/AdmintalkController.php59
-rw-r--r--admin/Application/Controllers/AdminusersController.php200
-rwxr-xr-xadmin/Application/Controllers/PanelController.php43
-rw-r--r--admin/Application/Hooks/AfterInitialization.php10
-rw-r--r--admin/Application/Hooks/BeforeChecks.php16
-rw-r--r--admin/Application/Hooks/BeforeInitialization.php10
-rw-r--r--admin/Application/Hooks/index.html1
-rw-r--r--admin/Application/Include/distributions.php88
-rw-r--r--admin/Application/Include/hardware.php216
-rw-r--r--admin/Application/Include/languages.php192
-rw-r--r--admin/Application/Include/myFunctions.php318
-rw-r--r--admin/Application/Include/params.php145
-rwxr-xr-xadmin/Application/Models/AdminusersModel.php37
-rw-r--r--admin/Application/Models/BaseModel.php68
-rw-r--r--admin/Application/Models/BoxesModel.php42
-rw-r--r--admin/Application/Models/DeletionModel.php53
-rw-r--r--admin/Application/Models/HardwareModel.php200
-rw-r--r--admin/Application/Models/HistoryModel.php55
-rw-r--r--admin/Application/Models/IssuesModel.php96
-rw-r--r--admin/Application/Models/MessagesModel.php58
-rw-r--r--admin/Application/Models/NewsModel.php44
-rw-r--r--admin/Application/Models/NotebooksModel.php71
-rw-r--r--admin/Application/Models/ParamsModel.php48
-rw-r--r--admin/Application/Models/PrintersModel.php70
-rw-r--r--admin/Application/Models/ProfileModel.php72
-rw-r--r--admin/Application/Models/RevisionsModel.php50
-rw-r--r--admin/Application/Models/ScannersModel.php70
-rw-r--r--admin/Application/Models/TalkModel.php54
-rwxr-xr-xadmin/Application/Models/UsersModel.php223
-rw-r--r--admin/Application/Models/VideocardsModel.php66
-rw-r--r--admin/Application/Models/WifiModel.php69
-rw-r--r--admin/Application/Modules/ModBase.php41
-rw-r--r--admin/Application/Modules/ModImage.php45
-rw-r--r--admin/Application/Modules/ModLink.php18
-rw-r--r--admin/Application/Modules/ModLinkimage.php18
-rw-r--r--admin/Application/Modules/ModRaw.php18
-rw-r--r--admin/Application/Modules/index.html1
-rw-r--r--admin/Application/Strings/Lang/It/DbCondStrings.php17
-rw-r--r--admin/Application/Strings/Lang/It/ModelStrings.php19
-rw-r--r--admin/Application/Strings/Lang/It/UploadStrings.php26
-rw-r--r--admin/Application/Strings/Lang/It/ValCondStrings.php69
-rw-r--r--admin/Application/Strings/Lang/It/index.html1
-rw-r--r--admin/Application/Strings/Lang/index.html1
-rw-r--r--admin/Application/Strings/index.html1
-rw-r--r--admin/Application/Views/Adminboxes/main.php25
-rw-r--r--admin/Application/Views/Admindeletion/main.php25
-rw-r--r--admin/Application/Views/Adminhardware/ask.php53
-rw-r--r--admin/Application/Views/Adminhardware/main.php25
-rw-r--r--admin/Application/Views/Adminhistory/main.php25
-rw-r--r--admin/Application/Views/Adminissues/main.php36
-rw-r--r--admin/Application/Views/Adminmessages/main.php35
-rw-r--r--admin/Application/Views/Adminnews/main.php35
-rwxr-xr-xadmin/Application/Views/Adminparams/form.php25
-rwxr-xr-xadmin/Application/Views/Adminpassword/form.php9
-rw-r--r--admin/Application/Views/Adminregusers/associate.php54
-rw-r--r--admin/Application/Views/Adminregusers/main.php25
-rw-r--r--admin/Application/Views/Admintalk/main.php25
-rw-r--r--admin/Application/Views/Adminusers/associate.php54
-rwxr-xr-xadmin/Application/Views/Adminusers/forceout.php29
-rwxr-xr-xadmin/Application/Views/Adminusers/login.php45
-rwxr-xr-xadmin/Application/Views/Adminusers/logout.php29
-rw-r--r--admin/Application/Views/Adminusers/main.php25
-rwxr-xr-xadmin/Application/Views/footer_back.php27
-rwxr-xr-xadmin/Application/Views/header_back.php94
-rwxr-xr-xadmin/Application/Views/panel.php55
-rw-r--r--admin/Application/index.html1
-rwxr-xr-xadmin/COPYRIGHT.txt24
-rw-r--r--admin/Config/Autoload.php23
-rwxr-xr-xadmin/Config/Config.php41
-rwxr-xr-xadmin/Config/Reporting.php41
-rwxr-xr-xadmin/Config/Restricted.php94
-rw-r--r--admin/Config/Route.php50
-rw-r--r--admin/External/Fonts/FreeFont/AUTHORS208
-rw-r--r--admin/External/Fonts/FreeFont/COPYING674
-rw-r--r--admin/External/Fonts/FreeFont/CREDITS528
-rw-r--r--admin/External/Fonts/FreeFont/ChangeLog4525
-rw-r--r--admin/External/Fonts/FreeFont/FreeMono.ttfbin0 -> 314348 bytes
-rw-r--r--admin/External/Fonts/FreeFont/INSTALL86
-rw-r--r--admin/External/Fonts/FreeFont/README108
-rw-r--r--admin/Library/Array/Validate/Base.php241
-rw-r--r--admin/Library/Array/Validate/Soft.php85
-rw-r--r--admin/Library/Array/Validate/Strong.php180
-rw-r--r--admin/Library/Array/Validate/index.html1
-rw-r--r--admin/Library/Array/index.html1
-rwxr-xr-xadmin/Library/ArrayExt.php63
-rwxr-xr-xadmin/Library/Bootstrap.php14
-rw-r--r--admin/Library/BoxParser.php69
-rwxr-xr-xadmin/Library/Call.php321
-rwxr-xr-xadmin/Library/Controller.php291
-rwxr-xr-xadmin/Library/Db/Mysql.php394
-rw-r--r--admin/Library/Db/Mysqli.php400
-rw-r--r--admin/Library/Db/index.html1
-rw-r--r--admin/Library/Email.php229
-rw-r--r--admin/Library/ErrorReporting.php45
-rwxr-xr-xadmin/Library/Factory/Db.php52
-rw-r--r--admin/Library/Factory/index.html1
-rw-r--r--admin/Library/Files/Log.php97
-rwxr-xr-xadmin/Library/Files/Upload.php451
-rw-r--r--admin/Library/Files/index.html1
-rwxr-xr-xadmin/Library/Form/Checkbox.php41
-rwxr-xr-xadmin/Library/Form/Entry.php45
-rwxr-xr-xadmin/Library/Form/Form.php116
-rwxr-xr-xadmin/Library/Form/Hidden.php23
-rw-r--r--admin/Library/Form/Html.php23
-rwxr-xr-xadmin/Library/Form/InputText.php30
-rw-r--r--admin/Library/Form/Password.php30
-rwxr-xr-xadmin/Library/Form/Radio.php30
-rwxr-xr-xadmin/Library/Form/Select.php30
-rwxr-xr-xadmin/Library/Form/Textarea.php30
-rw-r--r--admin/Library/Form/index.html1
-rwxr-xr-xadmin/Library/Functions.php279
-rw-r--r--admin/Library/HeaderObj.php28
-rwxr-xr-xadmin/Library/Helper/Array.php11
-rwxr-xr-xadmin/Library/Helper/Html.php14
-rwxr-xr-xadmin/Library/Helper/List.php278
-rwxr-xr-xadmin/Library/Helper/Menu.php75
-rwxr-xr-xadmin/Library/Helper/Pages.php108
-rwxr-xr-xadmin/Library/Helper/Popup.php87
-rw-r--r--admin/Library/Helper/index.html1
-rw-r--r--admin/Library/Hooks.php21
-rw-r--r--admin/Library/Html/Form.php168
-rw-r--r--admin/Library/Html/index.html1
-rw-r--r--admin/Library/Image/Gd/Captcha.php85
-rw-r--r--admin/Library/Image/Gd/Thumbnail.php151
-rw-r--r--admin/Library/Image/Gd/index.html1
-rw-r--r--admin/Library/Image/index.html1
-rw-r--r--admin/Library/Lang/Eng/DbCondStrings.php17
-rw-r--r--admin/Library/Lang/Eng/ModelStrings.php19
-rw-r--r--admin/Library/Lang/Eng/UploadStrings.php27
-rw-r--r--admin/Library/Lang/Eng/ValCondStrings.php76
-rw-r--r--admin/Library/Lang/Eng/index.html1
-rw-r--r--admin/Library/Lang/ResultStrings.php25
-rw-r--r--admin/Library/Lang/index.html1
-rw-r--r--admin/Library/ModAbstract.php25
-rwxr-xr-xadmin/Library/Model/Base.php1140
-rwxr-xr-xadmin/Library/Model/Map.php439
-rwxr-xr-xadmin/Library/Model/Tree.php287
-rw-r--r--admin/Library/Model/index.html1
-rw-r--r--admin/Library/Params.php37
-rwxr-xr-xadmin/Library/Popup.php15
-rw-r--r--admin/Library/Request.php39
-rwxr-xr-xadmin/Library/Scaffold.php272
-rw-r--r--admin/Library/Strings/Functions.php30
-rwxr-xr-xadmin/Library/Theme.php79
-rwxr-xr-xadmin/Library/Url.php36
-rwxr-xr-xadmin/Library/Users/CheckAdmin.php369
-rw-r--r--admin/Library/Users/index.html1
-rw-r--r--admin/Library/index.html1
-rwxr-xr-xadmin/License.txt201
-rw-r--r--admin/Logs/index.html1
-rw-r--r--admin/Public/Css/comune.css130
-rw-r--r--admin/Public/Css/explorer.css91
-rw-r--r--admin/Public/Css/files.css113
-rwxr-xr-xadmin/Public/Css/form.css31
-rw-r--r--admin/Public/Css/index.html1
-rw-r--r--admin/Public/Css/login.css21
-rwxr-xr-xadmin/Public/Css/mainmenu.css78
-rw-r--r--admin/Public/Css/pagelist.css29
-rw-r--r--admin/Public/Css/panel.css74
-rwxr-xr-xadmin/Public/Css/popupmenu.css49
-rwxr-xr-xadmin/Public/Css/scaffold.css105
-rwxr-xr-xadmin/Public/Css/website.css1414
-rw-r--r--admin/Public/Img/Icons/back.pngbin0 -> 1145 bytes
-rw-r--r--admin/Public/Img/Icons/delete.pngbin0 -> 2599 bytes
-rw-r--r--admin/Public/Img/Icons/file.pngbin0 -> 2963 bytes
-rw-r--r--admin/Public/Img/Icons/folder.pngbin0 -> 1545 bytes
-rw-r--r--admin/Public/Img/Icons/image.pngbin0 -> 1220 bytes
-rw-r--r--admin/Public/Img/Icons/index.html1
-rwxr-xr-xadmin/Public/Js/DisplayTag.js10
-rwxr-xr-xadmin/Public/Js/TinyMCE.js34
-rw-r--r--admin/Public/Js/functions.js122
-rw-r--r--admin/Public/Js/index.html1
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.pngbin0 -> 157 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.pngbin0 -> 257 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.pngbin0 -> 259 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.pngbin0 -> 259 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.pngbin0 -> 181 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.pngbin0 -> 181 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.pngbin0 -> 88 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.pngbin0 -> 91 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.pngbin0 -> 4369 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.pngbin0 -> 4369 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.pngbin0 -> 4369 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.pngbin0 -> 4369 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.pngbin0 -> 4369 bytes
-rwxr-xr-xadmin/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css315
-rwxr-xr-xadmin/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js87
-rw-r--r--admin/Public/Js/jquery/jquery-1.4.2.min.js154
-rw-r--r--admin/Public/Js/markitup/jquery.markitup.js559
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/bold.pngbin0 -> 304 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/clean.pngbin0 -> 667 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/code.pngbin0 -> 859 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/fonts.pngbin0 -> 567 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/h1.pngbin0 -> 276 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/h2.pngbin0 -> 304 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/h3.pngbin0 -> 306 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/italic.pngbin0 -> 223 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/link.pngbin0 -> 343 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/list-bullet.pngbin0 -> 344 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/list-item.pngbin0 -> 248 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/list-numeric.pngbin0 -> 357 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/paragraph.pngbin0 -> 361 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/picture.pngbin0 -> 606 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/preview.pngbin0 -> 537 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/quotes.pngbin0 -> 743 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/stroke.pngbin0 -> 269 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/images/underline.pngbin0 -> 273 bytes
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/readme.txt11
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/set.js32
-rw-r--r--admin/Public/Js/markitup/sets/bbcode/style.css72
-rw-r--r--admin/Public/Js/markitup/skins/simple/images/handle.pngbin0 -> 258 bytes
-rw-r--r--admin/Public/Js/markitup/skins/simple/images/menu.pngbin0 -> 27151 bytes
-rw-r--r--admin/Public/Js/markitup/skins/simple/images/submenu.pngbin0 -> 240 bytes
-rw-r--r--admin/Public/Js/markitup/skins/simple/style.css118
-rw-r--r--admin/Public/Js/stats.js35
-rw-r--r--admin/Public/index.html1
-rw-r--r--admin/README.txt62
-rw-r--r--admin/h-admin-copyright.txt16
-rwxr-xr-xadmin/index.php16
-rw-r--r--admin/tables.sql64
231 files changed, 22658 insertions, 0 deletions
diff --git a/admin/.htaccess b/admin/.htaccess
new file mode 100755
index 0000000..d27d849
--- /dev/null
+++ b/admin/.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/admin/Application/Controllers/AdminboxesController.php b/admin/Application/Controllers/AdminboxesController.php
new file mode 100644
index 0000000..65ba18c
--- /dev/null
+++ b/admin/Application/Controllers/AdminboxesController.php
@@ -0,0 +1,78 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminboxesController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('BoxesModel');
+
+ $this->modelName = 'BoxesModel';
+
+ $this->m['BoxesModel']->setFields('title,message','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main');
+
+ $this->scaffold->loadMain('boxes:id_box,boxes:title,smartDate|boxes:creation_date','boxes:id_box','edit,del');
+ $this->scaffold->setHead('NEWS ID,TITLE,DATE');
+ $this->scaffold->update('del');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+ public function form($queryType = 'insert')
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['BoxesModel']->updateTable('insert,update');
+
+ $this->loadScaffold('form');
+ $this->scaffold->loadForm($queryType,"adminboxes/form/$queryType");
+ $this->scaffold->getFormValues('sanitizeHtml');
+ $data['scaffold'] = $this->scaffold->render();
+
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdmindeletionController.php b/admin/Application/Controllers/AdmindeletionController.php
new file mode 100644
index 0000000..d5ee6fc
--- /dev/null
+++ b/admin/Application/Controllers/AdmindeletionController.php
@@ -0,0 +1,66 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdmindeletionController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('DeletionModel');
+
+ $this->modelName = 'DeletionModel';
+
+// $this->m['DeletionModel']->setFields('object,topic,status,priority,message,notice','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'object:sanitizeAll'=>'undef','token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ Params::$nullQueryValue = 'undef';
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive','mainMenu'=>'panel','recordPerPage'=>30));
+
+ $whereClauseArray = array(
+ 'object' => $this->viewArgs['object'],
+ );
+ $this->scaffold->setWhereQueryClause($whereClauseArray);
+
+ $this->scaffold->loadMain('deletion:id_del,deletion:object,deletion:id_duplicate,deletion:id_hard,getUserName|deletion:created_by,smartDate|deletion:creation_date','deletion:id_del','');
+ $this->scaffold->setHead('DEL ID,OBJECT,DUPLICATED,HARDWARE ID,CREATED BY,DATE');
+ $this->scaffold->update('del');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminhardwareController.php b/admin/Application/Controllers/AdminhardwareController.php
new file mode 100644
index 0000000..c02a4c2
--- /dev/null
+++ b/admin/Application/Controllers/AdminhardwareController.php
@@ -0,0 +1,121 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminhardwareController extends Controller
+{
+
+ function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('HardwareModel');
+ $this->model('DeletionModel');
+
+ $this->modelName = 'HardwareModel';
+
+ $this->m['HardwareModel']->setFields('deleted','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'type:sanitizeAll'=>'undef','ask_for_del:sanitizeAll'=>'undef','-deleted:sanitizeAll'=>'undef','token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ Params::$nullQueryValue = 'undef';
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive','mainMenu'=>'panel','recordPerPage'=>30));
+
+ $whereClauseArray = array(
+ 'type' => $this->viewArgs['type'],
+ 'ask_for_del' => $this->viewArgs['ask_for_del'],
+ '-deleted' => $this->viewArgs['-deleted'],
+ );
+ $this->scaffold->setWhereQueryClause($whereClauseArray);
+
+ $this->scaffold->loadMain('hardware:id_hard,hardware:model,hardware:type,getUserName|hardware:created_by,getUserName|hardware:updated_by,smartDate|hardware:creation_date,smartDate|hardware:update_date,hardware:ask_for_del,hardware:deleted','hardware:id_hard','edit');
+
+ $this->scaffold->addItem('simpleLink','adminhardware/ask/;hardware:id_hard;',null,'who asked for deletion');
+ $this->scaffold->setHead('HARD ID,MODEL,TYPE,CREATED BY,UPDATED BY,CREATION DATE,UPDATE DATE,ASK FOR DEL?,DELETED?,EDIT,VIEW');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+ public function ask($id_hard = 0)
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $clean['id_hard'] = (int)$id_hard;
+
+ $this->helper('Menu','adminhardware','panel');
+ $this->h['Menu']->links['back']['text'] = 'Back';
+ $this->h['Menu']->links['back']['url'] = 'main';
+
+ $data["table"] = $this->m['DeletionModel']->select()->where(array("id_hard"=>$clean['id_hard']))->orderBy("id_del desc")->send();
+
+ $data['menu'] = $this->h['Menu']->render('panel,back');
+
+ $this->append($data);
+ $this->load('ask');
+
+ }
+
+ public function form($queryType = 'update')
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ if (isset($_POST['updateAction']))
+ {
+ $clean['id_hard'] = $this->request->post('id_hard',0,'forceInt');
+ $clean['deleted'] = $this->request->post('deleted',0,'sanitizeAll');
+
+ $this->m['HardwareModel']->db->update('hardware','deleted',array($clean['deleted']),'id_hard='.$clean['id_hard']);
+
+ }
+
+ $this->loadScaffold('form');
+ $this->scaffold->loadForm($queryType,"adminhardware/form/$queryType");
+ $this->scaffold->getFormValues('sanitizeHtml');
+ $data['scaffold'] = $this->scaffold->render();
+
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminhistoryController.php b/admin/Application/Controllers/AdminhistoryController.php
new file mode 100644
index 0000000..849e432
--- /dev/null
+++ b/admin/Application/Controllers/AdminhistoryController.php
@@ -0,0 +1,68 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminhistoryController extends Controller
+{
+
+ function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('HistoryModel');
+
+ $this->modelName = 'HistoryModel';
+
+ $this->setArgKeys(array('page:forceNat'=>1,'type:sanitizeAll'=>'undef','action:sanitizeAll'=>'undef','created_by:sanitizeAll'=>'undef','token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ Params::$nullQueryValue = 'undef';
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive','mainMenu'=>'panel','recordPerPage'=>30));
+
+ $whereClauseArray = array(
+ 'type' => $this->viewArgs['type'],
+ 'action' => $this->viewArgs['action'],
+ 'created_by'=> $this->viewArgs['created_by'],
+ 'gr' => '!="registered"',
+ );
+ $this->scaffold->setWhereQueryClause($whereClauseArray);
+ $this->scaffold->model->orderBy('id_history desc');
+ $this->scaffold->loadMain('history:id_history,history:type,history:action,getUserName|history:created_by,history:id,smartDate|history:creation_date,history:gr,history:message','history:id_history','');
+ $this->scaffold->setHead('HISTORY ID,TYPE,ACTION,CREATED BY,OBJECT ID,CREATION DATE,GROUP,MESSAGE');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminissuesController.php b/admin/Application/Controllers/AdminissuesController.php
new file mode 100644
index 0000000..476b69c
--- /dev/null
+++ b/admin/Application/Controllers/AdminissuesController.php
@@ -0,0 +1,88 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminissuesController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('IssuesModel');
+
+ $this->modelName = 'IssuesModel';
+
+ $this->m['IssuesModel']->setFields('deleted,status','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'priority:sanitizeAll'=>'undef','status:sanitizeAll'=>'undef','topic:sanitizeAll'=>'undef','deleted:sanitizeAll'=>'undef','token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ Params::$nullQueryValue = 'undef';
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive'));
+
+ $whereClauseArray = array(
+ 'priority' => $this->viewArgs['priority'],
+ 'status' => $this->viewArgs['status'],
+ 'topic' => $this->viewArgs['topic'],
+ 'deleted' => $this->viewArgs['deleted'],
+ );
+ $this->scaffold->setWhereQueryClause($whereClauseArray);
+
+ $this->scaffold->loadMain('issues:id_issue,issues:title,issues:topic,getUserName|issues:created_by,issues:priority,issues:status,smartDate|issues:creation_date,issues:deleted','issues:id_issue','edit,del');
+ $this->scaffold->setHead('ISSUE ID,TITLE,TOPIC,CREATED BY,PRIORITY,STATUS,DATE');
+ $this->scaffold->update('del');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+ public function form($queryType = 'insert')
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['IssuesModel']->updateTable('insert,update');
+
+ $this->loadScaffold('form');
+ $this->scaffold->loadForm($queryType,"adminissues/form/$queryType");
+ $this->scaffold->getFormValues('sanitizeHtml');
+ $data['scaffold'] = $this->scaffold->render();
+
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminmessagesController.php b/admin/Application/Controllers/AdminmessagesController.php
new file mode 100644
index 0000000..5a979c4
--- /dev/null
+++ b/admin/Application/Controllers/AdminmessagesController.php
@@ -0,0 +1,86 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminmessagesController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('MessagesModel');
+
+ $this->modelName = 'MessagesModel';
+
+ $this->m['MessagesModel']->setFields('deleted,has_read','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'deleted:sanitizeAll'=>'undef','has_read:sanitizeAll'=>'undef','token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ Params::$nullQueryValue = 'undef';
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive','recordPerPage'=>20));
+
+ $whereClauseArray = array(
+ 'deleted' => $this->viewArgs['deleted'],
+ 'has_read' => $this->viewArgs['has_read'],
+ );
+ $this->scaffold->setWhereQueryClause($whereClauseArray);
+ $this->scaffold->model->orderBy = "id_mes desc";
+
+ $this->scaffold->loadMain('messages:id_mes,messages:id_issue,getUserName|messages:created_by,smartDate|messages:creation_date,messages:deleted,messages:has_read','messages:id_mes','edit');
+ $this->scaffold->setHead('MESSAGE ID,ISSUE ID,CREATED BY,DATE,DELETED?,ALREADY READ?');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+ public function form($queryType = 'insert')
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['MessagesModel']->updateTable('insert,update');
+
+ $this->loadScaffold('form');
+ $this->scaffold->loadForm($queryType,"adminmessages/form/$queryType");
+ $this->scaffold->getFormValues('sanitizeHtml');
+ $data['scaffold'] = $this->scaffold->render();
+
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminnewsController.php b/admin/Application/Controllers/AdminnewsController.php
new file mode 100644
index 0000000..d722ffe
--- /dev/null
+++ b/admin/Application/Controllers/AdminnewsController.php
@@ -0,0 +1,78 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminnewsController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('NewsModel');
+
+ $this->modelName = 'NewsModel';
+
+ $this->m['NewsModel']->setFields('title,message','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main');
+
+ $this->scaffold->loadMain('news:id_news,news:title,smartDate|news:creation_date','news:id_news','edit,del');
+ $this->scaffold->setHead('NEWS ID,TITLE,DATE');
+ $this->scaffold->update('del');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+ public function form($queryType = 'insert')
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['NewsModel']->updateTable('insert,update');
+
+ $this->loadScaffold('form');
+ $this->scaffold->loadForm($queryType,"adminnews/form/$queryType");
+ $this->scaffold->getFormValues('sanitizeHtml');
+ $data['scaffold'] = $this->scaffold->render();
+
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminparamsController.php b/admin/Application/Controllers/AdminparamsController.php
new file mode 100644
index 0000000..62e58b6
--- /dev/null
+++ b/admin/Application/Controllers/AdminparamsController.php
@@ -0,0 +1,68 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminparamsController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('ParamsModel');
+
+ $this->modelName = 'ParamsModel';
+
+ $this->m['ParamsModel']->setFields('updating,boxes_xml','sanitizeAll');
+
+ $this->setArgKeys(array('token:sanitizeAll'=>'token'));
+ }
+
+ public function form()
+ {
+ $this->shift();
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['ParamsModel']->updateTable('update',1);
+ if ($this->m['ParamsModel']->queryResult)
+ {
+ if (strcmp($this->m['ParamsModel']->values['updating'],'yes') === 0)
+ {
+ $this->m['ParamsModel']->query("delete from regsessions;");
+ }
+ }
+// echo $this->m['ParamsModel']->getQuery();
+
+ $this->loadScaffold('form',array('formMenu'=>'panel'));
+ $this->scaffold->loadForm('update',"adminparams/form");
+ $this->scaffold->getFormValues('sanitizeHtml',1);
+ $data['scaffold'] = $this->scaffold->render();
+
+ $this->append($data);
+ $this->load('form');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminpasswordController.php b/admin/Application/Controllers/AdminpasswordController.php
new file mode 100644
index 0000000..bcaca95
--- /dev/null
+++ b/admin/Application/Controllers/AdminpasswordController.php
@@ -0,0 +1,88 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminpasswordController extends Controller
+{
+
+ function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->helper('Menu','users','panel/main');
+ $this->helper('Array');
+
+ $this->session('admin');
+ $this->model('AdminusersModel');
+
+ $this->m['AdminusersModel']->setFields('password:sha1','none');
+
+ $this->m['AdminusersModel']->strongConditions['update'] = array('checkEqual'=>'password,confirmation');
+ $this->m['AdminusersModel']->strongConditions['insert'] = array('checkEqual'=>'password,confirmation');
+
+ $this->m['AdminusersModel']->identifierName = 'id_user';
+
+ $this->setArgKeys(array('token:sanitizeAll'=>'token'));
+ }
+
+ public function form()
+ {
+ $this->shift(0);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $data['notice'] = null;
+
+ $id = (int)$this->s['admin']->status['id_user'];
+ if (isset($_POST['updateAction'])) {
+ $pass = $this->s['admin']->getPassword();
+ if (sha1($_POST['old']) === $pass)
+ {
+ $this->m['AdminusersModel']->updateTable('update',$id);
+ $data['notice'] = $this->m['AdminusersModel']->notice;
+ }
+ else
+ {
+ $data['notice'] = "<div class='alert'>Vecchia password sbagliata</div>\n";
+ }
+ }
+ $data['menù'] = $this->h['Menu']->render('panel');
+
+ $values = $this->m['AdminusersModel']->selectId($id);
+
+ $action = array('updateAction'=>'save');
+ $form = new Form_Form('adminpassword/form'.$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('form');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminregusersController.php b/admin/Application/Controllers/AdminregusersController.php
new file mode 100644
index 0000000..b4ed6ed
--- /dev/null
+++ b/admin/Application/Controllers/AdminregusersController.php
@@ -0,0 +1,101 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminregusersController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('UsersModel');
+
+ $this->modelName = 'UsersModel';
+
+ $this->helper('Menu','adminregusers','panel/main');
+
+// $this->m['UsersModel']->setFields('username,e_mail,has_confirmed,deleted,creation_date','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'has_confirmed:sanitizeAll'=>'undef','deleted:sanitizeAll'=>'undef','id_group:sanitizeAll'=>'undef','token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ Params::$nullQueryValue = 'undef';
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>true,'popupType'=>'inclusive','mainMenu'=>'panel','recordPerPage'=>30));
+
+ $whereClauseArray = array(
+ 'has_confirmed' => $this->viewArgs['has_confirmed'],
+ 'deleted' => $this->viewArgs['deleted'],
+ 'id_group' => $this->viewArgs['id_group'],
+ );
+ $this->scaffold->setWhereQueryClause($whereClauseArray);
+
+ $this->scaffold->loadMain('regusers:id_user,regusers:username,regusers:e_mail,regusers:has_confirmed,regusers:deleted,smartDate|regusers:creation_date','regusers:id_user','link');
+ $this->scaffold->setHead('USER ID,USERNAME,E-MAIL,HAS CONFIRMED?,DELETED?,DATE');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+ public function associate()
+ {
+ $this->shift(0);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['UsersModel']->printAssError = 'yes';
+ $this->m['UsersModel']->updateTable('associate,dissociate');
+
+ $data['notice'] = $this->m['UsersModel']->notice;
+
+ $data['menu'] = $this->h['Menu']->render('back');
+
+ $data['action'] = $this->baseUrl.'/adminregusers/associate'.$this->viewStatus;
+
+ $data['groups'] = $this->m['UsersModel']->getFieldArray('reggroups:id_group','reggroups:name');
+
+ //get the name of the user whose id is $_POST['id_user']
+ $users = $this->m['UsersModel']->db->select('regusers','username','id_user='.(int)$_POST['id_user']);
+ $data['user'] = $users[0]['regusers']['username'];
+
+ //get the groups inside which the user is inserted
+ $this->m['UsersModel']->setWhereQueryClause(array('id_user'=>(int)$_POST['id_user']));
+ $this->m['UsersModel']->orderBy = 'reggroups.id_group desc';
+ $data['groupsUser'] = $this->m['UsersModel']->getAll('Boxes');
+// echo $this->m['UsersModel']->getQuery();
+
+ $this->set($data);
+ $this->load('associate');
+ }
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdmintalkController.php b/admin/Application/Controllers/AdmintalkController.php
new file mode 100644
index 0000000..b91912a
--- /dev/null
+++ b/admin/Application/Controllers/AdmintalkController.php
@@ -0,0 +1,59 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdmintalkController extends Controller {
+
+ function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->session('admin');
+ $this->model('TalkModel');
+
+ $this->modelName = 'TalkModel';
+
+ $this->m['TalkModel']->setFields('title,message','sanitizeAll');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'token:sanitizeAll'=>'token'));
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('mainMenu'=>'panel'));
+
+ $this->scaffold->loadMain('talk:id_talk,talk:id_hard,talk:title,getUserName|talk:created_by,smartDate|talk:creation_date','talk:id_talk','del');
+ $this->scaffold->setHead('TALK ID,HARDWARE ID,TITLE,CREATED BY,DATE');
+ $this->scaffold->update('del');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->append($data);
+ $this->load('main');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/AdminusersController.php b/admin/Application/Controllers/AdminusersController.php
new file mode 100644
index 0000000..0154c0c
--- /dev/null
+++ b/admin/Application/Controllers/AdminusersController.php
@@ -0,0 +1,200 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminusersController extends Controller
+{
+
+ function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->load('header_back');
+ $this->load('footer_back','last');
+
+ $this->helper('Menu','adminusers','panel/main');
+ $this->helper('Array');
+
+ $this->session('admin');
+ $this->model();
+
+ $this->m['AdminusersModel']->setFields('username:sanitizeAll,password:sha1','none');
+
+ $this->m['AdminusersModel']->strongConditions['update'] = array('checkAlphaNum'=>'username','checkEqual'=>'password,confirmation');
+ $this->m['AdminusersModel']->strongConditions['insert'] = array('checkAlphaNum'=>'username','checkEqual'=>'password,confirmation');
+
+ $this->m['AdminusersModel']->databaseConditions['insert'] = array('checkUnique'=>'username');
+ $this->m['AdminusersModel']->databaseConditions['update'] = array('checkUniqueCompl'=>'username');
+
+ $this->setArgKeys(array('page:forceNat'=>1,'id_group:forceInt'=>'0','token:sanitizeAll'=>'token'));
+ Params::$nullQueryValue = '0';
+ }
+
+ public function login()
+ {
+ $data['action'] = Url::getRoot('adminusers/login');
+ $data['notice'] = null;
+
+ $this->s['admin']->checkStatus();
+ if ($this->s['admin']->status['status']=='logged')
+ {
+ $this->s['admin']->redirect('logged');
+ }
+ if (isset($_POST['username']) and isset($_POST['password']))
+ {
+ $username = ctype_alnum($_POST['username']) ? sanitizeAll($_POST['username']) : '';
+ $choice = $this->s['admin']->login($username,$_POST['password']);
+
+ switch($choice)
+ {
+ case 'logged':
+ $this->redirect('panel/main',3,'You are already logged...');
+ break;
+ case 'accepted':
+ $this->redirect('panel/main',3,'Hi '.$this->s['admin']->status['user'].'...');
+ 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->set($data);
+ $this->load('login');
+ }
+
+ public function logout()
+ {
+ $res = $this->s['admin']->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') {
+ $data['notice'] = "<div class='executed'>Logout executed successfully!</div>\n";
+
+ } else if ($res == 'error') {
+
+ }
+
+ $data['login'] = Url::getRoot('adminusers/login');
+ $this->set($data);
+ $this->load('logout');
+ }
+
+ public function forceout($id)
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+ $data['menù'] = $this->h['Menu']->render('back');
+ $data['notice'] = null;
+ $id = (int)$id;
+ if (strcmp($this->s['admin']->status['id_user'],$id) !== 0)
+ {
+ if ($this->s['admin']->forceOut($id))
+ {
+ $data['notice'] = "<div class='executed'>User has been forced out..</div>\n";
+ }
+ else
+ {
+ $data['notice'] = "<div class='alert'>Error..</div>\n";
+ }
+ }
+
+ $this->set($data);
+ $this->load('forceout');
+ }
+
+ public function main()
+ {
+ $this->shift();
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->loadScaffold('main',array('popup'=>false));
+ $this->scaffold->setWhereQueryClause(array('id_group'=>$this->viewArgs['id_group']));
+ $this->scaffold->loadMain('adminusers:id_user,adminusers:username','adminusers:id_user','edit,del');
+ $this->scaffold->addItem('simpleLink','adminusers/forceout/;adminusers:id_user;',null,'ForceOut');
+ $this->scaffold->update('del');
+ $data['scaffold'] = $this->scaffold->render();
+ $this->set($data);
+ $this->load('main');
+ }
+
+ public function form($queryType = 'insert')
+ {
+ $this->shift(1);
+
+ $this->s['admin']->check();
+
+ if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+
+ $this->m['AdminusersModel']->updateTable('insert,update');
+
+ $this->loadScaffold('form');
+ $this->scaffold->loadForm($queryType,"adminusers/form/$queryType");
+ $this->scaffold->getFormValues('sanitizeHtml');
+ $this->scaffold->setFormEntries('model',array('password'=>'Password'));
+ $this->scaffold->form->setEntry('confirmation','Password');
+ $data['scaffold'] = $this->scaffold->render(null,'username,password,confirmation,id_user');
+
+ $this->set($data);
+ $this->load('main');
+ }
+
+// public function associate()
+// {
+// $this->shift(0);
+//
+// $this->s['admin']->check();
+//
+// if (!$this->s['admin']->checkCsrf($this->viewArgs['token'])) $this->redirect('panel/main/',2,'wrong token..');
+//
+// $this->m['AdminusersModel']->printAssError = 'yes';
+// $this->m['AdminusersModel']->updateTable('associate,dissociate');
+//
+// $data['notice'] = $this->m['AdminusersModel']->notice;
+//
+// $data['menu'] = $this->h['Menu']->render('back');
+//
+// $data['action'] = $this->baseUrl.'/adminusers/associate'.$this->viewStatus;
+//
+// $data['groups'] = $this->m['AdminusersModel']->getFieldArray('admingroups:id_group','admingroups:name');
+//
+// //get the name of the user whose id is $_POST['id_user']
+// $users = $this->m['AdminusersModel']->db->select('adminusers','username','id_user='.(int)$_POST['id_user']);
+// $data['user'] = $users[0]['adminusers']['username'];
+//
+// //get the groups inside which the user is inserted
+// $this->m['AdminusersModel']->setWhereQueryClause(array('id_user'=>(int)$_POST['id_user']));
+// $this->m['AdminusersModel']->orderBy = 'admingroups.id_group desc';
+// $data['groupsUser'] = $this->m['AdminusersModel']->getAll('Boxes');
+// // echo $this->m['AdminusersModel']->getQuery();
+//
+// $this->set($data);
+// $this->load('associate');
+// }
+
+} \ No newline at end of file
diff --git a/admin/Application/Controllers/PanelController.php b/admin/Application/Controllers/PanelController.php
new file mode 100755
index 0000000..27eeacf
--- /dev/null
+++ b/admin/Application/Controllers/PanelController.php
@@ -0,0 +1,43 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class PanelController extends Controller {
+
+ public function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+ $this->session('admin');
+ $this->load('header_back');
+ $this->load('footer_back','last');
+ }
+
+ public function main()
+ {
+ $this->s['admin']->check();
+ $data['logged'] = $this->s['admin']->getUsersLogged();
+
+ $data['token'] = $this->s['admin']->status['token'];
+
+ $this->set($data);
+ $this->load('panel');
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Hooks/AfterInitialization.php b/admin/Application/Hooks/AfterInitialization.php
new file mode 100644
index 0000000..a369309
--- /dev/null
+++ b/admin/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/admin/Application/Hooks/BeforeChecks.php b/admin/Application/Hooks/BeforeChecks.php
new file mode 100644
index 0000000..03ee247
--- /dev/null
+++ b/admin/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/admin/Application/Hooks/BeforeInitialization.php b/admin/Application/Hooks/BeforeInitialization.php
new file mode 100644
index 0000000..6d1851b
--- /dev/null
+++ b/admin/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/admin/Application/Hooks/index.html b/admin/Application/Hooks/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Application/Hooks/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Application/Include/distributions.php b/admin/Application/Include/distributions.php
new file mode 100644
index 0000000..294eac6
--- /dev/null
+++ b/admin/Application/Include/distributions.php
@@ -0,0 +1,88 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Include/hardware.php b/admin/Application/Include/hardware.php
new file mode 100644
index 0000000..62dfa37
--- /dev/null
+++ b/admin/Application/Include/hardware.php
@@ -0,0 +1,216 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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",
+ "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",
+ "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/admin/Application/Include/languages.php b/admin/Application/Include/languages.php
new file mode 100644
index 0000000..6262c3e
--- /dev/null
+++ b/admin/Application/Include/languages.php
@@ -0,0 +1,192 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Lang
+{
+ public static $allowed = array('en','es','it');
+ public static $current = 'en';
+
+ public static $complete = array(
+ 'en' => 'gb.png,English',
+ 'es' => 'es.png,Spanish',
+ 'it' => 'it.png,Italian',
+ );
+
+ 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/admin/Application/Include/myFunctions.php b/admin/Application/Include/myFunctions.php
new file mode 100644
index 0000000..355c181
--- /dev/null
+++ b/admin/Application/Include/myFunctions.php
@@ -0,0 +1,318 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+function encodeUrl($url)
+{
+ $url = str_replace(' ','-',$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='/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\+\&amp;]+)+)?(#[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\+\&amp;]+)+)?(#[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 = "/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 = "/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 = "/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='/".$controller."/view/".Lang::$current."/".$clean['id_hard']."/".$name."'>".$clean['id_hard']."</a></b>";
+ }
+ else
+ {
+ return "<b>".$row['deletion']['object']."</b>";
+ }
+}
diff --git a/admin/Application/Include/params.php b/admin/Application/Include/params.php
new file mode 100644
index 0000000..43181bf
--- /dev/null
+++ b/admin/Application/Include/params.php
@@ -0,0 +1,145 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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-admin";
+
+ static public $projectName = "h-admin";
+
+ 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 to $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/admin/Application/Models/AdminusersModel.php b/admin/Application/Models/AdminusersModel.php
new file mode 100755
index 0000000..498a1a7
--- /dev/null
+++ b/admin/Application/Models/AdminusersModel.php
@@ -0,0 +1,37 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class AdminusersModel extends Model_Map {
+
+ public function __construct() {
+ $this->_tables='adminusers,admingroups,adminusers_groups';
+ $this->_idFields='id_user,id_group';
+ $this->_where=array('id_group'=>'admingroups','id_user'=>'adminusers','name'=>'admingroups');
+ $this->_popupItemNames = array('id_group'=>'name');
+ $this->orderBy = 'adminusers.id_user desc';
+
+// $this->on = "adminusers.id_user=adminusers_groups.id_user and admingroups.id_group=adminusers_groups.id_group";
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/BaseModel.php b/admin/Application/Models/BaseModel.php
new file mode 100644
index 0000000..374be72
--- /dev/null
+++ b/admin/Application/Models/BaseModel.php
@@ -0,0 +1,68 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/BoxesModel.php b/admin/Application/Models/BoxesModel.php
new file mode 100644
index 0000000..1f1a51a
--- /dev/null
+++ b/admin/Application/Models/BoxesModel.php
@@ -0,0 +1,42 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/DeletionModel.php b/admin/Application/Models/DeletionModel.php
new file mode 100644
index 0000000..0e67904
--- /dev/null
+++ b/admin/Application/Models/DeletionModel.php
@@ -0,0 +1,53 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/HardwareModel.php b/admin/Application/Models/HardwareModel.php
new file mode 100644
index 0000000..48cab7e
--- /dev/null
+++ b/admin/Application/Models/HardwareModel.php
@@ -0,0 +1,200 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/HistoryModel.php b/admin/Application/Models/HistoryModel.php
new file mode 100644
index 0000000..5f35d6b
--- /dev/null
+++ b/admin/Application/Models/HistoryModel.php
@@ -0,0 +1,55 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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',
+ );
+
+ $this->_popupWhere = array(
+ 'created_by' => 'gr != "registered"',
+ );
+
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/IssuesModel.php b/admin/Application/Models/IssuesModel.php
new file mode 100644
index 0000000..3ad3a5c
--- /dev/null
+++ b/admin/Application/Models/IssuesModel.php
@@ -0,0 +1,96 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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',
+ );
+
+ 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/admin/Application/Models/MessagesModel.php b/admin/Application/Models/MessagesModel.php
new file mode 100644
index 0000000..2022b4a
--- /dev/null
+++ b/admin/Application/Models/MessagesModel.php
@@ -0,0 +1,58 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/NewsModel.php b/admin/Application/Models/NewsModel.php
new file mode 100644
index 0000000..2f47800
--- /dev/null
+++ b/admin/Application/Models/NewsModel.php
@@ -0,0 +1,44 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/NotebooksModel.php b/admin/Application/Models/NotebooksModel.php
new file mode 100644
index 0000000..fda2c42
--- /dev/null
+++ b/admin/Application/Models/NotebooksModel.php
@@ -0,0 +1,71 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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 $diffFields = array(
+ 'vendor' => 'vendor',
+ 'model' => 'model name',
+ 'subtype' => 'subtype (notebook or netbook) ?',
+ 'comm_year' => 'year of commercialization',
+ 'distribution' => 'distribution used',
+ 'compatibility' => 'compatibility level',
+ 'kernel' => 'kernel libre version',
+ 'video_card_type' => 'video card model',
+ 'video_card_works' => 'does the video card work?',
+ 'wifi_type' => 'wifi model',
+ 'wifi_works' => 'does the wifi card works?',
+ 'description' => 'model description',
+ );
+
+ public $fieldsWithBreaks = array('model description');
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'comm_year',
+ 'subtype' => 'subtype',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'year',
+ 'subtype' => '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"',
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/ParamsModel.php b/admin/Application/Models/ParamsModel.php
new file mode 100644
index 0000000..f30bca1
--- /dev/null
+++ b/admin/Application/Models/ParamsModel.php
@@ -0,0 +1,48 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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',
+ ),
+ 'boxes_xml' => array(
+ 'type'=>'Textarea',
+ 'labelString'=> 'Configuration xml',
+ ),
+ 'id_par' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/PrintersModel.php b/admin/Application/Models/PrintersModel.php
new file mode 100644
index 0000000..104e214
--- /dev/null
+++ b/admin/Application/Models/PrintersModel.php
@@ -0,0 +1,70 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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 $diffFields = array(
+ 'vendor' => 'vendor',
+ 'model' => 'model name',
+ 'pci_id' => 'VendorID:ProductID',
+ 'comm_year' => 'year of commercialization',
+ 'interface' => 'interface',
+ 'distribution' => 'distribution used',
+ 'compatibility' => 'compatibility',
+ 'kernel' => 'kernel libre version',
+ 'driver' => 'driver used',
+ 'description' => 'model description',
+ );
+
+ public $fieldsWithBreaks = array('model description');
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'comm_year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'year',
+ 'interface' => '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"',
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/ProfileModel.php b/admin/Application/Models/ProfileModel.php
new file mode 100644
index 0000000..626e652
--- /dev/null
+++ b/admin/Application/Models/ProfileModel.php
@@ -0,0 +1,72 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/RevisionsModel.php b/admin/Application/Models/RevisionsModel.php
new file mode 100644
index 0000000..bbfa939
--- /dev/null
+++ b/admin/Application/Models/RevisionsModel.php
@@ -0,0 +1,50 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/ScannersModel.php b/admin/Application/Models/ScannersModel.php
new file mode 100644
index 0000000..978a26b
--- /dev/null
+++ b/admin/Application/Models/ScannersModel.php
@@ -0,0 +1,70 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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 $diffFields = array(
+ 'vendor' => 'vendor',
+ 'model' => 'model name',
+ 'pci_id' => 'VendorID:ProductID',
+ 'comm_year' => 'year of commercialization',
+ 'interface' => 'interface',
+ 'distribution' => 'distribution used',
+ 'compatibility' => 'compatibility',
+ 'kernel' => 'kernel libre version',
+ 'driver' => 'driver used',
+ 'description' => 'model description',
+ );
+
+ public $fieldsWithBreaks = array('model description');
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'comm_year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'year',
+ 'interface' => '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"',
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/TalkModel.php b/admin/Application/Models/TalkModel.php
new file mode 100644
index 0000000..cdf2fc6
--- /dev/null
+++ b/admin/Application/Models/TalkModel.php
@@ -0,0 +1,54 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/UsersModel.php b/admin/Application/Models/UsersModel.php
new file mode 100755
index 0000000..3f55cfe
--- /dev/null
+++ b/admin/Application/Models/UsersModel.php
@@ -0,0 +1,223 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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/admin/Application/Models/VideocardsModel.php b/admin/Application/Models/VideocardsModel.php
new file mode 100644
index 0000000..3b96091
--- /dev/null
+++ b/admin/Application/Models/VideocardsModel.php
@@ -0,0 +1,66 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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 $diffFields = array(
+ 'vendor' => 'vendor',
+ 'model' => 'model name',
+ 'pci_id' => 'VendorID:ProductID',
+ 'comm_year' => 'year of commercialization',
+ 'interface' => 'interface',
+ 'distribution' => 'distribution used',
+ 'kernel' => 'kernel libre version',
+ 'video_card_works' => 'how does it work with free software?',
+ 'description' => 'model description',
+ );
+
+ public $fieldsWithBreaks = array('model description');
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'comm_year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="videocard" and deleted="no"',
+ 'comm_year' => 'type="videocard" and deleted="no"',
+ 'interface' => 'type="videocard" and deleted="no"',
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Models/WifiModel.php b/admin/Application/Models/WifiModel.php
new file mode 100644
index 0000000..d8c84aa
--- /dev/null
+++ b/admin/Application/Models/WifiModel.php
@@ -0,0 +1,69 @@
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. 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 $diffFields = array(
+ 'vendor' => 'vendor',
+ 'model' => 'model name',
+ 'pci_id' => 'VendorID:ProductID',
+ 'comm_year' => 'year of commercialization',
+ 'interface' => 'interface',
+ 'distribution' => 'distribution used',
+ 'kernel' => 'kernel libre version',
+ 'wifi_works' => 'does it work with free software?',
+ 'description' => 'model description',
+ );
+
+ public $fieldsWithBreaks = array('model description');
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'comm_year',
+ 'wifi_works' => 'wifi_works',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'year',
+ 'wifi_works' => 'does it work?',
+ 'interface' => '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"',
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/admin/Application/Modules/ModBase.php b/admin/Application/Modules/ModBase.php
new file mode 100644
index 0000000..44d25a2
--- /dev/null
+++ b/admin/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/admin/Application/Modules/ModImage.php b/admin/Application/Modules/ModImage.php
new file mode 100644
index 0000000..5a116b1
--- /dev/null
+++ b/admin/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/admin/Application/Modules/ModLink.php b/admin/Application/Modules/ModLink.php
new file mode 100644
index 0000000..011bc78
--- /dev/null
+++ b/admin/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/admin/Application/Modules/ModLinkimage.php b/admin/Application/Modules/ModLinkimage.php
new file mode 100644
index 0000000..8e49bbf
--- /dev/null
+++ b/admin/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/admin/Application/Modules/ModRaw.php b/admin/Application/Modules/ModRaw.php
new file mode 100644
index 0000000..4ed3226
--- /dev/null
+++ b/admin/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/admin/Application/Modules/index.html b/admin/Application/Modules/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Application/Modules/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Application/Strings/Lang/It/DbCondStrings.php b/admin/Application/Strings/Lang/It/DbCondStrings.php
new file mode 100644
index 0000000..4c985cd
--- /dev/null
+++ b/admin/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> &egrave gi&agrave presente. Per favore scegline un altro.</div>\n";
+ }
+
+}
diff --git a/admin/Application/Strings/Lang/It/ModelStrings.php b/admin/Application/Strings/Lang/It/ModelStrings.php
new file mode 100644
index 0000000..e02013b
--- /dev/null
+++ b/admin/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&agrave referenziale: il record &egrave associato ad un record di una tabella figlia. Devi prima rompere l'associazione.</div>\n",
+ "no-id" => "<div class='alert'>Non &egrave definito alcun id della query</div>\n",
+ "not-linked" => "<div class='alert'>Il record non &egrave associato, non puoi dissociarlo</div>",
+ "linked" => "<div class='alert'>Il record &egrave gi&agrave associato, non puoi associarlo un'altra volta</div>"
+ );
+
+}
diff --git a/admin/Application/Strings/Lang/It/UploadStrings.php b/admin/Application/Strings/Lang/It/UploadStrings.php
new file mode 100644
index 0000000..57bcda6
--- /dev/null
+++ b/admin/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 &egrave una sotto directory della directory base</div>\n",
+ "not-dir" => "<div class='alert'>La cartella selezionata non &egrave una directory</div>\n",
+ "not-empty" => "<div class='alert'>La cartella selezionata non &egrave vuota</div>\n",
+ "no-folder-specified" => "<div class='alert'>Non &egrave stata specificata alcuna cartella</div>\n",
+ "not-writable" => "<div class='alert'>La cartella non &egrave scrivibile</div>\n",
+ "not-writable-file" => "<div class='alert'>Il file non &egrave scrivibile</div>\n",
+ "dir-exists" => "<div class='alert'>Esiste gi&agrave una directory con lo stesso nome</div>\n",
+ "no-upload-file" => "<div class='alert'>Non c'&egrave alcun file di cui fare l'upload</div>\n",
+ "size-over" => "<div class='alert'>La dimensione del file &egrave troppo grande</div>\n",
+ "not-allowed-ext" => "<div class='alert'>L'estensione del file che vuoi caricare non &egrave consentita</div>\n",
+ "file-exists" => "<div class='alert'>Esiste gi&agrave un file con lo stesso nome</div>\n",
+ );
+
+}
diff --git a/admin/Application/Strings/Lang/It/ValCondStrings.php b/admin/Application/Strings/Lang/It/ValCondStrings.php
new file mode 100644
index 0000000..a54c650
--- /dev/null
+++ b/admin/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 &egrave 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&ugrave 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&ograve 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/admin/Application/Strings/Lang/It/index.html b/admin/Application/Strings/Lang/It/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Application/Strings/Lang/It/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Application/Strings/Lang/index.html b/admin/Application/Strings/Lang/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Application/Strings/Lang/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Application/Strings/index.html b/admin/Application/Strings/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Application/Strings/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Application/Views/Adminboxes/main.php b/admin/Application/Views/Adminboxes/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Adminboxes/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Admindeletion/main.php b/admin/Application/Views/Admindeletion/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Admindeletion/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminhardware/ask.php b/admin/Application/Views/Adminhardware/ask.php
new file mode 100644
index 0000000..1368dca
--- /dev/null
+++ b/admin/Application/Views/Adminhardware/ask.php
@@ -0,0 +1,53 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<div class='mainMenu'>
+ <?php echo $menu;?>
+</div>
+
+<div class="ask_for_deletion_external">
+
+ <?php foreach ($table as $row) { ?>
+ <div class="ask_for_deletion_internal">
+ <div class="ask_for_deletion_item">
+ <b>id hardware to delete</b>: <?php echo $row['deletion']['id_hard'];?>
+ </div>
+ <div class="ask_for_deletion_item">
+ <b>requested by</b>: <?php echo getUserName($row['deletion']['created_by']);?>
+ </div>
+ <div class="ask_for_deletion_item">
+ <b>at</b>: <?php echo smartDate($row['deletion']['creation_date']);?>
+ </div>
+ <div class="ask_for_deletion_item">
+ <b>why</b>: <?php echo $row['deletion']['object'];?>
+ </div>
+ <div class="ask_for_deletion_item">
+ <b>hardware duplicated</b>: <?php echo $row['deletion']['id_duplicate'];?>
+ </div>
+ <div class="ask_for_deletion_item">
+ <b>message</b>: <?php echo $row['deletion']['message'];?>
+ </div>
+ </div>
+ <?php } ?>
+</div> \ No newline at end of file
diff --git a/admin/Application/Views/Adminhardware/main.php b/admin/Application/Views/Adminhardware/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Adminhardware/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminhistory/main.php b/admin/Application/Views/Adminhistory/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Adminhistory/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminissues/main.php b/admin/Application/Views/Adminissues/main.php
new file mode 100644
index 0000000..1df2110
--- /dev/null
+++ b/admin/Application/Views/Adminissues/main.php
@@ -0,0 +1,36 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $("#bb_code").markItUp(mySettings);
+ $("#bb_code_notice").markItUp(mySettings);
+
+ });
+
+ </script>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminmessages/main.php b/admin/Application/Views/Adminmessages/main.php
new file mode 100644
index 0000000..0ce6983
--- /dev/null
+++ b/admin/Application/Views/Adminmessages/main.php
@@ -0,0 +1,35 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminnews/main.php b/admin/Application/Views/Adminnews/main.php
new file mode 100644
index 0000000..5b603f2
--- /dev/null
+++ b/admin/Application/Views/Adminnews/main.php
@@ -0,0 +1,35 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<script>
+
+ $(document).ready(function() {
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+</script>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminparams/form.php b/admin/Application/Views/Adminparams/form.php
new file mode 100755
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Adminparams/form.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminpassword/form.php b/admin/Application/Views/Adminpassword/form.php
new file mode 100755
index 0000000..640b6e5
--- /dev/null
+++ b/admin/Application/Views/Adminpassword/form.php
@@ -0,0 +1,9 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<div class='mainMenu'>
+ <?php echo $menù;?>
+</div>
+
+<?php echo $notice;?>
+
+<?php echo $form;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminregusers/associate.php b/admin/Application/Views/Adminregusers/associate.php
new file mode 100644
index 0000000..9350d3a
--- /dev/null
+++ b/admin/Application/Views/Adminregusers/associate.php
@@ -0,0 +1,54 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<div class='mainMenu'>
+ <?php echo $menu;?>
+</div>
+
+<?php echo $notice;?>
+
+<div class='groupsList'>
+ Associate the user <b><?php echo $user;?></b> to some groups:<br /><br />
+ <form action = '<?php echo $action;?>' method = 'POST'>
+
+ <select name='boxIdentifier'>
+ <?php foreach ($groups as $name => $value) {?>
+ <option value='<?php echo $value;?>'><?php echo $name;?></option>
+ <?php } ?>
+ </select>
+ <input type='submit' name='associateAction' value='associate'>
+ <input type='submit' name='dissociateAction' value='dissociate'>
+ <input type='hidden' name='id_user' value='<?php echo (int)$_POST['id_user'];?>'>
+ </form>
+</div>
+
+<br /><hr>
+<div class='groupsList'>
+ The user <b><?php echo $user;?></b> is inserted inside the following Groups:
+ <ul>
+ <?php foreach ($groupsUser as $g) {?>
+ <li><?php echo $g['reggroups']['name'];?></li>
+ <?php } ?>
+ </ul>
+</div> \ No newline at end of file
diff --git a/admin/Application/Views/Adminregusers/main.php b/admin/Application/Views/Adminregusers/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Adminregusers/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Admintalk/main.php b/admin/Application/Views/Admintalk/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Admintalk/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/Adminusers/associate.php b/admin/Application/Views/Adminusers/associate.php
new file mode 100644
index 0000000..b0f6672
--- /dev/null
+++ b/admin/Application/Views/Adminusers/associate.php
@@ -0,0 +1,54 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<div class='mainMenu'>
+ <?php echo $menu;?>
+</div>
+
+<?php echo $notice;?>
+
+<div class='groupsList'>
+ Associate the user <b><?php echo $user;?></b> to some groups:<br /><br />
+ <form action = '<?php echo $action;?>' method = 'POST'>
+
+ <select name='boxIdentifier'>
+ <?php foreach ($groups as $name => $value) {?>
+ <option value='<?php echo $value;?>'><?php echo $name;?></option>
+ <?php } ?>
+ </select>
+ <input type='submit' name='associateAction' value='associate'>
+ <input type='submit' name='dissociateAction' value='dissociate'>
+ <input type='hidden' name='id_user' value='<?php echo (int)$_POST['id_user'];?>'>
+ </form>
+</div>
+
+<br /><hr>
+<div class='groupsList'>
+ The user <b><?php echo $user;?></b> is inserted inside the following Groups:
+ <ul>
+ <?php foreach ($groupsUser as $g) {?>
+ <li><?php echo $g['admingroups']['name'];?></li>
+ <?php } ?>
+ </ul>
+</div> \ No newline at end of file
diff --git a/admin/Application/Views/Adminusers/forceout.php b/admin/Application/Views/Adminusers/forceout.php
new file mode 100755
index 0000000..f4b901d
--- /dev/null
+++ b/admin/Application/Views/Adminusers/forceout.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<div class='mainMenu'>
+ <?php echo $menù;?>
+</div>
+
+<?php echo $notice;?>
diff --git a/admin/Application/Views/Adminusers/login.php b/admin/Application/Views/Adminusers/login.php
new file mode 100755
index 0000000..c005f35
--- /dev/null
+++ b/admin/Application/Views/Adminusers/login.php
@@ -0,0 +1,45 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $notice; ?>
+
+<div class="login_box">
+ <form action = '<?php echo $action;?>' method = 'POST'>
+
+ <table>
+ <tr>
+ <td>Username</td>
+ <td><input type='text' name='username'></td>
+ </tr>
+ <tr>
+ <td>Password</td>
+ <td><input type='password' name='password'></td>
+ </tr>
+ <tr>
+ <td><input type = 'submit' value = 'login'></td>
+ </tr>
+ </table>
+
+ </form>
+</div>
diff --git a/admin/Application/Views/Adminusers/logout.php b/admin/Application/Views/Adminusers/logout.php
new file mode 100755
index 0000000..81ec4db
--- /dev/null
+++ b/admin/Application/Views/Adminusers/logout.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<div class="logout_box">
+ <div><?php echo $notice;?></div>
+
+ <div><a href="<?php echo $login;?>">login</a></div>
+</div> \ No newline at end of file
diff --git a/admin/Application/Views/Adminusers/main.php b/admin/Application/Views/Adminusers/main.php
new file mode 100644
index 0000000..7d71709
--- /dev/null
+++ b/admin/Application/Views/Adminusers/main.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<?php echo $scaffold;?> \ No newline at end of file
diff --git a/admin/Application/Views/footer_back.php b/admin/Application/Views/footer_back.php
new file mode 100755
index 0000000..fa9269c
--- /dev/null
+++ b/admin/Application/Views/footer_back.php
@@ -0,0 +1,27 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+</div> <!--container-->
+</body>
+</html>
diff --git a/admin/Application/Views/header_back.php b/admin/Application/Views/header_back.php
new file mode 100755
index 0000000..862847d
--- /dev/null
+++ b/admin/Application/Views/header_back.php
@@ -0,0 +1,94 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+<head>
+
+ <title>Admin</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/scaffold.css';?>"></style>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/mainmenu.css';?>"></style>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/popupmenu.css';?>"></style>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/form.css';?>"></style>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/pagelist.css';?>"></style>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/files.css';?>"></style>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/login.css';?>"></style>
+
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrlSrc.'/Public/Css/panel.css';?>"></style>
+
+ <!--[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>
+
+ <!--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" />
+
+ <style type='text/css'>
+
+ div#container{
+ text-align: left;
+ margin:0px;
+ }
+
+ .ask_for_deletion_internal
+ {
+ margin:10px;
+ background:#B0E0E6;
+ padding:10px;
+ }
+ .ask_for_deletion_item
+ {
+ font:normal 15px/1.3 sans-serif,arial,Verdana;
+ margin:5px;
+ }
+ </style>
+
+ <script>
+
+ $(document).ready(function(){
+
+ $(".delForm form").click(function () {
+ if (window.confirm("do you really want to delete this record?")) {
+ return true;
+ }
+ return false;
+ });
+
+ });
+
+ </script>
+
+</head>
+
+<body>
+
+<div id="container">
+
diff --git a/admin/Application/Views/panel.php b/admin/Application/Views/panel.php
new file mode 100755
index 0000000..1fff0b6
--- /dev/null
+++ b/admin/Application/Views/panel.php
@@ -0,0 +1,55 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+?>
+
+<div class="mainPanel">
+
+ <div class='mainMenu'>
+ <div class='logoutButton'>
+ <a href ="<?php echo Url::getRoot('adminusers/logout');?>">LOGOUT</a>
+ </div>
+ </div>
+
+ <div class='usersLoggedList'>
+ Users logged:
+ <?php foreach ($logged as $user) {?>
+ <b><?php echo $user.' ';?></b>
+ <?php } ?>
+ </div>
+
+ <ul class='panelApplicationList'>
+ <li><a href="<?php echo Url::getRoot('adminusers/main/1/undef/'.$token);?>">Admin users</a></li>
+ <li><a href="<?php echo Url::getRoot('adminpassword/form/'.$token);?>">Password</a></li>
+ <li><a href="<?php echo Url::getRoot('adminhardware/main/1/undef/undef/undef/'.$token);?>">Hardware</a></li>
+ <li><a href="<?php echo Url::getRoot('admindeletion/main/1/undef/'.$token);?>">Ask for deletion</a></li>
+ <li><a href="<?php echo Url::getRoot('adminissues/main/1/undef/undef/undef/undef/'.$token);?>">Issues</a></li>
+ <li><a href="<?php echo Url::getRoot('adminmessages/main/1/undef/no/'.$token);?>">Messages to Issues</a></li>
+ <li><a href="<?php echo Url::getRoot('admintalk/main/1/'.$token);?>">Talk</a></li>
+ <li><a href="<?php echo Url::getRoot('adminregusers/main/1/undef/undef/undef/'.$token);?>">Registered users</a></li>
+ <li><a href="<?php echo Url::getRoot('adminparams/form/'.$token);?>">Parameters</a></li>
+ <li><a href="<?php echo Url::getRoot('adminnews/main/1/'.$token);?>">News</a></li>
+ <li><a href="<?php echo Url::getRoot('adminboxes/main/1/'.$token);?>">Boxes</a></li>
+ <li><a href="<?php echo Url::getRoot('adminhistory/main/1/undef/undef/undef/'.$token);?>">Moderators' actions history</a></li>
+ </ul>
+
+</div> \ No newline at end of file
diff --git a/admin/Application/index.html b/admin/Application/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Application/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/COPYRIGHT.txt b/admin/COPYRIGHT.txt
new file mode 100755
index 0000000..63dbdc9
--- /dev/null
+++ b/admin/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/admin/Config/Autoload.php b/admin/Config/Autoload.php
new file mode 100644
index 0000000..56bb9f6
--- /dev/null
+++ b/admin/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/admin/Config/Config.php b/admin/Config/Config.php
new file mode 100755
index 0000000..3f7866d
--- /dev/null
+++ b/admin/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', 'hnode');
+define('USER', 'root');
+define('PWD', '');
+define('HOST', 'localhost');
+
+/*default controller name*/
+define('DEFAULT_CONTROLLER','adminusers');
+
+/*default action*/
+define('DEFAULT_ACTION','login');
+
+/*website parameters*/
+define('DOMAIN_NAME','localhost/admin');
+
+/*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','panel');
+
+/*error action*/
+/*if you set ERROR_ACTION to false, than EasyGiant will set ERROR_ACTION equal to DEFAULT_ACTION*/
+define('ERROR_ACTION','main');
+
+/*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);
diff --git a/admin/Config/Reporting.php b/admin/Config/Reporting.php
new file mode 100755
index 0000000..3f8d858
--- /dev/null
+++ b/admin/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','Off');
+
+//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',false);
+
+//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);
diff --git a/admin/Config/Restricted.php b/admin/Config/Restricted.php
new file mode 100755
index 0000000..9684f08
--- /dev/null
+++ b/admin/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/admin/Config/Route.php b/admin/Config/Route.php
new file mode 100644
index 0000000..ac9748e
--- /dev/null
+++ b/admin/Config/Route.php
@@ -0,0 +1,50 @@
+<?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(
+ 'adminissues,main',
+ 'adminissues,form',
+ 'adminpassword,form',
+ 'adminusers,login',
+ 'adminusers,logout',
+ 'adminusers,forceout',
+ 'adminusers,retype',
+ 'adminusers,main',
+ 'adminusers,form',
+ 'adminusers,associate',
+ 'admintalk,main',
+ 'admintalk,form',
+ 'adminregusers,main',
+ 'adminregusers,associate',
+ 'adminhardware,main',
+ 'adminhardware,ask',
+ 'adminhardware,form',
+ 'admindeletion,main',
+ 'adminparams,form',
+ 'adminnews,main',
+ 'adminnews,form',
+ 'adminboxes,main',
+ 'adminboxes,form',
+ 'adminmessages,main',
+ 'adminmessages,form',
+ 'adminhistory,main',
+ );
+
+ //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/admin/External/Fonts/FreeFont/AUTHORS b/admin/External/Fonts/FreeFont/AUTHORS
new file mode 100644
index 0000000..4148c93
--- /dev/null
+++ b/admin/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/admin/External/Fonts/FreeFont/COPYING b/admin/External/Fonts/FreeFont/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/admin/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/admin/External/Fonts/FreeFont/CREDITS b/admin/External/Fonts/FreeFont/CREDITS
new file mode 100644
index 0000000..0f47440
--- /dev/null
+++ b/admin/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/admin/External/Fonts/FreeFont/ChangeLog b/admin/External/Fonts/FreeFont/ChangeLog
new file mode 100644
index 0000000..d5345d0
--- /dev/null
+++ b/admin/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/admin/External/Fonts/FreeFont/FreeMono.ttf b/admin/External/Fonts/FreeFont/FreeMono.ttf
new file mode 100644
index 0000000..ba90adb
--- /dev/null
+++ b/admin/External/Fonts/FreeFont/FreeMono.ttf
Binary files differ
diff --git a/admin/External/Fonts/FreeFont/INSTALL b/admin/External/Fonts/FreeFont/INSTALL
new file mode 100644
index 0000000..fbbbe80
--- /dev/null
+++ b/admin/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/admin/External/Fonts/FreeFont/README b/admin/External/Fonts/FreeFont/README
new file mode 100644
index 0000000..60e67f2
--- /dev/null
+++ b/admin/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/admin/Library/Array/Validate/Base.php b/admin/Library/Array/Validate/Base.php
new file mode 100644
index 0000000..3366097
--- /dev/null
+++ b/admin/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/admin/Library/Array/Validate/Soft.php b/admin/Library/Array/Validate/Soft.php
new file mode 100644
index 0000000..95e208d
--- /dev/null
+++ b/admin/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/admin/Library/Array/Validate/Strong.php b/admin/Library/Array/Validate/Strong.php
new file mode 100644
index 0000000..6494483
--- /dev/null
+++ b/admin/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/admin/Library/Array/Validate/index.html b/admin/Library/Array/Validate/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Array/Validate/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Array/index.html b/admin/Library/Array/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Array/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/ArrayExt.php b/admin/Library/ArrayExt.php
new file mode 100755
index 0000000..93eca91
--- /dev/null
+++ b/admin/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/admin/Library/Bootstrap.php b/admin/Library/Bootstrap.php
new file mode 100755
index 0000000..796b22f
--- /dev/null
+++ b/admin/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/admin/Library/BoxParser.php b/admin/Library/BoxParser.php
new file mode 100644
index 0000000..90d2426
--- /dev/null
+++ b/admin/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/admin/Library/Call.php b/admin/Library/Call.php
new file mode 100755
index 0000000..d80f1d4
--- /dev/null
+++ b/admin/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/admin/Library/Controller.php b/admin/Library/Controller.php
new file mode 100755
index 0000000..9ceaa5f
--- /dev/null
+++ b/admin/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/admin/Library/Db/Mysql.php b/admin/Library/Db/Mysql.php
new file mode 100755
index 0000000..8b96f44
--- /dev/null
+++ b/admin/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/admin/Library/Db/Mysqli.php b/admin/Library/Db/Mysqli.php
new file mode 100644
index 0000000..4e4c528
--- /dev/null
+++ b/admin/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/admin/Library/Db/index.html b/admin/Library/Db/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Db/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Email.php b/admin/Library/Email.php
new file mode 100644
index 0000000..c948098
--- /dev/null
+++ b/admin/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/admin/Library/ErrorReporting.php b/admin/Library/ErrorReporting.php
new file mode 100644
index 0000000..18ba519
--- /dev/null
+++ b/admin/Library/ErrorReporting.php
@@ -0,0 +1,45 @@
+<?php
+
+// EasyGiant is a PHP framework for creating and managing dynamic content
+//
+// Copyright (C) 2009 - 2011 Antonio Gallo
+// See COPYRIGHT.txt and LICENSE.txt.
+//
+// This file is part of EasyGiant
+//
+// EasyGiant 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.
+//
+// EasyGiant 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 EasyGiant. If not, see <http://www.gnu.org/licenses/>.
+
+//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/admin/Library/Factory/Db.php b/admin/Library/Factory/Db.php
new file mode 100755
index 0000000..3a988dd
--- /dev/null
+++ b/admin/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/admin/Library/Factory/index.html b/admin/Library/Factory/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Factory/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Files/Log.php b/admin/Library/Files/Log.php
new file mode 100644
index 0000000..895c26d
--- /dev/null
+++ b/admin/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/admin/Library/Files/Upload.php b/admin/Library/Files/Upload.php
new file mode 100755
index 0000000..47289fd
--- /dev/null
+++ b/admin/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/admin/Library/Files/index.html b/admin/Library/Files/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Files/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Form/Checkbox.php b/admin/Library/Form/Checkbox.php
new file mode 100755
index 0000000..5df1917
--- /dev/null
+++ b/admin/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/admin/Library/Form/Entry.php b/admin/Library/Form/Entry.php
new file mode 100755
index 0000000..725235a
--- /dev/null
+++ b/admin/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/admin/Library/Form/Form.php b/admin/Library/Form/Form.php
new file mode 100755
index 0000000..00e27d4
--- /dev/null
+++ b/admin/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/admin/Library/Form/Hidden.php b/admin/Library/Form/Hidden.php
new file mode 100755
index 0000000..fb81b30
--- /dev/null
+++ b/admin/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/admin/Library/Form/Html.php b/admin/Library/Form/Html.php
new file mode 100644
index 0000000..dce91c6
--- /dev/null
+++ b/admin/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/admin/Library/Form/InputText.php b/admin/Library/Form/InputText.php
new file mode 100755
index 0000000..fb98336
--- /dev/null
+++ b/admin/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/admin/Library/Form/Password.php b/admin/Library/Form/Password.php
new file mode 100644
index 0000000..76bc735
--- /dev/null
+++ b/admin/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/admin/Library/Form/Radio.php b/admin/Library/Form/Radio.php
new file mode 100755
index 0000000..fb20677
--- /dev/null
+++ b/admin/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/admin/Library/Form/Select.php b/admin/Library/Form/Select.php
new file mode 100755
index 0000000..558fd57
--- /dev/null
+++ b/admin/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/admin/Library/Form/Textarea.php b/admin/Library/Form/Textarea.php
new file mode 100755
index 0000000..d81cc84
--- /dev/null
+++ b/admin/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/admin/Library/Form/index.html b/admin/Library/Form/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Form/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Functions.php b/admin/Library/Functions.php
new file mode 100755
index 0000000..414770f
--- /dev/null
+++ b/admin/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/admin/Library/HeaderObj.php b/admin/Library/HeaderObj.php
new file mode 100644
index 0000000..f4fe65b
--- /dev/null
+++ b/admin/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/admin/Library/Helper/Array.php b/admin/Library/Helper/Array.php
new file mode 100755
index 0000000..32a4c27
--- /dev/null
+++ b/admin/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/admin/Library/Helper/Html.php b/admin/Library/Helper/Html.php
new file mode 100755
index 0000000..b3648be
--- /dev/null
+++ b/admin/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/admin/Library/Helper/List.php b/admin/Library/Helper/List.php
new file mode 100755
index 0000000..660ac67
--- /dev/null
+++ b/admin/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'] = '&nbsp';
+ }
+ $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('&nbsp',$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/admin/Library/Helper/Menu.php b/admin/Library/Helper/Menu.php
new file mode 100755
index 0000000..119ada8
--- /dev/null
+++ b/admin/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/admin/Library/Helper/Pages.php b/admin/Library/Helper/Pages.php
new file mode 100755
index 0000000..eec58f6
--- /dev/null
+++ b/admin/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/admin/Library/Helper/Popup.php b/admin/Library/Helper/Popup.php
new file mode 100755
index 0000000..17ba908
--- /dev/null
+++ b/admin/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=\"/admin/Public/Js/DisplayTag.js\"></script>\n";
+ }
+ }
+ return $returnString;
+ }
+
+}
diff --git a/admin/Library/Helper/index.html b/admin/Library/Helper/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Helper/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Hooks.php b/admin/Library/Hooks.php
new file mode 100644
index 0000000..fa005b9
--- /dev/null
+++ b/admin/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/admin/Library/Html/Form.php b/admin/Library/Html/Form.php
new file mode 100644
index 0000000..bddc13f
--- /dev/null
+++ b/admin/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/admin/Library/Html/index.html b/admin/Library/Html/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Html/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Image/Gd/Captcha.php b/admin/Library/Image/Gd/Captcha.php
new file mode 100644
index 0000000..ace4806
--- /dev/null
+++ b/admin/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/admin/Library/Image/Gd/Thumbnail.php b/admin/Library/Image/Gd/Thumbnail.php
new file mode 100644
index 0000000..5981175
--- /dev/null
+++ b/admin/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/admin/Library/Image/Gd/index.html b/admin/Library/Image/Gd/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Image/Gd/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Image/index.html b/admin/Library/Image/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Image/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Lang/Eng/DbCondStrings.php b/admin/Library/Lang/Eng/DbCondStrings.php
new file mode 100644
index 0000000..1edae98
--- /dev/null
+++ b/admin/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/admin/Library/Lang/Eng/ModelStrings.php b/admin/Library/Lang/Eng/ModelStrings.php
new file mode 100644
index 0000000..411d196
--- /dev/null
+++ b/admin/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/admin/Library/Lang/Eng/UploadStrings.php b/admin/Library/Lang/Eng/UploadStrings.php
new file mode 100644
index 0000000..195fd5f
--- /dev/null
+++ b/admin/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/admin/Library/Lang/Eng/ValCondStrings.php b/admin/Library/Lang/Eng/ValCondStrings.php
new file mode 100644
index 0000000..b9d132e
--- /dev/null
+++ b/admin/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/admin/Library/Lang/Eng/index.html b/admin/Library/Lang/Eng/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Lang/Eng/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Lang/ResultStrings.php b/admin/Library/Lang/ResultStrings.php
new file mode 100644
index 0000000..db1095c
--- /dev/null
+++ b/admin/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/admin/Library/Lang/index.html b/admin/Library/Lang/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Lang/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/ModAbstract.php b/admin/Library/ModAbstract.php
new file mode 100644
index 0000000..885f64f
--- /dev/null
+++ b/admin/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/admin/Library/Model/Base.php b/admin/Library/Model/Base.php
new file mode 100755
index 0000000..1aaadca
--- /dev/null
+++ b/admin/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/admin/Library/Model/Map.php b/admin/Library/Model/Map.php
new file mode 100755
index 0000000..7a36c6f
--- /dev/null
+++ b/admin/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/admin/Library/Model/Tree.php b/admin/Library/Model/Tree.php
new file mode 100755
index 0000000..d7b655d
--- /dev/null
+++ b/admin/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/admin/Library/Model/index.html b/admin/Library/Model/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Model/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/Params.php b/admin/Library/Params.php
new file mode 100644
index 0000000..9ec0ba5
--- /dev/null
+++ b/admin/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/admin/Library/Popup.php b/admin/Library/Popup.php
new file mode 100755
index 0000000..55ea7f5
--- /dev/null
+++ b/admin/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/admin/Library/Request.php b/admin/Library/Request.php
new file mode 100644
index 0000000..12bf16c
--- /dev/null
+++ b/admin/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/admin/Library/Scaffold.php b/admin/Library/Scaffold.php
new file mode 100755
index 0000000..2ac3fa5
--- /dev/null
+++ b/admin/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/admin/Library/Strings/Functions.php b/admin/Library/Strings/Functions.php
new file mode 100644
index 0000000..eabc0d8
--- /dev/null
+++ b/admin/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/admin/Library/Theme.php b/admin/Library/Theme.php
new file mode 100755
index 0000000..afa3660
--- /dev/null
+++ b/admin/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 ? '/admin' : '/admin/index.php';
+ $this->baseUrlSrc = '/admin';
+ }
+
+
+ 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/admin/Library/Url.php b/admin/Library/Url.php
new file mode 100755
index 0000000..54d6e3e
--- /dev/null
+++ b/admin/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 ? '/admin/' . $pathFromRootFolder : '/admin/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/admin/Library/Users/CheckAdmin.php b/admin/Library/Users/CheckAdmin.php
new file mode 100755
index 0000000..9a47b16
--- /dev/null
+++ b/admin/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/admin/Library/Users/index.html b/admin/Library/Users/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/Users/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Library/index.html b/admin/Library/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Library/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/License.txt b/admin/License.txt
new file mode 100755
index 0000000..404896a
--- /dev/null
+++ b/admin/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/admin/Logs/index.html b/admin/Logs/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Logs/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Public/Css/comune.css b/admin/Public/Css/comune.css
new file mode 100644
index 0000000..b6ecdd3
--- /dev/null
+++ b/admin/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/admin/Public/Css/explorer.css b/admin/Public/Css/explorer.css
new file mode 100644
index 0000000..1adb80b
--- /dev/null
+++ b/admin/Public/Css/explorer.css
@@ -0,0 +1,91 @@
+ul#menuBlock li {
+ height:24px;
+}
+
+ul#menuBlock li ul {
+ top:25px;
+}
+
+ul#menuBlock li ul li {
+ margin-top:-3px;
+}
+
+.view_page_top_box
+{
+ height:32px;
+}
+
+.update_submit_class
+{
+ padding:7px;
+}
+
+.view_page_update_button
+{
+ width:40px;
+}
+
+/*div that contains the update form*/
+.view_page_update_button
+{
+ margin-top:2px;
+ margin-right:5px;
+}
+.update_submit_class
+{
+ padding:2px;
+ width:30px;
+}
+.notebooks_insert_form
+{
+ margin-right:-30px;
+}
+
+.notebook_insert_link
+{
+ margin:0px 5px 0px 5px;
+}
+.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/admin/Public/Css/files.css b/admin/Public/Css/files.css
new file mode 100644
index 0000000..e98e681
--- /dev/null
+++ b/admin/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/admin/Public/Css/form.css b/admin/Public/Css/form.css
new file mode 100755
index 0000000..911af19
--- /dev/null
+++ b/admin/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/admin/Public/Css/index.html b/admin/Public/Css/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Public/Css/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Public/Css/login.css b/admin/Public/Css/login.css
new file mode 100644
index 0000000..7c42964
--- /dev/null
+++ b/admin/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/admin/Public/Css/mainmenu.css b/admin/Public/Css/mainmenu.css
new file mode 100755
index 0000000..615c8bf
--- /dev/null
+++ b/admin/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/admin/Public/Css/pagelist.css b/admin/Public/Css/pagelist.css
new file mode 100644
index 0000000..93c8454
--- /dev/null
+++ b/admin/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/admin/Public/Css/panel.css b/admin/Public/Css/panel.css
new file mode 100644
index 0000000..8b9f9a9
--- /dev/null
+++ b/admin/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/admin/Public/Css/popupmenu.css b/admin/Public/Css/popupmenu.css
new file mode 100755
index 0000000..66a202e
--- /dev/null
+++ b/admin/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/admin/Public/Css/scaffold.css b/admin/Public/Css/scaffold.css
new file mode 100755
index 0000000..8cc7529
--- /dev/null
+++ b/admin/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/admin/Public/Css/website.css b/admin/Public/Css/website.css
new file mode 100755
index 0000000..7a5bda5
--- /dev/null
+++ b/admin/Public/Css/website.css
@@ -0,0 +1,1414 @@
+/*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;
+}
+
+
+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 3px 1px 3px;
+ margin:0px 5px 30px 5px;
+ text-align:right;
+ overflow:hidden;
+ height:38px;
+}
+
+.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:33px;
+ padding:0px;
+}
+.view_page_back_button
+{
+ float:left;
+ width:50px;
+}
+/*the update submit button*/
+.update_submit_class
+{
+ padding:2px;
+ width:33px;
+ 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:10px;
+/* 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:35px;
+}
+.top_left_note_image
+{
+ height:30px;
+}
+.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;
+ 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/admin/Public/Img/Icons/back.png b/admin/Public/Img/Icons/back.png
new file mode 100644
index 0000000..6ceb852
--- /dev/null
+++ b/admin/Public/Img/Icons/back.png
Binary files differ
diff --git a/admin/Public/Img/Icons/delete.png b/admin/Public/Img/Icons/delete.png
new file mode 100644
index 0000000..9b192fe
--- /dev/null
+++ b/admin/Public/Img/Icons/delete.png
Binary files differ
diff --git a/admin/Public/Img/Icons/file.png b/admin/Public/Img/Icons/file.png
new file mode 100644
index 0000000..443765f
--- /dev/null
+++ b/admin/Public/Img/Icons/file.png
Binary files differ
diff --git a/admin/Public/Img/Icons/folder.png b/admin/Public/Img/Icons/folder.png
new file mode 100644
index 0000000..89fb6d5
--- /dev/null
+++ b/admin/Public/Img/Icons/folder.png
Binary files differ
diff --git a/admin/Public/Img/Icons/image.png b/admin/Public/Img/Icons/image.png
new file mode 100644
index 0000000..bbc8c82
--- /dev/null
+++ b/admin/Public/Img/Icons/image.png
Binary files differ
diff --git a/admin/Public/Img/Icons/index.html b/admin/Public/Img/Icons/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Public/Img/Icons/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Public/Js/DisplayTag.js b/admin/Public/Js/DisplayTag.js
new file mode 100755
index 0000000..1ba1fb7
--- /dev/null
+++ b/admin/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/admin/Public/Js/TinyMCE.js b/admin/Public/Js/TinyMCE.js
new file mode 100755
index 0000000..b0f994e
--- /dev/null
+++ b/admin/Public/Js/TinyMCE.js
@@ -0,0 +1,34 @@
+tinyMCE.init({
+ // General options
+ mode : "textareas",
+ theme : "advanced",
+ editor_selector : "contentArea",
+// editor_deselector : "mceNoEditor",
+ plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
+
+ // Theme options
+ theme_advanced_buttons1 : "justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
+ theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code",
+ theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media",
+ theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,template,|,forecolor,backcolor,bold,italic,underline,strikethrough,|,insertdate,inserttime,preview",
+ theme_advanced_toolbar_location : "top",
+ theme_advanced_toolbar_align : "left",
+ theme_advanced_statusbar_location : "bottom",
+ theme_advanced_resizing : true,
+
+ // Example content CSS (should be your site CSS)
+ content_css : "../stili_editor.css",
+
+ // Drop lists for link/image/media/template dialogs
+ template_external_list_url : "lists/template_list.js",
+ external_link_list_url : "lists/link_list.js",
+ external_image_list_url : "lists/image_list.js",
+ media_external_list_url : "lists/media_list.js",
+
+ // Replace values for the template plugin
+ template_replace_values : {
+ username : "Some User",
+ staffid : "991234"
+ }
+ });
+
diff --git a/admin/Public/Js/functions.js b/admin/Public/Js/functions.js
new file mode 100644
index 0000000..5e1f2d8
--- /dev/null
+++ b/admin/Public/Js/functions.js
@@ -0,0 +1,122 @@
+<!--
+
+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/admin/Public/Js/index.html b/admin/Public/Js/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Public/Js/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png
new file mode 100755
index 0000000..82524ab
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png
new file mode 100755
index 0000000..6aed97a
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png
new file mode 100755
index 0000000..f11ca67
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png
new file mode 100755
index 0000000..68306d1
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png
new file mode 100755
index 0000000..f567c28
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png
new file mode 100755
index 0000000..29e9965
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png
new file mode 100755
index 0000000..9a46d19
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png
new file mode 100755
index 0000000..f811f30
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.png
new file mode 100755
index 0000000..755fe99
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0a82eb_256x240.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.png
new file mode 100755
index 0000000..98705f9
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_0b54d5_256x240.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.png
new file mode 100755
index 0000000..2179078
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_5fa5e3_256x240.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.png
new file mode 100755
index 0000000..de76ce2
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_fcdd4a_256x240.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.png b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.png
new file mode 100755
index 0000000..42f8f99
--- /dev/null
+++ b/admin/Public/Js/jquery/dialog/css/excite-bike/images/ui-icons_ffffff_256x240.png
Binary files differ
diff --git a/admin/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css b/admin/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css
new file mode 100755
index 0000000..c4ed3ea
--- /dev/null
+++ b/admin/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/admin/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js b/admin/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js
new file mode 100755
index 0000000..7469ef3
--- /dev/null
+++ b/admin/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||"&#160;",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||"&#160;"));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/admin/Public/Js/jquery/jquery-1.4.2.min.js b/admin/Public/Js/jquery/jquery-1.4.2.min.js
new file mode 100644
index 0000000..7c24308
--- /dev/null
+++ b/admin/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/admin/Public/Js/markitup/jquery.markitup.js b/admin/Public/Js/markitup/jquery.markitup.js
new file mode 100644
index 0000000..ee8f40f
--- /dev/null
+++ b/admin/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/admin/Public/Js/markitup/sets/bbcode/images/bold.png b/admin/Public/Js/markitup/sets/bbcode/images/bold.png
new file mode 100644
index 0000000..889ae80
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/bold.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/clean.png b/admin/Public/Js/markitup/sets/bbcode/images/clean.png
new file mode 100644
index 0000000..7e7cefb
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/clean.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/code.png b/admin/Public/Js/markitup/sets/bbcode/images/code.png
new file mode 100644
index 0000000..63fe6ce
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/code.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/fonts.png b/admin/Public/Js/markitup/sets/bbcode/images/fonts.png
new file mode 100644
index 0000000..b7960db
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/fonts.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/h1.png b/admin/Public/Js/markitup/sets/bbcode/images/h1.png
new file mode 100644
index 0000000..9c122e9
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/h1.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/h2.png b/admin/Public/Js/markitup/sets/bbcode/images/h2.png
new file mode 100644
index 0000000..fbd8765
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/h2.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/h3.png b/admin/Public/Js/markitup/sets/bbcode/images/h3.png
new file mode 100644
index 0000000..c7836cf
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/h3.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/italic.png b/admin/Public/Js/markitup/sets/bbcode/images/italic.png
new file mode 100644
index 0000000..8482ac8
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/italic.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/link.png b/admin/Public/Js/markitup/sets/bbcode/images/link.png
new file mode 100644
index 0000000..25eacb7
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/link.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/list-bullet.png b/admin/Public/Js/markitup/sets/bbcode/images/list-bullet.png
new file mode 100644
index 0000000..4a8672b
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/list-bullet.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/list-item.png b/admin/Public/Js/markitup/sets/bbcode/images/list-item.png
new file mode 100644
index 0000000..8cb4d69
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/list-item.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/list-numeric.png b/admin/Public/Js/markitup/sets/bbcode/images/list-numeric.png
new file mode 100644
index 0000000..33b0b8d
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/list-numeric.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/paragraph.png b/admin/Public/Js/markitup/sets/bbcode/images/paragraph.png
new file mode 100644
index 0000000..95704fb
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/paragraph.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/picture.png b/admin/Public/Js/markitup/sets/bbcode/images/picture.png
new file mode 100644
index 0000000..4a158fe
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/picture.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/preview.png b/admin/Public/Js/markitup/sets/bbcode/images/preview.png
new file mode 100644
index 0000000..a9925a0
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/preview.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/quotes.png b/admin/Public/Js/markitup/sets/bbcode/images/quotes.png
new file mode 100644
index 0000000..e54ebeb
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/quotes.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/stroke.png b/admin/Public/Js/markitup/sets/bbcode/images/stroke.png
new file mode 100644
index 0000000..612058a
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/stroke.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/images/underline.png b/admin/Public/Js/markitup/sets/bbcode/images/underline.png
new file mode 100644
index 0000000..90d0df2
--- /dev/null
+++ b/admin/Public/Js/markitup/sets/bbcode/images/underline.png
Binary files differ
diff --git a/admin/Public/Js/markitup/sets/bbcode/readme.txt b/admin/Public/Js/markitup/sets/bbcode/readme.txt
new file mode 100644
index 0000000..745d5dd
--- /dev/null
+++ b/admin/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/admin/Public/Js/markitup/sets/bbcode/set.js b/admin/Public/Js/markitup/sets/bbcode/set.js
new file mode 100644
index 0000000..3d16ea5
--- /dev/null
+++ b/admin/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/admin/Public/Js/markitup/sets/bbcode/style.css b/admin/Public/Js/markitup/sets/bbcode/style.css
new file mode 100644
index 0000000..4ab6031
--- /dev/null
+++ b/admin/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/admin/Public/Js/markitup/skins/simple/images/handle.png b/admin/Public/Js/markitup/skins/simple/images/handle.png
new file mode 100644
index 0000000..3993b20
--- /dev/null
+++ b/admin/Public/Js/markitup/skins/simple/images/handle.png
Binary files differ
diff --git a/admin/Public/Js/markitup/skins/simple/images/menu.png b/admin/Public/Js/markitup/skins/simple/images/menu.png
new file mode 100644
index 0000000..44a07af
--- /dev/null
+++ b/admin/Public/Js/markitup/skins/simple/images/menu.png
Binary files differ
diff --git a/admin/Public/Js/markitup/skins/simple/images/submenu.png b/admin/Public/Js/markitup/skins/simple/images/submenu.png
new file mode 100644
index 0000000..03d1977
--- /dev/null
+++ b/admin/Public/Js/markitup/skins/simple/images/submenu.png
Binary files differ
diff --git a/admin/Public/Js/markitup/skins/simple/style.css b/admin/Public/Js/markitup/skins/simple/style.css
new file mode 100644
index 0000000..4ff830f
--- /dev/null
+++ b/admin/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/admin/Public/Js/stats.js b/admin/Public/Js/stats.js
new file mode 100644
index 0000000..7d6be08
--- /dev/null
+++ b/admin/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/admin/Public/index.html b/admin/Public/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/admin/Public/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/README.txt b/admin/README.txt
new file mode 100644
index 0000000..4ff6db4
--- /dev/null
+++ b/admin/README.txt
@@ -0,0 +1,62 @@
+
+== Introduction ==
+
+h-admin is a web software that has to be used together with h-source. It is formed by a set of files used to administrate the h-source tables
+
+
+== Installation and configuration ==
+
+In order to use h-source you have to install h-source (you can't use h-admin if you have not installed h-source before). In order to install h-source read the README.txt file inside the h-source package
+
+In order to use h-admin you have to usa the same database already created for h-source. You have only to add some (5) new tables.
+
+The new tables that have to be created are written inside the file tables.sql (of the h-admin package).
+
+After you have created the new tables as indicated inside the tables.sql file, open the Config/Config.php file
+
+You have to set the following constants:
+
+ DB: name of the database (the database just created for h-source)
+ 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-admin 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-admin 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-admin). 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 login page of the h-admin software.
+
+user: admin
+password: admin
+
+
+== Learn the EasyGiant PHP framework ==
+
+Since h-admin is an application of the EasyGiant PHP framework you can use the EasyGiant features in order to modify the h-admin source code. Visit www.easygiant.org
+
+
+// h-admin, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+//
+// This file is part of h-admin
+//
+// h-admin 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.
+//
+// h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/admin/h-admin-copyright.txt b/admin/h-admin-copyright.txt
new file mode 100644
index 0000000..06d8fc1
--- /dev/null
+++ b/admin/h-admin-copyright.txt
@@ -0,0 +1,16 @@
+The h-admin software is a PHP software written thanks to the EasyGiant framework (see COPYRIGHT.txt)
+Copyright (C) 2010 Antonio Gallo
+
+h-admin 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.
+
+h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
diff --git a/admin/index.php b/admin/index.php
new file mode 100755
index 0000000..dc616db
--- /dev/null
+++ b/admin/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/admin/tables.sql b/admin/tables.sql
new file mode 100644
index 0000000..56bc087
--- /dev/null
+++ b/admin/tables.sql
@@ -0,0 +1,64 @@
+# h-admin, a web software to build a community of people that want to share their hardware information.
+# Copyright (C) 2010 Antonio Gallo (h-admin-copyright.txt)
+#
+# This file is part of h-admin
+#
+# h-admin 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.
+#
+# h-admin 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 h-admin. If not, see <http://www.gnu.org/licenses/>.
+
+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
+);