Login   Register  
PHP Classes
elePHPant
Icontem

File: example.tables.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of GUSTAVO MENA  >  Tables Properties Progress ODBC  >  example.tables.php  >  Download  
File: example.tables.php
Role: Example script
Content type: text/plain
Description: Example
Class: Tables Properties Progress ODBC
Retrieve tables and fields of a Progress database
Author: By
Last change: Correction
Date: 6 years ago
Size: 1,648 bytes
 

Contents

Class file image Download
<html>
 <head>
  <title>Odbc Progress Report</title>
 </head>
<body>
<? 
 
include_once("tables.class.php");
 
$tablasObj = new tables();
 
$tables $tablasObj->getTables();
 
$tablasObj->getDSN();
 
?>
<form method="post"  enctype="multipart/form-data">
 <div align="center" >
  <table border="1" class="titulo"> 
  <tr>
   <td>Table : 
    <select name="table">
    <? 
    
if(isset($_POST['prop'])){
      
$table $_POST['table'];
     }

    foreach(
$tables as $name){
     if(
$table==$name){
       echo 
"<option value=\"$name\" SELECTED>$name</option>";
     }else{
      echo 
"<option value=\"$name\">$name</option>";    
     }
    }
?>    
    </select>    
   </td>
   <td>
   <input type="submit" name="prop" value="Properties">
   </td>
  </tr>
  </table>
 </div>
 </form>
 <?
 
if(isset($_POST['prop'])){
      
$table $_POST['table'];
      
 
?>
 <table border="1" align="center">
  <!---->
  <tr>
   <td><b>*** FIELDS ***</b></td>
  </tr>
  <tr>
   <td>
    <div style="overflow:auto;width:725px;height:170px">
    <?  echo $tablasObj->getFieldName($table); ?>
    </div>
   </td>
  </tr>
  
  <tr>
   <td><b>*** PRIMARY KEY ***</b></td>
  </tr>
  
  <tr>
   <td>
    <div style="overflow:auto;width:725px;height:170px">
    <? $tablasObj->displayRs($tablasObj->getPrimaryKey($table));?>
    </div>
   </td>
  </tr>
  
  <tr>
   <td>
   <b> *** INDEX ***</b>
   </td>
  </tr> 
  <tr>
   <td>
    <div style="overflow:auto;width:725px;height:170px">
     <? $tablasObj->displayRs($tablasObj->getIndex($table)); ?>
    </div>
   </td>
  </tr>
 </table>
 <? ?>
</body>
</html>