Mon compte

ATAP USA – Mon compte

Bienvenue [insert_php]
$current_user = wp_get_current_user();
echo $current_user->user_firstname;
[/insert_php]!!!

[insert_php]
global $wpdb;
$total_payable=100;
$total_special=0;
$contribution=0;

$locations = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=11 AND user_id=$current_user->ID”,OBJECT);
foreach($locations as $location){
$u_location=$location->value;
}
$year_reg = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=12 AND user_id=$current_user->ID”,OBJECT);
foreach($year_reg as $year_regs){
$year=$year_regs->value;
}
$phones = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=10 AND user_id=$current_user->ID”,OBJECT);
foreach($phones as $phone){
$phn=$phone->value;
}
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
$total=0;
$adhesion = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=13 AND user_id=$current_user->ID”,OBJECT);
foreach($adhesion as $ads){
$adhes=$ads->value;
$total=$total+$adhes;

}
echo “

“;
$price_fields = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_fields WHERE group_id=2 order by name ASC “,OBJECT);

foreach($price_fields as $field){
$rece_nnames=”;
$receipt=”;

$field_idd=$field->id;
$field_nname=$field->name;
$prices = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=$field_idd AND user_id=$current_user->ID”,OBJECT);

$receipt_fields = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_fields WHERE name like ‘receipt-$field_nname%'”,OBJECT);
foreach($receipt_fields as $receipt_field){

$rec_idd=$receipt_field->field_id;
$rece_nnames = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=$rec_idd AND user_id=$current_user->ID”,OBJECT);
}

foreach($rece_nnames as $rece){
$receipt=$rece->value;
}
$new_price=0;
foreach($prices as $price){
$new_price=$price->value;
$new_price=intval($new_price);

$total=$total+$new_price;
}
echo “

“;
if($receipt){
echo “

“;
}
else{
echo “

“;
}
if($new_price==0){
echo “

“;
}
else{
echo “

“;
}
echo “

“;

}

$price_fields = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_fields WHERE group_id=3 order by order_by ASC “,OBJECT);

foreach($price_fields as $field){
$rece_nnames=”;
$receipt=”;

$field_idd=$field->id;
$field_nname=$field->name;
$prices = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=$field_idd AND user_id=$current_user->ID”,OBJECT);

$receipt_fields = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_fields WHERE name like ‘receipt-$field_nname%'”,OBJECT);
foreach($receipt_fields as $receipt_field){

$rec_idd=$receipt_field->field_id;
$rece_nnames = $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=$rec_idd AND user_id=$current_user->ID”,OBJECT);
}

foreach($rece_nnames as $rece){
$receipt=$rece->value;
}
$new_price=0;
foreach($prices as $price){
$new_price=$price->value;
$new_price=intval($new_price);

$total=$total+$new_price;
}
echo “

“;
if($receipt){
echo “

“;
}
else{
echo “

“;
}
if($new_price==0){
echo “

“;
}
else{
echo “

“;
}
echo “

“;

}
$diff=”;

$status= $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=15 AND user_id=$current_user->ID”,OBJECT);
foreach($status as $st){
$u_st=$st->value;
}
$bal=0;
$balances= $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=14 AND user_id=$current_user->ID”,OBJECT);
foreach($balances as $balance){
$bal=$balance->value;
}

echo “

“;
echo “

“;
echo “

“;
if($u_st==’A Jour’){
$u_sst=”A Jour”;
$class=”green”;
echo “

“;
echo “

“;
echo “

“;
}else{
$u_sst=”Non-A-Jour”;
$class=”red”;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
}

[/insert_php]

Prénom “.$current_user->user_firstname.”
Nom “.$current_user->user_lastname.”
Numero de Telephone “.$phn.”
Adhérer Depuis “.$year.”
Member ID “.$current_user->user_login.”
Etat de Residence “.$u_location.”
Adhesion $”.$adhes.”
“.$field->name.” (“.$receipt.”) “.$field->name.” $”.$new_price.”
“.$field->name.” (“.$receipt.”) “.$field->name.” $”.$new_price.”
Total Contribue $”.$total.”
Status “.$u_sst.”
Montant a Payé $”.$bal.”
Status “.$u_sst.”
[insert_php]
$args = array(
‘orderby’ => ‘user_nicename’,
‘role__not_in’ => [‘administrator’],
‘order’ => ‘ASC’
);
$i=0;
$users = get_users( $args );
echo “

ATAP Membres

“;
echo ‘

La liste complete de tous nos membres

‘;
foreach ( $users as $user ) {
$i++;
if ($i % 2 == 1) {
echo “

“;
}
echo ‘

‘;
if ($i % 2 == 0) {
echo “

“;
}
}

[/insert_php]

‘ . esc_html( $user->first_name).’ ‘. esc_html( $user->last_name) .’
[insert_php]
$args = array(
‘role’ => ‘nonajour’,
‘orderby’ => ‘user_nicename’,
‘order’ => ‘ASC’
);
$i=0;
$users = get_users( $args );
echo “

Non-A-Jour

“;
echo ‘

Les membres sure cette page ne sont pas a jour envers le bureau d”ATAP. Veillez contacter le bureau dans les plus brefs delais pour regler votre situation. Merci

‘;
foreach ( $users as $user ) {
global $wpdb;
$total_payable=100;
$total_special=0;
$contribution=0;

$total=0;
$balances= $wpdb->get_results(“SELECT * FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id=14 AND user_id=$user->ID”,OBJECT);
foreach($balances as $balance){
$bal=$balance->value;
}

$i++;
if ($i % 2 == 1) {
echo “

“;
}
echo ‘

‘;
if ($i % 2 == 0) {
echo “

“;
}
}

[/insert_php]

‘ . esc_html( $user->first_name).’ ‘. esc_html( $user->last_name) .’| $’.$bal.’