помогите где ошибка?
<?php
define('_IN_JOHNCMS', 1);
require('../incfiles/core.php');
$textl = 'Lug\'at - Qidiruv oynasi';
require('../incfiles/head.php');
/*
------------------------------------------------------
-----------
Принимаем данные, выводим форму поиска
------------------------------------------------------
-----------
*/
$search_post = isset($_POST['search']) ?
trim($_POST['search']) : false;
$search_get = isset($_GET['search']) ?
rawurldecode(trim($_GET['search'])) : '';
$search = $search_post ? $search_post : $search_get;
echo '<div class="phdr"><a href="index.php"><b>Lug\'at</
b></a> | Qidiruv oynasi</div>' .
'<form action="search.php" method="post">' .
'So\'zni kiriting<br/>'.
'<div class="gmenu"><p>' .
'<input type="text" name="search" value="' .
functions::checkout($search) . '" />' .
'<input type="submit" value="Qidir" name="submit" /
>' .
'</p></div></form>';
/*
------------------------------------------------------
-----------
Проверям на ошибки
------------------------------------------------------
-----------
*/
$error = array();
if (!empty($search) && (mb_strlen($search) < 2 ||
mb_strlen($search) > 66))
$error[] = 'Taqiqlangan uzunlik!';
if ($search && !$error) {
/*
--------------------------------------------------
---------------
Выводим результаты поиска
--------------------------------------------------
---------------
*/
//$search_db =
functions::rus_lat(mb_strtolower($search));
$search_db = strtr($search_db, array (
'_' => '\\_',
'%' => '\\%'
));
$search_db = '%' . $search_db . '%';
$total = mysql_result(mysql_query("SELECT COUNT(*)
FROM `lugat` WHERE `eng`, `uzb`, `mod` = 1 LIKE
'" . mysql_real_escape_string($search_db) . "'"), 0);
echo '<div class="phdr"><b>Qidiruv natijalari</b></
div>';
echo '<table class="simple-little-table"
cellspacing="0" width="80%"><tr><center><th
width="10">N</th></center><th width="45%">Inglizcha</
th><th width="45%">O\'zbekchada</th>';
echo '</tr>';
if ($total) {
$req = mysql_query("SELECT * FROM `lugat` WHERE
`eng`, `uzb`, `mod` = 1 LIKE '" .
mysql_real_escape_string($search_db) . "' ORDER BY
BINARY (`eng`) LIMIT $start, $kmess");
$i = 0;
$n=$start;
while ($res = mysql_fetch_assoc($req)) {
$n=$n 1;
echo '<tr><td><center>'.$n.'</center></td>';
echo '<td><center>'.$res['eng'].'</center></
td>';
echo '<td><center>'.$res['uzb'].'</center></
td>';
}
echo '</tr></table>';
} else {
echo '<div class="menu">Kechirasiz, Siz qidirgan so\'z bizning lug\'atimizda mavjud emas. </div>';
}
echo '<div class="phdr">Topildi: ' . $total . ' ta
so\'z</div>';
if ($total > $kmess) {
echo '<div class="topmenu">' .
functions::display_pagination('search.php?search=' .
urlencode($search) . '&', $start, $total, $kmess) .
'</div>';
}
} else {
if ($error)echo functions::display_error($error);
}
echo '<p>' . ($search && !$error ? '<a
href="search.php">Yangi qidiruv</a><br />' : '') .
'<a href="index.php">Orqaga</a></p>';
require('../incfiles/end.php');
?>