вопрос
Здратсвуйте. При регистрации, если нажать кнопку проверки логина выдает ошибку:
Parse error: syntax error, unexpected $end in /home/bh53881/public_html/engine/ajax/registration.php on line 134
<?php
/*
=====================================================
DataLife Engine - by SoftNews Media Group
-----------------------------------------------------
http://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004,2012 SoftNews Media Group
=====================================================
Данный код защищен авторскими правами
=====================================================
Файл: registration.php
-----------------------------------------------------
Назначение: AJAX проверки имени
=====================================================
*/
@error_reporting ( E_ALL ^ E_WARNING ^ E_NOTICE );
@ini_set ( 'display_errors', true );
@ini_set ( 'html_errors', false );
@ini_set ( 'error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE );
define('DATALIFEENGINE', true);
define( 'ROOT_DIR', substr( dirname( __FILE__ ), 0, -12 ) );
define( 'ENGINE_DIR', ROOT_DIR . '/engine' );
include ENGINE_DIR.'/data/config.php';
if ($config['http_home_url'] == "") {
$config['http_home_url'] = explode("engine/ajax/registration.php", $_SERVER['PHP_SELF']);
$config['http_home_url'] = reset($config['http_home_url']);
$config['http_home_url'] = "http://".$_SERVER['HTTP_HOST'].$config['http_home_url'];
}
require_once ENGINE_DIR.'/classes/mysql.php';
require_once ENGINE_DIR.'/data/dbconfig.php';
require_once ENGINE_DIR . '/modules/functions.php';
dle_session();
$_COOKIE['dle_skin'] = trim(totranslit( $_COOKIE['dle_skin'], false, false ));
if ($_COOKIE['dle_skin']) {
if (@is_dir(ROOT_DIR.'/templates/'.$_COOKIE['dle_skin']))
{
$config['skin'] = $_COOKIE['dle_skin'];
}
}
if ($config["lang_".$config['skin']]) {
if ( file_exists( ROOT_DIR.'/language/'.$config["lang_".$config['skin']].'/website.lng' ) ) {
include_once ROOT_DIR.'/language/'.$config["lang_".$config['skin']].'/website.lng';
} else die("Language file not found");
} else {
include_once ROOT_DIR.'/language/'.$config['langs'].'/website.lng';
}
$config['charset'] = ($lang['charset'] != '') ? $lang['charset'] : $config['charset'];
require_once ENGINE_DIR.'/modules/functions.php';
require_once ENGINE_DIR.'/classes/parse.class.php';
$parse = new ParseFilter();
function check_name($name)
{
global $lang, $db, $banned_info, $relates_word, $config;
$stop = '';
if (dle_strlen($name, $config['charset']) > 20)
{
$stop .= $lang['reg_err_3'];
}
if (preg_match("/[\||\'|\<|\>|\[|\]|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\{\+]/",$name))
{
$stop .= $lang['reg_err_4'];
}
if (empty($name))
{
$stop .= $lang['reg_err_7'];
}
if (strpos( strtolower ($name) , '.php' ) !== false) {
$stop .= $lang['reg_err_4'];
}
if (count($banned_info['name']))
foreach($banned_info['name'] as $banned){
$banned['name'] = str_replace( '\*', '.*' , preg_quote($banned['name'], "#") );
if ( $banned['name'] AND preg_match( "#^{$banned['name']}$#i", $name ) ) {
if ($banned['descr']) {
$lang['reg_err_21'] = str_replace("{descr}", $lang['reg_err_22'], $lang['reg_err_21']);
$lang['reg_err_21'] = str_replace("{descr}", $banned['descr'], $lang['reg_err_21']);
} else $lang['reg_err_21'] = str_replace("{descr}", "", $lang['reg_err_21']);
$stop .= $lang['reg_err_21'];
}
}
if (!$stop)
{
if( function_exists('mb_strtolower') ) {
$name = trim(mb_strtolower($name, $config['charset']));
} else {
$name = trim(strtolower( $name ));
}
$search_name=strtr($name, $relates_word);
$db->query ("SELECT name FROM " . USERPREFIX . "_users WHERE LOWER(name) REGEXP '[[:<:]]{$search_name}[[:>:]]' OR name = '$name'");
$ipb_dle_lan[0] = "Данное имя уже используется на форуме.";
$db_ipb_user = "bh53881_fojig";
$db_ipb_password = "448553078";
$db_ipb_namedb = "bh53881_site";
$db_ipb_local = "localhost";
$db_ipb_error = 1; // 1 - показывать ошибки в соединении с бд форума, 0 - нет
$db_prefix_ipb = "ipb";
$ipb = new db;
$ipb->connect($db_ipb_user, $db_ipb_password, $db_ipb_namedb, $db_ipb_local, $db_ipb_error);
$ipb_test_name = $ipb->super_query ("SELECT COUNT(*) as count FROM {$db_prefix_ipb}members where name = '".strtolower($name)."'");
if ($ipb_test_name ['count'] > 0) $stop .= $ipb_dle_lan[0];
?>
Перезалейте этот файл из исходного архива DLE.