get

$this

$profilePromoteTable = $this -> container -> get ( 'User_Model_DbTable_ProfilePromote' ) ;

get

$this

$userBannedTable = $this -> container -> get ( 'User_Model_DbTable_UserBanned' ) ;

get

$this

$profileTable = $this -> container -> get ( 'User_Model_DbTable_Profile' ) ;

get

$this

$transactionTable = $this -> container -> get ( 'Exchange_Model_DbTable_Transaction' ) ;

$this

if

if ( isset ( $this -> user ) ) {

$this

$profile = $profileTable -> findFullProfile ( [ 'id' => $this -> user -> getId ( ) ] ) ;

$this

$this -> view -> assign ( 'profile' , $profile ) ;

$this

$this -> view -> assign ( 'top20Today' , $top20Today ) ;

$this

$this -> view -> assign ( 'top20Week' , $top20Week ) ;

$this

$this -> view -> assign ( 'top20Month' , $top20Month ) ;

if

if ( $profile [ 'sex' ] == User_Model_Profile :: SEX_MALE ) {

if

if ( $lastMostActiveToday = array_pop ( $top20MostActiveToday ) ) {

if

if ( $lastMostActiveWeek = array_pop ( $top20MostActiveWeek ) ) {

if

if ( $lastMostActiveMonth = array_pop ( $top20MostActiveMonth ) ) {

if

if ( $lastMostGenerousToday = array_pop ( $top20MostGenerousToday ) ) {

if

if ( $lastMostGenerousWeek = array_pop ( $top20MostGenerousWeek ) ) {

if

if ( $lastMostGenerousMonth = array_pop ( $top20MostGenerousMonth ) ) {

$this

$this -> view -> assign ( 'mostActiveTodayDiff' , $mostActiveTodayDiff ) ;

$this

$this -> view -> assign ( 'mostActiveWeekDiff' , $mostActiveWeekDiff ) ;

$this

$this -> view -> assign ( 'mostActiveMonthDiff' , $mostActiveMonthDiff ) ;

$this

$this -> view -> assign ( 'mostGenerousTodayDiff' , $mostGenerousTodayDiff ) ;

$this

$this -> view -> assign ( 'mostGenerousWeekDiff' , $mostGenerousWeekDiff ) ;

$this

$this -> view -> assign ( 'mostGenerousMonthDiff' , $mostGenerousMonthDiff ) ;

else

} else {

if

if ( $lastMostRatedToday = array_pop ( $top20MostRatedToday ) ) {

if

if ( $lastMostRatedWeek = array_pop ( $top20MostRatedWeek ) ) {

if

if ( $lastMostRatedMonth = array_pop ( $top20MostRatedMonth ) ) {

if

if ( $lastMostWatchedToday = array_pop ( $top20MostRatedToday ) ) {

if

if ( $lastMostWatchedWeek = array_pop ( $top20MostWatchedWeek ) ) {

if

if ( $lastMostWatchedMonth = array_pop ( $top20MostWatchedMonth ) ) {

$this

$this -> view -> assign ( 'mostRatedTodayDiff' , $mostRatedTodayDiff ) ;

$this

$this -> view -> assign ( 'mostRatedWeekDiff' , $mostRatedWeekDiff ) ;

$this

$this -> view -> assign ( 'mostRatedMonthDiff' , $mostRatedMonthDiff ) ;

$this

$this -> view -> assign ( 'mostWatchedTodayDiff' , $mostWatchedTodayDiff ) ;

$this

$this -> view -> assign ( 'mostWatchedWeekDiff' , $mostWatchedWeekDiff ) ;

$this

$this -> view -> assign ( 'mostWatchedMonthDiff' , $mostWatchedMonthDiff ) ;

$this

$coinGiftHistoryToday = $transactionTable -> findCoinGiftHistory ( [ 'id' => $this -> user -> getId ( ) , 'period' => 'today' ] ) ;

$this

$coinGiftHistoryWeek = $transactionTable -> findCoinGiftHistory ( [ 'id' => $this -> user -> getId ( ) , 'period' => 'week' ] ) ;

$this

$coinGiftHistoryMonth = $transactionTable -> findCoinGiftHistory ( [ 'id' => $this -> user -> getId ( ) , 'period' => 'month' ] ) ;

$this

$this -> view -> assign ( 'coinGiftHistoryToday' , $coinGiftHistoryToday ) ;

$this

$this -> view -> assign ( 'coinGiftHistoryWeek' , $coinGiftHistoryWeek ) ;

$this

$this -> view -> assign ( 'coinGiftHistoryMonth' , $coinGiftHistoryMonth ) ;

$this

$currentPromote = $profilePromoteTable -> findActiveProfilePromote ( [ 'user_id' => $this -> user -> getId ( ) ] ) ;

new

$currentPromoteEndDate = new Zend_Date ( $currentPromote [ 'end_date' ] , 'yyyy-MM-dd HH:mm:ss' ) ;

new

$now

$now = new Zend_Date ( ) ;

$now

$now -> setHour ( 23 ) ;

$now

$now -> setMinute ( 59 ) ;