You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
742 lines
41 KiB
742 lines
41 KiB
<?php if (! defined('BASEPATH')) {
|
|
exit('No direct script access allowed');
|
|
}
|
|
|
|
use app\core\auth\User as UserAuth;
|
|
use app\core\auth\Page;
|
|
use app\core\utils\Response;
|
|
use app\core\notification\Notification as SubscriptionNotif;
|
|
use app\core\auth\Registration as UserRegistration;
|
|
|
|
class Backoffice extends MY_Controller
|
|
{
|
|
protected $notif;
|
|
protected $registration;
|
|
public function __construct()
|
|
{
|
|
$this->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'], '<!-- Google JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["dashboard"], {currenturl : "' . str_replace(base_url() . "?", base_url(), current_url()) . '", baseurl : "' . base_url() . '", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript" src="https://www.google.com/jsapi"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/dashboard/dashboard_version_1.js').'" type="text/javascript"></script>');
|
|
// array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/dashboard/dashboard.js').'" type="text/javascript"></script>');
|
|
$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(
|
|
'<link href="'.styles_bundle().'backoffice/statistics.css" rel="stylesheet">'
|
|
);
|
|
|
|
$this->load_extra_files(array("moment" => true,"date_range" => true));
|
|
array_push($this->data['load_scripts'], '<!-- Google JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'chartJS/Chart.min.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'chartJS/utils.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'chartJS/analyzer.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["dashboard"], {currenturl : "' . str_replace(base_url() . "?", base_url(), current_url()) . '", baseurl : "' . base_url() . '", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/statistics/statistics_page.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'html2pdf/es6-promise.auto.min.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'html2pdf/jspdf.min.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'html2pdf/html2canvas.min.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'html2pdf/html2pdf.bundle.min.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/statistics/statistics_export.js').'" type="text/javascript"></script>');
|
|
$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'], '<script defer type="text/javascript">app.setLocale(["my_profile|modal"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'",baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/profile/user_profile.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<!-- Init JS -->');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|uam"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/admin/users_account.js').'" type="text/javascript"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|uam"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . app_bundle() . 'backoffice/admin/user_role.js"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . app_bundle() . 'backoffice/admin/users_account.js"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|cl"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/admin/city_location.js').'" type="text/javascript"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|ep"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/admin/event_types.js').'" type="text/javascript"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|ep"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/admin/contact_email.js').'" type="text/javascript"></script>');
|
|
$this->data['load_styles'] = array(
|
|
'<link href="'.auto_version(styles_bundle().'backoffice/contact_email.css').'" rel="stylesheet">'
|
|
);
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|ep"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<script type="text/javascript">app.setLocale(["set_preferences|setpref"], {}, 2);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' .auto_version(plugins_bundle() . 'imagepreview/imagepreview.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' .auto_version(plugins_bundle() . 'croppie/croppie.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<link href="' .auto_version(plugins_bundle() . 'croppie/croppie.css').'" rel="stylesheet">');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/personalization/personalization.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'bsMultiselect/bootstrap-multiselect.min.js').'" ></script>');
|
|
array_push($this->data['load_styles'], '<link href="'.auto_version(plugins_bundle().'bsMultiselect/bootstrap-multiselect.css').'" rel="stylesheet">');
|
|
|
|
$this->data['load_styles'] = array(
|
|
'<link href="'.auto_version(styles_bundle().'backoffice/personalize.css').'" rel="stylesheet">'
|
|
);
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|ep"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/faq/faq.js').'" type="text/javascript"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["events", "email"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
|
|
array_push($this->data['load_scripts'], '<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB8Cly9prg6HXksnTpX_WxEcn9jaBnk2Wc&libraries=places"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_category.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_attachment.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_speaker.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_schedule.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_assign_email_template.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_sponsors.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_resend_email.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/email_reminder.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_similar.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_comment.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_video.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_learning_outcome.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' .auto_version(plugins_bundle() . 'imagepreview/imagepreview.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' .auto_version(plugins_bundle() . 'croppie/croppie.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'bsMultiselect/bootstrap-multiselect.min.js').'" ></script>');
|
|
|
|
array_push($this->data['load_styles'], '<link href="'.auto_version(plugins_bundle().'bsMultiselect/bootstrap-multiselect.css').'" rel="stylesheet">');
|
|
|
|
array_push($this->data['load_scripts'], '<link href="' .auto_version(plugins_bundle() . 'croppie/croppie.css').'" rel="stylesheet">');
|
|
|
|
array_push($this->data['load_styles'], '<link href="'.auto_version(styles_bundle().'backoffice/event.css').'" rel="stylesheet">');
|
|
// for the event preview
|
|
array_push($this->data['load_scripts'], '<script src="'.auto_version(app_bundle().'frontoffice/jquery.translate.js').'" type="text/javascript"></script>');
|
|
|
|
$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(
|
|
'<link href="'.auto_version(styles_bundle().'backoffice/subscriber.css').'" rel="stylesheet">',
|
|
'<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">'
|
|
);
|
|
$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'], '<!-- Custom CSS -->');
|
|
array_push($this->data['load_styles'], '<link href="'.auto_version(styles_bundle().'backoffice/moderation.css').'" rel="stylesheet">');
|
|
//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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script type="text/javascript">app.setLocale(["reports"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/reports/subscribers_list.js').'" type="text/javascript"></script>');
|
|
array_push($this->data['load_scripts'], '<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["events|waitlist_mgmt"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'",baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/events/event_wait_list_reinvitation_management.js').'" type="text/javascript"></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["email"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/email/email_template.js').'" type="text/javascript" synchronous></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["email"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/email/email_default_setting.js').'" type="text/javascript" synchronous></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script type="text/javascript">app.setLocale(["email"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/email/email_assign_template.js').'" type="text/javascript" synchronous></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["email"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/email/email_reminder.js').'" type="text/javascript" synchronous></script>');
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["email"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/email/email_push.js').'" type="text/javascript" synchronous></script>');
|
|
|
|
$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'] =" <button style='float: left; margin-right: 10px; display: none;' data-id='1' id='hide-menu' class='btn btn-sm'><i class='fa fa-bars'></i></button>";
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'bsNumberInput/bootstrap-number-input.js').'"></script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(plugins_bundle() . 'bsfileinput/bootstrap-filestyle.min.js').'"></script>');
|
|
array_push($this->data['load_scripts'], '<script type="text/javascript">app.setLocale(["system_config|uam"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">var eventId = "'.$eventId.'"; var eventScheduleId = "'.$eventScheduleId.'"</script>');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/noshow/Attendance.js').'" type="text/javascript"></script>');
|
|
|
|
$this->data['load_styles'] = array(
|
|
'<link href="'.styles_bundle().'backoffice/noshow.css" rel="stylesheet">'
|
|
);
|
|
|
|
$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'], '<!-- Init JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer type="text/javascript">app.setLocale(["system_config|ep"], {currenturl : "'.str_replace(base_url()."?", base_url(), current_url()).'", baseurl : "'.base_url().'", timeout: '.Response::handleSessionTimeoutOnPageLoad("bo").'}, 1);</script>');
|
|
array_push($this->data['load_scripts'], '<!-- Custom JS -->');
|
|
array_push($this->data['load_scripts'], '<script defer src="' . auto_version(app_bundle() . 'backoffice/moderation/moderation.js').'" type="text/javascript"></script>');
|
|
|
|
array_push($this->data['load_styles'], '<!-- Custom CSS -->');
|
|
array_push($this->data['load_styles'], '<link href="'.auto_version(styles_bundle().'backoffice/moderation.css').'" rel="stylesheet">');
|
|
|
|
$this->load->view('backoffice_view', $this->data);
|
|
} else {
|
|
redirect(base_url('auth'));
|
|
}
|
|
}
|
|
}
|
|
|