my_parent_controller();
$this->load_language_backoffice();
$this->notif = new SubscriptionNotif();
$this->registration = new UserRegistration();
}
public function index()
{
Page::authorize(PAGE_CODE['dashboard'], PRIVS[PAGE_CODE['dashboard']]['view'], true);
if (UserAuth::isAuth()) {
//load language file
$this->lang->load('backoffice/dashboard', 'fr');
$this->data['content'] = "backoffice/dashboard/dashboard_view";
$this->data['page_title'] = $this->lang->line('menu_dashboard');
$this->load_extra_files(array("moment" => true,"date_range" => true, "ga_embed" => true));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
// array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url("auth"));
}
}
public function statistics(){
Page::authorize(PAGE_CODE['statistics'], PRIVS[PAGE_CODE['statistics']]['view'], true);
if (UserAuth::isAuth()) {
//load language file
$this->lang->load('backoffice/dashboard', 'fr');
$this->data['content'] = "backoffice/statistics/statistics_view";
$this->data['page_title'] = $this->lang->line('menu_reports_statistics');
$this->data['load_styles'] = array(
''
);
$this->load_extra_files(array("moment" => true,"date_range" => true));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url("auth"));
}
}
public function user_profile() {
if (UserAuth::isAuth()) {
//load model
$this->load->model("user_model");
//load language file
$this->lang->load('backoffice/my_profile', 'fr');
$this->data['content'] = "backoffice/profile/user_profile_view";
$this->data['page_title'] = $this->lang->line('page_my_profile');
$this->data["user_data"] = $this->user_model->get_user_information_by_user_id($this->data['logged_in']['user_id'], BO_USER_ROLES);
$this->load_extra_files(array("form_validator" => true));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function users_account()
{
Page::authorize(PAGE_CODE['sys_settings'], PRIVS[PAGE_CODE['sys_settings']]['user_mgt_view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("user_model");
$this->load->model("UserRole");
//load language file
$this->lang->load('backoffice/system_config', 'fr');
$this->data['content'] = "backoffice/admin/users_account_view";
$this->data['page_title'] = $this->lang->line('page_users_account_management');
$this->data["users_list"] = $this->user_model->get_user_information_list($this->data["logged_in"]["user_id"], array(2));
$this->data["user_roles"] = $this->UserRole->roles();
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function user_roles()
{
Page::authorize(PAGE_CODE['sys_settings'], PRIVS[PAGE_CODE['sys_settings']]['user_role_view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("user_model");
$this->load->model("UserRole");
//load language file
$this->lang->load('backoffice/system_config', 'fr');
$this->data['content'] = "backoffice/admin/user_roles_view";
$this->data['page_title'] = "RĂ´le d'utilisateur";
$this->data["users_list"] = $this->user_model->get_user_information_list($this->data["logged_in"]["user_id"], array(2));
$this->data["user_roles"] = (new UserRole())->all();
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function city_location()
{
Page::authorize(PAGE_CODE['sys_settings'], PRIVS[PAGE_CODE['sys_settings']]['city_mgt_view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_city_location_model");
//load language file
$this->lang->load('backoffice/system_config', 'fr');
$this->data['content'] = "backoffice/admin/city_location_view";
$this->data['page_title'] = $this->lang->line('page_city_location');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function event_type()
{
Page::authorize(PAGE_CODE['sys_settings'], PRIVS[PAGE_CODE['sys_settings']]['evtype_mgt_view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_type_model");
//load language file
$this->lang->load('backoffice/system_config', 'fr');
$this->data['content'] = "backoffice/admin/event_type_view";
$this->data['page_title'] = $this->lang->line('page_event_preference');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function contact_email()
{
Page::authorize(PAGE_CODE['sys_settings'], PRIVS[PAGE_CODE['sys_settings']]['contact_form_view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_type_model");
$this->load->model("personalization_model");
//load language file
$this->lang->load('backoffice/system_config', 'fr');
$this->data['content'] = "backoffice/admin/contact_email";
$this->data['nature_list'] = $this->personalization_model->getnature();
$this->data['page_title'] = $this->lang->line('page_contact_email');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->data['load_styles'] = array(
''
);
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function personalization()
{
Page::authorize(PAGE_CODE['personalization'], PRIVS[PAGE_CODE['personalization']]['view'], true);
if (UserAuth::isAuth()) {
$this->lang->load('backoffice/system_config', 'fr');
$this->lang->load('backoffice/dashboard', 'fr');
$this->lang->load('backoffice/personalization', 'fr');
$this->data['role'] = UserAuth::auth()['role_id'];
$this->data['content'] = "backoffice/personalization/personalization_view";
$this->data['page_title'] = $this->lang->line('page_personalization');
$this->load->model('personalization_model');
$this->data['homepage_title'] = $this->personalization_model->get_homepage_title();
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"tinymcev5" => true,
"app" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_styles'], '');
$this->data['load_styles'] = array(
''
);
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function faqs()
{
Page::authorize(PAGE_CODE['faq'], PRIVS[PAGE_CODE['faq']]['view'], true);
if (UserAuth::isAuth()) {
$this->load->model('frontoffice_faq_model');
$this->lang->load('backoffice/system_config', 'fr');
$this->lang->load('backoffice/dashboard', 'fr');
$this->lang->load('backoffice/personalization', 'fr');
$this->data['content'] = "backoffice/faq/faq";
$this->data['page_title'] = $this->lang->line('page-title');
$this->data['faq_cat'] = $this->frontoffice_faq_model->list_faq_cat();
$this->data['faq_list'] = $this->frontoffice_faq_model->listfaqquestions();
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"tinymce" => true,
"app" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function event()
{
Page::authorize(PAGE_CODE['events'], PRIVS[PAGE_CODE['events']]['view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_type_model");
$this->load->model("event_model");
$this->load->model("event_city_location_model");
//load language file for event
$this->lang->load('backoffice/events', 'fr');
//load language file for event schedule
$this->lang->load('backoffice/events_template_schedule', 'fr');
//load language for event resend email
$this->lang->load('backoffice/event_resend_email', 'fr');
$this->data['content'] = "backoffice/events/event_view";
$this->data['page_title'] = $this->lang->line('event_management');
$this->data["event_types"] = $this->event_type_model->list_event_types();
$this->data["city_location"] = $this->event_city_location_model->list_city();
//$this->data["similar_events"] = $this->event_model->similar_events(0);
$this->load_extra_files(array(
"datatable" => true,
"datetime" => true,
"tinymce" => true,
"form_validator" => true,
"money_formatter" => true,
"ajax_helper" => true,
"easycomplete" => true,
'typeahead' => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_styles'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_styles'], '');
// for the event preview
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function reports_subscribers_list()
{
Page::authorize(PAGE_CODE['subscribers'], PRIVS[PAGE_CODE['subscribers']]['view'], true);
if (UserAuth::isAuth()) {
$this->data['load_styles'] = array(
'',
''
);
$subscription = $this->notif->getNotificationCookie();
if(!empty($subscription) && !is_null($subscription)) {
$this->data['user_id'] = $subscription->user_id;
$this->notif->deleteNotificationCookie();
}
$this->data['countries'] = $this->registration->getAllCountries();
array_push($this->data['load_styles'], '');
array_push($this->data['load_styles'], '');
//load model
$this->load->model("user_model");
$this->load->model("user_subscriber_model");
//load language file
$this->lang->load('backoffice/reports', 'fr');
$this->lang->load('frontoffice/set_preferences', 'fr');
$this->data['content'] = "backoffice/reports/subscribers_list_view";
$this->data['page_title'] = $this->lang->line('menu_reports_export_client_list');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"datetime" => true,
"inputmask" => true,
"ajax_helper" => true,
"select2" => true,
"selectize" => true,
"mask" => true,
"autocomplete" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$subscribers = $this->user_subscriber_model->getSubscribers();
$this->data['subscribers'] = $subscribers;
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function event_waitlist_management()
{
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_wait_list_reinvitation_setting_model");
//load language file
$this->lang->load('backoffice/events', 'fr');
$this->data['content'] = "backoffice/events/event_waitlist_management_view";
$this->data['page_title'] = $this->lang->line('menu_events_waitlist_management');
$this->data["user_data"] = $this->event_wait_list_reinvitation_setting_model->get_waitlist_default_reinvitation_settings();
$this->load_extra_files(array("form_validator" => true));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function email_template()
{
Page::authorize(PAGE_CODE['email'], PRIVS[PAGE_CODE['email']]['template_view'], true);
if (UserAuth::isAuth()) {
//load language file
$this->lang->load('backoffice/email', 'fr');
$this->data['content'] = "backoffice/email/email_template_view";
$this->data['page_title'] = $this->lang->line('menu_email_template');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"tinymce" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function email_default_setting()
{
Page::authorize(PAGE_CODE['email'], PRIVS[PAGE_CODE['email']]['settings_view'], true);
if (UserAuth::isAuth()) {
//load language file
$this->lang->load('backoffice/email', 'fr');
$this->data['content'] = "backoffice/email/email_defaul_setting_view";
$this->data['page_title'] = $this->lang->line('menu_email_default_setting');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"tinymce" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function email_assign_template()
{
if (UserAuth::isAuth()) {
//load language file
$this->lang->load('backoffice/email', 'fr');
$this->data['content'] = "backoffice/email/email_assign_template_view";
$this->data['page_title'] = $this->lang->line('menu_email_assign_template');
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"tinymce" => true,
"typeahead" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function email_reminder()
{
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_type_model");
$this->load->model("event_model");
$this->load->model("event_email_template_model");
$this->load->model("event_city_location_model");
//load language file
$this->lang->load('backoffice/email', 'fr');
$this->data['content'] = "backoffice/email/email_reminder_view";
$this->data['page_title'] = $this->lang->line('menu_events_reminder');
$this->data["event_types"] = $this->event_type_model->list_event_types();
$this->data["city_location"] = $this->event_city_location_model->list_city();
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"datetime" => true,
"tinymce" => true,
"typeahead" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
public function push_event()
{
Page::authorize(PAGE_CODE['email'], PRIVS[PAGE_CODE['email']]['push_view'], true);
if (UserAuth::isAuth()) {
//load model
$this->load->model("event_type_model");
$this->load->model("event_model");
$this->load->model("event_email_filter_model");
$this->load->model("event_email_template_model");
$this->load->model("event_city_location_model");
//load language file
$this->lang->load('backoffice/email', 'fr');
$this->data['content'] = "backoffice/email/email_push_view";
$this->data['page_title'] = $this->lang->line('menu_email_push');
$this->data['filter'] = $this->event_email_filter_model->get_filters();
$this->data["event_types"] = $this->event_type_model->list_event_types();
$this->data["city_location"] = $this->event_city_location_model->list_city();
$this->load_extra_files(array(
"form_validator" => true,
"datatable" => true,
"moment" => true,
"date_range" => true,
"bootstrap_select" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
/**
* Display view template of No Show
*
* @param integer $event_id
* @param integer $event_schedule_id
* @return void
* access public member
*/
public function attendance(int $eventId, int $eventScheduleId)
{
Page::authorize(PAGE_CODE['noshow'], PRIVS[PAGE_CODE['noshow']]['view'], true);
//Load no show model
$this->load->model('nshow_model');
//Get event details by event schedule ID
$eventDetails = $this->nshow_model->getEventScheduleDetails($eventScheduleId);
//redirect login if empty session
if (UserAuth::isAuth()) {
redirect(base_url('auth'));
}
//redirect 404 if no event details or event ID is present
if (!$eventDetails || ((int)$eventDetails['event_id'] !== $eventId)) {
show_404();
}
//Grid titles date and month
$date = $eventDetails["date_month"] ?? '';
$start_date_time_hour = $eventDetails["start_date_time_hour"] ?? '';
//Load Languages
$this->lang->load('backoffice/system_config', 'fr');
$this->lang->load('backoffice/attendance', 'fr');
//hide menu
$this->data['hideMenu'] =" ";
$this->data['content'] = "backoffice/noshow/attendance";
$this->data['page_title'] = ucfirst(strtolower($eventDetails["title"].$start_date_time_hour));
$this->load_extra_files(array(
"datatable" => true,
"ajax_helper" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
$this->data['load_styles'] = array(
''
);
$this->load->view('backoffice_view', $this->data);
}
/**
* Display view template of Moderation v2
*
* @return void
* access public member
*/
public function moderation(){
Page::authorize(PAGE_CODE['moderation'], PRIVS[PAGE_CODE['moderation']]['view'], true);
if (UserAuth::isAuth()) {
//load model
// $this->load->model("event_type_model");
//load language file
$this->lang->load('backoffice/system_config', 'fr');
$this->lang->load('backoffice/moderation', 'fr');
$this->load_language_frontoffice();
//Get event types and city
$this->data['eventTypes'] = getSettingsData('eventTypes');
$this->data['city'] = getSettingsData('city');
$this->data['content'] = "backoffice/moderation/moderation_view_v2";
$this->data['page_title'] = $this->lang->line('menu_moderation');
$this->load_extra_files(array(
"form_validator" => true
));
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_scripts'], '');
array_push($this->data['load_styles'], '');
array_push($this->data['load_styles'], '');
$this->load->view('backoffice_view', $this->data);
} else {
redirect(base_url('auth'));
}
}
}