new date handling

This commit is contained in:
asus
2024-04-09 15:54:44 +02:00
parent 36dc26817a
commit 731b69d97d
7 changed files with 238 additions and 247 deletions

View File

@@ -33,7 +33,6 @@ include_once(Plgntls::root_path() . 'php/paypal/paypal.php');
// profs
include_once(Plgntls::root_path() . 'php/profs_profil.php');
include_once(Plgntls::root_path() . 'php/profs_form_commande.php');
include_once(Plgntls::root_path() . 'php/profs_dates.php');
include_once(Plgntls::root_path() . 'php/profs_handle_states.php');
// partners
include_once(Plgntls::root_path() . 'php/partners_register.php');
@@ -41,6 +40,7 @@ include_once(Plgntls::root_path() . 'php/partners_page.php');
include_once(Plgntls::root_path() . 'php/partners_form.php');
// utils
include_once(Plgntls::root_path() . 'php/_utils_acf_fields.php');
include_once(Plgntls::root_path() . 'php/_utils_acf_dates.php');
include_once(Plgntls::root_path() . 'php/_utils_redirections.php');
include_once(Plgntls::root_path() . 'php/_utils_display_css.php');
include_once(Plgntls::root_path() . 'php/_utils_checks_roles.php');
@@ -83,7 +83,6 @@ class Cipf {
const ACF_PAGE_STATE = ['_name'=>'etat_page_partenaire', 'publish'=>'Publiee', 'draft'=>'Brouillon'];
const ACF_CARD_ORDER_ID = ['_name'=>'order_id'];
const ACF_HISTORY = ['_name'=>'history'];
const ACF_PROF_DELETE_ACCOUNT = ['_name'=>'date_suppression_compte'];
// META
const META_PAYEMENT_STATUS = 'cipf_payement_status';
@@ -132,15 +131,6 @@ class Cipf {
// SHORTCODES
// SCHEDULED EVENTS
const DURATION_OLD_ORDER_ID = '3 days';
const DURATION_ACCOUNT_DELETE_AFTER_EXPIRE = '+6 months';
const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_FIRST = '1 month';
const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_LAST = '7 days';
const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_FIRST = '1 month';
const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_LAST = '7 days';
const DURATION_REMINDER_BEFORE_OFFER_EXPIRE = '7 days';
// OPTIONS
const OPTION_PAYPAL = [
'_name'=>'cipf_paypal_credentials',
@@ -280,9 +270,18 @@ contactez la fipf directement",
const FORM_PROF_COMMANDE_ID = 'prof_commande';
const FORM_PROF_TRANSFERT_ID = 'prof_valide_virement';
// DURATIONS
const DURATION_CARD_VALIDITY = '+1 year'; // string : time of validity of the card (ex: '1 month' or '1 year' or '60 days')
const DURATION_OLD_ORDER_ID = '+3 days';
const DURATION_ACCOUNT_DELETE_AFTER_EXPIRE = '+6 months';
const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_FIRST = '-1 month';
const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_LAST = '-7 days';
const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_FIRST = '-1 month';
const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_LAST = '-7 days';
const DURATION_REMINDER_BEFORE_OFFER_EXPIRE = '-7 days';
// OTHER
const CARD_RENEW_PERIOD = 31; // int : number of days before expiration when renew card start to be possible
const CARD_VALIDITY_TIME = '1 year'; // string : time of validity of the card (ex: '1 month' or '1 year' or '60 days')
const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php)
const ADMIN_VALIDATE_PROF_FIELD = 'admin_activate_prof_cipf'; // for admin_modif_prof.php
const INPUT_HIDDEN_ROLE = 'cipf_user_role';