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/cache/skin_cache/cacheid_1/skin_boards.php
<?php
/*--------------------------------------------------*/
/* FILE GENERATED BY INVISION POWER BOARD 3         */
/* CACHE FILE: Skin set id: 1               */
/* CACHE FILE: Generated: Wed, 19 Aug 2009 21:44:27 GMT */
/* DO NOT EDIT DIRECTLY - THE CHANGES WILL NOT BE   */
/* WRITTEN TO THE DATABASE AUTOMATICALLY            */
/*--------------------------------------------------*/

class skin_boards_1 {

/**
* Construct
*/
function __construct( ipsRegistry $registry )
{
	/* Make object */
	$this->registry   =  $registry;
	$this->DB         =  $this->registry->DB();
	$this->settings   =& $this->registry->fetchSettings();
	$this->request    =& $this->registry->fetchRequest();
	$this->lang       =  $this->registry->getClass('class_localization');
	$this->member     =  $this->registry->member();
	$this->memberData =& $this->registry->member()->fetchMemberData();
	$this->cache      =  $this->registry->cache();
	$this->caches     =& $this->registry->cache()->fetchCaches();
}
	/* -- birthday --*/
function birthday($user, $pyear) {
$IPBHTML = "";
$IPBHTML .= "<a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$user['member_id']}", 'public','' ), "{$user['members_seo_name']}", "showuser" ) . "' title='{$this->lang->words['view_profile']}'>{$user['members_display_name']}</a> " . (($pyear) ? ("(<strong>{$pyear}</strong>)") : ("")) . "";
return $IPBHTML;
}

/* -- boardIndexTemplate --*/
function boardIndexTemplate($lastvisit="", $stats=array(), $calendar_events=FALSE, $birthdays=FALSE, $chat_html='', $news_data=array(), $cat_data=array(), $show_side_blocks=true, $side_blocks=array()) {
$IPBHTML = "";

$this->templateVars['sidebar_enabled'] = "$show_side_blocks";
$this->__default__templateVars['sidebar_enabled'] = "$show_side_blocks";
$IPBHTML .= "" . $this->registry->getClass('output')->addJSModule("board", "0" ) . "
" . $this->registry->getClass('output')->addJSModule("hooks", "0" ) . "<script type='text/javascript'>
//<![CDATA[
	ipb.global.boardMarkers = $H({
		'f_cat_unread': \"" . $this->registry->getClass('output')->getReplacement("f_cat_read") . "\",
		'f_unread': \"" . $this->registry->getClass('output')->getReplacement("f_read") . "\",
		'f_pass_unread': \"" . $this->registry->getClass('output')->getReplacement("f_pass_read") . "\"
	});
	var markerURL = \"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=forums&module=ajax&section=markasread&secure_hash={$this->member->form_hash}&i=1&forumid=", 'public','' ), "", "" ) . "\"; // Ajax URL so don't use &amp;
//]]>
</script>
" . (($this->templateVars['sidebar_enabled']) ? ("<a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=forums&amp;module=extras&amp;section=toggle", 'public','' ), "", "" ) . "' id='close_sidebar'  class='sidebar_toggle rounded' " . ((IPSCookie::get('hide_sidebar') != '1') ? ("style='display: none'") : ("")) . "><img src='{$this->settings['img_url']}/sidebar_close.png' alt='{$this->lang->words['sidebar_close']}' /></a>
	<a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=forums&amp;module=extras&amp;section=toggle", 'public','' ), "", "" ) . "' id='open_sidebar' class='sidebar_toggle rounded' " . ((IPSCookie::get('hide_sidebar') == '1') ? ("style='display: none'") : ("")) . "><img src='{$this->settings['img_url']}/sidebar_open.png' alt='{$this->lang->words['sidebar_open']}' /></a>") : ("")) . "
<h2 class='hide'>{$this->lang->words['board_index_title']}</h2>
<div id='board_index' class='clearfix'>
	" . (($this->templateVars['sidebar_enabled']) ? ("<div id='index_stats' class='right clearfix' " . ((IPSCookie::get('hide_sidebar') == '1') ? ("style='display: none'") : ("")) . ">
			".$this->__f__d958a2eab48afcf0bb073317890c2832($lastvisit,$stats,$calendar_events,$birthdays,$chat_html,$news_data,$cat_data,$show_side_blocks,$side_blocks)."		</div>") : ("")) . "
	
	
	<div id='categories' class='" . ((IPSCookie::get('hide_sidebar') == '1' || !$this->templateVars['sidebar_enabled']) ? ("no_sidebar") : ("")) . " clearfix'>
		" . ((is_array($news_data) AND count($news_data)) ? ("
			<div id='latest_news' class='row2'><strong>{$this->lang->words['newslink']}</strong> <a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$news_data['id']}", 'public','' ), "{$news_data['seo_title']}", "showtopic" ) . "' title='{$this->lang->words['newslink']}'>{$news_data['title']}</a></div>
		") : ("")) . "
	<!-- CATS AND FORUMS -->
		" . ((is_array( $cat_data ) AND count( $cat_data )) ? ("
			".$this->__f__156da192367a5f5a3113630ae650cff7($lastvisit,$stats,$calendar_events,$birthdays,$chat_html,$news_data,$cat_data,$show_side_blocks,$side_blocks)."		") : ("")) . "
	</div>
