|
|
|
@ -64,6 +64,14 @@
|
|
|
|
|
* img VARCHAR(256)
|
|
|
|
|
* );
|
|
|
|
|
*
|
|
|
|
|
* CREATE TABLE access
|
|
|
|
|
* count INT,
|
|
|
|
|
* lock BOOL PRIMARY KEY DEFAULT TRUE,
|
|
|
|
|
* CONSTRAINT lock_unique CHECK(lock)
|
|
|
|
|
* );
|
|
|
|
|
*
|
|
|
|
|
* INSERT INTO access VALUES (0);
|
|
|
|
|
*
|
|
|
|
|
* Finally, you will also need ffmpeg and exiftool installed for
|
|
|
|
|
* metadata stripping and thumbnail conversion.
|
|
|
|
|
*/
|
|
|
|
@ -360,7 +368,14 @@
|
|
|
|
|
|
|
|
|
|
// Connect to the database
|
|
|
|
|
$dbc = pg_connect("host=$DB_HOST dbname=$DB_NAME user=$DB_USER password=$DB_PASSWORD")
|
|
|
|
|
or die('Could not connect: ' . pg_last_error());
|
|
|
|
|
or die('Could not connect: ' . pg_last_error());
|
|
|
|
|
|
|
|
|
|
$access_count = 0;
|
|
|
|
|
{
|
|
|
|
|
pg_query('UPDATE access SET count=count+1;') or die('Query failed ' . pg_last_error());
|
|
|
|
|
$res = pg_query('SELECT count FROM access') or die('Query failed: ' . pg_last_error());
|
|
|
|
|
$access_count = pg_fetch_array($res)['count'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($_POST['submit'] == 'Post') {
|
|
|
|
|
// Grab the data from the POST
|
|
|
|
@ -411,13 +426,13 @@
|
|
|
|
|
<head>
|
|
|
|
|
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
|
<meta name="theme-color" content="#DBA9B9">
|
|
|
|
|
<meta name="theme-color" content="#DBA9B9" />
|
|
|
|
|
|
|
|
|
|
<title>BBS | ピケ.コム</title>
|
|
|
|
|
|
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS feed" href="/rss.php" />
|
|
|
|
|
|
|
|
|
|
<link href="<?php echo ASSETS_PATH . 'style.css'; ?>" rel="stylesheet">
|
|
|
|
|
<link href="<?php echo ASSETS_PATH . 'style.css'; ?>" rel="stylesheet" />
|
|
|
|
|
</head>
|
|
|
|
|
<body class="center">
|
|
|
|
|
<center>
|
|
|
|
@ -552,7 +567,7 @@
|
|
|
|
|
the first 8 characters are used.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
The year is <?php echo date('Y'); ?>, but no ©. This page was generated in <?php printf("%.2f", microtime(true) - $start_time); ?> seconds.
|
|
|
|
|
The year is <?php echo date('Y'); ?>, but no ©. This page was generated in <?php printf("%.2f", microtime(true) - $start_time); ?> seconds and has been accessed <?php echo $access_count; ?> times.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|