# Don't save smarty cache directories or files
-misc/smarty/*
\ No newline at end of file
+misc/smarty/**
+media/images/**
+++ /dev/null
-/**
- * jQuery geolocation.edit plugin
- * Copyright (c) 2012 Milos Popovic <the.elephant@gmail.com>
- *
- * Freely distributable under the MIT license.
- *
- * @version 0.0.11 (2014-06-01)
- * @see http://github.com/miloss/jquery-geolocation-edit
- */
-
-(function ($) {
- var inits
- , methods
- , loadScript;
-
- // Queued initializations
- inits = [];
- // Methods container object
- methods = {};
-
-
- // Plugin methods
- // --------------
-
- /**
- * Main execution method
- * @param {Object} options Passed plugin options
- */
- methods.main = function (options) {
- var selector = this
- , opts
- , llat, llng, llocation
- , i, addrlen;
-
- // Check for required fields
- if (typeof options.lat === "undefined" ||
- typeof options.lng === "undefined") {
- $.error("Please provide 'lat' and 'lng' options for jQuery.geolocate");
- return;
- }
-
- // If GoogleMaps not loaded - push init to queue and go on
- if (typeof google === "undefined" ||
- typeof google.maps === "undefined") {
- inits.push(function () {
- $(selector).geolocate(options);
- });
- loadScript();
- return;
- }
-
- // Extend default options
- opts = $.extend(true, {
- address: [],
- changeOnEdit: false,
- mapOptions: {
- zoom: 14,
- mapTypeId: google.maps.MapTypeId.ROADMAP,
- mapTypeControl: false,
- streetViewControl: false
- },
- markerOptions: {
- draggable:true,
- animation: google.maps.Animation.DROP
- },
- geoCallback: function(){}
- }, options);
-
- $(this).data('opts', opts);
-
- // Init map and marker - per coordinates
- llat = parseFloat( $( opts.lat ).val() );
- llng = parseFloat( $( opts.lng ).val() );
- if (isNaN(llat)) {
- llat = 0;
- }
- if (isNaN(llng)) {
- llng = 0;
- }
-
- llocation = new google.maps.LatLng(llat, llng);
- $(this).geolocate({}, 'initMap', llocation);
-
- // Bind actions - coordinates fields (future?)
- if ( opts.changeOnEdit ) {
- $( opts.lat ).change(function () { /* ... */ });
- $( opts.lng ).change(function () { /* ... */ });
- }
-
- // Bind actions - address field
- addrlen = opts.address.length;
- if (addrlen > 0) {
- for (i=0; i<addrlen; i++) {
- $( opts.address[i] ).change(function () {
- $(selector).geolocate({}, 'callGeocoding');
- });
- }
- }
- };
-
-
- /**
- * Initialize GoogleMaps Map on page
- * @param {LatLng} location GoogleMaps object
- */
- methods.initMap = function (location) {
- var self = $(this).get(0)
- , gmaps = google.maps
- , map
- , markerOptions
- , marker
- , opts = $.data(self, 'opts');
-
- map = new gmaps.Map(self, $.extend({
- center: location
- }, opts.mapOptions));
-
- markerOptions = $.extend({
- map: map,
- position: location
- }, opts.markerOptions);
-
- marker = new gmaps.Marker(markerOptions);
-
- $.data(self, 'map', map);
- $.data(self, 'marker', marker);
-
- gmaps.event.addListener(marker, 'dragend', function () {
- $(self).geolocate({}, 'getMarkerLocation');
- });
- };
-
-
- /**
- * Make Google Geocoding call with provided address
- */
- methods.callGeocoding = function () {
- var self = $(this).get(0)
- , opts = $.data(self, 'opts')
- , len = opts.address.length
- , cbfunc = opts.geoCallback
- , addr = ''
- , geo;
-
-
- // Get address
- while (len--) {
- addr += $( opts.address[len] ).val();
- }
-
- // Make request
- geo = new google.maps.Geocoder();
-
- // Geocoder response
- geo.geocode({
- address: addr
- }, function (data, status) {
- var loc, first, map, marker;
-
- cbfunc(data, status);
-
- first = data[0];
- if (typeof first === "undefined") return;
-
- map = $.data(self, "map");
- marker = $.data(self, "marker");
-
- loc = first.geometry.location;
- map.panToBounds( first.geometry.viewport );
- map.panTo( loc );
- marker.setPosition( loc );
- $(self).geolocate({}, "getMarkerLocation");
- });
- };
-
-
- /**
- * Copy marker position to coordinates fields
- */
- methods.getMarkerLocation = function () {
- var self = $(this).get(0)
- , mrk = $.data(self, 'marker')
- , opts = $.data(self, 'opts')
- , pos = mrk.getPosition();
-
- $( opts.lat ).val( pos.lat() );
- $( opts.lng ).val( pos.lng() );
- };
-
-
- // Plugin function
- // Call appropriate method, or execute "main"
- $.fn.geolocate = function (os, method) {
- var pslice = Array.prototype.slice;
-
- if ( typeof method === 'undefined' ) {
-
- // Only method passed (as 1st parameter)
- if ( typeof os === "string" && typeof methods[os] !== "undefined" ) {
- return methods[ os ].apply( this, pslice.call( arguments, 1 ));
- } else {
- $(this).geolocate({}, 'main', os);
- }
-
- } else if ( methods[method] ) {
- return methods[ method ].apply( this, pslice.call( arguments, 2 ));
-
- } else {
- $.error( "Method " + method + " does not exist on jQuery.geolocate" );
-
- }
-
- return this;
- };
-
-
- // Callback to GoogleMaps async loading
- // FIXME find non-jQuery.fn-polluting solution
- $.fn.geolocateGMapsLoaded = function () {
- while (inits.length) {
- inits.shift()();
- }
- };
-
-
- // Private functions
- // -----------------
-
- // Load GoogleMaps, we want to do it only once
- loadScript = (function(){
- var ran = false;
-
- return function () {
- var script;
- if (ran) return;
- ran = true;
-
- script = document.createElement("script");
- script.type = "text/javascript";
- script.src = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=$.fn.geolocateGMapsLoaded";
- document.body.appendChild(script);
- };
- })();
-
-})(jQuery);
--- /dev/null
+Nothing in the directories found here should be committed, only the directories (i.e. "images")
\ No newline at end of file
+++ /dev/null
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-14 16:17:21
- compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/headder.html" */ ?>
-<?php /*%%SmartyHeaderCode:141576573654b4ccf8ca7ed1-82007383%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
-$_valid = $_smarty_tpl->decodeProperties(array (
- 'file_dependency' =>
- array (
- '26d04a65ccdb3ac3d40bac671736867cbab8e7c6' =>
- array (
- 0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/configure/headder.html',
- 1 => 1421135431,
- 2 => 'file',
- ),
- ),
- 'nocache_hash' => '141576573654b4ccf8ca7ed1-82007383',
- 'function' =>
- array (
- ),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b4ccf8ca85a2_88524224',
- 'variables' =>
- array (
- 'thisURL' => 0,
- 'thisPage' => 0,
- 'thisAction' => 0,
- ),
- 'has_nocache_code' => false,
-),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b4ccf8ca85a2_88524224')) {function content_54b4ccf8ca85a2_88524224($_smarty_tpl) {?><div class="wrap">
-
- <h2 class="nav-tab-wrapper">
- <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=='index') {?>-active<?php }?>">Cities List</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>
- <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>
- <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>
- </h2>
- <div id="glm-admin-content-container">
- <?php }} ?>
+++ /dev/null
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-13 07:38:05
- compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/edit.html" */ ?>
-<?php /*%%SmartyHeaderCode:3795584254b48503304f75-85353117%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
-$_valid = $_smarty_tpl->decodeProperties(array (
- 'file_dependency' =>
- array (
- '5b0b8a17c49dbe822cc61d6a64ab3f597b245655' =>
- array (
- 0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/edit.html',
- 1 => 1421134609,
- 2 => 'file',
- ),
- ),
- 'nocache_hash' => '3795584254b48503304f75-85353117',
- 'function' =>
- array (
- ),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b48503344494_95719747',
- 'variables' =>
- array (
- 'newMember' => 0,
- 'thisURL' => 0,
- 'thisPage' => 0,
- 'member' => 0,
- ),
- 'has_nocache_code' => false,
-),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b48503344494_95719747')) {function content_54b48503344494_95719747($_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 ($_smarty_tpl->tpl_vars['newMember']->value) {?>
- <h2>Add New Member</h2>
- <?php } else { ?>
- <h2>Edit Member</h2>
- <?php }?>
-
- <form action="<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
-?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
-" method="post" enctype="multipart/form-data">
- <input type="hidden" name="glm_action" value="add">
- <input type="hidden" name="option" value="submit">
- <table class="form-table">
- <tr>
- <th <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldRequired']['name']) {?>class="glm-required"<?php }?>>Member Name:</th>
- <td <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['name']) {?>class="glm-form-bad-input"<?php }?>>
- <input type="text" name="name" value="<?php echo $_smarty_tpl->tpl_vars['member']->value['fieldData']['name'];?>
-" class="glm-form-text-input">
- <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['name']) {?><p><?php echo $_smarty_tpl->tpl_vars['member']->value['fieldFail']['name'];?>
-</p><?php }?>
- </td>
- </tr>
- <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'];?>
-</p><?php }?>
- </td>
- </tr>
- <tr>
- <th>Member Type:</th>
- <td>
- Need to add "enum" type to data abstract.
- </td>
- </tr>
- <tr>
- <th <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldRequired']['descr']) {?>class="glm-required"<?php }?>>Description:</th>
- <td <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['descr']) {?>class="glm-form-bad-input"<?php }?>>
- <textarea name="descr" class="glm-form-textarea"><?php echo $_smarty_tpl->tpl_vars['member']->value['fieldData']['descr'];?>
-</textarea>
- <?php if ($_smarty_tpl->tpl_vars['member']->value['fieldFail']['descr']) {?><p><?php echo $_smarty_tpl->tpl_vars['member']->value['fieldFail']['descr'];?>
-</p><?php }?>
- </td>
- </tr>
-
-
- </table>
- <p><span class="glm-required">*</span> Required</p>
- <input type="submit" name="Add new member">
- </form>
-
-<?php echo $_smarty_tpl->getSubTemplate ('admin/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
-
-
-
-
-<?php }} ?>
+++ /dev/null
-<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-01-13 04:58:10
- compiled from "/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/footer.html" */ ?>
-<?php /*%%SmartyHeaderCode:100255695754b47059dfdb34-00395845%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
-$_valid = $_smarty_tpl->decodeProperties(array (
- 'file_dependency' =>
- array (
- '8106057c3d809e21acc4c071993e263e2ce152e7' =>
- array (
- 0 => '/var/www/server/wordpress/wp-content/plugins/glm-member-db/views/admin/members/footer.html',
- 1 => 1421125086,
- 2 => 'file',
- ),
- ),
- 'nocache_hash' => '100255695754b47059dfdb34-00395845',
- 'function' =>
- array (
- ),
- 'version' => 'Smarty-3.1.21-dev',
- 'unifunc' => 'content_54b47059e38473_84747847',
- 'variables' =>
- array (
- 'glmPluginName' => 0,
- 'thisYear' => 0,
- 'adminDebug' => 0,
- 'thisURL' => 0,
- 'thisPage' => 0,
- ),
- 'has_nocache_code' => false,
-),false); /*/%%SmartyHeaderCode%%*/?>
-<?php if ($_valid && !is_callable('content_54b47059e38473_84747847')) {function content_54b47059e38473_84747847($_smarty_tpl) {?>
- </div> <!-- / admin content area -->
- <div class="glm-copywright">
- <?php echo $_smarty_tpl->tpl_vars['glmPluginName']->value;?>
-<br>
- Copyright © 2014-<?php echo $_smarty_tpl->tpl_vars['thisYear']->value;?>
- Gaslight Media - All Rights Reserved<br>
- <a href="http://www.gaslightmedia.com">http://www.gaslightmedia.com</a>
- </div>
-
- <?php if ($_smarty_tpl->tpl_vars['adminDebug']->value) {?>
- <?php echo '<script'; ?>
->
- window.open('<?php echo $_smarty_tpl->tpl_vars['thisURL']->value;?>
-?page=<?php echo $_smarty_tpl->tpl_vars['thisPage']->value;?>
-&glmDebugWindow=true','GLM_Plugin_Debug','width=800, height=900, left=50, top=50');
- <?php echo '</script'; ?>
->
- <?php }?>
-
-</div> <!-- / wrap --><?php }} ?>
+++ /dev/null
-<?php
-
-/**
- * Gaslight Media Members Database
- * Admin Member Edit
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package glmMembersDatabase
- * @author Chuck Scott <cscott@gaslightmedia.com>
- * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 0.1
- */
-
-// Load Members data abstract
-require_once(GLM_MEMBERS_PLUGIN_CLASS_DIR.'/data/dataMembers.php');
-
-/*
- * This class performs the work for the default action of the "Members" menu
- * option, which is to display the members dashboard.
- *
- */
-class GlmMembersAdmin_member_member extends GlmDataMembers
-{
-
- /**
- * 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;
- $haveMember = false;
- $memberData = false;
- $memberID = 0;
- $error = false;
-
- // Check if a member ID is supplied
- if (isset($_REQUEST['member_id'])) {
- // Make sure it's a number
- $memberID = $_REQUEST['member_id']-0;
- }
-
- // Check for action option
- $option = false;
- if (isset($_REQUEST['option']) && trim($_REQUEST['option']) != '') {
- $option = $_REQUEST['option'];
- }
-
- // Perform requested option
- switch ($option) {
-
- case 'addNew':
-
- // Insert the new member into the database
- $memberData = $this->insertEntry();
-
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice($memberData, 'DataBlock', 'New Member Data');
- }
-
- if ($memberData['status']) {
- return array(
- 'status' => $success,
- 'menuItemRedirect' => 'member',
- 'modelRedirect' => 'index',
- 'view' => 'admin/member/index.html',
- 'data' => array(
- 'memberID' => $memberData['fieldData']['id']
- )
- );
- }
-
- break;
-
- case 'submit':
-
- // If we have a member ID
- if ($memberID > 0) {
-
- $haveMember = true;
-
- // Update the member data
- $memberData = $this->updateEntry($memberID);
-
- // If the update went well, then redirect to the member status page
- if ($memberData['status']) {
- return array(
- 'status' => $success,
- 'menuItemRedirect' => 'member',
- 'modelRedirect' => 'index',
- 'view' => 'admin/member/index.html',
- 'data' => array(
- 'memberID' => $memberID
- )
- );
- } else {
-
-
- }
-
- // Else if there's no member ID, then we have a problem
- } else {
- $error = true;
- }
-
- break;
-
- default:
-
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Member ID specified:</b> $memberID", 'Process');
- }
-
- // If we have a member ID, try to get the member data
- if ($memberID > 0) {
-
- // Edit the existing member
- $memberData = $this->editEntry($memberID);
-
- // If we have member data, say so
- if (is_array($memberData) && $memberData['status']) {
- $haveMember = true;
-
- } else {
-
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- glmMembersAdmin::addNotice("<b> Specified Member ID is invalid:</b> $memberID", 'Process');
- }
-
- $error = true;
-
- }
-
- // Else if there's no member ID, assume entering a new member
- } else {
-
- // Ask for new member data
- $memberData = $this->newEntry();
-
- }
-
- break;
-
-
-
- }
-
- // 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($memberData, 'DataBlock', 'Member Data');
- }
-
- // Compile template data
- $templateData = array(
- 'haveMember' => $haveMember,
- 'memberID' => $memberID,
- 'member' => $memberData
- );
-
- // Return status, suggested view, and data to controller
- return array(
- 'status' => $success,
- 'menuItemRedirect' => false,
- 'modelRedirect' => false,
- 'view' => 'admin/member/member.html',
- 'data' => $templateData
- );
-
- }
-
-
-}
-
-?>
\ No newline at end of file
+++ /dev/null
-{include file='admin/member/header.html'}
-
- {if $haveMember}
- <h2>Edit Member</h2>
- {else}
- <h2>Add New Member</h2>
- {/if}
-
- <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
- <input type="hidden" name="glm_action" value="member">
- {if $haveMember}
- <input type="hidden" name="option" value="submit">
- <input type="hidden" name="member_id" value="{$member.fieldData.id}">
- {else}
- <input type="hidden" name="option" value="addNew">
- {/if}
-
- <table class="form-table">
- <tr>
- <th {if $member.fieldRequired.name}class="glm-required"{/if}>Member Name:</th>
- <td {if $member.fieldFail.name}class="glm-form-bad-input"{/if}>
- <input type="text" name="name" value="{$member.fieldData.name}" class="glm-form-text-input">
- {if $member.fieldFail.name}<p>{$member.fieldFail.name}</p>{/if}
- </td>
- </tr>
- <tr>
- <th>Active:</th>
- <td>
- <select name="status">
- {foreach from=$member.fieldData.status.list item=v}
- <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
- {/foreach}
- </select>
- {if $member.fieldFail.status}<p>{$member.fieldFail.status}</p>{/if}
- </td>
- </tr>
- <tr>
- <th>Member Type:</th>
- <td>
- <select name="member_type">
- {foreach from=$member.fieldData.member_type.list item=v}
- <option value="{$v.value}"{if $v.default} selected{/if}>{$v.name}</option>
- {/foreach}
- </select>
- {if $member.fieldFail.member_type}<p>{$member.fieldFail.member_type}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $member.fieldRequired.descr}class="glm-required"{/if}>Description:</th>
- <td {if $member.fieldFail.descr}class="glm-form-bad-input"{/if}>
- <textarea name="descr" class="glm-form-textarea">{$member.fieldData.descr}</textarea>
- {if $member.fieldFail.descr}<p>{$member.fieldFail.descr}</p>{/if}
- </td>
- </tr>
- <tr>
- <th {if $member.fieldRequired.short_descr}class="glm-required"{/if}>Short Description:</th>
- <td {if $member.fieldFail.short_descr}class="glm-form-bad-input"{/if}>
- <input type="text" name="short_descr" value="{$member.fieldData.short_descr}" class="glm-form-text-input">
- {if $member.fieldFail.short_descr}<p>{$member.fieldFail.short_descr}</p>{/if}
- </td>
- </tr>
-
-
- </table>
- <p><span class="glm-required">*</span> Required</p>
- <input type="submit" name="Add new member">
- </form>
-
-{include file='admin/footer.html'}