Commit ab3ba542 authored by Gerd Schachtschneider's avatar Gerd Schachtschneider
Browse files

add license.txt

parent 4582d3d6
<?php
class tables_mpi_users {
function getPermissions($record) {
$user = Dataface_AuthenticationTool::getInstance()->getLoggedInUser();
// first let's deal with the case that the user is not logged in.
if ( !$user ) return Dataface_PermissionsTool::NO_ACCESS();
$role = $user->val('role');
// if ( isAdmin($role) ) return Dataface_PermissionsTool::ALL();
if ( $role == 'MANAGER' ) return Dataface_PermissionsTool::getRolePermissions('MANAGER');
if ( $role == 'ADMIN' ) return Dataface_PermissionsTool::getRolePermissions('ADMIN');
// Everybody else gets read only access to the table.
// return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
return Dataface_PermissionsTool::NO_ACCESS();
}
function email__renderCell( &$record ) {
$mail = $record->strval('email');
return '<a href="mailto:'.$mail.'">'.$mail.'</a>';
}
// Formatiere Zeitstempel auf Deutsch
function zeitstempel__display(&$record) {
if ($record->strval('zeitstempel') == NULL) return;
return date('d.m.Y', strtotime($record->strval('zeitstempel')));
}
function beforeSave(&$record) {
$app = Dataface_Application::getInstance();
$dn = $app->_conf['_own']['dn'];
$usr = $record->val('username');
$record->setValue('email', $usr.'@'.$dn);
}
}
?>
{*-------------------------------------------------------------------------------
* Dataface Web Application Framework
* Copyright (C) 2005-2006 Steve Hannah (shannah@sfu.ca)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*-------------------------------------------------------------------------------
*}
{actions var="menus" category="table_actions"}
{if $menus|@count > 0 }
<div id="contentActionsWrapper" class="contentActions">
<ul>
{foreach from=$menus item="menu" key="name"}
<li>
<a href="{$menu.url}" id="actions-menu-{$menu.id}" title="{$menu.description}" accesskey="{$menu.accessKey}">
<img src="{$menu.icon}" alt="" width="16" height="16" />{$menu.label}</a>
</li>
{/foreach}
</ul>
</div>
{/if}
<?php
/**
* A delegate class for the entire application to handle custom handling of
* some functions such as permissions and preferences.
*/
class conf_ApplicationDelegate
{
/**
* Returns permissions array. This method is called every time an action is
* performed to make sure that the user has permission to perform the action.
* @param record A Dataface_Record object (may be null) against which we check
* permissions.
* @see Dataface_PermissionsTool
* @see Dataface_AuthenticationTool
*/
function getPermissions(&$record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
// if the user is null then nobody is logged in... no access.
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
// This will force a login prompt.
$role = $user->val('role');
return Dataface_PermissionsTool::getRolePermissions($role);
// Returns all of the permissions for the user's current role.
}
}
?>
<?php
class tables_view_lgk {
// check login & editieren nicht erlaubt
function getPermissions($record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
}
?>
[__global__]
noLinkFromListView = 1
[autoID]
#widget:type = "hidden"
visibility:list = "hidden"
#visibility:browse = "hidden"
visibility:find = "hidden"
[kategorie]
noLinkFromListView = 0
<?php
/**
* A delegate class for the entire application to handle custom handling of
* some functions such as permissions and preferences.
*/
class conf_ApplicationDelegate
{
/**
* Returns permissions array. This method is called every time an action is
* performed to make sure that the user has permission to perform the action.
* @param record A Dataface_Record object (may be null) against which we check
* permissions.
* @see Dataface_PermissionsTool
* @see Dataface_AuthenticationTool
*/
function getPermissions(&$record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
// if the user is null then nobody is logged in... no access.
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
// This will force a login prompt.
$role = $user->val('role');
return Dataface_PermissionsTool::getRolePermissions($role);
// Returns all of the permissions for the user's current role.
}
function block__custom_javascripts() {
echo '<script src="custom.js" type="text/javascript" language="javascript"></script>';
}
}
?>
<?php
class tables_view_gefahr {
// check login & editieren nicht erlaubt
function getPermissions($record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
}
?>
<table>
<colgroup>
<col width="3%">
<col width="15%">
<col width="1%">
<col width="15%">
<col width="15%">
<col width="15%">
</colgroup>
<tr>
<td></td>
<th align="right">Koordinator</th>
<td></td>
<td>{$elements.coordinator1.html}</td>
<td>{$elements.coordinator2.html}</td>
<td>{$elements.coordinator3.html}</td>
</tr>
<tr>
<td></td>
<th align="right">Wissenschaftler</th>
<td></td>
<td>{$elements.scientist1.html}</td>
<td>{$elements.scientist2.html}</td>
<td>{$elements.scientist3.html}</td>
</tr>
<tr>
<td></td>
<th align="right">Planungsingenieur</th>
<td></td>
<td>{$elements.plan1.html}</td>
<td>{$elements.plan2.html}</td>
<td>{$elements.plan3.html}</td>
</tr>
<tr>
<td></td>
<th align="right">Lab.-Assistent</th>
<td></td>
<td>{$elements.lab1.html}</td>
<td>{$elements.lab2.html}</td>
<td>{$elements.lab3.html}</td>
</tr>
</table>
<div style="margin-left:3px;margin-top:3px;">
<a href="http://mpidb.mpi-magdeburg.mpg.de/">
<img title="Homepage Datenbanken" alt="Homepage Datenbanken" src="../master/images/mpi-banner.jpg"/>
</a>
</div>
--
-- Tabellenstruktur für Tabelle `list_reiter`
--
CREATE TABLE IF NOT EXISTS `list_reiter` (
`autoID` smallint(6) unsigned zerofill NOT NULL AUTO_INCREMENT,
`reiter` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`kategorie` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`favorit` tinyint(1) NOT NULL DEFAULT '0',
`bedeutung` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`autoID`),
UNIQUE KEY `reiter` (`reiter`),
KEY `kategorie` (`kategorie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reiterlinks fuer Xataface' AUTO_INCREMENT=416 ;
--
-- RELATIONEN DER TABELLE `list_reiter`:
-- `kategorie`
-- `list_katReiter` -> `kategorie`
--
--
-- Daten für Tabelle `list_reiter`
--
INSERT INTO `list_reiter` (`autoID`, `reiter`, `kategorie`, `favorit`, `bedeutung`) VALUES
(000001, 'list_email', 'Liste', 0, 'Emailadresse fuer Benachrichtung Ablauf Lizenz oder Support'),
(000002, 'list_hersteller', 'Liste', 0, 'Liste Hersteller fuer Software und Vereinbarungen'),
(000003, 'list_kategorie', 'Liste', 0, 'Liste Software-Kategorien'),
(000004, 'list_katReiter', 'Liste', 0, 'Zugehoerigkeit DB-Tabellen'),
(000005, 'list_lagerort', 'Liste', 0, 'Ablageort Schlussel'),
(000006, 'list_lieferant', 'Liste', 0, 'Liste Lieferanten fuer Lizenzen und Vereinbarungen'),
(000007, 'list_logintyp', 'Liste', 0, 'Zuordnung Links zu einer Kategorie'),
(000018, 'list_nutzer', 'Liste', 0, 'Liste Nutzer in Lizenzen und Installationen'),
(000019, 'list_reiter', 'Liste', 0, 'Sammelcontainer fuer Tabbutton "mehr .."'),
(000020, 'list_vorgang', 'Liste', 0, 'Zuordnung Dateiablage zu einer Kategorie'),
(000021, 'mpi_ablage', 'Ablage', 1, 'Dateiablagen fuer Software und Lizenzen'),
(000022, 'mpi_links', 'Ablage', 0, 'Linksammlung zu diversen Webseiten oder Logins'),
(000023, 'mpi_notiz', 'Ablage', 0, 'Liste Lizenznotizen'),
(000024, 'mpi_users', 'Authorisierung', 1, 'Authorisierung und Berechtigung Benutzer'),
(000025, 'view_user', 'View', 0, 'Auswahl Benutzer aus DB user'),
--
-- Constraints der Tabelle `list_reiter`
--
ALTER TABLE `list_reiter`
ADD CONSTRAINT `list_reiter_kateg` FOREIGN KEY (`kategorie`) REFERENCES `list_katReiter` (`kategorie`) ON UPDATE CASCADE;
--
-- Erweiterung vorhandener Tabellen
--
ALTER TABLE list_reiter MODIFY COLUMN bedeutung varchar (100) AFTER kategorie;
ALTER TABLE list_reiter ADD favorit TINYINT(1) NOT NULL DEFAULT '0' AFTER kategorie;
ALTER TABLE list_reiter ADD history TINYINT(1) NOT NULL DEFAULT '0' AFTER favorit;
DROP TABLE IF EXISTS list_reiter__history;
CREATE OR REPLACE VIEW view_favorit AS SELECT * FROM list_reiter WHERE favorit = '1';
{*-------------------------------------------------------------------------------
* Dataface Web Application Framework
* Copyright (C) 2005-2006 Steve Hannah (shannah@sfu.ca)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*-------------------------------------------------------------------------------
*}
{if $ENV.prefs.horizontal_tables_menu}
<ul id="table_selection_tabs">
{block name="tables_menu_head"}
{define_slot name="tables_menu_options"}
{foreach from=$ENV.APPLICATION._tables item=label key=table}
{assign var=nav value=$ENV.APPLICATION_OBJECT->getNavItem($table, $label)}
{if $nav}
<li class="nav {if $nav.selected}selected{/if} {$table}">
<a href="{$nav.href|escape}"
{* accesskey="{$nav.label[0]|escape}" *}
class="table-selection-tab {if $nav.selected}selected {$table}{/if}"
title="Tabelle {$nav.label|escape}"
id="TableLink_{$table}">
{$nav.label|escape}
</a>
</li>
{/if}
{/foreach}
{/define_slot}
{block name="tables_menu_tail"}
</ul>
{else}
<div class="portlet" id="portlet-navigation-tree">
<div>
<h5>Navigation</h5>
<div class="portletBody">
{block name="tables_menu_head"}
{define_slot name="tables_menu_options"}
{foreach from=$ENV.APPLICATION._tables item=label key=table}
{assign var=nav value=$ENV.APPLICATION_OBJECT->getNavItem($table, $label)}
{if $nav}
<div class="portletContent">
<a href="{$nav.href|escape}"
accesskey="accesskeys-navigation"
class="navItem {if $nav.selected}currentNavItem{/if}"
title="{$nav.label|escape}"
id="TableLink_{$table}">
<img
src="{$ENV.DATAFACE_URL}/images/folder_icon.gif" alt="" class="navIconRoot" title="{$nav.label|escape}" />
<span class="navItemText">
{$nav.label|escape}
</span>
</a>
</div>
{/if}
{/foreach}
{/define_slot}
{block name="tables_menu_tail"}
</div>
</div>
</div>
{/if}
[__global__]
noLinkFromListView = 1
[autoID]
#widget:type = "hidden"
visibility:list = "hidden"
#visibility:browse = "hidden"
visibility:find = "hidden"
[kategorie]
noLinkFromListView = 0
widget:focus = 1
--
-- Tabellenstruktur für Tabelle `list_reiter`
--
CREATE TABLE IF NOT EXISTS `list_reiter` (
`autoID` smallint(6) unsigned zerofill NOT NULL AUTO_INCREMENT,
`reiter` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`kategorie` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`favorit` tinyint(1) NOT NULL DEFAULT '0',
`bedeutung` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`autoID`),
UNIQUE KEY `reiter` (`reiter`),
KEY `kategorie` (`kategorie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reiterlinks fuer Xataface' AUTO_INCREMENT=416 ;
--
-- RELATIONEN DER TABELLE `list_reiter`:
-- `kategorie`
-- `list_katReiter` -> `kategorie`
--
--
-- Daten für Tabelle `list_reiter`
--
INSERT INTO `list_reiter` (`autoID`, `reiter`, `kategorie`, `favorit`, `bedeutung`) VALUES
(000001, 'list_email', 'Liste', 0, 'Emailadresse fuer Benachrichtung Ablauf Lizenz oder Support'),
(000002, 'list_hersteller', 'Liste', 0, 'Liste Hersteller fuer Software und Vereinbarungen'),
(000003, 'list_kategorie', 'Liste', 0, 'Liste Software-Kategorien'),
(000004, 'list_katReiter', 'Liste', 0, 'Zugehoerigkeit DB-Tabellen'),
(000005, 'list_lagerort', 'Liste', 0, 'Ablageort Schlussel'),
(000006, 'list_lieferant', 'Liste', 0, 'Liste Lieferanten fuer Lizenzen und Vereinbarungen'),
(000007, 'list_logintyp', 'Liste', 0, 'Zuordnung Links zu einer Kategorie'),
(000018, 'list_nutzer', 'Liste', 0, 'Liste Nutzer in Lizenzen und Installationen'),
(000019, 'list_reiter', 'Liste', 0, 'Sammelcontainer fuer Tabbutton "mehr .."'),
(000020, 'list_vorgang', 'Liste', 0, 'Zuordnung Dateiablage zu einer Kategorie'),
(000021, 'mpi_ablage', 'Ablage', 1, 'Dateiablagen fuer Software und Lizenzen'),
(000022, 'mpi_links', 'Ablage', 0, 'Linksammlung zu diversen Webseiten oder Logins'),
(000023, 'mpi_notiz', 'Ablage', 0, 'Liste Lizenznotizen'),
(000024, 'mpi_users', 'Authorisierung', 1, 'Authorisierung und Berechtigung Benutzer'),
(000025, 'view_user', 'View', 0, 'Auswahl Benutzer aus DB user'),
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `list_reiter`
--
ALTER TABLE `list_reiter`
ADD CONSTRAINT `list_reiter_kateg` FOREIGN KEY (`kategorie`) REFERENCES `list_katReiter` (`kategorie`) ON UPDATE CASCADE;
CREATE OR REPLACE VIEW view_lgk AS
SELECT
autoID,
lgk,
beschreibung,
priority
FROM
mpidb_asi_inv.list_lgk
CREATE OR REPLACE VIEW view_gefahr AS
SELECT
autoID,
kategorie,
hsatz,
merkmal,
anweisung,
lgk
FROM
mpidb_asi_inv.list_gefahr
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment