From: Chuck Scott Date: Mon, 5 Mar 2018 21:30:30 +0000 (-0500) Subject: Fixed names of certain data classes X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=483bdffca8e3c1c9d169cf568fcb1b3acecfd1b5;p=WP-Plugins%2Fglm-member-db-assets.git Fixed names of certain data classes --- diff --git a/classes/data/dataAssetType.php b/classes/data/dataAssetType.php deleted file mode 100644 index 1d253b3..0000000 --- a/classes/data/dataAssetType.php +++ /dev/null @@ -1,184 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ - */ - -/** - * GlmDataAssetsAssetTypes class - * - * PHP version 5 - * - * @category Data - * @package GLM Member DB - * @author Chuck Scott - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott - * Exp $ - */ -class GlmDataAssetsAssetTypes extends GlmDataAbstract -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - /** - * Data Table Name - * - * @var $table - * @access public - */ - public $table; - /** - * Field definitions - * - * 'type' is type of field as defined by the application - * text Regular text field - * pointer Pointer to an entry in another table - * 'filters' is the filter name for a particular filter ID in PHP filter - * functions - * See PHP filter_id() - * - * 'use' is when to use the field - * l = List - * g = Get - * n = New - * i = Insert - * e = Edit - * u = Update - * d = Delete - * a = All - * - * @var $ini - * @access public - */ - public $fields = false; - - /** - * Constructor - * - * @param object $d database connection - * @param array $config Configuration array - * @param bool $limitedEdit Flag to say indicate limited edit requested - * - * @return void - * @access public - */ - public function __construct($wpdb, $config, $limitedEdit = false) - { - - // If this class is not being extended along with existing $wpdb and $config - if (!$this->wpdb) { - - // Save WordPress Database object - $this->wpdb = $wpdb; - - // Save plugin configuration object - $this->config = $config; - - } - - /* - * Table Name - */ - $this->table = GLM_MEMBERS_ASSETS_PLUGIN_DB_PREFIX . 'asset_type'; - - /* - * Table Data Fields - */ - - $this->fields = array ( - - // ID - 'id' => array ( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Asset Type Name - 'name' => array ( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'use' => 'a' - ), - - // Description - 'descr' => array ( - 'field' => 'descr', - 'type' => 'text', - 'use' => 'a' - ), - - // Use Type - 'use_type' => array ( - 'field' => 'state', - 'type' => 'list', - 'list' => $this->config['use_type'], - 'force_list' => true, - 'use' => 'a' - ), - - // Lead Time - 'lead_time' => array ( - 'field' => 'lead_time', - 'type' => 'integer', - 'use' => 'a' - ), - - // Reuse Time - 'reuse_time' => array ( - 'field' => 'reuse_time', - 'type' => 'integer', - 'use' => 'a' - ), - - // Cost - 'cost' => array ( - 'field' => 'cost', - 'type' => 'money', - 'use' => 'a' - ), - - // Hold Time - 'hold_time' => array ( - 'field' => 'hold_time', - 'type' => 'integer', - 'use' => 'a' - ), - - // Map Item Type - 'map_item_type' => array ( - 'field' => 'map_item_type', - 'type' => 'list', - 'list' => $this->config['map_item_type'], - 'force_list' => true, - 'use' => 'a' - ) - - ); - - } - -} \ No newline at end of file diff --git a/classes/data/dataAssetTypes.php b/classes/data/dataAssetTypes.php new file mode 100644 index 0000000..1d253b3 --- /dev/null +++ b/classes/data/dataAssetTypes.php @@ -0,0 +1,184 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataAssetsAssetTypes class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataAssetsAssetTypes extends GlmDataAbstract +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Data Table Name + * + * @var $table + * @access public + */ + public $table; + /** + * Field definitions + * + * 'type' is type of field as defined by the application + * text Regular text field + * pointer Pointer to an entry in another table + * 'filters' is the filter name for a particular filter ID in PHP filter + * functions + * See PHP filter_id() + * + * 'use' is when to use the field + * l = List + * g = Get + * n = New + * i = Insert + * e = Edit + * u = Update + * d = Delete + * a = All + * + * @var $ini + * @access public + */ + public $fields = false; + + /** + * Constructor + * + * @param object $d database connection + * @param array $config Configuration array + * @param bool $limitedEdit Flag to say indicate limited edit requested + * + * @return void + * @access public + */ + public function __construct($wpdb, $config, $limitedEdit = false) + { + + // If this class is not being extended along with existing $wpdb and $config + if (!$this->wpdb) { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + } + + /* + * Table Name + */ + $this->table = GLM_MEMBERS_ASSETS_PLUGIN_DB_PREFIX . 'asset_type'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Asset Type Name + 'name' => array ( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Description + 'descr' => array ( + 'field' => 'descr', + 'type' => 'text', + 'use' => 'a' + ), + + // Use Type + 'use_type' => array ( + 'field' => 'state', + 'type' => 'list', + 'list' => $this->config['use_type'], + 'force_list' => true, + 'use' => 'a' + ), + + // Lead Time + 'lead_time' => array ( + 'field' => 'lead_time', + 'type' => 'integer', + 'use' => 'a' + ), + + // Reuse Time + 'reuse_time' => array ( + 'field' => 'reuse_time', + 'type' => 'integer', + 'use' => 'a' + ), + + // Cost + 'cost' => array ( + 'field' => 'cost', + 'type' => 'money', + 'use' => 'a' + ), + + // Hold Time + 'hold_time' => array ( + 'field' => 'hold_time', + 'type' => 'integer', + 'use' => 'a' + ), + + // Map Item Type + 'map_item_type' => array ( + 'field' => 'map_item_type', + 'type' => 'list', + 'list' => $this->config['map_item_type'], + 'force_list' => true, + 'use' => 'a' + ) + + ); + + } + +} \ No newline at end of file diff --git a/classes/data/dataFacilities.php b/classes/data/dataFacilities.php new file mode 100644 index 0000000..d24433f --- /dev/null +++ b/classes/data/dataFacilities.php @@ -0,0 +1,229 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/** + * GlmDataAssetsAssetTypes class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataAssetsAssetTypes extends GlmDataAbstract +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Data Table Name + * + * @var $table + * @access public + */ + public $table; + /** + * Field definitions + * + * 'type' is type of field as defined by the application + * text Regular text field + * pointer Pointer to an entry in another table + * 'filters' is the filter name for a particular filter ID in PHP filter + * functions + * See PHP filter_id() + * + * 'use' is when to use the field + * l = List + * g = Get + * n = New + * i = Insert + * e = Edit + * u = Update + * d = Delete + * a = All + * + * @var $ini + * @access public + */ + public $fields = false; + + /** + * Constructor + * + * @param object $d database connection + * @param array $config Configuration array + * @param bool $limitedEdit Flag to say indicate limited edit requested + * + * @return void + * @access public + */ + public function __construct($wpdb, $config, $limitedEdit = false) + { + + // If this class is not being extended along with existing $wpdb and $config + if (!$this->wpdb) { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + } + + /* + * Table Name + */ + $this->table = GLM_MEMBERS_ASSETS_PLUGIN_DB_PREFIX . 'asset_type'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // ID + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Asset Type Name + 'name' => array ( + 'field' => 'name', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Description + 'descr' => array ( + 'field' => 'descr', + 'type' => 'text', + 'use' => 'a' + ), + + // Address + 'address' => array ( + 'field' => 'address', + 'type' => 'text', + 'use' => 'a' + ), + + // City - References main plugin cities table + 'city' => array ( + 'field' => 'city', + 'type' => 'pointer', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'cities', + 'p_field' => 'name', + 'p_orderby' => 'name', + 'p_blank' => true, + 'force_list' => true, + 'use' => 'a' + ), + + // State + 'state' => array ( + 'field' => 'state', + 'type' => 'list', + 'list' => $this->config['states'], + 'default' => 'MI', + 'force_list' => true, + 'use' => 'a' + ), + + // ZIP / Postal Code + 'zip' => array ( + 'field' => 'zip', + 'type' => 'text', + 'use' => 'a' + ), + + // Country + 'country' => array ( + 'field' => 'country', + 'type' => 'list', + 'list' => $this->config['countries'], + 'default' => 'US', + 'force_list' => true, + 'use' => 'a' + ), + + // Latitude + 'lat' => array( + 'field' => 'lat', + 'type' => 'float', + 'default' => $this->config['settings']['maps_default_lat'], + 'use' => 'a' + ), + + // Longitude + 'lon' => array( + 'field' => 'lon', + 'type' => 'float', + 'default' => $this->config['settings']['maps_default_lon'], + 'use' => 'a' + ), + + // Phone + 'phone' => array ( + 'field' => 'phone', + 'type' => 'text', + 'required' => false, + 'use' => 'a' + ), + + // URl + 'url' => array ( + 'field' => 'url', + 'type' => 'text', + 'use' => 'a' + ), + + // E-Mail + 'email' => array ( + 'field' => 'email', + 'type' => 'text', + 'use' => 'a' + ), + + // Facility Map + 'facility_map' => array( + 'field' => 'facility_map', + 'type' => 'image', + 'use' => 'a' + ) + + ); + + } + +} diff --git a/classes/data/dataFacility.php b/classes/data/dataFacility.php deleted file mode 100644 index d24433f..0000000 --- a/classes/data/dataFacility.php +++ /dev/null @@ -1,229 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ - */ - -/** - * GlmDataAssetsAssetTypes class - * - * PHP version 5 - * - * @category Data - * @package GLM Member DB - * @author Chuck Scott - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataSettingsTerms.php,v 1.0 2011/01/25 19:31:47 cscott - * Exp $ - */ -class GlmDataAssetsAssetTypes extends GlmDataAbstract -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - /** - * Data Table Name - * - * @var $table - * @access public - */ - public $table; - /** - * Field definitions - * - * 'type' is type of field as defined by the application - * text Regular text field - * pointer Pointer to an entry in another table - * 'filters' is the filter name for a particular filter ID in PHP filter - * functions - * See PHP filter_id() - * - * 'use' is when to use the field - * l = List - * g = Get - * n = New - * i = Insert - * e = Edit - * u = Update - * d = Delete - * a = All - * - * @var $ini - * @access public - */ - public $fields = false; - - /** - * Constructor - * - * @param object $d database connection - * @param array $config Configuration array - * @param bool $limitedEdit Flag to say indicate limited edit requested - * - * @return void - * @access public - */ - public function __construct($wpdb, $config, $limitedEdit = false) - { - - // If this class is not being extended along with existing $wpdb and $config - if (!$this->wpdb) { - - // Save WordPress Database object - $this->wpdb = $wpdb; - - // Save plugin configuration object - $this->config = $config; - - } - - /* - * Table Name - */ - $this->table = GLM_MEMBERS_ASSETS_PLUGIN_DB_PREFIX . 'asset_type'; - - /* - * Table Data Fields - */ - - $this->fields = array ( - - // ID - 'id' => array ( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Asset Type Name - 'name' => array ( - 'field' => 'name', - 'type' => 'text', - 'required' => true, - 'use' => 'a' - ), - - // Description - 'descr' => array ( - 'field' => 'descr', - 'type' => 'text', - 'use' => 'a' - ), - - // Address - 'address' => array ( - 'field' => 'address', - 'type' => 'text', - 'use' => 'a' - ), - - // City - References main plugin cities table - 'city' => array ( - 'field' => 'city', - 'type' => 'pointer', - 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'cities', - 'p_field' => 'name', - 'p_orderby' => 'name', - 'p_blank' => true, - 'force_list' => true, - 'use' => 'a' - ), - - // State - 'state' => array ( - 'field' => 'state', - 'type' => 'list', - 'list' => $this->config['states'], - 'default' => 'MI', - 'force_list' => true, - 'use' => 'a' - ), - - // ZIP / Postal Code - 'zip' => array ( - 'field' => 'zip', - 'type' => 'text', - 'use' => 'a' - ), - - // Country - 'country' => array ( - 'field' => 'country', - 'type' => 'list', - 'list' => $this->config['countries'], - 'default' => 'US', - 'force_list' => true, - 'use' => 'a' - ), - - // Latitude - 'lat' => array( - 'field' => 'lat', - 'type' => 'float', - 'default' => $this->config['settings']['maps_default_lat'], - 'use' => 'a' - ), - - // Longitude - 'lon' => array( - 'field' => 'lon', - 'type' => 'float', - 'default' => $this->config['settings']['maps_default_lon'], - 'use' => 'a' - ), - - // Phone - 'phone' => array ( - 'field' => 'phone', - 'type' => 'text', - 'required' => false, - 'use' => 'a' - ), - - // URl - 'url' => array ( - 'field' => 'url', - 'type' => 'text', - 'use' => 'a' - ), - - // E-Mail - 'email' => array ( - 'field' => 'email', - 'type' => 'text', - 'use' => 'a' - ), - - // Facility Map - 'facility_map' => array( - 'field' => 'facility_map', - 'type' => 'image', - 'use' => 'a' - ) - - ); - - } - -}