copy membershipID


{source} get( ‘id’ );
echo ‘Member ID# ‘ . $userId ;

$userId= 475;

?>{/source}

{source} get( ‘name’ );
echo $userName ;

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(‘square’));
$query->from($db->quoteName(‘grjp9_social_avatars’));
$query->where($db->quoteName(‘uid’) . ‘ LIKE ‘ . $userId);

// Reset the query using our newly populated query object.
$db->setQuery($query);
$result = $db->loadObject();
//echo $result->square;

$query = $db->getQuery(true);

$query->select($db->quoteName(array(‘grjp9_payplans_subscription.expiration_date’)));
$query->select(‘(SELECT’ .$db->quoteName(‘grjp9_social_fields_data.data’).’ FROM ‘.$db->quoteName(‘grjp9_social_fields_data’).’ WHERE ‘.
$db->quoteName(‘grjp9_social_fields_data.field_id’).’ = 96 AND ‘.
$db->quoteName(‘grjp9_social_fields_data.uid’).’=’.$db->quoteName(‘grjp9_users.id’). ‘) AS foil’);
$query->select(‘(SELECT’ .$db->quoteName(‘grjp9_social_fields_data.data’).’ FROM ‘.$db->quoteName(‘grjp9_social_fields_data’).’ WHERE ‘.
$db->quoteName(‘grjp9_social_fields_data.field_id’).’ = 97 AND ‘.
$db->quoteName(‘grjp9_social_fields_data.uid’).’=’.$db->quoteName(‘grjp9_users.id’). ‘) AS epee’);
$query->select(‘(SELECT’ .$db->quoteName(‘grjp9_social_fields_data.data’).’ FROM ‘.$db->quoteName(‘grjp9_social_fields_data’).’ WHERE ‘.
$db->quoteName(‘grjp9_social_fields_data.field_id’).’ = 98 AND ‘.
$db->quoteName(‘grjp9_social_fields_data.uid’).’=’.$db->quoteName(‘grjp9_users.id’). ‘) AS saber’);
$query->from($db->quoteName(‘grjp9_users’));
$query->join(‘INNER’, $db->quoteName(‘grjp9_payplans_subscription’) . ‘ ON (‘ . $db->quoteName(‘grjp9_users.id’) . ‘ = ‘ . $db->quoteName(‘grjp9_payplans_subscription.user_id’) . ‘)’);
$query->where($db->quoteName(‘grjp9_payplans_subscription.status’) . ‘ LIKE 1601 AND ‘. $db->quoteName(‘grjp9_users.id’).’ = ‘.$userId );
$db->setQuery($query);
$row = $db->loadRowList();

$foil=$row[0][1];
$epee=$row[0][2];
$saber=$row[0][3];

?>{/source}


{source} clear($query);
$query2 = $db->getQuery(true);
$query2->select($db->quoteName(array(‘grjp9_cab_certification_records.level’, ‘grjp9_cab_certification_records.weapon’ )));
$query2->from($db->quoteName(‘grjp9_cab_certification_records’));
$query2->where($db->quoteName(‘grjp9_cab_certification_records.candidateID’) . ‘ = ‘.$userId. ‘ AND (‘.$db->quoteName(‘grjp9_cab_certification_records.weapon’). ‘= “foil” OR
‘.$db->quoteName(‘grjp9_cab_certification_records.weapon’).’ = “armes”)’);
$query2->order(‘ FIELD (level,”assistant-moniteur”,”moniteur”,”prevot”,”master”) DESC’);

$db->setQuery($query2);
$row2 = $db->loadRowList();

echo ‘

‘;
if($row2[0][0]==””){
echo ‘Foil – ‘.’NA’;
}
else{
echo ‘Foil – ‘.$row2[0][0].”; //level in foil
}
?> {/source}


{source} clear($query);
$query2 = $db->getQuery(true);
$query2->select($db->quoteName(array(‘grjp9_cab_certification_records.level’, ‘grjp9_cab_certification_records.weapon’ )));
$query2->from($db->quoteName(‘grjp9_cab_certification_records’));
$query2->where($db->quoteName(‘grjp9_cab_certification_records.candidateID’) . ‘ = ‘.$userId. ‘ AND (‘.$db->quoteName(‘grjp9_cab_certification_records.weapon’). ‘= “epee” OR
‘.$db->quoteName(‘grjp9_cab_certification_records.weapon’).’ = “armes”)’);
$query2->order(‘ FIELD (level,”assistant-moniteur”,”moniteur”,”prevot”,”master”) DESC’);

$db->setQuery($query2);
$row2 = $db->loadRowList();

if($row2[0][0]==””){
echo ‘Epee – ‘.’NA’;
}
else{
echo ‘Epee – ‘.$row2[0][0].”; //level in foil
}
?> {/source}


{source} clear($query);
$query2 = $db->getQuery(true);
$query2->select($db->quoteName(array(‘grjp9_cab_certification_records.level’, ‘grjp9_cab_certification_records.weapon’ )));
$query2->from($db->quoteName(‘grjp9_cab_certification_records’));
$query2->where($db->quoteName(‘grjp9_cab_certification_records.candidateID’) . ‘ = ‘.$userId. ‘ AND (‘.$db->quoteName(‘grjp9_cab_certification_records.weapon’). ‘= “saber” OR
‘.$db->quoteName(‘grjp9_cab_certification_records.weapon’).’ = “armes”)’);
$query2->order(‘ FIELD (level,”assistant-moniteur”,”moniteur”,”prevot”,”master”) DESC’);

$db->setQuery($query2);
$row2 = $db->loadRowList();

if($row2[0][0]==””){
echo ‘Saber- ‘.’NA’;
}
else{
echo ‘Saber – ‘.$row2[0][0].”; //level in foil
}
?> {/source}

Expiration:
{source}

lifetime member‘;
}
else{
echo date(‘d-M-Y’, strtotime($row[0][0]));
}

?>
{/source}

Print Page


{source}
addScriptDeclaration(‘

printDivCSS = new String (““)
function printDiv() {

window.document.body.innerHTML=printDivCSS + document.getElementById(“imageID”).innerHTML;
window.window.focus();
window.window.print();
}

‘);
?>
{/source}