first commit

This commit is contained in:
aschwarz 2023-03-09 11:22:13 +01:00
commit 1bf9923edf
1745 changed files with 298896 additions and 0 deletions

BIN
Archiv/AD.docx Executable file

Binary file not shown.

Binary file not shown.

27
Archiv/Dokument4.txt Executable file
View File

@ -0,0 +1,27 @@
Status Neu
Dann soll man erstmal die Daten sehen vom VV.
Der Admin kann dann verschiedene Aktionen ausführen, ohne den Status zu ändern:
-> Gutachterbenennung
--> Mail an Ausschuss, der die Gutachter freigeben muss.
--> Fristsetzung, bis wann der Ausschuss ablehnen kann: Endefrist mit in die Mail
--> Möglichkeit Gutachter nachbenennen.
--> Hat der Ausschuss zugestimmt, werden die Gutachter angeschrieben
--> Zugestimmt, gilt der Antrag, wenn die Merheit des Ausschusses nicht innerhalb der Frist abgelehnt hat.
Fragen hierzu: Schreibt das System die Gutachter automatisch an, oder soll ein manueller Eingriff erforderlich sein?
Stimmt der Ausschuss gesamt über die Gutachter ab, oder entscheidet er einzeln über jeden vorgeschlagenen Gutachter?
--> Ich meine man hat sich auf Einzelabstimmung festgelegt.
--> Erst mit dem Anschreiben der Gutachter wird der Status auf "Gutachter benannt" gesetzt
-> Beteiligte benennen
-->
-> Entscheidung terminieren
Manuelle Statusändern:
Entschieden
--> weiteres Vorgehen nach Prämienkatalog (Eingabe/Vorgehen muss noch besprochen werden)
--> Begründung
Auschluss
--> Begründung

Binary file not shown.

Binary file not shown.

BIN
Archiv/Prõmienkatalog.msg Executable file

Binary file not shown.

BIN
Archiv/Verfahren mit Statis.doc Executable file

Binary file not shown.

View File

