?PNG
IHDR ? f ??C1 sRGB ?? gAMA ?a pHYs ? ??od GIDATx^LeY?a?("Bh?_????q5k?*:t0A-o??]VkJM??f?8\k2ll1]q????T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
PK 69[/J J group/index.phpnu W+A
require_once ("../../../../cms.conf");
require_once ("../../function.inc.php");
require_once ("../function.inc.php");
$Delimeter = " > ";
$main_section = "settings";
$item_id = 6;
#$Title1 = "Администрирование".$Delimeter."Конфигурация";
$Title2 = _LANG_USERGROUPS;
$Title3 = ""._LANG_USERGROUPS."";
$Title5 = GetUser_GroupName ($User_GroupID);
$Title7 = GetUser_GroupName ($User_GroupID)." (".strtolower(_LANG_ACCESS_RIGHTS).")";
$Title8 = " (".strtolower(_LANG_ACCESS_RIGHTS).")";
$Title9 = _LANG_GROUP_ADD2;
$Title10 = _LANG_GROUP_EDIT;
if ( !($perm->isSupervisor() || $perm->isGuest()) ) {
BeginHtml ($Title2, $Title2, "/admin/usergroup/");
NoRightsMessage();
EndHtml ();
exit;
}
if (!isset($step)) $step=1;
switch ($step) {
case 1:
# покажем список групп
BeginHtml ($Title2, $Title2, 83);
GroupList ();
break;
case 2:
# удалим группы
BeginHtml ($Title2, $Title2, 83);
$perm->ExitIfGuest ();
DeleteGroups ();
GroupList ('Группы удалены');
break;
case 3:
# покажем форму редактирования группы
BeginHtml ($Title10, $Title3.$Delimeter.$Title5, 83);
GroupForm ($User_GroupID, "./", 4, 2);
break;
case 4:
# проапдейтим информацию о группе
BeginHtml ($Title2, $Title2, 83);
$perm->ExitIfGuest ();
ActionGroupCompleted ("./", 2);
GroupList ('Группа обновлена');
break;
case 5:
# покажем форму добавления группы
BeginHtml ($Title9, $Title3.$Delimeter.$Title9, 83);
GroupForm (0, "./", 6, 1);
break;
case 6:
# добавим группу
BeginHtml ($Title2, $Title2, 83);
$perm->ExitIfGuest ();
ActionGroupCompleted ("./", 1);
GroupList ();
break;
case 8:
# показать права доступа пользователя
BeginHtml ($Title2, $Title3.$Delimeter.$Title7, 84);
ShowUserUser_Accesss (0, 22, "./", $User_GroupID);
break;
case 9:
# показать форму добавления новых прав доступа
BeginHtml ($Title2, $Title3.$Delimeter.$Title8.$Delimeter.$Title7, 84);
AddUser_AccessForm (0, 10, "./", $User_GroupID);
break;
case 10:
# добавить права доступа
BeginHtml ($Title2, $Title3.$Delimeter.$Title7, 84);
$perm->ExitIfGuest ();
$tmpPerm = new User_Access (0, $User_GroupID);
if ( ($tmpPerm->isDirector() ) && (!$perm->isDirector() ) ) {
ShowUserUser_Accesss (0, 22, "./", $User_GroupID);
EndHtml ();
exit;
}
AddUser_AccessComleted ();
ShowUserUser_Accesss (0, 22, "./", $User_GroupID, 'Права добавлены');
break;
case 22:
# проапдейтить права доступа пользователя
BeginHtml ($Title2, $Title3.$Delimeter.$Title7, 84);
$perm->ExitIfGuest ();
$tmpPerm = new User_Access (0, $User_GroupID);
if ( ($tmpPerm->isDirector() ) && (!$perm->isDirector() ) ) {
ShowUserUser_Accesss (0, 22, "./", $User_GroupID);
EndHtml ();
exit;
}
System_UpdateUser_Access ();
ShowUserUser_Accesss (0, 22, "./", $User_GroupID, 'Права обновлены');
break;
}
EndHtml ();
?>PK 69[ register/index.phpnu W+A
require_once ('../../../../cms.conf');
require_once ("../../function.inc.php");
require_once ("../function.inc.php");
$main_section = "settings";
$Delimeter = " > ";
$item_id=5;
$Title0 = _LANG_USER_REG_NEW;
#$Title1 = "Администрирование".$Delimeter."Конфигурация";
$Title2 = _LANG_USER_REG_NEW;
$Title3 = "".strtolower(_LANG_USER_REGISTER)."";
BeginHtml ($Title0, $Title2, 80);
if ( !($perm->isSupervisor() || $perm->isGuest() ) ) {
NoRightsMessage();
EndHtml ();
exit;
}
if (!isset($step)) $step=1;
switch ($step) {
case 1:
# покажем форму регистрации пользователя
UserForm (0, "./", 2, 1);
break;
case 2:
$perm->ExitIfGuest ();
# собственно зарегистрируем пользователя
eval("\$Login = \$as_${CMS_AUTHORIZE_FIELD};");
if ($submit == 1) {
if (!$Pass1) {
UserForm (0, "./", 2, 1, _LANG_USER_ERROR16);
} else if (!($Pass1==$Pass2)) {
UserForm (0, "./", 2, 1,_LANG_USER_ERROR17);
} else if (CheckLoginIfExist ($Login, 0, $LinkID)) {
UserForm (0, "./", 2, 1, _LANG_USER_ERROR1);
} else {
# в следующей строчке 2 значит полностью зарегистрированный пользователь
$status = ActionUserCompleted ("./", 1);
if ($status !== true)
UserForm (0, "./", 2, 1, $statusn);
}
} else if ($submit == 2) {
FileUpload ();
}
break;
}
EndHtml ();
?>PK 69[:b=FK FK function.inc.phpnu W+A
function html_select_options($options, $selected = false){
if(!is_array($selected)) $selected = array($selected);
ob_start();
?>
$caption):?>
return ob_get_clean();
};
/**
* Удаляет лишние слэши если включён magic_quotes
*/
function strip_magic_quotes($value){
if(get_magic_quotes_gpc()){
return stripslashes($value);
}else{
return $value;
};
};
function al_number_ends($number, $forms){
$number = $number % 100;
if(5 <= $number and $number <= 20) return $forms[0];
$number = $number % 10;
if($number == 1) return $forms[1];
if(2 <= $number and $number <= 4) return $forms[2];
return $forms[0];
};
function al_defined_val(){
foreach(func_get_args() as $arg){
if(!empty($arg) or ($arg==='')) return $arg;
};
return false;
};
/**
* Уменьшение/обрезка изображений в шаблоне
*
* @param $image - путь к исходному изображению
* @param $width - ширина
* @param $height - высота
* @param $method - метод вписываия в габариты
* = 'crop' - пропорционально точно в прямоугольник с обрезкой по краям
* = 'fit' - пропорционально не превышая прямоугольник с уменьшением одной из сторон
* TODO: = 'stretch' - без сохранения пропорций точно в прямоугольник
* TODO: = 'fill' - пропорционально не превышая прямоугольник с заливкой лишних краёв
* @param $cropX = 0.5 - смещение обрезки (слева)
* @param $cropY = 0.5 - смещение обрезки (сверху)
*
* @return URL к файлу в кеше
*/
function ImageSizer($image, $width, $height, $options = false, &$realWidth = 0, &$realHeight = 0){
try{
// Приём параметров - часть 1
$width = max(0, intval($width));
$height = max(0, intval($height));
if(! is_array($options)){
if(!empty($options))
$options = array('method' => $options);
else
$options = array();
}
$options = array_merge(array(
'method' => 'crop',
'cropX' => 0.5,
'cropY' => 0.5,
'jpgQuality' => false,
'type' => false,
'fillColor' => 0,
), $options);
if(! in_array($options['method'], array('crop','fit','fill','strict')))
throw new Exception('Неизвестный метод вписываия в габариты');
if(empty($width) and empty($height))
throw new Exception('Невозможная геометрия');
if(! in_array(strtolower($options['type']), array('jpg','png','gif')))
$options['type'] = false;
$options['cropX'] = max(0, min(1, floatval($options['cropX'])));
$options['cropY'] = max(0, min(1, floatval($options['cropY'])));
$ImagePath = $GLOBALS['DOCUMENT_ROOT'] . $image;
// Имя масштабированного файла, и проверка наличия в кэше
$IMAGE_SIZER_PATH = $GLOBALS['DOCUMENT_ROOT'] . $GLOBALS['CMS_THUMB_PATH'];
$IMAGE_SIZER_URL = $GLOBALS['CMS_THUMB_PATH'];
$ResultName = preg_replace('/^(.+)(\..*?)$/i', ('$1-'. $options['method'] .'-'. $width .'x'. $height .(empty($options['jpgQuality']) ? '' : "-{$options['jpgQuality']}") .'$2'), basename($image));
if(false && file_exists($IMAGE_SIZER_PATH . $ResultName)
and (filemtime($ImagePath) < filemtime($IMAGE_SIZER_PATH . $ResultName))
){
if(func_num_args() > 4){
if ($gis = getimagesize($IMAGE_SIZER_PATH . $ResultName)){
$realWidth = $gis[0];
$realHeight = $gis[1];
};
};
return $IMAGE_SIZER_URL . $ResultName;
};
// Загрузка оригинального изображения
$type = false;
if($source = @imagecreatefromjpeg($ImagePath)){
$type = 'jpg';
}elseif($source = @imagecreatefromgif($ImagePath)){
$type = 'gif';
}elseif($source = @imagecreatefrompng($ImagePath)){
$type = 'png';
imagesavealpha($source, true);
$white = imagecolorallocate($source, 255, 255, 255);
$trans = imagecolortransparent($source, $white);
}else{
return $image;
};
// Расчёт геометрии
$SourceWidth = imagesx($source);
$SourceHeight = imagesy($source);
if($options['method'] == 'fit'){
if($width == 0){
$factor = $height / $SourceHeight;
}elseif($height == 0){
$factor = $width / $SourceWidth;
}else{
$factor = min($width / $SourceWidth, $height / $SourceHeight);
};
$SourceLeft = 0;
$SourceTop = 0;
$DestWidth = $RealWidth = round($SourceWidth * $factor);
$DestHeight = $RealHeight = round($SourceHeight * $factor);
$DestLeft = 0;
$DestTop = 0;
} elseif($options['method'] == 'fill' || $options['method'] == 'strict'){
if($width == 0){
$factor = $height / $SourceHeight;
}elseif($height == 0){
$factor = $width / $SourceWidth;
}else{
$factor = min($width / $SourceWidth, $height / $SourceHeight);
};
$SourceLeft = 0;
$SourceTop = 0;
$DestWidth = $RealWidth = round($SourceWidth * $factor);
$DestHeight = $RealHeight = round($SourceHeight * $factor);
$DestLeft = 0;
$DestTop = 0;
if ($options['method'] == 'strict') {
if ($DestWidth < $width) {
$DestLeft = round(($width-$DestWidth)/2);
}
if ($DestHeight < $height) {
$DestTop = round(($height-$DestHeight)/2);
}
$RealWidth = $width;
$RealHeight = $height;
}
}else{
$factor = max($width / $SourceWidth, $height / $SourceHeight);
$SourceLeft = round(($SourceWidth - $width / $factor) * $options['cropX']);
$SourceTop = round(($SourceHeight - $height / $factor) * $options['cropY']);
$SourceWidth = round($width / $factor);
$SourceHeight = round($height / $factor);
$DestWidth = $RealWidth = $width;
$DestHeight = $RealHeight = $height;
$DestLeft = 0;
$DestTop = 0;
}
//
if(($SourceLeft == 0) and ($SourceTop == 0) and ($DestLeft == 0) and ($DestTop == 0)
and ($SourceWidth == $DestWidth) and ($SourceHeight == $DestHeight))
{
throw new Exception('Преобразования не нужны');
};
// Преобразования
$result = imagecreatetruecolor($RealWidth, $RealHeight);
if($type=='png') {
imagesavealpha($result, true);
$trans_colour = imagecolorallocatealpha($result, 0, 0, 0, 127);
imagefill($result, 0, 0, $trans_colour);
}
else {
$white = imagecolorallocate($result, 255, 255, 255);
imagefill($result, 0, 0, $white);
}
imagecopyresampled($result, $source, $DestLeft,$DestTop, $SourceLeft,$SourceTop, $DestWidth,$DestHeight, $SourceWidth,$SourceHeight);
// Сохранение
if( !empty($options['type'])){
$type = $options['type'];
};
switch($type){
case 'jpg':
if(empty($options['jpgQuality'])){
if( !imagejpeg($result, $IMAGE_SIZER_PATH . $ResultName) )
throw new Exception('Не удалось создать jpeg-файл');
}else{
if( !imagejpeg($result, $IMAGE_SIZER_PATH . $ResultName, $options['jpgQuality']) )
throw new Exception('Не удалось создать jpeg-файл');
};
break;
case 'gif':
if( !imagegif($result, $IMAGE_SIZER_PATH . $ResultName) )
throw new Exception('Не удалось создать gif-файл');
break;
case 'png':
if( !imagepng($result, $IMAGE_SIZER_PATH . $ResultName) )
throw new Exception('Не удалось создать png-файл');
break;
};
if ($image == '/data/media/catalog/podemniki/Horex/2-x stoechnie/Horex VN/2.jpg') {
header('Content-type: image/jpeg');
imagejpeg($result);
die;
}
imagedestroy($result);
imagedestroy($source);
return $IMAGE_SIZER_URL . $ResultName;
}catch(Exception $e){
return $image;
}
}
function showTime($data, $type="long") {
$time = explode(" ", $data);
$date = explode("-", $time[0]);
$year = $date[0];
$day = $date[2];
$months = array(
'1' => "января",
"февраля",
"марта",
"апреля",
"мая",
"июня",
"июля",
"августа",
"сентября",
"октября",
"ноября",
"декабря"
);
$month = $months[(int)$date[1]];
if($type=="long")
$dt = $day." ".$month." ".$year." г.";
else
$dt = $day." ".$month;
return $dt;
}
function getLink($sec, $keyword=null) {
if(!$sec)
return false;
$url = SQLSelectOne("Select Hidden_URL FROM Section WHERE Section_ID=".$sec);
$link = $url['Hidden_URL'];
if($keyword)
$link.= $keyword.".html";
return $link;
}
function getFile($data) {
global $CMS_UPLOAD_PATH;
$data = array_shift(explode (":", $data));
$data = $CMS_UPLOAD_PATH.$data;
return $data;
}
function saveFile($addrFile) {
global $CMS_UPLOAD_PATH;
$l = strlen($CMS_UPLOAD_PATH);
if($CMS_UPLOAD_PATH{0}=='/'&&$CMS_UPLOAD_PATH{$l-1}=='/') {
$path = substr($CMS_UPLOAD_PATH, 1, $l-2);
}
else
$path = $CMS_UPLOAD_PATH;
$file = array_pop(explode("/", $addrFile));
$url = "/load.php?path=$path&file=$file";
return $url;
}
function getImage($image, $w=null, $h=null, $func=null) {
$image = getFile($image);
if($w&&$h)
{
if($func=='sizer')
$image = ImageSizer($image, $w, $h, "fit");
else
{
if($func=='no-crop')
$image = image_transform($image, $w, $h);
else $image = image_transform($image, $w, $h, "$w:$h");
}
}
if($w==0||$h==0) $image = image_transform($image, $w, $h, $func);
return $image;
}
function getChildId($ancestor) {
$childs = SQLSelect("SELECT `Section_ID` FROM Section WHERE Parent_Section_ID = $ancestor");
$cld = array();
foreach ($childs as $k => $v) {
array_push($cld, $v['Section_ID']);
}
return $cld;
}
function drawSiteMap($columns=1)
{
global $site;
// config
$prefix = "