Файл: MysqlIManager/MysqlIManager/showfields.php
Строк: 100
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<link rel="stylesheet" href="settings.css" type="text/css">
<STYLE>
#divContent {position:absolute; top:0; left:0; width:250px; height: 200px}
</STYLE>
<script language="javascript" src="js/scrollbar3.js"></script>
<script language="JavaScript">
function Open_Win(location) {
var winl = (screen.width - 400) / 2;
var wint = (screen.height - 200) / 2;
win = window.open(location, '', 'width=400, height=200, top='+wint+', left='+winl+', scrollbars=yes')
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function Open_Win2(location) {
var winl = (screen.width - 600) / 2;
var wint = (screen.height - 500) / 2;
win = window.open(location, '', 'width=600, height=500, top='+wint+', left='+winl+', scrollbars=yes')
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
</script>
</head>
<body onload="initScroller();">
<div id="divContent">
<?php
include("common.inc");
mysql_select_db($DB, $connection);
$query = "SELECT * FROM $TABLE";
$result = mysql_query($query) or die("ERROR");
$num_record = mysql_num_rows($result);
$fields = mysql_num_fields($result);
$rows = mysql_num_rows($result);
$i = 0;
print("<font color=#FF0000>$fields</font> fields, <font color=#FF0000>$num_record</font> records in table $TABLE<br><br><center><a href="javascript: Open_Win2('viewrecord.php?DB=$DB&TABLE=$TABLE');"><img src="images/view.jpg" border=0 alt="View records in table $TABLE"></a></center><br>");
print("<table border=0>");
while ($i < $fields) {
$type = mysql_field_type($result, $i);
$name = mysql_field_name($result, $i);
$len = mysql_field_len($result, $i);
$flags = mysql_field_flags($result, $i);
print("<tr><td valign=top><font color=#000066>$name</font><font color=#000000>($type $len $flags)</font></td><td valign=top><a href="javascript: Open_Win('editfield.php?Field=$name&DB=$DB&TABLE=$TABLE&type=$type&flags=$flags&len=$len');"><img src="images/edit.gif" border=0 alt="Edit properties of this field"></a></td><td valign=top><a href="javascript: Open_Win('dropfield.php?Field=$name&DB=$DB&TABLE=$TABLE');"><img src="images/del.gif" border=0 alt="Drop this field"></a></td></tr>");
$i++;
}
?>
</table>
</div>
</body>
</html>