next up previous contents
Next: showgraf.php4 Up: Quellcode Previous: check_profile.php4   Contents


menugraf.php4


<?php
  /*******************************************
  /* Programm menugraph.php4
  /* lets select data to be displayed
  /* (c) Copyright 2002, Jens Bierkandt
  /* e-mail: jens@bierkandt.org
  /* Entstanden im Rahmen meiner Diplomarbeit
  /*******************************************
  */
  // Name of computers needed
  set_time_limit(60);
  error_reporting(63); // 0 = none, 63 = full
  include("./config.php4");
  // Check, if table name is given
  if (!isset($table))
  Header("Location: index.php4"); // Forward user to main
    page to reselect table
  $db = mysql_connect($hostname, $username, $password);
  if (!$db) {
    return;
  }
  mysql_select_db($database, $db);
  $result = mysql_query("SELECT `name`,`computer` FROM
    `admin` WHERE table_name=\"$table\"", $db);
  echo mysql_error($db);
  $row = mysql_fetch_row($result);
  $name = $row[0];
  $computer = $row[1];
  mysql_close($db);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Optionen der Messwerte</title>
</head>
<body>
<center><a href="http://www.tu-ilmenau.de">
<img src="tu_header.jpg" width=574 height=40 align="middle"
  border=0></a>
<h1>Anzeigeoptionen für
<?php
  echo $computer;
?>
</h1>
<form action="showgraf.php4" method="POST">
<table border="1" width=600>
<tr>
<td colspan=3>
<table align="left">
<tr><td>
<b>Art der Anzeige:</b>
</td><td>
<input type="radio" name="type" value="temp" checked>
  Temperaturkurve
<input type="radio" name="type" value="count"> Häufigkeit
<input type="checkbox" name="stat" value="1" checked>
  Statistik
</td></tr>
<tr><td></td><td>
<input type="radio" name="type" value="diff_count">
  Temperaturhübe
</td></tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table align="left">
<tr>
<td><b>Sensorauswahl:</b></td>
</tr>
<tr>
<td><input type="checkbox" checked name="sensor[]"
  value="1"> Sensor 1</td>
<td><input type="checkbox" name="max[]" value="1"> Max</td>
<td><input type="checkbox" name="min[]" value="1"> Min</td>
</tr>
<tr>
<td><input type="checkbox" name="sensor[]" value="2">
  Sensor 2</td>
<td><input type="checkbox" name="max[]" value="2"> Max</td>
<td><input type="checkbox" name="min[]" value="2"> Min</td>
</tr>
<tr>
<td><input type="checkbox" name="sensor[]" value="3">
  Sensor 3</td>
<td><input type="checkbox" name="max[]" value="3"> Max</td>
<td><input type="checkbox" name="min[]" value="3"> Min</td>
</tr>
<tr>
<td><input type="checkbox" name="sensor[]" value="4">
  Sensor 4</td>
<td><input type="checkbox" name="max[]" value="4"> Max</td>
<td><input type="checkbox" name="min[]" value="4"> Min</td>
</tr>
<tr>
<td><input type="checkbox" name="sensor[]" value="5">
  Sensor 5</td>
<td><input type="checkbox" name="max[]" value="5"> Max</td>
<td><input type="checkbox" name="min[]" value="5"> Min</td>
</tr>
<tr>
<td><input type="checkbox" name="sensor[]" value="6">
  Sensor 6</td>
<td><input type="checkbox" name="max[]" value="6"> Max</td>
<td><input type="checkbox" name="min[]" value="6"> Min</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td><b>Bildgröße:</b></td>
</tr>
<tr>
<td><input type="radio" checked name="size"
  value="600x400"> 600x400</td>
</tr>
<tr>
<td><input type="radio" name="size" value="800x600">
  800x600</td>
</tr>
<tr>
<td><input type="radio" name="size" value="1024x786">
  1024x786</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr><td><input type="radio" name="size"> variabel</td></tr>
<tr><td>x: <input type="text" name="width_graph" size="6"
  value="800"> Pixel</td></tr>
<tr><td>y: <input type="text" name="height_graph" size="6"
  value="400"> Pixel</td></tr>
</table>
<td valign="top">
<table>
<tr>
<td><b>Skalierung:</b></td>
</tr>
<tr>
<td><input type="radio" checked name="scale" value="auto">
  automatisch</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><input type="radio" name="scale" value="man">
  manuell</td>
</tr>
<tr>
<td>Minimum: <input type="text" name="scale_min" size="3"
  value="35">°C</td>
</tr>
<tr>
<td>Maximum: <input type="text" name="scale_max" size="3"
  value="45">°C</td>
</tr>
</table>
</td>
</tr>
<tr><td valign="top">
<table>
<tr>
<td colspan=2><b>Zeitraum:</b></td>
</tr>
<tr>
<td><input checked type="radio" name="timedef"
  value="yesterday"></td><td align="left">gestern</td >
</tr>
<tr>
<td>
<input type="radio" name="timedef" value="since"></td><td>
die letzten&nbsp;<input type="text" name="days" value="7"
  size="3">&nbsp;Tage</td>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</tr>
<tr>
<td valign="top">
<input type="radio" name="timedef"
  value="diff"></td><td>von (tt/mm/jj)<br>
<input type="text" name="from_d" size="2" value=""
  maxlength="2">.
<input type="text" name="from_m" size="2" value=""
  maxlength="2">.
<input type="text" name="from_y" size="2" value=""
  maxlength="2"><br>
<input type="text" name="from_h" size="2" value="00"
  maxlength="2">:
<input type="text" name="from_min" size="2" value="00"
  maxlength="2">:
<input type="text" name="from_s" size="2" value="00"
  maxlength="2">&nbsp;Uhr<br></td>
<td>bis (tt/mm/jj)<br>
<input type="text" name="to_d" size="2" value=""
  maxlength="2">.
<input type="text" name="to_m" size="2" value=""
  maxlength="2">.
<input type="text" name="to_y" size="2" value=""
  maxlength="2"><br>
<input type="text" name="to_h" size="2" value="23"
  maxlength="2">:
<input type="text" name="to_min" size="2" value="59"
  maxlength="2">:
<input type="text" name="to_s" size="2" value="59"
  maxlength="2">&nbsp;Uhr<br>
</td>
</tr>
</table>
</td><td valign="top" colspan=2>
<table>
<tr>
<td><b>Weitere Optionen:</b></td>
</tr>
<tr>
<td>Glättung über <input type="text" name="average"
  value=10 size=5 maxlength=5> Werte</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><B> Nur für Temperaturhübe:</B></td>
</tr>
<tr>
<td>Dauer der Hübe:
von <input type="text" name="diff_min" value="10" size="3"
  maxlength="5"> s
bis  <input type="text" name="diff_max" value="60" size="3"
  maxlength="5"> s
</td>
</tr>
<tr>
<td>Auflösung Temperaturhub: <input type="text"
  name="temp_diff" value=2 size=3 maxlength=3> K</td >
</tr>
<tr>
<td>Auflösung Starttemperatur: <input type="text"
  name="start_diff" value=2 size=3 maxlength=3> K</td >
</tr>
</table></td>
</tr>
</table>
<?php
  echo "<input type=\"hidden\" name=\"table\"
    value=\"$table\">";
  echo "<input type=\"hidden\" name=\"computer\"
    value=\"$computer\">";
?>
<input type="submit" value="Erstellen">
</form>
</body>
</html>



Jens Bierkandt