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

Init basis xataface and common folder/files

parents
<?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
[hotkeys]
category=personal_tools
label="Hotkeys"
accessKey = "h"
url="{$app->url('-action=hotkeys')}"
template=hotkeys.html
[forgot_password]
;; entspricht disabled
;;[manage]
;; entspricht disabled
[my_profile]
;; entspricht disabled
[change_password]
;; entspricht disabled
[rss]
;; entspricht disabled
[record_rss > rss]
;; entspricht disabled
[related_rss]
;; entspricht disabled
[export_xml]
;; entspricht disabled
[view_xml]
;; entspricht disabled
[related_xml > export_xml]
;; entspricht disabled
[xml_list]
;; entspricht disabled
;; Problem: Man kann suchen, ohne das man angemeldet ist, deshalb permission hier explizit setzen
;; nicht mehr notwendig, da suchen per template augeschalten
;;[search_index]
;; label="This Site"
;; category=find_actions
;; condition="isset($this->_conf['_index'])"
;; permission=find
;; action=search_index
[printable_report]
icon="{$site_url}/images/printer.png"
category=result_list_actions
description="See this product list in a printable format"
url="{$app->url('-action=printable_report')}"
;; # bestimmte Tabellen nur
;; condition="$query['-table'] == 'mpi_kosten'"
;; # nur admin darf drucken
;; permission=reports
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".ini" allowed="false" />
</fileExtensions>
</security>
</system.webServer>
</configuration>
{*-------------------------------------------------------------------------------
* 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.
*-------------------------------------------------------------------------------
*}
{use_macro file="Dataface_Record_Template.html"}
{fill_slot name="record_content"}
<h2>{translate id="templates.Dataface_Import_Related_Records.HEADING_IMPORT_RECORDS_FORM"}
Import Records Form
{/translate}</h2>
<p>{translate id="templates.Dataface_Import_Related_Records.MESSAGE_INTRO"}
This form allows you to import records into the current table
{/translate}</p>
{if $filters|@count > 0 or $step != 1}
{if $filters|@count > 0 }
<div id="import-filter-help">
<h3>{translate id="templates.Dataface_Import_Related_Records.HEADING_INSTRUCTIONS"}
Instructions
{/translate}</h3>
<p>{translate id="templates.Dataface_Import_Related_Records.P_INSTRUCTIONS_1"}
Select the appropriate import format from the select list, paste the appropriate
data to be imported into the text area or select a file to upload that contains
the data to be imported.
{/translate}
{translate id="templates.Dataface_Import_Related_Records.P_INSTRUCTIONS_2"}
Be sure that the data being imported is in the correct format or the
import may fail.
{/translate}
</p>
<h4>{translate id="templates.Dataface_Import_Related_Records.HEADING_IMPORT_SPECIFIC_INSTRUCTIONS"}
Import Format Specific Instructions:
{/translate}</h4>
<div id="import-filter-description">
<p><b>Tabelle Software:</b> (ohne Leerzeichen nach dem Komma)<br>
<b>Format CSV:</b> software, version, kategorie, nutzrecht, hersteller, quelle, bemerkung, bearbeiter<br>
<b>Beispiel:</b> Acrobat Reader, XI, Tools, Kommerziell, Adobe Inc., SoftwarePaket, Updates deaktiviert, mustermann<br>
<b>Voraussetzung:</b> Daten vorhanden in Tabellen lst_kategorie, ist_nutzrecht, list_hersteller, list_quelle
</p>
<p><b>Tabelle Lizenz:</b> (ohne Leerzeichen nach dem Komma)<br>
<b>Format CSV:</b> softID, modell, status, bezeichnung, anzahl, version, vertrag, expLizenz, nachricht, email, support, expSupport, update, nutzer, lieferant, bestellnummer, artikelnummer, ePreis, bemerkung, bearbeiter<br>
<b>Beispiel:</b> 16, Campus, 1, typ, 3, 3.0, --, 24.10.2014, 0, , 1, 09.10.2014, 1, MPI, 1234-5678-9101, Asknet AG, 123, 456, 12.34, bemerkung, schachi<br>
<b>Voraussetzung:</b> Daten vorhanden in Tabellen mpi_software, list_modell, mpi_vertrag, list_email, list_nutzer
</p>
<p><b>Tabelle Schluessel:</b> (ohne Leerzeichen nach dem Komma)<br>
<b>Format CSV:</b> key, softart, lizenID, multikey, lagerort, notiz, bearbeiter<br>
<b>Beispiel:</b> 12345-67890-12345, Campus Systembuilder, 1203, 0, V-1.12, Safe, schachi<br>
<b>Voraussetzung:</b> Daten vorhanden in Tabellen mpi_lizenz, list_lagerort
</p>
</div>
</div>
{literal}
<script language="javascript"><!--
{/literal}
var filterDiv = document.getElementById('import-filter-description');
filterDiv.__filter_descriptions = {literal}{};{/literal}
{foreach from=$filters item=filterName}
filterDiv.__filter_descriptions['{$filterName|addslashes}'] = "{translate id="import_filters:`$filterName`:help"}No description available for this import filter. Please add a filter description to your language config files ask key <em>import_filters:{$filterName}:help</em>{/translate}";
{/foreach}
{literal}
function updateFilterDescription(filterName){
var filterDiv = document.getElementById('import-filter-description');
filterDiv.innerHTML = filterDiv.__filter_descriptions[filterName];
}
//--></script>
{/literal}
{/if}
{block name="before_import_related_records_form"}
{block name="before_import_related_`$ENV.relationship`_form"}
{define_slot name="import_related_`$ENV.relationship`_form"}
{define_slot name="import_related_records_form"}
<div id="import-records-form">
{$form}
</div>
{/define_slot}
{/define_slot}
{block name="after_import_related_`$ENV.relationship`_form"}
{block name="after_import_related_records_form"}
{else}
<p><img src="{$ENV.DATAFACE_URL}/images/exclamation.gif"> {translate id="templates.Dataface_Import_Related_Records.MESSAGE_NO_IMPORT_FILTERS_DEFINED"}No import filters were defined for this table.{/translate}</p>
{/if}
{/fill_slot}
{/use_macro}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".ini" allowed="false" />
<add fileExtension=".css" allowed="false" />
<add fileExtension=".js" allowed="false" />
</fileExtensions>
</security>
</system.webServer>
</configuration>
[show_hide_related_list_columns]
;; link funktiniert nicht
[hotkeys]
category=personal_tools
label="Hotkeys"
accessKey = "h"
url="{$app->url('-action=hotkeys')}"
template=hotkeys.html
[forgot_password]
;; entspricht disabled
;;[manage]
;; entspricht disabled
[my_profile]
;; entspricht disabled
[change_password]
;; entspricht disabled
[rss]
;; entspricht disabled
[record_rss > rss]
;; entspricht disabled
[related_rss]
;; entspricht disabled
[export_xml]
;; entspricht disabled
[view_xml]
;; entspricht disabled
[related_xml > export_xml]
;; entspricht disabled
[xml_list]
;; entspricht disabled
;; Problem: Man kann suchen, ohne das man angemeldet ist, deshalb permission hier explizit setzen
;; nicht mehr notwendig, da suchen per template augeschalten
;;[search_index]
;; label="This Site"
;; category=find_actions
;; condition="isset($this->_conf['_index'])"
;; permission=find
;; action=search_index
[printable_report]
icon="{$site_url}/images/printer.png"
category=result_list_actions
description="See this product list in a printable format"
url="{$app->url('-action=printable_report')}"
;; # bestimmte Tabellen nur
;; condition="$query['-table'] == 'mpi_kosten'"
;; # nur admin darf drucken
;; permission=reports
<?php
/*
* Xataface Web Application Framework
* Copyright (C) 2005-2008 Web Lite Solutions Corp (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.
*
*-------------------------------------------------------------------------------
*/
/******************************************************************************
* File: <database>/actions/printable_report.php
* Author: schachi@mpi-magdeburg.mpg.de
* Created: 2015-01-29
* Description: Html formatted print report for all tables
*
*****************************************************************************/
/******************************************************************************
* modified custom <database>/actions.ini
*
* ...
* [printable_report]
* icon="{$site_url}/images/printer.png"
* category=result_list_actions
* description="See this product list in a printable format"
* url="{$app->url('-action=printable_report')}"
* ...
*
*****************************************************************************/
class actions_printable_report {
function handle(&$params) {
//import('Dataface/RecordReader.php');
$app =& Dataface_Application::getInstance();
$query = $app->getQuery();
$query['-skip'] = 0;
$limit = 999;
$query['-limit'] = $limit;
$table = Dataface_Table::loadTable($query['-table']);
// $records = df_get_records_array($query['-table'], $query);