?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
group/index.php000066600000007112150472610630007531 0ustar00Администрирование".$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 (); ?>register/index.php000066600000003236150472610630010224 0ustar00Администрирование".$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 (); ?>function.inc.php000066600000045506150472610630007674 0ustar00 $caption):?> $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 = "\r\n"; $dropColumn = Array(); if($columns!=1) { $counter = SQLSelectOne("SELECT COUNT(*) AS CNT FROM `Section` WHERE Checked=1 AND Parent_Section_ID =0 And Site_ID=".$site); $perColumn = ceil($counter[CNT]/$columns); for($i=0;$i*$perColumn<=$counter[CNT]-1;$i++){ $dropColumn[] = $i*$perColumn; } } // start ! $data = SQLSelect("SELECT * FROM `Section` WHERE Checked=1 AND Parent_Section_ID = 0 And Site_ID=".$site." ORDER BY Priority"); $out = $prefix; $cnt = 1; foreach ($data as $k => $v) { $url = getSectionLink($v); $keys = array('%NAME', '%URL', '%SUBDIRS'); if($v['Section_Name']) $values = array($v['Section_Name'], $url, searchRecursive($v['Section_ID'])); $out .= str_replace($keys, $values, $item); if(in_array($cnt,$dropColumn)) $out .= $postfix.$prefix; $cnt++; } $out .= $postfix; return $out; } function getSectionLink($data){ if(empty($data['Hidden_URL'])){ return false; } if($data['ExternalURL']!=""){ return $data['ExternalURL']; } else { return $data['Hidden_URL']; } } function searchRecursive($section, $level=1) { // подКатегории // config $prefix = "\r\n"; $data = SQLSelect("SELECT * FROM `Section` WHERE Checked=1 AND Parent_Section_ID = '".$section."' ORDER BY Priority"); if(!$data) { $objID = SQLSelectOne("SELECT `Object_ID` FROM `Section_Object` WHERE Section_ID = ".$section." AND `Priority`=0"); if($objID && $objID['Object_ID']!=207) $data = SQLSelect("SELECT * FROM `Data{$objID['Object_ID']}` WHERE Checked=1 AND Section_ID = ".$section." ORDER BY Priority LIMIT 12"); } if (count($data) > 0) { $out = $prefix; $i==0; foreach ($data as $k => $v) { $url = getSectionLink($v); if($i%3==0 && $level==1 && $i!=0) $separator = $postfix.$prefix; else $separator = null; if($v['Section_ID']==119||get_ancestor($v['Section_ID'])==119||get_ancestor(get_ancestor($v['Section_ID']))==119) $subdirs = searchRecursive($v['Section_ID'], ++$level); else $subdirs = null; $keys = array('%NAME', '%URL', '%SUBDIRS', '%separator%'); //$values = array($v['Section_Name'], $url, $subdirs, $separator); if($v['Section_Name']) $values = array($v['Section_Name'], $url, $subdirs, $separator); else if($v['Name']) { if($v['Keyword']) $page = $v['Keyword']; else $page = $v['Data_ID']; $values = array($v['Name'], getLink($v['Section_ID'], $page), null, $separator); } else if($v['Title']) { if($v['Keyword']) $page = $v['Keyword']; else $page = $v['Data_ID']; $values = array($v['Title'], getLink($v['Section_ID'], $page), null, $separator); } $out .= str_replace($keys, $values, $item); $i++; } $out .= $postfix; return $out; } else { return false; } } function getYear($section, $table, $active=" class=\"a\"") { global $current_section; $sql = "SELECT DISTINCT YEAR(`Date`) as `year` FROM `Data{$table}` WHERE `Section_ID`= {$section} ORDER BY `Date` DESC"; $data = SQLSelect($sql); $class = null; foreach($data as $v) { if($_GET['year']==$v['year']) $class = $active; else $class = null; $out .= "".$v['year'].""; } if(!$_GET['year']) $class = $active; else $class = null; $out .= "Все"; return $out; } function getSizeFile($size) { static $i; switch(++$i) { case 1 : $dimension = "B"; break; case 2 : $dimension = "Kb"; break; case 3 : $dimension = "Mb"; break; case 4 : $dimension = "Gb"; break; default: $dimension = null; } if($size > 1024) { $size = $size/1024; return getSizeFile($size); } else { $size = round($size); $i = null; return $size.''.$dimension; } } function getYears($classID,$section) { $sql = "SELECT DISTINCT YEAR(`Date`) as y FROM `Data{$classID}`"; $data = SQLSelect($sql); $out = ""; foreach($data as $item) { $out .= "\t{$item['y']}\r\n"; } return $out; } function getMonths($classID,$section,$year=2013) { $sql = "SELECT DISTINCT MONTH(`Date`) as m, DATE_FORMAT(`Date`, '%M') as nm FROM `Data{$classID}` WHERE YEAR(`Date`) = {$year}"; mysql_query("SET @@lc_time_names='ru_RU'"); $data = SQLSelect($sql); if((bool)$data) { $out .= "\t"; foreach($data as $item) { $out .= "\t{$item['nm']}\r\n"; } return $out; } else return false; } function getFtopic() { global $current_site; $sql = "SELECT `topic_id`, `forum_id`, `topic_title`, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:01', INTERVAL `topic_last_post_time` SECOND), '%d.%m.%Y') AS tt, `topic_last_poster_name` FROM `phpbb_topics` ORDER BY `topic_last_post_time` DESC LIMIT 8"; mysql_query("SET @@lc_time_names='ru_RU'"); $data = SQLSelect($sql); $out = "
Общайтесь с профессионалами
"; foreach($data as $item) { $out .= "
".$item['tt']."".$item['topic_title']."".$item['topic_last_poster_name']."
"; } $out .= "
"; return $out; } function getProjects() { $sql = "SELECT * FROM `Data210` WHERE `inHome` = 1 LIMIT 4"; $data = SQLSelect($sql); foreach($data as $item) { unset($image); unset($images); if($item['Images']) { $images = get_files_from_folder(urldecode($item['Images']), 'images'); if (!$image && $images) { $image = $images[0]; } } if($item['Keyword']) $page = $item['Keyword']; else $page = $item['Data_ID']; $out .= ""; } return $out; } function as_insert_records_list($section,$classID,$as_object_id) { $out = "
    "; $sql = "SELECT * FROM `Data{$classID}` WHERE `Section_ID`={$section} AND `Checked`=1"; $data = SQLSelect($sql); foreach($data as $item) { if($item['Keyword']) $page = $item['Keyword']; else $page = $item['Data_ID']; $out .= "".$item['Title'].""; } $out .= "
