19) { $num=$num%10; } switch ($num) { case 1: { return($words[0]); } case 2: case 3: case 4: { return($words[1]); } default: { return($words[2]); } } } $queryd = 'SELECT * FROM `author`;'; $sqld = @mysql_query($queryd); while ($sql_thread = mysql_fetch_array($sqld)) { $author_photo_vk[$sql_thread['id']]=$sql_thread['photo_vk']; $author_photo[$sql_thread['id']]=$sql_thread['photo']; $author_name[$sql_thread['id']]=$sql_thread['name']; } $id = $_GET["id"]; $act = $_GET["act"]; $author = $_GET["author"]; echo '
'; if ($id!='') { $dbpoetry = 'SELECT * FROM `poetry` WHERE `id`="'.$id.'";'; $sql_poetry = @mysql_query($dbpoetry); while ($rezult_poetry = mysql_fetch_array($sql_poetry)) { include ('display.php'); $id = $rezult_poetry['id']; $url = 'http://www.pravcalendar.ru/poetry/id'.$id; echo '


Нравится
'; ?> Комментировать через: Вконтакте, Facebook.
'; } } elseif ($author!='') { $dbpoetry = 'SELECT * FROM `poetry` WHERE `author`="'.$author.'" ORDER BY `popular` DESC LIMIT 10;'; $sql_poetry = @mysql_query($dbpoetry); echo '
'.$author_name[$author].'

'; while ($rezult_poetry = mysql_fetch_array($sql_poetry)) { include ('display.php'); } } elseif ($act=='popular') { $dbpoetry = 'SELECT * FROM `poetry` ORDER BY `popular` DESC LIMIT 10;'; $sql_poetry = @mysql_query($dbpoetry); echo '
Популярные стихотворения

'; while ($rezult_poetry = mysql_fetch_array($sql_poetry)) { include ('display.php'); } } else { $dbpoetry = 'SELECT * FROM `poetry` ORDER BY `date` DESC LIMIT 10;'; $sql_poetry = @mysql_query($dbpoetry); echo '
Стихотворения

'; while ($rezult_poetry = mysql_fetch_array($sql_poetry)) { include ('display.php'); } } echo '
'; ?>