50 echo "<div class=\"float-br smaller\" valign='top'>"; |
50 echo "<div class=\"float-br smaller\" valign='top'>"; |
51 echo " user: " . $_SESSION["userid"]; |
51 echo " user: " . $_SESSION["userid"]; |
52 echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n"; |
52 echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n"; |
53 echo "<div class=\"float-r\"> <img src=\"img/document_mark_as_final.png\" border=\"0\" alt=\"Verträge\" title=\"Verträge\"/></div>\n"; |
53 echo "<div class=\"float-r\"> <img src=\"img/document_mark_as_final.png\" border=\"0\" alt=\"Verträge\" title=\"Verträge\"/></div>\n"; |
54 |
54 |
|
55 $mfile = $_GET['g']; // Multifile = mehrere Vertragsdokumente moeglich |
|
56 if (!$mfile) $mfile = $_POST['g']; |
55 $zeil = $_GET["z"]; |
57 $zeil = $_GET["z"]; |
56 if (!$zeil) $zeil = $_POST["z"]; |
58 if (!$zeil) $zeil = $_POST["z"]; |
57 if (!$zeil) $zeil = 20; // Anzahl der gezeigten Zeilen |
59 if (!$zeil) $zeil = 20; // Anzahl der gezeigten Zeilen |
58 $start = $_GET["st"]; // Start bei DS $start+1 |
60 $start = $_GET["st"]; // Start bei DS $start+1 |
59 if (!$start) $start=0; |
61 if (!$start) $start=0; |
96 $dbc = new dbconnection(); |
98 $dbc = new dbconnection(); |
97 |
99 |
98 echo "<div align='center'>\n"; |
100 echo "<div align='center'>\n"; |
99 //echo "$sort, $dir, $fnum, $filter<br><br>\n"; |
101 //echo "$sort, $dir, $fnum, $filter<br><br>\n"; |
100 // $sql = "CALL fhiiqm.vertrag_flist1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "',$start,$zeil, @anz)"; |
102 // $sql = "CALL fhiiqm.vertrag_flist1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "',$start,$zeil, @anz)"; |
101 $sql = "CALL fhiiqm.vertrag_flist1_1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "', '" . $listg . "', $start,$zeil, @anz)"; |
103 if ($mfile) |
|
104 $sql = "CALL fhiiqm.vertrag_flist1_mf(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "', '" . $listg . "', $start,$zeil, @anz)"; |
|
105 else |
|
106 $sql = "CALL fhiiqm.vertrag_flist1_1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "', '" . $listg . "', $start,$zeil, @anz)"; |
102 // Parameter: Nr. Sortfelf, Sortierrichtung, Nr. Filterfeld, Filterbegriff, Liste der berechtigten prodgroup, Start bei DS $start+1, Anzahl DS/Seite, Anzahl gefundener Vertraege |
107 // Parameter: Nr. Sortfelf, Sortierrichtung, Nr. Filterfeld, Filterbegriff, Liste der berechtigten prodgroup, Start bei DS $start+1, Anzahl DS/Seite, Anzahl gefundener Vertraege |
103 // liefert Felder: contract_ID,cname,clong,bearb,doc,typ,prod |
108 // liefert Felder: contract_ID,cname,clong,bearb,doc,typ,prod |
104 $result = $dbc -> queryObjectArray($sql); |
109 $result = $dbc -> queryObjectArray($sql); |
105 if ($result) |
110 if ($result) |
106 { |
111 { |
133 $azeil = array(10=>'10',20=>'20',25=>'25',50=>'50',100=>'100',9999=>'alle'); // Anzahl gezeigter rows |
138 $azeil = array(10=>'10',20=>'20',25=>'25',50=>'50',100=>'100',9999=>'alle'); // Anzahl gezeigter rows |
134 echo "<form action=" . $_SERVER['PHP_SELF'] . " method='post' enctype='application/x-www-form-urlencoded' id='ffilter' name='ffilter' target='_self'>\n"; |
139 echo "<form action=" . $_SERVER['PHP_SELF'] . " method='post' enctype='application/x-www-form-urlencoded' id='ffilter' name='ffilter' target='_self'>\n"; |
135 echo "<input type='hidden' name='s' value='$sort'>"; |
140 echo "<input type='hidden' name='s' value='$sort'>"; |
136 echo "<input type='hidden' name='d' value='$dir'>"; |
141 echo "<input type='hidden' name='d' value='$dir'>"; |
137 echo "<input type='hidden' name='f' value='$fnum'>"; |
142 echo "<input type='hidden' name='f' value='$fnum'>"; |
|
143 echo "<input type='hidden' name='g' value='$mfile'>"; |
138 echo "<table width=\"40%\" border=\"0\">\n"; |
144 echo "<table width=\"40%\" border=\"0\">\n"; |
139 echo "<tr><td>filtern nach $text: </td>"; |
145 echo "<tr><td>filtern nach $text: </td>"; |
140 echo "<td><input id='filter' name='filter' type=\"text\" size=\"30\" maxlength=\"30\" value=\"$filter\""; |
146 echo "<td><input id='filter' name='filter' type=\"text\" size=\"30\" maxlength=\"30\" value=\"$filter\""; |
141 if ($fnum == 6) |
147 if ($fnum == 6) |
142 { |
148 { |
165 if ($filter>'!') echo "<tr><td class='bigger' colspan=6>Filter: ". $fields["$fnum"] . " wie '$filter'</td><tr>\n"; |
171 if ($filter>'!') echo "<tr><td class='bigger' colspan=6>Filter: ". $fields["$fnum"] . " wie '$filter'</td><tr>\n"; |
166 // 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> |
172 // 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> |
167 // <th>Dokument</th><th>Bemerkung</th><th> </th></tr>\n"; |
173 // <th>Dokument</th><th>Bemerkung</th><th> </th></tr>\n"; |
168 |
174 |
169 echo "<tr bgcolor='#68ACBF'>"; |
175 echo "<tr bgcolor='#68ACBF'>"; |
170 tab_column(8,"Partner",$sort,$dir,8,$fnum,$filter,$start,$zeil); |
176 tab_column(8,"Partner",$sort,$dir,8,$fnum,$filter,$start,$zeil,"",$mfile); |
171 tab_column(2,"Bezeichnung",$sort,$dir,2,$fnum,$filter,$start,$zeil); |
177 tab_column(2,"Bezeichnung",$sort,$dir,2,$fnum,$filter,$start,$zeil,"",$mfile); |
172 tab_column(3,"Beschreibung",$sort,$dir,0,$fnum,$filter,$start,$zeil); |
178 tab_column(3,"Beschreibung",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",$mfile); |
173 tab_column(6,"Typ",$sort,$dir,6,$fnum,$filter,$start,$zeil); |
179 tab_column(6,"Typ",$sort,$dir,6,$fnum,$filter,$start,$zeil,"",$mfile); |
174 tab_column(7,"zu Produkt",$sort,$dir,7,$fnum,$filter,$start,$zeil); |
180 tab_column(7,"zu Produkt",$sort,$dir,7,$fnum,$filter,$start,$zeil,"",$mfile); |
175 tab_column(4,"Bearbeiter",$sort,$dir,4,$fnum,$filter,$start,$zeil); |
181 tab_column(4,"Bearbeiter",$sort,$dir,4,$fnum,$filter,$start,$zeil,"",$mfile); |
176 tab_column(5,"Dokument",$sort,$dir,0,$fnum,$filter,$start,$zeil); |
182 if ($mfile) |
|
183 tab_column(5,"Dokument, Schlagwort",$sort,$dir,5,$fnum,$filter,$start,$zeil,"",$mfile); |
|
184 else |
|
185 tab_column(5,"Dokument",$sort,$dir,0,$fnum,$filter,$start,$zeil); |
177 echo "<th> </th></tr>\n"; |
186 echo "<th> </th></tr>\n"; |
178 foreach ($result as $row) |
187 foreach ($result as $row) |
179 { |
188 { |
180 if ($bg == $bg1) $bg = $bg2; else $bg = $bg1; |
189 if ($bg == $bg1) $bg = $bg2; else $bg = $bg1; |
181 echo "<tr bgcolor='" . $bg . "'>"; |
190 echo "<tr bgcolor='" . $bg . "'>"; |
190 // echo "<td>$row->contract_s</td>"; |
199 // echo "<td>$row->contract_s</td>"; |
191 echo "<td width='22%'>" . nl2br($row->clong) . "</td>"; |
200 echo "<td width='22%'>" . nl2br($row->clong) . "</td>"; |
192 echo "<td>$row->typ</td>"; |
201 echo "<td>$row->typ</td>"; |
193 echo "<td>$row->prod</td>"; |
202 echo "<td>$row->prod</td>"; |
194 echo "<td>$row->bearb</td>"; |
203 echo "<td>$row->bearb</td>"; |
195 if (file_exists("documents/".$row->doc)) |
204 if ($mfile) |
196 { |
205 { |
197 $doc = substr($row->doc,strpos($row->doc,"_")+1); |
206 $docsw = explode("; ", $row->doc); |
198 echo "<td><a href='documents/$row->doc'>$doc</a></td>"; |
207 if (isset($docsw) && is_array($docsw)) |
199 } |
208 { |
200 else |
209 echo "<td>"; |
201 echo "<td>$row->doc</td>"; |
210 foreach ($docsw as $val) |
202 echo "<td><a href='/fhiiqm/vertrag_upd.php?uid=$row->contract_ID$getp'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n"; |
211 { |
|
212 $file = substr($val,0,strpos($val,'|')); |
|
213 $sw = substr($val,strpos($val,'|')+1); |
|
214 if ($fnum == 5 && $filter > '!') // Filterbegriff in Schlagwort hervorheben |
|
215 { |
|
216 $sw = str_replace(lcfirst($filter),"<b>".lcfirst($filter)."</b>",$sw); |
|
217 $sw = str_replace(ucfirst($filter),"<b>".ucfirst($filter)."</b>",$sw); |
|
218 } |
|
219 if ($sw) $sw = " → <em>$sw</em>"; else $sw = ""; |
|
220 if (file_exists("documents/$file")) |
|
221 { |
|
222 $doc = substr($file,strpos($file,"_")+1); |
|
223 echo "<a href='documents/$file'>$doc</a>$sw<br />"; |
|
224 } |
|
225 else |
|
226 echo "$file$sw<br />"; |
|
227 } |
|
228 echo "</td>"; |
|
229 } |
|
230 } |
|
231 else |
|
232 { |
|
233 if (file_exists("documents/".$row->doc)) |
|
234 { |
|
235 $doc = substr($row->doc,strpos($row->doc,"_")+1); |
|
236 echo "<td><a href='documents/$row->doc'>$doc</a></td>"; |
|
237 } |
|
238 else |
|
239 echo "<td>$row->doc</td>"; |
|
240 } |
|
241 if ($mfile) $part = "ed"; else $part = "upd"; |
|
242 echo "<td><a href='/fhiiqm/vertrag_$part.php?uid=$row->contract_ID&$getp'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n"; |
203 } |
243 } |
204 echo "</table></div>\n"; |
244 echo "</table></div>\n"; |
205 echo "<br /> "; |
245 echo "<br /> "; |
206 |
246 |
207 // Sortierung und Filter aus $_GET fuer weitere Seiten |
247 // Sortierung und Filter aus $_GET fuer weitere Seiten |