<?php include "dbgrid.class.php";
include "sysconfig.php";
//instancia de objeto tabla
$mitabla = new DbGrid(10,0,"users","Select * ",0,"iduser","",CONN_HOST,CONN_USER,CONN_PASS,CONN_DB,"tbl_users.php");
$mitabla->set_style("Professional"); // Olive,Professional,Sand,Silver,Purple
$mitabla->set_UseMenu(True);
$mitabla->set_FileFieldSettings("flds_users.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);
?>
|