?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
function.inc.php000066600000001231150472614400007656 0ustar00 $section_id){ $object=(int)$object_id; $section=(int)$section_id; } return $cache[$key]=as_insert_object($section,$object,'&to='.$as_To); } ?>function.ajax.inc.php000066600000033540150472614400010610 0ustar00".$key."\n"; } else { return "tablecol1."\" align=\"right\" valign=\"top\">".$key."tablecol2."\">".$value.""; } } function check_captcha_code($params){ $result=array(); if (isset($params['module']) && is_array($params)) { $module_id=(int)$params['module_id']; } if (is_string($params)) $code = strtolower(trim($params)); else $code = strtolower(trim($params['code'])); if (!$code) { $code = strtolower(trim($params[0])); } if ($module_id) { if (!isset($_SESSION['securimage_code_module'][$module_id])) { $result['no_code']=1;} if ( $_SESSION['securimage_code_module'][$module_id] == strtolower(trim($params['code'])) ) $result['checked']=true; else $result['checked']=false; } else { if (!isset($_SESSION['securimage_code_value'])) { $result['no_code']=1;} if ( $_SESSION['securimage_code_value'] == $code ) $result['checked']=true; else $result['checked']=false; } return $result; } function feedback($params){ global $MODULE_VARS,$LinkID,$DOCUMENT_ROOT,$CMS_UPLOAD_PATH; //DebugBreak(); $result = array(); $cdate = date('Y-m-d H:i:s'); ($params['ajaxed']===false) ? $ajaxed=false : $ajaxed = true; //$image = new Securimage(); ($params['prefix']) ? $prefix = mysql_real_escape_string($params['prefix']) : $prefix = "as_"; ($params['postfix']) ? $postfix = mysql_real_escape_string($params['postfix']) : $postfix = ""; $obj_id=(int)$params['table']; if (!$obj_id){ $query = "SELECT `Object_ID` FROM `Section_Object` WHERE `Section_ID`='".(int)$params['section']."' LIMIT 1;"; $t=SQLSelectOne($query); $table = 'Data'.$t[0]; $obj_id=(int)$t[0]; } else { $table='Data'.$obj_id; } $classID=$obj_id; $object=(int)($params['object']); $section=(int)$params['section']; $backhref = get_section_link($section); if ( !$section || !$obj_id) { if ($ajaxed) { $result['error']=1; return $result; } else { $_SESSION['feedback_error']=1; call_fatal_error('Fatal error in feedback form.'); } } $feedkey=((int)$classID).'_'.((int)$object).'_'.((int)$section); $object_fields = getObjectInfo($obj_id,array('System_Config','AddCond','AddActionTemplate')); $lang = get_lang_by_section($section); if ($object_fields['System_Config']) eval($object_fields['System_Config']); $code = strtolower(trim($params[$prefix.'Code'.$postfix])); $error_message = ''; if ($check_captcha) { if ( $_SESSION['securimage_code_value'] != $code || !$code) { if ($ajaxed) { $result['error']=2; return $result; } else { if ($l_captcha_post_error) $error_message = $l_captcha_post_error; else $error_message = '

Wrong captcha code!

'; } } } $fields = array(); $pattern = '/^'.$prefix.'(.*)'.$postfix.'$/'; foreach ($params as $param => $value) { preg_match($pattern, $param, $matches); if ($matches[1]) $fields[$matches[1]]=$value; } foreach ($fields as $fname => $fval){ $cfield='as_'.$fname; $$cfield=$fval; } $obj_info = getObjectStruct($obj_id); $files_uploaded = array(); if (!$ajaxed){ foreach ($obj_info as $fname => $fval){ if (6 !== (int)$fval['TypeOfData_ID']) continue; $fields[$fname]=$_FILES[$prefix.$fname.$postfix]; $files_uploaded[$fname]=$fname; } } if ($object_fields['AddCond']) { eval($object_fields['AddCond']); } $data = array(); $data['Section_ID'] = $section; $data['Section_Object_ID'] = $object; $data['Created'] = date("Y-m-d h:m:s"); $data['Keyword'] = ""; $data['LastUser_ID'] = "0"; $data['User_ID'] = (int)$_SESSION['user']['User_ID']; if (!$error_message && $files_uploaded){ $feeddir = 'feedback'; $updir=$CMS_UPLOAD_PATH.$feeddir.'/'; $full_dir = $DOCUMENT_ROOT.$updir; if (!@is_dir($full_dir)){ mkdir($full_dir, 0777); if (!@file_exists($full_dir)){ $error_mesage = '

'.$l_cant_upload_dir.'

'; } } if (!$error_message){ $date = date('Y_m_d_H_i_s'); if (!$allowed_extensions) { $allowed_extensions = array('doc','docx','xls','jpg','jpeg','txt'); } foreach ($files_uploaded as $fieldname){ $file = &$_FILES[$prefix.$fieldname.$postfix]; if ($max_file_size && is_numeric($max_file_size) && ($max_file_size*1024) < $file['size']) { $error_message = '

'.$l_cant_upload_filesize.'

'; break; } $finfo = pathinfo($file['name']); $ext = $finfo['extension']; if (!in_array($ext,$allowed_extensions)) { $error_message = '

'.$l_cant_upload_file.'

'; break; } $filename = $feedkey.'_'.$date.'_'.strtolower($fieldname).'.'.$ext; @move_uploaded_file($file['tmp_name'],$full_dir.$filename); if (!@file_exists($full_dir.$filename)){ $error_message = '

'.$l_cant_upload_file.'

'; break; } $data[$fieldname]=$feeddir."/".$filename.":".$file['name']."::".$file['size']; $fields[$fieldname]['full_path']=$full_dir.$filename; $fields[$fieldname]['href']=$updir.$filename; } } } if ($error_message){ foreach ($fields as $key => $val){ $_SESSION['feedback'][$feedkey][$prefix.$key.$postfix]=$val; } $_SESSION['feedback'][$feedkey]['error_message']=$error_message; header('location: http://'.$_SERVER['HTTP_HOST'].$backhref); ; die(); } if (!$form_alias) $form_alias ='Форма с сайта;'; $aliases=array(); foreach ($obj_info as $key => $obj_field) { $aliases[$key]=$obj_field['Description']; } $field_names = array_keys($fields); foreach ($aliases as $key => $value) { $type = (int)$obj_info[$key]['TypeOfData_ID']; if (6 == $type) { if ($data[$key]) continue; else $data[$key]=''; } switch ($type){ case 1 : case 3: $val = $fields[$key]; if ($val) { $data[$key]=$val; } else { $data[$key]=""; } break; case 2: case 4 : case 5: case 7 : $val = (int)$fields[$key]; if ($val) { $data[$key]=$val; } else { $data[$key]=0; } break; case 8 : $val = strtotime($fields[$key]); if ($val) { $data[$key]=date('Y-m-d H:i:s',$val); } else { $data[$key]=$cdate; } break; } } if ($reseller_field && substr_count($fields[$reseller_field],'@')) { $rsections = get_children_with_object($section,$recipients_object,1); if ($rsections){ $objs = getObjects(array('table'=>$recipients_object,'page_id'=>current($rsections))); if ($objs){ $recipients = array(); foreach ($objs as $xobj){ if ($xobj['Email'] && $xobj['Title']){ $recipients[$xobj['Email']]=$xobj['Title']; } } } } } $body = "

".$form_alias."

\ntablewidth."\" cellspacing=\"0\" cellpadding=\"2\">\n"; foreach ($aliases as $field => $alias) { if ($reseller_field == $field){ if ($ralias = $recipients[$fields[$field]]) { $body .= $this->make_table_row($alias.':', $ralias." (".$fields[$field].")"); } continue; } $type = (int)$obj_info[$field]['TypeOfData_ID']; switch ($type){ case 6 : if (!$ajaxed){ $file = &$fields[$field]; $body .= $this->make_table_row($alias.':', "".$file['name'].""); } break; case 5 : $formats = $this->get_field_format_params($obj_info[$field]['Format']); if ($formats['type'] === 'radio'){ $body .= $this->make_table_row($alias); } else { $body .= $this->make_table_row($alias.':',($fields[$field] ? ($l_yes ? $l_yes : "yes") : ($l_no ? $l_no : "no"))); } break; default : if ($fields[$field]) $body .= $this->make_table_row($alias.':',$fields[$field]); break; } } $body .= "
\n"; $inserted = SQLInsert($table,$data); if (!$inserted){ $error_message = '

'.$l_sql_error.'

'; $result['error']=3; if ($ajaxed) { return $result; } else { foreach ($fields as $key => $val){ if (is_array($val)) continue; $_SESSION['feedback'][$feedkey][$prefix.$key.$postfix]=$val; } $_SESSION['feedback'][$feedkey]['error_message']=$error_message; header('location: http://'.$_SERVER['HTTP_HOST'].$backhref); ; die(); } } //array_iconv($data); connect_feature('mail'); if ($reseller_field && $fields[$reseller_field]) { $to_email_list= Mailer ::check_mail_address($fields[$reseller_field]); $form_alias = $recipients[$fields[$reseller_field]]; } if (!$to_email_list) { if ($MODULE_VARS['user']['FEEDBACK_EMAIL'.$obj_id]) { $to_email_list = explode(',', $MODULE_VARS['user']['FEEDBACK_EMAIL'.$obj_id]); } else { $to_email_list = explode(',', $MODULE_VARS['user']['FEEDBACK_EMAIL']); } } $from_name=($l_email_from_name) ? $l_email_from_name : 'robot@'.$_SERVER['HTTP_HOST']; $mailer = new Mailer(); $mailer->setMailer($from_name,"admin@".$_SERVER['HTTP_HOST'],$to_email_list,$form_alias,$body); if ($files_uploaded && $attach_files_to_letters ) { foreach ($files_uploaded as $ffile){ $file = &$fields[$ffile]; $mailer->attach($file['full_path']); } } $sent = $mailer->send(); if (!$sent) { if ($ajaxed){ $result['error']=4; return $result; } else { foreach ($fields as $key => $val){ if (is_array($val)) continue; $_SESSION['feedback'][$feedkey][$prefix.$key.$postfix]=$val; } $error_message = '

'.$l_mail_error.'

'; $_SESSION['feedback'][$feedkey]['error_message']=$error_message; header('location: http://'.$_SERVER['HTTP_HOST'].$backhref); ; die(); } } if (!$debug){ unset($_SESSION['securimage_code_value']); } if ($ajaxed) { $result['sent']=1; return $result; } else { unset($_SESSION['feedback'][$feedkey]); $_SESSION['feedback'][$feedkey]=array(); $_SESSION['feedback'][$feedkey]['sent']=1; header('location: http://'.$_SERVER['HTTP_HOST'].$backhref); ; die(); } } function clean($params){ unset($_SESSION['feedback']); } } class C_feedback_admin extends C_feedback { } if ($as_admin) { $C_feedback_admin = new C_feedback_admin(); } else { $C_feedback = new C_feedback(); } ?>index.php000066600000000553150472614400006376 0ustar00feedback($params); ?>