3d2 < // RJM Programming - September, 2026 5,87c4 < error_reporting(E_ALL); < < function extended_jdtofrench($juliandate) { // thanks to https://www.php.net/manual/en/function.jdtofrench.php < if ($juliandate > 2380945) { < // jdtofrench () only accepts dates until september 1806 < $gregorian_date = jdtogregorian($juliandate); < $temp = explode ('/', $gregorian_date); < $year = $temp[2]; < $juliandate = gregoriantojd($temp[0], $temp[1], 1805); < $republican_date = jdtofrench($juliandate); < $republican_date = explode('/', $republican_date); < $diff = $year - 1805; < $republican_date[2] = $republican_date[2] + $diff; < } else { < $republican_date = jdtofrench($juliandate); < } < return $republican_date[1] . '/' . (1 + $republican_date[0]) . '/' . $republican_date[2]; < } < < function mdytodmy($inv) { < $things=explode('/', $inv); < if (sizeof($things) == 3) { < return '' . $things[1] . '/' . (1 + $things[0]) . '/' . $things[2]; < } < return $inv; < } < < function mdytodmyj($inv) { < $things=explode('/', $inv); < if (sizeof($things) == 3) { < return '' . $things[1] . '/' . (0 + $things[0]) . '/' . $things[2]; < } < return $inv; < } < < if (isset($_GET['docals']) && isset($_GET['monththe']) && isset($_GET['yearthe'])) { < //data-gregorian='' data-julian='' data-jewish='' data-french='' < $onl=''; < $jewishtsh=''; < $frenchts=''; < $gregdate='1'; < $gregmonth='' . $_GET['monththe']; < $gregyear='' . $_GET['yearthe']; < if (isset($_GET['datethe'])) { < $gregdate='' . $_GET['datethe']; < } < $jdnum=gregoriantojd($gregmonth, $gregdate, $gregyear); < $gregoriants='' . $gregmonth . '/' . $gregdate . '/' . $gregyear; < $frenchts=extended_jdtofrench(($jdnum + 2)); < $jewishts=jdtojewish(($jdnum + 1)); < $juliants=jdtojulian($jdnum); < $jewishtsz=jdtojewish(($jdnum + 1), true); < $jewishtsh=iconv('WINDOWS-1255', 'UTF-8', $jewishtsz); < $onl.=" var ispans=0, spans=parent.document.getElementsByTagName('span'); "; < $onl.=" parent.document.getElementById('calcap').setAttribute('data-gregorian', '" . mdytodmy($gregoriants) . "'); spans[1].setAttribute('data-gregorian', '" . mdytodmy($gregoriants) . "'); "; < $onl.=" parent.document.getElementById('calcap').setAttribute('data-julian', '" . mdytodmy($juliants) . "'); spans[1].setAttribute('data-julian', '" . mdytodmy($juliants) . "'); "; < $onl.=" parent.document.getElementById('calcap').setAttribute('data-french', '" . $frenchts . "'); spans[1].setAttribute('data-french', '" . $frenchts . "'); "; < $onl.=" parent.document.getElementById('calcap').setAttribute('data-jewish', '" . mdytodmyj($jewishts) . "'); spans[1].setAttribute('data-jewish', '" . mdytodmyj($jewishts) . "'); "; < $onl.=" parent.document.getElementById('calcap').setAttribute('data-jewishy', '" . $jewishtsh . "'); spans[1].setAttribute('data-jewishy', '" . $jewishtsh . "'); "; < < < if (5 == 5) { < for ($ioff=1; $ioff<=31; $ioff++) { < $jdnum++; < $gregoriants='' . $gregmonth . '/' . (1 + $ioff) . '/' . $gregyear; < $frenchts=extended_jdtofrench(($jdnum + 2)); < $jewishts=jdtojewish(($jdnum + 1)); < $juliants=jdtojulian($jdnum); < $jewishtsz=jdtojewish(($jdnum + 1), true); < $jewishtsh=iconv('WINDOWS-1255', 'UTF-8', $jewishtsz); < $onl.=" if (eval('' + spans.length) > " . ($ioff + 1) . ") { "; < $onl.=" spans[" . ($ioff + 1) . "].setAttribute('data-gregorian', '" . mdytodmy($gregoriants) . "'); "; < $onl.=" spans[" . ($ioff + 1) . "].setAttribute('data-julian', '" . mdytodmy($juliants) . "'); "; < $onl.=" spans[" . ($ioff + 1) . "].setAttribute('data-french', '" . $frenchts . "'); "; < $onl.=" spans[" . ($ioff + 1) . "].setAttribute('data-jewish', '" . mdytodmyj($jewishts) . "'); "; < $onl.=" spans[" . ($ioff + 1) . "].setAttribute('data-jewishy', '" . $jewishtsh . "'); "; < $onl.=" } "; < } < } < < echo ""; < exit; < } else if (isset($_POST['tihis'])) { --- > if (isset($_POST['tihis'])) { 107,109c24 < if (str_replace('?','',explode('tihis=', $_SERVER['QUERY_STRING'])[0]) != '') { < $usualis=file_get_contents('http://www.rjmprogramming.com.au/calendar_contenteditable.html?' . str_replace('?','',explode('tihis=', $_SERVER['QUERY_STRING'])[0])); < } else if (strpos($newih, '