This repository has been archived on 2026-03-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
kekec_bbs/index.php
T
2026-03-14 15:36:01 +09:00

46 lines
785 B
PHP

<?php
require_once './database.php';
if (isset ($_GET['page']))
$page = $_GET['page'];
else
$page = 0;
if (isset ($_GET['thread']))
$thread = $_GET['thread'];
else
$thread = -1;
if (isset ($_GET['sort']))
{
$sort = $_GET['sort'];
if (!(in_array ($sort, array ('td', 'eg', 'ta', 'eb'))))
$sort = 'td';
}
else
$sort = 'td';
// 画像のディレクトリを開く.
$dir = './images/';
$handle = opendir ($dir);
// MySQL 宣言
$mysqli = set_mysql ('miteruzo_bbs');
$mysqli -> set_charset ('utf8');
if ($result = $mysqli -> query ("SELECT * FROM threads WHERE id = $thread"))
{
$row = $result -> fetch_assoc ();
$title = $row['title'];
$explain = $row['explain'];
$result -> close ();
}
require_once './forms/index.frm.php';