fhiiqm/test/tabs_dyn_content.php
changeset 30 d02d02efc55a
parent 29 72f79dab938e
child 31 0a1eb975fbd9
equal deleted inserted replaced
29:72f79dab938e 30:d02d02efc55a
    39 	<?php echo "<title>$titel</title>\n"; ?>
    39 	<?php echo "<title>$titel</title>\n"; ?>
    40 </head>
    40 </head>
    41 
    41 
    42 <body>
    42 <body>
    43 
    43 
       
    44     <?php     
       
    45         echo "<h3>&nbsp;&nbsp;&nbsp;$titel </h3>";
       
    46         echo "<table width='80%'><tr>
       
    47         <td class='bigger'>&nbsp;&nbsp;&nbsp;hier k&ouml;nnen Informationen erfasst 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             &nbsp;&nbsp;&nbsp;<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         
       
    82         $zeil = $_GET["z"];
       
    83         if (!$zeil) $zeil = $_POST["z"];
       
    84         if (!$zeil) $zeil = 9999; // Anzahl der gezeigten Zeilen
       
    85         $start = $_GET["st"];   // Start bei DS $start+1
       
    86         if (!$start) $start=0;
       
    87         
       
    88     	$sort   = $_GET["s"];   // Sortierung nach Spalte
       
    89         if (!isset($sort) && !$sort) $sort = $_POST["s"]; 
       
    90         if (!$sort) $sort=15;     
       
    91     
       
    92         $dir    = $_GET["d"];   // Sortierrichtung
       
    93         if (!isset($dir) && !$dir) $dir = $_POST["d"];
       
    94     
       
    95         $fnum   = $_GET["f"];   // Spaltennummer, nach der aktuell gefiltert wird
       
    96         if (!isset($fnum) && !$fnum) $fnum = $_POST["f"];
       
    97 //        print_r ($_GET); echo "<br /><br />";
       
    98     ?>
       
    99 
    44     <script>
   100     <script>
    45     <!--
   101     <!--
    46         $(function() {
   102         $(function() {
    47     		$( "#tabs" ).tabs({			
   103     		$( "#tabs" ).tabs({			
    48 /*    		      cookie: {
   104 /*    		      cookie: {
    49 				    // store cookie for a day, without, it would be a session cookie
   105 				    // store cookie for a day, without, it would be a session cookie
    50 				    expires: 1}
   106 				    expires: 1, name: "tabindex"},
       
   107                             
       
   108              // Objects available in the function context:
       
   109             alert(ui.tab);     // anchor element of the selected (clicked) tab
       
   110             alert(ui.panel);   // element, that contains the selected/clicked tab contents
       
   111             alert(ui.index);   // zero-based index of the selected (clicked) tab
       
   112                 select: function( event, ui ) {
       
   113                         //var $select = $( ".selector" ).tabs( "option", "selected" );
       
   114                      alert ("selected tab: " + ui.index);},
       
   115                 //this is the bit that makes all a link with the class of 'thisPane' stay within the tab
       
   116                 //a href tags that are not of the class 'thisPane' will open outside the tab
       
   117                 load: function(event, ui) {
       
   118                 $(ui.panel).delegate('a.thisPane', 'click', function(event) {
       
   119                     $(ui.panel).load(this.href + "<?php echo "?s=$sort&d=$dir"; ?>");
       
   120                     alert (this.href + "<?php echo "?s=$sort&d=$dir"; ?>");
       
   121                     event.preventDefault();
       
   122                 });
       
   123                 },
    51 */
   124 */
    52                             });
   125                 ajaxOptions: {
    53     	});
   126                             error: function( xhr, status, index, anchor ) {
       
   127                                 $( anchor.hash ).html(
       
   128                                     "Couldn't load this tab. We'll try to fix this as soon as possible. " +
       
   129                                     "If this wouldn't be a demo." );
       
   130                             }
       
   131                         },
       
   132                 remote: true,
       
   133                 select: function(event, ui){
       
   134                             window.location = ui.tab.href;
       
   135                         }
       
   136             });
       
   137              $('.link_edit').click(function() { 
       
   138                 $('#tabs').tabs("url", 0, '/fhiiqm/test/tab_info_ed.php?i=123');
       
   139                 $('#tabs').tabs("load",0);
       
   140 //                window.location = $('#tabs').tabs( "option", "selected",0);
       
   141 //                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);
       
   143                 return false;
       
   144                 })
       
   145         });
    54     -->
   146     -->
    55 	</script>
   147 	</script>
    56 
   148 
    57     <?php     
   149     <p>&nbsp;&nbsp;&nbsp;<a href="#tab_1" id="link_edit" class="link_edit">Edit Info</a></p>
    58         echo "<h3>&nbsp;&nbsp;&nbsp;$titel </h3>";
       
    59         echo "<p>&nbsp;&nbsp;&nbsp;hier k&ouml;nnen Informationen erfasst und daneben die Produkte eingesehen werden</p>";
       
    60 
       
    61     ?>
       
    62     
       
    63     <div id="tabs">
   150     <div id="tabs">
    64     	<ul>
   151     	<ul>
    65             <li><a href="#tab_1">Info editieren</a></li>
   152             <li><a href="#tab_1">Info editieren</a></li>
       
   153 <!--            <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>
    66     		<li><a href="/fhiiqm/test/tab_prod_hier.php?b=0&g=0&s=1">Produkte</a></li>
   155     		<li><a href="/fhiiqm/test/tab_prod_hier.php?b=0&g=0&s=1">Produkte</a></li>
    67     	</ul>
   156     	</ul>
    68         <div id="tab_1">
   157         <div id="tab_1">
    69             <?php include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_ed.php"); ?>
   158             <?php include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_ed.php"); ?>
    70         </div> <!-- tab_1 -->
   159         </div> <!-- tab_1 -->
       
   160 <!--        <div id="tab_2">
       
   161             <?php // include ($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/test/tab_info_flist.php"); ?>
       
   162         </div> <!-- tab_2 -->
    71     </div> <!-- tabs -->
   163     </div> <!-- tabs -->
    72  </body>
   164  </body>
    73  </html>
   165  </html>