--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/test/vertrag_list1.php Wed Aug 31 14:22:19 2011 +0200
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <link href="css/db.css" rel="STYLESHEET" type="TEXT/CSS" />
+
+ <title>Liste Vertragsdaten</title>
+ <script type="text/javascript">
+ function winopen (addr,title)
+ {
+ mywin = window.open(addr,title, "width=1000,height=600,left=400,top=300,status=yes,scrollbars=yes,resizable=yes,toolbar=yes");
+ mywin.focus();
+ }
+ </script>
+</head>
+
+<body>
+
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 7/2011
+ *
+ * Liste Vertragsdaten mit Sortierung
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ $sort = $_GET["s"];
+ $dir = $_GET["d"];
+ if (!isset($sort) && !$sort) $sort = 2;
+ if (!isset($dir) && !$dir) $dir = "";
+
+ function tab_column($colnum=2,$bez,$sort,$dir)
+ {
+ if ($colnum == $sort)
+ if ($dir == 'DESC')
+ {
+ $auf = "auf";
+ $ab = "ab_activ";
+ }
+ else
+ {
+ $auf = "auf_activ";
+ $ab = "ab";
+ }
+ else
+ {
+ $auf = "auf";
+ $ab = "ab";
+ }
+ echo "<th>$bez <a href='".$_SERVER['PHP_SELF']."?s=$colnum'><img src='img/$auf.gif' border='0' width='9' hight='9' alt='sort aufsteigend' title='sort aufsteigend'></a>
+ <a href='".$_SERVER['PHP_SELF']."?s=$colnum&d=DESC'><img src='img/$ab.gif' border='0' width='9' hight='9' alt='sort absteigend' title='sort absteigend'></a></th>\n";
+
+ }
+
+ include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+ $dbc = new dbconnection();
+
+ $sql = "CALL fhiiqm.vertrag_list1(" . $sort . ",'" . $dir . "', @anz)";
+ $result = $dbc -> queryObjectArray($sql);
+ if ($result)
+ {
+ $bg1 = "#F8F8F8";
+ $bg2 = "#DEDFE1";
+ $bg = "#FFFFFF";
+
+ $ranz = $dbc -> querySingleItem("SELECT @anz");
+
+ echo "<div align='center'>\n";
+ echo "<p><b>Liste der erfassten Verträge</b></p>\n";
+ echo "<p>Mittels '<img src='img/auf.gif' border='0' width='9' hight='9'>' / '<img src='img/ab.gif' border='0' width='9' hight='9'>'
+ können Sie nach jeder Spalte auf- bzw. absteigend sortieren<br />
+ Klick auf '<img src='img/edit.gif' border='0' width='11' hight='11'>' - Bearbeiten der Vertragsdaten</p>\n";
+ printf ("<p>Anzahl Verträge: %s </p>", $ranz);
+ echo "<table>\n";
+// echo "<tr bgcolor='#CFDEF0'><th>Bezeichnung</th><th>Titel</th><th>Beschreibung</th><th>Typ</th><th>Beginn</th><th>Ende</th><th>Künd.frist(mon)</th>
+// <th>Dokument</th><th>Bemerkung</th><th> </th></tr>\n";
+
+ echo "<tr bgcolor='#68ACBF'>";
+ tab_column(2,"Bezeichnung",$sort,$dir);
+ tab_column(3,"Beschreibung",$sort,$dir);
+ tab_column(4,"Bearbeiter",$sort,$dir);
+ tab_column(5,"Dokument",$sort,$dir);
+ tab_column(6,"Typ",$sort,$dir);
+ tab_column(7,"zu Produkt",$sort,$dir);
+ echo "<th> </th></tr>\n";
+ foreach ($result as $row)
+ {
+ if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
+ echo "<tr bgcolor='" . $bg . "'><td><b>$row->cname</b></td>";
+// echo "<td>$row->contract_s</td>";
+ echo "<td>$row->clong</td>";
+ echo "<td>$row->bearb</td>";
+ echo "<td><a href='documents/$row->doc'>$row->doc</a></td>";
+ echo "<td>$row->typ</td>";
+ echo "<td>$row->prod</td>";
+ echo "<td><a href='vertrag_upd.php?uid=$row->contract_ID'><img src=\"img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
+ }
+ echo "</table></div>\n";
+ }
+ $dbc -> close();
+
+ echo "<p> <a href=\"vertrag_list2.php\" title=\"Vertragliste 2\" onclick=\"winopen(this.href,'Vertragsliste 2'); return false\">Vertragsliste Teil 2</a></p>\n";
+ echo "<p> <a href=\"vertrag_ins.php\" target=\"_self\" title=\"Vertrag erfassen\">Weiteren Vertrag erfassen</a></p>\n";
+
+?>
+
+</body>
+</html>
\ No newline at end of file