Location: PHPKode > projects > Katropine DBmanager > dbmanager/list.php
<script>
function showHide(xxx) {
	
		var element = document.getElementById(xxx);
		element.style.display = (element.style.display == "none") ? "block" : "none";
	
}
</script>
<table width="100%" cellpadding="0" cellspacing="0" border="0"  class="default">
<tr class="tbl_title">
	<td id="borders"></td>
	<td id="borders">Name</td>
	<td id="borders">Rows</td>
	<td id="borders">Engine</td>
	<td id="borders">Version</td>
	<td id="borders">Collection</td>
	<td id="borders">Create_time</td>
	<td id="borders">Update_time</td>
</tr>
<?php $i = 1; foreach($db->tables as $table):?>
<tr>
	<td id="borders" style="width:20px; text-align:right;"><?php echo $i++ ;?>.</td>
	<td id="borders">[ <a class="slim" href="javascript: showHide('<?php echo $table->Name;?>')">structure</a> ] <a href="<?php echo $root;?>function=sqlresult&autosql=browse&table=<?php echo $table->Name;?>"><?php echo $table->Name;?></a></td>
	<td id="borders"><?php echo $table->Rows;?></td>
	<td id="borders"><?php echo $table->Engine;?></td>
	<td id="borders"><?php echo $table->Version;?></td>
	<td id="borders"><?php echo $table->Collation;?></td>
	<td id="borders"><?php echo $table->Create_time;?></td>
	<td id="borders"><?php echo $table->Update_time;?></td>
</tr>
<tr>
	<td colspan="8" >
			<div id="<?php echo $table->Name?>" style="display:<?php echo ($_REQUEST['table'] == $table->Name)? 'block' :'none'?>; margin:0px; padding:0px; background-color:#cccccc;">
			<table border="0" width="100%">
					<tr   style=" color:#ffffff; background-color:#000000">
						<td>Field</td>
						<td>Type</td>
						<td>Null</td>
						<td>Key</td>
						<td>Default</td>
						<td>Extra</td>
					</tr>
				<?php $j=0; foreach($table->structure as $column): $j++;?>
					<tr style="background-color: <?php echo ($j%2)? '#ccffcc': '#ffffff';?>;">
						<td>&nbsp;<?php echo $column->Field;?> </td>
						<td>&nbsp;<?php echo $column->Type;?></td>
						<td>&nbsp;<?php echo $column->Null;?></td>
						<td>&nbsp;<?php echo $column->Key;?></td>
						<td>&nbsp;<?php echo $column->Default;?></td>
						<td>&nbsp;<?php echo $column->Extra;?></td>
					</tr>
				<?php endforeach;?>
				</table>
				<table border="0" width="100%">
				<tr   style=" color:#ffffff; background-color:#000000">
						<td>Non_unique</td>
						<td>Key_name</td>
						<td>Seq_in_index</td>
						<td>Column_name</td>
						<td>Collation</td>
						<td>Cardinality</td>
						<td>Sub_part</td>
						<td>Packed</td>
						<td>Null</td>
						<td>Index_type</td>
				</tr>
				<?php $j=0; foreach($table->indexes as $tindex): $j++;?>
					<tr style="background-color: <?php echo ($j%2)? '#ccffcc': '#ffffff';?>;">
						<td>&nbsp;<?php echo $tindex->Non_unique;?> </td>
						<td>&nbsp;<?php echo $tindex->Key_name;?></td>
						<td>&nbsp;<?php echo $tindex->Seq_in_index;?></td>
						<td>&nbsp;<?php echo $tindex->Column_name;?></td>
						<td>&nbsp;<?php echo $tindex->Collation;?></td>
						<td>&nbsp;<?php echo $tindex->Cardinality;?></td>
						<td>&nbsp;<?php echo $tindex->Sub_part;?></td>
						<td>&nbsp;<?php echo $tindex->Packed;?></td>
						<td>&nbsp;<?php echo $tindex->Null;?></td>
						<td>&nbsp;<?php echo $tindex->Index_type;?></td>
					</tr>
					<tr style=" color:#ffffff; background-color:#000000">
						<td>Comment:</td>
						<td colspan="9" style="background-color: <?php echo ($j%2)? '#ccffcc': '#ffffff';?>;"><?php echo $tindex->Comment;?></td>
					</tr>
				<?php endforeach;?>
				</table>
				<table border="0" width="100%">
					<tr style=" color:#ffffff; background-color:#000000">
			          	<td>Row_format</td>
						<td>Avg_row_length</td>
						<td>Data_length</td>
						<td>Max_data_length</td>
						<td>Index_length</td>
						<td>Data_free</td>
						<td>Auto_increment</td>
						<td>Check_time</td>
						<td>Checksum</td>
						<td>Create_options</td>
						
					</tr>
					<tr style="background-color: #ccffcc;">
						<td><?php echo $table->Row_format;?></td>
						<td><?php echo $table->Avg_row_length;?></td>
						<td><?php echo $table->Data_length;?></td>
						<td><?php echo $table->Max_data_length;?></td>
						<td><?php echo $table->Index_length;?></td>
						<td><?php echo $table->Data_free;?></td>
						<td><?php echo $table->Auto_increment;?></td>
						<td><?php echo $table->Check_time;?></td>
						<td><?php echo $table->Checksum;?></td>
						<td><?php echo $table->Create_options;?></td>
						
					</tr>
					<tr style=" color:#ffffff; background-color:#000000">
						<td>Comment:</td>
						<td colspan="9" style="background-color: #ccffcc;"><?php echo $table->Comment;?></td>
					</tr>
					<?php $aaa = $table->Name;?>
					<tr >
						<td colspan="5"><a href="<?php echo $root."function=export&tablename=".$aaa;?>">[Export]</a></td>
						<td>
							<a href="<?=$root?>function=sqlresult&autosql=empty&table=<?php echo $table->Name;?>" style="color:red;">!!!! [EMPTY TABEL: <?php echo $table->Name;?>] </a>
							|
							<a href="<?=$root?>function=sqlresult&autosql=drop&table=<?php echo $table->Name;?>" style="color:red;"> [DROP TABEL: <?php echo $table->Name;?>] !!!!</a>
						</td>
					</tr>
					</table>
			</div>
		
	</td>
</tr>
<?php endforeach;?>
</table>
Return current item: Katropine DBmanager