My personal blog. https://blog.airikr.me
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
533 B

<?php
require_once 'site-settings.php';
$id_unique = strip_tags(htmlspecialchars($_GET['idp']));
$post = sql("SELECT id_unique
FROM posts
WHERE id_unique != :_idunique
AND is_inenglish ".($viewing_in_english == true ? "IS NOT" : "IS")." NULL
".($session == true ? "" : "AND FROM_UNIXTIME(timestamp_published) < NOW()")."
AND timestamp_saved IS NULL
ORDER BY RAND()
", Array(
'_idunique' => $id_unique
), 'fetch');
header("Location: ".url('read:'.$post['id_unique']));
exit;
?>