+++ /dev/null
-#!/usr/bin/perl
-
-### extract
-
-use DBI;
-
-$db_user="root";
-$dbi_string="DBI:mysql:nadiraktuell";
-
-die "parameter [-form] tableName" if ($#ARGV>1 | $#ARGV==-1);
-die unless ($dbh=DBI->connect($dbi_string,$db_user));
-
-$form=0;
-
-if ($#ARGV == 1){
- $form=1;
- $tableName=$ARGV[1];
-}
-else {
- $tableName=$ARGV[0];
-}
-
-$sth=$dbh->prepare(<<EO_QUERY);
-show fields from $tableName
-EO_QUERY
-
-$sth->execute;
-
-if (defined $sth) {
-
- print(<<HEAD);
-<html>
-<head>
-<title>
-nadiraktuell.$tableName
-</title>
-<head>
-
-<body>
-<B>nadiraktuell.$tableName</B><P>
-HEAD
-
-
- if ($form==1) {
- print "<form action=\"/scripts/NadirAktuell\">
-\t<input type=hidden name=module value=$tableName>
- <input type=\"hidden\" name=\"id\" value=\"\${id}\">
- <if new>
- <input type=\"hidden\" name=\"do\" value=\"insert\">
- <else>
- <input type=\"hidden\" name=\"do\" value=\"update\">
- </if>
-
-<table border=\"0\">\n";
- }
-#
-# Schleife
-
- while (@data=$sth->fetchrow_array) {
-
- print "\n<tr>\n<td align=\"right\"><B>$data[0]:</B></td>\n";
- if ($form==1) {
- print "<td><input type=\"text\" size=\"40\" name=\"$data[0]\" value=\"\$\{$data[0]\}\"></td>\n";
- }
- else {
- print "<td><\$\{$data[0]\}></td>\n";
- }
- print "</tr>\n\n";
-
- }
-
- if ($form==1) {
- print "<td colspan=\"2\" align=\"right\">
-<if new>
-<input type=\"submit\" name=\"save\" value=\"einfügen\">
-<else>
-<input type=\"submit\" name=\"save\" value=\"speichern\">
-</if>
-</td>
-</form>
-</table>";
- }
-
-print(<<BODY);
-
-</body>
-</html>
-BODY
-}
-
-$sth->finish;
-$dbh->disconnect;
-