Login   Register  
PHP Classes
elePHPant
Icontem

File: treev6.php-gtk

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 7 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_STRINGGtk::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();
?>