Login   Register  
PHP Classes
elePHPant
Icontem

File: guibuillder/responsejs.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jorge Prado  >  My Rad 4 PHP  >  guibuillder/responsejs.php  >  Download  
File: guibuillder/responsejs.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: My Rad 4 PHP
Generate PHP class from MySQL table
Author: By
Last change:
Date: 2013-05-10 10:32
Size: 833 bytes
 

Contents

Class file image Download
<?php
    
require("../config/setings.php");
    require(
'../config/setup.php');
    
$dc = new datacontex();
    
    if(isset(
$_POST))
    {
        switch(
$_POST["function"])
        {
            case 
"getfieldsoftable":
                
$acamposmetaordenados=array();
                
$aCampos=array();
                
$tabla $dc->tablas[$_POST["parametros"]];
                foreach(
$tabla->metatabla->aCampos as $campometa)
                {
                    
$acamposmetaordenados[$campometa->posicion]=$campometa;
                }
                foreach(
$acamposmetaordenados as $metacampo)
                {
                    
$aCampos[]=array($metacampo->nombre,$metacampo->displayname);
                }            
                echo 
json_encode($aCampos);
                break;
        }
    }
    exit;
    
?>