Parcourir la source

Wyświetlanie tekstu głównego komentarza dla katalogu

k4be il y a 1 an
Parent
commit
f7072b49a6
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      dir.php

+ 6 - 0
dir.php

@@ -28,6 +28,11 @@ $dirname = htmlspecialchars($dirinfo['name']);
 $comments_data = get_comments($dirinfo['id'], 'dir');
 $comments = generate_comment_field($comments_data, 'dir', $dirinfo['id']);
 
+$topcomment = '';
+if ($dirinfo['comment']) {
+	$topcomment = '<h3>' . htmlspecialchars($dirinfo['comment']) . '</h3>';
+}
+
 ?><!DOCTYPE html>
 <html>
 <head>
@@ -45,6 +50,7 @@ const scriptUrlPrefix = <?=$config['basepath']?>;
 <h1>Obrazki: <?=$dirname?></h1>
 <div id="image-list">
 <a class="gora" href="."></a><h2>... wybierz dowolny obrazek, najlepiej pierwszy.</h2>
+<?=$topcomment?>
 <?=$content?>
 </div>
 <div id="comments">