?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
if ($checkKillFile && $action=="change" && $message) {
DeleteFile ($fld[$i],$classID,$systemTableName,$message);
}
function getFileCount($classID,$systemTableID) {
global $LinkID;
$res = mysql_query("SELECT count(*) FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE ".($systemTableID?"`System_ID`=".$systemTableID:"`Object_ID`=".$classID)." AND `TypeOfData_ID`=6",$LinkID);
list($count) = mysql_fetch_row($res);
mysql_free_result($res);
return $count;
}
function getCharsetCode ($charset) {
switch ($charset) {
case "windows-1251": $code = "w"; break;
case "koi8-r": $code = "k"; break;
case "iso8859-5": $code = "i"; break;
case "x-cp866": $code = "a"; break;
case "x-cp866": $code = "d"; break;
case "x-mac-cyrillic": $code = "m"; break;
default: $code = "";
}
return $code;
}
function unhtmlentities ($string) {
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
return strtr ($string, $trans_tbl);
}
function InsertPostfix($filename,$postfix){
$pos=strrpos($filename,".");
return substr($filename,0,$pos).$postfix.".".substr($filename,$pos+1);
}
function DeleteObjectFiles ($classID, $systemTableName, $message) {
global $LinkID;
$res = mysql_query("SELECT `Object_Field_Name`,`Object_Field_ID` FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_ID`='".$classID."' AND `TypeOfData_ID`=6", $LinkID);
while(list($FieldName, $FieldID) = mysql_fetch_row($res)){
if($FieldName) DeleteFile($FieldName, $classID, $systemTableName, $message, $FieldID);
}
unset($FieldName, $FieldID);
mysql_free_result($res);
}
function DeleteFile ($field_name,$classID,$systemTableName,$message,$fldID) {
global $FILES_FOLDER;
global $LinkID;
eval("global \$as_".$field_name."_old;");
if (LOWER_CASE_TABLES) $systemTableName = strtolower($systemTableName);
$sql = "SELECT ".$field_name." FROM `".($systemTableName?$systemTableName:"".(LOWER_CASE_TABLES ? "data" : "Data")."".$classID)."` WHERE `".($systemTableName?$systemTableName:"Data_ID")."`='".$message."'";
$res = mysql_query($sql,$LinkID);
list($field) = mysql_fetch_row($res);
mysql_free_result($res);
list($name,$origname,$type,$size) = split(":",$field);
$fullPathToFile = $FILES_FOLDER.$name;
$res = mysql_query("SELECT `Format` FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_Field_ID`='".$fldID."'");
list($format) = @mysql_fetch_row($res);
@mysql_free_result($res);
preg_match_all("/postfix=([\_\-A-Za-z0-9]+)/i", $format, $regs);
eval("\$as_".$field_name."_old = \"\";");
$res = mysql_query("UPDATE ".($systemTableName?$systemTableName:"".(LOWER_CASE_TABLES ? "data" : "Data")."".$classID)." SET `LastSystem_Updated`=LastSystem_Updated,".$field_name."=\"\" WHERE ".($systemTableName?$systemTableName:"Data")."_ID='".$message."'",$LinkID);
if ($res) {
@unlink($fullPathToFile);
for ($i=0,$c=count($regs[1]); $i<$c; $i++) {
@unlink(InsertPostfix($fullPathToFile,$regs[1][$i]));
}
}
}
function DeleteDataFiles ($classID,$message) {
}
function DeleteSectionObjectFiles ($object,$classID) {
}
function DeleteOwnSectionObjectFiles ($object, $classID, $user_id) {
}
/**
* Генерирует свободное имя файла для файлов объекта
*/
function GenerateFilename ($folder, $basename, $ext)
{
$i = 1;
$tmpfilename = strtolower($basename).strtolower($ext);
while (file_exists($folder.$tmpfilename)) {
$tmpfilename = strtolower($basename).$i.strtolower($ext);
$i ++;
}
return strtolower($tmpfilename);
};
/**
* Перевод с кириллицы на латиницу названий файлов и их нормализация
*
* @param string $Filename - Имя файла
* @return string - Преобразованное имя файла
*/
function LatinFilename($Filename){
$Filename = strtr($Filename, array(' '=>'_',
'а'=>'a','б'=>'b','в'=>'v','г'=>'g','д'=>'d','е'=>'e','ё'=>'io',
'ж'=>'zh','з'=>'z','и'=>'i','к'=>'k','л'=>'l','м'=>'m','н'=>'n','о'=>'o','п'=>'p','р'=>'r','с'=>'s',
'т'=>'t','у'=>'u','ф'=>'f','к'=>'k','ц'=>'ts','ч'=>'ch','ш'=>'sh','щ'=>'sch','ь'=>'','ы'=>'y','ъ'=>'',
'э'=>'e','ю'=>'u','я'=>'ia','і'=>'i','ў'=>'u',
'А'=>'A','Б'=>'B','В'=>'V','Г'=>'G','Д'=>'D','Е'=>'E','Ё'=>'IO',
'Ж'=>'ZH','З'=>'Z','И'=>'I','К'=>'K','Л'=>'L','М'=>'M','Н'=>'N','О'=>'O','П'=>'P','Р'=>'R','С'=>'S',
'Т'=>'T','У'=>'U','Ф'=>'F','К'=>'K','Ц'=>'TS','Ч'=>'CH','Ш'=>'SH','Щ'=>'SCH','Ь'=>'','Ы'=>'Y','Ъ'=>'',
'Э'=>'E','Ю'=>'U','Я'=>'IA','І'=>'I','Ў'=>'U'));
$Filename = preg_replace('/[^\d\w._-]/', '-', $Filename);
return $Filename;
};
?>