102 lines
2.5 KiB
PHP
102 lines
2.5 KiB
PHP
<?php
|
|
|
|
/*
|
|
* it means someone outside wp is accessing the file, in this case kill it.
|
|
*/
|
|
if (!defined('ABSPATH')) {
|
|
die('You can not access this file!');
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function display_page_css_CIPF($user_id = null) {
|
|
$css_for_states = array();
|
|
|
|
/*
|
|
* etat paiement
|
|
* - 'en_cours'
|
|
* - 'reussi'
|
|
* - 'echec'
|
|
* - 'aucun'
|
|
*/
|
|
if (is_payment_success_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/paiement_reussi.css';
|
|
set_payment_nothing_CIPF($user_id);
|
|
}
|
|
else if (is_payment_failure_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/paiement_echec.css';
|
|
set_payment_nothing_CIPF($user_id);
|
|
}
|
|
else if (is_payment_started_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/paiement_en_cours.css';
|
|
}
|
|
else if (is_payment_nothing_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/paiement_aucun.css';
|
|
}
|
|
|
|
/*
|
|
* etat compte ('etat_compte') :
|
|
* 1. new . 'nouveau prof'
|
|
* 2. to_pay . 'doit payer'
|
|
* 3. valid . 'carte valide'
|
|
* 4. waiting_invalid . 'en attente invalide'
|
|
* 5. waiting_valid . 'en attente valide'
|
|
* 6. expired . 'carte expiree'
|
|
*/
|
|
if (is_account_new_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/compte_nouveau_prof.css';
|
|
}
|
|
else if (is_account_to_pay_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/compte_doit_payer.css';
|
|
}
|
|
else if (is_account_valid_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/compte_carte_valide.css';
|
|
}
|
|
else if (is_account_waiting_invalid_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/compte_en_attente_invalide.css';
|
|
}
|
|
else if (is_account_waiting_valid_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/compte_en_attente_valide.css';
|
|
}
|
|
else if (is_account_expired_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/compte_carte_expiree.css';
|
|
}
|
|
|
|
/*
|
|
* etat carte
|
|
* - 'Commande'
|
|
* - 'Renouvellement'
|
|
*
|
|
*/
|
|
if (is_card_new_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/carte_commande.css';
|
|
}
|
|
else if (is_card_renew_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/carte_renouvellement.css';
|
|
}
|
|
|
|
/*
|
|
* paiement
|
|
* - 'Paypal'
|
|
* - 'Virement'
|
|
*
|
|
*/
|
|
if (is_payment_method_paypal_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/type_paypal.css';
|
|
}
|
|
else if (is_payment_method_transfert_CIPF($user_id)) {
|
|
$css_for_states[] = 'css/display_states/type_virement.css';
|
|
}
|
|
|
|
$cipf_states = new PLGNTLS_class();
|
|
$cipf_states->add_to_front($css_for_states);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|