102 lines
2.3 KiB
PHP
102 lines
2.3 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 prof_display_css_CIPF() {
|
|
$css_for_states = array();
|
|
|
|
/*
|
|
* etat paiement
|
|
* - 'en_cours'
|
|
* - 'reussi'
|
|
* - 'echec'
|
|
* - 'aucun'
|
|
*/
|
|
if (is_payment_success_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/paiement_reussi.css';
|
|
set_payment_nothing_CIPF();
|
|
}
|
|
else if (is_payment_failure_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/paiement_echec.css';
|
|
set_payment_nothing_CIPF();
|
|
}
|
|
else if (is_payment_started_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/paiement_en_cours.css';
|
|
}
|
|
else if (is_payment_nothing_CIPF()) {
|
|
$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()) {
|
|
$css_for_states[] = 'css/display_states/compte_nouveau_prof.css';
|
|
}
|
|
else if (is_account_to_pay_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/compte_doit_payer.css';
|
|
}
|
|
else if (is_account_valid_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/compte_carte_valide.css';
|
|
}
|
|
else if (is_account_waiting_invalid_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/compte_en_attente_invalide.css';
|
|
}
|
|
else if (is_account_waiting_valid_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/compte_en_attente_valide.css';
|
|
}
|
|
else if (is_account_expired_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/compte_carte_expiree.css';
|
|
}
|
|
|
|
/*
|
|
* etat carte
|
|
* - 'Commande'
|
|
* - 'Renouvellement'
|
|
*
|
|
*/
|
|
if (is_card_new_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/carte_commande.css';
|
|
}
|
|
else if (is_card_renew_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/carte_renouvellement.css';
|
|
}
|
|
|
|
/*
|
|
* paiement
|
|
* - 'Paypal'
|
|
* - 'Virement'
|
|
*
|
|
*/
|
|
if (is_payment_method_paypal_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/type_paypal.css';
|
|
}
|
|
else if (is_payment_method_transfert_CIPF()) {
|
|
$css_for_states[] = 'css/display_states/type_virement.css';
|
|
}
|
|
|
|
|
|
return $css_for_states;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|