PHP Classes

File: showtables.php

Recommend this page to a friend!
  Classes of Marius  >  dbFile  >  showtables.php  >  Download  
File: showtables.php
Role: Application script
Content type: text/plain
Description: showtables.php
Class: dbFile
file based web database and Administrator
Author: By
Last change:
Date: 18 years ago
Size: 1,701 bytes
 

Contents

Class file image Download
<!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:350px; height: 200px}
    </STYLE>
    <script language="javascript" src="js/scrollbar.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(); }
}

    </script>
</head>

<body onload="initScroller();">
<div id="divContent">
<?php

include("common.inc");
$dbf->select_db($DB);

//$query = "SHOW TABLES FROM $DB";
$query = "LIST TABLES";
$result = $dbf->query($query) or die("ERROR");
$num_table = count($result);

print(
"<font color=#FF0000>$num_table</font> tables in database $DB<br><br>");
print(
"<table border=0>");
while(list(
$key,$TABLES) = each($result)) {
print(
"<tr><td><a href=\"showfields.php?DB=$DB&TABLE=$TABLES\" target=\"rightup\">$TABLES</a></td><td><a href=\"javascript: Open_Win('rename.php?DB=$DB&TABLE=$TABLES');\"><img src=\"images/edit.gif\" border=0 alt=\"Rename this table\"></a></td><td><a href=\"javascript: Open_Win('droptable.php?DB=$DB&TABLE=$TABLES');\"><img src=\"images/del.gif\" border=0 alt=\"Drop this table\"></a></td><td><a href=\"javascript: Open_Win('addfield.php?DB=$DB&TABLE=$TABLES');\"><img src=\"images/add.gif\" border=0 alt=\"Add a new field to this table\"></a></td></tr>");
}
print(
"</table>");
?>
</div>

</body>
</html>

For more information send a message to info at phpclasses dot org.