do not special case a folder named 'None'. There's no reason
[squirrelmail.git] / plugins / calendar / event_create.php
index c7583da957e0cda4ec9032f5f14800f618b13878..db2347c2ae2ebd5b53d3c203cf989d67af6c9644 100644 (file)
@@ -3,18 +3,17 @@
 /**
  * functions to create a event for calendar.
  *
- * @copyright © 2002-2006 The SquirrelMail Project Team
+ * @copyright © 2002-2007 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');
 
@@ -94,7 +93,7 @@ function show_event_form() {
          "      </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',
@@ -123,7 +122,7 @@ if (!isset($hour) || $hour <= 0){
 $calself=basename($PHP_SELF);
 
 
-displayPageHeader($color, 'None');
+displayPageHeader($color);
 //load calendar menu
 calendar_header();
 
@@ -152,11 +151,11 @@ if(!isset($event_text)){
                 ) .
                 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" .
@@ -176,4 +175,4 @@ if(!isset($event_text)){
 
 ?>
 </table></td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>