PHP Classes
elePHPant
Icontem

File: dbacess.php

Recommend this page to a friend!
  Classes of Helio Barbosa  >  PHP FrameWork Class  >  dbacess.php  >  Download  
File: dbacess.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP FrameWork Class
Generate a Web interface to edit database records
Author: By
Last change:
Date: 4 months ago
Size: 1,338 bytes
 

 

Contents

Class file image Download
<?php

    $hostIP
= $_GET['ip'] ;
   
$user = $_GET['user'];
   
$password = $_GET['pass'];
   
$database = $_GET['db'] ;

    include_once(
'connection.php') ;
   
$NewCon = New Conection();
   
$NewCon->setHostNameIP($hostIP);
   
$NewCon->setUserName($user);
   
$NewCon->setPassWord($password);
   
$NewCon->setDbName($database);
   
$rsTables = $NewCon->Conect() ; // return a RecordSet with a list of tables
   
if($rsTables==0)
    {
       
$rsTables = $NewCon->listTables();
    }
   
$rowsTable = count($rsTables);
    if(
$rowsTable>0)
    {
        echo(
"<form id='makeclass_before.php'>") ;
        echo(
"<p>Select table(s) that you want to make class</br>") ;

       
/* try to implement select all */
        //echo( '! - ') ;
        //echo( "<input type='checkbox' name='all_' id='all_' value='all_' onclick='selTable(this)'> Select All </input><br>" ) ;

       
for($x=0; $x < $rowsTable; $x++)
        {
            echo(
$x . ' - ') ;
            echo(
"<input type='checkbox' name='tb_".$rsTables[$x]->getTableName()
                .
"' id='".$rsTables[$x]->getTableName()
                .
"' value='". $rsTables[$x]->getTableName()
                .
"' onclick='selTable(this)'> ".$rsTables[$x]->getTableName() . "<br>" ) ;
        }
        echo (
"<p>
          <input class='input-one' type='button' length='50' value='Work' name='btnWork' onclick='ClassWork()'>
          </input>
        </p>"
);
        echo(
'</form>') ;
    }
?>