\n"; ?> Motivate me right! Блог о мотивации, людях и организациях "Motivate me right!" ("Мотивируй меня правильно!") Стас Давыдов and Outcorp 2007-2009 (Стас Давыдов) moti.vate.me mmrlogosmall.png Motivate me right! 96 99 80) { $title = wordwrap($title, 80, "\n"); $titleParts = preg_split('/\\n/', $title); $title = array_shift($titleParts)."..."; } $item = array( "sortkey" => $sortkey, "guid" => $row[5] == 1 ? $WWW_HOST.$WWW."feedback/".$row[0]."/" : $WWW_HOST.$WWW."feedback/".$row[0]."/#".$row[6], "link" => $row[5] == 1 ? $WWW_HOST.$WWW."feedback/".$row[0]."/" : $WWW_HOST.$WWW."feedback/".$row[0]."/#".$row[6], "title" => $title, "description" => str_replace("\n", "
", $row[3]), "author" => ($row[2] == '' ? "info.moti@vate.me (неизвестный)" : "info.moti@vate.me ".'('.$row[2].')'), "domain" => $WWW_HOST.$WWW."feedback/", "category" => "Отзывы, вопросы, истории", "pubDate" => date("D, d M Y H:i:s \G\M\T", $sortkey), "comments" => $WWW_HOST.$WWW."feedback/".$row[0]."/", ); $items[] = $item; if (++$rowCount >= $MAX_ROWS) break; } mysql_free_result($res); function itemcmp($a, $b) { return $b["sortkey"]-$a["sortkey"]; } usort($items, "itemcmp"); $maxCount = 1; foreach($items as $item) { if ($maxCount++ > 30) break; ?> <![CDATA[]]> ]]>