This file contains hidden or 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
<?php | |
require dirname(__FILE__) . '/vendor/autoload.php'; | |
require dirname(__FILE__) . '/controllers/TodoController.php'; | |
use Psr\Http\Message\ResponseInterface as Response; | |
use Psr\Http\Message\ServerRequestInterface as Request; | |
use Slim\Routing\RouteCollectorProxy; | |
use Slim\Views\Twig; | |
use Slim\Views\TwigMiddleware; | |
use Slim\Factory\AppFactory; |
This file contains hidden or 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
const path = require('path'); | |
module.exports = (env, argv) => { | |
return { | |
mode: argv.mode, | |
entry: './app/index.js', | |
output: { | |
filename: 'bundle.js', | |
path: path.resolve(__dirname, 'dist'), | |
}, |
This file contains hidden or 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
// Calculate the time elapsed since a specific date (example: January 1, 2023) | |
const specificDate = new Date('January 1, 2023'); | |
const timeElapsed = currentDateTime - specificDate; | |
const daysElapsed = Math.floor(timeElapsed / (1000 * 60 * 60 * 24)); | |
// Display all date and time information in the span element | |
datetimeDisplayElement.textContent = `Days Elapsed since January 1, 2023: ${daysElapsed}`; |
This file contains hidden or 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
// Get the day of the week | |
const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; | |
const dayOfWeek = daysOfWeek[currentDateTime.getDay()]; | |
// Display all date and time information in the span element | |
datetimeDisplayElement.textContent = `Day of the Week: ${dayOfWeek}`; |
This file contains hidden or 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
<script> | |
// Function to display current date and time | |
function displayDateTime() { | |
const datetimeDisplayElement = document.getElementById('datetime-display'); | |
// Create a new Date object | |
const currentDateTime = new Date(); | |
// Extract the date and time components | |
const date = currentDateTime.toDateString(); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Display Current Date and Time</title> | |
</head> | |
<body> | |
<span id="datetime-display"></span> | |
<script> | |
// Function to display current date and time |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Display Current Date and Time</title> | |
</head> | |
<body> | |
<span id="datetime-display"></span> | |
</body> | |
</html> |
This file contains hidden or 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
<?php | |
if(isset($_POST['login'])) { | |
if(!isset($_POST['g-recaptcha-response']) || empty($_POST['g-recaptcha-response'])) { | |
echo 'reCAPTHCA verification failed, please try again.'; | |
} else { | |
$secret = 'google_secret_key'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$_POST['g-recaptcha-response']); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
This file contains hidden or 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
<?php | |
if(isset($_POST['login'])) { | |
if(!isset($_POST['g-recaptcha-response']) || empty($_POST['g-recaptcha-response'])) { | |
echo 'reCAPTHCA verification failed, please try again.'; | |
} else { | |
$secret = 'google_secret_key'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$_POST['g-recaptcha-response']); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
This file contains hidden or 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
.container { | |
display: flex; | |
align-items: center; | |
background: #ffffff; | |
height: 100vh; | |
width: 100%; | |
} | |
.card { | |
position: relative; |
NewerOlder