AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/c/o/o/coopiak/amisdesseniors-fr/nice/components/com_rsform/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/c/o/o/coopiak/amisdesseniors-fr/nice/components/com_rsform/helpers/datevalidation.php
<?php
/**
* @package RSForm! Pro
* @copyright (C) 2007-2019 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

// no direct access
defined('_JEXEC') or die;

use Joomla\CMS\Factory;

class RSFormProDateValidations
{
	public static function none($day, $month, $year, $data = array())
	{
		// no validation
		$valid = true;
		return $valid;
	}
	
	public static function fromtoday($day, $month, $year, $data = array())
	{
		try
		{
			$today    = Factory::getDate();
			$selected = Factory::getDate($year.'-'.self::padding($month).'-'.self::padding($day).' 23:59:59');

			return $selected->toUnix() >= $today->toUnix();
		}
		catch (Exception $e)
		{
			return false;
		}
	}
	
	public static function fromtomorrow($day, $month, $year, $data = array())
	{
		try
		{
			$tomorrow = Factory::getDate();
			$tomorrow->modify('+1 day');
			$selected = Factory::getDate($year.'-'.self::padding($month).'-'.self::padding($day).' 23:59:59');

			return $selected->toUnix() >= $tomorrow->toUnix();
		}
		catch (Exception $e)
		{
			return false;
		}
	}
	
	public static function beforetodayexcluding($day, $month, $year, $data = array())
	{
		try
		{
			$today    = Factory::getDate();
			$today->setTime(0, 0, 0);
			$selected = Factory::getDate($year.'-'.self::padding($month).'-'.self::padding($day).' 00:00:00');

			return $selected->toUnix() < $today->toUnix();
		}
		catch (Exception $e)
		{
			return false;
		}
	}
	
	public static function beforetodayincluding($day, $month, $year, $data = array())
	{
		try
		{
			$today    = Factory::getDate();
			$today->setTime(23, 59, 59);
			$selected = Factory::getDate($year.'-'.self::padding($month).'-'.self::padding($day).' 00:00:00');

			return $selected->toUnix() < $today->toUnix();
		}
		catch (Exception $e)
		{
			return false;
		}
	}
	
	protected static function padding($value)
	{
		return str_pad($value, 2, '0', STR_PAD_LEFT);
	}
}

Anon7 - 2022
AnonSec Team