@ -0,0 +1,42 @@
1) Ausschuss definieren:
+ -> Personen sind in imt_user
+ -> Es wird eine eigene Rolle geben
2) Auswahl der gewünschten Gutachter.
# -> Vorabfrage Auswahl der bisher erfassten User alternativ Student / Professor / Extern (nicht AD) angeben für Neuanlage
--> oberer Teil Bisher benannte Gutachter (Name, Frist, Status(Bei Ausschussprüfung, Angenommen, Abgelehnt)
+ --> unterer Teil. Neue Gutachter hinzufügen
+ -> Student Abfrage des Namens über LDAP möglich, AG Jahrgang müssen gefunden werden
+ -> Professor Abfrage des Namens über LDAP möglich, Fakultät sollte gefunde werden.
+ -> Extern. Eingabe der Daten manuell
+ -> Nach Neuanlage mit Benutzerkennung Kenner setzen, dass Mail noch nicht versendet wurde Spalte in imt_user (Alternativ kein PW setzen, das wird erst mein Mailversand generiert)
+ -> Zurück auf Eingangsseite. Gutachter ist in der Liste erfassten User
+ -> Bei Auswahl des erfassten User Eingabemöglichkeit des Datum, bis wann Ausschuss ablehnen muss sowie Kommentarfeld
+ -> Mail an Ausschussmitglieder mit Einsicht des Fristdatums sowie des Kommentars
+ -> Bei erfolgreichem Versenden Status des VV einmalig auf "Status vorgeprüft setzen" im Verlauf, wenn Status Neu noch gesetzt ist bzw. noch nicht vorgeprüft gesetzt wurde
+ -> Außerdem den Verlauf aktualisieren mit Gutachtername und Fristdatum
-> Nach Fristablauf: Hat die Mehrheit des Ausschusses zugestimmt bzw nichts gemacht, ist der Gutachter bestimmt worden.
-> Manueller Eingriff, wann Gutachter angeschrieben wird: Dann aber Passwort des Gutachters setzen, Per Mail anschreiben mit
Textfeldeingabemöglichkeit und Zugangsdaten mit Aktivierungslink wenn kein Passwort gesetzt war
(das bedeudet, dass der Gutachter sich nicht selber registriert hat)
und Recht setzen, dass der diesen VV im Gutachterbereich anschauen darf
-> Status Gutachter benannt im Verlauf. Das klaptt nicht beim Vorschlag, da es mehrere Gutachter sein können und Beteiligtenstatus zwischenfunken kann
Status:
Ermitteln Anzahl der Gutachter
Ist die Frist abgelaufen
-> JA
-> Ist die Anzahl der Ablehnung < Hälfte "Anzahl der Gutachter"
JA --> Status: Angenommen, weitere Aktionen ermöglichen
Nein --> Status: Abgelehnt
-> NEIN
-> Ist die "Anzahl Zustimmung" >= Hälfte "Anzahl der Gutachter"
JA --> Status: Angenommen, weitere Aktionen ermöglichen
Nein --> Status: Bei Ausschussprüfung

BIN
Archiv/erm_ideenmanagement.mwb Executable file

Binary file not shown.

Binary file not shown.

534
Archiv/ideenmanagement.sql Executable file
View File

@ -0,0 +1,534 @@
-- phpMyAdmin SQL Dump
-- version 3.3.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 11. Mai 2011 um 14:23
-- Server Version: 5.1.37
-- PHP-Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Datenbank: `ideenmanagement`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_ausschuss_gutachter_erg`
--
CREATE TABLE IF NOT EXISTS `imt_ausschuss_gutachter_erg` (
`gaid` int(11) NOT NULL AUTO_INCREMENT,
`imtuid` int(11) NOT NULL,
`gid` int(11) NOT NULL,
`ergebnis` enum('Y','N') COLLATE utf8_bin NOT NULL,
`erfass_dat` date NOT NULL,
PRIMARY KEY (`gaid`),
KEY `imtuid` (`imtuid`),
KEY `gid` (`gid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
--
-- Daten für Tabelle `imt_ausschuss_gutachter_erg`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_beteiligte`
--
CREATE TABLE IF NOT EXISTS `imt_beteiligte` (
`bid` int(11) NOT NULL AUTO_INCREMENT,
`imtuid` int(11) NOT NULL,
`vid` int(11) NOT NULL,
`bemerkung` text COLLATE utf8_bin NOT NULL,
`erfass_dat` datetime NOT NULL,
PRIMARY KEY (`bid`),
KEY `imtuid` (`imtuid`),
KEY `vid` (`vid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
--
-- Daten für Tabelle `imt_beteiligte`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_gruppenmitglieder`
--
CREATE TABLE IF NOT EXISTS `imt_gruppenmitglieder` (
`gmid` int(11) NOT NULL AUTO_INCREMENT,
`vid` int(11) NOT NULL,
`name` varchar(250) COLLATE utf8_bin NOT NULL,
`mail` varchar(250) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`gmid`),
KEY `vid` (`vid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
--
-- Daten für Tabelle `imt_gruppenmitglieder`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_gruppenmitglieder_temp`
--
CREATE TABLE IF NOT EXISTS `imt_gruppenmitglieder_temp` (
`session` varchar(250) COLLATE utf8_bin NOT NULL,
`imtuid` int(11) NOT NULL,
`name` varchar(250) COLLATE utf8_bin NOT NULL,
`mail` varchar(250) COLLATE utf8_bin NOT NULL,
`datum` datetime NOT NULL,
KEY `imtuid` (`imtuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Daten für Tabelle `imt_gruppenmitglieder_temp`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_gutachter`
--
CREATE TABLE IF NOT EXISTS `imt_gutachter` (
`gid` int(11) NOT NULL AUTO_INCREMENT,
`imtuid` int(11) NOT NULL,
`vid` int(11) NOT NULL,
`bemerkung` text COLLATE utf8_bin NOT NULL,
`erfass_dat` datetime NOT NULL,
`frist_datum` date NOT NULL COMMENT 'Datum, bis wann der Ausschuss abstimmen muss',
`ablehn_dat` datetime NOT NULL,
PRIMARY KEY (`gid`),
KEY `imtuid` (`imtuid`),
KEY `vid` (`vid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=2 ;
--
-- Daten für Tabelle `imt_gutachter`
--
INSERT INTO `imt_gutachter` (`gid`, `imtuid`, `vid`, `bemerkung`, `erfass_dat`, `frist_datum`, `ablehn_dat`) VALUES
(1, 3, 1, '', '2011-05-09 09:28:06', '2011-05-13', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_kategorie`
--
CREATE TABLE IF NOT EXISTS `imt_kategorie` (
`kid` int(11) NOT NULL AUTO_INCREMENT,
`kategorie` varchar(250) COLLATE utf8_bin NOT NULL,
`sort_order` int(11) NOT NULL,
PRIMARY KEY (`kid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=18 ;
--
-- Daten für Tabelle `imt_kategorie`
--
INSERT INTO `imt_kategorie` (`kid`, `kategorie`, `sort_order`) VALUES
(0, 'Ohne Kategorie', 0),
(1, 'Haushalt', 10),
(2, 'Organisation', 20),
(3, 'Umwelt', 30),
(4, 'Pr&uuml;fungsamt', 40),
(5, 'Reisekosten', 50),
(6, 'Bibliothek', 60),
(7, 'Rechenzentrum', 70),
(8, 'Personalmanagement', 80),
(9, 'Studienangelegenheiten', 90),
(10, 'Akademisches Auslandsamt', 100),
(11, 'Qualit&auml;tsmanagement', 110),
(12, 'Evaluation', 120),
(13, 'Fakult&auml;t 1', 130),
(14, 'Fakult&auml;t 2', 140),
(15, 'Institut f&uuml;r Angewandte Forschung', 150),
(16, 'Hochschule allgemein', 160),
(17, 'Sonstiges', 170);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_parameter`
--
CREATE TABLE IF NOT EXISTS `imt_parameter` (
`PID` int(5) NOT NULL AUTO_INCREMENT,
`Beschreibung` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '',
`Wert1` varchar(200) COLLATE utf8_bin DEFAULT NULL,
`Wert2` varchar(200) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`PID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=3 ;
--
-- Daten für Tabelle `imt_parameter`
--
INSERT INTO `imt_parameter` (`PID`, `Beschreibung`, `Wert1`, `Wert2`) VALUES
(1, 'Ansprechpartner im Fehlerfall', 'Frau Henzel', 'henzel@hs-ludwigsburg.de'),
(2, 'Benutzer Passwort LDAP User', 'LDAPqueryUser', 'ldHS332');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_rechte`
--
CREATE TABLE IF NOT EXISTS `imt_rechte` (
`reid` int(11) NOT NULL AUTO_INCREMENT,
`beschreibung` varchar(100) COLLATE utf8_bin NOT NULL,
`dateiname` varchar(50) COLLATE utf8_bin NOT NULL,
`target` varchar(50) COLLATE utf8_bin NOT NULL,
`bereich` enum('B','U') COLLATE utf8_bin NOT NULL COMMENT 'Bearbeiten, User',
`sort_order` int(5) NOT NULL,
PRIMARY KEY (`reid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=9 ;
--
-- Daten für Tabelle `imt_rechte`
--
INSERT INTO `imt_rechte` (`reid`, `beschreibung`, `dateiname`, `target`, `bereich`, `sort_order`) VALUES
(1, 'Neu (Eingegangen)', 'status.php?id=1', 'admin_haupt', 'B', 10),
(2, 'In Bearbeitung', 'status.php?id=100', 'admin_haupt', 'B', 20),
(7, 'Entschieden', 'status.php?id=7', 'admin_haupt', 'B', 70),
(8, 'Ausschluss', 'status.php?id=8', 'admin_haupt', 'B', 80);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_rolle`
--
CREATE TABLE IF NOT EXISTS `imt_rolle` (
`roid` int(11) NOT NULL AUTO_INCREMENT,
`bezeichnung` varchar(200) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`roid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=5 ;
--
-- Daten für Tabelle `imt_rolle`
--
INSERT INTO `imt_rolle` (`roid`, `bezeichnung`) VALUES
(1, 'Administrator'),
(2, 'Gutachter'),
(3, 'Beteiligter'),
(4, 'Ausschuss');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_rollen_rechte_zuord`
--
CREATE TABLE IF NOT EXISTS `imt_rollen_rechte_zuord` (
`reid` int(11) NOT NULL,
`roid` int(11) NOT NULL,
KEY `reid` (`reid`),
KEY `roid` (`roid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Daten für Tabelle `imt_rollen_rechte_zuord`
--
INSERT INTO `imt_rollen_rechte_zuord` (`reid`, `roid`) VALUES
(1, 1),
(2, 1),
(7, 1),
(8, 1);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_rollen_user_zuord`
--
CREATE TABLE IF NOT EXISTS `imt_rollen_user_zuord` (
`rozuid` int(11) NOT NULL AUTO_INCREMENT,
`roid` int(11) NOT NULL,
`imtuid` int(11) NOT NULL,
PRIMARY KEY (`rozuid`),
KEY `roid` (`roid`),
KEY `imtuid` (`imtuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=5 ;
--
-- Daten für Tabelle `imt_rollen_user_zuord`
--
INSERT INTO `imt_rollen_user_zuord` (`rozuid`, `roid`, `imtuid`) VALUES
(1, 1, 1),
(3, 4, 1);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_stati`
--
CREATE TABLE IF NOT EXISTS `imt_stati` (
`sid` int(11) NOT NULL AUTO_INCREMENT,
`status` varchar(250) COLLATE utf8_bin NOT NULL,
`sort_order` int(11) NOT NULL,
PRIMARY KEY (`sid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=10 ;
--
-- Daten für Tabelle `imt_stati`
--
INSERT INTO `imt_stati` (`sid`, `status`, `sort_order`) VALUES
(0, 'Kein Status', 0),
(1, 'Neu (Eingegangen)', 10),
(2, 'Vorpr&uuml;fung bestanden', 20),
(3, 'Gutachterbenennung', 30),
(4, 'Beteiligte angeh&ouml;rt', 40),
(5, 'Gutachten eingegangen', 50),
(6, 'Entscheidung terminiert', 60),
(7, 'Entschieden', 70),
(8, 'Ausschluss', 80);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_user`
--
CREATE TABLE IF NOT EXISTS `imt_user` (
`imtuid` int(11) NOT NULL AUTO_INCREMENT,
`vorname` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
`nachname` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
`mail` varchar(40) COLLATE utf8_bin NOT NULL,
`beziehung` varchar(1) COLLATE utf8_bin NOT NULL,
`ag` varchar(10) COLLATE utf8_bin NOT NULL,
`jahrgang` varchar(10) COLLATE utf8_bin NOT NULL,
`fakultaet` varchar(250) COLLATE utf8_bin NOT NULL,
`uid` varchar(23) COLLATE utf8_bin NOT NULL DEFAULT '',
`passwort` varchar(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`pw_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`mail_inaktiv` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`erstell_dat` datetime NOT NULL COMMENT 'Wann wurde der Benutzer angelegt',
`aktiv` varchar(1) COLLATE utf8_bin NOT NULL DEFAULT '0',
`akivierungscode` varchar(250) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`imtuid`),
UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Benutzer' AUTO_INCREMENT=4 ;
--
-- Daten für Tabelle `imt_user`
--
INSERT INTO `imt_user` (`imtuid`, `vorname`, `nachname`, `mail`, `beziehung`, `ag`, `jahrgang`, `fakultaet`, `uid`, `passwort`, `pw_expire`, `mail_inaktiv`, `erstell_dat`, `aktiv`, `akivierungscode`) VALUES
(1, 'Alexander', 'Schwarz', 'netblack@gmx.de', 'S', 'C', '00', '', 'schwaral', 'f5df16d9bd60b0894064b5777139de79', '2012-04-18 12:51:16', '0000-00-00 00:00:00', '2011-04-14 09:03:13', '1', '77554321 '),
(2, 'Silke', 'Henzel', 'henzel@hs-ludwigsburg.de', '', '', '', 'Fakultät 1', 'henzelsi', 'f5df16d9bd60b0894064b5777139de79', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', ''),
(3, 'Wolfgang', 'Rieth', 'rieth@hs-ludwigsburg.de', '', '', '', 'Fakultät 1', 'riethwol', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2011-04-27 08:29:11', '1', '');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_userlog`
--
CREATE TABLE IF NOT EXISTS `imt_userlog` (
`lid` int(11) NOT NULL AUTO_INCREMENT,
`Datum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`IP` varchar(15) COLLATE utf8_bin NOT NULL DEFAULT '',
`user_agent` varchar(255) COLLATE utf8_bin NOT NULL,
`imtuid` int(11) DEFAULT NULL,
PRIMARY KEY (`lid`),
KEY `imtuid` (`imtuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Logins der Anwender' AUTO_INCREMENT=13 ;
--
-- Daten für Tabelle `imt_userlog`
--
INSERT INTO `imt_userlog` (`lid`, `Datum`, `IP`, `user_agent`, `imtuid`) VALUES
(1, '2011-04-15 10:30:45', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(2, '2011-04-18 07:18:19', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(3, '2011-04-18 07:54:01', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(4, '2011-04-18 11:13:38', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(5, '2011-04-18 14:18:10', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(6, '2011-04-19 09:59:08', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(7, '2011-04-19 11:29:34', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(8, '2011-04-26 10:31:01', '127.0.0.1', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)', 1),
(9, '2011-04-26 11:38:49', '127.0.0.1', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)', 1),
(10, '2011-04-27 07:36:42', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(11, '2011-05-04 14:29:23', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1),
(12, '2011-05-05 13:03:50', '127.0.0.1', 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0', 1);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_user_ad`
--
CREATE TABLE IF NOT EXISTS `imt_user_ad` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`objectsid` varchar(255) COLLATE utf8_bin NOT NULL,
`accountname` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=2 ;
--
-- Daten für Tabelle `imt_user_ad`
--
INSERT INTO `imt_user_ad` (`uid`, `objectsid`, `accountname`) VALUES
(1, 'adf', 'SCHWARAL');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_verlauf`
--
CREATE TABLE IF NOT EXISTS `imt_verlauf` (
`vlid` int(11) NOT NULL AUTO_INCREMENT,
`datum` datetime NOT NULL,
`bearbeiter` int(11) NOT NULL,
`status` int(11) NOT NULL,
`vid` int(11) NOT NULL,
`verlauf` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`vlid`),
KEY `vid` (`vid`),
KEY `bearbeiter` (`bearbeiter`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=4 ;
--
-- Daten für Tabelle `imt_verlauf`
--
INSERT INTO `imt_verlauf` (`vlid`, `datum`, `bearbeiter`, `status`, `vid`, `verlauf`) VALUES
(1, '2011-05-05 08:37:35', 1, 1, 1, 'Verbesserungsvorschlag erstellt'),
(2, '2011-05-05 08:41:06', 1, 0, 1, 'Kategorie wurde neu gesetzt: Hochschule allgemein'),
(3, '2011-05-09 09:28:07', 1, 0, 1, 'Mailfehler: Alexander Schwarz &uuml;ber Bestellung von Gutachter Wolfgang Rieth');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `imt_vorschlag`
--
CREATE TABLE IF NOT EXISTS `imt_vorschlag` (
`vid` int(11) NOT NULL AUTO_INCREMENT,
`imtuid` int(11) NOT NULL,
`betreff` varchar(255) COLLATE utf8_bin NOT NULL,
`beschreibung` text COLLATE utf8_bin NOT NULL,
`vorschlag` text COLLATE utf8_bin NOT NULL,
`nutzen` text COLLATE utf8_bin NOT NULL,
`public` enum('Y','N') COLLATE utf8_bin NOT NULL,
`kategorie` int(11) NOT NULL,
`erfass_dat` datetime NOT NULL,
`hinweis_eigen` text COLLATE utf8_bin NOT NULL,
`hinweis_admin` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`vid`),
KEY `imtuid` (`imtuid`),
KEY `kategorie` (`kategorie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=2 ;
--
-- Daten für Tabelle `imt_vorschlag`
--
INSERT INTO `imt_vorschlag` (`vid`, `imtuid`, `betreff`, `beschreibung`, `vorschlag`, `nutzen`, `public`, `kategorie`, `erfass_dat`, `hinweis_eigen`, `hinweis_admin`) VALUES
(1, 1, 'Selbstreinigende Toilettensp&uuml;lung', 'Die Rohrleitungen sind dann nicht mehr schmutzig', 'Hei&szlig;wassersp&uuml;lung einbauen', 'Man spart sich die Kosten eines Flaschners', 'Y', 16, '2011-05-05 08:37:35', '', '');
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `imt_ausschuss_gutachter_erg`
--
ALTER TABLE `imt_ausschuss_gutachter_erg`
ADD CONSTRAINT `imt_ausschuss_gutachter_erg_ibfk_2` FOREIGN KEY (`gid`) REFERENCES `imt_gutachter` (`gid`),
ADD CONSTRAINT `imt_ausschuss_gutachter_erg_ibfk_1` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`);
--
-- Constraints der Tabelle `imt_beteiligte`
--
ALTER TABLE `imt_beteiligte`
ADD CONSTRAINT `imt_beteiligte_ibfk_2` FOREIGN KEY (`vid`) REFERENCES `imt_vorschlag` (`vid`),
ADD CONSTRAINT `imt_beteiligte_ibfk_1` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`);
--
-- Constraints der Tabelle `imt_gruppenmitglieder`
--
ALTER TABLE `imt_gruppenmitglieder`
ADD CONSTRAINT `imt_gruppenmitglieder_ibfk_1` FOREIGN KEY (`vid`) REFERENCES `imt_vorschlag` (`vid`);
--
-- Constraints der Tabelle `imt_gruppenmitglieder_temp`
--
ALTER TABLE `imt_gruppenmitglieder_temp`
ADD CONSTRAINT `imt_gruppenmitglieder_temp_ibfk_1` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`);
--
-- Constraints der Tabelle `imt_gutachter`
--
ALTER TABLE `imt_gutachter`
ADD CONSTRAINT `imt_gutachter_ibfk_1` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`),
ADD CONSTRAINT `imt_gutachter_ibfk_2` FOREIGN KEY (`vid`) REFERENCES `imt_vorschlag` (`vid`);
--
-- Constraints der Tabelle `imt_rollen_rechte_zuord`
--
ALTER TABLE `imt_rollen_rechte_zuord`
ADD CONSTRAINT `imt_rollen_rechte_zuord_ibfk_1` FOREIGN KEY (`reid`) REFERENCES `imt_rechte` (`reid`),
ADD CONSTRAINT `imt_rollen_rechte_zuord_ibfk_2` FOREIGN KEY (`roid`) REFERENCES `imt_rolle` (`roid`);
--
-- Constraints der Tabelle `imt_rollen_user_zuord`
--
ALTER TABLE `imt_rollen_user_zuord`
ADD CONSTRAINT `imt_rollen_user_zuord_ibfk_1` FOREIGN KEY (`roid`) REFERENCES `imt_rolle` (`roid`),
ADD CONSTRAINT `imt_rollen_user_zuord_ibfk_2` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`);
--
-- Constraints der Tabelle `imt_userlog`
--
ALTER TABLE `imt_userlog`
ADD CONSTRAINT `imt_userlog_ibfk_1` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`);
--
-- Constraints der Tabelle `imt_verlauf`
--
ALTER TABLE `imt_verlauf`
ADD CONSTRAINT `imt_verlauf_ibfk_1` FOREIGN KEY (`vid`) REFERENCES `imt_vorschlag` (`vid`),
ADD CONSTRAINT `imt_verlauf_ibfk_2` FOREIGN KEY (`bearbeiter`) REFERENCES `imt_user` (`imtuid`),
ADD CONSTRAINT `imt_verlauf_ibfk_3` FOREIGN KEY (`status`) REFERENCES `imt_stati` (`sid`);
--
-- Constraints der Tabelle `imt_vorschlag`
--
ALTER TABLE `imt_vorschlag`
ADD CONSTRAINT `imt_vorschlag_ibfk_1` FOREIGN KEY (`imtuid`) REFERENCES `imt_user` (`imtuid`),
ADD CONSTRAINT `imt_vorschlag_ibfk_3` FOREIGN KEY (`kategorie`) REFERENCES `imt_kategorie` (`kid`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

15
Archiv/testszenario.txt Executable file
View File

@ -0,0 +1,15 @@
Ausgabe Registrierung erfolgreich abgeschlossen - >Mails abrufen
Ausgabe Registrierung nicht erfolgreich abgeschlossen --> Admin
Ausgabe -> Aktivierung fehlgeschlagen -->Admin
testszenario:
Alle Pflichtfelder
Mail ungültig / bereits vorhanden -> auch beim Absenden
Registrierung´
Aktivierung mit falschem aktcode
Aktivierung mit richtigem aktcode
login

5
Archiv/view_idm_user.sql Executable file
View File

@ -0,0 +1,5 @@
create view idm_user
as
(SELECT nachname, vorname, uid, pwd, mail,'S' art from kurs.stud where durchgefallen != 'Y')
union
(select doz_name, doz_vorname, doz_uid, doz_pwd, doz_mail, 'D' art from kurs.doz)

951
abschluss.php Executable file
View File

@ -0,0 +1,951 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_mail_einstell.php");
require_once("func_htmlclean.php");
require_once("func_gutachter_beteiligter_del.php");
#
# GGF den Gutachtern, Beteiligten die Rechte wieder wegnehmen, wenn Sie nirgends anders mitwirken
#
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "abschluss_" beginnen löschen
if($_GET['new'] == 1){;
$search_prefix = 'abschluss_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
$action = $_GET['action'];
if($action == ''){
if($_GET['error'] == 1){
$smarty->assign('abschluss_pflichtfelder', "1");
$smarty->assign('abschluss_error_text', "Es ist zu einem Fehler gekommen. Bitte treffen Sie eine Auswahl.");
}
$db = dbconnect();
# Alle Vorschläge, die in einer Sitzung behandelt wurden (Sitzungstermin liegt in Vergangenheit)
$query = "SELECT a.vid, betreff, date_format(erfass_dat, '%d.%m.%Y (%H:%i)') datum, vorname, nachname
FROM imt_vorschlag a, imt_sitzungen_vorschlag b, imt_user c
WHERE a.vid = b.vid
AND a.imtuid = c.imtuid
AND b.isid IN (SELECT isid FROM imt_sitzungen WHERE datum <= now())
AND a.vid NOT IN (SELECT vid FROM imt_verlauf WHERE status IN ('7','8'))
ORDER BY erfass_dat ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'datum' => $row[datum],
'vorname' => $row[vorname],
'nachname' => $row[nachname]
)
);
}
$smarty->assign('table_data1', $table_data1);
}
if($action == 'step2'){
#echo $action;
# Daten aufbereiten für zurückbutton
if(isset($_SESSION["abschluss_annahme"])){
$smarty->assign('abschluss_annahme', $_SESSION["abschluss_annahme"]);
}else{
# Standard ist Ja bei der Annahme
$smarty->assign('abschluss_annahme', "J");
}
if(isset($_POST["auswahl"])){
$vid = $_POST["auswahl"];
$_SESSION["abschluss_vid"] = $vid;
}
if($_SESSION["abschluss_vid"] == ''){
$fehler = 1;
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?error=1\">";
}
if(!isset($fehler )){
}
}
if($action == 'step3'){
#echo $action;
# Daten aufbereiten für zurückbutton
if(isset($_SESSION["abschluss_bemerkung"])){
$smarty->assign('abschluss_bemerkung', $_SESSION["abschluss_bemerkung"]);
}
if(isset($_POST["annahme"])){
$annahme = $_POST["annahme"];
$_SESSION["abschluss_annahme"] = $annahme;
if($annahme == 'Z'){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=zuruckstell\">";
}
}
if($_SESSION["abschluss_annahme"] == 'J'){
$smarty->assign('abschluss_field_begruendung', "Bitte begr&uuml;nden Sie die Annahme des Vorschlags");
}else{
$smarty->assign('abschluss_field_begruendung', "Bitte begr&uuml;nden Sie die Ablehnung des Vorschlags");
}
if($_GET['error'] == 1){
$smarty->assign('abschluss_annahme', $_SESSION["abschluss_annahme"]);
$smarty->assign('abschluss_pflichtfelder', "1");
$smarty->assign('abschluss_error_text', "Es ist zu einem Fehler gekommen. Bitte begr&uuml;nden Sie Ihre Entscheidung");
}else{
}
}
if($action == 'step3a'){
#echo $action;
# echo "<hr>";
# echo nl2br(print_r($_SESSION,true));
# echo "<hr>";
if(isset($_POST["abschluss_bemerkung"])){
$abschluss_bemerkung = $_POST["abschluss_bemerkung"];
$_SESSION["abschluss_bemerkung"] = $abschluss_bemerkung;
}
if($_SESSION["abschluss_bemerkung"] == ''){
$fehler = 1;
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=step3&error=1\">";
}
if(!isset($fehler )){
if($_GET['error'] == 1){
$smarty->assign('abschluss_pflichtfelder', "1");
$smarty->assign('abschluss_error_text', "Es ist zu einem Fehler gekommen. Bitte f&uuml;llen Sie mind. 1 Pflichtfeld aus!");
}else{
$vid = $_SESSION["abschluss_vid"];
$db = dbconnect();
$result = $db->query("SELECT annahme, ziel, begruendung, umsetzung, praemierung
FROM imt_bew_vorschlag
WHERE vid = '$vid'");
$row = $result->fetch_array();
# Daten aufbereiten für zurückbutton
if(isset($_SESSION["abschluss_chk1"])){
$smarty->assign('abschluss_chk1', $_SESSION["abschluss_chk1"]);
}else{
if(preg_match("/1/",$row[ziel])){
$smarty->assign('abschluss_chk1', 1);
}else{
$smarty->assign('abschluss_chk1', 0);
}
}
if(isset($_SESSION["abschluss_chk2"])){
$smarty->assign('abschluss_chk2', $_SESSION["abschluss_chk2"]);
}else{
if(preg_match("/2/",$row[ziel])){
$smarty->assign('abschluss_chk2', 2);
}else{
$smarty->assign('abschluss_chk2', 0);
}
}
if(isset($_SESSION["abschluss_chk3"])){
$smarty->assign('abschluss_chk3', $_SESSION["abschluss_chk3"]);
}else{
if(preg_match("/3/",$row[ziel])){
$smarty->assign('abschluss_chk3', 3);
}else{
$smarty->assign('abschluss_chk3', 0);
}
}
if(isset($_SESSION["abschluss_chk4"])){
$smarty->assign('abschluss_chk4', $_SESSION["abschluss_chk4"]);
}else{
if(preg_match("/4/",$row[ziel])){
$smarty->assign('abschluss_chk4', 4);
}else{
$smarty->assign('abschluss_chk4', 0);
}
}
if(isset($_SESSION["abschluss_chk5"])){
$smarty->assign('abschluss_chk5', $_SESSION["abschluss_chk5"]);
}else{
if(preg_match("/5/",$row[ziel])){
$smarty->assign('abschluss_chk5', 5);
}else{
$smarty->assign('abschluss_chk5', 0);
}
}
}
}
}
if($action == 'step4'){
#echo $action;
# Daten aufbereiten für zurückbutton
if(isset($_SESSION["abschluss_praemie"])){
$smarty->assign('abschluss_praemie', $_SESSION["abschluss_praemie"]);
}else{
$smarty->assign('abschluss_praemie', "J");
}
if(isset($_GET['back'])){ ## Kenner wird bei Step 5 im Zurückbutton gesetzt
$abschluss_chk1 = $_SESSION["abschluss_chk1"];
$abschluss_chk2 = $_SESSION["abschluss_chk2"];
$abschluss_chk3 = $_SESSION["abschluss_chk3"];
$abschluss_chk4 = $_SESSION["abschluss_chk4"];
$abschluss_chk5 = $_SESSION["abschluss_chk5"];
}else{
if(isset($_POST["chk1"])){
$abschluss_chk1 = $_POST["chk1"];
$_SESSION["abschluss_chk1"] = $abschluss_chk1;
}else{
$_SESSION["abschluss_chk1"] = "";
}
if(isset($_POST["chk2"])){
$abschluss_chk2 = $_POST["chk2"];
$_SESSION["abschluss_chk2"] = $abschluss_chk2;
}else{
$_SESSION["abschluss_chk2"] = "";
}
if(isset($_POST["chk3"])){
$abschluss_chk3 = $_POST["chk3"];
$_SESSION["abschluss_chk3"] = $abschluss_chk3;
}else{
$_SESSION["abschluss_chk3"] = "";
}
if(isset($_POST["chk4"])){
$abschluss_chk4 = $_POST["chk4"];
$_SESSION["abschluss_chk4"] = $abschluss_chk4;
}else{
$_SESSION["abschluss_chk4"] = "";
}
if(isset($_POST["chk5"])){
$abschluss_chk5 = $_POST["chk5"];
$_SESSION["abschluss_chk5"] = $abschluss_chk5;
}else{
$_SESSION["abschluss_chk5"] = "";
}
}
/*
if(isset($_POST["chk1"])){
$abschluss_chk1 = $_POST["chk1"];
$_SESSION["abschluss_chk1"] = $abschluss_chk1;
}else{
unset($_SESSION["abschluss_chk1"]);
$abschluss_chk1 = "";
}
if(isset($_POST["chk2"])){
$abschluss_chk2 = $_POST["chk2"];
$_SESSION["abschluss_chk2"] = $abschluss_chk2;
}else{
unset($_SESSION["abschluss_chk2"]);
$abschluss_chk2 = "";
}
*/
## Fehler, wenn keine Checkboxen ausgefüllt wurden
if($abschluss_chk1 == "" AND $abschluss_chk2 == "" AND $abschluss_chk3 == "" AND $abschluss_chk4 == "" AND $abschluss_chk5 == ""){
$fehler = 1;
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=step3a&error=1\">";
}
if(!isset($fehler )){
}
}
if($action == 'step5'){
#echo $action;
# Wenn der Vorschlag abgelehnt wurde, dann darf nur ein Teil des Prämienkatalogs abgefragt werden
# Übergabe der Entscheidung in html:
$smarty->assign('abschluss_annahme', $_SESSION["abschluss_annahme"]);
# Daten aufbereiten für zurückbutton
if(isset($_SESSION["abschluss_praemie1"])){
$smarty->assign('abschluss_praemie1', $_SESSION["abschluss_praemie1"]);
}else{
# Defaultwerte
if($_SESSION["abschluss_annahme"] == 'J'){
$smarty->assign('abschluss_praemie1', "1");
}else{
# Punkt 1 gibt es bei Ablehnung eines Vorschlags nicht: Min. 2 Punkte, mind. 5 Punkte
$smarty->assign('abschluss_praemie1', "2");
}
}
if(isset($_SESSION["abschluss_praemie2"])){
$smarty->assign('abschluss_praemie2', $_SESSION["abschluss_praemie2"]);
}else{
# Defaultwerte
if($_SESSION["abschluss_annahme"] == 'J'){
$smarty->assign('abschluss_praemie2', "1");
}else{
# Punkt 1 gibt es bei Ablehnung eines Vorschlags nicht: Min. 2 Punkte, mind. 5 Punkte
$smarty->assign('abschluss_praemie2', "3");
}
}
if(isset($_SESSION["abschluss_praemie3"])){
$smarty->assign('abschluss_praemie3', $_SESSION["abschluss_praemie3"]);
}else{
$smarty->assign('abschluss_praemie3', "1");
}
if(isset($_SESSION["abschluss_praemie4"])){
$smarty->assign('abschluss_praemie4', $_SESSION["abschluss_praemie4"]);
}else{
$smarty->assign('abschluss_praemie4', "1");
}
if(isset($_POST["praemie"])){
$praemie = $_POST["praemie"];
$_SESSION["abschluss_praemie"] = $praemie;
}
$smarty->assign('abschluss_praemie', $_SESSION["abschluss_praemie"]);
if($_SESSION["abschluss_praemie"] == 'J'){
# Bei Ja, den Fragenkatalog einblenden
}
if($_SESSION["abschluss_praemie"] == 'N'){
# Bei Nein, den Weiter mit den Informationsfelder (step7)
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=step7\">";
}
}
if($action == 'step6'){
#echo $action;
if(isset($_POST["praemie_1"])){
$praemie1 = $_POST["praemie_1"];
$_SESSION["abschluss_praemie1"] = $praemie1;
$praemie2 = $_POST["praemie_2"];
$_SESSION["abschluss_praemie2"] = $praemie2;
$praemie3 = $_POST["praemie_3"];
$_SESSION["abschluss_praemie3"] = $praemie3;
$praemie4 = $_POST["praemie_4"];
$_SESSION["abschluss_praemie4"] = $praemie4;
$praemie_punkte = $praemie1+$praemie2+$praemie3+$praemie4;
$_SESSION["abschluss_praemiepunkte"] = $praemie_punkte;
}
# Prämie bei angenommenem Vorschlag
if($_SESSION["abschluss_annahme"] == 'J'){
$db = dbconnect();
$result = $db->query("SELECT klasse, praemie_euro, praemie_dienstfrei
FROM imt_praemie
WHERE punkte_umsetzbar = $_SESSION[abschluss_praemiepunkte]");
$row = $result->fetch_array();
$gutschein = "$row[praemie_euro]";
$dienstbefreiung = "$row[praemie_dienstfrei]";
#Pr&auml;mienklasse
$klassierung = "$row[klasse]";
}
# Prämie bei abgelehntem Vorschlag
if($_SESSION["abschluss_annahme"] == 'N'){
$db = dbconnect();
$result = $db->query("SELECT klasse, praemie_euro, praemie_dienstfrei
FROM imt_praemie
WHERE punkte_nicht_umsetzbar = $_SESSION[abschluss_praemiepunkte]");
$row = $result->fetch_array();
$gutschein = "$row[praemie_euro]";
$dienstbefreiung = "$row[praemie_dienstfrei]";
#Pr&auml;mienklasse
$klassierung = "$row[klasse]";
}
$_SESSION["abschluss_guschein"] = $gutschein;
$_SESSION["abschluss_dienstbefreiung"] = $dienstbefreiung;
$_SESSION["abschluss_klassierung"] = $klassierung;
if(isset($_SESSION["abschluss_gutschein_or_befreiung"])){
$smarty->assign('abschluss_gutschein_or_befreiung', $_SESSION["abschluss_gutschein_or_befreiung"]);
}else{
$smarty->assign('abschluss_gutschein_or_befreiung', "gutschein");
}
$query_public = $db->query("SELECT public
FROM imt_vorschlag
WHERE vid = '$_SESSION[abschluss_vid]'
") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_public = $query_public->fetch_array();
if($row_public["public"] == 'Y'){
$public = "Y";
$public_text = "Liegt vor";
}else{
$public = "N";
$public_text = "Liegt nicht vor";
}
$_SESSION["abschluss_public"] = $public;
# Feldname anpassen Gutschein /Prämie
if($_SESSION["abschluss_klassierung"] >= 3){
$smarty->assign('abschluss_field_gutschein', "Pr&auml;mie:");
}else{
$smarty->assign('abschluss_field_gutschein', "Gutschein:");
}
$smarty->assign('abschluss_praemiepunkte', $_SESSION["abschluss_praemiepunkte"]);
$smarty->assign('abschluss_guschein', $_SESSION["abschluss_guschein"]);
$smarty->assign('abschluss_dienstbefreiung', $_SESSION["abschluss_dienstbefreiung"]);
$smarty->assign('abschluss_klassierung', $_SESSION["abschluss_klassierung"]);
$smarty->assign('abschluss_public_text', $public_text);
}
if($action == 'step7'){
#echo $action;
if($_SESSION["abschluss_annahme"] == 'N'){
# Bei Nein, den Weiter mit den Informationsfelder (step8)
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=step8\">";
}
if($_SESSION["abschluss_praemie"] == 'N'){
$smarty->assign('abschluss_backlink', "step4");
}else{
$smarty->assign('abschluss_backlink', "step6");
}
# Daten aufbereiten für zurückbutton
if(isset($_SESSION["abschluss_information_massnahme"])){
$smarty->assign('abschluss_information_massnahme', $_SESSION["abschluss_information_massnahme"]);
}
if(isset($_SESSION["abschluss_information_sachstand"])){
$smarty->assign('abschluss_information_sachstand', $_SESSION["abschluss_information_sachstand"]);
}
if($_GET['error'] == 1){
$smarty->assign('abschluss_pflichtfelder', "1");
$smarty->assign('abschluss_error_text', "Es ist zu einem Fehler gekommen. Bitte f&uuml;llen Sie das Feld &uuml;ber die geplanten Ma&szlig;nahmen aus");
}else{
if(isset($_POST["abschluss_praemie_gutschein"])){
$_SESSION["abschluss_guschein_save"] = 1;
$_SESSION["abschluss_guschein"] = $_POST["abschluss_praemie_gutschein"];
}else{
unset($_SESSION["abschluss_guschein_save"]);
}
if(isset($_POST["abschluss_gutschein_or_befreiung"])){
$_SESSION["abschluss_gutschein_or_befreiung"] = $_POST["abschluss_gutschein_or_befreiung"];
}
if($_SESSION["abschluss_dienstbefreiung"] == 0){
## Hier muss noch rein, dass gutschein ist, wenn keine Auswahl kommt, achtung auf zurück button
$_SESSION["abschluss_gutschein_or_befreiung"] = "gutschein";
}
}
}
if($action == 'step8'){
# echo $action;
# echo "<hr>";
# echo nl2br(print_r($_SESSION,true));
# echo "<hr>";
if($_SESSION["abschluss_annahme"] == 'N' AND $_SESSION["abschluss_praemie"] == 'N'){
$smarty->assign('abschluss_backlink', "step4");
}elseif($_SESSION["abschluss_annahme"] == 'J' AND $_SESSION["abschluss_praemie"] == 'N'){
$smarty->assign('abschluss_backlink', "step7");
}elseif($_SESSION["abschluss_annahme"] == 'N' AND $_SESSION["abschluss_praemie"] == 'J'){
$smarty->assign('abschluss_backlink', "step6");
}else{
$smarty->assign('abschluss_backlink', "step7");
}
if(isset($_POST["abschluss_information_massnahme"])){
$abschluss_information_massnahme = $_POST["abschluss_information_massnahme"];
$_SESSION["abschluss_information_massnahme"] = $abschluss_information_massnahme;
}
if(isset($_POST["abschluss_information_sachstand"])){
$abschluss_information_sachstand = $_POST["abschluss_information_sachstand"];
$_SESSION["abschluss_information_sachstand"] = $abschluss_information_sachstand;
}
if($_SESSION["abschluss_information_massnahme"] == '' AND $_SESSION["abschluss_annahme"] == 'J'){
$fehler = 1;
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=step7&error=1\">";
}
if(!isset($fehler )){
if($_SESSION["abschluss_praemie"] == 'N'){
# Man kann die Prämienpunkte Beit step4 mit nein bestätigen, dann darf es diese Variablen nicht geben.
# Wenn man zuerst ja gedrückt hat, die Prämie ausgefüllt hat und dann zurück und Prämie=N gewählt hat würde es die Var trotzdem geben
unset($_SESSION["abschluss_guschein"]);
unset($_SESSION["abschluss_dienstbefreiung"]);
unset($_SESSION["abschluss_klassierung"]);
unset($_SESSION["abschluss_praemiepunkte"]);
}
$abschluss_annahme = $_SESSION["abschluss_annahme"];
if($abschluss_annahme == 'J'){
$smarty->assign('abschluss_annahme', "Ja");
}else{
$smarty->assign('abschluss_annahme', "Nein");
}
$abschluss_bemerkung = $_SESSION["abschluss_bemerkung"];
$smarty->assign('abschluss_bemerkung', $abschluss_bemerkung);
if($_SESSION["abschluss_chk1"] == 1){
$smarty->assign('abschluss_chk1_txt', 1);
}
if($_SESSION["abschluss_chk2"] == 2){
$smarty->assign('abschluss_chk2_txt', 2);
}
if($_SESSION["abschluss_chk3"] == 3){
$smarty->assign('abschluss_chk3_txt', 3);
}
if($_SESSION["abschluss_chk4"] == 4){
$smarty->assign('abschluss_chk4_txt', 4);
}
if($_SESSION["abschluss_chk5"] == 5){
$smarty->assign('abschluss_chk5_txt', 5);
}
$query_public = $db->query("SELECT public
FROM imt_vorschlag
WHERE vid = '$_SESSION[abschluss_vid]'
") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_public = $query_public->fetch_array();
if($row_public["public"] == 'Y'){
$public = "Y";
$public_text = "Liegt vor";
}else{
$public = "N";
$public_text = "Liegt nicht vor";
}
$_SESSION["abschluss_public"] = $public;
$smarty->assign('abschluss_public', $public_text);
$abschluss_vid = $_SESSION["abschluss_vid"];
$smarty->assign('abschluss_vid', $abschluss_vid);
$abschluss_information_massnahme = $_SESSION["abschluss_information_massnahme"];
$smarty->assign('abschluss_information_massnahme', $abschluss_information_massnahme);
$abschluss_information_sachstand = $_SESSION["abschluss_information_sachstand"];
$smarty->assign('abschluss_information_sachstand', $abschluss_information_sachstand);
$abschluss_praemiepunkte = $_SESSION["abschluss_praemiepunkte"];
$smarty->assign('abschluss_praemiepunkte', $abschluss_praemiepunkte);
$abschluss_guschein = $_SESSION["abschluss_guschein"];
$smarty->assign('abschluss_guschein', $abschluss_guschein);
$abschluss_dienstbefreiung = $_SESSION["abschluss_dienstbefreiung"];
$smarty->assign('abschluss_dienstbefreiung', $abschluss_dienstbefreiung);
$abschluss_klassierung = $_SESSION["abschluss_klassierung"];
$smarty->assign('abschluss_klassierung', $abschluss_klassierung);
$abschluss_gutschein_or_befreiung = $_SESSION["abschluss_gutschein_or_befreiung"];
$smarty->assign('abschluss_gutschein_or_befreiung', $abschluss_gutschein_or_befreiung);
# Feldname anpassen Gutschein /Prämie
if($_SESSION["abschluss_klassierung"] >= 3 AND $_SESSION["abschluss_gutschein_or_befreiung"] == 'gutschein'){
$smarty->assign('abschluss_field_gutschein8', "Pr&auml;mie:");
$_SESSION["abschluss_klassierung_kurzel"] = 'P'; # Prämie
}elseif($_SESSION["abschluss_klassierung"] < 3 AND $_SESSION["abschluss_gutschein_or_befreiung"] == 'gutschein'){
$smarty->assign('abschluss_field_gutschein8', "Gutschein:");
$_SESSION["abschluss_klassierung_kurzel"] = 'G'; # Gutschein
}else{
$_SESSION["abschluss_klassierung_kurzel"] = 'B'; # Befreiung
}
/*
echo "<br><hr><br>Ausgabe der Variablen f&uuml;r den Eintrag in die Datenbank...<br>";
echo nl2br(print_r($_SESSION,true));
echo "<br><hr>";
*/
}
}
if($action == 'step9'){
#echo $action;
$aend_dat = date("Y-m-d H:i:s");
$abschluss_vid = $_SESSION["abschluss_vid"];
$abschluss_annahme = $_SESSION["abschluss_annahme"];
$abschluss_bemerkung = $_SESSION["abschluss_bemerkung"];
$abschluss_praemie = $_SESSION["abschluss_praemie"];
$abschluss_guschein = $_SESSION["abschluss_guschein"];
$abschluss_dienstbefreiung = $_SESSION["abschluss_dienstbefreiung"];
$abschluss_klassierung = $_SESSION["abschluss_klassierung"];
$abschluss_information_massnahme = $_SESSION["abschluss_information_massnahme"];
$abschluss_information_sachstand = $_SESSION["abschluss_information_sachstand"];
$abschluss_ziel = trim("$_SESSION[abschluss_chk1]$_SESSION[abschluss_chk2]$_SESSION[abschluss_chk3]$_SESSION[abschluss_chk4]$_SESSION[abschluss_chk5]");
if($_SESSION["abschluss_praemie"] =='N'){
unset($_SESSION["abschluss_praemie1"]);
unset($_SESSION["abschluss_praemie2"]);
unset($_SESSION["abschluss_praemie3"]);
unset($_SESSION["abschluss_praemie4"]);
unset($_SESSION["abschluss_praemiepunkte"]);
$abschluss_praemie1 = '';
$abschluss_praemie2 = '';
$abschluss_praemie3 = '';
$abschluss_praemie4 = '';
$abschluss_praemiepunkte = '';
$abschluss_klassierung_kurzel = '';
}else{
$abschluss_praemie1 = $_SESSION["abschluss_praemie1"];
$abschluss_praemie2 = $_SESSION["abschluss_praemie2"];
$abschluss_praemie3 = $_SESSION["abschluss_praemie3"];
$abschluss_praemie4 = $_SESSION["abschluss_praemie4"];
$abschluss_praemiepunkte = $_SESSION["abschluss_praemiepunkte"];
$abschluss_klassierung_kurzel = $_SESSION["abschluss_klassierung_kurzel"];
}
$db = dbconnect();
if(!isset($_SESSION["abschluss_veid"])){
# Schritt 1: Daten erfassen
$sql1 = $db->query("INSERT INTO imt_vorschlag_ende ( erfass_dat
, vid
, annahme
, annahme_bemerkung
, ziel
, praemie
, punkte_praemie1
, punkte_praemie2
, punkte_praemie3
, punkte_praemie4
, punkte_gesamt
, praemie_gutschein
, dienstbefreiung
, klassierung
, massnahme
, sachstand
, praemienart
)
VALUES
( '$aend_dat'
, '$abschluss_vid'
, '$abschluss_annahme'
, '$abschluss_bemerkung'
, '$abschluss_ziel'
, '$abschluss_praemie'
, '$abschluss_praemie1'
, '$abschluss_praemie2'
, '$abschluss_praemie3'
, '$abschluss_praemie4'
, '$abschluss_praemiepunkte'
, '$abschluss_guschein'
, '$abschluss_dienstbefreiung'
, '$abschluss_klassierung'
, '$abschluss_information_massnahme'
, '$abschluss_information_sachstand'
, '$abschluss_klassierung_kurzel'
)
");
echo "INSERT INTO imt_vorschlag_ende ( erfass_dat
, vid
, annahme
, annahme_bemerkung
, ziel
, praemie
, punkte_praemie1
, punkte_praemie2
, punkte_praemie3
, punkte_praemie4
, punkte_gesamt
, praemie_gutschein
, dienstbefreiung
, klassierung
, massnahme
, sachstand
, praemienart
)
VALUES
( '$aend_dat'
, '$abschluss_vid'
, '$abschluss_annahme'
, '$abschluss_bemerkung'
, '$abschluss_ziel'
, '$abschluss_praemie'
, '$abschluss_praemie1'
, '$abschluss_praemie2'
, '$abschluss_praemie3'
, '$abschluss_praemie4'
, '$abschluss_praemiepunkte'
, '$abschluss_guschein'
, '$abschluss_dienstbefreiung'
, '$abschluss_klassierung'
, '$abschluss_information_massnahme'
, '$abschluss_information_sachstand'
, '$abschluss_klassierung_kurzel'
)
";
$veid = $db->insert_id;
$_SESSION["abschluss_veid"] = $veid;
if($_SESSION["abschluss_annahme"] == 'J'){
$result_stat = $db->query("SELECT count(*) Anz
FROM imt_verlauf
WHERE vid = '$_SESSION[abschluss_vid]'
AND status = '7'");
$row_stat = $result_stat->fetch_array();
if($row_stat[Anz] == 0){
verlauf($uid, $_SESSION["abschluss_vid"], 'Vorschlag wurde angenommen', '7', $aend_dat);
}
}
if($_SESSION["abschluss_annahme"] == 'N'){
$result_stat = $db->query("SELECT count(*) Anz
FROM imt_verlauf
WHERE vid = '$_SESSION[abschluss_vid]'
AND status = '8'");
$row_stat = $result_stat->fetch_array();
if($row_stat[Anz] == 0){
verlauf($uid, $_SESSION["abschluss_vid"], 'Vorschlag wurde ausgeschlossen', '8', $aend_dat);
}
}
$query_ga = $db->query("SELECT uid, a.imtuid, passwort, vorname, nachname, betreff
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid='$_SESSION[abschluss_vid]'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_ga = $query_ga->fetch_array();
$query_entscheidung = $db->query("SELECT annahme, annahme_bemerkung
FROM imt_vorschlag_ende
WHERE vid='$_SESSION[abschluss_vid]'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_entscheidung = $query_entscheidung->fetch_array();
if($row_entscheidung[annahme] == 'J'){
$entscheidung = 'angenommen';
}else{
$entscheidung = 'abgelehnt';
}
$empfaenger = "$row_ga[imtuid]";
$betreff = "Entscheidung Vorschlag $_SESSION[abschluss_vid]";
$text = "
<html>
<head>
<title>Entscheidung Vorschlag</title>
</head>
<body>
<font face='Arial' size='2'>
Guten Tag $row_ga[vorname] $row_ga[nachname]!
<br /><br />
Im Rahmen des Ideenmanagements ist ein Verbesserungsvorschlag eingegangen.
Ihr Vorschlag wurde wie folgt entschieden:
<br />
<br />
<table>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Vorschlag:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$row_ga[betreff]
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>ID:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$_SESSION[abschluss_vid]
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Entscheidung:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$entscheidung
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Bemerkung:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$row_entscheidung[annahme_bemerkung]
</font>
</td>
</tr>
</table>
<br />
Bei Fragen wenden Sie sich bitte an den <a href=\"mailto:$global_service_mail?subject=Frage zu ID: $_SESSION[abschluss_vid]\">Qualit&auml;tsmanagementbeauftragten.</a>
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
#mail_einstell($_SESSION[abschluss_vid], $uid, $empfaenger, NULL, NULL, $betreff, $text, 110, NULL);
# Prüfen ob Gutachterrecht / Beteiligtenrecht noch gebraucht wird, ggf löschen
gutachter_beteiligter_del($_SESSION["abschluss_vid"]);
}
}
if($action == 'zuruckstell'){
$vid = $_SESSION["abschluss_vid"];
$smarty->assign('abschluss_zuruckstell_vid', $vid);
$db = dbconnect();
$result = $db->query("SELECT betreff
FROM imt_vorschlag
WHERE vid = '$vid'");
$row = $result->fetch_array();
$smarty->assign('abschluss_zuruckstell_betreff', $row['betreff']);
}
if($action == 'zuruckstell1'){
$vid = $_SESSION["abschluss_vid"];
$sql = $db->query ("DELETE FROM imt_sitzungen_vorschlag WHERE vid='$vid'");
$Link = basename($_SERVER['PHP_SELF'])."?new=1";
echo "
<meta http-equiv=\"refresh\" content=\"2; URL=$Link\">
";
}
if($action == 'zuruckstell2'){
$Link = basename($_SERVER['PHP_SELF'])."?new=1";
echo "
<meta http-equiv=\"refresh\" content=\"0; URL=$Link\">
";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

92
adLDAP/CHANGELOG.txt Executable file
View File

@ -0,0 +1,92 @@
adLDAP - PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
Written by Scott Barnett, Richard Hyland
email: scott@wiggumworld.com, adldap@richardhyland.com
http://adldap.sourceforge.net/
CHANGELOG
-------------------------------------------------------------------------------------------
Version 3.3.2
-------------
[+] New feature: Move the user to a new OU using user_move() function
[-] Bug fix: Prevent an 'undefined index' error in recursive_groups() when full PHP E_ALL logging is enabled
[-] Bug fix: user_groups() does not return primary group when objectsid is not given (Tracker ID:2931213)
[-] Bug fix: Undefined index in function user_info for non-existent users (Tracker ID:2922729)
[-] Bug fix: Force user_info to find objectCategory of person as if a sAMAccountName also exists in a group it will return that group. (Tracker ID:3006096)
[-] Bug fix: Return false for user_info if the user does not exist
[-] Bug fix: user_info, checks for for a "count" value that not exist in $entries array if "memberof" isn't passed in $fields array. (Tracker ID:2993172)
[-] Bug fix: In authenticate() if user authentication fails function returns and does not rebind with admin credentials - so the other funcions don't work anymore as $this->_bind === false. (Tracker ID:2987887)
[-] Bug fix: When calling $ldap->user_modify('user', array("expires"=>0)) the function fails due to the value being 0. Changed to isset (Tracker ID:3036726)
[-] Bug fix: When calling user_info allow the username to be either a sAMAccountName or userPrincipalName attribute
Version 3.3.1
-------------
[-] Bug fix: Prevent empty $username and $password in authenticate from falling through to the default administrator login
Version 3.3
-----------
[+] New feature: Calling adLDAP without LDAP support in PHP will now throw an adLDAPException
[+] New feature: Specifying a NULL $_base_dn will now automatically attempt to detect the base_dn from your domain controller
[+] New feature: Most user objects can now be queried using a user's GUID as well as their username (samAccountName). Set the $isGUID optional parameter to true. To obtain a user's GUID either use the username2guid() function or decodeGuid()
[+] New function: username2guid($username) will return a string representation of the GUID for a given username
[+] New function: decodeGuid($binaryGuid) will convert a binary GUID to a string
[+] New function: find_base_dn() will return the base_dn from your domain controller
[+] New function: get_root_dse($attributes) will return root domain controller configuration attributes such as the default naming context, current DC time, etc
[+] New function: exchange_servers($attributes) will return a list of Exchange servers in your domain
[+] New function: exchange_storage_groups($exchangeServer, $attributes, $recursive) will return a list of Storage groups on any given Exchange server. Setting $recursive to true (or inheriting from the $_recursive_groups setting will automatically query the databases within a storage group)
[+] New function: exchange_storage_databases($storageGroup, $attributes) will return a list of Databases in any given storage group on any given Exchange server
[+] New function: exchange_add_X400($username, $country, $admd, $pdmd, $org, $surname, $givenname, $isGUID=false) will add an X400 address to the Exchange server
[-] Bug fix: Null comparison error in contact_mailenable()
Version 3.2
-----------
[+] New function: user_password_expiry($username) which will return the timestamp and formatted time of when a user's password expires based both on domain policy and user password expiry policy
[+] New function: groups_in_group($group, $recursive = NULL) returns a list of groups within a group
[+] New function: all_groups() function to list ALL types of group rather than just security groups alone
[+] New function: folder_list($folder_name = NULL, $dn_type = ADLDAP_FOLDER, $recursive = NULL, $type = NULL) allows you to navigate the AD folder structure
[+] New function: computer_ingroup()
[+] New function: computer_groups()
[+] New function: connect()
[+] New function: disconnect()
[+] New feature: Added recursive group lookups to group_members() to recursively get the username of users in a group
[+] New feature: TLS support
[+] New feature: Added getters and setters for core variables
[-] Change: Renamed all_groups() to all_security_groups()
[-] Change: Re-written ldap_slashes() function based on a port from Per's Net::LDAP::Util escape_filter_value
[-] Bug fix: Attempt to deal with special char + in group_info()
[-] Bug fix: user_ingroup() would not allow recursion to be disabled using the $recursive parameter and would only inherit from $_recursive_groups variable
[-] Bug fix: Runtime overriding of $recursive group lookups failed due to changes in PHP 5.2
Version 3.1
-----------
[+] New function: get_last_error() returns the last error returned by your domain controller
[+] New feature: Automatically detect and encode 8bit characters when being added to an AD object
[+] New feature: Exception handing added for connections or attempting methods that require SSL where it is not set
[+] New feature: Added pager to the schema
[+] New feature: New method to obtain a user's or contacts primary group that is far less intensive using get_primary_group(). The old group_cn() is now deprecated
[-] Change: Only return primary group memberof if a user or contact is returned
[-] Bug fix: Contact could not be added to a group
[-] Bug fix: bool2str() function caused exchange mailbox creation to fail
Version 3.0
-----------
[+] New function: user_delete()
[+] New feature: Source code comments totally overhauled
[+] New feature: Configuration options and functions now have their visibility defined. adLDAP is now PHP 5 compatible only.
[+] New feature: Exchange mailbox creation for users
[+] New feature: Add new SMTP addresses to a user
[+] New feature: Change the default SMTP address for a user
[+] New feature: Remove an SMTP address for a user
[+] New feature: Mail enable a contact
[+] New feature: Create, query, delete contacts
[+] New feature: Enable or disable a user with user_enable() or user_disable()
[-] Bug fix: Disabling a user did not work

457
adLDAP/LICENCE.txt Executable file
View File

@ -0,0 +1,457 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

43
adLDAP/README.txt Executable file
View File

@ -0,0 +1,43 @@
PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
Version 3.3.2
Written by Scott Barnett, Richard Hyland
email: scott@wiggumworld.com, adldap@richardhyland.com
http://adldap.sourceforge.net/
We'd appreciate any improvements or additions to be submitted back
to benefit the entire community :)
PHP Version 5 with SSL and LDAP support
I generally install libraries and classes in a folder in the document root
called "includes/". If you want to use somewhere else, just edit the
include directives in the scripts.
The examples should be pretty self explanatory. If you require more
information, please visit http://adldap.sourceforge.net/
-------------------
For full API documentation see http://adldap.sourceforge.net/wiki/doku.php?id=api
1. Copy adLDAP.php to your server
2. Edit the configuring variables in the class itself if you so wish to
3. From your script add the following code
require_once(dirname(__FILE__) . '/adLDAP.php');
$adldap = new adLDAP();
-------------------
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.

2
adLDAP/URLs.txt Executable file
View File

@ -0,0 +1,2 @@
http://www.administrator.de/index.php?content=31891
http://www.php.de/php-einsteiger/50623-login-mittels-active-directory-ldap.html

2418
adLDAP/adLDAP.php Executable file

File diff suppressed because it is too large Load Diff

2422
adLDAP/adLDAP_hsnet.php Executable file

File diff suppressed because it is too large Load Diff

2421
adLDAP/adLDAP_studnet.php Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
<?php
//log them out
$logout=$_GET['logout'];
if ($logout=="yes"){ //destroy the session
session_start();
$_SESSION = array();
session_destroy();
}
echo $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."<br>";
//force the browser to use ssl (STRONGLY RECOMMENDED!!!!!!!!)
#if ($_SERVER["SERVER_PORT"]!=443){ header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); exit(); }
//you should look into using PECL filter or some form of filtering here for POST variables
$username=strtoupper($_POST["username"]); //remove case sensitivity on the username
$password=$_POST["password"];
$formage=$_POST["formage"];
if ($_POST["oldform"]){ //prevent null bind
if ($username!=NULL && $password!=NULL){
//include the class and create a connection
include ("../adLDAP.php");
try {
$adldap = new adLDAP();
}
catch (adLDAPException $e) {
echo $e; exit();
}
//authenticate the user
if ($adldap -> authenticate($username,$password)){
//establish your session and redirect
session_start();
$_SESSION["username"]=$username;
$redir="Location: http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/menu.htm";
header($redir);
exit;
}
}
$failed=1;
}
?>
<html>
<head>
<title>adLDAP example</title>
</head>
<body>
This area is restricted.<br>
Please login to continue.<br>
<form method='post' action='<?php echo $_SERVER["PHP_SELF"]; ?>'>
<input type='hidden' name='oldform' value='1'>
Username: <input type='text' name='username' value='<?php echo ($username); ?>'><br>
Password: <input type='password' name='password'><br>
<br>
<input type='submit' name='submit' value='Submit'><br>
<?php if ($failed){ echo ("<br>Login Failed!<br><br>\n"); } ?>
</form>
<?php if ($logout=="yes") { echo ("<br>You have successfully logged out."); } ?>
</body>
</html>

123
adLDAP/examples/examples.php Executable file
View File

@ -0,0 +1,123 @@
<?
/*
Examples file
To test any of the functions, just change the 0 to a 1.
*/
//error_reporting(E_ALL ^ E_NOTICE);
include ("../adLDAP.php");
try {
$adldap = new adLDAP($options);
}
catch (adLDAPException $e) {
echo $e; exit();
}
//var_dump($ldap);
echo ("<pre>\n");
// authenticate a username/password
if (0){
$result=$ldap->authenticate("username","password");
var_dump($result);
}
// add a group to a group
if (0){
$result=$ldap->group_add_group("Parent Group Name","Child Group Name");
var_dump($result);
}
// add a user to a group
if (0){
$result=$ldap->group_add_user("Group Name","username");
var_dump($result);
}
// create a group
if (0){
$attributes=array(
"group_name"=>"Test Group",
"description"=>"Just Testing",
"container"=>array("Groups","A Container"),
);
$result=$ldap->group_create($attributes);
var_dump($result);
}
// retrieve information about a group
if (0){
$result=$ldap->group_info("Group Name");
var_dump($result);
}
// create a user account
if (0){
$attributes=array(
"username"=>"freds",
"logon_name"=>"freds@mydomain.local",
"firstname"=>"Fred",
"surname"=>"Smith",
"company"=>"My Company",
"department"=>"My Department",
"email"=>"freds@mydomain.local",
"container"=>array("Container Parent","Container Child"),
"enabled"=>1,
"password"=>"Password123",
);
try {
$result=$ldap->user_create($attributes);
var_dump($result);
}
catch (adLDAPException $e) {
echo $e; exit();
}
}
// retrieve the group membership for a user
if (0){
$result=$ldap->user_groups("username");
print_r($result);
}
// retrieve information about a user
if (0){
$result=$ldap->user_info("username");
print_r($result);
}
// check if a user is a member of a group
if (0){
$result=$ldap->user_ingroup("username","Group Name");
var_dump($result);
}
// modify a user account (this example will set "user must change password at next logon")
if (0){
$attributes=array(
"change_password"=>1,
);
$result=$ldap->user_modify("username",$attributes);
var_dump($result);
}
// change the password of a user
if (0){
try {
$result=$ldap->user_password("username","Password123");
var_dump($result);
}
catch (adLDAPException $e) {
echo $e; exit();
}
}
// list the contents of the Users OU
if (0){
$result=$ldap->folder_list(array('Users'), ADLDAP_FOLDER, false);
var_dump ($result);
}
?>

5
adLDAP/examples/menu.htm Executable file
View File

@ -0,0 +1,5 @@
<html>
<body>
If you called authenticate.php and you are redirected to this page, you successfully authenticated against Active Directory
</body>
</html>

4
admin_frame.php Executable file
View File

@ -0,0 +1,4 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php"); #$template = "standard"; $templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html"; $smarty = new Smarty(); require_once "language/german.inc.php";
$smarty->display("$template/$templatename"); ?>

224
ajaxtabs.js Executable file
View File

@ -0,0 +1,224 @@
//** Ajax Tabs Content script v2.0- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Updated Oct 21st, 07 to version 2.0. Contains numerous improvements
//** Updated Feb 18th, 08 to version 2.1: Adds a public "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically. Only .js file changed from v2.0.
//** Updated April 8th, 08 to version 2.2:
// -Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0)
// -Modified Ajax routine so testing the script out locally in IE7 now works
var ddajaxtabssettings={}
ddajaxtabssettings.bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
ddajaxtabssettings.loadstatustext="<img src='ajaxtabs/loading.gif' /> Requesting content..."
////NO NEED TO EDIT BELOW////////////////////////
function ddajaxtabs(tabinterfaceid, contentdivid){
this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
this.enabletabpersistence=true
this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
this.contentdivid=contentdivid
this.defaultHTML=""
this.defaultIframe='<iframe src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" class="tabcontentiframe" style="width:100%; height:100%; min-height: 100px"></iframe>'
this.defaultIframe=this.defaultIframe.replace(/<iframe/i, '<iframe name="'+"_ddajaxtabsiframe-"+contentdivid+'" ')
this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}
ddajaxtabs.connect=function(pageurl, tabinstance){
var page_request = false
var bustcacheparameter=""
if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken)
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else
return false
var ajaxfriendlyurl=pageurl.replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
page_request.onreadystatechange=function(){ddajaxtabs.loadpage(page_request, pageurl, tabinstance)}
if (ddajaxtabssettings.bustcachevar) //if bust caching of external page
bustcacheparameter=(ajaxfriendlyurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', ajaxfriendlyurl+bustcacheparameter, true)
page_request.send(null)
}
ddajaxtabs.loadpage=function(page_request, pageurl, tabinstance){
var divId=tabinstance.contentdivid
document.getElementById(divId).innerHTML=ddajaxtabssettings.loadstatustext //Display "fetching page message"
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
document.getElementById(divId).innerHTML=page_request.responseText
ddajaxtabs.ajaxpageloadaction(pageurl, tabinstance)
}
}
ddajaxtabs.ajaxpageloadaction=function(pageurl, tabinstance){
tabinstance.onajaxpageload(pageurl) //call user customized onajaxpageload() function when an ajax page is fetched/ loaded
}
ddajaxtabs.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
ddajaxtabs.setCookie=function(name, value){
document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
}
ddajaxtabs.prototype={
expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
this.cancelautorun() //stop auto cycling of tabs (if running)
var tabref=""
try{
if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
tabref=document.getElementById(tabid_or_position)
else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
tabref=this.tabs[tabid_or_position]
}
catch(err){alert("Invalid Tab ID or position entered!")}
if (tabref!="") //if a valid tab is found based on function parameter
this.expandtab(tabref) //expand this tab
},
cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
if (dir=="next"){
var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
}
else if (dir=="prev"){
var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
}
if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
this.cancelautorun() //stop auto cycling of tabs (if running)
this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
},
setpersist:function(bool){ //PUBLIC function to toggle persistence feature
this.enabletabpersistence=bool
},
loadajaxpage:function(pageurl){ //PUBLIC function to fetch a page via Ajax and display it within the Tab Content instance's container
ddajaxtabs.connect(pageurl, this)
},
loadiframepage:function(pageurl){ //PUBLIC function to fetch a page and load it into the IFRAME of the Tab Content instance's container
this.iframedisplay(pageurl, this.contentdivid)
},
setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
this.selectedClassTarget=objstr || "link"
},
getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
},
urlparamselect:function(tabinterfaceid){
var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
},
onajaxpageload:function(pageurl){ //PUBLIC Event handler that can invoke custom code whenever an Ajax page has been fetched and displayed
//do nothing by default
},
expandtab:function(tabref){
var relattrvalue=tabref.getAttribute("rel")
//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easy searching through
var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
if (relattrvalue=="#default")
document.getElementById(this.contentdivid).innerHTML=this.defaultHTML
else if (relattrvalue=="#iframe")
this.iframedisplay(tabref.getAttribute("href"), this.contentdivid)
else
ddajaxtabs.connect(tabref.getAttribute("href"), this)
this.expandrevcontent(associatedrevids)
for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("href")==tabref.getAttribute("href"))? "selected" : ""
}
if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
ddajaxtabs.setCookie(this.tabinterfaceid, tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
},
iframedisplay:function(pageurl, contentdivid){
if (typeof window.frames["_ddajaxtabsiframe-"+contentdivid]!="undefined"){
try{delete window.frames["_ddajaxtabsiframe-"+contentdivid]} //delete iframe within Tab content container if it exists (due to bug in Firefox)
catch(err){}
}
document.getElementById(contentdivid).innerHTML=this.defaultIframe
window.frames["_ddajaxtabsiframe-"+contentdivid].location.replace(pageurl) //load desired page into iframe
},
expandrevcontent:function(associatedrevids){
var allrevids=this.revcontentids
for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
}
},
setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
for (var i=0; i<this.hottabspositions.length; i++){
if (tabposition==this.hottabspositions[i]){
this.currentTabIndex=i
break
}
}
},
autorun:function(){ //function to auto cycle through and select tabs based on a set interval
this.cycleit('next', true)
},
cancelautorun:function(){
if (typeof this.autoruntimer!="undefined")
clearInterval(this.autoruntimer)
},
init:function(automodeperiod){
var persistedtab=ddajaxtabs.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
var selectedtab=-1 //Currently selected tab index (-1 meaning none)
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
this.automodeperiod=automodeperiod || 0
this.defaultHTML=document.getElementById(this.contentdivid).innerHTML
for (var i=0; i<this.tabs.length; i++){
this.tabs[i].tabposition=i //remember position of tab relative to its peers
if (this.tabs[i].getAttribute("rel")){
var tabinstance=this
this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
this.tabs[i].onclick=function(){
tabinstance.expandtab(this)
tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
return false
}
if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
}
if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
selectedtab=i //Selected tab index, if found
}
}
} //END for loop
if (selectedtab!=-1) //if a valid default selected tab index is found
this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
else //if no valid default selected index found
this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
}
} //END int() function
} //END Prototype assignment

BIN
ajaxtabs/Thumbs.db Executable file

Binary file not shown.

BIN
ajaxtabs/loading.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

324
ansicht_entschieden.php Executable file
View File

@ -0,0 +1,324 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["ansicht_entschieden_id"] = $_GET['id'];
}
$id = $_SESSION["ansicht_entschieden_id"];
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
$query = "SELECT name, mail
FROM imt_gruppenmitglieder
WHERE vid='$id'
ORDER BY name ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'name' => $row[name],
'mail' => $row[mail]
)
);
}
$smarty->assign('table_data1', $table_data1);
$result = $db->query("SELECT vorname, nachname, mail, beziehung, betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin, date_format(erfass_dat, '%d.%m.%Y (%H:%i Uhr)') datum
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid = '$id'");
$row = $result->fetch_array();
$result_status = $db->query("SELECT max(STATUS) status
FROM imt_vorschlag a, imt_verlauf b
WHERE a.vid = b.vid
AND a.vid ='$id'
GROUP BY a.vid
ORDER BY erfass_dat ASC");
$row_status = $result_status->fetch_array();
switch ($row[beziehung])
{
case "P":
$beziehung = "ProfessorIn";
break;
case "L":
$beziehung = "Lehrbeauftragte/r";
break;
case "E":
$beziehung = "Externe/r";
break;
case "S":
$beziehung = "StudentIn";
break;
case "V":
$beziehung = "Verwaltungsmitarbeiter";
break;
default:
$beziehung = "$row[beziehung]";
}
$smarty->assign('ansicht_entschieden_beziehung', $beziehung);
$smarty->assign('ansicht_entschieden_id', "$id");
$smarty->assign('ansicht_entschieden_datum', "$row[datum]");
$smarty->assign('ansicht_entschieden_vorname', "$row[vorname]");
$smarty->assign('ansicht_entschieden_nachname', "$row[nachname]");
$smarty->assign('ansicht_entschieden_mail', "$row[mail]");
$smarty->assign('ansicht_entschieden_betreff', "$row[betreff]");
$smarty->assign('ansicht_entschieden_beschreibung', "$row[beschreibung]");
$smarty->assign('ansicht_entschieden_vorschlag', "$row[vorschlag]");
$smarty->assign('ansicht_entschieden_nutzen', "$row[nutzen]");
if($row['public'] == 'Y'){
$public = "Ja";
}else{
$public = "Nein";
}
$smarty->assign('ansicht_entschieden_public', "$public");
$smarty->assign('ansicht_entschieden_status', "$row[status]");
$smarty->assign('ansicht_entschieden_hinweis_eigen', "$row[hinweis_eigen]");
$smarty->assign('ansicht_entschieden_hinweis_admin', "$row[hinweis_admin]");
$result2 = $db->query ("SELECT kid, kategorie
FROM imt_kategorie
WHERE kid = $row[kategorie]");
$row2 = $result2->fetch_array();
$smarty->assign('ansicht_entschieden_kategorie', "$row2[kategorie]");
# Gutachter auflisten
$query2 = "SELECT vorname, nachname, gid, stellung_dat, date_format(stellung_dat, '%d.%m.%Y (%H:%i:%s)') stellung_dat_form
FROM imt_gutachter a, imt_user b
WHERE a.imtuid=b.imtuid
AND vid='$id'";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$table_data2 = array();
while ($row2 = $result2->fetch_array()){
array_push($table_data2, array(
'vorname' => $row2[vorname],
'nachname' => $row2[nachname],
'gid' => $row2[gid],
'stellung_dat' => $row2[stellung_dat],
'stellung_dat_form' => $row2[stellung_dat_form]
)
);
}
$smarty->assign('table_data2', $table_data2);
# Beteiligte auflisten
$query2a = "SELECT vorname, nachname, bid, stellung_dat, date_format(stellung_dat, '%d.%m.%Y (%H:%i:%s)') stellung_dat_form
FROM imt_beteiligte a, imt_user b
WHERE a.imtuid=b.imtuid
AND vid='$id'";
$result2a = $db->query ($query2a)
or die ("Cannot execute query2a");
$table_data2a = array();
while ($row2a = $result2a->fetch_array()){
array_push($table_data2a, array(
'vorname' => $row2a[vorname],
'nachname' => $row2a[nachname],
'bid' => $row2a[bid],
'stellung_dat' => $row2a[stellung_dat],
'stellung_dat_form' => $row2a[stellung_dat_form]
)
);
}
$smarty->assign('table_data2a', $table_data2a);
# Abschlussinformationen
$result4 = $db->query ("SELECT annahme, annahme_bemerkung, ziel, praemie, punkte_praemie1, punkte_praemie2
, punkte_praemie3, punkte_praemie4, punkte_gesamt, praemie_gutschein, dienstbefreiung
, klassierung, massnahme, sachstand, praemienart
FROM imt_vorschlag_ende
WHERE vid = $id");
$row4 = $result4->fetch_array();
if($row4[annahme] == 'J'){
$annahme = 'Ja';
}else{
$annahme = 'Nein';
}
if(preg_match("/1/",$row4[ziel])){
$smarty->assign('ansicht_entschieden_chk1', 1);
}else{
$smarty->assign('ansicht_entschieden_chk1', 0);
}
if(preg_match("/2/",$row4[ziel])){
$smarty->assign('ansicht_entschieden_chk2', 2);
}else{
$smarty->assign('ansicht_entschieden_chk2', 0);
}
if(preg_match("/3/",$row4[ziel])){
$smarty->assign('ansicht_entschieden_chk3', 3);
}else{
$smarty->assign('ansicht_entschieden_chk3', 0);
}
if(preg_match("/4/",$row4[ziel])){
$smarty->assign('ansicht_entschieden_chk4', 4);
}else{
$smarty->assign('ansicht_entschieden_chk4', 0);
}
if(preg_match("/5/",$row4[ziel])){
$smarty->assign('ansicht_entschieden_chk5', 5);
}else{
$smarty->assign('ansicht_entschieden_chk5', 0);
}
$smarty->assign('ansicht_entschieden_annahme', "$annahme");
$smarty->assign('ansicht_entschieden_annahme_bemerkung', "$row4[annahme_bemerkung]");
if($row4[praemie] == 'J'){
$praemie = 'Ja';
}else{
$praemie = 'Nein';
}
$smarty->assign('ansicht_entschieden_praemie', "$praemie");
$smarty->assign('ansicht_entschieden_praemie1', "$row4[punkte_praemie1]");
$smarty->assign('ansicht_entschieden_praemie2', "$row4[punkte_praemie2]");
$smarty->assign('ansicht_entschieden_praemie3', "$row4[punkte_praemie3]");
$smarty->assign('ansicht_entschieden_praemie4', "$row4[punkte_praemie4]");
$smarty->assign('ansicht_entschieden_punkte_gesamt', "$row4[punkte_gesamt]");
$smarty->assign('ansicht_entschieden_praemie_gutschein', "$row4[praemie_gutschein]");
$smarty->assign('ansicht_entschieden_dienstbefreiung', "$row4[dienstbefreiung]");
$smarty->assign('ansicht_entschieden_klassierung', "$row4[klassierung]");
$smarty->assign('ansicht_entschieden_massnahme', "$row4[massnahme]");
$smarty->assign('ansicht_entschieden_sachstand', "$row4[sachstand]");
$smarty->assign('ansicht_entschieden_praemienart', "$row4[praemienart]");
# Variable erfassen_eingabe_vid leer setzen, damit wird Doppelspeicherung unten beim Insert verhindert
$_SESSION["erfassen_eingabe_vid"] = "";
if($_GET['error'] == 1){
$smarty->assign('erfassen_eingabe_pflichtfelder', "1");
$smarty->assign('erfassen_eingabe_betreff', $_SESSION["erfassen_eingabe_betreff"]);
if($_SESSION["erfassen_eingabe_betreff"] == ""){$smarty->assign('erfassen_eingabe_betreff_ico', 1);}
$smarty->assign('erfassen_eingabe_beschreibung', $_SESSION["erfassen_eingabe_beschreibung"]);
if($_SESSION["erfassen_eingabe_beschreibung"] == ""){$smarty->assign('erfassen_eingabe_beschreibung_ico', 1);}
$smarty->assign('erfassen_eingabe_vorschlag', $_SESSION["erfassen_eingabe_vorschlag"]);
if($_SESSION["erfassen_eingabe_vorschlag"] == ""){$smarty->assign('erfassen_eingabe_vorschlag_ico', 1);}
$smarty->assign('erfassen_eingabe_nutzen', $_SESSION["erfassen_eingabe_nutzen"]);
if($_SESSION["erfassen_eingabe_nutzen"] == ""){$smarty->assign('erfassen_eingabe_nutzen_ico', 1);}
if($_SESSION["erfassen_eingabe_einwilligung_public"] == 'Y'){
$smarty->assign('erfassen_eingabe_einwilligung_public', $_SESSION["erfassen_eingabe_einwilligung_public"]);
}
}
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$id'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3[status];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
if($row3['sid'] == '7' OR $row3['sid'] == '8'){
$info = '1';
}else{
$info = '0';
}
array_push($table_data3, array(
'datum1' => $row3[datum1],
'info' => $info,
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'save'){
$id = $_SESSION["ansicht_entschieden_id"];
$db = dbconnect();
$ansicht_entschieden_sachstand = $_POST["ansicht_entschieden_sachstand"];
$sql = $db->query("UPDATE imt_vorschlag_ende
SET sachstand='$ansicht_entschieden_sachstand'
WHERE vid='$id'");
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?id=$id\">";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

43
ansicht_gutachten.php Executable file
View File

@ -0,0 +1,43 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
if(isset($_GET['gid'])){
$_SESSION["ansicht_gutachten_gid"] = $_GET['gid'];
}
$gid = $_SESSION["ansicht_gutachten_gid"];
$action = $_GET['action'];
if($action == ''){
$result_sn = $db->query("SELECT betreff, vorname, nachname, date_format(stellung_dat, '%d.%m.%Y (%H:%i)') stellung_dat_form,
zweck, umsetzung, a.nutzen, kosteneinsparung, arbeitszeiteinsparung, ideeneu, empfehlung
FROM imt_gutachter a, imt_user b, imt_vorschlag c
WHERE a.imtuid=b.imtuid
AND a.vid=c.vid
AND a.gid='$gid'
");
$row_sn = $result_sn->fetch_array();
$smarty->assign('ansicht_gutachten_betreff', $row_sn[betreff]);
$smarty->assign('ansicht_gutachten_vorname', $row_sn[vorname]);
$smarty->assign('ansicht_gutachten_nachname', $row_sn[nachname]);
$smarty->assign('ansicht_gutachten_stellung_dat', $row_sn[stellung_dat_form]);
$smarty->assign('ansicht_gutachten_zweck', $row_sn[zweck]);
$smarty->assign('ansicht_gutachten_umsetzung', $row_sn[umsetzung]);
$smarty->assign('ansicht_gutachten_nutzen', $row_sn[nutzen]);
$smarty->assign('ansicht_gutachten_kosteneinsparung', $row_sn[kosteneinsparung]);
$smarty->assign('ansicht_gutachten_arbeitszeiteinsparung', $row_sn[arbeitszeiteinsparung]);
$smarty->assign('ansicht_gutachten_ideeneu', $row_sn[ideeneu]);
$smarty->assign('ansicht_gutachten_empfehlung', $row_sn[empfehlung]);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

45
ansicht_stellungnahme.php Executable file
View File

@ -0,0 +1,45 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
if(isset($_GET['bid'])){
$_SESSION["ansicht_stellungnahme_bid"] = $_GET['bid'];
}
$bid = $_SESSION["ansicht_stellungnahme_bid"];
$action = $_GET['action'];
if($action == ''){
$result_sn = $db->query("SELECT betreff, vorname, nachname, date_format(stellung_dat, '%d.%m.%Y (%H:%i)') stellung_dat_form,
zweck, umsetzung, a.nutzen, kosteneinsparung, arbeitszeiteinsparung, ideeneu, empfehlung
FROM imt_beteiligte a, imt_user b, imt_vorschlag c
WHERE a.imtuid=b.imtuid
AND a.vid=c.vid
AND a.bid='$bid'
");
$row_sn = $result_sn->fetch_array();
$smarty->assign('ansicht_stellungnahme_betreff', $row_sn[betreff]);
$smarty->assign('ansicht_stellungnahme_vorname', $row_sn[vorname]);
$smarty->assign('ansicht_stellungnahme_nachname', $row_sn[nachname]);
$smarty->assign('ansicht_stellungnahme_stellung_dat', $row_sn[stellung_dat_form]);
#$smarty->assign('ansicht_stellungnahme_stellungnahme', $row_sn[stellungnahme]);
$smarty->assign('ansicht_stellungnahme_zweck', $row_sn[zweck]);
$smarty->assign('ansicht_stellungnahme_umsetzung', $row_sn[umsetzung]);
$smarty->assign('ansicht_stellungnahme_nutzen', $row_sn[nutzen]);
$smarty->assign('ansicht_stellungnahme_kosteneinsparung', $row_sn[kosteneinsparung]);
$smarty->assign('ansicht_stellungnahme_arbeitszeiteinsparung', $row_sn[arbeitszeiteinsparung]);
$smarty->assign('ansicht_stellungnahme_ideeneu', $row_sn[ideeneu]);
$smarty->assign('ansicht_stellungnahme_empfehlung', $row_sn[empfehlung]);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

290
ausschuss_ansicht_entschieden.php Executable file
View File

@ -0,0 +1,290 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["ansicht_entschieden_id"] = $_GET['id'];
}
$id = $_SESSION["ansicht_entschieden_id"];
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
$query = "SELECT name, mail
FROM imt_gruppenmitglieder
WHERE vid='$id'
ORDER BY name ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'name' => $row[name],
'mail' => $row[mail]
)
);
}
$smarty->assign('table_data1', $table_data1);
$result = $db->query("SELECT vorname, nachname, mail, beziehung, betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin, date_format(erfass_dat, '%d.%m.%Y (%H:%i Uhr)') datum
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid = '$id'");
$row = $result->fetch_array();
$result_status = $db->query("SELECT max(STATUS) status
FROM imt_vorschlag a, imt_verlauf b
WHERE a.vid = b.vid
AND a.vid ='$id'
GROUP BY a.vid
ORDER BY erfass_dat ASC");
$row_status = $result_status->fetch_array();
switch ($row[beziehung])
{
case "P":
$beziehung = "ProfessorIn";
break;
case "L":
$beziehung = "Lehrbeauftragte/r";
break;
case "E":
$beziehung = "Externe/r";
break;
case "S":
$beziehung = "StudentIn";
break;
case "V":
$beziehung = "Verwaltungsmitarbeiter";
break;
default:
$beziehung = "$row[beziehung]";
}
$smarty->assign('ansicht_entschieden_beziehung', $beziehung);
$smarty->assign('ansicht_entschieden_id', "$id");
$smarty->assign('ansicht_entschieden_datum', "$row[datum]");
$smarty->assign('ansicht_entschieden_vorname', "$row[vorname]");
$smarty->assign('ansicht_entschieden_nachname', "$row[nachname]");
$smarty->assign('ansicht_entschieden_mail', "$row[mail]");
$smarty->assign('ansicht_entschieden_betreff', "$row[betreff]");
$smarty->assign('ansicht_entschieden_beschreibung', "$row[beschreibung]");
$smarty->assign('ansicht_entschieden_vorschlag', "$row[vorschlag]");
$smarty->assign('ansicht_entschieden_nutzen', "$row[nutzen]");
if($row['public'] == 'Y'){
$public = "Ja";
}else{
$public = "Nein";
}
$smarty->assign('ansicht_entschieden_public', "$public");
$smarty->assign('ansicht_entschieden_status', "$row[status]");
$smarty->assign('ansicht_entschieden_hinweis_eigen', "$row[hinweis_eigen]");
$smarty->assign('ansicht_entschieden_hinweis_admin', "$row[hinweis_admin]");
$result2 = $db->query ("SELECT kid, kategorie
FROM imt_kategorie
WHERE kid = $row[kategorie]");
$row2 = $result2->fetch_array();
$smarty->assign('ansicht_entschieden_kategorie', "$row2[kategorie]");
# Gutachter auflisten
$query2 = "SELECT vorname, nachname, gid, stellung_dat, date_format(stellung_dat, '%d.%m.%Y (%H:%i:%s)') stellung_dat_form
FROM imt_gutachter a, imt_user b
WHERE a.imtuid=b.imtuid
AND vid='$id'";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$table_data2 = array();
while ($row2 = $result2->fetch_array()){
array_push($table_data2, array(
'vorname' => $row2[vorname],
'nachname' => $row2[nachname],
'gid' => $row2[gid],
'stellung_dat' => $row2[stellung_dat],
'stellung_dat_form' => $row2[stellung_dat_form]
)
);
}
$smarty->assign('table_data2', $table_data2);
# Beteiligte auflisten
$query2a = "SELECT vorname, nachname, bid, stellung_dat, date_format(stellung_dat, '%d.%m.%Y (%H:%i:%s)') stellung_dat_form
FROM imt_beteiligte a, imt_user b
WHERE a.imtuid=b.imtuid
AND vid='$id'";
$result2a = $db->query ($query2a)
or die ("Cannot execute query2a");
$table_data2a = array();
while ($row2a = $result2a->fetch_array()){
array_push($table_data2a, array(
'vorname' => $row2a[vorname],
'nachname' => $row2a[nachname],
'bid' => $row2a[bid],
'stellung_dat' => $row2a[stellung_dat],
'stellung_dat_form' => $row2a[stellung_dat_form]
)
);
}
$smarty->assign('table_data2a', $table_data2a);
# Abschlussinformationen
$result4 = $db->query ("SELECT annahme, annahme_bemerkung, praemie, punkte_praemie1, punkte_praemie2
, punkte_praemie3, punkte_praemie4, punkte_gesamt, praemie_gutschein, dienstbefreiung
, klassierung, massnahme, sachstand, praemienart
FROM imt_vorschlag_ende
WHERE vid = $id");
$row4 = $result4->fetch_array();
if($row4[annahme] == 'J'){
$annahme = 'Ja';
}else{
$annahme = 'Nein';
}
$smarty->assign('ansicht_entschieden_annahme', "$annahme");
$smarty->assign('ansicht_entschieden_annahme_bemerkung', "$row4[annahme_bemerkung]");
if($row4[praemie] == 'J'){
$praemie = 'Ja';
}else{
$praemie = 'Nein';
}
$smarty->assign('ansicht_entschieden_praemie', "$praemie");
$smarty->assign('ansicht_entschieden_praemie1', "$row4[punkte_praemie1]");
$smarty->assign('ansicht_entschieden_praemie2', "$row4[punkte_praemie2]");
$smarty->assign('ansicht_entschieden_praemie3', "$row4[punkte_praemie3]");
$smarty->assign('ansicht_entschieden_praemie4', "$row4[punkte_praemie4]");
$smarty->assign('ansicht_entschieden_punkte_gesamt', "$row4[punkte_gesamt]");
$smarty->assign('ansicht_entschieden_praemie_gutschein', "$row4[praemie_gutschein]");
$smarty->assign('ansicht_entschieden_dienstbefreiung', "$row4[dienstbefreiung]");
$smarty->assign('ansicht_entschieden_klassierung', "$row4[klassierung]");
$smarty->assign('ansicht_entschieden_massnahme', "$row4[massnahme]");
$smarty->assign('ansicht_entschieden_sachstand', "$row4[sachstand]");
$smarty->assign('ansicht_entschieden_praemienart', "$row4[praemienart]");
# Variable erfassen_eingabe_vid leer setzen, damit wird Doppelspeicherung unten beim Insert verhindert
$_SESSION["erfassen_eingabe_vid"] = "";
if($_GET['error'] == 1){
$smarty->assign('erfassen_eingabe_pflichtfelder', "1");
$smarty->assign('erfassen_eingabe_betreff', $_SESSION["erfassen_eingabe_betreff"]);
if($_SESSION["erfassen_eingabe_betreff"] == ""){$smarty->assign('erfassen_eingabe_betreff_ico', 1);}
$smarty->assign('erfassen_eingabe_beschreibung', $_SESSION["erfassen_eingabe_beschreibung"]);
if($_SESSION["erfassen_eingabe_beschreibung"] == ""){$smarty->assign('erfassen_eingabe_beschreibung_ico', 1);}
$smarty->assign('erfassen_eingabe_vorschlag', $_SESSION["erfassen_eingabe_vorschlag"]);
if($_SESSION["erfassen_eingabe_vorschlag"] == ""){$smarty->assign('erfassen_eingabe_vorschlag_ico', 1);}
$smarty->assign('erfassen_eingabe_nutzen', $_SESSION["erfassen_eingabe_nutzen"]);
if($_SESSION["erfassen_eingabe_nutzen"] == ""){$smarty->assign('erfassen_eingabe_nutzen_ico', 1);}
if($_SESSION["erfassen_eingabe_einwilligung_public"] == 'Y'){
$smarty->assign('erfassen_eingabe_einwilligung_public', $_SESSION["erfassen_eingabe_einwilligung_public"]);
}
}
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$id'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3[status];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
if($row3['sid'] == '7' OR $row3['sid'] == '8'){
$info = '1';
}else{
$info = '0';
}
array_push($table_data3, array(
'datum1' => $row3[datum1],
'info' => $info,
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'save'){
$id = $_SESSION["ansicht_entschieden_id"];
$db = dbconnect();
$ansicht_entschieden_sachstand = $_POST["ansicht_entschieden_sachstand"];
$sql = $db->query("UPDATE imt_vorschlag_ende
SET sachstand='$ansicht_entschieden_sachstand'
WHERE vid='$id'");
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?id=$id\">";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

30
ausschuss_bearbeiten.php Executable file
View File

@ -0,0 +1,30 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
if(isset($_GET['id'])){
$_SESSION["ausschuss_bearbeiten_id"] = $_GET['id'];
}
$id = $_SESSION["ausschuss_bearbeiten_id"];
$result_vorh = $db->query("SELECT count(*) Anz
FROM imt_vorschlag
WHERE vid=$id");
$row_vorh = $result_vorh->fetch_array();
if($row_vorh[Anz] == 0){
$smarty->assign('ausschuss_bearbeiten_err', "1");
}else{
$smarty->assign('ausschuss_bearbeiten_err', "0");
$smarty->assign('ausschuss_bearbeiten_id', "$id");
}
$smarty->display("$template/$templatename");
?>

57
ausschuss_bearbeitung.php Executable file
View File

@ -0,0 +1,57 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
$datei = basename($_SERVER['PHP_SELF']);
$result = $db->query("SELECT beschreibung FROM imt_rechte WHERE dateiname = '$datei'");
$row = $result->fetch_array();
$smarty->assign('ausschuss_bearbeitung_titel', "$row[beschreibung]");
$query = "SELECT a.vid, betreff, date_format(erfass_dat, '%d.%m.%Y %H:%i:%s') erfass_dat_form, vorname, nachname, max(STATUS)status
FROM imt_vorschlag a, imt_verlauf b, imt_user c
WHERE a.vid = b.vid
AND a.imtuid=c.imtuid
AND status < 100
GROUP BY a.vid
HAVING max(STATUS) NOT IN (1, 7, 8)
ORDER BY erfass_dat ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'erfass_dat_form' => $row[erfass_dat_form],
'vorname' => $row[vorname],
'nachname' => $row[nachname]
)
);
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

View File

@ -0,0 +1,39 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_beteiligter_angehoert.php");
require_once("func_gutachter_angehoert.php");
if(isset($_GET['id'])){
$_SESSION["ausschuss_bearbeitung_ansicht_id"] = $_GET['id'];
}
$id = $_SESSION["ausschuss_bearbeitung_ansicht_id"];
# Ggf. Status setzen: Alle Beteiligte angehört
beteiligter_angehoert($id, $uid);
# Ggf. Status setzen: Alle Gutachter angehört
gutachter_angehoert($id, $uid);
$result_vorh = $db->query("SELECT count(*) Anz
FROM imt_vorschlag
WHERE vid=$id");
$row_vorh = $result_vorh->fetch_array();
if($row_vorh[Anz] == 0){
$smarty->assign('ausschuss_bearbeitung_ansicht_err', "1");
}else{
$smarty->assign('ausschuss_bearbeitung_ansicht_err', "0");
$smarty->assign('ausschuss_bearbeitung_ansicht_id', "$id");
}
$smarty->display("$template/$templatename");
?>

View File

@ -0,0 +1,73 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once "validation/func_validEmail.php";
require_once "func_genUser.php";
require_once("func_verlauf.php");
require_once("func_mail_einstell.php");
require_once("func_rechte_vergabe.php");
require_once("func_beteiligter_status.php");
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["edit_id"] = $_GET['id'];
$search_prefix = 'ausschuss_beteiligte_uberblick_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
if($action == ''){
$id = $_SESSION["edit_id"];
$query1 = "SELECT bid, vorname, nachname, date_format(frist_datum, '%d.%m.%Y') frist_tag, date_format(stellung_dat, '%d.%m.%Y (%H:%i)') stellung_dat_form, stellung_dat
FROM imt_beteiligte a, imt_user b
WHERE a.imtuid=b.imtuid
AND a.vid='$id'
ORDER BY nachname ASC";
$result1 = $db->query ($query1)
or die ("Cannot execute query");
$table_data1 = array();
$beteiligter = new beteiligter();
while ($row1 = $result1->fetch_array()){
$status = $beteiligter -> beteiligter_status($row1[bid]);
$status_klartext = $beteiligter -> beteiligter_status_klartext($row1[bid], $status);
array_push($table_data1, array(
'bid' => $row1[bid],
'vorname' => $row1[vorname],
'nachname' => $row1[nachname],
'status' => $status,
'status_klartext' => $status_klartext,
'frist' => $frist,
'frist_tag' => $row1[frist_tag]
)
);
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

265
ausschuss_edit.php Executable file
View File

@ -0,0 +1,265 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
require_once("func_gutachter_entscheid.php");
if(isset($_GET['id'])){
$_SESSION["ausschuss_edit_id"] = $_GET['id'];
}
$id = $_SESSION["ausschuss_edit_id"];
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
$result = $db->query("SELECT vorname, nachname, mail, beziehung, betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid = '$id'");
$row = $result->fetch_array();
$result_status = $db->query("SELECT max(STATUS) status
FROM imt_vorschlag a, imt_verlauf b
WHERE a.vid = b.vid
AND a.vid ='$id'
GROUP BY a.vid
ORDER BY erfass_dat ASC");
$row_status = $result_status->fetch_array();
switch ($row[beziehung])
{
case "P":
$beziehung = "ProfessorIn";
break;
case "L":
$beziehung = "Lehrbeauftragte/r";
break;
case "E":
$beziehung = "Externe/r";
break;
case "S":
$beziehung = "StudentIn";
break;
case "V":
$beziehung = "Verwaltungsmitarbeiter";
break;
default:
$beziehung = "$row[beziehung]";
}
# $smarty->assign('ausschuss_edit_beziehung', $beziehung);
$smarty->assign('ausschuss_edit_id', "$id");
# $smarty->assign('ausschuss_edit_vorname', "$row[vorname]");
# $smarty->assign('ausschuss_edit_nachname', "$row[nachname]");
# $smarty->assign('ausschuss_edit_mail', "$row[mail]");
$smarty->assign('ausschuss_edit_betreff', "$row[betreff]");
$smarty->assign('ausschuss_edit_beschreibung', "$row[beschreibung]");
$smarty->assign('ausschuss_edit_vorschlag', "$row[vorschlag]");
$smarty->assign('ausschuss_edit_nutzen', "$row[nutzen]");
# if($row['public'] == 'Y'){
# $public = "Ja";
# }else{
# $public = "Nein";
# }
# $smarty->assign('ausschuss_edit_public', "$public");
# $smarty->assign('ausschuss_edit_status', "$row[status]");
# $smarty->assign('ausschuss_edit_hinweis_eigen', "$row[hinweis_eigen]");
# $smarty->assign('ausschuss_edit_hinweis_admin', "$row[hinweis_admin]");
$result_kat = $db->query("SELECT a.kategorie
FROM imt_kategorie a, imt_vorschlag b
WHERE a.kid = b.kategorie
AND b.vid = '$id'");
$row_kat = $result_kat->fetch_array();
$smarty->assign('ausschuss_edit_kat', "$row_kat[kategorie]");
# Offene Gutachter
$query2 = "SELECT a.imtuid, a.gid, vorname, nachname, bemerkung, date_format(frist_datum, '%d.%m.%Y') frist_dat_form
FROM imt_gutachter a, imt_user b
WHERE a.imtuid = b.imtuid
AND a.vid='$id'
ORDER BY frist_datum Asc";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$table_data2 = array();
while ($row2 = $result2->fetch_array()){
# Wenn Verlauf schon gesetzt, dann Auswahlfeld sperren
# Wenn Frist schon überschritten, dann Auswahlfeld sperren,
# Wenn akutelles Ausschussmitglied bereits abgestimmt, dann Auswahlfeld sperren
$disabled = 0;
$text = "Ausschuss hat Gutachter $row2[vorname] $row2[nachname]";
$result_verlauf = $db->query("SELECT count(*) Anz
FROM imt_verlauf
WHERE vid = '$id'
AND status = '105'
AND verlauf LIKE '$text%'
");
$row_verlauf = $result_verlauf->fetch_array();
if($row_verlauf[Anz] > 0){
$disabled = 1;
}
$result_frist = $db->query("SELECT count(*) Anz
FROM imt_gutachter a
WHERE a.gid = '$row2[gid]'
AND a.frist_datum < date_format( now( ) , '%Y-%m-%d' )
");
$row_frist = $result_frist->fetch_array();
if($row_frist[Anz] > 0){
$disabled = 1;
}
$result_erg = $db->query("SELECT ergebnis
FROM imt_ausschuss_gutachter_erg a
WHERE a.gid = '$row2[gid]'
AND a.imtuid = '$uid'
");
$row_erg = $result_erg->fetch_array();
if($row_erg[ergebnis] != ''){
$disabled = 1;
}
gutachter_entscheid($uid, $row2[gid], $id);
array_push($table_data2, array(
'vorname' => $row2[vorname],
'nachname' => $row2[nachname],
'bemerkung' => $row2[bemerkung],
'imtuid' => $row2[imtuid],
'ergebnis' => $row_erg[ergebnis],
'disabled' => $disabled,
'frist_dat_form' => $row2[frist_dat_form]
)
);
}
$smarty->assign('table_data2', $table_data2);
# Statis
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$id'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3[status];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
if($row3['sid'] == '7' OR $row3['sid'] == '8'){
$info = '1';
}else{
$info = '0';
}
array_push($table_data3, array(
'datum1' => $row3[datum1],
'info' => $info,
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'save'){
$id = $_SESSION["ausschuss_edit_id"];
$query2 = "SELECT a.imtuid, a.gid, vorname, nachname, bemerkung, date_format(frist_datum, '%d.%m.%Y') frist_dat_form
FROM imt_gutachter a, imt_user b
WHERE a.imtuid = b.imtuid
AND a.vid='$id'
ORDER BY frist_datum Asc";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$erfass_dat = date("Y-m-d H:i:s");
while ($row2 = $result2->fetch_array()){
$ergebnis = $_POST[$row2['imtuid']];
if($ergebnis != ''){
$sql = $db->query("INSERT INTO imt_ausschuss_gutachter_erg (imtuid, gid, ergebnis, erfass_dat) VALUES ('$uid', '$row2[gid]', '$ergebnis', '$erfass_dat')");
}
gutachter_entscheid($uid, $row2[gid], $id);
}
echo"
<script type='text/javascript'>
<!--
setTimeout(\"parent.document.location.href='ausschuss_gutachter.php'\", 2000);
//-->
</script>
";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

2
ausschuss_frame.php Executable file
View File

@ -0,0 +1,2 @@
<?php include_once 'classes/TestProjektSmarty.class.php'; require_once("config.inc.php"); #$template = "standard"; $templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html"; $smarty = new Smarty(); require_once "language/german.inc.php";
$smarty->display("$template/$templatename"); ?>

58
ausschuss_gutachter.php Executable file
View File

@ -0,0 +1,58 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
if($action == ''){
$db = dbconnect();
$query = "SELECT a.vid, betreff, date_format(a.erfass_dat, '%d.%m.%Y %H:%i:%s') erfass_dat_form, vorname, nachname, date_format(min(frist_datum), '%d.%m.%Y') frist_dat_form
FROM imt_vorschlag a, imt_gutachter b, imt_user c
WHERE a.vid = b.vid
AND a.imtuid=c.imtuid
AND b.gid NOT IN (SELECT gid FROM imt_ausschuss_gutachter_erg WHERE imtuid='$uid')
AND b.gid IN (SELECT gid FROM imt_gutachter WHERE frist_datum >= date_format( now( ) , '%Y-%m-%d' ))
GROUP BY a.vid
ORDER BY min(frist_datum) ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'erfass_dat_form' => $row[erfass_dat_form],
'frist_dat_form' => $row[frist_dat_form],
'vorname' => $row[vorname],
'nachname' => $row[nachname]
)
);
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

View File

@ -0,0 +1,78 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once "validation/func_validEmail.php";
require_once "func_genUser.php";
require_once("func_verlauf.php");
require_once("func_gutachter_entscheid.php");
require_once("func_gutachter_status.php");
require_once("func_mail_einstell.php");
require_once("func_rechte_vergabe.php");
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["edit_id"] = $_GET['id'];
$search_prefix = 'ausschuss_gutachter_uberblick_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
if($action == ''){
$id = $_SESSION["edit_id"];
$query1 = "SELECT a.gid, vorname, nachname, date_format(frist_datum, '%d.%m.%Y') frist_tag, date_format(frist_datum_abgabe, '%d.%m.%Y') frist_datum_abgabe
FROM imt_gutachter a, imt_user b
WHERE a.imtuid=b.imtuid
AND a.vid='$id'
ORDER BY nachname ASC";
$result1 = $db->query ($query1)
or die ("Cannot execute query");
$table_data1 = array();
$gutachter = new gutachter();
while ($row1 = $result1->fetch_array()){
gutachter_entscheid($uid, $row1[gid], $id);
$status = $gutachter -> gutachter_status($row1[gid]);
$status_klartext = $gutachter -> gutachter_status_klartext($row1[gid], $status);
if($row1[frist_datum_abgabe] == '00.00.0000'){
$abgabefrist = "Gutachter noch nicht angeschrieben";
}else{
$abgabefrist = $row1[frist_datum_abgabe];
}
array_push($table_data1, array(
'gid' => $row1[gid],
'vorname' => $row1[vorname],
'nachname' => $row1[nachname],
'status' => $status,
'status_klartext' => $status_klartext,
'frist_tag' => $row1[frist_tag],
'frist_datum_abgabe' => $abgabefrist
)
);
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

58
ausschuss_sitzung.php Executable file
View File

@ -0,0 +1,58 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "ausschuss_sitzung_" beginnen löschen
if($_GET['new'] == 1){;
$search_prefix = 'ausschuss_sitzung_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
$status = $_SESSION["status_id"];
if($action == ''){
$query = "SELECT isid, date_format(datum, '%d.%m.%Y') datum_form, date_format(datum, '%H:%i') zeit_form, raum, beschreibung
FROM imt_sitzungen
WHERE date_format(datum, '%Y%m%d') >= date_format(DATE_SUB(now(),INTERVAL 7 DAY), '%Y%m%d')";
$result = $db->query ($query)
or die ("Cannot execute query");
$outer_loop = array();
while ($row1 = $result->fetch_array()){
array_push($outer_loop, array(
'isid' => $row1[isid],
'datum_form' => $row1[datum_form],
'zeit_form' => $row1[zeit_form],
'raum' => $row1[raum],
'beschreibung' => $row1[beschreibung]
)
);
}
$smarty->assign('outer_loop', $outer_loop);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

107
ausschuss_status.php Executable file
View File

@ -0,0 +1,107 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
$status = $_SESSION["status_id"];
if($action == ''){
if(isset($status)){
$_SESSION["status_id"] = "$status";
}
$db = dbconnect();
$result = $db->query("SELECT beschreibung FROM imt_rechte WHERE dateiname = 'ausschuss_status.php?id=$status'");
$row = $result->fetch_array();
$smarty->assign('status_titel', "$row[beschreibung]");
$smarty->assign('status_id', "$status");
$query = "SELECT a.vid, betreff, date_format(erfass_dat, '%d.%m.%Y (%H:%i)') erfass_dat_form
FROM imt_vorschlag a, imt_verlauf b, imt_user c
WHERE a.vid = b.vid
AND a.imtuid=c.imtuid
GROUP BY a.vid
ORDER BY erfass_dat ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
$result1 = $db->query("SELECT date_format(datum, '%d.%m.%Y (%H:%i)') datum_form
FROM imt_sitzungen a, imt_sitzungen_vorschlag b
WHERE a.isid = b.isid
AND b.vid=$row[vid]");
$row1 = $result1->fetch_array();
if($status == 7){
$result2 = $db->query("SELECT status
FROM imt_verlauf
WHERE vid = $row[vid]
AND status IN ('7')
ORDER BY datum DESC, status DESC
LIMIT 1");
$row2 = $result2->fetch_array();
if($row2[status] == '7'){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'erfass_dat_form' => $row[erfass_dat_form],
'sitzungsdat' => $row1[datum_form],
'dateiname' => 'ausschuss_ansicht_entschieden.php'
)
);
}
}
if($status == 8){
$result2 = $db->query("SELECT status
FROM imt_verlauf
WHERE vid = $row[vid]
AND status IN ('8')
ORDER BY datum DESC, status DESC
LIMIT 1");
$row2 = $result2->fetch_array();
if($row2[status] == '8'){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'erfass_dat_form' => $row[erfass_dat_form],
'sitzungsdat' => $row1[datum_form],
'dateiname' => 'ausschuss_ansicht_entschieden.php'
)
);
}
}
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

118
ausschuss_uberblick.php Executable file
View File

@ -0,0 +1,118 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["ausschuss_uberblick_id"] = $_GET['id'];
}
$id = $_SESSION["ausschuss_uberblick_id"];
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
$result = $db->query("SELECT vorname, nachname, mail, beziehung, betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid = '$id'");
$row = $result->fetch_array();
$smarty->assign('ausschuss_uberblick_beziehung', $beziehung);
$smarty->assign('ausschuss_uberblick_id', "$id");
$smarty->assign('ausschuss_uberblick_vorname', "$row[vorname]");
$smarty->assign('ausschuss_uberblick_nachname', "$row[nachname]");
$smarty->assign('ausschuss_uberblick_mail', "$row[mail]");
$smarty->assign('ausschuss_uberblick_betreff', "$row[betreff]");
$smarty->assign('ausschuss_uberblick_beschreibung', "$row[beschreibung]");
$smarty->assign('ausschuss_uberblick_vorschlag', "$row[vorschlag]");
$smarty->assign('ausschuss_uberblick_nutzen', "$row[nutzen]");
if($row['public'] == 'Y'){
$public = "Ja";
}else{
$public = "Nein";
}
$smarty->assign('ausschuss_uberblick_public', "$public");
$smarty->assign('ausschuss_uberblick_status', "$row[status]");
$smarty->assign('ausschuss_uberblick_hinweis_eigen', "$row[hinweis_eigen]");
$smarty->assign('ausschuss_uberblick_hinweis_admin', "$row[hinweis_admin]");
$result_kategorie = $db->query("SELECT kategorie
FROM imt_kategorie
WHERE kid='$row[kategorie]'");
$row_kategorie = $result_kategorie->fetch_array();
$smarty->assign('ausschuss_uberblick_kategorie', "$row_kategorie[kategorie]");
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$id'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3[status];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
array_push($table_data3, array(
'datum1' => $row3[datum1],
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

42
bearbeiten.php Executable file
View File

@ -0,0 +1,42 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_beteiligter_angehoert.php");
require_once("func_gutachter_angehoert.php");
# Der Weg zum bearbeiten geht immer über das Statusfeld. daher kann man die ID verwenden
$smarty->assign('bearbeiten_status_id', $_SESSION["status_id"]);
if(isset($_GET['id'])){
$_SESSION["bearbeiten_id"] = $_GET['id'];
}
$id = $_SESSION["bearbeiten_id"];
# Ggf. Status setzen: Alle Beteiligte angehört
beteiligter_angehoert($id, $uid);
# Ggf. Status setzen: Alle Gutachter angehört
gutachter_angehoert($id, $uid);
$result_vorh = $db->query("SELECT count(*) Anz
FROM imt_vorschlag
WHERE vid=$id");
$row_vorh = $result_vorh->fetch_array();
if($row_vorh[Anz] == 0){
$smarty->assign('bearbeiten_err', "1");
}else{
$smarty->assign('bearbeiten_err', "0");
$smarty->assign('bearbeiten_id', "$id");
}
$smarty->display("$template/$templatename");
?>

43
beteiligte_bearbeiten.php Executable file
View File

@ -0,0 +1,43 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
if(isset($_GET['id'])){
$_SESSION["beteiligte_bearbeiten_id"] = $_GET['id'];
}
$id = $_SESSION["beteiligte_bearbeiten_id"];
$result_vorh = $db->query("SELECT count(*) Anz
FROM imt_vorschlag a
WHERE vid=$id
AND vid IN (SELECT vid FROM imt_beteiligte WHERE imtuid ='$uid')
AND 1 = (SELECT CASE 1 WHEN (SELECT count(*)
FROM imt_verlauf d
WHERE d.vid=a.vid
AND d.status IN ('7', '8')
GROUP BY vid
)>0
THEN '0'
ELSE '1'
END
# Man darf den Fall solange sehen, bis er abgeschlossen ist, also entweder mit Status 7 oder 8
)
");
$row_vorh = $result_vorh->fetch_array();
if($row_vorh[Anz] == 0){
$smarty->assign('beteiligte_bearbeiten_err', "1");
}else{
$smarty->assign('beteiligte_bearbeiten_err', "0");
$smarty->assign('beteiligte_bearbeiten_id', "$id");
}
$smarty->display("$template/$templatename");
?>

312
beteiligte_edit.php Executable file
View File

@ -0,0 +1,312 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["beteiligte_edit_id"] = $_GET['id'];
}
$id = $_SESSION["beteiligte_edit_id"];
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
if($_GET['error'] == 1){
$smarty->assign('beteiligte_edit_pflichtfelder', "1");
$smarty->assign('beteiligte_edit_error_text', "Es ist zu einem Fehler gekommen. Alle Felder sind Pflichtfelder!");
if($_SESSION["beteiligte_edit_zweck"] == ""){$smarty->assign('beteiligte_edit_zweck_ico', 1);}
$smarty->assign('beteiligte_edit_zweck', $_SESSION["beteiligte_edit_zweck"]);
if($_SESSION["beteiligte_edit_umsetzung"] == ""){$smarty->assign('beteiligte_edit_umsetzung_ico', 1);}
$smarty->assign('beteiligte_edit_umsetzung', $_SESSION["beteiligte_edit_umsetzung"]);
if($_SESSION["beteiligte_edit_nutzen"] == ""){$smarty->assign('beteiligte_edit_nutzen_ico', 1);}
$smarty->assign('beteiligte_edit_nutzen', $_SESSION["beteiligte_edit_nutzen"]);
if($_SESSION["beteiligte_edit_kosteneinsparung"] == ""){$smarty->assign('beteiligte_edit_kosteneinsparung_ico', 1);}
$smarty->assign('beteiligte_edit_kosteneinsparung', $_SESSION["beteiligte_edit_kosteneinsparung"]);
if($_SESSION["beteiligte_edit_arbeitszeiteinsparung"] == ""){$smarty->assign('beteiligte_edit_arbeitszeiteinsparung_ico', 1);}
$smarty->assign('beteiligte_edit_arbeitszeiteinsparung', $_SESSION["beteiligte_edit_arbeitszeiteinsparung"]);
if($_SESSION["beteiligte_edit_ideeneu"] == ""){$smarty->assign('beteiligte_edit_ideeneu_ico', 1);}
$smarty->assign('beteiligte_edit_ideeneu', $_SESSION["beteiligte_edit_ideeneu"]);
if($_SESSION["beteiligte_edit_empfehlung"] == ""){$smarty->assign('beteiligte_edit_empfehlung_ico', 1);}
$smarty->assign('beteiligte_edit_empfehlung', $_SESSION["beteiligte_edit_empfehlung"]);
}else{
$result_bem = $db->query("SELECT zweck, umsetzung, nutzen, kosteneinsparung, arbeitszeiteinsparung, ideeneu, empfehlung
FROM imt_beteiligte
WHERE imtuid = '$uid'
AND vid = '$id'");
$row_bem = $result_bem->fetch_array();
$smarty->assign('beteiligte_edit_zweck', "$row_bem[zweck]");
$smarty->assign('beteiligte_edit_umsetzung', "$row_bem[umsetzung]");
$smarty->assign('beteiligte_edit_nutzen', "$row_bem[nutzen]");
$smarty->assign('beteiligte_edit_kosteneinsparung', "$row_bem[kosteneinsparung]");
$smarty->assign('beteiligte_edit_arbeitszeiteinsparung', "$row_bem[arbeitszeiteinsparung]");
$smarty->assign('beteiligte_edit_ideeneu', "$row_bem[ideeneu]");
$smarty->assign('beteiligte_edit_empfehlung', "$row_bem[empfehlung]");
}
$result = $db->query("SELECT betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid = '$id'");
$row = $result->fetch_array();
$smarty->assign('beteiligte_edit_id', "$id");
$smarty->assign('beteiligte_edit_betreff', "$row[betreff]");
$smarty->assign('beteiligte_edit_beschreibung', "$row[beschreibung]");
$smarty->assign('beteiligte_edit_vorschlag', "$row[vorschlag]");
$smarty->assign('beteiligte_edit_nutzen1', "$row[nutzen]");
$result_kat = $db->query("SELECT a.kategorie
FROM imt_kategorie a, imt_vorschlag b
WHERE a.kid = b.kategorie
AND b.vid = '$id'");
$row_kat = $result_kat->fetch_array();
$smarty->assign('beteiligte_edit_kat', "$row_kat[kategorie]");
$result_bem = $db->query("SELECT stellungnahme
FROM imt_beteiligte
WHERE imtuid = '$uid'
AND vid = '$id'");
$row_bem = $result_bem->fetch_array();
$smarty->assign('beteiligte_edit_bemerkung', "$row_bem[stellungnahme]");
$result_frist = $db->query("SELECT count(*) Anz
FROM imt_beteiligte
WHERE imtuid = '$uid'
AND vid = '$id'
AND frist_datum < date_format(now(), '%Y-%m-%d')");
$row_frist = $result_frist->fetch_array();
if($row_frist[Anz] > 0){
$smarty->assign('beteiligte_edit_fristablauf', "1");
}else{
$smarty->assign('beteiligte_edit_fristablauf', "0");
}
# Statis
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$id'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3[status];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
if($row3['sid'] == '7' OR $row3['sid'] == '8'){
$info = '1';
}else{
$info = '0';
}
array_push($table_data3, array(
'datum1' => $row3[datum1],
'info' => $info,
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'save'){
$id = $_SESSION["beteiligte_edit_id"];
$zweck = htmlclean($_POST[beteiligte_edit_zweck]);
$umsetzung = htmlclean($_POST[beteiligte_edit_umsetzung]);
$nutzen = htmlclean($_POST[beteiligte_edit_nutzen]);
$kosteneinsparung = htmlclean($_POST[beteiligte_edit_kosteneinsparung]);
$arbeitszeiteinsparung = htmlclean($_POST[beteiligte_edit_arbeitszeiteinsparung]);
$ideeneu = htmlclean($_POST[beteiligte_edit_ideeneu]);
$empfehlung = htmlclean($_POST[beteiligte_edit_empfehlung]);
if($zweck == "" OR $umsetzung == "" OR $nutzen == "" OR $kosteneinsparung == "" OR $arbeitszeiteinsparung == "" OR $ideeneu == "" OR $empfehlung == "" ){
$smarty->assign('beteiligte_edit_error', "1");
$_SESSION["beteiligte_edit_zweck"] = $zweck;
$_SESSION["beteiligte_edit_umsetzung"] = $umsetzung;
$_SESSION["beteiligte_edit_nutzen"] = $nutzen;
$_SESSION["beteiligte_edit_kosteneinsparung"] = $kosteneinsparung;
$_SESSION["beteiligte_edit_arbeitszeiteinsparung"] = $arbeitszeiteinsparung;
$_SESSION["beteiligte_edit_ideeneu"] = $ideeneu;
$_SESSION["beteiligte_edit_empfehlung"] = $empfehlung;
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?error=1\">";
}else{
$smarty->assign('beteiligte_edit_error', "0");
$aend_dat = date("Y-m-d H:i:s");
$sql_update = $db->query("UPDATE imt_beteiligte
SET zweck='$zweck'
, umsetzung ='$umsetzung'
, nutzen = '$nutzen'
, kosteneinsparung = '$kosteneinsparung'
, arbeitszeiteinsparung = '$arbeitszeiteinsparung'
, ideeneu = '$ideeneu'
, empfehlung = '$empfehlung'
, stellung_dat='$aend_dat'
WHERE vid='$id'
AND imtuid='$uid'");
# Verlauf setzen
# 1) beim abgeben des Gutachten, Verlauf setzen, beim wiederbearbeiten nur das Datum setzen
$query_get_data1 = $db->query("SELECT vorname, nachname
FROM imt_user a
WHERE a.imtuid = '$uid'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_data1 = $query_get_data1->fetch_array();
$text = "Beteiligung von $row_data1[vorname] $row_data1[nachname] ist eingegangen";
$result_stat2 = $db->query("SELECT count(*) Anz
FROM imt_verlauf
WHERE vid= '$id'
AND status='106'
AND verlauf = '$text'");
$row_stat2 = $result_stat2->fetch_array();
if($row_stat2[Anz] == 0){
verlauf($uid, $id, "$text", 107, '');
}else{
$sql_verlauf_err = $db->query("UPDATE imt_verlauf
SET datum='$aend_dat'
WHERE vid='$id'
AND status = '106'
AND verlauf = '$text'
");
}
echo"
<script type='text/javascript'>
<!--
setTimeout(\"parent.document.location.href='beteiligte_offen.php'\", 2000);
//-->
</script>
";
}
/*
$id = $_SESSION["beteiligte_edit_id"];
$stellungnahme = htmlclean($_POST[beteiligte_edit_stellungnahme]);
$aend_dat = date("Y-m-d H:i:s");
$sql_update = $db->query("UPDATE imt_beteiligte SET stellungnahme='$stellungnahme', stellung_dat='$aend_dat' WHERE vid='$id' AND imtuid='$uid'");
$query_get_data1 = $db->query("SELECT vorname, nachname
FROM imt_user a
WHERE a.imtuid = '$uid'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_data1 = $query_get_data1->fetch_array();
# Verlauf setzen
# 1) beim abgeben des Beteiligtenstatements, Verlauf setzen, beim wiederbearbeiten nur das Datum setzen
$text = "Beteiligung von $row_data1[vorname] $row_data1[nachname] ist eingegangen";
$result_stat2 = $db->query("SELECT count(*) Anz
FROM imt_verlauf
WHERE vid= '$id'
AND status='106'
AND verlauf='$text'");
$row_stat2 = $result_stat2->fetch_array();
if($row_stat2[Anz] == 0){
verlauf($uid, $id, "$text", 106, '');
}else{
$sql_verlauf_err = $db->query("UPDATE imt_verlauf
SET datum='$aend_dat'
WHERE vid='$id'
AND status = '106'
AND verlauf = '$text'
");
}
echo"
<script type='text/javascript'>
<!--
setTimeout(\"parent.document.location.href='beteiligte_offen.php'\", 2000);
//-->
</script>
";
*/
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

66
beteiligte_erledigt.php Executable file
View File

@ -0,0 +1,66 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
if($action == ''){
$db = dbconnect();
$query = "SELECT a.vid, betreff, date_format(a.erfass_dat, '%d.%m.%Y %H:%i:%s') erfass_dat_form, vorname, nachname, date_format(frist_datum, '%d.%m.%Y') frist_dat_form
FROM imt_vorschlag a, imt_beteiligte b, imt_user c
WHERE a.vid = b.vid
AND a.imtuid=c.imtuid
AND 1 = (SELECT CASE 1 WHEN (SELECT count(*)
FROM imt_verlauf d
WHERE d.vid=a.vid
AND d.status IN ('7', '8')
GROUP BY vid
)>0
THEN '0'
ELSE '1'
END
# Man darf den Fall solange sehen, bis er abgeschlossen ist, also entweder mit Status 7 oder 8
)
AND b.imtuid = '$uid'
GROUP BY a.vid
ORDER BY frist_datum ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'erfass_dat_form' => $row[erfass_dat_form],
'frist_dat_form' => $row[frist_dat_form]
)
);
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

10
beteiligte_frame.php Executable file
View File

@ -0,0 +1,10 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
#$template = "standard";
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$smarty->display("$template/$templatename");
?>

68
beteiligte_offen.php Executable file
View File

@ -0,0 +1,68 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
if($action == ''){
$db = dbconnect();
$query = "SELECT a.vid, betreff, date_format(a.erfass_dat, '%d.%m.%Y %H:%i:%s') erfass_dat_form, vorname, nachname, date_format(frist_datum, '%d.%m.%Y') frist_dat_form
FROM imt_vorschlag a, imt_beteiligte b, imt_user c
WHERE a.vid = b.vid
AND a.imtuid=c.imtuid
AND 1 = (SELECT CASE 1 WHEN (SELECT count(*)
FROM imt_verlauf d
WHERE d.vid=a.vid
AND d.status IN ('7', '8')
GROUP BY vid
)>0
THEN '0'
ELSE '1'
END
# Man darf den Fall solange sehen, bis er abgeschlossen ist, also entweder mit Status 7 oder 8
)
AND b.imtuid = '$uid'
AND b.frist_datum >= date_format(now(), '%Y-%m-%d')
AND b.stellung_dat ='0000-00-00 00:00:00'
GROUP BY a.vid
ORDER BY frist_datum ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'vid' => $row[vid],
'betreff' => $row[betreff],
'erfass_dat_form' => $row[erfass_dat_form],
'frist_dat_form' => $row[frist_dat_form]
)
);
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

1072
beteiligtenbenennung.php Executable file

File diff suppressed because it is too large Load Diff

146
bewertungsvorschlag.php Executable file
View File

@ -0,0 +1,146 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_mail_einstell.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["edit_id"] = $_GET['id'];
}
$id = $_SESSION["edit_id"];
$action = $_GET['action'];
if($action == ''){
if($_GET['error'] == 1){
$smarty->assign('bewertungsvorschlag_pflichtfelder', "1");
$smarty->assign('bewertungsvorschlag_annahme', $_SESSION["bewertungsvorschlag_annahme"]);
$smarty->assign('bewertungsvorschlag_begruendung', $_SESSION["bewertungsvorschlag_begruendung"]);
$smarty->assign('bewertungsvorschlag_umsetzung', $_SESSION["bewertungsvorschlag_umsetzung"]);
$smarty->assign('bewertungsvorschlag_praemierung', $_SESSION["bewertungsvorschlag_praemierung"]);
if($_SESSION["bewertungsvorschlag_chk1"] == "" AND $_SESSION["bewertungsvorschlag_chk2"] == "" AND $_SESSION["bewertungsvorschlag_chk3"] == "" AND $_SESSION["bewertungsvorschlag_chk4"] == "" AND $_SESSION["bewertungsvorschlag_chk5"] == ""){$smarty->assign('bewertungsvorschlag_ziel_ico', 1);}
}else{
$db = dbconnect();
$result = $db->query("SELECT annahme, ziel, begruendung, umsetzung, praemierung
FROM imt_bew_vorschlag
WHERE vid = '$id'");
$row = $result->fetch_array();
if(preg_match("/1/",$row[ziel])){
$smarty->assign('bewertungsvorschlag_chk1', "Y");
}else{
$smarty->assign('bewertungsvorschlag_chk1', "N");
}
if(preg_match("/2/",$row[ziel])){
$smarty->assign('bewertungsvorschlag_chk2', "Y");
}else{
$smarty->assign('bewertungsvorschlag_chk2', "N");
}
if(preg_match("/3/",$row[ziel])){
$smarty->assign('bewertungsvorschlag_chk3', "Y");
}else{
$smarty->assign('bewertungsvorschlag_chk3', "N");
}
if(preg_match("/4/",$row[ziel])){
$smarty->assign('bewertungsvorschlag_chk4', "Y");
}else{
$smarty->assign('bewertungsvorschlag_chk4', "N");
}
if(preg_match("/5/",$row[ziel])){
$smarty->assign('bewertungsvorschlag_chk5', "Y");
}else{
$smarty->assign('bewertungsvorschlag_chk5', "N");
}
if($row[annahme] == ''){
$smarty->assign('bewertungsvorschlag_annahme', "J");
}else{
$smarty->assign('bewertungsvorschlag_annahme', "$row[annahme]");
}
$smarty->assign('bewertungsvorschlag_begruendung', "$row[begruendung]");
$smarty->assign('bewertungsvorschlag_umsetzung', "$row[umsetzung]");
$smarty->assign('bewertungsvorschlag_praemierung', "$row[praemierung]");
}
}
if($action == 'save'){
$id = $_SESSION["bearbeiten_id"];
$bewertungsvorschlag_chk1 = $_POST['chk1'];
$bewertungsvorschlag_chk2 = $_POST['chk2'];
$bewertungsvorschlag_chk3 = $_POST['chk3'];
$bewertungsvorschlag_chk4 = $_POST['chk4'];
$bewertungsvorschlag_chk5 = $_POST['chk5'];
$bewertungsvorschlag_annahme = $_POST['bewertungsvorschlag_annahme'];
$bewertungsvorschlag_begruendung = htmlclean($_POST['bewertungsvorschlag_begruendung']);
$bewertungsvorschlag_umsetzung = htmlclean($_POST['bewertungsvorschlag_umsetzung']);
$bewertungsvorschlag_praemierung = htmlclean($_POST['bewertungsvorschlag_praemierung']);
$aend_dat = date("Y-m-d H:i:s");
if($bewertungsvorschlag_chk1 == "" AND $bewertungsvorschlag_chk2 == "" AND $bewertungsvorschlag_chk3 == "" AND $bewertungsvorschlag_chk4 == "" AND $bewertungsvorschlag_chk5 == ""){
$_SESSION["bewertungsvorschlag_annahme"] = "$bewertungsvorschlag_annahme";
$_SESSION["bewertungsvorschlag_begruendung"] = "$bewertungsvorschlag_begruendung";
$_SESSION["bewertungsvorschlag_umsetzung"] = "$bewertungsvorschlag_umsetzung";
$_SESSION["bewertungsvorschlag_praemierung"] = "$bewertungsvorschlag_praemierung";
$smarty->assign('bewertungsvorschlag_save', 0); # Erfolgsmeldung unterdrücken
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?error=1\">";
}else{
$smarty->assign('bewertungsvorschlag_save', 1); # Erfolgsmeldung ausgeben
$ziel = "$bewertungsvorschlag_chk1$bewertungsvorschlag_chk2$bewertungsvorschlag_chk3$bewertungsvorschlag_chk4$bewertungsvorschlag_chk5";
$db = dbconnect();
$result = $db->query("SELECT count(*) Anz
FROM imt_bew_vorschlag
WHERE vid = '$id'");
$row = $result->fetch_array();
if($row[Anz] == 0){
$sql = $db->query("INSERT INTO imt_bew_vorschlag (vid, datum, ziel, annahme, begruendung, umsetzung, praemierung)
VALUES ($id, '$aend_dat', '$ziel', '$bewertungsvorschlag_annahme', '$bewertungsvorschlag_begruendung', '$bewertungsvorschlag_umsetzung', '$bewertungsvorschlag_praemierung')");
}else{
$sql = $db->query("UPDATE imt_bew_vorschlag
SET datum='$aend_dat'
, ziel = '$ziel'
, annahme='$bewertungsvorschlag_annahme'
, begruendung='$bewertungsvorschlag_begruendung'
, umsetzung='$bewertungsvorschlag_umsetzung'
, praemierung='$bewertungsvorschlag_praemierung'
WHERE vid = $id
");
}
if($sql){
echo "<meta http-equiv=\"refresh\" content=\"2; URL=".$_SERVER['PHP_SELF']."\">";
}else{
echo "Fehler beim Speichern!";
}
}
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

72
class_idee.php Executable file
View File

@ -0,0 +1,72 @@
<?php
#error_reporting(E_ALL | E_STRICT);
header("content-type: text/html; charset=utf-8");
#echo "Domain: ".$_SESSION["global_domain"];
$_SESSION["global_domain"] = "hsnet";
if($_SESSION["global_domain"] == "hsnet"){
require_once("adLDAP/adLDAP_hsnet.php");
}
if($_SESSION["global_domain"] == "studnet"){
require_once("adLDAP/adLDAP_studnet.php");
}
class idee extends adLDAP {
/**
* Converts a username (samAccountName) to a objectsid BY ALI
*
* @param string $username The username to query
* @return string
*/
public function username2osid($username) {
if (!$this->_bind){ return (false); }
if ($username === null){ return ("Missing compulsory field [username]"); }
$filter = "samaccountname=" . $username;
$fields = array("objectSid");
$sr = @ldap_search($this->_conn, $this->_base_dn, $filter, $fields);
if (ldap_count_entries($this->_conn, $sr) > 0) {
$entry = @ldap_first_entry($this->_conn, $sr);
$osid = @ldap_get_values_len($this->_conn, $entry, 'objectSid');
$strOSID = $this->binary2text($osid[0]);
return ($strOSID);
}
else {
return (false);
}
}
public function username2vorname($username){
$userinfo = $idee->user_info($username2, array("givenname"));
$userinfo = trim($userinfo[0]["givenname"][0]);
return $userinfo;
}
public function username2nachname($username){
$userinfo = $idee->user_info($username2, array("sn"));
$userinfo = trim($userinfo[0]["sn"][0]);
return $userinfo;
}
public function username2mail($username){
$userinfo = $idee->user_info($username2, array("mail"));
$userinfo = trim($userinfo[0]["mail"][0]);
return $userinfo;
}
public function username2department($username){
$userinfo = $this->user_info($username, array("distinguishedname"));
$distinguishedname = $userinfo[0]["distinguishedname"][0];
$group = preg_split('/OU=/', $distinguishedname);
$group = trim(str_replace(',', '', $group[1]));
return $group;
}
}
?>

View File

@ -0,0 +1,19 @@
<?php
date_default_timezone_set("Europe/Berlin");
set_include_path( get_include_path().PATH_SEPARATOR.'./lib');
require_once('lib/smarty/libs/Smarty.class.php');
if(!defined('REQUIRED_SMARTY_DIR')) define('REQUIRED_SMARTY_DIR','./');
class SmartyAdmin extends Smarty{
function __construct(){
$this->Smarty();
$this->template_dir = REQUIRED_SMARTY_DIR.'templates';
$this->compile_dir = REQUIRED_SMARTY_DIR.'templates_c';
$this->config_dir = REQUIRED_SMARTY_DIR.'config';
$this->cache_dir = REQUIRED_SMARTY_DIR.'cache';
}
}
?>

View File

@ -0,0 +1,18 @@
<?php
date_default_timezone_set("Europe/Berlin");
set_include_path( get_include_path().PATH_SEPARATOR.'./lib');
require_once('../lib/smarty/libs/Smarty.class.php');
if(!defined('REQUIRED_SMARTY_DIR')) define('REQUIRED_SMARTY_DIR','./');
class SmartyAdmin extends Smarty{
public function __construct(){
parent::__construct(); // this must be called
$this->template_dir = REQUIRED_SMARTY_DIR.'../templates';
$this->compile_dir = REQUIRED_SMARTY_DIR.'../templates_c';
$this->config_dir = REQUIRED_SMARTY_DIR.'../config';
$this->cache_dir = REQUIRED_SMARTY_DIR.'../cache';
}
}
?>

59
config.inc.php Executable file
View File

@ -0,0 +1,59 @@
<?php
session_start();
require_once("config/datenbankanbindung.php"); // f&uuml;gt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
# Domäne wird simuliert in der Programmierumgebung
#$_SESSION["global_domain"] = "hsnet";
#$_SESSION["global_uid"] = "1";
#$_SESSION["global_username"] = "SCHWARAL";
require_once("class_idee.php");
#---------------------------------------------------------------------------------------------------------------------------------------
# Ermittlung der Globalen Einstellungen
$db = dbconnect();
$result_ansprech_global = $db->query("SELECT wert1, wert2 FROM imt_parameter WHERE pid='1'");
$row_ansprech_global = $result_ansprech_global->fetch_array();
$result_ansprech_global1 = $db->query("SELECT wert1 FROM imt_parameter WHERE pid='3'");
$row_ansprech_global1 = $result_ansprech_global1->fetch_array();
$result_ansprech_uid = $db->query("SELECT imtuid FROM imt_user WHERE mail IN (SELECT wert2 FROM imt_parameter WHERE pid='1')");
$row_ansprech_uid = $result_ansprech_uid->fetch_array();
$global_service_admin = "$row_ansprech_global[wert1]";
$global_service_mail = "$row_ansprech_global[wert2]";
$global_service_admin_uid = "$row_ansprech_global1[wert1]";
$global_service_uid = "$row_ansprech_uid[imtuid]";
#---------------------------------------------------------------------------------------------------------------------------------------
$username = $_SESSION["global_username"];
$uid = $_SESSION["global_uid"];
$login_dateiname = basename($_SERVER['PHP_SELF']);
if($uid == "" and $login_dateiname !='register.php'){
header("Location:index.php");
}
# echo "<hr>";
# echo nl2br(print_r($_SESSION,true));
# echo "<hr>";
#---------------------------------------------------------------------------------------------------------------------------------------
# Ermittlung des Templates
# $db = dbconnect();
# $result = $db->query("SELECT template FROM profil WHERE user='$user_admin'");
# $row = $result->fetch_array();
#---------------------------------------------------------------------------------------------------------------------------------------
#$global_admin = 'Alexander Schwarz';
#$global_adminmail ='netblack@gmx.de';
#$template = $row[template];
$template = "modern";
#$template = "#standard";
#---------------------------------------------------------------------------------------------------------------------------------------
?>

4
config/.htaccess Executable file
View File

@ -0,0 +1,4 @@
AuthName "pwd"
AuthType Basic
AuthUserFile /var/www/web712/html/config/.htpasswd
require valid-user

1
config/.htpasswd Executable file
View File

@ -0,0 +1 @@
admin:$1$mJMmTGPR$/db9TUBE9VIYJMUcNezBk0

13
config/datenbankanbindung.php Executable file
View File

@ -0,0 +1,13 @@
<?php
//--Funktion-Datenbankverbindung--------------------------------------------------------------------
function dbconnect() //--Prozedur - kein return-Wert
{
$db = @new mysqli( 'localhost', 'schwaral', 'schnatz', 'ideenmanagement' );
$db->query("SET NAMES 'utf8'");
return $db;
}
//--------------------------------------------------------------------------------------------------
?>

204
dyncalendar/browserSniffer.js Executable file
View File

@ -0,0 +1,204 @@
//<!--
// Ultimate client-side JavaScript client sniff. Version 3.03
// (C) Netscape Communications 1999-2001. Permission granted to reuse and distribute.
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
// also added support for IE5.5 Opera4&5 HotJava3 AOLTV
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4,
// correct Opera 5 detection
// add support for winME and win2k
// synch with browser-type-oo.js
// Revised 26 Mar 01 to correct Opera detection
// Revised 02 Oct 01 to add IE6 detection
// Everything you always wanted to know about your JavaScript client
// but were afraid to ask. Creates "is_" variables indicating:
// (1) browser vendor:
// is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
// (2) browser version number:
// is_major (integer indicating major version number: 2, 3, 4 ...)
// is_minor (float indicating full version number: 2.02, 3.01, 4.04 ...)
// (3) browser vendor AND major version number
// is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
// is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up,
// is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up
// (4) JavaScript version number:
// is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
// (5) OS platform and version:
// is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
// is_os2
// is_mac, is_mac68k, is_macppc
// is_unix
// is_sun, is_sun4, is_sun5, is_suni86
// is_irix, is_irix5, is_irix6
// is_hpux, is_hpux9, is_hpux10
// is_aix, is_aix1, is_aix2, is_aix3, is_aix4
// is_linux, is_sco, is_unixware, is_mpras, is_reliant
// is_dec, is_sinix, is_freebsd, is_bsd
// is_vms
//
// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
// for detailed lists of userAgent strings.
//
// Note: you don't want your Nav4 or IE4 code to "turn off" or
// stop working when new versions of browsers are released, so
// in conditional code forks, use is_ie5up ("IE 5.0 or greater")
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
// to check version in code which you want to work on future
// versions.
// convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
// *** BROWSER VERSION ***
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
// Note: Opera and WebTV spoof Navigator. We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav2 = (is_nav && (is_major == 2));
var is_nav3 = (is_nav && (is_major == 3));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) ||
(agt.indexOf("; nav") != -1)) );
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3 = (is_ie && (is_major < 4));
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up = (is_ie && (is_major >= 4));
var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
// or if this is the first browser window opened. Thus the
// variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
var is_aol = (agt.indexOf("aol") != -1);
var is_aol3 = (is_aol && is_ie3);
var is_aol4 = (is_aol && is_ie4);
var is_aol5 = (agt.indexOf("aol 5") != -1);
var is_aol6 = (agt.indexOf("aol 6") != -1);
var is_opera = (agt.indexOf("opera") != -1);
var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
var is_webtv = (agt.indexOf("webtv") != -1);
var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
var is_AOLTV = is_TVNavigator;
var is_hotjava = (agt.indexOf("hotjava") != -1);
var is_hotjava3 = (is_hotjava && (is_major == 3));
var is_hotjava3up = (is_hotjava && (is_major >= 3));
// *** JAVASCRIPT VERSION CHECK ***
var is_js;
if (is_nav2 || is_ie3) is_js = 1.0;
else if (is_nav3) is_js = 1.1;
else if (is_opera5up) is_js = 1.3;
else if (is_opera) is_js = 1.1;
else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
else if (is_hotjava3up) is_js = 1.4;
else if (is_nav6 || is_gecko) is_js = 1.5;
// NOTE: In the future, update this code when newer versions of JS
// are released. For now, we try to provide some upward compatibility
// so that future versions of Nav and IE will show they are at
// *least* JS 1.x capable. Always check for JS version compatibility
// with > or >=.
else if (is_nav6up) is_js = 1.5;
// NOTE: ie5up on mac is 1.4
else if (is_ie5up) is_js = 1.3
// HACK: no idea for other browsers; always check for JS version with > or >=
else is_js = 0.0;
// *** PLATFORM ***
var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
// NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
// Win32, so you can't distinguish between Win95 and WinNT.
var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
// is this a 16 bit compiled version?
var is_win16 = ((agt.indexOf("win16")!=-1) ||
(agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) ||
(agt.indexOf("windows 16-bit")!=-1) );
var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
(agt.indexOf("windows 16-bit")!=-1));
var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));
// NOTE: Reliable detection of Win98 may not be possible. It appears that:
// - On Nav 4.x and before you'll get plain "Windows" in userAgent.
// - On Mercury client, the 32-bit version will return "Win98", but
// the 16-bit version running on Win98 will still return "Win95".
var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
var is_win32 = (is_win95 || is_winnt || is_win98 ||
((is_major >= 4) && (navigator.platform == "Win32")) ||
(agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
var is_os2 = ((agt.indexOf("os/2")!=-1) ||
(navigator.appVersion.indexOf("OS/2")!=-1) ||
(agt.indexOf("ibm-webexplorer")!=-1));
var is_mac = (agt.indexOf("mac")!=-1);
// hack ie5 js version for mac
if (is_mac && is_ie5up) is_js = 1.4;
var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) ||
(agt.indexOf("68000")!=-1)));
var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) ||
(agt.indexOf("powerpc")!=-1)));
var is_sun = (agt.indexOf("sunos")!=-1);
var is_sun4 = (agt.indexOf("sunos 4")!=-1);
var is_sun5 = (agt.indexOf("sunos 5")!=-1);
var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
var is_irix = (agt.indexOf("irix") !=-1); // SGI
var is_irix5 = (agt.indexOf("irix 5") !=-1);
var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
var is_hpux = (agt.indexOf("hp-ux")!=-1);
var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
var is_aix = (agt.indexOf("aix") !=-1); // IBM
var is_aix1 = (agt.indexOf("aix 1") !=-1);
var is_aix2 = (agt.indexOf("aix 2") !=-1);
var is_aix3 = (agt.indexOf("aix 3") !=-1);
var is_aix4 = (agt.indexOf("aix 4") !=-1);
var is_linux = (agt.indexOf("inux")!=-1);
var is_sco = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
var is_unixware = (agt.indexOf("unix_system_v")!=-1);
var is_mpras = (agt.indexOf("ncr")!=-1);
var is_reliant = (agt.indexOf("reliantunix")!=-1);
var is_dec = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) ||
(agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) ||
(agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1));
var is_sinix = (agt.indexOf("sinix")!=-1);
var is_freebsd = (agt.indexOf("freebsd")!=-1);
var is_bsd = (agt.indexOf("bsd")!=-1);
var is_unix = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux ||
is_sco ||is_unixware || is_mpras || is_reliant ||
is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);
var is_vms = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
//--> end hide JavaScript

40
dyncalendar/dynCalendar.css Executable file
View File

@ -0,0 +1,40 @@
.dynCalendar_header{
font-family: Arial, Verdana, Helvetica, Sans-Serif;
font-size: 10pt;
font-weight: bold;
z-index: 1000;
}
.dynCalendar_dayname {
background-color: #eeeeee;
border: 1px solid #c0c0c0;
font-family: Arial, Verdana, Helvetica, Sans-Serif;
font-size: 8pt;
text-align: center;
z-index: 1000;
}
.dynCalendar_day {
background-color: #eeeeee;
color: #000000;
font-family: Arial, Verdana, Helvetica, Sans-Serif;
font-size: 8pt;
z-index: 1000;
}
.dynCalendar_today {
background-color: #ffffff;
border: 1px solid #c0c0c0;
font-family: Arial, Verdana, Helvetica, Sans-Serif;
font-size: 8pt;
z-index: 1000;
}
.dynCalendar {
background-color: #c0c0c0;
border: 2px outset white;
visibility: hidden;
position: absolute;
top: 1px;
left: 1px;
z-index: 1000;
}

465
dyncalendar/dynCalendar.js Executable file
View File

@ -0,0 +1,465 @@
/**
* o------------------------------------------------------------------------------o
* | This package is licensed under the Phpguru license. A quick summary is |
* | that the code is free to use for non-commercial purposes. For commercial |
* | purposes of any kind there is a small license fee to pay. You can read more |
* | at: |
* | http://www.phpguru.org/static/license.html |
* o------------------------------------------------------------------------------o
*
* © Copyright 2008 Richard Heyes
*/
/**
* Global variables
*/
dynCalendar_layers = new Array();
dynCalendar_mouseoverStatus = false;
dynCalendar_mouseX = 0;
dynCalendar_mouseY = 0;
/**
* The calendar constructor
*
* @access public
* @param string objName Name of the object that you create
* @param string callbackFunc Name of the callback function
* @param string OPTIONAL Optional layer name
* @param string OPTIONAL Optional images path
*/
function dynCalendar(objName, callbackFunc)
{
/**
* Properties
*/
// Todays date
this.today = new Date();
this.date = this.today.getDate();
this.month = this.today.getMonth();
this.year = this.today.getFullYear();
this.objName = objName;
this.callbackFunc = callbackFunc;
this.imagesPath = arguments[2] ? arguments[2] : 'images/';
this.layerID = arguments[3] ? arguments[3] : 'dynCalendar_layer_' + dynCalendar_layers.length;
/*byAli*/
this.pos = arguments[4];
this.offsetX = 5;
this.offsetY = 5;
this.useMonthCombo = true;
this.useYearCombo = true;
this.yearComboRange = 5;
this.currentMonth = this.month;
this.currentYear = this.year;
/**
* Public Methods
*/
this.show = dynCalendar_show;
this.writeHTML = dynCalendar_writeHTML;
// Accessor methods
this.setOffset = dynCalendar_setOffset;
this.setOffsetX = dynCalendar_setOffsetX;
this.setOffsetY = dynCalendar_setOffsetY;
this.setImagesPath = dynCalendar_setImagesPath;
this.setMonthCombo = dynCalendar_setMonthCombo;
this.setYearCombo = dynCalendar_setYearCombo;
this.setCurrentMonth = dynCalendar_setCurrentMonth;
this.setCurrentYear = dynCalendar_setCurrentYear;
this.setYearComboRange = dynCalendar_setYearComboRange;
/**
* Private methods
*/
// Layer manipulation
this._getLayer = dynCalendar_getLayer;
this._hideLayer = dynCalendar_hideLayer;
this._showLayer = dynCalendar_showLayer;
this._setLayerPosition = dynCalendar_setLayerPosition;
this._setHTML = dynCalendar_setHTML;
// Miscellaneous
this._getDaysInMonth = dynCalendar_getDaysInMonth;
this._mouseover = dynCalendar_mouseover;
/**
* Constructor type code
*/
dynCalendar_layers[dynCalendar_layers.length] = this;
this.writeHTML();
}
/**
* Shows the calendar, or updates the layer if
* already visible.
*
* @access public
* @param integer month Optional month number (0-11)
* @param integer year Optional year (YYYY format)
*/
function dynCalendar_show()
{
// Variable declarations to prevent globalisation
var month, year, monthnames, numdays, thisMonth, firstOfMonth;
var ret, row, i, cssClass, linkHTML, previousMonth, previousYear;
var nextMonth, nextYear, prevImgHTML, prevLinkHTML, nextImgHTML, nextLinkHTML;
var monthComboOptions, monthCombo, yearComboOptions, yearCombo, html;
this.currentMonth = month = arguments[0] != null ? arguments[0] : this.currentMonth;
this.currentYear = year = arguments[1] != null ? arguments[1] : this.currentYear;
monthnames = new Array('Januar', 'Februar', 'M&auml;rz', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember');
numdays = this._getDaysInMonth(month, year);
thisMonth = new Date(year, month, 1);
firstOfMonth = thisMonth.getDay();
// First few blanks up to first day
ret = new Array(new Array());
for(i=0; i<firstOfMonth; i++){
ret[0][ret[0].length] = '<td>&nbsp;</td>';
}
// Main body of calendar
row = 0;
i = 1;
while(i <= numdays){
if(ret[row].length == 7){
ret[++row] = new Array();
}
/**
* Generate this cells' HTML
*/
cssClass = (i == this.date && month == this.month && year == this.year) ? 'dynCalendar_today' : 'dynCalendar_day';
linkHTML = '<a href="javascript: ' + this.callbackFunc + '(' + i + ', ' + (Number(month) + 1) + ', ' + year + ', ' + this.pos + '); ' + this.objName + '._hideLayer()">' + (i++) + '</a>';
ret[row][ret[row].length] = '<td align="center" class="' + cssClass + '">' + linkHTML + '</td>';
}
// Format the HTML
for(i=0; i<ret.length; i++){
ret[i] = ret[i].join('\n') + '\n';
}
previousYear = thisMonth.getFullYear();
previousMonth = thisMonth.getMonth() - 1;
if(previousMonth < 0){
previousMonth = 11;
previousYear--;
}
nextYear = thisMonth.getFullYear();
nextMonth = thisMonth.getMonth() + 1;
if(nextMonth > 11){
nextMonth = 0;
nextYear++;
}
prevImgHTML = '<img src="' + this.imagesPath + '/prev.gif" alt="<<" border="0" />';
prevLinkHTML = '<a href="javascript: ' + this.objName + '.show(' + previousMonth + ', ' + previousYear + ')">' + prevImgHTML + '</a>';
nextImgHTML = '<img src="' + this.imagesPath + '/next.gif" alt="<<" border="0" />';
nextLinkHTML = '<a href="javascript: ' + this.objName + '.show(' + nextMonth + ', ' + nextYear + ')">' + nextImgHTML + '</a>';
/**
* Build month combo
*/
if (this.useMonthCombo) {
monthComboOptions = '';
for (i=0; i<12; i++) {
selected = (i == thisMonth.getMonth() ? 'selected="selected"' : '');
monthComboOptions += '<option value="' + i + '" ' + selected + '>' + monthnames[i] + '</option>';
}
monthCombo = '<select name="months" onchange="' + this.objName + '.show(this.options[this.selectedIndex].value, ' + this.objName + '.currentYear)">' + monthComboOptions + '</select>';
} else {
monthCombo = monthnames[thisMonth.getMonth()];
}
/**
* Build year combo
*/
if (this.useYearCombo) {
yearComboOptions = '';
for (i = thisMonth.getFullYear() - this.yearComboRange; i <= (thisMonth.getFullYear() + this.yearComboRange); i++) {
selected = (i == thisMonth.getFullYear() ? 'selected="selected"' : '');
yearComboOptions += '<option value="' + i + '" ' + selected + '>' + i + '</option>';
}
yearCombo = '<select style="border: 1px groove" name="years" onchange="' + this.objName + '.show(' + this.objName + '.currentMonth, this.options[this.selectedIndex].value)">' + yearComboOptions + '</select>';
} else {
yearCombo = thisMonth.getFullYear();
}
html = '<table width=220pt border="0" bgcolor="#eeeeee">';
html += '<tr><td class="dynCalendar_header">' + prevLinkHTML + '</td><td colspan="5" align="center" class="dynCalendar_header">' + monthCombo + ' ' + yearCombo + '</td><td align="right" class="dynCalendar_header">' + nextLinkHTML + '</td></tr>';
html += '<tr>';
html += '<td class="dynCalendar_dayname">So</td>';
html += '<td class="dynCalendar_dayname">Mo</td>';
html += '<td class="dynCalendar_dayname">Di</td>';
html += '<td class="dynCalendar_dayname">Mi</td>';
html += '<td class="dynCalendar_dayname">Do</td>';
html += '<td class="dynCalendar_dayname">Fr</td>';
html += '<td class="dynCalendar_dayname">Sa</td></tr>';
html += '<tr>' + ret.join('</tr>\n<tr>') + '</tr>';
html += '</table>';
this._setHTML(html);
if (!arguments[0] && !arguments[1]) {
this._showLayer();
this._setLayerPosition();
}
}
/**
* Writes HTML to document for layer
*
* @access public
*/
function dynCalendar_writeHTML()
{
if (is_ie5up || is_nav6up || is_gecko) {
document.write('<a href="javascript: ' + this.objName + '.show()"><img src="' + this.imagesPath + 'dynCalendar.gif" border="0" width="16" height="16" /></a>');
document.write('<div class="dynCalendar" id="' + this.layerID + '" onmouseover="' + this.objName + '._mouseover(true)" onmouseout="' + this.objName + '._mouseover(false)"></div>');
}
}
/**
* Sets the offset to the mouse position
* that the calendar appears at.
*
* @access public
* @param integer Xoffset Number of pixels for vertical
* offset from mouse position
* @param integer Yoffset Number of pixels for horizontal
* offset from mouse position
*/
function dynCalendar_setOffset(Xoffset, Yoffset)
{
this.setOffsetX(Xoffset);
this.setOffsetY(Yoffset);
}
/**
* Sets the X offset to the mouse position
* that the calendar appears at.
*
* @access public
* @param integer Xoffset Number of pixels for horizontal
* offset from mouse position
*/
function dynCalendar_setOffsetX(Xoffset)
{
this.offsetX = Xoffset;
}
/**
* Sets the Y offset to the mouse position
* that the calendar appears at.
*
* @access public
* @param integer Yoffset Number of pixels for vertical
* offset from mouse position
*/
function dynCalendar_setOffsetY(Yoffset)
{
this.offsetY = Yoffset;
}
/**
* Sets the images path
*
* @access public
* @param string path Path to use for images
*/
function dynCalendar_setImagesPath(path)
{
this.imagesPath = path;
}
/**
* Turns on/off the month dropdown
*
* @access public
* @param boolean useMonthCombo Whether to use month dropdown or not
*/
function dynCalendar_setMonthCombo(useMonthCombo)
{
this.useMonthCombo = useMonthCombo;
}
/**
* Turns on/off the year dropdown
*
* @access public
* @param boolean useYearCombo Whether to use year dropdown or not
*/
function dynCalendar_setYearCombo(useYearCombo)
{
this.useYearCombo = useYearCombo;
}
/**
* Sets the current month being displayed
*
* @access public
* @param boolean month The month to set the current month to
*/
function dynCalendar_setCurrentMonth(month)
{
this.currentMonth = month;
}
/**
* Sets the current month being displayed
*
* @access public
* @param boolean year The year to set the current year to
*/
function dynCalendar_setCurrentYear(year)
{
this.currentYear = year;
}
/**
* Sets the range of the year combo. Displays this number of
* years either side of the year being displayed.
*
* @access public
* @param integer range The range to set
*/
function dynCalendar_setYearComboRange(range)
{
this.yearComboRange = range;
}
/**
* Returns the layer object
*
* @access private
*/
function dynCalendar_getLayer()
{
var layerID = this.layerID;
if (document.getElementById(layerID)) {
return document.getElementById(layerID);
} else if (document.all(layerID)) {
return document.all(layerID);
}
}
/**
* Hides the calendar layer
*
* @access private
*/
function dynCalendar_hideLayer()
{
this._getLayer().style.visibility = 'hidden';
}
/**
* Shows the calendar layer
*
* @access private
*/
function dynCalendar_showLayer()
{
this._getLayer().style.visibility = 'visible';
}
/**
* Sets the layers position
*
* @access private
*/
function dynCalendar_setLayerPosition()
{
this._getLayer().style.top = (dynCalendar_mouseY + this.offsetY) + 'px';
this._getLayer().style.left = (dynCalendar_mouseX + this.offsetX) + 'px';
}
/**
* Sets the innerHTML attribute of the layer
*
* @access private
*/
function dynCalendar_setHTML(html)
{
this._getLayer().innerHTML = html;
}
/**
* Returns number of days in the supplied month
*
* @access private
* @param integer month The month to get number of days in
* @param integer year The year of the month in question
*/
function dynCalendar_getDaysInMonth(month, year)
{
monthdays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if (month != 1) {
return monthdays[month];
} else {
return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 29 : 28);
}
}
/**
* onMouse(Over|Out) event handler
*
* @access private
* @param boolean status Whether the mouse is over the
* calendar or not
*/
function dynCalendar_mouseover(status)
{
dynCalendar_mouseoverStatus = status;
return true;
}
/**
* onMouseMove event handler
*/
dynCalendar_oldOnmousemove = document.onmousemove ? document.onmousemove : new Function;
document.onmousemove = function ()
{
if (is_ie5up || is_nav6up || is_gecko) {
if (arguments[0]) {
dynCalendar_mouseX = arguments[0].pageX;
dynCalendar_mouseY = arguments[0].pageY;
} else {
dynCalendar_mouseX = event.clientX + document.body.scrollLeft;
dynCalendar_mouseY = event.clientY + document.body.scrollTop;
arguments[0] = null;
}
dynCalendar_oldOnmousemove();
}
}
/**
* Callbacks for document.onclick
*/
dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function;
document.onclick = function ()
{
if (is_ie5up || is_nav6up || is_gecko) {
if(!dynCalendar_mouseoverStatus){
for(i=0; i<dynCalendar_layers.length; ++i){
dynCalendar_layers[i]._hideLayer();
}
}
dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

BIN
dyncalendar/images/next.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

BIN
dyncalendar/images/prev.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

468
edit.php Executable file
View File

@ -0,0 +1,468 @@
<?php
# Fuer debugging
#error_reporting(E_ALL);
#ini_set('display_errors', 1);
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_mail_einstell.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["edit_id"] = $_GET['id'];
}
$id = $_SESSION["edit_id"];
$action = $_GET['action'];
if($action == ''){
$db = dbconnect();
$query = "SELECT name, mail
FROM imt_gruppenmitglieder
WHERE vid='$id'
ORDER BY name ASC";
$result = $db->query ($query)
or die ("Cannot execute query");
$table_data1 = array();
while ($row = $result->fetch_array()){
array_push($table_data1, array(
'name' => $row[name],
'mail' => $row[mail]
)
);
}
$smarty->assign('table_data1', $table_data1);
$result = $db->query("SELECT vorname, nachname, mail, beziehung, betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid = '$id'");
$row = $result->fetch_array();
$result_status = $db->query("SELECT max(STATUS) status
FROM imt_vorschlag a, imt_verlauf b
WHERE a.vid = b.vid
AND a.vid ='$id'
GROUP BY a.vid
ORDER BY erfass_dat ASC");
$row_status = $result_status->fetch_array();
switch ($row[beziehung])
{
case "P":
$beziehung = "ProfessorIn";
break;
case "L":
$beziehung = "Lehrbeauftragte/r";
break;
case "E":
$beziehung = "Externe/r";
break;
case "S":
$beziehung = "StudentIn";
break;
case "V":
$beziehung = "Verwaltungsmitarbeiter";
break;
default:
$beziehung = "$row[beziehung]";
}
$smarty->assign('edit_beziehung', $beziehung);
$smarty->assign('edit_id', "$id");
$smarty->assign('edit_vorname', $row['vorname']);
$smarty->assign('edit_nachname', $row['nachname']);
$smarty->assign('edit_mail', "$row[mail]");
$smarty->assign('edit_betreff', "$row[betreff]");
$smarty->assign('edit_beschreibung', "$row[beschreibung]");
$smarty->assign('edit_vorschlag', "$row[vorschlag]");
$smarty->assign('edit_nutzen', "$row[nutzen]");
if($row['public'] == 'Y'){
$public = "Ja";
}else{
$public = "Nein";
}
$smarty->assign('edit_public', "$public");
$smarty->assign('edit_status', "$row[status]");
$smarty->assign('edit_hinweis_eigen', "$row[hinweis_eigen]");
$smarty->assign('edit_hinweis_admin', "$row[hinweis_admin]");
$query2 = "SELECT kid, kategorie
FROM imt_kategorie
ORDER BY sort_order ASC";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$table_data2 = array();
while ($row2 = $result2->fetch_array()){
if($row2[kid] == $row[kategorie]){
$selected = "1";
}else{
$selected = "0";
}
array_push($table_data2, array(
'kid' => $row2[kid],
'selected' => $selected,
'kategorie' => $row2[kategorie]
)
);
}
$smarty->assign('table_data2', $table_data2);
# Ablehnbutton ermöglichen, wenn der Status=neu ist
$result2a = $db->query("SELECT status
FROM imt_verlauf
WHERE vid = $id
AND status != 104 #--> Erfasser kann gleich eine Mitteilung erfassen (Status 104). Der Anträg wäre dann immer noch neu
ORDER BY datum DESC
LIMIT 1");
$row2a = $result2a->fetch_array();
if($row2a[status] == 1){
$smarty->assign('edit_ablehnen_bttn', "1");
$smarty->assign('edit_ablehnen_vid', "$id");
}
# Variable erfassen_eingabe_vid leer setzen, damit wird Doppelspeicherung unten beim Insert verhindert
$_SESSION["erfassen_eingabe_vid"] = "";
if($_GET['error'] == 1){
$smarty->assign('erfassen_eingabe_pflichtfelder', "1");
$smarty->assign('erfassen_eingabe_betreff', $_SESSION["erfassen_eingabe_betreff"]);
if($_SESSION["erfassen_eingabe_betreff"] == ""){$smarty->assign('erfassen_eingabe_betreff_ico', 1);}
$smarty->assign('erfassen_eingabe_beschreibung', $_SESSION["erfassen_eingabe_beschreibung"]);
if($_SESSION["erfassen_eingabe_beschreibung"] == ""){$smarty->assign('erfassen_eingabe_beschreibung_ico', 1);}
$smarty->assign('erfassen_eingabe_vorschlag', $_SESSION["erfassen_eingabe_vorschlag"]);
if($_SESSION["erfassen_eingabe_vorschlag"] == ""){$smarty->assign('erfassen_eingabe_vorschlag_ico', 1);}
$smarty->assign('erfassen_eingabe_nutzen', $_SESSION["erfassen_eingabe_nutzen"]);
if($_SESSION["erfassen_eingabe_nutzen"] == ""){$smarty->assign('erfassen_eingabe_nutzen_ico', 1);}
if($_SESSION["erfassen_eingabe_einwilligung_public"] == 'Y'){
$smarty->assign('erfassen_eingabe_einwilligung_public', $_SESSION["erfassen_eingabe_einwilligung_public"]);
}
}
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$id'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3[status];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
if($row3['sid'] == '7' OR $row3['sid'] == '8'){
$info = '1';
}else{
$info = '0';
}
array_push($table_data3, array(
'datum1' => $row3[datum1],
'info' => $info,
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'save'){
$id = $_SESSION["bearbeiten_id"];
/*
Ändert sich der Hinweis --> Eintrag in Verlauf
Ändert sich Kategorie --> Eintrag in Verlauf
*/
$edit_hinweis_admin = htmlclean($_POST['edit_hinweis_admin']);
$edit_kategorie = $_POST['edit_kategorie'];
$result = $db->query("SELECT kategorie, hinweis_admin
FROM imt_vorschlag
WHERE vid = '$id'");
$row = $result->fetch_array();
if($row[kategorie] != $edit_kategorie){
$result1 = $db->query("SELECT kategorie
FROM imt_kategorie
WHERE kid = '$edit_kategorie'");
$row1 = $result1->fetch_array();
$sql = $db->query("UPDATE imt_vorschlag SET kategorie='$edit_kategorie' WHERE vid='$id'");
if($sql){
verlauf($uid, $id, "Kategorie wurde neu gesetzt: $row1[kategorie]", 101, '');
}
}
if($row[hinweis_admin] != $edit_hinweis_admin){
$sql = $db->query("UPDATE imt_vorschlag SET hinweis_admin='$edit_hinweis_admin' WHERE vid='$id'");
if($sql){
#verlauf($uid, $id, 'Adminhinweis wurde ge&auml;ndert', 102, '');
$query_ga = $db->query("SELECT uid, a.imtuid, passwort, vorname, nachname, betreff
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid='$id'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_ga = $query_ga->fetch_array();
$empfaenger = "$row_ga[imtuid]";
$betreff = "Hinweis des Administrators zu Vorschlag $id";
$text = "
<html>
<head>
<title>Hinweis des Administrators</title>
</head>
<body>
<font face='Arial' size='2'>
Guten Tag $row_ga[vorname] $row_ga[nachname]!
<br /><br />
Im Rahmen des Ideenmanagements ist ein Hinweis des Administrators eingegangen.
<br />
<br />
<table>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Vorschlag:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$row_ga[betreff]
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>ID:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$id
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Hinweis:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$edit_hinweis_admin
</font>
</td>
</tr>
</table>
<br />
Um den Hinweis zu kommentieren melden Sie sich bitte am System an und w&auml;hlen den Vorschlag im Erfassungsbereich unter Status aus, um
einen Hinweis zu erfassen!
<br>
Link zum System: <a href='http://www.hs-ludwigsburg.de/kurs/ideenmanagement'>Ideenmanagement</a>
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
mail_einstell($id, $uid, $empfaenger, NULL, NULL, $betreff, $text, 102, NULL);
}
}
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."\">";
}
if($action == 'ablehnung2'){
$id = $_SESSION["bearbeiten_id"];
$aend_dat = date("Y-m-d H:i:s");
$abschluss_bemerkung = $_POST["edit_ablehnung_bemerkung"];
$db = dbconnect();
$sql1 = $db->query("INSERT INTO imt_vorschlag_ende ( erfass_dat
, vid
, annahme
, annahme_bemerkung
)
VALUES
( '$aend_dat'
, '$id'
, 'N'
, '$abschluss_bemerkung'
)
");
verlauf($uid, $id, 'Vorschlag wurde ausgeschlossen', '8', $aend_dat);
$query_ga = $db->query("SELECT uid, a.imtuid, passwort, vorname, nachname, betreff
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid='$id'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_ga = $query_ga->fetch_array();
$query_entscheidung = $db->query("SELECT annahme, annahme_bemerkung
FROM imt_vorschlag_ende
WHERE vid='$id'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_entscheidung = $query_entscheidung->fetch_array();
if($row_entscheidung[annahme] == 'J'){
$entscheidung = 'angenommen';
}else{
$entscheidung = 'abgelehnt';
}
$empfaenger = "$row_ga[imtuid]";
$betreff = "Entscheidung Vorschlag $id";
$text = "
<html>
<head>
<title>Entscheidung Vorschlag</title>
</head>
<body>
<font face='Arial' size='2'>
Guten Tag $row_ga[vorname] $row_ga[nachname]!
<br /><br />
Im Rahmen des Ideenmanagements ist ein Verbesserungsvorschlag eingegangen.
Ihr Vorschlag wurde wie folgt entschieden:
<br />
<br />
<table>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Vorschlag:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$row_ga[betreff]
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>ID:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$id
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Entscheidung:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$entscheidung
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Bemerkung:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$row_entscheidung[annahme_bemerkung]
</font>
</td>
</tr>
</table>
<br />
Bei Fragen wenden Sie sich bitte an den <a href=\"mailto:$global_service_mail?subject=Frage zu ID: $id\">Qualit&auml;tsmanagementbeauftragten.</a>
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
mail_einstell($id, $uid, $empfaenger, NULL, NULL, $betreff, $text, 110, NULL);
echo "<meta http-equiv=\"refresh\" content=\"2; URL=".$_SERVER['PHP_SELF']."?\">";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

116
edit_administratoren.php Executable file
View File

@ -0,0 +1,116 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_mail_einstell.php");
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
$status = $_SESSION["status_id"];
if($action == ''){
# Verfügbare Administratoren
$query1 = "SELECT imtuid, vorname, nachname
FROM imt_user
WHERE imtuid not in (select imtuid from imt_rollen_user_zuord where roid in(1))
";
$result1 = $db->query ($query1)
or die ("Cannot execute query1");
$table_data1 = array();
while ($row1 = $result1->fetch_array()){
array_push($table_data1, array(
'imtuid' => $row1['imtuid'],
'vorname' => $row1['vorname'],
'nachname' => $row1['nachname']
)
);
}
$smarty->assign('table_data1', $table_data1);
# Alle Administratoren
$query2 = "SELECT a.imtuid, vorname, nachname
FROM imt_user a, imt_rollen_user_zuord b
WHERE a.imtuid=b.imtuid
AND b.roid=1";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$table_data2 = array();
while ($row2 = $result2->fetch_array()){
array_push($table_data2, array(
'imtuid' => $row2['imtuid'],
'vorname' => $row2['vorname'],
'nachname' => $row2['nachname']
)
);
}
$smarty->assign('table_data2', $table_data2);
}
if($action == 'step2'){
# Ausschussmitglied bzw Vertreter, je nachdem ob Häkchen gesetzt wurde
if(isset($_POST["mitglied"])){
$mitglied = $_POST["mitglied"];
}
# Wenn ein Mitglied ausgewählt wurde
if(isset($mitglied)){
$db = dbconnect();
$sql1 = $db->query("INSERT INTO imt_rollen_user_zuord ( roid
, imtuid
)
VALUES
( '1'
, '$mitglied'
)
");
}
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."\">";
}
if($action == 'step3'){
$rolle = $_GET['rolle'];
$imtuid = $_GET['imtuid'];
# Wenn ein Ausschussmitglied gelöscht wird
# Dann auch den Vertreter
if($rolle == 1){
$db = dbconnect();
$del1 = $db->query("DELETE FROM imt_rollen_user_zuord WHERE imtuid = $imtuid AND roid=1");
}
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."\">";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

286
edit_ausschussmitglieder.php Executable file
View File

@ -0,0 +1,286 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_mail_einstell.php");
$action = $_GET['action'];
if(isset($_GET['id'])){
$_SESSION["status_id"] = $_GET['id'];
}
$status = $_SESSION["status_id"];
if($action == ''){
# Verfügbare Ausschussmitglieder
$query1 = "SELECT imtuid, vorname, nachname
FROM imt_user
WHERE imtuid not in (select imtuid from imt_rollen_user_zuord where roid in(4,5))
";
$result1 = $db->query ($query1)
or die ("Cannot execute query1");
$table_data1 = array();
while ($row1 = $result1->fetch_array()){
array_push($table_data1, array(
'imtuid' => $row1['imtuid'],
'vorname' => $row1['vorname'],
'nachname' => $row1['nachname']
)
);
}
$smarty->assign('table_data1', $table_data1);
# Ausschussmitglieder, die noch nicht vertreten werden
$query2a = "SELECT a.imtuid, vorname, nachname
FROM imt_user a, imt_rollen_user_zuord b
WHERE a.imtuid=b.imtuid
AND b.roid=4
AND a.imtuid not in (SELECT imtuid_mitglied FROM imt_ausschuss_vertreter)";
$result2a = $db->query ($query2a)
or die ("Cannot execute query2a");
$table_data2a = array();
while ($row2a = $result2a->fetch_array()){
array_push($table_data2a, array(
'imtuid' => $row2a['imtuid'],
'vorname' => $row2a['vorname'],
'nachname' => $row2a['nachname']
)
);
}
$smarty->assign('table_data2a', $table_data2a);
# Alle Ausschussmitglieder
$query2b = "SELECT a.imtuid, vorname, nachname
FROM imt_user a, imt_rollen_user_zuord b
WHERE a.imtuid=b.imtuid
AND b.roid=4";
$result2b = $db->query ($query2b)
or die ("Cannot execute query2b");
$table_data2b = array();
while ($row2b = $result2b->fetch_array()){
array_push($table_data2b, array(
'imtuid' => $row2b['imtuid'],
'vorname' => $row2b['vorname'],
'nachname' => $row2b['nachname']
)
);
}
$smarty->assign('table_data2b', $table_data2b);
# Ausschussmitglieder welche vertreten werdne
$query3 = "SELECT a.imtuid, vorname, nachname
FROM imt_user a, imt_rollen_user_zuord b
WHERE a.imtuid=b.imtuid
AND b.roid=5";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
while ($row3 = $result3->fetch_array()){
$result_vervon = $db->query("SELECT imtuid, vorname, nachname
FROM imt_user a, imt_ausschuss_vertreter b
WHERE a.imtuid = b.imtuid_mitglied
AND imtuid_vertreter=$row3[imtuid]
");
$row_vervon = $result_vervon->fetch_array();
array_push($table_data3, array(
'imtuid' => $row3['imtuid'],
'vorname' => $row3['vorname'],
'nachname' => $row3['nachname'],
'ver_von_vorname' => $row_vervon['vorname'],
'ver_von_nachname' => $row_vervon['nachname']
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'step2'){
# Ausschussmitglied bzw Vertreter, je nachdem ob Häkchen gesetzt wurde
if(isset($_POST["mitglied"])){
$mitglied = $_POST["mitglied"];
}
# Häkchen, dann Vertreter des Ausschussmitglied
if(isset($_POST["vertreter"])){
$vertreter = $_POST["vertreter"];
}
# Bei Häkchen, wen vertritt der Vertreter
if(isset($_POST["vertreten_von"])){
$vertreten_von = $_POST["vertreten_von"];
}
# Wenn ein Mitglied ausgewählt wurde
if(isset($mitglied)){
# Wenn es sich nicht um einen Vertreter handelt
if(!isset($vertreter)){
$db = dbconnect();
$sql1 = $db->query("INSERT INTO imt_rollen_user_zuord ( roid
, imtuid
)
VALUES
( '4'
, '$mitglied'
)
");
# Mail an neues Ausschussmitglied
$empfaenger = "$mitglied";
$betreff = "Benennung zum Ausschussmitglied";
$text = "
<html>
<head>
<title>Benennung zum Ausschussmitglied</title>
</head>
<body>
<font face='Arial' size='2'>
Sehr geehrte Damend und Herren,
<br /><br />
Sie wurden im Ideenmanagement-System zum Mitglied im Ausschuss/Idee benannt.
<br />
Sie k&ouml;nnen sich hier anmelden: http://www.hs-ludwigsburg.de/idee
<br />
<br />
Bei Fragen wenden Sie sich bitte an den <a href=\"mailto:$global_service_mail?subject=Bestellung zum Ausschussmitglied\">Qualit&auml;tsmanagementbeauftragten.</a>
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
# VorschlagsID vid, Admin, an, cc, bcc, betreff, body, status, verlauf_status, verlauf_body
mail_einstell(0, $uid, $empfaenger, NULL, NULL, $betreff, $text, 0, NULL);
}
# Wenn es sich um einen Vertreter handelt und noch nicht alle Ausschussmitglieder vertreten sind
if(isset($vertreter) AND $vertreten_von != ''){
$sql2 = $db->query("INSERT INTO imt_rollen_user_zuord ( roid
, imtuid
)
VALUES
( '5'
, '$mitglied'
)
");
$sql3 = $db->query("INSERT INTO imt_ausschuss_vertreter ( imtuid_mitglied
, imtuid_vertreter
)
VALUES
( '$vertreten_von'
, '$mitglied'
)
");
$result_vervon = $db->query("SELECT vorname, nachname
FROM imt_user
WHERE imtuid=$vertreten_von
");
$row_vervon = $result_vervon->fetch_array();
# Mail an neues Ausschussmitglied
$empfaenger = "$mitglied";
$betreff = "Benennung zur Vertretung eines Ausschussmitglieds";
$text = "
<html>
<head>
<title>Benennung zur Vertretung eines Ausschussmitglieds</title>
</head>
<body>
<font face='Arial' size='2'>
Sehr geehrte Damend und Herren,
<br /><br />
Sie wurden im Ideenmanagement-System zur Vertretung des Mitglieds $row_vervon[vorname] $row_vervon[nachname] im Ausschuss/Idee benannt.
<br />
Sie k&ouml;nnen sich hier anmelden: http://www.hs-ludwigsburg.de/idee
<br />
<br />
Bei Fragen wenden Sie sich bitte an den <a href=\"mailto:$global_service_mail?subject=Bestellung zum Ausschussmitglied\">Qualit&auml;tsmanagementbeauftragten.</a>
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
# VorschlagsID vid, Admin, an, cc, bcc, betreff, body, status, verlauf_status, verlauf_body
mail_einstell(0, $uid, $empfaenger, NULL, NULL, $betreff, $text, 0, NULL);
}
}
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."\">";
}
if($action == 'step3'){
$rolle = $_GET['rolle'];
$imtuid = $_GET['imtuid'];
# Wenn ein Ausschussmitglied gelöscht wird
# Dann auch den Vertreter
if($rolle == 4){
$db = dbconnect();
#Vertreter bestimmen
$result_vervon = $db->query("SELECT imtuid_vertreter
FROM imt_ausschuss_vertreter
WHERE imtuid_mitglied=$imtuid
");
$row_vervon = $result_vervon->fetch_array();
$del2 = $db->query("DELETE FROM imt_ausschuss_vertreter WHERE imtuid_vertreter = $row_vervon[imtuid_vertreter] AND imtuid_mitglied=$imtuid");
$del1 = $db->query("DELETE FROM imt_rollen_user_zuord WHERE imtuid = $row_vervon[imtuid_vertreter] AND roid=5");
$del3 = $db->query("DELETE FROM imt_rollen_user_zuord WHERE imtuid = $imtuid AND roid=4");
}
# Wenn ein Vertreter gelöscht wird
if($rolle == 5){
$db = dbconnect();
$del4 = $db->query("DELETE FROM imt_ausschuss_vertreter WHERE imtuid_vertreter = $imtuid");
$del5 = $db->query("DELETE FROM imt_rollen_user_zuord WHERE imtuid = $imtuid AND roid=5");
}
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."\">";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

10
eingabe_frame.php Executable file
View File

@ -0,0 +1,10 @@
<?php
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
#$template = "standard";
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
$smarty->display("$template/$templatename");
?>

254
erfassen_eingabe.php Executable file
View File

@ -0,0 +1,254 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
require_once("func_mail_einstell.php");
$action = $_GET['action'];
if($action == ''){
# Variable erfassen_eingabe_vid leer setzen, damit wird Doppelspeicherung unten beim Insert verhindert
$_SESSION["erfassen_eingabe_vid"] = "";
if($_GET['error'] == 1){
$smarty->assign('erfassen_eingabe_pflichtfelder', "1");
$smarty->assign('erfassen_eingabe_betreff', $_SESSION["erfassen_eingabe_betreff"]);
if($_SESSION["erfassen_eingabe_betreff"] == ""){$smarty->assign('erfassen_eingabe_betreff_ico', 1);}
$smarty->assign('erfassen_eingabe_beschreibung', $_SESSION["erfassen_eingabe_beschreibung"]);
if($_SESSION["erfassen_eingabe_beschreibung"] == ""){$smarty->assign('erfassen_eingabe_beschreibung_ico', 1);}
$smarty->assign('erfassen_eingabe_vorschlag', $_SESSION["erfassen_eingabe_vorschlag"]);
if($_SESSION["erfassen_eingabe_vorschlag"] == ""){$smarty->assign('erfassen_eingabe_vorschlag_ico', 1);}
$smarty->assign('erfassen_eingabe_nutzen', $_SESSION["erfassen_eingabe_nutzen"]);
if($_SESSION["erfassen_eingabe_nutzen"] == ""){$smarty->assign('erfassen_eingabe_nutzen_ico', 1);}
if($_SESSION["erfassen_eingabe_einwilligung_public"] == 'Y'){
$smarty->assign('erfassen_eingabe_einwilligung_public', $_SESSION["erfassen_eingabe_einwilligung_public"]);
}
}
$db = dbconnect();
$result = $db->query("SELECT vorname, nachname, mail, beziehung FROM imt_user WHERE imtuid = '$uid'");
$row = $result->fetch_array();
$smarty->assign('erfassen_eingabe_vorname', $row['vorname']);
$smarty->assign('erfassen_eingabe_nachname', $row['nachname']);
$smarty->assign('erfassen_eingabe_mail', "$row[mail]");
switch ($row[beziehung])
{
case "P":
$beziehung = "ProfessorIn";
break;
case "L":
$beziehung = "Lehrbeauftragte/r";
break;
case "E":
$beziehung = "Externe/r";
break;
case "S":
$beziehung = "StudentIn";
break;
case "V":
$beziehung = "Verwaltungsmitarbeiter";
break;
default:
$beziehung = "$row[beziehung]";
}
$smarty->assign('erfassen_eingabe_beziehung', $beziehung);
}
if($action == 'save'){
$sid = session_id();
$betreff = $_POST['betreff'];
$betreff = str_replace (array("ä", "ö", "ü", "ß", "Ä", "Ö", "Ü"), array("&auml;", "&ouml;", "&uuml;", "&szlig;", "&Auml;", "&Ouml;", "&Uuml;"), $betreff);
$beschreibung = htmlclean($_POST['beschreibung']);
$vorschlag = htmlclean($_POST['vorschlag']);
$nutzen = htmlclean($_POST['nutzen']);
$einwilligung_public = $_POST['einwilligung_public'];
if($betreff == "" OR $beschreibung == "" OR $nutzen == "" OR $vorschlag == ""){
$_SESSION["erfassen_eingabe_betreff"] = "$betreff";
$_SESSION["erfassen_eingabe_beschreibung"] = "$beschreibung";
$_SESSION["erfassen_eingabe_vorschlag"] = "$vorschlag";
$_SESSION["erfassen_eingabe_nutzen"] = "$nutzen";
$_SESSION["erfassen_eingabe_einwilligung_public"] = "$einwilligung_public";
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?error=1\">";
}else{
if($einwilligung_public != 'Y'){
$einwilligung_public = 'N';
}
$aend_dat = date("Y-m-d H:i:s");
if($_SESSION["erfassen_eingabe_vid"] == ""){ // Doppelspeicherung verhindern, wird oben auf "" gesetzt
$db = dbconnect();
$sql1 = $db->query("INSERT INTO imt_vorschlag (imtuid, betreff, beschreibung, vorschlag, nutzen, public, erfass_dat)
VALUES ('$uid', '$betreff', '$beschreibung', '$vorschlag', '$nutzen', '$einwilligung_public', '$aend_dat')");
$vid = $db->insert_id;
$sql2 = $db->query("INSERT INTO imt_gruppenmitglieder (vid, name, mail)
SELECT $vid, name, mail FROM imt_gruppenmitglieder_temp WHERE session='$sid' AND imtuid='$_SESSION[global_uid]' ORDER BY name ASC
");
if($sql2){
$sql3 = $db->query("DELETE FROM imt_gruppenmitglieder_temp WHERE session='$sid' AND imtuid='$_SESSION[global_uid]'");
}
}
if($sql1 AND $sql2 AND $sql3){
$_SESSION["erfassen_eingabe_vid"] = "$vid";
$empfaenger = "$global_service_uid";
$betreff1 = "Neuer Vorschlag im Ideenmanagement";
$text = "
<html>
<head>
<title>Neuer Vorschlag im Ideenmanagement</title>
</head>
<body>
<font face='Arial' size='2'>
Guten Tag $global_service_admin!
<br /><br />
Im Rahmen des Ideenmanagements ist ein Verbesserungsvorschlag eingegangen.
Nachfolgend finden Sie die Daten des Vorschlags:
<br />
<br />
<table>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>ID:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$vid
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Betreff:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$betreff
</font>
</td>
</tr>
</table>
<br />
Klicken Sie hier um zum <a href='http://www.hs-ludwigsburg.de/kurs/ideenmanagement'>Ideenmanagement</a> zu gelangen.
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
mail_einstell($vid, $uid, $empfaenger, NULL, NULL, $betreff, $text, 1, NULL);
$result_name = $db->query("SELECT vorname, nachname FROM imt_user WHERE imtuid = '$uid'");
$row_name = $result_name->fetch_array();
$empfaenger = "$uid";
$betreff1 = "Neuer Vorschlag im Ideenmanagement";
$text = "
<html>
<head>
<title>Neuer Vorschlag im Ideenmanagement</title>
</head>
<body>
<font face='Arial' size='2'>
Guten Tag $row_name[vorname] $row_name[nachname]!
<br /><br />
Im Rahmen des Ideenmanagements ist ein Verbesserungsvorschlag eingegangen.
Nachfolgend finden Sie die Daten des Vorschlags:
<br />
<br />
<table>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>ID:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$vid
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Betreff:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$betreff
</font>
</td>
</tr>
</table>
<br />
Klicken Sie hier um zum <a href='http://www.hs-ludwigsburg.de/kurs/ideenmanagement'>Ideenmanagement</a> zu gelangen.
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
mail_einstell($vid, $uid, $empfaenger, NULL, NULL, $betreff, $text, NULL, NULL);
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?action=save1\">";
}else{
echo "Es trat ein Fehler auf";
}
}
}
if($action == 'save1'){
$smarty->assign('erfassen_eingabe_id', $_SESSION["erfassen_eingabe_vid"]);
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

308
erfassen_status.php Executable file
View File

@ -0,0 +1,308 @@
<?php
# Fuer debugging
#error_reporting(E_ALL);
#ini_set('display_errors', 1);
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_mail_einstell.php");
require_once("func_verlauf.php");
require_once("func_htmlclean.php");
if(isset($_GET['id'])){
$_SESSION["edit_id"] = $_GET['id'];
$search_prefix = 'erfassen_status_';
$search_len = strlen($search_prefix);
foreach( $_SESSION as $key => $value){
if ( substr( $key, 0, $search_len) == $search_prefix) {
unset( $_SESSION[$key]);
}
}
}
$action = $_GET['action'];
if($action == ''){
$query1 = "SELECT vid, betreff, date_format(erfass_dat, '%d.%m.%Y') erfass_dat1
FROM imt_vorschlag
WHERE imtuid='$uid'
ORDER BY erfass_dat DESC";
$result1 = $db->query ($query1)
or die ("Cannot execute query");
$table_data1 = array();
while ($row1 = $result1->fetch_array()){
array_push($table_data1, array(
'vid' => $row1['vid'],
'betreff' => $row1['betreff'],
'erfass_dat1' => $row1['erfass_dat1']
)
);
}
$smarty->assign('table_data1', $table_data1);
}
if($action == 'status1'){
$vid = $_POST['vid'];
if($vid == ''){
$vid = $_GET['vid'];
}
$result_vorh = $db->query("SELECT count(*) Anz
FROM imt_vorschlag
WHERE vid=$vid
AND imtuid='$uid'");
$row_vorh = $result_vorh->fetch_array();
if($row_vorh['Anz'] == 0){
$smarty->assign('bearbeiten_err', "1");
}else{
$smarty->assign('bearbeiten_err', "0");
}
$_SESSION["erfassen_status_vid"] = $vid;
$result = $db->query("SELECT betreff, beschreibung, vorschlag, nutzen, public, kategorie, hinweis_eigen, hinweis_admin, vorname, nachname, mail, beziehung
FROM imt_vorschlag a, imt_user b
WHERE a.imtuid=b.imtuid
AND a.vid=$vid");
$row = $result->fetch_array();
$result1 = $db->query("SELECT kategorie
FROM imt_kategorie
WHERE kid='$row[kategorie]'");
$row1 = $result1->fetch_array();
switch ($row['beziehung'])
{
case "P":
$beziehung = "ProfessorIn";
break;
case "L":
$beziehung = "Lehrbeauftragte/r";
break;
case "E":
$beziehung = "Externe/r";
break;
case "S":
$beziehung = "StudentIn";
break;
case "V":
$beziehung = "Verwaltungsmitarbeiter";
break;
default:
$beziehung = "$row[beziehung]";
}
if($row['public'] =='Y'){
$public = "Ja";
}else{
$public = "Nein";
}
$smarty->assign('erfassen_status_vid', "$vid");
$smarty->assign('erfassen_status_betreff', "$row[betreff]");
$smarty->assign('erfassen_status_beschreibung', "$row[beschreibung]");
$smarty->assign('erfassen_status_vorschlag', "$row[vorschlag]");
$smarty->assign('erfassen_status_nutzen', "$row[nutzen]");
$smarty->assign('erfassen_status_hinweis_eigen', "$row[hinweis_eigen]");
$smarty->assign('erfassen_status_hinweis_admin', "$row[hinweis_admin]");
$smarty->assign('erfassen_status_vorname', "$row[vorname]");
$smarty->assign('erfassen_status_nachname', "$row[nachname]");
$smarty->assign('erfassen_status_mail', "$row[mail]");
$smarty->assign('erfassen_status_kategorie', "$row1[kategorie]");
$smarty->assign('erfassen_status_beziehung', "$beziehung");
$smarty->assign('erfassen_status_public', "$public");
$query2 = "SELECT name
FROM imt_gruppenmitglieder
WHERE vid='$vid'
ORDER BY name";
$result2 = $db->query ($query2)
or die ("Cannot execute query2");
$table_data2 = array();
while ($row2 = $result2->fetch_array()){
array_push($table_data2, array(
'name' => $row2[name]
)
);
}
$smarty->assign('table_data2', $table_data2);
# Statis
$query3 = "SELECT date_format(datum, '%d.%m.%Y - %H:%i Uhr') datum1,b.sid, b.status, verlauf
FROM imt_verlauf a, imt_stati b
WHERE a.status = b.sid
AND a.status != 0
AND a.vid='$vid'
ORDER BY datum DESC";
$result3 = $db->query ($query3)
or die ("Cannot execute query3");
$table_data3 = array();
$verlauf_dup = array("");
while ($row3 = $result3->fetch_array()){
$status = $row3['status'];
if($row3['sid'] == '103'){
# Da jedes Ausschussmitglied informiert wird, reicht es aus, wenn bei den Statusdetails nur ein Hinweis pro Gutachter genannt wird, nicht 5x pro Person
# Bei der Meldung "Ausschuss (Bernd Fuchsi) &uuml;ber Gutachter Wolf Wursti informiert. Frist: 25.06.2011" wird der Gutachter "Wolf Wursti"
# ausgeschnitten und in ein Array gepackt. Wird der gleiche Gutachter mit dem Status 103 nochamls durchgeschleift, wird in den else Bereich verwiesen
# Im Template werden nur die Statis angezeigt die != "" sind
$pos1 = strpos ($row3[verlauf], 'Gutachter')+9;
$status_103 = trim(substr($row3[verlauf], $pos1));
$pos2 = strpos ($status_103, 'informiert')-1;
$status = trim(substr($status_103, 0,$pos2));
if (!in_array($status, $verlauf_dup)) {
$verlauf_dup[] = "$status";
$status = $row3[status];
}else{
$status = "";
}
}
if($row3['sid'] == '7' OR $row3['sid'] == '8'){
$info = '1';
}else{
$info = '0';
}
array_push($table_data3, array(
'datum1' => $row3['datum1'],
'info' => $info,
'status' => $status
)
);
}
$smarty->assign('table_data3', $table_data3);
}
if($action == 'status2'){
$vid = $_SESSION["erfassen_status_vid"];
$edit_hinweis_eigen = htmlclean($_POST['erfassen_status_hinweis_eigen']);
$result = $db->query("SELECT hinweis_eigen
FROM imt_vorschlag
WHERE vid = '$vid'");
$row = $result->fetch_array();
if($row['hinweis_eigen'] != $edit_hinweis_eigen){
$sql = $db->query("UPDATE imt_vorschlag SET hinweis_eigen='$edit_hinweis_eigen' WHERE vid='$vid'");
if($sql){
#verlauf($uid, $vid, 'Hinweis des Erfassers', 104, '');
$query_ga = $db->query("SELECT uid, a.imtuid, passwort, vorname, nachname, betreff
FROM imt_user a, imt_vorschlag b
WHERE a.imtuid=b.imtuid
AND b.vid='$vid'") or die(mysql_error()); // Change users to the database where you keep your usernames, and likewise with username
$row_ga = $query_ga->fetch_array();
$empfaenger = "$global_service_admin_uid";
$betreff = "Hinweis des Erfassers zu Vorschlag $vid";
$text = "
<html>
<head>
<title>Hinweis des Erfassers</title>
</head>
<body>
<font face='Arial' size='2'>
Guten Tag $global_service_admin!
<br /><br />
Im Rahmen des Ideenmanagements ist ein Hinweis des Erfassers eingegangen.
<br />
<br />
<table>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Vorschlag:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$row_ga[betreff]
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>ID:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$vid
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Hinweis:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
$edit_hinweis_eigen
</font>
</td>
</tr>
</table>
<br />
Um den Hinweis zu kommentieren, melden Sie sich bitte im System an und w&auml;hlen den betroffenen Vorschlag im Adminbereich. Nach Auswahl des Vorschlages kann ein Adminhinweis in der &Uuml;bersicht erfasst werden.
<br>
Link zum System: <a href='http://www.hs-ludwigsburg.de/kurs/ideenmanagement'>Ideenmanagement</a>
<p>
Diese Mail wurde automatisch generiert!<br />
Antworten Sie daher nicht auf diese Mail.<br />
<br />
Vielen Dank!
</body>
</html>";
mail_einstell($vid, $uid, $empfaenger, NULL, NULL, $betreff, $text, 104, NULL);
}
}
echo "<meta http-equiv=\"refresh\" content=\"2; URL=".$_SERVER['PHP_SELF']."?action=status1&vid=$vid\">";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

BIN
fancybox/blank.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

BIN
fancybox/fancy_close.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
fancybox/fancy_loading.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
fancybox/fancy_nav_left.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
fancybox/fancy_nav_right.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
fancybox/fancy_shadow_e.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

BIN
fancybox/fancy_shadow_n.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

BIN
fancybox/fancy_shadow_ne.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

BIN
fancybox/fancy_shadow_nw.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

BIN
fancybox/fancy_shadow_s.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

BIN
fancybox/fancy_shadow_se.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
fancybox/fancy_shadow_sw.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

BIN
fancybox/fancy_shadow_w.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

BIN
fancybox/fancy_title_left.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

BIN
fancybox/fancy_title_main.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

BIN
fancybox/fancy_title_over.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

BIN
fancybox/fancy_title_right.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

BIN
fancybox/fancybox-x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

BIN
fancybox/fancybox-y.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

BIN
fancybox/fancybox.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

16
fancybox/jquery-1.5.1.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,72 @@
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
/*
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

View File

@ -0,0 +1,359 @@
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
width: 40px;
height: 40px;
margin-top: -20px;
margin-left: -20px;
cursor: pointer;
overflow: hidden;
z-index: 1104;
display: none;
}
#fancybox-loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background-image: url('fancybox.png');
}
#fancybox-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 1100;
display: none;
}
#fancybox-tmp {
padding: 0;
margin: 0;
border: 0;
overflow: auto;
display: none;
}
#fancybox-wrap {
position: absolute;
top: 0;
left: 0;
padding: 20px;
z-index: 1101;
outline: none;
display: none;
}
#fancybox-outer {
position: relative;
width: 100%;
height: 100%;
background: #fff;
}
#fancybox-content {
width: 0;
height: 0;
padding: 0;
outline: none;
position: relative;
overflow: hidden;
z-index: 1102;
border: 0px solid #fff;
}
#fancybox-hide-sel-frame {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
z-index: 1101;
}
#fancybox-close {
position: absolute;
top: -15px;
right: -15px;
width: 30px;
height: 30px;
background: transparent url('fancybox.png') -40px 0px;
cursor: pointer;
z-index: 1103;
display: none;
}
#fancybox-error {
color: #444;
font: normal 12px/20px Arial;
padding: 14px;
margin: 0;
}
#fancybox-img {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: none;
outline: none;
line-height: 0;
vertical-align: top;
}
#fancybox-frame {
width: 100%;
height: 100%;
border: none;
display: block;
}
#fancybox-left, #fancybox-right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
outline: none;
background: transparent url('blank.gif');
z-index: 1102;
display: none;
}
#fancybox-left {
left: 0px;
}
#fancybox-right {
right: 0px;
}
#fancybox-left-ico, #fancybox-right-ico {
position: absolute;
top: 50%;
left: -9999px;
width: 30px;
height: 30px;
margin-top: -15px;
cursor: pointer;
z-index: 1102;
display: block;
}
#fancybox-left-ico {
background-image: url('fancybox.png');
background-position: -40px -30px;
}
#fancybox-right-ico {
background-image: url('fancybox.png');
background-position: -40px -60px;
}
#fancybox-left:hover, #fancybox-right:hover {
visibility: visible; /* IE6 */
}
#fancybox-left:hover span {
left: 20px;
}
#fancybox-right:hover span {
left: auto;
right: 20px;
}
.fancybox-bg {
position: absolute;
padding: 0;
margin: 0;
border: 0;
width: 20px;
height: 20px;
z-index: 1001;
}
#fancybox-bg-n {
top: -20px;
left: 0;
width: 100%;
background-image: url('fancybox-x.png');
}
#fancybox-bg-ne {
top: -20px;
right: -20px;
background-image: url('fancybox.png');
background-position: -40px -162px;
}
#fancybox-bg-e {
top: 0;
right: -20px;
height: 100%;
background-image: url('fancybox-y.png');
background-position: -20px 0px;
}
#fancybox-bg-se {
bottom: -20px;
right: -20px;
background-image: url('fancybox.png');
background-position: -40px -182px;
}
#fancybox-bg-s {
bottom: -20px;
left: 0;
width: 100%;
background-image: url('fancybox-x.png');
background-position: 0px -20px;
}
#fancybox-bg-sw {
bottom: -20px;
left: -20px;
background-image: url('fancybox.png');
background-position: -40px -142px;
}
#fancybox-bg-w {
top: 0;
left: -20px;
height: 100%;
background-image: url('fancybox-y.png');
}
#fancybox-bg-nw {
top: -20px;
left: -20px;
background-image: url('fancybox.png');
background-position: -40px -122px;
}
#fancybox-title {
font-family: Helvetica;
font-size: 12px;
z-index: 1102;
}
.fancybox-title-inside {
padding-bottom: 10px;
text-align: center;
color: #333;
background: #fff;
position: relative;
}
.fancybox-title-outside {
padding-top: 10px;
color: #fff;
}
.fancybox-title-over {
position: absolute;
bottom: 0;
left: 0;
color: #FFF;
text-align: left;
}
#fancybox-title-over {
padding: 10px;
background-image: url('fancy_title_over.png');
display: block;
}
.fancybox-title-float {
position: absolute;
left: 0;
bottom: -20px;
height: 32px;
}
#fancybox-title-float-wrap {
border: none;
border-collapse: collapse;
width: auto;
}
#fancybox-title-float-wrap td {
border: none;
white-space: nowrap;
}
#fancybox-title-float-left {
padding: 0 0 0 15px;
background: url('fancybox.png') -40px -90px no-repeat;
}
#fancybox-title-float-main {
color: #FFF;
line-height: 29px;
font-weight: bold;
padding: 0 0 3px 0;
background: url('fancybox-x.png') 0px -40px;
}
#fancybox-title-float-right {
padding: 0 0 0 15px;
background: url('fancybox.png') -55px -90px no-repeat;
}
/* IE6 */
.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
height: expression(this.parentNode.clientHeight + "px");
}
#fancybox-loading.fancybox-ie6 {
position: absolute; margin-top: 0;
top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
}
#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
/* IE6, IE7, IE8 */
.fancybox-ie .fancybox-bg { background: transparent !important; }
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }

1156
fancybox/jquery.fancybox-1.3.4.js Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 - 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);

250
fancybox/jquery.livequery.js Executable file
View File

@ -0,0 +1,250 @@
/*! Copyright (c) 2008 Brandon Aaron (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.
*
* Version: 1.0.3
* Requires jQuery 1.1.3+
* Docs: http://docs.jquery.com/Plugins/livequery
*/
(function($) {
$.extend($.fn, {
livequery: function(type, fn, fn2) {
var self = this, q;
// Handle different call patterns
if ($.isFunction(type))
fn2 = fn, fn = type, type = undefined;
// See if Live Query already exists
$.each( $.livequery.queries, function(i, query) {
if ( self.selector == query.selector && self.context == query.context &&
type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) )
// Found the query, exit the each loop
return (q = query) && false;
});
// Create new Live Query if it wasn't found
q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
// Make sure it is running
q.stopped = false;
// Run it immediately for the first time
q.run();
// Contnue the chain
return this;
},
expire: function(type, fn, fn2) {
var self = this;
// Handle different call patterns
if ($.isFunction(type))
fn2 = fn, fn = type, type = undefined;
// Find the Live Query based on arguments and stop it
$.each( $.livequery.queries, function(i, query) {
if ( self.selector == query.selector && self.context == query.context &&
(!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
$.livequery.stop(query.id);
});
// Continue the chain
return this;
}
});
$.livequery = function(selector, context, type, fn, fn2) {
this.selector = selector;
this.context = context || document;
this.type = type;
this.fn = fn;
this.fn2 = fn2;
this.elements = [];
this.stopped = false;
// The id is the index of the Live Query in $.livequery.queries
this.id = $.livequery.queries.push(this)-1;
// Mark the functions for matching later on
fn.$lqguid = fn.$lqguid || $.livequery.guid++;
if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
// Return the Live Query
return this;
};
$.livequery.prototype = {
stop: function() {
var query = this;
if ( this.type )
// Unbind all bound events
this.elements.unbind(this.type, this.fn);
else if (this.fn2)
// Call the second function for all matched elements
this.elements.each(function(i, el) {
query.fn2.apply(el);
});
// Clear out matched elements
this.elements = [];
// Stop the Live Query from running until restarted
this.stopped = true;
},
run: function() {
// Short-circuit if stopped
if ( this.stopped ) return;
var query = this;
var oEls = this.elements,
els = $(this.selector, this.context),
nEls = els.not(oEls);
// Set elements to the latest set of matched elements
this.elements = els;
if (this.type) {
// Bind events to newly matched elements
nEls.bind(this.type, this.fn);
// Unbind events to elements no longer matched
if (oEls.length > 0)
$.each(oEls, function(i, el) {
if ( $.inArray(el, els) < 0 )
$.event.remove(el, query.type, query.fn);
});
}
else {
// Call the first function for newly matched elements
nEls.each(function() {
query.fn.apply(this);
});
// Call the second function for elements no longer matched
if ( this.fn2 && oEls.length > 0 )
$.each(oEls, function(i, el) {
if ( $.inArray(el, els) < 0 )
query.fn2.apply(el);
});
}
}
};
$.extend($.livequery, {
guid: 0,
queries: [],
queue: [],
running: false,
timeout: null,
checkQueue: function() {
if ( $.livequery.running && $.livequery.queue.length ) {
var length = $.livequery.queue.length;
// Run each Live Query currently in the queue
while ( length-- )
$.livequery.queries[ $.livequery.queue.shift() ].run();
}
},
pause: function() {
// Don't run anymore Live Queries until restarted
$.livequery.running = false;
},
play: function() {
// Restart Live Queries
$.livequery.running = true;
// Request a run of the Live Queries
$.livequery.run();
},
registerPlugin: function() {
$.each( arguments, function(i,n) {
// Short-circuit if the method doesn't exist
if (!$.fn[n]) return;
// Save a reference to the original method
var old = $.fn[n];
// Create a new method
$.fn[n] = function() {
// Call the original method
var r = old.apply(this, arguments);
// Request a run of the Live Queries
$.livequery.run();
// Return the original methods result
return r;
}
});
},
run: function(id) {
if (id != undefined) {
// Put the particular Live Query in the queue if it doesn't already exist
if ( $.inArray(id, $.livequery.queue) < 0 )
$.livequery.queue.push( id );
}
else
// Put each Live Query in the queue if it doesn't already exist
$.each( $.livequery.queries, function(id) {
if ( $.inArray(id, $.livequery.queue) < 0 )
$.livequery.queue.push( id );
});
// Clear timeout if it already exists
if ($.livequery.timeout) clearTimeout($.livequery.timeout);
// Create a timeout to check the queue and actually run the Live Queries
$.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
},
stop: function(id) {
if (id != undefined)
// Stop are particular Live Query
$.livequery.queries[ id ].stop();
else
// Stop all Live Queries
$.each( $.livequery.queries, function(id) {
$.livequery.queries[ id ].stop();
});
}
});
// Register core DOM manipulation methods
$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove');
// Run Live Queries when the Document is ready
$(function() { $.livequery.play(); });
// Save a reference to the original init method
var init = $.prototype.init;
// Create a new init method that exposes two new properties: selector and context
$.prototype.init = function(a,c) {
// Call the original init and save the result
var r = init.apply(this, arguments);
// Copy over properties if they exist already
if (a && a.selector)
r.context = a.context, r.selector = a.selector;
// Set properties
if ( typeof a == 'string' )
r.context = c || document, r.selector = a;
// Return the result
return r;
};
// Give the init function the jQuery prototype for later instantiation (needed after Rev 4091)
$.prototype.init.prototype = $.prototype;
})(jQuery);

View File

@ -0,0 +1,14 @@
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* 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.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);

BIN
fancybox/livequery-1.0.3.zip Executable file

Binary file not shown.

11
fancybox/web.js Executable file
View File

@ -0,0 +1,11 @@
jQuery(document).ready(function() {
$("#box2").fancybox({
'width' : '75%',
'height' : '75%',
'autoScale' : true,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'type' : 'iframe'
});
});

34
fill_erfassen.php Executable file
View File

@ -0,0 +1,34 @@
<?php
session_start();
include_once 'classes/TestProjektSmarty.class.php';
require_once("config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
$smarty = new Smarty();
require_once "language/german.inc.php";
require_once("func_htmlclean.php");
$tid = $_SESSION["patronendetails_tid"];
$action = $_GET['action'];
if($action == ''){
}
if($action == 'save2'){
$variante = htmlclean($_POST['content']);
echo $variante;
# if(strlen($variante) == 6){
# $variante = "";
# }
$datum=date("Y-m-d H:i:s");
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>

Some files were not shown because too many files have changed in this diff Show More