Skip to content

Instantly share code, notes, and snippets.

🎮
Working hard!

Dominik Procházka Domm98CZ

🎮
Working hard!
Block or report user

Report or block Domm98CZ

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View translator.php
<?php
namespace App;
use Nette;
use Tracy\Debugger;
use App\Model;
use Nette\Neon\Neon;
class Translator implements Nette\Localization\ITranslator
{
@Domm98CZ
Domm98CZ / phpRandomBasedOnTime.php
Created Oct 28, 2019
Random login screen images, based on time.
View phpRandomBasedOnTime.php
<?php
$loginImages = ['login-bg-11.jpg', 'login-bg-12.jpg', 'login-bg-13.jpg', 'login-bg-14.jpg', 'login-bg-15.jpg', 'login-bg-16.jpg', 'login-bg-17.jpg'];
$seed = srand(floor(time() / (60*60*24)));
$randomizedSeedNumber = rand(0, count($loginImages)) % 100;
$randomizedLoginImage = $loginImages[$randomizedSeedNumber]??$loginImages[0];
echo $randomizedLoginImage;
?>
You can’t perform that action at this time.