{
// Load locations data class
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataLocations.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataLocations.php';
$Locations = new GlmDataEventsLocations($this->wpdb, $this->config);
// Load recurrences data class to deal with event times
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php';
$Recurrences = new GlmDataEventsRecurrences($this->wpdb, $this->config);
// Check ID
$lastDate = '';
// Load the data class for Event Times
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataTimes.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataTimes.php';
$Times = new GlmDataEventsTimes($this->wpdb, $this->config);
// Select the first entry by matching min start time
*/
// Load Event Times data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataTimes.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataTimes.php';
require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH . '/data/dataEvents.php';
require_once GLM_MEMBERS_EVENTS_PLUGIN_PATH . '/models/front/events/baseAction.php';
$this->postAddTimes = true;
$where = '';
-
+
$where .= "T.active = 1
AND T.event IN (
SELECT event
FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times AS ET
- WHERE active
+ WHERE active
AND " . $this->dateRange . "
)
";
-
+
$events = $this->getList( $where );
// echo "<pre>", print_r($events), '</pre>';
$this->postAddTimes = false;
* Echos JSON string as response and does not return
*/
public function modelAction ($actionData = false)
- {
-
+ {
+
$event_data = [];
$month = $_POST['month'];
$from = date('Y-m-d', strtotime($month['start']));
$times = $this->getModelTimesData();
// var_dump($events);
-
+
foreach ($times as $e=>$val){
$event_data[$e]['title'] = html_entity_decode($val['event_name']);
-
+
// $slug = strtolower(str_replace(" ", '-',$val['event_name']));
$slug = sanitize_title( $val['event_name'] );
-
+
$event_data[$e]['url'] = GLM_MEMBERS_EVENTS_SITE_BASE_URL . "event-detail/" . $slug . "/";
-
+
$start = date('Y-m-d H:i:s', strtotime($val['start_time']['datetime']));
$last = date('Y-m-d H:i:s', strtotime($val['end_time']['datetime']));
-
+
$all_day = $val['all_day']['value'];
-
+
$event_data[$e]['all_day'] = ($all_day === "0" ? false : true);
$event_data[$e]['start'] = ($start);
$event_data[$e]['last'] = ($last);
}
-
+
$return = array(
'status' => false, // Assume nothing works
'events' => $event_data, // Where our events list will go
*/
// Load Members data abstract
-// require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php');
+// require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php';
/**
* This class performs the work of handling images passed to it via
*/
// Load Members data abstract
-// require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php');
+// require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php';
/**
* This class performs the work of handling images passed to it via
*/
// Load Members data abstract
-// require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php');
+// require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php';
/**
* This class performs the work of handling images passed to it via
*/
// Load Members data abstract
-// require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php');
+// require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php';
/**
* This class performs the work of handling images passed to it via
*/
// Load Members data abstract
-// require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php');
+// require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataImages.php';
/**
* This class performs the work of handling images passed to it via
*/
// Load Events data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php';
class GlmMembersAdmin_events_index extends GlmDataEvents
{
}
// Check for required Event Categories
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php';
$EventCategories = new GlmDataEventsCategories($this->wpdb, $this->config);
$eventCategoriesStats = $EventCategories->getStats();
if ($eventCategoriesStats && $eventCategoriesStats > 0) {
*/
// Load Events data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php';
class GlmMembersAdmin_events_index extends GlmDataEvents
{
}
// Check for required Event Categories
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php';
$EventCategories = new GlmDataEventsCategories($this->wpdb, $this->config);
$eventCategoriesStats = $EventCategories->getStats();
if ($eventCategoriesStats && $eventCategoriesStats > 0) {
*/
// Load Contacts data class
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php';
// Load event categories data class
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php');
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEventCategories.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php';
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEventCategories.php';
class GlmMembersAdmin_events_list extends GlmDataEvents
{
if ($memberID > 0) {
// Get base member information
- require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMembers.php');
+ require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMembers.php';
$Member = new GlmDataMembers($this->wpdb, $this->config);
$memberData = $Member->getEntry($memberID);
$categories = $Categories->getListSortedParentChild(false);
// Load locations data class to get a blank entry for the template
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataLocations.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataLocations.php';
$Locations = new GlmDataEventsLocations($this->wpdb, $this->config);
$newLocation = $Locations->newEntry();
// Load recurrences data class to get a blank entry for the template
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataRecurrences.php';
$Recurrences = new GlmDataEventsRecurrences($this->wpdb, $this->config);
$newRecurrence = $Recurrences->newEntry();
$numbRecurrences = count($recurrences);
// Get list of times
- require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataTimes.php');
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataTimes.php';
$Times = new GlmDataEventsTimes($this->wpdb, $this->config);
$times = $Times->getList('T.event = '.$this->eventID, 'start_time');
if (isset($_REQUEST['newCity'])) {
// Try to add the city
- require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCities.php');
+ require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCities.php';
$Cities = new GlmDataCities($this->wpdb, $this->config);
// For each new city submitted
*/
// Load Contacts data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php';
class GlmMembersAdmin_member_add extends GlmDataEvents
{
$eventFields = array_filter($_REQUEST, function($k) {
return preg_match('/^events_/',$k);
}, ARRAY_FILTER_USE_KEY);
-
+
// echo "<hr />EventsArray:<table>";
foreach($eventFields as $key=>$value) {
// echo("<tr><td>$key</td><td>$value</td></tr>");
$formFields[] = $value;
}
// echo "</table><hr />";
-
+
// Get field names for each column
- $dbFields = "
+ $dbFields = "
SELECT column_name
FROM information_schema.columns
WHERE table_name = '" .GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events'
AND table_schema = 'worddb'
;";
$alldbFields = $this->wpdb->get_results($dbFields, ARRAY_A);
-
+
// Store field names in an array for later use
foreach($alldbFields as $key=>$value){
$field[] = $value['column_name'];
if (isset($_REQUEST['events_name'])) {
$title = trim(filter_var($_REQUEST['events_name'],FILTER_SANITIZE_STRING));
}
-
+
// sql query
$sql = "
INSERT INTO ". GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events
'view' => 'admin/member/add.html',
'data' => $templateData
);
-
+
}
*/
// Load Contacts data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataEvents.php';
class GlmMembersAdmin_member_categories extends GlmDataEvents
{
// (id,name)
// VALUES ('3', '" . $title . "')
// ;";query($sql);
-//
+//
// $this->wpdb->query($sql);
}
$templateData = array(
'view' => 'admin/member/categories.html',
'data' => $templateData
);
-
+
}
*/
// Load Contacts data abstract
-//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+//require_once GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php';
class GlmMembersAdmin_members_events // extends GlmDataContacts
{
*/
// Load Event Categories data abstract
-require_once(GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php');
+require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH.'/data/dataCategories.php';
/*
* This class performs the work for the default action of the "Members" menu