HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/irkboard.ru/hooks/boardIndexCalendar_807818771d710bf316bcc89a1ee7ce72.php
<?php

class boardIndexCalendar
{
	public $registry;
	
	public function __construct()
	{
        /* Make registry objects */
		$this->registry		=  ipsRegistry::instance();
		$this->DB			=  $this->registry->DB();
		$this->settings		=& $this->registry->fetchSettings();
		$this->lang			=  $this->registry->getClass('class_localization');
	}
	
	public function getOutput()
	{
		/* Load language  */
		$this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ) );
		
		/* Load calendar library */		
		require_once( IPSLib::getAppDir( 'calendar' ) .'/modules_public/calendar/calendars.php' );
		$cal = new public_calendar_calendar_calendars( $this->registry );
		$cal->makeRegistryShortcuts( $this->registry );
		
		/* Get current month and year */
		$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->registry->class_localization->getTimeOffset() ) );
		
		$this->now_date = array(
								 'year'    => $a[0],
								 'mon'     => $a[1],
							   );
		
		/* Setup language arrays */
		$cal->month_words = 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'] );
        
		if( ! $this->settings['ipb_calendar_mon'] )
		{
			$cal->day_words   = array( $this->lang->words['D_0'], $this->lang->words['D_1'], $this->lang->words['D_2'],
										$this->lang->words['D_3'], $this->lang->words['D_4'], $this->lang->words['D_5'],
										$this->lang->words['D_6'] );
		}
		else
		{
			$cal->day_words   = array( $this->lang->words['D_1'], $this->lang->words['D_2'], $this->lang->words['D_3'],
										$this->lang->words['D_4'], $this->lang->words['D_5'], $this->lang->words['D_6'],
										$this->lang->words['D_0'] );
		}		
		
		/* Return calendar */
		return "<div id='mini_calendars' class='calendar_wrap'>". $cal->getMiniCalendar( $this->now_date['mon'], $this->now_date['year'] ) . '</div><br />';
	}
}