2009 && $year < 2050 && $month > 0 && $month < 13 && $day > 0 && $day < 32) { /* * Grab the event array and event, if any, for this date */ $events = new MyMonth($TLN->userdatafolder, $TLN->dirperm, $year, $month); $event = $events->getEvent($day); if (isset($evdelete) && $dayuid) { $events->delEvent($eventuid); $events->saveEvents(); $actionDone = true; } if (isset($evsave) && $etext) { $starttime = sprintf('%02s%02s00', $starthour, $startmin); $stoptime = sprintf('%02s%02s00', $stophour, $stopmin); // Clean it when we store it $etext = Telaen::sanitizeHTML($etext); $events->setEvent($day, $starttime, $stoptime, $etext, $dayuid); $events->saveEvents(); $actionDone = true; } } else { /* if out of bounds, just ignore */ $actionDone = true; } $jssource .= << EOT; $smarty->assign('pageMetas', $pmetas); $smarty->assign('smJS', $jssource); if ($actionDone) { $smarty->assign('smShowEventForm', 'NO'); } else { $event[] = $newevent; // tack on new event at bottom of list $timestamp = mktime(0, 0, 0, $month, 1, 2010); $mdate = '::    '.date('M', $timestamp)." $day, $year    ::
"; $smarty->assign('smEvent', $event); $smarty->assign('smShowEventForm', 'YES'); $smarty->assign('smEventHeader', $mdate); $smarty->assign('mins', array('00', '05', 10, 15, 20, 25, 30, 35, 40, 45, 50, 55)); $smarty->assign('hours', array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)); $smarty->assign('dhours', array('12 am', '1 am', '2 am', '3 am', '4 am', '5 am', '6 am', '7 am', '8 am', '9 am', '10 am', '11 am', '12 pm', '1 pm', '2 pm', '3 pm', '4 pm', '5 pm', '6 pm', '7 pm', '8 pm', '9 pm', '10 pm', '11 pm', )); } unset($events); $smarty->assign('webmailTitle', $TLN->config['webmail_title']); $smarty->assign('smCCList', $TLN->config['webmail_title']); $smarty->display("$themez/event.tpl");