Basic implementation event signup
This commit is contained in:
@ -1,11 +1,20 @@
|
||||
<?php
|
||||
|
||||
use Bdp\Modules\EventParticipants\Controllers\MemberSummaryController;
|
||||
use Bdp\Modules\EventParticipants\Controllers\PrintParticipantListPdfController;
|
||||
use Bdp\Modules\EventParticipants\Controllers\RegisterMemberController;
|
||||
use Bdp\Modules\LimitLoginAttempts\Controllers\LoginHandler;
|
||||
use Bdp\Libs\DatabaseHandler;
|
||||
|
||||
|
||||
|
||||
require_once dirname(__FILE__) . '/pre_requires.php';
|
||||
require_once dirname(__FILE__) . '/environment.php';
|
||||
|
||||
require_once (BDP_LV_PLUGIN_DIR . '/lib/dompdf/autoload.php');
|
||||
require_once dirname(__FILE__) . '/pdfhandler.php';
|
||||
|
||||
require_once (BDP_LV_PLUGIN_DIR . '/includes/class-modelcommon.php');
|
||||
|
||||
require_once dirname(__FILE__) . '/spl.php';
|
||||
require_once dirname(__FILE__) . '/update.class.php';
|
||||
|
||||
@ -14,6 +23,8 @@ require_once BDP_LV_PLUGIN_DIR . 'includes/WpConfigEditor.class.php';
|
||||
require_once BDP_LV_PLUGIN_DIR . 'includes/DatabaseHandler.php';
|
||||
require_once (BDP_LV_PLUGIN_DIR . '/includes/roles.php');
|
||||
|
||||
|
||||
|
||||
require_once (BDP_LV_PLUGIN_DIR . '/includes/filters.php');
|
||||
|
||||
require_once (BDP_LV_PLUGIN_DIR . '/lib/ics-parser/Event.php');
|
||||
@ -48,6 +59,29 @@ function kompass_after_setup_theme()
|
||||
|
||||
}
|
||||
|
||||
function kompass_is_fullaged(string $birthday) : bool {
|
||||
$obj_birthday = \DateTime::createFromFormat('Y-m-d', $birthday);
|
||||
$today = new DateTime();
|
||||
$compare = date_diff($today, $obj_birthday);
|
||||
return $compare->y >= 18;
|
||||
}
|
||||
|
||||
function kompass_get_age(string $birthday) : int {
|
||||
$obj_birthday = \DateTime::createFromFormat('Y-m-d', $birthday);
|
||||
$today = new DateTime();
|
||||
$compare = date_diff($today, $obj_birthday);
|
||||
return $compare->y;
|
||||
}
|
||||
|
||||
function kompass_load_ajax_content() {
|
||||
$class = 'Bdp\\Modules\\' . $_REQUEST['module'] . '\\Controllers\\AjaxRouterController';
|
||||
if (!class_exists($class)) {
|
||||
wp_die('Invalid module call: Module=' . $_REQUEST['module']);
|
||||
}
|
||||
new $class();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$loginHandler = new LoginHandler();
|
||||
new BdpVersionChecker();
|
||||
|
Reference in New Issue
Block a user