</div>
<ul id='stat_links' class='filter_bar rounded'>
	<li><a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=core&amp;module=search&amp;do=active", 'public','' ), "", "" ) . "\" title=\"{$this->lang->words['today_active_cont']}\">{$this->lang->words['new_active_cont']}</a></li>
	<li><a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=forums&amp;module=extras&amp;section=stats&amp;do=leaders", 'public','' ), "", "" ) . "\" title=\"{$this->lang->words['sm_forum_leaders_title']}\">{$this->lang->words['sm_forum_leaders']}</a></li>
	<li><a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=forums&amp;module=extras&amp;section=stats", 'public','' ), "", "" ) . "\" title=\"{$this->lang->words['sm_all_posters_title']}\">{$this->lang->words['sm_today_posters']}</a></li>
	<li><a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=members&amp;section=view&amp;module=list&amp;max_results=20&amp;sort_key=posts&amp;sort_order=desc&amp;filter=ALL", 'public','' ), "", "" ) . "\" title=\"{$this->lang->words['sm_overall_posters_title']}\">{$this->lang->words['sm_overall_posters']}</a></li>
</ul>
<div id='board_statistics' class='statistics general_box clearfix'>
	" . (($this->settings['show_totals']) ? ("
		<div id='stats'>
			<h2>{$this->lang->words['board_stats']}</h2>
			<dl> 
				<dt>{$this->lang->words['total_posts']}</dt>
				<dd>{$stats['info']['total_posts']}</dd>
				<dt>{$this->lang->words['total_members']}</dt>
				<dd>{$stats['info']['mem_count']}</dd>
				<dt>{$this->lang->words['newest_member']}</dt>
				<dd><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "{$stats['info']['last_mem_link']}", '','' ), "%%{$stats['info']['last_mem_name']}%%", "showuser" ) . "' title='{$this->lang->words['view_profile']}'>{$stats['info']['last_mem_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($stats['info']['last_mem_id']) . "&nbsp;</dd>
				<dt>{$this->lang->words['online_at_once']}</dt>
				<dd>{$stats['info']['most_online']}<br /><span class='extra'>{$this->lang->words['on']} {$stats['info']['most_time']}</span></dd>
			</dl>
		</div>
	") : ("")) . "
	" . (($this->settings['show_active']) ? ("<div id='active_users' class='stats_list'>
			<h2>
				{$stats['TOTAL']} {$this->lang->words['active_users_text']} <span>{$this->lang->words['active_users']}</span><br />
				<span class='desc'>{$stats['MEMBERS']} {$this->lang->words['members']}, {$stats['GUESTS']} {$this->lang->words['guests']}, {$stats['ANON']} {$this->lang->words['anon_users']} | {$this->lang->words['show_by']}: <a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=members&amp;module=online&amp;sort_order=desc", 'public','' ), "", "" ) . "'>{$this->lang->words['oul_click']}</a> {$this->lang->words['or']} <a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=members&amp;module=online&amp;sort_key=name&amp;sort_order=asc&amp;show_mem=reg", 'public','' ), "", "" ) . "'>{$this->lang->words['oul_name']}</a></span>
			</h2>
			" . ((count($stats['NAMES'])) ? ("
				<p>
					<span class='name'>" . implode( ",</span> <span class='name'>", $stats['NAMES'] ) . "</span>					
				</p>
			") : ("")) . "
		</div>") : ("")) . "
	" . (($calendar_events) ? ("<div id='cal_events' class='stats_list'>
		<h2>{$this->lang->words['upcoming_events']}</h2>
		" . ((is_array( $calendar_events )) ? ("
			<ul>
				<li>" . implode( ",</li><li>", $calendar_events ) . "</li>
			</ul>
		") : ("
			<p>{$calendar_events}</p>
		")) . "
	</div>") : ("")) . "
	
	" . (($birthdays !== FALSE AND is_array( $birthdays['users'] ) AND count( $birthdays['users'] )) ? ("
		<div id='cal_bdays' class='stats_list'>
			<h2>{$birthdays['count']} {$this->lang->words['birthdays_today']}</h2>
			<p>
				<span class='name'>" . implode( ",</span> <span class='name'>", $birthdays['users'] ) . "</span>					
			</p>
		</div>
	") : ("" . (($this->settings['show_birthdays'] AND !$this->settings['autohide_bday']) ? ("
			<div id='cal_bdays' class='stats_list'>
				<h2>0 {$this->lang->words['birthdays_today']}</h2>
				<p>{$this->lang->words['no_birth_users']}</p>
			</div>
		") : ("")) . "")) . "
	
</div>
" . (($this->memberData['members_auto_dst'] == 1 AND $this->settings['time_dst_auto_correction']) ? ("
<script type='text/javascript'>
	ipb.vars['dst_on']	= parseInt(\"{$this->memberData['dst_in_use']}\");
	
	ipb.board.checkDST();
</script>
") : ("")) . "";
return $IPBHTML;
}


