--- a/fhiiqm/alpruef_ed.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/alpruef_ed.php Fri Aug 31 14:22:20 2012 +0200
@@ -74,8 +74,8 @@
currentText: 'Jetzt',
closeText: 'OK'
});
- $("input").albez("long20").addClass("long20");
- $("input").alpdat("long10").addClass("long10");
+ $("input[id='albez']").addClass("long20");
+ $("input[id='alpdat']").addClass("long10");
});
</script>
<?php
--- a/fhiiqm/form/ap_gefahr_form.inc.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/form/ap_gefahr_form.inc.php Fri Aug 31 14:22:20 2012 +0200
@@ -50,7 +50,7 @@
{
foreach ($result as $row)
{
- $select = ( $row->gefahr_ID==$ap['gf'][0] ) ? ' selected' : null;
+ $select = ( $row->gefahr_ID===$ap['gf'][0] ) ? ' selected' : null;
echo "<option $select value=\"$row->gefahr_ID\">$row->gefahr_ID - $row->gefahr_bez</option>\n";
$sgf .= "'".$row->gefahr_ID."':'".$row->gefahr_bez."',";
}
@@ -82,7 +82,7 @@
echo "<option $select value=\"-1\"></option>\n";
foreach ($result as $row)
{
- $select = ( $row->gefahr_ID == $gfe ) ? ' selected' : null;
+ $select = ( $row->gefahr_ID === $gfe ) ? ' selected' : null;
echo "<option $select value=\"$row->gefahr_ID\">$row->gefahr_ID - $row->gefahr_bez</option>\n";
}
echo "</select><br/>\n";
--- a/fhiiqm/form/info_form2.inc.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/form/info_form2.inc.php Fri Aug 31 14:22:20 2012 +0200
@@ -17,7 +17,7 @@
</div>
<!-- <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="application/x-www-form-urlencoded" name="form_svc"> -->
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="multipart/form-data" name="form_info" target="_self">
-<div align="center">
+<div align="center">
<table width="60%" border="0" cellspacing="3" cellpadding="3">
<?php
// if ($inf["ityp"] != 6 && $ityp != 6)
--- a/fhiiqm/form/info_form3.inc.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/form/info_form3.inc.php Fri Aug 31 14:22:20 2012 +0200
@@ -54,7 +54,7 @@
</tr>
<tr>
<td>Kennzeichen(Sort.)</td>
- <td><input name="inf[sort]" type="text" size="10" maxlength="10" value="<?php echo $inf['sort']; ?>" /></td>
+ <td><input name="inf[sort]" type="text" size="15" maxlength="10" value="<?php echo $inf['sort']; ?>" /></td>
</tr>
<tr><td>gehört zu Info</td>
<td><select name="inf[infrel]">
@@ -152,7 +152,8 @@
<td>Verantwortliche(r) FHI
<br /><br /> Eingabe von mind. 2 Zeichen
<br /> -> Namensliste,
- <br /> Wiederholung für weitere Namen
+ <br /> Wiederholung für weitere Namen
+ <br /><br /> Ändern: alles Löschen, neu eingeben
</td>
<td><table cellspacing="0"><tr><td>
<textarea cols="40" rows="5" name="inf[vpers]" id="vpers"><?php echo $inf['vpers']; ?></textarea>
--- a/fhiiqm/inc/func_lib.inc.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/inc/func_lib.inc.php Fri Aug 31 14:22:20 2012 +0200
@@ -7,7 +7,7 @@
*
*/
- function tab_column($colnum=2,$bez,$sort,$dir,$fcol=0,$fanr=0,$filtb="",$start="",$anzds="25",$id="",$g=0)
+ function tab_column($colnum=2,$bez,$sort,$dir,$fcol=0,$fanr=0,$filtb="",$start="",$anzds="25",$id="",$g=0,$tab="",$adr="")
{
/** beliebige Tabellenspalte mit Sortier-/Filtersymbolen und Links generieren
* Parameter
@@ -42,16 +42,26 @@
}
if ($bez == "Haus") $tip = "Haus: A, B, BES, C, D, E, F, FAB, HAR, K, L, M, N, P, Q, R, S, T, U"; else $tip = "Filter";
+ if ($tab > "!")
+ {
+ $addr = $adr;
+ $ank = $tab;
+ }
+ else
+ {
+ $addr = $_SERVER['PHP_SELF'];
+ $ank = "";
+ }
if ($fcol>0 && $fanr>0) // Filtern nach Spalte moeglich
{
if ($fcol == $fanr) $filt = "filter_activ"; else $filt = "filter";
- $filt = " <a href='".$_SERVER['PHP_SELF']."?f=$fcol&s=$sort&d=$dir&st=$start&z=$anzds&i=$id&g=$g'><img src='/fhiiqm/img/$filt.gif' border='0' width='14' hight='11' alt='$tip' title='$tip'></a>";
+ $filt = " <a href='".$addr."$ank?f=$fcol&s=$sort&d=$dir&st=$start&z=$anzds&i=$id&g=$g'><img src='/fhiiqm/img/$filt.gif' border='0' width='14' hight='11' alt='$tip' title='$tip'></a>";
}
else
$filt="";
if ($filtb>'!') $where = "&f=$fanr&b=$filtb&i=$id&g=$g"; else $where="&i=$id&g=$g";
- echo "<th>$bez <a href='".$_SERVER['PHP_SELF']."?s=$colnum$where&st=$start&z=$anzds'><img src='/fhiiqm/img/$auf.gif' border='0' width='11' hight='11' alt='sort aufsteigend' title='sort aufsteigend'></a>
- <a href='".$_SERVER['PHP_SELF']."?s=$colnum&d=DESC$where&st=$start&z=$anzds'><img src='/fhiiqm/img/$ab.gif' border='0' width='11' hight='11' alt='sort absteigend' title='sort absteigend'></a>$filt</th>\n";
+ echo "<th>$bez <a href='".$addr."$ank?s=$colnum$where&st=$start&z=$anzds'><img src='/fhiiqm/img/$auf.gif' border='0' width='11' hight='11' alt='sort aufsteigend' title='sort aufsteigend'></a>
+ <a href='".$addr."$ank?s=$colnum&d=DESC$where&st=$start&z=$anzds'><img src='/fhiiqm/img/$ab.gif' border='0' width='11' hight='11' alt='sort absteigend' title='sort absteigend'></a>$filt</th>\n";
}
function date_obj($jahr,$mon,$tag)
--- a/fhiiqm/info_betrst_ed.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/info_betrst_ed.php Fri Aug 31 14:22:20 2012 +0200
@@ -91,7 +91,7 @@
*/
if ($ret && $retf && $retp && $reta && $retv)
{
- $addr = $_SERVER["PHP_SELF"] . "?i=$infid_new&c=1";
+ $addr = $_SERVER["PHP_SELF"] . "?i=$infid_new&c=1&t=$ityp&$getp";
header("Location: $addr");
exit;
}
--- a/fhiiqm/info_ed.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/info_ed.php Fri Aug 31 14:22:20 2012 +0200
@@ -152,10 +152,10 @@
dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ],
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez']
});
- $("input").persknr("long20").addClass("long20");
- $("input").cdat("long10").addClass("long10");
- $("input").vdat("long10").addClass("long10");
- $("input").bdat("long10").addClass("long10");
+ $("input[id='persknr']").addClass("long20");
+ $("input[id='cdat']").addClass("long10");
+ $("input[id='vdat']").addClass("long10");
+ $("input[id='bdat']").addClass("long10");
});
</script>
--- a/fhiiqm/info_ed3.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/info_ed3.php Fri Aug 31 14:22:20 2012 +0200
@@ -137,6 +137,8 @@
return false;
},
select: function( event, ui ) {
+ if (this.value.length < 6) // zuvor Feld-id 'vpers' geleert und bis zu 5 Zeichen eingegeben
+ { $("#vpid").val("");}
var terms = split( this.value );
// alert ("eingabe: "+terms+ ", ids="+idstr.valueOf());
// remove the current input
--- a/fhiiqm/laser_log_flist_ed.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/laser_log_flist_ed.php Fri Aug 31 14:22:20 2012 +0200
@@ -63,7 +63,7 @@
currentText: 'Jetzt',
closeText: 'OK'
});
-// $("input").ldat("long10").addClass("long10");
+// $("input[id='ldat']").addClass("long10");
});
</script>
--- a/fhiiqm/ma_fkt_ed.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/ma_fkt_ed.php Fri Aug 31 14:22:20 2012 +0200
@@ -125,9 +125,7 @@
dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez']
});
- $("input").filter("long20").addClass("long20");
- $("input").filter("long30").addClass("long30");
- $("input").filter("long50").addClass("long50");
+// $("input[id='filter']").addClass("long50");
});
</script>
--- a/fhiiqm/raum_upd.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/raum_upd.php Fri Aug 31 14:22:20 2012 +0200
@@ -234,6 +234,12 @@
$rfile = $raum['rfname'];
include ("inc/raum_dat_show.inc.php");
}
+ else
+ {
+ echo "<p class='red'><b>DELETE: Raum '".$raum["rnum"]." - ".$raum["rbez"]."', Haus '". $raum["geb"] ."' konnte nicht gelöscht werden!</b></p>\n";
+ echo "error DELETE" . $dbc -> error ."<br />\n";
+
+ }
}
if ($ok && ($upd || $del))
--- a/fhiiqm/report/fkt_ma_report.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/report/fkt_ma_report.php Fri Aug 31 14:22:20 2012 +0200
@@ -186,7 +186,7 @@
INNER JOIN Funktion f ON mf.fkt_ID=f.fkt_ID
LEFT OUTER JOIN Abteilung a ON m.abt_tel=a.abt_ID
LEFT OUTER JOIN Mitarbeiter_Raum mr ON m.persknr=mr.persknr
- LEFT OUTER JOIN Raum r ON mr.raum_ID=r.raum_ID WHERE fkt_bis IS NULL ";
+ LEFT OUTER JOIN Raum r ON mr.raum_ID=r.raum_ID WHERE (fkt_bis IS NULL OR fkt_bis>=DATE(NOW())) ";
$lim = " LIMIT $start,$zeil";
if (!$rag["bind"]) $bind = " AND "; else $bind = $rag["bind"];
--- a/fhiiqm/test/tab_info_ed.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/test/tab_info_ed.php Fri Aug 31 14:22:20 2012 +0200
@@ -99,6 +99,12 @@
?>
<script>
+ function split( val ) {
+ return val.split( /;\s*/ );
+ }
+ function extractLast( term ) {
+ return split( term ).pop();
+ }
$(document).ready(function() {
$("#titel").focus();
$("#persknr").autocomplete({
@@ -106,6 +112,62 @@
minLength: 2,
select: function(event,ui){$("#pid").val(ui.item.id);}
});
+ $("#vpers")
+ .bind( "keydown", function( event ) {
+ if ( event.keyCode === $.ui.keyCode.TAB &&
+ $( this ).data( "autocomplete" ).menu.active ) {
+ event.preventDefault();
+ alert ("bind: "+event.keyCode);
+ }
+ })
+ .autocomplete({
+// source: "/fhiiqm/inc/ma_list_ac.inc.php",
+// minLength: 2,
+// select: function(event,ui){$("#pid").val(ui.item.id);}
+ source: function( request, response ) {
+ $.getJSON( "/fhiiqm/inc/ma_list_ac.inc.php", {
+ term: extractLast( request.term )
+ }, response );
+ },
+ focus: function() {
+ // prevent value inserted on focus
+ return false;
+ },
+ select: function( event, ui ) {
+ if (this.value.length < 6) // zuvor Feld-id 'vpers' geleert und bis zu 5 Zeichen eingegeben
+ { $("#vpid").val("");
+// alert ("change2: "+ui.item.value+", vpid = "+ $("#vpid").val());
+ }
+ var terms = split( this.value );
+// alert ("eingabe: "+terms+ ", ids="+idstr.valueOf());
+// alert ("eingabe: "+terms+ ", ids="+$("#vpid").val());
+ // remove the current input
+ terms.pop();
+ // add the selected item
+ terms.push( ui.item.value );
+ // add placeholder to get the comma-and-space at the end
+ terms.push( "" );
+// alert ("select: "+terms+ ", ids = "+$("#vpid").val());
+ this.value = terms.join( "; " );
+
+ var ids = $("#vpid").val().split(",");
+ ids.push(ui.item.id);
+ ids.join(",");
+// alert ("ids = "+ids);
+ $("#vpid").val(ids);
+ return false;
+ },
+ change: function(event, ui){
+// alert ("change1: ui.item.id = "+ ui.item.id);
+ },
+ search: function() {
+ // custom minLength
+ var term = extractLast( this.value );
+ if ( term.length < 2 ) {
+ return false;
+ }
+ }
+ });
$("#cdat").datepicker({
dateFormat: 'yy-mm-dd', //nur Datum
yearRange: '2000:2025',
@@ -133,10 +195,10 @@
dayNamesMin: ['So','Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ],
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez']
});
- $("input").persknr("long20").addClass("long20");
- $("input").cdat("long10").addClass("long10");
- $("input").vdat("long10").addClass("long10");
- $("input").bdat("long10").addClass("long10");
+ $("input[id='persknr']").addClass("long20");
+ $("input[id='cdat']").addClass("long10");
+ $("input[id='vdat']").addClass("long10");
+ $("input[id='bdat']").addClass("long10");
});
</script>
<?php
@@ -201,6 +263,22 @@
$inf["adr"][] = $row->info_adr_ID;
}
// Verantwortlicher
+ $sql = "SELECT iv.persknr,prioritaet, CONCAT (nachname, ', ',vorname) as ma
+ FROM Info_Verantwortlich iv INNER JOIN Mitarbeiter m ON iv.persknr=m.persknr
+ WHERE info_id = $infid
+ ORDER BY 3";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ $inf["vpers"] .= $row->ma . "; ";
+ $inf["vpn"] .= $row->persknr .",";
+// $inf["prio"][] = $row->prioritaet;
+ $inf["prio"][$row->persknr] = $row->prioritaet;
+ }
+ $inf["vpn"] = substr($inf["vpn"],0,strlen($inf["vpn"])-1);
+ }
+/*
$sql = "SELECT iv.persknr,prioritaet, CONCAT (nachname, ', ',vorname)
FROM Info_Verantwortlich iv INNER JOIN Mitarbeiter m ON iv.persknr=m.persknr
WHERE info_id = $infid
@@ -214,11 +292,12 @@
$inf["prio"][$row->persknr] = $row->prioritaet;
}
}
+*/
// print_r($inf); echo "<br /><br />";
}
- echo "<div>\n";
- include($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/form/info_form2.inc.php");
+ echo "<div>";
+ include($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/form/info_form3.inc.php");
if ($sub)
{
echo
@@ -257,7 +336,7 @@
echo "</div>\n";
// if (!is_null($_SESSION["recht"]) && !in_array("le", $_SESSION["recht"]))
echo "<p class='sc'> <a href=\"/fhiiqm/info_flist.php?$getp\" target=\"_self\" title=\"Infoliste\">« zur Infoliste</a></p>\n";
- echo "</form>\n";
+ echo "</form>\n";
echo "</div>\n";
}
else
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/test/tab_info_flist.php Fri Aug 31 14:22:20 2012 +0200
@@ -0,0 +1,256 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 08/2012
+ *
+ * Liste Infos
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+ header('Content-type: text/html; charset="iso-8859-1',true);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("ir",$_SESSION["recht"]) && !in_array("ie",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"/fhiiqm/img/document_image_ver.png\" border=\"0\" alt=\"Infodaten\" title=\"Infodaten\"/></div>\n";
+
+ // Felder, nach denen gefiltert werden kann
+ $fields = array(2=>"Titel",4=>"Info-Typ",5=>"Produkt",6=>"Adressat", 7=>"Verantwortlicher");
+
+ $zeil = $_GET["z"];
+ if (!$zeil) $zeil = $_POST["z"];
+ if (!$zeil) $zeil = 9999; // Anzahl der gezeigten Zeilen
+ $start = $_GET["st"]; // Start bei DS $start+1
+ if (!$start) $start=0;
+
+ $sort = $_GET["s"]; // Sortierung nach Spalte
+ if (!isset($sort) && !$sort) $sort = $_POST["s"];
+
+ $dir = $_GET["d"]; // Sortierrichtung
+ if (!isset($dir) && !$dir) $dir = $_POST["d"];
+
+ $fnum = $_GET["f"]; // Spaltennummer, nach der aktuell gefiltert wird
+ if (!isset($fnum) && !$fnum) $fnum = $_POST["f"];
+
+ $filter = $_POST["filter"];
+ if (!isset($filter) && !$filter) $filter = $_GET["b"];
+
+ $subf = $_POST["subf"]; // submit
+
+ if (!isset($fnum) || !$fnum) $fnum = 1;
+ if (!isset($filter) || !$filter) $filter = "";
+ if (!isset($sort) || !$sort) $sort = 15; // Kennzeichen
+ if (!$dir || $dir < "!") $dir = "";
+// print_r ($_GET); echo "<br /><br />";
+ include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+ include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
+
+ $dbc = new dbconnection();
+
+ $sql = "CALL info_flist($sort,'" . $dir . "',$fnum, '" . $filter . "',$start,$zeil,@anz);";
+ // Parameter: Nr. Sortfeld, Sortierrichtung, Nr. Filterfeld, Filterbegriff, (StartNr DS) -1, Anzahl Zeilen=DS, Anzahl gefundener Raeume
+ // liefert: info_ID, iname, ilong, ityp, prod, adressat, author, idate, bdate, edate, lang, doc, infrel, infsort, ityp_ID, raum_ID, geb_ID, al_bez
+// echo "sql = $sql<br />";
+ $result = $dbc ->queryObjectArray($sql);
+
+ if ($result)
+ {
+ $bg1 = "#F8F8F8";
+ $bg2 = "#DEDFE1";
+ $bg = "#FFFFFF";
+
+ echo "<div align='center'>\n";
+ echo "<p><b>Liste der Informationen</b></p>\n";
+/*
+ echo "<table border='0' cellspacing='0'>\n";
+ echo "<tr><td class='bigger'>Mittels '<img src='/fhiiqm/img/auf.gif' border='0' width='11' hight='11' />' / '<img src='/fhiiqm/img/ab.gif' border='0' width='11' hight='11' />'
+ können Sie nach bestimmten Spalten auf- bzw. absteigend sortieren</td></tr>
+ <tr><td class='bigger'>'<img src='/fhiiqm/img/filter.gif' border='0' width='14' hight='11' />' ermöglicht das Filtern nach ausgewählten Spalten der Liste</td></tr>
+ <tr><td class='bigger'>Klick auf '<img src='/fhiiqm/img/edit.gif' border='0' width='11' hight='11'>' - Bearbeiten ,
+ '<img src='/fhiiqm/img/duplicate.gif' border='0' hight='11'>' - Duplizieren der Infodaten
+ </td></tr>\n";
+ echo "</table>\n";
+*/
+ $ianz = $dbc -> querySingleItem("SELECT @anz");
+ printf ("<p>Anzahl gefundener Informationen: %s</p>", $ianz);
+
+ if (isset($fnum) && $fnum>1 && !$filter && !$subf)
+ {
+ // Formular anzeigen fuer Filterbegriff
+ $text = $fields[$fnum];
+ $azeil = array(10=>'10',20=>'20',25=>'25',50=>'50',100=>'100',9999=>'alle'); // Anzahl gezeigter rows
+ echo "<form action='" . $_SERVER['PHP_SELF'] . "#tab_2' method='post' enctype='application/x-www-form-urlencoded' id='ffilter' name='ffilter' target='_self'>\n";
+ echo "<input type='hidden' name='s' value='$sort'>";
+ echo "<input type='hidden' name='d' value='$dir'>";
+ echo "<input type='hidden' name='f' value='$fnum'>";
+ echo "<table width=\"45%\" border=\"0\">\n";
+ echo "<tr><td>filtern nach $text: </td>";
+ echo "<td><input id='filter' name='filter' type=\"text\" size=\"30\" maxlength=\"30\" value=\"$filter\"/></td>";
+ echo "<td>Zeilen/Seite? <select name='z'>\n";
+ foreach ($azeil as $key=>$val)
+ {
+ if ($key == $zeil) $select = "selected"; else $select = "";
+ echo "<option $select value='$key'>$val</option>\n";
+ }
+ echo "</select></td>\n";
+ echo "<td><input class=\"button\" type=\"submit\" value=\"finden\" name=\"subf\" title=\"subf\" /></td></tr></table>\n";
+ echo "</form>\n";
+ echo "<p> </p>\n";
+ }
+ echo "<table width='99%'>\n";
+
+ if ($filter>'!') echo "<tr><td class='bigger' colspan=6>Filter: ". $fields["$fnum"] . " wie '$filter'</td><tr>\n";
+
+ // Listenkopf generieren
+ echo "<tr bgcolor='#68ACBF'>";
+ echo "<th>ID</th>";
+ echo "<th>Kz</th>";
+ echo "<th>Titel</th>";
+ echo "<th>Kurzinfo</th>";
+ echo "<th>Info-Typ</th>";
+ echo "<th>Produkt</th>";
+ echo "<th>Adressat</th>";
+ echo "<th>Verantw.</th>";
+ echo "<th>Ort</th>";
+ echo "<th>Autor</th>";
+ echo "<th>erst. am</th>";
+ echo "<th>gilt ab</th>";
+ echo "<th>gilt bis</th>";
+ echo "<th>Status</th>";
+/* tab_column(15,"Kz",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(2,"Titel",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(3,"Kurzinfo",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(4,"Info-Typ",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(5,"Produkt",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(6,"Adressat",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(7,"Verantw.",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ echo "<th>Ort</th>";
+ tab_column(8,"Autor",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(9,"erst. am",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(10,"gilt ab",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ tab_column(11,"gilt bis",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+*/
+// echo "<th>Sprache</th>";
+// tab_column(12,"Status",$sort,$dir,0,$fnum,$filter,$start,$zeil,"",0,"#ui-tabs-1","tabs_dyn_content.php");
+ echo "<th>Dokument</th>";
+ echo "<th>zu ID</th></tr>\n";
+
+// echo "<tr bgcolor='#68ACBF'><th>Raum-Nr.</th><th>Bezeichnung</th><th>Haus</th><th>Typ</th><th>Fläche (m<sup>2</sup>)</th><th>Raumplan</th><th> </th>
+// </tr>\n";
+// Format $row->prod: 'prod_name | prod_hier; prod_name | prod_hier; prod_name | prod_hier'
+ foreach ($result as $row)
+ {
+ if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
+ echo "<tr bgcolor='" . $bg . "'><td class=\"left\">$row->info_ID</td>";
+ echo "<td class=\"left\">$row->infsort</td>";
+ echo "<td class=\"left\">$row->iname</td>";
+// if (strlen($row->ilong)>60) $row->ilong = substr($row->ilong,0,60)."...";
+ if ($row->ityp_ID == 81) $anl = " <b>→ '" . $row->al_bez . "'</b>"; else $anl="";
+ echo "<td class=\"left\">" . nl2br($row->ilong).$anl . "</td>";
+ echo "<td class=\"left\">$row->ityp</td>";
+ $prod = explode("; ",$row->prod);
+ $prods = "";
+ foreach ($prod as $val)
+ $prods .= "; " . substr($val,0,strpos($val,"|")-1);
+ $prods = substr($prods,2);
+// echo "<td class=\"left\">" . str_replace(";",";<br />",$row->prod) . "</td>";
+ echo "<td class=\"left\">" . str_replace(";",";<br />",$prods) . "</td>";
+ echo "<td class=\"left\">" . str_replace(";","<br />",$row->adressat) . "</td>";
+ echo "<td class=\"left\">" . str_replace(";","<br />",$row->verantw) . "</td>";
+ if ($row->ityp_ID == 7 || substr($row->ityp_ID,0,1) == 8) // 7 = Betriebsstörung, 8 = Betriebsanweisung
+ { if ($row->raum_ID)
+ {
+ $sql = "SELECT geb_ID, raum_nr FROM Raum WHERE raum_ID = $row->raum_ID";
+ $res = $dbc -> queryObjectArray($sql);
+ foreach ($res as $ro)
+ echo "<td>$ro->geb_ID, $ro->raum_nr</td>";
+ }
+ elseif ($row->geb_ID && !$row->raum_ID)
+ echo "<td>$row->geb_ID</td>";
+ else echo "<td> </td>";
+ }
+ else echo "<td> </td>";
+ echo "<td class=\"left\">$row->author</td>";
+ if ($row->idate)
+ {
+ $dat = new DateTime($row->idate);
+ echo "<td class=\"left\">" . $dat->format('d.m.Y')."</td>";
+ }
+ else echo "<td> </td>";
+ if ($row->bdate)
+ {
+ $dat = new DateTime($row->bdate);
+ echo "<td class=\"left\">" . $dat->format('d.m.Y')."</td>";
+ }
+ else echo "<td> </td>";
+ if ($row->edate)
+ {
+ $dat = new DateTime($row->edate);
+ echo "<td class=\"left\">" . $dat->format('d.m.Y')."</td>";
+ }
+ else echo "<td> </td>";
+// echo "<td class=\"left\">$row->lang</td>";
+ echo "<td class=\"left\">$row->freigabe</td>";
+ if (file_exists("infos/".$row->doc))
+ {
+ $doc = substr($row->doc,strpos($row->doc,"_")+1);
+ echo "<td class=\"left\"><a href=\"infos/$row->doc\">$doc</td>";
+ }
+ else
+ echo "<td class=\"left\">$row->doc</td>";
+ echo "<td class=\"left\">$row->infrel</td>";
+ echo "</tr>\n";
+ }
+ echo "</table></div>\n";
+
+ echo "<br /> ";
+
+ // Sortierung und Filter aus $_GET fuer weitere Seiten
+ foreach ($_GET as $key=>$val)
+ {
+ if ($key != "st") $liste .= "&" . $key ."=".$val;
+ }
+ // Sortierung und Filter aus $_POST fuer weitere Seiten
+ if ($subf)
+ foreach ($_POST as $key=>$val)
+ {
+ if ($key != "st" && $key != "subf" && $key != "filter") $liste .= "&" . $key ."=".$val;
+ if ($key == "filter") $liste .= "&b=" . $val;
+ }
+
+ // Links auf andere Seiten generieren
+ liste_links($start,$zeil,$ianz,$liste,"#ui-tabs-1");
+ }
+ else
+ {
+ if ($dbc -> error)
+ echo "error: " . $dbc -> error . "<br />\n";
+ else
+ {
+ echo "<p class='red'> Leider nichts gefunden für ". $fields["$fnum"] . " wie '$filter'!</p><br />";
+ echo " <a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"Infoliste\" class=\"sc\">Infoliste</a></p>\n";
+ }
+
+ }
+ $dbc -> close();
+
+ if (!is_null($_SESSION["recht"]) && in_array("ie",$_SESSION["recht"]))
+ echo "<p> <a href=\"info_ed.php\" target=\"_self\" title=\"Info erfassen\" class=\"sc\">Weitere Info erfassen</a></p>\n";
+
+?>
\ No newline at end of file
--- a/fhiiqm/test/tabs_dyn_content.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/test/tabs_dyn_content.php Fri Aug 31 14:22:20 2012 +0200
@@ -41,33 +41,125 @@
<body>
+ <?php
+ echo "<h3> $titel </h3>";
+ echo "<table width='80%'><tr>
+ <td class='bigger'> hier können Informationen erfasst und daneben die Produkte eingesehen werden<br /><br /><br /></td><td>";
+
+ ?>
+ <form id="infol" method="POST" action="<?php $_SERVER['PHP_SELF'] ?>" enctype="application/x-www-form-urlencoded">
+ <table>
+ <tr><td>Infoliste sort nach</td>
+ <td><select name="s">
+ <option value="15">Kennzeichen</option>
+ <option value="2">Titel</option>
+ <option value="3">Kurzinfo</option>
+ <option value="4">Infotyp</option>
+ <option value="5">Produkt</option>
+ <option value="6">Adressat</option>
+ <option value="7">Verantwortlichen</option>
+ <option value="8">Autor</option>
+ <option value="9">erstellt am</option>
+ <option value="10">gültig ab</option>
+ <option value="11">gültig bis</option>
+ <option value="12">Status</option>
+ </select>
+ </td>
+ </tr>
+ <tr><td>Sortierrichtung</td>
+ <td><select name="d">
+ <option value="ASC">aufsteigend</option>
+ <option value="DESC">absteigend</option>
+ </select>
+ <input type="submit" class="button" name="subil" value="sortieren" /></td>
+ </tr>
+
+ </table>
+ </form>
+ <?php
+ echo "</td></tr></table>";
+
+ $zeil = $_GET["z"];
+ if (!$zeil) $zeil = $_POST["z"];
+ if (!$zeil) $zeil = 9999; // Anzahl der gezeigten Zeilen
+ $start = $_GET["st"]; // Start bei DS $start+1
+ if (!$start) $start=0;
+
+ $sort = $_GET["s"]; // Sortierung nach Spalte
+ if (!isset($sort) && !$sort) $sort = $_POST["s"];
+ if (!$sort) $sort=15;
+
+ $dir = $_GET["d"]; // Sortierrichtung
+ if (!isset($dir) && !$dir) $dir = $_POST["d"];
+
+ $fnum = $_GET["f"]; // Spaltennummer, nach der aktuell gefiltert wird
+ if (!isset($fnum) && !$fnum) $fnum = $_POST["f"];
+// print_r ($_GET); echo "<br /><br />";
+ ?>
+
<script>
<!--
$(function() {
$( "#tabs" ).tabs({
/* cookie: {
// store cookie for a day, without, it would be a session cookie
- expires: 1}
+ expires: 1, name: "tabindex"},
+
+ // Objects available in the function context:
+ alert(ui.tab); // anchor element of the selected (clicked) tab
+ alert(ui.panel); // element, that contains the selected/clicked tab contents
+ alert(ui.index); // zero-based index of the selected (clicked) tab
+ select: function( event, ui ) {
+ //var $select = $( ".selector" ).tabs( "option", "selected" );
+ alert ("selected tab: " + ui.index);},
+ //this is the bit that makes all a link with the class of 'thisPane' stay within the tab
+ //a href tags that are not of the class 'thisPane' will open outside the tab
+ load: function(event, ui) {
+ $(ui.panel).delegate('a.thisPane', 'click', function(event) {
+ $(ui.panel).load(this.href + "<?php echo "?s=$sort&d=$dir"; ?>");
+ alert (this.href + "<?php echo "?s=$sort&d=$dir"; ?>");
+ event.preventDefault();
+ });
+ },
*/
- });
- });
+ ajaxOptions: {
+ error: function( xhr, status, index, anchor ) {
+ $( anchor.hash ).html(
+ "Couldn't load this tab. We'll try to fix this as soon as possible. " +
+ "If this wouldn't be a demo." );
+ }
+ },
+ remote: true,
+ select: function(event, ui){
+ window.location = ui.tab.href;
+ }
+ });
+ $('.link_edit').click(function() {
+ $('#tabs').tabs("url", 0, '/fhiiqm/test/tab_info_ed.php?i=123');
+ $('#tabs').tabs("load",0);
+// window.location = $('#tabs').tabs( "option", "selected",0);
+// alert ("url:" + $('#tabs').( "option", "selected" ));
+// $('#tabs').bind('tabsshow', function(event, ui){document.location = $(document).attr('location').pathname + '#' + ui.panel.id +"?i=123";}); alert ("url = "+ui.tab.href);
+ return false;
+ })
+ });
-->
</script>
- <?php
- echo "<h3> $titel </h3>";
- echo "<p> hier können Informationen erfasst und daneben die Produkte eingesehen werden</p>";
-
- ?>
-
+ <p> <a href="#tab_1" id="link_edit" class="link_edit">Edit Info</a></p>
<div id="tabs">
<ul>
<li><a href="#tab_1">Info editieren</a></li>
+<!-- <li><a href="#tab_2">Infoliste</a></li> -->
+ <li><a href="/fhiiqm/test/tab_info_flist.php<?php echo "?f=$fnum&s=$sort&d=$dir&st=$start&z=$zeil";?>" class="thisPane">Infoliste</a></li>
<li><a href="/fhiiqm/test/tab_prod_hier.php?b=0&g=0&s=1">Produkte</a></li>
</ul>
<div id="tab_1">
<?php include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_ed.php"); ?>
</div> <!-- tab_1 -->
+<!-- <div id="tab_2">
+ <?php // include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_flist.php"); ?>
+ </div> <!-- tab_2 -->
</div> <!-- tabs -->
</body>
</html>
\ No newline at end of file
--- a/fhiiqm/vertrag_search.php Thu Aug 23 10:17:50 2012 +0200
+++ b/fhiiqm/vertrag_search.php Fri Aug 31 14:22:20 2012 +0200
@@ -80,9 +80,7 @@
close: (function(event,ui){
$("#fcontract").submit();})
});
- $("input").filter("long20").addClass("long20");
- $("input").filter("long30").addClass("long30");
- $("input").filter("long50").addClass("long50");
+ $("input[id='conbez']").addClass("long50");
});
</script>
<div align="center">