Added new classes for editing db structure
This commit is contained in:
parent
37918b696e
commit
b2a0a12716
2
sys/db
2
sys/db
@ -1 +1 @@
|
|||||||
Subproject commit 9acb171729f56734e2306f909f3ab41041f471a1
|
Subproject commit 1344f2fb85cd1ed3b8dd0ea61d3b05c7f9c1302d
|
33
sys/widgets/db_structure_widget.php
Normal file
33
sys/widgets/db_structure_widget.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* OpenSQLManager
|
||||||
|
*
|
||||||
|
* Free Database manager for Open Source Databases
|
||||||
|
*
|
||||||
|
* @package OpenSQLManager
|
||||||
|
* @author Timothy J. Warren
|
||||||
|
* @copyright Copyright (c) 2012
|
||||||
|
* @link https://github.com/aviat4ion/OpenSQLManager
|
||||||
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class for generating db-structure editing views
|
||||||
|
*
|
||||||
|
* @package OpenSQLManager
|
||||||
|
* @subpackage Widgets
|
||||||
|
*/
|
||||||
|
class DB_Structure_Widget extends GTKTable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the class
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// End of db_structure_widget.php
|
54
sys/windows/edit_table.php
Normal file
54
sys/windows/edit_table.php
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* OpenSQLManager
|
||||||
|
*
|
||||||
|
* Free Database manager for Open Source Databases
|
||||||
|
*
|
||||||
|
* @package OpenSQLManager
|
||||||
|
* @author Timothy J. Warren
|
||||||
|
* @copyright Copyright (c) 2012
|
||||||
|
* @link https://github.com/aviat4ion/OpenSQLManager
|
||||||
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Window for editing db table structure
|
||||||
|
*
|
||||||
|
* @package OpenSQLManager
|
||||||
|
* @subpackage Windows
|
||||||
|
*/
|
||||||
|
class Edit_Table extends GtkWindow {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database fields for the current database table
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $fields;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the window, and set basic properties
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @param array $fields
|
||||||
|
*/
|
||||||
|
public function __construct($name="", array $fields=array())
|
||||||
|
{
|
||||||
|
// Create the window
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
if ( ! empty($name))
|
||||||
|
{
|
||||||
|
$this->set_title($name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty($fields))
|
||||||
|
{
|
||||||
|
$this->fields = $fields;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// End of edit_table.php
|
Reference in New Issue
Block a user