Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
query("SELECT COUNT(*) FROM episodes");
$total = $total_stmt->fetchColumn();
// Episodes rated by this user
$rated_stmt = $pdo->prepare("SELECT COUNT(*) FROM ratings WHERE user_id = ?");
$rated_stmt->execute([$user_id]);
$rated = $rated_stmt->fetchColumn();
if ($total == 0) return 0;
return ($rated / $total) * 100;
}
/**
* 4. Human-readable Date
*/
function timeAgo($timestamp) {
$time = strtotime($timestamp);
$current = time();
$diff = $current - $time;
if ($diff < 60) return "Just now";
if ($diff < 3600) return round($diff/60) . " mins ago";
if ($diff < 86400) return round($diff/3600) . " hours ago";
return date("M j, g:i a", $time);
}