mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
This commit is contained in:
@@ -16,27 +16,44 @@
|
||||
die('Fehler beim Verbindungsaufbau!');
|
||||
mssql_select_db(STPDB_DB, $conn_ext);
|
||||
|
||||
$tabellen=array("studiengang","person","lv","adresse","EMail","Note","SemesterplanEintrag","StudienGebuehren","StudienplanEintrag","StgVertiefung","StudIO","_person_studiengang");
|
||||
$tabellen=array("studiengang","person","lv","adresse","EMail","Note","SemesterplanEintrag","StudienGebuehren","StudienplanEintrag","StgVertiefung","StudIO","_person_studiengang","cxPersonTyp","cxStudStatus");
|
||||
|
||||
if (isset($_POST['sql']))
|
||||
$sql=$_POST['sql'];
|
||||
else
|
||||
$sql='SELECT TOP 30 * FROM ';
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>DB-CHECK DB StPoelten</title>
|
||||
<title>DB-CHECK DB-StPoelten</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link href="../../../skin/vilesci.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<form action="" method="POST">
|
||||
<input type="text" name="sql" size="150" value="<?php echo $sql; ?>">
|
||||
<input type="submit">
|
||||
</form>
|
||||
<?php
|
||||
if (isset($_GET['table']))
|
||||
if (isset($_GET['table']) || isset($_POST['sql']))
|
||||
{
|
||||
$sql='SELECT count(*) AS anz FROM '.$_GET['table'].';';
|
||||
if ($ergebnis = mssql_query($sql,$conn_ext))
|
||||
if (!isset($_POST['sql']))
|
||||
{
|
||||
$row=mssql_fetch_object($ergebnis);
|
||||
echo '<H1>Tabelle: <strong>'.$_GET['table'].'</strong> ('.$row->anz.' Eintraege)</H1>';
|
||||
$sql='SELECT count(*) AS anz FROM '.$_GET['table'].';';
|
||||
|
||||
if ($ergebnis = mssql_query($sql,$conn_ext))
|
||||
{
|
||||
$row=mssql_fetch_object($ergebnis);
|
||||
echo '<H1>Tabelle: <strong>'.$_GET['table'].'</strong> ('.$row->anz.' Eintraege)</H1>';
|
||||
}
|
||||
$sql='SELECT TOP 50 * FROM '.$_GET['table'];
|
||||
if (isset($_GET['orderby']))
|
||||
$sql.=' ORDER BY '.$_GET['orderby'];
|
||||
$sql.=';';
|
||||
}
|
||||
$sql='SELECT TOP 50 * FROM '.$_GET['table'].';';
|
||||
else
|
||||
$sql=$_POST['sql'];
|
||||
if ($ergebnis = mssql_query($sql,$conn_ext))
|
||||
{
|
||||
$j=0;
|
||||
@@ -44,7 +61,13 @@
|
||||
for ($i = 0; $i < mssql_num_fields($ergebnis); $i++)
|
||||
{
|
||||
$infos = mssql_fetch_field($ergebnis, $i);
|
||||
echo '<td>'.$infos->name.' ('.$infos->type.')</td>';
|
||||
echo '<td>'.$infos->name.' ('.$infos->type.')';
|
||||
if (isset($_GET['table']))
|
||||
{
|
||||
echo ' <a href="?table='.$_GET['table'].'&orderby='.$infos->name.'">↑</a>';
|
||||
echo ' <a href="?table='.$_GET['table'].'&orderby='.$infos->name.' DESC">↓</a>';
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
while ($row=mssql_fetch_row($ergebnis))
|
||||
@@ -57,6 +80,8 @@
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
else
|
||||
echo '<BR>'.$sql.'<BR>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user