Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Seite beim ersten aufruf anzeigen...

Empfohlene Antworten

Veröffentlicht

Hi @all,

ich hab ein kleine skript geschrieben, mir 3 Tabellen anzeigt, wenn ich einen Button Klicke.

1. Button --> Alle Systeme

2. Button --> Aktive Systeme

3. Button --> Inaktive Systeme

Das Funktioniert auch alles wunderbar. Ich möchte jetzt doch aber, dass wenn die Seite das erstemal aufgerufen wird. Alle Systeme angezeigt wird. Ich bekomm das irgendwie nicht gebaken, kann mir jemand helfen ?

Hier ist der code:

 <html>
<form name="form1" method="post" action="system_liste.php">
<div align="center">
<table width="100%" border="0">
<tr>
<td align="center"><input type="submit" name="systeme" value="ALLE Systeme (Aktive / Inaktive)"></td>
<td align="center"><input type="submit" name="systeme" value="AKTIVE Systeme"></td>
<td align="center"><input type="submit" name="systeme" value="INAKTIVE Systeme"></td>
</tr>
</table>

</div>
<hr>
</form>

<?php

$all = "ALLE Systeme (Aktive / Inaktive)";
$activ = "AKTIVE Systeme";
$inactiv = "INAKTIVE Systeme";

// Definition der Funktion tabelle_uberschrift() **ANFANG**
function tabelle_ueberschrift(){
echo "<br>";
echo "<br>";
// TABELLE **ANFANG**
echo "<table width=\"817\" border=\"2\" align=\"center\">";
echo "<tr bgcolor=\"#999999\">";
echo "<td width=\"10%\"><div align=\"center\"><font size=\"3\"><b>SYSTEM NAME</b></font></div></td>";
echo "<td width=\"37%\"><div align=\"center\"><font size=\"3\"><b>IP - ADRESSEN</b></font></div></td>";
echo "<td width=\"15%\"><div align=\"center\"><font size=\"3\"><b>LINUX SYSTEM</b></font></div></td>";
echo "<td width=\"14%\"><div align=\"center\"><font size=\"3\"><b>PROZESOREN</b></font></div></td>";
echo "<td width=\"11%\"><div align=\"center\"><font size=\"3\"><b>VIRTUAL RAM</b></font></div></td>";
echo "<td width=\"13%\"><div align=\"center\"><font size=\"3\"><b>STATUS</b></font></div></td>";
echo "</tr>";
}
// Definition der Funktion tabelle_uberschrift() **ENDE**

switch ($_POST["systeme"]){

case "$all":
echo "<div align=\"center\"><font color=\"#000000\" size=\"+4\"><b><u>Alle Systeme (active / inactive)</u></b></font></div>";
// Aufruf der Funktion
tabelle_ueberschrift();
// Ausgabe des Skriptes
$output=shell_exec("/cust/clone/clones_status.rexx all html");
echo "<pre>$output</pre>";
// TABELLE WIRD im Skript /cust/clone/clones_status.rexx geschlossen !
// TABELLE **ENDE**
break;

case "$activ":
echo "<div align=\"center\"><font color=\"#000000\" size=\"+4\"><b><u>Aktive Systeme</u></b></font></div>";
// Aufruf der Funktion
tabelle_ueberschrift();
// Ausgabe des Skriptes
$output=shell_exec("/cust/clone/clones_status.rexx active html");
echo "<pre>$output</pre>";
// TABELLE WIRD im Skript /cust/clone/clones_status.rexx geschlossen !
// TABELLE **ENDE**
break;


case "$inactiv":
echo "<div align=\"center\"><font color=\"#000000\" size=\"+4\"><b><u>Inaktive Systeme</u></b></font></div>";
// Aufruf der Funktion
tabelle_ueberschrift();
// Ausgabe des Skriptes
$output=shell_exec("/cust/clone/clones_status.rexx inactive html");
echo "<pre>$output</pre>";
// TABELLE WIRD im Skript /cust/clone/clones_status.rexx geschlossen !
// TABELLE **ENDE**
break;
}
?>
</html>
[/php]

Vorschlag: am Anfang anpassen:


<?php
$all = "ALLE Systeme (Aktive / Inaktive)";
$activ = "AKTIVE Systeme";
$inactiv = "INAKTIVE Systeme";

// Obacht, jetzt kummts

if (isset($_POST["systeme"]))
$sys = $_POST["systeme";
else
$sys = $all;
?>
[/PHP]

und später dann stattdessen

[PHP]
switch ($sys){

?>

hollaröhdulljöh

Reinhold

Gute idee, danke für den tip

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.