"; return $out; } function as_mail($to, $subject, $message, $from_name, $from_email) { if(preg_match('/[\r\n]/', $from_email)) { return 0; } $subject = "=?utf-8?B?" . base64_encode($subject) . "?="; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=utf-8\r\nContent-Transfer-Encoding: 8bit\r\n"; $headers .= "From: =?utf-8?B?".base64_encode($from_name)."?= <".$from_email.">\r\n"; $headers .= "Reply-To: $from_email"; return mail($to, $subject, $message, $headers); } function as_htmlmail($to, $subject, $message, $from_name, $from_email) { if(preg_match('/[\r\n]/', $from_email)) { return 0; } $subject = "=?Windows-1251?B?" . base64_encode($subject) . "?="; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=Windows-1251\r\nContent-Transfer-Encoding: 8bit\r\n"; $headers .= "From: =?Windows-1251?B?".base64_encode($from_name)."?= <".$from_email.">\r\n"; $headers .= "Reply-To: $from_email"; return mail($to, $subject, $message, $headers); } ?>index.php000066600000000346150472610630006377 0ustar00 mail/index.php000066600000023157150472610630007326 0ustar00Администрирование".$Delimeter."Конфигурация"; $Title2 = _LANG_MAILLIST; $Title3 = "".$Title2."".$Delimeter._LANG_MAIL_SEND; if ( !($perm->isSupervisor() || $perm->isGuest() ) ) { BeginHtml ($Title2, $Title2, 85); NoRightsMessage(); EndHtml (); exit; } function ShowForm () { global $LinkID, $ROOT_FOLDER, $INCLUDE_FOLDER; global $systemTableID, $systemDataID, $systemTableName; global $HTTP_POST_VARS, $ADMIN_DOMAIN, $SPAM_FROM_NAME, $SPAM_FROM; ?>

>
>
>

0 and a.`".$SPAM_FIELD."`<>'' "; if ($User_GroupID != 0) $select .= " and a.`User_Group_ID`=".$User_GroupID; $select .= $fullSearchStr; $select .= " order by a.".$SPAM_FIELD; $Result = mysql_query ($select, $LinkID); while ($Array = mysql_fetch_row ($Result)) { $Email [] = $Array [0]; } $m = new CMIMEMail (); $m->mailbody($Data); if ($Attach) $m->attachFile($FileToAttach, $FileToAttach_name, $FileToAttach_type); for ($i=0; $i\n"; $m->send($Email[$i], $SPAM_FROM, $SPAM_FROM, $Subject, $SPAM_FROM_NAME); flush(); } if (sizeof($Email)) print "

"._LANG_MAIL_SEND_USERS; else echo _LANG_USER_ERROR11; } function AttachForm () { global $LinkID; global $Subject, $Data, $TmpID, $User_GroupID; global $srchPat; ?>

"; ?> > >
\n"; if ( !isset($step) ) $step=1; #print "step=".$step."
\n"; switch ($step) { case 1: # надо просто показать форму BeginHtml ($Title2, $Title2, 85); if (!$SPAM_FIELD) { // echo "Рассылка невозможна, так как в системных настройках не указано поле для рассылок."; echo _LANG_USER_ERROR12; break; } if (!$SPAM_FROM_NAME) { // echo "Рассылка невозможна, так как в системных настройках не указано имя отправителя писем."; echo _LANG_USER_ERROR13; break; } if (!$SPAM_FROM) { // echo "Рассылка невозможна, так как в системных настройках не указан E-mail отправителя писем."; echo _LANG_USER_ERROR14; break; } ShowForm (); break; case 2: if (!$Data) { BeginHtml ($Title2, $Title2, 85); echo _LANG_USER_ERROR15; ShowForm(); break; } #print "Attach=".$Attach."
\n"; if ( isset ($Attach) ) { BeginHtml ($Title2, $Title3, 85); $insert = "INSERT INTO `".(LOWER_CASE_TABLES ? "system_mail" : "System_Mail")."` (`Subject`,`Data`) values ("; $insert .= "'".$Subject."','".$Data."')"; $Result = mysql_query ($insert, $LinkID); $TmpID = mysql_insert_id (); AttachForm (); } else { BeginHtml ($Title2, $Title3, 85); $perm->ExitIfGuest (); SendData ($User_GroupID, $Subject, $Data, 0); } break; case 3: BeginHtml ($Title2, $Title3, 85); $perm->ExitIfGuest (); $select = "SELECT `Subject`,`Data` FROM `".(LOWER_CASE_TABLES ? "system_mail" : "System_Mail")."` WHERE `System_Mail_ID`='"; $select .= $TmpID."'"; $Result = mysql_query ($select, $LinkID); $Array = mysql_fetch_row ($Result); $Subject = $Array[0]; $Data = $Array[1]; $delete = "DELETE FROM `".(LOWER_CASE_TABLES ? "system_mail" : "System_Mail")."` WHERE `System_Mail_ID`='"; $delete .= $TmpID."'"; $Result = mysql_query ($delete, $LinkID); SendData ($User_GroupID, $Subject, $Data, 1); break; } EndHtml (); ?>reviews.php000066600000001505150472614160006754 0ustar00$name, 'Position'=>$position, 'Job'=>$job, 'telephone'=>$phone, 'email'=>$mail, 'Text'=>$text, 'Date'=>$dt, 'Short'=>$short); print_r($data); //SQLInsert('Data111', $data); //header("Location: http://".$_SERVER['HTTP_HOST']."/about/reviews/"); exit; ?>mail.php000066600000001476150472614160006221 0ustar00$name, $position/ $job/ $phone

$phone

$text

$dt

"; $headers= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n"; //$headers .= "From: $name <$from>\r\n"; mail($to, $subject, $message, $headers); header("Location: http://".$_SERVER['HTTP_HOST']."/contacts/"); exit; ?>function.ajax.inc.php000066600000004205150472614160010607 0ustar00result['done']=1; return array('done'=>1); //DebugBreak(); } function filterDate($data) { extract($data, EXTR_PREFIX_SAME, "as_"); extract((array)$sParams, EXTR_PREFIX_SAME, "as_"); if((bool)$year) $_SESSION['fltr_'.$section]['year'] = $year; else unset($_SESSION['fltr_'.$section]['year']); if((bool)$month) $_SESSION['fltr_'.$section]['month'] = $month; else unset($_SESSION['fltr_'.$section]['month']); $template_env = InheritTemplateEnv($template); eval($template_env['System_Config']); if((bool)$curPos) $pos="&curPos={$curPos}"; else $pos = null; $out = as_insert_object($section,$sec_obj,"isMainContent=1&ajax=1&template={$template}&year={$year}&month={$month}{$pos}"); if((bool)$year) { include_once "function.inc.php"; $list = getMonths($classID,$section,$year); } else $list = null; return array('out'=>$out,"list" => $list); } function Search($data) { extract($data, EXTR_PREFIX_SAME, "as_"); extract((array)$sParams, EXTR_PREFIX_SAME, "as_"); $template_env = InheritTemplateEnv($template); eval($template_env['System_Config']); /*if($all) $all_p = "&ignore_section=1&ignore_object=1"; else $all_p = null;*/ if($all) $_SESSION['fltr_'.$section]['all'] = true; else unset($_SESSION['fltr_'.$section]); if((bool)$curPos) $pos="&curPos={$curPos}"; else $pos = null; $out = as_insert_object($section,$sec_obj,"isMainContent=1&ajax=1&template={$template}&search={$search}&all={$all}{$pos}&page_link={$page_link}"); return array('out'=>$out, 'all'); } function getCallForm($params) { extract($params, EXTR_PREFIX_SAME, "as_"); $out = as_insert_object($section,$object,"isMainContent=1&ajax=1&as_admin=0"); return array('out'=>$out); } function getAddress() { $sql = "SELECT `Address` FROM `Data207` WHERE `Checked`=1 ORDER BY `Priority` LIMIT 1"; return SQLSelectOne($sql); } } class C_user_admin extends C_user { } if (is_admin()) { $C_user_admin = new C_user_admin(); } else { $C_user = new C_user(); }__function.inc.php000066600000042770150472614160010174 0ustar00 $caption):?> $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 = "
    \r\n"; $item = "
  • \r\n %NAME\r\n%SUBDIRS
  • \r\n"; $postfix = "
\r\n"; $dropColumn = Array(); if($columns!=1) { $counter = SQLSelectOne("SELECT COUNT(*) AS CNT FROM `Section` WHERE Checked=1 AND Parent_Section_ID =0 And Site_ID=".$site); $perColumn = ceil($counter[CNT]/$columns); for($i=0;$i*$perColumn<=$counter[CNT]-1;$i++){ $dropColumn[] = $i*$perColumn; } } // start ! $data = SQLSelect("SELECT * FROM `Section` WHERE Checked=1 AND Parent_Section_ID = 0 And Site_ID=".$site." ORDER BY Priority"); $out = $prefix; $cnt = 1; foreach ($data as $k => $v) { $url = getSectionLink($v); $keys = array('%NAME', '%URL', '%SUBDIRS'); $values = array($v['Section_Name'], $url, searchRecursive($v['Section_ID'])); $out .= str_replace($keys, $values, $item); if(in_array($cnt,$dropColumn)) $out .= $postfix.$prefix; $cnt++; } $out .= $postfix; return $out; } function getSectionLink($data){ if(empty($data['Hidden_URL'])){ return false; } if($data['ExternalURL']!=""){ return $data['ExternalURL']; } else { return $data['Hidden_URL']; } } function searchRecursive($section, $level=1) { // подКатегории // config $prefix = "
    \r\n"; $item = "%separator%\t
  • %NAME%SUBDIRS
  • \r\n"; $postfix = "
\r\n"; $data = SQLSelect("SELECT * FROM `Section` WHERE Checked=1 AND Parent_Section_ID = '".$section."' ORDER BY Priority"); if (count($data) > 0) { $out = $prefix; $i==0; foreach ($data as $k => $v) { $url = getSectionLink($v); if($i%3==0 && $level==1 && $i!=0) $separator = $postfix.$prefix; else $separator = null; if($v['Section_ID']==119||get_ancestor($v['Section_ID'])==119||get_ancestor(get_ancestor($v['Section_ID']))==119) $subdirs = searchRecursive($v['Section_ID'], ++$level); else $subdirs = null; $keys = array('%NAME', '%URL', '%SUBDIRS', '%separator%'); $values = array($v['Section_Name'], $url, $subdirs, $separator); $out .= str_replace($keys, $values, $item); $i++; } $out .= $postfix; return $out; } else { return false; } } function getYear($section, $table, $active=" class=\"a\"") { global $current_section; $sql = "SELECT DISTINCT YEAR(`Date`) as `year` FROM `Data{$table}` WHERE `Section_ID`= {$section} ORDER BY `Date` DESC"; $data = SQLSelect($sql); $class = null; foreach($data as $v) { if($_GET['year']==$v['year']) $class = $active; else $class = null; $out .= "".$v['year'].""; } if(!$_GET['year']) $class = $active; else $class = null; $out .= "Все"; return $out; } function getSizeFile($size) { static $i; switch(++$i) { case 1 : $dimension = "B"; break; case 2 : $dimension = "Kb"; break; case 3 : $dimension = "Mb"; break; case 4 : $dimension = "Gb"; break; default: $dimension = null; } if($size > 1024) { $size = $size/1024; return getSizeFile($size); } else { $size = round($size); $i = null; return $size.''.$dimension; } } function getYears($classID,$section) { $sql = "SELECT DISTINCT YEAR(`Date`) as y FROM `Data{$classID}`"; $data = SQLSelect($sql); $out = ""; foreach($data as $item) { $out .= "\t{$item['y']}\r\n"; } return $out; } function getMonths($classID,$section,$year=2013) { $sql = "SELECT DISTINCT MONTH(`Date`) as m, DATE_FORMAT(`Date`, '%M') as nm FROM `Data{$classID}` WHERE YEAR(`Date`) = {$year}"; mysql_query("SET @@lc_time_names='ru_RU'"); $data = SQLSelect($sql); if((bool)$data) { $out = ""; foreach($data as $item) { $out .= "\t{$item['nm']}\r\n"; } return $out; } else return false; } function getFtopic() { global $current_site; $sql = "SELECT `topic_id`, `forum_id`, `topic_title`, DATE_FORMAT(DATE_ADD('1970-01-01 00:00:01', INTERVAL `topic_last_post_time` SECOND), '%d %M %Y - %H:%i') AS tt, `topic_last_poster_name` FROM `phpbb_topics` ORDER BY `topic_last_post_time` DESC LIMIT 8"; mysql_query("SET @@lc_time_names='ru_RU'"); $data = SQLSelect($sql); $out = "
Общайтесь с профессионалами
"; foreach($data as $item) { $out .= "
".$item['tt']."".$item['topic_title']."".$item['topic_last_poster_name']."
"; } $out .= "
"; return $out; } function getProjects() { $sql = "SELECT * FROM `Data210` WHERE `inHome` = 1 LIMIT 4"; $data = SQLSelect($sql); foreach($data as $item) { unset($image); unset($images); if($item['Images']) { $images = get_files_from_folder(urldecode($item['Images']), 'images'); if (!$image && $images) { $image = $images[0]; } } if($item['Keyword']) $page = $item['Keyword']; else $page = $item['Data_ID']; $out .= ""; } return $out; } function as_mail($to, $subject, $message, $from_name, $from_email) { if(preg_match('/[\r\n]/', $from_email)) { return 0; } $subject = "=?utf-8?B?" . base64_encode($subject) . "?="; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=utf-8\r\nContent-Transfer-Encoding: 8bit\r\n"; $headers .= "From: =?utf-8?B?".base64_encode($from_name)."?= <".$from_email.">\r\n"; $headers .= "Reply-To: $from_email"; return mail($to, $subject, $message, $headers); } function as_htmlmail($to, $subject, $message, $from_name, $from_email) { if(preg_match('/[\r\n]/', $from_email)) { return 0; } $subject = "=?Windows-1251?B?" . base64_encode($subject) . "?="; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=Windows-1251\r\nContent-Transfer-Encoding: 8bit\r\n"; $headers .= "From: =?Windows-1251?B?".base64_encode($from_name)."?= <".$from_email.">\r\n"; $headers .= "Reply-To: $from_email"; return mail($to, $subject, $message, $headers); } ?>