?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
$updateString = "";
$fieldString = "";
$valueString = "";
$curdate = date('Y-m-d H:i:s');
/*
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);
}
*/
function ProcessImage($src_file,$dst_file,$postfix=null,$width=null,$height=null,$quality = null,$proportional=true) {
global $INCLUDE_FOLDER,$CMS_THUMB_PATH, $CMS_IMAGE_PATH,$fields,$DOCUMENT_ROOT;
require_once($INCLUDE_FOLDER . '/image/config.inc.php');
require_once($INCLUDE_FOLDER . '/image/ImageOut.php');
if ($postfix) $dst_file = substr($dst_file,0,strrpos($dst_file,'.')) . $postfix . substr($dst_file,strrpos($dst_file,'.'));
$image = new ImageOut();
$image->src_file = strtolower($src_file);
$image->dst_file = strtolower($dst_file);
if ($width) $image->width = $width;
if ($height) $image->height = $height;
if ($quality) $image->quality = $quality;
$image->proportional = $proportional;
$image->Process();
}
// Begin main code
$r = mysql_query("SELECT `TypeOfData_ID`, `TypeOfData_Name` FROM `".(LOWER_CASE_TABLES ? "list_typeofdata" : "List_TypeOfData")."`;");
$ftypes=array();
while ($t = mysql_fetch_row($r)) {
$ftypes[$t[0]]=$t[1];
}
$fauth = array(1=>"Доступно всем", 2=>"Доступно только администраторам", 3=>"Недоступно никому");
$fields=array();
for($i=0; $i<$fldCount; $i++) {
$fldNotNull[$i]=(int)$fldNotNull[$i];
$fields[$fld[$i]]=array(
"name" => $fld[$i],
"value" => $fldValue[$i],
"default" => $fldDefault[$i],
"edit_mode_id" => $fldTypeOfEdit[$i],
"edit_mode" => $fauth[(int)$fldTypeOfEdit[$i]],
"type" => $fldType[$i],
"typeAlias"=> $ftypes[$fldType[$i]],
"notNull" => $fldNotNull[$i],
"format" => $fldFmt[$i]
);
}
for($i=0; $i<$fldCount; $i++) {
$field = $fields[$fld[$i]];
//if ($field["name"] == "show_tape") DebugBreak();
if(in_array($fldType[$i],array(1,3,8,9,10))) {
$fldValue[$i] = str_replace("\\'", "'", addslashes($fldValue[$i]));
$fldValue[$i] = "\"".$fldValue[$i]."\"";
}
if (($fldType[$i]==2 || $fldType[$i]==7 || $fldType[$i]==4 ) && $fldValue[$i]=="") {
if ($fldNotNull[$i]) {
if ($fldTypeOfEdit[$i]==1) $fldValue[$i] = "NULL";
if ($fldTypeOfEdit[$i]>1 && $fldDefault[$i]!="") $fldValue[$i] = "\"\"";
} else {
if ($fldTypeOfEdit[$i]>1 && $fldDefault[$i]!="") $fldValue[$i] = '"'.$fldDefault[$i].'"';
else $fldValue[$i] = "\"0\"";
}
}
if ($fldType[$i]==5) {
if ($fldNotNull[$i]) {
if ($fldValue[$i] || is_numeric($fldValue[$i])) {
$fldValue[$i]="'".$fldValue[$i]."'";
} else {
if ($fldDefault[$i] ) $fldValue[$i]= "'".$fldDefault[$i]."'";
else $fldValue[$i] = "\"0\"";
}
}
}
if ($fldType[$i]==8) {
$val = $fldValue[$i];
if (!$val || $val == '""' ) {
if(strtolower($fldDefault[$i]) == 'now'){
$fldValue[$i]="NOW()";
}else{
$fldValue[$i]="\"0000-00-00 00:00:00\"";
}
}
}
if ($fldType[$i]==6) {
$newFile = "";
$srcFile = "";
$filesize = "";
$file = "";
$filename = "";
$ext = "";
$oldfilename = "";
$oldext = "";
if (trim($_POST['as_'.$fld[$i].'_serv'])) {
// New file from server
$file = $_POST['as_'.$fld[$i].'_serv'];
$filename = substr($file, strrpos($file, "/") + 1); // Needs upgrade
// File on remote server
if (strpos(' '.$file, 'http')) {
$fp = fopen($file, 'r');
$data = '';
while (false !== ($char = fgetc($fp))) $data .= $char;
fclose($fp);
$filesize = strlen($data);
$ext = substr($filename, strrpos($filename, "."));
eval("\$fldValue[\$i] = \$as_".$fld[$i]."_old;");
list($oldnewFile, $oldfilename, $tmp) = split (":", $fldValue[$i]);
$oldext = substr($oldfilename, strrpos($oldfilename, "."));
if ($current_object["LinkName"])
$newFile = $current_object["LinkName"];
else if ($current_section["LinkName"])
$newFile = $current_section["LinkName"];
else if ($LinkName)
$newFile = $LinkName;
else
$newFile = "image";
if(!$oldfilename || ($ext != $oldext)) {
if ($oldfilename) unlink($FILES_FOLDER.$oldnewFile);
$newFile = GenerateFilename($FILES_FOLDER, $newFile, $ext);
} else $newFile = $oldnewFile;
$fp = fopen($FILES_FOLDER.$newFile, 'w');
fwrite($fp, $data);
fclose($fp);
} else {
// File on local server
$srcFile = $IMAGES_FOLDER.$file;
$filesize = filesize($srcFile);
$ext = substr($filename, strrpos($filename, "."));
eval("\$fldValue[\$i] = \$as_".$fld[$i]."_old;");
list($oldnewFile, $oldfilename, $tmp) = split (":", $fldValue[$i]);
$oldext = substr($oldfilename, strrpos($oldfilename, "."));
if ($current_object["LinkName"])
$newFile = strtolower($current_object["LinkName"]);
else if ($current_section["LinkName"])
$newFile = strtolower($current_section["LinkName"]);
else if ($LinkName)
$newFile = strtolower($LinkName);
else
$newFile = "image";
if(!$oldfilename || ($ext != $oldext)) {
if ($oldfilename) unlink($FILES_FOLDER.$oldnewFile);
$newFile = GenerateFilename($FILES_FOLDER, $newFile, $ext);
if (!strpos(' '.$file, 'http')) {
// файл с локального сервера, оставим название на совести гуру FTP-клиентов ;)
$newFile = strtolower($srcFile);
clearstatcache();
$filesize = filesize('../../..'.$CMS_UPLOAD_PATH.$newFile);
}
} else $newFile = strtolower($oldnewFile);
copy ($srcFile, $FILES_FOLDER.strtolower($newFile));
}
} else {
// New file from upload
$srcFile = $_FILES["as_".$fld[$i]]["tmp_name"];
if ($srcFile && $srcFile!="none" && is_uploaded_file($srcFile)) {
$filename = strtolower(LatinFilename($_FILES["as_".$fld[$i]]["name"]));
$filetype = $_FILES["as_".$fld[$i]]["type"];
$filesize = $_FILES["as_".$fld[$i]]["size"];
$ext = substr($filename, strrpos($filename, "."));
eval("\$fldValue[\$i] = \$as_".$fld[$i]."_old;");
list($oldnewFile, $oldfilename, $tmp) = split (":", $fldValue[$i]);
$oldext = substr($oldfilename, strrpos($oldfilename, "."));
if ($current_object["LinkName"])
$newFile = strtolower($current_object["LinkName"]);
else if ($current_section["LinkName"])
$newFile = strtolower($current_section["LinkName"]);
else if ($LinkName)
$newFile = strtolower($LinkName);
else
$newFile = "image";
//clear cache
$pathinfo=pathinfo($filename);
$fname=$pathinfo['filename'];
//DebugBreak();
if ($CMS_THUMB_PATH) {
$thumbs = @scandir($DOCUMENT_ROOT.$CMS_THUMB_PATH);
if ($thumbs) {
foreach ($thumbs as $thumb) {
if (substr_count($thumb,$fname)) @unlink($CMS_THUMB_PATH.$thumb);
}
}
}
if(!$oldfilename || ($ext != $oldext)) {
if ($oldfilename) unlink($FILES_FOLDER.$oldnewFile);
$newFile = GenerateFilename($FILES_FOLDER, $newFile, $ext);
} else $newFile = strtolower($oldnewFile);
copy ($srcFile,$FILES_FOLDER.strtolower($newFile));
} elseif ($fldValue[$i]=="" || $fldValue[$i]=="none") {
eval("\$fldValue[\$i] = \$as_".$fld[$i]."_old;");
}
}
$is_image = (strstr($fldFmt[$i],'type=image/')) ? true : false;
if ($newFile && $is_image) {
// Creating image copies
$fileSystem_Config = explode("|",$fldFmt[$i]);
$width = null; $height = null;
for ($j = 1; $j < sizeof($fileSystem_Config); $j++) {
$fileSystem_Config[$j] .= ';';
if (strstr($fileSystem_Config[$j],'w=')
|| strstr($fileSystem_Config[$j],'h=')
|| strstr($fileSystem_Config[$j],'postfix=')
|| strstr($fileSystem_Config[$j],'quality='))
{
$w = null; $h = null; $postfix = null; $proportional=1;
if (strstr($fileSystem_Config[$j],'w=')) {
$w = substr($fileSystem_Config[$j],strpos($fileSystem_Config[$j],'w=') + 2);
$w = substr($w,0,strpos($w,';'));
};
if (strstr($fileSystem_Config[$j],'h=')) {
$h = substr($fileSystem_Config[$j],strpos($fileSystem_Config[$j],'h=') + 2);
$h = substr($h,0,strpos($h,';'));
};
if (strstr($fileSystem_Config[$j],'quality=')) {
$quality = substr($fileSystem_Config[$j],strpos($fileSystem_Config[$j],'quality=') + 8);
$quality = substr($quality,0,strpos($quality,';'));
};
if (strstr($fileSystem_Config[$j],'postfix=')) {
$postfix = substr($fileSystem_Config[$j],strpos($fileSystem_Config[$j],'postfix=') + 8);
$postfix = substr($postfix,0,strpos($postfix,';'));
};
if (strstr($fileSystem_Config[$j],'proportional=')) {
$proportional = substr($fileSystem_Config[$j],strpos($fileSystem_Config[$j],'proportional=') + strlen('proportional='));
$proportional = substr($proportional,0,strpos($proportional,';'));
};
if ($w || $h){
ProcessImage($FILES_FOLDER.strtolower($newFile),$FILES_FOLDER.strtolower($newFile),
$postfix,$w,$h,$quality,$proportional);
};
}
}
$imagesize = getimagesize($FILES_FOLDER.strtolower($newFile));
$fldValue[$i] = $newFile.":".$filename.":".$imagesize[mime].":".$filesize.":".$imagesize[0].":".$imagesize[1];
} else if ($newFile) {
$fldValue[$i] = $newFile.":".$filename."::".$filesize;
}
$fldValue[$i] = "\"".$fldValue[$i]."\"";
if ($user_table_mode) $message = $AUTH_USER_ID;
// Checking file size any mime-type
if ($filesize > $max_filesize) $errCode = 7;
if ($mime_type) {
$fileformat = explode(",",$mime_type);
$filetypeParsed = explode("/",$filetype);
$filetypeNotAllowed = true;
for ($j=0; $j