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/admin/applications/core/extensions/rssOutput.php
<?php

/**
 * Invision Power Services
 * IP.Board v3.0.1
 * RSS output plugin :: report center
 * Last Updated: $Date: 2009-03-12 13:47:14 -0400 (Thu, 12 Mar 2009) $
 *
 * @author 		$Author: bfarber $
 * @copyright	(c) 2001 - 2009 Invision Power Services, Inc.
 * @license		http://www.invisionpower.com/community/board/license.html
 * @package		Invision Power Board
 * @subpackage	Core
 * @link		http://www.invisionpower.com
 * @since		6/24/2008
 * @version		$Revision: 4206 $
 */

if ( ! defined( 'IN_IPB' ) )
{
	print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
	exit();
}

class rss_output_core
{
	/**
	* Expiration date
	*
	* @access	private
	* @var		integer			Expiration timestamp
	*/
	private $expires			= 0;
	
	/**
	* Grab the RSS links
	*
	* @access	public
	* @return	array
	*/
	public function getRssLinks()
	{
		//-----------------------------------------
		// As this is member specific, hardcoded
		// into output library
		//-----------------------------------------
		
		return array();
	}
	
	/**
	* Grab the RSS document content and return it
	*
	* @access	public
	* @return	string		RSS document
	*/
	public function returnRSSDocument()
	{
		//-----------------------------------------
		// INIT
		//-----------------------------------------
		
		$member_id		= intval( ipsRegistry::$request['member_id'] );
		$secure_key		= IPSText::md5Clean( ipsRegistry::$request['rss_key'] );
		$rss_data		= array();
		$to_print		= '';
		
		if( $secure_key and $member_id )
		{
			if( $member_id == ipsRegistry::member()->getProperty('member_id') )
			{
				//-----------------------------------------
				// Get RSS export
				//-----------------------------------------
				
				$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select'	=> 'rss_cache',
																	'from'		=> 'rc_modpref',
																	'where'		=> "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'" ) );
				
				//-----------------------------------------
				// Got one?
				//-----------------------------------------
				
				if ( $rss_data['rss_cache'] )
				{
					return $rss_data['rss_cache'];
				}
			}

			//-----------------------------------------
			// Create a dummy one
			//-----------------------------------------
			
			ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' );
			
			require_once( IPS_KERNEL_PATH . 'classRss.php' );
			$rss			=  new classRss();
			$channel_id = $rss->createNewChannel( array( 'title'			=> ipsRegistry::getClass('class_localization')->words['rss_feed_title'],
															'link'			=> ipsRegistry::$settings['board_url'],
															'description'	=> ipsRegistry::getClass('class_localization')->words['reports_rss_desc'],
															'pubDate'		=> $rss->formatDate( time() )
												)		);
			$rss->createRssDocument();
			
			return $rss->rss_document;
		}
	}
	
	/**
	* Grab the RSS document expiration timestamp
	*
	* @access	public
	* @return	integer		Expiration timestamp
	*/
	public function grabExpiryDate()
	{
		return time() + 3600;
	}
}