/* User want to see that? */
if( $this->memberData['member_fg_show_stats'] && !$this->isModeratorSection )
{
/* Create list of months! */
$startDate = $this->memberData['joined'];
$actualMonth = date( 'n', $actualDate ); $monthsData = '';
$countMonths = 1;
/* Joined date is older than 12 months? */
/* Jak to zrobić? */
/* Set start date... */
IPSTime::setTimestamp( $startDate );
/* Create language array of months */
$monthsNames = array( $this->lang->words['M_1'], $this->lang->words['M_2'], $this->lang->words['M_3'], $this->lang->words['M_4'], $this->lang->words['M_5'], $this->lang->words['M_6'],
$this->lang->words['M_7'], $this->lang->words['M_8'], $this->lang->words['M_9'],
$this->lang->words['M_10'], $this->lang->words['M_11'], $this->lang->words['M_12'] );
/* List months! */
while( $startDate < $actualDate )
{
/* More than 12 months? */
if( $countMonths >= 12 )
{
break;
}
/* Get Month */
$dateArray = IPSTime::unixstamp_to_human( $startDate );
/* Add to list of months... */
$monthsData .= "\t<option value='{$dateArray['month']}'";
$monthsData .= ( $inputMonth && ( $inputMonth == $dateArray['month'] ) ) ? " selected='selected'" : '';
$monthsData .= ">{$monthsNames[ $dateArray['month'] - 1 ]} {$dateArray['year']}</option>\n";
/* Add month! */
IPSTime::add_month();
$startDate = IPSTime::getTimestamp();
/* Increment! */
$countMonths++;
}
/* Current month? */
$monthsData .= "\t<option value='".$actualMonth."'";
$monthsData .= ( !$inputMonth ) ? " selected='selected'" : '';
$monthsData .= ">{$monthsNames[ date( 'm', $startDate ) - 1 ]} ".date( 'Y', $startDate)."</option>\n"; }
Datę pobieram na zasadzie ostatnie 12 miesięcy, jeżeli data dołączenia jest większa niż 12 miesięcy.