?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
index.php 0000666 00000001406 15047260644 0006401 0 ustar 00
$action = "search";
@include_once("../../cms.conf");
require_once $INCLUDE_FOLDER."index.php";
require_once $INCLUDE_FOLDER."files.inc.php";
eval("echo \"$template_header\";");
if ($searchTemplate) {
eval("echo \"".$searchTemplate."\";");
} else {
require_once $ROOT_FOLDER."action/edit/fields.php";
if ($srchFrm=showSearchForm($fldName, $fldType, $fldDoSearch, $fldFmt)) {
echo "
";
} else {
echo "Невозможен поиск по данному шаблону.";
}
}
eval("echo \"$template_footer\";");
?> function.back.inc.php 0000666 00000023242 15047261406 0010565 0 ustar 00
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) {
$sql = "SELECT `ExternalURL` FROM `Section` WHERE `ExternalURL` != ''";
$data = SQLSelect($sql);
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]);
if(preg_match("/<\!-- body -->(.+)<\!-- \/body -->/ims",$document,$document_content)){
$content = $document_content[1];
} elseif(preg_match("/]*>(.+)<\/body>/ims",$document,$document_content)){
$content = $document_content[1];
}else{
$content = $document;
};
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;$i