?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
home/user1137782/www/user1137782.atservers.net/scripts/comments_ajax.js 0000666 00000017362 15047114211 0021276 0 ustar 00 /**
* @author Mozg
* @copyright 2011
* @company reactive.by
* @require jquery
*/
if (typeof forms == 'undefined') {
var forms = {};
}
var cformlangs = {
"RU": {
"NameDefault" : "Представьтесь пожалуйста",
"NameFailure" : "Введите имя",
"MessageDefault" : "Введите сообщение",
"MessageFailure" : "Не введено сообщение",
"TitleDefault" : "Представьтесь пожалуйста",
"TitleFailure" : "Введите имя",
"InfoDefault" : "Введите сообщение",
"InfoFailure" : "Не введено сообщение",
"AuthorDefault" : "Представьтесь пожалуйста",
"AuthorFailure" : "Введите имя",
"JobDefault" : "Укажите место работы",
"JobFailure" : "Укажите место работы",
"CompanyDefault" : "Введите имя организации",
"CompanyFailure" : "Не указана организация",
"PhoneDefault" : "Ваш контактный телефон",
"PhoneFailure" : "Введите корректный контактный номер",
"MailDefault" : "Введите email",
"MailFailure" : "Некорректный email",
"Code_is_valid" : "Код верный!",
"tooShortMessage":'Должно быть не менее 5 символов!',
"tooLongMessage":'Должно быть не более 5 символов!',
"wrong_captcha" : " Неверный код подтверждения!",
"required" : "Обязательно для заполнения"
},
"EN": {
"NameDefault" : "Introduce yourself, please",
"NameFailure" : "Enter your name",
"MessageDefault" : "Enter message",
"MessageFailure" : "Message is required",
"CompanyDefault" : "Enter your company",
"CompanyFailure" : "Company name is required",
"PhoneDefault" : "Your contact phone",
"PhoneFailure" : "Incorrect phone",
"MailDefault" : "Enter email",
"MailFailure" : "Incorrect email",
"code_is_valid" : "Code is valid!",
"tooShortMessage":'It must be at least 4 symbols!',
"tooLongMessage":'It must be at max 4 symbols!',
"wrong_captcha" : "Wrong validation code!",
"required" : "required"
}
}
function exist_in_array(arr, value) {
if (typeof arr != 'object') return false;
for (var i = 0; i '+result.HTML+'');
$('.slidedown').slideDown();
}
} else {
if (result.error_message) {
$('#sent_failed').html(connector.result.error_message);
}
$('#sent_failed').show();
}
}
var comments_processor = function(){
var form_name=this.name;
var form = find_form(form_name);
if ( !LiveValidation.massValidate( form.validFields )) return false;
if (form.params.load_selector) {$(form.params.load_selector).show();}
connector.execute({'add_comment' : export_form(form_name)});
if (form.params.load_selector) { $(form.params.load_selector).hide(); }
if (typeof form.callback == 'function') { form.callback(connector.result,form);}
else { default_comments_callback(connector.result,form);}
return false;
};
function processCommentsForm(form_name,fields_for_validate,params,callback){
if (!params) params = {};
var postfix='';
var prefix='as_';
if (params['postfix']) { postfix=params['postfix'];}
if (params['prefix']) { prefix=params['prefix'];}
if (!lang) {
var lang="RU";
if (params['lang']) { lang=params['lang'];}
}
var clang = cformlangs[lang];
var validfFields = [];
for (var key in fields_for_validate){
if (!key) continue;
var field = fields_for_validate[key];
switch (field) {
case 'Mail' :
case 'mail' :
if (exist_in_array(fields_for_validate,'Mail') && $('#'+prefix+'Mail'+postfix).size()) {
var as_Mail = new LiveValidation('as_Mail'+postfix, {validMessage:'', onlyOnSubmit: false});
as_Mail.add(Validate.Presence, {failureMessage:clang.MailFailure});
as_Mail.add(Validate.Email,{failureMessage: clang.MailFailure} );
validfFields.push(as_Mail);
}
break;
case 'Captcha':
case 'captcha':
if (exist_in_array(fields_for_validate,'Captcha') && $('#'+prefix+'Code'+postfix).size()) {
var captcha = new LiveValidation('as_Code'+postfix, {validMessage:clang.code_is_valid,onlyOnSubmit: false });
captcha.add(Validate.Presence, {failureMessage:clang.required});
captcha.add(Validate.Length, {minimum:5, maximum:5, tooShortMessage:clang.tooShortMessage, tooLongMessage:clang.tooLongMessage});
captcha.add(Validate.Custom, {against: function(code){
if(code.length == 5){
connector.execute({'check_captcha_code' : code});
if (connector.result.no_code) {
$('#captcha_img'+postfix).attr('src', '/cms/modules/imreg/capcha/img.php')
return false;
}
if (connector.result.checked) {return true;}
else {return false;}
}
}, failureMessage: clang.wrong_captcha});
validfFields.push(captcha);
}
break;
default :
if (exist_in_array(fields_for_validate,field) && $('#'+prefix+field+postfix).size()) {
var as_field = new LiveValidation(prefix+field+postfix, {validMessage:'', onlyOnSubmit: false});
as_field.add(Validate.Custom, {against: function(code){ if(code == clang[field+'Default']) return false; return true;}, failureMessage : clang[field+'Failure'] });
as_field.add(Validate.Presence, {failureMessage:clang[field+'Failure']});
validfFields.push(as_field);
}
break;
}
}
forms[form_name]= {
"validFields" : validfFields,
"fields_for_validate" : fields_for_validate,
"callback" : callback,
"params" : params,
"name" : form_name
}
if ($('form[Name=' + form_name + ']').size()) {
document.forms[form_name].onsubmit = comments_processor;
}
};