Login   Register  
PHP Classes
elePHPant
Icontem

File: tbl_cities.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of saulo hernandez  >  DBGridMx  >  tbl_cities.php  >  Download  
File: tbl_cities.php
Role: Example script
Content type: text/plain
Description: table cities example
Class: DBGridMx
Show and manipulate MySQL records in a table grid
Author: By
Last change:
Date: 2012-11-01 13:36
Size: 2,471 bytes
 

Contents

Class file image Download
<?php include "dbgrid.class.php";
 include 
"sysconfig.php";
 
//instancia de objeto tabla
 
$mitabla = new DbGrid(10,0,"cities","Select * ",0,"id_city","",CONN_HOST,CONN_USER,CONN_PASS,CONN_DB,"tbl_cities.php");
 
$mitabla->set_style("Professional"); // Olive,Professional,Sand,Silver,Purple
$mitabla->set_UseMenu(True);
$mitabla->set_FileFieldSettings("flds_cities.ini");
$mitabla->Add_Button("AddNew");
$mitabla->Add_ButtonConfig("AddNew","Visible","si");
$mitabla->Add_ButtonConfig("AddNew","Label","Agregar");
$mitabla->Add_ButtonConfig("AddNew","Type","Button");
$mitabla->Add_ButtonConfig("AddNew","Link","");
$mitabla->Add_buttonConfig("AddNew","Icon","newfoldericon.png");
$mitabla->Add_Button("Search");
$mitabla->Add_ButtonConfig("Search","Visible","si");
$mitabla->Add_ButtonConfig("Search","Label","Buscar");
$mitabla->Add_ButtonConfig("Search","Type","Button");
$mitabla->Add_ButtonConfig("Search","Link","");
$mitabla->Add_buttonConfig("Search","Icon","Find-icon22x22.png");
$mitabla->Add_Button("View");
$mitabla->Add_ButtonConfig("View","Visible","si");
$mitabla->Add_ButtonConfig("View","Label","Ver Registro Completo");
$mitabla->Add_ButtonConfig("View","Type","FrmAction");
$mitabla->Add_ButtonConfig("View","Link","");
$mitabla->Add_buttonConfig("View","Icon","browse.gif");
$mitabla->Add_Button("Update");
$mitabla->Add_ButtonConfig("Update","Visible","si");
$mitabla->Add_ButtonConfig("Update","Label","Editar Registro");
$mitabla->Add_ButtonConfig("Update","Type","FrmAction");
$mitabla->Add_ButtonConfig("Update","Link","");
$mitabla->Add_buttonConfig("Update","Icon","edit.gif");
$mitabla->Add_Button("Delete");
$mitabla->Add_ButtonConfig("Delete","Visible","si");
$mitabla->Add_ButtonConfig("Delete","Label","Borrar Registro");
$mitabla->Add_ButtonConfig("Delete","Type","FrmAction");
$mitabla->Add_ButtonConfig("Delete","Link","");
$mitabla->Add_buttonConfig("Delete","Icon","delete.gif");
$item=Null;
$inip=0;
$recoper=Null;
$oper=Null;
$item=Null;
$value=Null;
if (isset(
$_REQUEST['page']))
$inip=$_REQUEST['page'];
//Operaciones con el registro
if (isset($_REQUEST['rec_oper']))
 {   
$recoper=$_REQUEST['rec_oper'];
   
$item=$_REQUEST['item'];
   
$value=$_REQUEST['value'];
}        
//operaciones con los Formularios
if (isset($_REQUEST['operacion']))
   {
   
$oper=$_REQUEST['operacion'];
   
$item=$_REQUEST['item'];
   }
$mitabla->run($inip,$recoper,$oper,$item,$value,$_REQUEST);
?>