7 * Test tabs jquery ui |
7 * Test tabs jquery ui |
8 */ |
8 */ |
9 |
9 |
10 error_reporting(E_ALL ^ E_NOTICE); |
10 error_reporting(E_ALL ^ E_NOTICE); |
11 header('Content-type: text/html; charset="iso-8859-1',true); |
11 header('Content-type: text/html; charset="iso-8859-1',true); |
|
12 |
|
13 |
12 session_start(); |
14 session_start(); |
13 if (! isset($_SESSION["userid"])) |
15 if (! isset($_SESSION["userid"])) |
14 { |
16 { |
15 include_once ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/inc/func_lib.inc.php"); |
17 include_once ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/inc/func_lib.inc.php"); |
16 login($_SERVER["PHP_SELF"]); |
18 login($_SERVER["PHP_SELF"]); |
42 <body> |
46 <body> |
43 |
47 |
44 <?php |
48 <?php |
45 echo "<h3> $titel </h3>"; |
49 echo "<h3> $titel </h3>"; |
46 echo "<table width='80%'><tr> |
50 echo "<table width='80%'><tr> |
47 <td class='bigger'> hier können Informationen erfasst und daneben die Produkte eingesehen werden<br /><br /><br /></td><td>"; |
51 <td class='bigger'> hier können Informationen erfasst, editiert, angelistet und daneben die Produkte eingesehen werden<br /><br /><br /></td><td>"; |
48 |
|
49 ?> |
|
50 <form id="infol" method="POST" action="<?php $_SERVER['PHP_SELF'] ?>" enctype="application/x-www-form-urlencoded"> |
|
51 <table> |
|
52 <tr><td>Infoliste sort nach</td> |
|
53 <td><select name="s"> |
|
54 <option value="15">Kennzeichen</option> |
|
55 <option value="2">Titel</option> |
|
56 <option value="3">Kurzinfo</option> |
|
57 <option value="4">Infotyp</option> |
|
58 <option value="5">Produkt</option> |
|
59 <option value="6">Adressat</option> |
|
60 <option value="7">Verantwortlichen</option> |
|
61 <option value="8">Autor</option> |
|
62 <option value="9">erstellt am</option> |
|
63 <option value="10">gültig ab</option> |
|
64 <option value="11">gültig bis</option> |
|
65 <option value="12">Status</option> |
|
66 </select> |
|
67 </td> |
|
68 </tr> |
|
69 <tr><td>Sortierrichtung</td> |
|
70 <td><select name="d"> |
|
71 <option value="ASC">aufsteigend</option> |
|
72 <option value="DESC">absteigend</option> |
|
73 </select> |
|
74 <input type="submit" class="button" name="subil" value="sortieren" /></td> |
|
75 </tr> |
|
76 |
|
77 </table> |
|
78 </form> |
|
79 <?php |
|
80 echo "</td></tr></table>"; |
|
81 |
52 |
82 $zeil = $_GET["z"]; |
53 $zeil = $_GET["z"]; |
83 if (!$zeil) $zeil = $_POST["z"]; |
54 if (!$zeil) $zeil = $_POST["z"]; |
84 if (!$zeil) $zeil = 9999; // Anzahl der gezeigten Zeilen |
55 if (!$zeil) $zeil = 9999; // Anzahl der gezeigten Zeilen |
85 $start = $_GET["st"]; // Start bei DS $start+1 |
56 $start = $_GET["st"]; // Start bei DS $start+1 |
92 $dir = $_GET["d"]; // Sortierrichtung |
63 $dir = $_GET["d"]; // Sortierrichtung |
93 if (!isset($dir) && !$dir) $dir = $_POST["d"]; |
64 if (!isset($dir) && !$dir) $dir = $_POST["d"]; |
94 |
65 |
95 $fnum = $_GET["f"]; // Spaltennummer, nach der aktuell gefiltert wird |
66 $fnum = $_GET["f"]; // Spaltennummer, nach der aktuell gefiltert wird |
96 if (!isset($fnum) && !$fnum) $fnum = $_POST["f"]; |
67 if (!isset($fnum) && !$fnum) $fnum = $_POST["f"]; |
|
68 /* |
|
69 $infoid = $_POST['id']; // aus Feld 'id' |
|
70 if ($infoid == -1) $infoid=null; |
|
71 else*/if (!$infoid) $infoid=$_GET['i'] ; // aus tab_info_flist.php |
97 // print_r ($_GET); echo "<br /><br />"; |
72 // print_r ($_GET); echo "<br /><br />"; |
|
73 // print_r ($_POST); echo "<br /><br />"; |
|
74 |
|
75 // $_GET['i'] = $infoid; // fuer tab_info_ed.php, wenn klick aus info-liste |
98 ?> |
76 ?> |
99 |
77 <form id="infol" method="POST" action="<?php $_SERVER['PHP_SELF'] ?>" enctype="application/x-www-form-urlencoded"> |
|
78 <table> |
|
79 <tr><td>Infoliste sort nach</td> |
|
80 <td><select name="s"> |
|
81 <?php |
|
82 $asort = array(15=>"Kennzeichen",2=>"Titel",3=>"Kurzinfo",4=>"Infotyp",5=>"Produkt",6=>"Adressat", |
|
83 7=>"Verantwortlichen",8=>"Autor",9=>"erstellt am",10=>"gültig ab",11=>"gültig bis",12=>"Status"); |
|
84 foreach ($asort as $key => $val) |
|
85 { |
|
86 $select = ($sort == $key)? "selected" : ""; |
|
87 echo "<option $select value='$key'>$val</option>\n"; |
|
88 } |
|
89 ?> |
|
90 </select> |
|
91 </td> |
|
92 </tr> |
|
93 <tr><td>Sortierrichtung</td> |
|
94 <td><select name="d"> |
|
95 <?php $select = ($dir == "ASC")? "selected" : ""; |
|
96 echo "<option $select value='ASC'>aufsteigend</option>"; |
|
97 $select = ($dir == "DESC")? "selected" : ""; |
|
98 echo "<option $select value='DESC'>absteigend</option>"; ?> |
|
99 </select> |
|
100 <input type="submit" class="button" name="subil" id="subil" value="sortieren" /></td> |
|
101 </tr> |
|
102 |
|
103 </table> |
|
104 </form> |
|
105 <?php |
|
106 echo "</td></tr></table>"; |
|
107 |
|
108 ?> |
|
109 <!-- |
|
110 <form id="infoi" method="POST" action="<?php $_SERVER['PHP_SELF'] ?>" enctype="application/x-www-form-urlencoded"> |
|
111 <table> |
|
112 <tr><td> zu editierende Info wählen</td> |
|
113 <td><select name="id" onchange="this.form.submit();"> |
|
114 <option value="-1"> </option> |
|
115 <?php |
|
116 /* |
|
117 $sql = " SELECT info_ID,info_name_s FROM Info ORDER BY 2"; |
|
118 if ($res = $dbc -> queryObjectArray($sql)); |
|
119 foreach ($res as $row) |
|
120 { |
|
121 $select = ($row->info_ID == $infoid) ? "selected" : ""; |
|
122 echo "<option $select value='$row->info_ID'>$row->info_ID - $row->info_name_s</option>\n"; |
|
123 } |
|
124 */ |
|
125 ?> |
|
126 </select> |
|
127 </td> |
|
128 <td> <a href="#tab_1" id="link_edit" class="link_edit">Edit Info</a></td></tr> |
|
129 </table> |
|
130 </form> |
|
131 --> |
100 <script> |
132 <script> |
101 <!-- |
133 <!-- |
102 $(function() { |
134 $(function() { |
103 $( "#tabs" ).tabs({ |
135 $( "#tabs" ).tabs({ |
104 /* cookie: { |
136 /* cookie: { |
133 select: function(event, ui){ |
165 select: function(event, ui){ |
134 window.location = ui.tab.href; |
166 window.location = ui.tab.href; |
135 } |
167 } |
136 }); |
168 }); |
137 $('.link_edit').click(function() { |
169 $('.link_edit').click(function() { |
138 $('#tabs').tabs("url", 0, '/fhiiqm/test/tab_info_ed.php?i=123'); |
170 $('#tabs').tabs('select',0); |
|
171 $('#tabs').tabs("url", 0, '/fhiiqm/test/tab_info_ed.php?i=<?php echo $infoid; ?>'); |
139 $('#tabs').tabs("load",0); |
172 $('#tabs').tabs("load",0); |
140 // window.location = $('#tabs').tabs( "option", "selected",0); |
173 // window.location = $('#tabs').tabs( "option", "selected",0); |
141 // alert ("url:" + $('#tabs').( "option", "selected" )); |
174 // alert ("url:" + $('#tabs').( "option", "selected" )); |
142 // $('#tabs').bind('tabsshow', function(event, ui){document.location = $(document).attr('location').pathname + '#' + ui.panel.id +"?i=123";}); alert ("url = "+ui.tab.href); |
175 // $('#tabs').bind('tabsshow', function(event, ui){document.location = $(document).attr('location').pathname + '#' + ui.panel.id +"?i=123";}); alert ("url = "+ui.tab.href); |
143 return false; |
176 return false; |
144 }) |
177 }) |
|
178 /* |
|
179 $('.info_edit').click(function() { |
|
180 $('#tabs').tabs('select',0); |
|
181 $('#tabs').tabs("url", 0, '/fhiiqm/test/tab_info_ed.php?i=<?php echo $_GET["i"]; ?>'); |
|
182 $('#tabs').tabs("load",0); |
|
183 return false; |
|
184 }) |
|
185 */ |
|
186 $('#subil').click(function() { |
|
187 $('#tabs').tabs('select',1); |
|
188 return true; |
|
189 }) |
145 }); |
190 }); |
146 --> |
191 --> |
147 </script> |
192 </script> |
148 |
193 |
149 <p> <a href="#tab_1" id="link_edit" class="link_edit">Edit Info</a></p> |
194 <p> </p> |
150 <div id="tabs"> |
195 <div id="tabs"> |
151 <ul> |
196 <ul> |
152 <li><a href="#tab_1">Info editieren</a></li> |
197 <li><a href="#tab_1">Info neu/editieren</a></li> |
153 <!-- <li><a href="#tab_2">Infoliste</a></li> --> |
198 <!-- <li><a href="#tab_2">Infoliste</a></li> --> |
154 <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> |
199 <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> |
155 <li><a href="/fhiiqm/test/tab_prod_hier.php?b=0&g=0&s=1">Produkte</a></li> |
200 <li><a href="/fhiiqm/test/tab_prod_hier.php?b=0&g=0&s=1">Produkte</a></li> |
156 </ul> |
201 </ul> |
157 <div id="tab_1"> |
202 <div id="tab_1"> |
158 <?php include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_ed.php"); ?> |
203 <?php include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_ed.php"); ?> |
159 </div> <!-- tab_1 --> |
204 </div> |
160 <!-- <div id="tab_2"> |
|
161 <?php // include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_flist.php"); ?> |
|
162 </div> <!-- tab_2 --> |
|
163 </div> <!-- tabs --> |
205 </div> <!-- tabs --> |
164 </body> |
206 </body> |
165 </html> |
207 </html> |