exec("select title from event where id = " . EVENT_ID . ";"); if($db->get_rows() != 0) { $title = $db->get_val(0,0); } # へッダにタイトルを埋め込む $header = str_replace("TITLE", $title, $header); ?>

\n"; # 表示する画像をGET $dir = getcwd() . "/" . L_DIR; if (! $dir_handle = opendir($dir)) { print "Directory [$dir] is not found."; exit; } $dir_array = array(); while (($file = readdir($dir_handle)) !== false) { if (ereg("[0-9]+\.jpg", $file)) { array_push($dir_array, $file); } } closedir($dir_handle); # 撮った順にソート sort($dir_array); $picture_count = 0; for ($i=0; $iexec("select comment,name from event_detail where event = " . EVENT_ID . " and picture = '$base[0]' order by id;"); $ndb = new db_access; $comment = ""; # 取得したコメントを連結する for($j=0; $j<$db->get_rows(); $j++) { $tmp_comment = $db->get_val($j,0); $name = squote($db->get_val($j,1)); if ($tmp_comment != "") { if (DISP_NICNAME == true) { $ndb->exec("select nicname from user_info where uid = '$name';"); $nicname = $ndb->get_val(0,0); $comment .= "$nicname:"; } $comment .= "$tmp_comment
"; } } if ($comment == "") { continue; $comment = ' '; } $lfile = L_DIR . "/$dir_array[$i]"; $sfile = S_DIR . "/$dir_array[$i]"; $file_stat = stat($lfile); $size = $file_stat[7]; # 並べて表示 if (DISP_NUM != 0 and ($picture_count % DISP_NUM) == 0) { print "\t\t\n"; } if (DISP_NUM != 0 and DISP_NUM != 1) { print <<
$size Byte
$comment
EOD; } elseif (DISP_NUM == 1) { print << $size Byte $comment EOD; } if (DISP_NUM != 0 and ($picture_count % DISP_NUM) == DISP_NUM - 1) { print "\t\t\n"; } $picture_count++; } ?>