I need to code in PHP, that:
I programmed a calendar. In this calendar are 12 months and users can edit some values in this calendar. But if it is after the 25th of the month a variable $lock
must be set to 1
and users can't edit anything anymore in this month but they should be able to edit next month again. And they can't edit past months just the actual one.
My test is here:
$mees=Date('m'); // month
$rok=Date('y'); // year
$dness = Date("U", strtotime(date(""))); //.. $todayy in translate
$dvadsatpat = Date("m/25/Y"); // $twentyfive in translate
$dvadsat = strtotime("$dvadsatpat"); //$twenty in translate
$mees1=$mees+1;
if ($mees1=="13"){$mees1="1";}
/** after 25th day in acutal month + level2 **/
if ($dness < $dvadsat && $mm == $mees && $level == "2") {$lock=1; }
/** after 25th day in next month + level2 **/
if ($dness < $dvadsat && $mm == $mees1 && $level == "2") {$lock=1;}
echo $lock;
?>