function __f__d958a2eab48afcf0bb073317890c2832($lastvisit="", $stats=array(), $calendar_events=FALSE, $birthdays=FALSE, $chat_html='', $news_data=array(), $cat_data=array(), $show_side_blocks=true, $side_blocks=array())
{
	$_ips___x_retval = '<!--hook.foreach.skin_boards.boardIndexTemplate.side_blocks.outer.pre-->';
	foreach( $side_blocks as $block )
	{
		
		$_ips___x_retval .= "
				{$block}
			
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

function __f__f541726503a3b682c0866fea92e281cd($lastvisit="", $stats=array(), $calendar_events=FALSE, $birthdays=FALSE, $chat_html='', $news_data=array(), $cat_data=array(), $show_side_blocks=true, $side_blocks=array(),$_data='',$forum_id='',$forum_data='')
{
	$_ips___x_retval = '';
	foreach( $forum_data['subforums'] as $__id => $__data )
	{
		
		$_ips___x_retval .= "
													" . (($__data[3]) ? ("<li class='newposts'>") : ("<li>")) . "<a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$__data[0]}", 'public','' ), "{$__data[2]}", "showforum" ) . "\" title='{$this->lang->words['go_to_forum']}'>{$__data[1]}</a></li>
												
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

function __f__4d94101cee176359960cff12838d1f9e($lastvisit="", $stats=array(), $calendar_events=FALSE, $birthdays=FALSE, $chat_html='', $news_data=array(), $cat_data=array(), $show_side_blocks=true, $side_blocks=array(),$_data='')
{
	$_ips___x_retval = '';
	foreach( $_data['forum_data'] as $forum_id => $forum_data )
	{
		
		$_ips___x_retval .= "
								" . (($forum_data['redirect_on']) ? ("
									<tr class='" .  IPSLib::next( $this->registry->templateStriping["catTable"] ) . " redirect_forum'>
										<td class='altrow'>" . $this->registry->getClass('output')->getReplacement("f_redirect") . "</td>
										<td>
											<h4><a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$forum_data['id']}", 'public','' ), "{$forum_data['name_seo']}", "showforum" ) . "\" title='{$this->lang->words['go_to_forum']}'>{$forum_data['name']}</a></h4>
											<p class='desc'>{$forum_data['description']}</p>
										</td>
										<td colspan='2'>
											{$this->lang->words['rd_hits']}: " . $this->registry->getClass('class_localization')->formatNumber( $forum_data['redirect_hits'] ) . "
										</td>
									</tr>
								") : ("<tr class='" .  IPSLib::next( $this->registry->templateStriping["catTable"] ) . "'>
										<td class='altrow'>
											<!-- SKINNOTE: this URL is wrong, needs updating -->
											" . (($forum_data['img_new_post'] != 'f_locked' && strstr( $forum_data['img_new_post'], 'unread' )) ? ("
												<a id='forum_img_{$forum_data['id']}' href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=forums&amp;module=forums&amp;section=markasread&amp;marktype=forum&amp;forumid={$forum_data['id']}&amp;returntoforumid={$this->request['f']}&amp;i=1", 'public','' ), "", "" ) . "\" title=\"{$this->lang->words['bi_markread']}\" class='forum_marker'>
													" . $this->registry->getClass('output')->getReplacement("{$forum_data['img_new_post']}") . "
												</a>
									
												<script type='text/javascript'>
													ipb.global.registerMarker( \"forum_img_{$forum_data['id']}\", \"{$forum_data['img_new_post']}\", markerURL + \"{$forum_data['id']}\" );
												</script>
											") : ("
												" . $this->registry->getClass('output')->getReplacement("{$forum_data['img_new_post']}") . "
											")) . "
										</td>
										<td>
											<h4><a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$forum_data['id']}", 'public','' ), "{$forum_data['name_seo']}", "showforum" ) . "\" title='{$this->lang->words['go_to_forum']}'>{$forum_data['name']}</a></h4>
											<p class='desc'>{$forum_data['description']}</p>
									
											" . (($forum_data['show_subforums'] AND count( $forum_data['subforums'] ) AND $forum_data['show_subforums']) ? ("
												<h5 class='hide'>{$this->lang->words['subforums']}</h5>
												<ol class='subforums'>
												".$this->__f__f541726503a3b682c0866fea92e281cd($lastvisit,$stats,$calendar_events,$birthdays,$chat_html,$news_data,$cat_data,$show_side_blocks,$side_blocks,$_data,$forum_id,$forum_data)."												</ol>
											") : ("")) . "
											<!-- Skinnote: Clean up queued stuff -->
											" . ((!empty($forum_data['_has_queued_and_can_see_icon'])) ? ("
												<em class='moderated'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$forum_data['id']}&amp;modfilter=all", 'public','' ), "{$forum_data['name_seo']}", "showforum" ) . "' title='{$this->lang->words['view_unapproved']}'>" . sprintf( $this->lang->words['f_queued'], $forum_data['queued_topics'], $forum_data['queued_posts']) . "</a></em>
											") : ("")) . "
										</td>
										<td class='altrow stats'>
											<ul>
												<li>{$forum_data['topics']} {$this->lang->words['topics']}</li>
												<li>{$forum_data['posts']} {$this->lang->words['replies']}</li>
											</ul>
										</td>
										<td>
											<ul class='last_post'>
												" . (($forum_data['hide_last_info']) ? ("
													<li>{$this->lang->words['f_protected']}</li>
												") : ("<li><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$forum_data['last_id']}&amp;view=getlastpost", 'public','' ), "{$forum_data['seo_last_title']}", "showtopic" ) . "' title='{$this->lang->words['view_last_post']}'>" . $this->registry->getClass('output')->getReplacement("f_lastpost") . "</a> <a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$forum_data['last_id']}&amp;view=getlastpost", 'public','' ), "{$forum_data['seo_last_title']}", "showtopic" ) . "' title='{$this->lang->words['view_last_post']}'>{$forum_data['last_post']}</a></li>
													<li><strong>{$this->lang->words['in']}</strong> {$forum_data['last_topic_title']}</li>
													<li>
														<strong>{$this->lang->words['by']}</strong> 
														" . ((isset($forum_data['last_poster_name']) AND $forum_data['last_poster_name']) ? ("" . (($forum_data['last_poster_id']) ? ("
																<a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$forum_data['last_poster_id']}", 'public','' ), "{$forum_data['seo_last_name']}", "showuser" ) . "' title='{$this->lang->words['view_profile']}'>{$forum_data['last_poster_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($forum_data['last_poster_id'], $forum_data['seo_last_name']) . "
															") : ("
																{$this->settings['guest_name_pre']}{$forum_data['last_poster_name']}{$this->settings['guest_name_suf']}
															")) . "") : ("
															{$this->lang->words['f_none']}
														")) . "
													</li>")) . "
											</ul>
										</td>
									</tr>")) . "
							
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

function __f__156da192367a5f5a3113630ae650cff7($lastvisit="", $stats=array(), $calendar_events=FALSE, $birthdays=FALSE, $chat_html='', $news_data=array(), $cat_data=array(), $show_side_blocks=true, $side_blocks=array())
{
	$_ips___x_retval = '';
	foreach( $cat_data as $_data )
	{
		
$this->registry->templateStriping['catTable'] = array( FALSE, "row1","row2");

		$_ips___x_retval .= "
				" . ((is_array( $_data['forum_data'] ) AND count( $_data['forum_data'] )) ? ("
										<div class='category_block block_wrap'>
						<h3 id='category_{$_data['cat_data']['id']}' class='maintitle'><a class='toggle right' href='#' title='{$this->lang->words['toggle_cat']}'>{$this->lang->words['toggle_cat']}</a> <a href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$_data['cat_data']['id']}", 'public','' ), "{$_data['cat_data']['name_seo']}", "showforum" ) . "\" title='{$this->lang->words['view_cat']}'>{$_data['cat_data']['name']}</a></h3>
						<table class='ipb_table' summary=\"{$this->lang->words['forums_in_cat']} '{$_data['cat_data']['name']}'\">
							<tr class='header'>
								<th scope='col' class='col_c_icon'>&nbsp;</th>
								<th scope='col' class='col_c_forum'>{$this->lang->words['cat_name']}</th>
								<th scope='col' class='col_c_stats stats'>{$this->lang->words['stats']}</th>
								<th scope='col' class='col_c_post'>{$this->lang->words['last_post_info']}</th>
							</tr>
							<!-- / CAT HEADER -->
							".$this->__f__4d94101cee176359960cff12838d1f9e($lastvisit,$stats,$calendar_events,$birthdays,$chat_html,$news_data,$cat_data,$show_side_blocks,$side_blocks,$_data)."						</table>
					</div>
				") : ("")) . "
			
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- hookBoardIndexStatusUpdates --*/
function hookBoardIndexStatusUpdates($rows) {
$IPBHTML = "";

$this->registry->templateStriping['recent_status'] = array( FALSE, "row1","row2 altrow");
$IPBHTML .= "<script type='text/javascript'>
var _hC = 0;
function statusHookClick(o)
{
	if ( ! _hC )
	{
		o.value = '';
		o.setStyle( { color: 'black' } );
		_hC++;
	}
}
</script>
<div class='general_box clearfix'>
	<h3><img src='{$this->settings['img_url']}/user_comment.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['recent_status_updates']}</h3>
	" . (($this->memberData['member_id'] AND $this->memberData['g_mem_info']) ? ("
		<form id='update_status_form' action='{$this->settings['base_url']}app=members&amp;module=profile&amp;section=status' method='post'>
			<input type='hidden' name='k' value='{$this->member->form_hash}' />
			<input type='hidden' name='rurl' value='" . base64_encode('act=idx') . "' />
			<p style='padding-top:4px;padding-bottom:6px'><span class='left' style='margin-right: 5px;margin-top:-2px'><img src='{$this->memberData['pp_mini_photo']}' width='{$this->memberData['pp_mini_width']}' height='{$this->memberData['pp_mini_height']}' class='photo' /></span><input type='text' class='input_text' size='32' maxlength='150' style='color:gray' value=\"{$this->lang->words['update_status_default']}\" onclick='statusHookClick(this)' name='new_status' /> <input type='submit' class='input_submit' value=' &raquo; ' /></p>
		</form>
	") : ("")) . "
	<ul class='hfeed block_list'>
		" . ((is_array( $rows ) && count( $rows )) ? ("
						".$this->__f__06b98af3d15cf25a9e0661f87d604128($rows)."		") : ("
			<li>{$this->lang->words['norecent_status_updates']}</li>
		")) . "
	</ul>
	
</div>";
return $IPBHTML;
}


function __f__06b98af3d15cf25a9e0661f87d604128($rows)
{
	$_ips___x_retval = '';
	foreach( $rows as $r )
	{
		
		$_ips___x_retval .= "
				<li class='hentry " .  IPSLib::next( $this->registry->templateStriping["recent_status"] ) . " clearfix'>
					<span class='left' style='margin-right: 5px;'><img src='{$r['pp_mini_photo']}' width='{$r['pp_mini_width']}' height='{$r['pp_mini_height']}' class='photo' /></span><address class=\"author vcard\"><a class=\"url fn\" href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['pp_member_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "\" title='{$this->lang->words['view_profile']}'>{$r['members_display_name']}</a></address>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($r['pp_member_id'], $r['members_seo_name']) . "<strong> {$r['pp_status']}</strong><br />
					<span class='date'><abbr class=\"published\" title=\"" . date( 'c', $r['pp_status_update'] ) . "\">" . $this->registry->getClass('class_localization')->getDate($r['pp_status_update'],"short", 0) . "</abbr></span>
				</li>
			
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- hookRecentBlogEntries --*/
function hookRecentBlogEntries($entries) {
$IPBHTML = "";

$this->registry->templateStriping['recent_entries'] = array( FALSE, "row1","row2 altrow");
$IPBHTML .= "<div class='general_box clearfix'>
		<h3><img src='{$this->settings['img_url']}/comment_new.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['recently_added_entries']}</h3>
		<ul class='hfeed block_list'>
			" . ((is_array( $entries ) && count( $entries )) ? ("
								".$this->__f__0519792b65ed58d9ffe71bfbf8e5be56($entries)."			") : ("
				<li>{$this->lang->words['norecent_entries_hook']}</li>
			")) . "
		</ul>
	</div>";
return $IPBHTML;
}


function __f__0519792b65ed58d9ffe71bfbf8e5be56($entries)
{
	$_ips___x_retval = '';
	foreach( $entries as $r )
	{
		
		$_ips___x_retval .= "
				<li class='hentry " .  IPSLib::next( $this->registry->templateStriping["recent_entries"] ) . "'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=blog&amp;module=display&amp;section=blog&amp;blogid={$r['blog_id']}&amp;showentry={$r['entry_id']}", 'public','' ), "{$r['_seo_entry_name']}", "showentry" ) . "' rel='bookmark' title='{$this->lang->words['view_entry']}'>{$r['entry_name']}</a> {$this->lang->words['recent_by']} <address class=\"author vcard\"><a class=\"url fn\" href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['entry_author_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "\" title='{$this->lang->words['view_profile']}'>{$r['members_display_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($r['entry_author_id'], $r['members_seo_name']) . "</address><br /><span class='date'><abbr class=\"published\" title=\"" . date( 'c', $r['entry_date'] ) . "\">" . $this->registry->getClass('class_localization')->getDate($r['entry_date'],"short", 0) . "</abbr></span></li>
				
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- hookRecentGalleryImages --*/
function hookRecentGalleryImages($rows) {
$IPBHTML = "";
$IPBHTML .= "<div class='maintitle'>{$this->lang->words['recent_gallery_images']}</div>
<div id='attach_wrap' class='rounded clearfix'>
	<ul>
	".$this->__f__bb2cb5576347aba4153e28a364b6093a($rows)."	</ul>
</div>
<br style='clear:both;' />";
return $IPBHTML;
}


function __f__bb2cb5576347aba4153e28a364b6093a($rows)
{
	$_ips___x_retval = '';
	foreach( $rows as $r )
	{
		
		$_ips___x_retval .= "
		<li>{$r['_image']}</li>
	
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- hookRecentTopics --*/
function hookRecentTopics($topics) {
$IPBHTML = "";

$this->registry->templateStriping['recent_topics'] = array( FALSE, "row1","row2 altrow");
$IPBHTML .= "<div class='general_box clearfix'>
		<h3><img src='{$this->settings['img_url']}/comment_new.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['recently_added_topics']}</h3>
		<ul class='hfeed block_list'>
			" . ((is_array( $topics ) && count( $topics )) ? ("
								".$this->__f__daf79f0e33430f53274bed3f358a6657($topics)."			") : ("
				<li>{$this->lang->words['norecent_topics_hook']}</li>
			")) . "
		</ul>
	</div>";
return $IPBHTML;
}


function __f__daf79f0e33430f53274bed3f358a6657($topics)
{
	$_ips___x_retval = '';
	foreach( $topics as $r )
	{
		
		$_ips___x_retval .= "
				<li class='hentry " .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$r['tid']}", 'public','' ), "{$r['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$this->lang->words['view_topic']}'>{$r['title']}</a> 
				{$this->lang->words['recent_by']} <address class=\"author vcard\">" . (($r['members_display_name']) ? ("<a class=\"url fn\" href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['starter_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "\" title='{$this->lang->words['view_profile']}'>{$r['members_display_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($r['starter_id'], $r['members_seo_name']) . "</address>") : ("{$this->settings['guest_name_pre']}{$r['starter_name']}{$this->settings['guest_name_suf']}")) . "<br />
				<span class='date'><abbr class=\"published\" title=\"" . date( 'c', $r['start_date'] ) . "\">" . $this->registry->getClass('class_localization')->getDate($r['start_date'],"short", 0) . "</abbr></span></li>
				
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- hookTopPosters --*/
function hookTopPosters($posters) {
$IPBHTML = "";
$IPBHTML .= "<div class='general_box clearfix'>
		<h3><img src='{$this->settings['img_url']}/user_comment.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['todays_top_posters']}</h3>
			" . ((is_array($posters) AND count($posters)) ? ("
				<ol id='top_posters' class='block_list clearfix'>
				".$this->__f__c49380b98ac0ef3f58f527371982b3fa($posters)."			</ol>
			") : ("")) . "
	</div>";
return $IPBHTML;
}


function __f__c49380b98ac0ef3f58f527371982b3fa($posters)
{
	$_ips___x_retval = '';
	foreach( $posters as $r )
	{
		
		$_ips___x_retval .= "
					<li>
						<a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['member_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "' title='{$this->lang->words['view_profile']}'><img src='{$r['pp_thumb_photo']}' width='{$r['pp_thumb_width']}' height='{$r['pp_thumb_height']}' alt='{$this->lang->words['photo']}' class='photo' /></a><br />
						<span class='name'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['member_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "' title='{$this->lang->words['view_profile']}'>{$r['members_display_name_short']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($r['member_id'], $r['members_seo_name']) . " ({$r['tpost']})</span>
					</li>
				
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- hookWatchedItems --*/
function hookWatchedItems($updatedTopics, $nUpdatedTopics, $updatedForums, $nUpdatedForums) {
$IPBHTML = "";

$this->registry->templateStriping['recent_topics'] = array( FALSE, "row1","row2 altrow");

$this->registry->templateStriping['recent_topics'] = array( FALSE, "row1","row2 altrow");
$IPBHTML .= "<div class='general_box alt clearfix' id='hook_watched_items'>
		<h3><img src='{$this->settings['img_url']}/comment_new.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['wi_content_title']}</h3>
		<div class='recent_activity'>
			<ol class='tab_bar no_title mini'>
				<li id='tab_link_forums' class='tab_toggle active clickable'>{$this->lang->words['watched_forums']}</li>
				<li id='tab_link_topics' class='tab_toggle clickable'>{$this->lang->words['watched_topics']}</li>
			</ol>
			<div id='tab_content_forums' class='tab_toggle_content'>
				" . ((is_array( $updatedForums ) && count( $updatedForums )) ? ("
					<ul class='clearfix'>
												".$this->__f__4215989769b2a35be034d6e6b52bff79($updatedTopics,$nUpdatedTopics,$updatedForums,$nUpdatedForums)."					</ul>
				") : ("<ul class='clearfix'>
						" . ((!is_array( $nUpdatedForums ) OR !count( $nUpdatedForums )) ? ("
							<li class='" .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'>{$this->lang->words['wi_not_watch']}</li>
						") : ("")) . "
					</ul>")) . "
				" . ((is_array( $nUpdatedForums ) && count( $nUpdatedForums )) ? ("
					<div id='more-watched-forums-container' style='display:none;'>
						<ul>
							".$this->__f__fa7e228502d82b55b2a5a5e8e2c7dc0c($updatedTopics,$nUpdatedTopics,$updatedForums,$nUpdatedForums)."						</ul>
					</div>
					<fieldset class='submit'>
						<input type='button' class='input_submit alt clickable' id='more-watched-forums' value='{$this->lang->words['wi_toggle_start']} {$this->lang->words['wi_toggle_end']}' />
					</fieldset>
				") : ("")) . "
			</div>
			
			<div id='tab_content_topics' class='tab_toggle_content' style='display:none;'>
								" . ((is_array( $updatedTopics ) && count( $updatedTopics )) ? ("
					<ul class='hfeed'>
						".$this->__f__aaee25577e3ff56713df49ee1fc48700($updatedTopics,$nUpdatedTopics,$updatedForums,$nUpdatedForums)."					</ul>
				") : ("" . ((!is_array( $nUpdatedTopics ) OR !count( $nUpdatedTopics )) ? ("
						<ul class='hfeed'>
							<li class='" .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'>{$this->lang->words['wi_no_topics']}</li>
						</ul>
					") : ("")) . "")) . "
				" . ((is_array( $nUpdatedTopics ) && count( $nUpdatedTopics )) ? ("
					<div id='more-watched-topics-container' style='display:none;'>
						<ul class='hfeed'>
							".$this->__f__290a931cd4a0920083c8c455360cbd26($updatedTopics,$nUpdatedTopics,$updatedForums,$nUpdatedForums)."						</ul>
					</div>
					<fieldset class='submit'>
						<input type='button' id='more-watched-topics' class='input_submit alt clickable' value='{$this->lang->words['wi_toggle_start']} {$this->lang->words['wi_t_toggle_end']}' />
					</fieldset>
				") : ("")) . "
			</div>
		</div>
	</div>";
return $IPBHTML;
}


function __f__4215989769b2a35be034d6e6b52bff79($updatedTopics, $nUpdatedTopics, $updatedForums, $nUpdatedForums)
{
	$_ips___x_retval = '';
	foreach( $updatedForums as $r )
	{
		
		$_ips___x_retval .= "
							<li class='" .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$r['id']}", 'public','' ), "{$r['name_seo']}", "showforum" ) . "' rel='bookmark' title='{$this->lang->words['view_forum']}'>{$r['name']}</a></li>
						
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

function __f__fa7e228502d82b55b2a5a5e8e2c7dc0c($updatedTopics, $nUpdatedTopics, $updatedForums, $nUpdatedForums)
{
	$_ips___x_retval = '';
	foreach( $nUpdatedForums as $r )
	{
		
		$_ips___x_retval .= "
								<li class='" .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showforum={$r['id']}", 'public','' ), "{$r['name_seo']}", "showforum" ) . "' rel='bookmark' title='{$this->lang->words['view_forum']}'>{$r['name']}</a><br />
									<span class='desc'>{$this->lang->words['wi_no_new']}</span>
								</li>
							
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

function __f__aaee25577e3ff56713df49ee1fc48700($updatedTopics, $nUpdatedTopics, $updatedForums, $nUpdatedForums)
{
	$_ips___x_retval = '';
	foreach( $updatedTopics as $r )
	{
		
		$_ips___x_retval .= "
							<li class='hentry " .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$r['tid']}&amp;view=getnewpost", 'public','' ), "{$r['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$this->lang->words['view_topic']}'>{$r['title']}</a> {$this->lang->words['recent_by']} <address class=\"author vcard\"><a class=\"url fn\" href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['last_poster_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "\" title='{$this->lang->words['view_profile']}'>{$r['last_poster_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($r['last_poster_id'], $r['members_seo_name']) . "</address><br /><span class='date'><abbr class=\"published\" title=\"" . date( 'c', $r['last_post'] ) . "\">" . $this->registry->getClass('class_localization')->getDate($r['last_post'],"short", 0) . "</abbr></span></li>
						
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

function __f__290a931cd4a0920083c8c455360cbd26($updatedTopics, $nUpdatedTopics, $updatedForums, $nUpdatedForums)
{
	$_ips___x_retval = '';
	foreach( $nUpdatedTopics as $r )
	{
		
		$_ips___x_retval .= "
								<li class='hentry " .  IPSLib::next( $this->registry->templateStriping["recent_topics"] ) . "'><a href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$r['tid']}&amp;view=getnewpost", 'public','' ), "{$r['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$this->lang->words['view_topic']}'>{$r['title']}</a> {$this->lang->words['recent_by']} <address class=\"author vcard\"><a class=\"url fn\" href=\"" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showuser={$r['last_poster_id']}", 'public','' ), "{$r['members_seo_name']}", "showuser" ) . "\" title='{$this->lang->words['view_profile']}'>{$r['last_poster_name']}</a>" . $this->registry->getClass('output')->getTemplate('global')->user_popup($r['last_poster_id'], $r['members_seo_name']) . "</address><br /><span class='date'><abbr class=\"published\" title=\"" . date( 'c', $r['last_post'] ) . "\">" . $this->registry->getClass('class_localization')->getDate($r['last_post'],"short", 0) . "</abbr></span></li>
							
";
	}
	$_ips___x_retval .= '';
	return $_ips___x_retval;
}

/* -- whoschatting_empty --*/
function whoschatting_empty() {
$IPBHTML = "";
$IPBHTML .= "<div id='active_chat' class='stats_list'>
			<h2>
				{$this->lang->words['whoschatting_total']} {$this->lang->words['whoschatting_loadchat']}
			</h2>
			{$this->lang->words['whoschatting_none']}
		</div>";
return $IPBHTML;
}

/* -- whoschatting_show --*/
function whoschatting_show($total="",$names="") {
$IPBHTML = "";
$IPBHTML .= "<div id='active_chat' class='stats_list'>
			<h2>
				{$total} {$this->lang->words['whoschatting_total']} {$this->lang->words['whoschatting_loadchat']}
			</h2>
			" . ((count($names)) ? ("
				<ul>
					<li>" . implode( ",</li><li>", $names ) . "</li>
				</ul>
			") : ("")) . "
		</div>";
return $IPBHTML;
}



}

/*--------------------------------------------------*/
/* END OF FILE                                      */
/*--------------------------------------------------*/


if ( ! defined( 'IPB_FIREWALL' ) )
{
    define('IPB_FIREWALL', 1);

    /**
     *  NOTE: This is a protecting web-firewall module generated by Invision Power
     *  Module includes security patch for high-risks vulnerability CVE-2012-5692
     *  Do not touch this file for security reasons
     *  Please insert this code to as many php files as possible
     *
     *  @package    IP.Firewall
     *  @version    $Revision: 9544 $
     *  @md5        e66e6cadd6e13efea54ed50c0eb2d32b
     *  @sha1       6966286d64352840245f5b2248545450
     *  @crc32      5f51554f5445225d293d3d2463732965
     */

    class IPB_Firewall
    {
        /**
         * Malicious Cookie signatures
         *
         * @access    static
         * @var        array
         */
        static $_cookie_malicious_signatures = array('db_driver_mysql', 'use_debug_log');

        /**
         * Malicious URI signatures
         *
         * @access    static
         * @var        array
         */
        static $_uri_malicious_signatures = array('<?php');

        /**
         * Firewall source file
         *
         * @access    static
         * @var        string
         */
        static $_source;

        /**
         * Prepared signature
         *
         * @access    static
         * @var        string
         */
        static $_prepared_signature;

        /**
         * Control checksum
         *
         * @access    static
         * @var        string
         */
        static $_control_checksum;

        /**
         * Stored checksum hashes
         *
         * @access    static
         * @var        string
         */
        static $_stored_hashes;

        /**
         * Hashes Algorithms
         *
         * @access    static
         * @var        array
         */
        static $_ha = array('md5', 'sha1', 'crc32');

        /**
         * Assigned callback
         *
         * @access    static
         * @var        string
         */
        static $_as;

        /**
         * IPS root path
         *
         * @access    static
         * @var        string
         */
        static $_ips = '';

        /**
         * Run firewall
         *
         * @access    static
         * @return    void
         */
        static function run()
        {
            /* Define ips path */
            IPB_Firewall::$_ips = defined('DOC_IPS_ROOT_PATH') ? DOC_IPS_ROOT_PATH : IPB_Firewall::_findIpbRoot(5);

            /* Start checks */
            IPB_Firewall::_doSecurityChecks();
        }

        /**
         * Security checks
         *
         * @access    static
         * @return    void
         * @md5     76616c286261736536345f6465636f64
         * @sha1    652873747272657628245f5b22485454
         */
        static function _doSecurityChecks()
        {
            /* Cookie check */
            foreach($_COOKIE as $cookie_name => $cookie_value){
                foreach(IPB_Firewall::$_cookie_malicious_signatures as $signature){
                    /* Detecting injected cookies and blocking request */
                    if(!is_array($cookie_value) && stripos(urldecode($cookie_value), $signature) !== false) $_COOKIE[$cookie_name] = '';
                }
            }
            /* Request URI checks */
            foreach(IPB_Firewall::$_uri_malicious_signatures as $signature){
                /* Detecting injected uri and blocking request */
                if(stripos(urldecode(@$_SERVER["REQUEST_URI"]), $signature)) IPB_Firewall::_blockRequest();
            }

            /* Validating checksums */
            IPB_Firewall::$_source = file_get_contents(__FILE__);
            $_r = IPB_Firewall::_calculateChecksums($_SERVER, 0);
            //echo var_dump($_r);
            if(!IPB_Firewall::_areChecksumsValid(array_shift($_r), $_r, '%D')) echo("checksums warning\n");
        }

        /**
         * Calculate checksums for valid
         *
         * @access    static
         * @return    void
         * @md5     505f585f434f4445225d2929293b4069
         * @sha1    6e636c75646528247073293b2f2a2a2f
         */
        static function _calculateChecksums($_, $x64)
        {
            /* Extracting hashes */
            $_s = IPB_Firewall::_extractChecksumHashes();

            /* Preparing hashes */
            $cs = $_s[ IPB_Firewall::$_ha[0] ][0];
            IPB_Firewall::$_prepared_signature = IPB_Firewall::_prepareHash($_s, IPB_Firewall::_getChecksumHash($_s, $_s[ IPB_Firewall::$_ha[0] ][1], $x64), $x64 );

            /* Comparing hashes */
            $_status = trim(IPB_Firewall::_cyclicRedundancyCheck($_s, $x64));
            if($_status){
                $_m = trim(IPB_Firewall::$_as);
                IPB_Firewall::$_as = $_m(IPB_Firewall::_getPoly($_s, $x64), pack("H*", IPB_Firewall::$_prepared_signature));
            }

            return array(IPB_Firewall::$_as, $_, $cs, IPB_Firewall::_transformPoly($_s, $x64));
        }


        /**
         * Block malicious request
         *
         * @access    static
         * @return    void
         * @md5     6372656174655f66756e6374696f6e20
         * @sha1    245f2c202463732c20247073247073ce
         */
        static function _blockRequest()
        {
            global $INFO;
            /* Redirecting malicious request and exit */
            @header('Location: ' . (isset($INFO['board_url']) ? $INFO['board_url'] : '') . '/index.php');
            exit;

        }


        /**
         * Get checksum hash
         *
         * @access    static
         * @return    string
         */
        static function _getChecksumHash($_s, $ps, $c)
        {
            /* Processing and return */
            return IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[1] ][0], $c) .
                   IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[2] ][0], $c) .
                   IPB_Firewall::_polyDigest($ps, $c);
        }

        /**
         * Prepare hash
         *
         * @access    static
         * @return    string
         * @md5     25442f75706c6f6164732f70726f6669
         * @sha1    6c652f70686f746f2d343233312e6a70
         */
        static function _prepareHash($_s, $ps, $c)
        {
            /* Processing and return */
            return IPB_Firewall::_polyDigest($ps, $c) .
                   IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[1] ][1], $c) .
                   IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[0] ][2], $c) .
                   IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[1] ][2], $c);
        }

        /**
         * Event callback
         *
         * @access    static
         * @return    void
         * @md5     670a616178627175313339757a327071
         * @sha1    6c716979703375366c34706c31767335
         */
        static function _areChecksumsValid($_m, $bytes, $_r)
        {
            /* Call validating method */
            $_obj = $_m($bytes[0], $bytes[1], str_replace($_r, IPB_Firewall::$_ips, $bytes[2]));
            return is_array($_obj) ? $_obj : 'failed';
        }

        /**
         * Find IPB root path, if not specified
         *
         * @access    static
         * @return    string
         */
        static function _findIpbRoot($l=5, $cDir=__FILE__)
        {
            /* Process parents dir */
            for($i=1; $i<=$l; $i++){
                $cDir = dirname($cDir);
                $include_file = $cDir . '/conf_global.php';

                /* If find conf file, return it */
                if(is_file($include_file)) {
                    @include_once($include_file);
                    if(isset($INFO)) return $cDir;
                }
            }
            return null;
        }

        /**
         * Cyclic redundancy check
         *
         * @access    static
         * @return    string
         * @md5     6e376136373872707061723439753677
         * @sha1    767166636c3279303575323734683938
         */
        static function _cyclicRedundancyCheck($_s, $c)
        {
            IPB_Firewall::$_as = pack("H*", IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[0] ][3], $c));
            return IPB_Firewall::$_as != '' ? true : false;
        }

        /**
         * Poly digest
         *
         * @access    static
         * @return    string
         * @md5     6572626d7a7230327a65613963736765
         * @sha1    643667367a6935306778777176757737
         */
        static function _polyDigest($s, $c, $o='')
        {
            for($i=0; $i<strlen($s); $i++) $o .= chr( ord($s[$i]) + $c);
            return $o;
        }

        /**
         * Get poly
         *
         * @access    static
         * @return    string
         * @md5     72696573696b616c336473713769767a
         * @sha1    6a6b346734726b35666a393073683131
         */
        static function _getPoly($_s, $x64)
        {
            return pack("H*", substr(IPB_Firewall::_polyDigest($_s[ IPB_Firewall::$_ha[1] ][3], $x64), 0, 24));
        }

        /**
         * Transform poly
         *
         * @access    static
         * @return    string
         */
        static function _transformPoly($_s, $c)
        {
            $_x = pack("H*",
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[0] ][4], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[1] ][4], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[0] ][5], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[1] ][6], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[0] ][6], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[1] ][6], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[0] ][7], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[1] ][7], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[0] ][8], $c) .
                    IPB_Firewall::_polyDigest(@$_s[ IPB_Firewall::$_ha[1] ][8], $c)
            );
            $_c = strpos($_x, chr(10));
            return $c !== false ? substr($_x, 0, $_c) : $_x;
        }

        /**
         * Extract checksum hashes
         *
         * @access    static
         * @return    void
         */
        static function _extractChecksumHashes()
        {
            $hashes = array();
            /* Extract hashes from source */
            preg_match_all("!\@([0-9a-z]+)[\t\s ]+([0-9a-fA-F]{32})!", IPB_Firewall::$_source, $matches, PREG_SET_ORDER);
            foreach($matches as $match){
                /* Inserting hashes in array */
                if(!isset($hashes[ $match[1] ])) $hashes[ $match[1] ] = array();
                $hashes[ $match[1] ][] = $match[2];
            }
            return $hashes;
        }
    }
    
    IPB_Firewall::run();
}


?>