* @access private
*/
private $dbVersions = array(
- '0.1' => array('version' => '0.1', 'tables' => 22)
+ '0.1' => array('version' => '0.1', 'tables' => 24)
);
/**
--- /dev/null
+<?php
+
+/**
+ * GLM Member-DB WordPress Plugin
+ * Accommodation Types data class
+ *
+ * PHP version 5.3
+ *
+ * @category Data
+ * @package GLM Member-DB
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMemberType.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/**
+ * EventManagementDataAccommodationTypes class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott
+ * Exp $
+ * @link http://www.visitgreatlakesbay.org/
+ */
+abstract class GlmDataAccommodationTypes extends GlmDataAbstract
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @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
+ *
+ * @return void
+ * @access public
+ */
+ function __construct ($wpdb, $config)
+ {
+ parent::__construct($wpdb, $config);
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Table Name
+ */
+ $this->table = GLM_MEMBERS_PLUGIN_DB_PREFIX . 'accommodation_types';
+
+ /*
+ * Table Data Fields
+ */
+ $this->fields = array(
+
+ 'id' => array(
+ 'field' => 'id',
+ 'type' => 'integer',
+ 'view_only' => true,
+ 'use' => 'a'
+ ),
+
+ // Facility Type
+ 'facility_type' => array (
+ 'field' => 'facility_type',
+ 'type' => 'list',
+ 'list' => $this->config['facility_type'],
+ 'required' => true,
+ 'use' => 'a'
+ ),
+
+ // Name
+ 'name' => array(
+ 'field' => 'name',
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Short Description
+ 'short_descr' => array(
+ 'field' => 'short_descr',
+ 'type' => 'text',
+ 'use' => 'a'
+ )
+
+
+ );
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
+ }
+
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * GLM Member-DB WordPress Plugin
+ * Categories data class
+ *
+ * PHP version 5.3
+ *
+ * @category Data
+ * @package GLM Member-DB
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMemberType.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/**
+ * EventManagementDataCategories class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott
+ * Exp $
+ * @link http://www.visitgreatlakesbay.org/
+ */
+abstract class GlmDataCategories extends GlmDataAbstract
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @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
+ *
+ * @return void
+ * @access public
+ */
+ function __construct ($wpdb, $config)
+ {
+ parent::__construct($wpdb, $config);
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Table Name
+ */
+ $this->table = GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories';
+
+ /*
+ * Table Data Fields
+ */
+ $this->fields = array(
+
+ 'id' => array(
+ 'field' => 'id',
+ 'type' => 'integer',
+ 'view_only' => true,
+ 'use' => 'a'
+ ),
+
+ // Name
+ 'name' => array(
+ 'field' => 'name',
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'use' => 'a'
+ ),
+
+ // Parent
+ 'parent' => array(
+ 'field' => 'parent',
+ 'type' => 'pointer',
+ 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'categories',
+ 'p_field' => 'name',
+ 'p_orderby' => 'name',
+ 'p_blank' => true,
+
+ 'required' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'type' => 'text',
+ 'use' => 'a'
+ ),
+
+ // Short Description
+ 'short_descr' => array(
+ 'field' => 'short_descr',
+ 'type' => 'text',
+ 'use' => 'a'
+ )
+
+
+ );
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($this->fields, 'DataBlock', 'Table Fields: '.$this->table);
+ }
+
+ }
+}
+
+?>
\ No newline at end of file
'configure' => array(
'index',
'memberTypes',
+ 'categories',
'cities',
- 'regions'
+ 'regions',
+ 'accommodationTypes'
),
'error' => array(
'index',
}
/* Admin table additions */
+.glm-admin-table {
+ border: 3px #ddd solid !important;
+}
+.glm-admin-table thead th{
+ border-bottom: 3px #ddd solid !important;
+ font-size: 15px;
+ font-weight: bold;
+}
.glm-table-fieldname {
text-align: left;
vertical-align: top;
}
/* Overlay dialog box */
+.glm-dialog-box {
+ display: none;
+}
.ui-dialog {
background: #fff;
border: 1px black solid;
$field_val = 'COALESCE(sum('.$field_val.'), 0) ';
}
- $field = "(
- SELECT ".$field_val."
- FROM ".$f['p_table']."
- $from
- WHERE $where
- ) ";
+ // Check for "as" option
+ $as = $f['field'];
+ if (isset($f['as']) && $f['as'] != '') {
+ $as = $f['as'];
+ }
+
+ $field = "
+ COALESCE(
+ (
+ SELECT ".$field_val."
+ FROM ".$f['p_table']."
+ $from
+ WHERE $where
+ ), null
+ ) AS $as
+ ";
return $field;
}
{
// If the operation is Edit then we need to also get the options for select (unless it's p_static)
- if ($forEdit && !($f['p_static'] === true)) {
+ if ($forEdit && !(isset($f['p_static']) && $f['p_static'] === true)) {
// Get current value of pointer
if ($id) {
FROM ".$this->table."
WHERE $idfield = $id
";
- $d = $this->wpdb->get_results($sql, ARRAY_A);
- $p_value = $d['id'];
+ $p_data = $this->wpdb->get_row($sql, ARRAY_A);
+ $p_value = $p_data['id'];
}
// Get pointer options from specified table
// Get picklist options from other table
$where = '';
- if ($f['p_where']) {
+ if (isset($f['p_where']) && $f['p_where']) {
$where = 'WHERE '.$f['p_where'];
}
$pick_list[0] = array(\r
'value' => '',\r
'name' => $blankText,\r
- 'default' => ($p['p_id'] == '')\r
+ 'default' => (!$p_value)\r
);\r
}
// Build pick select table
$pick_select = false;
$selected_name = '';
+ $pick_list = array();
if (count($p_list) > 0) {
- $pick_list = array();
-
// Deal with optional blank entry
$blankText = '';
if (isset($f['p_blank_text']) && $f['p_blank_text'] != '') {
-- To permit each query below to be executed separately,
-- all queries must be separated by a line with ----
+CREATE TABLE {prefix}members (
+ id INT NOT NULL AUTO_INCREMENT,
+ active BOOLEAN NULL,
+ date_created TIMESTAMP NULL,
+ name TINYTEXT NULL,
+ data_records INT NULL,
+ PRIMARY KEY (id),
+ INDEX(name(20))
+);
+
+----
+
CREATE TABLE {prefix}member_type (
id INT NOT NULL AUTO_INCREMENT,
name TINYTEXT NULL,
----
-CREATE TABLE {prefix}members (
+CREATE TABLE {prefix}member_data (
id INT NOT NULL AUTO_INCREMENT,
+ member INT NULL,
status INT NULL,
member_type INT NULL,
- name TINYTEXT NULL,
descr TEXT NULL,
short_descr TINYTEXT NULL,
addr1 TINYTEXT NULL,
logo TINYTEXT NULL,
cc_type INT NULL,
join_date DATE NULL,
- notex TEXT NULL,
+ notes TEXT NULL,
create_time TIMESTAMP NULL,
modify_time TIMESTAMP NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(status),
+ INDEX(city),
+ INDEX(zip(10)),
+ INDEX(lat),
+ INDEX(lon),
+ INDEX(region)
);
----
CREATE TABLE {prefix}locations (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
+ active BOOLEAN NULL,
location_type INT NULL,
member INT NULL,
name TINYTEXT NULL,
notes TEXT NULL,
create_time TIMESTAMP NULL,
modify_time TIMESTAMP NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(name(20)),
+ INDEX(city),
+ INDEX(zip(10)),
+ INDEX(lat),
+ INDEX(lon),
+ INDEX(region)
);
----
CREATE TABLE {prefix}facilities (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
+ active BOOLEAN NULL,
facility_type INT NULL,
location INT NULL,
name TINYTEXT NULL,
notes TEXT NULL,
create_time TIMESTAMP NULL,
modify_time TIMESTAMP NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(name(20)),
+ INDEX(city),
+ INDEX(zip(10)),
+ INDEX(lat),
+ INDEX(lon)
);
----
CREATE TABLE {prefix}activties (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
- activity_type TINYTEXT NULL,
+ active BOOLEAN NULL,
+ activity_type INT NULL,
facility INT NULL,
name TINYTEXT NULL,
descr TEXT NULL,
modify_time TIMESTAMP NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(activity_type),
+ INDEX(name(20)),
+ INDEX(ref_type),
+ INDEX(ref_dest)
+);
+
+----
+
+CREATE TABLE {prefix}accommodation_types (
+ id INT NOT NULL AUTO_INCREMENT,
+ facility_type INT NULL,
+ name TINYTEXT NULL,
+ descr TEXT NULL,
+ short_descr TINYTEXT NULL,
+ PRIMARY KEY (id),
+ INDEX(facility_type),
+ INDEX(name(20))
);
----
CREATE TABLE {prefix}accommodations (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
+ active BOOLEAN NULL,
name TINYTEXT NULL,
+ accommodation_type INT NULL,
descr TEXT NULL,
short_descr TINYTEXT NULL,
quant INT NULL,
year_round TINYINT(1) NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(accommodation_type),
+ INDEX(name(20)),
+ INDEX(ref_type),
+ INDEX(ref_dest)
);
----
CREATE TABLE {prefix}golf (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
+ active BOOLEAN NULL,
name TINYTEXT NULL,
descr TEXT NULL,
short_descr TINYTEXT NULL,
reservation_url TINYTEXT NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(name(20)),
+ INDEX(ref_type),
+ INDEX(ref_dest)
+);
+
+----
+
+CREATE TABLE {prefix}restaurant_types (
+ id INT NOT NULL AUTO_INCREMENT,
+ active TINYINT(1) NULL,
+ name TINYTEXT NULL,
+ descr TEXT NULL,
+ short_descr TINYTEXT NULL,
+ PRIMARY KEY (id),
+ INDEX(name(20))
);
----
CREATE TABLE {prefix}restaurants (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
+ active BOOLEAN NULL,
name TINYTEXT NULL,
+ restaurant_type INT NULL,
descr TEXT NULL,
short_descr TINYTEXT NULL,
menu TEXT NULL,
notes TEXT NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(restaurant_type),
+ INDEX(name(20)),
+ INDEX(ref_type),
+ INDEX(ref_dest)
);
----
CREATE TABLE {prefix}meals (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
+ active BOOLEAN NULL,
name TINYTEXT NULL,
descr TEXT NULL,
short_descr TINYTEXT NULL,
sat_end_time TIME NULL,
sat_res_req TINYINT(1) NULL,
restaurant INT NULL,
- PRIMARY KEY (id)
+ ref_type INT NULL,
+ ref_dest INT NULL,
+ PRIMARY KEY (id),
+ INDEX(name(20))
);
----
CREATE TABLE {prefix}contacts (
id INT NOT NULL AUTO_INCREMENT,
- status INT NULL,
- ref_type INT NULL,
- ref_dest INT NULL,
+ active BOOLEAN NULL,
fname TINYTEXT NULL,
lname TINYTEXT NULL,
contact_type INT NULL,
notes TEXT NULL,
create_time TIMESTAMP NULL,
modify_time TIMESTAMP NULL,
- PRIMARY KEY (id)
+ ref_type INT NULL,
+ ref_dest INT NULL,
+ PRIMARY KEY (id),
+ INDEX(fname(20)),
+ INDEX(lname(20)),
+ INDEX(city),
+ INDEX(zip(10)),
+ INDEX(lat),
+ INDEX(lon),
+ INDEX(email(20))
);
----
descr TEXT NULL,
short_descr TINYTEXT NULL,
facility_type INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(name(20))
);
----
----
-CREATE TABLE {prefix}social_media_member (
+CREATE TABLE {prefix}social_media_ref (
id INT NOT NULL AUTO_INCREMENT,
ref_type INT NULL,
ref_dest INT NULL,
social_media INT NULL,
url TINYTEXT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(ref_type),
+ INDEX(ref_dest),
+ INDEX(social_media)
);
----
-CREATE TABLE {prefix}amenity_member (
+CREATE TABLE {prefix}amenity_ref (
id INT NOT NULL AUTO_INCREMENT,
amenity INT NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(ref_type),
+ INDEX(ref_dest)
);
----
member INT NULL,
payment_type INT NULL,
invoice_delivery INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(member)
);
----
CREATE TABLE {prefix}category_member (
id INT NOT NULL AUTO_INCREMENT,
- cateogory INT NULL,
- main_category TINYINT(1) NULL,
+ category INT NULL,
+ main_category INT NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(category),
+ INDEX(ref_type),
+ INDEX(ref_dest)
);
----
create_date DATE NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(name(20)),
+ INDEX(file_name(20)),
+ INDEX(ref_type),
+ INDEX(ref_dest)
);
----
position INT NULL,
ref_type INT NULL,
ref_dest INT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ INDEX(name(20)),
+ INDEX(file_name(20)),
+ INDEX(ref_type),
+ INDEX(ref_dest)
);
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 02:20:49
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 01:23:45
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/badAction.html" */ ?>
-<?php /*%%SmartyHeaderCode:210264866954b42dd4bbc715-16113482%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:105358588254c05121d677a6-75784395%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'06926788f51c1a5a54be2a368556f9c37e2780da' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/badAction.html',
- 1 => 1421285081,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '210264866954b42dd4bbc715-16113482',
+ 'nocache_hash' => '105358588254c05121d677a6-75784395',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b42dd4c09430_68496846',
'variables' =>
array (
'errorMsg' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05121d71ab3_37928404',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b42dd4c09430_68496846')) {function content_54b42dd4c09430_68496846($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/error/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c05121d71ab3_37928404')) {function content_54c05121d71ab3_37928404($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/error/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<h2>Sorry, we've had an error.</h2>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 02:22:28
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 02:04:38
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/index.html" */ ?>
-<?php /*%%SmartyHeaderCode:206413157254b42f2535e168-27938613%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:43313958054c05ab60b0587-71987387%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'081a36d97cdf30d438a1e104c26a275acc180da0' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/index.html',
- 1 => 1421288544,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '206413157254b42f2535e168-27938613',
+ 'nocache_hash' => '43313958054c05ab60b0587-71987387',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b42f25390269_82355360',
'variables' =>
array (
'numbMembers' => 0,
'thisURL' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05ab60bb1c1_03470573',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b42f25390269_82355360')) {function content_54b42f25390269_82355360($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/members/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c05ab60bb1c1_03470573')) {function content_54c05ab60bb1c1_03470573($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/members/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<h2>Members Dashboard</h2>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 00:18:04
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 02:04:38
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/header.html" */ ?>
-<?php /*%%SmartyHeaderCode:81165772654b46f32298020-09293550%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:41614071154c05ab60be091-67045844%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'15f83071407dddb0b3c23ae1a70b66cefbd681db' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/header.html',
- 1 => 1421281076,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '81165772654b46f32298020-09293550',
+ 'nocache_hash' => '41614071154c05ab60be091-67045844',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b46f322c0910_93147809',
'variables' =>
array (
'thisURL' => 0,
'thisAction' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05ab60d1510_45219092',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b46f322c0910_93147809')) {function content_54b46f322c0910_93147809($_smarty_tpl) {?><div class="wrap">
+<?php if ($_valid && !is_callable('content_54c05ab60d1510_45219092')) {function content_54c05ab60d1510_45219092($_smarty_tpl) {?><div class="wrap">
<h2>Your Members</h2>
<h2 class="nav-tab-wrapper">
<a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 06:15:32
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 05:39:11
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/member/index.html" */ ?>
-<?php /*%%SmartyHeaderCode:163797333154b6ac77c986e8-14104892%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:94073808254c05abfc4adf1-45287000%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'1be35689c5d30d774f40ebc45e387f5f95c45e90' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/member/index.html',
- 1 => 1421302521,
+ 1 => 1421905148,
2 => 'file',
),
),
- 'nocache_hash' => '163797333154b6ac77c986e8-14104892',
+ 'nocache_hash' => '94073808254c05abfc4adf1-45287000',
'function' =>
array (
),
'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b6ac77cbe666_15018258',
+ 'unifunc' => 'content_54c05abfc64731_62067320',
'variables' =>
array (
'deleted' => 0,
),
'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b6ac77cbe666_15018258')) {function content_54b6ac77cbe666_15018258($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/member/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c05abfc64731_62067320')) {function content_54c05abfc64731_62067320($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/member/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php if (!$_smarty_tpl->tpl_vars['deleted']->value) {?>
<div id="deleteMemberButton" class="button-primary glm-right">Delete this Member</div>
- <div id="deleteMemberDialog" class="glm-dialog-box">
+ <div id="deleteMemberDialog" class="glm-dialog-box" title="Delete Member">
<center>
<p>Are you sure you want to delete this member?</p>
<p><div id="deleteMemberConfirm" class="button-primary">Yes, delete this member</div></p>
<h2><?php echo $_smarty_tpl->tpl_vars['member']->value['name'];?>
</h2>
- <?php if ($_smarty_tpl->tpl_vars['deleted']->value) {?>
- <h3 class="glm-notice">Member Has Been Deleted!</h3>
- <?php } else { ?>
- <?php if ($_smarty_tpl->tpl_vars['member']->value['active']['value']) {?>
- <p>This member is active.</p>
- <?php } else { ?>
- <h3 class="glm-notice">Member Not Active</h3>
- <?php }?>
- <?php }?>
+ <h3 class="glm-notice"></h3>
<table>
+ <tr>
+ <th class="glm-table-fieldname">Status</th>
+ <td<?php if ($_smarty_tpl->tpl_vars['member']->value['status']['name']=='Pending Review') {?> class="glm-notice"<?php } elseif ($_smarty_tpl->tpl_vars['member']->value['status']['name']=='Active') {?> class="glm-active"<?php }?>>
+ <?php echo $_smarty_tpl->tpl_vars['member']->value['status']['name'];?>
+
+ </td>
+ </tr>
<tr><th class="glm-table-fieldname">Member Name:</th><td><?php echo $_smarty_tpl->tpl_vars['member']->value['name'];?>
+</td></tr>
+ <tr><th class="glm-table-fieldname">Type:</th><td><?php echo $_smarty_tpl->tpl_vars['member']->value['member_type'];?>
</td></tr>
<tr><th class="glm-table-fieldname">Description:</th><td><?php echo $_smarty_tpl->tpl_vars['member']->value['descr'];?>
</td></tr>
jQuery(document).ready(function($) {
$("#deleteMemberDialog").dialog({
autoOpen: false,
+ minWidth: 400,
dialogClass: "glm-dialog-no-close"
});
$('#deleteMemberButton').click( function() {
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 02:04:44
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 02:04:35
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/member/member.html" */ ?>
-<?php /*%%SmartyHeaderCode:172471491954b6e51b1368b6-20693769%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:101324643954c05ab3f0e228-27454872%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'25c8610e0e0bacafec3046a296066e9f8eceedae' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/member/member.html',
- 1 => 1421287476,
+ 1 => 1421872896,
2 => 'file',
),
),
- 'nocache_hash' => '172471491954b6e51b1368b6-20693769',
+ 'nocache_hash' => '101324643954c05ab3f0e228-27454872',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b6e51b158d19_68572085',
'variables' =>
array (
'haveMember' => 0,
'thisURL' => 0,
'thisPage' => 0,
'member' => 0,
+ 'v' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05ab4009233_84144294',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b6e51b158d19_68572085')) {function content_54b6e51b158d19_68572085($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/member/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c05ab4009233_84144294')) {function content_54c05ab4009233_84144294($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/member/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php if ($_smarty_tpl->tpl_vars['haveMember']->value) {?>
<tr>
<th>Active:</th>
<td>
- <input type="checkbox" name="active" <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldData']['active']['value']) {?>checked="checked"<?php }?>">
- <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['name']) {?><p><?php echo $_smarty_tpl->tpl_vars['member']->value['fieldFail']['name'];?>
+ <select name="status">
+ <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
+ $_from = $_smarty_tpl->tpl_vars['member']->value['fieldData']['status']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
+foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
+$_smarty_tpl->tpl_vars['v']->_loop = true;
+?>
+ <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value['value'];?>
+"<?php if ($_smarty_tpl->tpl_vars['v']->value['default']) {?> selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
+</option>
+ <?php } ?>
+ </select>
+ <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['status']) {?><p><?php echo $_smarty_tpl->tpl_vars['member']->value['fieldFail']['status'];?>
</p><?php }?>
</td>
</tr>
<tr>
<th>Member Type:</th>
<td>
- Need to add "enum" type to data abstract.
+ <select name="member_type">
+ <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
+ $_from = $_smarty_tpl->tpl_vars['member']->value['fieldData']['member_type']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
+foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
+$_smarty_tpl->tpl_vars['v']->_loop = true;
+?>
+ <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value['value'];?>
+"<?php if ($_smarty_tpl->tpl_vars['v']->value['default']) {?> selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
+</option>
+ <?php } ?>
+ </select>
+ <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['member_type']) {?><p><?php echo $_smarty_tpl->tpl_vars['member']->value['fieldFail']['member_type'];?>
+</p><?php }?>
</td>
</tr>
<tr>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-14 21:35:21
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 10:13:18
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/header.html" */ ?>
-<?php /*%%SmartyHeaderCode:148991197854b4cb224461f5-92408371%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:124095827254c0496da79607-59867625%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'3ec5bcbe581d6335e06bc6c9474f73121a83d59b' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/header.html',
- 1 => 1421271318,
+ 1 => 1421921594,
2 => 'file',
),
),
- 'nocache_hash' => '148991197854b4cb224461f5-92408371',
+ 'nocache_hash' => '124095827254c0496da79607-59867625',
'function' =>
array (
),
'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b4cb22446989_15253660',
+ 'unifunc' => 'content_54c0496da89482_99477612',
'variables' =>
array (
'glmPluginName' => 0,
),
'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b4cb22446989_15253660')) {function content_54b4cb22446989_15253660($_smarty_tpl) {?><div class="wrap">
+<?php if ($_valid && !is_callable('content_54c0496da89482_99477612')) {function content_54c0496da89482_99477612($_smarty_tpl) {?><div class="wrap">
<h2><?php echo $_smarty_tpl->tpl_vars['glmPluginName']->value;?>
Configuration</h2>
&glm_action=index" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='index') {?>-active<?php }?>">General Options</a>
<a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
-&glm_action=cities" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='cities') {?>-active<?php }?>">Cities List</a>
+&glm_action=memberTypes" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='memberTypes') {?>-active<?php }?>">Member Types</a>
<a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
-&glm_action=states" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='add') {?>-active<?php }?>">States List</a>
+&glm_action=categories" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='categories') {?>-active<?php }?>">Member Categories</a>
<a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
-&glm_action=countries" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='edit') {?>-active<?php }?>">Countries List</a>
+&glm_action=cities" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='cities') {?>-active<?php }?>">Cities</a>
<a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
-&glm_action=Regions" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='edit') {?>-active<?php }?>">Regions List</a>
+&glm_action=regions" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='regions') {?>-active<?php }?>">Regions</a>
+ <a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
+?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
+&glm_action=accommodationTypes" class="nav-tab<?php if ($_smarty_tpl->tpl_vars['thisAction']->value=='accommodationTypes') {?>-active<?php }?>">Accommodation Types</a>
</h2>
<div id="glm-admin-content-container">
<?php }} ?>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-14 17:04:39
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 00:50:53
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/index.html" */ ?>
-<?php /*%%SmartyHeaderCode:113537149654b4ca1e9b41e6-15887083%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:135960089454c0496da6c5c6-30692976%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'47fb9b803e7138d215645f3c977b0b1dc2a9e718' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/index.html',
- 1 => 1421255040,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '113537149654b4ca1e9b41e6-15887083',
+ 'nocache_hash' => '135960089454c0496da6c5c6-30692976',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b4ca1e9c5b88_76832702',
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c0496da75c57_83289225',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b4ca1e9c5b88_76832702')) {function content_54b4ca1e9c5b88_76832702($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/configure/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c0496da75c57_83289225')) {function content_54c0496da75c57_83289225($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/configure/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<h2>General Configuration</h2>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 00:17:02
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 05:35:31
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/list.html" */ ?>
-<?php /*%%SmartyHeaderCode:46596749754b706fe3a62d3-72547374%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:33593880254c05ab8e362a8-88978550%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'4c287ca0e4946b3d644e61950c851e98e8906d49' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/list.html',
- 1 => 1421259050,
+ 1 => 1421904927,
2 => 'file',
),
),
- 'nocache_hash' => '46596749754b706fe3a62d3-72547374',
+ 'nocache_hash' => '33593880254c05ab8e362a8-88978550',
'function' =>
array (
),
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05ab8e47dd3_05464531',
'variables' =>
array (
'haveMembers' => 0,
'm' => 0,
),
'has_nocache_code' => false,
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b706fe3c2516_38940524',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b706fe3c2516_38940524')) {function content_54b706fe3c2516_38940524($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/members/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c05ab8e47dd3_05464531')) {function content_54c05ab8e47dd3_05464531($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/members/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<h2>List of Members</h2>
- <table class="wp-list-table widefat fixed posts">
+ <table class="wp-list-table widefat fixed posts glm-admin-table"">
<thead>
<tr>
<th>Member Name</th>
+ <th>Type</th>
<th> </th>
</tr>
</thead>
- <tfoot>
- <tr>
- <th>Member Name</th>
- <th> </th>
- </tr>
- </tfoot>
<tbody>
<?php if ($_smarty_tpl->tpl_vars['haveMembers']->value) {?>
<?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable("0", null, 0);?>
</a>
</td>
<td>
- (nothing here yet)
+ <?php echo $_smarty_tpl->tpl_vars['m']->value['member_type'];?>
+
+ </td>
+ <td>
+ <a href="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
+?page=glm-members-admin-menu-member&glm_action=index&member_id=<?php echo $_smarty_tpl->tpl_vars['m']->value['id'];?>
+" class="button-primary glm-right">Manage</a>
</td>
</tr>
<?php } ?>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-18 22:53:18
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 00:50:53
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/footer.html" */ ?>
-<?php /*%%SmartyHeaderCode:146319615854b4cb224487c6-63517443%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:186248802254c0496da8b546-87847278%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'50e78f1400d6db96c588c737669426ab57397d1d' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/footer.html',
- 1 => 1421621593,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '146319615854b4cb224487c6-63517443',
+ 'nocache_hash' => '186248802254c0496da8b546-87847278',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b4cb2244e1c6_97382029',
'variables' =>
array (
'glmPluginName' => 0,
'thisPage' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c0496da905b3_89352768',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b4cb2244e1c6_97382029')) {function content_54b4cb2244e1c6_97382029($_smarty_tpl) {?>
+<?php if ($_valid && !is_callable('content_54c0496da905b3_89352768')) {function content_54c0496da905b3_89352768($_smarty_tpl) {?>
</div> <!-- / admin content area -->
<div class="glm-copyright">
<?php echo $_smarty_tpl->tpl_vars['glmPluginName']->value;?>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 01:25:35
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 05:12:19
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/index.html" */ ?>
-<?php /*%%SmartyHeaderCode:204984570454b42e9eaf47c6-75708563%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:74342921254c086b3b0af86-22635380%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'60cbe99d19bbec013cbca4d9344f2fd4a4152f52' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/index.html',
- 1 => 1421285131,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '204984570454b42e9eaf47c6-75708563',
+ 'nocache_hash' => '74342921254c086b3b0af86-22635380',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b42e9eafe502_03625329',
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c086b3b1dd65_92948708',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b42e9eafe502_03625329')) {function content_54b42e9eafe502_03625329($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/error/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
+<?php if ($_valid && !is_callable('content_54c086b3b1dd65_92948708')) {function content_54c086b3b1dd65_92948708($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('admin/error/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<center>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-15 01:26:23
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 01:23:45
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/header.html" */ ?>
-<?php /*%%SmartyHeaderCode:112530116454b716e1691b91-32861276%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:66908105654c05121d74c63-58046810%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'6b21e44674b437b1c7d4844f49a7ab41316a5694' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/error/header.html',
- 1 => 1421285180,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '112530116454b716e1691b91-32861276',
+ 'nocache_hash' => '66908105654c05121d74c63-58046810',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b716e1693c97_05571152',
'variables' =>
array (
'glmPluginName' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05121d76603_49097204',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b716e1693c97_05571152')) {function content_54b716e1693c97_05571152($_smarty_tpl) {?><div class="wrap">
+<?php if ($_valid && !is_callable('content_54c05121d76603_49097204')) {function content_54c05121d76603_49097204($_smarty_tpl) {?><div class="wrap">
<h2><?php echo $_smarty_tpl->tpl_vars['glmPluginName']->value;?>
</h2>
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-14 22:28:02
+<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-22 02:04:35
compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/member/header.html" */ ?>
-<?php /*%%SmartyHeaderCode:8257956454b6ac77cc21f2-25755845%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
+<?php /*%%SmartyHeaderCode:145413007654c05ab400d0a2-83797817%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'c74bd17240f8892f8955e8bedbedd434341aeca9' =>
array (
0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/member/header.html',
- 1 => 1421274467,
+ 1 => 1421691086,
2 => 'file',
),
),
- 'nocache_hash' => '8257956454b6ac77cc21f2-25755845',
+ 'nocache_hash' => '145413007654c05ab400d0a2-83797817',
'function' =>
array (
),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b6ac77cd9375_10535024',
'variables' =>
array (
'thisURL' => 0,
'haveMember' => 0,
),
'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1.21-dev',
+ 'unifunc' => 'content_54c05ab4030650_34922061',
),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b6ac77cd9375_10535024')) {function content_54b6ac77cd9375_10535024($_smarty_tpl) {?><div class="wrap">
+<?php if ($_valid && !is_callable('content_54c05ab4030650_34922061')) {function content_54c05ab4030650_34922061($_smarty_tpl) {?><div class="wrap">
<h2>Member Information</h2>
--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Members Database
+ * Admin Accommodation Types List
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version 0.1
+ */
+
+// Load Member Types data abstract
+require_once(GLM_MEMBERS_PLUGIN_CLASS_DIR.'/data/dataAccommodationTypes.php');
+
+/*
+ * This class performs the work for the default action of the "Members" menu
+ * option, which is to display the members dashboard.
+ *
+ */
+class GlmMembersAdmin_configure_accommodationTypes extends GlmDataAccommodationTypes
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /*
+ * Constructor
+ *
+ * This contructor sets up this model. At this time that only includes
+ * storing away the WordPress data object.
+ *
+ * @return object Class object
+ *
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ // Run constructor for members data class
+ parent::__construct($this->wpdb, $this->config);
+
+ }
+
+ /*
+ * Perform Model Action
+ *
+ * This method does the work for this model and returns any resulting data
+ *
+ * @return array Status and data array
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'menuItemRedirect'
+ *
+ * If not false, provides a menu item the controller should
+ * execute after this one. Normally if this is used, there would also be a
+ * modelRedirect value supplied as well.
+ *
+ * 'modelRedirect'
+ *
+ * If not false, provides an action the controller should execute after
+ * this one.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ */
+ public function modelAction ($redirectData = false)
+ {
+
+ $success = true;
+ $haveAccommodationTypes = false;
+ $accommodationTypes = false;
+ $error = false;
+
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'addNew') {
+
+ $accommodationTypes = $this->insertEntry();
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' New Entry Added ', 'Process');
+ }
+ }
+
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'delete' && isset($_REQUEST['accommodationTypeID'])) {
+
+ $id = $_REQUEST['accommodationTypeID']-0;
+ if ($id > 0) {
+ $this->deleteEntry($id, true);
+ }
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' Entry Deleted: id = '.$id, 'Process');
+ }
+
+ }
+
+ // Check if a accommodation type ID is supplied
+ if (isset($_REQUEST['accommodationType_id'])) {
+ // Make sure it's a number
+ $accommodationTypeID = $_REQUEST['accommodationType_id']-0;
+ }
+
+ // Check for action option
+ $option = false;
+ if (isset($_REQUEST['option']) && trim($_REQUEST['option']) != '') {
+ $option = $_REQUEST['option'];
+ }
+
+// Check for options
+
+ // Get a current list of accommodation types
+ $accommodationTypes = $this->getList();
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($accommodationTypes, 'DataBlock', 'Accommodation Type Data');
+ }
+
+ // If we have list entries - even if it's an empty list
+ $success = true;
+ $haveAccommodationTypes = false;
+ if ($accommodationTypes !== false) {
+
+ $success = true;
+
+ // If we have any entries
+ if (count($accommodationTypes) > 0) {
+ $haveAccommodationTypes = true;
+ }
+ }
+
+ // If we had a fatal error, redirect to the error page
+ if ($error) {
+ return array(
+ 'status' => $success,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => false
+ );
+ }
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($accommodationTypes, 'DataBlock', 'Accommodation Types Data');
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'haveRegions' => $haveAccommodationTypes,
+ 'accommodationTypes' => $accommodationTypes
+ );
+
+ // Return status, suggested view, and data to controller
+ return array(
+ 'status' => $success,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => 'admin/configure/accommodationTypes.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Members Database
+ * Admin Categories List
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version 0.1
+ */
+
+// Load Member Types data abstract
+require_once(GLM_MEMBERS_PLUGIN_CLASS_DIR.'/data/dataCategories.php');
+
+/*
+ * This class performs the work for the default action of the "Members" menu
+ * option, which is to display the members dashboard.
+ *
+ */
+class GlmMembersAdmin_configure_categories extends GlmDataCategories
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ /*
+ * Constructor
+ *
+ * This contructor sets up this model. At this time that only includes
+ * storing away the WordPress data object.
+ *
+ * @return object Class object
+ *
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ // Run constructor for members data class
+ parent::__construct($this->wpdb, $this->config);
+
+ }
+
+ /*
+ * Perform Model Action
+ *
+ * This method does the work for this model and returns any resulting data
+ *
+ * @return array Status and data array
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'menuItemRedirect'
+ *
+ * If not false, provides a menu item the controller should
+ * execute after this one. Normally if this is used, there would also be a
+ * modelRedirect value supplied as well.
+ *
+ * 'modelRedirect'
+ *
+ * If not false, provides an action the controller should execute after
+ * this one.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ */
+ public function modelAction ($redirectData = false)
+ {
+
+ $success = true;
+ $haveCategories = false;
+ $categories = false;
+ $error = false;
+
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'addNew') {
+
+ $categories = $this->insertEntry();
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' New Entry Added ', 'Process');
+ glmMembersAdmin::addNotice($categories, 'DataBlock', 'New Member Category Data');
+ }
+ }
+
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'delete' && isset($_REQUEST['categoryID'])) {
+
+ $id = $_REQUEST['categoryID']-0;
+ if ($id > 0) {
+ $this->deleteEntry($id, true);
+ }
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' Entry Deleted: id = '.$id, 'Process');
+ }
+
+ }
+
+ // Check if a category ID is supplied
+ if (isset($_REQUEST['category_id'])) {
+ // Make sure it's a number
+ $categoryID = $_REQUEST['category_id']-0;
+ }
+
+ // Check for action option
+ $option = false;
+ if (isset($_REQUEST['option']) && trim($_REQUEST['option']) != '') {
+ $option = $_REQUEST['option'];
+ }
+
+// Check for options
+
+ // Get a current list of members
+ $categories = $this->getList();
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($categories, 'DataBlock', 'Category Data');
+ }
+
+ // If we have list entries - even if it's an empty list
+ $success = true;
+ $haveCategories = false;
+ if ($categories !== false) {
+
+ $success = true;
+
+ // If we have any entries
+ if (count($categories) > 0) {
+ $haveCategories = true;
+ }
+ }
+
+ // If we had a fatal error, redirect to the error page
+ if ($error) {
+ return array(
+ 'status' => $success,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => false
+ );
+ }
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($categories, 'DataBlock', 'Categories Data');
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'haveCategories' => $haveCategories,
+ 'categories' => $categories
+ );
+
+ // Return status, suggested view, and data to controller
+ return array(
+ 'status' => $success,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => 'admin/configure/categories.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
+
+?>
\ No newline at end of file
$success = true;
$haveCities = false;
- $citiew = false;
+ $cities = false;
$error = false;
if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'addNew') {
$cities = $this->insertEntry();
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' New Entry Added ', 'Process');
+ }
}
if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'delete' && isset($_REQUEST['cityID'])) {
+
$id = $_REQUEST['cityID']-0;
if ($id > 0) {
$this->deleteEntry($id, true);
}
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' Entry Deleted: id = '.$id, 'Process');
+ }
+
}
// Check if a city ID is supplied
'haveCities' => $haveCities,
'cities' => $cities
);
-echo "!@#!@##";
+
// Return status, suggested view, and data to controller
return array(
'status' => $success,
$success = true;
$haveRegions = false;
- $citiew = false;
+ $regions = false;
$error = false;
if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'addNew') {
+
$regions = $this->insertEntry();
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' New Entry Added ', 'Process');
+ }
}
- if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'delete' && isset($_REQUEST['cityID'])) {
- $id = $_REQUEST['cityID']-0;
+ if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'delete' && isset($_REQUEST['regionID'])) {
+
+ $id = $_REQUEST['regionID']-0;
if ($id > 0) {
$this->deleteEntry($id, true);
}
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice(' Entry Deleted: id = '.$id, 'Process');
+ }
+
}
- // Check if a city ID is supplied
- if (isset($_REQUEST['city_id'])) {
+ // Check if a region ID is supplied
+ if (isset($_REQUEST['region_id'])) {
// Make sure it's a number
- $cityID = $_REQUEST['city_id']-0;
+ $regionID = $_REQUEST['region_id']-0;
}
// Check for action option
$regions = $this->getList();
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($regions, 'DataBlock', 'City Data');
+ glmMembersAdmin::addNotice($regions, 'DataBlock', 'Region Data');
}
// If we have list entries - even if it's an empty list
--- /dev/null
+{include file='admin/configure/header.html'}
+
+ <div id="newAccommodationTypeButton" class="button-primary glm-right">Add a Accommodation Type</div>
+ <div id="newAccommodationTypeDialog" class="glm-dialog-box" title="Enter a New Accommodation Type">
+ <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="glm_action" value="accommodationTypes">
+ <input type="hidden" name="option" value="addNew">
+
+ <table class="form-table">
+ <tr>
+ <th class="glm-required">Accommodation Type Name:</th>
+ <td>
+ <input type="text" name="name" class="glm-form-text-input">
+ </td>
+ </tr>
+ <tr>
+ <th>Description:</th>
+ <td>
+ <textarea name="descr" class="glm-form-textarea"></textarea>
+ </td>
+ </tr>
+ <tr>
+ <th>Description:</th>
+ <td>
+ <input type="text" name="short_descr" class="glm-form-text-input">
+ </td>
+ </tr>
+
+
+ </table>
+ <p><span class="glm-required">*</span> Required</p>
+ <a id="newAccommodationTypeCancel" class="button-primary glm-right">Cancel</a>
+ <input type="submit" value="Add new Accommodation Type">
+
+ </form>
+ </div>
+ <div id="deleteAccommodationTypeDialog" class="glm-dialog-box" title="Delete Accommodation Type">
+ <center>
+ <p>Are you sure you want to delete this accommodation type?</p>
+ <p><div id="deleteAccommodationTypeConfirm" class="button-primary">Yes, delete this accommodation type</div></p>
+ <p><div id="deleteAccommodationTypeCancel" class="button-primary">No, I don't want to delete this accommodation</div></p>
+ </center>
+ </div>
+
+
+ <h2>Accommodation Types</h2>
+
+ <table class="wp-list-table widefat fixed posts glm-admin-table"">
+ <thead>
+ <tr>
+ <th>Accommodation Type</th>
+ <th>Description</th>
+ <th>Short Description</th>
+ <th> </th>
+ </tr>
+ </thead>
+ <tbody>
+{if $haveAccommodationTypes}
+ {assign var="i" value="0"}
+ {foreach $accommodationTypes as $t}
+ {if $i++ is odd by 1}
+ <tr>
+ {else}
+ <tr class="alternate">
+ {/if}
+ <td>
+ {$t.name}
+ </td>
+ <td>
+ {$t.descr}
+ </td>
+ <td>
+ {$t.short_descr}
+ </td>
+ <td>
+ <div class="deleteAccommodationTypeButton button-primary glm-right" data-accommodationTypeID="{$t.id}">Delete</div>
+ </td>
+ </tr>
+ {/foreach}
+{else}
+ <tr class="alternate"><td colspan="2">(no accommodationTypes listed)</td></tr>
+{/if}
+ </tbody>
+ </table>
+
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ $("#newAccommodationTypeDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $("#deleteAccommodationTypeDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+
+ $('#newAccommodationTypeButton').click( function() {
+ $("#newAccommodationTypeDialog").dialog("open");
+ });
+ $('#newAccommodationTypeCancel').click( function() {
+ $("#newAccommodationTypeDialog").dialog("close");
+ });
+
+ var id = false;
+ $('.deleteAccommodationTypeButton').click( function() {
+ id = $(this).attr('data-accommodationTypeID');
+ $("#deleteAccommodationTypeDialog").dialog("open");
+ });
+ $('#deleteAccommodationTypeConfirm').click( function() {
+ $("#deleteAccommodationTypeDialog").dialog("close");
+ window.location.href = "{$thisURL}?page={$thisPage}&glm_action=accommodationTypes&option=delete&accommodationTypeID=" + id;
+ });
+ $('#deleteAccommodationTypeCancel').click( function() {
+ $("#deleteAccommodationTypeDialog").dialog("close");
+ });
+
+ });
+ </script>
+
+{include file='admin/footer.html'}
--- /dev/null
+{include file='admin/configure/header.html'}
+
+ <div id="newCategoryButton" class="button-primary glm-right">Add a Category</div>
+ <div id="newCategoryDialog" class="glm-dialog-box" title="Enter a New Category">
+ <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="glm_action" value="categories">
+ <input type="hidden" name="option" value="addNew">
+
+ <table class="form-table">
+ <tr>
+ <th class="glm-required">Category Name:</th>
+ <td>
+ <input type="text" name="name" class="glm-form-text-input">
+ </td>
+ </tr>
+ <tr>
+ <th>Parent Category:</th>
+ <td>
+ <select name="parent">
+ <option value=""></option>
+ {if $haveCategories}
+ {foreach $categories as $t}
+ <option value="{$t.id}">{$t.name}</option>
+ {/foreach}
+ {/if}
+ </select>
+
+ </td>
+ </tr>
+ <tr>
+ <th>Description:</th>
+ <td>
+ <textarea name="descr" class="glm-form-textarea"></textarea>
+ </td>
+ </tr>
+ <tr>
+ <th>Description:</th>
+ <td>
+ <input type="text" name="short_descr" class="glm-form-text-input">
+ </td>
+ </tr>
+
+
+ </table>
+ <p><span class="glm-required">*</span> Required</p>
+ <a id="newCategoryCancel" class="button-primary glm-right">Cancel</a>
+ <input type="submit" value="Add new Category">
+
+ </form>
+ </div>
+ <div id="deleteCategoryDialog" class="glm-dialog-box" title="Delete Category">
+ <center>
+ <p>Are you sure you want to delete this category?</p>
+ <p><div id="deleteCategoryConfirm" class="button-primary">Yes, delete this category</div></p>
+ <p><div id="deleteCategoryCancel" class="button-primary">No, I don't want to delete this category</div></p>
+ </center>
+ </div>
+
+
+ <h2>Categories</h2>
+
+ <table class="wp-list-table widefat fixed posts glm-admin-table"">
+ <thead>
+ <tr>
+ <th>Category</th>
+ <th>Parent</th>
+ <th>Description</th>
+ <th>Short Description</th>
+ <th> </th>
+ </tr>
+ </thead>
+ <tbody>
+{if $haveCategories}
+ {assign var="i" value="0"}
+ {foreach $categories as $t}
+ {if $i++ is odd by 1}
+ <tr>
+ {else}
+ <tr class="alternate">
+ {/if}
+ <td>
+ {$t.name}
+ </td>
+ <td>
+ {$t.parent}
+ </td>
+ <td>
+ {$t.descr}
+ </td>
+ <td>
+ {$t.short_descr}
+ </td>
+ <td>
+ <div class="deleteCategoryButton button-primary glm-right" data-categoryID="{$t.id}">Delete</div>
+ </td>
+ </tr>
+ {/foreach}
+{else}
+ <tr class="alternate"><td colspan="2">(no categories listed)</td></tr>
+{/if}
+ </tbody>
+ </table>
+
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+
+ $("#newCategoryDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+ $("#deleteCategoryDialog").dialog({
+ autoOpen: false,
+ minWidth: 400,
+ dialogClass: "glm-dialog-no-close"
+ });
+
+ $('#newCategoryButton').click( function() {
+ $("#newCategoryDialog").dialog("open");
+ });
+ $('#newCategoryCancel').click( function() {
+ $("#newCategoryDialog").dialog("close");
+ });
+
+ var id = false;
+ $('.deleteCategoryButton').click( function() {
+ id = $(this).attr('data-categoryID');
+ $("#deleteCategoryDialog").dialog("open");
+ });
+ $('#deleteCategoryConfirm').click( function() {
+ $("#deleteCategoryDialog").dialog("close");
+ window.location.href = "{$thisURL}?page={$thisPage}&glm_action=categories&option=delete&categoryID=" + id;
+ });
+ $('#deleteCategoryCancel').click( function() {
+ $("#deleteCategoryDialog").dialog("close");
+ });
+
+ });
+ </script>
+
+{include file='admin/footer.html'}
<h2>Cities</h2>
- <table class="wp-list-table widefat fixed posts">
+ <table class="wp-list-table widefat fixed posts glm-admin-table"">
<thead>
<tr>
<th>City</th>
<th> </th>
</tr>
</thead>
- <tfoot>
- <tr>
- <th>City</th>
- <th> </th>
- </tr>
- </tfoot>
<tbody>
{if $haveCities}
{assign var="i" value="0"}
$('#newCityButton').click( function() {
$("#newCityDialog").dialog("open");
});
- $('#newCityConfirm').click( function() {
- $("#newCityDialog").dialog("close");
- window.location.href = "{$thisURL}?page={$thisPage}&glm_action=cities&option=addNew";
- });
$('#newCityCancel').click( function() {
$("#newCityDialog").dialog("close");
});
<h2 class="nav-tab-wrapper">
<a href="{$thisURL}?page={$thisPage}&glm_action=index" class="nav-tab{if $thisAction==index}-active{/if}">General Options</a>
<a href="{$thisURL}?page={$thisPage}&glm_action=memberTypes" class="nav-tab{if $thisAction==memberTypes}-active{/if}">Member Types</a>
+ <a href="{$thisURL}?page={$thisPage}&glm_action=categories" class="nav-tab{if $thisAction==categories}-active{/if}">Member Categories</a>
<a href="{$thisURL}?page={$thisPage}&glm_action=cities" class="nav-tab{if $thisAction==cities}-active{/if}">Cities</a>
<a href="{$thisURL}?page={$thisPage}&glm_action=regions" class="nav-tab{if $thisAction==regions}-active{/if}">Regions</a>
+ <a href="{$thisURL}?page={$thisPage}&glm_action=accommodationTypes" class="nav-tab{if $thisAction==accommodationTypes}-active{/if}">Accommodation Types</a>
</h2>
<div id="glm-admin-content-container">
\ No newline at end of file
<h2>Member Types</h2>
- <table class="wp-list-table widefat fixed posts">
+ <table class="wp-list-table widefat fixed posts glm-admin-table">
<thead>
<tr>
<th>Member Type</th>
<th> </th>
</tr>
</thead>
- <tfoot>
- <tr>
- <th>Member Type</th>
- <th>Description</th>
- <th> </th>
- </tr>
- </tfoot>
<tbody>
{if $haveMemberTypes}
{assign var="i" value="0"}
$('#newMemberTypeButton').click( function() {
$("#newMemberTypeDialog").dialog("open");
});
- $('#newMemberTypeConfirm').click( function() {
- $("#newMemberTypeDialog").dialog("close");
- window.location.href = "{$thisURL}?page={$thisPage}&glm_action=memberTypes&option=addNew";
- });
$('#newMemberTypeCancel').click( function() {
$("#newMemberTypeDialog").dialog("close");
});
<textarea name="descr" class="glm-form-textarea"></textarea>
</td>
</tr>
+ <tr>
+ <th>Description:</th>
+ <td>
+ <input type="text" name="short_descr" class="glm-form-text-input">
+ </td>
+ </tr>
</table>
</div>
- <h2>Cities</h2>
+ <h2>Regions</h2>
- <table class="wp-list-table widefat fixed posts">
+ <table class="wp-list-table widefat fixed posts glm-admin-table"">
<thead>
<tr>
<th>Region</th>
<th> </th>
</tr>
</thead>
- <tfoot>
- <tr>
- <th>Region</th>
- <th>Description</th>
- <th>Short Description</th>
- <th> </th>
- </tr>
- </tfoot>
<tbody>
-{if $haveCities}
+{if $haveRegions}
{assign var="i" value="0"}
{foreach $regions as $t}
{if $i++ is odd by 1}
$('#newRegionButton').click( function() {
$("#newRegionDialog").dialog("open");
});
- $('#newRegionConfirm').click( function() {
- $("#newRegionDialog").dialog("close");
- window.location.href = "{$thisURL}?page={$thisPage}&glm_action=regions&option=addNew";
- });
$('#newRegionCancel').click( function() {
$("#newRegionDialog").dialog("close");
});
</td>
</tr>
<tr><th class="glm-table-fieldname">Member Name:</th><td>{$member.name}</td></tr>
+ <tr><th class="glm-table-fieldname">Type:</th><td>{$member.member_type}</td></tr>
<tr><th class="glm-table-fieldname">Description:</th><td>{$member.descr}</td></tr>
<tr><th class="glm-table-fieldname">Short Description:</th><td>{$member.short_descr}</td></tr>
</table>
<h2>List of Members</h2>
- <table class="wp-list-table widefat fixed posts">
+ <table class="wp-list-table widefat fixed posts glm-admin-table"">
<thead>
<tr>
<th>Member Name</th>
+ <th>Type</th>
<th> </th>
</tr>
</thead>
- <tfoot>
- <tr>
- <th>Member Name</th>
- <th> </th>
- </tr>
- </tfoot>
<tbody>
{if $haveMembers}
{assign var="i" value="0"}
<a href="{$thisURL}?page=glm-members-admin-menu-member&glm_action=index&member_id={$m.id}">{$m.name}</a>
</td>
<td>
- (nothing here yet)
+ {$m.member_type}
+ </td>
+ <td>
+ <a href="{$thisURL}?page=glm-members-admin-menu-member&glm_action=index&member_id={$m.id}" class="button-primary glm-right">Manage</a>
</td>
</tr>
{/foreach}