summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael pereira2011-04-20 18:49:49 +0200
committermichael pereira2011-04-20 18:49:49 +0200
commitcc3660add480ac1dc217d7f853b325db7d6ec7d0 (patch)
tree8056c87777d806c613a607c3f479ce07475b5db6
parentAPI + Fixes (diff)
parentUrl für Config gekürzt (diff)
downloadpbs2-cc3660add480ac1dc217d7f853b325db7d6ec7d0.tar.gz
pbs2-cc3660add480ac1dc217d7f853b325db7d6ec7d0.tar.xz
pbs2-cc3660add480ac1dc217d7f853b325db7d6ec7d0.zip
merges
-rw-r--r--AUTHORS34
-rw-r--r--apache-default36
-rw-r--r--application/configs/application.ini.dist2
-rw-r--r--application/controllers/ErrorController.php7
-rw-r--r--application/controllers/IndexController.php40
-rw-r--r--application/controllers/ResourceController.php18
-rw-r--r--application/controllers/StatsController.php34
-rw-r--r--application/models/BootMenu.php10
-rw-r--r--application/models/BootMenuMapper.php26
-rw-r--r--application/models/BootOsUser.php154
-rw-r--r--application/models/Client.php10
-rw-r--r--application/models/ClientMapper.php15
-rw-r--r--application/models/DbTable/BootOsUser.php20
-rw-r--r--application/models/DbTable/HomeType.php (renamed from header.txt)10
-rw-r--r--application/models/HomeType.php111
-rw-r--r--application/models/HomeTypeMapper.php142
-rw-r--r--application/modules/fbgui/controllers/AuthController.php51
-rw-r--r--application/modules/fbgui/controllers/IndexController.php172
-rw-r--r--application/modules/fbgui/controllers/PersonController.php12
-rw-r--r--application/modules/fbgui/forms/Login.php5
-rw-r--r--application/modules/fbgui/layouts/rz.phtml20
-rw-r--r--application/modules/fbgui/views/scripts/auth/login.phtml8
-rw-r--r--application/modules/fbgui/views/scripts/index/index.phtml147
-rw-r--r--application/modules/user/controllers/AuthController.php57
-rw-r--r--application/modules/user/controllers/BootisoController.php514
-rw-r--r--application/modules/user/controllers/BootmenuController.php950
-rw-r--r--application/modules/user/controllers/BootosController.php39
-rw-r--r--application/modules/user/controllers/ClientController.php50
-rw-r--r--application/modules/user/controllers/ConfigController.php380
-rw-r--r--application/modules/user/controllers/FilterController.php86
-rw-r--r--application/modules/user/controllers/GroupController.php47
-rw-r--r--application/modules/user/controllers/IndexController.php20
-rw-r--r--application/modules/user/controllers/PersonController.php82
-rw-r--r--application/modules/user/controllers/PoolController.php65
-rw-r--r--application/modules/user/controllers/PrebootController.php537
-rw-r--r--application/modules/user/controllers/RoleController.php182
-rw-r--r--application/modules/user/controllers/SessionController.php9
-rw-r--r--application/modules/user/forms/Bootiso.php4
-rw-r--r--application/modules/user/forms/Bootmenu.php8
-rw-r--r--application/modules/user/forms/FilterEntry.php2
-rw-r--r--application/modules/user/layouts/user.phtml4
-rw-r--r--application/modules/user/views/scripts/bootiso/index.phtml15
-rw-r--r--application/modules/user/views/scripts/bootmenu/index.phtml38
-rw-r--r--application/modules/user/views/scripts/bootos/index.phtml8
-rw-r--r--application/modules/user/views/scripts/client/index.phtml3
-rw-r--r--application/modules/user/views/scripts/config/index.phtml7
-rw-r--r--application/modules/user/views/scripts/person/edit.phtml2
-rw-r--r--application/modules/user/views/scripts/person/owndetails.phtml2
-rw-r--r--application/modules/user/views/scripts/pool/index.phtml8
-rw-r--r--application/modules/user/views/scripts/role/index.phtml4
-rw-r--r--application/modules/user/views/scripts/role/show.phtml2
-rw-r--r--droppbs.sql23
-rwxr-xr-xinit_ubuntu1036
-rw-r--r--install.sh53
-rw-r--r--kcl_ip_config1
-rw-r--r--library/Pbs/Acl.php2
-rw-r--r--library/Pbs/Filter.php10
-rw-r--r--notes-1.txt386
-rw-r--r--notes-2.txt76
-rw-r--r--public/.htaccess1
-rw-r--r--public/media/css/fbgui.css4
-rw-r--r--public/media/css/keyboard.css281
-rw-r--r--public/media/css/style.css7
-rw-r--r--public/media/img/bulb_off.pngbin0 -> 554 bytes
-rw-r--r--public/media/img/bulb_on.pngbin0 -> 525 bytes
-rw-r--r--public/media/img/keyboard.pngbin323 -> 161 bytes
-rw-r--r--public/media/js/jquery.keyboard.extension-typing.js153
-rw-r--r--public/media/js/jquery.keyboard.js963
-rw-r--r--public/media/js/jquery.mousewheel.js85
-rw-r--r--public/media/js/keyboard.js1793
-rw-r--r--public/media/js/user.js9
-rw-r--r--scripts/api_test.html (renamed from api_test.html)0
-rw-r--r--scripts/dbContent.php (renamed from dbContent.php)0
-rw-r--r--scripts/dbContent.png (renamed from dbContent.png)bin192702 -> 192702 bytes
-rw-r--r--scripts/fbgui-test.html (renamed from send-post.html)0
-rwxr-xr-xscripts/local-install.sh (renamed from zend-su.sh)0
-rw-r--r--scripts/mysqlGraph.php (renamed from mysqlGraph.php)0
-rw-r--r--scripts/mysqlGraph.png (renamed from mysqlGraph.png)bin280861 -> 280861 bytes
-rw-r--r--setup/pbs-newdata.sql (renamed from pbs-newdata.sql)96
-rw-r--r--setup/pbs.sql (renamed from pbs.sql)12
-rw-r--r--template.php37
-rw-r--r--ubuntu-initbin6020724 -> 0 bytes
-rw-r--r--zend-user.sh4
83 files changed, 4600 insertions, 4641 deletions
diff --git a/AUTHORS b/AUTHORS
index a400332..5039725 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,34 +2,24 @@ AUTHORS
Author: Simon Franz <simonfranz85 at googlemail.com>
- Database Layout
-
- Filter, Client, Pool Controllers
-
- Layout of user interface
-
- Javascript stuff
-
- Additional Librarys
+ Database Layout
+ Filter, Client, Pool Controllers
+ Layout of user interface
+ Javascript stuff
+ Additional Librarys
Author: Björn Geiger <bjoern.geiger at googlemail.com>
- Authentication
-
- Group, Person and Role Controller
-
+ Authentication
+ Group, Person and Role Controller
Database Layout
Author: Michael Pereira-Neves <pereira at informatik.uni-freiburg.de>
- Database Layout
-
- Bootmenu, Bootos, Bootiso, Config, Preboot Controllers
-
- Managing different resources in Resource via Controller
-
- API-Implementation
-
- Additional Librarys
+ Database Layout
+ Bootmenu, Bootos, Bootiso, Config, Preboot Controllers
+ Managing different resources in Resource via Controller
+ API-Implementation
+ Additional Librarys
diff --git a/apache-default b/apache-default
deleted file mode 100644
index 95d0580..0000000
--- a/apache-default
+++ /dev/null
@@ -1,36 +0,0 @@
-<VirtualHost *:80>
- ServerAdmin webmaster@localhost
-
-DocumentRoot /tmp/pbs2/public
- <Directory /tmp/pbs2/public >
- Options FollowSymLinks
- AllowOverride All
- </Directory>
-
-
- ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
- <Directory "/usr/lib/cgi-bin">
- AllowOverride None
- Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
- Order allow,deny
- Allow from all
- </Directory>
-
- ErrorLog /var/log/apache2/error.log
-
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel warn
-
- CustomLog /var/log/apache2/access.log combined
-
- Alias /doc/ "/usr/share/doc/"
- <Directory "/usr/share/doc/">
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- Allow from 127.0.0.0/255.0.0.0 ::1/128
- </Directory>
-
-</VirtualHost>
diff --git a/application/configs/application.ini.dist b/application/configs/application.ini.dist
index 64618e4..99e13a0 100644
--- a/application/configs/application.ini.dist
+++ b/application/configs/application.ini.dist
@@ -10,7 +10,7 @@ resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.params.displayExceptions = 0
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
-resources.db.params.username = root
+resources.db.params.username =
resources.db.params.password =
resources.db.params.dbname = pbs
resources.db.isDefaultTableAdapter = true
diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php
index 0dfcdb3..abf3ec1 100644
--- a/application/controllers/ErrorController.php
+++ b/application/controllers/ErrorController.php
@@ -25,13 +25,14 @@ class ErrorController extends Zend_Controller_Action
// 404 error -- controller or action not found
$this->getResponse()->setHttpResponseCode(404);
$this->view->message = 'Page not found';
- print_a($errors);
+ $this->_redirect('/user/');
+ # print_a($errors);
break;
default:
// application error
$this->getResponse()->setHttpResponseCode(500);
- $this->view->message = 'Application error';
- print_a($errors);
+ $this->view->message = 'Application error - Please contact the admin';
+ # print_a($errors);
break;
}
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index c6e6eba..5120d6f 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -13,31 +13,31 @@
class IndexController extends Zend_Controller_Action
{
- public function init()
- {
- /* Initialize action controller here */
- }
-
- public function indexAction()
- {
- if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){
- $mySession =new Zend_Session_Namespace('pbs');
- if(!isset($mySession->postdata)){
- $mySession->postdata = $_POST;
+ public function init()
+ {
+ /* Initialize action controller here */
+ }
+
+ public function indexAction()
+ {
+ if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){
+ $mySession =new Zend_Session_Namespace('pbs');
+ if(!isset($mySession->postdata)){
+ $mySession->postdata = $_POST;
}
-
+
$d = new Pbs_Debug();
$d->debug(array('MainIndexController',$_SERVER['REMOTE_ADDR'],implode("\t",$mySession->postdata)));
-
- $this->_redirect("/fbgui/index/index");
- }
-
- // action body
-
- }
+ $this->_redirect("/fbgui/index/index");
+ }
+ $this->_redirect("/user/auth/login");
+ // action body
+
+
+ }
+
-
}
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index e94d9c7..88ec38e 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -34,20 +34,24 @@ class ResourceController extends Zend_Controller_Action
$membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$this->rightrolesMapper = new Application_Model_RightRolesMapper();
+
$rightroles = new Application_Model_RightRoles();
+
@list($this->membership) = $membershipMapper->findBy(array('apikey' => $apikey));
if($this->membership == null){
header('HTTP/1.0 401 Member not found');
die();
}
-
+
}
elseif($alpha == "0"){
$bootmenuentryID = $this->_request->getParam('bootmenuentryID');
$this->page = $this->_request->getParam('page');
- if(!is_numeric($bootmenuentryID))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/json/error');
+
+ if(!is_numeric($bootmenuentryID)){
+ $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/json/error');
+ }
$bootmenuentry = new Application_Model_BootMenuEntries();
$bootmenuentryMapper = new Application_Model_BootMenuEntriesMapper();
@@ -102,7 +106,6 @@ class ResourceController extends Zend_Controller_Action
header('HTTP/1.0 400 Title, Distro, Distroversion and Share must be set');
die();
}
-
if($_FILES['config']['size'] == 0 && $_FILES['config']['name'] != '' || $_FILES['kernel']['size'] == 0 && $_FILES['kernel']['name'] != ''|| $_FILES['init']['size'] == 0 && $_FILES['init']['name'] != ''){
header('HTTP/1.0 400 File must be larger than 0 bytes');
@@ -367,7 +370,6 @@ class ResourceController extends Zend_Controller_Action
public function getconfigAction()
{
-
$bootmenuentryID = $this->thisSession->getBootmenuentryID();
$bootmenuentry = new Application_Model_BootMenuEntries();
$bmm = new Application_Model_BootMenuEntriesMapper();
@@ -415,6 +417,7 @@ class ResourceController extends Zend_Controller_Action
if($configID == null)
$configID = 'default';
chdir("../resources/config/$bootosID/$configID/");
+
passthru( "cat default.tgz");
}
}else{
@@ -470,9 +473,9 @@ class ResourceController extends Zend_Controller_Action
$kcl = $bootosmapper->find($bme->getBootosID())->getDefaultkcl();
if($bme->getKcl() && $kcl != null){
- $result = $kcl . " alpha=" . $this->_request->getParam('alpha') . " file=http://".$_SERVER['HTTP_HOST']."/resource/getconfig/alpha/".$this->_request->getParam('alpha')."/file/default.tgz ".$bme->getKclappend();
+ $result = $kcl . " alpha=" . $this->_request->getParam('alpha') . " file=http://".$_SERVER['HTTP_HOST']."/c/".$this->_request->getParam('alpha')."/default.tgz ".$bme->getKclappend();
}else{
- $result = "alpha=" . $this->_request->getParam('alpha') . " file=http://".$_SERVER['HTTP_HOST']."/resource/getconfig/alpha/".$this->_request->getParam('alpha')."/file/default.tgz ".$bme->getKclappend();
+ $result = "alpha=" . $this->_request->getParam('alpha') . " file=http://".$_SERVER['HTTP_HOST']."/c/".$this->_request->getParam('alpha')."/default.tgz ".$bme->getKclappend();
}
header("Content-Length: ".(strlen($result)));
@@ -512,7 +515,6 @@ class ResourceController extends Zend_Controller_Action
}
private function generateURL($action, $varname, $varvalue, $filename){
-
$path = '/resource/'. $action .'/' . $varname .'/' . $varvalue .'/bootmenuentryID/'.$this->thisSession->getBootmenuentryID().'/file/' . $filename ;
$path = "http://" . $_SERVER['SERVER_NAME'] . $path;
return $path;
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php
index 0b180e7..05762a4 100644
--- a/application/controllers/StatsController.php
+++ b/application/controllers/StatsController.php
@@ -13,39 +13,39 @@
class StatsController extends Zend_Controller_Action
{
- public function init()
- {
- $this->_helper->layout->disableLayout();
+ public function init()
+ {
+ $this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
- }
-
- public function graphgroupAction(){
-
- $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
-
+ }
+
+ public function graphgroupAction(){
+
+ $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+
if(isset($userIDsNamespace['groupID'])){
header("Content-Type: image/png");
- header("Expires: 0");
+ header("Expires: 0");
$n = new Pbs_Graph();
-
+
$level = $this->_request->getParam('level');
if(is_numeric($level) && $level != ''){
$n->setHiglightLevel($level);
}
$groupID = $userIDsNamespace['groupID'];
-
+
$group = $this->_request->getParam('group');
if((Pbs_Acl::checkRight('gsdo') || Pbs_Acl::checkRight('gsdog')) && is_numeric($group)){
$groupID = $group;
}
-
+
$child = $this->_request->getParam('child');
if(Pbs_Acl::checkRight('glk') && $child != ''){
$n->newChild($child);
}
-
- echo $n->graph($groupID);
- }
- }
+
+ echo $n->graph($groupID);
+ }
+ }
}
diff --git a/application/models/BootMenu.php b/application/models/BootMenu.php
index 82e771a..dae3776 100644
--- a/application/models/BootMenu.php
+++ b/application/models/BootMenu.php
@@ -16,6 +16,7 @@ class Application_Model_BootMenu
protected $_membershipID;
protected $_groupID;
protected $_title;
+ protected $_startcounter;
protected $_created;
protected $_defaultbootmenu;
@@ -96,6 +97,15 @@ class Application_Model_BootMenu
{
return $this->_created;
}
+ public function setStartcounter($_startcounter)
+ {
+ $this->_startcounter = $_startcounter;
+ return $this;
+ }
+ public function getStartcounter()
+ {
+ return $this->_startcounter;
+ }
public function setCreated($_created)
{
$this->_created = $_created;
diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php
index 8b39a5a..6ba72bd 100644
--- a/application/models/BootMenuMapper.php
+++ b/application/models/BootMenuMapper.php
@@ -84,7 +84,13 @@ class Application_Model_BootMenuMapper
public function save(Application_Model_BootMenu $botmenu)
{
- $data = array('bootmenuID'=> $botmenu->getID() ,'membershipID'=> $botmenu->getMembershipID(), 'groupID'=> $botmenu->getGroupID() ,'title'=> $botmenu->getTitle() ,'created'=> $botmenu->getCreated(), 'defaultbootmenu' => $botmenu->getDefaultbootmenu());
+ $data = array('bootmenuID'=> $botmenu->getID() ,
+ 'membershipID'=> $botmenu->getMembershipID(),
+ 'groupID'=> $botmenu->getGroupID() ,
+ 'title'=> $botmenu->getTitle() ,
+ 'startcounter'=> $botmenu->getStartcounter() ,
+ 'created'=> $botmenu->getCreated(),
+ 'defaultbootmenu' => $botmenu->getDefaultbootmenu());
if (null === ($id = $botmenu->getID()) ) {
unset($data['bootmenuID']);
@@ -113,10 +119,22 @@ class Application_Model_BootMenuMapper
if($botmenu == null){
$botmenu = new Application_Model_BootMenu();
- $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created)->setDefaultbootmenu($row->defaultbootmenu);
+ $botmenu->setID($row->bootmenuID)
+ ->setMembershipID($row->membershipID)
+ ->setGroupID($row->groupID)
+ ->setTitle($row->title)
+ ->setStartcounter($row->startcounter)
+ ->setCreated($row->created)
+ ->setDefaultbootmenu($row->defaultbootmenu);
return $botmenu;
}else{
- $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created)->setDefaultbootmenu($row->defaultbootmenu);
+ $botmenu->setID($row->bootmenuID)
+ ->setMembershipID($row->membershipID)
+ ->setGroupID($row->groupID)
+ ->setTitle($row->title)
+ ->setStartcounter($row->startcounter)
+ ->setCreated($row->created)
+ ->setDefaultbootmenu($row->defaultbootmenu);
}
@@ -129,7 +147,7 @@ class Application_Model_BootMenuMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_BootMenu();
- $entry->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created)->setDefault($row->default);
+ $entry->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setStartcounter($row->startcounter)->setCreated($row->created)->setDefault($row->default);
$entries[] = $entry;
}
diff --git a/application/models/BootOsUser.php b/application/models/BootOsUser.php
new file mode 100644
index 0000000..aefd311
--- /dev/null
+++ b/application/models/BootOsUser.php
@@ -0,0 +1,154 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Model_BootOsUser
+{
+ protected $_bootosuserID;
+ protected $_configID;
+ protected $_login;
+ protected $_password;
+ protected $_homepath;
+ protected $_hometypeID;
+
+ public function __construct(array $options = null)
+ {
+ if (is_array($options)) {
+ $this->setOptions($options);
+ }
+ }
+
+ public function __set($name, $value)
+ {
+ $method = 'set' . $name;
+ if (('mapper' == $name) || !method_exists($this, $method)) {
+ throw new Exception('Invalid BootOsUser property');
+ }
+ $this->$method($value);
+ }
+
+ public function __get($name)
+ {
+ $method = 'get' . $name;
+ if (('mapper' == $name) || !method_exists($this, $method)) {
+ throw new Exception('Invalid BootOsUser property');
+ }
+ return $this->$method();
+ }
+
+ public function setOptions(array $options)
+ {
+ $methods = get_class_methods($this);
+ foreach ($options as $key => $value) {
+ $method = 'set' . ucfirst($key);
+ if (in_array($method, $methods)) {
+ $this->$method($value);
+ }
+ }
+ return $this;
+ }
+
+ public function getID()
+ {
+ return $this->_bootosuserID;
+ }
+ public function setID($_bootosuserID)
+ {
+ $this->_bootosuserID = $_bootosuserID;
+ return $this;
+ }
+
+ public function getConfigID()
+ {
+ return $this->_configID;
+ }
+
+ public function setConfigID($_configID)
+ {
+ $this->_configID = $_configID;
+ return $this;
+ }
+
+ public function getLogin()
+ {
+ return $this->_login;
+ }
+
+ public function setLogin($_login)
+ {
+ $this->_login = $_login;
+ return $this;
+ }
+ public function getPassword()
+ {
+ return $this->_password;
+ }
+
+ public function setPassword($_password)
+ {
+ $this->_password = $_password;
+ return $this;
+ }
+
+ public function getHomepath()
+ {
+ return $this->_homepath;
+ }
+ public function setHomepath($_homepath)
+ {
+ $this->_homepath = $_homepath;
+ return $this;
+ }
+ public function getHometypeID()
+ {
+ return $this->_hometypeID;
+ }
+ public function setHometypeID($_hometypeID)
+ {
+ $this->_hometypeID = $_hometypeID;
+ return $this;
+ }
+ /**
+ * Returns current data as associative array using ReflectionClass
+ *
+ * @return array Returns associative array containing model data
+ * If "get"-method not available (our primary keys) the function getID() is called
+ */
+ public function toArray()
+ {
+ $reflectionClass = new ReflectionClass($this);
+ $properties = $reflectionClass->getProperties();
+ $result = array();
+ foreach ($properties as $property) {
+ $key = $property->name;
+ if (substr($key, 0, 1) != '_' && $this->$key !== null) {
+ $method = 'get' . ucfirst($key);
+ if ($reflectionClass->hasMethod($method)) {
+ $result[$key] = $this->$method();
+ } else {
+ $result[$key] = $this->$key;
+ }
+ }
+ elseif(substr($key, 0, 1) == '_' && $this->$key !== null) {
+ $key = substr($key, 1);
+ $method = 'get' . ucfirst($key);
+ if ($reflectionClass->hasMethod($method)) {
+ $result[$key] = $this->$method();
+ }else{
+ $result[$key] = $this->getID();
+ }
+
+ }
+ }
+ return $result;
+ }
+}
+
diff --git a/application/models/Client.php b/application/models/Client.php
index a63e8ba..e8108ef 100644
--- a/application/models/Client.php
+++ b/application/models/Client.php
@@ -16,6 +16,7 @@ class Application_Model_Client
protected $_groupID;
protected $_macadress;
protected $_hardwarehash;
+ protected $_created;
public function __construct(array $options = null)
{
@@ -91,6 +92,15 @@ class Application_Model_Client
$this->_hardwarehash = $_hardwarehash;
return $this;
}
+ public function getCreated()
+ {
+ return $this->_created;
+ }
+ public function setCreated($_created)
+ {
+ $this->_created = $_created;
+ return $this;
+ }
/**
* Returns current data as associative array using ReflectionClass
*
diff --git a/application/models/ClientMapper.php b/application/models/ClientMapper.php
index d727352..bcb3286 100644
--- a/application/models/ClientMapper.php
+++ b/application/models/ClientMapper.php
@@ -87,7 +87,8 @@ class Application_Model_ClientMapper
$data = array('clientID'=> $client->getID() ,
'groupID' => $client->getGroupID(),
'macadress'=> $client->getMacadress() ,
- 'hardwarehash'=> $client->getHardwarehash()
+ 'hardwarehash'=> $client->getHardwarehash(),
+ 'created'=> $client->getCreated()
);
if (null === ($id = $client->getID()) ) {
@@ -116,7 +117,11 @@ class Application_Model_ClientMapper
$row = $result->current();
- $client->setID($row->clientID)->setGroupID($row->groupID)->setMacadress($row->macadress)->setHardwarehash($row->hardwarehash);
+ $client->setID($row->clientID)
+ ->setGroupID($row->groupID)
+ ->setMacadress($row->macadress)
+ ->setHardwarehash($row->hardwarehash)
+ ->setCreated($row->created);
}
public function fetchAll()
@@ -126,7 +131,11 @@ class Application_Model_ClientMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_Client();
- $entry->setID($row->clientID)->setGroupID($row->groupID)->setMacadress($row->macadress)->setHardwarehash($row->hardwarehash);
+ $entry->setID($row->clientID)
+ ->setGroupID($row->groupID)
+ ->setMacadress($row->macadress)
+ ->setHardwarehash($row->hardwarehash)
+ ->setCreated($row->created);
$entries[] = $entry;
}
diff --git a/application/models/DbTable/BootOsUser.php b/application/models/DbTable/BootOsUser.php
new file mode 100644
index 0000000..976e21a
--- /dev/null
+++ b/application/models/DbTable/BootOsUser.php
@@ -0,0 +1,20 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Model_DbTable_BootOsUser extends Zend_Db_Table_Abstract
+{
+
+ protected $_name = 'pbs_bootosuser';
+
+
+}
+
diff --git a/header.txt b/application/models/DbTable/HomeType.php
index 054597a..2bd484f 100644
--- a/header.txt
+++ b/application/models/DbTable/HomeType.php
@@ -1,3 +1,4 @@
+<?php
/*
* Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
* This program is free software distributed under the GPL version 2.
@@ -8,3 +9,12 @@
*
* General information about OpenSLX can be found at http://openslx.org/
*/
+
+class Application_Model_DbTable_HomeType extends Zend_Db_Table_Abstract
+{
+
+ protected $_name = 'pbs_hometype';
+
+
+}
+
diff --git a/application/models/HomeType.php b/application/models/HomeType.php
new file mode 100644
index 0000000..afdf6ca
--- /dev/null
+++ b/application/models/HomeType.php
@@ -0,0 +1,111 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Model_HomeType
+{
+ protected $_hometypeID;
+ protected $_name;
+
+ public function __construct(array $options = null)
+ {
+ if (is_array($options)) {
+ $this->setOptions($options);
+ }
+ }
+
+ public function __set($name, $value)
+ {
+ $method = 'set' . $name;
+ if (('mapper' == $name) || !method_exists($this, $method)) {
+ throw new Exception('Invalid HomeType property');
+ }
+ $this->$method($value);
+ }
+
+ public function __get($name)
+ {
+ $method = 'get' . $name;
+ if (('mapper' == $name) || !method_exists($this, $method)) {
+ throw new Exception('Invalid HomeType property');
+ }
+ return $this->$method();
+ }
+
+ public function setOptions(array $options)
+ {
+ $methods = get_class_methods($this);
+ foreach ($options as $key => $value) {
+ $method = 'set' . ucfirst($key);
+ if (in_array($method, $methods)) {
+ $this->$method($value);
+ }
+ }
+ return $this;
+ }
+
+ public function getID()
+ {
+ return $this->_hometypeID;
+ }
+ public function setID($_hometypeID)
+ {
+ $this->_hometypeID = $_hometypeID;
+ return $this;
+ }
+
+ public function getName()
+ {
+ return $this->_name;
+ }
+
+ public function setName($_name)
+ {
+ $this->_name = $_name;
+ return $this;
+ }
+
+ /**
+ * Returns current data as associative array using ReflectionClass
+ *
+ * @return array Returns associative array containing model data
+ * If "get"-method not available (our primary keys) the function getID() is called
+ */
+ public function toArray()
+ {
+ $reflectionClass = new ReflectionClass($this);
+ $properties = $reflectionClass->getProperties();
+ $result = array();
+ foreach ($properties as $property) {
+ $key = $property->name;
+ if (substr($key, 0, 1) != '_' && $this->$key !== null) {
+ $method = 'get' . ucfirst($key);
+ if ($reflectionClass->hasMethod($method)) {
+ $result[$key] = $this->$method();
+ } else {
+ $result[$key] = $this->$key;
+ }
+ }
+ elseif(substr($key, 0, 1) == '_' && $this->$key !== null) {
+ $key = substr($key, 1);
+ $method = 'get' . ucfirst($key);
+ if ($reflectionClass->hasMethod($method)) {
+ $result[$key] = $this->$method();
+ }else{
+ $result[$key] = $this->getID();
+ }
+
+ }
+ }
+ return $result;
+ }
+}
+
diff --git a/application/models/HomeTypeMapper.php b/application/models/HomeTypeMapper.php
new file mode 100644
index 0000000..6bccceb
--- /dev/null
+++ b/application/models/HomeTypeMapper.php
@@ -0,0 +1,142 @@
+<?php
+/*
+ * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+ * This program is free software distributed under the GPL version 2.
+ * See http://gpl.openslx.org/
+ *
+ * If you have any feedback please consult http://feedback.openslx.org/ and
+ * send your suggestions, praise, or complaints to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found at http://openslx.org/
+ */
+
+class Application_Model_HomeTypeMapper
+{
+
+ protected $_dbTable;
+
+ public function findBy($where, $array=false, $order=false)
+ {
+ foreach($where as $k => $v){
+ if($v != null)
+ $where2[] = "$k = '$v'";
+ else
+ $where2[] = "$k IS NULL";
+ }
+ $where = implode(" AND " ,$where2);
+
+ try{
+ $db = Zend_Db_Table::getDefaultAdapter();
+ $select = $this->getDbTable()->select()
+ ->from($this->_dbTable)
+ ->where($where);
+
+ if(is_array($order)){
+ foreach ($order as $k => $v)
+ $a[] = "$k $v";
+ $select->order($a);
+ }
+
+ $stmt = $select->query();
+ $result = $stmt->fetchAll();
+
+ if(!$array){
+ $entries = array();
+ foreach ($result as $row) {
+ $entry = new Application_Model_HomeType($row);
+ $entry->setID($row['hometypeID']);
+ $entries[] = $entry;
+ }
+ return $entries;
+ }else{
+ return $result;
+ }
+
+ }catch (Zend_Exception $e) {
+ echo "Error message 2: " . $e->getMessage() . "\n";
+ }
+ }
+ public function setDbTable($dbTable)
+ {
+ if (is_string($dbTable)) {
+ $dbTable = new $dbTable();
+ }
+
+ if (!$dbTable instanceof Zend_Db_Table_Abstract) {
+ throw new Exception('Invalid table data gateway provided');
+ }
+
+ $this->_dbTable = $dbTable;
+
+ return $this;
+ }
+
+ public function getDbTable()
+ {
+ if (null === $this->_dbTable) {
+ $this->setDbTable('Application_Model_DbTable_HomeType');
+ }
+
+ return $this->_dbTable;
+ }
+
+ public function save(Application_Model_HomeType $hometype)
+ {
+
+ $data = array('hometypeID'=> $hometype->getID() ,'name'=> $hometype->getName() );
+
+ if (null === ($id = $hometype->getID()) ) {
+ unset($data['hometypeID']);
+ $this->getDbTable()->insert($data);
+ } else {
+ $this->getDbTable()->update($data, array('hometypeID = ?' => $id));
+ }
+ }
+
+ public function delete(Application_Model_HomeType $hometype)
+ {
+ if (null === ($id = $hometype->getID()) ) {
+ return;
+ } else {
+ $this->getDbTable()->delete(array('hometypeID = ?' => $id));
+ }
+ }
+
+ public function find($id, Application_Model_HomeType $hometype)
+ {
+ $result = $this->getDbTable()->find($id);
+ if (0 == count($result)) {
+ return;
+ }
+
+ $row = $result->current();
+
+ $hometype->setID($row->hometypeID)
+ ->setName($row->name);
+ }
+
+ public function fetchAll()
+ {
+ $resultSet = $this->getDbTable()->fetchAll();
+ $entries = array();
+ foreach ($resultSet as $row) {
+ $entry = new Application_Model_HomeType();
+
+ $entry->setID($row->hometypeID)
+ ->setName($row->name);
+
+ $entries[] = $entry;
+ }
+ return $entries;
+ }
+
+ public function compare(Application_Model_HomeType $v1,Application_Model_HomeType $v2){
+ $vv1 = $v1->toArray();
+ $vv2 = $v2->toArray();
+ return array_diff($vv1,$vv2);
+ }
+
+
+
+}
+
diff --git a/application/modules/fbgui/controllers/AuthController.php b/application/modules/fbgui/controllers/AuthController.php
index c811b06..936aa61 100644
--- a/application/modules/fbgui/controllers/AuthController.php
+++ b/application/modules/fbgui/controllers/AuthController.php
@@ -39,35 +39,29 @@ class Fbgui_AuthController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
- $adapter = new Zend_Auth_Adapter_DbTable(
- $this->db,
- 'pbs_person',
- 'email',
- 'password',
- 'MD5(CONCAT(?, password_salt))'
- );
+ $adapter = new Zend_Auth_Adapter_DbTable($this->db, 'pbs_person', 'email', 'password', 'MD5(CONCAT(?, password_salt))');
- $adapter->setIdentity($loginForm->getValue('email'));
- $adapter->setCredential($loginForm->getValue('password'));
-
- $result = $auth->authenticate($adapter);
-
- // TODO: erweiterte fehlerbeschreibung des Users
-
- if ($result->isValid()) {
- $this->personmapper = new Application_Model_PersonMapper();
- $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true);
- $person = new Application_Model_Person($result[0]);
- $person->setID($result[0]['personID']);
- $date = new DateTime();
- $person->setLogindate($date->getTimestamp());
- $this->personmapper->save($person);
- $this->_helper->redirector('selectmembership', 'person');
- return;
- } else {
- echo "Wrong Email or Password.";
- }
+ $adapter->setIdentity($loginForm->getValue('email'));
+ $adapter->setCredential($loginForm->getValue('password'));
+
+ $result = $auth->authenticate($adapter);
+
+ // TODO: erweiterte fehlerbeschreibung des Users
+
+ if ($result->isValid()) {
+ $this->personmapper = new Application_Model_PersonMapper();
+ $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true);
+ $person = new Application_Model_Person($result[0]);
+ $person->setID($result[0]['personID']);
+ $date = new DateTime();
+ $person->setLogindate($date->getTimestamp());
+ $this->personmapper->save($person);
+ $this->_helper->redirector('selectmembership', 'person');
+ return;
+ } else {
+ echo "Wrong Email or Password.";
+ }
}
}
$this->view->loginForm = $loginForm;
@@ -81,7 +75,8 @@ class Fbgui_AuthController extends Zend_Controller_Action
$auth->clearIdentity();
Zend_Session::namespaceUnset('userIDs');
Zend_Session::forgetMe();
- $this->_helper->redirector('login', 'auth');
+ $this->_redirect('/fbgui/index');
+# $this->_helper->redirector('fbgui', 'index');
return;
}
}
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index fb8282a..d2b21be 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -13,65 +13,75 @@
class Fbgui_IndexController extends Zend_Controller_Action
{
protected $membership;
-
- public function init()
- {
- /* Initialize action controller here */
- $membershipMapper = new Application_Model_MembershipMapper();
+
+ public function init()
+ {
+ /* Initialize action controller here */
+ $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+
+ $membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
- }
+ }
- public function errorAction()
- {
- $result = $this->_request->getParam('serialresult');
+ public function errorAction()
+ {
+ $result = $this->_request->getParam('serialresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('serial',$result);
- }
- }
-
- public function indexAction()
- {
+ }
+ }
+
+ public function indexAction()
+ {
$mySession = new Zend_Session_Namespace('pbs');
-
- if(count($mySession->postdata)<=0)
+
+ if(count($mySession->postdata)<=0){
$mySession->postdata = $_POST;
+ }
+ $result = $this->_request->getParam('notify');
+ if($result == 'nomember'){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('You have no membership, therefore you have no own BootMenu','info');
+ }
+
$d = new Pbs_Debug();
$d->debug(array('FBGuiIndexController',$_SERVER['REMOTE_ADDR'],implode("\t",$mySession->postdata)));
- if(isset($mySession->postdata['bootisoID']) || isset($mySession->postdata['serialnumber'])){
- // Create a session
- $n = new Pbs_Session();
-
- $bootisomapper = new Application_Model_BootIsoMapper();
- $bootiso = new Application_Model_BootIso();
- if(isset($mySession->postdata['bootisoID'])){
- $bootisomapper->find($mySession->postdata['bootisoID'],$bootiso);
- $groupID = $bootiso->getGroupID();
- }
- elseif(isset($mySession->postdata['serialnumber'])){
- $results = $bootisomapper->findBy(array('serialnumber' => $mySession->postdata['serialnumber']),true);
+ if(isset($mySession->postdata['bootisoID']) || isset($mySession->postdata['serialnumber'])){
+ // Create a session
+ $n = new Pbs_Session();
+
+ $bootisomapper = new Application_Model_BootIsoMapper();
+ $bootiso = new Application_Model_BootIso();
+ if(isset($mySession->postdata['bootisoID'])){
+ $bootisomapper->find($mySession->postdata['bootisoID'],$bootiso);
+ $groupID = $bootiso->getGroupID();
+ }
+ elseif(isset($mySession->postdata['serialnumber'])){
+ $results = $bootisomapper->findBy(array('serialnumber' => $mySession->postdata['serialnumber']),true);
if(count($results) == 0){
$this->_redirect('/fbgui/index/error/serialresult/noserial2');
}
- $bootiso->setOptions($results[0]);
- $bootiso->setID($results[0]['bootisoID']);
- $groupID = $bootiso->getGroupID();
-
- }
-
- $client = new Application_Model_Client();
- $client->setMacadress($mySession->postdata['mac']);
- $client->setHardwarehash($mySession->postdata['hardwarehash']);
+ $bootiso->setOptions($results[0]);
+ $bootiso->setID($results[0]['bootisoID']);
+ $groupID = $bootiso->getGroupID();
+
+ }
+
+ $client = new Application_Model_Client();
+ $client->setMacadress($mySession->postdata['mac']);
+ $client->setHardwarehash($mySession->postdata['hardwarehash']);
$client->setGroupID($groupID);
+ $client->setCreated(time());
$client = $n->createClient($client);
$clientID = $client->getID();
-
- $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
-
- if(!isset($_SESSION['alphasessionID'])){
+
+ $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+
+ if(!isset($_SESSION['alphasessionID'])){
$session = new Application_Model_Session();
$session->setBootisoID($bootiso->getID());
$session->setClientID($clientID);
@@ -79,18 +89,18 @@ class Fbgui_IndexController extends Zend_Controller_Action
if($this->membership->getID() != ''){
$session->setMembershipID($this->membership->getID());
}
- $session->setIp($_SERVER['REMOTE_ADDR']);
+ $session->setIp($_SERVER['REMOTE_ADDR']);
$session = $n->createSession($session);
- $_SESSION['alphasessionID'] = $session->getAlphasessionID();
+ $_SESSION['alphasessionID'] = $session->getAlphasessionID();
}
else{
$session = new Application_Model_Session();
$sessionMapper = new Application_Model_SessionMapper();
$sessions = $sessionMapper->findBy(array('alphasessionID'=>$_SESSION['alphasessionID']));
$session = $sessions[0];
- if($this->membership->getID() != ''){
+ if($this->membership->getID() != '' && $session->getMembershipID() == ''){
$session->setMembershipID($this->membership->getID());
- $session->save();
+ $sessionMapper->save($session);
}
}
// Request Bootmenu
@@ -98,74 +108,70 @@ class Fbgui_IndexController extends Zend_Controller_Action
$bootmenuID = $pbsFilter->evaluate();
if($bootmenuID != null){
$this->view->alphasessionID = $_SESSION['alphasessionID'];
-// print_a('Debug Output',
-// 'Session is now set',
-// 'Your sessionID is '.$session->getID(),
-// 'Your alphasessionID is '.$session->getAlphasessionID(),
-// 'Your client is '.$session->getClientID(),
-// 'goto bootmenu '.$bootmenuID);
-
+ // print_a('Debug Output',
+ // 'Session is now set',
+ // 'Your sessionID is '.$session->getID(),
+ // 'Your alphasessionID is '.$session->getAlphasessionID(),
+ // 'Your client is '.$session->getClientID(),
+ // 'goto bootmenu '.$bootmenuID);
+
$bootmenuMapper = new Application_Model_BootMenuMapper();
$bm = $bootmenuMapper->find($bootmenuID);
$this->view->title = $bm->getTitle();
-
+ $this->view->startcounter = $bm->getStartcounter();
+
$bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
$res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false);
$this->view->entries = $res;
- #print_a(Zend_Auth::getInstance()->hasIdentity(),$bm->MembershipID ,$this->membership->getID());
- if (!Zend_Auth::getInstance()->hasIdentity()) {
- # $pbsNotifier = new Pbs_Notifier();
- # $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. You have to login to get your own Bootmenu.<br />Click here to <a href='/fbgui/auth/login/'>login</a>",'info');
+
+ if (!Zend_Auth::getInstance()->hasIdentity()) {
$this->view->loginmenu = true;
}
- if(Zend_Auth::getInstance()->hasIdentity()){
+
+ if(Zend_Auth::getInstance()->hasIdentity()){
if($bm->MembershipID != '' && $bm->MembershipID == $this->membership->getID()){}
else{
- $pbsNotifier = new Pbs_Notifier();
- $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. There is currently a BootMenu with a higher priority active.",'info');
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. There is currently a BootMenu with a higher priority active.",'info');
}
}
}
else{
-
-// print_a('Debug Output',
-// 'Session is now set',
-// 'Your sessionID is '.$session->getID(),
-// 'Your alphasessionID is '.$session->getAlphasessionID(),
-// 'Your client is '.$session->getClientID(),
-// 'there is no bootmenu for you');
-
- $pbsNotifier = new Pbs_Notifier();
- $this->view->notification = $pbsNotifier->notify("There is no BootMenu to show. Please log in to get your BootMenu.<br />Click here to <a href='/fbgui/auth/login/'>login</a>",'error');
-
+ // print_a('Debug Output',
+ // 'Session is now set',
+ // 'Your sessionID is '.$session->getID(),
+ // 'Your alphasessionID is '.$session->getAlphasessionID(),
+ // 'Your client is '.$session->getClientID(),
+ // 'there is no bootmenu for you');
+ $this->view->nobootmenu = true;
}
}
else{
- #$this->_redirect('/fbgui/index/error/serialresult/noserial');
- }
-
- }
+ #$this->_redirect('/fbgui/index/error/serialresult/noserial');
+ }
+
+ }
public function startAction(){
$bootmenuntryID = $this->_request->getParam('bme');
$a = $_SESSION['alphasessionID'];
$bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
$bootmenuentry = new Application_Model_BootMenuEntries();
$bootmenuentriesMapper->find($bootmenuntryID,$bootmenuentry);
-
+
$sessionMapper = new Application_Model_SessionMapper();
- $session_k = $sessionMapper->findBy(array('alphasessionID' => $a),true);
-
- $session = new Application_Model_Session();
+ $session_k = $sessionMapper->findBy(array('alphasessionID' => $a),true);
+
+ $session = new Application_Model_Session();
$session->setOptions($session_k[0]);
$session->setID($session_k[0]['sessionID']);
- #print_a($bootmenuentry);
+
$session->setBootmenuentryID($bootmenuntryID);
$session->setBootosID($bootmenuentry->getBootosID());
$sessionMapper->save($session);
-
-
+
+
$this->view->host = '132.230.4.27';
- $this->view->alphasessionID = $a;
+ $this->view->alphasessionID = $a;
}
}
diff --git a/application/modules/fbgui/controllers/PersonController.php b/application/modules/fbgui/controllers/PersonController.php
index 7bb82aa..b884a28 100644
--- a/application/modules/fbgui/controllers/PersonController.php
+++ b/application/modules/fbgui/controllers/PersonController.php
@@ -42,7 +42,15 @@ class Fbgui_PersonController extends Zend_Controller_Action
if(isset($userIDsNamespace['membershipID'])) {
$this->_redirect('/fbgui/');
} else {
- if(count($this->memberships) > 0) {
+ if(count($this->memberships) == 1) {
+ $myMembership = $this->memberships[0];
+ $roleSession = new Zend_Session_Namespace('userIDs');
+ $roleSession->membershipID = $myMembership['membershipID'];
+ $roleSession->personID = $myMembership['personID'];
+ $roleSession->groupID = $myMembership['groupID'];
+ $roleSession->roleID = $myMembership['roleID'];
+ $this->_redirect('/fbgui/');
+ } elseif(count($this->memberships) > 1) {
if(isset($_POST['selectmembership'])) {
$roleSession = new Zend_Session_Namespace('userIDs');
$roleSession->membershipID = $_POST['membershipID'];
@@ -70,7 +78,7 @@ class Fbgui_PersonController extends Zend_Controller_Action
$this->view->membershipSelectForm = $membershipSelectForm;
}
} else {
- $this->_redirect('/fbgui/');
+ $this->_redirect('/fbgui/index/index/notify/nomember');
}
}
}
diff --git a/application/modules/fbgui/forms/Login.php b/application/modules/fbgui/forms/Login.php
index ee8846f..896b555 100644
--- a/application/modules/fbgui/forms/Login.php
+++ b/application/modules/fbgui/forms/Login.php
@@ -25,7 +25,7 @@ class fbgui_Form_Login extends Zend_Form
),
'required' => true,
'id' => 'email',
- 'class' => '',
+ 'class' => 'keyboardInput',
'label' => 'E-Mail:',
));
@@ -36,12 +36,13 @@ class fbgui_Form_Login extends Zend_Form
),
'required' => true,
'id' => 'pass',
- 'class' => '',
+ 'class' => 'keyboardInput',
'label' => 'Password:',
));
$this->addElement('submit', 'login', array(
'required' => false,
+ 'id' => 'submit',
'ignore' => true,
'label' => 'Login',
));
diff --git a/application/modules/fbgui/layouts/rz.phtml b/application/modules/fbgui/layouts/rz.phtml
index 5945695..cecf38e 100644
--- a/application/modules/fbgui/layouts/rz.phtml
+++ b/application/modules/fbgui/layouts/rz.phtml
@@ -17,26 +17,9 @@ echo $this->headScript()."\n";
<script src='/media/js/jquery-ui.min.js'></script>
<script src='/media/js/script.js'></script>
-<script src='/media/js/jquery.mousewheel.js'></script>
-<script src='/media/js/jquery.keyboard.js'></script>
-<script src='/media/js/jquery.keyboard.extension-typing.js'></script>
+<script src='/media/js/keyboard.js'></script>
<link href="/media/css/keyboard.css" media="screen" rel="stylesheet" type="text/css" />
-<script type="text/javascript">
-function toggleKeyboard(onoff){
- if($('#email').hasClass('qwerty') == false){
- $('#email').addClass('qwerty');
- $('#pass').addClass('qwerty');
- $('.qwerty').keyboard({ layout: 'qwerty' }).addTyping();
- }
- else{
- $('#email').removeClass('qwerty ui-keyboard-input ui-widget-content ui-corner-all').unbind();
- $('#pass').removeClass('qwerty ui-keyboard-input ui-widget-content ui-corner-all').unbind();
- }
-}
-
-</script>
-
</head>
<body>
<div id='sidepannel'>
@@ -72,6 +55,7 @@ function toggleKeyboard(onoff){
</div>
<div id="footer" class="footer flexbox flex">
+ <div style='float:left;padding-left:5px;'><button onclick='fbgui.shutDown();'>Shutdown</button></div>
<div style='padding:5px;'>
<a onclick="$('#debug .v1').toggle();$('#debug .v2').toggle();">display Debug</a> //
<i>last edit: <?php echo date("m\/Y",filectime('index.php'));?></i> //
diff --git a/application/modules/fbgui/views/scripts/auth/login.phtml b/application/modules/fbgui/views/scripts/auth/login.phtml
index 09724d4..330b34f 100644
--- a/application/modules/fbgui/views/scripts/auth/login.phtml
+++ b/application/modules/fbgui/views/scripts/auth/login.phtml
@@ -3,9 +3,15 @@
$this->loginForm->setAction($this->url());
echo $this->loginForm;
?>
-<button class='keyboardbutton' onclick='toggleKeyboard();return false;'>Show/Hide on-screen keyboard</button>
+
<script>
$(document).ready(function(){
$("#email").focus();
+ $('input').keypress(function(e) {
+ if(e.which == 13) {
+ $(this).blur();
+ $('#login').focus().click();
+ }
+ });
});
</script>
diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml
index a141add..8a5f0e6 100644
--- a/application/modules/fbgui/views/scripts/index/index.phtml
+++ b/application/modules/fbgui/views/scripts/index/index.phtml
@@ -1,20 +1,114 @@
<?php if($this->notification != ''){echo $this->notification;} ?>
-<?php if($this->loginmenu):?>
-<div class="fbguilogin selectswitch" style=''>
- <div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Login</div>
- <i>This is not your Bootmenu. Select this to get your own Bootmenu.</i>
- <input type="hidden" class="id" value="login"/>
-</div>
+
+<?php if($this->nobootmenu === true):?>
+ <div class="fbguilogin selectswitch" style=''>
+ <div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Login</div>
+ <i>There is no BootMenu to show. Please login to get your BootMenu.</i>
+ <input type="hidden" class="id" value="login"/>
+ </div>
+ <script type="text/javascript">
+ var activeElement = 0;
+ $(document).ready(function(){
+ $('.selectswitch').click(function(){
+ $('.selectswitch').removeClass('selected');
+ $(this).addClass('selected');
+ $("#selectedBootOs").val($(this).find('.id').val());
+ $("#startbutton").focus();
+ });
+ $('.selectswitch').click();
+ $('#startbutton').focus();
+ $('.selectswitch').dblclick(function(){
+ $('.selectswitch').removeClass('selected');
+ $(this).addClass('selected');
+ $("#selectedBootOs").val($(this).find('.id').val());
+ $("#startbutton").focus();
+ start();
+ });
+
+ $(function() {
+ $(document).click(function(){
+ abortStartcount = true;
+ })
+ $(document).keyup(function (event) {
+ if (event.keyCode == 38) {
+ // up
+ if(activeElement >=1)
+ activeElement = activeElement-1;
+ $('.selectswitch').eq(activeElement).click();
+ } else if (event.keyCode == 40) {
+ // Down
+ if(activeElement < $('.selectswitch').length-1 )
+ activeElement = activeElement+1;
+ $('.selectswitch').eq(activeElement).click();
+ } else if (event.keyCode == 13) {
+ // Down
+ $('#startbutton').click();
+ }
+ abortStartcount = true;
+ });
+ });
+ decreaseDown();
+ });
+ function decreaseDown(){
+ var act = parseInt($('.startcounter').html());
+ if(act == 0){
+ start();
+ return;
+ }
+ var next = act-1;
+ $('.startcounter').html(next);
+ if(next == 0){
+ start();
+ }
+ if(next > 0 && abortStartcount == false){
+ setTimeout('decreaseDown()',1000);
+ }
+ if(abortStartcount == true){
+ $('.startcounter').parent().fadeOut();
+ }
+ }
+ function start(){
+ if($('#selectedBootOs').val() != ''){
+ if($('#selectedBootOs').val() == 'login'){
+ window.location='/fbgui/auth/login/'
+ } else{
+ window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val();
+ }
+ }
+ else{
+ alert('You have to select a BootOs');
+ }
+ }
+ </script>
+ <input style="display:none;" type='text' id="selectedBootOs" />
+ <button onClick="start();" id='startbutton' class="fbguistart" style='font-size:16px;font-weight:bold;margin-bottom:5px;'>
+ Login
+ </button>
+ <div class='clear'></div>
<?php endif; ?>
<?php if(isset($this->entries)):?>
+ <?php if($this->loginmenu):?>
+ <div class="fbguilogin selectswitch" style=''>
+ <div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Login</div>
+ <i>This is not your Bootmenu. Select this to get your own Bootmenu.</i>
+ <input type="hidden" class="id" value="login"/>
+ </div>
+ <?php else:?>
+ <div class="fbguilogin selectswitch" style=''>
+ <div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Logout</div>
+ <i>Select this to logout and get to the default BootMenu.</i>
+ <input type="hidden" class="id" value="logout"/>
+ </div>
+ <?php endif;?>
<script type="text/javascript">
var activeElement = 0;
+ var abortStartcount = false;
$(document).ready(function(){
$('.selectswitch').click(function(){
$('.selectswitch').removeClass('selected');
$(this).addClass('selected');
$("#selectedBootOs").val($(this).find('.id').val());
- $("#startbutton").focus();
+ $("#startbutton").focus();
});
$('.bootmenu .selectswitch').eq(activeElement).click();
$('#startbutton').focus();
@@ -27,6 +121,9 @@
});
$(function() {
+ $(document).click(function(){
+ abortStartcount = true;
+ })
$(document).keyup(function (event) {
if (event.keyCode == 38) {
// up
@@ -42,14 +139,37 @@
// Down
$('#startbutton').click();
}
+ abortStartcount = true;
});
});
-
+ <?php if(count($this->entries) > 0): ?>
+ decreaseDown()
+ <?php endif; ?>
});
+ function decreaseDown(){
+ var act = parseInt($('.startcounter').html());
+ if(act == 0){
+ start();
+ return;
+ }
+ var next = act-1;
+ $('.startcounter').html(next);
+ if(next == 0){
+ start();
+ }
+ if(next > 0 && abortStartcount == false){
+ setTimeout('decreaseDown()',1000);
+ }
+ if(abortStartcount == true){
+ $('.startcounter').parent().fadeOut();
+ }
+ }
function start(){
if($('#selectedBootOs').val() != ''){
if($('#selectedBootOs').val() == 'login'){
window.location='/fbgui/auth/login/'
+ }else if($('#selectedBootOs').val() == 'logout'){
+ window.location='/fbgui/auth/logout/'
} else{
window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val();
}
@@ -60,6 +180,9 @@
}
</script>
<h1><?php echo $this->title;?></h1>
+ <?php if(count($this->entries) > 0): ?>
+ <div style='padding:5px;float:right;'>Starting in <span class='startcounter'><?php echo $this->startcounter; ?></span> seconds</div>
+ <?php endif; ?>
<div class='bootmenu'>
<?php $first = true;
?>
@@ -77,14 +200,10 @@
<input type="hidden" class="id" value="<?php echo $entry->getID();?>"/>
</div>
<?php endforeach; ?>
- </div>
+ </div>
<input style="display:none;" type='text' id="selectedBootOs" />
<button onClick="start();" id='startbutton' class="fbguistart" style='font-size:16px;font-weight:bold;margin-bottom:5px;'>
Start System
</button>
- <div class='clear'></div>
- <?php if($this->notificationbot != ''){echo $this->notificationbot;} ?>
-
-
-
+ <div class='clear'></div>
<?php endif;?>
diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php
index 7fc199a..4a5bcf4 100644
--- a/application/modules/user/controllers/AuthController.php
+++ b/application/modules/user/controllers/AuthController.php
@@ -41,39 +41,32 @@ class User_AuthController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
- $adapter = new Zend_Auth_Adapter_DbTable(
- $this->db,
- 'pbs_person',
- 'email',
- 'password',
- 'MD5(CONCAT(?, password_salt))'
- );
-
+ $adapter = new Zend_Auth_Adapter_DbTable( $this->db, 'pbs_person', 'email', 'password', 'MD5(CONCAT(?, password_salt))');
+
+ $adapter->setIdentity($loginForm->getValue('email'));
+ $adapter->setCredential($loginForm->getValue('password'));
- $adapter->setIdentity($loginForm->getValue('email'));
- $adapter->setCredential($loginForm->getValue('password'));
+ $result = $auth->authenticate($adapter);
- $result = $auth->authenticate($adapter);
-
- if ($result->isValid()) {
- $this->personmapper = new Application_Model_PersonMapper();
- $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true);
- $person = new Application_Model_Person($result[0]);
- $person->setID($result[0]['personID']);
- $date = new DateTime();
- $person->setLogindate($date->getTimestamp());
- if($person->getSuspended()) {
- $pbsNotifier = new Pbs_Notifier();
- $this->view->notification = $pbsNotifier->notify('Your Account is suspended', 'error');
- } else {
- $this->personmapper->save($person);
- $this->_helper->redirector('selectmembership', 'person');
- return;
- }
- } else {
- $pbsNotifier = new Pbs_Notifier();
- $this->view->notification = $pbsNotifier->notify('Wrong Email or Password', 'error');
- }
+ if ($result->isValid()) {
+ $this->personmapper = new Application_Model_PersonMapper();
+ $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true);
+ $person = new Application_Model_Person($result[0]);
+ $person->setID($result[0]['personID']);
+ $date = new DateTime();
+ $person->setLogindate($date->getTimestamp());
+ if($person->getSuspended()) {
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('Your Account is suspended', 'error');
+ } else {
+ $this->personmapper->save($person);
+ $this->_helper->redirector('selectmembership', 'person');
+ return;
+ }
+ } else {
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('Wrong Email or Password', 'error');
+ }
}
}
$this->view->loginForm = $loginForm;
@@ -235,7 +228,7 @@ class User_AuthController extends Zend_Controller_Action
$name = $person->getFirstname() . ' ' . $person->getName();
$url = $this->getRequest()->getScheme() . '://' . $this->getRequest()->getHttpHost() . $this->view->url();
$recoveryid = randomString(100);
- $mailbody = 'Um das Passwort zu ändern klicken Sie auf folgenden Link<br /><br /><a href="'. $url . '/auth/recoverpassword/?recoveryid='. $recoveryid . '">Passwort ändern</a>';
+ $mailbody = 'Um das Passwort zu ändern klicken Sie auf folgenden Link<br /><br /><a href="'. $url . '/auth/recoverpassword/?recoveryid='. $recoveryid . '">Passwort ändern</a>';
$mail = new Zend_Mail();
$mail->setBodyHtml($mailbody, 'utf8');
$mail->getBodyHtml()->getContent();
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php
index e0b9e6e..18472a9 100644
--- a/application/modules/user/controllers/BootisoController.php
+++ b/application/modules/user/controllers/BootisoController.php
@@ -15,19 +15,19 @@ class user_BootisoController extends Zend_Controller_Action
protected $bootisoMapper;
protected $membershipMapper;
- protected $membership;
+ protected $membership;
protected $page;
-
- public function init()
- {
- if (Zend_Auth::getInstance()->hasIdentity()) {
+
+ public function init()
+ {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if($userIDsNamespace['membershipID'] ==''){
$this->_redirect('/user/index');
}
-
+
$this->bootisoMapper = new Application_Model_BootIsoMapper();
-
+
$this->membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
@@ -36,12 +36,12 @@ class user_BootisoController extends Zend_Controller_Action
} else {
$this->_helper->redirector('login', 'auth');
}
- $this->page = $this->_request->getParam('page');
- }
+ $this->page = $this->_request->getParam('page');
+ }
- public function indexAction()
- {
- $result = $this->_request->getParam('addresult');
+ public function indexAction()
+ {
+ $result = $this->_request->getParam('addresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('create',$result);
@@ -56,297 +56,297 @@ class user_BootisoController extends Zend_Controller_Action
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('modify',$result);
}
- $result = $this->_request->getParam('downloadresult');
+ $result = $this->_request->getParam('downloadresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('download',$result);
}
-
-
- $groupMapper = new Application_Model_GroupMapper();
-
- $groupID = $this->membership->getGroupID();
-
- //ACL Darf er BootISOMenu sehen?
- if(!Pbs_Acl::checkRight('bai') && !Pbs_Acl::checkRight('bui'))
- $this->_redirect('/user/index');
-
- $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
-
- $parents = array();
- $this->view->bootisolist = array();
- $parents = $groupgroupsMapper->getParentGroups($groupID);
-
- foreach($parents as $k => $parent){
- foreach($parent as $p){
- $bootiso = $this->bootisoMapper->findBy(array("groupID" => $p));
- foreach ($bootiso as $b)
- if($b->getPublic() - $k >= 0 )
- $this->view->bootisolist[] = $b;
- elseif($k == 0 && $b->getPublic() == -1 && Pbs_Acl::checkRight('bc'))
- $this->view->bootisolist[] = $b;
- }
- }
-
- $this->view->bootisolist = array_reverse($this->view->bootisolist);
-
- $prebootMapper = new Application_Model_PreBootMapper();
- $this->view->prebootlist = array();
-
- foreach ($this->view->bootisolist as $bootiso){
- $bootiso->setPrebootID("[".$bootiso->getPrebootID()."] ".$prebootMapper->find($bootiso->getPrebootID())->getTitle());
- $bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupMapper->find($bootiso->getGroupID())->getTitle());
- $bootiso->setCreated(date(Zend_Registry::get('dateformat'),$bootiso->getCreated()));
- $bootiso->setExpires(date(Zend_Registry::get('dateformat'),$bootiso->getExpires()));
- }
-
- // Search
+
+
+ $groupMapper = new Application_Model_GroupMapper();
+
+ $groupID = $this->membership->getGroupID();
+
+ //ACL Darf er BootISOMenu sehen?
+ if(!Pbs_Acl::checkRight('bai') && !Pbs_Acl::checkRight('bui'))
+ $this->_redirect('/user/index');
+
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+
+ $parents = array();
+ $this->view->bootisolist = array();
+ $parents = $groupgroupsMapper->getParentGroups($groupID);
+
+ foreach($parents as $k => $parent){
+ foreach($parent as $p){
+ $bootiso = $this->bootisoMapper->findBy(array("groupID" => $p));
+ foreach ($bootiso as $b)
+ if($b->getPublic() - $k >= 0 )
+ $this->view->bootisolist[] = $b;
+ elseif($k == 0 && $b->getPublic() == -1 && Pbs_Acl::checkRight('bc'))
+ $this->view->bootisolist[] = $b;
+ }
+ }
+
+ $this->view->bootisolist = array_reverse($this->view->bootisolist);
+
+ $prebootMapper = new Application_Model_PreBootMapper();
+ $this->view->prebootlist = array();
+
+ foreach ($this->view->bootisolist as $bootiso){
+ $bootiso->setPrebootID("[".$bootiso->getPrebootID()."] ".$prebootMapper->find($bootiso->getPrebootID())->getTitle());
+ $bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupMapper->find($bootiso->getGroupID())->getTitle());
+ $bootiso->setCreated(date(Zend_Registry::get('dateformat'),$bootiso->getCreated()));
+ @$bootiso->setExpires(date(Zend_Registry::get('dateformat'),$bootiso->getExpires()));
+ }
+
+ // Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setModule('bootiso');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $this->view->bootisolist = $mySearch->search($this->view->bootisolist);
+ $this->view->search = $mySearch->getSearchTerm();
+ $this->view->bootisolist = $mySearch->search($this->view->bootisolist);
}
$this->view->searchform = $mySearch->searchForm();
-
- // Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+
+ // Pagination
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($this->view->bootisolist);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/bootiso/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $this->view->bootisolist = $pagination->getElements();
-
+ $this->view->bootisolist = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
- }
-
- public function searchAction(){
+ }
+
+ public function searchAction(){
$this->_redirect('/user/bootiso/index/search/'.($_GET['search']));
}
-
- public function downloadbootisoAction()
- {
- $this->_helper->layout->disableLayout();
+
+ public function downloadbootisoAction()
+ {
+ $this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
-
-
-
+
+
+
//ACL Darf er BootISOs downloaden?
if(!Pbs_Acl::checkRight('bdld'))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
-
- $bootisoID = $this->_request->getParam('bootisoID');
-
- if(!is_numeric($bootisoID))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
-
- $prebootID = $this->bootisoMapper->find($bootisoID)->getPrebootID();
-
-
- if(!is_dir("../resources/bootmedium/$prebootID/"))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/404');
-
- chdir("../resources/bootmedium/$prebootID/");
-
- header("X-Sendfile: $bootisoID".".zip");
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
+
+ $bootisoID = $this->_request->getParam('bootisoID');
+
+ if(!is_numeric($bootisoID))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
+
+ $prebootID = $this->bootisoMapper->find($bootisoID)->getPrebootID();
+
+
+ if(!is_dir("../resources/bootmedium/$prebootID/"))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/404');
+
+ chdir("../resources/bootmedium/$prebootID/");
+
+ header("X-Sendfile: $bootisoID".".zip");
header('Content-Type: application/x-gzip');
$content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="preboot.zip"');
header('Pragma: no-cache');
- header('Expires: 0');
+ header('Expires: 0');
- $handle = fopen($bootisoID.".zip", 'r');
+ $handle = fopen($bootisoID.".zip", 'r');
$chunk_size = 8192;
while ($chunk = fread($handle, $chunk_size)) {
echo $chunk;
ob_flush();
}
-
- }
-
- public function createbootisoAction()
- {
- //ACL Darf er BootISOs erstellen?
- if(!Pbs_Acl::checkRight('bc'))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/forbidden');
-
- $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
- $groupID = $this->membership->getGroupID();
-
- $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
- $childgroups = count($groupgroupsMapper->getChildGroups($groupID));
-
- $prebootMapper = new Application_Model_PreBootMapper();
- $prebootlist = $prebootMapper->findBy(array("groupID" => $groupID));
- if (!isset($_POST["createbootiso"])){
- $bootisoForm = new user_Form_Bootiso(array(
+
+ }
+
+ public function createbootisoAction()
+ {
+ //ACL Darf er BootISOs erstellen?
+ if(!Pbs_Acl::checkRight('bc'))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/forbidden');
+
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+ $groupID = $this->membership->getGroupID();
+
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+ $childgroups = count($groupgroupsMapper->getChildGroups($groupID));
+
+ $prebootMapper = new Application_Model_PreBootMapper();
+ $prebootlist = $prebootMapper->findBy(array("groupID" => $groupID));
+ if (!isset($_POST["createbootiso"])){
+ $bootisoForm = new user_Form_Bootiso(array(
'action' => 'createbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
'page'=>$this->page));
- } else {
-
- $bootisoForm = new user_Form_Bootiso(array(
+ } else {
+
+ $bootisoForm = new user_Form_Bootiso(array(
'action' => 'createbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
'page'=>$this->page),$_POST);
-
- if ($bootisoForm->isValid($_POST)) {
-
- $bootiso = new Application_Model_BootIso($_POST);
-
- $bootiso->setGroupID($this->membership->getGroupID());
- $bootiso->setCreated(time());
-
- $prebootID = $bootiso->getPrebootID();
-
- try {
-
- $bootisoID = $this->bootisoMapper->save($bootiso);
-
- copy("../resources/bootmedium/$prebootID/preboot.zip", "../resources/bootmedium/$prebootID/$bootisoID".".zip");
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res === true){
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/tmp/serial", $bootiso->getSerialnumber());
- $zip->close();
- }
-
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/error');
- //TODO Delete File & delete bootiso from DB
-
- }
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/ok');
- }
- }
-
- $this->view->bootisoForm = $bootisoForm;
- }
-
- public function editbootisoAction()
- {
- //ACL Darf er BootISOs editieren?
- if(!Pbs_Acl::checkRight('be') && !Pbs_Acl::checkRight('bem'))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
-
- $bootisoID = $this->_request->getParam('bootisoID');
- if (!is_numeric($bootisoID))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
-
- $groupID = $this->membership->getGroupID();
-
- $prebootMapper = new Application_Model_PreBootMapper();
- $prebootlist = $prebootMapper->findBy(array("groupID" => $groupID));
-
- $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
- $childgroups = count($groupgroupsMapper->getChildGroups($groupID));
-
- $bootiso = new Application_Model_BootIso();
- $this->bootisoMapper->find($bootisoID, $bootiso);
-
- if($this->membership->getGroupID() != $bootiso->getGroupID())
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
-
- if (!isset($_POST["editbootiso"])){
-
- $bootisoForm = new user_Form_Bootiso(array(
+
+ if ($bootisoForm->isValid($_POST)) {
+
+ $bootiso = new Application_Model_BootIso($_POST);
+
+ $bootiso->setGroupID($this->membership->getGroupID());
+ $bootiso->setCreated(time());
+
+ $prebootID = $bootiso->getPrebootID();
+
+ try {
+
+ $bootisoID = $this->bootisoMapper->save($bootiso);
+
+ copy("../resources/bootmedium/$prebootID/preboot.zip", "../resources/bootmedium/$prebootID/$bootisoID".".zip");
+ $zip = new ZipArchive();
+ $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
+ if($res === true){
+ $rootdir = $zip->getNameIndex(0);
+ $zip->addFromString($rootdir."build/rootfs/tmp/serial", $bootiso->getSerialnumber());
+ $zip->close();
+ }
+
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/error');
+ //TODO Delete File & delete bootiso from DB
+
+ }
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/addresult/ok');
+ }
+ }
+
+ $this->view->bootisoForm = $bootisoForm;
+ }
+
+ public function editbootisoAction()
+ {
+ //ACL Darf er BootISOs editieren?
+ if(!Pbs_Acl::checkRight('be') && !Pbs_Acl::checkRight('bem'))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
+
+ $bootisoID = $this->_request->getParam('bootisoID');
+ if (!is_numeric($bootisoID))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
+
+ $groupID = $this->membership->getGroupID();
+
+ $prebootMapper = new Application_Model_PreBootMapper();
+ $prebootlist = $prebootMapper->findBy(array("groupID" => $groupID));
+
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+ $childgroups = count($groupgroupsMapper->getChildGroups($groupID));
+
+ $bootiso = new Application_Model_BootIso();
+ $this->bootisoMapper->find($bootisoID, $bootiso);
+
+ if($this->membership->getGroupID() != $bootiso->getGroupID())
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
+
+ if (!isset($_POST["editbootiso"])){
+
+ $bootisoForm = new user_Form_Bootiso(array(
'action' => 'editbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
'page' => $this->page));
- $bootisoForm->populate($bootiso->toArray());
-
- }else{
- $bootisoForm = new user_Form_Bootiso(array(
+ $bootisoForm->populate($bootiso->toArray());
+
+ }else{
+ $bootisoForm = new user_Form_Bootiso(array(
'action' => 'editbootiso',
'prebootlist' => $prebootlist,
'groupdepth' => $childgroups,
'page' => $this->page),$_POST);
-
- if ($bootisoForm->isValid($_POST)) {
-
- $bootisoold = $bootiso;
-
- $bootiso = new Application_Model_BootIso($_POST);
- $bootiso->setGroupID($this->membership->getGroupID());
- $bootiso->setCreated(time());
- $bootiso->setID($bootisoID);
- $prebootID = $bootiso->getPrebootID();
-
- if( $bootiso->getPrebootID() != $bootisoold->getPrebootID() ||
- $bootiso->getExpires() != $bootisoold->getExpires() ||
- $bootiso->getPublic() != $bootisoold->getPublic() ||
- $bootiso->getSerialnumber() != $bootisoold->getSerialnumber()){
- //ACL Is he allowed to edit other than Metadata?
- if(!Pbs_Acl::checkRight('be'))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
- }
-
-
- try {
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res === true){
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/serial", $bootiso->getSerialnumber());
- $zip->close();
- }
-
- $this->bootisoMapper->save($bootiso);
-
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/error');
- //TODO Redo Serial in Files...
- }
-
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/ok');
- }
-
- }
-
- $this->view->bootisoForm = $bootisoForm;
- }
-
- public function deletebootisoAction()
- {
- //ACL Darf er BootISOs löschen?
- if(!Pbs_Acl::checkRight('bd'))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
-
- try{
-
- $bootisoID = $this->_request->getParam('bootisoID');
- if (!is_numeric($bootisoID))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
-
- $bootiso = new Application_Model_BootIso();
- $this->bootisoMapper->find($bootisoID,$bootiso);
-
- if($this->membership->getGroupID() != $bootiso->getGroupID())
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
-
- $this->bootisoMapper->delete($bootiso);
-
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/error');
- }
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/ok');
- }
-
+
+ if ($bootisoForm->isValid($_POST)) {
+
+ $bootisoold = $bootiso;
+
+ $bootiso = new Application_Model_BootIso($_POST);
+ $bootiso->setGroupID($this->membership->getGroupID());
+ $bootiso->setCreated(time());
+ $bootiso->setID($bootisoID);
+ $prebootID = $bootiso->getPrebootID();
+
+ if( $bootiso->getPrebootID() != $bootisoold->getPrebootID() ||
+ $bootiso->getExpires() != $bootisoold->getExpires() ||
+ $bootiso->getPublic() != $bootisoold->getPublic() ||
+ $bootiso->getSerialnumber() != $bootisoold->getSerialnumber()){
+ //ACL Is he allowed to edit other than Metadata?
+ if(!Pbs_Acl::checkRight('be'))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden');
+ }
+
+
+ try {
+ $zip = new ZipArchive();
+ $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
+ if($res === true){
+ $rootdir = $zip->getNameIndex(0);
+ $zip->addFromString($rootdir."build/rootfs/serial", $bootiso->getSerialnumber());
+ $zip->close();
+ }
+
+ $this->bootisoMapper->save($bootiso);
+
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/error');
+ //TODO Redo Serial in Files...
+ }
+
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/ok');
+ }
+
+ }
+
+ $this->view->bootisoForm = $bootisoForm;
+ }
+
+ public function deletebootisoAction()
+ {
+ //ACL Darf er BootISOs löschen?
+ if(!Pbs_Acl::checkRight('bd'))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
+
+ try{
+
+ $bootisoID = $this->_request->getParam('bootisoID');
+ if (!is_numeric($bootisoID))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
+
+ $bootiso = new Application_Model_BootIso();
+ $this->bootisoMapper->find($bootisoID,$bootiso);
+
+ if($this->membership->getGroupID() != $bootiso->getGroupID())
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/forbidden');
+
+ $this->bootisoMapper->delete($bootiso);
+
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/error');
+ }
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/deleteresult/ok');
+ }
+
}
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index 9e9f972..f901568 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -12,43 +12,43 @@
class user_BootmenuController extends Zend_Controller_Action
{
-
+
protected $bootmenuMapper;
protected $bootmenuentryMapper;
protected $membershipMapper;
protected $membership;
protected $page;
protected $type;
-
- public function init()
- {
- if (Zend_Auth::getInstance()->hasIdentity()) {
+
+ public function init()
+ {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if($userIDsNamespace['membershipID'] ==''){
$this->_redirect('/user/index');
}
-
+
$this->bootmenuMapper = new Application_Model_BootMenuMapper();
$this->bootmenuentryMapper = new Application_Model_BootMenuEntriesMapper();
-
-
+
+
$this->membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
$this->db = Zend_Db_Table::getDefaultAdapter();
-
+
$this->type = $this->_request->getParam('type');
} else {
$this->_helper->redirector('login', 'auth');
}
- $this->page = $this->_request->getParam('page');
- }
+ $this->page = $this->_request->getParam('page');
+ }
- public function indexAction()
- {
-
- $result = $this->_request->getParam('addresult');
+ public function indexAction()
+ {
+
+ $result = $this->_request->getParam('addresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('create',$result);
@@ -62,301 +62,301 @@ class user_BootmenuController extends Zend_Controller_Action
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('modify',$result);
- }
- $result = $this->_request->getParam('json');
+ }
+ $result = $this->_request->getParam('json');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('json',$result);
}
-
-
+
+
//ACL Darf er Bootmenus sehen?
- if(!Pbs_Acl::checkRight('booai') && !Pbs_Acl::checkRight('booui'))
- $this->_redirect('/user/index');
-
- $this->bootMenumapper = new Application_Model_BootMenuMapper();
- $this->bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
- $bootosMapper = new Application_Model_BootOsMapper();
- $configMapper = new Application_Model_ConfigMapper();
-
- if($this->type =='group' && Pbs_Acl::checkRight('booai')){
- $this->view->type = 'group';
- $bootmenu = $this->bootmenuMapper->findBy(array('groupID' => $this->membership->getGroupID()));
- foreach ($bootmenu as $bm){
- $bm->setCreated(date(Zend_Registry::get('dateformat'),$bm->getCreated()));
- $bootmenuID = $bm->getID();
- $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID));
- foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){
- $kcl = $bootosMapper->find($bootmenuentry->getBootosID())->getDefaultkcl();
- if($bootmenuentry->getKcl() && $kcl != null)
- $bootmenuentry->setKcl($kcl);
- else
- $bootmenuentry->setKcl("deactivated (edit Bootmenuentry to activate)");
- if($bootmenuentry->getKclappend() == null)
- $bootmenuentry->setKclappend("none (edit Bootmenuentry to set KCL-Append)");
- $bootmenuentry->setBootosID("[".$bootmenuentry->getBootosID()."] ".$bootosMapper->find($bootmenuentry->getBootosID())->getTitle());
+ if(!Pbs_Acl::checkRight('booai') && !Pbs_Acl::checkRight('booui'))
+ $this->_redirect('/user/index');
+
+ $this->bootMenumapper = new Application_Model_BootMenuMapper();
+ $this->bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
+ $bootosMapper = new Application_Model_BootOsMapper();
+ $configMapper = new Application_Model_ConfigMapper();
+
+ if($this->type =='group' && Pbs_Acl::checkRight('booai')){
+ $this->view->type = 'group';
+ $bootmenu = $this->bootmenuMapper->findBy(array('groupID' => $this->membership->getGroupID()));
+ foreach ($bootmenu as $bm){
+ $bm->setCreated(date(Zend_Registry::get('dateformat'),$bm->getCreated()));
+ $bootmenuID = $bm->getID();
+ $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID));
+ foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){
+ $kcl = $bootosMapper->find($bootmenuentry->getBootosID())->getDefaultkcl();
+ if($bootmenuentry->getKcl() && $kcl != null)
+ $bootmenuentry->setKcl($kcl);
+ else
+ $bootmenuentry->setKcl("deactivated (edit Bootmenuentry to activate)");
+ if($bootmenuentry->getKclappend() == null)
+ $bootmenuentry->setKclappend("none (edit Bootmenuentry to set KCL-Append)");
+ $bootmenuentry->setBootosID("[".$bootmenuentry->getBootosID()."] ".$bootosMapper->find($bootmenuentry->getBootosID())->getTitle());
$bootmenuentry->setConfigID("[".$bootmenuentry->getConfigID()."] ".$configMapper->find($bootmenuentry->getConfigID())->gettitle());
- }
- }
- }else{
+ }
+ }
+ }else{
$this->view->type = 'own';
- $bootmenu = $this->bootmenuMapper->findBy(array('membershipID' => $this->membership->getID()));
- if($bootmenu != null){
- $bootmenu[0]->setCreated(date(Zend_Registry::get('dateformat'),$bootmenu[0]->getCreated()));
- $bootmenuID = $bootmenu[0]->getID();
- $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID));
- foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){
- $kcl = $bootosMapper->find($bootmenuentry->getBootosID())->getDefaultkcl();
- if($bootmenuentry->getKcl() && $kcl != null)
- $bootmenuentry->setKcl($kcl);
- else
- $bootmenuentry->setKcl("deactivated (edit Bootmenuentry to activate)");
- if($bootmenuentry->getKclappend() == null)
- $bootmenuentry->setKclappend("none");
- $bootmenuentry->setBootosID("[".$bootmenuentry->getBootosID()."] ".$bootosMapper->find($bootmenuentry->getBootosID())->getTitle());
+ $bootmenu = $this->bootmenuMapper->findBy(array('membershipID' => $this->membership->getID()));
+ if($bootmenu != null){
+ $bootmenu[0]->setCreated(date(Zend_Registry::get('dateformat'),$bootmenu[0]->getCreated()));
+ $bootmenuID = $bootmenu[0]->getID();
+ $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID));
+ foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){
+ $kcl = $bootosMapper->find($bootmenuentry->getBootosID())->getDefaultkcl();
+ if($bootmenuentry->getKcl() && $kcl != null)
+ $bootmenuentry->setKcl($kcl);
+ else
+ $bootmenuentry->setKcl("deactivated (edit Bootmenuentry to activate)");
+ if($bootmenuentry->getKclappend() == null)
+ $bootmenuentry->setKclappend("none");
+ $bootmenuentry->setBootosID("[".$bootmenuentry->getBootosID()."] ".$bootosMapper->find($bootmenuentry->getBootosID())->getTitle());
$bootmenuentry->setConfigID("[".$bootmenuentry->getConfigID()."] ".$configMapper->find($bootmenuentry->getConfigID())->gettitle());
- }
- }
- }
-
- // Search
+ }
+ }
+ }
+
+ // Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
- $mySearch->setSearchTerm($search);
+ $mySearch->setSearchTerm($search);
$mySearch->setType($this->type);
$mySearch->setModule('bootmenu');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $bootmenu = $mySearch->search($bootmenu);
+ $this->view->search = $mySearch->getSearchTerm();
+ $bootmenu = $mySearch->search($bootmenu);
}
$this->view->searchform = $mySearch->searchForm();
-
- // Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+
+ // Pagination
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($bootmenu);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/bootmenu/index/type/'.$this->type.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $bootmenu = $pagination->getElements();
-
+ $bootmenu = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
-
- $this->view->bootmenulist = $bootmenu;
- $this->view->bootmenuentrylist = $bootmenuentries;
-
- }
-
- public function searchAction(){
+
+ $this->view->bootmenulist = $bootmenu;
+ @$this->view->bootmenuentrylist = $bootmenuentries;
+
+ }
+
+ public function searchAction(){
$this->_redirect('/user/bootmenu/index/type/'.$this->type.'/search/'.($_GET['search']));
}
-
- public function createbootmenuAction()
- {
- //ACL Darf er BootMenus erstellen?
- if(!Pbs_Acl::checkRight('booc'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
-
- if (!isset($_POST["createbootmenu"])){
- $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page, 'type'=>$this->type));
- } else {
-
- $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page, 'type'=>$this->type),$_POST);
-
- if ($bootmenuForm->isValid($_POST)) {
-
- $bootmenu = new Application_Model_BootMenu($_POST);
- $bootmenu->setCreated(time());
- $bootmenu->setGroupID($this->membership->getGroupID());
- $bootmenu->setDefaultbootmenu('0');
-
- try{
- $this->bootmenuMapper->save($bootmenu);
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
- }
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
- }
- }
-
- $this->view->bootmenuForm = $bootmenuForm;
- }
-
- public function editbootmenuAction()
- {
-
- //ACL Is he allowed to edit BootMenus?
- if(!Pbs_Acl::checkRight('booe'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
-
- $bootmenuID = $this->_request->getParam('bootmenuID');
- if (!is_numeric($bootmenuID))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
-
- $bootmenu = new Application_Model_BootMenu();
- $this->bootmenuMapper->find($bootmenuID, $bootmenu);
-
- if($this->membership->getGroupID() != $bootmenu->getGroupID())
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
-
- if (!isset($_POST["editbootmenu"])){
-
- $bootmenuForm = new user_Form_Bootmenu(array('action' => 'editbootmenu','page' => $this->page, 'type'=>$this->type));
- $bootmenuForm->populate($bootmenu->toArray());
-
- }else{
- $bootmenuForm = new user_Form_Bootmenu(array('action' => 'editbootmenu','page' => $this->page, 'type'=>$this->type),$_POST);
-
- if ($bootmenuForm->isValid($_POST)) {
-
- $bootmenuold = $bootmenu;
-
- $bootmenu = new Application_Model_BootMenu($_POST);
- $bootmenu->setGroupID($this->membership->getGroupID());
- $bootmenu->setCreated(time());
- $bootmenu->setID($bootmenuID);
- $bootmenu->setDefaultbootmenu($bootmenuold->getDefaultbootmenu());
-
- try {
- $this->bootmenuMapper->save($bootmenu);
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
- }
-
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
- }
-
- }
-
- $this->view->bootmenuForm = $bootmenuForm;
- }
-
- public function deletebootmenuAction()
- {
-
- //ACL Is he allowed to delete Bootmenu?
- if(!Pbs_Acl::checkRight('bood'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
-
- try{
- $bootmenuID = $this->_request->getParam('bootmenuID');
- if (!is_numeric($bootmenuID))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
-
- $bootmenu = new Application_Model_BootMenu();
- $this->bootmenuMapper->find($bootmenuID, $bootmenu);
-
- if($this->membership->getGroupID() != $bootmenu->getGroupID())
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
-
- $this->bootmenuMapper->delete($bootmenu);
-
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
- }
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
- }
-
- public function defaultbootmenuAction()
- {
-
- //ACL Is he allowed to set Bootmenu as Default?
- if(!Pbs_Acl::checkRight('boodbm'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
-
- try{
- $bootmenuID = $this->_request->getParam('bootmenuID');
- if (!is_numeric($bootmenuID))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
-
- $bootmenu = new Application_Model_BootMenu();
-
- $this->bootmenuMapper->find($bootmenuID, $bootmenu);
+
+ public function createbootmenuAction()
+ {
+ //ACL Darf er BootMenus erstellen?
+ if(!Pbs_Acl::checkRight('booc'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
- if($bootmenu->getDefaultbootmenu() == false){
-
- @list($defaultbootmenu) = $this->bootmenuMapper->findBy(array('defaultbootmenu' => '1'));
- if($defaultbootmenu != null){
- $defaultbootmenu->setDefaultbootmenu(false);
- $this->bootmenuMapper->save($defaultbootmenu);
- }
- $bootmenu->setDefaultbootmenu(true);
- $this->bootmenuMapper->save($bootmenu);
- }
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
- }
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
-
- }
-
- public function addbootmenuentryAction()
- {
-
- //ACL Darf er BootMenuEntries erstellen?
- if(!Pbs_Acl::checkRight('booae') && !Pbs_Acl::checkRight('booaeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
-
- $bootmenuID = $this->_request->getParam('bootmenuID');
- $maxorder = $this->_request->getParam('maxorder');
-
- if (!is_numeric($bootmenuID) || !is_numeric($maxorder))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
-
- $bootosMapper = new Application_Model_BootOsMapper();
- $configMapper = new Application_Model_ConfigMapper();
- $groupMapper = new Application_Model_GroupMapper();
-
- $groupID = $this->membership->getGroupID();
- $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
-
- $parents = array();
- $bootoslist = array();
- $parents = $groupgroupsMapper->getParentGroups($groupID);
-
- foreach($parents as $k => $parent){
- foreach($parent as $p){
- $bootos = $bootosMapper->findBy(array("groupID" => $p));
- foreach ($bootos as $b)
- if($b->getPublic() - $k >= 0 ){
- $grouptitle = $groupMapper->find($p)->getTitle();
- $bootoslist[$b->getID()] = $b;
- $bootosanzeige[$grouptitle][$b->getID()] = $b->getTitle();
- }
- }
- }
-
- $configlist = array('Preset' => array(), 'Custom' => Array());
- $configlist['Preset'] = $configMapper->findBy(array('groupID' => $groupID));
- $configlist['Custom'] = $configMapper->findBy(array('membershipID' => $this->membership->getID()));
-
- $bootmenu = new Application_Model_BootMenu();
- $this->bootmenuMapper->find($bootmenuID, $bootmenu);
-
- if($bootmenu->getMembershipID() != null){
- if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booaeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
- }else{
- if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('booae'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
- }
-
- if (!isset($_POST["addbootmenuentry"])){
-
- if(!isset($_POST['kcl']))
- $_POST['kcl'] = true;
-
- $bootmenuentryForm = new user_Form_BootmenuEntries(array(
+ if (!isset($_POST["createbootmenu"])){
+ $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page, 'type'=>$this->type));
+ } else {
+
+ $bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page, 'type'=>$this->type),$_POST);
+
+ if ($bootmenuForm->isValid($_POST)) {
+
+ $bootmenu = new Application_Model_BootMenu($_POST);
+ $bootmenu->setCreated(time());
+ $bootmenu->setGroupID($this->membership->getGroupID());
+ $bootmenu->setDefaultbootmenu('0');
+
+ try{
+ $this->bootmenuMapper->save($bootmenu);
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
+ }
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
+ }
+ }
+
+ $this->view->bootmenuForm = $bootmenuForm;
+ }
+
+ public function editbootmenuAction()
+ {
+
+ //ACL Is he allowed to edit BootMenus?
+ if(!Pbs_Acl::checkRight('booe'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+
+ $bootmenuID = $this->_request->getParam('bootmenuID');
+ if (!is_numeric($bootmenuID))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+
+ $bootmenu = new Application_Model_BootMenu();
+ $this->bootmenuMapper->find($bootmenuID, $bootmenu);
+
+ if($this->membership->getGroupID() != $bootmenu->getGroupID())
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+
+ if (!isset($_POST["editbootmenu"])){
+
+ $bootmenuForm = new user_Form_Bootmenu(array('action' => 'editbootmenu','page' => $this->page, 'type'=>$this->type));
+ $bootmenuForm->populate($bootmenu->toArray());
+
+ }else{
+ $bootmenuForm = new user_Form_Bootmenu(array('action' => 'editbootmenu','page' => $this->page, 'type'=>$this->type),$_POST);
+
+ if ($bootmenuForm->isValid($_POST)) {
+
+ $bootmenuold = $bootmenu;
+
+ $bootmenu = new Application_Model_BootMenu($_POST);
+ $bootmenu->setGroupID($this->membership->getGroupID());
+ $bootmenu->setCreated(time());
+ $bootmenu->setID($bootmenuID);
+ $bootmenu->setDefaultbootmenu($bootmenuold->getDefaultbootmenu());
+ print_a($bootmenu);
+ try {
+ $this->bootmenuMapper->save($bootmenu);
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+ }
+
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
+ }
+
+ }
+
+ $this->view->bootmenuForm = $bootmenuForm;
+ }
+
+ public function deletebootmenuAction()
+ {
+
+ //ACL Is he allowed to delete Bootmenu?
+ if(!Pbs_Acl::checkRight('bood'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+
+ try{
+ $bootmenuID = $this->_request->getParam('bootmenuID');
+ if (!is_numeric($bootmenuID))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+
+ $bootmenu = new Application_Model_BootMenu();
+ $this->bootmenuMapper->find($bootmenuID, $bootmenu);
+
+ if($this->membership->getGroupID() != $bootmenu->getGroupID())
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+
+ $this->bootmenuMapper->delete($bootmenu);
+
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
+ }
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
+ }
+
+ public function defaultbootmenuAction()
+ {
+
+ //ACL Is he allowed to set Bootmenu as Default?
+ if(!Pbs_Acl::checkRight('boodbm'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+
+ try{
+ $bootmenuID = $this->_request->getParam('bootmenuID');
+ if (!is_numeric($bootmenuID))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+
+ $bootmenu = new Application_Model_BootMenu();
+
+ $this->bootmenuMapper->find($bootmenuID, $bootmenu);
+
+ if($bootmenu->getDefaultbootmenu() == false){
+
+ @list($defaultbootmenu) = $this->bootmenuMapper->findBy(array('defaultbootmenu' => '1'));
+ if($defaultbootmenu != null){
+ $defaultbootmenu->setDefaultbootmenu(false);
+ $this->bootmenuMapper->save($defaultbootmenu);
+ }
+ $bootmenu->setDefaultbootmenu(true);
+ $this->bootmenuMapper->save($bootmenu);
+ }
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+ }
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
+
+ }
+
+ public function addbootmenuentryAction()
+ {
+
+ //ACL Darf er BootMenuEntries erstellen?
+ if(!Pbs_Acl::checkRight('booae') && !Pbs_Acl::checkRight('booaeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
+
+ $bootmenuID = $this->_request->getParam('bootmenuID');
+ $maxorder = $this->_request->getParam('maxorder');
+
+ if (!is_numeric($bootmenuID) || !is_numeric($maxorder))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+
+ $bootosMapper = new Application_Model_BootOsMapper();
+ $configMapper = new Application_Model_ConfigMapper();
+ $groupMapper = new Application_Model_GroupMapper();
+
+ $groupID = $this->membership->getGroupID();
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+
+ $parents = array();
+ $bootoslist = array();
+ $parents = $groupgroupsMapper->getParentGroups($groupID);
+
+ foreach($parents as $k => $parent){
+ foreach($parent as $p){
+ $bootos = $bootosMapper->findBy(array("groupID" => $p));
+ foreach ($bootos as $b)
+ if($b->getPublic() - $k >= 0 ){
+ $grouptitle = $groupMapper->find($p)->getTitle();
+ $bootoslist[$b->getID()] = $b;
+ $bootosanzeige[$grouptitle][$b->getID()] = $b->getTitle();
+ }
+ }
+ }
+
+ $configlist = array('Preset' => array(), 'Custom' => Array());
+ $configlist['Preset'] = $configMapper->findBy(array('groupID' => $groupID));
+ $configlist['Custom'] = $configMapper->findBy(array('membershipID' => $this->membership->getID()));
+
+ $bootmenu = new Application_Model_BootMenu();
+ $this->bootmenuMapper->find($bootmenuID, $bootmenu);
+
+ if($bootmenu->getMembershipID() != null){
+ if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booaeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('booae'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
+ }
+
+ if (!isset($_POST["addbootmenuentry"])){
+
+ if(!isset($_POST['kcl']))
+ $_POST['kcl'] = true;
+
+ $bootmenuentryForm = new user_Form_BootmenuEntries(array(
'bootoslist'=> $bootoslist,
'bootosanzeige' => $bootosanzeige,
'maxorder'=> $maxorder,
@@ -364,16 +364,16 @@ class user_BootmenuController extends Zend_Controller_Action
'page' => $this->page,
'type' => $this->type,
'action' => 'addbootmenuentry',
- ));
-
- $bootmenuentryForm->populate(array('order' => $maxorder));
- unset($_POST['defaultkcl']);
- unset($_POST['configID']);
- $bootmenuentryForm->populate($_POST);
-
- } else {
-
- $bootmenuentryForm = new user_Form_BootmenuEntries(array(
+ ));
+
+ $bootmenuentryForm->populate(array('order' => $maxorder));
+ unset($_POST['defaultkcl']);
+ unset($_POST['configID']);
+ $bootmenuentryForm->populate($_POST);
+
+ } else {
+
+ $bootmenuentryForm = new user_Form_BootmenuEntries(array(
'bootoslist'=>$bootoslist,
'bootosanzeige' => $bootosanzeige,
'maxorder'=> $maxorder,
@@ -381,96 +381,96 @@ class user_BootmenuController extends Zend_Controller_Action
'page' => $this->page,
'type' => $this->type,
'action' => 'addbootmenuentry',
- ),$_POST);
-
- if ($bootmenuentryForm->isValid($_POST)) {
-
- $bootmenuentry = new Application_Model_BootMenuEntries($_POST);
- $bootmenuentry->setBootmenuID($bootmenuID);
-
- try {
- if($bootmenuentry->getOrder() < $maxorder){
- $bootmenuentry->setOrder($bootmenuentry->getOrder());
- $this->bootmenuentryMapper->order($bootmenuentry);
- }
-
- //print_a($bootmenuentry);
-
- $this->bootmenuentryMapper->save($bootmenuentry);
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
-
- }
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
- }
- }
-
- $this->view->bootmenuentryForm = $bootmenuentryForm;
-
- }
-
- public function editbootmenuentryAction()
- {
- //ACL Is he allowed to edit BootMenus?
- if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem') && !Pbs_Acl::checkRight('booeeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
-
- $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
- $maxorder = $this->_request->getParam('maxorder');
- $oldorder = $this->_request->getParam('oldorder');
- if (!is_numeric($bootmenuentryID) || !is_numeric($maxorder) || !is_numeric($oldorder))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
-
- $bootosMapper = new Application_Model_BootOsMapper();
- $configMapper = new Application_Model_ConfigMapper();
-
- $groupID = $this->membership->getGroupID();
- $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
- $groupMapper = new Application_Model_GroupMapper();
-
- $parents = array();
- $bootoslist = array();
- $parents = $groupgroupsMapper->getParentGroups($groupID);
-
- foreach($parents as $k => $parent){
- foreach($parent as $p){
- $bootos = $bootosMapper->findBy(array("groupID" => $p));
- foreach ($bootos as $b)
- if($b->getPublic() - $k >= 0 ){
- $grouptitle = $groupMapper->find($p)->getTitle();
- $bootoslist[$b->getID()] = $b;
- $bootosanzeige[$grouptitle][$b->getID()] = $b->getTitle();
- }
- }
- }
-
- $configlist = array('Preset' => array(), 'Custom' => Array());
- $configlist['Preset'] = $configMapper->findBy(array('groupID' => $groupID));
- $configlist['Custom'] = $configMapper->findBy(array('membershipID' => $this->membership->getID()));
-
- $bootmenuentry = new Application_Model_BootMenuEntries();
- $bootmenu = new Application_Model_BootMenu();
- $this->bootmenuentryMapper->find($bootmenuentryID, $bootmenuentry);
- $this->bootmenuMapper->find($bootmenuentry->getBootmenuID(), $bootmenu);
-
- if($bootmenu->getMembershipID() != null){
- if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booeeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
- }else{
- if($this->membership->getGroupID() != $bootmenu->getGroupID() || (!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem')))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
- }
-
- if (!isset($_POST["editbootmenuentry"])){
- if(!isset($_POST['bootosID']))
- $_POST['bootosID'] = $bootmenuentry->getBootosID();
- if(!isset($_POST['kcl']))
- $_POST['kcl'] = $bootmenuentry->getKcl();
-
- $bootmenuentryForm = new user_Form_BootmenuEntries(array(
+ ),$_POST);
+
+ if ($bootmenuentryForm->isValid($_POST)) {
+
+ $bootmenuentry = new Application_Model_BootMenuEntries($_POST);
+ $bootmenuentry->setBootmenuID($bootmenuID);
+
+ try {
+ if($bootmenuentry->getOrder() < $maxorder){
+ $bootmenuentry->setOrder($bootmenuentry->getOrder());
+ $this->bootmenuentryMapper->order($bootmenuentry);
+ }
+
+ //print_a($bootmenuentry);
+
+ $this->bootmenuentryMapper->save($bootmenuentry);
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
+
+ }
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
+ }
+ }
+
+ $this->view->bootmenuentryForm = $bootmenuentryForm;
+
+ }
+
+ public function editbootmenuentryAction()
+ {
+ //ACL Is he allowed to edit BootMenus?
+ if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem') && !Pbs_Acl::checkRight('booeeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+
+ $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
+ $maxorder = $this->_request->getParam('maxorder');
+ $oldorder = $this->_request->getParam('oldorder');
+ if (!is_numeric($bootmenuentryID) || !is_numeric($maxorder) || !is_numeric($oldorder))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+
+ $bootosMapper = new Application_Model_BootOsMapper();
+ $configMapper = new Application_Model_ConfigMapper();
+
+ $groupID = $this->membership->getGroupID();
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+ $groupMapper = new Application_Model_GroupMapper();
+
+ $parents = array();
+ $bootoslist = array();
+ $parents = $groupgroupsMapper->getParentGroups($groupID);
+
+ foreach($parents as $k => $parent){
+ foreach($parent as $p){
+ $bootos = $bootosMapper->findBy(array("groupID" => $p));
+ foreach ($bootos as $b)
+ if($b->getPublic() - $k >= 0 ){
+ $grouptitle = $groupMapper->find($p)->getTitle();
+ $bootoslist[$b->getID()] = $b;
+ $bootosanzeige[$grouptitle][$b->getID()] = $b->getTitle();
+ }
+ }
+ }
+
+ $configlist = array('Preset' => array(), 'Custom' => Array());
+ $configlist['Preset'] = $configMapper->findBy(array('groupID' => $groupID));
+ $configlist['Custom'] = $configMapper->findBy(array('membershipID' => $this->membership->getID()));
+
+ $bootmenuentry = new Application_Model_BootMenuEntries();
+ $bootmenu = new Application_Model_BootMenu();
+ $this->bootmenuentryMapper->find($bootmenuentryID, $bootmenuentry);
+ $this->bootmenuMapper->find($bootmenuentry->getBootmenuID(), $bootmenu);
+
+ if($bootmenu->getMembershipID() != null){
+ if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booeeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $bootmenu->getGroupID() || (!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem')))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }
+
+ if (!isset($_POST["editbootmenuentry"])){
+ if(!isset($_POST['bootosID']))
+ $_POST['bootosID'] = $bootmenuentry->getBootosID();
+ if(!isset($_POST['kcl']))
+ $_POST['kcl'] = $bootmenuentry->getKcl();
+
+ $bootmenuentryForm = new user_Form_BootmenuEntries(array(
'bootoslist'=> $bootoslist,
'bootosanzeige' => $bootosanzeige,
'maxorder'=> $maxorder-1,
@@ -478,19 +478,19 @@ class user_BootmenuController extends Zend_Controller_Action
'page' => $this->page,
'type' => $this->type,
'action' => 'editbootmenuentry',
- ));
+ ));
- if(!isset($_POST['configID'])){
- $bootmenuentryForm->populate($bootmenuentry->toArray());
+ if(!isset($_POST['configID'])){
+ $bootmenuentryForm->populate($bootmenuentry->toArray());
+ }
+ else{
+ unset($_POST['defaultkcl']);
+ unset($_POST['configID']);
+ $bootmenuentryForm->populate($_POST);
}
- else{
- unset($_POST['defaultkcl']);
- unset($_POST['configID']);
- $bootmenuentryForm->populate($_POST);
- }
-
- }else{
- $bootmenuentryForm = new user_Form_BootmenuEntries(array(
+
+ }else{
+ $bootmenuentryForm = new user_Form_BootmenuEntries(array(
'bootoslist'=> $bootoslist,
'bootosanzeige' => $bootosanzeige,
'maxorder'=> $maxorder-1,
@@ -498,83 +498,83 @@ class user_BootmenuController extends Zend_Controller_Action
'page' => $this->page,
'type' => $this->type,
'action' => 'editbootmenuentry'),$_POST);
-
- if ($bootmenuentryForm->isValid($_POST)) {
-
- $bootmenuentryold= $bootmenuentry;
-
- $bootmenuentry = new Application_Model_BootMenuEntries($_POST);
- $bootmenuentry->setBootmenuID($bootmenu->getID());
- $bootmenuentry->setID($bootmenuentryID);
-
- if( $bootmenuentryold->getBootosID() != $bootmenuentry->getBootosID() ||
- $bootmenuentryold->getConfigID() != $bootmenuentry->getConfigID() ||
- $bootmenuentryold->getKcl() != $bootmenuentry->getKcl() ||
- $bootmenuentryold->getKclappend() != $bootmenuentry->getKclappend()){
- //ACL Is he allowed to edit this?
- if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
- }
-
- try {
- if($bootmenuentry->getOrder() < $oldorder)
- $this->bootmenuentryMapper->orderbefore($bootmenuentry, $oldorder);
- else
- $this->bootmenuentryMapper->orderafter($bootmenuentry, $oldorder);
-
- $this->bootmenuentryMapper->save($bootmenuentry);
-
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
-
- }
-
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
- }
-
- }
-
- $this->view->bootmenuentryForm = $bootmenuentryForm;
-
- }
-
- public function removebootmenuentryAction()
- {
- //ACL Is he allowed to delete Bootos?
- if(!Pbs_Acl::checkRight('boode') && !Pbs_Acl::checkRight('boodeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
-
- try{
- $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
- if (!is_numeric($bootmenuentryID))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
-
- $bootmenuentry = new Application_Model_BootMenuEntries();
- $bootmenu = new Application_Model_BootMenu();
- $this->bootmenuentryMapper->find($bootmenuentryID, $bootmenuentry);
- $this->bootmenuMapper->find($bootmenuentry->getBootmenuID(), $bootmenu);
-
- if($bootmenu->getMembershipID() != null){
- if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('boodeo'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
- }else{
- if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('boode'))
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
- }
-
- $this->bootmenuentryMapper->delete($bootmenuentry);
- $this->bootmenuentryMapper->orderremove($bootmenuentry);
-
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
- }
- $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
- }
+
+ if ($bootmenuentryForm->isValid($_POST)) {
+
+ $bootmenuentryold= $bootmenuentry;
+
+ $bootmenuentry = new Application_Model_BootMenuEntries($_POST);
+ $bootmenuentry->setBootmenuID($bootmenu->getID());
+ $bootmenuentry->setID($bootmenuentryID);
+
+ if( $bootmenuentryold->getBootosID() != $bootmenuentry->getBootosID() ||
+ $bootmenuentryold->getConfigID() != $bootmenuentry->getConfigID() ||
+ $bootmenuentryold->getKcl() != $bootmenuentry->getKcl() ||
+ $bootmenuentryold->getKclappend() != $bootmenuentry->getKclappend()){
+ //ACL Is he allowed to edit this?
+ if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }
+
+ try {
+ if($bootmenuentry->getOrder() < $oldorder)
+ $this->bootmenuentryMapper->orderbefore($bootmenuentry, $oldorder);
+ else
+ $this->bootmenuentryMapper->orderafter($bootmenuentry, $oldorder);
+
+ $this->bootmenuentryMapper->save($bootmenuentry);
+
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+
+ }
+
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
+ }
+
+ }
+
+ $this->view->bootmenuentryForm = $bootmenuentryForm;
+
+ }
+
+ public function removebootmenuentryAction()
+ {
+ //ACL Is he allowed to delete Bootos?
+ if(!Pbs_Acl::checkRight('boode') && !Pbs_Acl::checkRight('boodeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+
+ try{
+ $bootmenuentryID = $this->_request->getParam('bootmenuentryID');
+ if (!is_numeric($bootmenuentryID))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+
+ $bootmenuentry = new Application_Model_BootMenuEntries();
+ $bootmenu = new Application_Model_BootMenu();
+ $this->bootmenuentryMapper->find($bootmenuentryID, $bootmenuentry);
+ $this->bootmenuMapper->find($bootmenuentry->getBootmenuID(), $bootmenu);
+
+ if($bootmenu->getMembershipID() != null){
+ if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('boodeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('boode'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+ }
+
+ $this->bootmenuentryMapper->delete($bootmenuentry);
+ $this->bootmenuentryMapper->orderremove($bootmenuentry);
+
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
+ }
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
+ }
}
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php
index 6330899..06eb60c 100644
--- a/application/modules/user/controllers/BootosController.php
+++ b/application/modules/user/controllers/BootosController.php
@@ -27,7 +27,6 @@ class user_BootosController extends Zend_Controller_Action
}
$this->bootosMapper = new Application_Model_BootOsMapper();
-
$this->membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
@@ -61,7 +60,7 @@ class user_BootosController extends Zend_Controller_Action
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('update',$result);
}
-
+
$groupID = $this->membership->getGroupID();
//ACL Darf er BootOs sehen?
@@ -84,13 +83,13 @@ class user_BootosController extends Zend_Controller_Action
$this->view->bootoslist[] = $b;
}
}
-
+
$this->view->bootoslist = array_reverse($this->view->bootoslist);
$this->view->update = array();
$update = $this->_request->getParam('checkupdate');
$groupMapper = new Application_Model_GroupMapper();
-
+
if(count($this->view->bootoslist)>0){
foreach ($this->view->bootoslist as $bootos){
$this->view->update[$bootos->getID()] = $update && $this->checkupdateAction($bootos);
@@ -112,7 +111,7 @@ class user_BootosController extends Zend_Controller_Action
$this->view->bootoslist = $mySearch->search($this->view->bootoslist);
}
$this->view->searchform = $mySearch->searchForm();
-
+
// Pagination
$pagination = new Pbs_Pagination();
$pagination->setPerPage(10);
@@ -123,8 +122,7 @@ class user_BootosController extends Zend_Controller_Action
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
-
-
+
}
public function searchAction(){
$this->_redirect('/user/bootos/index/search/'.($_GET['search']));
@@ -132,7 +130,7 @@ class user_BootosController extends Zend_Controller_Action
public function createbootosAction()
{
-
+
//ACL Darf er BootISOs erstellen?
if(!Pbs_Acl::checkRight('boc'))
$this->_redirect('/user/bootos/index/page/'.$this->page.'/addresult/forbidden');
@@ -141,7 +139,7 @@ class user_BootosController extends Zend_Controller_Action
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
$childgroups = count($groupgroupsMapper->getChildGroups($groupID));
-
+
if (!isset($_POST["createbootos"])){
$bootosForm = new user_Form_Bootos(array(
'action' => 'createbootos',
@@ -193,6 +191,7 @@ class user_BootosController extends Zend_Controller_Action
exec("mv ../resources/bootos/initramfs$hash $initpath"."initramfs");
exec("mv ../resources/bootos/config$hash $configpath"."default.tgz");
+
}catch(Zend_Exception $e)
{
echo "Caught exception: " . get_class($e) . "<br/>";
@@ -215,13 +214,14 @@ class user_BootosController extends Zend_Controller_Action
//ACL Is he allowed to update Preboots?
if(!Pbs_Acl::checkRight('bou'))
$this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
-
+
$bootosID = $bootos->getID();
if(is_file("../resources/bootos/$bootosID/kernel/kernel") && is_file("../resources/bootos/$bootosID/initramfs/initramfs") && is_file("../resources/bootos/$bootosID/config/config.tgz")){
$kernelolddate = filemtime("../resources/bootos/".$bootosID."/kernel/kernel");
$initolddate = filemtime("../resources/bootos/".$bootosID."/initramfs/initramfs");
$configolddate = filemtime("../resources/bootos/".$bootosID."/config/default.tgz");
+
}
else
{
@@ -239,7 +239,7 @@ class user_BootosController extends Zend_Controller_Action
$configdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($configdate))));
//print_a($bootos->getPath_kernel(),$kerneldate,$kernelolddate,$initname,$initdate,$initolddate);
-
+
if($kerneldate > $kernelolddate || $initdate > $initolddate || $configdate > $configolddate){
$this->view->notification = $pbsNotifier->notify('There are updates available','ok');
return true;
@@ -269,7 +269,7 @@ class user_BootosController extends Zend_Controller_Action
$kernelpath = "../resources/bootos/".$bootosID."/kernel/";
$configpath = "../resources/bootos/".$bootosID."/config/";
$path_tmp = "../resources/bootos/";
-
+
$hash = md5(microtime(1));
exec("wget -O '".$path_tmp."kernel".$hash."' ".escapeshellcmd($bootos->getPath_kernel())." 2>&1 | grep 'saved'", $status);
exec("wget -O '".$path_tmp."initramfs".$hash."' ".escapeshellcmd($bootos->getPath_init())." 2>&1 | grep 'saved'", $status2);
@@ -293,7 +293,7 @@ class user_BootosController extends Zend_Controller_Action
//ACL Is he allowed to edit Preboots?
if(!Pbs_Acl::checkRight('boe') && !Pbs_Acl::checkRight('boem'))
$this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
-
+
$bootosID = $this->_request->getParam('bootosID');
if (!is_numeric($bootosID))
$this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
@@ -302,13 +302,12 @@ class user_BootosController extends Zend_Controller_Action
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
$childgroups = count($groupgroupsMapper->getChildGroups($groupID));
-
$bootos = new Application_Model_BootOs();
$bootos = $this->bootosMapper->find($bootosID);
if($this->membership->getGroupID() != $bootos->getGroupID())
$this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
-
+
if (!isset($_POST["editbootos"])){
$bootosForm = new user_Form_Bootos(array(
@@ -345,7 +344,7 @@ class user_BootosController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('boe'))
$this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
}
-
+
if($bootos->getPath_config() != $bootosold->getPath_config() || $bootos->getPath_kernel() != $bootosold->getPath_kernel() || $bootos->getPath_init() != $bootosold->getPath_init()){
//ACL Is he allowed to edit the Kernel/Init Path?
if(!Pbs_Acl::checkRight('boe'))
@@ -353,6 +352,7 @@ class user_BootosController extends Zend_Controller_Action
$path_tmp = "../resources/bootos/";
+
$hash = md5(microtime(1));
exec("wget -O '".$path_tmp."kernel".$hash."' ".escapeshellcmd($bootos->getPath_kernel())." 2>&1 | grep 'saved'", $status);
exec("wget -O '".$path_tmp."initramfs".$hash."' ".escapeshellcmd($bootos->getPath_init())." 2>&1 | grep 'saved'", $status2);
@@ -377,6 +377,7 @@ class user_BootosController extends Zend_Controller_Action
exec("mv ../resources/bootos/kernel$hash $kernelpath"."kernel");
exec("mv ../resources/bootos/initramfs$hash $initpath"."initramfs");
exec("mv ../resources/bootos/config$hash $initpath"."default.tgz");
+
}
try {
@@ -404,7 +405,7 @@ class user_BootosController extends Zend_Controller_Action
//ACL Is he allowed to delete Bootos?
if(!Pbs_Acl::checkRight('bod'))
$this->_redirect('/user/bootos/index/page/'.$this->page.'/deleteresult/forbidden');
-
+
try{
$bootosID = $this->_request->getParam('bootosID');
if (!is_numeric($bootosID))
@@ -414,8 +415,8 @@ class user_BootosController extends Zend_Controller_Action
$this->bootosMapper->find($bootosID, $bootos);
if($this->membership->getGroupID() != $bootos->getGroupID())
- $this->_redirect('/user/bootos/index/page/'.$this->page.'/deleteresult/forbidden');
-
+ $this->_redirect('/user/bootos/index/page/'.$this->page.'/deleteresult/forbidden');
+
$this->bootosMapper->delete($bootos);
exec("rm -r ../resources/bootos/".$bootosID);
diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php
index cbb114a..589fcdc 100644
--- a/application/modules/user/controllers/ClientController.php
+++ b/application/modules/user/controllers/ClientController.php
@@ -14,7 +14,7 @@ class User_ClientController extends Zend_Controller_Action
{
private $membership;
protected $page;
-
+
public function init()
{
if (Zend_Auth::getInstance()->hasIdentity()) {
@@ -30,14 +30,14 @@ class User_ClientController extends Zend_Controller_Action
} else {
$this->_helper->redirector('login', 'auth');
}
- $this->page = $this->_request->getParam('page');
+ $this->page = $this->_request->getParam('page');
}
public function indexAction()
{
// ACL: is he authorized to see this ?
if(!Pbs_Acl::checkRight('clo'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
// Get the Clients which booted with a bootiso of this group
$result = $this->_request->getParam('deleteresult');
@@ -58,27 +58,32 @@ class User_ClientController extends Zend_Controller_Action
$clientMapper = new Application_Model_ClientMapper();
$clientsInGroup = $clientMapper->findBy(array('groupID' => $this->membership->getGroupID()),true);
-
+
// Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setModule('client');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $clientsInGroup = $mySearch->search($clientsInGroup);
+ $this->view->search = $mySearch->getSearchTerm();
+ $clientsInGroup = $mySearch->search($clientsInGroup);
}
$this->view->searchform = $mySearch->searchForm();
+ // Format Time-String
+ foreach($clientsInGroup as $k=>$cig){
+ $clientsInGroup[$k]['created'] = date(Zend_Registry::get('dateformat'),$cig['created']);
+ }
+
// Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($clientsInGroup);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/client/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $clientsInGroup = $pagination->getElements();
-
- $this->view->pagination = $pagination->pagination($pageurl);
+ $clientsInGroup = $pagination->getElements();
+
+ $this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
$this->view->clients = $clientsInGroup;
@@ -94,7 +99,7 @@ class User_ClientController extends Zend_Controller_Action
// ACL: is he authorized to create new clients?
if(!Pbs_Acl::checkRight('cla'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
if (!isset($_POST["add"])){
$addclient = new user_Form_Client(array(
@@ -102,7 +107,7 @@ class User_ClientController extends Zend_Controller_Action
'page' => $this->page));
$this->view->addclient = $addclient;
}
- else{
+ else{
$addclient = new user_Form_Client(array(
'buttontext' => 'Create Client',
'page' => $this->page),$_POST);
@@ -111,7 +116,8 @@ class User_ClientController extends Zend_Controller_Action
$mac = ($mac!='')?$mac:$_POST['macadress'];
$hh = ($hh!='')?$hh:$_POST['hardwarehash'];
$client->setMacadress($mac);
- $client->setHardwarehash($hh);
+ $client->setHardwarehash($hh);
+ $client->setCreated(time());
$client->setGroupID($this->membership->getGroupID());
$clientmapper = new Application_Model_ClientMapper();
$clientmapper->save($client);
@@ -124,11 +130,11 @@ class User_ClientController extends Zend_Controller_Action
public function removeclientAction()
{
$clientID = $this->_request->getParam('clientID');
-
+
// ACL: is he authorized to delete clients?
if(!Pbs_Acl::checkRight('cld'))
- $this->_redirect('/user');
-
+ $this->_redirect('/user');
+
$clientMapper = new Application_Model_ClientMapper();
if(is_numeric($clientID)){
$client = new Application_Model_Client();
@@ -148,14 +154,14 @@ class User_ClientController extends Zend_Controller_Action
public function editclientAction(){
// ACL: Is he authorized to edit clients ?
if(!Pbs_Acl::checkRight('cle'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
if (!isset($_POST["add"])){
$clientID = $this->_request->getParam('clientID');
$client = new Application_Model_Client();
$mapper = new Application_Model_ClientMapper();
$mapper->find($clientID,$client);
-
+
if($client->getGroupID() == $this->membership->getGroupID()){
$editclient = new user_Form_Client(array(
'buttontext' => 'Edit Client',
@@ -173,11 +179,13 @@ class User_ClientController extends Zend_Controller_Action
'page' => $this->page),$_POST);
if ($editclient->isValid($_POST) || ($mac != '' && $hh != '') ) {
$client = new Application_Model_Client($_POST);
- $client->setID($this->_request->getParam('clientID'));
+ $client->setID($this->_request->getParam('clientID'));
$dbclient = new Application_Model_Client();
$clientMapper = new Application_Model_ClientMapper();
$clientMapper->find($this->_request->getParam('clientID'),$dbclient);
+
+ $client->setCreated($dbclient->getCreated());
if($dbclient->getGroupID() == $this->membership->getGroupID()){
$client->setGroupID($this->membership->getGroupID());
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index 7f752a8..aba51f7 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -19,33 +19,33 @@ class user_ConfigController extends Zend_Controller_Action
protected $page;
protected $config;
protected $type;
-
- public function init()
- {
- if (Zend_Auth::getInstance()->hasIdentity()) {
+
+ public function init()
+ {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if($userIDsNamespace['membershipID'] ==''){
$this->_redirect('/user/index');
}
-
+
$this->configMapper = new Application_Model_ConfigMapper();
-
+
$this->membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
$this->db = Zend_Db_Table::getDefaultAdapter();
-
+
$this->type = $this->_request->getParam('type');
} else {
$this->_helper->redirector('login', 'auth');
}
- $this->page = $this->_request->getParam('page');
- }
+ $this->page = $this->_request->getParam('page');
+ }
- public function indexAction()
- {
- $result = $this->_request->getParam('addresult');
+ public function indexAction()
+ {
+ $result = $this->_request->getParam('addresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('create',$result);
@@ -60,200 +60,200 @@ class user_ConfigController extends Zend_Controller_Action
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('modify',$result);
}
-
- $groupID = $this->membership->getGroupID();
-
+
+ $groupID = $this->membership->getGroupID();
+
//ACL Darf er Configs sehen?
- if(!Pbs_Acl::checkRight('csai') && !Pbs_Acl::checkRight('csui'))
- $this->_redirect('/user/index');
-
- $this->configMapper = new Application_Model_ConfigMapper();
-
- if($this->type =='own' && Pbs_Acl::checkRight('csui')){
- $this->view->type = 'own';
- $this->view->configlist = $this->configMapper->findBy(array('membershipID' => $this->membership->getID()));
- }else{
- $this->view->type = 'group';
- $this->view->configlist = $this->configMapper->findBy(array('groupID' => $this->membership->getGroupID()));
- }
-
- foreach ($this->view->configlist as $config){
- $config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated()));
- }
-
- // Search
+ if(!Pbs_Acl::checkRight('csai') && !Pbs_Acl::checkRight('csui'))
+ $this->_redirect('/user/index');
+
+ $this->configMapper = new Application_Model_ConfigMapper();
+
+ if($this->type =='own' && Pbs_Acl::checkRight('csui')){
+ $this->view->type = 'own';
+ $this->view->configlist = $this->configMapper->findBy(array('membershipID' => $this->membership->getID()));
+ }else{
+ $this->view->type = 'group';
+ $this->view->configlist = $this->configMapper->findBy(array('groupID' => $this->membership->getGroupID()));
+ }
+
+ foreach ($this->view->configlist as $config){
+ $config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated()));
+ }
+
+ // Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setType($this->type);
$mySearch->setModule('config');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $this->view->configlist = $mySearch->search($this->view->configlist);
+ $this->view->search = $mySearch->getSearchTerm();
+ $this->view->configlist = $mySearch->search($this->view->configlist);
}
$this->view->searchform = $mySearch->searchForm();
-
- // Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+
+ // Pagination
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($this->view->configlist);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/config/index/type/'.$this->type.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $this->view->configlist = $pagination->getElements();
-
+ $this->view->configlist = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
-
- }
-
- public function searchAction(){
+
+ }
+
+ public function searchAction(){
$this->_redirect('/user/config/index/type/'.$this->type.'/search/'.($_GET['search']));
}
- public function createconfigAction()
- {
- //ACL Darf er Configs erstellen?
- if(!Pbs_Acl::checkRight('cc') && !Pbs_Acl::checkRight('cco'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
-
- if (!isset($_POST["createconfig"])){
- $configForm = new user_Form_Config(array('action' => 'createconfig','page'=>$this->page, 'type'=>$this->type));
- } else {
- $configForm = new user_Form_Config(array('action' => 'createconfig','page'=>$this->page, 'type'=>$this->type),$_POST);
-
- if ($configForm->isValid($_POST)) {
-
- $config = new Application_Model_Config($_POST);
- $config->setCreated(time());
-
- if(Pbs_Acl::checkRight('cc') && $this->_request->getParam('type') == 'group')
- $config->setGroupID($this->membership->getGroupID());
- elseif(Pbs_Acl::checkRight('cco') && $this->_request->getParam('type') == 'own')
- $config->setMembershipID($this->membership->getID());
- else
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
-
- try {
- $this->configMapper->save($config);
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
- }
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
- }
- }
-
- $this->view->configForm = $configForm;
- }
-
- public function addUserAction(){
-
- }
-
- public function editconfigAction()
- {
- //ACL Darf er Configs editieren?
- if(!Pbs_Acl::checkRight('ce') && !Pbs_Acl::checkRight('cem') && !Pbs_Acl::checkRight('ceo'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
-
- $configID = $this->_request->getParam('configID');
- if (!is_numeric($configID))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
-
- $groupID = $this->membership->getGroupID();
-
- $config = new Application_Model_Config();
- $this->configMapper->find($configID, $config);
-
- if($config->getMembershipID() != null){
- if($this->membership->getID() != $config->getMembershipID() || !Pbs_Acl::checkRight('ceo'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
- }else{
- if($this->membership->getGroupID() != $config->getGroupID() || (!Pbs_Acl::checkRight('ce') && !Pbs_Acl::checkRight('cem')))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
- }
-
- if (!isset($_POST["editconfig"])){
-
- $configForm = new user_Form_Config(array('action' => 'editconfig','page'=>$this->page, 'type'=>$this->type));
- $configForm->populate($config->toArray());
-
- }else{
- $configForm = new user_Form_Config(array('action' => 'editconfig','page'=>$this->page, 'type'=>$this->type),$_POST);
-
- if ($configForm->isValid($_POST)) {
-
- $configold = $config;
-
- $config = new Application_Model_Config($_POST);
- $config->setCreated(time());
-
- if(Pbs_Acl::checkRight('ce') && $configold->getGroupID() != null)
- $config->setGroupID($this->membership->getGroupID());
- elseif(Pbs_Acl::checkRight('ceo') && $configold->getMembershipID() != null)
- $config->setMembershipID($this->membership->getID());
- else
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
-
- $config->setID($configID);
-
- if($configold->getShellscript() != $config->getShellscript()){
- //ACL Is he allowed to edit other than Metadata?
- if(!Pbs_Acl::checkRight('ce'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
- }
-
-
- try {
- $this->configMapper->save($config);
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
- }
-
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
- }
-
- }
-
- $this->view->configForm = $configForm;
- }
-
- public function deleteconfigAction()
- {
- //ACL Darf er Configs löschen?
- if(!Pbs_Acl::checkRight('cd') && !Pbs_Acl::checkRight('cdo'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
-
- try{
- $configID = $this->_request->getParam('configID');
- if (!is_numeric($configID))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
-
- $config = new Application_Model_Config();
- $this->configMapper->find($configID,$config);
-
- if($config->getMembershipID() != null){
- if($this->membership->getID() != $config->getMembershipID() || !Pbs_Acl::checkRight('cdo'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
- }else{
- if($this->membership->getGroupID() != $config->getGroupID() || !Pbs_Acl::checkRight('cd'))
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
- }
-
- $this->configMapper->delete($config);
-
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
- }
- $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
- }
+ public function createconfigAction()
+ {
+ //ACL Darf er Configs erstellen?
+ if(!Pbs_Acl::checkRight('cc') && !Pbs_Acl::checkRight('cco'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
+
+ if (!isset($_POST["createconfig"])){
+ $configForm = new user_Form_Config(array('action' => 'createconfig','page'=>$this->page, 'type'=>$this->type));
+ } else {
+ $configForm = new user_Form_Config(array('action' => 'createconfig','page'=>$this->page, 'type'=>$this->type),$_POST);
+
+ if ($configForm->isValid($_POST)) {
+
+ $config = new Application_Model_Config($_POST);
+ $config->setCreated(time());
+
+ if(Pbs_Acl::checkRight('cc') && $this->_request->getParam('type') == 'group')
+ $config->setGroupID($this->membership->getGroupID());
+ elseif(Pbs_Acl::checkRight('cco') && $this->_request->getParam('type') == 'own')
+ $config->setMembershipID($this->membership->getID());
+ else
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
+
+ try {
+ $this->configMapper->save($config);
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
+ }
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
+ }
+ }
+
+ $this->view->configForm = $configForm;
+ }
+
+ public function addUserAction(){
+
+ }
+
+ public function editconfigAction()
+ {
+ //ACL Darf er Configs editieren?
+ if(!Pbs_Acl::checkRight('ce') && !Pbs_Acl::checkRight('cem') && !Pbs_Acl::checkRight('ceo'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+
+ $configID = $this->_request->getParam('configID');
+ if (!is_numeric($configID))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+
+ $groupID = $this->membership->getGroupID();
+
+ $config = new Application_Model_Config();
+ $this->configMapper->find($configID, $config);
+
+ if($config->getMembershipID() != null){
+ if($this->membership->getID() != $config->getMembershipID() || !Pbs_Acl::checkRight('ceo'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $config->getGroupID() || (!Pbs_Acl::checkRight('ce') && !Pbs_Acl::checkRight('cem')))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }
+
+ if (!isset($_POST["editconfig"])){
+
+ $configForm = new user_Form_Config(array('action' => 'editconfig','page'=>$this->page, 'type'=>$this->type));
+ $configForm->populate($config->toArray());
+
+ }else{
+ $configForm = new user_Form_Config(array('action' => 'editconfig','page'=>$this->page, 'type'=>$this->type),$_POST);
+
+ if ($configForm->isValid($_POST)) {
+
+ $configold = $config;
+
+ $config = new Application_Model_Config($_POST);
+ $config->setCreated(time());
+
+ if(Pbs_Acl::checkRight('ce') && $configold->getGroupID() != null)
+ $config->setGroupID($this->membership->getGroupID());
+ elseif(Pbs_Acl::checkRight('ceo') && $configold->getMembershipID() != null)
+ $config->setMembershipID($this->membership->getID());
+ else
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+
+ $config->setID($configID);
+
+ if($configold->getShellscript() != $config->getShellscript()){
+ //ACL Is he allowed to edit other than Metadata?
+ if(!Pbs_Acl::checkRight('ce'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }
+
+
+ try {
+ $this->configMapper->save($config);
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
+ }
+
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
+ }
+
+ }
+
+ $this->view->configForm = $configForm;
+ }
+
+ public function deleteconfigAction()
+ {
+ //ACL Darf er Configs löschen?
+ if(!Pbs_Acl::checkRight('cd') && !Pbs_Acl::checkRight('cdo'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+
+ try{
+ $configID = $this->_request->getParam('configID');
+ if (!is_numeric($configID))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
+
+ $config = new Application_Model_Config();
+ $this->configMapper->find($configID,$config);
+
+ if($config->getMembershipID() != null){
+ if($this->membership->getID() != $config->getMembershipID() || !Pbs_Acl::checkRight('cdo'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $config->getGroupID() || !Pbs_Acl::checkRight('cd'))
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+ }
+
+ $this->configMapper->delete($config);
+
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
+ }
+ $this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
+ }
}
diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php
index 703bd7d..f9a4724 100644
--- a/application/modules/user/controllers/FilterController.php
+++ b/application/modules/user/controllers/FilterController.php
@@ -33,14 +33,14 @@ class User_FilterController extends Zend_Controller_Action
} else {
$this->_helper->redirector('login', 'auth');
}
- $this->page = $this->_request->getParam('page');
+ $this->page = $this->_request->getParam('page');
}
public function indexAction()
{
// ACL: Is he allowed to see the overview
if(!Pbs_Acl::checkRight('fo'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$result = $this->_request->getParam('addresult');
if($result != ""){
@@ -68,33 +68,33 @@ class User_FilterController extends Zend_Controller_Action
$ff->setCreated(date(Zend_Registry::get('dateformat'),$ff->getCreated()));
$allFilter[] = $ff;
}
-
- // Search
+
+ // Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setModule('filter');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $allFilter = $mySearch->search($allFilter);
+ $this->view->search = $mySearch->getSearchTerm();
+ $allFilter = $mySearch->search($allFilter);
}
$this->view->searchform = $mySearch->searchForm();
-
+
// Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($allFilter);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/filter/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $allFilter = $pagination->getElements();
-
+ $allFilter = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
- $this->view->filters = $allFilter;
-
+ $this->view->filters = $allFilter;
+
}
-
- public function searchAction(){
+
+ public function searchAction(){
$this->_redirect('/user/filter/index/search/'.($_GET['search']));
}
@@ -102,21 +102,21 @@ class User_FilterController extends Zend_Controller_Action
{
// ACL: Is he allowed to add a Filter
if(!Pbs_Acl::checkRight('fa'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$bmmapper = new Application_Model_BootMenuMapper();
- $result = $bmmapper->findBy(array('groupID' => $this->membership->getGroupID()),true);
+ $result = $bmmapper->findBy(array('groupID' => $this->membership->getGroupID()),true);
print_a($result);
-
+
foreach($result as $rr){
$bm = new Application_Model_BootMenu();
$bm->setOptions($rr);
$bm->setID($rr['bootmenuID']);
$bootmenus[] = $bm;
}
-
+
$this->view->bootmenus = $bootmenus;
if (!isset($_POST["add"])){
@@ -161,10 +161,10 @@ class User_FilterController extends Zend_Controller_Action
{
$filterID = $this->_request->getParam('filterID');
$filtermapper = new Application_Model_FilterMapper();
-
+
// ACL: Is he allowed to remove the filter
if(!Pbs_Acl::checkRight('fd'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
if(is_numeric($filterID)){
$filter = new Application_Model_Filter();
@@ -194,12 +194,12 @@ class User_FilterController extends Zend_Controller_Action
$bm->setID($rr['bootmenuID']);
$bootmenus[] = $bm;
}
-
+
// ACL: Is he allowed to edit the filter or the filterpriority?
if(!Pbs_Acl::checkRight('fe') && !Pbs_Acl::checkRight('fefp'))
- $this->_redirect('/user');
-
- if (!isset($_POST["add"])){
+ $this->_redirect('/user');
+
+ if (!isset($_POST["add"])){
$filterID = $this->_request->getParam('filterID');
$filter = new Application_Model_Filter();
@@ -218,7 +218,7 @@ class User_FilterController extends Zend_Controller_Action
$this->_redirect('/user/filter/index/page/'.$this->page.'/modifyresult/forbidden');
}
} else{
- try{
+ try{
$filterID = $this->_request->getParam('filterID');
$filter = new Application_Model_Filter();
$filtermapper = new Application_Model_FilterMapper();
@@ -230,17 +230,17 @@ class User_FilterController extends Zend_Controller_Action
'page' => $this->page),$_POST);
if ($editfilterform->isValid($_POST)) {
$filtermapper = new Application_Model_FilterMapper();
-
+
$newfilterentry = new Application_Model_Filter($_POST);
$newfilterentry->setID($this->_request->getParam('filterID'));
$newfilterentry->setGroupID($this->membership->getGroupID());
$newfilterentry->setMembershipID(null);
-
+
// ACL: if he is only allowed to edit filterpriority
if(Pbs_Acl::checkRight('fefp') && !Pbs_Acl::checkRight('fe')){
$DBfilterentry = new Application_Model_Filter();
$filtermapper->find($this->_request->getParam('filterID'),$DBfilterentry);
-
+
$compareresult = $filtermapper->compare($newfilterentry,$DBfilterentry);
if(isset($compareresult['priority']) && count($compareresult) == 1){
$filtermapper->save($newfilterentry);
@@ -251,7 +251,7 @@ class User_FilterController extends Zend_Controller_Action
}
}
// ACL: he is allowed to edit the filter
- elseif(Pbs_Acl::checkRight('fe')){
+ elseif(Pbs_Acl::checkRight('fe')){
$filtermapper->save($newfilterentry);
$this->_redirect('/user/filter/index/page/'.$this->page.'/modifyresult/ok');
}
@@ -276,8 +276,8 @@ class User_FilterController extends Zend_Controller_Action
$bootisos = $bootisoMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true);
$membershipMapper = new Application_Model_MembershipMapper();
- $memberships = $membershipMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true);
-
+ $memberships = $membershipMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true);
+
$grouppMapper = new Application_Model_GroupMapper();
$group = new Application_Model_Group();
$grouppMapper->find($this->membership->getGroupID(),$group);
@@ -298,8 +298,8 @@ class User_FilterController extends Zend_Controller_Action
{
// ACL: is he allowed to create a new filterentry?
if(!Pbs_Acl::checkRight('ffa'))
- $this->_redirect('/user');
-
+ $this->_redirect('/user');
+
$filterID = $this->_request->getParam('filterID');
$filterMapper = new Application_Model_FilterMapper();
$filter = new Application_Model_Filter();
@@ -310,7 +310,7 @@ class User_FilterController extends Zend_Controller_Action
if($filter->getGroupID() == $this->membership->getGroupID()){
if (!isset($_POST["add"])){
try{
- $addform = new user_Form_FilterEntry(array(
+ $addform = new user_Form_FilterEntry(array(
'buttontext' => 'Add Filterentry',
'filterID' => $filterID,
'selectData' => $selectData,
@@ -365,7 +365,7 @@ class User_FilterController extends Zend_Controller_Action
{
//ACL: is he allowed to edit filterentrys ?
if(!Pbs_Acl::checkRight('ffe'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$selectData = $this->prepareFormData();
if (!isset($_POST["add"])){
try{
@@ -433,12 +433,12 @@ class User_FilterController extends Zend_Controller_Action
else{
$newfilterenty->setFiltervalue($_POST['filtervalue']);
$newfilterenty->setFiltervalue2($_POST['filtervalue2']);
- }
-
+ }
+
$newfilter2 = new Application_Model_FilterEntriesMapper();
$newfilter2->save($newfilterenty);
$this->_redirect('/user/filter/index/page/'.$this->page.'/modifyresult/ok');
-
+
}
else{
$this->_redirect('/user/filter/index/page/'.$this->page.'/modifyresult/forbidden');
@@ -456,7 +456,7 @@ class User_FilterController extends Zend_Controller_Action
{
//ACL: is he autohorized to delete a filterentry?
if(!Pbs_Acl::checkRight('ffd'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$filterentriesID = $this->_request->getParam('filterentriesID');
if(is_numeric($filterentriesID)){
@@ -473,11 +473,11 @@ class User_FilterController extends Zend_Controller_Action
try{
$deletefilterentry = new Application_Model_FilterEntries();
$deletefilterentry->setID($filterentriesID);
-
+
$filterentriesmapper = new Application_Model_FilterEntriesMapper();
$filterentriesmapper->delete($deletefilterentry);
$this->_redirect('/user/filter/index/page/'.$this->page.'/deleteresult/ok');
-
+
}catch (Zend_Exception $e) {
echo "Error message 2: " . $e->getMessage() . "\n";
$this->_redirect('/user/filter/index/page/'.$this->page.'/deleteresult/error');
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index 561f116..3f7fde0 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -38,7 +38,7 @@ class User_GroupController extends Zend_Controller_Action
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
-
+
$this->page = $this->_request->getParam('page');
} else {
$this->_helper->redirector('login', 'auth');
@@ -51,7 +51,7 @@ class User_GroupController extends Zend_Controller_Action
// ACL show overview
if(!Pbs_Acl::checkRight('gso'))
$this->_redirect('/user');
-
+
$result = $this->_request->getParam('deleteresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
@@ -126,7 +126,7 @@ class User_GroupController extends Zend_Controller_Action
$membership->setID();
$membership->setGroupID($groupID);
$membership->setRoleID($roleID);
-
+
try {
$this->membershipMapper->save($membership);
} catch(Zend_Exception $e)
@@ -173,7 +173,7 @@ class User_GroupController extends Zend_Controller_Action
{
// ACL edit a group
if(!Pbs_Acl::checkRight('geo') && !Pbs_Acl::checkRight('ge'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$groupID = $this->_request->getParam('groupID');
if(!isset($groupID)) {
@@ -186,7 +186,7 @@ class User_GroupController extends Zend_Controller_Action
return;
}
if((!Pbs_Acl::checkRight('geo') && $groupID == $this->membership->getGroupID()) || ( !Pbs_Acl::checkRight('ge') && $groupID != $this->membership->getGroupID() ))
- $this->_redirect('/user/group/index/page/'.$this->page.'/deleteresult/forbidden');
+ $this->_redirect('/user/group/index/page/'.$this->page.'/deleteresult/forbidden');
if (!isset($_POST["save"])){
$group = $this->groupMapper->find($groupID);
$_POST['title'] = $group->getTitle();
@@ -194,9 +194,9 @@ class User_GroupController extends Zend_Controller_Action
$editForm = new user_Form_GroupEdit(array('groupID' => $groupID));
} else {
$editForm = new user_Form_GroupEdit(array('groupID' => $groupID), $_POST);
- if ($editForm->isValid($_POST)) {
+ if ($editForm->isValid($_POST)) {
$group = new Application_Model_Group($_POST);
- $group->setID($groupID);
+ $group->setID($groupID);
try {
$this->groupMapper->save($group);
} catch(Zend_Exception $e)
@@ -225,12 +225,13 @@ class User_GroupController extends Zend_Controller_Action
}
}
if($groupID == $this->membership->getGroupID() && !Pbs_Acl::checkRight('gsdo'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$this->view->usergroup = $this->membership->getGroupID();
$this->view->requestgroup = $groupID;
$groupRequests = $this->groupRequestMapper->findBy(array('groupID' => $groupID),true);
if(isset($groupRequests)) {
+ $groupRequestList = array();
foreach($groupRequests as $groupRequest) {
$person = $this->personmapper->find($groupRequest['personID']);
$groupRequestList[] = array(
@@ -238,7 +239,7 @@ class User_GroupController extends Zend_Controller_Action
'person' => $person
);
}
- if(is_array($groupRequestList)) {
+ if(count($groupRequestList) > 0) {
$this->view->groupRequestList = $groupRequestList;
}
// Search all inherit Roles
@@ -247,15 +248,15 @@ class User_GroupController extends Zend_Controller_Action
$parents = $groupGroupsMapper->getParentGroups($groupID);
$groupMapper = new Application_Model_GroupMapper();
$crawled = array();
- foreach($parents as $p){
+ foreach($parents as $p){
foreach($p as $a){
if(!in_array($a,$crawled)){
$crawled[] = $a;
$group = $groupMapper->find($a);
if($groupID != $a)
- $r = $this->rolemapper->findBy(array('groupID' => $a,'inheritance'=>"1"));
+ $r = $this->rolemapper->findBy(array('groupID' => $a,'inheritance'=>"1"));
else
- $r = $this->rolemapper->findBy(array('groupID' => $a));
+ $r = $this->rolemapper->findBy(array('groupID' => $a));
foreach($r as $d){
$roles[$group->getTitle()][] = $d;
}
@@ -265,7 +266,7 @@ class User_GroupController extends Zend_Controller_Action
$this->view->roleList = $roles;
}
- if(Pbs_Acl::checkRight('gsmg') || Pbs_Acl::checkRight('gsmgo')){
+ if(Pbs_Acl::checkRight('gsmg') || Pbs_Acl::checkRight('gsmgo')){
$members = $this->membershipMapper->findBy(array('groupID' => $groupID),true);
if(isset($members)) {
foreach($members as $member) {
@@ -291,7 +292,7 @@ class User_GroupController extends Zend_Controller_Action
$memberPagination->setPageUrl('/user/group/show'.((isset($this->view->search))?'/search/'.$this->view->search:''));
}
$this->view->membersList = $memberPagination->getElements();
- $this->view->memberPagination = $memberPagination->pagination($pageurl);
+ $this->view->memberPagination = $memberPagination->pagination();
$this->view->page = $memberPagination->getRequestPage();
}
}
@@ -310,12 +311,12 @@ class User_GroupController extends Zend_Controller_Action
public function linkAction()
{
if(!Pbs_Acl::checkRight('glk'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$linkableGroups = $this->groupList;
- $groupGroupsMapper = new Application_Model_GroupGroupsMapper();
+ $groupGroupsMapper = new Application_Model_GroupGroupsMapper();
$childs = array();
- $parents = array();
+ $parents = array();
$childs = $groupGroupsMapper->getChildGroups($this->membership->getGroupID());
$parents = $groupGroupsMapper->getParentGroups($this->membership->getGroupID());
#print_a($childs,$parents);
@@ -365,7 +366,7 @@ class User_GroupController extends Zend_Controller_Action
{
// ACL delete a group
if(!Pbs_Acl::checkRight('gd'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$this->_helper->viewRenderer->setNoRender();
$groupID = $this->_request->getParam('groupID');
@@ -404,7 +405,7 @@ class User_GroupController extends Zend_Controller_Action
{
// ACL grant a membership to request
if(!Pbs_Acl::checkRight('gam'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$this->_helper->viewRenderer->setNoRender();
if(isset($_POST['grouprequestID']) && isset($_POST['roleID'])) {
@@ -419,13 +420,13 @@ class User_GroupController extends Zend_Controller_Action
}
$membership = new Application_Model_Membership();
$membership->setGroupID($groupRequest->getGroupID());
- $membership->setPersonID($groupRequest->getPersonID());
+ $membership->setPersonID($groupRequest->getPersonID());
$membership->setRoleID($_POST['roleID']);
- $membership->setSuspended(0);
+ $membership->setSuspended(0);
$apikey = randomString(32);
$membership->setApikey($apikey);
-
-
+
+
try {
$id = $this->membershipMapper->save($membership);
diff --git a/application/modules/user/controllers/IndexController.php b/application/modules/user/controllers/IndexController.php
index 350d0e5..a704261 100644
--- a/application/modules/user/controllers/IndexController.php
+++ b/application/modules/user/controllers/IndexController.php
@@ -12,15 +12,15 @@
class User_IndexController extends Zend_Controller_Action
{
- public function init()
- {
- /* Initialize action controller here */
- }
+ public function init()
+ {
+ /* Initialize action controller here */
+ }
- public function indexAction()
- {
-
- if (!Zend_Auth::getInstance()->hasIdentity()) {
+ public function indexAction()
+ {
+
+ if (!Zend_Auth::getInstance()->hasIdentity()) {
$this->view->text = 'Your not logged in, please log in first <a href="/user/auth/">here</a>.';
}
else{
@@ -32,7 +32,7 @@ class User_IndexController extends Zend_Controller_Action
'/user/bootmenu' => 'Create your Bootmenu',
);
$this->view->links = $links;
- }
- }
+ }
+ }
}
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index da640ba..07a69ee 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -14,19 +14,12 @@ class user_PersonController extends Zend_Controller_Action
{
protected $person = null;
-
protected $personmapper = null;
-
protected $membershipMapper = null;
-
protected $memberships = null;
-
protected $groupMapper = null;
-
protected $groups = null;
-
protected $groupRequestMapper = null;
-
protected $userIDsNamespace = null;
public function init()
@@ -34,7 +27,7 @@ class user_PersonController extends Zend_Controller_Action
if (Zend_Auth::getInstance()->hasIdentity()) {
$this->personmapper = new Application_Model_PersonMapper();
$this->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
- if($this->userIDsNamespace['personID']) {
+ if(isset($this->userIDsNamespace['personID'])) {
$this->person = $this->personmapper->find($this->userIDsNamespace['personID']);
} else {
$result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true);
@@ -45,28 +38,28 @@ class user_PersonController extends Zend_Controller_Action
$this->groupRequestMapper = new Application_Model_GroupRequestMapper();
$this->membershipMapper = new Application_Model_MembershipMapper();
$this->memberships = $this->membershipMapper->findBy(array("personID" => $this->person->getID()),true);
-
+
$rightrolesMapper = new Application_Model_RightRolesMapper();
- $rightroles = new Application_Model_RightRoles();
+ $rightroles = new Application_Model_RightRoles();
$role = new Application_Model_Role();
$roleMapper = new Application_Model_RoleMapper();
-
- $this->view->apikeys = array();
+ $this->view->apikeys = array();
+
if(isset($this->memberships)) {
foreach($this->memberships as $membership) {
$group = $this->groupMapper->find($membership['groupID']);
@list($rightroles) = $rightrolesMapper->findBy(array('rightID' => '55', 'roleID' => $membership['roleID']));
$role = $roleMapper->find($membership['roleID']);
if($rightroles != null)
- $this->view->apikeys[$group->getID()] = $membership['apikey'];
-
+ $this->view->apikeys[$group->getID()] = $membership['apikey'];
+
$this->groups[] = array (
- 'groupID' => $group->getID(),
- 'title' => $group->getTitle(),
- 'description' => $group->getDescription(),
- 'membershipID' => $membership['membershipID'],
- 'role' => $role->getTitle()
+ 'groupID' => $group->getID(),
+ 'title' => $group->getTitle(),
+ 'description' => $group->getDescription(),
+ 'membershipID' => $membership['membershipID'],
+ 'role' => $role->getTitle()
);
}
}
@@ -111,7 +104,7 @@ class user_PersonController extends Zend_Controller_Action
$pagination->setPageUrl('/user/person/index/'.((isset($this->view->search))?'/search/'.$this->view->search:''));
$this->view->personList = $pagination->getElements();
- $this->view->pagination = $pagination->pagination($pageurl);
+ $this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
}
@@ -123,6 +116,7 @@ class user_PersonController extends Zend_Controller_Action
$this->view->person = $this->person;
$groupRequests = $this->groupRequestMapper->findBy(array('personID' => $this->person->getID()),true);
if(isset($groupRequests)) {
+ $groupRequestList = array();
foreach($groupRequests as $groupRequest) {
$group = $this->groupMapper->find($groupRequest['groupID']);
$groupRequestList[] = array(
@@ -130,7 +124,7 @@ class user_PersonController extends Zend_Controller_Action
'group' => $group
);
}
- if(is_array($groupRequestList)) {
+ if(count($groupRequestList)> 0) {
$this->view->groupRequestList = $groupRequestList;
}
}
@@ -142,7 +136,7 @@ class user_PersonController extends Zend_Controller_Action
$pagination->setPageUrl('/user/person/index' .((isset($this->view->search))?'/search/'.$this->view->search:''));
$this->view->groups = $pagination->getElements();
- $this->view->pagination = $pagination->pagination($pageurl);
+ $this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
// This should be activated in case the person has no membership and no rights.
$this->view->groupRequestRight = true;
@@ -157,7 +151,7 @@ class user_PersonController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('peod')) {
$this->_redirect('/user');
}
- if($personID = $this->_request->getParam('personID')) {
+ if($this->person->getID() == $this->_request->getParam('personID')) {
if(!Pbs_Acl::checkRight('peoa')) {
$this->_redirect('/user');
}
@@ -171,14 +165,14 @@ class user_PersonController extends Zend_Controller_Action
} else {
$editForm = new user_Form_PersonEdit($_POST);
if ($editForm->isValid($_POST)) {
- if($personID = $this->_request->getParam('personID')) {
- if(isset($_POST['newpassword'])) {
- $date = new DateTime();
+ if($this->person->getID() == $this->_request->getParam('personID')) {
+
+ $person->setOptions($_POST);
+ if($_POST['newpassword'] != '') {
$person->setPassword($_POST['newpassword']);
- $person->setPasswordSalt(MD5($date->getTimestamp()));
- $person->setPassword(MD5($person->getPassword() . $this->person->getPasswordSalt()));
+ $person->setPasswordSalt(MD5(microtime(true)));
+ $person->setPassword(MD5($person->getPassword() . $person->getPasswordSalt()));
}
- $person->setOptions($_POST);
try {
$this->personmapper->save($person);
} catch(Zend_Exception $e)
@@ -189,14 +183,13 @@ class user_PersonController extends Zend_Controller_Action
return;
}
$this->_helper->redirector('', 'person');
- } else {
- if(isset($_POST['newpassword'])) {
- $date = new DateTime();
+ } else {
+ $this->person->setOptions($_POST);
+ if($_POST['newpassword'] != '') {
$this->person->setPassword($_POST['newpassword']);
- $this->person->setPasswordSalt(MD5($date->getTimestamp()));
+ $this->person->setPasswordSalt(MD5(microtime(true)));
$this->person->setPassword(MD5($this->person->getPassword() . $this->person->getPasswordSalt()));
}
- $this->person->setOptions($_POST);
try {
$this->personmapper->save($this->person);
} catch(Zend_Exception $e)
@@ -235,7 +228,7 @@ class user_PersonController extends Zend_Controller_Action
if($membership['groupID'] == $group->getID()) {
$groupsFound[$count] = true;
} else {
- if($groupsFound[$count] != true) {
+ if(@$groupsFound[$count] != true) {
$groupsFound[$count] = false;
}
}
@@ -316,7 +309,15 @@ class user_PersonController extends Zend_Controller_Action
if(isset($userIDsNamespace['membershipID'])) {
$this->_redirect('/user/');
} else {
- if(count($this->memberships) > 0) {
+ if(count($this->memberships) == 1) {
+ $myMembership = $this->memberships[0];
+ $roleSession = new Zend_Session_Namespace('userIDs');
+ $roleSession->membershipID = $myMembership['membershipID'];
+ $roleSession->personID = $myMembership['personID'];
+ $roleSession->groupID = $myMembership['groupID'];
+ $roleSession->roleID = $myMembership['roleID'];
+ $this->_redirect('/user/');
+ } elseif(count($this->memberships) > 1) {
if(isset($_POST['selectmembership'])) {
$roleSession = new Zend_Session_Namespace('userIDs');
$roleSession->membershipID = $_POST['membershipID'];
@@ -330,6 +331,7 @@ class user_PersonController extends Zend_Controller_Action
$groupMapper = new Application_Model_GroupMapper();
$roleMapper = new Application_Model_RoleMapper();
if(isset($this->memberships)) {
+ $suspendlist = array();
foreach($this->memberships as $membership) {
$group = $groupMapper->find($membership['groupID']);
$role = $roleMapper->find($membership['roleID']);
@@ -345,8 +347,8 @@ class user_PersonController extends Zend_Controller_Action
'membershipID' => $membership['membershipID'],
'group' => $group->getTitle(),
'role' => $role->getTitle());
- }
-
+ }
+
}
if(count($suspendlist) >=1){
$pbsNotifier = new Pbs_Notifier();
@@ -420,7 +422,7 @@ class user_PersonController extends Zend_Controller_Action
$pagination->setPageUrl('/user/person/show/personID/' . $personID .((isset($this->view->search))?'/search/'.$this->view->search:''));
$this->view->groups = $pagination->getElements();
- $this->view->pagination = $pagination->pagination($pageurl);
+ $this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
$this->view->personID = $personID;
$this->view->editRight = Pbs_Acl::checkRight('peoa');
@@ -437,7 +439,7 @@ class user_PersonController extends Zend_Controller_Action
{
if(!Pbs_Acl::checkRight('gdm')) {
$this->_redirect('/user');
- }
+ }
$grouprequestID = $this->_request->getParam('grouprequestID');
$grouprequest = $this->groupRequestMapper->find($grouprequestID);
try {
diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php
index b793d80..3d6a0f5 100644
--- a/application/modules/user/controllers/PoolController.php
+++ b/application/modules/user/controllers/PoolController.php
@@ -14,7 +14,7 @@ class User_PoolController extends Zend_Controller_Action
{
private $membership;
protected $page;
-
+
public function init()
{
if (Zend_Auth::getInstance()->hasIdentity()) {
@@ -30,14 +30,14 @@ class User_PoolController extends Zend_Controller_Action
} else {
$this->_helper->redirector('login', 'auth');
}
- $this->page = $this->_request->getParam('page');
+ $this->page = $this->_request->getParam('page');
}
public function indexAction()
{
// ACL: is he allowed to see the pools of a group
if(!Pbs_Acl::checkRight('poo'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
$result = $this->_request->getParam('deleteresult');
if($result != ""){
@@ -74,30 +74,30 @@ class User_PoolController extends Zend_Controller_Action
$ff->setID($pool['poolID']);
$yourpools[] = $ff;
}
-
- // Search
+
+ // Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setModule('pool');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $yourpools = $mySearch->search($yourpools);
+ $this->view->search = $mySearch->getSearchTerm();
+ $yourpools = $mySearch->search($yourpools);
}
$this->view->searchform = $mySearch->searchForm();
-
+
// Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($yourpools);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/pool/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $yourpools = $pagination->getElements();
-
+ $yourpools = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
- $this->view->pools = $yourpools;
-
+ $this->view->pools = $yourpools;
+
// Get all Clients from this group
$clientmapper = new Application_Model_ClientMapper();
@@ -112,12 +112,17 @@ class User_PoolController extends Zend_Controller_Action
// extract the un-assigned clients from the clientlist of the group
$freeclients = $this->arrayDiff($clientsArray,$assignedclientsArray);
-
- if(Pbs_Acl::checkRight('posuc'))
- $this->view->freeclients = $freeclients;
+
+ // Format Time-String
+ foreach($freeclients as $k=>$cig){
+ $freeclients[$k]['created'] = date(Zend_Registry::get('dateformat'),$cig['created']);
+ }
+
+ if(Pbs_Acl::checkRight('posuc'))
+ $this->view->freeclients = $freeclients;
}
-
- public function searchAction(){
+
+ public function searchAction(){
$this->_redirect('/user/pool/index/search/'.($_GET['search']));
}
@@ -125,8 +130,8 @@ class User_PoolController extends Zend_Controller_Action
{
// ACL: is he allowed to create a pool?
if(!Pbs_Acl::checkRight('poc'))
- $this->_redirect('/user');
-
+ $this->_redirect('/user');
+
if (!isset($_POST["add"])){
$addfilterform = new user_Form_Pool(array(
'buttontext' => 'Create Pool',
@@ -155,10 +160,10 @@ class User_PoolController extends Zend_Controller_Action
public function deletepoolAction()
{
$poolID = $this->_request->getParam('poolID');
-
+
// ACL: is he allowed to delete a pool?
if(!Pbs_Acl::checkRight('pod'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
if(is_numeric($poolID)){
$poolmapper = new Application_Model_PoolMapper();
@@ -181,10 +186,10 @@ class User_PoolController extends Zend_Controller_Action
{
// ACL: is he allowed to edit a pool?
if(!Pbs_Acl::checkRight('poe'))
- $this->_redirect('/user');
-
+ $this->_redirect('/user');
+
if (!isset($_POST["add"])){
- $poolID = $this->_request->getParam('poolID');
+ $poolID = $this->_request->getParam('poolID');
$pool = new Application_Model_Pool();
$poolmapper = new Application_Model_PoolMapper();
$poolmapper->find($poolID,$pool);
@@ -236,8 +241,8 @@ class User_PoolController extends Zend_Controller_Action
// ACL: Is he allowed to link clients to pools?
if(!Pbs_Acl::checkRight('polc'))
- $this->_redirect('/user');
-
+ $this->_redirect('/user');
+
if(!isset($_POST['clientID']) && ($clientID == '')){
$clientmapper = new Application_Model_ClientMapper();
$clients = $clientmapper->findBy(array('groupID',$this->membership->getGroupID()),true);
@@ -293,7 +298,7 @@ class User_PoolController extends Zend_Controller_Action
// ACL: Is he allowed to unlink clients from pools?
if(!Pbs_Acl::checkRight('pouc'))
- $this->_redirect('/user');
+ $this->_redirect('/user');
if(is_numeric($poolentriesID)){
$poolentriesMapper = new Application_Model_PoolEntriesMapper();
diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php
index 7e082d3..2b2955d 100644
--- a/application/modules/user/controllers/PrebootController.php
+++ b/application/modules/user/controllers/PrebootController.php
@@ -12,22 +12,22 @@
class User_PrebootController extends Zend_Controller_Action
{
-
+
protected $prebootMapper;
protected $membershipMapper;
protected $membership;
protected $page;
-
- public function init()
- {
- if (Zend_Auth::getInstance()->hasIdentity()) {
+
+ public function init()
+ {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if($userIDsNamespace['membershipID'] ==''){
$this->_redirect('/user/index');
}
-
+
$this->prebootMapper = new Application_Model_PreBootMapper();
-
+
$this->membershipMapper = new Application_Model_MembershipMapper();
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
@@ -35,14 +35,14 @@ class User_PrebootController extends Zend_Controller_Action
$this->db = Zend_Db_Table::getDefaultAdapter();
} else {
$this->_helper->redirector('login', 'auth');
- }
- $this->page = $this->_request->getParam('page');
- }
-
+ }
+ $this->page = $this->_request->getParam('page');
+ }
+
- public function indexAction()
- {
- $result = $this->_request->getParam('addresult');
+ public function indexAction()
+ {
+ $result = $this->_request->getParam('addresult');
if($result != ""){
$pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('create',$result);
@@ -75,20 +75,21 @@ class User_PrebootController extends Zend_Controller_Action
$mySearch->setSearchTerm($search);
$mySearch->setModule('preboot');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $this->view->prebootlist = $mySearch->search($this->view->prebootlist);
+ $this->view->search = $mySearch->getSearchTerm();
+ $this->view->prebootlist = $mySearch->search($this->view->prebootlist);
}
$this->view->searchform = $mySearch->searchForm();
-
- // Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+
+ // Pagination
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($this->view->prebootlist);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/preboot/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $this->view->prebootlist = $pagination->getElements();
-
+ $this->view->prebootlist = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
+
$this->view->page = $pagination->getRequestPage();
}
@@ -96,224 +97,224 @@ class User_PrebootController extends Zend_Controller_Action
public function searchAction(){
$this->_redirect('/user/preboot/index/search/'.($_GET['search']));
}
-
- public function createprebootAction()
- {
-
- //ACL Is he allowed to create Preboots?
- if(!Pbs_Acl::checkRight('prc'))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/forbidden');
-
- if (!isset($_POST["createpreboot"])){
- $prebootForm = new user_Form_Preboot(array(
+
+ public function createprebootAction()
+ {
+
+ //ACL Is he allowed to create Preboots?
+ if(!Pbs_Acl::checkRight('prc'))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/forbidden');
+
+ if (!isset($_POST["createpreboot"])){
+ $prebootForm = new user_Form_Preboot(array(
'action' => 'createpreboot',
'page' => $this->page));
- } else {
-
- $prebootForm = new user_Form_Preboot(array(
+ } else {
+
+ $prebootForm = new user_Form_Preboot(array(
'action' => 'createpreboot',
'page' => $this->page),$_POST);
-
- if ($prebootForm->isValid($_POST)) {
-
- $preboot = new Application_Model_PreBoot($_POST);
- $preboot->setGroupID($this->membership->getGroupID());
-
- try {
-
- $path_tmp = "../resources/bootmedium/";
- mkdir($path_tmp ,0777, true);
-
- $hash = md5(microtime(1));
- exec("wget -O '".$path_tmp."preboot.zip".$hash."' ".escapeshellcmd($preboot->getPath_preboot())." 2>&1 | grep 'saved'", $status);
-
- if(!array_pop($status)){
- $this->view->prebootForm = $prebootForm;
- $pbsNotifier = new Pbs_Notifier();
- echo $pbsNotifier->notify('The Resource was not found on the specified path','error');
+
+ if ($prebootForm->isValid($_POST)) {
+
+ $preboot = new Application_Model_PreBoot($_POST);
+ $preboot->setGroupID($this->membership->getGroupID());
+
+ try {
+
+ $path_tmp = "../resources/bootmedium/";
+ mkdir($path_tmp ,0777, true);
+
+ $hash = md5(microtime(1));
+ exec("wget -O '".$path_tmp."preboot.zip".$hash."' ".escapeshellcmd($preboot->getPath_preboot())." 2>&1 | grep 'saved'", $status);
+
+ if(!array_pop($status)){
+ $this->view->prebootForm = $prebootForm;
+ $pbsNotifier = new Pbs_Notifier();
+ echo $pbsNotifier->notify('The Resource was not found on the specified path','error');
- return;
- }
-
- $prebootID = $this->prebootMapper->save($preboot);
-
- $path_preboot = "../resources/bootmedium/$prebootID/";
- mkdir($path_preboot ,0777, true);
-
- exec("mv ../resources/bootmedium/preboot.zip$hash ../resources/bootmedium/$prebootID/preboot.zip");
-
- }catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/error');
- //TODO Delete folder + preboot in DB
-
- }
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/ok');
- }
- }
-
- $this->view->prebootForm = $prebootForm;
- }
-
- public function checkupdateAction($preboot)
- {
-
- //ACL Is he allowed to update Preboots?
- if(!Pbs_Acl::checkRight('pru'))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
-
- $prebootID = $preboot->getID();
- exec("wget --server-response --spider ".escapeshellcmd($preboot->getPath_preboot())." 2>&1 | grep 'Last-Modified:'", $prebootdate);
+ return;
+ }
- //print_a($prebootdate);
-
- $prebootdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($prebootdate))));
-
- if(is_file("../resources/bootmedium/$prebootID/preboot.zip")){
- $prebootolddate = filemtime("../resources/bootmedium/".$prebootID."/preboot.zip");
- }else{
- $pbsNotifier = new Pbs_Notifier();
- $this->view->notification = $pbsNotifier->notify('There are updates available','ok');
- return true;
- }
-
- //print_a($prebootname,$prebootdate,$prebootolddate);
-
- $pbsNotifier = new Pbs_Notifier();
-
- if($prebootdate > $prebootolddate){
+ $prebootID = $this->prebootMapper->save($preboot);
+
+ $path_preboot = "../resources/bootmedium/$prebootID/";
+ mkdir($path_preboot ,0777, true);
+
+ exec("mv ../resources/bootmedium/preboot.zip$hash ../resources/bootmedium/$prebootID/preboot.zip");
+
+ }catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/error');
+ //TODO Delete folder + preboot in DB
+
+ }
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/addresult/ok');
+ }
+ }
+
+ $this->view->prebootForm = $prebootForm;
+ }
+
+ public function checkupdateAction($preboot)
+ {
+
+ //ACL Is he allowed to update Preboots?
+ if(!Pbs_Acl::checkRight('pru'))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
+
+ $prebootID = $preboot->getID();
+ exec("wget --server-response --spider ".escapeshellcmd($preboot->getPath_preboot())." 2>&1 | grep 'Last-Modified:'", $prebootdate);
+
+ //print_a($prebootdate);
+
+ $prebootdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($prebootdate))));
+
+ if(is_file("../resources/bootmedium/$prebootID/preboot.zip")){
+ $prebootolddate = filemtime("../resources/bootmedium/".$prebootID."/preboot.zip");
+ }else{
+ $pbsNotifier = new Pbs_Notifier();
$this->view->notification = $pbsNotifier->notify('There are updates available','ok');
return true;
- }
- else
- return false;
-
- }
-
- public function updateprebootAction()
- {
- //ACL Is he allowed to update Preboots?
- if(!Pbs_Acl::checkRight('pru'))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
-
- $prebootID = $this->_request->getParam('prebootID');
- if (!is_numeric($prebootID))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
-
- $preboot = new Application_Model_PreBoot();
- $this->prebootMapper->find($prebootID,$preboot);
-
- if($this->membership->getGroupID() != $preboot->getGroupID())
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
-
-
- $path_preboot = "../resources/bootmedium/$prebootID/";
-
+ }
+
+ //print_a($prebootname,$prebootdate,$prebootolddate);
+
+ $pbsNotifier = new Pbs_Notifier();
+
+ if($prebootdate > $prebootolddate){
+ $this->view->notification = $pbsNotifier->notify('There are updates available','ok');
+ return true;
+ }
+ else
+ return false;
+
+ }
+
+ public function updateprebootAction()
+ {
+ //ACL Is he allowed to update Preboots?
+ if(!Pbs_Acl::checkRight('pru'))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
+
+ $prebootID = $this->_request->getParam('prebootID');
+ if (!is_numeric($prebootID))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
+
+ $preboot = new Application_Model_PreBoot();
+ $this->prebootMapper->find($prebootID,$preboot);
+
+ if($this->membership->getGroupID() != $preboot->getGroupID())
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/forbidden');
+
+
+ $path_preboot = "../resources/bootmedium/$prebootID/";
+
exec("wget -O '".$path_preboot."preboot.zip' ".escapeshellcmd($preboot->getPath_preboot())." 2>&1 | grep 'saved'", $status);
-
+
if(!array_pop($status)){
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/404');
- }
-
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/updateresult/404');
+ }
+
try{
$filelist = array();
$filelist = scandir($path_preboot);
-
+
$bootisoMapper = new Application_Model_BootIsoMapper();
-
- //TODO Lock preboot
-
+
+ //TODO Lock preboot
+
foreach($filelist as $file){
if($file == preg_match('![0-9]+\.zip!')){
$bootisoID = str_replace('.zip', '', $file);
$serialnumber = $bootisoMapper->find($bootisoID)->getSerialnumber();
-
+
copy("../resources/bootmedium/$prebootID/preboot.zip", "../resources/bootmedium/$prebootID/$bootisoID".".zip");
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res === true){
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/serial", $serialnumber);
- $zip->close();
- }
- }
+ $zip = new ZipArchive();
+ $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
+ if($res === true){
+ $rootdir = $zip->getNameIndex(0);
+ $zip->addFromString($rootdir."build/rootfs/serial", $serialnumber);
+ $zip->close();
+ }
+ }
}
}catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/error');
- //TODO Delete Folder + Preboot
- }
-
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/ok');
- }
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/error');
+ //TODO Delete Folder + Preboot
+ }
- public function editprebootAction()
- {
- //ACL Is he allowed to edit Preboots?
- if(!Pbs_Acl::checkRight('pre') && !Pbs_Acl::checkRight('prem'))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
-
- $prebootID = $this->_request->getParam('prebootID');
-
- if (!is_numeric($prebootID))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
-
-
- $preboot = new Application_Model_PreBoot();
- $this->prebootMapper->find($prebootID, $preboot);
-
- if($this->membership->getGroupID() != $preboot->getGroupID())
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
-
- if (!isset($_POST["editpreboot"])){
-
- $prebootForm = new user_Form_Preboot(array(
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/ok');
+ }
+
+ public function editprebootAction()
+ {
+ //ACL Is he allowed to edit Preboots?
+ if(!Pbs_Acl::checkRight('pre') && !Pbs_Acl::checkRight('prem'))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
+
+ $prebootID = $this->_request->getParam('prebootID');
+
+ if (!is_numeric($prebootID))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
+
+
+ $preboot = new Application_Model_PreBoot();
+ $this->prebootMapper->find($prebootID, $preboot);
+
+ if($this->membership->getGroupID() != $preboot->getGroupID())
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
+
+ if (!isset($_POST["editpreboot"])){
+
+ $prebootForm = new user_Form_Preboot(array(
'action' => 'editpreboot',
'page' => $this->page));
- $prebootForm->populate($preboot->toArray());
-
- }else{
-
- $prebootForm = new user_Form_Preboot(array(
+ $prebootForm->populate($preboot->toArray());
+
+ }else{
+
+ $prebootForm = new user_Form_Preboot(array(
'action' => 'editpreboot',
'page' => $this->page),$_POST);
-
- if ($prebootForm->isValid($_POST)) {
-
- $prebootold = $preboot;
-
- $preboot = new Application_Model_PreBoot($_POST);
- $preboot->setGroupID($this->membership->getGroupID());
- $preboot->setID($prebootID);
-
- $path_preboot = "../resources/bootmedium/$prebootID/";
-
- if($preboot->getPath_preboot() != $prebootold->getPath_preboot()){
-
- //ACL Is he allowed to edit the Preboot Path?
- if(!Pbs_Acl::checkRight('pre'))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
-
- exec("wget -O '".$path_preboot."preboot.zip' ".escapeshellcmd($preboot->getPath_preboot()) ." 2>&1 | grep 'saved'" , $status);
- if(!array_pop($status)){
- $this->view->prebootForm = $prebootForm;
- $pbsNotifier = new Pbs_Notifier();
+
+ if ($prebootForm->isValid($_POST)) {
+
+ $prebootold = $preboot;
+
+ $preboot = new Application_Model_PreBoot($_POST);
+ $preboot->setGroupID($this->membership->getGroupID());
+ $preboot->setID($prebootID);
+
+ $path_preboot = "../resources/bootmedium/$prebootID/";
+
+ if($preboot->getPath_preboot() != $prebootold->getPath_preboot()){
+
+ //ACL Is he allowed to edit the Preboot Path?
+ if(!Pbs_Acl::checkRight('pre'))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden');
+
+ exec("wget -O '".$path_preboot."preboot.zip' ".escapeshellcmd($preboot->getPath_preboot()) ." 2>&1 | grep 'saved'" , $status);
+ if(!array_pop($status)){
+ $this->view->prebootForm = $prebootForm;
+ $pbsNotifier = new Pbs_Notifier();
echo $pbsNotifier->notify('The Resource was not found on the specified path','error');
- return;
- }
-
- try{
- $filelist = array();
+ return;
+ }
+
+ try{
+ $filelist = array();
$filelist = scandir($path_preboot);
$bootisoMapper = new Application_Model_BootIsoMapper();
- //TODO Lock preboot
+ //TODO Lock preboot
foreach($filelist as $file){
if(preg_match('![0-9]+\.zip!',$file)){
@@ -321,70 +322,70 @@ class User_PrebootController extends Zend_Controller_Action
$serialnumber = $bootisoMapper->find($bootisoID)->getSerialnumber();
copy("../resources/bootmedium/$prebootID/preboot.zip", "../resources/bootmedium/$prebootID/$bootisoID".".zip");
- $zip = new ZipArchive();
- $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
- if($res === true){
- $rootdir = $zip->getNameIndex(0);
- $zip->addFromString($rootdir."build/rootfs/serial", $serialnumber);
- $zip->close();
- }
- }
+ $zip = new ZipArchive();
+ $res = $zip->open("../resources/bootmedium/$prebootID/$bootisoID".".zip");
+ if($res === true){
+ $rootdir = $zip->getNameIndex(0);
+ $zip->addFromString($rootdir."build/rootfs/serial", $serialnumber);
+ $zip->close();
+ }
+ }
}
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/error');
- }
- }
-
- try {
- $this->prebootMapper->save($preboot);
-
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/error');
- //TODO Delete Folder + Preboot
- }
-
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/error');
+ }
+ }
+
+ try {
+ $this->prebootMapper->save($preboot);
+
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/error');
+ //TODO Delete Folder + Preboot
+ }
+
$this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/ok');
- }
- }
-
- $this->view->prebootForm = $prebootForm;
- }
+ }
+ }
- public function deleteprebootAction()
- {
-
- //ACL Is he allowed to delete Preboots?
- if(!Pbs_Acl::checkRight('prd'))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/forbidden');
-
- try{
- $prebootID = $this->_request->getParam('prebootID');
- if (!is_numeric($prebootID))
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/forbidden');
-
- $preboot = new Application_Model_PreBoot();
- $this->prebootMapper->find($prebootID, $preboot);
-
- if($this->membership->getGroupID() != $preboot->getGroupID())
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/forbidden');
-
- $this->prebootMapper->delete($preboot);
- exec("rm -r ../resources/bootmedium/".$prebootID);
-
- }catch(Zend_Exception $e){
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/error');
- }
- $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/ok');
- }
+ $this->view->prebootForm = $prebootForm;
+ }
+
+ public function deleteprebootAction()
+ {
+
+ //ACL Is he allowed to delete Preboots?
+ if(!Pbs_Acl::checkRight('prd'))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/forbidden');
+
+ try{
+ $prebootID = $this->_request->getParam('prebootID');
+ if (!is_numeric($prebootID))
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/forbidden');
+
+ $preboot = new Application_Model_PreBoot();
+ $this->prebootMapper->find($prebootID, $preboot);
+
+ if($this->membership->getGroupID() != $preboot->getGroupID())
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/forbidden');
+
+ $this->prebootMapper->delete($preboot);
+ exec("rm -r ../resources/bootmedium/".$prebootID);
+
+ }catch(Zend_Exception $e){
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/error');
+ }
+ $this->_redirect('/user/preboot/index/page/'.$this->page.'/deleteresult/ok');
+ }
}
-
+
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 312a647..4a4640f 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -28,7 +28,7 @@ class User_RoleController extends Zend_Controller_Action
$this->rightMapper = new Application_Model_RightMapper();
$this->rightRolesMapper = new Application_Model_RightRolesMapper();
$this->membershipMapper = new Application_Model_MembershipMapper();
-
+
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
@@ -45,60 +45,60 @@ class User_RoleController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('ro')) {
$this->_redirect('/user');
}
- $this->view->membership = $this->membership;
- $groupID = $this->membership->getGroupID();
- $this->view->roleList = $this->roleMapper->findBy(array('groupID' => $groupID),true);
+ $this->view->membership = $this->membership;
+ $groupID = $this->membership->getGroupID();
+ $this->view->roleList = $this->roleMapper->findBy(array('groupID' => $groupID),true);
- $roles = array();
- $groupGroupsMapper = new Application_Model_GroupGroupsMapper();
- $parents = $groupGroupsMapper->getParentGroups($groupID);
- $groupMapper = new Application_Model_GroupMapper();
- $roleMapper = new Application_Model_RoleMapper();
- $crawled = array();
- foreach($parents as $p){
- foreach($p as $a){
- if(!in_array($a,$crawled)){
- $crawled[] = $a;
- $group = $groupMapper->find($a);
- if($groupID != $a)
- $r = $roleMapper->findBy(array('groupID' => $a,'inheritance'=>"1"));
- else
- $r = $roleMapper->findBy(array('groupID' => $a));
- foreach($r as $d){
- $roles[$group->getTitle()][] = $d;
- }
+ $roles = array();
+ $groupGroupsMapper = new Application_Model_GroupGroupsMapper();
+ $parents = $groupGroupsMapper->getParentGroups($groupID);
+ $groupMapper = new Application_Model_GroupMapper();
+ $roleMapper = new Application_Model_RoleMapper();
+ $crawled = array();
+ foreach($parents as $p){
+ foreach($p as $a){
+ if(!in_array($a,$crawled)){
+ $crawled[] = $a;
+ $group = $groupMapper->find($a);
+ if($groupID != $a)
+ $r = $roleMapper->findBy(array('groupID' => $a,'inheritance'=>"1"));
+ else
+ $r = $roleMapper->findBy(array('groupID' => $a));
+ foreach($r as $d){
+ $roles[$group->getTitle()][] = $d;
}
}
}
- $this->view->roleList = $roles;
+ }
+ $this->view->roleList = $roles;
- // Search
- $search = $this->_request->getParam('search');
- $mySearch = new Pbs_Search();
- $mySearch->setSearchTerm($search);
- $mySearch->setModule('role');
- if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $this->view->roleList = $mySearch->search($this->view->roleList);
- }
- $this->view->searchform = $mySearch->searchForm();
+ // Search
+ $search = $this->_request->getParam('search');
+ $mySearch = new Pbs_Search();
+ $mySearch->setSearchTerm($search);
+ $mySearch->setModule('role');
+ if($search != ''){
+ $this->view->search = $mySearch->getSearchTerm();
+ $this->view->roleList = $mySearch->search($this->view->roleList);
+ }
+ $this->view->searchform = $mySearch->searchForm();
+
+ // Pagination
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
+ $pagination->setElement($this->view->roleList);
+ $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setPageUrl('/user/role/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- // Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
- $pagination->setElement($this->view->roleList);
- $pagination->setRequestPage($this->_request->getParam('page'));
- $pagination->setPageUrl('/user/role/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
+ $this->view->roleList = $pagination->getElements();
+ $this->view->pagination = $pagination->pagination();
+ $this->view->page = $pagination->getRequestPage();
+ $this->view->addRight = Pbs_Acl::checkRight('ra');
+ $this->view->editRight = Pbs_Acl::checkRight('re');
+ $this->view->deleteRight = Pbs_Acl::checkRight('rd');
+ $this->view->detailsRight = Pbs_Acl::checkRight('rdd');
+ $this->view->userIDsNamespace = $this->userIDsNamespace;
- $this->view->roleList = $pagination->getElements();
- $this->view->pagination = $pagination->pagination();
- $this->view->page = $pagination->getRequestPage();
- $this->view->addRight = Pbs_Acl::checkRight('ra');
- $this->view->editRight = Pbs_Acl::checkRight('re');
- $this->view->deleteRight = Pbs_Acl::checkRight('rd');
- $this->view->detailsRight = Pbs_Acl::checkRight('rdd');
- $this->view->userIDsNamespace = $this->userIDsNamespace;
-
}
public function searchAction(){
@@ -113,53 +113,53 @@ class User_RoleController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('ra')) {
$this->_redirect('/user');
}
-
- $roleID = $this->userIDsNamespace['roleID'];
- $rights = $this->rightMapper->fetchAll();
- if(count($rights) > 0) {
- $rightCategoryMapper = new Application_Model_RightCategoryMapper();
- foreach($rights as $right) {
- $rightCategory = $rightCategoryMapper->find($right->getRightcategoryID());
- $rightlist[$rightCategory->getTitle()][$right->getID()] = $right->getTitle();
- }
+
+ $roleID = $this->userIDsNamespace['roleID'];
+ $rights = $this->rightMapper->fetchAll();
+ if(count($rights) > 0) {
+ $rightCategoryMapper = new Application_Model_RightCategoryMapper();
+ foreach($rights as $right) {
+ $rightCategory = $rightCategoryMapper->find($right->getRightcategoryID());
+ $rightlist[$rightCategory->getTitle()][$right->getID()] = $right->getTitle();
}
- if (!isset($_POST["add"])){
- $addForm = new user_Form_RoleAdd(array('rightlist' => $rightlist, 'inheritanceright' => Pbs_Acl::checkRight('rir'), 'addrighttoroleright' => Pbs_Acl::checkRight('rar')));
- } else {
- $addForm = new user_Form_RoleAdd(array('rightlist' => $rightlist, 'inheritanceright' => Pbs_Acl::checkRight('rir'), 'addrighttoroleright' => Pbs_Acl::checkRight('rar')),$_POST);
- if ($addForm->isValid($_POST)) {
- $_POST['groupID'] = $this->userIDsNamespace['groupID'];
- $role = new Application_Model_Role($_POST);
- try {
- $this->roleMapper->save($role);
- $db = Zend_Db_Table::getDefaultAdapter();
- $insertedRoleID = $db->lastInsertId();
- } catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
- foreach($_POST['rights'] as $rightID => $bool) {
- if($bool == 1) {
- $rightrole = new Application_Model_RightRoles();
- $rightrole->setRightID($rightID);
- $rightrole->setRoleID($insertedRoleID);
- try {
- $this->rightRolesMapper->save($rightrole);
- } catch(Zend_Exception $e)
- {
- echo "Caught exception: " . get_class($e) . "<br/>";
- echo "Message: " . $e->getMessage() . "<br/>";
- return;
- }
+ }
+ if (!isset($_POST["add"])){
+ $addForm = new user_Form_RoleAdd(array('rightlist' => $rightlist, 'inheritanceright' => Pbs_Acl::checkRight('rir'), 'addrighttoroleright' => Pbs_Acl::checkRight('rar')));
+ } else {
+ $addForm = new user_Form_RoleAdd(array('rightlist' => $rightlist, 'inheritanceright' => Pbs_Acl::checkRight('rir'), 'addrighttoroleright' => Pbs_Acl::checkRight('rar')),$_POST);
+ if ($addForm->isValid($_POST)) {
+ $_POST['groupID'] = $this->userIDsNamespace['groupID'];
+ $role = new Application_Model_Role($_POST);
+ try {
+ $this->roleMapper->save($role);
+ $db = Zend_Db_Table::getDefaultAdapter();
+ $insertedRoleID = $db->lastInsertId();
+ } catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ return;
+ }
+ foreach($_POST['rights'] as $rightID => $bool) {
+ if($bool == 1) {
+ $rightrole = new Application_Model_RightRoles();
+ $rightrole->setRightID($rightID);
+ $rightrole->setRoleID($insertedRoleID);
+ try {
+ $this->rightRolesMapper->save($rightrole);
+ } catch(Zend_Exception $e)
+ {
+ echo "Caught exception: " . get_class($e) . "<br/>";
+ echo "Message: " . $e->getMessage() . "<br/>";
+ return;
}
}
- $this->_helper->redirector('', 'role');
- return;
}
+ $this->_helper->redirector('', 'role');
+ return;
}
- $this->view->addForm = $addForm;
+ }
+ $this->view->addForm = $addForm;
}
public function editAction()
@@ -377,7 +377,7 @@ class User_RoleController extends Zend_Controller_Action
$rightroles = new Application_Model_RightRoles();
$rightroles->setRightID($rightID);
$rightroles->setRoleID($roleID);
-
+
try {
$this->rightRolesMapper->save($rightroles);
} catch(Zend_Exception $e)
diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php
index 88f73f4..91b6dbd 100644
--- a/application/modules/user/controllers/SessionController.php
+++ b/application/modules/user/controllers/SessionController.php
@@ -59,7 +59,7 @@ class User_SessionController extends Zend_Controller_Action
$bm = $bootmenuentriesMapper->find($session->getBootmenuentryID());
if($bm != null)
$session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bm->getTitle());
-
+
}
if($session->getBootisoID() != ''){
@@ -80,7 +80,7 @@ class User_SessionController extends Zend_Controller_Action
}
}
// Sort after date/id
- usort($mySessions, sortFunc);
+ usort($mySessions, 'sortFunc');
// Search
$search = $this->_request->getParam('search');
@@ -92,7 +92,7 @@ class User_SessionController extends Zend_Controller_Action
$mySessions = $mySearch->search($mySessions);
}
$this->view->searchform = $mySearch->searchForm();
-
+
// Pagination
$pagination = new Pbs_Pagination();
$pagination->setPerPage(10);
@@ -113,8 +113,7 @@ class User_SessionController extends Zend_Controller_Action
}
-
function sortFunc($func_a, $func_b) {
if($func_a->getID() == $func_b->getID()) return 0;
return ($func_a->getID() < $func_b->getID()) ? 1 : -1;
-} \ No newline at end of file
+}
diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php
index cb2337f..6ec9eb7 100644
--- a/application/modules/user/forms/Bootiso.php
+++ b/application/modules/user/forms/Bootiso.php
@@ -107,9 +107,9 @@ class user_Form_Bootiso extends Zend_Form
$this->addElement($publicfield);
if($this->action == "createbootiso")
- $label = "Create Bootiso";
+ $label = "Create BootMedium";
else
- $label = "Edit Bootiso";
+ $label = "Edit BootMedium";
$this->addElement('submit', $this->action, array(
'required' => false,
diff --git a/application/modules/user/forms/Bootmenu.php b/application/modules/user/forms/Bootmenu.php
index 77b8f3c..0a827d9 100644
--- a/application/modules/user/forms/Bootmenu.php
+++ b/application/modules/user/forms/Bootmenu.php
@@ -50,6 +50,14 @@ class user_Form_Bootmenu extends Zend_Form
'required' => true,
'label' => 'Title:',
));
+ $this->addElement('text', 'startcounter', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('Int'),
+ ),
+ 'required' => true,
+ 'label' => 'Startcounter:',
+ ));
if($this->action == "createbootmenu")
$label = "Create Bootmenu";
diff --git a/application/modules/user/forms/FilterEntry.php b/application/modules/user/forms/FilterEntry.php
index 2751dc6..42885ff 100644
--- a/application/modules/user/forms/FilterEntry.php
+++ b/application/modules/user/forms/FilterEntry.php
@@ -201,7 +201,7 @@ class user_Form_FilterEntry extends Zend_Form
$filtervalue1->setRegisterInArrayValidator(false);
break;
case "6":
- $desc = "Select a Group";
+ $desc = "For all members in this Group";
$label1 = 'Group:';
// TODO: insert the child Groups
$filtervalue1 = $this->createElement('select','filtervalue');
diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml
index 53d2574..672877b 100644
--- a/application/modules/user/layouts/user.phtml
+++ b/application/modules/user/layouts/user.phtml
@@ -42,7 +42,7 @@ echo $this->headScript()."\n";
if(Pbs_Acl::checkRight('ro'))
echo "<li class='navTreeItem'><a href='/user/role'>Role</a></li>";
if(Pbs_Acl::checkRight('bai') || Pbs_Acl::checkRight('bui'))
- echo "<li class='navTreeItem'><a href='/user/bootiso'>BootIso</a></li>";
+ echo "<li class='navTreeItem'><a href='/user/bootiso'>BootMedium</a></li>";
if(Pbs_Acl::checkRight('pro'))
echo "<li class='navTreeItem'><a href='/user/preboot'>PreBoot</a></li>";
if(Pbs_Acl::checkRight('booai') || Pbs_Acl::checkRight('booui'))
@@ -146,4 +146,4 @@ echo $this->headScript()."\n";
<?php print_a('Session',$_SESSION,'GET',$_GET,'POST',$_POST); ?></div>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml
index a8c4e1c..70c6a3b 100644
--- a/application/modules/user/views/scripts/bootiso/index.phtml
+++ b/application/modules/user/views/scripts/bootiso/index.phtml
@@ -1,9 +1,12 @@
-<h1>BootMedien</h1>
+<h1>BootMedien<img class='helpericon' src='/media/img/bulb_off.png' /></h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
+
+<div class='helper infobox'>This are the available BootMedia. You can download this BootMedia to your Computer to create a bootable USB stick or a bootable CD.</div>
+
<?php echo $this->searchform; ?>
<?php if(Pbs_Acl::checkRight('bc')): ?>
-<?php echo $this->formButton('createbootiso', 'Create BootISO', array(
+<?php echo $this->formButton('createbootiso', 'Create BootMedium', array(
'onclick' => 'self.location="/user/bootiso/createbootiso/page/'.$this->page.'"',
'class' => 'addbutton'))?>
<?php endif;?>
@@ -25,11 +28,11 @@
<div class='listelement'>
<?php if(count($this->bootisolist)==0)
- echo "There are no BootISO entries to display." ?>
+ echo "There are no BootMedium entries to display." ?>
<?php foreach ($this->bootisolist as $k => $bootiso): ?>
<div class='element'>
<div class='number'>
- <div class='smallnumber'>BootIso</div>
+ <div class='smallnumber'>BootMed</div>
<?php echo $k+1; ?>
</div>
<div class='content'>
@@ -56,7 +59,7 @@
'page' => $this->page
),
'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootISO' /></a>
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootMedium' /></a>
<?php endif; ?>
<?php if(Pbs_Acl::checkRight('bd')): ?>
<a href="<?php echo $this->url(
@@ -68,7 +71,7 @@
'page' => $this->page
),
'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete BootISO'/></a>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete BootMedium'/></a>
<?php endif; ?>
</div>
<?php if(!Pbs_Acl::checkRight('bai')){
diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml
index bdaf3a5..cf23e1d 100644
--- a/application/modules/user/views/scripts/bootmenu/index.phtml
+++ b/application/modules/user/views/scripts/bootmenu/index.phtml
@@ -1,7 +1,14 @@
-<h1>BootMenu</h1>
+<h1>BootMenu<?php if($this->type == 'own'):?><img class='helpericon' src='/media/img/bulb_off.png' /><?php endif;?></h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
+
+<?php if($this->type == 'own'):?>
+ <div class='helper infobox'>Here you can see your Bootmenu. You can add a BootOs with a default Config or with a default Config. If you are overwhelmed by the possibilities the default Config is the best choice.</div>
+<?php endif;?>
+
<div id='notification' style='display:none;'></div>
-<?php echo $this->searchform; ?>
+<?php if(Pbs_Acl::checkRight('booai')): ?>
+ <?php echo $this->searchform; ?>
+<?php endif; ?>
<?php $conflabel = $this->type == 'group'?'own':'group';?>
@@ -16,15 +23,14 @@
'onclick' => 'self.location="/user/bootmenu/index/type/'.$conflabel.'/page/'.$this->page.'"',
'class' => 'addbutton'))?>
<?php endif;?>
-
-<div class='searchvars'>
- <div class='head'>Available searchfilter:</div>
- <?php if(Pbs_Acl::checkRight('booai')): ?>
- <div class='code'>bootmenuID</div>
- <?php endif; ?>
- <div class='code'>title</div>
- <div class='code'>changed</div>
-</div>
+<?php if(Pbs_Acl::checkRight('booai')): ?>
+ <div class='searchvars'>
+ <div class='head'>Available searchfilter:</div>
+ <div class='code'>bootmenuID</div>
+ <div class='code'>title</div>
+ <div class='code'>changed</div>
+ </div>
+<?php endif; ?>
<div class='listelement'>
<?php if(count($this->bootmenulist)==0)
@@ -102,8 +108,14 @@
<?php endif; ?>
</div>
<div class='title'><?php echo $this->escape($bootmenu->getTitle()); ?></div>
- <div class='subtitle'><?php echo count($this->bootmenuentrylist[$bootmenu->getID()]);?> Entrys - <?php echo $this->escape($bootmenu->getCreated()); ?></div>
- <div class='details dispnone'>
+ <div class='subtitle'><?php echo count($this->bootmenuentrylist[$bootmenu->getID()]);?> Entrys -
+ Startcounter: <?php echo $this->escape($bootmenu->getStartcounter()); ?> - <?php echo $this->escape($bootmenu->getCreated()); ?></div>
+ <?php
+ $class='';
+ if($this->type != 'own')
+ $class=' dispnone';
+ ?>
+ <div class='details<?php echo $class;?>'>
<?php if(Pbs_Acl::checkRight('booai')): ?>
<label>BootmenuID</label>
<div class='item'><?php echo $this->escape($bootmenu->getID()); ?></div>
diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml
index 94e35c0..c0f201e 100644
--- a/application/modules/user/views/scripts/bootos/index.phtml
+++ b/application/modules/user/views/scripts/bootos/index.phtml
@@ -1,5 +1,8 @@
-<h1>BootOS</h1>
+<h1>BootOS<img class='helpericon' src='/media/img/bulb_off.png' /></h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
+
+<div class='helper infobox'>Here you can see all available BootOs you can select to start. Before you can boot one of these you have to add it to your BootMenu.</div>
+
<?php echo $this->searchform; ?>
<?php if(Pbs_Acl::checkRight('bou')): ?>
@@ -27,8 +30,7 @@
<div class='code'>share</div>
<div class='code'>shortname</div>
<div class='code'>source</div>
- <?php endif; ?>
-
+ <?php endif; ?>
<div class='code'>title</div>
<div class='code'>groupID</div>
<div class='code'>description</div>
diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml
index b519140..6f7a806 100644
--- a/application/modules/user/views/scripts/client/index.phtml
+++ b/application/modules/user/views/scripts/client/index.phtml
@@ -11,6 +11,7 @@
<div class='code'>clientID</div>
<div class='code'>macadress</div>
<div class='code'>hardwarehash</div>
+ <div class='code'>created</div>
</div>
<div class='listelement'>
@@ -55,6 +56,8 @@
<div class='item'><?php echo $this->escape($client['macadress']) ?></div>
<label>Hardwarehash</label>
<div class='item'><?php echo $this->escape($client['hardwarehash']) ?></div>
+ <label>Created</label>
+ <div class='item'><?php echo $this->escape($client['created']) ?></div>
</div>
</div>
<div class='clear'></div>
diff --git a/application/modules/user/views/scripts/config/index.phtml b/application/modules/user/views/scripts/config/index.phtml
index 8361ffd..bfcce9f 100644
--- a/application/modules/user/views/scripts/config/index.phtml
+++ b/application/modules/user/views/scripts/config/index.phtml
@@ -1,5 +1,10 @@
-<h1>Config</h1>
+<h1>Config<?php if(Pbs_Acl::checkRight('csui')): ?><img class='helpericon' src='/media/img/bulb_off.png' /><?php endif; ?></h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
+
+<?php if(Pbs_Acl::checkRight('csui')): ?>
+<div class='helper infobox'>Here you the the available Configs which you can select to your BootOS. The Config does some modification to the selected BootOs after the start. In Most Cases you don't have to change here anything.</div>
+<?php endif; ?>
+
<?php echo $this->searchform; ?>
<?php $conflabel = $this->type == 'own'?'group':'own';?>
diff --git a/application/modules/user/views/scripts/person/edit.phtml b/application/modules/user/views/scripts/person/edit.phtml
index 3e666d4..76316db 100644
--- a/application/modules/user/views/scripts/person/edit.phtml
+++ b/application/modules/user/views/scripts/person/edit.phtml
@@ -2,4 +2,4 @@
<?php
$this->editForm->setAction($this->url());
echo $this->editForm;
-?> \ No newline at end of file
+?>
diff --git a/application/modules/user/views/scripts/person/owndetails.phtml b/application/modules/user/views/scripts/person/owndetails.phtml
index 3f1cfb4..60364c0 100644
--- a/application/modules/user/views/scripts/person/owndetails.phtml
+++ b/application/modules/user/views/scripts/person/owndetails.phtml
@@ -74,7 +74,7 @@ if(count($this->groups)==0)
<label>Role</label>
<div class='item'><?php echo $group['role']; ?>&nbsp;</div>
</div>
- <?php if($this->apikeys[$group['groupID']] != null):?>
+ <?php if(isset($this->apikeys[$group['groupID']]) && $this->apikeys[$group['groupID']] != null):?>
<div class='details'>
<label>API-Key</label>
<div class='item'><?php echo $this->apikeys[$group['groupID']]; ?>&nbsp;</div>
diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml
index 56ae8d5..f78df6a 100644
--- a/application/modules/user/views/scripts/pool/index.phtml
+++ b/application/modules/user/views/scripts/pool/index.phtml
@@ -144,7 +144,7 @@
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('polc')):?>
- <select onChange="location.href=this.options[this.selectedIndex].value">
+ Pool:<select onChange="location.href=this.options[this.selectedIndex].value">
<option></option>
<?php foreach ($this->pools as $pool): ?>
<option value="<?php echo $this->url(
@@ -165,9 +165,11 @@
</div>
<div class='details'>
<label>MacAdress</label>
- <div class='item'><?php echo $client['macadress']; ?></div>
+ <div class='item'><?php echo $this->escape($client['macadress']); ?></div>
<label>HardwareHash</label>
- <div class='item'><?php echo $client['hardwarehash']; ?></div>
+ <div class='item'><?php echo $this->escape($client['hardwarehash']); ?></div>
+ <label>Created</label>
+ <div class='item'><?php echo $this->escape($client['created']) ?></div>
</div>
</div>
<div class='clear'></div>
diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml
index 580238f..6dc0707 100644
--- a/application/modules/user/views/scripts/role/index.phtml
+++ b/application/modules/user/views/scripts/role/index.phtml
@@ -68,8 +68,8 @@
<?php } ?>
</div>
- <div class='title'><?php echo "[".$i."] ";?><?php echo $role->getTitle();?></div>
- <div class='subtitle'><?php echo $role->getDescription(); ?>&nbsp;</div></div>
+ <div class='title'><?php echo $role->getTitle();?></div>
+ <div class='subtitle'><?php echo $i." - ";?><?php echo $role->getDescription(); ?>&nbsp;</div></div>
<div class='clear'></div>
</div>
<?php endforeach ?>
diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml
index 0e440f2..d6fb6cb 100644
--- a/application/modules/user/views/scripts/role/show.phtml
+++ b/application/modules/user/views/scripts/role/show.phtml
@@ -58,7 +58,7 @@ if(count($this->rightsList)==0) {
<?php
if(isset($this->rightcategorieslist)) {
foreach($this->rightcategorieslist as $k => $v):
- $rights = $this->rightsList[$k];
+ @$rights = $this->rightsList[$k];
if(count($rights) > 0) {
?>
<h3><?php echo $v; ?>:</h3>
diff --git a/droppbs.sql b/droppbs.sql
deleted file mode 100644
index 3412fd2..0000000
--- a/droppbs.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-USE pbs;
-DROP TABLE pbs_bootiso;
-DROP TABLE pbs_bootmenuentries;
-DROP TABLE pbs_filterentries;
-DROP TABLE pbs_groupgroups;
-DROP TABLE pbs_grouprequest;
-DROP TABLE pbs_membershipfilters;
-DROP TABLE pbs_poolentries;
-DROP TABLE pbs_poolfilters;
-DROP TABLE pbs_rightroles;
-DROP TABLE pbs_session;
-DROP TABLE pbs_client;
-DROP TABLE pbs_filtertype;
-DROP TABLE pbs_filter;
-DROP TABLE pbs_role;
-DROP TABLE pbs_right;
-DROP TABLE pbs_pool;
-DROP TABLE pbs_person;
-DROP TABLE pbs_bootos;
-DROP TABLE pbs_bootmenu;
-DROP TABLE pbs_config;
-DROP TABLE pbs_group;
-DROP TABLE pbs_membership;
diff --git a/init_ubuntu b/init_ubuntu
deleted file mode 100755
index 82012d6..0000000
--- a/init_ubuntu
+++ /dev/null
@@ -1,1036 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2003..2006 - RZ Uni Freiburg
-# Copyright (c) 2006..2010 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found at http://openslx.org
-#
-# Main script for initial ramfs for OpenSLX linux stateless clients
-#############################################################################
-
-# fixme: the primary init script should never fail, so move all critical code
-# into sub script calls (see ticket 259)
-
-export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
-
-# device files get their own filesystem (to be move mounted later)
-devdir="/dev"
-mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
-
-# mount the important standard directories
-[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
-[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
-
-# create basic device files an directories (in dev - for most hardware related
-# devices mdev should handle that)
-for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \
- "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \
- "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \
- "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \
- "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \
- "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \
- "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \
- "/dev/fb0 c 29 0" "/dev/xconsole p"; do
- mknod $i
-done
-mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev \
- ${devdir}/.initramfs /var/log
-# create some standard links (expected?) in /dev
-ln -s /proc/kcore /dev/core
-ln -s /proc/self/fd /dev/fd
-ln -s /proc/self/fd/0 /dev/stdin
-ln -s /proc/self/fd/1 /dev/stdout
-ln -s /proc/self/fd/2 /dev/stderr
-
-# redirect kernel messages to tty10 instead of the standard console
-getty -i -n -l /bin/cat 38400 tty10 &
-setlogcons 10
-
-# start device auto discovery/setup service of busybox
-echo >/etc/mdev.conf
-mdev -s
-
-# source functions file common for all distros, messages contains all error
-# and info output (for some reason the error output is not produced properly
-# - crash)
-
-# how do the localization here? There is not yet a country-Variable
-. /etc/messages
-. /etc/functions || ( echo -e $init_mff && sleep 100 )
-. /etc/distro-functions || ( echo -e $init_dff && sleep 100 )
-
-# configuration settings for this slx system's environment
-. /etc/slxsystem.conf 2>/dev/null || ( echo -e ${init_sscf} && \
- sleep 100 )
-# initramfs-setup configuration (common initial settings for all clients using
-# a certain InitRamFS generated by slxconfig-demuxer)
-[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null
-
-export date="${slxconf_date}"
-
-export DEBUGLEVEL=0
-export KERNEL="${slxconf_kernver}"
-export NWMODULES="${slxconf_listnwmod}"
-export DISTRO_NAME="${slxconf_distro_name}"
-export DISTRO_VER="${slxconf_distro_ver}"
-export SYSTEM_NAME="${slxconf_system_name}"
-export SLXVERSION="${slxconf_slxver}"
-
-# do not use dnbd cache file
-nodnbdcache="yes"
-
-# set a default LAN interface, might be modified for WLAN, bridge setups or
-# on machines with more than one ethernet card built in
-export nwif="eth0"
-
-# load usb modules for keyboard (reenable usb keyboards, otherwise the
-# admin has to wait until second run of hwsetup late in stage3) and the
-# network adaptor modules, search for pci modules to load later on
-hwautocfg base
-
-# if no kernel version is set, try to get it directly from /proc
-if [ -z $KERNEL ] ; then
- KERNEL=$(cat /proc/version)
- KERNEL=${KERNEL#*version }
- KERNEL=${KERNEL% (*) (*}
-fi
-
-# set defaults for some important variables, might be overwritten via
-# kernel commandline
-tmpfssize="$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') \
- / 100 \* 75 - 128000)k" # in kbyte
-cowsize="50%"
-rwdir=/dev/shm
-nfsro="nfs"
-aufs=1
-unionfs=1
-
-runinithook '00-started'
-
-# run pre init script and user defined preinit.local, copied by mkdxsinitrd
-# from /var/lib/openslx/config/... in stage2
-preinit
-[ -x /bin/preinit.local ] && /bin/preinit.local
-
-
-# switch off the several configuration methods, will be switched on
-# according to kernel commandline settings
-echo "noldap" > /tmp/ldap-done
-
-# external configuration file retrieval (per tftp) must be done, as otherwise
-# we will never get the initramfs-setup file. By default, we try a predefined
-# standard path (.../tftpboot/client-config/ ...)
-file="no"
-
-# read kernel commandline
-read KCMDLINE < /proc/cmdline
-export KCMDLINE
-# read the system wide initramfs-setup and then the kernel commandline
-for opts in $(sed "s/#.*//" /etc/initramfs-setup) ${KCMDLINE} ; do
- case ${opts} in
- # shut down pc
- shutdown)
- cat <<EOL
-
- SHUTTING DOWN PC!
-
-EOL
- echo "o" >/proc/sysrq-trigger
- ;;
- # from IPAPPEND
- BOOTIF=*)
- bootmac=$(echo ${opts} | sed "s/.*=01-//;s/-/:/g")
- ;;
- # localization
- country=*)
- COUNTRY=${opts#country=}
- grep -q -E "country=" /etc/initramfs-setup &&
- echo -e "\n# localization information gotten via kernel command line \
-in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup
- ;;
- # single token for debugging ...
- debug)
- DEBUGLEVEL=1
- ;;
- # ... or a specified debug level
- debug=*)
- DEBUGLEVEL=${opts#debug=}
- if [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] ; then
- echo "** SLX init started near $(sysup)"
- elif [ $DEBUGLEVEL -ge 3 -a $DEBUGLEVEL -le 20 ] ; then
- # create, start a debug shell process
- echo "Debug shell started on second console (tty2)"
- echo -e "#!/bin/sh\nsh" >/bin/debugshell
- chmod u+x /bin/debugshell
- getty -i -n -l /bin/debugshell 38400 tty2 &
- # start logging (debuglevel >=3)
- # fixme: SuSE hangs in Creating /var/log/boot.msg if activated
- echo "Syslogd started on third console (tty3)"
- # just to have some name in syslog
- echo "(slx init)" >/proc/sys/kernel/hostname
- syslogd -C2048
- klogd
- logread -f > /dev/tty3 2>/dev/null &
- logread -f >> /var/log/messages 2>/dev/null &
- fi
- ;;
- # if configuration should not be gathered by dhcp client
- nodhcp)
- nodhcp="yes"
- echo "nodhcp" >/tmp/dhcp-done
- ;;
- nofile)
- unset file
- echo "nofile" >/tmp/file-done
- ;;
- # if ldap configuration should be triggered
- ldap)
- ldap="yes"
- rm /tmp/ldap-done
- ;;
- # ldap configuration with host and port to contact (base)
- ldap=*)
- ldap="yes"
- rm /tmp/ldap-done
- ;;
- # file source with tftp server and file location on the server
- file=*|file)
- if [ "${opts}" != "file" ] ; then
- fileprot=$(uri_token ${opts#file=} prot)
- fileserv=$(uri_token ${opts#file=} server)
- filepath=$(uri_token ${opts#file=} path)
- fi
- ;;
- # if ld.so.cache should be generated; should be switched on when composing
- # rootfs from more than one source
- ldsc)
- ldsc="yes";;
- # simple union of base ro rootdir with tempfs on top
- nounionfs)
- unionfs=0;;
- # additional source to unify root filesystem with; the top layer will be
- # the tempfs
- unionfs=*)
- unionfs=1
- uniondirs=${opts#unionfs=}
- # most probably it is a good idea to run ldconfig, so enable it
- ldsc="yes"
- ;;
- noldsc)
- ldsc="";;
- # same for AUFS; alternative to unionfs
- noaufs)
- aufs=0;;
- aufs=*)
- aufs=1
- uniondirs=${opts#aufs=}
- # most probably it is a good idea to run ldconfig, so enable it
- ldsc="yes"
- ;;
- noldsc)
- ldsc="";;
- # if cowloop should be used, only ontop of network block device and in
- # combination with classical fs, like ext2 useful
- cowloop=*)
- cowloop=1
- #cowsize=${opts#cowloop=}
- ;;
- # rootfs will void the variables (d)nbdroot, nfsroot ...
- # fixme: allow multiple rootfs sources to be unioned!?
- # if strinstr " " "$rootfs" ...
- rootfs=*)
- rootfs=${opts#rootfs=}
- rootfs=${rootfs#\"}
- rootfs=${rootfs%%\"}
- srvproto=$(uri_token $rootfs prot)
- case $srvproto in
- nfs)
- # nfsroot consists of two components
- nfspath=$(uri_token $rootfs path)
- nfsserver=$(uri_token $rootfs server)
- grep -q -E "nfsserver" /etc/initramfs-setup || \
- echo -e "# nfs root information gotten via kernel command \
-line in $0\nnfsserver=\"${nfsserver}\"\nnfspath=\"${nfspath}\"" \
- >>/etc/initramfs-setup
- ;;
- *nbd*)
- bldmod=$srvproto
- # get settings for nbd-client, filesystem equals to path in URI
- # notation (remove leading slash from filesystem at the end)
- bldhost=$(uri_token $rootfs server)
- bldport=$(uri_token $rootfs port)
- bldrfst=$(uri_token $rootfs path)
- bldrfst=${bldrfst#/*}
- ;;
- aoe)
- echo "Not implemented yet"
- bldmod=
- ;;
- iscsi)
- echo "Not implemented yet"
- bldmod=
- #iscsiserver=$(uri_token $rootfs server)
- #iscsiport=$(uri_token $rootfs port)
- #iscsitarget=$(uri_token $rootfs path)
- ;;
- lbd)
- # use a local device for mounting root block device with given
- # filesystem directly or a root filesystem container from another
- # filesystem, e.g. rootfs=lbd://sda1/squashfs (bldmod cannot be
- # empty, use loop or the real device stuff)
- bldmod=loop
- blddev=$(uri_token $rootfs server)
- bldfst=$(uri_token $rootfs path)
- bldfst=${bldfst#/*}
- ;;
- esac
- ;;
- # size of cache dnbd should use within ram
- dcsize=*)
- dnbdcachesize=${opts#dcsize=};;
- # ip configuration client-ip:server-ip:gateway:netmask
- ip=*)
- ipinfo=${opts#ip=};;
- # deprecated: nfs server and path (rewritten to standard style)
- nfsroot=*)
- srvproto=nfs
- nfsroot=${opts#nfsroot=}
- nfspath=${nfsroot#*:}
- nfsserver=${nfsroot%:/*}
- grep -q -E "nfsserver" /etc/initramfs-setup || \
- echo -e "\n# nfs root information gotten via kernel command line \n\
-in $0\n# deprecated: please use rootfs=nfs://...\nnfsserver=\"${nfsserver}\"\
-\nnfspath=\"${nfspath}\"">> /etc/initramfs-setup
- ;;
- # size of tempfs if not max. 50% of RAM should be used
- tmpfssize=*)
- tmpfssize=${opts#tmpfssize=};;
- # vendor code identifier for dhcp requests, that way OpenSLX clients could
- # be distinguished from other (dhcp) clients
- vci=*)
- vci=${opts#vci=};;
- # option for ddcinfo
- ddcinfo=*)
- ddcinfo=${opts#ddcinfo=};;
- esac
-done
-
-runinithook '05-have-kernelvars'
-
-# at this point a timer should be started to ensure an automated reboot
-# or halt of the machine if SLX init does not succeed (e.g. missing kernel
-# module for the network adaptor)
-if [ ${DEBUGLEVEL} -lt 3 -o ${DEBUGLEVEL} = 8 ] ; then
- cat<<EOF > /bin/watchdog
-#!/bin/sh
-echo \$$ > /tmp/watchdogpid
-[ ! -f /proc/version ] && mount -n -t proc proc /proc
-sleep 120 2> /dev/null
-echo "o" > /proc/sysrq-trigger
-EOF
- chmod u+x /bin/watchdog
- watchdog &
-fi
-
-# check if at least one type of IP configuration is availabe
-if [ -n "$nodhcp" -a -z "$ldap" -a -z "$ipinfo" -a $srvproto != "lbd" ]
- then echo -e "# You did not specify any advanced configuration mode for \
-your clients. You\n# might want to add the token 'dhcp' for DHCP config, \
-'file(=source)'\n# for config file get via TFTP or 'ldap(=source)' for LDAP \
-configuration to\n# your kernel command line." >> /etc/initramfs-setup
- if strinfile "clientip" /etc/initramfs-setup ; then
- # IP configuration seems to be present in initramfs-setup file
- # TODO: FIX this, as it will clobber all kernel-cmdline values!
- . /etc/initramfs-setup
- ipinfo="ip=$clientip:$serverip:$gateway:$subnet_mask"
- else
- error "$init_errip"
- fi
-fi
-
-# for ldap configuration at least basic IP setup is needed to contact the
-# server
-[ -n "$nodhcp" -a -n "$ldap" -a -z "$ipinfo" ] && error "$init_errldap"
-# set debug level and logfile
-if [ $DEBUGLEVEL -eq 20 ] ; then
- echo "** Setting debuglevel to ${DEBUGLEVEL} at $(sysup)"
-elif [ $DEBUGLEVEL -ne 0 ] ; then
- echo "Setting debuglevel to ${DEBUGLEVEL}"
-fi
-export MODPRV=" "
-export LOGFILE
-if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then
- # set LOGFILE and move it later on into stage4
- LOGFILE="/var/log/slx-boot.log"
- echo "Starting OpenSLX client boot logging at $(date)" >$LOGFILE
- echo "1 4 1 7" >/proc/sys/kernel/printk
- [ "${DEBUGLEVEL}" -ge 2 ] && MODPRV="-v"
- [ "${DEBUGLEVEL}" -gt 3 -a "${DEBUGLEVEL}" -le 10 ] && {
- set -x
- # and the kernel too
- echo "7 7 7 7" >/proc/sys/kernel/printk; }
- [ "${DEBUGLEVEL}" -gt 10 -a "${DEBUGLEVEL}" -le 20 ] && set +x
-else
- # switch off most of kernel debug output
- echo "0 0 0 0" >/proc/sys/kernel/printk
- # modprobe should stay quiet
- MODPRV="-q"
- LOGFILE="/dev/null"
-fi
-
-runinithook '10-nw-if-config'
-
-# check for multiple ethernet interfaces (we have at least the mac of PXE boot
-# device in $bootmac)
-# check here for the active ethernet link (skip non-ethN interfaces)
-if strinstr "eth" "$nwif" ; then
- for ethif in eth0 eth1 eth2 eth3 ; do
- export macaddr=$(ip link show dev $ethif 2>/dev/null | \
- grep -i link.ether | awk '{print $2}')
- # if there is no bootmac present in kernel commandline any checks are
- # useless
- if [ -z "$bootmac" ] ; then
- bootmac="$macaddr"
- [ "$ethif" != "eth0" ] && error "$init_bootmac" nonfatal
- fi
- if [ "$macaddr" = "$bootmac" ] ; then
- nwif=$ethif
- break
- elif [ "x$macaddr" = "x" ] ; then
- # if the macaddr is empty on the first interface tried, there is no
- # network adaptor visible (missing kernel module)
- if [ "$ethif" = "eth0" ] ; then
- error "$init_errnwad"
- else
- # assume a forcedeth problem here (nonmatching MACs)
- macaddr=${bootmac}
- fi
- break
- fi
- done
-fi
-# quickfix for proper nwif passing ... (to be fixed in a more general way)
-sed "s/nwif=.*/nwif=\"${nwif}\"/" -i /tmp/env/wrapper.env
-oldnwif=$nwif
-# hook to setup bridging (several virtualization tools ...
-runinithook '20-nw-bridge-config'
-
-# set up loopback networking
-[ $DEBUGLEVEL -eq 20 ] && echo "** starting ip config at $(sysup)"
-ip link set dev lo up 2>/dev/null
-ip addr add 127.0.0.1/8 dev lo 2>/dev/null
-ip link set dev $nwif up 2>/dev/null || error "$init_noeth"
-
-# analyze ip information from the kernel command line and put parts
-# of it into several variables
-if [ -n "$ipinfo" ] ; then
- getip () {
- local val="$ipinfo:"; i=$(($1 - 1));
- while [ $i -gt 0 ] ; do
- val=${val#*:} ; i=$(($i - 1));
- done;
- echo $val|sed "s/:.*//"; }
- clientip=$(getip 1)
- serverip=$(getip 2)
- gateway=$(getip 3)
- subnet_mask=$(getip 4)
- broadcast_address=$(ipcalc -s -b $clientip $subnet_mask|sed s/.*=//)
- [ -z "$broadcast_address" ] && broadcast_address=255.255.255.255
- # we might have an idea of the dns server via preboot
- dns_srv=$(getip 5)
- [ -n "$dns_srv" ] && echo nameserver $dns_srv >/etc/resolv.conf;
- echo -e "# ip configuration written by $0 script:\nclientip=$clientip\n\
-subnet_mask=$subnet_mask\ngateway=$gateway\nserverip=$serverip\n\
-broadcast_address=$broadcast_address" >>/etc/initramfs-setup
- # set static ip address
- ip addr add $clientip/$(ipcalc -s -p $clientip $subnet_mask|sed s/.*=//) \
- broadcast $broadcast_address dev $nwif 2>/dev/null
- ip route add default via $gateway 2>/dev/null
-else
- noipyet="yes"
-fi
-# get configuration data via dhcp (with vendor code identifier if present
-# in ${vci} from kernel command line or initramfs-setup) ...
-if [ -z "$nodhcp" ] ; then
- ( rundhcp ${vci}; echo "dhcp finished at $(sysup)" >/tmp/dhcp-done ) &
- if [ -n "$noipyet" ] ; then
- waitfor /tmp/dhcp-done 20000
- . /tmp/confviadhcp
- # by now there should be a proper ip configuration present
- if [ -z "$clientip" -o -z "$subnet_mask" -o -z "$broadcast_address" ]
- then error "$init_errdhcp"
- else
- { ip addr add \
- $clientip/$(ipcalc -s -p $clientip $subnet_mask|sed s/.*=//) \
- broadcast $broadcast_address dev $nwif 2>/dev/null || \
- error "$init_erripcfg"; }
- # if gateway is available set it
- [ -n $gateway ] && ip route add default via $gateway 2>/dev/null
- fi
- # fixme: to be checked!!
- # else
- # if [ -n "$file" -a "$srvproto" = "lbd" ] ; then
- # error "$init_erripcfg" nonfatal
- # else
- # error "$init_erripcfg"
- # fi
- # fi
- fi
-fi
-# check if serverip is set as variable @@@serverip@@@
-sed "s,@@@serverip@@@,$serverip," -i /etc/initramfs-setup
-[ $DEBUGLEVEL -eq 20 ] && echo "** finished ip config at $(sysup)"
-
-# on some network adaptors we need to wait for the link to come up
-dmesg | grep -q "link down" && for i in 1 1 1 1 ; do
- dmesg | grep -q "link up" && break
- [ $DEBUGLEVEL -ge 1 ] && echo "network: waited half a second for the \
-link to come up" >>$LOGFILE
- sleep $i
-done
-# ... or ldap if available (in background)
-[ -n "$ldap" ] && ldapconf &
-# ... or via (t)ftp/http file get (in background)
-[ -n "$file" ] && fileget &
-
-runinithook '25-have-ip-config'
-
-## netconsole is disabled in the default config
-# config_netconsole $clientip $oldnwif $nwif $serverip
-
-# if root filesystem should be imported via local or a network block device
-if [ -n "${bldmod}" ] ; then
- # load block device driver(s) if needed
- for module in ${bldmod} ; do
- modprobe ${MODPRV} ${module} || error "$init_errbld"
- done
- mdev -s
- [ -z "$bldrfst" ] && bldrfst=squashfs
- bldhost=$(checkip $bldhost)
- if [ $DEBUGLEVEL -eq 20 ] ; then
- echo "** starting setup of ${bldmod} at $(sysup)"
- else
- echo "Stateless client using ${bldmod} on $bldhost:$bldport with $bldrfst"
- fi
- # fixme: check for fs in /proc/filesystems before trying to load the module
- modprobe ${MODPRV} ${bldrfst} || error "$init_errbld" nonfatal
-
- # for debugging: interface might not be properly up - check reachability
- [ $DEBUGLEVEL -ge 1 ] && ping -c 1 -w 15 ${bldhost} >/dev/null 2>&1
-
- case "${srvproto}" in
- # network block device present in standard kernel
- nbd)
- RDEV=/dev/nbd0
- waitfor "${RDEV}" 20000 || error "$init_nbddev"
- i=0
- while ! nbd-client $bldhost $bldport ${RDEV} -persist ; do
- usleep 100000
- i=$(($i + 1))
- if [ $i -ge 1000 ] ; then
- error "$init_nbds"; break
- fi
- done
- usleep 100
- echo deadline > /sys/block/nbd0/queue/scheduler
- # echo "32" > /sys/block/nbd0/queue/read_ahead_kb
- ;;
- # dnbd2 by Vito Di Leo
- dnbd2)
- RDEV=/dev/vnbd0
- waitfor "${RDEV}" 20000 || error "$init_nbddev"
- # quickhack, should be read in from URI
- echo 1 > /sys/block/vnbd0/config/vid
- echo 1 > /sys/block/vnbd0/config/rid
- # check for others in initramfs-setup and then kernel cmdline
- rootfs="$(sed -n "/rootfs=/p" /etc/initramfs-setup| \
- sed "s,rootfs=,,;s,\",,g") "
- [ "$rootfs" = " " ] && \
- rootfs="$(cat /proc/cmdline|sed "s,.*rootfs=\",,;s,\".*,,") "
- i=0
- # assume no more than 16 different dnbd2 servers (default 4)
- while [ "x$bldhost" != "x" -a $i -lt 16 ]; do
- #echo "I: $i R: $rootfs P:$bldport H:$bldhost"
- echo $bldhost $bldport > /sys/block/vnbd0/server${i}/sock
- i=$(($i + 1))
- rootfs=${rootfs#* }
- bldsp=$(echo ${rootfs}|sed "s, .*,,")
- bldhost=$(uri_token $bldsp server)
- bldport=$(uri_token $bldsp port)
- done
- # the cfq scheduler seem not a good idea here
- echo deadline > /sys/block/vnbd0/queue/scheduler
- # needed for some reason to settle initialization
- sleep 1
- i=0
- while [ $(cat /sys/block/vnbd0/config/running) != 1 ] ; do
- usleep 100000
- echo 1 > /sys/block/vnbd0/config/running
- i=$(($i + 1))
- if [ $i -ge 50 ] ; then
- error "$init_dnbd2s"; break
- fi
- done
- echo "64" > /sys/block/vnbd0/queue/read_ahead_kb
- ;;
- # dnbd by Thorsten Zitterell
- dnbd)
- # quickhack
- RDEV=/dev/dnbd0
- if [ -z $nodnbdcache ] ; then # variable not really used yet
- mkdir /dnbd
- mount -n -o 'size=20%' -t tmpfs tmpfs /dnbd
- ( cat /dev/zero > /dnbd/cache 2>/dev/null || echo "ok" >/tmp/cache ) &
- clientopt="-c /dnbd/cache"
- waitfor /tmp/cache 10000
- fi
- [ $(echo $bldhost|sed "s,\..*,,") -ge 224 ] && \
- ip route add 224.0.0.0/4 dev $nwif
- waitfor /dev/dnbd0 10000 || error "$init_nbddev"
- echo "dnbd-client -b $bldhost -d $RDEV $clientopt"
- while ! dnbd-client -b $bldhost -d $RDEV $clientopt ; do
- usleep 10000
- done
- # problem with squashfs and cfq scheduler
- echo noop > /sys/block/dnbd0/queue/scheduler
- echo 0 > /sys/block/dnbd0/queue/read_ahead_kb
- ;;
- lbd)
- # using clients local block device (disk partition is to be specified
- RDEV=/dev/$blddev
- echo "$bldrfst" >>/etc/filesystems
- realbldrfst=$bldrfst
- # we might need to mount the base layer filesystem first before accessing
- # e.g. a squashfs container file on it
- bldrfst=auto
- ;;
- esac
- RWRO="ro"
- if [ -n "${cowloop}" -a -x /bin/cowdev ] ; then
- modprobe ${MODPRV} cowloop || {
- error "$init_loadcow" nonfatal
- unset cowloop; }
- [ -x /bin/mdev ] && mdev -s
- fi
- if [ -n "${cowloop}" ] ; then
- if [ -n "${unionfs}" -o -n "${aufs}" ] ; then
- error "$init_cownobld"
- unset unionfs aufs
- fi
- echo "Using Copy-on-Write block device for rw access"
- mount -n -t tmpfs -o size=${cowsize} ramfs ${rwdir}
- mkdir /dev/cow && mknod /dev/cow/ctl b 241 255
- usleep 200
- ln -s /dev/cowloop0 /dev/cow/0
- # fixme - cowdev depending on blockdev choosen above ...
- cowdev -a /dev/nbd0 ${rwdir}/nbd.cow
- usleep 200
- RWRO="rw"
- RDEV=/dev/cow/0
- # run ldconfig if not switched off via kernel command line
- ldcfg
- else
- # use normal UnionFS behaviour because rootfs is not NFS
- unset nfsro
- fi
- # finally mount the configured network/local block device
- for i in 0 5000 20000 100000 500000 1000000 ; do
- usleep $i
- mount -n -t $bldrfst -o $RWRO $RDEV /mnt 2>/dev/null && break
- done
- # check if we got the rootfilesystem directly or need to mount a container
- # file from the mounted block device
- if [ "${srvproto}" = "lbd" -a -f /mnt/boot/${slxconf_system_name} ]; then
- mkdir /dev/bootdisk
- mount --move /mnt /dev/bootdisk
- mount -t ${realbldrfst} -o loop \
- /dev/bootdisk/boot/${slxconf_system_name} /mnt || error "$init_errloop"
- fi
- [ $DEBUGLEVEL -eq 20 ] && echo "** finished blockdev setup stuff at $(sysup)"
-elif [ -n ${iscsiserver} ] ; then
- [ $DEBUGLEVEL -eq 20 ] && echo "** started setting up iSCSI initiator at \
-$(sysup)"
- #if [ -n ${iscsitarget} ] ; then
- # echo "InitiatorName=${iscsitarget}"|sed "s,@@@serverip@@@,$serverip," \
- # >/etc/initiatorname.iscsi
- #else
- # discovery
- #fi
- #echo -e "node.startup = automatic">/etc/iscsid.conf
- #iscsid -c /etc/iscsid.conf
- # the cowloop part has to be moved (option for iscsi devices too)
- # and should be generalized for nbd, dnbd, iscsi
-fi
-
-# if no type of root filesystem is passed via kernel command line try
-# information gathered from dhcp process (only valid for nfs)
-if [ -z "${bldmod}" -a -z "${bldhost}" -a -z "${nfsserver}" ] ; then
- # information has to be read from dhcp and ldap configuration
- # cfgcomplete merges all configuration files
- cfgcomplete
-fi
-
-# mount nfs rootfs
-if [ -z "${bldmod}" -a -z "${bldserver}" ] ; then
- [ $DEBUGLEVEL -eq 20 ] && echo "** started nfs mount"
- # read in extended initramfs-setup
- . /etc/initramfs-setup
- # prefer nfsserver and nfspath from kernel commandline over the information
- # gotten from dhcp server
- if [ -n "${nfsserver}" -a -n "${nfspath}" ] ; then
- # check if nfsserver is set as variable @@@serverip@@@
- nfsserver=$(checkip $nfsserver)
- else
- # we got a problem here
- error "$init_nfssp" fatal
- fi
- # interface might not be properly up - check reachability
- ping -c 1 -w 15 ${nfsserver} >/dev/null 2>&1
- # mount the rootfs via nfs readonly (ro)
- fsmount nfs ${nfsserver} ${nfspath} /mnt ro
- #for transport in tcp udp fail; do
- # [ $proto = "fail" ] && { error "$init_nfs"; break; }
- # mount -n -t nfs -o ro,nolock,${transport} ${nfsroot} /mnt && break
- #done
- [ $DEBUGLEVEL -eq 20 ] && echo "** finished nfs mount at $(sysup)"
-fi
-
-runinithook '35-have-network-root'
-
-# get the complete collection of kernel modules and firmwares available
-testmkd /lib/firmware
-mount -n --bind /mnt/lib/modules /lib/modules && \
-mount -n --bind /mnt/lib/firmware /lib/firmware || error "$init_moddir"
-# start hardware configuration as background process if not a special
-# debuglevel (21) is used for the option of manual hwautocfg start
-if [ ${DEBUGLEVEL} = 21 ] ; then
- echo "You can run 'hwautocfg main &' manually now ..."
- /bin/sh
-else
- [ $DEBUGLEVEL -eq 20 ] && echo "** started hwautocfg in background at \
-$(sysup)"
- hwautocfg main &
-fi
-
-runinithook '40-started-hw-config'
-
-# unionfs/aufs modules visible by now if installed, try to use aufs for rw
-# access if available
-union_type=""
-if [ ${aufs} -eq 1 ] && \
- modprobe ${MODPRV} aufs 2>/dev/null && \
- lsmod | grep -qe "^aufs" ; then union_type="AUFS"
-elif [ ${unionfs} -eq 1 ] && \
- modprobe ${MODPRV} unionfs 2>/dev/null && \
- lsmod | grep -qe "^unionfs" ; then union_type="UnionFS"
-elif [ ${aufs} -eq 0 -a ${unionfs} -eq 0 -a -z "${cowloop}" ] ; then
- error "$init_deselau" nonfatal
- unset aufs unionfs
-else
- error "$init_loadaufs" nonfatal
- unset aufs unionfs
-fi
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Filesystem setup started at $(sysup)"
-# setup of client root filesystem dependent on the availability of UnionFS
-if [ "x${union_type}" != "x" ] ; then
- echo "Using ${union_type} for rw access"
- mkdir -p ${rwdir}/union ${rwdir}/uniontmp /rorootfs
- # adapting tempfs size of the device directory (takes /tmp in stage4)
- mount -o remount,size=${tmpfssize} ${devdir}
- mount -n -t tmpfs -o size=${tmpfssize} none ${rwdir}/uniontmp
- # hack for handling unionfs with patched run-init
- mount -n --move /mnt /rorootfs
- if [ "$union_type" == "UnionFS" ]; then
- mount -n -t unionfs -o dirs=${rwdir}/uniontmp:/rorootfs=${nfsro}ro \
- none /mnt
- elif [ "$union_type" == "AUFS" ]; then
- mount -n -t aufs -o br:/${rwdir}/uniontmp:/rorootfs=ro none /mnt
- fi
- mkdir -p /mnt/uniontmp
- mount -n --move ${rwdir}/uniontmp /mnt/uniontmp
- chmod 0755 /mnt/uniontmp /mnt
- # running hardware disk/tmp setup now
- hwautocfg disk &
- # run ldconfig if switched on via kernel command line (token ldsc) or
- # triggered by unionized root filesystem
- ldcfg
-elif [ -z "${cowloop}" ] ; then
- # fire up hardware disk/tmp setup first
- hwautocfg disk &
- echo "Using bind mounts to ramdisk for rw access"
- mount -n -t tmpfs -o size=75% ramfs ${rwdir}
- for path in ${D_BINDMPTS} ; do
- mkdir -p ${rwdir}/${path} >/dev/null 2>&1
- mount -n --bind ${rwdir}/${path} /mnt/${path}
- [ ${DEBUGLEVEL} -gt 1 -a ${DEBUGLEVEL} != 8 ] && \
- echo "Created ${rwdir}/${path} and mounted it to /mnt/$path"
- done
- # see above ...
- ldcfg
- # save the RO directories mentioned in the distro-specific
- # config to a temporary directory. They will later on be restored
- for path in ${D_RODIRSINRW}; do
- if [ -d /mnt/${path} ] ; then
- list="${path} ${list}"
- # exclude them from etc copy process too
- echo "${path}/*"|sed -e "s,/root/,,;s,^/,," >>/tmp/etc.exclude
- mkdir -p /root/${path} >/dev/null 2>&1
- mount -n --bind /mnt/${path} /root/${path} >/dev/null 2>&1
- fi
- done
- for path in /etc/${D_SYSCONFDIR} ${D_DIRINBINDMNT} ${list}; do
- mkdir -p ${rwdir}/${path}
- done
- testmkd ${rwdir}/var/tmp 1777
- # exclude all sysv runlevel link stuff
- for i in ${D_RCDIRS} ${D_INITBOOTD} ; do
- echo "*$i/*" >>/tmp/etc.exclude
- done
- # add list of files to be excluded and common excludes to the filter list
- echo -e "-\ndhcp*\n*~\n*.old\n*-\nxorg.conf*" >>/tmp/etc.exclude
- # if ld.so.cache is to be generated then do not copy the file
- [ -n "${ldsc}" ] && echo -e "ld.so.cache*" >>/tmp/etc.exclude
- # for tar exclude lists might be used, more difficult for cp
- cd /mnt
- tar -X /tmp/etc.exclude -cp etc/*|tar -xp -C ${rwdir} 2>/dev/null
- cd /
- mount -n --bind ${rwdir}/etc /mnt/etc
- mount -n --bind ${rwdir}/var /mnt/var
- # get the "covered" mounts back into filesystem structure
- for path in ${list}; do
- mount -n --move /root/$path /mnt/$path #>>$LOGFILE 2>&1
- done
- #rm -rf /root/* >/dev/null 2>&1
- # run some specific stuff !?
-fi
-
-runinithook '50-have-layered-fs'
-
-# generate a set of default directories
-. /etc/openslx.conf
-for dir in $OPENSLX_DEFAULT_LOGDIR $OPENSLX_DEFAULT_BINDIR \
- $OPENSLX_DEFAULT_LIBDIR $OPENSLX_DEFAULT_VIRTDIR; do
- testmkd /mnt/$dir
-done
-chmod -R 1777 /mnt/${OPENSLX_DEFAULT_LOGDIR}
-
-# script for stuff to execute during early bootup
-d_mkrlscript init boot.slx "Running configuration postponed from InitRamFS"
-echo "fs complete at $(sysup)" >/tmp/fscmpl
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Filesystem setup completed at $(sysup)"
-
-# write debug file information after filesystem setup completed
-echo -e "# /etc${D_SYSCONFDIR}/logfile - file created by $0 (initramfs \
-from $date)\n#\n# logfile \
-for linux diskless client specific debugging output\nLOGFILE=\"$LOGFILE\"\n#\
-\n# debug level\nDEBUGLEVEL=\"$DEBUGLEVEL\"" \
- > /mnt/etc/${D_SYSCONFDIR}/logfile || error "$init_errlog"
-
-# run distribution independent and dependent configuration of files and
-# services (offer debug shell in runlevel 22)
-if [ ${DEBUGLEVEL} = 22 ] ; then
- /bin/sh
-else
- servconfig &
-fi
-
-for path in /tmp/scratch /var/lib/nobody ${D_DIRINDXS} ${D_DIRINBINDMNT} ; do
- testmkd /mnt/${path}
-done
-# Needed writable subdirs nested in readonly subdirs of writable one
-for path in ${D_RWDIRSINRO}; do
- mount -n -t tmpfs none /mnt/${path}
-done
-for i in /var/run/utmp /var/log/wtmp /var/log/lastlog /etc/mtab ; do
- echo -n > /mnt/$i
-done
-chown 65534:0 /mnt/var/lib/nobody
-echo -e "# /etc/fstab - file generated by $0 (initramfs from $date)\n#\
-\tOpenSLX Project, info@openslx.com\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\
-proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevs\t/dev\t\ttmpfs\
-\t\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0" \
- >/mnt/etc/fstab || error "$init_fstab"
-echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\
- 0 0" > /mnt/etc/mtab
-
-# copy library cache if generated
-if [ -n "${ldsc}" ] ; then
- # creating library cache takes a while ...
- if waitfor /tmp/ldcfg 50000 ; then
- test -s /mnt/tmp/ld.so.cache && \
- mv /mnt/tmp/ld.so.cache /mnt/etc/ld.so.cache
- else
- error "$init_errldcfg"
- fi
-else
- [ $DEBUGLEVEL -gt 2 ] && error "$init_infldcfg" nonfatal
-fi
-
-runinithook '60-have-servconfig'
-
-# wait a while for hardware setup to complete and start cleanup procedure
-[ $DEBUGLEVEL -gt 1 ] && echo "Waiting for hwautocfg to finish ..."
-waitfor /tmp/hwcfg 20000 || error "$init_errhw"
-hwautocfg finish &
-
-# wait a while for services setup to complete
-[ $DEBUGLEVEL -gt 1 ] && echo "Waiting for servconfig to finish ..."
-waitfor /tmp/svcfg 10000 || error "$init_errsw"
-# IP configuration is complete and should not be updated automatically
-killall -9 udhcpc 2>/dev/null
-
-# if uniondirs is not set yet, maybe the unions were given via initramfs-setup
-if [ -z "$uniondirs" ]; then
- if [ "$union_type" == "AUFS" ]; then
- # does it contain "://"?
- if [ "$aufs" != "${aufs#*://}" ]; then
- uniondirs="$aufs"
- fi
- elif [ "$union_type" == "UnionFS" ]; then
- # does it contain "://"?
- if [ "$unionfs" != "${unionfs#*://}" ]; then
- uniondirs="$unionfs"
- fi
- fi
-fi
-# if locations are given that should be unioned with the fs root, do it
-if [ -n "$uniondirs" ]; then
- include_in_fsroot_union "$union_type" "$uniondirs"
-fi
-
-runinithook '70-before-plugins'
-
-# ddcinfo temporary overwrite (with kernel cmdline ddcinfo=1)
-if [ "${ddcinfo}" = "1" -a -f /initramfs/plugin-conf/xserver.conf ]; then
- echo 'xserver_ddcinfo="1"' >> /initramfs/plugin-conf/xserver.conf
-fi
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Plugin configuration started at $(sysup)"
-
-# check for any plugin-specific runlevel scripts and run them, if found:
-if [ ${DEBUGLEVEL} = 25 ] ; then
- /bin/sh
-else
- if [ -d /etc/plugin-init.d ]; then
- for plugin_starter in /etc/plugin-init.d/*.sh; do
- if [ -e $plugin_starter ]; then
- [ $DEBUGLEVEL -gt 0 ] \
- && echo -n "Running plugin starter $plugin_starter ..."
- [ $DEBUGLEVEL -eq 15 ] \
- && sed '/^#!/ a\\set -x' -i $plugin_starter
- init-wrapper $plugin_starter >>/tmp/plugin_starter 2>&1
- if [ $? -eq 0 ]; then
- [ $DEBUGLEVEL -gt 0 ] \
- && echo " ok"
- else
- [ $DEBUGLEVEL -gt 0 ] \
- && echo " failed"
- fi
- fi
- done
- # load variables defined by plugins to current environment
- [ -f /tmp/env/wrapper.env ] && . /tmp/env/wrapper.env
- fi
-fi
-
-runinithook '80-after-plugins'
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Plugin configuration finished at $(sysup)"
-
-# create links for initial stage4 boot scripts
-initial_boot
-
-runinithook '85-have-initial-boot'
-
-# post init for some distro specific stuff to run
-postinit
-# general postinit.local configurable by the admin via openslx/config/<system>
-[ -f /initramfs/postinit.local ] && {
- [ $DEBUGLEVEL -gt 0 ] && \
- echo -n "Running script /bin/postinit.local ... "
- chmod u+x /initramfs/postinit.local
- /initramfs/postinit.local
- [ $DEBUGLEVEL -gt 0 ] && echo "ok"; }
-
-# start a debug shell in higher debug levels
-[ $DEBUGLEVEL -gt 2 -a $DEBUGLEVEL != 8 ] \
- && echo "DEBUGLEVEL>2: starting debug-shell, exit with CTRL+D" && /bin/sh
-
-runinithook '90-postinit-done'
-
-# unmount the bind mounted modules, firmware directories and nfs /tmp/scratch
-# (if present)
-export ticks
-for ticks in 0 1 2 5 10 20 30; do
- sleep $ticks && umount -n /lib/modules 2>/dev/null && break
- error "$init_wait" nonfatal
-done
-for ticks in 0 1 2 5 10 20 30; do
- sleep $ticks && umount -n /lib/firmware 2>/dev/null && break
- error "$init_wait" nonfatal
-done
-mount 2>/dev/null | grep -q "/tmp/scratch type nfs" && \
- for ticks in 0 1 2 5 10 20 30; do
- sleep $ticks && umount -n /tmp/scratch 2>/dev/null && break
- done
-
-mount 2>/dev/null | grep -q /lib/modules && error "$init_errumnt"
-# close runlevel script for stuff to execute during early bootup
-d_mkrlscript close boot.slx ""
-# put /tmp into stage4 mtab and add stuff to stage4 fstab
-sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab
-[ -f /tmp/fstab ] && cat /tmp/fstab >> /mnt/etc/fstab
-# preparations to leave initramfs - umounting ...
-umount -n /sys || error "$init_errsys" nonfatal
-chmod 1777 /dev/shm /mnt/tmp 2>/dev/null
-
-runinithook '95-cleanup'
-
-# kill hwautocfg, servconfig, hwinfo, syslogd, etc.
-killall -9 hwautocfg servconfig debugshell hwinfo syslogd logread 2>/dev/null
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** SLX init ended near $(sysup)"
-# kill the watchdog (autopoweroff, if stage3 init never finishes)
-[ -f /tmp/watchdogpid ] && kill $(cat /tmp/watchdogpid) 2>/dev/null
-# stop logging services if required and move logfile into stage4 filesystem
-# (if exists)
-killall klogd 2>/dev/null
-[ -f /var/log/slx-boot.log ] && mv /var/log/slx-boot.log \
- /mnt/var/log/slx-s3boot.log
-[ -f /var/log/messages ] && cp /var/log/messages \
- /mnt/var/log/slx_messages 2>/dev/null
-# if no syslog plugin was configured, start the daemon again writing to no
-# logfile directly (useless fake test as placeholder)
-# THIS IS NOT WORKING SOMEHOW!!
-#[ ! -d /mnt/opt/openslx/plugin-repo/syslog/ ] && syslogd -O /mnt/var/log/testfile
-
-# move /dev and unmount /proc and unset all old, unneeded environment
-# variables
-mount -n --move /dev /mnt/dev
-umount -n /proc
-unset client debug date initrd ip bldroot macaddr nwif nfsroot rootfs ticks \
- vci vga
-unset BOOT_IMAGE KCMDLINE KERNEL MODPRV NWMODULES OLDPWD UDEVD_EVENT_TIMEOUT \
- SLXVERSION UDEVD_EXPECTED_SEQNUM PATH
-
-runinithook '99-handing-over'
-
-# new style of pivoting (switch_root or run-init)
-exec /sbin/switch_root -c dev/console /mnt /sbin/init $DEBUG_UPSTART || \
- error "$init_runinit"
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..b8cbdc2
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
+# This program is free software distributed under the GPL version 2.
+# See http://gpl.openslx.org/
+#
+# If you have any feedback please consult http://feedback.openslx.org/ and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+
+# Absolute path to this script. /home/user/bin/foo.sh
+echo "Copying to /var/www/"
+sourceDir = dirname $0
+targetDir = "/var/www/pbs2/"
+cp -R $sourceDir $targetDir
+
+echo "Creating pbs2 host..."
+ln -s /usr/share/php/libzend-framework-php/Zend/ /var/www/pbs2/library/Zend
+cat > /etc/apache2/sites-available/pbs2 << EOF
+<VirtualHost *:80>
+ ServerName $domain
+ ServerAdmin admin@$domain
+ DocumentRoot /var/www/pbs2/public
+ <Directory /var/www/pbs2/public >
+ Options FollowSymLinks
+ AllowOverride All
+ </Directory>
+</VirtualHost>
+EOF
+
+echo "Enabling pbs2 host..."
+a2ensite pbs2
+echo "Restarting apache..."
+etc/init.d/apache2 restart
+
+echo "Creating config of pbs2..."
+cp /var/www/pbs2/application/configs/application.ini.dist /var/www/pbs2/application/configs/application.ini
+echo "Please enter the database user"
+read databaseuser
+sed -e 13s/$/$databaseuser/ -i /var/www/pbs2/application/configs/application.ini
+
+echo "Please enter the database password for user $databaseuser"
+read databasepassword
+sed -e 14s/$/$databasepassword/ -i /var/www/pbs2/application/configs/application.ini
+
+echo "Creating database and tables"
+mysql -u $databaseuser -p$databasepassword < /var/www/pbs2/setup/pbs.sql
+mysql -u $databaseuser -p$databasepassword < /var/www/pbs2/setup/pbs.sql
+
+echo "woho - pbs2 is ready to use"
+echo "You can reach your installed pbs2 server under http://$domain/"
+echo "Login with username: 'test' and pasword 'test' and change the Passwort and eMail IMMEDIATELY!!!"
diff --git a/kcl_ip_config b/kcl_ip_config
deleted file mode 100644
index 1394a22..0000000
--- a/kcl_ip_config
+++ /dev/null
@@ -1 +0,0 @@
-ip=10.8.4.107:10.8.4.3:10.8.4.254:255.255.255.0
diff --git a/library/Pbs/Acl.php b/library/Pbs/Acl.php
index b941694..766274a 100644
--- a/library/Pbs/Acl.php
+++ b/library/Pbs/Acl.php
@@ -16,6 +16,8 @@ class Pbs_Acl
public static function checkRight($rightShortcut) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+ if(!isset($userIDsNamespace['roleID']))
+ return false;
$roleID = $userIDsNamespace['roleID'];
$rightMapper = new Application_Model_RightMapper();
diff --git a/library/Pbs/Filter.php b/library/Pbs/Filter.php
index 5231e59..6916c2a 100644
--- a/library/Pbs/Filter.php
+++ b/library/Pbs/Filter.php
@@ -58,7 +58,7 @@ class Pbs_Filter{
$sessionmapper = new Application_Model_SessionMapper();
$sessionarray = $sessionmapper->findBy(array('alphasessionID' => $_SESSION['alphasessionID']),true);
$session->setOptions($sessionarray[0]);
- $session->setID($sessionarray['sessionID']);
+ @$session->setID($sessionarray['sessionID']);
$bootisoMapper = new Application_Model_BootisoMapper();
$bootiso = new Application_Model_BootIso();
@@ -124,7 +124,7 @@ class Pbs_Filter{
$poolentry = new Application_Model_PoolEntries();
$poolentrymapper = new Application_Model_PoolEntriesMapper();
$poolentry = $poolentrymapper->findby(array('clientID' => $client->getID()),true);
- $poolentry = $poolentry[0];
+ @$poolentry = $poolentry[0];
$poolID = $poolentry['poolID'];
}
@@ -280,7 +280,7 @@ class Pbs_Filter{
$client = new Application_Model_Client();
$clientmapper = new Application_Model_ClientMapper();
$clientmapper->find($session->getClientID(),$client);
- $macAdress = $client->getHardwarehash();
+ $hardwarehash = $client->getHardwarehash();
}
try{
@@ -359,8 +359,8 @@ class Pbs_Filter{
$set = $kk;
// counting how often a filter is evaluated at database
$a = array();
- foreach($set as $k=> $s){
- $a[$s] += 1;
+ foreach($set as $k => $s){
+ @$a[$s] += 1;
}
if($debuglevel >= 2)
print_a('Übereinstimmungen pro Filter',$a);
diff --git a/notes-1.txt b/notes-1.txt
deleted file mode 100644
index d3e0f6d..0000000
--- a/notes-1.txt
+++ /dev/null
@@ -1,386 +0,0 @@
-test
-
-wget -qO - "$@" http://132.230.4.3/uniontmp.php | tar -C testdownload/ -zxvf -
-
-
-Whitelist:
-tar cz --file=/home/mp57/whitelist --ignore-failed-read --exclude=.wh* ./*
-
-Blacklist:
-find /uniontmp/ -name .wh* >> /home/mp57/blacklist
-
-
-http://piratepad.net/master-projekt
-Whiteliste anlegen
-echo '#!/bin/sh' > whitelist.sh
-find * -printf 'chmod %m %p\n' >> whitelist.sh
-chmod a+x whitelist.sh
-
-Setzen aller Ordner auf 777
-chmod -R 755 ./*
-
-Gepackt werden (bleibt mit ordnerberechtigung 755 auf dem server
-nach herunterladen müssen die dateiberechtigugnen wieder gesetzt werden
-./whitelist.sh
-
-
-http://akrabat.com/zend-framework-tutorial/
-
-http://lab.ks.uni-freiburg.de/projects/preboot/wiki/ZendWebInterface
-http://lab.ks.uni-freiburg.de/projects/preboot/wiki/Zend_einrichten
-
-##############################################################
-controller erstellen
-zf create controller person
-zf create action register person
-zf create action login person
-zf create action edit person
-zf create action request person
-
-datenbankanbindung in der application.ini setzen
- resources.db.adapter = PDO_MYSQL
- resources.db.params.host = localhost
- resources.db.params.username = rob
- resources.db.params.password = 123456
- resources.db.params.dbname = pbs
-
-Datenbank initialisieren (pbs datenbank anlegen
- pbs.sql einfügen
-
-
-zf create db-table Person pbs_person
-=> erstellt application/models/DbTable/Person.php
-
-Mapper erstellen
- zf create model PersonMapper
-=> erstellt application/models/PersonMapper.php
-http://framework.zend.com/manual/en/learning.quickstart.create-model.html
-
- zf create model Person
-=> erstellt /var/www/pbs/application/models/Person.php
-
-zf create controller Person
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- application/views/scripts/guestbook/index.phtml -->
-
-<p><a href="<?php echo $this->url(
- array(
- 'controller' => 'guestbook',
- 'action' => 'sign'
- ),
- 'default',
- true) ?>">Sign Our Guestbook</a></p>
-
-Guestbook Entries: <br />
-<dl>
- <?php foreach ($this->entries as $entry): ?>
- <dt><?php echo $this->escape($entry->email) ?></dt>
- <dd><?php echo $this->escape($entry->comment) ?></dd>
- <?php endforeach ?>
-</dl>
-
-
-
-
-
-
-<?php
-// application/models/PersonMapper.php
-
-class Application_Model_PersonMapper
-{
-protected $_dbTable;
-
-public function setDbTable($dbTable)
-{
- if (is_string($dbTable)) {
- $dbTable = new $dbTable();
- }
- if (!$dbTable instanceof Zend_Db_Table_Abstract) {
- throw new Exception('Invalid table data gateway provided');
- }
- $this->_dbTable = $dbTable;
- return $this;
-}
-
-public function getDbTable()
-{
- if (null === $this->_dbTable) {
- $this->setDbTable('Application_Model_DbTable_Person');
- }
- return $this->_dbTable;
-}
-
-public function save(Application_Model_Person $person)
-{
- $data = array(
- 'title' => $person->getTitle(),
- 'name' => $person->getName(),
- 'firstname' => $person->getFirstname(),
- 'street' => $person->getStreet(),
- 'housenumber' => $person->getHousenumber(),
- 'city' => $person->getCity(),
- 'postalcode' => $person->getPostalcode(),
- 'logindate' => $person->getlogindate(),
- 'registerdate' => $person->getRegisterdate(),
- 'email' => $person->getEmail(),
- 'login' => $person->getLogin(),
- 'password' => $person->getPassword()
- );
-
- if (null === ($id = $person->getPersonID())) {
- unset($data['personID']);
- $this->getDbTable()->insert($data);
- } else {
- $this->getDbTable()->update($data, array('personID = ?' => $id));
- }
-}
-
-public function find($id, Application_Model_Person $person)
-{
- $result = $this->getDbTable()->find($id);
- if (0 == count($result)) {
- return;
- }
- $row = $result->current();
- $guestbook->setPersonID($row->personID)
- ->setTitle($row->title)
- ->setName($row->name)
- ->setFirstname($row->firstname)
- ->setStreet($row->street)
- ->setHousenumber($row->housenumber)
- ->setCity($row->city)
- ->setPostalcode($row->postalcode)
- ->setLogindate($row->logindate)
- ->setRegisterdate($row->registerdate)
- ->setEmail($row->email)
- ->setLogin($row->login)
- ->setPassword($row->password);
-}
-
-public function fetchAll()
-{
- $resultSet = $this->getDbTable()->fetchAll();
- $entries = array();
- foreach ($resultSet as $row) {
- $entry = new Application_Model_Person();
- $entry->setPersonID($row->personID)
- ->setTitle($row->title)
- ->setName($row->name)
- ->setFirstname($row->firstname)
- ->setStreet($row->street)
- ->setHousenumber($row->housenumber)
- ->setCity($row->city)
- ->setPostalcode($row->postalcode)
- ->setLogindate($row->logindate)
- ->setRegisterdate($row->registerdate)
- ->setEmail($row->email)
- ->setLogin($row->login)
- ->setPassword($row->password);
- $entries[] = $entry;
- }
- return $entries;
-}
-}
-
-
-
-
-<?php
-// application/models/Person.php
-
-class Application_Model_Person
-{
- protected $_title;
- protected $_name;
- protected $_firstname;
- protected $_street;
- protected $_housenumber;
- protected $_city;
- protected $_postalcode;
- protected $_logindate;
- protected $_registerdate;
- protected $_email;
- protected $_login;
- protected $_password;
- protected $_personID;
-
- public function __construct(array $options = null)
- {
- if (is_array($options)) {
- $this->setOptions($options);
- }
- }
-
- public function __set($name, $value)
- {
- $method = 'set' . $name;
- if (('mapper' == $name) || !method_exists($this, $method)) {
- throw new Exception('Invalid person property');
- }
- $this->$method($value);
- }
-
- public function __get($name)
- {
- $method = 'get' . $name;
- if (('mapper' == $name) || !method_exists($this, $method)) {
- throw new Exception('Invalid person property');
- }
- return $this->$method();
- }
-
- public function setOptions(array $options)
- {
- $methods = get_class_methods($this);
- foreach ($options as $key => $value) {
- $method = 'set' . ucfirst($key);
- if (in_array($method, $methods)) {
- $this->$method($value);
- }
- }
- return $this;
- }
-
- public function setTitle($text)
- {
- $this->_title = (string) $text;
- return $this;
- }
- public function getTitle()
- {
- return $this->_title;
- }
-
- public function setName($text)
- {
- $this->_name = (string) $text;
- return $this;
- }
- public function getName()
- {
- return $this->_name;
- }
- public function setFirstname($text)
- {
- $this->_firstname = (string) $text;
- return $this;
- }
- public function getFirstname()
- {
- return $this->_firstname;
- }
-
- public function setStreet($text)
- {
- $this->_street = (string) $text;
- return $this;
- }
- public function getStreet()
- {
- return $this->_street;
- }
-
- public function setHousenumber($text)
- {
- $this->_housenumber = (string) $text;
- return $this;
- }
- public function getHousenumber()
- {
- return $this->_housenumber;
- }
-
- public function setCity($text)
- {
- $this->_city = (string) $text;
- return $this;
- }
- public function getCity()
- {
- return $this->_city;
- }
-
- public function setPostalcode($text)
- {
- $this->_postalcode = (string) $text;
- return $this;
- }
- public function getPostalcode()
- {
- return $this->_postalcode;
- }
- public function setLogindate($text)
- {
- $this->_logindate = (string) $text;
- return $this;
- }
- public function getLogindate()
- {
- return $this->_logindate;
- }
- public function setRegisterdate($text)
- {
- $this->_registerdate = (string) $text;
- return $this;
- }
- public function getRegisterdate()
- {
- return $this->_registerdate;
- }
-
- registerdate
-
- public function setEmail($email)
- {
- $this->_email = (string) $email;
- return $this;
- }
- public function getEmail()
- {
- return $this->_email;
- }
-
- public function setLogin($login)
- {
- $this->_login = (string) $login;
- return $this;
- }
- public function getLogin()
- {
- return $this->_login;
- }
- public function setPassword($login)
- {
- $this->_password = (string) $login;
- return $this;
- }
- public function getPassword()
- {
- return $this->_password;
- }
-
-
- public function setPersonID($id)
- {
- $this->_personID = (int) $id;
- return $this;
- }
- public function getPersonID()
- {
- return $this->_personID;
- }
-}
-
diff --git a/notes-2.txt b/notes-2.txt
deleted file mode 100644
index 39718f5..0000000
--- a/notes-2.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-drop trigger if exists GroupGroups_Trigger;
-
-CREATE TRIGGER Groups_Trigger
-BEFORE delete ON pbs_group
-FOR EACH ROW
- INSERT INTO pbs_groupgroups g SET g.parentID = (SELECT parentID FROM pbs_groupgroups WHERE groupID = old.gro
-
-INSERT INTO pbs_group (title) VALUES ('testgruppe1');
-INSERT INTO pbs_group (title) VALUES ('testgruppe2');
-INSERT INTO pbs_group (title) VALUES ('testgruppe3');
-INSERT INTO pbs_group (title) VALUES ('testgruppe4');
-INSERT INTO pbs_group (title) VALUES ('testgruppe5');
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (1,2);
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (2,3);
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (1,4);
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (3,5);
-
-Löschen von Gruppen
-
-Case 1. Lösche alle Untergruppen
-Case 2. Untergruppen werden an Root gehängt
-Case 2. Untergruppen werden an alle Obergruppen der Gruppe gehängt (Authorisation der Obergruppe?)
-Case 3. Untergruppen werden an bestimmte Obergruppen gehängt (Authorisation der Obergruppe?)
-
-Löschen von Groupgroups
-
-Case1. Gruppe hat noch andere Obergruppen -> tue nichts
-Case2. Gruppe hat keine Obergruppen mehr -> hänge gruppe an root
-
-Gruppen verwalten
-
-root-gruppen
-Gruppen die unter Root hängen repräsentieren eine PBS-Datenbank Instanz, sog. root-gruppen (z.b. PBS-Server1)
-root-gruppen können nicht gelöscht werden
-root-gruppen können Untergruppen anlegen und wieder löschen
-root-gruppen besitzen angehörige, rollen, rechte
-angehörige mit den nötigen Rechten können Untergruppen erstellen und löschen.
-angehörige mit den nötigen Rechten können Personen anlegen, angehörigkeiten und rollen zuweisen
-angehörige mit den nötigen Rechten können rechte erstellen, ändern und löschen
-angehörige mit den nötigen Rechten können Untergruppen einen oder mehreren Gruppen unterstellen
-
-Gruppen
-Jede Gruppe kann mehrere Untergruppen erstellen und löschen
-Gruppen können sich nicht selbst löschen
-
-Jede Gruppe außer root-gruppen können mehrere Obergruppen besitzen
-
-
-
-Sanity Checks
-
-Constraints
-
-1. Group -> Groupgroups
-1. Groupgroups -> group, group
-2. Grouprequests -> person, group
-3. RightRoles -> role, right
-4. Membership -> role, group, right
-5. Role -> group
-6. Config -> membership
-7. BootOs -> group
-8. Bootmenuentries -> bootos, bootmenu
-9. Bootmenu -> membership
-10. BootIso -> membership
-11. Session -> client, bootos
-12. MembershipFilters -> membership, filter
-13. Poolentries -> pool, client
-14. Filter -> membership, bootmenu
-15. Poolfilters -> pool, filter
-16. Filterentries -> filter, filtertype
-
-Not Null
-...
-
-
-
diff --git a/public/.htaccess b/public/.htaccess
index f2c21c8..a0f45c7 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -5,6 +5,7 @@ Allow from 192.168.0.0/255.255.0.0
RewriteEngine On
+RewriteRule ^c/(.*)/default.tgz$ /resource/getconfig/alpha/$1/file/default.tgz [L,R=301]
RewriteRule ^dev(.*)$ /user [L,R=301]
diff --git a/public/media/css/fbgui.css b/public/media/css/fbgui.css
index 8fdbc12..6bea801 100644
--- a/public/media/css/fbgui.css
+++ b/public/media/css/fbgui.css
@@ -2,6 +2,10 @@
font-size: 10.5px;
padding:14px;
float:none;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ border-radius: 6px;
+ border: 1px solid transparent ;
}
div.menu>img {
diff --git a/public/media/css/keyboard.css b/public/media/css/keyboard.css
index 3e478bc..f176aa5 100644
--- a/public/media/css/keyboard.css
+++ b/public/media/css/keyboard.css
@@ -1,13 +1,268 @@
-/* keyboard - jQuery UI Widget */
-.ui-keyboard { padding: .2em; position: absolute; left: 0; top: 0; z-index: 16000; }
-.ui-keyboard div { font-size: 1.0em; }
-.ui-keyboard-button { height: 1.5em; width: 2em; margin: .1em; cursor: pointer; }
-.ui-keyboard-widekey { width: 3em; }
-.ui-keyboard-space { width: 15em; }
-.ui-keyboard-preview { text-align: left; margin-bottom: 3px; } /* width: 100%; now full window width in IE =( */
-.ui-keyboard-keyset { text-align: center; }
-.ui-keyboard-input { text-align: left; }
-.ui-keyboard-input.placeholder { color: #888; }
-
-/* only used in IE to prevent clicking in another input/textarea */
-.ui-keyboard-overlay { height: 100%; width: 100%; background: transparent; position: absolute; top: 0; left: 0; z-index: 15999; }
+#keyboardInputMaster {
+ position:absolute;
+ font:normal 11px Arial,sans-serif;
+ border-top:1px solid #eeeeee;
+ border-right:1px solid #888888;
+ border-bottom:1px solid #444444;
+ border-left:1px solid #cccccc;
+ -webkit-border-radius:0.6em;
+ -moz-border-radius:0.6em;
+ border-radius:0.6em;
+ -webkit-box-shadow:0px 2px 10px #444444;
+ -moz-box-shadow:0px 2px 10px #444444;
+ box-shadow:0px 2px 10px #444444;
+ opacity:0.95;
+ filter:alpha(opacity=95);
+ background-color:#dddddd;
+ text-align:left;
+ z-index:1000000;
+ width:auto;
+ height:auto;
+ min-width:0;
+ min-height:0;
+ margin:0px;
+ padding:0px;
+ line-height:normal;
+ -moz-user-select:none;
+ cursor:default;
+}
+#keyboardInputMaster * {
+ position:static;
+ color:#000000;
+ background:transparent;
+ font:normal 11px Arial,sans-serif;
+ width:auto;
+ height:auto;
+ min-width:0;
+ min-height:0;
+ margin:0px;
+ padding:0px;
+ border:0px none;
+ outline:0px;
+ vertical-align:baseline;
+ line-height:1.3em;
+}
+#keyboardInputMaster.keyboardInputSize1,
+#keyboardInputMaster.keyboardInputSize1 * {
+ font-size:9px;
+}
+#keyboardInputMaster.keyboardInputSize3,
+#keyboardInputMaster.keyboardInputSize3 * {
+ font-size:13px;
+}
+#keyboardInputMaster.keyboardInputSize4,
+#keyboardInputMaster.keyboardInputSize4 * {
+ font-size:16px;
+}
+#keyboardInputMaster.keyboardInputSize5,
+#keyboardInputMaster.keyboardInputSize5 * {
+ font-size:20px;
+}
+
+#keyboardInputMaster thead tr th {
+ padding:0.3em 0.3em 0.1em 0.3em;
+ background-color:#999999;
+ white-space:nowrap;
+ text-align:right;
+ -webkit-border-radius:0.6em 0.6em 0px 0px;
+ -moz-border-radius:0.6em 0.6em 0px 0px;
+ border-radius:0.6em 0.6em 0px 0px;
+}
+#keyboardInputMaster thead tr th div {
+ float:left;
+ font-size:130% !important;
+ height:1.3em;
+ font-weight:bold;
+ position:relative;
+ z-index:1;
+ margin-right:0.5em;
+ cursor:pointer;
+ background-color:transparent;
+}
+#keyboardInputMaster thead tr th div ol {
+ position:absolute;
+ left:0px;
+ top:90%;
+ list-style-type:none;
+ height:9.4em;
+ overflow-y:auto;
+ overflow-x:hidden;
+ background-color:#f6f6f6;
+ border:1px solid #999999;
+ display:none;
+ text-align:left;
+ width:12em;
+}
+#keyboardInputMaster thead tr th div ol li {
+ padding:0.2em 0.4em;
+ cursor:pointer;
+ white-space:nowrap;
+ width:12em;
+}
+#keyboardInputMaster thead tr th div ol li.selected {
+ background-color:#ffffcc;
+}
+#keyboardInputMaster thead tr th div ol li:hover,
+#keyboardInputMaster thead tr th div ol li.hover {
+ background-color:#dddddd;
+}
+#keyboardInputMaster thead tr th span,
+#keyboardInputMaster thead tr th strong,
+#keyboardInputMaster thead tr th small,
+#keyboardInputMaster thead tr th big {
+ display:inline-block;
+ padding:0px 0.4em;
+ height:1.4em;
+ line-height:1.4em;
+ border-top:1px solid #e5e5e5;
+ border-right:1px solid #5d5d5d;
+ border-bottom:1px solid #5d5d5d;
+ border-left:1px solid #e5e5e5;
+ background-color:#cccccc;
+ cursor:pointer;
+ margin:0px 0px 0px 0.3em;
+ -webkit-border-radius:0.3em;
+ -moz-border-radius:0.3em;
+ border-radius:0.3em;
+ vertical-align:middle;
+ -webkit-transition:background-color .15s ease-in-out;
+ -o-transition:background-color .15s ease-in-out;
+ transition:background-color .15s ease-in-out;
+}
+#keyboardInputMaster thead tr th strong {
+ font-weight:bold;
+}
+#keyboardInputMaster thead tr th small {
+ -webkit-border-radius:0.3em 0px 0px 0.3em;
+ -moz-border-radius:0.3em 0px 0px 0.3em;
+ border-radius:0.3em 0px 0px 0.3em;
+ border-right:1px solid #aaaaaa;
+ padding:0px 0.2em 0px 0.3em;
+}
+#keyboardInputMaster thead tr th big {
+ -webkit-border-radius:0px 0.3em 0.3em 0px;
+ -moz-border-radius:0px 0.3em 0.3em 0px;
+ border-radius:0px 0.3em 0.3em 0px;
+ border-left:0px none;
+ margin:0px;
+ padding:0px 0.3em 0px 0.2em;
+}
+#keyboardInputMaster thead tr th span:hover,
+#keyboardInputMaster thead tr th span.hover,
+#keyboardInputMaster thead tr th strong:hover,
+#keyboardInputMaster thead tr th strong.hover,
+#keyboardInputMaster thead tr th small:hover,
+#keyboardInputMaster thead tr th small.hover,
+#keyboardInputMaster thead tr th big:hover,
+#keyboardInputMaster thead tr th big.hover {
+ background-color:#dddddd;
+}
+
+#keyboardInputMaster tbody tr td {
+ text-align:left;
+ padding:0.2em 0.3em 0.3em 0.3em;
+ vertical-align:top;
+}
+#keyboardInputMaster tbody tr td div {
+ text-align:center;
+ position:relative;
+ zoom:1;
+}
+#keyboardInputMaster tbody tr td table {
+ white-space:nowrap;
+ width:100%;
+ border-collapse:separate;
+ border-spacing:0px;
+}
+#keyboardInputMaster tbody tr td#keyboardInputNumpad table {
+ margin-left:0.2em;
+ width:auto;
+}
+#keyboardInputMaster tbody tr td table.keyboardInputCenter {
+ width:auto;
+ margin:0px auto;
+}
+#keyboardInputMaster tbody tr td table tbody tr td {
+ vertical-align:middle;
+ padding:0px 0.45em;
+ white-space:pre;
+ height:1.8em;
+ font-family:'Lucida Console','Arial Unicode MS',monospace;
+ border-top:1px solid #e5e5e5;
+ border-right:1px solid #5d5d5d;
+ border-bottom:1px solid #5d5d5d;
+ border-left:1px solid #e5e5e5;
+ background-color:#eeeeee;
+ cursor:default;
+ min-width:0.75em;
+ -webkit-border-radius:0.2em;
+ -moz-border-radius:0.2em;
+ border-radius:0.2em;
+ -webkit-transition:background-color .15s ease-in-out;
+ -o-transition:background-color .15s ease-in-out;
+ transition:background-color .15s ease-in-out;
+}
+#keyboardInputMaster tbody tr td table tbody tr td.last {
+ width:99%;
+}
+#keyboardInputMaster tbody tr td table tbody tr td.space {
+ padding:0px 4em;
+}
+#keyboardInputMaster tbody tr td table tbody tr td.deadkey {
+ background-color:#ccccdd;
+}
+#keyboardInputMaster tbody tr td table tbody tr td.target {
+ background-color:#ddddcc;
+}
+#keyboardInputMaster tbody tr td table tbody tr td:hover,
+#keyboardInputMaster tbody tr td table tbody tr td.hover {
+ border-top:1px solid #d5d5d5;
+ border-right:1px solid #555555;
+ border-bottom:1px solid #555555;
+ border-left:1px solid #d5d5d5;
+ background-color:#cccccc;
+}
+#keyboardInputMaster thead tr th span:active,
+#keyboardInputMaster thead tr th span.pressed,
+#keyboardInputMaster tbody tr td table tbody tr td:active,
+#keyboardInputMaster tbody tr td table tbody tr td.pressed {
+ border-top:1px solid #555555 !important;
+ border-right:1px solid #d5d5d5;
+ border-bottom:1px solid #d5d5d5;
+ border-left:1px solid #555555;
+ background-color:#cccccc;
+}
+
+#keyboardInputMaster tbody tr td table tbody tr td small {
+ display:block;
+ text-align:center;
+ font-size:0.6em !important;
+ line-height:1.1em;
+}
+
+#keyboardInputMaster tbody tr td div label {
+ position:absolute;
+ bottom:0.2em;
+ left:0.3em;
+}
+#keyboardInputMaster tbody tr td div label input {
+ background-color:#f6f6f6;
+ vertical-align:middle;
+ font-size:inherit;
+ width:1.1em;
+ height:1.1em;
+}
+#keyboardInputMaster tbody tr td div var {
+ position:absolute;
+ bottom:0px;
+ right:3px;
+ font-weight:bold;
+ font-style:italic;
+ color:#444444;
+}
+
+.keyboardInputInitiator {
+ margin:0px 3px;
+ vertical-align:middle;
+ cursor:pointer;
+}
diff --git a/public/media/css/style.css b/public/media/css/style.css
index 80b504c..0c076ab 100644
--- a/public/media/css/style.css
+++ b/public/media/css/style.css
@@ -508,4 +508,11 @@ table.json td {
background-color: yellow;
}
+.helpericon {
+ vertical-align:text-top;
+}
+
+.helper {
+ display: none;
+}
diff --git a/public/media/img/bulb_off.png b/public/media/img/bulb_off.png
new file mode 100644
index 0000000..fdfed3b
--- /dev/null
+++ b/public/media/img/bulb_off.png
Binary files differ
diff --git a/public/media/img/bulb_on.png b/public/media/img/bulb_on.png
new file mode 100644
index 0000000..283c938
--- /dev/null
+++ b/public/media/img/bulb_on.png
Binary files differ
diff --git a/public/media/img/keyboard.png b/public/media/img/keyboard.png
index 83ef47d..dba1c8c 100644
--- a/public/media/img/keyboard.png
+++ b/public/media/img/keyboard.png
Binary files differ
diff --git a/public/media/js/jquery.keyboard.extension-typing.js b/public/media/js/jquery.keyboard.extension-typing.js
deleted file mode 100644
index bf82a66..0000000
--- a/public/media/js/jquery.keyboard.extension-typing.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * jQuery UI Virtual Keyboard Typing Simulator v1.0
- *
- * By Rob Garrison (aka Mottie & Fudgey)
- * Dual licensed under the MIT and GPL licenses.
- *
- * Use this extension with the Virtual Keyboard to simulate
- * typing for tutorials or whatever else use you can find
- *
- * Requires:
- * jQuery
- * jQuery UI & css
- * Keyboard plugin : https://github.com/Mottie/Keyboard
- *
- * Setup:
- * $('.ui-keyboard-input')
- * .keyboard(options)
- * .addTyping();
- *
- * // or if targeting a specific keyboard
- * $('#keyboard1')
- * .keyboard(options)
- * .addTyping();
- *
- * Basic Usage:
- * // get keyboard object, open it, then start typing simulation
- * $('#keyboard-input').getkeyboard().reveal().typeIn('Hello World', 700);
- *
- * // get keyboard object, open it, type in "This is a test" with 700ms delay between types, then accept & close the keyboard
- * $('#keyboard-input').getkeyboard().reveal().typeIn('This is a test', 700, function(){ $('#keyboard-input').getkeyboard().close(true); });
- */
-
- // TO DO: Make the "enter" work "This\ntest"
-
- // EXAMPLES:
- // $('#inter').getkeyboard().reveal().typeIn('\tHello \b\n\tWorld', 500);
- // $('#meta').getkeyboard().reveal().typeIn('abCDd11123\u2648\u2649\u264A\u264B', 700, function(){ alert('all done!'); });
-
-(function($){
-$.fn.addTyping = function(){
- return this.each(function(){
- // make sure a keyboard is attached
- var base = $(this).data('keyboard');
- if (!base) { return; }
-
- // variables
- base.typing_options = {};
- base.typing_keymap = {
- ' ' : 'space',
- '&nbsp;' : 'space',
- '\b' : 'bksp',
- '\t' : 'tab'
- };
- base.typing_timer;
-
- // Store typing text
- base.typeIn = function(txt, delay, callback){
- if (!base.isVisible) {
- // keyboard was closed
- base.typing_options.init = false;
- clearTimeout(base.typing_timer);
- return;
- }
- var t = base.typing_options, n, k, key, ks, meta, set;
- if (base.typing_options.init !== true) {
- t.init = true;
- t.text = txt;
- t.len = txt.length;
- t.delay = delay || 300;
- t.current = 0;
- t.callback = callback;
- }
-
- // function that loops through and types each character
- txt = t.text.substring( t.current, ++t.current );
- ks = base.$keyboard.find('.ui-keyboard-keyset');
- k = (txt === '\n' || txt === '\r') ? 'Enter' : txt;
- key = ks.filter(':visible').find('input.ui-keyboard-button[value="' + k + '"]');
-
- // key is visible, simulate typing
- if (key.length) {
- base.typing_simulateKey(key,txt);
- } else {
-
- // key not found, check if it is in the keymap (tab, space, enter, etc)
- n = (txt in base.typing_keymap) ? base.typing_keymap[txt] : txt.charCodeAt(0);
- if (n === 'bksp') { txt = n; }
- // find actual key on keyboard
- key = ks.find('input.ui-keyboard-' + n);
- // find the keyset it is in
- set = key.closest('.ui-keyboard-keyset');
- // figure out which keyset the key is in then simulate clicking on that meta key, then on the key
- if (set.attr('name')) {
- // get meta key name
- meta = set.attr('name');
-
- // reset back to default keys
- if (meta === 'default'){
- base.metaActive = base.shiftActive = base.altActive = false;
- base.showKeySet();
-
- // Meta Key: If it's a meta key we have to do something a little
- // different because "meta" will have a number following it
- } else if (meta.match('meta')){
- // make the plugin think we're passing it an jQuery object with a name
- set = { name : '_' + meta};
- base.metaActive = true;
- base.showKeySet(set);
-
- // Shift or Alt key
- } else if (base.keyaction.hasOwnProperty(meta)) {
- base.keyaction[meta]();
- }
-
- // Add the key
- base.typing_simulateKey(key,txt);
-
- // Key doesn't exist on the keyboard, so just enter it
- } else {
- base.insertText(txt);
- }
-
- }
-
- if (t.current < t.len){
- if (!base.isVisible) { return; } // keyboard was closed, abort!!
- setTimeout(function(){ base.typeIn(); }, t.delay);
- } else {
- t.init = false;
- if ($.isFunction(t.callback)) {
- // ensure all typing animation is done before the callback
- setTimeout(function(){
- t.callback();
- }, t.delay);
- }
- return;
- }
- };
-
- // mouseover the key, add the text directly, then mouseout on the key
- base.typing_simulateKey = function(el,txt){
- var e = el.length;
- if (e) { el.filter(':visible').trigger('mouseenter'); }
- base.typing_timer = setTimeout(function(){
- if (!base.isVisible) { return; }
- base.insertText(txt);
- if (e) { setTimeout(function(){ el.filter(':visible').trigger('mouseleave'); }, base.typing_options.delay/3); }
- }, base.typing_options.delay/3);
- };
-
- });
-};
-})(jQuery);
diff --git a/public/media/js/jquery.keyboard.js b/public/media/js/jquery.keyboard.js
deleted file mode 100644
index a286079..0000000
--- a/public/media/js/jquery.keyboard.js
+++ /dev/null
@@ -1,963 +0,0 @@
-/*
-jQuery UI Virtual Keyboard
-Version 1.7.3
-
-Author: Jeremy Satterfield
-Modified: Rob G (Mottie on github)
------------------------------------------
-Creative Commons Attribution-Share Alike 3.0 Unported License
-http://creativecommons.org/licenses/by-sa/3.0/
-
-Caret code from jquery.caret.1.02.js
-Licensed under the MIT License:
-http://www.opensource.org/licenses/mit-license.php
------------------------------------------
-
-An on-screen virtual keyboard embedded within the browser window which
-will popup when a specified entry field is focused. The user can then
-type and preview their input before Accepting or Canceling.
-
-As a plugin to jQuery UI styling and theme will automatically
-match that used by jQuery UI with the exception of the required
-CSS listed below.
-
-Requires:
- jQuery
- jQuery UI (this version no longer requires the widget factory)
-
-Usage:
- $('input[type=text], input[type=password], textarea')
- .keyboard({
- layout:"qwerty",
- customLayout:
- [["q w e r t y {bksp}","Q W E R T Y {bksp}"],
- ["s a m p l e {shift}","S A M P L E {shift}"],
- ["{accept} {space} {cancel}","{accept} {space} {cancel}"]]
- });
-
-Options:
- layout
- [String] specify which keyboard layout to use
- qwerty - Standard QWERTY layout (Default)
- international - US international layout
- alpha - Alphabetical layout
- dvorak - Dvorak Simplified layout
- num - Numerical (ten-key) layout
- custom - Uses a custom layout as defined by the customLayout option
-
- customLayout
- [Array] Specify a custom layout
- An Array of arrays.
- Each internal array is a new keyboard row.
- Each internal array can contain one to four rows (default, shifted, alt and alt-shift... respectively).
- String elements (Lower case and Upper case, alt lower case and alt-upper case respectively).
- Each string element must have each character or key seperated by a space.
- In the list below where two special/"Action" keys are shown, both keys have the same action but different appearances.
- Special/"Action" keys include:
- {a}, {accept} - Updates element value and closes keyboard
- {alt},{altgr} - AltGr for International keyboard
- {b}, {bksp} - Backspace
- {c}, {cancel} - Clears changes and closes keyboard
- {clear} - Clear input window - used in num pad
- {dec} - Decimal for numeric entry, only allows one decimal (optional use in num pad)
- {e}, {enter} - Return/New Line
- {s}, {shift} - Shift/Capslock
- {sign} - Change sign of numeric entry (positive or negative)
- {sp:#} - Replace # with a numerical value, adds blank space, value of 1 ~ width of one key
- {space} - Spacebar
- {t}, {tab} - Tab
-
-CSS:
- .ui-keyboard { padding: .3em; position: absolute; left: 0; top: 0; z-index: 16000; }
- .ui-keyboard div { font-size: 1.1em; }
- .ui-keyboard-button { height: 2em; width: 2em; margin: .1em; }
- .ui-keyboard-widekey { width: 4em; }
- .ui-keyboard-space { width: 15em; }
- .ui-keyboard-preview { width: 100%; text-align: left; margin-bottom: 3px; }
- .ui-keyboard-keyset { text-align: center; }
- .ui-keyboard-input { text-align: left; }
- .ui-keyboard-overlay { height: 100%; width: 100%; background: transparent; position: absolute; top: 0; left: 0; z-index: 15999; }
-*/
-
-(function($){
- $.keyboard = function(el, options){
- var base = this;
-
- // Access to jQuery and DOM versions of element
- base.$el = $(el);
- base.el = el;
-
- // Add a reverse reference to the DOM object
- base.$el.data("keyboard", base);
-
- base.init = function(){
- base.options = $.extend(true, {}, $.keyboard.defaultOptions, options);
-
- // Shift and Alt key toggles
- base.shiftActive = false;
- base.altActive = false;
- base.metaActive = false;
- // true if a layout has more than one keyset - used for mousewheel message
- base.sets = false;
- // Class names of the basic key set - meta keysets are handled by the keyname
- base.rows = ['ui-keyboard-keyset-default', 'ui-keyboard-keyset-shift', 'ui-keyboard-keyset-alt', 'ui-keyboard-keyset-alt-shift' ];
- base.acceptedKeys = [];
- base.msie = $.browser.msie;
- base.inPlaceholder = base.$el.attr('placeholder') || '';
- base.watermark = (typeof(document.createElement('input').placeholder) !== 'undefined' && base.inPlaceholder !== ''); // html 5 placeholder/watermark
-
- // Bind events
- $.each('visible change hidden canceled accepted'.split(' '), function(i,o){
- if ($.isFunction(base.options[o])){
- base.$el.bind(o, base.options[o]);
- }
- });
-
- // Close with esc key & clicking outside
- $(document).bind('mousedown keyup', function(e){
- if (base.isVisible && ( e.type === 'mousedown' || (e.type === 'keyup' && e.which === 27) )){
- base.escClose(e);
- }
- });
-
- // Display keyboard on focus
- base.$el
- .addClass('ui-keyboard-input ui-widget-content ui-corner-all')
- .attr({ 'aria-haspopup' : 'true', 'role' : 'textbox' })
- .bind('focus', function(){
- if (!base.isVisible) {
- base.reveal();
- setTimeout(function(){ base.$preview.focus(); }, 100); // needed for Opera
- }
- });
-
- if (!base.watermark && base.$el.val() === '' && base.$el.attr('placeholder') !== '') {
- base.$el
- .addClass('placeholder') // css watermark style (darker text)
- .val( base.inPlaceholder );
- }
-
- };
-
- base.reveal = function(){
- // close all keyboards
- $('.ui-keyboard').hide();
-
- // build keyboard if it doesn't exist
- if (typeof(base.$keyboard) === 'undefined') { base.startup(); }
-
- // clear watermark
- if (!base.watermark && base.el.value === base.inPlaceholder) {
- base.$el
- .removeClass('placeholder')
- .val('');
- }
- // save starting content, in case we cancel
- base.originalContent = base.$el.val();
- base.$preview.val( base.originalContent );
-
- // show & position keyboard
- base.$keyboard
- // position and show the keyboard before positioning (required for UI position utility)
- .css({ position: 'absolute', left: 0, top: 0 })
- .show()
- .position({
- // get single target position || target stored in element data (multiple targets) || default, at the element
- of: base.options.position.of || base.$el.data('keyboardPosition') || base.$el,
- my: base.options.position.my,
- at: base.options.position.at,
- collision: 'fit'
- });
- // adjust keyboard preview window width
- base.$preview
- .css('width', ((base.msie) ? base.$keyboard.width() : '100%' )) // IE thinks 100% means across the screen
- .focus();
- base.isVisible = true;
-
- base.checkDecimal();
-
- // IE caret haxx0rs
- if (base.msie){
- // ensure caret is at the end of the text (needed for IE)
- var caret = base.$preview.val().length;
- base.$preview.caret(caret, caret);
- // Add overlay under the keyboard to prevent clicking in and not opening a new keyboard while one is open
- $('<div class="ui-keyboard-overlay"></div>')
- .click(function(){
- $(this).remove();
- base.close();
- })
- .appendTo('body');
- }
- base.$el.trigger( 'visible', base.$el );
- return base;
- };
-
- base.startup = function(){
- base.$keyboard = base.buildKeyboard();
- base.$allKeys = base.$keyboard.find('.ui-keyboard-button');
- base.$preview = base.$keyboard.find('.ui-keyboard-preview');
- base.preview = base.$preview[0];
- base.$decBtn = base.$keyboard.find('.ui-keyboard-dec');
- base.wheel = $.isFunction( $.fn.mousewheel ); // is mousewheel plugin loaded?
-
- base.$preview
- .keypress(function(e){
- // restrict input
- if (base.options.restrictInput) {
- var k = (!e.charCode) ? String.fromCharCode(e.which) : String.fromCharCode(e.charCode);
- if (base.acceptedKeysStr.indexOf(k) === -1) { e.preventDefault(); }
- }
- })
- .bind('keyup', function(e){
- switch (e.which) {
- // Insert tab key
- case 9 :
- // Added a flag to prevent from tabbing into an input, keyboard opening, then adding the tab to the keyboard preview
- // area on keyup. Sadly it still happens if you don't release the tab key immediately because keydown event auto-repeats
- if (base.tab) {
- base.keyaction.tab();
- base.tab = false;
- }
- break;
-
- // Escape will hide the keyboard
- case 27:
- base.close();
- break;
- }
- base.$el.trigger( 'change', base.$el );
- })
- .bind('keydown', function(e){
- switch (e.which) {
- // prevent tab key from leaving the preview window
- case 9 :
- base.tab = true; // see keyup comment above
- e.preventDefault(); // Opera ignores this =(
- break;
-
- case 13:
- // Accept content - shift-enter
- if (e.shiftKey) {
- base.close(true);
- e.preventDefault();
- }
- break;
-
- case 86:
- // prevent ctrl-v
- if (e.ctrlKey) {
- if (base.options.preventPaste) { e.preventDefault(); return; }
- base.$preview.val( base.checkCombos(base.$preview.val())[0] ); // check pasted content
- }
- break;
- }
- });
- // If preventing paste, block context menu (right click)
- if (base.options.preventPaste){
- base.$preview.bind('contextmenu', function(e){ e.preventDefault(); });
- base.$el.bind('contextmenu', function(e){ e.preventDefault(); });
- }
-
- base.$keyboard.appendTo('body');
-
- base.$allKeys
- .bind(base.options.keyBinding, function(e){
- // 'key', { action: doAction, original: n, curTxt : n, curNum: 0 }
- var txt, key = $.data(this, 'key'), action = key.action.split(':')[0];
- if (action.match('meta')) { action = 'meta'; }
- if (base.keyaction.hasOwnProperty(action)) {
- base.keyaction[action](this);
- } else if (typeof key.action !== 'undefined') {
- txt = (base.wheel && !$(this).is('.ui-keyboard-actionkey')) ? key.curTxt : key.action;
- base.insertText(txt);
- }
- base.$el.trigger( 'change', base.$el );
- base.$preview.focus();
- e.preventDefault();
- })
- // Change hover class and tooltip
- .bind('mouseenter mouseleave', function(e){
- var el = this, $this = $(this),
- // 'key' = { action: doAction, original: n, curTxt : n, curNum: 0 }
- key = $.data(el, 'key');
- if (e.type === 'mouseenter' && base.el.type !== 'password' ){
- $this
- .addClass('ui-state-hover')
- .attr('title', function(i,t){
- // show mouse wheel message
- return (base.wheel && t === '' && base.sets) ? base.options.wheelMessage : t;
- });
- }
- if (e.type === 'mouseleave'){
- key.curTxt = key.original;
- key.curNum = 0;
- $.data(el, 'key', key);
- $this
- .removeClass( (base.el.type === 'password') ? '' : 'ui-state-hover') // needed or IE flickers really bad
- .attr('title', function(i,t){ return (t === base.options.wheelMessage) ? '' : t; })
- .val( key.original ); // restore original button text
- }
- })
- // Allow mousewheel to scroll through other key sets of the same key
- .bind('mousewheel', function(e, delta){
- if (base.wheel) {
- var txt, $this = $(this), key = $.data(this, 'key');
- txt = key.layers || base.getLayers( $this );
- key.curNum += (delta > 0) ? -1 : 1;
- if (key.curNum > txt.length-1) { key.curNum = 0; }
- if (key.curNum < 0) { key.curNum = txt.length-1; }
- key.layers = txt;
- key.curTxt = txt[key.curNum];
- $.data(this, 'key', key);
- $this.val( txt[key.curNum] );
- return false;
- }
- })
- .bind('mouseup', function(e){
- base.$preview.focus();
- });
-
- if (base.$decBtn.length) {
- base.$allKeys.click(function(){
- base.checkDecimal();
- });
- }
- };
-
- base.insertText = function(txt){
- var i, t,
- caret = base.$preview.caret().start,
- prevw = base.$preview.val(),
- len = prevw.length;
-
- if (base.msie && caret > 0) {
- // silly IE hacks... it still messes up with in a text area with lots of carriage returns (in Opera too)
- t = caret;
- i = t - 1;
- // count how many enters there are before the caret and subtract that from the caret position
- if (caret < len){
- while (i--) {
- if (prevw.substring(i - 1, i) === '\n') { caret -= 1; }
- }
- }
- // if the content ends in a return, adjust the caret
- if (prevw.slice(-1) === '\n' && t === len - 1) { caret += 1; }
- }
-
- if (txt === 'bksp') {
- // backspace
- t = [prevw.substring(0, caret-1) + prevw.substring(caret, len)];
- caret -= 1;
- } else {
- // inject text at caret
- prevw = prevw.substring(0, caret) + txt + prevw.substring(caret, len);
- t = base.checkCombos(prevw); // t = [ text, length change ];
- caret += t[1] + txt.length;
- }
- base.$preview
- .val(t[0])
- .caret(caret, caret); // move caret to correct position
-
- // set scrollTop to 0 if caret is in the first 1/2 of content, it'll have to do =/
- base.preview.scrollTop = (caret > len/2) ? base.preview.scrollHeight : 0;
- return base;
- };
-
- base.showKeySet = function(el){
- var key, toShow;
- base.$keyboard.find('.ui-keyboard-actionkey[name*=key_meta]').removeClass('ui-state-active');
- if (base.metaActive) {
- key = el.name.split('_')[1];
- base.$keyboard
- .find('.ui-keyboard-alt, .ui-keyboard-shift, .ui-keyboard-actionkey[class*=meta]').removeClass('ui-state-active').end()
- .find('.ui-keyboard-actionkey.ui-keyboard-' + key).addClass('ui-state-active').end()
- .find('.ui-keyboard-keyset').hide().end()
- .find('.ui-keyboard-keyset-' + key ).show();
- } else {
- toShow = (base.shiftActive) ? 1 : 0;
- toShow += (base.altActive) ? 2 : 0;
- base.$keyboard
- .find('.ui-keyboard-alt')[(base.altActive) ? 'addClass' : 'removeClass']('ui-state-active').end()
- .find('.ui-keyboard-shift')[(base.shiftActive) ? 'addClass' : 'removeClass']('ui-state-active').end()
- .find('.ui-keyboard-keyset').hide().end()
- .find('.' + base.rows[toShow]).show();
- }
- };
-
- // check for key combos (dead keys)
- base.checkCombos = function(txt){
- var i, s = txt.length, t;
- if (base.options.useCombos) {
- // keep 'a' and 'o' in the regex for ae and oe ligature (æ,œ)
- // thanks to KennyTM: http://stackoverflow.com/questions/4275077/replace-characters-to-make-international-letters-diacritics
- txt = txt.replace(/([`\'~\^\"ao])([a-z])/ig, function(s, accent, letter){
- return (base.options.combos.hasOwnProperty(accent)) ? base.options.combos[accent][letter] || s : s;
- });
- }
- // check restrictions - to do: figure out how to check this on keydown
- if (base.options.restrictInput) {
- t = txt.split('');
- for (i=0; i<s; i++){
- if ($.inArray( t[i], base.acceptedKeys ) < 0) { txt = txt.replace(t[i], ''); }
- }
- }
- // check max length too!
- if (base.options.maxLength !== false && txt.length > base.options.maxLength) { txt = txt.substring(0, base.options.maxLength); }
- return [ txt, txt.length - s ]; // return new text and change in length
- };
-
- // Decimal button for num pad - only allow one (not used by default)
- base.checkDecimal = function(){
- if (/\./.test(base.$decBtn.closest('.ui-keyboard').find('.ui-keyboard-preview').val())) {
- base.$decBtn
- .attr({ 'disabled': 'disabled', 'aria-disabled': 'true' })
- .removeClass('ui-state-default ui-state-hover')
- .addClass('ui-state-disabled');
- } else {
- base.$decBtn
- .removeAttr('disabled')
- .attr({ 'aria-disabled': 'false' })
- .addClass('ui-state-default')
- .removeClass('ui-state-disabled');
- }
- };
-
- // get other layer values for a specific key
- base.getLayers = function(el){
- var key, keys;
- key = el.attr('name');
- keys = el.closest('.ui-keyboard').find('input[name=' + key + ']').map(function(){
- return this.value;
- }).get();
- return keys;
- };
-
- // Close the keyboard, if visible. Pass a status of true, if the content was accepted (for the event trigger).
- base.close = function(accepted){
- if (base.$keyboard.is(':visible')) {
- base.$keyboard.hide();
- base.isVisible = false;
- base.el.value = (accepted) ? base.checkCombos(base.preview.value)[0] : base.originalContent;
- base.$el
- .scrollTop( base.el.scrollHeight )
- .trigger( (accepted || false) ? 'accepted' : 'canceled', base.$el )
- .trigger( 'hidden', base.$el )
- .blur();
- if (!base.watermark && base.el.value === '') {
- base.$el
- .addClass('placeholder')
- .val(base.inPlaceholder);
- }
- }
- };
-
- base.accept = function(){
- base.close(true);
- };
-
- base.escClose = function(e){
- if ( !$(e.target).closest('.ui-keyboard').length ) {
- base.close( (base.options.autoAccept) ? true : false );
- }
- };
-
- // build default button
- base.keyBtn = $('<input />')
- .attr({ 'type': 'button', 'role': 'button', 'aria-disabled': 'false' })
- .addClass('ui-keyboard-button ui-state-default ui-corner-all');
-
- // Add key function
- // keyName = name added to key, name = display option name (e.g. tab or t),
- // doAction = what is done/added when the button is clicked, regKey = true when it is not an action key
- base.addKey = function(keyName, name, regKey ){
- var t, keyType, n = (regKey === true) ? keyName : base.options.display[name] || keyName,
- nm = n.split(':'); // find key label
- n = (nm[0] !== '' && nm.length > 1) ? $.trim(nm[0]) : n;
- t = (nm.length > 1) ? $.trim(nm[1]).replace(/_/g, " ") || '' : ''; // added to title
- // Action keys will have the 'ui-keyboard-actionkey' class
- // '\u2190'.length = 1 because the unicode is converted, so if more than one character, add the wide class
- keyType = (n.length > 1) ? ' ui-keyboard-widekey' : '';
- keyType += (regKey !== true) ? ' ui-keyboard-actionkey' : '';
- return base.keyBtn
- .clone()
- .attr({ 'name': 'key_' + keyName, 'title' : t })
- .data('key', { action: keyName, original: n, curTxt : n, curNum: 0 })
- .val( n )
- // add "ui-keyboard-" + keyName, if this is an action key (e.g. "Bksp" will have 'ui-keyboard-bskp' class)
- // add "ui-keyboard-" + unicode of 1st character (e.g. "~" is a regular key, class = 'ui-keyboard-126' (126 is the unicode value - same as typing &#126;)
- .addClass('ui-keyboard-' + ((regKey === true) ? keyName.charCodeAt(0) : keyName) + keyType );
- };
-
- base.buildKeyboard = function(){
- var action, row, newRow, newSet,
- currentSet, key, keys, margin,
- sets = 0,
-
- container = $('<div />')
- .addClass('ui-keyboard ui-widget-content ui-widget ui-corner-all ui-helper-clearfix')
- .attr({ 'role': 'textbox' })
- .hide();
-
- // build preview display
- base.$preview = base.$el.clone(false)
- .removeAttr('id')
- .removeAttr('placeholder')
- .show() // for hidden inputs
- .attr( (base.options.lockInput) ? { 'readonly': 'readonly'} : {} )
- .removeClass('placeholder')
- .addClass('ui-widget-content ui-keyboard-preview ui-corner-all')
- .bind('keyup', function(){
- var caret = base.$preview.caret().start,
- t = base.checkCombos( base.$preview.val() );
- if (t[1] !== 0) {
- caret += t[1];
- base.$preview
- .val(t[0])
- .caret( caret, caret); // reposition caret based on # of replacments
- }
- });
-
- // build preview container and append preview display
- $('<div />')
- .append(base.$preview)
- .appendTo(container);
-
- // setup custom keyboard
- if (base.options.layout === 'custom') {
- $.keyboard.layouts.custom = base.options.customLayout || { 'default' : ['{cancel}'] };
- }
-
- // Main keyboard building loop
- $.each($.keyboard.layouts[base.options.layout], function(set, keySet){
- if (set !== "") {
- sets++;
- newSet = $('<div />')
- .attr('name', set) // added for typing extension
- .addClass('ui-keyboard-keyset ui-keyboard-keyset-' + set)
- .appendTo(container)[(set === 'default') ? 'show' : 'hide']();
-
- for ( row = 0; row < keySet.length; row++ ){
- newRow = $('<div />')
- .addClass('ui-keyboard-row ui-keyboard-row' + row )
- .appendTo(newSet);
-
- // remove extra spaces before spliting (regex probably could be improved)
- currentSet = $.trim(keySet[row]).replace(/\{(\.?)[\s+]?:[\s+]?(\.?)\}/g,'{$1:$2}');
- keys = currentSet.split(/\s+/);
-
- for ( key = 0; key < keys.length; key++ ) {
- // ignore empty keys
- if (keys[key].length === 0) { continue; }
-
- // process here if it's an action key
- if( /^\{\S+\}$/.test(keys[key])){
- action = keys[key].match(/^\{(\S+)\}$/)[1].toLowerCase();
-
- // add empty space
- if (/^sp:(\.?\d+)$/.test(action)) {
- margin = action.match(/^sp:(\.?\d+)$/)[1] || 0;
- $('<span>&nbsp;</span>')
- .css('margin','0 ' + margin + 'em')
- .appendTo(newRow);
- }
-
- // meta keys
- if (/^meta\d+\:?(\w+)?/.test(action)){
- base.addKey(action, action).appendTo(newRow);
- continue;
- }
-
- switch(action){
-
- case 'a':
- case 'accept':
- base.addKey('accept', action)
- .addClass(base.options.actionClass)
- .appendTo(newRow);
- break;
-
- case 'alt':
- case 'altgr':
- base.addKey('alt', 'alt').appendTo(newRow);
- break;
-
- case 'b':
- case 'bksp':
- base.addKey('bksp', action).appendTo(newRow);
- break;
-
- case 'c':
- case 'cancel':
- base.addKey('cancel', action)
- .addClass(base.options.actionClass)
- .appendTo(newRow);
- break;
-
- // for NumPad
- case 'clear':
- base.addKey('clear', 'clear').appendTo(newRow);
- break;
-
- // Decimal - unique decimal point (num pad layout)
- case 'dec':
- base.acceptedKeys.push('.');
- base.addKey('dec', 'dec').appendTo(newRow);
- break;
-
- case 'e':
- case 'enter':
- base.addKey('enter', action).appendTo(newRow);
- break;
-
- case 's':
- case 'shift':
- base.addKey('shift', action).appendTo(newRow);
- break;
-
- // Change sign (for num pad layout)
- case 'sign':
- base.acceptedKeys.push('-');
- base.addKey('sign', 'sign').appendTo(newRow);
- break;
-
- case 'space':
- base.acceptedKeys.push(' ');
- base.addKey('space', 'space').appendTo(newRow);
- break;
-
- case 't':
- case 'tab':
- base.addKey('tab', action).appendTo(newRow);
- break;
-
- }
-
- } else {
-
- // regular button (not an action key)
- base.acceptedKeys.push(keys[key].split(':')[0]);
- base.addKey(keys[key], keys[key], true)
- .attr('name','key_' + row + '_'+key)
- .appendTo(newRow);
-
- }
- }
- }
- }
- });
-
- if (sets > 1) { base.sets = true; }
- base.acceptedKeysStr = base.acceptedKeys.join('');
- return container;
- };
-
- base.destroy = function() {
- $(document).unbind('mousedown keyup', base.escClose );
- base.$keyboard.remove();
- base.$el
- .removeClass('ui-keyboard-input ui-widget-content ui-corner-all')
- .removeAttr('aria-haspopup')
- .removeAttr('role')
- .unbind('focus accepted canceled hidden visible')
- .removeData('keyboard');
- };
-
- // Action key function list
- base.keyaction = {
- accept : function(){
- base.close(true);
- },
- alt : function(el){
- base.altActive = !base.altActive;
- base.metaActive = false;
- base.showKeySet(el);
- },
- bksp : function(){
- base.insertText('bksp');
- },
- cancel : function(){
- base.close();
- },
- clear : function(){
- base.$preview.val('');
- },
- dec : function(){
- base.insertText('.');
- },
- enter : function() {
- base.insertText('\r\n');
- },
- meta : function(el){
- base.metaActive = ($(el).is('.ui-state-active')) ? false : true;
- base.showKeySet(el);
- },
- shift : function(el){
- base.shiftActive = !base.shiftActive;
- base.metaActive = false;
- base.showKeySet(el);
- },
- sign : function(){
- if(/^\-?\d*\.?\d*$/.test( base.$preview.val() )) {
- base.$preview.val( (base.$preview.val() * -1) );
- }
- },
- space : function(){
- base.insertText(' ');
- },
- tab : function() {
- base.insertText('\t');
- }
- };
-
- // Run initializer
- base.init();
- };
-
- // Default keyboard layouts
- $.keyboard.layouts = {
- 'alpha' : {
- 'default': [
- '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
- '{tab} a b c d e f g h i j [ ] \\',
- 'k l m n o p q r s ; \' {enter}',
- '{shift} t u v w x y z , . / {shift}',
- '{accept} {space} {cancel}'
- ],
- 'shift': [
- '~ ! @ # $ % ^ & * ( ) _ + {bksp}',
- '{tab} A B C D E F G H I J { } |',
- 'K L M N O P Q R S : " {enter}',
- '{shift} T U V W X Y Z < > ? {shift}',
- '{accept} {space} {cancel}'
- ]
- },
- 'qwerty' : {
- 'default': [
- '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
- '{tab} q w e r t y u i o p [ ] \\',
- 'a s d f g h j k l ; \' {enter}',
- '{shift} z x c v b n m , . / {shift}',
- '{accept} {space} {cancel}'
- ],
- 'shift': [
- '~ ! @ # $ % ^ & * ( ) _ + {bksp}',
- '{tab} Q W E R T Y U I O P { } |',
- 'A S D F G H J K L : " {enter}',
- '{shift} Z X C V B N M < > ? {shift}',
- '{accept} {space} {cancel}'
- ]
- },
- 'international' : {
- 'default': [
- '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
- '{tab} q w e r t y u i o p [ ] \\',
- 'a s d f g h j k l ; \' {enter}',
- '{shift} z x c v b n m , . / {shift}',
- '{accept} {space} {alt} {cancel}'
- ],
- 'shift': [
- '~ ! @ # $ % ^ & * ( ) _ + {bksp}',
- '{tab} Q W E R T Y U I O P { } |',
- 'A S D F G H J K L : " {enter}',
- '{shift} Z X C V B N M < > ? {shift}',
- '{accept} {space} {alt} {cancel}'
- ],
- 'alt': [
- '~ \u00a1 \u00b2 \u00b3 \u00a4 \u20ac \u00bc \u00bd \u00be \u2018 \u2019 \u00a5 \u00d7 {bksp}',
- '{tab} \u00e4 \u00e5 \u00e9 \u00ae \u00fe \u00fc \u00fa \u00ed \u00f3 \u00f6 \u00ab \u00bb \u00ac',
- '\u00e1 \u00df \u00f0 f g h j k \u00f8 \u00b6 \u00b4 {enter}',
- '{shift} \u00e6 x \u00a9 v b \u00f1 \u00b5 \u00e7 > \u00bf {shift}',
- '{accept} {space} {alt} {cancel}'
- ],
- 'alt-shift': [
- '~ \u00b9 \u00b2 \u00b3 \u00a3 \u20ac \u00bc \u00bd \u00be \u2018 \u2019 \u00a5 \u00f7 {bksp}',
- '{tab} \u00c4 \u00c5 \u00c9 \u00ae \u00de \u00dc \u00da \u00cd \u00d3 \u00d6 \u00ab \u00bb \u00a6',
- '\u00c4 \u00a7 \u00d0 F G H J K \u00d8 \u00b0 \u00a8 {enter}',
- '{shift} \u00c6 X \u00a2 V B \u00d1 \u00b5 \u00c7 . \u00bf {shift}',
- '{accept} {space} {alt} {cancel}'
- ]
- },
- 'dvorak' : {
- 'default': [
- '` 1 2 3 4 5 6 7 8 9 0 [ ] {bksp}',
- '{tab} \' , . p y f g c r l / = \\',
- 'a o e u i d h t n s - {enter}',
- '{shift} ; q j k x b m w v z {shift}',
- '{accept} {space} {cancel}'
- ],
- 'shift' : [
- '~ ! @ # $ % ^ & * ( ) { } {bksp}',
- '{tab} " < > P Y F G C R L ? + |',
- 'A O E U I D H T N S _ {enter}',
- '{shift} : Q J K X B M W V Z {shift}',
- '{accept} {space} {cancel}'
- ]
- },
- 'num' : {
- 'default' : [
- '= ( ) {b}',
- '{clear} / * -',
- '7 8 9 +',
- '4 5 6 {sign}',
- '1 2 3 %',
- '0 . {a} {c}'
- ]
- }
- };
-
- $.keyboard.defaultOptions = {
-
- // *** choose layout & positioning ***
- layout : 'qwerty',
- customLayout : null,
-
- position : {
- of : null, // optional - null (attach to input/textarea) or a jQuery object (attach elsewhere)
- my : 'center top',
- at : 'center top'
- },
-
- // *** change keyboard language & look ***
- display : {
- 'a' : '\u2714:Accept (Shift-Enter)', // check mark - same action as accept
- 'accept' : 'Accept:Accept (Shift-Enter)',
- 'alt' : 'AltGr:Alternate Graphemes',
- 'b' : '\u2190:Backspace', // Left arrow (same as &larr;)
- 'bksp' : 'Bksp:Backspace',
- 'c' : '\u2716:Cancel (Esc)', // big X, close - same action as cancel
- 'cancel' : 'Cancel:Cancel (Esc)',
- 'clear' : 'C:Clear', // clear num pad
- 'dec' : '.:Decimal', // decimal point for num pad (optional) - if used, only one decimal point is allowed
- 'e' : '\u21b5:Enter', // down, then left arrow - enter symbol
- 'enter' : 'Enter:Enter',
- 's' : '\u21e7:Shift', // thick hollow up arrow
- 'shift' : 'Shift:Shift',
- 'sign' : '\u00b1:Change Sign', // +/- sign for num pad
- 'space' : 'Space:Space',
- 't' : '\u21e5:Tab', // right arrow to bar (used since this virtual keyboard works with one directional tabs)
- 'tab' : '\u21e5 Tab:Tab' // \u21b9 is the true tab symbol (left & right arrows)
- },
-
- // Message added to the key title while hovering, if the mousewheel plugin exists
- wheelMessage : 'Use mousewheel to see other keys',
-
- // Class added to the Accept and cancel buttons (originally 'ui-state-highlight')
- actionClass : 'ui-state-active',
-
- // *** Useability ***
- // Auto-accept content when clicking outside the keyboard (popup will close)
- autoAccept : false,
-
- // Prevents direct input in the preview window when true
- lockInput : false,
-
- // Prevent keys not in the displayed keyboard from being typed in
- restrictInput: false,
-
- // Prevent pasting content into the area
- preventPaste : false,
-
- // Set the max number of characters allowed in the input, setting it to false disables this option
- maxLength : false,
-
- // When the character is added to the input (clicking on the keyboard)
- keyBinding : 'mousedown',
-
- // combos (emulate dead keys : http://en.wikipedia.org/wiki/Keyboard_layout#US-International)
- // if user inputs `a the script converts it to à, ^o becomes ô, etc.
- useCombos : true,
- combos : {
- '`' : { a:"\u00e0", A:"\u00c0", e:"\u00e8", E:"\u00c8", i:"\u00ec", I:"\u00cc", o:"\u00f2", O:"\u00d2", u:"\u00f9", U:"\u00d9"},
- "'" : { a:"\u00e1", A:"\u00c1", e:"\u00e9", E:"\u00c9", i:"\u00ed", I:"\u00cd", o:"\u00f3", O:"\u00d3", u:"\u00fa", U:"\u00da", y:"\u00fd", Y:"\u00dd", c:"\u00e7", C:"\u00c7"},
- '"' : { a:"\u00e4", A:"\u00c4", e:"\u00eb", E:"\u00cb", i:"\u00ef", I:"\u00cf", o:"\u00f6", O:"\u00d6", u:"\u00fc", U:"\u00dc"},
- '^' : { a:"\u00e2", A:"\u00c2", e:"\u00ea", E:"\u00ca", i:"\u00ee", I:"\u00ce", o:"\u00f4", O:"\u00d4", u:"\u00fb", U:"\u00db"},
- '~' : { a:"\u00e3", A:"\u00c3", e:"\u1ebd", E:"\u1ebc", i:"\u0129", I:"\u0128", o:"\u00f5", O:"\u00d5", u:"\u0169", U:"\u0168", n:"\u00f1", N:"\u00d1"},
- 'a' : { e: '\u00e6' },
- 'A' : { E: '\u00c6' },
- 'o' : { e: '\u0153' },
- 'O' : { E: '\u0152' }
- },
-
- // *** Methods ***
- // Callbacks - attach a function to any of these callbacks as desired
- accepted : null,
- canceled : null,
- hidden : null,
- visible : null
-
- };
-
- $.fn.keyboard = function(options){
- return this.each(function(){
- (new $.keyboard(this, options));
- });
- };
-
- // This function breaks the chain, but returns
- // the keyboard if it has been attached to the object.
- $.fn.getkeyboard = function(){
- return this.data("keyboard");
- };
-
-})(jQuery);
-
-/*
- *
- * Copyright (c) 2010 C. F., Wong (<a href="http://cloudgen.w0ng.hk">Cloudgen Examplet Store</a>)
- * Licensed under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-(function($, len, createRange, duplicate){
-$.fn.caret = function(options,opt2) {
- var s, start, e, end, selRange, range, stored_range, te, val,
- selection = document.selection, t = this[0], sTop = t.scrollTop, browser = $.browser.msie;
- if (typeof(t) === 'undefined') { return; }
- if (typeof options === "number" && typeof opt2 === "number") {
- start = options;
- end = opt2;
- }
- if (typeof start !== "undefined") {
- if (browser){
- selRange = t.createTextRange();
- selRange.collapse(true);
- selRange.moveStart('character', start);
- selRange.moveEnd('character', end-start);
- selRange.select();
- } else {
- t.selectionStart=start;
- t.selectionEnd=end;
- }
- t.focus();
- t.scrollTop = sTop;
- return this;
- } else {
- if (browser) {
- if (t.tagName.toLowerCase() !== "textarea") {
- val = this.val();
- range = selection[createRange]()[duplicate]();
- range.moveEnd("character", val[len]);
- s = (range.text === "" ? val[len] : val.lastIndexOf(range.text));
- range = selection[createRange]()[duplicate]();
- range.moveStart("character", -val[len]);
- e = range.text[len];
- } else {
- range = selection[createRange]();
- stored_range = range[duplicate]();
- stored_range.moveToElementText(t);
- stored_range.setEndPoint('EndToEnd', range);
- s = stored_range.text[len] - range.text[len];
- e = s + range.text[len];
- }
- } else {
- s = t.selectionStart;
- e = t.selectionEnd;
- }
- te = t.value.substring(s,e);
- return { start : s, end : e, text : te, replace : function(st){
- return t.value.substring(0,s) + st + t.value.substring(e, t.value[len]);
- }};
- }
-};
-})(jQuery, "length", "createRange", "duplicate"); \ No newline at end of file
diff --git a/public/media/js/jquery.mousewheel.js b/public/media/js/jquery.mousewheel.js
deleted file mode 100644
index 94202f0..0000000
--- a/public/media/js/jquery.mousewheel.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
- *
- * $LastChangedDate: 2007-12-14 23:57:10 -0600 (Fri, 14 Dec 2007) $
- * $Rev: 4163 $
- *
- * Version: @VERSION
- *
- * Requires: $ 1.2.2+
- */
-
-(function($) {
-
-$.event.special.mousewheel = {
- setup: function() {
- var handler = $.event.special.mousewheel.handler;
-
- // Fix pageX, pageY, clientX and clientY for mozilla
- if ( $.browser.mozilla )
- $(this).bind('mousemove.mousewheel', function(event) {
- $.data(this, 'mwcursorposdata', {
- pageX: event.pageX,
- pageY: event.pageY,
- clientX: event.clientX,
- clientY: event.clientY
- });
- });
-
- if ( this.addEventListener )
- this.addEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
- else
- this.onmousewheel = handler;
- },
-
- teardown: function() {
- var handler = $.event.special.mousewheel.handler;
-
- $(this).unbind('mousemove.mousewheel');
-
- if ( this.removeEventListener )
- this.removeEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
- else
- this.onmousewheel = function(){};
-
- $.removeData(this, 'mwcursorposdata');
- },
-
- handler: function(event) {
- var args = Array.prototype.slice.call( arguments, 1 );
-
- event = $.event.fix(event || window.event);
- // Get correct pageX, pageY, clientX and clientY for mozilla
- $.extend( event, $.data(this, 'mwcursorposdata') || {} );
- var delta = 0, returnValue = true;
-
- if ( event.wheelDelta ) delta = event.wheelDelta/120;
- if ( event.detail ) delta = -event.detail/3;
- if ( $.browser.opera ) delta = -event.wheelDelta;
-
- event.data = event.data || {};
- event.type = "mousewheel";
-
- // Add delta to the front of the arguments
- args.unshift(delta);
- // Add event to the front of the arguments
- args.unshift(event);
-
- return $.event.handle.apply(this, args);
- }
-};
-
-$.fn.extend({
- mousewheel: function(fn) {
- return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
- },
-
- unmousewheel: function(fn) {
- return this.unbind("mousewheel", fn);
- }
-});
-
-})(jQuery); \ No newline at end of file
diff --git a/public/media/js/keyboard.js b/public/media/js/keyboard.js
new file mode 100644
index 0000000..7c0a4e5
--- /dev/null
+++ b/public/media/js/keyboard.js
@@ -0,0 +1,1793 @@
+/* ********************************************************************
+ **********************************************************************
+ * HTML Virtual Keyboard Interface Script - v1.47
+ * Copyright (c) 2011 - GreyWyvern
+ *
+ * - Licenced for free distribution under the BSDL
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * Add a script-driven keyboard interface to text fields, password
+ * fields and textareas.
+ *
+ * See http://www.greywyvern.com/code/javascript/keyboard for examples
+ * and usage instructions.
+ *
+ * Version 1.47 - April 18, 2011
+ * - Clicking focused input opens keyboard in imageless mode
+ * - Add option to disable submitting form when pressing Enter (tommarracci)
+ *
+ * See full changelog at:
+ * http://www.greywyvern.com/code/javascript/keyboard.changelog.txt
+ *
+ * Keyboard Credits
+ * - Yiddish (Yidish Lebt) keyboard layout by Simche Taub (jidysz.net)
+ * - Urdu Phonetic keyboard layout by Khalid Malik
+ * - Yiddish keyboard layout by Helmut Wollmersdorfer
+ * - Khmer keyboard layout by Sovann Heng (km-kh.com)
+ * - Dari keyboard layout by Saif Fazel
+ * - Kurdish keyboard layout by Ara Qadir
+ * - Assamese keyboard layout by Kanchan Gogoi
+ * - Bulgarian BDS keyboard layout by Milen Georgiev
+ * - Basic Japanese Hiragana/Katakana keyboard layout by Damjan
+ * - Ukrainian keyboard layout by Dmitry Nikitin
+ * - Macedonian keyboard layout by Damjan Dimitrioski
+ * - Pashto keyboard layout by Ahmad Wali Achakzai (qamosona.com)
+ * - Armenian Eastern and Western keyboard layouts by Hayastan Project (www.hayastan.co.uk)
+ * - Pinyin keyboard layout from a collaboration with Lou Winklemann
+ * - Kazakh keyboard layout by Alex Madyankin
+ * - Danish keyboard layout by Verner Kjærsgaard
+ * - Slovak keyboard layout by Daniel Lara (www.learningslovak.com)
+ * - Belarusian and Serbian Cyrillic keyboard layouts by Evgeniy Titov
+ * - Bulgarian Phonetic keyboard layout by Samuil Gospodinov
+ * - Swedish keyboard layout by Håkan Sandberg
+ * - Romanian keyboard layout by Aurel
+ * - Farsi (Persian) keyboard layout by Kaveh Bakhtiyari (www.bakhtiyari.com)
+ * - Burmese keyboard layout by Cetanapa
+ * - Bosnian/Croatian/Serbian Latin/Slovenian keyboard layout by Miran Zeljko
+ * - Hungarian keyboard layout by Antal Sall 'Hiromacu'
+ * - Arabic keyboard layout by Srinivas Reddy
+ * - Italian and Spanish (Spain) keyboard layouts by dictionarist.com
+ * - Lithuanian and Russian keyboard layouts by Ramunas
+ * - German keyboard layout by QuHno
+ * - French keyboard layout by Hidden Evil
+ * - Polish Programmers layout by moose
+ * - Turkish keyboard layouts by offcu
+ * - Dutch and US Int'l keyboard layouts by jerone
+ *
+ */
+var VKI_attach, VKI_close;
+(function() {
+ var self = this;
+
+ this.VKI_version = "";
+ this.VKI_showVersion = true;
+ this.VKI_target = false;
+ this.VKI_shift = this.VKI_shiftlock = false;
+ this.VKI_altgr = this.VKI_altgrlock = false;
+ this.VKI_dead = false;
+ this.VKI_deadBox = true; // Show the dead keys checkbox
+ this.VKI_deadkeysOn = false; // Turn dead keys on by default
+ this.VKI_numberPad = true; // Allow user to open and close the number pad
+ this.VKI_numberPadOn = false; // Show number pad by default
+ this.VKI_kts = this.VKI_kt = "Deutsch"; // Default keyboard layout
+ this.VKI_langAdapt = true; // Use lang attribute of input to select keyboard
+ this.VKI_size = 3; // Default keyboard size (1-5)
+ this.VKI_sizeAdj = true; // Allow user to adjust keyboard size
+ this.VKI_clearPasswords = false; // Clear password fields on focus
+ this.VKI_imageURI = "/media/img/keyboard.png"; // If empty string, use imageless mode
+ this.VKI_clickless = 0; // 0 = disabled, > 0 = delay in ms
+ this.VKI_activeTab = 0; // Tab moves to next: 1 = element, 2 = keyboard enabled element
+ this.VKI_enterSubmit = true; // Submit forms when Enter is pressed
+ this.VKI_keyCenter = 3;
+
+ this.VKI_isIE = /*@cc_on!@*/false;
+ this.VKI_isIE6 = /*@if(@_jscript_version == 5.6)!@end@*/false;
+ this.VKI_isIElt8 = /*@if(@_jscript_version < 5.8)!@end@*/false;
+ this.VKI_isWebKit = RegExp("KHTML").test(navigator.userAgent);
+ this.VKI_isOpera = RegExp("Opera").test(navigator.userAgent);
+ this.VKI_isMoz = (!this.VKI_isWebKit && navigator.product == "Gecko");
+
+ /* ***** i18n text strings ************************************* */
+ this.VKI_i18n = {
+ '00': "Display Number Pad",
+ '01': "Display virtual keyboard interface",
+ '02': "Select keyboard layout",
+ '03': "Dead keys",
+ '04': "On",
+ '05': "Off",
+ '06': "Close the keyboard",
+ '07': "Clear",
+ '08': "Clear this input",
+ '09': "Version",
+ '10': "Decrease keyboard size",
+ '11': "Increase keyboard size"
+ };
+
+
+ /* ***** Create keyboards ************************************** */
+ this.VKI_layout = {};
+
+ // - Lay out each keyboard in rows of sub-arrays. Each sub-array
+ // represents one key.
+ //
+ // - Each sub-array consists of four slots described as follows:
+ // example: ["a", "A", "\u00e1", "\u00c1"]
+ //
+ // a) Normal character
+ // A) Character + Shift/Caps
+ // \u00e1) Character + Alt/AltGr/AltLk
+ // \u00c1) Character + Shift/Caps + Alt/AltGr/AltLk
+ //
+ // You may include sub-arrays which are fewer than four slots.
+ // In these cases, the missing slots will be blanked when the
+ // corresponding modifier key (Shift or AltGr) is pressed.
+ //
+ // - If the second slot of a sub-array matches one of the following
+ // strings:
+ // "Tab", "Caps", "Shift", "Enter", "Bksp",
+ // "Alt" OR "AltGr", "AltLk"
+ // then the function of the key will be the following,
+ // respectively:
+ // - Insert a tab
+ // - Toggle Caps Lock (technically a Shift Lock)
+ // - Next entered character will be the shifted character
+ // - Insert a newline (textarea), or close the keyboard
+ // - Delete the previous character
+ // - Next entered character will be the alternate character
+ // - Toggle Alt/AltGr Lock
+ //
+ // The first slot of this sub-array will be the text to display
+ // on the corresponding key. This allows for easy localisation
+ // of key names.
+ //
+ // - Layout dead keys (diacritic + letter) should be added as
+ // property/value pairs of objects with hash keys equal to the
+ // diacritic. See the "this.VKI_deadkey" object below the layout
+ // definitions. In each property/value pair, the value is what
+ // the diacritic would change the property name to.
+ //
+ // - Note that any characters beyond the normal ASCII set should be
+ // entered in escaped Unicode format. (eg \u00a3 = Pound symbol)
+ // You can find Unicode values for characters here:
+ // http://unicode.org/charts/
+ //
+ // - To remove a keyboard, just delete it, or comment it out of the
+ // source code. If you decide to remove the US International
+ // keyboard layout, make sure you change the default layout
+ // (this.VKI_kt) above so it references an existing layout.
+
+ this.VKI_layout['\u0627\u0644\u0639\u0631\u0628\u064a\u0629'] = {
+ 'name': "Arabic", 'keys': [
+ [["\u0630", "\u0651 "], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0636", "\u064e"], ["\u0635", "\u064b"], ["\u062b", "\u064f"], ["\u0642", "\u064c"], ["\u0641", "\u0644"], ["\u063a", "\u0625"], ["\u0639", "\u2018"], ["\u0647", "\u00f7"], ["\u062e", "\u00d7"], ["\u062d", "\u061b"], ["\u062c", "<"], ["\u062f", ">"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u0634", "\u0650"], ["\u0633", "\u064d"], ["\u064a", "]"], ["\u0628", "["], ["\u0644", "\u0644"], ["\u0627", "\u0623"], ["\u062a", "\u0640"], ["\u0646", "\u060c"], ["\u0645", "/"], ["\u0643", ":"], ["\u0637", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0626", "~"], ["\u0621", "\u0652"], ["\u0624", "}"], ["\u0631", "{"], ["\u0644", "\u0644"], ["\u0649", "\u0622"], ["\u0629", "\u2019"], ["\u0648", ","], ["\u0632", "."], ["\u0638", "\u061f"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["ar"] };
+
+ this.VKI_layout['\u0985\u09b8\u09ae\u09c0\u09df\u09be'] = {
+ 'name': "Assamese", 'keys': [
+ [["+", "?"], ["\u09E7", "{", "\u09E7"], ["\u09E8", "}", "\u09E8"], ["\u09E9", "\u09CD\u09F0", "\u09E9"], ["\u09EA", "\u09F0\u09CD", "\u09EA"], ["\u09EB", "\u099C\u09CD\u09F0", "\u09EB"], ["\u09EC", "\u0995\u09CD\u09B7", "\u09EC"], ["\u09ED", "\u0995\u09CD\u09F0", "\u09ED"], ["\u09EE", "\u09B6\u09CD\u09F0", "\u09EE"], ["\u09EF", "(", "\u09EF"], ["\u09E6", ")", "\u09E6"], ["-", ""], ["\u09C3", "\u098B", "\u09E2", "\u09E0"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u09CC", "\u0994", "\u09D7"], ["\u09C8", "\u0990"], ["\u09BE", "\u0986"], ["\u09C0", "\u0988", "\u09E3", "\u09E1"], ["\u09C2", "\u098A"], ["\u09F1", "\u09AD"], ["\u09B9", "\u0999"], ["\u0997", "\u0998"], ["\u09A6", "\u09A7"], ["\u099C", "\u099D"], ["\u09A1", "\u09A2", "\u09DC", "\u09DD"], ["Enter", "Enter"]],
+ [["Caps", "Caps"], ["\u09CB", "\u0993", "\u09F4", "\u09F5"], ["\u09C7", "\u098F", "\u09F6", "\u09F7"], ["\u09CD", "\u0985", "\u09F8", "\u09F9"], ["\u09BF", "\u0987", "\u09E2", "\u098C"], ["\u09C1", "\u0989"], ["\u09AA", "\u09AB"], ["\u09F0", "", "\u09F0", "\u09F1"], ["\u0995", "\u0996"], ["\u09A4", "\u09A5"], ["\u099A", "\u099B"], ["\u099F", "\u09A0"], ["\u09BC", "\u099E"]],
+ [["Shift", "Shift"], ["\u09CE", "\u0983"], ["\u0982", "\u0981", "\u09FA"], ["\u09AE", "\u09A3"], ["\u09A8", "\u09F7"], ["\u09AC", "\""], ["\u09B2", "'"], ["\u09B8", "\u09B6"], [",", "\u09B7"], [".", ";"], ["\u09AF", "\u09DF"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["as"] };
+
+ this.VKI_layout['\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d\u04b9\u0430'] = {
+ 'name': "Azerbaijani Cyrillic", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0458", "\u0408"], ["\u04AF", "\u04AE"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u04BB", "\u04BA"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u04B9", "\u04B8"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u049D", "\u049C"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|"], ["\u04D9", "\u04D8"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u0493", "\u0492"], ["\u0431", "\u0411"], ["\u04E9", "\u04E8"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["az-Cyrl"] };
+
+ this.VKI_layout['Az\u0259rbaycanca'] = {
+ 'name': "Azerbaijani Latin", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", '"'], ["3", "\u2166"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["\u00FC", "\u00DC"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "\u0130"], ["o", "O"], ["p", "P"], ["\u00F6", "\u00D6"], ["\u011F", "\u011E"], ["\\", "/"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u0131", "I"], ["\u0259", "\u018F"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], ["\u00E7", "\u00C7"], ["\u015F", "\u015E"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["az"] };
+
+ this.VKI_layout['\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f'] = {
+ 'name': "Belarusian", 'keys': [
+ [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043a", "\u041a"], ["\u0435", "\u0415"], ["\u043d", "\u041d"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u045e", "\u040e"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["'", "'"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044b", "\u042b"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043f", "\u041f"], ["\u0440", "\u0420"], ["\u043e", "\u041e"], ["\u043b", "\u041b"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044d", "\u042d"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["/", "|"], ["\u044f", "\u042f"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043c", "\u041c"], ["\u0456", "\u0406"], ["\u0442", "\u0422"], ["\u044c", "\u042c"], ["\u0431", "\u0411"], ["\u044e", "\u042e"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["be"] };
+
+ this.VKI_layout['Belgische / Belge'] = {
+ 'name': "Belgian", 'keys': [
+ [["\u00b2", "\u00b3"], ["&", "1", "|"], ["\u00e9", "2", "@"], ['"', "3", "#"], ["'", "4"], ["(", "5"], ["\u00a7", "6", "^"], ["\u00e8", "7"], ["!", "8"], ["\u00e7", "9", "{"], ["\u00e0", "0", "}"], [")", "\u00b0"], ["-", "_"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["a", "A"], ["z", "Z"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["^", "\u00a8", "["], ["$", "*", "]"], ["\u03bc", "\u00a3", "`"]],
+ [["Caps", "Caps"], ["q", "Q"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["m", "M"], ["\u00f9", "%", "\u00b4"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\\"], ["w", "W"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], [",", "?"], [";", "."], [":", "/"], ["=", "+", "~"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["nl-BE", "fr-BE"] };
+
+ this.VKI_layout['\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0424\u043e\u043d\u0435\u0442\u0438\u0447\u0435\u043d'] = {
+ 'name': "Bulgarian Phonetic", 'keys': [
+ [["\u0447", "\u0427"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u044F", "\u042F"], ["\u0432", "\u0412"], ["\u0435", "\u0415"], ["\u0440", "\u0420"], ["\u0442", "\u0422"], ["\u044A", "\u042A"], ["\u0443", "\u0423"], ["\u0438", "\u0418"], ["\u043E", "\u041E"], ["\u043F", "\u041F"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u044E", "\u042E"]],
+ [["Caps", "Caps"], ["\u0430", "\u0410"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0444", "\u0424"], ["\u0433", "\u0413"], ["\u0445", "\u0425"], ["\u0439", "\u0419"], ["\u043A", "\u041A"], ["\u043B", "\u041B"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0437", "\u0417"], ["\u044C", "\u042C"], ["\u0446", "\u0426"], ["\u0436", "\u0416"], ["\u0431", "\u0411"], ["\u043D", "\u041D"], ["\u043C", "\u041C"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["bg"] };
+
+ this.VKI_layout['\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438'] = {
+ 'name': "Bulgarian BDS", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "?"], ["3", "+"], ["4", '"'], ["5", "%"], ["6", "="], ["7", ":"], ["8", "/"], ["9", "_"], ["0", "\u2116"], ["-", "\u0406"], ["=", "V"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], [",", "\u044b"], ["\u0443", "\u0423"], ["\u0435", "\u0415"], ["\u0438", "\u0418"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u043a", "\u041a"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0437", "\u0417"], ["\u0446", "\u0426"], [";", "\u00a7"], ["(", ")"]],
+ [["Caps", "Caps"], ["\u044c", "\u042c"], ["\u044f", "\u042f"], ["\u0430", "\u0410"], ["\u043e", "\u041e"], ["\u0436", "\u0416"], ["\u0433", "\u0413"], ["\u0442", "\u0422"], ["\u043d", "\u041d"], ["\u0412", "\u0412"], ["\u043c", "\u041c"], ["\u0447", "\u0427"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u042e", "\u044e"], ["\u0439", "\u0419"], ["\u044a", "\u042a"], ["\u044d", "\u042d"], ["\u0444", "\u0424"], ["\u0445", "\u0425"], ["\u043f", "\u041f"], ["\u0440", "\u0420"], ["\u043b", "\u041b"], ["\u0431", "\u0411"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ]};
+
+ this.VKI_layout['\u09ac\u09be\u0982\u09b2\u09be'] = {
+ 'name': "Bengali", 'keys': [
+ [[""], ["1", "", "\u09E7"], ["2", "", "\u09E8"], ["3", "\u09CD\u09B0", "\u09E9"], ["4", "\u09B0\u09CD", "\u09EA"], ["5", "\u099C\u09CD\u09B0", "\u09EB"], ["6", "\u09A4\u09CD\u09B7", "\u09EC"], ["7", "\u0995\u09CD\u09B0", "\u09ED"], ["8", "\u09B6\u09CD\u09B0", "\u09EE"], ["9", "(", "\u09EF"], ["0", ")", "\u09E6"], ["-", "\u0983"], ["\u09C3", "\u098B", "\u09E2", "\u09E0"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u09CC", "\u0994", "\u09D7"], ["\u09C8", "\u0990"], ["\u09BE", "\u0986"], ["\u09C0", "\u0988", "\u09E3", "\u09E1"], ["\u09C2", "\u098A"], ["\u09AC", "\u09AD"], ["\u09B9", "\u0999"], ["\u0997", "\u0998"], ["\u09A6", "\u09A7"], ["\u099C", "\u099D"], ["\u09A1", "\u09A2", "\u09DC", "\u09DD"], ["Enter", "Enter"]],
+ [["Caps", "Caps"], ["\u09CB", "\u0993", "\u09F4", "\u09F5"], ["\u09C7", "\u098F", "\u09F6", "\u09F7"], ["\u09CD", "\u0985", "\u09F8", "\u09F9"], ["\u09BF", "\u0987", "\u09E2", "\u098C"], ["\u09C1", "\u0989"], ["\u09AA", "\u09AB"], ["\u09B0", "", "\u09F0", "\u09F1"], ["\u0995", "\u0996"], ["\u09A4", "\u09A5"], ["\u099A", "\u099B"], ["\u099F", "\u09A0"], ["\u09BC", "\u099E"]],
+ [["Shift", "Shift"], [""], ["\u0982", "\u0981", "\u09FA"], ["\u09AE", "\u09A3"], ["\u09A8"], ["\u09AC"], ["\u09B2"], ["\u09B8", "\u09B6"], [",", "\u09B7"], [".", "{"], ["\u09AF", "\u09DF"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["bn"] };
+
+ this.VKI_layout['Bosanski'] = {
+ 'name': "Bosnian", 'keys': [
+ [["\u00B8", "\u00A8"], ["1", "!", "~"], ["2", '"', "\u02C7"], ["3", "#", "^"], ["4", "$", "\u02D8"], ["5", "%", "\u00B0"], ["6", "&", "\u02DB"], ["7", "/", "`"], ["8", "(", "\u02D9"], ["9", ")", "\u00B4"], ["0", "=", "\u02DD"], ["'", "?", "\u00A8"], ["+", "*", "\u00B8"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u0161", "\u0160", "\u00F7"], ["\u0111", "\u0110", "\u00D7"], ["\u017E", "\u017D", "\u00A4"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J"], ["k", "K", "\u0142"], ["l", "L", "\u0141"], ["\u010D", "\u010C"], ["\u0107", "\u0106", "\u00DF"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "\u00A7"], [",", ";", "<"], [".", ":", ">"], ["-", "_", "\u00A9"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["bs"] };
+
+ this.VKI_layout['Canadienne-fran\u00e7aise'] = {
+ 'name': "Canadian French", 'keys': [
+ [["#", "|", "\\"], ["1", "!", "\u00B1"], ["2", '"', "@"], ["3", "/", "\u00A3"], ["4", "$", "\u00A2"], ["5", "%", "\u00A4"], ["6", "?", "\u00AC"], ["7", "&", "\u00A6"], ["8", "*", "\u00B2"], ["9", "(", "\u00B3"], ["0", ")", "\u00BC"], ["-", "_", "\u00BD"], ["=", "+", "\u00BE"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O", "\u00A7"], ["p", "P", "\u00B6"], ["^", "^", "["], ["\u00B8", "\u00A8", "]"], ["<", ">", "}"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":", "~"], ["`", "`", "{"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u00AB", "\u00BB", "\u00B0"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00B5"], [",", "'", "\u00AF"], [".", ".", "\u00AD"], ["\u00E9", "\u00C9", "\u00B4"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["fr-CA"] };
+
+ this.VKI_layout['\u010cesky'] = {
+ 'name': "Czech", 'keys': [
+ [[";", "\u00b0", "`", "~"], ["+", "1", "!"], ["\u011B", "2", "@"], ["\u0161", "3", "#"], ["\u010D", "4", "$"], ["\u0159", "5", "%"], ["\u017E", "6", "^"], ["\u00FD", "7", "&"], ["\u00E1", "8", "*"], ["\u00ED", "9", "("], ["\u00E9", "0", ")"], ["=", "%", "-", "_"], ["\u00B4", "\u02c7", "=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00FA", "/", "[", "{"], [")", "(", "]", "}"], ["\u00A8", "'", "\\", "|"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u016F", '"', ";", ":"], ["\u00A7", "!", "\u00a4", "^"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|", "", "\u02dd"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "?", "<", "\u00d7"], [".", ":", ">", "\u00f7"], ["-", "_", "/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["cs"] };
+
+ this.VKI_layout['Dansk'] = {
+ 'name': "Danish", 'keys': [
+ [["\u00bd", "\u00a7"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "\u00a4", "$"], ["5", "%", "\u20ac"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?"], ["\u00b4", "`", "|"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e5", "\u00c5"], ["\u00a8", "^", "~"], ["'", "*"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00e6", "\u00c6"], ["\u00f8", "\u00d8"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\\"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u03bc", "\u039c"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["da"] };
+
+ this.VKI_layout['Deutsch'] = {
+ 'name': "German", 'keys': [
+ [["^", "\u00b0"], ["1", "!"], ["2", '"', "\u00b2"], ["3", "\u00a7", "\u00b3"], ["4", "$"], ["5", "%"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["\u00df", "?", "\\"], ["\u00b4", "`"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "@"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00fc", "\u00dc"], ["+", "*", "~"], ["#", "'"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f6", "\u00d6"], ["\u00e4", "\u00c4"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\u00a6"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00b5"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["de"] };
+
+ this.VKI_layout['Dingbats'] = {
+ 'name': "Dingbats", 'keys': [
+ [["\u2764", "\u2765", "\u2766", "\u2767"], ["\u278a", "\u2780", "\u2776", "\u2768"], ["\u278b", "\u2781", "\u2777", "\u2769"], ["\u278c", "\u2782", "\u2778", "\u276a"], ["\u278d", "\u2783", "\u2779", "\u276b"], ["\u278e", "\u2784", "\u277a", "\u276c"], ["\u278f", "\u2785", "\u277b", "\u276d"], ["\u2790", "\u2786", "\u277c", "\u276e"], ["\u2791", "\u2787", "\u277d", "\u276f"], ["\u2792", "\u2788", "\u277e", "\u2770"], ["\u2793", "\u2789", "\u277f", "\u2771"], ["\u2795", "\u2796", "\u274c", "\u2797"], ["\u2702", "\u2704", "\u2701", "\u2703"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u2714", "\u2705", "\u2713"], ["\u2718", "\u2715", "\u2717", "\u2716"], ["\u271a", "\u2719", "\u271b", "\u271c"], ["\u271d", "\u271e", "\u271f", "\u2720"], ["\u2722", "\u2723", "\u2724", "\u2725"], ["\u2726", "\u2727", "\u2728", "\u2756"], ["\u2729", "\u272a", "\u272d", "\u2730"], ["\u272c", "\u272b", "\u272e", "\u272f"], ["\u2736", "\u2731", "\u2732", "\u2749"], ["\u273b", "\u273c", "\u273d", "\u273e"], ["\u2744", "\u2745", "\u2746", "\u2743"], ["\u2733", "\u2734", "\u2735", "\u2721"], ["\u2737", "\u2738", "\u2739", "\u273a"]],
+ [["Caps", "Caps"], ["\u2799", "\u279a", "\u2798", "\u2758"], ["\u27b5", "\u27b6", "\u27b4", "\u2759"], ["\u27b8", "\u27b9", "\u27b7", "\u275a"], ["\u2794", "\u279c", "\u27ba", "\u27bb"], ["\u279d", "\u279e", "\u27a1", "\u2772"], ["\u27a9", "\u27aa", "\u27ab", "\u27ac"], ["\u27a4", "\u27a3", "\u27a2", "\u279b"], ["\u27b3", "\u27bc", "\u27bd", "\u2773"], ["\u27ad", "\u27ae", "\u27af", "\u27b1"], ["\u27a8", "\u27a6", "\u27a5", "\u27a7"], ["\u279f", "\u27a0", "\u27be", "\u27b2"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u270c", "\u270b", "\u270a", "\u270d"], ["\u274f", "\u2750", "\u2751", "\u2752"], ["\u273f", "\u2740", "\u2741", "\u2742"], ["\u2747", "\u2748", "\u274a", "\u274b"], ["\u2757", "\u2755", "\u2762", "\u2763"], ["\u2753", "\u2754", "\u27b0", "\u27bf"], ["\u270f", "\u2710", "\u270e", "\u2774"], ["\u2712", "\u2711", "\u274d", "\u274e"], ["\u2709", "\u2706", "\u2708", "\u2707"], ["\u275b", "\u275d", "\u2761", "\u2775"], ["\u275c", "\u275e", "\u275f", "\u2760"], ["Shift", "Shift"]],
+ [["AltLk", "AltLk"], [" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ]};
+
+ this.VKI_layout['\u078b\u07a8\u0788\u07ac\u0780\u07a8\u0784\u07a6\u0790\u07b0'] = {
+ 'name': "Divehi", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u07ab", "\u00d7"], ["\u07ae", "\u2019"], ["\u07a7", "\u201c"], ["\u07a9", "/"], ["\u07ad", ":"], ["\u078e", "\u07a4"], ["\u0783", "\u079c"], ["\u0789", "\u07a3"], ["\u078c", "\u07a0"], ["\u0780", "\u0799"], ["\u078d", "\u00f7"], ["[", "{"], ["]", "}"]],
+ [["Caps", "Caps"], ["\u07a8", "<"], ["\u07aa", ">"], ["\u07b0", ".", ",", ","], ["\u07a6", "\u060c"], ["\u07ac", '"'], ["\u0788", "\u07a5"], ["\u0787", "\u07a2"], ["\u0782", "\u0798"], ["\u0786", "\u079a"], ["\u078a", "\u07a1"], ["\ufdf2", "\u061b", ";", ";"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|"], ["\u0792", "\u0796"], ["\u0791", "\u0795"], ["\u0790", "\u078f"], ["\u0794", "\u0797", "\u200D"], ["\u0785", "\u079f", "\u200C"], ["\u078b", "\u079b", "\u200E"], ["\u0784", "\u079D", "\u200F"], ["\u0781", "\\"], ["\u0793", "\u079e"], ["\u07af", "\u061f"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["dv"] };
+
+ this.VKI_layout['Dvorak'] = {
+ 'name': "Dvorak", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["[", "{"], ["]", "}"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["'", '"'], [",", "<"], [".", ">"], ["p", "P"], ["y", "Y"], ["f", "F"], ["g", "G"], ["c", "C"], ["r", "R"], ["l", "L"], ["/", "?"], ["=", "+"], ["\\", "|"]],
+ [["Caps", "Caps"], ["a", "A"], ["o", "O"], ["e", "E"], ["u", "U"], ["i", "I"], ["d", "D"], ["h", "H"], ["t", "T"], ["n", "N"], ["s", "S"], ["-", "_"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], [";", ":"], ["q", "Q"], ["j", "J"], ["k", "K"], ["x", "X"], ["b", "B"], ["m", "M"], ["w", "W"], ["v", "V"], ["z", "Z"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ]};
+
+ this.VKI_layout['\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac'] = {
+ 'name': "Greek", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a3"], ["5", "%", "\u00a7"], ["6", "^", "\u00b6"], ["7", "&"], ["8", "*", "\u00a4"], ["9", "(", "\u00a6"], ["0", ")", "\u00ba"], ["-", "_", "\u00b1"], ["=", "+", "\u00bd"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], [";", ":"], ["\u03c2", "^"], ["\u03b5", "\u0395"], ["\u03c1", "\u03a1"], ["\u03c4", "\u03a4"], ["\u03c5", "\u03a5"], ["\u03b8", "\u0398"], ["\u03b9", "\u0399"], ["\u03bf", "\u039f"], ["\u03c0", "\u03a0"], ["[", "{", "\u201c"], ["]", "}", "\u201d"], ["\\", "|", "\u00ac"]],
+ [["Caps", "Caps"], ["\u03b1", "\u0391"], ["\u03c3", "\u03a3"], ["\u03b4", "\u0394"], ["\u03c6", "\u03a6"], ["\u03b3", "\u0393"], ["\u03b7", "\u0397"], ["\u03be", "\u039e"], ["\u03ba", "\u039a"], ["\u03bb", "\u039b"], ["\u0384", "\u00a8", "\u0385"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["\u03b6", "\u0396"], ["\u03c7", "\u03a7"], ["\u03c8", "\u03a8"], ["\u03c9", "\u03a9"], ["\u03b2", "\u0392"], ["\u03bd", "\u039d"], ["\u03bc", "\u039c"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["el"] };
+
+ this.VKI_layout['Eesti'] = {
+ 'name': "Estonian", 'keys': [
+ [["\u02C7", "~"], ["1", "!"], ["2", '"', "@", "@"], ["3", "#", "\u00A3", "\u00A3"], ["4", "\u00A4", "$", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{", "{"], ["8", "(", "[", "["], ["9", ")", "]", "]"], ["0", "=", "}", "}"], ["+", "?", "\\", "\\"], ["\u00B4", "`"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00FC", "\u00DC"], ["\u00F5", "\u00D5", "\u00A7", "\u00A7"], ["'", "*", "\u00BD", "\u00BD"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0161", "\u0160"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00F6", "\u00D6"], ["\u00E4", "\u00C4", "^", "^"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "|", "|"], ["z", "Z", "\u017E", "\u017D"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["et"] };
+
+ this.VKI_layout['Espa\u00f1ol'] = {
+ 'name': "Spanish", 'keys': [
+ [["\u00ba", "\u00aa", "\\"], ["1", "!", "|"], ["2", '"', "@"], ["3", "'", "#"], ["4", "$", "~"], ["5", "%", "\u20ac"], ["6", "&", "\u00ac"], ["7", "/"], ["8", "("], ["9", ")"], ["0", "="], ["'", "?"], ["\u00a1", "\u00bf"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["`", "^", "["], ["+", "*", "]"], ["\u00e7", "\u00c7", "}"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f1", "\u00d1"], ["\u00b4", "\u00a8", "{"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["es"] };
+
+ this.VKI_layout['\u062f\u0631\u06cc'] = {
+ 'name': "Dari", 'keys': [
+ [["\u200D", "\u00F7", "~"], ["\u06F1", "!", "`"], ["\u06F2", "\u066C", "@"], ["\u06F3", "\u066B", "#"], ["\u06F4", "\u060B", "$"], ["\u06F5", "\u066A", "%"], ["\u06F6", "\u00D7", "^"], ["\u06F7", "\u060C", "&"], ["\u06F8", "*", "\u2022"], ["\u06F9", ")", "\u200E"], ["\u06F0", "(", "\u200F"], ["-", "\u0640", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0636", "\u0652", "\u00B0"], ["\u0635", "\u064C"], ["\u062B", "\u064D", "\u20AC"], ["\u0642", "\u064B", "\uFD3E"], ["\u0641", "\u064F", "\uFD3F"], ["\u063A", "\u0650", "\u0656"], ["\u0639", "\u064E", "\u0659"], ["\u0647", "\u0651", "\u0655"], ["\u062E", "]", "'"], ["\u062D", "[", '"'], ["\u062C", "}", "\u0681"], ["\u0686", "{", "\u0685"], ["\\", "|", "?"]],
+ [["Caps", "Caps"], ["\u0634", "\u0624", "\u069A"], ["\u0633", "\u0626", "\u06CD"], ["\u06CC", "\u064A", "\u0649"], ["\u0628", "\u0625", "\u06D0"], ["\u0644", "\u0623", "\u06B7"], ["\u0627", "\u0622", "\u0671"], ["\u062A", "\u0629", "\u067C"], ["\u0646", "\u00BB", "\u06BC"], ["\u0645", "\u00AB", "\u06BA"], ["\u06A9", ":", ";"], ["\u06AF", "\u061B", "\u06AB"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0638", "\u0643", "\u06D2"], ["\u0637", "\u0653", "\u0691"], ["\u0632", "\u0698", "\u0696"], ["\u0631", "\u0670", "\u0693"], ["\u0630", "\u200C", "\u0688"], ["\u062F", "\u0654", "\u0689"], ["\u067E", "\u0621", "\u0679"], ["\u0648", ">", ","], [".", "<", "\u06C7"], ["/", "\u061F", "\u06C9"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["fa-AF"] };
+
+ this.VKI_layout['\u0641\u0627\u0631\u0633\u06cc'] = {
+ 'name': "Farsi", 'keys': [
+ [["\u067e", "\u0651 "], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0636", "\u064e"], ["\u0635", "\u064b"], ["\u062b", "\u064f"], ["\u0642", "\u064c"], ["\u0641", "\u0644"], ["\u063a", "\u0625"], ["\u0639", "\u2018"], ["\u0647", "\u00f7"], ["\u062e", "\u00d7"], ["\u062d", "\u061b"], ["\u062c", "<"], ["\u0686", ">"], ["\u0698", "|"]],
+ [["Caps", "Caps"], ["\u0634", "\u0650"], ["\u0633", "\u064d"], ["\u064a", "]"], ["\u0628", "["], ["\u0644", "\u0644"], ["\u0627", "\u0623"], ["\u062a", "\u0640"], ["\u0646", "\u060c"], ["\u0645", "\\"], ["\u06af", ":"], ["\u0643", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0638", "~"], ["\u0637", "\u0652"], ["\u0632", "}"], ["\u0631", "{"], ["\u0630", "\u0644"], ["\u062f", "\u0622"], ["\u0626", "\u0621"], ["\u0648", ","], [".", "."], ["/", "\u061f"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["fa"] };
+
+ this.VKI_layout['F\u00f8royskt'] = {
+ 'name': "Faeroese", 'keys': [
+ [["\u00BD", "\u00A7"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00A3"], ["4", "\u00A4", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?"], ["\u00B4", "`", "|"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00E5", "\u00C5", "\u00A8"], ["\u00F0", "\u00D0", "~"], ["'", "*"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00E6", "\u00C6"], ["\u00F8", "\u00D8", "^"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\\"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00B5"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["fo"] };
+
+ this.VKI_layout['Fran\u00e7ais'] = {
+ 'name': "French", 'keys': [
+ [["\u00b2", "\u00b3"], ["&", "1"], ["\u00e9", "2", "~"], ['"', "3", "#"], ["'", "4", "{"], ["(", "5", "["], ["-", "6", "|"], ["\u00e8", "7", "`"], ["_", "8", "\\"], ["\u00e7", "9", "^"], ["\u00e0", "0", "@"], [")", "\u00b0", "]"], ["=", "+", "}"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["a", "A"], ["z", "Z"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["^", "\u00a8"], ["$", "\u00a3", "\u00a4"], ["*", "\u03bc"]],
+ [["Caps", "Caps"], ["q", "Q"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["m", "M"], ["\u00f9", "%"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["w", "W"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], [",", "?"], [";", "."], [":", "/"], ["!", "\u00a7"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["fr"] };
+
+ this.VKI_layout['Gaeilge'] = {
+ 'name': "Irish / Gaelic", 'keys': [
+ [["`", "\u00AC", "\u00A6", "\u00A6"], ["1", "!"], ["2", '"'], ["3", "\u00A3"], ["4", "$", "\u20AC"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u00E9", "\u00C9"], ["r", "R"], ["t", "T"], ["y", "Y", "\u00FD", "\u00DD"], ["u", "U", "\u00FA", "\u00DA"], ["i", "I", "\u00ED", "\u00CD"], ["o", "O", "\u00F3", "\u00D3"], ["p", "P"], ["[", "{"], ["]", "}"], ["#", "~"]],
+ [["Caps", "Caps"], ["a", "A", "\u00E1", "\u00C1"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", "@", "\u00B4", "`"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["ga", "gd"] };
+
+ this.VKI_layout['\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0'] = {
+ 'name': "Gujarati", 'keys': [
+ [[""], ["1", "\u0A8D", "\u0AE7"], ["2", "\u0AC5", "\u0AE8"], ["3", "\u0ACD\u0AB0", "\u0AE9"], ["4", "\u0AB0\u0ACD", "\u0AEA"], ["5", "\u0A9C\u0ACD\u0A9E", "\u0AEB"], ["6", "\u0AA4\u0ACD\u0AB0", "\u0AEC"], ["7", "\u0A95\u0ACD\u0AB7", "\u0AED"], ["8", "\u0AB6\u0ACD\u0AB0", "\u0AEE"], ["9", "(", "\u0AEF"], ["0", ")", "\u0AE6"], ["-", "\u0A83"], ["\u0AC3", "\u0A8B", "\u0AC4", "\u0AE0"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0ACC", "\u0A94"], ["\u0AC8", "\u0A90"], ["\u0ABE", "\u0A86"], ["\u0AC0", "\u0A88"], ["\u0AC2", "\u0A8A"], ["\u0AAC", "\u0AAD"], ["\u0AB9", "\u0A99"], ["\u0A97", "\u0A98"], ["\u0AA6", "\u0AA7"], ["\u0A9C", "\u0A9D"], ["\u0AA1", "\u0AA2"], ["\u0ABC", "\u0A9E"], ["\u0AC9", "\u0A91"]],
+ [["Caps", "Caps"], ["\u0ACB", "\u0A93"], ["\u0AC7", "\u0A8F"], ["\u0ACD", "\u0A85"], ["\u0ABF", "\u0A87"], ["\u0AC1", "\u0A89"], ["\u0AAA", "\u0AAB"], ["\u0AB0"], ["\u0A95", "\u0A96"], ["\u0AA4", "\u0AA5"], ["\u0A9A", "\u0A9B"], ["\u0A9F", "\u0AA0"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], [""], ["\u0A82", "\u0A81", "", "\u0AD0"], ["\u0AAE", "\u0AA3"], ["\u0AA8"], ["\u0AB5"], ["\u0AB2", "\u0AB3"], ["\u0AB8", "\u0AB6"], [",", "\u0AB7"], [".", "\u0964", "\u0965", "\u0ABD"], ["\u0AAF"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["gu"] };
+
+ this.VKI_layout['\u05e2\u05d1\u05e8\u05d9\u05ea'] = {
+ 'name': "Hebrew", 'keys': [
+ [["~", "`"], ["1", "!"], ["2", "@"], ["3", "#"], ["4" , "$", "\u20aa"], ["5" , "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["/", "Q"], ["'", "W"], ["\u05e7", "E", "\u20ac"], ["\u05e8", "R"], ["\u05d0", "T"], ["\u05d8", "Y"], ["\u05d5", "U", "\u05f0"], ["\u05df", "I"], ["\u05dd", "O"], ["\u05e4", "P"], ["\\", "|"], ["Enter", "Enter"]],
+ [["Caps", "Caps"], ["\u05e9", "A"], ["\u05d3", "S"], ["\u05d2", "D"], ["\u05db", "F"], ["\u05e2", "G"], ["\u05d9", "H", "\u05f2"], ["\u05d7", "J", "\u05f1"], ["\u05dc", "K"], ["\u05da", "L"], ["\u05e3", ":"], ["," , '"'], ["]", "}"], ["[", "{"]],
+ [["Shift", "Shift"], ["\u05d6", "Z"], ["\u05e1", "X"], ["\u05d1", "C"], ["\u05d4", "V"], ["\u05e0", "B"], ["\u05de", "N"], ["\u05e6", "M"], ["\u05ea", ">"], ["\u05e5", "<"], [".", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["he"] };
+
+ this.VKI_layout['\u0926\u0947\u0935\u0928\u093e\u0917\u0930\u0940'] = {
+ 'name': "Devanagari", 'keys': [
+ [["\u094A", "\u0912"], ["1", "\u090D", "\u0967"], ["2", "\u0945", "\u0968"], ["3", "\u094D\u0930", "\u0969"], ["4", "\u0930\u094D", "\u096A"], ["5", "\u091C\u094D\u091E", "\u096B"], ["6", "\u0924\u094D\u0930", "\u096C"], ["7", "\u0915\u094D\u0937", "\u096D"], ["8", "\u0936\u094D\u0930", "\u096E"], ["9", "(", "\u096F"], ["0", ")", "\u0966"], ["-", "\u0903"], ["\u0943", "\u090B", "\u0944", "\u0960"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u094C", "\u0914"], ["\u0948", "\u0910"], ["\u093E", "\u0906"], ["\u0940", "\u0908", "\u0963", "\u0961"], ["\u0942", "\u090A"], ["\u092C", "\u092D"], ["\u0939", "\u0919"], ["\u0917", "\u0918", "\u095A"], ["\u0926", "\u0927"], ["\u091C", "\u091D", "\u095B"], ["\u0921", "\u0922", "\u095C", "\u095D"], ["\u093C", "\u091E"], ["\u0949", "\u0911"]],
+ [["Caps", "Caps"], ["\u094B", "\u0913"], ["\u0947", "\u090F"], ["\u094D", "\u0905"], ["\u093F", "\u0907", "\u0962", "\u090C"], ["\u0941", "\u0909"], ["\u092A", "\u092B", "", "\u095E"], ["\u0930", "\u0931"], ["\u0915", "\u0916", "\u0958", "\u0959"], ["\u0924", "\u0925"], ["\u091A", "\u091B", "\u0952"], ["\u091F", "\u0920", "", "\u0951"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0946", "\u090E", "\u0953"], ["\u0902", "\u0901", "", "\u0950"], ["\u092E", "\u0923", "\u0954"], ["\u0928", "\u0929"], ["\u0935", "\u0934"], ["\u0932", "\u0933"], ["\u0938", "\u0936"], [",", "\u0937", "\u0970"], [".", "\u0964", "\u0965", "\u093D"], ["\u092F", "\u095F"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["hi-Deva"] };
+
+ this.VKI_layout['\u0939\u093f\u0902\u0926\u0940'] = {
+ 'name': "Hindi", 'keys': [
+ [["\u200d", "\u200c", "`", "~"], ["1", "\u090D", "\u0967", "!"], ["2", "\u0945", "\u0968", "@"], ["3", "\u094D\u0930", "\u0969", "#"], ["4", "\u0930\u094D", "\u096A", "$"], ["5", "\u091C\u094D\u091E", "\u096B", "%"], ["6", "\u0924\u094D\u0930", "\u096C", "^"], ["7", "\u0915\u094D\u0937", "\u096D", "&"], ["8", "\u0936\u094D\u0930", "\u096E", "*"], ["9", "(", "\u096F", "("], ["0", ")", "\u0966", ")"], ["-", "\u0903", "-", "_"], ["\u0943", "\u090B", "=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u094C", "\u0914"], ["\u0948", "\u0910"], ["\u093E", "\u0906"], ["\u0940", "\u0908"], ["\u0942", "\u090A"], ["\u092C", "\u092D"], ["\u0939", "\u0919"], ["\u0917", "\u0918"], ["\u0926", "\u0927"], ["\u091C", "\u091D"], ["\u0921", "\u0922", "[", "{"], ["\u093C", "\u091E", "]", "}"], ["\u0949", "\u0911", "\\", "|"]],
+ [["Caps", "Caps"], ["\u094B", "\u0913"], ["\u0947", "\u090F"], ["\u094D", "\u0905"], ["\u093F", "\u0907"], ["\u0941", "\u0909"], ["\u092A", "\u092B"], ["\u0930", "\u0931"], ["\u0915", "\u0916"], ["\u0924", "\u0925"], ["\u091A", "\u091B", ";", ":"], ["\u091F", "\u0920", "'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], [""], ["\u0902", "\u0901", "", "\u0950"], ["\u092E", "\u0923"], ["\u0928"], ["\u0935"], ["\u0932", "\u0933"], ["\u0938", "\u0936"], [",", "\u0937", ",", "<"], [".", "\u0964", ".", ">"], ["\u092F", "\u095F", "/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["hi"] };
+
+ this.VKI_layout['Hrvatski'] = {
+ 'name': "Croatian", 'keys': this.VKI_layout['Bosanski'].keys.slice(0), 'lang': ["hr"]
+ };
+
+ this.VKI_layout['\u0540\u0561\u0575\u0565\u0580\u0565\u0576 \u0561\u0580\u0565\u0582\u0574\u0578\u0582\u057f\u0584'] = {
+ 'name': "Western Armenian", 'keys': [
+ [["\u055D", "\u055C"], [":", "1"], ["\u0571", "\u0541"], ["\u0575", "\u0545"], ["\u055B", "3"], [",", "4"], ["-", "9"], [".", "\u0587"], ["\u00AB", "("], ["\u00BB", ")"], ["\u0585", "\u0555"], ["\u057C", "\u054C"], ["\u056A", "\u053A"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u056D", "\u053D"], ["\u057E", "\u054E"], ["\u0567", "\u0537"], ["\u0580", "\u0550"], ["\u0564", "\u0534"], ["\u0565", "\u0535"], ["\u0568", "\u0538"], ["\u056B", "\u053B"], ["\u0578", "\u0548"], ["\u0562", "\u0532"], ["\u0579", "\u0549"], ["\u057B", "\u054B"], ["'", "\u055E"]],
+ [["Caps", "Caps"], ["\u0561", "\u0531"], ["\u057D", "\u054D"], ["\u057F", "\u054F"], ["\u0586", "\u0556"], ["\u056F", "\u053F"], ["\u0570", "\u0540"], ["\u0573", "\u0543"], ["\u0584", "\u0554"], ["\u056C", "\u053C"], ["\u0569", "\u0539"], ["\u0583", "\u0553"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0566", "\u0536"], ["\u0581", "\u0551"], ["\u0563", "\u0533"], ["\u0582", "\u0552"], ["\u057A", "\u054A"], ["\u0576", "\u0546"], ["\u0574", "\u0544"], ["\u0577", "\u0547"], ["\u0572", "\u0542"], ["\u056E", "\u053E"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["hy-arevmda"] };
+
+ this.VKI_layout['\u0540\u0561\u0575\u0565\u0580\u0565\u0576 \u0561\u0580\u0565\u0582\u0565\u056c\u0584'] = {
+ 'name': "Eastern Armenian", 'keys': [
+ [["\u055D", "\u055C"], [":", "1"], ["\u0571", "\u0541"], ["\u0575", "\u0545"], ["\u055B", "3"], [",", "4"], ["-", "9"], [".", "\u0587"], ["\u00AB", "("], ["\u00BB", ")"], ["\u0585", "\u0555"], ["\u057C", "\u054C"], ["\u056A", "\u053A"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u056D", "\u053D"], ["\u0582", "\u0552"], ["\u0567", "\u0537"], ["\u0580", "\u0550"], ["\u057F", "\u054F"], ["\u0565", "\u0535"], ["\u0568", "\u0538"], ["\u056B", "\u053B"], ["\u0578", "\u0548"], ["\u057A", "\u054A"], ["\u0579", "\u0549"], ["\u057B", "\u054B"], ["'", "\u055E"]],
+ [["Caps", "Caps"], ["\u0561", "\u0531"], ["\u057D", "\u054D"], ["\u0564", "\u0534"], ["\u0586", "\u0556"], ["\u0584", "\u0554"], ["\u0570", "\u0540"], ["\u0573", "\u0543"], ["\u056F", "\u053F"], ["\u056C", "\u053C"], ["\u0569", "\u0539"], ["\u0583", "\u0553"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0566", "\u0536"], ["\u0581", "\u0551"], ["\u0563", "\u0533"], ["\u057E", "\u054E"], ["\u0562", "\u0532"], ["\u0576", "\u0546"], ["\u0574", "\u0544"], ["\u0577", "\u0547"], ["\u0572", "\u0542"], ["\u056E", "\u053E"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["hy"] };
+
+ this.VKI_layout['\u00cdslenska'] = {
+ 'name': "Icelandic", 'keys': [
+ [["\u00B0", "\u00A8", "\u00B0"], ["1", "!"], ["2", '"'], ["3", "#"], ["4", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["\u00F6", "\u00D6", "\\"], ["-", "_"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "@"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00F0", "\u00D0"], ["'", "?", "~"], ["+", "*", "`"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00E6", "\u00C6"], ["\u00B4", "'", "^"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00B5"], [",", ";"], [".", ":"], ["\u00FE", "\u00DE"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["is"] };
+
+ this.VKI_layout['Italiano'] = {
+ 'name': "Italian", 'keys': [
+ [["\\", "|"], ["1", "!"], ["2", '"'], ["3", "\u00a3"], ["4", "$", "\u20ac"], ["5", "%"], ["6", "&"], ["7", "/"], ["8", "("], ["9", ")"], ["0", "="], ["'", "?"], ["\u00ec", "^"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e8", "\u00e9", "[", "{"], ["+", "*", "]", "}"], ["\u00f9", "\u00a7"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f2", "\u00e7", "@"], ["\u00e0", "\u00b0", "#"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["it"] };
+
+ this.VKI_layout['\u65e5\u672c\u8a9e'] = {
+ 'name': "Japanese Hiragana/Katakana", 'keys': [
+ [["\uff5e"], ["\u306c", "\u30cc"], ["\u3075", '\u30d5'], ["\u3042", "\u30a2", "\u3041", "\u30a1"], ["\u3046", "\u30a6", "\u3045", "\u30a5"], ["\u3048", "\u30a8", "\u3047", "\u30a7"], ["\u304a", "\u30aa", "\u3049", "\u30a9"], ["\u3084", "\u30e4", "\u3083", "\u30e3"], ["\u3086", "\u30e6", "\u3085", "\u30e5"], ["\u3088", "\u30e8", "\u3087", "\u30e7"], ["\u308f", "\u30ef", "\u3092", "\u30f2"], ["\u307b", "\u30db", "\u30fc", "\uff1d"], ["\u3078", "\u30d8" , "\uff3e", "\uff5e"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u305f", "\u30bf"], ["\u3066", "\u30c6"], ["\u3044", "\u30a4", "\u3043", "\u30a3"], ["\u3059", "\u30b9"], ["\u304b", "\u30ab"], ["\u3093", "\u30f3"], ["\u306a", "\u30ca"], ["\u306b", "\u30cb"], ["\u3089", "\u30e9"], ["\u305b", "\u30bb"], ["\u3001", "\u3001", "\uff20", "\u2018"], ["\u3002", "\u3002", "\u300c", "\uff5b"], ["\uffe5", "", "", "\uff0a"], ['\u309B', '"', "\uffe5", "\uff5c"]],
+ [["Caps", "Caps"], ["\u3061", "\u30c1"], ["\u3068", "\u30c8"], ["\u3057", "\u30b7"], ["\u306f", "\u30cf"], ["\u304d", "\u30ad"], ["\u304f", "\u30af"], ["\u307e", "\u30de"], ["\u306e", "\u30ce"], ["\u308c", "\u30ec", "\uff1b", "\uff0b"], ["\u3051", "\u30b1", "\uff1a", "\u30f6"], ["\u3080", "\u30e0", "\u300d", "\uff5d"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u3064", "\u30c4"], ["\u3055", "\u30b5"], ["\u305d", "\u30bd"], ["\u3072", "\u30d2"], ["\u3053", "\u30b3"], ["\u307f", "\u30df"], ["\u3082", "\u30e2"], ["\u306d", "\u30cd", "\u3001", "\uff1c"], ["\u308b", "\u30eb", "\u3002", "\uff1e"], ["\u3081", "\u30e1", "\u30fb", "\uff1f"], ["\u308d", "\u30ed", "", "\uff3f"], ["Shift", "Shift"]],
+ [["AltLk", "AltLk"], [" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["ja"] };
+
+ this.VKI_layout['\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8'] = {
+ 'name': "Georgian", 'keys': [
+ [["\u201E", "\u201C"], ["!", "1"], ["?", "2"], ["\u2116", "3"], ["\u00A7", "4"], ["%", "5"], [":", "6"], [".", "7"], [";", "8"], [",", "9"], ["/", "0"], ["\u2013", "-"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u10E6", "\u10E6"], ["\u10EF", "\u10EF"], ["\u10E3", "\u10E3"], ["\u10D9", "\u10D9"], ["\u10D4", "\u10D4", "\u10F1"], ["\u10DC", "\u10DC"], ["\u10D2", "\u10D2"], ["\u10E8", "\u10E8"], ["\u10EC", "\u10EC"], ["\u10D6", "\u10D6"], ["\u10EE", "\u10EE", "\u10F4"], ["\u10EA", "\u10EA"], ["(", ")"]],
+ [["Caps", "Caps"], ["\u10E4", "\u10E4", "\u10F6"], ["\u10EB", "\u10EB"], ["\u10D5", "\u10D5", "\u10F3"], ["\u10D7", "\u10D7"], ["\u10D0", "\u10D0"], ["\u10DE", "\u10DE"], ["\u10E0", "\u10E0"], ["\u10DD", "\u10DD"], ["\u10DA", "\u10DA"], ["\u10D3", "\u10D3"], ["\u10DF", "\u10DF"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u10ED", "\u10ED"], ["\u10E9", "\u10E9"], ["\u10E7", "\u10E7"], ["\u10E1", "\u10E1"], ["\u10DB", "\u10DB"], ["\u10D8", "\u10D8", "\u10F2"], ["\u10E2", "\u10E2"], ["\u10E5", "\u10E5"], ["\u10D1", "\u10D1"], ["\u10F0", "\u10F0", "\u10F5"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["ka"] };
+
+ this.VKI_layout['\u049a\u0430\u0437\u0430\u049b\u0448\u0430'] = {
+ 'name': "Kazakh", 'keys': [
+ [["(", ")"], ['"', "!"], ["\u04d9", "\u04d8"], ["\u0456", "\u0406"], ["\u04a3", "\u04a2"], ["\u0493", "\u0492"], [",", ";"], [".", ":"], ["\u04af", "\u04ae"], ["\u04b1", "\u04b0"], ["\u049b", "\u049a"], ["\u04e9", "\u04e8"], ["\u04bb", "\u04ba"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], ["\u2116", "?"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["kk"] };
+
+ this.VKI_layout['\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a'] = {
+ 'name': "Khmer", 'keys': [
+ [["\u00AB", "\u00BB","\u200D"], ["\u17E1", "!","\u200C","\u17F1"], ["\u17E2", "\u17D7", "@", "\u17F2"], ["\u17E3", '"', "\u17D1", "\u17F3"], ["\u17E4", "\u17DB", "$", "\u17F4"], ["\u17E5", "%" ,"\u20AC", "\u17F5"], ["\u17E6", "\u17CD", "\u17D9", "\u17F6"], ["\u17E7", "\u17D0", "\u17DA", "\u17F7"], ["\u17E8", "\u17CF", "*", "\u17F8"], ["\u17E9", "(", "{", "\u17F9"], ["\u17E0", ")", "}", "\u17F0"], ["\u17A5", "\u17CC", "x"], ["\u17B2", "=", "\u17CE"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u1786", "\u1788", "\u17DC", "\u19E0"], ["\u17B9", "\u17BA", "\u17DD", "\u19E1"], ["\u17C1", "\u17C2", "\u17AF", "\u19E2"], ["\u179A", "\u17AC", "\u17AB", "\u19E3"], ["\u178F", "\u1791", "\u17A8", "\u19E4"], ["\u1799", "\u17BD", "\u1799\u17BE\u1784", "\u19E5"], ["\u17BB", "\u17BC", "", "\u19E6"], ["\u17B7", "\u17B8", "\u17A6", "\u19E7"], ["\u17C4", "\u17C5", "\u17B1", "\u19E8"], ["\u1795", "\u1797", "\u17B0", "\u19E9"], ["\u17C0", "\u17BF", "\u17A9", "\u19EA"], ["\u17AA", "\u17A7", "\u17B3", "\u19EB"], ["\u17AE", "\u17AD", "\\"]],
+ [["Caps", "Caps"], ["\u17B6", "\u17B6\u17C6", "\u17B5", "\u19EC"], ["\u179F", "\u17C3", "", "\u19ED"], ["\u178A", "\u178C", "\u17D3", "\u19EE"], ["\u1790", "\u1792", "", "\u19EF"], ["\u1784", "\u17A2", "\u17A4", "\u19F0"], ["\u17A0", "\u17C7", "\u17A3", "\u19F1"], ["\u17D2", "\u1789", "\u17B4", "\u19F2"], ["\u1780", "\u1782", "\u179D", "\u19F3"], ["\u179B", "\u17A1", "\u17D8", "\u19F4"], ["\u17BE", "\u17C4\u17C7", "\u17D6", "\u19F5"], ["\u17CB", "\u17C9", "\u17C8", "\u19F6"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u178B", "\u178D", "|", "\u19F7"], ["\u1781", "\u1783", "\u1781\u17D2\u1789\u17BB\u17C6", "\u19F8"], ["\u1785", "\u1787", "-", "\u19F9"], ["\u179C", "\u17C1\u17C7", "+", "\u19FA"], ["\u1794", "\u1796", "\u179E", "\u19FB"], ["\u1793", "\u178E", "[", "\u19FC"], ["\u1798", "\u17C6", "]", "\u19FD"], ["\u17BB\u17C6", "\u17BB\u17C7", ",", "\u19FE"], ["\u17D4", "\u17D5", ".", "\u19FF"], ["\u17CA", "?", "/"], ["Shift", "Shift"]],
+ [["\u200B", " ", "\u00A0", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["km"] };
+
+ this.VKI_layout['\u0c95\u0ca8\u0ccd\u0ca8\u0ca1'] = {
+ 'name': "Kannada", 'keys': [
+ [["\u0CCA", "\u0C92"], ["1", "", "\u0CE7"], ["2", "", "\u0CE8"], ["3", "\u0CCD\u0CB0", "\u0CE9"], ["4", "\u0CB0\u0CCD", "\u0CEA"], ["5", "\u0C9C\u0CCD\u0C9E", "\u0CEB"], ["6", "\u0CA4\u0CCD\u0CB0", "\u0CEC"], ["7", "\u0C95\u0CCD\u0CB7", "\u0CED"], ["8", "\u0CB6\u0CCD\u0CB0", "\u0CEE"], ["9", "(", "\u0CEF"], ["0", ")", "\u0CE6"], ["-", "\u0C83"], ["\u0CC3", "\u0C8B", "\u0CC4", "\u0CE0"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0CCC", "\u0C94"], ["\u0CC8", "\u0C90", "\u0CD6"], ["\u0CBE", "\u0C86"], ["\u0CC0", "\u0C88", "", "\u0CE1"], ["\u0CC2", "\u0C8A"], ["\u0CAC", "\u0CAD"], ["\u0CB9", "\u0C99"], ["\u0C97", "\u0C98"], ["\u0CA6", "\u0CA7"], ["\u0C9C", "\u0C9D"], ["\u0CA1", "\u0CA2"], ["Enter", "Enter"]],
+ [["Caps", "Caps"], ["\u0CCB", "\u0C93"], ["\u0CC7", "\u0C8F", "\u0CD5"], ["\u0CCD", "\u0C85"], ["\u0CBF", "\u0C87", "", "\u0C8C"], ["\u0CC1", "\u0C89"], ["\u0CAA", "\u0CAB", "", "\u0CDE"], ["\u0CB0", "\u0CB1"], ["\u0C95", "\u0C96"], ["\u0CA4", "\u0CA5"], ["\u0C9A", "\u0C9B"], ["\u0C9F", "\u0CA0"], ["", "\u0C9E"]],
+ [["Shift", "Shift"], ["\u0CC6", "\u0C8F"], ["\u0C82"], ["\u0CAE", "\u0CA3"], ["\u0CA8"], ["\u0CB5"], ["\u0CB2", "\u0CB3"], ["\u0CB8", "\u0CB6"], [",", "\u0CB7"], [".", "|"], ["\u0CAF"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["kn"] };
+
+ this.VKI_layout['\ud55c\uad6d\uc5b4'] = {
+ 'name': "Korean", 'keys': [
+ [["`", "~", "`", "~"], ["1", "!", "1", "!"], ["2", "@", "2", "@"], ["3", "#", "3", "#"], ["4", "$", "4", "$"], ["5", "%", "5", "%"], ["6", "^", "6", "^"], ["7", "&", "7", "&"], ["8", "*", "8", "*"], ["9", ")", "9", ")"], ["0", "(", "0", "("], ["-", "_", "-", "_"], ["=", "+", "=", "+"], ["\u20A9", "|", "\u20A9", "|"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u1107", "\u1108", "q", "Q"], ["\u110C", "\u110D", "w", "W"], ["\u1103", "\u1104", "e", "E"], ["\u1100", "\u1101", "r", "R"], ["\u1109", "\u110A", "t", "T"], ["\u116D", "", "y", "Y"], ["\u1167", "", "u", "U"], ["\u1163", "", "i", "I"], ["\u1162", "\u1164", "o", "O"], ["\u1166", "\u1168", "p", "P"], ["[", "{", "[", "{"], ["]", "}", "]", "}"]],
+ [["Caps", "Caps"], ["\u1106", "", "a", "A"], ["\u1102", "", "s", "S"], ["\u110B", "", "d", "D"], ["\u1105", "", "f", "F"], ["\u1112", "", "g", "G"], ["\u1169", "", "h", "H"], ["\u1165", "", "j", "J"], ["\u1161", "", "k", "K"], ["\u1175", "", "l", "L"], [";", ":", ";", ":"], ["'", '"', "'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u110F", "", "z", "Z"], ["\u1110", "", "x", "X"], ["\u110E", "", "c", "C"], ["\u1111", "", "v", "V"], ["\u1172", "", "b", "B"], ["\u116E", "", "n", "N"], ["\u1173", "", "m", "M"], [",", "<", ",", "<"], [".", ">", ".", ">"], ["/", "?", "/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Kor", "Alt"]]
+ ], 'lang': ["ko"] };
+
+ this.VKI_layout['Kurd\u00ee'] = {
+ 'name': "Kurdish", 'keys': [
+ [["\u20ac", "~"], ["\u0661", "!"], ["\u0662", "@"], ["\u0663", "#"], ["\u0664", "$"], ["\u0665", "%"], ["\u0666", "^"], ["\u0667", "&"], ["\u0668", "*"], ["\u0669", "("], ["\u0660", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0642", "`"], ["\u0648", "\u0648\u0648"], ["\u06d5", "\u064a"], ["\u0631", "\u0695"], ["\u062a", "\u0637"], ["\u06cc", "\u06ce"], ["\u0626", "\u0621"], ["\u062d", "\u0639"], ["\u06c6", "\u0624"], ["\u067e", "\u062b"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u0627", "\u0622"], ["\u0633", "\u0634"], ["\u062f", "\u0630"], ["\u0641", "\u0625"], ["\u06af", "\u063a"], ["\u0647", "\u200c"], ["\u0698", "\u0623"], ["\u06a9", "\u0643"], ["\u0644", "\u06b5"], ["\u061b", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0632", "\u0636"], ["\u062e", "\u0635"], ["\u062c", "\u0686"], ["\u06a4", "\u0638"], ["\u0628", "\u0649"], ["\u0646", "\u0629"], ["\u0645", "\u0640"], ["\u060c", "<"], [".", ">"], ["/", "\u061f"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["ku"] };
+
+ this.VKI_layout['\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430'] = {
+ 'name': "Kyrgyz", 'keys': [
+ [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423", "\u04AF", "\u04AE"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D", "\u04A3", "\u04A2"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E", "\u04E9", "\u04E8"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["ky"] };
+
+ this.VKI_layout['Latvie\u0161u'] = {
+ 'name': "Latvian", 'keys': [
+ [["\u00AD", "?"], ["1", "!", "\u00AB"], ["2", "\u00AB", "", "@"], ["3", "\u00BB", "", "#"], ["4", "$", "\u20AC", "$"], ["5", "%", '"', "~"], ["6", "/", "\u2019", "^"], ["7", "&", "", "\u00B1"], ["8", "\u00D7", ":"], ["9", "("], ["0", ")"], ["-", "_", "\u2013", "\u2014"], ["f", "F", "=", ";"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u016B", "\u016A", "q", "Q"], ["g", "G", "\u0123", "\u0122"], ["j", "J"], ["r", "R", "\u0157", "\u0156"], ["m", "M", "w", "W"], ["v", "V", "y", "Y"], ["n", "N"], ["z", "Z"], ["\u0113", "\u0112"], ["\u010D", "\u010C"], ["\u017E", "\u017D", "[", "{"], ["h", "H", "]", "}"], ["\u0137", "\u0136"]],
+ [["Caps", "Caps"], ["\u0161", "\u0160"], ["u", "U"], ["s", "S"], ["i", "I"], ["l", "L"], ["d", "D"], ["a", "A"], ["t", "T"], ["e", "E", "\u20AC"], ["c", "C"], ["\u00B4", "\u00B0", "\u00B4", "\u00A8"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0146", "\u0145"], ["b", "B", "x", "X"], ["\u012B", "\u012A"], ["k", "K", "\u0137", "\u0136"], ["p", "P"], ["o", "O", "\u00F5", "\u00D5"], ["\u0101", "\u0100"], [",", ";", "<"], [".", ":", ">"], ["\u013C", "\u013B"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["lv"] };
+
+ this.VKI_layout['Lietuvi\u0173'] = {
+ 'name': "Lithuanian", 'keys': [
+ [["`", "~"], ["\u0105", "\u0104"], ["\u010D", "\u010C"], ["\u0119", "\u0118"], ["\u0117", "\u0116"], ["\u012F", "\u012E"], ["\u0161", "\u0160"], ["\u0173", "\u0172"], ["\u016B", "\u016A"], ["\u201E", "("], ["\u201C", ")"], ["-", "_"], ["\u017E", "\u017D"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u2013", "\u20AC"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["lt"] };
+
+ this.VKI_layout['Magyar'] = {
+ 'name': "Hungarian", 'keys': [
+ [["0", "\u00a7"], ["1", "'", "~"], ["2", '"', "\u02c7"], ["3", "+", "\u02c6"], ["4", "!", "\u02d8"], ["5", "%", "\u00b0"], ["6", "/", "\u02db"], ["7", "=", "`"], ["8", "(", "\u02d9"], ["9", ")", "\u00b4"], ["\u00f6", "\u00d6", "\u02dd"], ["\u00fc", "\u00dc", "\u00a8"], ["\u00f3", "\u00d3", "\u00b8"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E", "\u00c4"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U", "\u20ac"], ["i", "I", "\u00cd"], ["o", "O"], ["p", "P"], ["\u0151", "\u0150", "\u00f7"], ["\u00fa", "\u00da", "\u00d7"], ["\u0171", "\u0170", "\u00a4"]],
+ [["Caps", "Caps"], ["a", "A", "\u00e4"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J", "\u00ed"], ["k", "K", "\u0141"], ["l", "L", "\u0142"], ["\u00e9", "\u00c9", "$"], ["\u00e1", "\u00c1", "\u00df"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u00ed", "\u00cd", "<"], ["y", "Y", ">"], ["x", "X", "#"], ["c", "C", "&"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "<"], [",", "?", ";"], [".", ":", ">"], ["-", "_", "*"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["hu"] };
+
+ this.VKI_layout['Malti'] = {
+ 'name': "Maltese 48", 'keys': [
+ [["\u010B", "\u010A", "`"], ["1", "!"], ["2", '"'], ["3", "\u20ac", "\u00A3"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u00E8", "\u00C8"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U", "\u00F9", "\u00D9"], ["i", "I", "\u00EC", "\u00cc"], ["o", "O", "\u00F2", "\u00D2"], ["p", "P"], ["\u0121", "\u0120", "[", "{"], ["\u0127", "\u0126", "]", "}"], ["#", "\u017e"]],
+ [["Caps", "Caps"], ["a", "A", "\u00E0", "\u00C0"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", "@"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u017c", "\u017b", "\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?", "", "`"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["mt"] };
+
+ this.VKI_layout['\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438'] = {
+ 'name': "Macedonian Cyrillic", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "\u201E"], ["3", "\u201C"], ["4", "\u2019"], ["5", "%"], ["6", "\u2018"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0459", "\u0409"], ["\u045A", "\u040A"], ["\u0435", "\u0415", "\u20AC"], ["\u0440", "\u0420"], ["\u0442", "\u0422"], ["\u0455", "\u0405"], ["\u0443", "\u0423"], ["\u0438", "\u0418"], ["\u043E", "\u041E"], ["\u043F", "\u041F"], ["\u0448", "\u0428", "\u0402"], ["\u0453", "\u0403", "\u0452"], ["\u0436", "\u0416"]],
+ [["Caps", "Caps"], ["\u0430", "\u0410"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0444", "\u0424", "["], ["\u0433", "\u0413", "]"], ["\u0445", "\u0425"], ["\u0458", "\u0408"], ["\u043A", "\u041A"], ["\u043B", "\u041B"], ["\u0447", "\u0427", "\u040B"], ["\u045C", "\u040C", "\u045B"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0451", "\u0401"], ["\u0437", "\u0417"], ["\u045F", "\u040F"], ["\u0446", "\u0426"], ["\u0432", "\u0412", "@"], ["\u0431", "\u0411", "{"], ["\u043D", "\u041D", "}"], ["\u043C", "\u041C", "\u00A7"], [",", ";"], [".", ":"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["mk"] };
+
+ this.VKI_layout['\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02'] = {
+ 'name': "Malayalam", 'keys': [
+ [["\u0D4A", "\u0D12"], ["1", "", "\u0D67"], ["2", "", "\u0D68"], ["3", "\u0D4D\u0D30", "\u0D69"], ["4", "", "\u0D6A"], ["5", "", "\u0D6B"], ["6", "", "\u0D6C"], ["7", "\u0D15\u0D4D\u0D37", "\u0D6D"], ["8", "", "\u0D6E"], ["9", "(", "\u0D6F"], ["0", ")", "\u0D66"], ["-", "\u0D03"], ["\u0D43", "\u0D0B", "", "\u0D60"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0D4C", "\u0D14", "\u0D57"], ["\u0D48", "\u0D10"], ["\u0D3E", "\u0D06"], ["\u0D40", "\u0D08", "", "\u0D61"], ["\u0D42", "\u0D0A"], ["\u0D2C", "\u0D2D"], ["\u0D39", "\u0D19"], ["\u0D17", "\u0D18"], ["\u0D26", "\u0D27"], ["\u0D1C", "\u0D1D"], ["\u0D21", "\u0D22"], ["", "\u0D1E"]],
+ [["Caps", "Caps"], ["\u0D4B", "\u0D13"], ["\u0D47", "\u0D0F"], ["\u0D4D", "\u0D05", "", "\u0D0C"], ["\u0D3F", "\u0D07"], ["\u0D41", "\u0D09"], ["\u0D2A", "\u0D2B"], ["\u0D30", "\u0D31"], ["\u0D15", "\u0D16"], ["\u0D24", "\u0D25"], ["\u0D1A", "\u0D1B"], ["\u0D1F", "\u0D20"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0D46", "\u0D0F"], ["\u0D02"], ["\u0D2E", "\u0D23"], ["\u0D28"], ["\u0D35", "\u0D34"], ["\u0D32", "\u0D33"], ["\u0D38", "\u0D36"], [",", "\u0D37"], ["."], ["\u0D2F"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["ml"] };
+
+ this.VKI_layout['Misc. Symbols'] = {
+ 'name': "Misc. Symbols", 'keys': [
+ [["\u2605", "\u2606", "\u260e", "\u260f"], ["\u2648", "\u2673", "\u2659", "\u2630"], ["\u2649", "\u2674", "\u2658", "\u2631"], ["\u264a", "\u2675", "\u2657", "\u2632"], ["\u264b", "\u2676", "\u2656", "\u2633"], ["\u264c", "\u2677", "\u2655", "\u2634"], ["\u264d", "\u2678", "\u2654", "\u2635"], ["\u264e", "\u2679", "\u265f", "\u2636"], ["\u264f", "\u267a", "\u265e", "\u2637"], ["\u2650", "\u267b", "\u265d", "\u2686"], ["\u2651", "\u267c", "\u265c", "\u2687"], ["\u2652", "\u267d", "\u265b", "\u2688"], ["\u2653", "\u2672", "\u265a", "\u2689"], ["Bksp", "Bksp"]],
+ [["\u263f", "\u2680", "\u268a", "\u26a2"], ["\u2640", "\u2681", "\u268b", "\u26a3"], ["\u2641", "\u2682", "\u268c", "\u26a4"], ["\u2642", "\u2683", "\u268d", "\u26a5"], ["\u2643", "\u2684", "\u268e", "\u26a6"], ["\u2644", "\u2685", "\u268f", "\u26a7"], ["\u2645", "\u2620", "\u26ff", "\u26a8"], ["\u2646", "\u2622", "\u2692", "\u26a9"], ["\u2647", "\u2623", "\u2693", "\u26b2"], ["\u2669", "\u266d", "\u2694", "\u26ac"], ["\u266a", "\u266e", "\u2695", "\u26ad"], ["\u266b", "\u266f", "\u2696", "\u26ae"], ["\u266c", "\u2607", "\u2697", "\u26af"], ["\u26f9", "\u2608", "\u2698", "\u26b0"], ["\u267f", "\u262e", "\u2638", "\u2609"]],
+ [["Tab", "Tab"], ["\u261e", "\u261c", "\u261d", "\u261f"], ["\u261b", "\u261a", "\u2618", "\u2619"], ["\u2602", "\u2614", "\u26f1", "\u26d9"], ["\u2615", "\u2668", "\u26fe", "\u26d8"], ["\u263a", "\u2639", "\u263b", "\u26dc"], ["\u2617", "\u2616", "\u26ca", "\u26c9"], ["\u2660", "\u2663", "\u2665", "\u2666"], ["\u2664", "\u2667", "\u2661", "\u2662"], ["\u26c2", "\u26c0", "\u26c3", "\u26c1"], ["\u2624", "\u2625", "\u269a", "\u26b1"], ["\u2610", "\u2611", "\u2612", "\u2613"], ["\u2628", "\u2626", "\u2627", "\u2629"], ["\u262a", "\u262b", "\u262c", "\u262d"], ["\u26fa", "\u26fb", "\u26fc", "\u26fd"]],
+ [["Caps", "Caps"], ["\u262f", "\u2670", "\u2671", "\u267e"], ["\u263c", "\u2699", "\u263d", "\u263e"], ["\u26c4", "\u2603", "\u26c7", "\u26c6"], ["\u26a0", "\u26a1", "\u2621", "\u26d4"], ["\u26e4", "\u26e5", "\u26e6", "\u26e7"], ["\u260a", "\u260b", "\u260c", "\u260d"], ["\u269c", "\u269b", "\u269d", "\u2604"], ["\u26b3", "\u26b4", "\u26b5", "\u26b6"], ["\u26b7", "\u26bf", "\u26b8", "\u26f8"], ["\u26b9", "\u26ba", "\u26bb", "\u26bc"], ["\u26bd", "\u26be", "\u269f", "\u269e"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u2600", "\u2601", "\u26c5", "\u26c8"], ["\u2691", "\u2690", "\u26ab", "\u26aa"], ["\u26cb", "\u26cc", "\u26cd", "\u26ce"], ["\u26cf", "\u26d0", "\u26d1", "\u26d2"], ["\u26d3", "\u26d5", "\u26d6", "\u26d7"], ["\u26da", "\u26db", "\u26dd", "\u26de"], ["\u26df", "\u26e0", "\u26e1", "\u26e2"], ["\u26e3", "\u26e8", "\u26e9", "\u26ea"], ["\u26eb", "\u26ec", "\u26ed", "\u26ee"], ["\u26ef", "\u26f0", "\u26f2", "\u26f3"], ["\u26f4", "\u26f5", "\u26f6", "\u26f7"], ["Shift", "Shift"]],
+ [["AltLk", "AltLk"], [" ", " ", " ", " "], ["Alt", "Alt"]]
+ ]};
+
+ this.VKI_layout['\u041c\u043e\u043d\u0433\u043e\u043b'] = {
+ 'name': "Mongolian Cyrillic", 'keys': [
+ [["=", "+"], ["\u2116", "1"], ["-", "2"], ['"', "3"], ["\u20AE", "4"], [":", "5"], [".", "6"], ["_", "7"], [",", "8"], ["%", "9"], ["?", "0"], ["\u0435", "\u0415"], ["\u0449", "\u0429"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0444", "\u0424"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u0436", "\u0416"], ["\u044d", "\u042d"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u04af", "\u04AE"], ["\u0437", "\u0417"], ["\u043A", "\u041a"], ["\u044A", "\u042A"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u0439", "\u0419"], ["\u044B", "\u042B"], ["\u0431", "\u0411"], ["\u04e9", "\u04e8"], ["\u0430", "\u0410"], ["\u0445", "\u0425"], ["\u0440", "\u0420"], ["\u043e", "\u041e"], ["\u043B", "\u041b"], ["\u0434", "\u0414"], ["\u043f", "\u041f"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0451", "\u0401"], ["\u0441", "\u0421"], ["\u043c", "\u041c"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044c", "\u042c"], ["\u0432", "\u0412"], ["\u044e", "\u042e"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["mn"] };
+
+ this.VKI_layout['\u092e\u0930\u093e\u0920\u0940'] = {
+ 'name': "Marathi", 'keys': [
+ [["", "", "`", "~"], ["\u0967", "\u090D", "1", "!"], ["\u0968", "\u0945", "2", "@"], ["\u0969", "\u094D\u0930", "3", "#"], ["\u096A", "\u0930\u094D", "4", "$"], ["\u096B", "\u091C\u094D\u091E", "5", "%"], ["\u096C", "\u0924\u094D\u0930", "6", "^"], ["\u096D", "\u0915\u094D\u0937", "7", "&"], ["\u096E", "\u0936\u094D\u0930", "8", "*"], ["\u096F", "(", "9", "("], ["\u0966", ")", "0", ")"], ["-", "\u0903", "-", "_"], ["\u0943", "\u090B", "=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u094C", "\u0914"], ["\u0948", "\u0910"], ["\u093E", "\u0906"], ["\u0940", "\u0908"], ["\u0942", "\u090A"], ["\u092C", "\u092D"], ["\u0939", "\u0919"], ["\u0917", "\u0918"], ["\u0926", "\u0927"], ["\u091C", "\u091D"], ["\u0921", "\u0922", "[", "{"], ["\u093C", "\u091E", "]", "}"], ["\u0949", "\u0911", "\\", "|"]],
+ [["Caps", "Caps"], ["\u094B", "\u0913"], ["\u0947", "\u090F"], ["\u094D", "\u0905"], ["\u093F", "\u0907"], ["\u0941", "\u0909"], ["\u092A", "\u092B"], ["\u0930", "\u0931"], ["\u0915", "\u0916"], ["\u0924", "\u0925"], ["\u091A", "\u091B", ";", ":"], ["\u091F", "\u0920", "'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], [""], ["\u0902", "\u0901", "", "\u0950"], ["\u092E", "\u0923"], ["\u0928"], ["\u0935"], ["\u0932", "\u0933"], ["\u0938", "\u0936"], [",", "\u0937", ",", "<"], [".", "\u0964", ".", ">"], ["\u092F", "\u095F", "/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["mr"] };
+
+ this.VKI_layout['\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c'] = {
+ 'name': "Burmese", 'keys': [
+ [["\u1039`", "~"], ["\u1041", "\u100D"], ["\u1042", "\u100E"], ["\u1043", "\u100B"], ["\u1044", "\u1000\u103B\u1015\u103A"], ["\u1045", "%"], ["\u1046", "/"], ["\u1047", "\u101B"], ["\u1048", "\u1002"], ["\u1049", "("], ["\u1040", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u1006", "\u1029"], ["\u1010", "\u1040"], ["\u1014", "\u103F"], ["\u1019", "\u1023"], ["\u1021", "\u1024"], ["\u1015", "\u104C"], ["\u1000", "\u1009"], ["\u1004", "\u104D"], ["\u101E", "\u1025"], ["\u1005", "\u100F"], ["\u101F", "\u1027"], ["\u2018", "\u2019"], ["\u104F", "\u100B\u1039\u100C"]],
+ [["Caps", "Caps"], ["\u200B\u1031", "\u1017"], ["\u200B\u103B", "\u200B\u103E"], ["\u200B\u102D", "\u200B\u102E"], ["\u200B\u103A", "\u1004\u103A\u1039\u200B"], ["\u200B\u102B", "\u200B\u103D"], ["\u200B\u1037", "\u200B\u1036"], ["\u200B\u103C", "\u200B\u1032"], ["\u200B\u102F", "\u200B\u102F"], ["\u200B\u1030", "\u200B\u1030"], ["\u200B\u1038", "\u200B\u102B\u103A"], ["\u1012", "\u1013"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u1016", "\u1007"], ["\u1011", "\u100C"], ["\u1001", "\u1003"], ["\u101C", "\u1020"], ["\u1018", "\u1026"], ["\u100A", "\u1008"], ["\u200B\u102C", "\u102A"], ["\u101A", "\u101B"], [".", "\u101B"], ["\u104B", "\u104A"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["my"] };
+
+ this.VKI_layout['Nederlands'] = {
+ 'name': "Dutch", 'keys': [
+ [["@", "\u00a7", "\u00ac"], ["1", "!", "\u00b9"], ["2", '"', "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00bc"], ["5", "%", "\u00bd"], ["6", "&", "\u00be"], ["7", "_", "\u00a3"], ["8", "(", "{"], ["9", ")", "}"], ["0", "'"], ["/", "?", "\\"], ["\u00b0", "~", "\u00b8"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R", "\u00b6"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00a8", "^"], ["*", "|"], ["<", ">"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u00df"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["+", "\u00b1"], ["\u00b4", "`"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["]", "[", "\u00a6"], ["z", "Z", "\u00ab"], ["x", "X", "\u00bb"], ["c", "C", "\u00a2"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00b5"], [",", ";"], [".", ":", "\u00b7"], ["-", "="], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["nl"] };
+
+ this.VKI_layout['Norsk'] = {
+ 'name': "Norwegian", 'keys': [
+ [["|", "\u00a7"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "\u00a4", "$"], ["5", "%"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?"], ["\\", "`", "\u00b4"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e5", "\u00c5"], ["\u00a8", "^", "~"], ["'", "*"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f8", "\u00d8"], ["\u00e6", "\u00c6"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u03bc", "\u039c"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["no", "nb", "nn"] };
+
+ this.VKI_layout['\u067e\u069a\u062a\u0648'] = {
+ 'name': "Pashto", 'keys': [
+ [["\u200d", "\u00f7", "`"], ["\u06f1", "!", "`"], ["\u06f2", "\u066c", "@"], ["\u06f3", "\u066b", "\u066b"], ["\u06f4", "\u00a4", "\u00a3"], ["\u06f5", "\u066a", "%"], ["\u06f6", "\u00d7", "^"], ["\u06f7", "\u00ab", "&"], ["\u06f8", "\u00bb", "*"], ["\u06f9", "(", "\ufdf2"], ["\u06f0", ")", "\ufefb"], ["-", "\u0640", "_"], ["=", "+", "\ufe87", "\u00f7"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0636", "\u0652", "\u06d5"], ["\u0635", "\u064c", "\u0653"], ["\u062b", "\u064d", "\u20ac"], ["\u0642", "\u064b", "\ufef7"], ["\u0641", "\u064f", "\ufef5"], ["\u063a", "\u0650", "'"], ["\u0639", "\u064e", "\ufe84"], ["\u0647", "\u0651", "\u0670"], ["\u062e", "\u0681", "'"], ["\u062d", "\u0685", '"'], ["\u062c", "]", "}"], ["\u0686", "[", "{"], ["\\", "\u066d", "|"]],
+ [["Caps", "Caps"], ["\u0634", "\u069a", "\ufbb0"], ["\u0633", "\u06cd", "\u06d2"], ["\u06cc", "\u064a", "\u06d2"], ["\u0628", "\u067e", "\u06ba"], ["\u0644", "\u0623", "\u06b7"], ["\u0627", "\u0622", "\u0671"], ["\u062a", "\u067c", "\u0679"], ["\u0646", "\u06bc", "<"], ["\u0645", "\u0629", ">"], ["\u06a9", ":", "\u0643"], ["\u06af", "\u061b", "\u06ab"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0638", "\u0626", "?"], ["\u0637", "\u06d0", ";"], ["\u0632", "\u0698", "\u0655"], ["\u0631", "\u0621", "\u0654"], ["\u0630", "\u200c", "\u0625"], ["\u062f", "\u0689", "\u0688"], ["\u0693", "\u0624", "\u0691"], ["\u0648", "\u060c", ","], ["\u0696", ".", "\u06c7"], ["/", "\u061f", "\u06c9"], ["Shift", "Shift", "\u064d"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["ps"] };
+
+ this.VKI_layout['\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40'] = {
+ 'name': "Punjabi (Gurmukhi)", 'keys': [
+ [[""], ["1", "\u0A4D\u0A35", "\u0A67", "\u0A67"], ["2", "\u0A4D\u0A2F", "\u0A68", "\u0A68"], ["3", "\u0A4D\u0A30", "\u0A69", "\u0A69"], ["4", "\u0A71", "\u0A6A", "\u0A6A"], ["5", "", "\u0A6B", "\u0A6B"], ["6", "", "\u0A6C", "\u0A6C"], ["7", "", "\u0A6D", "\u0A6D"], ["8", "", "\u0A6E", "\u0A6E"], ["9", "(", "\u0A6F", "\u0A6F"], ["0", ")", "\u0A66", "\u0A66"], ["-"], [""], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0A4C", "\u0A14"], ["\u0A48", "\u0A10"], ["\u0A3E", "\u0A06"], ["\u0A40", "\u0A08"], ["\u0A42", "\u0A0A"], ["\u0A2C", "\u0A2D"], ["\u0A39", "\u0A19"], ["\u0A17", "\u0A18", "\u0A5A", "\u0A5A"], ["\u0A26", "\u0A27"], ["\u0A1C", "\u0A1D", "\u0A5B", "\u0A5B"], ["\u0A21", "\u0A22", "\u0A5C", "\u0A5C"], ["Enter", "Enter"]],
+ [["Caps", "Caps"], ["\u0A4B", "\u0A13"], ["\u0A47", "\u0A0F"], ["\u0A4D", "\u0A05"], ["\u0A3F", "\u0A07"], ["\u0A41", "\u0A09"], ["\u0A2A", "\u0A2B", "\u0A5E", "\u0A5E"], ["\u0A30"], ["\u0A15", "\u0A16", "\u0A59", "\u0A59"], ["\u0A24", "\u0A25"], ["\u0A1A", "\u0A1B"], ["\u0A1F", "\u0A20"], ["\u0A3C", "\u0A1E"]],
+ [["Shift", "Shift"], [""], ["\u0A02", "\u0A02"], ["\u0A2E", "\u0A23"], ["\u0A28"], ["\u0A35", "\u0A72", "\u0A73", "\u0A73"], ["\u0A32", "\u0A33"], ["\u0A38", "\u0A36"], [","], [".", "|", "\u0965", "\u0965"], ["\u0A2F"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["pa"] };
+
+ this.VKI_layout['\u62fc\u97f3 (Pinyin)'] = {
+ 'name': "Pinyin", 'keys': [
+ [["`", "~", "\u4e93", "\u301C"], ["1", "!", "\uFF62"], ["2", "@", "\uFF63"], ["3", "#", "\u301D"], ["4", "$", "\u301E"], ["5", "%", "\u301F"], ["6", "^", "\u3008"], ["7", "&", "\u3009"], ["8", "*", "\u302F"], ["9", "(", "\u300A"], ["0", ")", "\u300B"], ["-", "_", "\u300E"], ["=", "+", "\u300F"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\u0101", "\u0100"], ["w", "W", "\u00E1", "\u00C1"], ["e", "E", "\u01CE", "\u01CD"], ["r", "R", "\u00E0", "\u00C0"], ["t", "T", "\u0113", "\u0112"], ["y", "Y", "\u00E9", "\u00C9"], ["u", "U", "\u011B", "\u011A"], ["i", "I", "\u00E8", "\u00C8"], ["o", "O", "\u012B", "\u012A"], ["p", "P", "\u00ED", "\u00CD"], ["[", "{", "\u01D0", "\u01CF"], ["]", "}", "\u00EC", "\u00CC"], ["\\", "|", "\u3020"]],
+ [["Caps", "Caps"], ["a", "A", "\u014D", "\u014C"], ["s", "S", "\u00F3", "\u00D3"], ["d", "D", "\u01D2", "\u01D1"], ["f", "F", "\u00F2", "\u00D2"], ["g", "G", "\u00fc", "\u00dc"], ["h", "H", "\u016B", "\u016A"], ["j", "J", "\u00FA", "\u00DA"], ["k", "K", "\u01D4", "\u01D3"], ["l", "L", "\u00F9", "\u00D9"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["z", "Z", "\u01D6", "\u01D5"], ["x", "X", "\u01D8", "\u01D7"], ["c", "C", "\u01DA", "\u01D9"], ["v", "V", "\u01DC", "\u01DB"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<", "\u3001"], [".", ">", "\u3002"], ["/", "?"], ["Shift", "Shift"]],
+ [["AltLk", "AltLk"], [" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["zh-Latn"] };
+
+ this.VKI_layout['Polski'] = {
+ 'name': "Polish (214)", 'keys': [
+ [["\u02DB", "\u00B7"], ["1", "!", "~"], ["2", '"', "\u02C7"], ["3", "#", "^"], ["4", "\u00A4", "\u02D8"], ["5", "%", "\u00B0"], ["6", "&", "\u02DB"], ["7", "/", "`"], ["8", "(", "\u00B7"], ["9", ")", "\u00B4"], ["0", "=", "\u02DD"], ["+", "?", "\u00A8"], ["'", "*", "\u00B8"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "\u00A6"], ["e", "E"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U", "\u20AC"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u017C", "\u0144", "\u00F7"], ["\u015B", "\u0107", "\u00D7"], ["\u00F3", "\u017A"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u0142", "\u0141", "$"], ["\u0105", "\u0119", "\u00DF"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "\u00A7"], [",", ";", "<"], [".", ":", ">"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ]};
+
+ this.VKI_layout['Polski Programisty'] = {
+ 'name': "Polish Programmers", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u0119", "\u0118"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["a", "A", "\u0105", "\u0104"], ["s", "S", "\u015b", "\u015a"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u0142", "\u0141"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["z", "Z", "\u017c", "\u017b"], ["x", "X", "\u017a", "\u0179"], ["c", "C", "\u0107", "\u0106"], ["v", "V"], ["b", "B"], ["n", "N", "\u0144", "\u0143"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["pl"] };
+
+ this.VKI_layout['Portugu\u00eas Brasileiro'] = {
+ 'name': "Portuguese (Brazil)", 'keys': [
+ [["'", '"'], ["1", "!", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a3"], ["5", "%", "\u00a2"], ["6", "\u00a8", "\u00ac"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+", "\u00a7"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "/"], ["w", "W", "?"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00b4", "`"], ["[", "{", "\u00aa"], ["Enter", "Enter"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00e7", "\u00c7"], ["~", "^"], ["]", "}", "\u00ba"], ["/", "?"]],
+ [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C", "\u20a2"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], [":", ":"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["pt-BR"] };
+
+ this.VKI_layout['Portugu\u00eas'] = {
+ 'name': "Portuguese", 'keys': [
+ [["\\", "|"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "$", "\u00a7"], ["5", "%"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["'", "?"], ["\u00ab", "\u00bb"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["+", "*", "\u00a8"], ["\u00b4", "`"], ["~", "^"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00e7", "\u00c7"], ["\u00ba", "\u00aa"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\\"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["pt"] };
+
+ this.VKI_layout['Rom\u00e2n\u0103'] = {
+ 'name': "Romanian", 'keys': [
+ [["\u201E", "\u201D", "`", "~"], ["1", "!", "~"], ["2", "@", "\u02C7"], ["3", "#", "^"], ["4", "$", "\u02D8"], ["5", "%", "\u00B0"], ["6", "^", "\u02DB"], ["7", "&", "`"], ["8", "*", "\u02D9"], ["9", "(", "\u00B4"], ["0", ")", "\u02DD"], ["-", "_", "\u00A8"], ["=", "+", "\u00B8", "\u00B1"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P", "\u00A7"], ["\u0103", "\u0102", "[", "{"], ["\u00EE", "\u00CE", "]", "}"], ["\u00E2", "\u00C2", "\\", "|"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u00df"], ["d", "D", "\u00f0", "\u00D0"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u0142", "\u0141"], [(this.VKI_isIElt8) ? "\u015F" : "\u0219", (this.VKI_isIElt8) ? "\u015E" : "\u0218", ";", ":"], [(this.VKI_isIElt8) ? "\u0163" : "\u021B", (this.VKI_isIElt8) ? "\u0162" : "\u021A", "\'", "\""], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C", "\u00A9"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";", "<", "\u00AB"], [".", ":", ">", "\u00BB"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["ro"] };
+
+ this.VKI_layout['\u0420\u0443\u0441\u0441\u043a\u0438\u0439'] = {
+ 'name': "Russian", 'keys': [
+ [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["/", "|"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["ru"] };
+
+ this.VKI_layout['Schweizerdeutsch'] = {
+ 'name': "Swiss German", 'keys': [
+ [["\u00A7", "\u00B0"], ["1", "+", "\u00A6"], ["2", '"', "@"], ["3", "*", "#"], ["4", "\u00E7", "\u00B0"], ["5", "%", "\u00A7"], ["6", "&", "\u00AC"], ["7", "/", "|"], ["8", "(", "\u00A2"], ["9", ")"], ["0", "="], ["'", "?", "\u00B4"], ["^", "`", "~"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00FC", "\u00E8", "["], ["\u00A8", "!", "]"], ["$", "\u00A3", "}"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00F6", "\u00E9"], ["\u00E4", "\u00E0", "{"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\\"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["de-CH"] };
+
+ this.VKI_layout['Shqip'] = {
+ 'name': "Albanian", 'keys': [
+ [["\\", "|"], ["1", "!", "~"], ["2", '"', "\u02C7"], ["3", "#", "^"], ["4", "$", "\u02D8"], ["5", "%", "\u00B0"], ["6", "^", "\u02DB"], ["7", "&", "`"], ["8", "*", "\u02D9"], ["9", "(", "\u00B4"], ["0", ")", "\u02DD"], ["-", "_", "\u00A8"], ["=", "+", "\u00B8"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00E7", "\u00C7", "\u00F7"], ["[", "{", "\u00DF"], ["]", "}", "\u00A4"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J"], ["k", "K", "\u0142"], ["l", "L", "\u0141"], ["\u00EB", "\u00CB", "$"], ["@", "'", "\u00D7"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "\u00A7"], [",", ";", "<"], [".", ":", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["sq"] };
+
+ this.VKI_layout['Sloven\u010dina'] = {
+ 'name': "Slovak", 'keys': [
+ [[";", "\u00b0"], ["+", "1", "~"], ["\u013E", "2", "\u02C7"], ["\u0161", "3", "^"], ["\u010D", "4", "\u02D8"], ["\u0165", "5", "\u00B0"], ["\u017E", "6", "\u02DB"], ["\u00FD", "7", "`"], ["\u00E1", "8", "\u02D9"], ["\u00ED", "9", "\u00B4"], ["\u00E9", "0", "\u02DD"], ["=", "%", "\u00A8"], ["\u00B4", "\u02c7", "\u00B8"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P", "'"], ["\u00FA", "/", "\u00F7"], ["\u00E4", "(", "\u00D7"], ["\u0148", ")", "\u00A4"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J"], ["k", "K", "\u0142"], ["l", "L", "\u0141"], ["\u00F4", '"', "$"], ["\u00A7", "!", "\u00DF"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["&", "*", "<"], ["y", "Y", ">"], ["x", "X", "#"], ["c", "C", "&"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M"], [",", "?", "<"], [".", ":", ">"], ["-", "_", "*", ], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["sk"] };
+
+ this.VKI_layout['Sloven\u0161\u010dina'] = {
+ 'name': "Slovenian", 'keys': this.VKI_layout['Bosanski'].keys.slice(0), 'lang': ["sl"]
+ };
+
+ this.VKI_layout['\u0441\u0440\u043f\u0441\u043a\u0438'] = {
+ 'name': "Serbian Cyrillic", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", '"'], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "&"], ["7", "/"], ["8", "("], ["9", ")"], ["0", "="], ["'", "?"], ["+", "*"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0459", "\u0409"], ["\u045a", "\u040a"], ["\u0435", "\u0415", "\u20ac"], ["\u0440", "\u0420"], ["\u0442", "\u0422"], ["\u0437", "\u0417"], ["\u0443", "\u0423"], ["\u0438", "\u0418"], ["\u043e", "\u041e"], ["\u043f", "\u041f"], ["\u0448", "\u0428"], ["\u0452", "\u0402"], ["\u0436", "\u0416"]],
+ [["Caps", "Caps"], ["\u0430", "\u0410"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0444", "\u0424"], ["\u0433", "\u0413"], ["\u0445", "\u0425"], ["\u0458", "\u0408"], ["\u043a", "\u041a"], ["\u043b", "\u041b"], ["\u0447", "\u0427"], ["\u045b", "\u040b"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">"], ["\u0455", "\u0405"], ["\u045f", "\u040f"], ["\u0446", "\u0426"], ["\u0432", "\u0412"], ["\u0431", "\u0411"], ["\u043d", "\u041d"], ["\u043c", "\u041c"], [",", ";", "<"], [".", ":", ">"], ["-", "_", "\u00a9"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["sr-Cyrl"] };
+
+ this.VKI_layout['Srpski'] = {
+ 'name': "Serbian Latin", 'keys': this.VKI_layout['Bosanski'].keys.slice(0), 'lang': ["sr"]
+ };
+
+ this.VKI_layout['Suomi'] = {
+ 'name': "Finnish", 'keys': [
+ [["\u00a7", "\u00BD"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00A3"], ["4", "\u00A4", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?", "\\"], ["\u00B4", "`"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\u00E2", "\u00C2"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T", "\u0167", "\u0166"], ["y", "Y"], ["u", "U"], ["i", "I", "\u00ef", "\u00CF"], ["o", "O", "\u00f5", "\u00D5"], ["p", "P"], ["\u00E5", "\u00C5"], ["\u00A8", "^", "~"], ["'", "*"]],
+ [["Caps", "Caps"], ["a", "A", "\u00E1", "\u00C1"], ["s", "S", "\u0161", "\u0160"], ["d", "D", "\u0111", "\u0110"], ["f", "F", "\u01e5", "\u01E4"], ["g", "G", "\u01E7", "\u01E6"], ["h", "H", "\u021F", "\u021e"], ["j", "J"], ["k", "K", "\u01e9", "\u01E8"], ["l", "L"], ["\u00F6", "\u00D6", "\u00F8", "\u00D8"], ["\u00E4", "\u00C4", "\u00E6", "\u00C6"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z", "\u017E", "\u017D"], ["x", "X"], ["c", "C", "\u010d", "\u010C"], ["v", "V", "\u01EF", "\u01EE"], ["b", "B", "\u0292", "\u01B7"], ["n", "N", "\u014B", "\u014A"], ["m", "M", "\u00B5"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [["Alt", "Alt"], [" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["fi"] };
+
+ this.VKI_layout['Svenska'] = {
+ 'name': "Swedish", 'keys': [
+ [["\u00a7", "\u00bd"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "\u00a4", "$"], ["5", "%", "\u20ac"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?", "\\"], ["\u00b4", "`"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e5", "\u00c5"], ["\u00a8", "^", "~"], ["'", "*"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f6", "\u00d6"], ["\u00e4", "\u00c4"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u03bc", "\u039c"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["sv"] };
+
+ this.VKI_layout['Swiss Fran\u00e7ais'] = {
+ 'name': "Swiss French", 'keys': [
+ [["\u00A7", "\u00B0"], ["1", "+", "\u00A6"], ["2", '"', "@"], ["3", "*", "#"], ["4", "\u00E7", "\u00B0"], ["5", "%", "\u00A7"], ["6", "&", "\u00AC"], ["7", "/", "|"], ["8", "(", "\u00A2"], ["9", ")"], ["0", "="], ["'", "?", "\u00B4"], ["^", "`", "~"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00E8", "\u00FC", "["], ["\u00A8", "!", "]"], ["$", "\u00A3", "}"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00E9", "\u00F6"], ["\u00E0", "\u00E4", "{"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "\\"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["fr-CH"] };
+
+ this.VKI_layout['\u0723\u0718\u072a\u071d\u071d\u0710'] = {
+ 'name': "Syriac", 'keys': [
+ [["\u070f", "\u032e", "\u0651", "\u0651"], ["1", "!", "\u0701", "\u0701"], ["2", "\u030a", "\u0702", "\u0702"], ["3", "\u0325", "\u0703", "\u0703"], ["4", "\u0749", "\u0704", "\u0704"], ["5", "\u2670", "\u0705", "\u0705"], ["6", "\u2671", "\u0708", "\u0708"], ["7", "\u070a", "\u0709", "\u0709"], ["8", "\u00bb", "\u070B", "\u070B"], ["9", ")", "\u070C", "\u070C"], ["0", "(", "\u070D", "\u070D"], ["-", "\u00ab", "\u250C", "\u250C"], ["=", "+", "\u2510", "\u2510"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0714", "\u0730", "\u064E", "\u064E"], ["\u0728", "\u0733", "\u064B", "\u064B"], ["\u0716", "\u0736", "\u064F", "\u064F"], ["\u0729", "\u073A", "\u064C", "\u064C"], ["\u0726", "\u073D", "\u0653", "\u0653"], ["\u071c", "\u0740", "\u0654", "\u0654"], ["\u0725", "\u0741", "\u0747", "\u0747"], ["\u0717", "\u0308", "\u0743", "\u0743"], ["\u071e", "\u0304", "\u0745", "\u0745"], ["\u071a", "\u0307", "\u032D", "\u032D"], ["\u0713", "\u0303"], ["\u0715", "\u074A"], ["\u0706", ":"]],
+ [["Caps", "Caps"], ["\u072b", "\u0731", "\u0650", "\u0650"], ["\u0723", "\u0734", "\u064d", "\u064d"], ["\u071d", "\u0737"], ["\u0712", "\u073b", "\u0621", "\u0621"], ["\u0720", "\u073e", "\u0655", "\u0655"], ["\u0710", "\u0711", "\u0670", "\u0670"], ["\u072c", "\u0640", "\u0748", "\u0748"], ["\u0722", "\u0324", "\u0744", "\u0744"], ["\u0721", "\u0331", "\u0746", "\u0746"], ["\u071f", "\u0323"], ["\u071b", "\u0330"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["]", "\u0732"], ["[", "\u0735", "\u0652", "\u0652"], ["\u0724", "\u0738"], ["\u072a", "\u073c", "\u200D"], ["\u0727", "\u073f", "\u200C"], ["\u0700", "\u0739", "\u200E"], [".", "\u0742", "\u200F"], ["\u0718", "\u060c"], ["\u0719", "\u061b"], ["\u0707", "\u061F"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["syc"] };
+
+ this.VKI_layout['\u0ba4\u0bae\u0bbf\u0bb4\u0bcd'] = {
+ 'name': "Tamil", 'keys': [
+ [["\u0BCA", "\u0B92"], ["1", "", "\u0BE7"], ["2", "", "\u0BE8"], ["3", "", "\u0BE9"], ["4", "", "\u0BEA"], ["5", "", "\u0BEB"], ["6", "\u0BA4\u0BCD\u0BB0", "\u0BEC"], ["7", "\u0B95\u0BCD\u0BB7", "\u0BED"], ["8", "\u0BB7\u0BCD\u0BB0", "\u0BEE"], ["9", "", "\u0BEF"], ["0", "", "\u0BF0"], ["-", "\u0B83", "\u0BF1"], ["", "", "\u0BF2"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0BCC", "\u0B94"], ["\u0BC8", "\u0B90"], ["\u0BBE", "\u0B86"], ["\u0BC0", "\u0B88"], ["\u0BC2", "\u0B8A"], ["\u0BAA", "\u0BAA"], ["\u0BB9", "\u0B99"], ["\u0B95", "\u0B95"], ["\u0BA4", "\u0BA4"], ["\u0B9C", "\u0B9A"], ["\u0B9F", "\u0B9F"], ["\u0B9E"]],
+ [["Caps", "Caps"], ["\u0BCB", "\u0B93"], ["\u0BC7", "\u0B8F"], ["\u0BCD", "\u0B85"], ["\u0BBF", "\u0B87"], ["\u0BC1", "\u0B89"], ["\u0BAA", "\u0BAA"], ["\u0BB0", "\u0BB1"], ["\u0B95", "\u0B95"], ["\u0BA4", "\u0BA4"], ["\u0B9A", "\u0B9A"], ["\u0B9F", "\u0B9F"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0BC6", "\u0B8E"], [""], ["\u0BAE", "\u0BA3"], ["\u0BA8", "\u0BA9"], ["\u0BB5", "\u0BB4"], ["\u0BB2", "\u0BB3"], ["\u0BB8", "\u0BB7"], [",", "\u0BB7"], [".", "\u0BB8\u0BCD\u0BB0\u0BC0"], ["\u0BAF", "\u0BAF"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["ta"] };
+
+ this.VKI_layout['\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41'] = {
+ 'name': "Telugu", 'keys': [
+ [["\u0C4A", "\u0C12"], ["1", "", "\u0C67"], ["2", "", "\u0C68"], ["3", "\u0C4D\u0C30", "\u0C69"], ["4", "", "\u0C6A"], ["5", "\u0C1C\u0C4D\u0C1E", "\u0C6B"], ["6", "\u0C24\u0C4D\u0C30", "\u0C6C"], ["7", "\u0C15\u0C4D\u0C37", "\u0C6D"], ["8", "\u0C36\u0C4D\u0C30", "\u0C6E"], ["9", "(", "\u0C6F"], ["0", ")", "\u0C66"], ["-", "\u0C03"], ["\u0C43", "\u0C0B", "\u0C44"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0C4C", "\u0C14"], ["\u0C48", "\u0C10", "\u0C56"], ["\u0C3E", "\u0C06"], ["\u0C40", "\u0C08", "", "\u0C61"], ["\u0C42", "\u0C0A"], ["\u0C2C"], ["\u0C39", "\u0C19"], ["\u0C17", "\u0C18"], ["\u0C26", "\u0C27"], ["\u0C1C", "\u0C1D"], ["\u0C21", "\u0C22"], ["", "\u0C1E"]],
+ [["Caps", "Caps"], ["\u0C4B", "\u0C13"], ["\u0C47", "\u0C0F", "\u0C55"], ["\u0C4D", "\u0C05"], ["\u0C3F", "\u0C07", "", "\u0C0C"], ["\u0C41", "\u0C09"], ["\u0C2A", "\u0C2B"], ["\u0C30", "\u0C31"], ["\u0C15", "\u0C16"], ["\u0C24", "\u0C25"], ["\u0C1A", "\u0C1B"], ["\u0C1F", "\u0C25"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0C46", "\u0C0E"], ["\u0C02", "\u0C01"], ["\u0C2E", "\u0C23"], ["\u0C28", "\u0C28"], ["\u0C35"], ["\u0C32", "\u0C33"], ["\u0C38", "\u0C36"], [",", "\u0C37"], ["."], ["\u0C2F"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["te"] };
+
+ this.VKI_layout['Ti\u1ebfng Vi\u1ec7t'] = {
+ 'name': "Vietnamese", 'keys': [
+ [["`", "~", "`", "~"], ["\u0103", "\u0102", "1", "!"], ["\u00E2", "\u00C2", "2", "@"], ["\u00EA", "\u00CA", "3", "#"], ["\u00F4", "\u00D4", "4", "$"], ["\u0300", "\u0300", "5", "%"], ["\u0309", "\u0309", "6", "^"], ["\u0303", "\u0303", "7", "&"], ["\u0301", "\u0301", "8", "*"], ["\u0323", "\u0323", "9", "("], ["\u0111", "\u0110", "0", ")"], ["-", "_", "-", "_"], ["\u20AB", "+", "=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "q", "Q"], ["w", "W", "w", "W"], ["e", "E", "e", "E"], ["r", "R", "r", "R"], ["t", "T", "t", "T"], ["y", "Y", "y", "Y"], ["u", "U", "u", "U"], ["i", "I", "i", "I"], ["o", "O", "o", "O"], ["p", "P", "p", "P"], ["\u01B0", "\u01AF", "[", "{"], ["\u01A1", "\u01A0", "]", "}"], ["\\", "|", "\\", "|"]],
+ [["Caps", "Caps"], ["a", "A", "a", "A"], ["s", "S", "s", "S"], ["d", "D", "d", "D"], ["f", "F", "f", "F"], ["g", "G", "g", "G"], ["h", "H", "h", "H"], ["j", "J", "j", "J"], ["k", "K", "k", "K"], ["l", "L", "l", "L"], [";", ":", ";", ":"], ["'", '"', "'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["z", "Z", "z", "Z"], ["x", "X", "x", "X"], ["c", "C", "c", "C"], ["v", "V", "v", "V"], ["b", "B", "b", "B"], ["n", "N", "n", "N"], ["m", "M", "m", "M"], [",", "<", ",", "<"], [".", ">", ".", ">"], ["/", "?", "/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["vi"] };
+
+ this.VKI_layout['\u0e44\u0e17\u0e22 Kedmanee'] = {
+ 'name': "Thai Kedmanee", 'keys': [
+ [["_", "%"], ["\u0E45", "+"], ["/", "\u0E51"], ["-", "\u0E52"], ["\u0E20", "\u0E53"], ["\u0E16", "\u0E54"], ["\u0E38", "\u0E39"], ["\u0E36", "\u0E3F"], ["\u0E04", "\u0E55"], ["\u0E15", "\u0E56"], ["\u0E08", "\u0E57"], ["\u0E02", "\u0E58"], ["\u0E0A", "\u0E59"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0E46", "\u0E50"], ["\u0E44", '"'], ["\u0E33", "\u0E0E"], ["\u0E1E", "\u0E11"], ["\u0E30", "\u0E18"], ["\u0E31", "\u0E4D"], ["\u0E35", "\u0E4A"], ["\u0E23", "\u0E13"], ["\u0E19", "\u0E2F"], ["\u0E22", "\u0E0D"], ["\u0E1A", "\u0E10"], ["\u0E25", ","], ["\u0E03", "\u0E05"]],
+ [["Caps", "Caps"], ["\u0E1F", "\u0E24"], ["\u0E2B", "\u0E06"], ["\u0E01", "\u0E0F"], ["\u0E14", "\u0E42"], ["\u0E40", "\u0E0C"], ["\u0E49", "\u0E47"], ["\u0E48", "\u0E4B"], ["\u0E32", "\u0E29"], ["\u0E2A", "\u0E28"], ["\u0E27", "\u0E0B"], ["\u0E07", "."], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0E1C", "("], ["\u0E1B", ")"], ["\u0E41", "\u0E09"], ["\u0E2D", "\u0E2E"], ["\u0E34", "\u0E3A"], ["\u0E37", "\u0E4C"], ["\u0E17", "?"], ["\u0E21", "\u0E12"], ["\u0E43", "\u0E2C"], ["\u0E1D", "\u0E26"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["th"] };
+
+ this.VKI_layout['\u0e44\u0e17\u0e22 Pattachote'] = {
+ 'name': "Thai Pattachote", 'keys': [
+ [["_", "\u0E3F"], ["=", "+"], ["\u0E52", '"'], ["\u0E53", "/"], ["\u0E54", ","], ["\u0E55", "?"], ["\u0E39", "\u0E38"], ["\u0E57", "_"], ["\u0E58", "."], ["\u0E59", "("], ["\u0E50", ")"], ["\u0E51", "-"], ["\u0E56", "%"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0E47", "\u0E4A"], ["\u0E15", "\u0E24"], ["\u0E22", "\u0E46"], ["\u0E2D", "\u0E0D"], ["\u0E23", "\u0E29"], ["\u0E48", "\u0E36"], ["\u0E14", "\u0E1D"], ["\u0E21", "\u0E0B"], ["\u0E27", "\u0E16"], ["\u0E41", "\u0E12"], ["\u0E43", "\u0E2F"], ["\u0E0C", "\u0E26"], ["\uF8C7", "\u0E4D"]],
+ [["Caps", "Caps"], ["\u0E49", "\u0E4B"], ["\u0E17", "\u0E18"], ["\u0E07", "\u0E33"], ["\u0E01", "\u0E13"], ["\u0E31", "\u0E4C"], ["\u0E35", "\u0E37"], ["\u0E32", "\u0E1C"], ["\u0E19", "\u0E0A"], ["\u0E40", "\u0E42"], ["\u0E44", "\u0E06"], ["\u0E02", "\u0E11"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0E1A", "\u0E0E"], ["\u0E1B", "\u0E0F"], ["\u0E25", "\u0E10"], ["\u0E2B", "\u0E20"], ["\u0E34", "\u0E31"], ["\u0E04", "\u0E28"], ["\u0E2A", "\u0E2E"], ["\u0E30", "\u0E1F"], ["\u0E08", "\u0E09"], ["\u0E1E", "\u0E2C"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ]};
+
+ this.VKI_layout['\u0422\u0430\u0442\u0430\u0440\u0447\u0430'] = {
+ 'name': "Tatar", 'keys': [
+ [["\u04BB", "\u04BA", "\u0451", "\u0401"], ["1", "!"], ["2", '"', "@"], ["3", "\u2116", "#"], ["4", ";", "$"], ["5", "%"], ["6", ":"], ["7", "?", "["], ["8", "*", "]"], ["9", "(", "{"], ["0", ")", "}"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u04E9", "\u04E8", "\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u04D9", "\u04D8", "\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u04AF", "\u04AE", "\u044A", "\u042A"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u04A3", "\u04A2", "\u0436", "\u0416"], ["\u044D", "\u042D", "'"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0491", "\u0490"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u0497", "\u0496", "\u044C", "\u042C"], ["\u0431", "\u0411", "<"], ["\u044E", "\u042E", ">"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["tt"] };
+
+ this.VKI_layout['T\u00fcrk\u00e7e F'] = {
+ 'name': "Turkish F", 'keys': [
+ [['+', "*", "\u00ac"], ["1", "!", "\u00b9", "\u00a1"], ["2", '"', "\u00b2"], ["3", "^", "#", "\u00b3"], ["4", "$", "\u00bc", "\u00a4"], ["5", "%", "\u00bd"], ["6", "&", "\u00be"], ["7", "'", "{"], ["8", "(", '['], ["9", ")", ']'], ["0", "=", "}"], ["/", "?", "\\", "\u00bf"], ["-", "_", "|"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["f", "F", "@"], ["g", "G"], ["\u011f", "\u011e"], ["\u0131", "I", "\u00b6", "\u00ae"], ["o", "O"], ["d", "D", "\u00a5"], ["r", "R"], ["n", "N"], ["h", "H", "\u00f8", "\u00d8"], ["p", "P", "\u00a3"], ["q", "Q", "\u00a8"], ["w", "W", "~"], ["x", "X", "`"]],
+ [["Caps", "Caps"], ["u", "U", "\u00e6", "\u00c6"], ["i", "\u0130", "\u00df", "\u00a7"], ["e", "E", "\u20ac"], ["a", "A", " ", "\u00aa"], ["\u00fc", "\u00dc"], ["t", "T"], ["k", "K"], ["m", "M"], ["l", "L"], ["y", "Y", "\u00b4"], ["\u015f", "\u015e"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "|", "\u00a6"], ["j", "J", "\u00ab", "<"], ["\u00f6", "\u00d6", "\u00bb", ">"], ["v", "V", "\u00a2", "\u00a9"], ["c", "C"], ["\u00e7", "\u00c7"], ["z", "Z"], ["s", "S", "\u00b5", "\u00ba"], ["b", "B", "\u00d7"], [".", ":", "\u00f7"], [",", ";", "-"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ]};
+
+ this.VKI_layout['T\u00fcrk\u00e7e Q'] = {
+ 'name': "Turkish Q", 'keys': [
+ [['"', "\u00e9", "<"], ["1", "!", ">"], ["2", "'", "\u00a3"], ["3", "^", "#"], ["4", "+", "$"], ["5", "%", "\u00bd"], ["6", "&"], ["7", "/", "{"], ["8", "(", '['], ["9", ")", ']'], ["0", "=", "}"], ["*", "?", "\\"], ["-", "_", "|"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "@"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["\u0131", "I", "i", "\u0130"], ["o", "O"], ["p", "P"], ["\u011f", "\u011e", "\u00a8"], ["\u00fc", "\u00dc", "~"], [",", ";", "`"]],
+ [["Caps", "Caps"], ["a", "A", "\u00e6", "\u00c6"], ["s", "S", "\u00df"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u015f", "\u015e", "\u00b4"], ["i", "\u0130"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], ["\u00f6", "\u00d6"], ["\u00e7", "\u00c7"], [".", ":"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["tr"] };
+
+ this.VKI_layout['\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430'] = {
+ 'name': "Ukrainian", 'keys': [
+ [["\u00b4", "~"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u0457", "\u0407"], ["\u0491", "\u0490"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u0456", "\u0406"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u0454", "\u0404"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["uk"] };
+
+ this.VKI_layout['United Kingdom'] = {
+ 'name': "United Kingdom", 'keys': [
+ [["`", "\u00ac", "\u00a6"], ["1", "!"], ["2", '"'], ["3", "\u00a3"], ["4", "$", "\u20ac"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u00e9", "\u00c9"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U", "\u00fa", "\u00da"], ["i", "I", "\u00ed", "\u00cd"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P"], ["[", "{"], ["]", "}"], ["#", "~"]],
+ [["Caps", "Caps"], ["a", "A", "\u00e1", "\u00c1"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", "@"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
+ ], 'lang': ["en-gb"] };
+
+ this.VKI_layout['\u0627\u0631\u062f\u0648'] = {
+ 'name': "Urdu", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "\u066A"], ["6", "^"], ["7", "\u06D6"], ["8", "\u066D"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0637", "\u0638"], ["\u0635", "\u0636"], ["\u06be", "\u0630"], ["\u062f", "\u0688"], ["\u0679", "\u062B"], ["\u067e", "\u0651"], ["\u062a", "\u06C3"], ["\u0628", "\u0640"], ["\u062c", "\u0686"], ["\u062d", "\u062E"], ["]", "}"], ["[", "{"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u0645", "\u0698"], ["\u0648", "\u0632"], ["\u0631", "\u0691"], ["\u0646", "\u06BA"], ["\u0644", "\u06C2"], ["\u06c1", "\u0621"], ["\u0627", "\u0622"], ["\u06A9", "\u06AF"], ["\u06CC", "\u064A"], ["\u061b", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0642", "\u200D"], ["\u0641", "\u200C"], ["\u06D2", "\u06D3"], ["\u0633", "\u200E"], ["\u0634", "\u0624"], ["\u063a", "\u0626"], ["\u0639", "\u200F"], ["\u060C", ">"], ["\u06D4", "<"], ["/", "\u061F"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["ur"] };
+
+ this.VKI_layout['\u0627\u0631\u062f\u0648 Phonetic'] = {
+ 'name': "Urdu Phonetic", 'keys': [
+ [["\u064D", "\u064B", "~"], ["\u06F1", "1", "!"], ["\u06F2", "2", "@"], ["\u06F3", "3", "#"], ["\u06F4", "4", "$"], ["\u06F5", "5", "\u066A"], ["\u06F6", "6", "^"], ["\u06F7", "7", "&"], ["\u06F8", "8", "*"], ["\u06F9", "9", "("], ["\u06F0", "0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0642", "\u0652"], ["\u0648", "\u0651", "\u0602"], ["\u0639", "\u0670", "\u0656"], ["\u0631", "\u0691", "\u0613"], ["\u062A", "\u0679", "\u0614"], ["\u06D2", "\u064E", "\u0601"], ["\u0621", "\u0626", "\u0654"], ["\u06CC", "\u0650", "\u0611"], ["\u06C1", "\u06C3"], ["\u067E", "\u064F", "\u0657"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u0627", "\u0622", "\uFDF2"], ["\u0633", "\u0635", "\u0610"], ["\u062F", "\u0688", "\uFDFA"], ["\u0641"], ["\u06AF", "\u063A"], ["\u062D", "\u06BE", "\u0612"], ["\u062C", "\u0636", "\uFDFB"], ["\u06A9", "\u062E"], ["\u0644"], ["\u061B", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u0632", "\u0630", "\u060F"], ["\u0634", "\u0698", "\u060E"], ["\u0686", "\u062B", "\u0603"], ["\u0637", "\u0638"], ["\u0628", "", "\uFDFD"], ["\u0646", "\u06BA", "\u0600"], ["\u0645", "\u0658"], ["\u060C", "", "<"], ["\u06D4", "\u066B", ">"], ["/", "\u061F"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ]};
+
+ this.VKI_layout['US Standard'] = {
+ 'name': "US Standard", 'keys': [
+ [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["en-us"] };
+
+ this.VKI_layout['US International'] = {
+ 'name': "US International", 'keys': [
+ [["`", "~"], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["q", "Q", "\u00e4", "\u00c4"], ["w", "W", "\u00e5", "\u00c5"], ["e", "E", "\u00e9", "\u00c9"], ["r", "R", "\u00ae"], ["t", "T", "\u00fe", "\u00de"], ["y", "Y", "\u00fc", "\u00dc"], ["u", "U", "\u00fa", "\u00da"], ["i", "I", "\u00ed", "\u00cd"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P", "\u00f6", "\u00d6"], ["[", "{", "\u00ab"], ["]", "}", "\u00bb"], ["\\", "|", "\u00ac", "\u00a6"]],
+ [["Caps", "Caps"], ["a", "A", "\u00e1", "\u00c1"], ["s", "S", "\u00df", "\u00a7"], ["d", "D", "\u00f0", "\u00d0"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u00f8", "\u00d8"], [";", ":", "\u00b6", "\u00b0"], ["'", '"', "\u00b4", "\u00a8"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["z", "Z", "\u00e6", "\u00c6"], ["x", "X"], ["c", "C", "\u00a9", "\u00a2"], ["v", "V"], ["b", "B"], ["n", "N", "\u00f1", "\u00d1"], ["m", "M", "\u00b5"], [",", "<", "\u00e7", "\u00c7"], [".", ">"], ["/", "?", "\u00bf"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["en"] };
+
+ this.VKI_layout['\u040e\u0437\u0431\u0435\u043a\u0447\u0430'] = {
+ 'name': "Uzbek Cyrillic", 'keys': [
+ [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["\u0493", "\u0492"], ["\u04B3", "\u04B2"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u045E", "\u040E"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
+ [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u049B", "\u049A"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["uz"] };
+
+ this.VKI_layout['\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9'] = { // from http://www.yv.org/uyip/hebyidkbd.txt http://uyip.org/keyboards.html
+ 'name': "Yiddish", 'keys': [
+ [[";", "~", "\u05B0"], ["1", "!", "\u05B1"], ["2", "@", "\u05B2"], ["3", "#", "\u05B3"], ["4", "$", "\u05B4"], ["5", "%", "\u05B5"], ["6", "^", "\u05B6"], ["7", "*", "\u05B7"], ["8", "&", "\u05B8"], ["9", "(", "\u05C2"], ["0", ")", "\u05C1"], ["-", "_", "\u05B9"], ["=", "+", "\u05BC"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["/", "\u201F", "\u201F"], ["'", "\u201E", "\u201E"], ["\u05E7", "`", "`"], ["\u05E8", "\uFB2F", "\uFB2F"], ["\u05D0", "\uFB2E", "\uFB2E"], ["\u05D8", "\u05F0", "\u05F0"], ["\u05D5", "\uFB35", "\uFB35"], ["\u05DF", "\uFB4B", "\uFB4B"], ["\u05DD", "\uFB4E", "\uFB4E"], ["\u05E4", "\uFB44", "\uFB44"], ["[", "{", "\u05BD"], ["]", "}", "\u05BF"], ["\\", "|", "\u05BB"]],
+ [["Caps", "Caps"], ["\u05E9", "\uFB2A", "\uFB2A"], ["\u05D3", "\uFB2B", "\uFB2B"], ["\u05D2"], ["\u05DB", "\uFB3B", "\uFB3B"], ["\u05E2", "\u05F1", "\u05F1"], ["\u05D9", "\uFB1D", "\uFB1D"], ["\u05D7", "\uFF1F", "\uFF1F"], ["\u05DC", "\u05F2", "\u05F2"], ["\u05DA"], ["\u05E3", ":", "\u05C3"], [",", '"', "\u05C0"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u05D6", "\u2260", "\u2260"], ["\u05E1", "\uFB4C", "\uFB4C"], ["\u05D1", "\uFB31", "\uFB31"], ["\u05D4", "\u05BE", "\u05BE"], ["\u05E0", "\u2013", "\u2013"], ["\u05DE", "\u2014", "\u2014"], ["\u05E6", "\uFB4A", "\uFB4A"], ["\u05EA", "<", "\u05F3"], ["\u05E5", ">", "\u05F4"], [".", "?", "\u20AA"], ["Shift", "Shift"]],
+ [[" ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["yi"] };
+
+ this.VKI_layout['\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 \u05dc\u05e2\u05d1\u05d8'] = { // from http://jidysz.net/
+ 'name': "Yiddish (Yidish Lebt)", 'keys': [
+ [[";", "~"], ["1", "!", "\u05B2", "\u05B2"], ["2", "@", "\u05B3", "\u05B3"], ["3", "#", "\u05B1", "\u05B1"], ["4", "$", "\u05B4", "\u05B4"], ["5", "%", "\u05B5", "\u05B5"], ["6", "^", "\u05B7", "\u05B7"], ["7", "&", "\u05B8", "\u05B8"], ["8", "*", "\u05BB", "\u05BB"], ["9", ")", "\u05B6", "\u05B6"], ["0", "(", "\u05B0", "\u05B0"], ["-", "_", "\u05BF", "\u05BF"], ["=", "+", "\u05B9", "\u05B9"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["/", "", "\u05F4", "\u05F4"], ["'", "", "\u05F3", "\u05F3"], ["\u05E7", "", "\u20AC"], ["\u05E8"], ["\u05D0", "", "\u05D0\u05B7", "\uFB2E"], ["\u05D8", "", "\u05D0\u05B8", "\uFB2F"], ["\u05D5", "\u05D5\u05B9", "\u05D5\u05BC", "\uFB35"], ["\u05DF", "", "\u05D5\u05D5", "\u05F0"], ["\u05DD", "", "\u05BC"], ["\u05E4", "", "\u05E4\u05BC", "\uFB44"], ["]", "}", "\u201E", "\u201D"], ["[", "{", "\u201A", "\u2019"], ["\\", "|", "\u05BE", "\u05BE"]],
+ [["Caps", "Caps"], ["\u05E9", "\u05E9\u05C1", "\u05E9\u05C2", "\uFB2B"], ["\u05D3", "", "\u20AA"], ["\u05D2", "\u201E"], ["\u05DB", "", "\u05DB\u05BC", "\uFB3B"], ["\u05E2", "", "", "\uFB20"], ["\u05D9", "", "\u05D9\u05B4", "\uFB1D"], ["\u05D7", "", "\u05F2\u05B7", "\uFB1F"], ["\u05DC", "\u05DC\u05B9", "\u05D5\u05D9", "\u05F1"], ["\u05DA", "", "", "\u05F2"], ["\u05E3", ":", "\u05E4\u05BF", "\uFB4E"], [",", '"', ";", "\u05B2"], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u05D6", "", "\u2013", "\u2013"], ["\u05E1", "", "\u2014", "\u2014"], ["\u05D1", "\u05DC\u05B9", "\u05D1\u05BF", "\uFB4C"], ["\u05D4", "", "\u201D", "\u201C"], ["\u05E0", "", "\u059C", "\u059E"], ["\u05DE", "", "\u2019", "\u2018"], ["\u05E6", "", "\u05E9\u05C1", "\uFB2A"], ["\u05EA", ">", "\u05EA\u05BC", "\uFB4A"], ["\u05E5", "<"], [".", "?", "\u2026"], ["Shift", "Shift"]],
+ [[" ", " ", " ", " "], ["Alt", "Alt"]]
+ ], 'lang': ["yi"] };
+
+ this.VKI_layout['\u4e2d\u6587\u6ce8\u97f3\u7b26\u53f7'] = {
+ 'name': "Chinese Bopomofo IME", 'keys': [
+ [["\u20AC", "~"], ["\u3105", "!"], ["\u3109", "@"], ["\u02C7", "#"], ["\u02CB", "$"], ["\u3113", "%"], ["\u02CA", "^"], ["\u02D9", "&"], ["\u311A", "*"], ["\u311E", ")"], ["\u3122", "("], ["\u3126", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u3106", "q"], ["\u310A", "w"], ["\u310D", "e"], ["\u3110", "r"], ["\u3114", "t"], ["\u3117", "y"], ["\u3127", "u"], ["\u311B", "i"], ["\u311F", "o"], ["\u3123", "p"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u3107", "a"], ["\u310B", "s"], ["\u310E", "d"], ["\u3111", "f"], ["\u3115", "g"], ["\u3118", "h"], ["\u3128", "j"], ["\u311C", "k"], ["\u3120", "l"], ["\u3124", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\u3108", "z"], ["\u310C", "x"], ["\u310F", "c"], ["\u3112", "v"], ["\u3116", "b"], ["\u3119", "n"], ["\u3129", "m"], ["\u311D", "<"], ["\u3121", ">"], ["\u3125", "?"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["zh-Bopo"] };
+
+ this.VKI_layout['\u4e2d\u6587\u4ed3\u9889\u8f93\u5165\u6cd5'] = {
+ 'name': "Chinese Cangjie IME", 'keys': [
+ [["\u20AC", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
+ [["Tab", "Tab"], ["\u624B", "q"], ["\u7530", "w"], ["\u6C34", "e"], ["\u53E3", "r"], ["\u5EFF", "t"], ["\u535C", "y"], ["\u5C71", "u"], ["\u6208", "i"], ["\u4EBA", "o"], ["\u5FC3", "p"], ["[", "{"], ["]", "}"], ["\\", "|"]],
+ [["Caps", "Caps"], ["\u65E5", "a"], ["\u5C38", "s"], ["\u6728", "d"], ["\u706B", "f"], ["\u571F", "g"], ["\u7AF9", "h"], ["\u5341", "j"], ["\u5927", "k"], ["\u4E2D", "l"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
+ [["Shift", "Shift"], ["\uFF3A", "z"], ["\u96E3", "x"], ["\u91D1", "c"], ["\u5973", "v"], ["\u6708", "b"], ["\u5F13", "n"], ["\u4E00", "m"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
+ [[" ", " "]]
+ ], 'lang': ["zh"] };
+
+
+ /* ***** Define Dead Keys ************************************** */
+ this.VKI_deadkey = {};
+
+ // - Lay out each dead key set as an object of property/value
+ // pairs. The rows below are wrapped so uppercase letters are
+ // below their lowercase equivalents.
+ //
+ // - The property name is the letter pressed after the diacritic.
+ // The property value is the letter this key-combo will generate.
+ //
+ // - Note that if you have created a new keyboard layout and want
+ // it included in the distributed script, PLEASE TELL ME if you
+ // have added additional dead keys to the ones below.
+
+ this.VKI_deadkey['"'] = this.VKI_deadkey['\u00a8'] = this.VKI_deadkey['\u309B'] = { // Umlaut / Diaeresis / Greek Dialytika / Hiragana/Katakana Voiced Sound Mark
+ 'a': "\u00e4", 'e': "\u00eb", 'i': "\u00ef", 'o': "\u00f6", 'u': "\u00fc", 'y': "\u00ff", '\u03b9': "\u03ca", '\u03c5': "\u03cb", '\u016B': "\u01D6", '\u00FA': "\u01D8", '\u01D4': "\u01DA", '\u00F9': "\u01DC",
+ 'A': "\u00c4", 'E': "\u00cb", 'I': "\u00cf", 'O': "\u00d6", 'U': "\u00dc", 'Y': "\u0178", '\u0399': "\u03aa", '\u03a5': "\u03ab", '\u016A': "\u01D5", '\u00DA': "\u01D7", '\u01D3': "\u01D9", '\u00D9': "\u01DB",
+ '\u304b': "\u304c", '\u304d': "\u304e", '\u304f': "\u3050", '\u3051': "\u3052", '\u3053': "\u3054", '\u305f': "\u3060", '\u3061': "\u3062", '\u3064': "\u3065", '\u3066': "\u3067", '\u3068': "\u3069",
+ '\u3055': "\u3056", '\u3057': "\u3058", '\u3059': "\u305a", '\u305b': "\u305c", '\u305d': "\u305e", '\u306f': "\u3070", '\u3072': "\u3073", '\u3075': "\u3076", '\u3078': "\u3079", '\u307b': "\u307c",
+ '\u30ab': "\u30ac", '\u30ad': "\u30ae", '\u30af': "\u30b0", '\u30b1': "\u30b2", '\u30b3': "\u30b4", '\u30bf': "\u30c0", '\u30c1': "\u30c2", '\u30c4': "\u30c5", '\u30c6': "\u30c7", '\u30c8': "\u30c9",
+ '\u30b5': "\u30b6", '\u30b7': "\u30b8", '\u30b9': "\u30ba", '\u30bb': "\u30bc", '\u30bd': "\u30be", '\u30cf': "\u30d0", '\u30d2': "\u30d3", '\u30d5': "\u30d6", '\u30d8': "\u30d9", '\u30db': "\u30dc"
+ };
+ this.VKI_deadkey['~'] = { // Tilde / Stroke
+ 'a': "\u00e3", 'l': "\u0142", 'n': "\u00f1", 'o': "\u00f5",
+ 'A': "\u00c3", 'L': "\u0141", 'N': "\u00d1", 'O': "\u00d5"
+ };
+ this.VKI_deadkey['^'] = { // Circumflex
+ 'a': "\u00e2", 'e': "\u00ea", 'i': "\u00ee", 'o': "\u00f4", 'u': "\u00fb", 'w': "\u0175", 'y': "\u0177",
+ 'A': "\u00c2", 'E': "\u00ca", 'I': "\u00ce", 'O': "\u00d4", 'U': "\u00db", 'W': "\u0174", 'Y': "\u0176"
+ };
+ this.VKI_deadkey['\u02c7'] = { // Baltic caron
+ 'c': "\u010D", 'd': "\u010f", 'e': "\u011b", 's': "\u0161", 'l': "\u013e", 'n': "\u0148", 'r': "\u0159", 't': "\u0165", 'u': "\u01d4", 'z': "\u017E", '\u00fc': "\u01da",
+ 'C': "\u010C", 'D': "\u010e", 'E': "\u011a", 'S': "\u0160", 'L': "\u013d", 'N': "\u0147", 'R': "\u0158", 'T': "\u0164", 'U': "\u01d3", 'Z': "\u017D", '\u00dc': "\u01d9"
+ };
+ this.VKI_deadkey['\u02d8'] = { // Romanian and Turkish breve
+ 'a': "\u0103", 'g': "\u011f",
+ 'A': "\u0102", 'G': "\u011e"
+ };
+ this.VKI_deadkey['-'] = this.VKI_deadkey['\u00af'] = { // Macron
+ 'a': "\u0101", 'e': "\u0113", 'i': "\u012b", 'o': "\u014d", 'u': "\u016B", 'y': "\u0233", '\u00fc': "\u01d6",
+ 'A': "\u0100", 'E': "\u0112", 'I': "\u012a", 'O': "\u014c", 'U': "\u016A", 'Y': "\u0232", '\u00dc': "\u01d5"
+ };
+ this.VKI_deadkey['`'] = { // Grave
+ 'a': "\u00e0", 'e': "\u00e8", 'i': "\u00ec", 'o': "\u00f2", 'u': "\u00f9", '\u00fc': "\u01dc",
+ 'A': "\u00c0", 'E': "\u00c8", 'I': "\u00cc", 'O': "\u00d2", 'U': "\u00d9", '\u00dc': "\u01db"
+ };
+ this.VKI_deadkey["'"] = this.VKI_deadkey['\u00b4'] = this.VKI_deadkey['\u0384'] = { // Acute / Greek Tonos
+ 'a': "\u00e1", 'e': "\u00e9", 'i': "\u00ed", 'o': "\u00f3", 'u': "\u00fa", 'y': "\u00fd", '\u03b1': "\u03ac", '\u03b5': "\u03ad", '\u03b7': "\u03ae", '\u03b9': "\u03af", '\u03bf': "\u03cc", '\u03c5': "\u03cd", '\u03c9': "\u03ce", '\u00fc': "\u01d8",
+ 'A': "\u00c1", 'E': "\u00c9", 'I': "\u00cd", 'O': "\u00d3", 'U': "\u00da", 'Y': "\u00dd", '\u0391': "\u0386", '\u0395': "\u0388", '\u0397': "\u0389", '\u0399': "\u038a", '\u039f': "\u038c", '\u03a5': "\u038e", '\u03a9': "\u038f", '\u00dc': "\u01d7"
+ };
+ this.VKI_deadkey['\u02dd'] = { // Hungarian Double Acute Accent
+ 'o': "\u0151", 'u': "\u0171",
+ 'O': "\u0150", 'U': "\u0170"
+ };
+ this.VKI_deadkey['\u0385'] = { // Greek Dialytika + Tonos
+ '\u03b9': "\u0390", '\u03c5': "\u03b0"
+ };
+ this.VKI_deadkey['\u00b0'] = this.VKI_deadkey['\u00ba'] = { // Ring
+ 'a': "\u00e5", 'u': "\u016f",
+ 'A': "\u00c5", 'U': "\u016e"
+ };
+ this.VKI_deadkey['\u02DB'] = { // Ogonek
+ 'a': "\u0106", 'e': "\u0119", 'i': "\u012f", 'o': "\u01eb", 'u': "\u0173", 'y': "\u0177",
+ 'A': "\u0105", 'E': "\u0118", 'I': "\u012e", 'O': "\u01ea", 'U': "\u0172", 'Y': "\u0176"
+ };
+ this.VKI_deadkey['\u02D9'] = { // Dot-above
+ 'c': "\u010B", 'e': "\u0117", 'g': "\u0121", 'z': "\u017C",
+ 'C': "\u010A", 'E': "\u0116", 'G': "\u0120", 'Z': "\u017B"
+ };
+ this.VKI_deadkey['\u00B8'] = this.VKI_deadkey['\u201a'] = { // Cedilla
+ 'c': "\u00e7", 's': "\u015F",
+ 'C': "\u00c7", 'S': "\u015E"
+ };
+ this.VKI_deadkey[','] = { // Comma
+ 's': (this.VKI_isIElt8) ? "\u015F" : "\u0219", 't': (this.VKI_isIElt8) ? "\u0163" : "\u021B",
+ 'S': (this.VKI_isIElt8) ? "\u015E" : "\u0218", 'T': (this.VKI_isIElt8) ? "\u0162" : "\u021A"
+ };
+ this.VKI_deadkey['\u3002'] = { // Hiragana/Katakana Point
+ '\u306f': "\u3071", '\u3072': "\u3074", '\u3075': "\u3077", '\u3078': "\u307a", '\u307b': "\u307d",
+ '\u30cf': "\u30d1", '\u30d2': "\u30d4", '\u30d5': "\u30d7", '\u30d8': "\u30da", '\u30db': "\u30dd"
+ };
+
+
+ /* ***** Define Symbols **************************************** */
+ this.VKI_symbol = {
+ '\u00a0': "NB\nSP", '\u200b': "ZW\nSP", '\u200c': "ZW\nNJ", '\u200d': "ZW\nJ"
+ };
+
+
+ /* ***** Layout Number Pad ************************************* */
+ this.VKI_numpad = [
+ [["$"], ["\u00a3"], ["\u20ac"], ["\u00a5"]],
+ [["7"], ["8"], ["9"], ["/"]],
+ [["4"], ["5"], ["6"], ["*"]],
+ [["1"], ["2"], ["3"], ["-"]],
+ [["0"], ["."], ["="], ["+"]]
+ ];
+
+
+ /* ****************************************************************
+ * Attach the keyboard to an element
+ *
+ */
+ VKI_attach = function(elem) {
+ if (elem.getAttribute("VKI_attached")) return false;
+ if (self.VKI_imageURI) {
+ var keybut = document.createElement('img');
+ keybut.src = self.VKI_imageURI;
+ keybut.alt = self.VKI_i18n['01'];
+ keybut.className = "keyboardInputInitiator";
+ keybut.title = self.VKI_i18n['01'];
+ keybut.elem = elem;
+ keybut.onclick = function(e) {
+ e = e || event;
+ if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
+ self.VKI_show(this.elem);
+ };
+ elem.parentNode.insertBefore(keybut, (elem.dir == "rtl") ? elem : elem.nextSibling);
+ } else {
+ elem.onfocus = function() {
+ if (self.VKI_target != this) {
+ if (self.VKI_target) self.VKI_close();
+ self.VKI_show(this);
+ }
+ };
+ elem.onclick = function() {
+ if (!self.VKI_target) self.VKI_show(this);
+ }
+ }
+ elem.setAttribute("VKI_attached", 'true');
+ if (self.VKI_isIE) {
+ elem.onclick = elem.onselect = elem.onkeyup = function(e) {
+ if ((e || event).type != "keyup" || !this.readOnly)
+ this.range = document.selection.createRange();
+ };
+ }
+ VKI_addListener(elem, 'click', function(e) {
+ if (self.VKI_target == this) {
+ e = e || event;
+ if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
+ } return false;
+ }, false);
+ if (self.VKI_isMoz)
+ elem.addEventListener('blur', function() { this.setAttribute('_scrollTop', this.scrollTop); }, false);
+ };
+
+
+ /* ***** Find tagged input & textarea elements ***************** */
+ function VKI_buildKeyboardInputs() {
+ var inputElems = [
+ document.getElementsByTagName('input'),
+ document.getElementsByTagName('textarea')
+ ];
+ for (var x = 0, elem; elem = inputElems[x++];)
+ for (var y = 0, ex; ex = elem[y++];)
+ if (ex.nodeName == "TEXTAREA" || ex.type == "text" || ex.type == "password")
+ if (ex.className.indexOf("keyboardInput") > -1) VKI_attach(ex);
+
+ VKI_addListener(document.documentElement, 'click', function(e) { self.VKI_close(); }, false);
+ }
+
+
+ /* ****************************************************************
+ * Common mouse event actions
+ *
+ */
+ function VKI_mouseEvents(elem) {
+ if (elem.nodeName == "TD") {
+ if (!elem.click) elem.click = function() {
+ var evt = this.ownerDocument.createEvent('MouseEvents');
+ evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
+ this.dispatchEvent(evt);
+ };
+ elem.VKI_clickless = 0;
+ VKI_addListener(elem, 'dblclick', function() { return false; }, false);
+ }
+ VKI_addListener(elem, 'mouseover', function() {
+ if (this.nodeName == "TD" && self.VKI_clickless) {
+ var _self = this;
+ clearTimeout(this.VKI_clickless);
+ this.VKI_clickless = setTimeout(function() { _self.click(); }, self.VKI_clickless);
+ }
+ if (self.VKI_isIE) this.className += " hover";
+ }, false);
+ VKI_addListener(elem, 'mouseout', function() {
+ if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
+ if (self.VKI_isIE) this.className = this.className.replace(/ ?(hover|pressed) ?/g, "");
+ }, false);
+ VKI_addListener(elem, 'mousedown', function() {
+ if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
+ if (self.VKI_isIE) this.className += " pressed";
+ }, false);
+ VKI_addListener(elem, 'mouseup', function() {
+ if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
+ if (self.VKI_isIE) this.className = this.className.replace(/ ?pressed ?/g, "");
+ }, false);
+ }
+
+
+ /* ***** Build the keyboard interface ************************** */
+ this.VKI_keyboard = document.createElement('table');
+ this.VKI_keyboard.id = "keyboardInputMaster";
+ this.VKI_keyboard.dir = "ltr";
+ this.VKI_keyboard.cellSpacing = "0";
+ this.VKI_keyboard.reflow = function() {
+ this.style.width = "50px";
+ var foo = this.offsetWidth;
+ this.style.width = "";
+ };
+ VKI_addListener(this.VKI_keyboard, 'click', function(e) {
+ e = e || event;
+ if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
+ return false;
+ }, false);
+
+ if (!this.VKI_layout[this.VKI_kt])
+ return alert('No keyboard named "' + this.VKI_kt + '"');
+
+ this.VKI_langCode = {};
+ var thead = document.createElement('thead');
+ var tr = document.createElement('tr');
+ var th = document.createElement('th');
+ th.colSpan = "2";
+
+ var kbSelect = document.createElement('div');
+ kbSelect.title = this.VKI_i18n['02'];
+ VKI_addListener(kbSelect, 'click', function() {
+ var ol = this.getElementsByTagName('ol')[0];
+ if (!ol.style.display) {
+ ol.style.display = "block";
+ var li = ol.getElementsByTagName('li');
+ for (var x = 0, scr = 0; x < li.length; x++) {
+ if (VKI_kt == li[x].firstChild.nodeValue) {
+ li[x].className = "selected";
+ scr = li[x].offsetTop - li[x].offsetHeight * 2;
+ } else li[x].className = "";
+ } setTimeout(function() { ol.scrollTop = scr; }, 0);
+ } else ol.style.display = "";
+ }, false);
+ kbSelect.appendChild(document.createTextNode(this.VKI_kt));
+ kbSelect.appendChild(document.createTextNode(this.VKI_isIElt8 ? " \u2193" : " \u25be"));
+ var ol = document.createElement('ol');
+ for (ktype in this.VKI_layout) {
+ if (typeof this.VKI_layout[ktype] == "object") {
+ if (!this.VKI_layout[ktype].lang) this.VKI_layout[ktype].lang = [];
+ for (var x = 0; x < this.VKI_layout[ktype].lang.length; x++)
+ this.VKI_langCode[this.VKI_layout[ktype].lang[x].toLowerCase().replace(/-/g, "_")] = ktype;
+ var li = document.createElement('li');
+ li.title = this.VKI_layout[ktype].name;
+ VKI_addListener(li, 'click', function(e) {
+ e = e || event;
+ if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
+ this.parentNode.style.display = "";
+ self.VKI_kts = self.VKI_kt = kbSelect.firstChild.nodeValue = this.firstChild.nodeValue;
+ self.VKI_buildKeys();
+ self.VKI_position(true);
+ }, false);
+ VKI_mouseEvents(li);
+ li.appendChild(document.createTextNode(ktype));
+ ol.appendChild(li);
+ }
+ } kbSelect.appendChild(ol);
+ th.appendChild(kbSelect);
+ this.VKI_langCode.index = [];
+ for (prop in this.VKI_langCode)
+ if (prop != "index" && typeof this.VKI_langCode[prop] == "string")
+ this.VKI_langCode.index.push(prop);
+ this.VKI_langCode.index.sort();
+ this.VKI_langCode.index.reverse();
+
+ if (this.VKI_numberPad) {
+ var span = document.createElement('span');
+ span.appendChild(document.createTextNode("#"));
+ span.title = this.VKI_i18n['00'];
+ VKI_addListener(span, 'click', function() {
+ kbNumpad.style.display = (!kbNumpad.style.display) ? "none" : "";
+ self.VKI_position(true);
+ }, false);
+ VKI_mouseEvents(span);
+ th.appendChild(span);
+ }
+
+ this.VKI_kbsize = function(e) {
+ self.VKI_size = Math.min(5, Math.max(1, self.VKI_size));
+ self.VKI_keyboard.className = self.VKI_keyboard.className.replace(/ ?keyboardInputSize\d ?/, "");
+ if (self.VKI_size != 2) self.VKI_keyboard.className += " keyboardInputSize" + self.VKI_size;
+ self.VKI_position(true);
+ if (self.VKI_isOpera) self.VKI_keyboard.reflow();
+ };
+ if (this.VKI_sizeAdj) {
+ var small = document.createElement('small');
+ small.title = this.VKI_i18n['10'];
+ VKI_addListener(small, 'click', function() {
+ --self.VKI_size;
+ self.VKI_kbsize();
+ }, false);
+ VKI_mouseEvents(small);
+ small.appendChild(document.createTextNode(this.VKI_isIElt8 ? "\u2193" : "\u21d3"));
+ th.appendChild(small);
+ var big = document.createElement('big');
+ big.title = this.VKI_i18n['11'];
+ VKI_addListener(big, 'click', function() {
+ ++self.VKI_size;
+ self.VKI_kbsize();
+ }, false);
+ VKI_mouseEvents(big);
+ big.appendChild(document.createTextNode(this.VKI_isIElt8 ? "\u2191" : "\u21d1"));
+ th.appendChild(big);
+ }
+
+ var span = document.createElement('span');
+ span.appendChild(document.createTextNode(this.VKI_i18n['07']));
+ span.title = this.VKI_i18n['08'];
+ VKI_addListener(span, 'click', function() {
+ self.VKI_target.value = "";
+ self.VKI_target.focus();
+ return false;
+ }, false);
+ VKI_mouseEvents(span);
+ th.appendChild(span);
+
+ var strong = document.createElement('strong');
+ strong.appendChild(document.createTextNode('X'));
+ strong.title = this.VKI_i18n['06'];
+ VKI_addListener(strong, 'click', function() { self.VKI_close(); }, false);
+ VKI_mouseEvents(strong);
+ th.appendChild(strong);
+
+ tr.appendChild(th);
+ thead.appendChild(tr);
+ this.VKI_keyboard.appendChild(thead);
+
+ var tbody = document.createElement('tbody');
+ var tr = document.createElement('tr');
+ var td = document.createElement('td');
+ var div = document.createElement('div');
+
+ if (this.VKI_deadBox) {
+ var label = document.createElement('label');
+ var checkbox = document.createElement('input');
+ checkbox.type = "checkbox";
+ checkbox.title = this.VKI_i18n['03'] + ": " + ((this.VKI_deadkeysOn) ? this.VKI_i18n['04'] : this.VKI_i18n['05']);
+ checkbox.defaultChecked = this.VKI_deadkeysOn;
+ VKI_addListener(checkbox, 'click', function() {
+ this.title = self.VKI_i18n['03'] + ": " + ((this.checked) ? self.VKI_i18n['04'] : self.VKI_i18n['05']);
+ self.VKI_modify("");
+ return true;
+ }, false);
+ label.appendChild(checkbox);
+ checkbox.checked = this.VKI_deadkeysOn;
+ div.appendChild(label);
+ this.VKI_deadkeysOn = checkbox;
+ } else this.VKI_deadkeysOn.checked = this.VKI_deadkeysOn;
+
+ if (this.VKI_showVersion) {
+ var vr = document.createElement('var');
+ vr.title = this.VKI_i18n['09'] + " " + this.VKI_version;
+ vr.appendChild(document.createTextNode("" + this.VKI_version));
+ div.appendChild(vr);
+ } td.appendChild(div);
+ tr.appendChild(td);
+
+ var kbNumpad = document.createElement('td');
+ kbNumpad.id = "keyboardInputNumpad";
+ if (!this.VKI_numberPadOn) kbNumpad.style.display = "none";
+ var ntable = document.createElement('table');
+ ntable.cellSpacing = "0";
+ var ntbody = document.createElement('tbody');
+ for (var x = 0; x < this.VKI_numpad.length; x++) {
+ var ntr = document.createElement('tr');
+ for (var y = 0; y < this.VKI_numpad[x].length; y++) {
+ var ntd = document.createElement('td');
+ VKI_addListener(ntd, 'click', VKI_keyClick, false);
+ VKI_mouseEvents(ntd);
+ ntd.appendChild(document.createTextNode(this.VKI_numpad[x][y]));
+ ntr.appendChild(ntd);
+ } ntbody.appendChild(ntr);
+ } ntable.appendChild(ntbody);
+ kbNumpad.appendChild(ntable);
+ tr.appendChild(kbNumpad);
+ tbody.appendChild(tr);
+ this.VKI_keyboard.appendChild(tbody);
+
+ if (this.VKI_isIE6) {
+ this.VKI_iframe = document.createElement('iframe');
+ this.VKI_iframe.style.position = "absolute";
+ this.VKI_iframe.style.border = "0px none";
+ this.VKI_iframe.style.filter = "mask()";
+ this.VKI_iframe.style.zIndex = "999999";
+ this.VKI_iframe.src = this.VKI_imageURI;
+ }
+
+
+ /* ****************************************************************
+ * Private table cell attachment function for generic characters
+ *
+ */
+ function VKI_keyClick() {
+ var done = false, character = "\xa0";
+ if (this.firstChild.nodeName.toLowerCase() != "small") {
+ if ((character = this.firstChild.nodeValue) == "\xa0") return false;
+ } else character = this.firstChild.getAttribute('char');
+ if (self.VKI_deadkeysOn.checked && self.VKI_dead) {
+ if (self.VKI_dead != character) {
+ if (character != " ") {
+ if (self.VKI_deadkey[self.VKI_dead][character]) {
+ self.VKI_insert(self.VKI_deadkey[self.VKI_dead][character]);
+ done = true;
+ }
+ } else {
+ self.VKI_insert(self.VKI_dead);
+ done = true;
+ }
+ } else done = true;
+ } self.VKI_dead = false;
+
+ if (!done) {
+ if (self.VKI_deadkeysOn.checked && self.VKI_deadkey[character]) {
+ self.VKI_dead = character;
+ this.className += " dead";
+ if (self.VKI_shift) self.VKI_modify("Shift");
+ if (self.VKI_altgr) self.VKI_modify("AltGr");
+ } else self.VKI_insert(character);
+ } self.VKI_modify("");
+ return false;
+ }
+
+
+ /* ****************************************************************
+ * Build or rebuild the keyboard keys
+ *
+ */
+ this.VKI_buildKeys = function() {
+ this.VKI_shift = this.VKI_shiftlock = this.VKI_altgr = this.VKI_altgrlock = this.VKI_dead = false;
+ var container = this.VKI_keyboard.tBodies[0].getElementsByTagName('div')[0];
+ var tables = container.getElementsByTagName('table');
+ for (var x = tables.length - 1; x >= 0; x--) container.removeChild(tables[x]);
+
+ for (var x = 0, hasDeadKey = false, lyt; lyt = this.VKI_layout[this.VKI_kt].keys[x++];) {
+ var table = document.createElement('table');
+ table.cellSpacing = "0";
+ if (lyt.length <= this.VKI_keyCenter) table.className = "keyboardInputCenter";
+ var tbody = document.createElement('tbody');
+ var tr = document.createElement('tr');
+ for (var y = 0, lkey; lkey = lyt[y++];) {
+ var td = document.createElement('td');
+ if (this.VKI_symbol[lkey[0]]) {
+ var text = this.VKI_symbol[lkey[0]].split("\n");
+ var small = document.createElement('small');
+ small.setAttribute('char', lkey[0]);
+ for (var z = 0; z < text.length; z++) {
+ if (z) small.appendChild(document.createElement("br"));
+ small.appendChild(document.createTextNode(text[z]));
+ } td.appendChild(small);
+ } else td.appendChild(document.createTextNode(lkey[0] || "\xa0"));
+
+ var className = [];
+ if (this.VKI_deadkeysOn.checked)
+ for (key in this.VKI_deadkey)
+ if (key === lkey[0]) { className.push("deadkey"); break; }
+ if (lyt.length > this.VKI_keyCenter && y == lyt.length) className.push("last");
+ if (lkey[0] == " " || lkey[1] == " ") className.push("space");
+ td.className = className.join(" ");
+
+ switch (lkey[1]) {
+ case "Caps": case "Shift":
+ case "Alt": case "AltGr": case "AltLk":
+ VKI_addListener(td, 'click', (function(type) { return function() { self.VKI_modify(type); return false; }})(lkey[1]), false);
+ break;
+ case "Tab":
+ VKI_addListener(td, 'click', function() {
+ if (self.VKI_activeTab) {
+ if (self.VKI_target.form) {
+ var target = self.VKI_target, elems = target.form.elements;
+ self.VKI_close();
+ for (var z = 0, me = false, j = -1; z < elems.length; z++) {
+ if (j == -1 && elems[z].getAttribute("VKI_attached")) j = z;
+ if (me) {
+ if (self.VKI_activeTab == 1 && elems[z]) break;
+ if (elems[z].getAttribute("VKI_attached")) break;
+ } else if (elems[z] == target) me = true;
+ } if (z == elems.length) z = Math.max(j, 0);
+ if (elems[z].getAttribute("VKI_attached")) {
+ self.VKI_show(elems[z]);
+ } else elems[z].focus();
+ } else self.VKI_target.focus();
+ } else self.VKI_insert("\t");
+ return false;
+ }, false);
+ break;
+ case "Bksp":
+ VKI_addListener(td, 'click', function() {
+ self.VKI_target.focus();
+ if (self.VKI_target.setSelectionRange && !self.VKI_target.readOnly) {
+ var rng = [self.VKI_target.selectionStart, self.VKI_target.selectionEnd];
+ if (rng[0] < rng[1]) rng[0]++;
+ self.VKI_target.value = self.VKI_target.value.substr(0, rng[0] - 1) + self.VKI_target.value.substr(rng[1]);
+ self.VKI_target.setSelectionRange(rng[0] - 1, rng[0] - 1);
+ } else if (self.VKI_target.createTextRange && !self.VKI_target.readOnly) {
+ try {
+ self.VKI_target.range.select();
+ } catch(e) { self.VKI_target.range = document.selection.createRange(); }
+ if (!self.VKI_target.range.text.length) self.VKI_target.range.moveStart('character', -1);
+ self.VKI_target.range.text = "";
+ } else self.VKI_target.value = self.VKI_target.value.substr(0, self.VKI_target.value.length - 1);
+ if (self.VKI_shift) self.VKI_modify("Shift");
+ if (self.VKI_altgr) self.VKI_modify("AltGr");
+ self.VKI_target.focus();
+ return true;
+ }, false);
+ break;
+ case "Enter":
+ VKI_addListener(td, 'click', function() {
+ if (self.VKI_target.nodeName != "TEXTAREA") {
+ if (self.VKI_enterSubmit && self.VKI_target.form) {
+ for (var z = 0, subm = false; z < self.VKI_target.form.elements.length; z++)
+ if (self.VKI_target.form.elements[z].type == "submit") subm = true;
+ if (!subm) self.VKI_target.form.submit();
+ }
+ self.VKI_close();
+ } else self.VKI_insert("\n");
+ return true;
+ }, false);
+ break;
+ default:
+ VKI_addListener(td, 'click', VKI_keyClick, false);
+
+ } VKI_mouseEvents(td);
+ tr.appendChild(td);
+ for (var z = 0; z < 4; z++)
+ if (this.VKI_deadkey[lkey[z] = lkey[z] || ""]) hasDeadKey = true;
+ } tbody.appendChild(tr);
+ table.appendChild(tbody);
+ container.appendChild(table);
+ }
+ if (this.VKI_deadBox)
+ this.VKI_deadkeysOn.style.display = (hasDeadKey) ? "inline" : "none";
+ if (this.VKI_isIE6) {
+ this.VKI_iframe.style.width = this.VKI_keyboard.offsetWidth + "px";
+ this.VKI_iframe.style.height = this.VKI_keyboard.offsetHeight + "px";
+ }
+ };
+
+ this.VKI_buildKeys();
+ VKI_addListener(this.VKI_keyboard, 'selectstart', function() { return false; }, false);
+ this.VKI_keyboard.unselectable = "on";
+ if (this.VKI_isOpera)
+ VKI_addListener(this.VKI_keyboard, 'mousedown', function() { return false; }, false);
+
+
+ /* ****************************************************************
+ * Controls modifier keys
+ *
+ */
+ this.VKI_modify = function(type) {
+ switch (type) {
+ case "Alt":
+ case "AltGr": this.VKI_altgr = !this.VKI_altgr; break;
+ case "AltLk": this.VKI_altgr = 0; this.VKI_altgrlock = !this.VKI_altgrlock; break;
+ case "Caps": this.VKI_shift = 0; this.VKI_shiftlock = !this.VKI_shiftlock; break;
+ case "Shift": this.VKI_shift = !this.VKI_shift; break;
+ } var vchar = 0;
+ if (!this.VKI_shift != !this.VKI_shiftlock) vchar += 1;
+ if (!this.VKI_altgr != !this.VKI_altgrlock) vchar += 2;
+
+ var tables = this.VKI_keyboard.tBodies[0].getElementsByTagName('div')[0].getElementsByTagName('table');
+ for (var x = 0; x < tables.length; x++) {
+ var tds = tables[x].getElementsByTagName('td');
+ for (var y = 0; y < tds.length; y++) {
+ var className = [], lkey = this.VKI_layout[this.VKI_kt].keys[x][y];
+
+ switch (lkey[1]) {
+ case "Alt":
+ case "AltGr":
+ if (this.VKI_altgr) className.push("pressed");
+ break;
+ case "AltLk":
+ if (this.VKI_altgrlock) className.push("pressed");
+ break;
+ case "Shift":
+ if (this.VKI_shift) className.push("pressed");
+ break;
+ case "Caps":
+ if (this.VKI_shiftlock) className.push("pressed");
+ break;
+ case "Tab": case "Enter": case "Bksp": break;
+ default:
+ if (type) {
+ tds[y].removeChild(tds[y].firstChild);
+ if (this.VKI_symbol[lkey[vchar]]) {
+ var text = this.VKI_symbol[lkey[vchar]].split("\n");
+ var small = document.createElement('small');
+ small.setAttribute('char', lkey[vchar]);
+ for (var z = 0; z < text.length; z++) {
+ if (z) small.appendChild(document.createElement("br"));
+ small.appendChild(document.createTextNode(text[z]));
+ } tds[y].appendChild(small);
+ } else tds[y].appendChild(document.createTextNode(lkey[vchar] || "\xa0"));
+ }
+ if (this.VKI_deadkeysOn.checked) {
+ var character = tds[y].firstChild.nodeValue || tds[y].firstChild.className;
+ if (this.VKI_dead) {
+ if (character == this.VKI_dead) className.push("pressed");
+ if (this.VKI_deadkey[this.VKI_dead][character]) className.push("target");
+ }
+ if (this.VKI_deadkey[character]) className.push("deadkey");
+ }
+ }
+
+ if (y == tds.length - 1 && tds.length > this.VKI_keyCenter) className.push("last");
+ if (lkey[0] == " " || lkey[1] == " ") className.push("space");
+ tds[y].className = className.join(" ");
+ }
+ }
+ };
+
+
+ /* ****************************************************************
+ * Insert text at the cursor
+ *
+ */
+ this.VKI_insert = function(text) {
+ this.VKI_target.focus();
+ if (this.VKI_target.maxLength) this.VKI_target.maxlength = this.VKI_target.maxLength;
+ if (typeof this.VKI_target.maxlength == "undefined" ||
+ this.VKI_target.maxlength < 0 ||
+ this.VKI_target.value.length < this.VKI_target.maxlength) {
+ if (this.VKI_target.setSelectionRange && !this.VKI_target.readOnly && !this.VKI_isIE) {
+ var rng = [this.VKI_target.selectionStart, this.VKI_target.selectionEnd];
+ this.VKI_target.value = this.VKI_target.value.substr(0, rng[0]) + text + this.VKI_target.value.substr(rng[1]);
+ if (text == "\n" && this.VKI_isOpera) rng[0]++;
+ this.VKI_target.setSelectionRange(rng[0] + text.length, rng[0] + text.length);
+ } else if (this.VKI_target.createTextRange && !this.VKI_target.readOnly) {
+ try {
+ this.VKI_target.range.select();
+ } catch(e) { this.VKI_target.range = document.selection.createRange(); }
+ this.VKI_target.range.text = text;
+ this.VKI_target.range.collapse(true);
+ this.VKI_target.range.select();
+ } else this.VKI_target.value += text;
+ if (this.VKI_shift) this.VKI_modify("Shift");
+ if (this.VKI_altgr) this.VKI_modify("AltGr");
+ this.VKI_target.focus();
+ } else if (this.VKI_target.createTextRange && this.VKI_target.range)
+ this.VKI_target.range.select();
+ };
+
+
+ /* ****************************************************************
+ * Show the keyboard interface
+ *
+ */
+ this.VKI_show = function(elem) {
+ if (!this.VKI_target) {
+ this.VKI_target = elem;
+ if (this.VKI_langAdapt && this.VKI_target.lang) {
+ var chg = false, sub = [], lang = this.VKI_target.lang.toLowerCase().replace(/-/g, "_");
+ for (var x = 0, chg = false; !chg && x < this.VKI_langCode.index.length; x++)
+ if (lang.indexOf(this.VKI_langCode.index[x]) == 0)
+ chg = kbSelect.firstChild.nodeValue = this.VKI_kt = this.VKI_langCode[this.VKI_langCode.index[x]];
+ if (chg) this.VKI_buildKeys();
+ }
+ if (this.VKI_isIE) {
+ if (!this.VKI_target.range) {
+ this.VKI_target.range = this.VKI_target.createTextRange();
+ this.VKI_target.range.moveStart('character', this.VKI_target.value.length);
+ } this.VKI_target.range.select();
+ }
+ try { this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard); } catch (e) {}
+ if (this.VKI_clearPasswords && this.VKI_target.type == "password") this.VKI_target.value = "";
+
+ var elem = this.VKI_target;
+ this.VKI_target.keyboardPosition = "absolute";
+ do {
+ if (VKI_getStyle(elem, "position") == "fixed") {
+ this.VKI_target.keyboardPosition = "fixed";
+ break;
+ }
+ } while (elem = elem.offsetParent);
+
+ if (this.VKI_isIE6) document.body.appendChild(this.VKI_iframe);
+ document.body.appendChild(this.VKI_keyboard);
+ this.VKI_keyboard.style.position = this.VKI_target.keyboardPosition;
+ if (this.VKI_isOpera) this.VKI_keyboard.reflow();
+
+ this.VKI_position(true);
+ if (self.VKI_isMoz || self.VKI_isWebKit) this.VKI_position(true);
+ this.VKI_target.blur();
+ this.VKI_target.focus();
+ } else this.VKI_close();
+ };
+
+
+ /* ****************************************************************
+ * Position the keyboard
+ *
+ */
+ this.VKI_position = function(force) {
+ if (self.VKI_target) {
+ var kPos = VKI_findPos(self.VKI_keyboard), wDim = VKI_innerDimensions(), sDis = VKI_scrollDist();
+ var place = false, fudge = self.VKI_target.offsetHeight + 3;
+ if (force !== true) {
+ if (kPos[1] + self.VKI_keyboard.offsetHeight - sDis[1] - wDim[1] > 0) {
+ place = true;
+ fudge = -self.VKI_keyboard.offsetHeight - 3;
+ } else if (kPos[1] - sDis[1] < 0) place = true;
+ }
+ if (place || force === true) {
+ var iPos = VKI_findPos(self.VKI_target), scr = self.VKI_target;
+ while (scr = scr.parentNode) {
+ if (scr == document.body) break;
+ if (scr.scrollHeight > scr.offsetHeight || scr.scrollWidth > scr.offsetWidth) {
+ if (!scr.getAttribute("VKI_scrollListener")) {
+ scr.setAttribute("VKI_scrollListener", true);
+ VKI_addListener(scr, 'scroll', function() { self.VKI_position(true); }, false);
+ } // Check if the input is in view
+ var pPos = VKI_findPos(scr), oTop = iPos[1] - pPos[1], oLeft = iPos[0] - pPos[0];
+ var top = oTop + self.VKI_target.offsetHeight;
+ var left = oLeft + self.VKI_target.offsetWidth;
+ var bottom = scr.offsetHeight - oTop - self.VKI_target.offsetHeight;
+ var right = scr.offsetWidth - oLeft - self.VKI_target.offsetWidth;
+ self.VKI_keyboard.style.display = (top < 0 || left < 0 || bottom < 0 || right < 0) ? "none" : "";
+ if (self.VKI_isIE6) self.VKI_iframe.style.display = (top < 0 || left < 0 || bottom < 0 || right < 0) ? "none" : "";
+ }
+ }
+ self.VKI_keyboard.style.top = iPos[1] - ((self.VKI_target.keyboardPosition == "fixed" && !self.VKI_isIE && !self.VKI_isMoz) ? sDis[1] : 0) + fudge + "px";
+ self.VKI_keyboard.style.left = Math.max(10, Math.min(wDim[0] - self.VKI_keyboard.offsetWidth - 25, iPos[0])) + "px";
+ if (self.VKI_isIE6) {
+ self.VKI_iframe.style.width = self.VKI_keyboard.offsetWidth + "px";
+ self.VKI_iframe.style.height = self.VKI_keyboard.offsetHeight + "px";
+ self.VKI_iframe.style.top = self.VKI_keyboard.style.top;
+ self.VKI_iframe.style.left = self.VKI_keyboard.style.left;
+ }
+ }
+ if (force === true) self.VKI_position();
+ }
+ };
+
+
+ /* ****************************************************************
+ * Close the keyboard interface
+ *
+ */
+ this.VKI_close = VKI_close = function() {
+ if (this.VKI_target) {
+ try {
+ this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard);
+ if (this.VKI_isIE6) this.VKI_iframe.parentNode.removeChild(this.VKI_iframe);
+ } catch (e) {}
+ if (this.VKI_kt != this.VKI_kts) {
+ kbSelect.firstChild.nodeValue = this.VKI_kt = this.VKI_kts;
+ this.VKI_buildKeys();
+ } kbSelect.getElementsByTagName('ol')[0].style.display = "";;
+ this.VKI_target.focus();
+ if (this.VKI_isIE) {
+ setTimeout(function() { self.VKI_target = false; }, 0);
+ } else this.VKI_target = false;
+ }
+ };
+
+
+ /* ***** Private functions *************************************** */
+ function VKI_addListener(elem, type, func, cap) {
+ if (elem.addEventListener) {
+ elem.addEventListener(type, function(e) { func.call(elem, e); }, cap);
+ } else if (elem.attachEvent)
+ elem.attachEvent('on' + type, function() { func.call(elem); });
+ }
+
+ function VKI_findPos(obj) {
+ var curleft = curtop = 0, scr = obj;
+ while ((scr = scr.parentNode) && scr != document.body) {
+ curleft -= scr.scrollLeft || 0;
+ curtop -= scr.scrollTop || 0;
+ }
+ do {
+ curleft += obj.offsetLeft;
+ curtop += obj.offsetTop;
+ } while (obj = obj.offsetParent);
+ return [curleft, curtop];
+ }
+
+ function VKI_innerDimensions() {
+ if (self.innerHeight) {
+ return [self.innerWidth, self.innerHeight];
+ } else if (document.documentElement && document.documentElement.clientHeight) {
+ return [document.documentElement.clientWidth, document.documentElement.clientHeight];
+ } else if (document.body)
+ return [document.body.clientWidth, document.body.clientHeight];
+ return [0, 0];
+ }
+
+ function VKI_scrollDist() {
+ var html = document.getElementsByTagName('html')[0];
+ if (html.scrollTop && document.documentElement.scrollTop) {
+ return [html.scrollLeft, html.scrollTop];
+ } else if (html.scrollTop || document.documentElement.scrollTop) {
+ return [html.scrollLeft + document.documentElement.scrollLeft, html.scrollTop + document.documentElement.scrollTop];
+ } else if (document.body.scrollTop)
+ return [document.body.scrollLeft, document.body.scrollTop];
+ return [0, 0];
+ }
+
+ function VKI_getStyle(obj, styleProp) {
+ if (obj.currentStyle) {
+ var y = obj.currentStyle[styleProp];
+ } else if (window.getComputedStyle)
+ var y = window.getComputedStyle(obj, null)[styleProp];
+ return y;
+ }
+
+
+ VKI_addListener(window, 'resize', this.VKI_position, false);
+ VKI_addListener(window, 'scroll', this.VKI_position, false);
+ this.VKI_kbsize();
+ VKI_addListener(window, 'load', VKI_buildKeyboardInputs, false);
+ // VKI_addListener(window, 'load', function() {
+ // setTimeout(VKI_buildKeyboardInputs, 5);
+ // }, false);
+})();
diff --git a/public/media/js/user.js b/public/media/js/user.js
index 26f4e80..50cfb80 100644
--- a/public/media/js/user.js
+++ b/public/media/js/user.js
@@ -1,6 +1,5 @@
$(document).ready(function(){
if($('.listelement .element').find('.dispnone').length >= 1){
- console.log($(this));
$('.listelement .element').find('.dispnone').parent().find('.title')
.css('cursor','pointer')
.prepend("<span class='toggler'><img src='/media/img/right.png'></span> ")
@@ -18,6 +17,14 @@ $(document).ready(function(){
}
});
}
+ $('.helpericon').click(function(){
+ $('.infobox').slideToggle('fast');
+ if($(this).data('info') == '1'){
+ $(this).data('info','0').attr('src','/media/img/bulb_off.png');
+ } else{
+ $(this).data('info','1').attr('src','/media/img/bulb_on.png');
+ }
+ });
});
function checkAllCheckBoxes(exceptions) {
diff --git a/api_test.html b/scripts/api_test.html
index 754740c..754740c 100644
--- a/api_test.html
+++ b/scripts/api_test.html
diff --git a/dbContent.php b/scripts/dbContent.php
index a704ec2..a704ec2 100644
--- a/dbContent.php
+++ b/scripts/dbContent.php
diff --git a/dbContent.png b/scripts/dbContent.png
index 86c297a..86c297a 100644
--- a/dbContent.png
+++ b/scripts/dbContent.png
Binary files differ
diff --git a/send-post.html b/scripts/fbgui-test.html
index b89df3b..b89df3b 100644
--- a/send-post.html
+++ b/scripts/fbgui-test.html
diff --git a/zend-su.sh b/scripts/local-install.sh
index 37c1c6d..37c1c6d 100755
--- a/zend-su.sh
+++ b/scripts/local-install.sh
diff --git a/mysqlGraph.php b/scripts/mysqlGraph.php
index b9012b2..b9012b2 100644
--- a/mysqlGraph.php
+++ b/scripts/mysqlGraph.php
diff --git a/mysqlGraph.png b/scripts/mysqlGraph.png
index 54d0ae5..54d0ae5 100644
--- a/mysqlGraph.png
+++ b/scripts/mysqlGraph.png
Binary files differ
diff --git a/pbs-newdata.sql b/setup/pbs-newdata.sql
index 3cc9cd5..1231cf1 100644
--- a/pbs-newdata.sql
+++ b/setup/pbs-newdata.sql
@@ -13,56 +13,44 @@ INSERT INTO `pbs_person` (`personID`, `title`, `name`, `firstname`, `street`, `h
-- Adding group
INSERT INTO `pbs`.`pbs_group` (`groupID` ,`title` ,`description`)VALUES
-(2, 'Group 2', 'Second Group'),
-(3, 'Group 3', 'Third Group'),
-(4, 'Group 4', 'Fourth Group'),
-(5, 'Group 5', 'Fifth Group'),
-(6, 'Group 6', 'Sixth Group'),
-(7, 'Group 7', 'Seventh Group'),
-(8, 'Group 8', 'Eight Group'),
-(9, 'Group 9', 'Nineth Group'),
-(10, 'Group 10', 'Tenth Group');
+(2, 'Germany', 'Deutschland'),
+(3, 'France', 'France'),
+(4, 'DFN', 'Deutsches Forschungsnetz'),
+(5, 'Institutionen', 'Fifth Group'),
+(6, 'Baden-Würtemberg', 'Sixth Group'),
+(7, 'Bayern', 'Seventh Group'),
+(8, 'Uni-Freiburg', 'Eight Group');
INSERT INTO `pbs`.`pbs_groupgroups` (`parentID`, `groupID`) VALUES
(1, 2),
(1, 3),
(2, 4),
(2, 5),
-(1, 8),
-(3, 6),
-(3, 7),
-(3, 9),
-(3, 10);
-
--- Adding role
-INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`, `inheritance`) VALUES (7, '2', 'Role 1-Group2', NULL, 0);
-INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`, `inheritance`) VALUES (8, '2', 'Role 2-Group2', NULL, 0);
-INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`, `inheritance`) VALUES (9, '2', 'Role 3-Group2', NULL, 0);
-
-INSERT INTO `pbs_rightroles` (`roleID`, `rightID`) VALUES
-(7, 4),
-(7, 3),
-(8, 1),
-(9, 2);
+(5, 6),
+(5, 7),
+(6, 8);
-- Adding memberships
-INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (1, '1', '1', '1', 'apikey1');
-INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (2, '1', '2', '2', 'apikey2');
-INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (3, '2', '3', '1', 'apikey3');
-INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (4, '2', '4', '3', 'apikey4');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '2', '1', '1', 'apikey2');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '3', '1', '1', 'apikey3');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '4', '1', '1', 'apikey4');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '5', '1', '1', 'apikey4');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '6', '1', '1', 'apikey4');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '7', '1', '1', 'apikey4');
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '8', '1', '1', 'apikey4');
-- Adding clients
INSERT INTO `pbs_client` (`clientID`, `groupID`,`macadress`, `hardwarehash`) VALUES
-(1, 1, '00:00:00:00:00:10', 'ea9b82d9de911bc2d3cd23f53a6cab48'),
-(2, 1, '00:00:00:00:10:00', '1e2b1599710fbbef0dc789e8cfe12455'),
-(3, 1, '00:00:00:10:10:00', '8f6209ca3d6b35e223a11c249d1b69fc'),
-(4, 1, '00:00:10:00:00:00', 'e17ab09f3586464f19629e2e8b1e9a9d'),
-(5, 1, '00:10:00:00:00:00', '9bf70279d283b85440c2031c19bb6812'),
-(6, 1, '10:00:00:00:00:00', 'ad3bce4464a6267441ec144744439c7e'),
-(7, 1, '00:55:00:55:00:55', 'e8d7e80d79f224771b7a3a0af4e02748'),
-(8, 1, '66:00:66:00:66:00', 'ded66ce272f384e9e386c1b57ded3e4d'),
-(9, 1, '00:ff:ff:ff:ff:ff', '695610ee509c060b1fca9c8011529af4'),
-(10, 1, '00:22:00:22:00:22', 'a3562c8cad2a4fa4fc11656025dc911b'),
+(1, 1, 'a5:9a:0f:94:2a:b0', 'ea9b82d9de911bc2d3cd23f53a6cab48'),
+(2, 1, '91:91:f1:e2:99:aa', '1e2b1599710fbbef0dc789e8cfe12455'),
+(3, 1, '6e:5c:82:78:f2:39', '8f6209ca3d6b35e223a11c249d1b69fc'),
+(4, 1, '67:75:e9:f2:5f:8e', 'e17ab09f3586464f19629e2e8b1e9a9d'),
+(5, 1, '63:51:7e:22:aa:72', '9bf70279d283b85440c2031c19bb6812'),
+(6, 1, '68:9e:fe:47:95:c5', 'ad3bce4464a6267441ec144744439c7e'),
+(7, 1, '6e:1c:2e:01:77:33', 'e8d7e80d79f224771b7a3a0af4e02748'),
+(8, 1, 'd1:91:20:43:2f:dd', 'ded66ce272f384e9e386c1b57ded3e4d'),
+(9, 1, '1b:0f:a5:82:47:16', '695610ee509c060b1fca9c8011529af4'),
+(10, 1, '56:8e:7b:03:5f:98', 'a3562c8cad2a4fa4fc11656025dc911b'),
(11, 2, 'af:54:07:87:63:44', '98413218152196816519841365419816'),
(12, 2, '87:21:74:52:96:20', '98741298132516132169813516981616'),
(13, 2, '14:47:58:47:36:48', '32168132068132068513216053516513'),
@@ -70,19 +58,8 @@ INSERT INTO `pbs_client` (`clientID`, `groupID`,`macadress`, `hardwarehash`) VAL
-- Adding config
INSERT INTO `pbs_config` (`configID`, `title`, `groupID`, `membershipID`, `visible`, `created`) VALUES
-(1, 'Config 1', 1, null, '1', '1299693677'),
-(2, 'Config 2', 1, null, '0', '1299693690'),
-(3, 'Config 3', 1, null, '1', '1299693690'),
-(4, 'Config 4', null, 1, '1', '1299693690'),
-(5, 'Config 5', null, 1, '1', '1299693690');
-
--- Adding bootosuser
-INSERT INTO `pbs_bootosuser` (`bootosuserID`, `configID`, `login`, `password`, `homepath`, `hometypeID`) VALUES
-(1, 1, 'login1', 'password1', null, 0),
-(2, 1, 'login2', 'password2', null, 1),
-(3, 1, 'login3', 'password3', '/home/bla/blub', 2),
-(4, 4, 'login4', 'password4', null, 0),
-(5, 4, 'login5', 'password5', null, 1);
+(1, 'Default Config', 1, null, '1', '1299693677'),
+(2, 'Config 2', null, 1, '1', '1299693690');
-- Adding hometype
INSERT INTO `pbs_hometype` (`hometypeID`, `name`) VALUES
@@ -92,6 +69,15 @@ INSERT INTO `pbs_hometype` (`hometypeID`, `name`) VALUES
(3, 'extern'),
(4, 'dropbox');
+-- Adding bootosuser
+INSERT INTO `pbs_bootosuser` (`bootosuserID`, `configID`, `login`, `password`, `homepath`, `hometypeID`) VALUES
+(1, 1, 'login1', 'password1', null, 0),
+(2, 1, 'login2', 'password2', null, 1),
+(3, 1, 'login3', 'password3', '/home/bla/blub', 2),
+(4, 2, 'login4', 'password4', null, 0),
+(5, 2, 'login5', 'password5', null, 1);
+
+
-- Adding bootos
INSERT INTO `pbs_bootos` (`bootosID`, `path_config`, `groupID`, `membershipID`, `title`, `description`, `path_init`, `path_kernel`, `defaultkcl`, `created`, `expires`, `public`, `source`, `distro`, `distroversion`, `shortname`, `share`) VALUES
(1, 'configpath 1', 1, 1, 'BootOs 1', 'Description 1', 'initpath 1', 'kernelpath 1', 'default kcl 1', '1299693782', '2012-03-09', 0, null, null, null, null, null),
@@ -114,9 +100,9 @@ INSERT INTO `pbs_preboot` (`prebootID`, `title`, `membershipID`, `groupID`, `pat
-- Adding bootiso
INSERT INTO `pbs_bootiso` (`bootisoID`, `title`, `membershipID`, `groupID`, `prebootID`, `serialnumber`, `created`, `expires`, `public`) VALUES
-(1, 'BootIso 1', 1, 1, '1', '10-20-30-40-50', '123', '2012-03-09', 0),
-(2, 'BootIso 2', 1, 1, '2', '11-20-30-40-50', '456', '2012-03-09', 0),
-(3, 'BootIso 3', 1, 1, '3', '12-20-30-40-50', '789', '2012-03-09', 0);
+(1, 'BootMedium 1', 1, 1, '1', '10-20-30-40-50', '123', '2012-03-09', 0),
+(2, 'BootMedium 2', 1, 1, '2', '11-20-30-40-50', '456', '2012-03-09', 0),
+(3, 'BootMedium 3', 1, 1, '3', '12-20-30-40-50', '789', '2012-03-09', 0);
-- Adding Pools
INSERT INTO `pbs_pool` (`poolID`, `groupID`, `title`, `description`, `location`) VALUES
diff --git a/pbs.sql b/setup/pbs.sql
index 8fbbe67..491bfc3 100644
--- a/pbs.sql
+++ b/setup/pbs.sql
@@ -191,6 +191,8 @@ CREATE TABLE IF NOT EXISTS `pbs_bootmenu` (
KEY `groupID` (`groupID`),
KEY `membershipID` (`membershipID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
+ALTER TABLE `pbs_bootmenu` ADD `startcounter` INT NOT NULL AFTER `title`;
+ALTER TABLE `pbs_bootmenu` CHANGE `startcounter` `startcounter` INT( 11 ) NOT NULL DEFAULT '300';
ALTER TABLE `pbs_bootmenu`
ADD CONSTRAINT `pbs_bootmenu_ibfk_1` FOREIGN KEY (`membershipID`) REFERENCES `pbs_membership` (`membershipID`) ON DELETE SET NULL,
@@ -259,6 +261,7 @@ CREATE TABLE IF NOT EXISTS `pbs_client` (
`clientID` int(11) NOT NULL AUTO_INCREMENT,
`macadress` varchar(17) NOT NULL,
`hardwarehash` varchar(32),
+ `created` int(15),
PRIMARY KEY (`clientID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;
ALTER TABLE `pbs_client` ADD `groupID` INT NOT NULL AFTER `clientID` ;
@@ -365,7 +368,7 @@ INSERT INTO `pbs_filtertype` (`filtertypeID`, `filtertypename`) VALUES
(3, 'PoolID'),
(4, 'BootIso'),
(5, 'Membership'),
-(6, 'Group'),
+(6, 'All Members'),
(7, 'Time'),
(8, 'Client'),
(9, 'Hardwarehash'),
@@ -646,3 +649,10 @@ INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`, `inhe
(6, 1, 'User', 'The default user', 1);
INSERT INTO `pbs`.`pbs_rightroles` (`roleID`, `rightID`) VALUES
(6, 2),(6, 3),(6, 4),(6, 16),(6, 19),(6, 33),(6, 37),(6, 46),(6, 50),(6, 51),(6, 52),(6, 57),(6, 63),(6, 70),(6, 71),(6, 72);
+
+-- Adding a Person for SuperAdmin
+INSERT INTO `pbs_person` (`personID`, `title`, `name`, `firstname`, `street`, `housenumber`, `city`, `postalcode`, `logindate`, `registerdate`, `email`, `login`, `password`, `password_salt`) VALUES
+(1, 'Herr', 'Super', 'Admin', 'Street', '1337', 'Teshouse', '1337', NULL, '1299612370', 'test', NULL, '4207acba08cadccc397e2302a55b339a', 'f21ee663b17bcefc6868694dffda602a');
+
+-- Get him a Membership in MainGroup for activate Requests
+INSERT INTO `pbs`.`pbs_membership` (`membershipID`, `groupID`, `roleID`, `personID`, `apikey`) VALUES (NULL, '1', '1', '1', 'apikey1');
diff --git a/template.php b/template.php
deleted file mode 100644
index bd23d4a..0000000
--- a/template.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
- * This program is free software distributed under the GPL version 2.
- * See http://gpl.openslx.org/
- *
- * If you have any feedback please consult http://feedback.openslx.org/ and
- * send your suggestions, praise, or complaints to feedback@openslx.org
- *
- * General information about OpenSLX can be found at http://openslx.org/
- */
- ?>
-<div class='listelement'>
-
- <?php if(count($this->sessions)==0)
- echo "There are no Sessions to display." ?>
- <?php foreach ($this->sessions as $session): ?>
- <div class='element'>
- <div class='number'>ID</div>
- <div class='content'>
- <div class='actions'>
- <a><img alt='action1'/> </a>
- <a><img alt='action2'/> </a>
- </div>
- <div class='title'>Title</div>
- <div class='subtitle'>Subtitle</div>
- <div class='details dispnone'>
- <label>Description1</label>
- <div class='item'>Element2</div>
- <label>Description2</label>
- <div class='item'>Element2</div>
- </div>
- </div>
- <div class='clear'></div>
- </div>
- <?php endforeach ?>
-</div>
diff --git a/ubuntu-init b/ubuntu-init
deleted file mode 100644
index e7bfa9e..0000000
--- a/ubuntu-init
+++ /dev/null
Binary files differ
diff --git a/zend-user.sh b/zend-user.sh
deleted file mode 100644
index 16ba63e..0000000
--- a/zend-user.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-cp /tmp/pbs2/application/configs/application.ini.dist /tmp/pbs2/application/configs/application.ini
-mysql -u root -p </tmp/pbs2/pbs.sql
-mysql -u root -p </tmp/pbs2/pbs-newdata.sql