<?php
function x_25($x_53 = Array()) { 
$url = ''; 
$unlockEnabled = false; 
$id = ''; 
$dest = ''; 
$reason = ''; 
$categories = Array(); 
extract($x_53, EXTR_OVERWRITE); 
if ($reason != '') { 
$reason .= '<br>'; 
} 
$html = new kp_HtmlElements(); 
$denyPageData = Array(); 
if (!empty($reason)) { 
$denyData = Array( 
Array( 
Array('properties' => 'class="bold"', 'data' => '<kerio:text id="lang_req_page"/>:'), 
Array('data' => $url), 
), 
Array( 
Array('properties' => 'class="bold"', 'data' => '<kerio:text id="lang_deny_reason"/>:'), 
Array('data' => '<div class="denyReason">' . $reason . '</div>'), 
) 
); 
} 
if (!empty($categories)) { 
$denyData[] = Array( 
Array( 'properties' => 'colspan = "2"', 
'data' => '<span class="cobionHeader"><kerio:text id="deny-webFilter"/></span>') 
); 
$denyData[] = Array( 
Array( 'properties' => 'colspan = "2"', 
'data' => '<div class="cobionCategoryList">' . implode('<br>', $categories) . '</div>') 
); 
} 
$denyTable = $html->kp_table($denyData, 'class="denyTable"'); 
$denyPageData = Array( 
Array( 
Array('properties' => 'align="center"', 'data' => $denyTable) 
), 
); 
if ($unlockEnabled) { 
$unlockInfo = '<kerio:text id="lang_need_access1"/><strong><kerio:text id="unlock-button-small"/></strong> <kerio:text id="lang_need_access2"/>'; 
$unlockButton = '<form method="GET" action="unlock.php">' 
. $html->kp_getInput('hidden', 'ID', $id) 
. $html->kp_getInput('hidden', 'dest', urlencode($dest)) 
. $html->kp_getInput('submit', '', '<kerio:text id="lang_unlock"/>', 'class="button"') 
. '</form>'; 
$denyPageData[] = Array($unlockInfo); 
$denyPageData[] = Array(Array('properties' => 'align="center" style="padding: 15px;"', 'data' => $unlockButton)); 
} else { 
$unlockInfo = '<kerio:text id="lang_contact_admin"/>'; 
$x_r6 = ''; 
$x_7x = kerio("webiface::PhpNonAuth"); 
$x_7x->getAsocUserName(&$x_r6, &$x_la); 
$x_1 = kerio("webiface::PhpSession"); 
if (!is_object($x_1) || '' == $x_r6) { 
$unlockInfo .= '<div class="loginBlock">' 
. '<a href="login.php?dest=' . urlencode($dest) . '">' . '<kerio:text id="lang_login_page" />' . '</a>' 
. '</div>'; 
} 
$denyPageData[] = Array($unlockInfo); 
} 
$denyPage = $html->kp_table($denyPageData, 'class="dialogContent"'); 
return $html->kp_getDialogPageContent('deny', '<kerio:text id="lang_access_denied"/>', 
'<kerio:text id="lang_not_allowed"/>', 
$denyPage, (empty($categories) ? 'deny' : '')); 
} 
?>
