-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvements in content db and other important tweaks
- Loading branch information
Showing
14 changed files
with
214 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# உயரத்திற்கு கொண்டு செல்லும் படிகளாக மாறுவார்கள் | ||
slug: kavithai-7 | ||
content: "உங்களை தாழ்வாக | ||
பேசும் மனிதர்கள் | ||
ஒருநாள் உங்களை | ||
உயரத்திற்கு | ||
கொண்டு செல்லும் | ||
படிகளாக மாறுவார்கள்" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# வருங்காலத்தை கட்டமைக்கின்றது | ||
slug: kavithai-8 | ||
content: "உங்கள் முயற்சிதான் உங்கள் வருங்காலத்தை கட்டமைக்கின்றது" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# அது உழைப்பின் முடிவு | ||
slug: kavithai-6 | ||
content: "வெற்றியென்றால் சாதனையின் | ||
கதை அல்ல | ||
அது உழைப்பின் முடிவு" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# நாளைய வெற்றியை தீர்மானிக்கிறது | ||
slug: kavithai-1 | ||
content: "இன்று செய்யும் முயற்சியே நாளைய வெற்றியை தீர்மானிக்கிறது" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# தன்னம்பிக்கை வேண்டும் | ||
slug: kavithai-2 | ||
content: "வெற்றி பெற துணிவு வேண்டும் தோல்வியை ஏற்க தன்னம்பிக்கை வேண்டும்" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# வெற்றிக்கான எல்லை அருகில் இருக்கிறது | ||
slug: kavithai-3 | ||
content: "துணிவுடன் ஒரு அடியை எடுத்து வை | ||
வெற்றிக்கான எல்லை அருகில் இருக்கிறது" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# உனக்குள் உள்ள சக்தியை உணரச் செய்கிறது | ||
slug: kavithai-4 | ||
content: "வாழ்க்கை உன்னை எதற்கு சோதிக்கிறது என கேட்காதே, | ||
அது உனக்குள் உள்ள சக்தியை உணரச் செய்கிறது" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# சூரியன் மறைந்தாலும் நாளை மீண்டும் உதிக்கும் | ||
slug: kavithai-5 | ||
content: "வாழ்க்கையில் பாதைகள் மாறலாம், | ||
ஆனால் பயணம் தொடர வேண்டும்; | ||
சூரியன் மறைந்தாலும், நாளை மீண்டும் உதிக்கும்" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?php | ||
|
||
/** | ||
* Handle and display a 404 error page with a custom message. | ||
* | ||
* @param string $message The error message to display. | ||
*/ | ||
function showErrorPage(string $message): void | ||
{ | ||
// Validate server protocol | ||
$protocol = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0'; | ||
if (!in_array($protocol, ['HTTP/1.0', 'HTTP/1.1', 'HTTP/2'], true)) { | ||
$protocol = 'HTTP/1.0'; | ||
} | ||
|
||
// Send 404 HTTP response code and security headers | ||
header("$protocol 404 Not Found", true, 404); | ||
header('X-Frame-Options: DENY'); | ||
header('X-XSS-Protection: 1; mode=block'); | ||
header('X-Content-Type-Options: nosniff'); | ||
header('Strict-Transport-Security: max-age=63072000; includeSubDomains'); | ||
header('Referrer-Policy: no-referrer'); | ||
|
||
// Sanitize the message | ||
$safeMessage = htmlspecialchars($message, ENT_QUOTES, 'UTF-8'); | ||
|
||
// Render the 404 error page | ||
echo <<<HTML | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>404 - Not Found</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Catamaran:wght@100..900&display=swap" rel="stylesheet"> | ||
<style> | ||
body { | ||
margin: 0; | ||
font-family: 'Catamaran', sans-serif; | ||
background: linear-gradient(135deg, rgba(255, 120, 150, 0.8), rgba(255, 227, 67, 0.8)); | ||
color: #333; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
.error-container { | ||
text-align: center; | ||
background: #fff; | ||
padding: 2rem; | ||
border-radius: 8px; | ||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | ||
max-width: 600px; | ||
} | ||
.error-container h1 { | ||
font-size: 2.5rem; | ||
color: #e63946; | ||
margin-bottom: 1rem; | ||
} | ||
.error-container p { | ||
font-size: 1.2rem; | ||
margin: 1rem 0; | ||
} | ||
.error-container a { | ||
color: #007bff; | ||
text-decoration: none; | ||
font-weight: bold; | ||
font-size: 1rem; | ||
} | ||
.error-container a:hover { | ||
text-decoration: underline; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="error-container"> | ||
<h1>404 - Page Not Found</h1> | ||
<p>{$safeMessage}</p> | ||
<p><a href="/">Return to Homepage</a></p> | ||
</div> | ||
</body> | ||
</html> | ||
HTML; | ||
|
||
// Terminate script after displaying the error page | ||
exit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.