/**
* functions to create a event for calendar.
*
- * @copyright © 2002-2006 The SquirrelMail Project Team
+ * @copyright 2002-2021 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @subpackage calendar
*/
+/**
+ * Include the SquirrelMail initialization file.
+ */
+require('../../include/init.php');
-/** @ignore */
-define('SM_PATH','../../');
-
-/* SquirrelMail required files. */
-include_once(SM_PATH . 'include/validate.php');
/* date_intl() */
include_once(SM_PATH . 'functions/date.php');
" </td></tr>\n".
html_tag( 'tr',
html_tag( 'td',
- "<textarea name=\"event_text\" rows=\"5\" cols=\"$editor_size\" wrap=\"hard\"></textarea>" ,
+ "<textarea name=\"event_text\" rows=\"5\" cols=\"$editor_size\"></textarea>" ,
'left', $color[4], 'colspan="2"' )
) ."\n" .
html_tag( 'tr',
$calself=basename($PHP_SELF);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
//load calendar menu
calendar_header();
) .
html_tag( 'tr',
html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" .
- html_tag( 'td', $month .'/'.$day.'/'.$year, 'left', $color[4] ) . "\n"
+ html_tag( 'td', date_intl(_("m/d/Y"),mktime(0,0,0,$month,$day,$year)), 'left', $color[4] ) . "\n"
) .
html_tag( 'tr',
html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" .
- html_tag( 'td', $event_hour.':'.$event_minute, 'left', $color[4] ) . "\n"
+ html_tag( 'td', date_intl(_("H:i"),mktime($event_hour,$event_minute,0,$month,$day,$year)), 'left', $color[4] ) . "\n"
) .
html_tag( 'tr',
html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" .
- html_tag( 'td', htmlspecialchars($event_title,ENT_NOQUOTES), 'left', $color[4] ) . "\n"
+ html_tag( 'td', sm_encode_html_special_chars($event_title,ENT_NOQUOTES), 'left', $color[4] ) . "\n"
) .
html_tag( 'tr',
html_tag( 'td', _("Message:"), 'right', $color[4] ) . "\n" .
- html_tag( 'td', nl2br(htmlspecialchars($event_text,ENT_NOQUOTES)), 'left', $color[4] ) . "\n"
+ html_tag( 'td', nl2br(sm_encode_html_special_chars($event_text,ENT_NOQUOTES)), 'left', $color[4] ) . "\n"
) .
html_tag( 'tr',
html_tag( 'td',
?>
</table></td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>