Помогите пожалуйста исправить ошибку в PHP коде
Не ругайте что без комментариев, код не мой
Код:
<?php
$error = false;
if(isset($_GET['date']) and strlen($_GET['date']) > 3) {
$date = $_GET['date'];
} else {
$error = true;
}
if (!$error) {
$date_start = $date.' 00:00:00';
$date_end = $date.' 23:59:59';
$res = mysql_query("SELECT information_items_id, information_systems_id, information_items_date, information_items_name, information_items_url
FROM information_items_table
WHERE information_items_date > '$date_start' AND information_items_date < '$date_end'
ORDER BY information_items_id DESC
LIMIT 99") or die(mysql_error());
$total = mysql_num_rows($res);
}
if (($total > 0) && (!$error)) {
echo "<p><b>Найдено событий: $total</b></p><ol>";
while ($row = mysql_fetch_array($res)) {
$item_id = $row['information_items_id'];
$system_id = $row['information_systems_id'];
$item_date = $row['information_items_date'];
$item_name = $row['information_items_name'];
$item_url = $row['information_items_url'];
$res2 = mysql_query("SELECT structure_id, information_systems_name
FROM information_systems_table
WHERE information_systems_id = '$system_id' AND site_id = 2
LIMIT 1") or die(mysql_error());
$row2 = mysql_fetch_array($res2);
$structure_id = $row2['structure_id'];
$system_name = $row2['information_systems_name'];
$res3 = mysql_query("SELECT structure_path_name
FROM structure_table
WHERE structure_id = '$structure_id'
LIMIT 1") or die(mysql_error());
$row3 = mysql_fetch_array($res3);
$structure_path = $row['structure_path_name'];
if (strlen($item_url) > 0) {
$this_url = $item_url;
} else {
$this_url = $item_id;
}
echo '<li style="padding-bottom:10px;"><a href="/'.$structure_path.'/'.$this_url.'/">'.$item_name.'</a> (<a href="/'.$structure_path.'/">'.$system_name.'</a>)</li>';
}
echo "</ol>";
} else {
echo 'За указанный период событий не найдено.';
}
?>
$error = false;
if(isset($_GET['date']) and strlen($_GET['date']) > 3) {
$date = $_GET['date'];
} else {
$error = true;
}
if (!$error) {
$date_start = $date.' 00:00:00';
$date_end = $date.' 23:59:59';
$res = mysql_query("SELECT information_items_id, information_systems_id, information_items_date, information_items_name, information_items_url
FROM information_items_table
WHERE information_items_date > '$date_start' AND information_items_date < '$date_end'
ORDER BY information_items_id DESC
LIMIT 99") or die(mysql_error());
$total = mysql_num_rows($res);
}
if (($total > 0) && (!$error)) {
echo "<p><b>Найдено событий: $total</b></p><ol>";
while ($row = mysql_fetch_array($res)) {
$item_id = $row['information_items_id'];
$system_id = $row['information_systems_id'];
$item_date = $row['information_items_date'];
$item_name = $row['information_items_name'];
$item_url = $row['information_items_url'];
$res2 = mysql_query("SELECT structure_id, information_systems_name
FROM information_systems_table
WHERE information_systems_id = '$system_id' AND site_id = 2
LIMIT 1") or die(mysql_error());
$row2 = mysql_fetch_array($res2);
$structure_id = $row2['structure_id'];
$system_name = $row2['information_systems_name'];
$res3 = mysql_query("SELECT structure_path_name
FROM structure_table
WHERE structure_id = '$structure_id'
LIMIT 1") or die(mysql_error());
$row3 = mysql_fetch_array($res3);
$structure_path = $row['structure_path_name'];
if (strlen($item_url) > 0) {
$this_url = $item_url;
} else {
$this_url = $item_id;
}
echo '<li style="padding-bottom:10px;"><a href="/'.$structure_path.'/'.$this_url.'/">'.$item_name.'</a> (<a href="/'.$structure_path.'/">'.$system_name.'</a>)</li>';
}
echo "</ol>";
} else {
echo 'За указанный период событий не найдено.';
}
?>
Буду очень благодарна за помощь
http://nami.ru/js/common.js
Цитата:
function change_calend_top (way) {
....
document.getElementById('calend_date').innerHTML = month_s;
....
document.getElementById('calend_date').innerHTML = month_s;
Откуда вообще мнение, что должно меняться что-то ещё кроме месяца?