?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 3:[>i-$ -$ function.back.inc.phpnu W+A
function last_indexed(){
global $LinkID,$MODULE_VARS;
$query="SELECT MAX(Created) from Data".$MODULE_VARS[search][INDEX_TABLE];
$res=mysql_query($query,$LinkID);
$last=mysql_fetch_row($res);
$last=$last[0];
print _LANG_INDEXED_LAST." ".$last."
";
}
function getBytes(){
global $LinkID,$MODULE_VARS;
$query="SELECT SUM(Size) from Data".$MODULE_VARS[search][INDEX_TABLE];
$res=mysql_query($query,$LinkID);
$last=mysql_fetch_row($res);
$last=$last[0];
print _LANG_INDEXED_SIZE." ".$last." "._LANG_BYTES."
";
}
function getTotal(){
global $LinkID,$MODULE_VARS;
$query="SELECT count(*) from Data".$MODULE_VARS[search][INDEX_TABLE];
$res=mysql_query($query,$LinkID);
$last=mysql_fetch_row($res);
$last=$last[0];
print _LANG_INDEXED_COUNT." ".$last."
";
}
function index_query(){
print "
";
}
function search_indexDocument($url) {
global $LinkID, $index_table, $allowed_urls, $disallowed_urls, $allcnter,$CMS_ENCODING;
// if ($url == './') return;
$parsed_url = parse_url($url);
$source_url = $parsed_url['scheme']."://".($parsed_url['user']?$parsed_url['user']:"").($parsed_url['pass']?":".$parsed_url['pass']:"").(($parsed_url['user'] || $parsed_url['pass'])?"@":"").$parsed_url[host].($parsed_url[port]?":".$parsed_url[port]:"").$parsed_url['path'].($parsed_url['query']?"?".$parsed_url['query']:"");
$url = $source_url;
$url_root_break = $parsed_url['scheme']."://".($parsed_url['user']?$parsed_url['user']:"").($parsed_url['pass']?":".$parsed_url['pass']:"").(($parsed_url['user'] || $parsed_url['pass'])?"@":"").$parsed_url[host].($parsed_url[port]?":".$parsed_url[port]:"");
$url_path_break = $url_root_break.(($parsed_url['path'] && substr($parsed_url['path'],0,1)!="/")?"/":"").(substr($parsed_url['path'],strlen($parsed_url['path'])-1,1)=="/"?$parsed_url['path']:substr($parsed_url['path'],0,strlen($parsed_url['path']) - strlen(strrchr($parsed_url['path'],"/"))+1));
if (substr($url_path_break,strlen($url_path_break)-1,1)!="/") $url_path_break .= "/";
echo ""._LANG_PROCESSING.": ".$url.""; $parsed_url = parse_url($url);
$contents = @file($url);
//if($allcnter < SHOWMAXURLS) echo "Processing: ".$url;
//else echo "
".date("H:i:s")."..";
if ($contents) {
$document = join ("", $contents);
$status=200;
//$document = preg_replace("|.*?|is", "", $document);
$sizeofpage = strlen($document);
//if($allcnter < SHOWMAXURLS) echo ", $sizeofpage bytes";
echo ", $sizeofpage bytes";
$document = str_replace("\n"," ",$document);
$document = str_replace("\r"," ",$document);
preg_match("/(.+)<\/title>/ims",$document,$document_title);
$title = trim($document_title[1]);
preg_match("/(.+)/ims",$document,$document_content);
if ($CMS_ENCODING == 'utf-8') {
$content = iconv('utf-8', 'windows-1251', trim($document_content[1]));
} else {
$content = trim($document_content[1]);
}
$pattern = '/<\!-- noindex -->(.+)<\!-- \/noindex -->/is';
$content = preg_replace ($pattern, '', $content);
$search = array ("' +'","''si","']*?>.*?'si","''si","'<[\/\!]*?[^<>]*?>'si","'([\r\n])[\s]+'","'&(quot|#34);'i","'&(amp|#38);'i","'&(lt|#60);'i","'&(gt|#62);'i","'&(nbsp|#160);'i","'&(iexcl|#161);'i","'&(cent|#162);'i","'&(pound|#163);'i","'&(copy|#169);'i","'(\d+);'e");
$replace = array (" ","","","","\\1 "," ","\"","&","<",">"," ",chr(161),chr(162),chr(163),chr(169),"chr(\\1)");
$content = preg_replace ($search, $replace, $content);
$content = preg_replace('/\s+/', ' ', $content);
$content = trim(strip_tags($content));
//if ($content) DebugBreak();
if ($CMS_ENCODING == 'utf-8') $content = iconv('windows-1251', 'UTF-8',$content);
preg_match_all("/]*href[^=]*=[ '\"\t]*([^ \"'>\t#]+)[^>]*>/ims",$document,$document_url);
preg_match_all("/]*href[^=]*=[ '\"\t]*([^ \"'>\t#]+)[^>]*>/ims",$document,$document_base);
$document_base=$document_base[1][0];
//$document_text = trim(strip_tags($document_text));
} else {
$http_headers = get_headers($url);
$statusline = explode(' ',$http_headers[0]);
$status = $statusline[1];
if ($status !== '200'){
if ($status == '301' || $status == '302') {
$new_url=false;
foreach ($http_headers as $http_header) {
if (substr_count(strtolower($http_header),'location')){
$t=explode(' ',$http_header);
$new_url = $t[1];
foreach ($allowed_urls as $allowed_url){
if (substr($new_url,0,strlen($allowed_url)) == $allowed_url){
//
$query = "SELECT COUNT(*) AS `count` FROM `Data".$index_table."` WHERE `URL` = '".$new_url."'";
$xcount = (int)SQLSelectOne($query,'count');
if (!$xcount) {
$query = "INSERT DELAYED INTO Data".$index_table." (URL,Checked,Created,status) VALUES ('".$new_url."',0,NOW(),0)";
SQLExec($query);
}
break;
}
}
break;
}
}
echo " Redirected".($new_url ? " -> ".$new_url : "").". STATUS : ".$status."";
} else {
echo " Status : ".$status."";
}
flush();
$update = "UPDATE Data${index_table} SET Checked=1, Indexed=1, `status` = '".$status."' WHERE URL='".$url."'";
SQLExec($update);
return;
};
}
//if($allcnter < SHOWMAXURLS) echo ($contents ? " - Ok" : " - Failed");
//if ($CMS_ENCODING != 'utf-8') $content = iconv("windows-1251","utf-8",$content);
$update = "UPDATE Data${index_table} SET ".($document?"Title='".mysql_real_escape_string($title)."',Body='".mysql_real_escape_string($content)."',Checked=1,Size=".$sizeofpage.",":"")."Indexed=1, `status`='".$status."' WHERE URL='".$url."'";
//if (substr_count($url,'.html')) DebugBreak();
$r = mysql_query($update,$LinkID);
//if (!$r) DebugBreak();
if ($err=mysql_errno($LinkID) || !mysql_affected_rows($LinkID)) {
if ($err) {
$error=mysql_error($LinkID);
if ($error) echo ' MySQL Error : '.$error.'';
}
$update = "UPDATE Data${index_table} SET Checked=1, Indexed=1, `status`='".$status."' WHERE URL='".$url."'";
mysql_query($update,$LinkID);
} else {
if ($contents) {echo " - Ok";}
else {echo " - Failed";}
}
flush();
for ($i=0;$iPK 3:[Rs settings.phpnu W+A
/*
Настройки для раздела
*/
$Section_Division_Name="Поиск";
$LinkName="search";
$KeyWord="search";
$access['read']=1;
$access['write']=0;
$access['edit']=0;
$access['subscribe']=0;
$access['moderate']=0;
$url="/search/";
$action="index";
$checked=1;
$item_id = 3;
error_reporting(E_ALL^E_NOTICE);
require ("../../activesite.conf");
require ("function.inc.php");
require ("../../admin/function.inc.php");
require($INCLUDE_FOLDER."main.inc.php");
$Title1="Настройка модуля";
if ( !($perm->isSupervisor() || $perm->isGuest()) ) {
BeginHtml ($Title2, $Title2, "http://".$DOC_DOMAIN."/settings/modules/");
print $NO_RIGHTS_MESSAGE;
EndHtml ();
exit;
}
$res=mysql_query("select * from Module where Keyword='search' and Installed=0",$LinkID);
if(!mysql_num_rows($res)){
BeginHtml ($Title2, $Title2, "http://".$DOC_DOMAIN."/settings/modules/");
print "
Установка модуля завершена";
EndHtml();
exit;
}
LoadModuleEnv ();
$Object_ID=$MODULE_VARS[search][INDEX_TABLE];
if (!isset($step)) $step=2;
switch ($step) {
case 1:
BeginHtml ($Title1, $Title1, "http://".$DOC_DOMAIN."/settings/modules/");
break;
case 2:
BeginHtml ($Title1, $Title1, "http://".$DOC_DOMAIN."/settings/modules/");
SelectParentSub();
break;
case 3:
BeginHtml ($Title1, $Title1, "http://".$DOC_DOMAIN."/settings/modules/");
/* $name = "Поиск";
$engname = "search";
$keyword = "search";
$access['read'] = "0";
$access['write'] = "0";
$access['subscribe'] = "0";
$access['edit'] = "0";
$template = "1";
$parentsubID = $SubdivisionID;
$catalogID = $catalogID;
$url="lalala";
*/
InsertSub($Sub_Division_Name,$LinkName,$KeyWord,$access,$Object_ID,$SectionID,$siteID,$url,$action,$checked);
$query="update Module set Installed=1 where Keyword='search'";
mysql_query($query, $LinkID);
break;
}
EndHtml ();
?>
PK 3:[ function.inc.phpnu W+A
function GetPos($serchIn,$text){
$search = mb_strtolower($text,'cp1251');
$serchInText = mb_strtolower($serchIn,'cp1251');
return stripos($serchInText,$search);
}
function GetSearchResult($body,$text,$link){
//setlocale(LC_ALL,'ru_RU.cp1251');
$body=iconv("utf-8","windows-1251",$body);
$text=iconv("utf-8","windows-1251",$text);
$serchIn = htmlspecialchars_decode($body);
$bodyLength = strlen($serchIn);
$textLength = strlen($text);
$pos = GetPos($serchIn,$text);
$start = $pos - 100;
$end = $pos + 100;
$length = $textLength + 200;
// кусок полностью в тексте
if($start > 0 && $end<$bodyLength){
$out = "...";
$out .= substr($serchIn, $start, $length);
$out .= "...";
}
// начало куска не в тексте
else if($start<0 && $end<$bodyLength){
$out = substr($serchIn, 0, $length);
$out .= "...";
}
// конец куска не в тексте
else if($start>0 && $end>$bodyLength){
$out = "...";
$out .= substr($serchIn, $start, $length);
}
// начало и конец куска не в тексте
else if($start<0 && $end>$bodyLength){
$out = "...";
$out .= substr($serchIn, 0, $length);
$out .= "...";
}
if(stripos($text,$out)){
$res = str_ireplace($text,"".$text."",$out);
}
else{
//$res = makelastwordlink($out,$link);
$res=$out;
}
$pos = GetPos($res,$text);
$res= substr($res,0,$pos-1)." ".$text." ".substr($res,$pos+strlen($text)+9);
$res=iconv("windows-1251","utf-8",$res);
return $res;
}
?>PK 3:[rA A admin/index.phpnu W+A
global $as_admin;
$item_id = 3;
error_reporting(E_ALL^E_NOTICE);
require_once ("../../../../cms.conf");
require_once ($INCLUDE_FOLDER."main.inc.php");
require_once ($ADMIN_FOLDER."function.inc.php");
require_once ("../function.inc.php");
require_once ("../function.back.inc.php");
require_once ("lang.php");
$Delimeter = " > ";
$Title1 = ""._LANG_MODULES."".$Delimeter._LANG_SEARCH;
$Title2 = _LANG_SEARCH_DESC;
if ( !($perm->isSupervisor() || $perm->isGuest()) ) {
BeginHtml ($Title2, $Title2, "http://".$DOC_DOMAIN."/settings/modules/");
print $NO_RIGHTS_MESSAGE;
EndHtml ();
exit;
}
LoadModuleEnv();
if (!isset($step)) $step=1;
switch ($step) {
case 1:
BeginHtml ($Title2, $Title1, "http://".$DOC_DOMAIN."/settings/modules/");
last_indexed();
getBytes();
getTotal();
index_query();
break;
case 2:
if($_GET['ajaxed']!="1"){
BeginHtml ($Title2, $Title1, "http://".$DOC_DOMAIN."/settings/modules/");
} else {
echo ""._LANG_INDEXING_STARTED." ".$_SERVER['HTTP_HOST'].", "._LANG_WINDOW_WILL_CLOSED.".
";
}
if(!empty($MODULE_VARS['search']['START_URL'])){
$url = (substr($MODULE_VARS['search']['START_URL'],0,7)== 'http://' ? "" : "http://").$MODULE_VARS['search']['START_URL'];
} else {
$url = "http://".$_SERVER['HTTP_HOST'].'/';
}
if(!empty($MODULE_VARS['search']['ALLOWED_URLS'])){
$allowed_urls = explode(",",$MODULE_VARS['search']['ALLOWED_URLS']);
} else {
$allowed_urls = $_SERVER['HTTP_HOST'];
}
$disallowed_urls = explode(",",$MODULE_VARS['search']['DISALLOWED_URLS']);
$index_table = $MODULE_VARS['search']['INDEX_TABLE'];
mysql_query("DELETE FROM Data${index_table}",$LinkID);
mysql_query("INSERT INTO Data${index_table} (URL,Checked,Created) VALUES ('".$url."',0,NOW())",$LinkID);
define("SHOWMAXURLS", 200); // max count index links on results page
$allcnter = 0;
echo "";
foreach ($allowed_urls as $starturl){
$xurl=trim($starturl).'/';
search_indexDocument($xurl);
}
$res = mysql_query("SELECT URL FROM Data${index_table} WHERE Checked=0 AND Indexed=0 LIMIT 1",$LinkID);
if (mysql_num_rows($res)) { list($url) = mysql_fetch_row($res); } else { $url = ""; }
while($url) {
search_indexDocument($url);
$allcnter++;
$res = mysql_query("SELECT URL FROM Data${index_table} WHERE Checked=0 AND Indexed=0 LIMIT 1",$LinkID);
if (mysql_num_rows($res)) { list($url) = mysql_fetch_row($res); } else { $url = ""; }
}
echo "
";
if($_GET['ajaxed']=="1"){
echo "";
exit;
}
break;
default:
break;
}
EndHtml ();
?>PK 3:[dfʿ admin/lang.phpnu W+A
PK 3:[>i-$ -$ function.back.inc.phpnu W+A PK 3:[Rs r$ settings.phpnu W+A PK 3:[ z, function.inc.phpnu W+A PK 3:[rA A 3 admin/index.phpnu W+A PK 3:[dfʿ C? admin/lang.phpnu W+A PK @D