PHP Classes

File: treev6.php-gtk

Recommend this page to a friend!
  Classes of Luis Martinez Ulloa   mygrid   treev6.php-gtk   Download  
File: treev6.php-gtk
Role: Example script
Content type: text/plain
Description: gui, example of use
Class: mygrid
Display MySQL query results in a PHP-GTK window
Author: By
Last change: change of comments language to english.
Date: 17 years ago
Size: 868 bytes
 

Contents

Class file image Download
<?php
//glade block
   
include "mygrid6.inc";

   
$glade= new GladeXML('treeview.glade');
   
$treevLista = $glade->get_widget('treevLista');//el widget treeview
   
$window = $glade->get_widget('windowtreev');
   
$window->connect_simple('destroy', array('Gtk','main_quit'));
   
//connection **********************************************************
   
$conexion = mysql_connect("localhost","obc","");
   
mysql_select_db("db_bancos", $conexion);
//data link and widget with an instance of class*****
   
$lista = new mylista(Gtk::TYPE_STRING, Gtk::TYPE_STRING,Gtk::TYPE_STRING);
   
$lista->enlaza($treevLista);
   
$lista->columnas(array('cod', 'nombre','pass'));
   
$lista->carga($conexion,"select F2CODUSER, F2NOMUSER, F2PASUSER from ef2users");
//******************************************************************************
   
$window->show_all();
   
Gtk::main();
?>