diff --git a/calendar/debian/changelog b/calendar/debian/changelog deleted file mode 100644 index be13436ecb..0000000000 --- a/calendar/debian/changelog +++ /dev/null @@ -1,6 +0,0 @@ -phpgroupware-calendar (0.9.14-0.RC3.3) unstable; urgency=low - - * New release. - - Source is now splitted into modules. - - -- Luca - De Whiskey's - De Vitis Mon, 21 May 2001 15:00:56 +0200 diff --git a/calendar/debian/control b/calendar/debian/control deleted file mode 100644 index 31fd229300..0000000000 --- a/calendar/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: phpgroupware-calendar -Section: web -Priority: optional -Maintainer: Luca - De Whiskey's - De Vitis -Build-Depends: debhelper (>> 3.0.0) -Standards-Version: 3.5.2 - -Package: phpgroupware-calendar -Section: web -Architecture: all -Depends: phpgroupware (>= ${Source-Version}), php3-pgsql | php3-cgi-pgsql | php4-pgsql | php3-mysql | php3-cgi-mysql | php4-mysql -Description: The phpGroupWare calendar management module - This phpGroupWare module provides a calendar scheduling module with - alerts for high priority events. - diff --git a/calendar/debian/copyright b/calendar/debian/copyright deleted file mode 100644 index 900148502e..0000000000 --- a/calendar/debian/copyright +++ /dev/null @@ -1,15 +0,0 @@ -This package was debianized by Luca - De Whiskey's - De Vitis on -Sat, 29 Jun 2002 17:13:40 +0200 - -It was downloaded from the CVS repository at subversion.gnu.org. Try: -prompt$ CVSROOT=:pserver:anoncvs@subversions.gnu.org:/cvsroot/phpgroupware -prompt$ CVS_RSH=ssh -prompt$ cvs login -prompt$ cvs get all packages - -Upstream Author(s): -Please, see credits.txt, the README file or visit http://apps.phpgroupware.org/ - -Copyright: -A copy of the GNU General Public License, version 2, can be found in -/usr/share/common-licenses/GPL . diff --git a/calendar/debian/rules b/calendar/debian/rules deleted file mode 100755 index 0293e52e6b..0000000000 --- a/calendar/debian/rules +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 by Joey Hess. -# -# This version is for a hypothetical package that builds an -# architecture-dependant package, as well as an architecture-independent -# package. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# This is the debhelper compatability version to use. -export DH_COMPAT=3 - -APP = calendar -PACKAGE = debian/phpgroupware-$(APP)/usr/share/phpgroupware/$(APP) -PACKAGEDOC = debian/phpgroupware-$(APP)/usr/share/doc/phpgroupware-$(APP) - -COPYRIGHT = -iname copyright\* -or -iname license -CHANGELOG = -iname change\* -INSTALL = -iname install -FINDOPT = -type f -not \( -path \*CVS\* -or -path \*debian\* -or -name .cvsignore \) -SPECIAL = -size 0 -or $(INSTALL) -or $(CHANGELOG) -or $(COPYRIGHT) -or -name \*.sgml -STAMPS = -name configure-stamp -or -name build-stamp -APPFILES = -not \( -path \*doc\* -or -path \. -or -name '*.pl' -or -name '*.py' -or $(STAMPS) \) -DOCFILES = -not \( $(SPECIAL) \) - -configure: configure-stamp -configure-stamp: - dh_testdir - # No configuration needed. - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - # Here should go the commands necessary to build the sgml documentation... - touch build-stamp - -clean: - dh_testdir - rm -f build-stamp configure-stamp - rm -f debian/.builded - rm -f debian/files - # Here should go the commands to clean the builded sgml documents. - dh_clean - -install: build - dh_testdir - - # Install $(APP) files in $(PACKAGE) - find $(FINDOPT) $(APPFILES) \ - -exec install -D --mode=644 {} $(PACKAGE)/{} \; - - # Install $(APP) doc files in $(PACKAGEDOC) - cd doc ;\ - find $(FINDOPT) $(DOCFILES) \ - -exec install -D --mode=644 {} ../$(PACKAGEDOC)/{} \; - -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb | tee debian/.builded - -binary: binary-indep -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/calendar/help/DE/add.php b/calendar/help/DE/add.php new file mode 100644 index 0000000000..b1ca376930 --- /dev/null +++ b/calendar/help/DE/add.php @@ -0,0 +1,50 @@ + 'manual' + ); + $phpgw_info['flags'] = $phpgw_flags; + include('../../../header.inc.php'); + $font = $phpgw_info['theme']['font']; +?> + +

     Ein durchsuchbares tägliches, wöchentliches, monatliches +und jährliches Kalender/Planer-Programm mit Alarm für wichtige Ereignisse.
+

    +
  • Einen Eintrag hinzufügen:
    + Um eine Eintragung für sich selber oder für ihre Gruppe hinzuzufügen + klicken Sie auf das kleine Symbol (+) wie das oben. Eine Formularseite wird + angezeigt, auf der Sie die wichtigen Felder ausfüllen können.
  • +

         + + + +
    + Titel:
    + Vollständige Beschreibung:
    + Datum:
    + Zeit:
    + Dauer:
    + Priorität:
    + Zugriff:
    + Gruppen Auswahl:
    + Teilnehmer;
    + Wiederholungstyp:
    + Wiederholungs-Enddatum:
    Intervall: :
    + Füllen Sie die Felder aus und klicken Sie absenden. +

+
+Wichtig: Der Zugriff kann, wie mit anderen Programmen dieses Paketes, auf +Privat, Gruppen lesbar oder global eingestellt werden. +

     +common->phpgw_footer(); ?> diff --git a/calendar/help/DE/calendar.php b/calendar/help/DE/calendar.php new file mode 100644 index 0000000000..aa78ac20b8 --- /dev/null +++ b/calendar/help/DE/calendar.php @@ -0,0 +1,73 @@ + 'manual' + ); + $phpgw_info['flags'] = $phpgw_flags; + include('../../../header.inc.php'); + $font = $phpgw_info['theme']['font']; +?> + +

      Ein durchsuchbares +tägliches, wöchentliches, monatliches und jährliches Kalender/Planer-Programm +mit Alarm für wichtige Ereignisse.
+Um entweder den Stündlich/Täglichen, wöchentlichen oder monatlichen +Kalender zu sehen, klicken Sie auf das Betreffende Symbol in der linken oberen +Ecke.
+

  • Ansicht:Tag Woche Monat Jahr
    +Tag:
    + Der heutige Tag wird angezeigt, aufgeteilt in stündliche Blöcke. + Anfangs und End-Zeit des Tages können in den Prefrences (Einstellungen, Optionen) + eingestellt werden.
    +Woche:
    +Die aktuelle Woche wird angezeigt. Der Wochenanfangstag kann in den Prefrences (Optionen) eingestellt werden.
    +Monat:
    + Der vor eingestellter Eintrag ist der aktuelle Monat. Der vorherige oder künftige + Monat sind leicht erreichbar mit nur einem klick.
    +Jahr:
    + Das laufende Jahr wird angezeigt. Es werden die kleinen monatlichen Kalender + ansichten benutzt.
  • +

          +

  • Eine Eintragung hinzufügen:
    + Um eine Eintragung für sich selber oder für Mitglieder Ihrer Gruppe hinzuzufügen + klicken Sie auf das kleine (+) Symbol wie oben gezeigt. Eine Formularseite + wird angezeigt, auf der Sie dann die relevanten Felder ausfüllen können. + + +
    + +Titel:
    +Vollständige Beschreibung:
    +Datum:
    +Zeit:
    +Dauer:
    +Priorität:
    +Zugriff:
    + +Gruppen Auswahl:
    +Teilnehmer;
    +Wiederholungstyp:
    +Wiederholungs-Enddatum:
    +Intervall:
    +Füllen Sie die Felder aus und klicken Sie absenden.
    + Wichtig: Der Zugriff kann, wie mit anderen Programmen dieses Pakets, + auf privat, Gruppen und global eingestellt werden.
  • +

          +

  • Bearbeiten:Löschen  
    +Um eine Eintragung zu bearbeiten oder zu löschen, klicken Sie auf das kleine Symbol wie oben gezeigt. +Wählen Sie bearbeiten oder löschen aus.
    + Wenn Sie Bearbeiten wählen wird ihnen eine Formular seite angezeigt, + worauf Sie die gewünschten Felder bearbeiten können.
    +Wichtig:Sie können nur Eintragungen die Sie selber gemacht haben bearbeiten oder löschen.
  •      

+common->phpgw_footer(); ?> diff --git a/calendar/help/DE/edit_delete.php b/calendar/help/DE/edit_delete.php new file mode 100644 index 0000000000..f6c4f830d1 --- /dev/null +++ b/calendar/help/DE/edit_delete.php @@ -0,0 +1,30 @@ + 'manual' + ); + $phpgw_info['flags'] = $phpgw_flags; + include('../../../header.inc.php'); +?> + +

   Ein +durchsuchbares tägliches, wöchentliches, monatliches und jährliches +Kalender/Planer-Programm mit Alarm für wichtige Ereignisse.
+

  • Bearbeiten:Löschen  
    +Um eine Eintragung zu bearbeiten oder zu löschen, klicken Sie auf das kleine Symbol wie oben gezeigt. +Wählen Sie bearbeiten oder löschen aus.
    + Wenn Sie Bearbeiten wählen wird ihnen eine Formular seite angezeigt, + worauf Sie die gewünschten Felder bearbeiten können.
  •    +Wichtig:Sie können nur Eintragungen die Sie selber gemacht haben bearbeiten oder löschen.

      

+common->phpgw_footer(); ?> diff --git a/calendar/help/DE/view.php b/calendar/help/DE/view.php new file mode 100644 index 0000000000..e6364a37e0 --- /dev/null +++ b/calendar/help/DE/view.php @@ -0,0 +1,45 @@ + 'manual' + ); + $phpgw_info['flags'] = $phpgw_flags; + include('../../../header.inc.php'); +?> + +

    Ein durchsuchbares tägliches, wöchentliches, monatliches +und jährliches Kalender/Planer-Programm mit Alarm für wichtige Ereignisse.
+Um entweder den Stündlich/Täglichen, wöchentlichen oder monatlichen +Kalender zu sehen, klicken Sie auf das Betreffende Symbol in der linken oberen +Ecke.
+

    +
  • Ansicht:Tag + Woche + Monat + Jahr +

        Tag:
    + Der heutige Tag wird angezeigt, aufgeteilt in stündliche Blöcke. + Anfangs und End-Zeit des Tages können in den Prefrences (Einstellungen, + Optionen) eingestellt werden. +

        Woche:
    + Die aktuelle Woche wird angezeigt. Der Wochenanfangstag kann in den Prefrences + (Optionen) eingestellt werden. +

        Monat:
    + Der vor eingestellter Eintrag ist der aktuelle Monat. Der vorherige oder künftige +
    + Monat sind leicht erreichbar mit nur einem klick. +

       

  • +
+
+common->phpgw_footer(); ?> diff --git a/calendar/help/EN/add.php b/calendar/help/EN/add.php index 243f31e16b..da379770f4 100755 --- a/calendar/help/EN/add.php +++ b/calendar/help/EN/add.php @@ -43,3 +43,4 @@ Frequency: Simply fill in the fields, and click Submit.
Note: Access can be set as with other applications in this suite, Private,Group Readable,Globally Readable.

+common->phpgw_footer(); ?> diff --git a/calendar/help/EN/calendar.php b/calendar/help/EN/calendar.php index 2b8774a2e2..7c59595553 100755 --- a/calendar/help/EN/calendar.php +++ b/calendar/help/EN/calendar.php @@ -61,3 +61,4 @@ To edit an entry group click on the small icon as shown above. A form page will be presented, where you can edit the relevant fields. Chose edit or delete from the bottom of the page.
Note:You can only make changes or delete those calendar entries created by you.

+common->phpgw_footer(); ?> diff --git a/calendar/help/EN/edit_delete.php b/calendar/help/EN/edit_delete.php index cfc19e5d15..95bba0be81 100755 --- a/calendar/help/EN/edit_delete.php +++ b/calendar/help/EN/edit_delete.php @@ -25,3 +25,4 @@ To edit an entry group click on the small icon as shown above. A form page will be presented, where you can edit the relevant fields. Chose edit or delete from the bottom of the page.

Note:You can only make changes or delete those calendar entries created by you.

+common->phpgw_footer(); ?> diff --git a/calendar/help/EN/view.php b/calendar/help/EN/view.php index 63b018ed7d..789fb27f95 100755 --- a/calendar/help/EN/view.php +++ b/calendar/help/EN/view.php @@ -31,3 +31,4 @@ Current week is displayed. Start day of week can be set in preferences.

Month:
Default entry is to the current month, viewed in monthly option, with both prior and future months easily accessible with one click.

+common->phpgw_footer(); ?> diff --git a/calendar/help/FI/add.php b/calendar/help/FI/add.php index 8f611dfbc2..da27268488 100644 --- a/calendar/help/FI/add.php +++ b/calendar/help/FI/add.php @@ -46,3 +46,4 @@ T Huomaa: Kuten muidenkin sovellusten kohdalla, voit antaa tiedon käyttöoikeudeksi Yksityinen, Oma ryhmä tai Kaikki.

+common->phpgw_footer(); ?> diff --git a/calendar/help/FI/calendar.php b/calendar/help/FI/calendar.php index e1e1b8797b..4276a1ed03 100644 --- a/calendar/help/FI/calendar.php +++ b/calendar/help/FI/calendar.php @@ -66,3 +66,4 @@ Muokataksesi tapahtumaa napsauta t Näytölle avautuu muokkauslomake. Valitse muokkaa tai poista sivun alareunasta.
Huomaa:Voit muokata ja poistaa vain itse luomiasi tapahtumia.

+common->phpgw_footer(); ?> diff --git a/calendar/help/FI/edit_delete.php b/calendar/help/FI/edit_delete.php index 8713e0cc6a..38db9c1ab5 100644 --- a/calendar/help/FI/edit_delete.php +++ b/calendar/help/FI/edit_delete.php @@ -26,3 +26,4 @@ Muokataksesi tapahtumaa napsauta t Näytölle avautuu muokkauslomake. Valitse muokkaa tai poista sivun alareunasta.

Huomaa:Voit muokata ja poistaa vain itse luomiasi tapahtumia.

+common->phpgw_footer(); ?> diff --git a/calendar/help/FI/view.php b/calendar/help/FI/view.php index 97adfeed4f..773500bea9 100644 --- a/calendar/help/FI/view.php +++ b/calendar/help/FI/view.php @@ -34,3 +34,4 @@ asetuksista.
Kuukausi:
Valittu kuukausi sekä edellinen ja seuraava kuukausi mini-kalentereina. Voit siirtyä päivänäkymään haluamaasi päivää napsauttamalla.

+common->phpgw_footer(); ?> diff --git a/calendar/help/JA/add.php b/calendar/help/JA/add.php index ac478574e9..bf2f1996a5 100755 --- a/calendar/help/JA/add.php +++ b/calendar/help/JA/add.php @@ -9,7 +9,7 @@ * option) any later version. * \**************************************************************************/ - /* $Id: add.php,v 1.1 2001/05/11 02:50:44 skeeter Exp $ */ + /* $Id$ */ $phpgw_flags = Array( 'currentapp' => 'manual' ); @@ -42,3 +42,4 @@ ÉÑÅÙ: ¤Ê¤É¤Î¹àÌܤòÆþÎϤ·¡¢¼Â¹Ô¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Þ¤¹¡£
È÷¹Í: ¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÇÈ÷¤¨¤Æ¤¤¤ë¥¢¥¯¥»¥¹¸¢¡Ê¥×¥é¥¤¥Ù¡¼¥È¡¢¥°¥ë¡¼¥×¡¢¥°¥í¡¼¥Ð¥ë¡Ë¤â¡¢¤³¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÇÈ÷¤¨¤Æ¤¤¤Þ¤¹¡£

+common->phpgw_footer(); ?> diff --git a/calendar/help/JA/calendar.php b/calendar/help/JA/calendar.php index 311c7c966c..40eafe759d 100755 --- a/calendar/help/JA/calendar.php +++ b/calendar/help/JA/calendar.php @@ -9,7 +9,7 @@ * option) any later version. * \**************************************************************************/ - /* $Id: calendar.php,v 1.1 2001/05/11 02:50:44 skeeter Exp $ */ + /* $Id$ */ $phpgw_flags = Array( 'currentapp' => 'manual' @@ -57,3 +57,4 @@ ͽÄê¤òÄûÀµ¤¹¤ë¤¿¤á¤Ë¡¢¤³¤Î¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Þ¤¹¡£ ÄûÀµ¤¹¤ëͽÄ꤬ɽ¼¨¤µ¤ì¡¢ÄûÀµ¤«ºï½ü¤òÁªÂò¤¹¤ë¥Ü¥¿¥ó¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
È÷¹Í:ÄûÀµ¤äºï½ü¤Ï¡¢¼«Ê¬¤ÇºîÀ®¤·¤¿¤â¤Î¤Ë¸Â¤ê¤Þ¤¹¡£

+common->phpgw_footer(); ?> diff --git a/calendar/help/JA/edit_delete.php b/calendar/help/JA/edit_delete.php index bec069bf89..dc1dbe12f6 100755 --- a/calendar/help/JA/edit_delete.php +++ b/calendar/help/JA/edit_delete.php @@ -9,7 +9,7 @@ * option) any later version. * \**************************************************************************/ - /* $Id: edit_delete.php,v 1.1 2001/05/11 02:50:44 skeeter Exp $ */ + /* $Id$ */ $phpgw_flags = Array( 'currentapp' => 'manual' @@ -24,3 +24,4 @@ ͽÄê¤òÄûÀµ¤¹¤ë¤¿¤á¤Ë¡¢¤³¤Î¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Þ¤¹¡£ ÄûÀµ¤¹¤ëͽÄ꤬ɽ¼¨¤µ¤ì¡¢ÄûÀµ¤«ºï½ü¤òÁªÂò¤¹¤ë¥Ü¥¿¥ó¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
È÷¹Í:ÄûÀµ¤äºï½ü¤Ï¡¢¼«Ê¬¤ÇºîÀ®¤·¤¿¤â¤Î¤Ë¸Â¤ê¤Þ¤¹¡£

+common->phpgw_footer(); ?> diff --git a/calendar/help/JA/view.php b/calendar/help/JA/view.php index 2e558d280b..0edab63ae8 100755 --- a/calendar/help/JA/view.php +++ b/calendar/help/JA/view.php @@ -9,7 +9,7 @@ * option) any later version. * \**************************************************************************/ - /* $Id: view.php,v 1.2 2001/05/11 03:00:00 skeeter Exp $ */ + /* $Id$ */ $phpgw_flags = Array( 'currentapp' => 'manual' @@ -30,3 +30,4 @@ ·îñ°Ì¤ÇͽÄê¤òɽ¼¨¤·¤Þ¤¹¡£·î¤Îɽ¼¨¤Ï¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£Àè·î¤äÍâ·î¤Ë¥ï¥ó¥¯¥ê¥Ã¥¯¤Ç¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
º£Ç¯:
ǯñ°Ì¤ÇͽÄê¤òɽ¼¨¤·¤Þ¤¹¡£¾®¤µ¤¤·îñ°Ì¤Î¥«¥ì¥ó¥À¡¼¤ò°ìǯʬɽ¼¨¤·¤Þ¤¹¡£

+common->phpgw_footer(); ?> diff --git a/calendar/help/index.php b/calendar/help/index.php index f033efe69d..295defa14d 100755 --- a/calendar/help/index.php +++ b/calendar/help/index.php @@ -25,3 +25,4 @@ Version:

This app was based on WebCalendar

Transformed by Mark A Peters (Skeeter)
+common->phpgw_footer(); ?> diff --git a/calendar/inc/class.boalarm.inc.php b/calendar/inc/class.boalarm.inc.php index bbb57553c0..afa7dc62a6 100755 --- a/calendar/inc/class.boalarm.inc.php +++ b/calendar/inc/class.boalarm.inc.php @@ -14,6 +14,10 @@ /* $Id$ */ + define('PHPGW_ACL_DELETEALARM',PHPGW_ACL_DELETE); // for now + define('PHPGW_ACL_SETALARM',PHPGW_ACL_WRITE); + define('PHPGW_ACL_READALARM',PHPGW_ACL_READ); + class boalarm { var $so; @@ -26,46 +30,180 @@ // var $debug = True; var $public_functions = array( + 'add' => True, + 'delete' => True ); function boalarm() { - $cal_id = (isset($GLOBALS['HTTP_POST_VARS']['cal_id'])?intval($GLOBALS['HTTP_POST_VARS']['cal_id']):''); + $cal_id = (isset($_POST['cal_id'])?intval($_POST['cal_id']):''); if($cal_id) { $this->cal_id = $cal_id; } - $this->cal = CreateObject('calendar.bocalendar',1); - $this->tz_offset = $this->cal->datetime->tz_offset; + $this->bo = CreateObject('calendar.bocalendar',1); + $this->so = CreateObject('calendar.socalendar',1); + $this->tz_offset = $this->bo->datetime->tz_offset; if($this->debug) { - echo "BO Owner : ".$this->cal->owner."
\n"; + echo "BO Owner : ".$this->bo->owner."
\n"; } - if($this->cal->use_session) + if($this->bo->use_session) { $this->save_sessiondata(); } - } function save_sessiondata() { $data = array( - 'filter' => $this->cal->filter, - 'cat_id' => $this->cal->cat_id, - 'owner' => $this->cal->owner, - 'year' => $this->cal->year, - 'month' => $this->cal->month, - 'day' => $this->cal->day + 'filter' => $this->bo->filter, + 'cat_id' => $this->bo->cat_id, + 'owner' => $this->bo->owner, + 'year' => $this->bo->year, + 'month' => $this->bo->month, + 'day' => $this->bo->day ); - $this->cal->save_sessiondata($data); + $this->bo->save_sessiondata($data); } function read_entry($cal_id) { - return $this->cal->read_entry($cal_id); + return $this->bo->read_entry(intval($cal_id)); + } + + /*! + @function add + @abstract adds a new alarm to an event + @syntax add(&$event,$time,$login_id) + @param &$event event to add the alarm too + @param $time for the alarm in sec before the starttime of the event + @param $login_id user to alarm + @returns the alarm or False + */ + function add(&$event,$time,$owner) + { + if (!$this->check_perms(PHPGW_ACL_SETALARM,$owner) || !($cal_id = $event['id'])) + { + return False; + } + $alarm = Array( + 'time' => ($etime=$this->bo->maketime($event['start'])) - $time, + 'offset' => $time, + 'owner' => $owner, + 'enabled' => 1 + ); + $alarm['id'] = $this->so->save_alarm($cal_id,$alarm); + + $event['alarm'][$alarm['id']] = $alarm; + + return $alarm; + } + + /*! + @function check_perms + @abstract checks if user has a certain grant from the owner of an alarm or event + @syntax check_perms($grant,$owner) + @param $grant PHPGW_ACL_{SET|READ|DELETE}ALARM (defined at the top of this file) + */ + function check_perms($grant,$owner) + { + return $this->bo->check_perms($grant,0,$owner); + } + + /*! + @function participants + @abstract get the participants of an event, the user has grants to alarm + @syntax participants($event,$fullnames=True) + @param $event or cal_id of an event + @param $fullnames if true return array with fullnames as values + @returns array with account_ids as keys + */ + function participants($event,$fullnames=True) + { + if (!is_array($event)) + { + $event = $this->read_entry($event); + } + if (!$event) + { + return False; + } + $participants = array(); + foreach ($event['participants'] as $uid => $status) + { + if ($this->check_perms(PHPGW_ACL_SETALARM,$uid)) + { + $participants[$uid] = $fullnames ? $GLOBALS['phpgw']->common->grab_owner_name($uid) : True; + } + } + return $participants; + } + + /*! + @function enable + @abstract enable or disable one or more alarms identified by its ids + @syntax enable($ids,$enable=True) + @param $ids array with alarm ids as keys (!) + @returns the number of alarms enabled or -1 for insuficent permission to do so + @note Not found alarms or insuficent perms stop the enableing of multiple alarms + */ + function enable($alarms,$enable=True) + { + $enabled = 0; + foreach ($alarms as $id => $field) + { + if (!($alarm = $this->so->read_alarm($id))) + { + return 0; // alarm not found + } + if (!$alarm['enabled'] == !$enable) + { + continue; // nothing to do + } + if ($enable && !$this->check_perms(PHPGW_ACL_SETALARM,$alarm['owner']) || + !$enable && !$this->check_perms(PHPGW_ACL_DELETEALARM,$alarm['owner'])) + { + return -1; + } + $alarm['enabled'] = intval(!$alarm['enabled']); + if ($this->so->save_alarm($alarm['cal_id'],$alarm)) + { + ++$enabled; + } + } + return $enabled; + } + + /*! + @function delete + @abstract delete one or more alarms identified by its ids + @syntax delete($ids) + @param $ids array with alarm ids as keys (!) + @returns the number of alarms deleted or -1 for insuficent permission to do so + @note Not found alarms or insuficent perms stop the deleting of multiple alarms + */ + function delete($alarms) + { + $deleted = 0; + foreach ($alarms as $id => $field) + { + if (!($alarm = $this->so->read_alarm($id))) + { + return 0; // alarm not found + } + if (!$this->check_perms(PHPGW_ACL_DELETEALARM,$alarm['owner'])) + { + return -1; + } + if ($this->so->delete_alarm($id)) + { + ++$deleted; + } + } + return $deleted; } - /* Public functions */ } +?> diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index 1ee04144f5..a1c78bb057 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -17,15 +17,16 @@ class bocalendar { var $public_functions = Array( - 'read_entry' => True, - 'delete_entry' => True, - 'delete_calendar' => True, - 'change_owner' => True, - 'update' => True, - 'preferences' => True, - 'store_to_cache' => True, - 'export_event' => True, - 'reinstate' => True + 'read_entry' => True, + 'delete_entry' => True, + 'delete_calendar' => True, + 'change_owner' => True, + 'update' => True, + 'check_set_default_prefs' => True, + 'store_to_cache' => True, + 'export_event' => True, + 'send_alarm' => True, + 'reinstate' => True ); var $soap_functions = Array( @@ -92,7 +93,7 @@ ); var $debug = False; - var $debug = True; +// var $debug = True; var $so; var $cached_events; @@ -117,24 +118,38 @@ var $modified; var $deleted; var $added; + var $is_group = False; + var $soap = False; + var $use_session = False; + var $today; + var $debug_string; var $sortby; var $num_months; function bocalendar($session=0) { + $this->cat = CreateObject('phpgwapi.categories'); $this->grants = $GLOBALS['phpgw']->acl->get_grants('calendar'); @reset($this->grants); - while(list($grantor,$rights) = each($this->grants)) + if(DEBUG_APP) { - print_debug('Grantor',$grantor); - print_debug('Rights',$rights); + if(floor(phpversion()) >= 4) + { + $this->debug_string = ''; + ob_start(); + } + + foreach($this->grants as $grantor => $rights) + { + print_debug('Grantor',$grantor); + print_debug('Rights',$rights); + } } - @reset($this->grants); print_debug('Read use_session',$session); @@ -147,15 +162,14 @@ print_debug('Owner',$this->owner); $this->prefs['calendar'] = $GLOBALS['phpgw_info']['user']['preferences']['calendar']; + $this->check_set_default_prefs(); - $owner = (isset($GLOBALS['owner'])?$GLOBALS['owner']:''); - $owner = (isset($GLOBALS['HTTP_GET_VARS']['owner'])?$GLOBALS['HTTP_GET_VARS']['owner']:$owner); - $owner = ($owner=='' && isset($GLOBALS['HTTP_POST_VARS']['owner'])?$GLOBALS['HTTP_POST_VARS']['owner']:$owner); + $owner = get_var('owner',array('GET','POST'),$GLOBALS['owner']); - ereg('menuaction=([a-zA-Z.]+)',$GLOBALS['HTTP_REFERER'],$regs); + ereg('menuaction=([a-zA-Z.]+)',$_SERVER['HTTP_REFERER'],$regs); $from = $regs[1]; - if ((substr($GLOBALS['PHP_SELF'],-8) == 'home.php' && substr($this->prefs['calendar']['defaultcalendar'],0,7) == 'planner' - || $GLOBALS['HTTP_GET_VARS']['menuaction'] == 'calendar.uicalendar.planner' && + if ((substr($_SERVER['PHP_SELF'],-8) == 'home.php' && substr($this->prefs['calendar']['defaultcalendar'],0,7) == 'planner' + || $_GET['menuaction'] == 'calendar.uicalendar.planner' && $from != 'calendar.uicalendar.planner' && !$this->save_owner) && intval($this->prefs['calendar']['planner_start_with_group']) > 0) { @@ -164,12 +178,12 @@ $this->save_owner = $this->owner; $owner = 'g_'.$this->prefs['calendar']['planner_start_with_group']; } - elseif ($GLOBALS['HTTP_GET_VARS']['menuaction'] != 'calendar.uicalendar.planner' && + elseif ($_GET['menuaction'] != 'calendar.uicalendar.planner' && $this->save_owner) { // leaving planner with an unchanged user/owner ==> setting owner back to save_owner // - $owner = intval(isset($GLOBALS['HTTP_GET_VARS']['owner']) ? $GLOBALS['HTTP_GET_VARS']['owner'] : $this->save_owner); + $owner = intval(isset($_GET['owner']) ? $_GET['owner'] : $this->save_owner); unset($this->save_owner); } elseif (!empty($owner) && $owner != $this->owner && $from == 'calendar.uicalendar.planner') @@ -208,12 +222,21 @@ } $this->holiday_color = (substr($GLOBALS['phpgw_info']['theme']['bg07'],0,1)=='#'?'':'#').$GLOBALS['phpgw_info']['theme']['bg07']; - $this->printer_friendly = (intval(get_var('friendly',Array('GET','POST','DEFAULT'),0)) == 1?True:False); + $friendly = (isset($_GET['friendly'])?$_GET['friendly']:''); + $friendly = ($friendly=='' && isset($_POST['friendly'])?$_POST['friendly']:$friendly); - $this->filter = get_var('filter',Array('POST','DEFAULT'),' '.$this->prefs['calendar']['defaultfilter'].' '); + $this->printer_friendly = (intval($friendly) == 1?True:False); - $this->sortby = get_var('sortby',Array('POST'),$this->sortby); - if(empty($this->sortby)) + if(isset($_POST['filter'])) { $this->filter = $_POST['filter']; } + if(isset($_POST['sortby'])) { $this->sortby = $_POST['sortby']; } + if(isset($_POST['cat_id'])) { $this->cat_id = $_POST['cat_id']; } + + if(!isset($this->filter)) + { + $this->filter = ' '.$this->prefs['calendar']['defaultfilter'].' '; + } + + if(!isset($this->sortby)) { $this->sortby = $this->prefs['calendar']['defaultcalendar'] == 'planner_user' ? 'user' : 'category'; } @@ -223,24 +246,61 @@ $this->filter = ' all '; } - $this->cat_id = get_var('cat_id',Array('POST')); - $this->so = CreateObject('calendar.socalendar', Array( 'owner' => $this->owner, - 'filter' => $this->filter, + 'filter' => $this->filter, 'category' => $this->cat_id, 'g_owner' => $this->g_owner ) ); + $this->rpt_day = array( // need to be after creation of socalendar + MCAL_M_SUNDAY => 'Sunday', + MCAL_M_MONDAY => 'Monday', + MCAL_M_TUESDAY => 'Tuesday', + MCAL_M_WEDNESDAY => 'Wednesday', + MCAL_M_THURSDAY => 'Thursday', + MCAL_M_FRIDAY => 'Friday', + MCAL_M_SATURDAY => 'Saturday' + ); + if($this->bo->prefs['calendar']['weekdaystarts'] != 'Sunday') + { + $mcals = array_keys($this->rpt_day); + $days = array_values($this->rpt_day); + $this->rpt_day = array(); + list($n) = $found = array_keys($days,$this->prefs['calendar']['weekdaystarts']); + for ($i = 0; $i < 7; ++$i,++$n) + { + $this->rpt_day[$mcals[$n % 7]] = $days[$n % 7]; + } + } + $this->rpt_type = Array( + MCAL_RECUR_NONE => 'None', + MCAL_RECUR_DAILY => 'Daily', + MCAL_RECUR_WEEKLY => 'Weekly', + MCAL_RECUR_MONTHLY_WDAY => 'Monthly (by day)', + MCAL_RECUR_MONTHLY_MDAY => 'Monthly (by date)', + MCAL_RECUR_YEARLY => 'Yearly' + ); + $localtime = $GLOBALS['phpgw']->datetime->users_localtime; - $date = get_var('date',Array('GET','POST','GLOBAL')); - $year = get_var('year',Array('GET','POST')); - $month = get_var('month',Array('GET','POST')); - $day = get_var('day',Array('GET','POST')); - $num_months = get_var('num_months',Array('GET','POST')); - + $date = (isset($GLOBALS['date'])?$GLOBALS['date']:''); + $date = (isset($_GET['date'])?$_GET['date']:$date); + $date = ($date=='' && isset($_POST['date'])?$_POST['date']:$date); + + $year = (isset($_GET['year'])?$_GET['year']:''); + $year = ($year=='' && isset($_POST['year'])?$_POST['year']:$year); + + $month = (isset($_GET['month'])?$_GET['month']:''); + $month = ($month=='' && isset($_POST['month'])?$_POST['month']:$month); + + $day = (isset($_GET['day'])?$_GET['day']:''); + $day = ($day=='' && isset($_POST['day'])?$_POST['day']:''); + + $num_months = (isset($_GET['num_months'])?$_GET['num_months']:''); + $num_months = ($num_months=='' && isset($_POST['num_months'])?$_POST['num_months']:$num_months); + if(isset($date) && $date!='') { $this->year = intval(substr($date,0,4)); @@ -255,7 +315,7 @@ } else { - $this->year = date('Y',$GLOBALS['phpgw']->datetime->users_localtime); + $this->year = date('Y',$localtime); } if(isset($month) && $month!='') { @@ -263,7 +323,7 @@ } else { - $this->month = date('m',$GLOBALS['phpgw']->datetime->users_localtime); + $this->month = date('m',$localtime); } if(isset($day) && $day!='') { @@ -271,7 +331,7 @@ } else { - $this->day = date('d',$GLOBALS['phpgw']->datetime->users_localtime); + $this->day = date('d',$localtime); } } @@ -284,11 +344,19 @@ $this->num_months = 1; } - $this->today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); - print_debug('BO Filter','('.$this->filter.')'); - print_debug('Owner',$this->owner); + if(DEBUG_APP) + { + print_debug('BO Filter','('.$this->filter.')'); + print_debug('Owner',$this->owner); + print_debug('Today',$this->today); + if(floor(phpversion()) >= 4) + { + $this->debug_string .= ob_get_contents(); + ob_end_clean(); + } + } } function list_methods($_type='xmlrpc') @@ -365,6 +433,7 @@ function set_owner_to_group($owner) { + print_debug('calendar::bocalendar::set_owner_to_group:owner',$owner); $this->owner = intval($owner); $this->is_group = True; settype($this->g_owner,'array'); @@ -410,7 +479,19 @@ 'return_to' => $this->return_to ); } - print_debug('Save',_debug_array($data,False)); + if($this->debug) + { + if(floor(phpversion()) >= 4) + { + ob_start(); + } + echo ''."\n"; + if(floor(phpversion()) >= 4) + { + $this->debug_string .= ob_get_contents(); + ob_end_clean(); + } + } $GLOBALS['phpgw']->session->appsession('session_data','calendar',$data); } } @@ -453,12 +534,13 @@ { $temp_event = $this->get_cached_event(); $event = $this->read_entry(intval($param['id'])); - +// if($this->owner == $event['owner']) +// { $exception_time = mktime($event['start']['hour'],$event['start']['min'],0,$param['month'],$param['day'],$param['year']) - $GLOBALS['phpgw']->datetime->tz_offset; $event['recur_exception'][] = intval($exception_time); $this->so->cal->event = $event; - print_debug('exception time',$event['recur_exception'][count($event['recur_exception']) -1]); - print_debug('count event exceptions',count($event['recur_exception'])); +// print_debug('exception time',$event['recur_exception'][count($event['recur_exception']) -1]); +// print_debug('count event exceptions',count($event['recur_exception'])); $this->so->add_entry($event); $cd = 16; @@ -477,6 +559,9 @@ { if($this->check_perms(PHPGW_ACL_DELETE,$id)) { +// $temp_event = $this->read_entry($id); +// if($this->owner == $temp_event['owner']) +// { $this->so->delete_entry($id); $cd = 16; } @@ -484,6 +569,7 @@ { $cd = 60; } +// } return $cd; } @@ -502,7 +588,7 @@ print_debug('exception time',$event['recur_exception'][intval($value)]); unset($event['recur_exception'][intval($value)]); print_debug('count event exceptions',count($event['recur_exception'])); - } + } } else { @@ -560,17 +646,39 @@ function search_keywords($keywords) { - return $this->so->list_events_keyword($keywords); + $type = $GLOBALS['phpgw']->accounts->get_type($this->owner); + + if($type == 'g') + { + $members = $GLOBALS['phpgw']->acl->get_ids_for_location($this->owner, 1, 'phpgw_group'); + } + else + { + $members = array_keys($this->grants); + + if (!in_array($this->owner,$members)) + { + $members[] = $this->owner; + } + } + foreach($members as $n => $uid) + { + if (!($this->grants[$uid] & PHPGW_ACL_READ)) + { + unset($members[$n]); + } + } + return $this->so->list_events_keyword($keywords,$members); } function update($params='') { - $l_cal = (@isset($params['cal']) && $params['cal']?$params['cal']:$GLOBALS['HTTP_POST_VARS']['cal']); - $l_participants = (@$params['participants']?$params['participants']:$GLOBALS['HTTP_POST_VARS']['participants']); - $l_categories = (@$params['categories']?$params['categories']:$GLOBALS['HTTP_POST_VARS']['categories']); - $l_start = (@isset($params['start']) && $params['start']?$params['start']:$GLOBALS['HTTP_POST_VARS']['start']); - $l_end = (@isset($params['end']) && $params['end']?$params['end']:$GLOBALS['HTTP_POST_VARS']['end']); - $l_recur_enddate = (@isset($params['recur_enddate']) && $params['recur_enddate']?$params['recur_enddate']:$GLOBALS['HTTP_POST_VARS']['recur_enddate']); + $l_cal = (@isset($params['cal']) && $params['cal']?$params['cal']:$_POST['cal']); + $l_participants = (@$params['participants']?$params['participants']:$_POST['participants']); + $l_categories = (@$params['categories']?$params['categories']:$_POST['categories']); + $l_start = (@isset($params['start']) && $params['start']?$params['start']:$_POST['start']); + $l_end = (@isset($params['end']) && $params['end']?$params['end']:$_POST['end']); + $l_recur_enddate = (@isset($params['recur_enddate']) && $params['recur_enddate']?$params['recur_enddate']:$_POST['recur_enddate']); $send_to_ui = True; if($this->debug) @@ -581,10 +689,10 @@ { $send_to_ui = False; } - + print_debug('ID',$l_cal['id']); - if(get_var('readsess',Array('GET'))) + if(isset($_GET['readsess'])) { $event = $this->restore_from_appsession(); $event['title'] = stripslashes($event['title']); @@ -598,7 +706,7 @@ 'readsess' => 1 ) ); - exit; + $GLOBALS['phpgw']->common->phpgw_exit(True); } $overlapping_events = False; } @@ -607,11 +715,10 @@ if((!$l_cal['id'] && !$this->check_perms(PHPGW_ACL_ADD)) || ($l_cal['id'] && !$this->check_perms(PHPGW_ACL_EDIT,$l_cal['id']))) { ExecMethod('calendar.uicalendar.index'); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } - print_debug('prior to fix_update_time()'); + print_debug('Prior to fix_update_time()'); $this->fix_update_time($l_start); $this->fix_update_time($l_end); @@ -654,6 +761,10 @@ $l_recur_enddate['month'] = 0; $l_recur_enddate['mday'] = 0; } + elseif (isset($l_recur_enddate['str'])) + { + $l_recur_enddate = $this->jscal->input2date($l_recur_enddate['str'],False,'mday'); + } switch(intval($l_cal['recur_type'])) { @@ -665,6 +776,13 @@ break; case MCAL_RECUR_WEEKLY: $l_cal['recur_data'] = intval($l_cal['rpt_sun']) + intval($l_cal['rpt_mon']) + intval($l_cal['rpt_tue']) + intval($l_cal['rpt_wed']) + intval($l_cal['rpt_thu']) + intval($l_cal['rpt_fri']) + intval($l_cal['rpt_sat']); + if (is_array($l_cal['rpt_day'])) + { + foreach ($l_cal['rpt_day'] as $mask) + { + $l_cal['recur_data'] |= intval($mask); + } + } $this->so->set_recur_weekly(intval($l_recur_enddate['year']),intval($l_recur_enddate['month']),intval($l_recur_enddate['mday']),intval($l_cal['recur_interval']),$l_cal['recur_data']); break; case MCAL_RECUR_MONTHLY_MDAY: @@ -748,15 +866,48 @@ $this->so->add_attribute('owner',$l_cal['owner']); } $this->so->add_attribute('priority',$l_cal['priority']); + + foreach($l_cal as $name => $value) + { + if ($name[0] == '#') // Custom field + { + $this->so->add_attribute($name,stripslashes($value)); + } + } + if (isset($_POST['preserved']) && is_array($preserved = unserialize(stripslashes($_POST['preserved'])))) + { + foreach($preserved as $name => $value) + { + switch($name) + { + case 'owner': + $this->so->add_attribute('participants',$value,$l_cal['owner']); + break; + default: + $this->so->add_attribute($name,str_replace(array('&','"','<','>'),array('&','"','<','>'),$value)); + } + } + } $event = $this->get_cached_event(); - $event['title'] = $GLOBALS['phpgw']->db->db_addslashes($event['title']); - $event['description'] = $GLOBALS['phpgw']->db->db_addslashes($event['description']); + if ($l_cal['alarmdays'] > 0 || $l_cal['alarmhours'] > 0 || + $l_cal['alarmminutes'] > 0) + { + $time = $this->maketime($event['start']) - + ($l_cal['alarmdays'] * 24 * 3600) - + ($l_cal['alarmhours'] * 3600) - + ($l_cal['alarmminutes'] * 60); + + $event['alarm'][] = Array( + 'time' => $time, + 'owner' => $this->owner, + 'enabled' => 1 + ); + } + $this->store_to_appsession($event); $datetime_check = $this->validate_update($event); - - print_debug('bo->validate_update() returnval',$datetime_check); - + print_debug('bo->validated_update() returnval',$datetime_check); if($datetime_check) { ExecMethod('calendar.uicalendar.edit', @@ -765,7 +916,7 @@ 'readsess' => 1 ) ); - exit; + $GLOBALS['phpgw']->common->phpgw_exit(True); } if($event['id']) @@ -785,7 +936,6 @@ $event_ids ); } - if($overlapping_events) { if($send_to_ui) @@ -798,7 +948,7 @@ 'this_event' => $event ) ); - exit; + $GLOBALS['phpgw']->common->phpgw_exit(True); } else { @@ -809,7 +959,6 @@ { if(!$event['id']) { - print_debug('Creating a new event.'); $this->so->cal->event = $event; $this->so->add_entry($event); $this->send_update(MSG_ADDED,$event['participants'],'',$this->get_cached_event()); @@ -817,12 +966,12 @@ } else { - print_debug('Updating an existing event.'); + print_debug('Updating Event ID',$event['id']); $new_event = $event; $old_event = $this->read_entry($event['id']); - $this->prepare_recipients($new_event,$old_event); $this->so->cal->event = $event; $this->so->add_entry($event); + $this->prepare_recipients($new_event,$old_event); } $date = sprintf("%04d%02d%02d",$event['start']['year'],$event['start']['month'],$event['start']['mday']); if($send_to_ui) @@ -830,12 +979,11 @@ $this->read_sessiondata(); if ($this->return_to) { - header('Location: '.$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->return_to)); + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->return_to); $GLOBALS['phpgw']->common->phpgw_exit(); } Execmethod('calendar.uicalendar.index'); -// $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; -// exit; +// $GLOBALS['phpgw']->common->phpgw_exit(); } } } @@ -922,6 +1070,15 @@ function fix_update_time(&$time_param) { + if (isset($time_param['str'])) + { + if (!is_object($this->jscal)) + { + $this->jscal = CreateObject('phpgwapi.jscalendar'); + } + $time_param += $this->jscal->input2date($time_param['str'],False,'mday'); + unset($time_param['str']); + } if ($this->prefs['common']['timeformat'] == '12') { if ($time_param['ampm'] == 'pm') @@ -976,6 +1133,25 @@ return $error; } + /*! + @function participants_not_rejected($participants,$event) + @abstract checks if any of the $particpants participates in $event and has not rejected it + */ + function participants_not_rejected($participants,$event) + { + //echo "participants_not_rejected()
participants =

"; print_r($participants); echo "

event[participants]=
"; print_r($event['participants']); echo "
\n"; + foreach($participants as $uid => $status) + { + //echo "testing event[participants][uid=$uid] = '".$event['participants'][$uid]."'
\n"; + if (isset($event['participants'][$uid]) && $event['participants'][$uid] != 'R' && + $status != 'R') + { + return True; // found not rejected participant in event + } + } + return False; + } + function overlap($starttime,$endtime,$participants,$owner=0,$id=0,$restore_cache=False) { // $retval = Array(); @@ -988,6 +1164,10 @@ $temp_cache_events = $this->cached_events; } +// $temp_start = intval($GLOBALS['phpgw']->common->show_date($starttime,'Ymd')); +// $temp_start_time = intval($GLOBALS['phpgw']->common->show_date($starttime,'Hi')); +// $temp_end = intval($GLOBALS['phpgw']->common->show_date($endtime,'Ymd')); +// $temp_end_time = intval($GLOBALS['phpgw']->common->show_date($endtime,'Hi')); $temp_start = intval(date('Ymd',$starttime)); $temp_start_time = intval(date('Hi',$starttime)); $temp_end = intval(date('Ymd',$endtime)); @@ -1070,10 +1250,17 @@ $temp_event_start = sprintf("%d%02d",$event['start']['hour'],$event['start']['min']); $temp_event_end = sprintf("%d%02d",$event['end']['hour'],$event['end']['min']); // if((($temp_start_time <= $temp_event_start) && ($temp_end_time >= $temp_event_start) && ($temp_end_time <= $temp_event_end)) || - if((($temp_start_time <= $temp_event_start) && ($temp_end_time > $temp_event_start) && ($temp_end_time <= $temp_event_end)) || - (($temp_start_time >= $temp_event_start) && ($temp_start_time < $temp_event_end) && ($temp_end_time >= $temp_event_end)) || - (($temp_start_time <= $temp_event_start) && ($temp_end_time >= $temp_event_end)) || - (($temp_start_time >= $temp_event_start) && ($temp_end_time <= $temp_event_end))) + if(($temp_start_time <= $temp_event_start && + $temp_end_time > $temp_event_start && + $temp_end_time <= $temp_event_end || + $temp_start_time >= $temp_event_start && + $temp_start_time < $temp_event_end && + $temp_end_time >= $temp_event_end || + $temp_start_time <= $temp_event_start && + $temp_end_time >= $temp_event_end || + $temp_start_time >= $temp_event_start && + $temp_end_time <= $temp_event_end) && + $this->participants_not_rejected($participants,$event)) { if($this->debug) { @@ -1111,6 +1298,8 @@ @param $needed necessary ACL right: PHPGW_ACL_{READ|EDIT|DELETE} @param $event event as array or the event-id or 0 for general check @param $other uid to check (if event==0) or 0 to check against $this->owner + @note Participating in an event is considered as haveing read-access on that event, \ + even if you have no general read-grant from that user. */ function check_perms($needed,$event=0,$other=0) { @@ -1133,6 +1322,20 @@ } $user = $GLOBALS['phpgw_info']['user']['account_id']; $grants = $this->grants[$owner]; + + if (is_array($event) && $needed == PHPGW_ACL_READ) + { + // Check if the $user is one of the participants or has a read-grant from one of them + // + foreach($event['participants'] as $uid => $accept) + { + if ($this->grants[$uid] & PHPGW_ACL_READ || $uid == $user) + { + $grants |= PHPGW_ACL_READ; + break; + } + } + } if ($GLOBALS['phpgw']->accounts->get_type($owner) == 'g' && $needed == PHPGW_ACL_ADD) { @@ -1142,25 +1345,11 @@ { $access = $user == $owner || $grants & $needed && (!$private || $grants & PHPGW_ACL_PRIVATE); } + //echo "

rb_check_perms for user $user and needed_acl $needed: event=$event[title]: owner=$owner, privat=$private, grants=$grants ==> access=$access

\n"; return $access; } - function get_fullname($accountid) - { - $account_id = get_account_id($accountid); - if($GLOBALS['phpgw']->accounts->exists($account_id) == False) - { - return False; - } - $GLOBALS['phpgw']->accounts->get_account_name($account_id,$lid,$fname,$lname); - $fullname = $lid; - if($lname && $fname) - { - $fullname = $lname.', '.$fname; - } - return $fullname; - } function display_status($user_status) { @@ -1249,6 +1438,18 @@ function long_date($first,$last=0) { + if (!is_array($first)) + { + $first = $this->time2array($raw = $first); + $first['raw'] = $raw; + $first['day'] = $first['mday']; + } + if ($last && !is_array($last)) + { + $last = $this->time2array($raw = $last); + $last['raw'] = $raw; + $last['day'] = $last['mday']; + } $datefmt = $this->prefs['common']['dateformat']; $month_before_day = $datefmt[0] == 'm' || $datefmt[2] == 'm' && $datefmt[4] == 'd'; @@ -1397,9 +1598,10 @@ $event_time = mktime($event['start']['hour'],$event['start']['min'],0,intval(substr($date,4,2)),intval(substr($date,6,2)),intval(substr($date,0,4))) - $GLOBALS['phpgw']->datetime->tz_offset; while($inserted == False && list($key,$exception_time) = each($event['recur_exception'])) { - print_debug('Checking Exception DateTime',$exception_time); - print_debug('Checking Event DateTime',$event_time); - + if($this->debug) + { + echo ''."\n"; + } if($exception_time == $event_time) { $inserted = True; @@ -1408,22 +1610,29 @@ } if($this->cached_events[$date] && $inserted == False) { - - print_debug('Cached Events Found',$date); - + + if($this->debug) + { + echo ''."\n"; + } $year = substr($date,0,4); $month = substr($date,4,2); $day = substr($date,6,2); - print_debug('Date',$date); - print_debug('Count',count($this->cached_events[$date])); + if($this->debug) + { + echo ''."\n"; + } for($i=0;$icached_events[$date]);$i++) { $events = $this->cached_events[$date][$i]; if($this->cached_events[$date][$i]['id'] == $event['id'] || $this->cached_events[$date][$i]['reference'] == $event['id']) { - print_debug('Item Already Inserted!'); + if($this->debug) + { + echo ''."\n"; + } $inserted = True; break; } @@ -1441,7 +1650,10 @@ { $this->cached_events[$date][$j] = $this->cached_events[$date][$j-1]; } - print_debug('Adding to cached events:ID',$event['id']); + if($this->debug) + { + echo ''."\n"; + } $inserted = True; $this->cached_events[$date][$i] = $event; break; @@ -1450,7 +1662,10 @@ } if(!$inserted) { - print_debug('Adding to cached events:ID',$event['id']); + if($this->debug) + { + echo ''."\n"; + } $this->cached_events[$date][] = $event; } } @@ -1464,9 +1679,10 @@ $search_date_day = date('d',$datetime); $search_date_dow = date('w',$datetime); $search_beg_day = mktime(0,0,0,$search_date_month,$search_date_day,$search_date_year); - - print_debug('Search Date Full',$search_date_full); - + if($this->debug) + { + echo ''."\n"; + } $repeated = $this->repeating_events; $r_events = count($repeated); for ($i=0;$i<$r_events;$i++) @@ -1485,9 +1701,12 @@ $end_recur_date = date('Ymd',$event_recur_time); $full_event_date = date('Ymd',$event_beg_day); - print_debug('check_repeating_events:Processing ID',$id); - print_debug('check_repeating_events:Recurring End Date',$end_recur_date); - + if($this->debug) + { + echo ''."\n"; + echo ''."\n"; + } + // only repeat after the beginning, and if there is an rpt_end before the end date if (($search_date_full > $end_recur_date) || ($search_date_full < $full_event_date)) { @@ -1601,6 +1820,7 @@ { return False; } + $syear = $params['syear']; $smonth = $params['smonth']; $sday = $params['sday']; @@ -1612,7 +1832,10 @@ { unset($owner_id); $owner_id = $this->g_owner; - print_debug('owner_id in','('.implode(',',$owner_id).')'); + if($this->debug) + { + echo ''."\n"; + } } if(!$eyear && !$emonth && !$eday) @@ -1643,9 +1866,12 @@ } $edate = mktime(23,59,59,$emonth,$eday,$eyear); } - - print_debug('Start Date',sprintf("%04d%02d%02d",$syear,$smonth,$sday)); - print_debug('End Date',sprintf("%04d%02d%02d",$eyear,$emonth,$eday)); + + if($this->debug) + { + echo ''."\n"; + echo ''."\n"; + } if($owner_id) { @@ -1657,14 +1883,18 @@ $cached_event_ids = $this->so->list_events($syear,$smonth,$sday,$eyear,$emonth,$eday); $cached_event_ids_repeating = $this->so->list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday); } + $c_cached_ids = count($cached_event_ids); $c_cached_ids_repeating = count($cached_event_ids_repeating); - print_debug('Date',sprintf("%04d%02d%02d",$syear,$smonth,$sday)); - print_debug('Events Cached',$c_cached_ids); - print_debug('Repeating Events Cached',$c_cached_ids_repeating); + + if($this->debug) + { + echo ''."\n"; + echo ''."\n"; + } $this->cached_events = Array(); - + if($c_cached_ids == 0 && $c_cached_ids_repeating == 0) { return; @@ -1690,11 +1920,16 @@ { $c_evt_day = 0; } - print_debug('Date',$j); - print_debug('Count',$c_evt_day); + if($this->debug) + { + echo ''."\n"; + } if($this->cached_events[$j][$c_evt_day]['id'] != $event['id']) { - print_debug('Adding Event For Date',$j); + if($this->debug) + { + echo ''."\n"; + } $this->cached_events[$j][] = $event; } } @@ -1843,7 +2078,7 @@ } /* End of SO functions */ - function prepare_matrix($interval,$increment,$part,$status,$fulldate) + function prepare_matrix($interval,$increment,$part,$fulldate) { for($h=0;$h<24;$h++) { @@ -1854,9 +2089,12 @@ $time_slice[$index]['description'] = ''; } } - for($k=0;$kcached_events[$fulldate]);$k++) + foreach($this->cached_events[$fulldate] as $event) { - $event = $this->cached_events[$fulldate][$k]; + if ($event['participants'][$part] == 'R') + { + continue; // dont show rejected invitations, as they are free time + } $eventstart = $GLOBALS['phpgw']->datetime->localdates($this->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset); $eventend = $GLOBALS['phpgw']->datetime->localdates($this->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset); $start = ($eventstart['hour'] * 10000) + ($eventstart['minute'] * 100); @@ -1885,68 +2123,137 @@ $end += $addminute; $starttemp = $this->splittime("$start",False); $endtemp = $this->splittime("$end",False); -// Do not display All-Day events in this free/busy time - if((($starttemp['hour'] == 0) && ($starttemp['minute'] == 0)) && (($endtemp['hour'] == 23) && ($endtemp['minute'] == 59))) + + for($h=$starttemp['hour'];$h<=$endtemp['hour'];$h++) { - } - else - { - for($h=$starttemp['hour'];$h<=$endtemp['hour'];$h++) + $startminute = 0; + $endminute = $interval; + $hour = $h * 10000; + if($h == intval($starttemp['hour'])) { - $startminute = 0; - $endminute = $interval; - $hour = $h * 10000; - if($h == intval($starttemp['hour'])) - { - $startminute = ($starttemp['minute'] / $increment); - } - if($h == intval($endtemp['hour'])) - { - $endminute = ($endtemp['minute'] / $increment); - } - $private = $this->is_private($event,$part); - $time_display = $GLOBALS['phpgw']->common->show_date($eventstart['raw'],$this->users_timeformat).'-'.$GLOBALS['phpgw']->common->show_date($eventend['raw'],$this->users_timeformat); - $time_description = '('.$time_display.') '.$this->get_short_field($event,$private,'title').$this->display_status($event['participants'][$part]); - for($m=$startminute;$m<=$endminute;$m++) - { - $index = ($hour + (($m * $increment) * 100)); - $time_slice[$index]['marker'] = '-'; - $time_slice[$index]['description'] = $time_description; - } + $startminute = ($starttemp['minute'] / $increment); + } + if($h == intval($endtemp['hour'])) + { + $endminute = ($endtemp['minute'] / $increment); + } + $private = $this->is_private($event,$part); + $time_display = $GLOBALS['phpgw']->common->show_date($eventstart['raw'],$this->users_timeformat).'-'.$GLOBALS['phpgw']->common->show_date($eventend['raw'],$this->users_timeformat); + $time_description = '('.$time_display.') '.$this->get_short_field($event,$private,'title').$this->display_status($event['participants'][$part]); + for($m=$startminute;$m<$endminute;$m++) + { + $index = ($hour + (($m * $increment) * 100)); + $time_slice[$index]['marker'] = '-'; + $time_slice[$index]['description'] = $time_description; + $time_slice[$index]['id'] = $event['id']; } } } return $time_slice; } + /*! + @function set_status + @abstract set the participant response $status for event $cal_id and notifies the owner of the event + */ function set_status($cal_id,$status) { - $old_event = $this->so->read_entry($cal_id); - switch($status) + $status2msg = array( + REJECTED => MSG_REJECTED, + TENTATIVE => MSG_TENTATIVE, + ACCEPTED => MSG_ACCEPTED + ); + if (!isset($status2msg[$status])) { - case REJECTED: - $this->send_update(MSG_REJECTED,$old_event['participants'],$old_event); - $this->so->set_status($cal_id,$status); - break; - case TENTATIVE: - $this->send_update(MSG_TENTATIVE,$old_event['participants'],$old_event); - $this->so->set_status($cal_id,$status); - break; - case ACCEPTED: - $this->send_update(MSG_ACCEPTED,$old_event['participants'],$old_event); - $this->so->set_status($cal_id,$status); - break; + return False; } + $this->so->set_status($cal_id,$status); + $event = $this->so->read_entry($cal_id); + $this->send_update($status2msg[$status],$event['participants'],$event); + return True; } - function send_update($msg_type,$participants,$old_event=False,$new_event=False) + /*! + @function update_requested + @abstract checks if $userid has requested (in $part_prefs) updates for $msg_type + @syntax update_requested($userid,$part_prefs,$msg_type,$old_event,$new_event) + @param $userid numerical user-id + @param $part_prefs preferces of the user $userid + @param $msg_type type of the notification: MSG_ADDED, MSG_MODIFIED, MSG_ACCEPTED, ... + @param $old_event Event before the change + @param $new_event Event after the change + @returns 0 = no update requested, > 0 update requested + */ + function update_requested($userid,$part_prefs,$msg_type,$old_event,$new_event) { - $db = $GLOBALS['phpgw']->db; - $db->query("SELECT app_version FROM phpgw_applications WHERE app_name='calendar'",__LINE__,__FILE__); - $db->next_record(); - $version = $db->f('app_version'); - unset($db); + if ($msg_type == MSG_ALARM) + { + return True; // always True for now + } + $want_update = 0; + + // the following switch fall-through all cases, as each included the following too + // + $msg_is_response = $msg_type == MSG_REJECTED || $msg_type == MSG_ACCEPTED || $msg_type == MSG_TENTATIVE; + + switch($ru = $part_prefs['calendar']['receive_updates']) + { + case 'responses': + if ($msg_is_response) + { + ++$want_update; + } + case 'modifications': + if ($msg_type == MSG_MODIFIED) + { + ++$want_update; + } + case 'time_change_4h': + case 'time_change': + $diff = max(abs($this->maketime($old_event['start'])-$this->maketime($new_event['start'])), + abs($this->maketime($old_event['end'])-$this->maketime($new_event['end']))); + $check = $ru == 'time_change_4h' ? 4 * 60 * 60 - 1 : 0; + if ($msg_type == MSG_MODIFIED && $diff > $check) + { + ++$want_update; + } + case 'add_cancel': + if ($old_event['owner'] == $userid && $msg_is_response || + $msg_type == MSG_DELETED || $msg_type == MSG_ADDED) + { + ++$want_update; + } + break; + case 'no': + break; + } + //echo "

bocalendar::update_requested(user=$userid,pref=".$part_prefs['calendar']['receive_updates'] .",msg_type=$msg_type,".($old_event?$old_event['title']:'False').",".($old_event?$old_event['title']:'False').") = $want_update

\n"; + return $want_update > 0; + } + + /*! + @function send_update + @abstract sends update-messages to certain participants of an event + @syntax send_update($msg_type,$to_notify,$old_event,$new_event=False) + @param $msg_type type of the notification: MSG_ADDED, MSG_MODIFIED, MSG_ACCEPTED, ... + @param $to_notify array with numerical user-ids as keys (!) (value is not used) + @param $old_event Event before the change + @param $new_event Event after the change + */ + function send_update($msg_type,$to_notify,$old_event,$new_event=False,$user=False) + { + //echo "

bocalendar::send_update(type=$msg_type,to_notify="; print_r($to_notify); echo ", old_event="; print_r($old_event); echo ", new_event="; print_r($new_event); echo ", user=$user)

\n"; + if (!is_array($to_notify)) + { + $to_notify = array(); + } + $owner = $old_event ? $old_event['owner'] : $new_event['owner']; + if ($owner && !isset($to_notify[$owner]) && $msg_type != MSG_ALARM) + { + $to_notify[$owner] = 'owner'; // always include the event-owner + } + $version = $GLOBALS['phpgw_info']['apps']['calendar']['version']; $GLOBALS['phpgw_info']['user']['preferences'] = $GLOBALS['phpgw']->preferences->create_email_preferences(); $sender = $GLOBALS['phpgw_info']['user']['preferences']['email']['address']; @@ -1968,172 +2275,176 @@ $temp_user = $GLOBALS['phpgw_info']['user']; - if($this->owner != $temp_user['account_id']) + if (!$user) { $user = $this->owner; -// -// $accounts = CreateObject('phpgwapi.accounts',$user); -// $phpgw_info['user'] = $accounts->read_repository(); -// -// $pref = CreateObject('phpgwapi.preferences',$user); -// $GLOBALS['phpgw_info']['user']['preferences'] = $pref->read_repository(); } - else - { - $user = $GLOBALS['phpgw_info']['user']['account_id']; - } - $GLOBALS['phpgw_info']['user']['preferences'] = $GLOBALS['phpgw']->preferences->create_email_preferences($user); + $event = $msg_type == MSG_ADDED || $msg_type == MSG_MODIFIED ? $new_event : $old_event; + if($old_event != False) + { + $old_starttime = $t_old_start_time - $GLOBALS['phpgw']->datetime->tz_offset; + } + $starttime = $this->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; + $endtime = $this->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; + switch($msg_type) { case MSG_DELETED: - $action = 'Deleted'; - $event_id = $old_event['id']; + $action = lang('Canceled'); + $msg = 'Canceled'; $msgtype = '"calendar";'; + $method = 'cancel'; break; case MSG_MODIFIED: - $action = 'Modified'; - $event_id = $old_event['id']; + $action = lang('Modified'); + $msg = 'Modified'; $msgtype = '"calendar"; Version="'.$version.'"; Id="'.$new_event['id'].'"'; + $method = 'request'; break; case MSG_ADDED: - $action = 'Added'; - $event_id = $new_event['id']; + $action = lang('Added'); + $msg = 'Added'; $msgtype = '"calendar"; Version="'.$version.'"; Id="'.$new_event['id'].'"'; + $method = 'request'; break; case MSG_REJECTED: - $action = 'Rejected'; - $event_id = $old_event['id']; + $action = lang('Rejected'); + $msg = 'Response'; $msgtype = '"calendar";'; + $method = 'reply'; break; case MSG_TENTATIVE: - $action = 'Tentative'; - $event_id = $old_event['id']; + $action = lang('Tentative'); + $msg = 'Response'; $msgtype = '"calendar";'; + $method = 'reply'; break; case MSG_ACCEPTED: - $action = 'Accepted'; - $event_id = $old_event['id']; + $action = lang('Accepted'); + $msg = 'Response'; $msgtype = '"calendar";'; + $method = 'reply'; break; + case MSG_ALARM: + $action = lang('Alarm'); + $msg = 'Alarm'; + $msgtype = '"calendar";'; + $method = 'publish'; // duno if thats right + break; + default: + $method = 'publish'; } - - if($old_event != False) + $notify_msg = $this->prefs['calendar']['notify'.$msg]; + if (empty($notify_msg)) { - $old_event_datetime = $t_old_start_time - $GLOBALS['phpgw']->datetime->tz_offset; + $notify_msg = $this->prefs['calendar']['notifyAdded']; // use a default } - - if($new_event != False) + $details = array( // event-details for the notify-msg + 'id' => $msg_type == MSG_ADDED ? $new_event['id'] : $old_event['id'], + 'action' => $action, + ); + $event_arr = $this->event2array($event); + foreach($event_arr as $key => $val) { - $new_event_datetime = $this->maketime($new_event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; - $new_event_datetime_end = $this->maketime($new_event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; + $details[$key] = $val['data']; } + $details['participants'] = implode("\n",$details['participants']); - //Added to construct the participant's list to an event - $event_participants = ''; - reset($participants); - $ac=CreateObject('phpgwapi.accounts'); - - while(list($userid,$statid)=each($participants)) - { - $event_participants .= ($event_participants?"\n":''); - $ac->account_id=$userid; - $ac->read_repository(); - $event_participants .= '<'.$ac->data['account_lid'].'> '.$ac->data['fullname']; - } - //End - - reset($participants); - while($participants && list($userid,$statusid) = each($participants)) + if(!is_object($GLOBALS['phpgw']->send)) { - if((intval($userid) != $GLOBALS['phpgw_info']['user']['account_id']) && - ( - ( - ($msg_type == MSG_REJECTED || $msg_type == MSG_TENTATIVE || $msg_type == MSG_ACCEPTED) && - ($old_event['owner'] == $userid) - ) || - ($msg_type == MSG_DELETED || $msg_type == MSG_MODIFIED || $msg_type == MSG_ADDED) - ) - ) + $GLOBALS['phpgw']->send = CreateObject('phpgwapi.send'); + } + $send = &$GLOBALS['phpgw']->send; + + foreach($to_notify as $userid => $statusid) + { + $userid = intval($userid); + + if ($statusid == 'R') + { + continue; // dont notify rejected participants + } + if($userid != $GLOBALS['phpgw_info']['user']['account_id'] || $msg_type == MSG_ALARM) { print_debug('Msg Type',$msg_type); print_debug('UserID',$userid); - if(!is_object($send)) - { - $send = CreateObject('phpgwapi.send'); - } - $preferences = CreateObject('phpgwapi.preferences',intval($userid)); + $preferences = CreateObject('phpgwapi.preferences',$userid); $part_prefs = $preferences->read_repository(); - if(!isset($part_prefs['calendar']['send_updates']) || !$part_prefs['calendar']['send_updates']) + + if (!$this->update_requested($userid,$part_prefs,$msg_type,$old_event,$new_event)) { continue; } - $part_prefs = $preferences->create_email_preferences(intval($userid)); - $to = $part_prefs['email']['address']; + $GLOBALS['phpgw']->accounts->get_account_name($userid,$lid,$details['to-firstname'],$details['to-lastname']); + $details['to-fullname'] = $GLOBALS['phpgw']->common->display_fullname('',$details['to-firstname'],$details['to-lastname']); + $to = $preferences->email_address($userid); + if (empty($to) || $to[0] == '@' || $to[0] == '$') // we have no valid email-address + { + //echo "

bocalendar::send_update: Empty email adress for user '".$details['to-fullname']."' ==> ignored !!!

\n"; + continue; + } print_debug('Email being sent to',$to); $GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] = $part_prefs['common']['tz_offset']; $GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] = $part_prefs['common']['timeformat']; $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] = $part_prefs['common']['dateformat']; - + $GLOBALS['phpgw']->datetime->tz_offset = ((60 * 60) * intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])); - if($old_event != False) + if($old_starttime) { - $old_event_date = $GLOBALS['phpgw']->common->show_date($old_event_datetime); + $details['olddate'] = $GLOBALS['phpgw']->common->show_date($old_starttime); } + $details['startdate'] = $GLOBALS['phpgw']->common->show_date($starttime); + $details['enddate'] = $GLOBALS['phpgw']->common->show_date($endtime); - if($new_event != False) - { - $new_event_date = $GLOBALS['phpgw']->common->show_date($new_event_datetime); - $new_event_end = $GLOBALS['phpgw']->common->show_date($new_event_datetime_end); - } - - switch($msg_type) - { - case MSG_DELETED: - $action_date = $old_event_date; - $body = lang ('Your meeting scheduled for') .' '. $old_event_date .' '. lang('has been canceled'); - $event_head=$old_event['title']; - $event_description=$old_event['description']; - break; - case MSG_MODIFIED: - $action_date = $new_event_date; - $body = lang ('Your meeting that had been scheduled for').' '.$old_event_date.' '. lang('has been rescheduled to') .' '.$new_event_date; - $event_head=$old_event['title']; - $event_description=$old_event['description']; - break; - case MSG_ADDED: - $action_date = $new_event_date; - $body = lang ('You have a meeting scheduled for').' '. $new_event_date; - $event_head=$new_event['title']; - $event_description=$new_event['description']; - break; - case MSG_REJECTED: - case MSG_TENTATIVE: - case MSG_ACCEPTED: - $action_date = $old_event_date; - $body = 'On '.$GLOBALS['phpgw']->common->show_date(time() - $GLOBALS['phpgw']->datetime->tz_offset).' '.$GLOBALS['phpgw']->common->grab_owner_name($GLOBALS['phpgw_info']['user']['account_id']).' '.$action.' your meeting request for '.$old_event_date; - $body = lang('On %1 %2 %3 your meeting request for %4',$GLOBALS['phpgw']->common->show_date(time() - $GLOBALS['phpgw']->datetime->tz_offset),$GLOBALS['phpgw']->common->grab_owner_name($GLOBALS['phpgw_info']['user']['account_id']),lang($action),$old_event_date); - $event_head=$old_event['title']; - $event_description=$old_event['description']; - break; - } - - $subject = lang('Calendar Event') . ' ('. lang($action) .') #'.$event_id.': '.$action_date.' (L)'; - if(isset($part_prefs['calendar']['send_extra']) && $part_prefs['calendar']['send_extra']) + list($subject,$body) = split("\n",$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2); + $subject = $send->encode_subject($subject); + switch($part_prefs['calendar']['update_format']) { - $body .= "\n\n".'***'.lang('Please confirm,accept,reject or examine changes in the corresponding entry in your calendar').'***'."\n\n" - . '----'.lang('Event Details Follow').'----'; - $body .= ($new_event_date ? "\n\n".lang('Start- and Enddates').":\n".$new_event_date.' -- '. $new_event_end : ''); - $body .= ($event_head?"\n\n".lang('TITLE').':'."\n".' '.$event_head:''); - $body .= ($event_description?"\n\n".lang('DESCRIPTION').':'."\n".' '.$event_description:''); - $body .= ($event_participants?"\n\n".lang('Participants').':'."\n".' '.$event_participants:''); - } - $returncode = $send->msg('email',$to,$subject,$body,$msgtype,'','','',$sender); + case 'extended': + $body .= "\n\n".lang('Event Details follow').":\n"; + foreach($event_arr as $key => $val) + { + if ($key != 'access' && $key != 'priority' && strlen($details[$key])) + { + $body .= sprintf("%-20s %s\n",$val['field'].':',$details[$key]); + } + } + break; + + case 'ical': + $content_type = "calendar; method=$method; name=calendar.ics"; +/* would be nice, need to get it working + if ($body != '') + { + $boundary = '----Message-Boundary'; + $body .= "\n\n\n$boundary\nContent-type: text/$content_type\n". + "Content-Disposition: inline\nContent-transfer-encoding: 7BIT\n\n"; + $content_type = ''; + } +*/ + $body = ExecMethod('calendar.boicalendar.export',array( + 'l_event_id' => $event['id'], + 'method' => $method, + 'chunk_split' => False + )); + break; + } + $returncode = $send->msg('email',$to,$subject,$body,''/*$msgtype*/,'','','',$sender, $content_type/*,$boundary*/); + //echo "

send(to='$to', sender='$sender'
subject='$subject') returncode=$returncode
".nl2br($body)."

\n"; + + if (!$returncode) // not nice, but better than failing silently + { + echo '

bocalendar::send_update: '.lang("Failed sending message to '%1' #%2 subject='%3', sender='%4' !!!",$to,$userid,htmlspecialchars($subject), $sender)."
\n"; + echo ''.$send->err['desc']."
\n"; + echo lang('This is mostly caused by a not or wrongly configured SMTP server. Notify your administrator.')."

\n"; + echo '

'.lang('Click %1here%2 to return to the calendar.','','')."

\n"; + } } } unset($send); @@ -2145,9 +2456,35 @@ } $GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] = $temp_tz_offset; - $GLOBALS['phpgw']->datetime->tz_offset = ((60 * 60) * $temp_tz_offset); + $GLBOALS['phpgw']->datetime->tz_offset = ((60 * 60) * $temp_tz_offset); $GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] = $temp_timeformat; $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] = $temp_dateformat; + + return $returncode; + } + + function send_alarm($alarm) + { + //echo "

bocalendar::send_alarm("; print_r($alarm); echo ")

\n"; + $GLOBALS['phpgw_info']['user']['account_id'] = $this->owner = $alarm['owner']; + + if (!$alarm['enabled'] || !$alarm['owner'] || !$alarm['cal_id'] || !($event = $this->so->read_entry($alarm['cal_id']))) + { + return False; // event not found + } + if ($alarm['all']) + { + $to_notify = $event['participants']; + } + elseif ($this->check_perms(PHPGW_ACL_READ,$event)) // checks agains $this->owner set to $alarm[owner] + { + $to_notify[$alarm['owner']] = 'A'; + } + else + { + return False; // no rights + } + return $this->send_update(MSG_ALARM,$to_notify,$event,False,$alarm['owner']); } function get_alarms($event_id) @@ -2221,7 +2558,7 @@ $new_event['participants'][$new_userid] = 'U'; } } - + if(count($this->added) > 0 || count($this->modified) > 0 || count($this->deleted) > 0) { if(count($this->added) > 0) @@ -2266,11 +2603,356 @@ } } } + + function get_dirty_entries($lastmod=-1) + { + $events = false; + $event_ids = $this->so->cal->list_dirty_events($lastmod); + if(is_array($event_ids)) + { + foreach($event_ids as $key => $id) + { + $events[$id] = $this->so->cal->fetch_event($id); + } + } + unset($event_ids); + + $rep_event_ids = $this->so->cal->list_dirty_events($lastmod,$true); + if(is_array($rep_event_ids)) + { + foreach($rep_event_ids as $key => $id) + { + $events[$id] = $this->so->cal->fetch_event($id); + } + } + unset($rep_event_ids); + + return $events; + } function _debug_array($data) { echo '
UI:'; _debug_array($data); } + + /*! + @function rejected_no_show + @abstract checks if event is rejected from user and he's not the owner and dont want rejected + @param $event to check + @returns True if event should not be shown + */ + function rejected_no_show($event) + { + $ret = !$this->prefs['calendar']['show_rejected'] && + $event['owner'] != $this->owner && + $event['participants'][$this->owner] == 'R'; + //echo "

rejected_no_show($event[title])='$ret': user=$this->owner, event-owner=$event[owner], status='".$event['participants'][$this->owner]."', show_rejected='".$this->prefs['calendar']['show_rejected']."'

\n"; + return $ret; + } + + /*! + @function list_cals + @abstract generate list of user- / group-calendars for the selectbox in the header + @returns alphabeticaly sorted array with groups first and then users + */ + function list_cals() + { + function add($id,&$users,&$groups) + { + $name = $GLOBALS['phpgw']->common->grab_owner_name($id); + if (($type = $GLOBALS['phpgw']->accounts->get_type($id)) == 'g') + { + $arr = &$groups; + } + else + { + $arr = &$users; + } + $arr[$name] = Array( + 'grantor' => $id, + 'value' => ($type == 'g' ? 'g_' : '') . $id, + 'name' => $name + ); + } + $users = $groups = array(); + foreach($this->grants as $id => $rights) + { + add($id,$users,$groups); + } + if ($memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id'])) + { + foreach($memberships as $group_info) + { + add($group_info['account_id'],$users,$groups); + + if ($account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar')) + { + foreach($account_perms as $id) + { + add($id,$users,$groups); + } + } + } + } + uksort($users,'strnatcasecmp'); + uksort($groups,'strnatcasecmp'); + + return $users + $groups; // users first and then groups, both alphabeticaly + } + + /*! + @function event2array + @abstract create array with name, translated name and readable content of each attributes of an event + @syntax event2array($event,$sep='
') + @param $event event to use + @returns array of attributes with fieldname as key and array with the 'field'=translated name \ + 'data' = readable content (for participants this is an array !) + */ + function event2array($event) + { + $var['title'] = Array( + 'field' => lang('Title'), + 'data' => $event['title'] + ); + + // Some browser add a \n when its entered in the database. Not a big deal + // this will be printed even though its not needed. + $var['description'] = Array( + 'field' => lang('Description'), + 'data' => $event['description'] + ); + + $cats = Array(); + $this->cat->categories($this->bo->owner,'calendar'); + if(strpos($event['category'],',')) + { + $cats = explode(',',$event['category']); + } + else + { + $cats[] = $event['category']; + } + foreach($cats as $cat_id) + { + list($cat) = $this->cat->return_single($cat_id); + $cat_string[] = $cat['name']; + } + $var['category'] = Array( + 'field' => lang('Category'), + 'data' => implode(', ',$cat_string) + ); + + $var['location'] = Array( + 'field' => lang('Location'), + 'data' => $event['location'] + ); + + $var['startdate'] = Array( + 'field' => lang('Start Date/Time'), + 'data' => $GLOBALS['phpgw']->common->show_date($this->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset), + ); + + $var['enddate'] = Array( + 'field' => lang('End Date/Time'), + 'data' => $GLOBALS['phpgw']->common->show_date($this->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset) + ); + + $pri = Array( + 1 => lang('Low'), + 2 => lang('Normal'), + 3 => lang('High') + ); + $var['priority'] = Array( + 'field' => lang('Priority'), + 'data' => $pri[$event['priority']] + ); + + $var['owner'] = Array( + 'field' => lang('Created By'), + 'data' => $GLOBALS['phpgw']->common->grab_owner_name($event['owner']) + ); + + $var['updated'] = Array( + 'field' => lang('Updated'), + 'data' => $GLOBALS['phpgw']->common->show_date($this->maketime($event['modtime']) - $GLOBALS['phpgw']->datetime->tz_offset) + ); + + $var['access'] = Array( + 'field' => lang('Access'), + 'data' => $event['public'] ? lang('Public') : lang('Privat') + ); + + if(@isset($event['groups'][0])) + { + $cal_grps = ''; + for($i=0;$iaccounts->exists($event['groups'][$i])) + { + $cal_grps .= ($i>0?'
':'').$GLOBALS['phpgw']->accounts->id2name($event['groups'][$i]); + } + } + + $var['groups'] = Array( + 'field' => lang('Groups'), + 'data' => $cal_grps + ); + } + + $participants = array(); + foreach($event['participants'] as $user => $short_status) + { + if($GLOBALS['phpgw']->accounts->exists($user)) + { + $participants[$user] = $GLOBALS['phpgw']->common->grab_owner_name($user).' ('.$this->get_long_status($short_status).')'; + } + } + $var['participants'] = Array( + 'field' => lang('Participants'), + 'data' => $participants + ); + + // Repeated Events + if($event['recur_type'] != MCAL_RECUR_NONE) + { + $str = lang($this->rpt_type[$event['recur_type']]); + + $str_extra = ''; + if ($event['recur_enddate']['mday'] != 0 && $event['recur_enddate']['month'] != 0 && $event['recur_enddate']['year'] != 0) + { + $recur_end = $this->maketime($event['recur_enddate']); + if($recur_end != 0) + { + $recur_end -= $GLOBALS['phpgw']->datetime->tz_offset; + $str_extra .= lang('ends').': '.lang($GLOBALS['phpgw']->common->show_date($recur_end,'l')).', '.$this->long_date($recur_end).' '; + } + } + if($event['recur_type'] == MCAL_RECUR_WEEKLY || $event['recur_type'] == MCAL_RECUR_DAILY) + { + $repeat_days = array(); + foreach ($this->rpt_day as $mcal_mask => $dayname) + { + if ($event['recur_data'] & $mcal_mask) + { + $repeat_days[] = lang($dayname); + } + } + if(count($repeat_days)) + { + $str_extra .= lang('days repeated').': '.implode(', ',$repeat_days); + } + } + if($event['recur_interval'] != 0) + { + $str_extra .= lang('Interval').': '.$event['recur_interval']; + } + + if($str_extra) + { + $str .= ' ('.$str_extra.')'; + } + + $var['recure_type'] = Array( + 'field' => lang('Repetition'), + 'data' => $str, + ); + } + + if (!isset($this->fields)) + { + $this->custom_fields = CreateObject('calendar.bocustom_fields'); + $this->fields = &$this->custom_fields->fields; + $this->stock_fields = &$this->custom_fields->stock_fields; + } + foreach($this->fields as $field => $data) + { + if (!$data['disabled']) + { + if (isset($var[$field])) + { + $sorted[$field] = $var[$field]; + } + elseif (!isset($this->stock_fields[$field]) && strlen($event[$field])) // Custom field + { + $lang = lang($name = substr($field,1)); + $sorted[$field] = array( + 'field' => $lang == $name.'*' ? $name : $lang, + 'data' => $event[$field] + ); + } + } + unset($var[$field]); + } + foreach($var as $name => $v) + { + $sorted[$name] = $v; + + } + return $sorted; + } + + /*! + @function check_set_default_prefs + @abstract sets the default prefs, if they are not already set (on a per pref. basis) + @note It sets a flag in the app-session-data to be called only once per session + */ + function check_set_default_prefs() + { + if (($set = $GLOBALS['phpgw']->session->appsession('default_prefs_set','calendar'))) + { + return; + } + $GLOBALS['phpgw']->session->appsession('default_prefs_set','calendar','set'); + + $default_prefs = $GLOBALS['phpgw']->preferences->default['calendar']; + + $subject = lang('Calendar Event') . ' - $$action$$: $$startdate$$ $$title$$'."\n"; + $defaults = array( + 'defaultcalendar' => 'week', + 'mainscreen_showevents' => '0', + 'summary' => 'no', + 'receive_updates' => 'no', + 'update_format' => 'extended', // leave it to extended for now, as iCal kills the message-body + 'notifyAdded' => $subject . lang ('You have a meeting scheduled for %1','$$startdate$$'), + 'notifyCanceled' => $subject . lang ('Your meeting scheduled for %1 has been canceled','$$startdate$$'), + 'notifyModified' => $subject . lang ('Your meeting that had been scheduled for %1 has been rescheduled to %2','$$olddate$$','$$startdate$$'), + 'notifyResponse' => $subject . lang ('On %1 %2 %3 your meeting request for %4','$$date$$','$$fullname$$','$$action$$','$$startdate$$'), + 'notifyAlarm' => lang('Alarm for %1 at %2 in %3','$$title$$','$$startdate$$','$$location$$')."\n".lang ('Here is your requested alarm.'), + 'show_rejected' => '0', + 'display_status' => '1', + 'weekdaystarts' => 'Monday', + 'workdaystarts' => '9', + 'workdayends' => '17', + 'interval' => '30', + 'defaultlength' => '60', + 'planner_start_with_group' => $GLOBALS['phpgw']->accounts->name2id('Default'), + 'planner_intervals_per_day'=> '4', + 'defaultfilter' => 'all', + 'default_private' => '0', + 'display_minicals'=> '1', + 'print_black_white'=>'0' + ); + foreach($defaults as $var => $default) + { + if (!isset($default_prefs[$var]) || $default_prefs[$var] == '') + { + $GLOBALS['phpgw']->preferences->add('calendar',$var,$default,'default'); + $need_save = True; + } + } + if ($need_save) + { + $prefs = $GLOBALS['phpgw']->preferences->save_repository(False,'default'); + $this->prefs['calendar'] = $prefs['calendar']; + } + if ($this->prefs['calendar']['send_updates'] && !isset($this->prefs['calendar']['receive_updates'])) + { + $this->prefs['calendar']['receive_updates'] = $this->prefs['calendar']['send_updates']; + $GLOBALS['phpgw']->preferences->add('calendar','receive_updates',$this->prefs['calendar']['send_updates']); + $GLOBALS['phpgw']->preferences->delete('calendar','send_updates'); + $prefs = $GLOBALS['phpgw']->preferences->save_repository(); + } + } } ?> diff --git a/calendar/inc/class.bocustom_fields.inc.php b/calendar/inc/class.bocustom_fields.inc.php new file mode 100644 index 0000000000..88eeb6f42b --- /dev/null +++ b/calendar/inc/class.bocustom_fields.inc.php @@ -0,0 +1,97 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + /* $Id$ */ + + class bocustom_fields + { + var $stock_fields = array( + 'title' => array( + 'label' => 'Title', + 'title' => True + ), + 'description' => 'Description', + 'category' => 'Category', + 'location' => 'Location', + 'startdate' => 'Start Date/Time', + 'enddate' => 'End Date/Time', + 'priority' => 'Priority', + 'access' => 'Access', + 'participants'=> 'Participants', + 'owner' => 'Created By', + 'updated' => 'Updated', + 'alarm' => 'Alarm', + 'recure_type' => 'Repetition' + ); + + function bocustom_fields() + { + $this->config = CreateObject('phpgwapi.config','calendar'); + $this->config->read_repository(); + + $this->fields = &$this->config->config_data['fields']; + + if (!is_array($this->fields)) { + $this->fields = array(); + } + + foreach ($this->fields as $field => $data) // this can be removed after a while + { + if (!isset($this->stock_fields[$field]) && $field[0] != '#') + { + unset($this->fields[$field]); + $this->fields['#'.$field] = $data; + } + } + + foreach($this->stock_fields as $field => $data) + { + if (!is_array($data)) + { + $data = array('label' => $data); + } + if (!isset($this->fields[$field])) + { + $this->fields[$field] = array( + 'name' => $field, + 'title' => $data['title'], + 'disabled' => $data['disabled'] + ); + } + $this->fields[$field]['label'] = $data['label']; + $this->fields[$field]['length'] = $data['length']; + $this->fields[$field]['shown'] = $data['shown']; + } + } + + function set($data) + { + if (is_array($data) && strlen($data['name']) > 0) + { + if (!isset($this->stock_fields[$name = $data['name']])) + { + $name = '#'.$name; + } + $this->fields[$name] = $data; + } + } + + function save($fields=False) + { + if ($fields) + { + $this->fields = $fields; + } + //echo "
"; print_r($this->config->config_data); echo "
\n"; + $this->config->save_repository(); + } + } diff --git a/calendar/inc/class.boholiday.inc.php b/calendar/inc/class.boholiday.inc.php index 9322fda611..bb6eea2b11 100755 --- a/calendar/inc/class.boholiday.inc.php +++ b/calendar/inc/class.boholiday.inc.php @@ -48,8 +48,6 @@ { $this->so = CreateObject('calendar.soholiday'); - if(isset($GLOBALS['locale'])) { $this->locales[] = $GLOBALS['locale']; } - if(isset($GLOBALS['start'])) { $this->start = intval($GLOBALS['start']); } else { $this->start = 0; } if(isset($GLOBALS['query'])) { $this->query = $GLOBALS['query']; } @@ -58,9 +56,13 @@ if(isset($GLOBALS['order'])) { $this->order = $GLOBALS['order']; } - if(isset($GLOBALS['id'])) { $this->id = $GLOBALS['id']; } - - if(isset($GLOBALS['year'])) { $this->year = $GLOBALS['year']; } else { $this->year = date('Y'); } + $this->id = get_var('id',array('POST','GET')); + $this->year = get_var('year',array('POST','GET'),date('Y')); + $this->locale = get_var('locale',array('POST','GET')); + if ($this->locale) + { + $this->locales[] = $this->locale; + } if($this->debug) { @@ -176,8 +178,7 @@ function prepare_read_holidays($year=0,$owner=0) { - $datetime = CreateObject('phpgwapi.datetime'); - $this->year = (isset($year) && $year > 0?$year:$GLOBALS['phpgw']->common->show_date(time() - $datetime->tz_offset,'Y')); + $this->year = (isset($year) && $year > 0?$year:$GLOBALS['phpgw']->common->show_date(time() - $GLOBALS['phpgw']->datetime->tz_offset,'Y')); $this->owner = ($owner?$owner:$GLOBALS['phpgw_info']['user']['account_id']); if($this->debug) @@ -393,7 +394,6 @@ } $temp_locale = $GLOBALS['phpgw_info']['user']['preferences']['common']['country']; - $datetime = CreateObject('phpgwapi.datetime'); for($i=0;$icalculate_date($holidays[$i], $holidays, $this->year, $datetime, $c); + $holidays[$i]['date'] = $holidaycalc->calculate_date($holidays[$i], $holidays, $this->year, $c); if($c != $i) { $i = $c; } } unset($holidaycalc); - unset($datetime); $this->holidays = $this->sort_holidays_by_date($holidays); $this->cached_holidays = $this->set_holidays_to_date($this->holidays); $GLOBALS['phpgw_info']['user']['preferences']['common']['country'] = $temp_locale; diff --git a/calendar/inc/class.boicalendar.inc.php b/calendar/inc/class.boicalendar.inc.php index f5c24372d5..c994f33efc 100755 --- a/calendar/inc/class.boicalendar.inc.php +++ b/calendar/inc/class.boicalendar.inc.php @@ -97,6 +97,7 @@ class boicalendar var $parameter = Array(); var $debug_str = False; var $api = True; + var $chunk_split = True; /* * Base Functions @@ -1253,7 +1254,7 @@ class boicalendar ); if(!is_object($GLOBALS['phpgw']->datetime)) { - $GLOBALS['phpgw']->datetime = createobject('phpgwaqpi.datetime'); + $GLOBALS['phpgw']->datetime = createobject('phpgwapi.datetime'); } } @@ -1293,12 +1294,12 @@ class boicalendar function fold($str) { - return chunk_split($str,FOLD_LENGTH,"\r\n"); + return $this->chunk_split==True ? chunk_split($str,FOLD_LENGTH,"\r\n") : $str."\r\n"; } function strip_quotes($str) { - return str_replace('\"','',$str); + return str_replace('"','',$str); } function from_text($str) @@ -1563,7 +1564,7 @@ class boicalendar $quote = ''; if($seperator == '=') { - $quote = '\"'; + $quote = '"'; } $return_value = $this->fold('X-'.$x_type['name'].$seperator.$quote.$x_type['value'].$quote); @@ -1612,7 +1613,7 @@ class boicalendar $include_datetime = True; continue; } - $quote = (@$this->parameter[$key]['quoted']?'\"':''); + $quote = (@$this->parameter[$key]['quoted']?'"':''); if(isset($event[$key]) && @$this->parameter[$key]['properties'][$property]) { $change_text = @$this->parameter[$key]['to_text']; @@ -1792,7 +1793,7 @@ class boicalendar case 'function': $str .= ';'.str_replace('_','-',strtoupper($value)).'='; $function = @$this->parameter[$key]['function']; - $str .= (@$this->parameter[$key]['quoted']?'\"':'').$this->$function($event[$key]).(@$this->parameter[$key]['quoted']?'\"':''); + $str .= (@$this->parameter[$key]['quoted']?'"':'').$this->$function($event[$key]).(@$this->parameter[$key]['quoted']?'"':''); break; case 'float': if(!empty($event[$value])) @@ -2274,28 +2275,28 @@ class boicalendar switch($var) { case 'NEEDS-ACTION': - return NEEDS_ACTION; + return 0; // NEEDS_ACTION; break; case 'ACCEPTED': - return ACCEPTED; + return 1; // ACCEPTED; break; case 'DECLINED': - return DECLINED; + return 2; // DECLINED; break; case 'TENTATIVE': - return TENTATIVE; + return 3; // TENTATIVE; break; case 'DELEGATED': - return DELEGATED; + return 4; // DELEGATED; break; case 'COMPLETED': - return COMPLETED; + return 5; // COMPLETED; break; case 'IN-PROCESS': - return IN_PROCESS; + return 6; // IN_PROCESS; break; default: - return OTHER; + return 99; // OTHER; break; } } @@ -2303,25 +2304,25 @@ class boicalendar { switch(intval($var)) { - case NEEDS_ACTION: + case 0: // NEEDS_ACTION: return 'NEEDS-ACTION'; break; - case ACCEPTED: + case 1: // ACCEPTED: return 'ACCEPTED'; break; - case DECLINED: + case 2: // DECLINED: return 'DECLINED'; break; - case TENTATIVE: + case 3: // TENTATIVE: return 'TENTATIVE'; break; - case DELEGATED: + case 4: // DELEGATED: return 'DELEGATED'; break; - case COMPLETED: + case 5: // COMPLETED: return 'COMPLETED'; break; - case IN_PROCESS: + case 6: // IN_PROCESS: return 'IN-PROCESS'; break; default: @@ -2903,8 +2904,7 @@ class boicalendar ) ) ); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpwg']->common->phpgw_exit(); } $uploaddir = $GLOBALS['phpgw_info']['server']['temp_dir'] . SEP; @@ -2941,8 +2941,7 @@ class boicalendar ) ) ); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpwg']->common->phpgw_exit(); } if(!is_object($GLOBALS['uicalendar'])) @@ -3204,13 +3203,14 @@ class boicalendar ) ) ); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } - function export($l_event_id=0) + function export($params) { - $event_id = ($l_event_id?$l_event_id:$GLOBALS['HTTP_GET_VARS']['cal_id']); + $event_id = ($params['l_event_id']?$params['l_event_id']:$GLOBALS['HTTP_GET_VARS']['cal_id']); + $this->chunk_split = $params['chunk_split']; + $method = ($params['method']?$params['method']:"publish"); $string_array = Array( 'summary' => 'description', @@ -3235,7 +3235,7 @@ class boicalendar $this->set_var($ical['prodid'],'value','-//phpGroupWare//phpGroupWare '.$setup_info['calendar']['version'].' MIMEDIR//'.strtoupper($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])); $this->set_var($ical['version'],'value','2.0'); - $this->set_var($ical['method'],'value',strtoupper('publish')); + $this->set_var($ical['method'],'value',strtoupper($method)); if(!$GLOBALS['phpgw_info']['flags']['included_classes']['uicalendar']) { @@ -3276,13 +3276,24 @@ class boicalendar } } + // use system's date info for caluculating local timezone's offset in minutes + // + $gmt_offset = date('O',$GLOBALS['phpgw']->datetime->users_localtime); // offset to GMT + $offset = intval(substr($gmt_offset, 1, 2)) * 60 + intval(substr($gmt_offset, 3, 2)); + if ($offset > 0) + { + $event['start']['min'] -= $offset; + $event['end']['min'] -= $offset; + $event['modtime']['min'] -= $offset; + } + $ical_event['priority'] = $event['priority']; $ical_event['class'] = intval($event['public']); - $dtstart_mktime = $so_event->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; + $dtstart_mktime = $so_event->maketime($event['start']); $this->parse_value($ical_event,'dtstart',date('Ymd\THis\Z',$dtstart_mktime),'vevent'); - $dtend_mktime = $so_event->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; + $dtend_mktime = $so_event->maketime($event['end']); $this->parse_value($ical_event,'dtend',date('Ymd\THis\Z',$dtend_mktime),'vevent'); - $mod_mktime = $so_event->maketime($event['modtime']) - $GLOBALS['phpgw']->datetime->tz_offset; + $mod_mktime = $so_event->maketime($event['modtime']); $this->parse_value($ical_event,'last_modified',date('Ymd\THis\Z',$mod_mktime),'vevent'); @reset($string_array); while(list($ical_value,$event_value) = each($string_array)) @@ -3316,11 +3327,15 @@ class boicalendar @reset($event['participants']); while(list($part,$status) = each($event['participants'])) { - $GLOBALS['phpgw']->accounts->get_account_name($accountid,$lid,$fname,$lname); + $GLOBALS['phpgw']->accounts->get_account_name($part,$lid,$fname,$lname); $name = $fname.' '.$lname; + $owner_status = $this->switch_partstat(intval($this->switch_phpgw_status($event['participants'][$part]))); - $owner_mailto = 'mpeters@satx.rr.com'; - $str = 'CN="'.$name.'";PARTSTAT='.$owner_status.':'.$owner_mailto; + + $mail_prefs = $GLOBALS['phpgw']->preferences->create_email_preferences($part); + $mailto = $mail_prefs['email']['address']; + + $str = 'CN="'.$name.'";PARTSTAT='.$owner_status.':'.$mailto; if($part == $event['owner']) { $str = 'ROLE=CHAIR;'.$str; @@ -3329,7 +3344,10 @@ class boicalendar { $str = 'ROLE=REQ-PARTICIPANT;'.$str; } - $this->parse_value($ical_event,'attendee',$str,'vevent'); + if ($method != 'reply' || $part == $GLOBALS['phpgw_info']['user']['account_id']) + { + $this->parse_value($ical_event,'attendee',$str,'vevent'); + } if($part == $event['owner']) { $this->parse_value($ical_event,'organizer',$str,'vevent'); diff --git a/calendar/inc/class.holidaycalc_JP.inc.php b/calendar/inc/class.holidaycalc_JP.inc.php index ac7a573aa0..3e30457669 100755 --- a/calendar/inc/class.holidaycalc_JP.inc.php +++ b/calendar/inc/class.holidaycalc_JP.inc.php @@ -15,27 +15,43 @@ class holidaycalc { - function calculate_date($holiday, &$holidays, $year, $datetime, &$i) + function calculate_date($holiday, &$holidays, $year, &$i) { + static $cached_month; + static $cached_day; + static $cached_observance_rule; - if($holiday['day'] == 0 && $holiday['dow'] != 0 && $holiday['occurence'] != 0) + if ($holiday['day'] == 0 && $holiday['dow'] != 0 && $holiday['occurence'] != 0) { - // for Coming of Age Day and Health and Sports Day + $dow = $GLOBALS['phpgw']->datetime->day_of_week($year, $holiday['month'], 1); + $dayshift = (($holiday['dow'] + 7) - $dow) % 7; + $day = ($holiday['occurence'] - 1) * 7 + $dayshift + 1; + // Happy monday law. - if ($year >= 2000) + if ($holiday['month'] == 1) { - $dow = $datetime->day_of_week($year, $holiday['month'], 1); - $dayshift = (($holiday['dow'] + 7) - $dow) % 7; - $day = ($holiday['occurence'] - 1) * 7 + $dayshift + 1; - } - else - { - // non Happy monday law. - if ($holiday['month'] == 1) + if ($year < 2000) { $day = 15; } - elseif ($holiday['month'] == 10) + } + elseif ($holiday['month'] == 7) + { + if ($year < 2003) + { + $day = 20; + } + } + elseif ($holiday['month'] == 9) + { + if ($year < 2003) + { + $day = 15; + } + } + elseif ($holiday['month'] == 10) + { + if ($year < 2000) { $day = 10; } @@ -79,21 +95,53 @@ class holidaycalc { $day = $holiday['day']; } - if($holiday['observance_rule'] == True) + if ($year >= 1985 && $holiday['month'] == $cached_month && $day == $cached_day + 2 && $cached_observance_rule == True && $holiday['observance_rule'] == True) { - $dow = $datetime->day_of_week($year,$holiday['month'],$day); + $pdow = $GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$day-1); + if ($pdow != 0) + { + $addcnt = count($holidays) + 1; + $holidays[$addcnt]['locale'] = $holiday['locale']; + if ($pdow == 1) + { + $holidays[$addcnt]['name'] = lang('overlap holiday'); + } + else + { + $holidays[$addcnt]['name'] = lang('people holiday'); + } + $holidays[$addcnt]['day'] = $day - 1; + $holidays[$addcnt]['month'] = $holiday['month']; + $holidays[$addcnt]['occurence'] = 0; + $holidays[$addcnt]['dow'] = 0; + $holidays[$addcnt]['date'] = mktime(0,0,0,$holiday['month'],$day-1,$year); + $holidays[$addcnt]['observance_rule'] = 0; + } + } + + $cached_month = $holiday['month']; + $cached_day = $day; + $cached_observance_rule = $holiday['observance_rule']; + + if ($year >= 1985 && $holiday['month'] == 5 && $day == 3) + { + ; + } + elseif ($holiday['observance_rule'] == True) + { + $dow = $GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$day); // This now calulates Observed holidays and creates a new entry for them. if($dow == 0) { - $i++; - $holidays[$i]['locale'] = $holiday['locale'].' (Observed)'; - $holidays[$i]['name'] = lang('overlap holiday'); - $holidays[$i]['day'] = $holiday['day'] + 1; - $holidays[$i]['month'] = $holiday['month']; - $holidays[$i]['occurence'] = $holiday['occurence']; - $holidays[$i]['dow'] = $holiday['dow']; - $holidays[$i]['date'] = mktime(0,0,0,$holiday['month'],$day+1,$year); - $holidays[$i]['obervance_rule'] = 0; + $addcnt = count($holidays) + 1; + $holidays[$addcnt]['locale'] = $holiday['locale']; + $holidays[$addcnt]['name'] = lang('overlap holiday'); + $holidays[$addcnt]['day'] = $day + 1; + $holidays[$addcnt]['month'] = $holiday['month']; + $holidays[$addcnt]['occurence'] = $holiday['occurence']; + $holidays[$addcnt]['dow'] = $holiday['dow']; + $holidays[$addcnt]['date'] = mktime(0,0,0,$holiday['month'],$day+1,$year); + $holidays[$addcnt]['observance_rule'] = 0; } } diff --git a/calendar/inc/class.holidaycalc_US.inc.php b/calendar/inc/class.holidaycalc_US.inc.php index c0eaf9ec3e..1c65cfdd84 100755 --- a/calendar/inc/class.holidaycalc_US.inc.php +++ b/calendar/inc/class.holidaycalc_US.inc.php @@ -15,14 +15,14 @@ class holidaycalc { - function calculate_date($holiday, &$holidays, $year, $datetime, &$i) + function calculate_date($holiday, &$holidays, $year, &$i) { // if($holiday['day'] == 0 && $holiday['dow'] != 0 && $holiday['occurence'] != 0) if($holiday['day'] == 0 && $holiday['occurence'] != 0) { if($holiday['occurence'] != 99) { - $dow = $datetime->day_of_week($year,$holiday['month'],1); + $dow = $GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],1); $day = (((7 * $holiday['occurence']) - 6) + ((($holiday['dow'] + 7) - $dow) % 7)); $day += ($day < 1 ? 7 : 0); // What is the point of this? @@ -31,7 +31,7 @@ class holidaycalc { // Sometimes the 5th occurance of a weekday (ie the 5th monday) // can spill over to the next month. This prevents that. - $ld = $datetime->days_in_month($holiday['month'],$year); + $ld = $GLOBALS['phpgw']->datetime->days_in_month($holiday['month'],$year); if ($day > $ld) { return; @@ -39,8 +39,8 @@ class holidaycalc { } else { - $ld = $datetime->days_in_month($holiday['month'],$year); - $dow = $datetime->day_of_week($year,$holiday['month'],$ld); + $ld = $GLOBALS['phpgw']->datetime->days_in_month($holiday['month'],$year); + $dow = $GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$ld); $day = $ld - (($dow + 7) - $holiday['dow']) % 7 ; } } @@ -49,7 +49,7 @@ class holidaycalc { $day = $holiday['day']; if($holiday['observance_rule'] == True) { - $dow = $datetime->day_of_week($year,$holiday['month'],$day); + $dow = $GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$day); // This now calulates Observed holidays and creates a new entry for them. if($dow == 0) { diff --git a/calendar/inc/class.html.inc.php b/calendar/inc/class.html.inc.php index dd39ab62e8..17c8513a4f 100755 --- a/calendar/inc/class.html.inc.php +++ b/calendar/inc/class.html.inc.php @@ -1,9 +1,8 @@ * - * originaly based on todo written by Joseph Engo * * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * @@ -15,60 +14,169 @@ class html { + var $user_agent,$ua_version; // 'mozilla','msie','konqueror' + var $prefered_img_title; + function html() - { + { // should be Ok for all HTML 4 compatible browsers + if (!eregi('compatible; ([a-z_]+)[/ ]+([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$parts)) + { + eregi('^([a-z_]+)/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$parts); + } + list(,$this->user_agent,$this->ua_version) = $parts; + $this->user_agent = strtolower($this->user_agent); + + $this->prefered_img_title = $this->user_agent == 'mozilla' && $this->ua_version < 5 ? 'ALT' : 'TITLE'; + //echo "

HTTP_USER_AGENT='$GLOBALS[HTTP_USER_AGENT]', UserAgent: '$this->user_agent', Version: '$this->ua_version', img_title: '$this->prefered_img_title'

\n"; } - function input_hidden($vars,$value='') + /* + * Function: Allows to show and select one item from an array + * Parameters: $name string with name of the submitted var which holds the key of the selected item form array + * $key key(s) of already selected item(s) from $arr, eg. '1' or '1,2' or array with keys + * $arr array with items to select, eg. $arr = array ( 'y' => 'yes','n' => 'no','m' => 'maybe'); + * $no_lang if !$no_lang send items through lang() + * $options additional options (e.g. 'multiple') + * On submit $XXX is the key of the selected item (XXX is the content of $name) + * Returns: string to set for a template or to echo into html page + */ + function select($name, $key, $arr=0,$no_lang=0,$options='',$multiple=0) + { + // should be in class common.sbox + if (!is_array($arr)) + { + $arr = array('no','yes'); + } + if (intval($multiple) > 0) + { + $options .= ' MULTIPLE SIZE="'.intval($multiple).'"'; + if (substr($name,-2) != '[]') + { + $name .= '[]'; + } + } + $out = "\n"; + + return $out; + } + + function div($content,$options='') + { + return "
\n$content
\n"; + } + + function input_hidden($vars,$value='',$ignore_empty=True) { if (!is_array($vars)) { $vars = array( $vars => $value ); } - while (list($name,$value) = each($vars)) + foreach($vars as $name => $value) { - if ($value && !($name == 'filter' && $value == 'none')) // dont need to send all the empty vars + if (is_array($value)) { - $html .= "\n"; + $value = serialize($value); + } + if (!$ignore_empty || $value && !($name == 'filter' && $value == 'none')) // dont need to send all the empty vars + { + $html .= "\n"; } } return $html; } + function textarea($name,$value='',$options='' ) + { + return "\n"; + } + function input($name,$value='',$type='',$options='' ) { - if ($type) $type = "type=$type"; - - return "\n"; + if ($type) + { + $type = 'TYPE="'.$type.'"'; + } + return "\n"; } - function submit_button($name,$lang,$onClick='') + function submit_button($name,$lang,$onClick='',$no_lang=0,$options='',$image='',$app='') { - return $this->input($name,lang($lang),'submit',$onClick ? "onClick=\"$onClick\"" : ''); + if ($image != '') + { + if (strpos($image,'.')) + { + $image = substr($image,0,strpos($image,'.')); + } + if (!($path = $GLOBALS['phpgw']->common->image($app,$image)) && + !($path = $GLOBALS['phpgw']->common->image('phpgwapi',$image))) + { + $path = $image; // name may already contain absolut path + } + $image = ' SRC="'.$path.'"'; + } + if (!$no_lang) + { + $lang = lang($lang); + } + if (($accesskey = strstr($lang,'&')) && $accesskey[1] != ' ' && + (($pos = strpos($accesskey,';')) === False || $pos > 5)) + { + $lang_u = str_replace('&'.$accesskey[1],''.$accesskey[1].'',$lang); + $lang = str_replace('&','',$lang); + $options = 'ACCESSKEY="'.$accesskey[1].'" '.$options; + } + else + { + $accesskey = ''; + $lang_u = $lang; + } + if ($onClick) $options .= " onClick=\"$onClick\""; + + // '; } - /* - * create absolute link: $url: phpgw-relative link, may include query - * $vars: query or array with query - */ + /*! + @function link + @abstract creates an absolut link + the query / get-variables + @param $url phpgw-relative link, may include query / get-vars + @parm $vars query or array ('name' => 'value', ...) with query + @example link('/index.php?menuaction=infolog.uiinfolog.get_list',array('info_id' => 123)) + @example = 'http://domain/phpgw-path/index.php?menuaction=infolog.uiinfolog.get_list&info_id=123' + @result absolut link already run through $phpgw->link + */ function link($url,$vars='') { - if (is_array( $vars )) + if (!is_array($vars)) { - $v = array( ); - while(list($name,$value) = each($vars)) - { - if ($value && !($name == 'filter' && $value == 'none')) // dont need to send all the empty vars - { - $v[] = "$name=$value"; - } - } - $vars = implode('&',$v); + $vars = explode('&',$vars); } list($url,$v) = explode('?',$url); // url may contain additional vars if ($v) - $vars .= ($vars ? '&' : '') . $v; - + { + $vars += explode('&',$v); + } return $GLOBALS['phpgw']->link($url,$vars); } @@ -77,49 +185,74 @@ class html return "\n"; } - function form($content,$hidden_vars,$url,$url_vars='',$method='POST') + function form($content,$hidden_vars,$url,$url_vars='',$name='',$options='',$method='POST') { - $html = "
link($url,$url_vars)."\">\n"; + $html = "link($url,$url_vars)."\" $options>\n"; $html .= $this->input_hidden($hidden_vars); - if ($content) { + if ($content) + { $html .= $content; $html .= "
\n"; } return $html; } - function form_1button($name,$lang,$hidden_vars,$url,$url_vars='', - $method='POST') + function form_1button($name,$lang,$hidden_vars,$url,$url_vars='',$form_name='',$method='POST') { return $this->form($this->submit_button($name,$lang), - $hidden_vars,$url,$url_vars,$method); + $hidden_vars,$url,$url_vars,$form_name,'',$method); } - /* - * Example: $rows = array ( '1' => array( 1 => 'cell1', '.1' => 'colspan=3', - * 2 => 'cell2', - * 3 => '3,, '.3' => 'width="10%"' ), - * '.1' => 'bgcolor="#0000FF"' ); - * table($rows,'width="100%"'); - */ - function table($rows,$params = '') + /*! + @function table + @abstracts creates table from array with rows + @discussion abstract the html stuff + @param $rows array with rows, each row is an array of the cols + @param $options options for the table-tag + @example $rows = array ( '1' => array( 1 => 'cell1', '.1' => 'colspan=3', + @example 2 => 'cell2', 3 => 'cell3', '.3' => 'width="10%"' ), + @example '.1' => 'BGCOLOR="#0000FF"' ); + @example table($rows,'WIDTH="100%"') = '
cell1cell2cell3
' + @result string with html-code of the table + */ + function table($rows,$options = '',$no_table_tr=False) { - $html = "\n"; + $html = $no_table_tr ? '' : "
\n"; - while (list($key,$row) = each($rows)) { + foreach($rows as $key => $row) + { if (!is_array($row)) + { continue; // parameter - $html .= "\t\n"; - while (list($key,$cell) = each($row)) { - if ($key[0] == '.') - continue; // parameter - $html .= "\t\t\n"; } - $html .= "\t\n"; + $html .= $no_table_tr && $key == 1 ? '' : "\t\n"; + + foreach($row as $key => $cell) + { + if ($key[0] == '.') + { + continue; // parameter + } + $table_pos = strpos($cell,'$cell\n"; + } + } + $html .= "\t\n"; + } + $html .= "
$cell
\n"; + + if ($no_table_tr) + { + $html = substr($html,0,-16); } - $html .= "\n"; - return $html; } @@ -134,28 +267,116 @@ class html return $html; } - function image( $app,$name,$title='',$opts='' ) + function image( $app,$name,$title='',$options='' ) { - $html = 'common->image($app,$name))) + { + $path = $name; // name may already contain absolut path + } + if (!@is_readable($_SERVER['DOCUMENT_ROOT'] . $path)) + { + return $title; + } if ($title) { - $html .= " alt=\"$title\" title=\"$title\""; + $options .= " $this->prefered_img_title=\"".htmlspecialchars($title).'"'; } - if ($opts) - { - $html .= " $opts"; - } - return $html . '>'; + return ""; } function a_href( $content,$url,$vars='',$options='') { + if (!strstr($url,'/') && count(explode('.',$url)) == 3) + { + $url = "/index.php?menuaction=$url"; + } + if (is_array($url)) + { + $vars = $url; + $url = '/index.php'; + } return ''.$content.''; } - + function bold($content) { return ''.$content.''; } + + function italic($content) + { + return ''.$content.''; + } + + function hr($width,$options='') + { + if ($width) + $options .= " WIDTH=$width"; + return "
\n"; + } + + /*! + @function formatOptions + @abstract formats option-string for most of the above functions + @param $options String (or Array) with option-values eg. '100%,,1' + @param $names String (or Array) with the option-names eg. 'WIDTH,HEIGHT,BORDER' + @example formatOptions('100%,,1','WIDTH,HEIGHT,BORDER') = ' WIDTH="100%" BORDER="1"' + @result option string + */ + function formatOptions($options,$names) + { + if (!is_array($options)) $options = explode(',',$options); + if (!is_array($names)) $names = explode(',',$names); + + while (list($n,$val) = each($options)) + if ($val != '' && $names[$n] != '') + $html .= ' '.$names[$n].'="'.$val.'"'; + + return $html; + } + + /*! + @function themeStyles + @abstract returns simple stylesheet (incl. " : ''; + } + + function label($content,$id='',$accesskey='',$options='') + { + if ($id != '') + { + $id = " FOR=\"$id\""; + } + if ($accesskey != '') + { + $accesskey = " ACCESSKEY=\"$accesskey\""; + } + return "$content"; + } } diff --git a/calendar/inc/class.socalendar.inc.php b/calendar/inc/class.socalendar.inc.php index 10055fcc7b..782ff2d86a 100755 --- a/calendar/inc/class.socalendar.inc.php +++ b/calendar/inc/class.socalendar.inc.php @@ -23,6 +23,7 @@ var $owner; var $g_owner; var $is_group = False; + var $datetime; var $filter; var $cat_id; @@ -133,43 +134,31 @@ return $this->get_event_ids(True,$sql); } - function list_events_keyword($keywords) + function list_events_keyword($keywords,$members='') { -// $sql = 'AND (phpgw_cal_user.cal_login='.$this->owner.') '; - $o = $this->owner; - $type = $GLOBALS['phpgw']->accounts->get_type($o); - - if($type == 'g') + if (!$members) { - $members = $GLOBALS['phpgw']->acl->get_ids_for_location($o, 1, 'phpgw_group'); - } - else - { - $members[0] = $o; + $members[] = $this->owner; } + $sql = 'AND (phpgw_cal_user.cal_login IN ('.implode(',',$members).')) AND '. + '(phpgw_cal_user.cal_login='.intval($this->owner).' OR phpgw_cal.is_public=1) AND ('; - $sql = 'AND (phpgw_cal_user.cal_login='.$members[0]; - - for($i=1; $i $word) { - $sql .= ' OR phpgw_cal_user.cal_login='.$members[$i]; + $sql .= $i > 0 ? ' OR ' : ''; + $sql .= "(UPPER(phpgw_cal.title) LIKE UPPER('%".addslashes($word)."%') OR " + . "UPPER(phpgw_cal.description) LIKE UPPER('%".addslashes($word)."%') OR " + . "UPPER(phpgw_cal.location) LIKE UPPER('%".addslashes($word)."%') OR " + . "UPPER(phpgw_cal_extra.cal_extra_value) LIKE UPPER('%".addslashes($word)."%'))"; } $sql .= ') '; - $words = split(' ',$keywords); - for ($i=0;$i0?' OR ':''); - $sql .= "(UPPER(phpgw_cal.title) LIKE UPPER('%".$words[$i]."%') OR " - . "UPPER(phpgw_cal.description) LIKE UPPER('%".$words[$i]."%'))"; - $sql .= ($i==count($words) - 1?') ':''); - } - $sql .= (strpos($this->filter,'private')?'AND phpgw_cal.is_public=0 ':''); - $sql .= ($this->cat_id?"AND phpgw_cal.category like '%".$this->cat_id."%' ":''); - $sql .= 'ORDER BY phpgw_cal.datetime ASC, phpgw_cal.edatetime ASC, phpgw_cal.priority ASC'; - return $this->get_event_ids(False,$sql); + $sql .= ($this->cat_id? "AND (phpgw_cal.category='$this->cat_id' OR phpgw_cal.category like '%,".$this->cat_id.",%') ":''); + $sql .= 'ORDER BY phpgw_cal.datetime DESC, phpgw_cal.edatetime DESC, phpgw_cal.priority ASC'; + + return $this->get_event_ids(False,$sql,True); } function read_from_store($startYear,$startMonth,$startDay,$endYear='',$endMonth='',$endDay='') @@ -183,9 +172,9 @@ return $events_cached; } - function get_event_ids($include_repeats=False, $sql='') + function get_event_ids($search_repeats=False, $sql='',$search_extra=False) { - return $this->cal->get_event_ids($include_repeats,$sql); + return $this->cal->get_event_ids($search_repeats,$sql,$search_extra); } function find_uid($uid) @@ -212,6 +201,16 @@ $this->cal->store_event($event); } + function save_alarm($cal_id,$alarm,$id=0) + { + $this->cal->save_alarm($cal_id,$alarm,$id); + } + + function delete_alarm($id) + { + $this->cal->delete_alarm($id); + } + function delete_entry($id) { $this->cal->delete_event($id); @@ -237,6 +236,7 @@ { $id = $this->cal->stream->f('cal_id'); $db2->query('SELECT count(*) FROM phpgw_cal_user WHERE cal_id='.$id.' AND cal_login='.$new_owner,__LINE__,__FILE__); + $db2->next_record(); if($db2->f(0) == 0) { $db2->query('UPDATE phpgw_cal_user SET cal_login='.$new_owner.' WHERE cal_id='.$id.' AND cal_login='.$account_id,__LINE__,__FILE__); @@ -255,15 +255,31 @@ $this->cal->set_status($id,$this->owner,$status); } - function get_alarm($id) + function get_alarm($cal_id) { - if($GLOBALS['phpgw_info']['server']['calendar_type'] == 'sql') + if (!method_exists($this->cal,'get_alarm')) { - return $this->cal->get_alarm($id); + return False; } - else + return $this->cal->get_alarm($cal_id); + } + + function read_alarm($id) + { + if (!method_exists($this->cal,'read_alarm')) { + return False; } + return $this->cal->read_alarm($id); + } + + function read_alarms($cal_id) + { + if (!method_exists($this->cal,'read_alarms')) + { + return False; + } + return $this->cal->read_alarms($cal_id); } function find_recur_exceptions($event_id) diff --git a/calendar/inc/class.socalendar__.inc.php b/calendar/inc/class.socalendar__.inc.php index 663642ab5a..8adb8823d2 100755 --- a/calendar/inc/class.socalendar__.inc.php +++ b/calendar/inc/class.socalendar__.inc.php @@ -40,7 +40,7 @@ if(extension_loaded('mcal') == False) define('MCAL_M_FRIDAY',32); define('MCAL_M_SATURDAY',64); - define('MCAL_M_WEEKDAYS',63); + define('MCAL_M_WEEKDAYS',62); define('MCAL_M_WEEKEND',65); define('MCAL_M_ALLDAYS',127); } @@ -51,6 +51,7 @@ define('MSG_ADDED',2); define('MSG_REJECTED',3); define('MSG_TENTATIVE',4); define('MSG_ACCEPTED',5); +define('MSG_ALARM',6); define('REJECTED',0); define('NO_RESPONSE',1); @@ -68,10 +69,6 @@ class socalendar__ function socalendar__() { - if(!is_object($GLOBALS['phpgw']->datetime)) - { - $GLOBALS['phpgw']->datetime = createobject('phpgwapi.datetime'); - } } function maketime($time) diff --git a/calendar/inc/class.socalendar_sql.inc.php b/calendar/inc/class.socalendar_sql.inc.php index 0c4eb6a191..1321793fa0 100755 --- a/calendar/inc/class.socalendar_sql.inc.php +++ b/calendar/inc/class.socalendar_sql.inc.php @@ -31,6 +31,12 @@ class socalendar_ extends socalendar__ function socalendar_() { $this->socalendar__(); + + if (!is_object($GLOBALS['phpgw']->asyncservice)) + { + $GLOBALS['phpgw']->asyncservice = CreateObject('phpgwapi.asyncservice'); + } + $this->async = &$GLOBALS['phpgw']->asyncservice; } function open($calendar='',$user='',$passwd='',$options='') @@ -96,6 +102,111 @@ class socalendar_ extends socalendar__ return $calendar; } + /*! + @function read_alarms + @abstract read the alarms of a calendar-event specified by $cal_id + @returns array of alarms with alarm-id as key + @note the alarm-id is a string of 'cal:'.$cal_id.':'.$alarm_nr, it is used as the job-id too + */ + function read_alarms($cal_id) + { + $alarms = array(); + + if ($jobs = $this->async->read('cal:'.intval($cal_id).':%')) + { + foreach($jobs as $id => $job) + { + $alarm = $job['data']; // text, enabled + $alarm['id'] = $id; + $alarm['time'] = $job['next']; + + $alarms[$id] = $alarm; + } + } + return $alarms; + } + + /*! + @function read_alarm + @abstract read a single alarm specified by it's $id + @returns array with data of the alarm + @note the alarm-id is a string of 'cal:'.$cal_id.':'.$alarm_nr, it is used as the job-id too + */ + function read_alarm($id) + { + if (!($jobs = $this->async->read($id))) + { + return False; + } + list($id,$job) = each($jobs); + $alarm = $job['data']; // text, enabled + $alarm['id'] = $id; + $alarm['time'] = $job['next']; + + //echo "

read_alarm('$id')="; print_r($alarm); echo "

\n"; + return $alarm; + } + + /*! + @function save_alarm + @abstract saves a new or updated alarm + @syntax save_alarm($cal_id,$alarm,$id=False) + @param $cal_id Id of the calendar-entry + @param $alarm array with fields: text, owner, enabled, .. + */ + function save_alarm($cal_id,$alarm) + { + //echo "

save_alarm(cal_id=$cal_id, alarm="; print_r($alarm); echo ")

\n"; + if (!($id = $alarm['id'])) + { + $alarms = $this->read_alarms($cal_id); // find a free alarm# + $n = count($alarms); + do + { + $id = 'cal:'.intval($cal_id).':'.$n; + ++$n; + } + while (@isset($alarms[$id])); + } + else + { + $this->async->cancel_timer($id); + } + $alarm['cal_id'] = $cal_id; // we need the back-reference + + if (!$this->async->set_timer($alarm['time'],$id,'calendar.bocalendar.send_alarm',$alarm)) + { + return False; + } + return $id; + } + + /*! + @function delete_alarms($cal_id) + @abstract delete all alarms of a calendar-entry + @returns the number of alarms deleted + */ + function delete_alarms($cal_id) + { + $alarms = $this->read_alarms($cal_id); + + foreach($alarms as $id => $alarm) + { + $this->async->cancel_timer($id); + } + return count($alarms); + } + + /*! + @function delete_alarm($id) + @abstract delete one alarms identified by its id + @returns the number of alarms deleted + */ + function delete_alarm($id) + { + return $this->async->cancel_timer($id); + } + function fetch_event($event_id,$options='') { if(!isset($this->stream)) @@ -103,7 +214,9 @@ class socalendar_ extends socalendar__ return False; } - $this->stream->lock(array('phpgw_cal','phpgw_cal_user','phpgw_cal_repeats','phpgw_cal_alarm')); + $event_id = intval($event_id); + + $this->stream->lock(array('phpgw_cal','phpgw_cal_user','phpgw_cal_repeats','phpgw_cal_extra'/* OLD-ALARM,'phpgw_cal_alarm'*/)); $this->stream->query('SELECT * FROM phpgw_cal WHERE cal_id='.$event_id,__LINE__,__FILE__); @@ -210,8 +323,20 @@ class socalendar_ extends socalendar__ } } + // Custom fields + $this->stream->query('SELECT * FROM phpgw_cal_extra WHERE cal_id='.$event_id,__LINE__,__FILE__); + if($this->stream->num_rows()) + { + while($this->stream->next_record()) + { + $this->add_attribute('#'.$this->stream->f('cal_extra_name'),$this->stream->f('cal_extra_value')); + } + } + +/* OLD-ALARM if($this->event['reference']) { + // What is event['reference']??? $alarm_cal_id = $event_id.','.$this->event['reference']; } else @@ -219,7 +344,9 @@ class socalendar_ extends socalendar__ $alarm_cal_id = $event_id; } - $this->stream->query('SELECT * FROM phpgw_cal_alarm WHERE cal_id in ('.$alarm_cal_id.') AND cal_owner='.$this->user,__LINE__,__FILE__); + //echo ''."\n"; + //$this->stream->query('SELECT * FROM phpgw_cal_alarm WHERE cal_id in ('.$alarm_cal_id.') AND cal_owner='.$this->user,__LINE__,__FILE__); + $this->stream->query('SELECT * FROM phpgw_cal_alarm WHERE cal_id='.$event_id.' AND cal_owner='.$this->user,__LINE__,__FILE__); if($this->stream->num_rows()) { while($this->stream->next_record()) @@ -232,6 +359,7 @@ class socalendar_ extends socalendar__ ); } } +*/ } else { @@ -240,6 +368,15 @@ class socalendar_ extends socalendar__ $this->stream->unlock(); + if ($this->event) + { + $this->event['alarm'] = $this->read_alarms($event_id); + + if($this->event['reference']) + { + $this->event['alarm'] += $this->read_alarms($event_id); + } + } return $this->event; } @@ -340,7 +477,6 @@ class socalendar_ extends socalendar__ function expunge() { - reset($this->deleted_events); if(count($this->deleted_events) <= 0) { return 1; @@ -350,43 +486,51 @@ class socalendar_ extends socalendar__ 'phpgw_cal', 'phpgw_cal_user', 'phpgw_cal_repeats', - 'phpgw_cal_alarm' + 'phpgw_cal_extra' +// OLD-ALARM 'phpgw_cal_alarm' ); $this->stream->lock($locks); - for($i=0;$ideleted_events);$i++) + foreach($this->deleted_events as $cal_id) { - for($k=0;$kstream->query('DELETE FROM '.$locks[$k].' WHERE cal_id='.$this->deleted_events[$i],__LINE__,__FILE__); + $this->stream->query('DELETE FROM '.$table.' WHERE cal_id='.$cal_id,__LINE__,__FILE__); } } $this->stream->unlock(); + + foreach($this->deleted_events as $cal_id) + { + $this->delete_alarms($cal_id); + } + $this->deleted_events = array(); + $this->event = $this_event; return 1; } /***************** Local functions for SQL based Calendar *****************/ - function get_event_ids($search_repeats=False,$extra='') + function get_event_ids($search_repeats=False,$extra='',$search_extra=False) { - if($search_repeats == True) + $from = $where = ' '; + if($search_repeats) { - $repeats_from = ', phpgw_cal_repeats '; - $repeats_where = 'AND (phpgw_cal_repeats.cal_id = phpgw_cal.cal_id) '; + $from = ', phpgw_cal_repeats '; + $where = 'AND (phpgw_cal_repeats.cal_id = phpgw_cal.cal_id) '; } - else + if($search_extra) { - $repeats_from = ' '; - $repeats_where = ''; + $from .= 'LEFT JOIN phpgw_cal_extra ON phpgw_cal_extra.cal_id = phpgw_cal.cal_id '; } - + $sql = 'SELECT DISTINCT phpgw_cal.cal_id,' . 'phpgw_cal.datetime,phpgw_cal.edatetime,' . 'phpgw_cal.priority ' . 'FROM phpgw_cal, phpgw_cal_user' - . $repeats_from + . $from . 'WHERE (phpgw_cal_user.cal_id = phpgw_cal.cal_id) ' - . $repeats_where . $extra; + . $where . $extra; if($this->debug) { @@ -421,7 +565,9 @@ class socalendar_ extends socalendar__ $locks = Array( 'phpgw_cal', 'phpgw_cal_user', - 'phpgw_cal_repeats' + 'phpgw_cal_repeats', + 'phpgw_cal_extra' +// OLD-ALARM 'phpgw_cal_alarm' ); $this->stream->lock($locks); if($event['id'] == 0) @@ -451,14 +597,6 @@ class socalendar_ extends socalendar__ } $event['uid'] = $part[0].'-'.$part[1].'@'.$id_suffix; } -/* makes problems if tempnam is to long for title column, see bug #3162 - $temp_name = tempnam($GLOBALS['phpgw_info']['server']['temp_dir'],'cal'); - $this->stream->query('INSERT INTO phpgw_cal(uid,title,owner,priority,is_public,category) ' - . "values('".$event['uid']."','".$temp_name."',".$event['owner'].','.$event['priority'].','.$event['public'].",'".$event['category']."')"); - $this->stream->query("SELECT cal_id FROM phpgw_cal WHERE title='".$temp_name."'"); - $this->stream->next_record(); - $event['id'] = $this->stream->f('cal_id'); -*/ $this->stream->query('INSERT INTO phpgw_cal(uid,title,owner,priority,is_public,category) ' . "values('".$event['uid']."','".$this->stream->db_addslashes($event['title']) . "',".$event['owner'].','.$event['priority'].','.$event['public'].",'" @@ -490,7 +628,7 @@ class socalendar_ extends socalendar__ . 'is_public='.$event['public'].', ' . "title='".$this->stream->db_addslashes($event['title'])."', " . "description='".$this->stream->db_addslashes($event['description'])."', " - . "location='".$event['location']."', " + . "location='".$this->stream->db_addslashes($event['location'])."', " . ($event['groups']?"groups='".(count($event['groups'])>1?implode(',',$event['groups']):','.$event['groups'][0].',')."', ":'') . 'reference='.$event['reference'].' ' . 'WHERE cal_id='.$event['id']; @@ -502,7 +640,6 @@ class socalendar_ extends socalendar__ @reset($event['participants']); while (list($key,$value) = @each($event['participants'])) { -// if(intval($key) == intval($this->user)) if(intval($key) == $event['owner']) { $value = 'A'; @@ -545,16 +682,59 @@ class socalendar_ extends socalendar__ { $this->stream->query('DELETE FROM phpgw_cal_repeats WHERE cal_id='.$event['id'],__LINE__,__FILE__); } + // Custom fields + $this->stream->query('DELETE FROM phpgw_cal_extra WHERE cal_id='.$event['id'],__LINE__,__FILE__); + foreach($event as $name => $value) + { + if ($name[0] == '#' && strlen($value)) + { + $this->stream->query('INSERT INTO phpgw_cal_extra (cal_id,cal_extra_name,cal_extra_value) ' + . 'VALUES('.$event['id'].",'".addslashes(substr($name,1))."','".addslashes($value)."')",__LINE__,__FILE__); + } + } +/* + $alarmcount = count($event['alarm']); + if ($alarmcount > 1) + { + // this should never happen, $event['alarm'] should only be set + // if creating a new event and uicalendar only sets up 1 alarm + // the user must use "Alarm Management" to create/establish multiple + // alarms or to edit/change an alarm + echo ''."\n"; + $this->stream->unlock(); + return True; + } + + if ($alarmcount == 1) + { + + list($key,$alarm) = @each($event['alarm']); + + $this->stream->query('INSERT INTO phpgw_cal_alarm(cal_id,cal_owner,cal_time,cal_text,alarm_enabled) VALUES('.$event['id'].','.$event['owner'].','.$alarm['time'].",'".$alarm['text']."',".$alarm['enabled'].')',__LINE__,__FILE__); + $this->stream->query('SELECT LAST_INSERT_ID()'); + $this->stream->next_record(); + $alarm['id'] = $this->stream->f(0); + } +*/ print_debug('Event Saved: ID #',$event['id']); $this->stream->unlock(); - $GLOBALS['phpgw_info']['cal_new_event_id'] = $event['id']; + + if (is_array($event['alarm'])) + { + foreach ($event['alarm'] as $alarm) // this are all new alarms + { + $this->save_alarm($event['id'],$alarm); + } + } + $GLOBALS['phpgw_info']['cal_new_event_id'] = $event['id']; return True; } - function get_alarm($id) + function get_alarm($cal_id) { +/* OLD-ALARM $this->stream->query('SELECT cal_time, cal_text FROM phpgw_cal_alarm WHERE cal_id='.$id.' AND cal_owner='.$this->user,__LINE__,__FILE__); if($this->stream->num_rows()) { @@ -569,6 +749,18 @@ class socalendar_ extends socalendar__ { return False; } +*/ + $alarms = $this->read_alarms($cal_id); + $ret = False; + + foreach($alarms as $alarm) + { + if ($alarm['owner'] == $this->user || !$alarm['owner']) + { + $ret[$alarm['time']] = $alarm['text']; + } + } + return $ret; } function set_status($id,$owner,$status) @@ -581,6 +773,12 @@ class socalendar_ extends socalendar__ ); $this->stream->query("UPDATE phpgw_cal_user SET cal_status='".$status_code_short[$status]."' WHERE cal_id=".$id." AND cal_login=".$owner,__LINE__,__FILE__); +/* OLD-ALARM + if ($status == 'R') + { + $this->stream->query('UPDATE phpgw_cal_alarm set alarm_enabled=0 where cal_id='.$id.' and cal_owner='.$owner,__LINE__,__FILE__); + } +*/ return True; } @@ -619,4 +817,57 @@ class socalendar_ extends socalendar__ { return $this->localdates(mktime(0,0,0,intval(substr($d,4,2)),intval(substr($d,6,2)),intval(substr($d,0,4)))); } + + function list_dirty_events($lastmod=-1,$repeats=false) + { + if(!isset($this->stream)) + { + return False; + } + $lastmod = intval($lastmod); + $repeats = (bool) $repeats; + + $user_where = " AND phpgw_cal_user.cal_login = $this->user"; + + $member_groups = $GLOBALS['phpgw']->accounts->membership($this->user); + @reset($member_groups); + while($member_groups != False && list($key,$group_info) = each($member_groups)) + { + $member[] = $group_info['account_id']; + } + @reset($member); +// $user_where .= ','.implode(',',$member); + //$user_where .= ')) '; + + if($this->debug) + { + echo ''."\n"; + } + + if($lastmod > 0) + { + $wheremod = "AND mdatetime = $lastmod"; + } + + $order_by = ' ORDER BY phpgw_cal.cal_id ASC'; + if($this->debug) + { + echo "SQL : ".$user_where.$wheremod.$extra."
\n"; + } + return $this->get_event_ids($repeats,$user_where.$wheremod.$extra.$order_by); + } + +/* OLD-ALARM + function add_alarm($eventid,$alarm,$owner) + { + $this->stream->query('INSERT INTO phpgw_cal_alarm(cal_id,cal_owner,cal_time,cal_text,alarm_enabled) VALUES('.$eventid.','.$owner.','.$alarm['time'].",'".$alarm['text']."',1)",__LINE__,__FILE__); + $this->stream->query('SELECT LAST_INSERT_ID()'); + $this->stream->next_record(); + return($this->stream->f(0)); + } + function delete_alarm($alarmid) + { + $this->stream->query('DELETE FROM phpgw_cal_alarm WHERE alarm_id='.$alarmid,__LINE__,__FILE__); + } +*/ } diff --git a/calendar/inc/class.soholiday.inc.php b/calendar/inc/class.soholiday.inc.php index 32e09ed8a8..66ee81f435 100755 --- a/calendar/inc/class.soholiday.inc.php +++ b/calendar/inc/class.soholiday.inc.php @@ -19,9 +19,7 @@ function soholiday() { - global $phpgw; - - $this->db = $phpgw->db; + $this->db = $GLOBALS['phpgw']->db; } /* Begin Holiday functions */ @@ -49,14 +47,12 @@ function store_to_array(&$holidays) { - global $phpgw; - while($this->db->next_record()) { $holidays[] = Array( 'index' => $this->db->f('hol_id'), 'locale' => $this->db->f('locale'), - 'name' => $phpgw->strip_html($this->db->f('name')), + 'name' => $GLOBALS['phpgw']->strip_html($this->db->f('name')), 'day' => intval($this->db->f('mday')), 'month' => intval($this->db->f('month_num')), 'occurence' => intval($this->db->f('occurence')), @@ -65,15 +61,13 @@ ); if($this->debug) { - echo "Holiday ID: ".$this->db->f("hol_id")."
\n"; + echo 'Holiday ID: '.$this->db->f('hol_id').'
'."\n"; } } } function read_holidays($locales='',$query='',$order='',$year=0) { - global $phpgw; - $holidays = Array(); if($locales == '') @@ -85,7 +79,7 @@ if($this->debug) { - echo "Read Holidays : ".$sql."
\n"; + echo 'Read Holidays : '.$sql.'
'."\n"; } $this->db->query($sql,__LINE__,__FILE__); @@ -98,7 +92,7 @@ $holidays = Array(); if($this->debug) { - echo "Reading Holiday ID : ".$id."
\n"; + echo 'Reading Holiday ID : '.$id.'
'."\n"; } $this->db->query('SELECT * FROM phpgw_cal_holidays WHERE hol_id='.$id,__LINE__,__FILE__); $this->store_to_array($holidays); @@ -186,7 +180,7 @@ if($this->debug) { - echo "HOLIDAY_TOTAL : ".$sql."
\n"; + echo 'HOLIDAY_TOTAL : '.$sql.'
'."\n"; } $this->db->query($sql,__LINE__,__FILE__); diff --git a/calendar/inc/class.uialarm.inc.php b/calendar/inc/class.uialarm.inc.php index 8dea84dcb4..1390141fa0 100755 --- a/calendar/inc/class.uialarm.inc.php +++ b/calendar/inc/class.uialarm.inc.php @@ -46,27 +46,25 @@ { echo "BO Owner : ".$this->bo->owner."
\n"; } - $this->template_dir = $GLOBALS['phpgw']->common->get_tpl_dir('calendar'); + + $this->html = CreateObject('calendar.html'); } function prep_page() { $this->event = $this->bo->read_entry($this->bo->cal_id); - - $can_edit = $this->bo->cal->check_perms(PHPGW_ACL_EDIT,$this->event); +/* + $can_edit = $this->bo->bo->check_perms(PHPGW_ACL_EDIT,$this->event); if(!$can_edit) { - Header('Location : '.$GLOBALS['phpgw']->link('/index.php', - Array( - 'menuaction' => 'calendar.uicalendar.view', - 'cal_id' => $this->bo->cal_id - ) - ) - ); + $GLOBALS['phpgw']->redirect_link('/index.php',Array( + 'menuaction' => 'calendar.uicalendar.view', + 'cal_id' => $this->bo->cal_id + )); } - +*/ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Alarm Management'); @@ -74,7 +72,7 @@ $this->template = CreateObject('phpgwapi.Template',$this->template_dir); - $this->template->set_unknowns('keep'); + $this->template->set_unknowns('remove'); $this->template->set_file( Array( 'alarm' => 'alarm.tpl' @@ -84,10 +82,15 @@ $this->template->set_block('alarm','alarm_headers','alarm_headers'); $this->template->set_block('alarm','list','list'); $this->template->set_block('alarm','hr','hr'); + $this->template->set_block('alarm','buttons','buttons'); } function output_template_array($row,$list,$var) { + if (!isset($var['tr_color'])) + { + $var['tr_color'] = $GLOBALS['phpgw']->nextmatchs->alternate_row_color(); + } $this->template->set_var($var); $this->template->parse($row,$list,True); } @@ -96,48 +99,106 @@ function manager() { - $this->prep_page(); - ExecMethod('calendar.uicalendar.view_event',$this->event); - echo "
\n"; - $GLOBALS['phpgw']->template->set_var(array( - 'hr_text' => lang('Alarms').':', - 'button_left' => '', - 'button_center' => '', - 'button_right' => '' - )); - $GLOBALS['phpgw']->template->fp('row','hr',True); - $GLOBALS['phpgw']->template->fp('phpgw_body','view_event'); - - - $var = Array( - 'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.uialarm.form_handler')), - 'time_lang' => lang('Time'), - 'text_lang' => lang('Text'), - 'enabled_pict' => $GLOBALS['phpgw']->common->image('calendar','enabled.gif'), - 'disabled_pict' => $GLOBALS['phpgw']->common->image('calendar','disabled.gif') - ); - $this->output_template_array('row','alarm_headers',$var); - - if($this->event['alarm']) + if ($_POST['delete'] && count($_POST['alarm'])) { - @reset($this->event['alarm']); - while(list($key,$alarm) = each($this->event['alarm'])) + if ($this->bo->delete($_POST['alarm']) < 0) { - $var = Array( - 'edit_box' => '', - 'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']), - 'data' => $alarm['text'], - 'alarm_enabled' => ($alarm['enabled']?'enabled':' '), - 'alarm_disabled' => (!$alarm['enabled']?'disabled':' ') - ); - $this->output_template_array('row','list',$var); + echo '
'.lang('You do not have permission to delete this alarm !!!').'
'; + $GLOBALS['phpgw']->common->phpgw_exit(True); + } + } + if (($_POST['enable'] || $_POST['disable']) && count($_POST['alarm'])) + { + if ($this->bo->enable($_POST['alarm'],$_POST['enable']) < 0) + { + echo '
'.lang('You do not have permission to enable/disable this alarm !!!').'
'; + $GLOBALS['phpgw']->common->phpgw_exit(True); } } - $this->template->fp('phpgw_body','alarm_management'); - } - - function add_alarm() - { $this->prep_page(); + + if ($_POST['add']) + { + $time = intval($_POST['time']['days'])*24*3600 + + intval($_POST['time']['hours'])*3600 + + intval($_POST['time']['mins'])*60; + + if ($time > 0 && !$this->bo->add($this->event,$time,$_POST['owner'])) + { + echo '
'.lang('You do not have permission to add alarms to this event !!!').'
'; + $GLOBALS['phpgw']->common->phpgw_exit(True); + } + } + if (!ExecMethod('calendar.uicalendar.view_event',$this->event)) + { + echo '
'.lang('You do not have permission to read this record!').'
'; + $GLOBALS['phpgw']->common->phpgw_exit(True); + } + echo "
\n"; + $GLOBALS['phpgw']->template->set_var('th_bg',$this->theme['th_bg']); + $GLOBALS['phpgw']->template->set_var('hr_text',lang('Alarms').':'); + $GLOBALS['phpgw']->template->fp('row','hr',True); + $GLOBALS['phpgw']->template->pfp('phpgw_body','view_event'); + + $var = Array( + 'tr_color' => $this->theme['th_bg'], + 'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.uialarm.manager')), + 'hidden_vars' => $this->html->input_hidden('cal_id',$this->bo->cal_id), + 'lang_select' => lang('Select'), + 'lang_time' => lang('Time'), + 'lang_text' => lang('Text'), + 'lang_owner' => lang('Owner'), + 'lang_enabled' => lang('enabled'), + 'lang_disabled' => lang('disabled'), + 'lang_enabled' => lang('enabled'), + 'lang_disabled' => lang('disabled') + ); + if($this->event['alarm']) + { + $this->output_template_array('rows','alarm_headers',$var); + + foreach($this->event['alarm'] as $key => $alarm) + { + if (!$this->bo->check_perms(PHPGW_ACL_READALARM,$alarm['owner'])) + { + continue; + } + $var = Array( + 'field' => $GLOBALS['phpgw']->common->show_date($alarm['time']), + //'data' => $alarm['text'], + 'data' => 'Email Notification', + 'owner' => $GLOBALS['phpgw']->common->grab_owner_name($alarm['owner']), + 'enabled' => ($alarm['enabled']?'': + ''), + 'select' => '' + ); + if ($this->bo->check_perms(PHPGW_ACL_DELETEALARM,$alarm['owner'])) + { + ++$to_delete; + } + $this->output_template_array('rows','list',$var); + } + $this->template->set_var('enable_button',$this->html->submit_button('enable','Enable')); + $this->template->set_var('disable_button',$this->html->submit_button('disable','Disable')); + if ($to_delete) + { + $this->template->set_var('delete_button',$this->html->submit_button('delete','Delete',"return confirm('".lang("Are you sure\\nyou want to\\ndelete these alarms?")."')")); + } + $this->template->parse('rows','buttons',True); + } + if (isset($this->event['participants'][intval($GLOBALS['phpgw_info']['user']['account_id'])])) + { + $this->template->set_var(Array( + 'input_text' => lang('Email reminder'), + 'input_days' => $this->html->select('time[days]',$_POST['time']['days'],range(0,31),True).' '.lang('days'), + 'input_hours' => $this->html->select('time[hours]',$_POST['time']['hours'],range(0,24),True).' '.lang('hours'), + 'input_minutes' => $this->html->select('time[mins]',$_POST['time']['mins'],range(0,60),True).' '.lang('minutes').' '.lang('before the event'), + 'input_owner' => $this->html->select('owner',$GLOBALS['phpgw_info']['user']['account_id'],$this->bo->participants($this->event,True),True), + 'input_add' => $this->html->submit_button('add','Add Alarm') + )); + } +//echo "

alarm_management='".htmlspecialchars($this->template->get_var('alarm_management'))."'

\n"; + $this->template->pfp('out','alarm_management'); } } +?> diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index 45eb5b8583..ae8667fbf1 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -24,7 +24,7 @@ var $holidays; var $holiday_color; - + var $debug = False; // var $debug = True; @@ -77,12 +77,14 @@ 'edit_status' => True, 'set_action' => True, 'planner' => True, + 'modify_ext_partlist' => True, 'matrixselect' => True, 'viewmatrix' => True, 'search' => True, 'header' => True, 'footer' => True, - 'css' => True + 'css' => True, + 'accounts_popup' => True ); function uicalendar() @@ -93,12 +95,12 @@ $this->theme = $GLOBALS['phpgw_info']['theme']; $this->bo = CreateObject('calendar.bocalendar',1); + $this->cat = &$this->bo->cat; print_debug('BO Owner',$this->bo->owner); $this->template = $GLOBALS['phpgw']->template; $this->template_dir = $GLOBALS['phpgw']->common->get_tpl_dir('calendar'); - $this->cat = CreateObject('phpgwapi.categories'); $this->holiday_color = (substr($this->theme['bg06'],0,1)=='#'?'':'#').$this->theme['bg06']; @@ -120,39 +122,17 @@ if($this->bo->use_session) { // save return-fkt for add, view, ... - list(,,$fkt) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); + list(,,$fkt) = explode('.',$_GET['menuaction']); if ($fkt == 'day' || $fkt == 'week' || $fkt == 'month' || $fkt == 'year' || $fkt == 'planner') { - $this->bo->return_to = $GLOBALS['HTTP_GET_VARS']['menuaction']. + $this->bo->return_to = $_GET['menuaction']. sprintf('&date=%04d%02d%02d',$this->bo->year,$this->bo->month,$this->bo->day); } $this->bo->save_sessiondata(); } - print_debug('UI',$this->_debug_sqsof()); - } + $this->always_app_header = $this->bo->prefs['common']['template_set'] == 'idots'; - /*! - @function error_exit - @abstract shows $msg centered on the screen and exit - @syntax error_exit($msg) - @param $msg lang()'ed msg-text or one of the predefined messages (see below) - */ - function error_exit($msg) - { - switch($msg) - { - case 'invalid_id': - $msg = lang('Invalid entry id.'); - break; - case 'no_read_perm': - $msg = lang('You do not have permission to read this record!'); - break; - case 'not_exist': - $msg = lang('Sorry, this event does not exist'); - break; - } - $GLOBALS['phpgw']->template->set_var('phpgw_body','
'.$msg."
\n"); - exit; + print_debug('UI',$this->_debug_sqsof()); } /* Public functions */ @@ -205,7 +185,6 @@ { $mini_cal_tpl = CreateObject('phpgwapi.Template',$this->template_dir); $mini_cal_tpl->set_unknowns('remove'); - $mini_cal_tpl->set_file( Array( 'mini_calendar' => 'mini_cal.tpl' @@ -216,6 +195,7 @@ $mini_cal_tpl->set_block('mini_calendar','mini_day','mini_day'); } + if($this->bo->printer_friendly == False) { $month = '' . lang($GLOBALS['phpgw']->common->show_date($date['raw'],'F')).' '.$GLOBALS['phpgw']->common->show_date($date['raw'],'Y').''; @@ -269,7 +249,7 @@ for($i=0;$i<7;$i++) { $var = Array( - 'dayname' => '' . substr(lang($GLOBALS['phpgw']->datetime->days[$i]['name']),0,2) . '', + 'dayname' => '' . substr(lang($GLOBALS['phpgw']->datetime->days[$i]),0,2) . '', 'day_image' => '' ); $this->output_template_array($mini_cal_tpl,'daynames','mini_day',$var); @@ -281,8 +261,7 @@ { unset($var); $daily = $this->set_week_array($i - $GLOBALS['phpgw']->datetime->tz_offset,$cellcolor,$weekly); - @reset($daily); - while(list($date,$day_params) = each($daily)) + foreach($daily as $date => $day_params) { print_debug('Mini-Cal Date',$date); $year = intval(substr($date,0,4)); @@ -321,309 +300,53 @@ $return_value = $mini_cal_tpl->fp('out','mini_cal'); $mini_cal_tpl->set_var('display_monthweek',''); +// $mini_cal_tpl->set_var('daynames',''); +// unset($p); return $return_value; } function index($params='') { - Header('Location: '. $this->page('',$params)); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->redirect($this->page('',$params)); } - /*! - @function cal_header - @abstract call common::phpgw_header and shows the application-header - @syntax cal_header($func_header,$big_header) - @param $func_header function name to display beside calendar-title - @param $always_show_header or only for selected templates - */ - function cal_header($func_header = '',$always_show_header = False) - { - unset($GLOBALS['phpgw_info']['flags']['noheader']); - unset($GLOBALS['phpgw_info']['flags']['nonavbar']); - unset($GLOBALS['phpgw_info']['flags']['noappheader']); - unset($GLOBALS['phpgw_info']['flags']['noappfooter']); - if (!empty($func_header) && ($always_show_header || $GLOBALS['phpgw_info']['user']['preferences']['common']['template'] == 'idots')) - { - $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'] . - ' - ' . $func_header; - } - - function add_col(&$tpl,$str) - { - $tpl->set_var('str',$str); - $tpl->parse('header_column','head_col',True); - } - - function add_image_ahref($link,$image,$alt) - { - return ''.$alt.''; - } - - list(,,$referrer) = explode('.',MENUACTION); - - $templates = Array( - 'head_tpl' => 'head.tpl', - 'form_button_dropdown' => 'form_button_dropdown.tpl', - 'form_button_script' => 'form_button_script.tpl' - ); - $tpl = &$GLOBALS['phpgw']->template; - $tpl->set_file($templates); - $tpl->set_block('head_tpl','head','head'); - $tpl->set_block('head_tpl','head_table','head_table'); - $tpl->set_block('head_tpl','head_col','head_col'); - $tpl->set_block('form_button_script','form_button'); - - if(floor(phpversion()) >= 4) - { - $tpl->set_var('cols',8); - } - else - { - $tpl->set_var('cols',7); - } - - $today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); - - $col_width = 12; - - add_col($tpl,'  '); - - add_col($tpl,' '.add_image_ahref($this->page('day','&date='.$today),'today',lang('Today')).''); - - add_col($tpl,' '.add_image_ahref($this->page('week','&date='.$today),'week',lang('This week')).''); - - add_col($tpl,' '.add_image_ahref($this->page('month','&date='.$today),'month',lang('This month')).''); - - add_col($tpl,' '.add_image_ahref($this->page('year','&date='.$today),'year',lang('This Year')).''); - - if(floor(phpversion()) >= 4) - { - add_col($tpl,' '.add_image_ahref($this->page('planner','&date='.$today),'planner',lang('Planner')).''); - $col_width += 2; - } - - add_col($tpl,' '.add_image_ahref($this->page('matrixselect'),'view',lang('Daily Matrix View')).''); - - add_col($tpl,'  '); - - $tpl->parse('phpgw_body','head_table',True); - - $tpl->set_var('header_column',''); - $tpl->set_var('cols',$cols); - - if($referrer!='view') - { - $remainder = 72; - $cal_id = get_var('cal_id',Array('GET','DEFAULT'),0); - $keywords = get_var('keywords',Array('POST','DEFAULT'),''); - $matrixtype = get_var('matrixtype',Array('POST','DEFAULT'),''); - $participants = get_var('participants',Array('POST')); - $date = get_var('date',Array('GET','POST')); - $year = $this->bo->year; - $month = $this->bo->month; - $day = $this->bo->day; - $var_list = Array( - 'cal_id', - 'keywords', - 'matrixtype', - 'date', - 'year', - 'month', - 'day' - ); - - $base_hidden_vars = ''."\n"; - for($i=0;$i'."\n"; - } - } - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'cat_id', - 'title' => lang('Category'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => ''.$this->cat->formatted_list('select','all',$this->bo->cat_id,'True'), - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - - if(MENUACTION == 'calendar.uicalendar.planner') - { - $remainder -= 28; - print_debug('Sort By',$this->bo->sortby); - - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'sortby', - 'title' => lang('Sort By'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if($this->bo->check_perms(PHPGW_ACL_PRIVATE)) - { - $remainder -= 28; - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'filter', - 'title' => lang('Filter'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0) - { - $form_options = ''; - reset($this->bo->grants); - while(list($grantor,$temp_rights) = each($this->bo->grants)) - { - $GLOBALS['phpgw']->accounts->get_account_name($grantor,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $grantor, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($grantor)=='g'?'g_':'').$grantor, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - $memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); - while($memberships != False && list($key,$group_info) = each($memberships)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_info['account_id'],$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_info['account_id'], - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_info['account_id'])=='g'?'g_':'').$group_info['account_id'], - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - - $account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'); - while($account_perms && list($key,$group_id) = each($account_perms)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_id,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_id, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_id)=='g'?'g_':'').$group_id, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - } - - @reset($drop_down); - @ksort($drop_down); - while(list($key,$grant) = each($drop_down)) - { - $form_options .= ' '."\n"; - } - reset($this->bo->grants); - - $var = Array( - 'form_width' => $remainder, - 'form_link' => $this->page($referrer), - 'form_name' => 'owner', - 'title' => lang('User'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - } - - $hidden_vars = ' '."\n"; - $date = get_var('date',Array('GET')); - if($date) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - if(isset($this->bo->filter) && $this->bo->filter) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->sortby) && $this->bo->sortby) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->num_months) && $this->bo->num_months) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '; - - $var = Array( - 'action_url_button' => $this->page('search'), - 'action_text_button' => lang('Search'), - 'action_confirm_button' => '', - 'action_extra_field' => $hidden_vars - ); - $tpl->set_var($var); - $button = $tpl->fp('out','form_button'); - $tpl->set_var('str',''.$button.''); - $tpl->parse('header_column','head_col',True); - $tpl->parse('phpgw_body','head_table',True); - } - - function printer_friendly($body,$func_header='') + function printer_friendly($body,$app_header='') { if($this->bo->printer_friendly) { - $GLOBALS['phpgw_info']['flags']['headonly'] = True; + $new_body = ''."\n" + .''."\n" + .''."\n" + .''."\n" + .$this->bo->debug_string.$body + .''."\n" + .''."\n"; } else { - $this->cal_header($func_header && $GLOBALS['phpgw_info']['user']['template'] == 'idots' ? $func_header : ''); + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + unset($GLOBALS['phpgw_info']['flags']['noappheader']); + unset($GLOBALS['phpgw_info']['flags']['noappfooter']); + if ($app_header && $this->always_app_header) + { + $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.$app_header; + } + $GLOBALS['phpgw']->common->phpgw_header(); + $new_body = $this->bo->debug_string.$body; } - return $this->bo->debug_string . $body; + return $new_body; } function month() { - $GLOBALS['phpgw']->template->set_var('phpgw_body',$this->printer_friendly($this->get_month(),lang('Monthview'))); + echo $this->printer_friendly($this->get_month(),lang('Monthview')); } function get_month() @@ -695,7 +418,7 @@ function week() { - $GLOBALS['phpgw']->template->set_var('phpgw_body',$this->printer_friendly($this->get_week(),lang('Weekview'))); + echo $this->printer_friendly($this->get_week(),lang('Weekview')); } function get_week() @@ -762,23 +485,23 @@ } $var = Array( - 'printer_friendly' => $printer, + 'printer_friendly' => $printer, 'bg_text' => $this->theme['bg_text'], - 'small_calendar_prev' => $minical_prev, - 'prev_week_link' => $prev_week_link, - 'small_calendar_this' => $minical_this, - 'week_identifier' => $this->bo->get_week_label(), - 'next_week_link' => $next_week_link, - 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), - 'small_calendar_next' => $minical_next, - 'week_display' => $this->display_weekly( + 'small_calendar_prev' => $minical_prev, + 'prev_week_link' => $prev_week_link, + 'small_calendar_this' => $minical_this, + 'week_identifier' => $this->bo->get_week_label(), + 'next_week_link' => $next_week_link, + 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), + 'small_calendar_next' => $minical_next, + 'week_display' => $this->display_weekly( Array( 'date' => sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day), 'showyear' => true, 'owners' => $this->bo->owner ) ), - 'print' => $print + 'print' => $print ); $p = CreateObject('phpgwapi.Template',$this->template_dir); @@ -866,7 +589,7 @@ { $GLOBALS['phpgw_info']['flags']['nofooter'] = True; } - $GLOBALS['phpgw']->template->set_var('phpgw_body',$this->printer_friendly($this->get_year(),lang('Yearview'))); + echo $this->printer_friendly($this->get_year(),lang('Yearview')); } function get_year() @@ -906,10 +629,6 @@ $p->set_block('year_t','year','year'); $p->set_block('year_t','month','month_handle'); $p->set_block('year_t','month_sep','month_sep_handle'); - $p->set_var(array( - 'month_handle' => '', - 'month_sep_handle' => '' - )); $p->set_var($var); for($i=1;$i<=12;$i++) @@ -937,27 +656,35 @@ function view($vcal_id=0,$cal_date=0) { - $this->cal_header(lang('View'),True); + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('View'); + $GLOBALS['phpgw']->common->phpgw_header(); + + $cal_id = get_var('cal_id',array('GET','POST'),$vcal_id); + + $date = $cal_date?$cal_date:0; + $date = $date?$date:intval($_GET['date']); - $cal_id = get_var('cal_id',Array('GET','POST','DEFAULT'),$vcal_id); - $date = get_var('date',Array('GET','DEFAULT'),$cal_date); - // First, make sure they have permission to this entry if ($cal_id < 1) { - $this->error_exit('invalid_id'); + echo '
'.lang('Invalid entry id.').'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); + } + + if(!$this->bo->check_perms(PHPGW_ACL_READ,$cal_id)) + { + echo '
'.lang('You do not have permission to read this record!').'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); } $event = $this->bo->read_entry($cal_id); if(!isset($event['id'])) { - $this->error_exit('not_exist'); - } - - if(!$this->bo->check_perms(PHPGW_ACL_READ,$event)) - { - $this->error_exit('no_read_perm'); + echo '
'.lang('Sorry, this event does not exist').'.'.'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); } $this->bo->repeating_events = Array(); @@ -982,10 +709,11 @@ if(!$this->view_event($event,True)) { - $this->error_exit('no_read_perm'); + echo '
'.lang('You do not have permission to read this record!').'
'; + $GLOBALS['phpgw']->common->phpgw_exit(True); } - $p = &$GLOBALS['phpgw']->template; + $p = $GLOBALS['phpgw']->template; $p->set_file( Array( 'form_button' => 'form_button_script.tpl' @@ -993,6 +721,7 @@ ); $button_left = $button_center = $button_right = ''; + if($this->bo->check_perms(PHPGW_ACL_EDIT,$event)) { if($event['recur_type'] != MCAL_RECUR_NONE) @@ -1085,6 +814,26 @@ $button_right .= ''.$p->fp('button','form_button').''; } } + else + { + // allow me (who I am logged in as) to set up an alarm + // if I am a participant, but not the owner + reset($event['participants']); + while (list($user,$short_status) = each($event['participants'])) + { + if ($GLOBALS['phpgw_info']['user']['account_id'] == $user) + { + $var = Array( + 'action_url_button' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uialarm.manager'), + 'action_text_button' => lang('Alarm Management'), + 'action_confirm_button' => '', + 'action_extra_field' => '' + ); + $p->set_var($var); + echo $p->fp('out','form_button'); + } + } + } $var = Array( 'action_url_button' => $this->page('export'), @@ -1111,7 +860,7 @@ 'button_center' => $button_center, 'button_right' => $button_right )); - $p->fp('phpgw_body','view_event',True); + $p->pfp('phpgw_body','view_event'); $GLOBALS['phpgw']->hooks->process(array( 'location' => 'calendar_view', @@ -1127,9 +876,9 @@ echo ''."\n"; } - if(isset($GLOBALS['HTTP_GET_VARS']['readsess'])) + if(isset($_GET['readsess'])) { - $params['readsess'] = $GLOBALS['HTTP_GET_VARS']['readsess']; + $params['readsess'] = $_GET['readsess']; $params['cd'] = 0; } @@ -1149,19 +898,20 @@ ) ); } - elseif(isset($GLOBALS['HTTP_GET_VARS']['cal_id'])) + elseif(isset($_GET['cal_id'])) { - $cal_id = intval($GLOBALS['HTTP_GET_VARS']['cal_id']); + $cal_id = intval($_GET['cal_id']); $event = $this->bo->read_entry($cal_id); if(!$this->bo->check_perms(PHPGW_ACL_EDIT,$event)) { - $GLOBALS['phpgw']->redirect($this->page('view','&cal_id='.$cal_id)); + Header('Location: '.$this->page('view','&cal_id='.$cal_id)); + $GLOBALS['phpgw']->common->phpgw_exit(); } - if(@isset($GLOBALS['HTTP_POST_VARS']['edit_type']) && $GLOBALS['HTTP_POST_VARS']['edit_type'] == 'single') + if(@isset($_POST['edit_type']) && $_POST['edit_type'] == 'single') { $event['id'] = 0; - $this->bo->set_recur_date($event,$GLOBALS['HTTP_POST_VARS']['date']); + $this->bo->set_recur_date($event,$_POST['date']); $event['recur_type'] = MCAL_RECUR_NONE; $event['recur_interval'] = 0; $event['recur_data'] = 0; @@ -1181,15 +931,14 @@ function export($vcal_id=0) { - if(!isset($GLOBALS['HTTP_POST_VARS']['cal_id']) || !$GLOBALS['HTTP_POST_VARS']['cal_id']) + if(!isset($_POST['cal_id']) || !$_POST['cal_id']) { Header('Location: '.$this->index()); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } $GLOBALS['phpgw_info']['flags']['noappheader'] = True; $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; - if(!isset($GLOBALS['HTTP_POST_VARS']['output_file']) || !$GLOBALS['HTTP_POST_VARS']['output_file']) + if(!isset($_POST['output_file']) || !$_POST['output_file']) { unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); @@ -1207,21 +956,27 @@ 'action_text_button' => lang('Submit'), 'action_confirm_button' => '', 'action_extra_field' => "\n".lang('Enter Output Filename: ( .vcs appended )')."\n".' '."\n" - . ' ' + . ' ' ); $p->set_var($var); echo $p->fp('out','form_button'); } else { - $output_file = $GLOBALS['HTTP_POST_VARS']['output_file'].'.vcs'; + $output_file = $_POST['output_file'].'.vcs'; $vfs = CreateObject('phpgwapi.vfs'); // if(!$vfs->file_exists('.calendar',array(RELATIVE_USER))) // { // $vfs->mkdir('.calendar',array(RELATIVE_USER)); // } - $content = ExecMethod('calendar.boicalendar.export',$GLOBALS['HTTP_POST_VARS']['cal_id']); + $content = ExecMethod('calendar.boicalendar.export', + Array( + 'l_event_id' => $_POST['cal_id'], + 'chunk_split' => False, + ) + ); + $vfs->cd(array('string' => '/', 'relatives' => array(RELATIVE_USER) )); @@ -1229,7 +984,7 @@ 'relatives' => array (RELATIVE_USER), 'content' => $content )); -// $vfs->write($output_file, array (RELATIVE_USER_APP), $content); + if($this->debug) { echo ''."\n"; @@ -1244,8 +999,7 @@ { Header('Location: '.$this->index()); } - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } } @@ -1269,28 +1023,33 @@ if ($cal_id < 1) { - $this->error_exit('invalid_id'); + echo '
'.lang('Invalid entry id.').'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); } - if(!$this->bo->check_perms(PHPGW_ACL_READ,$cal_id)) + if(!$this->bo->check_perms(PHPGW_ACL_READ)) { - $this->error_exit('no_read_perm'); + echo '
'.lang('You do not have permission to read this record!').'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); } $event = $this->bo->read_entry($cal_id); if(!isset($event['id'])) { - $this->error_exit('not_exist'); + echo '
'.lang('Sorry, this event does not exist').'.'.'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); } elseif(!isset($event['recur_exception'])) { - $this->error_exit(lang('Sorry, this event does not have exceptions defined')); + echo '
'.lang('Sorry, this event does not have exceptions defined').'.'.'
'."\n"; + $GLOBALS['phpgw']->common->phpgw_exit(True); } if(!$this->view_event($event,True)) { - $this->error_exit('no_read_perm'); + echo '
'.lang('You do not have permission to read this record!').'
'; + $GLOBALS['phpgw']->common->phpgw_exit(True); } $p = &$GLOBALS['phpgw']->template; @@ -1344,10 +1103,10 @@ $this->index(); } $cal_id = (isset($params['cal_id'])?intval($params['cal_id']):''); - $cal_id = ($cal_id==''?intval($GLOBALS['HTTP_GET_VARS']['cal_id']):$cal_id); + $cal_id = ($cal_id==''?intval($_GET['cal_id']):$cal_id); $reinstate_index = (isset($params['reinstate_index'])?intval($params['reinstate_index']):''); - $reinstate_index = ($reinstate_index==''?intval($GLOBALS['HTTP_POST_VARS']['reinstate_index']):$reinstate_index); + $reinstate_index = ($reinstate_index==''?intval($_POST['reinstate_index']):$reinstate_index); if($this->debug) { echo ''."\n"; @@ -1370,8 +1129,7 @@ { Header('Location: '.$this->page('',($cd?'&cd='.$cd:''))); } - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } function add($cd=0,$readsess=0) @@ -1397,10 +1155,13 @@ $can_edit = True; - $thishour = (isset($GLOBALS['HTTP_GET_VARS']['hour'])?intval($GLOBALS['HTTP_GET_VARS']['hour']):0); - $thisminute = (isset($GLOBALS['HTTP_GET_VARS']['minute'])?intval($GLOBALS['HTTP_GET_VARS']['minute']):0); - $this->bo->set_start($this->bo->year,$this->bo->month,$this->bo->day,$thishour,$thisminute,0); - $this->bo->set_end($this->bo->year,$this->bo->month,$this->bo->day,$thishour,$thisminute,0); + $starthour = intval(get_var('hour',array('GET'),$this->bo->prefs['calendar']['workdaystarts'])); + $startmin = intval(get_var('minute',array('GET'),0)); + $endmin = $startmin + intval($this->bo->prefs['calendar']['defaultlength']); + $endhour = $starthour + $this->bo->normalizeminutes($endmin); + ; + $this->bo->set_start($this->bo->year,$this->bo->month,$this->bo->day,$starthour,$startmin,0); + $this->bo->set_end($this->bo->year,$this->bo->month,$this->bo->day,$endhour,$endmin,0); $this->bo->set_title(''); $this->bo->set_description(''); $this->bo->add_attribute('location',''); @@ -1428,33 +1189,30 @@ function delete() { - $cal_id = get_var('cal_id',Array('GET')); - if(!$cal_id) + if(!isset($_GET['cal_id'])) { Header('Location: '.$this->page('','&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day))); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } $date = sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day); - if($this->bo->check_perms(PHPGW_ACL_DELETE,$cal_id)) + if($this->bo->check_perms(PHPGW_ACL_DELETE,$cal_id=intval($_GET['cal_id']))) { - $delete_type = get_var('delete_type',Array('POST')); - if($deleted_type && $delete_type == 'single') + if(isset($_POST['delete_type']) && $_POST['delete_type'] == 'single') { - $date = $GLOBALS['HTTP_POST_VARS']['date']; + $date = $_POST['date']; $cd = $this->bo->delete_single( Array( - 'id' => intval($cal_id), + 'id' => $cal_id, 'year' => substr($date,0,4), 'month' => substr($date,4,2), 'day' => substr($date,6,2) ) ); } - else + elseif((isset($_POST['delete_type']) && $_POST['delete_type'] == 'series') || !isset($_POST['delete_type'])) { - $cd = $this->bo->delete_entry(intval($cal_id)); + $cd = $this->bo->delete_entry($cal_id); $this->bo->expunge(); } } @@ -1470,8 +1228,7 @@ { Header('Location: '.$this->page('','&date='.$date.($cd?'&cd='.$cd:''))); } - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } function day() @@ -1520,16 +1277,16 @@ $p->set_block('day_t','day_event','day_event'); $var = Array( - 'printer_friendly' => $printer, + 'printer_friendly' => $printer, 'bg_text' => $this->theme['bg_text'], - 'daily_events' => $this->print_day( + 'daily_events' => $this->print_day( Array( 'year' => $this->bo->year, 'month' => $this->bo->month, 'day' => $this->bo->day ) ), - 'small_calendar' => $minical, + 'small_calendar' => $minical, 'date' => $this->bo->long_date($now), 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), 'print' => $print @@ -1537,7 +1294,7 @@ $p->set_var($var); $p->parse('day_events','day_event'); - $GLOBALS['phpgw']->template->set_var('phpgw_body',$this->printer_friendly($p->fp('out','day'),lang('Dayview'))); + echo $this->printer_friendly($p->fp('out','day'),lang('Dayview')); } function edit_status() @@ -1549,13 +1306,14 @@ $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Change Status'); $GLOBALS['phpgw']->common->phpgw_header(); - $event = $this->bo->read_entry($GLOBALS['HTTP_GET_VARS']['cal_id']); + $event = $this->bo->read_entry($_GET['cal_id']); reset($event['participants']); if(!$event['participants'][$this->bo->owner]) { - $this->error_exit(lang('The user %1 is not participating in this event!',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner))); + echo '
'.lang('The user %1 is not participating in this event!',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner)).'
'; + return; } if(!$this->bo->check_perms(PHPGW_ACL_EDIT)) @@ -1574,14 +1332,9 @@ ) ).'
'; - $event = $this->bo->read_entry($GLOBALS['HTTP_GET_VARS']['cal_id']); + $event = $this->bo->read_entry($_GET['cal_id']); $this->view_event($event); - $GLOBALS['phpgw']->template->set_var(array( - 'button_left' => '', - 'button_center' => '', - 'button_right' => '' - )); - $GLOBALS['phpgw']->template->fp('phpgw_body','view_event',True); + $GLOBALS['phpgw']->template->pfp('phpgw_body','view_event'); echo $this->get_response($event['id']); } @@ -1594,7 +1347,7 @@ return; } - $this->bo->set_status(intval($GLOBALS['HTTP_GET_VARS']['cal_id']),intval($GLOBALS['HTTP_GET_VARS']['action'])); + $this->bo->set_status(intval($_GET['cal_id']),intval($_GET['action'])); if ($this->bo->return_to) { @@ -1604,17 +1357,17 @@ { Header('Location: '.$this->page('','')); } - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } + function planner() { if(floor(phpversion()) < 4) { return; } - $home = strstr($GLOBALS['PHP_SELF'],'home') !== False; + $home = strstr($_SERVER['PHP_SELF'],'home') !== False; // generate header and set global/member variables // $this->planner_prepare($home); @@ -1674,7 +1427,10 @@ // if (!$no_header) { - $this->cal_header(lang('Group Planner')); + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Group Planner'); + $GLOBALS['phpgw']->common->phpgw_header(); } // intervals_per_day can be configured in preferences now :-) @@ -1729,10 +1485,10 @@ $d = mktime(0,0,0,$m,1,$y); $month = lang(date('F', $d)).strftime(' %Y', $d); - $class = $m % 2 || $this->bo->num_months == 1 ? 'th' : 'row_on'; + $color = $this->theme[$m % 2 || $this->bo->num_months == 1 ? 'th_bg' : 'row_on']; $cols = $days * $intervals_per_day; - $hdr[0]['.'.$i] = 'class="'.$class.'" colspan="'.$cols.'" align="center"'; + $hdr[0]['.'.$i] = 'bgcolor="'.$color.'" colspan="'.$cols.'" align="center"'; $prev_month = sprintf('%04d%02d01',$y-($m==1),$m > 1?$m-1:12); $next_month = sprintf('%04d%02d01',$y+($m==12),$m < 12?$m+1:1); $prev_link = $GLOBALS['phpgw']->link('/index.php',"menuaction=calendar.uicalendar.planner&date=$prev_month"); @@ -1756,24 +1512,24 @@ // highlight today, saturday, sunday and holidays // - $class = 'row_off'; + $color = $this->theme['row_off']; $dow = $GLOBALS['phpgw']->datetime->day_of_week($y,$m,$d); $date = sprintf("%04d%02d%02d",$y,$m,$d); if ($date == date('Ymd')) { - $class = 'cal_today'; + $color = $GLOBALS['phpgw_info']['theme']['cal_today']; } elseif ($this->bo->cached_holidays[$date]) { - $class = 'cal_holiday'; + $color = $this->bo->holiday_color; $hdr[2]['.'.$index] .= ' title="'.$this->bo->cached_holidays[$date][0]['name'].'"'; } elseif ($dow == 0 || $dow == 6) { - $class = 'th'; + $color = $this->bo->theme['th_bg']; } - $hdr[2]['.'.$index] .= " class=\"$class\""; + $hdr[2]['.'.$index] .= " bgcolor=\"$color\""; $hdr[2][$index] = 'theme[$w % 2 ? 'th_bg' : 'row_on']; - $hdr[1]['.'.$w] = 'class="'.$class.'" colspan="'.$intervals_per_day * $offset.'" align="left"'; + $hdr[1]['.'.$w] = 'bgcolor="'.$color.'" colspan="'.$intervals_per_day * $offset.'" align="left"'; $hdr[1][$w] = ''; if ($offset >= 3) { @@ -1825,8 +1581,8 @@ } $w += (isset($hdr[1][$w]))?1:0; // bug in "date('W')" ? - $class = $w % 2 ? 'th' : 'row_on'; - $hdr[1]['.'.$w] = 'class="'.$class.'" colspan="'.$colspan.'" align="left"'; + $color = $this->theme[$w % 2 ? 'th_bg' : 'row_on']; + $hdr[1]['.'.$w] = 'bgcolor="'.$color.'" colspan="'.$colspan.'" align="left"'; $hdr[1][$w] = ''; if ($days_left >= 3) { @@ -1907,18 +1663,17 @@ if (!$is_private) { - $max_chars = 6*$colspan/$intervals_per_day-5; - $max_chars /= ($colspan<9 ? 2 : 1); + $max_chars = intval(6*$colspan/$intervals_per_day-2); $min_chars = 3; // minimum for max_chars to display -> this should be configurable if ($max_chars >= $min_chars) { $len_title = strlen($event['title']); - if ($len_title < $max_chars) + if ($len_title <= $max_chars) { $title = $event['title']; - $max_chars -= $len_title - 3; // 3 chars for separator: " - " + $max_chars -= $len_title + 3; // 3 chars for separator: " - " $len_descr = strlen($event['description']); if ($len_descr > 0 && $len_descr <= $max_chars) @@ -1928,7 +1683,8 @@ } else { - $title = substr($event['title'], 0 , $max_chars).'...'; + $has_amp = strpos($event['title'],'&'); + $title = substr($event['title'], 0 , $max_chars-1+($has_amp!==False&&$has_amp<$max_chars?4:0)).'...'; } $event['print_title'] = 'yes'; } @@ -1963,7 +1719,7 @@ if (!$is_private) { - $opt .= "\" onClick=\"location='".$view."'\""; + $opt .= '" onClick="location=\''.$view.'\'" class="planner-cell"'; $cel = ''; } else @@ -1991,6 +1747,7 @@ { $cel .= ' - '.$event['description'].' '; } + $akt_cell = $end_cell + 1; return $rows; @@ -2117,7 +1874,7 @@ { if (is_array($r)) { - $rows['.'.$k] = 'class="'.$GLOBALS['phpgw']->nextmatchs->alternate_row_color().'"'; + $rows['.'.$k] = 'bgcolor="'.$GLOBALS['phpgw']->nextmatchs->alternate_row_color().'"'; $row = &$rows[$k]; $akt_cell = &$rows['.nr_'.$k]; if ($akt_cell < $last_cell) @@ -2131,7 +1888,7 @@ function planner_print_rows() { - $class = 'class="th"'; + $bgcolor = 'bgcolor="'.$this->theme['th_bg'].'"'; $intervals_per_day = $this->bo->prefs['calendar']['planner_intervals_per_day']; if ($this->debug) @@ -2142,11 +1899,11 @@ return $this->planner_html->table( array( '_hdr0' => $this->planner_header[0], - '._hdr0' => $class, + '._hdr0' => $bgcolor, '_hdr1' => $this->planner_header[1], - '._hdr1' => $class, + '._hdr1' => $bgcolor, '_hdr2' => $this->planner_header[2], - '._hdr2' => $class + '._hdr2' => $bgcolor )+$this->planner_rows, 'width="100%" cols="'.(1+$this->planner_days_in_end_month*$intervals_per_day).'"'); } @@ -2169,23 +1926,25 @@ // process all events within observed interval // - for($v=$this->planner_firstday; $v <= $this->planner_lastday; $v += 1) + for($v=$this->planner_firstday;$v<=$this->planner_lastday;$v++) { $daily = $this->bo->cached_events[$v]; - @reset($daily); print_debug('For Date',$v); print_debug('Count of items',count($daily)); // process all events on day $v // - while (list(,$event) = @each($daily)) + if (is_array($daily)) foreach($daily as $event) { if ($event['recur_type']) // calculate start- + end-datetime for recuring events { $this->bo->set_recur_date($event,$v); } - $this->planner_process_event($event); + if (!$this->bo->rejected_no_show($event)) + { + $this->planner_process_event($event); + } } } $this->planner_pad_rows(); @@ -2197,7 +1956,10 @@ $sb = CreateObject('phpgwapi.sbox'); - $this->cal_header(lang('Matrixview')); + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Matrixview'); + $GLOBALS['phpgw']->common->phpgw_header(); $p = &$GLOBALS['phpgw']->template; $p->set_file( @@ -2211,6 +1973,7 @@ $p->set_var(array( 'title' => lang('Daily Matrix View'), + 'th_bg' => $this->theme['th_bg'], 'action_url' => $this->page('viewmatrix') )); @@ -2308,51 +2071,54 @@ function viewmatrix() { - $participants = $GLOBALS['HTTP_POST_VARS']['participants']; + if ($_POST['cancel']) + { + $this->index(); + } + $participants = $_POST['participants']; $parts = Array(); $acct = CreateObject('phpgwapi.accounts',$this->bo->owner); - $c_participants = count($participants); - for($i=0;$i<$c_participants;$i++) + + if (is_array($participants)) { - switch ($GLOBALS['phpgw']->accounts->get_type($participants[$i])) + foreach($participants as $participant) { - case 'g': - $members = $acct->member(intval($participants[$i])); - while($members != False && list($index,$member) = each($members)) - { - if($this->bo->check_perms(PHPGW_ACL_READ,0,$member['account_id']) && !isset($parts[$member['account_id']])) + switch ($GLOBALS['phpgw']->accounts->get_type($participant)) + { + case 'g': + if ($members = $acct->member(intval($participant))) { - $parts[$member['account_id']] = 1; + foreach($members as $member) + { + if($this->bo->check_perms(PHPGW_ACL_READ,0,$member['account_id'])) + { + $parts[$member['account_id']] = True; + } + } } - } - break; - case 'u': - if($this->bo->check_perms(PHPGW_ACL_READ,0,$participants[$i]) && !isset($parts[$participants[$i]])) - { - $parts[$participants[$i]] = 1; - } - break; + break; + case 'u': + if($this->bo->check_perms(PHPGW_ACL_READ,0,$participant)) + { + $parts[$participant] = 1; + } + break; + } } + unset($acct); } - unset($acct); + $participants = array_keys($parts); // get id's as values and a numeric index - $participants = Array(); - reset($parts); - while(list($key,$value) = each($parts)) - { - $participants[] = $key; - } + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Matrixview'); + $GLOBALS['phpgw']->common->phpgw_header(); - reset($participants); - - $this->cal_header(lang('Matrixview')); - - $matrixtype = get_var('matrixtype',Array('POST')); - switch($matrixtype) + switch($_POST['matrixtype']) { case 'free/busy': $freetime = $GLOBALS['phpgw']->datetime->gmtdate(mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year)); - $html = '
'.$this->timematrix( + echo '
'.$this->timematrix( Array( 'date' => $freetime, 'starttime' => $this->bo->splittime('000000',False), @@ -2362,7 +2128,7 @@ ); break; case 'weekly': - $html = '
'.$this->display_weekly( + echo '
'.$this->display_weekly( Array( 'date' => sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day), 'showyear' => true, @@ -2371,36 +2137,34 @@ ); break; } - $html .= "\n".'
'."\n"; - $html .= '
'."\n"; - $html .= ' '."\n"; - $html .= ' '."\n"; - $html .= ' '."\n"; - - foreach($parts as $key => $value) + echo "\n
\n".''."\n"; + echo '
'."\n"; + echo ' '."\n"; + echo ' '."\n"; + echo ' '."\n"; + echo ' '."\n"; + foreach($participants as $part) { - $html .= ' '."\n"; + echo ' '."\n"; } - $html .= ' '."\n"; - $html .= ' '."\n"; - $html .= ''."\n"; - - $GLOBALS['phpgw']->template->set_var('phpgw_body',$html); + echo ' '."\n"; + echo ' '."\n"; + echo ' '."\n"; + echo '
'."\n"; + echo ''."\n"; } function search() { - $keywords = get_var('keywords',Array('POST')); - if (empty($keywords)) + if (empty($_POST['keywords'])) { // If we reach this, it is because they didn't search for anything, // attempt to send them back to where they where. Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',array( - 'menuaction' => $GLOBALS['HTTP_POST_VARS']['from'], - 'date' => $GLOBALS['HTTP_POST_VARS']['year'].$GLOBALS['HTTP_POST_VARS']['month'].$GLOBALS['HTTP_POST_VARS']['day'] + 'menuaction' => $_POST['from'], + 'date' => $_POST['year'].$_POST['month'].$_POST['day'] ))); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } unset($GLOBALS['phpgw_info']['flags']['noheader']); @@ -2418,8 +2182,7 @@ // This has been solved by the little icon indicator for recurring events. - $event_ids = $this->bo->search_keywords($keywords); - $ids = Array(); + $event_ids = $this->bo->search_keywords($_POST['keywords']); foreach($event_ids as $key => $id) { $event = $this->bo->read_entry($id); @@ -2431,7 +2194,6 @@ $datetime = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; - $ids[strval($event['id'])]++; $info[strval($event['id'])] = array( 'tr_color' => $GLOBALS['phpgw']->nextmatchs->alternate_row_color(), 'date' => $GLOBALS['phpgw']->common->show_date($datetime), @@ -2441,11 +2203,6 @@ } $matches = count($event_ids); - if ($matches > 0) - { - $matches = count($ids); - } - if ($matches == 1) { $quantity = lang('1 match found').'.'; @@ -2456,7 +2213,8 @@ } else { - $this->error_exit(lang('no matches found.')); + echo ''.lang('Error').':'.lang('no matches found'); + return; } $p = $GLOBALS['phpgw']->template; @@ -2471,6 +2229,7 @@ $p->set_block('search_form','search_list_footer','search_list_footer'); $var = Array( + 'th_bg' => $this->theme['th_bg'], 'search_text' => lang('Search Results'), 'quantity' => $quantity ); @@ -2480,14 +2239,12 @@ { $p->parse('rows','search_list_header',True); } - // now sort by number of hits - arsort($ids); - foreach($ids as $key => $nul) + foreach($info as $id => $data) { - $p->set_var($info[$key]); + $p->set_var($data); $p->parse('rows','search_list',True); } - + if($matches > 0) { $p->parse('rows','search_list_footer',True); @@ -2509,7 +2266,7 @@ 'sortby' => $this->bo->sortby, 'num_months' => $this->bo->num_months ); - return _debug_array($data,False); + Return _debug_array($data,False); } function output_template_array(&$p,$row,$list,$var) @@ -2532,6 +2289,7 @@ { $page_ = explode('.',$this->bo->prefs['calendar']['defaultcalendar']); $_page = $page_[0]; + if ($_page=='planner_cat' || $_page=='planner_user') { $_page = 'planner'; @@ -2566,7 +2324,11 @@ $tpl = $GLOBALS['phpgw']->template; $tpl->set_unknowns('remove'); - include($this->template_dir.'/header.inc.php'); + if (!file_exists($file = $this->template_dir.'/header.inc.php')) + { + $file = PHPGW_SERVER_ROOT . '/calendar/templates/default/header.inc.php'; + } + include($file); $header = $tpl->fp('out','head'); unset($tpl); echo $header; @@ -2574,14 +2336,15 @@ function footer() { - list(,,$method) = explode('.',MENUACTION); - + $menuaction = $_GET['menuaction']; + list(,,$method) = explode('.',$menuaction); + if (@$this->bo->printer_friendly) { return; } - $p = &$GLOBALS['phpgw']->template; + $p = $GLOBALS['phpgw']->template; $p->set_file( Array( @@ -2624,7 +2387,7 @@ ); $this->output_template_array($p,'table_row','footer_row',$var); - if(MENUACTION == 'calendar.uicalendar.week') + if($menuaction == 'calendar.uicalendar.week') { unset($thisdate); $thisdate = mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - $GLOBALS['phpgw']->datetime->tz_offset; @@ -2671,15 +2434,14 @@ ); $this->output_template_array($p,'table_row','footer_row',$var); - if(MENUACTION == 'calendar.uicalendar.planner') + if($menuaction == 'calendar.uicalendar.planner') { $str = ''; $date_str = ''; - - $date = get_var('date',Array('GET')); - if($date) + + if(isset($_GET['date']) && $_GET['date']) { - $date_str .= ' '."\n"; + $date_str .= ' '."\n"; } $date_str .= ' '."\n"; $date_str .= ' '."\n"; @@ -2714,7 +2476,8 @@ $this->output_template_array($p,'b_row','form_button',$var); $p->parse('table_row','blank_row',True); - $p->parse('phpgw_body','footer_table',True); + $p->pparse('out','footer_table'); + unset($p); } function css() @@ -2740,8 +2503,9 @@ . ' .event-on { background: '.$this->theme['row_on'].'; color: '.$this->theme['bg_text'].'; font: 100 80%/110% '.$this->theme['font'].'; vertical-align: middle }'."\n" . ' .event-off { background: '.$this->theme['row_off'].'; color: '.$this->theme['bg_text'].'; font: 100 80%/110% '.$this->theme['font'].'; vertical-align: middle }'."\n" . ' .event-holiday { background: '.$this->theme['bg04'].'; color: '.$this->theme['bg_text'].'; font: 100 80%/110% '.$this->theme['font'].'; vertical-align: middle }'."\n" - . ' .time { background: '.$this->theme['navbar_bg'].'; color: '.$this->theme['bg_text'].'; font: 65%/100% '.$this->theme['font'].'; width: '.$time_width.'%; border: 1px '.$this->theme['navbar_text'].'; vertical-align: middle }'."\n" - . ' .tablecell { width: 80px; height: 80px }'; + . ' .time { background: '.$this->theme['navbar_bg'].'; color: '.$this->theme['bg_text'].'; font: 80%/110% '.$this->theme['font'].'; width: '.$time_width.'%; border: 1px '.$this->theme['navbar_text'].'; vertical-align: middle }'."\n" + . ' .tablecell { width: 80px; height: 80px }'."\n" + . ' .planner-cell { cursor:pointer; cursor:hand; border: thin solid black; }'; } function no_edit() @@ -2808,7 +2572,6 @@ { $text .= $this->bo->display_status($event['users_status']); } -// $text = ''.$time.' '.$this->bo->get_short_field($event,$is_private,'title').$text.''.$GLOBALS['phpgw']->browser->br; $text = ' '.$time.'  '.$this->bo->get_short_field($event,$is_private,'title').$text.': '.$this->bo->get_short_field($event,$is_private,'description').''.$GLOBALS['phpgw']->browser->br; if ($editable) @@ -2882,6 +2645,9 @@ } if(@isset($event['alarm']) && count($event['alarm']) >= 1) { + // if the alarm is to go off the day before the event + // the icon does not show up because of 'alarm_today' + // - TOM if($this->bo->alarm_today($event,$rawdate_offset,$starttime)) { $picture[] = Array( @@ -2899,7 +2665,7 @@ { $var = Array( 'pic_image' => $picture[$i]['pict'], - 'width' => $picture[$i]['width'], + 'width' => $picture[$i]['width'], 'height' => $picture[$i]['height'], 'alt' => $picture[$i]['alt'], 'title' => $picture[$i]['title'] @@ -3022,29 +2788,29 @@ function planner_category($ids) { static $cats; - if(!is_array($ids)) { if (strpos($ids,',')) { - $ids = explode(',',$ids); + $id_array = explode(',',$ids); } else { - $ids = array( 0 => $ids); + $id_array[0] = $ids; } } - @reset($ids); + @reset($id_array); $ret_val = Array(); - while(list(,$id) = each($ids)) + while(list($index,$id) = each($id_array)) { if (!isset($cats[$id])) { - $cats[$id] = $this->cat->return_single( $id ); - $cats[$id]['color'] = strstr($cats[$id]['descr'],'#'); + $cat_arr = $this->cat->return_single( $id ); + $cats[$id] = $cat_arr[0]; + $cats[$id]['color'] = strstr($cats[$id]['description'],'#'); } $ret_val[] = $cats[$id]; - } + } return $ret_val; } @@ -3063,49 +2829,30 @@ $p->set_block('month_header','column_title','column_title'); $var = Array( - 'class' => 'th', + 'bgcolor' => $this->theme['th_bg'], 'font_color' => $this->theme['th_text'] ); if($this->bo->printer_friendly && @$this->bo->prefs['calendar']['print_black_white']) { $var = Array( - 'class' => '', + 'bgcolor' => '', 'font_color' => '' ); } $p->set_var($var); - $col_width = 14; $p->set_var('col_width','14'); if($display_name == True) { $p->set_var('col_title',lang('name')); $p->parse('column_header','column_title',True); - $col_width = 12; + $p->set_var('col_width','12'); } - if($GLOBALS['phpgw']->datetime->days[$i]['weekday']) - { - switch($col_width) - { - case 12: - $col_width = 16; - break; - case 14: - $col_width = 20; - break; - } - } - - $p->set_var('col_width',$col_width); - for($i=0;$i<7;$i++) { - if(!$this->bo->prefs['calendar']['weekdays_only'] || $GLOBALS['phpgw']->datetime->days[$i]['weekday']) - { - $p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i]['name'])); - $p->parse('column_header','column_title',True); - } + $p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i])); + $p->parse('column_header','column_title',True); } return $p->fp('out','monthly_header'); } @@ -3122,19 +2869,19 @@ $str = ''; $p = CreateObject('phpgwapi.Template',$this->template_dir); $p->set_unknowns('keep'); - + $p->set_file( - Array ( + Array( 'month_header' => 'month_header.tpl', - 'month_day' => 'month_day.tpl' - ) + 'month_day' => 'month_day.tpl' + ) ); $p->set_block('month_header','monthly_header','monthly_header'); $p->set_block('month_header','month_column','month_column'); $p->set_block('month_day','month_daily','month_daily'); $p->set_block('month_day','day_event','day_event'); $p->set_block('month_day','event','event'); - + $p->set_var('extra',''); $p->set_var('col_width','14'); if($display_name) @@ -3145,17 +2892,11 @@ } $today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); $daily = $this->set_week_array($startdate - $GLOBALS['phpgw']->datetime->tz_offset,$cellcolor,$weekly); - @reset($daily); - while(list($date,$day_params) = each($daily)) + foreach($daily as $date => $day_params) { $year = intval(substr($date,0,4)); $month = intval(substr($date,4,2)); $day = intval(substr($date,6,2)); - $dow = $GLOBALS['phpgw']->datetime->day_of_week($year,$month,$day); - if($this->bo->prefs['calendar']['weekdays_only'] && ($dow == 0 || $dow == 6)) - { - continue; - } $var = Array( 'column_data' => '', 'extra' => '' @@ -3191,8 +2932,7 @@ if(@$day_params['holidays']) { - reset($day_params['holidays']); - while(list($key,$value) = each($day_params['holidays'])) + foreach($day_params['holidays'] as $key => $value) { $var = Array( 'day_events' => ''.$value.''.$GLOBALS['phpgw']->browser->br @@ -3208,12 +2948,14 @@ 'events' => '' ); $p->set_var($var); - $rep_events = $this->bo->cached_events[$date]; - $c_rep_events = count($rep_events); - for ($k=0;$k<$c_rep_events;$k++) + $events = $this->bo->cached_events[$date]; + foreach($events as $event) { - $lr_events = $rep_events[$k]; - $p->set_var('day_events',$this->link_to_entry($lr_events,$month,$day,$year)); + if ($this->bo->rejected_no_show($event)) + { + continue; // user does not want to see rejected events + } + $p->set_var('day_events',$this->link_to_entry($event,$month,$day,$year)); $p->parse('events','event',True); $p->set_var('day_events',''); } @@ -3320,7 +3062,7 @@ $p->set_block('week','m_w_table','m_w_table'); $p->set_block('week','event','event'); - $start = $GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, $day); + $start = $GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, $day) + $GLOBALS['phpgw']->datetime->tz_offset; $cellcolor = $this->theme['row_off']; @@ -3340,25 +3082,27 @@ $owners_array[0] = $owners; $cols = 7; } - if($this->bo->prefs['calendar']['weekdays_only']) - { - $cols -= 2; - } $var = Array( 'cols' => $cols, 'day_events' => $this->week_header($month,$year,$display_name) ); $this->output_template_array($p,'row','event',$var); + $tstart = $start - $GLOBALS['phpgw']->datetime->tz_offset; + $tstop = $tstart + 604800; $original_owner = $this->bo->so->owner; for($i=0;$i<$counter;$i++) { $this->bo->so->owner = $owners_array[$i]; + $this->bo->so->open_box($owners_array[$i]); $this->bo->store_to_cache( Array( - 'syear' => $year, - 'smonth'=> $month, - 'sday' => 1 + 'syear' => date('Y',$tstart), + 'smonth' => date('m',$tstart), + 'sday' => date('d',$tstart), + 'eyear' => date('Y',$tstop), + 'emonth' => date('m',$tstop), + 'eday' => date('d',$tstop) ) ); $p->set_var('day_events',$this->display_week($start,True,$cellcolor,$display_name,$owners_array[$i])); @@ -3369,15 +3113,6 @@ return $p->fp('out','m_w_table'); } - function view_add_day($day,&$repeat_days) - { - if($repeat_days) - { - $repeat_days .= ', '; - } - $repeat_days .= $day.' '; - } - function view_event($event,$alarms=False) { if((!$event['participants'][$this->bo->owner] && !$this->bo->check_perms(PHPGW_ACL_READ,$event))) @@ -3385,223 +3120,41 @@ return False; } - $pri = Array( - 1 => lang('Low'), - 2 => lang('Normal'), - 3 => lang('High') - ); - $p = &$GLOBALS['phpgw']->template; $p->set_file( Array( - 'view' => 'view.tpl' - ) + 'view' => 'view.tpl' + ) ); $p->set_block('view','view_event','view_event'); $p->set_block('view','list','list'); $p->set_block('view','hr','hr'); - $var[] = Array( - 'tr_color' => 'th', - 'field' => lang('Title'), - 'data' => $event['title'] - ); + $vars = $this->bo->event2array($event); - // Some browser add a \n when its entered in the database. Not a big deal - // this will be printed even though its not needed. - if ($event['description']) + $vars['title']['tr_color'] = $this->theme['th_bg']; + + foreach($vars['participants']['data'] as $user => $str) { - $var[] = Array( - 'field' => lang('Description'), - 'data' => $event['description'] - ); - } - - if ($event['category']) - { - $category = Array(); - $this->cat->categories($this->bo->owner,'calendar'); - if(strpos($event['category'],',')) + if ($this->bo->check_perms(PHPGW_ACL_EDIT,0,$user) && ereg('^(.*) \((.*)\)$',$str,$parts)) { - $category = explode(',',$event['category']); - } - else - { - $category[] = $event['category']; - } - @reset($category); - while(list($key,$cat) = each($category)) - { - $_cat = $this->cat->return_single($cat); - $cat_string[] = $_cat[0]['name']; - } - @reset($cat_string); - $var[] = Array( - 'field' => lang('Category'), - 'data' => implode(',',$cat_string) - ); - } - - if ($event['location']) - { - $var[] = Array( - 'field' => lang('Location'), - 'data' => $event['location'] - ); - } - $var[] = Array( - 'field' => lang('Start Date/Time'), - 'data' => $GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset) - ); - - $var[] = Array( - 'field' => lang('End Date/Time'), - 'data' => $GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset) - ); - - $var[] = Array( - 'field' => lang('Priority'), - 'data' => $pri[$event['priority']] - ); - - $var[] = Array( - 'field' => lang('Created By'), - 'data' => $GLOBALS['phpgw']->common->grab_owner_name($event['owner']) - ); - - $var[] = Array( - 'field' => lang('Updated'), - 'data' => $GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['modtime']) - $GLOBALS['phpgw']->datetime->tz_offset) - ); - - $var[] = Array( - 'field' => lang('Access'), - 'data' => $event['public']==True?lang('Public'):lang('Privat') - ); - - if(@isset($event['groups'][0])) - { - $cal_grps = ''; - for($i=0;$iaccounts->exists($event['groups'][$i])) - { - $cal_grps .= ($i>0?'
':'').$GLOBALS['phpgw']->accounts->id2name($event['groups'][$i]); - } - } - - $var[] = Array( - 'field' => lang('Groups'), - 'data' => $cal_grps - ); - } - - $str = ''; - reset($event['participants']); - while (list($user,$short_status) = each($event['participants'])) - { - if($GLOBALS['phpgw']->accounts->exists($user)) - { - $str .= ($str?'
':'').$GLOBALS['phpgw']->common->grab_owner_name($user).' ('.($this->bo->check_perms(PHPGW_ACL_EDIT,0,$user)?'
'.$this->bo->get_long_status($short_status).'':$this->bo->get_long_status($short_status)).')'."\n"; + $vars['participants']['data'][$user] = $parts[1].' ('.$parts[2].')'; } } - $var[] = Array( - 'field' => lang('Participants'), - 'data' => $str - ); - - // Repeated Events - $rpt_type = Array( - MCAL_RECUR_NONE => 'none', - MCAL_RECUR_DAILY => 'daily', - MCAL_RECUR_WEEKLY => 'weekly', - MCAL_RECUR_MONTHLY_WDAY => 'monthlybyday', - MCAL_RECUR_MONTHLY_MDAY => 'monthlybydate', - MCAL_RECUR_YEARLY => 'yearly' - ); - $str = lang($rpt_type[$event['recur_type']]); - if($event['recur_type'] <> MCAL_RECUR_NONE) + $vars['participants']['data'] = implode("
\n",$vars['participants']['data']); + + foreach($vars as $var) { - $str_extra = ''; - if ($event['recur_enddate']['mday'] != 0 && $event['recur_enddate']['month'] != 0 && $event['recur_enddate']['year'] != 0) + if (strlen($var['data'])) { - $recur_end = $this->bo->maketime($event['recur_enddate']); - if($recur_end != 0) - { - $recur_end -= $GLOBALS['phpgw']->datetime->tz_offset; - $str_extra .= lang('ends').': '.lang($GLOBALS['phpgw']->common->show_date($recur_end,'l')).', '.lang($GLOBALS['phpgw']->common->show_date($recur_end,'F')).' '.$GLOBALS['phpgw']->common->show_date($recur_end,'d, Y').' '; - } + $this->output_template_array($p,'row','list',$var); } - if($event['recur_type'] == MCAL_RECUR_WEEKLY || $event['recur_type'] == MCAL_RECUR_DAILY) - { - $repeat_days = ''; - if($this->bo->prefs['calendar']['weekdaystarts'] == 'Sunday') - { - if (!!($event['recur_data'] & MCAL_M_SUNDAY) == True) - { - $this->view_add_day(lang('Sunday'),$repeat_days); - } - } - if (!!($event['recur_data'] & MCAL_M_MONDAY) == True) - { - $this->view_add_day(lang('Monday'),$repeat_days); - } - if (!!($event['recur_data'] & MCAL_M_TUESDAY) == True) - { - $this->view_add_day(lang('Tuesday'),$repeat_days); - } - if (!!($event['recur_data'] & MCAL_M_WEDNESDAY) == True) - { - $this->view_add_day(lang('Wednesday'),$repeat_days); - } - if (!!($event['recur_data'] & MCAL_M_THURSDAY) == True) - { - $this->view_add_day(lang('Thursday'),$repeat_days); - } - if (!!($event['recur_data'] & MCAL_M_FRIDAY) == True) - { - $this->view_add_day(lang('Friday'),$repeat_days); - } - if (!!($event['recur_data'] & MCAL_M_SATURDAY) == True) - { - $this->view_add_day(lang('Saturday'),$repeat_days); - } - if($this->bo->prefs['calendar']['weekdaystarts'] == 'Monday') - { - if (!!($event['recur_data'] & MCAL_M_SUNDAY) == True) - { - $this->view_add_day(lang('Sunday'),$repeat_days); - } - } - if($repeat_days <> '') - { - $str_extra .= lang('days repeated').': '.$repeat_days; - } - } - if($event['recur_interval'] != 0) - { - $str_extra .= lang('Interval').': '.$event['recur_interval']; - } - - if($str_extra) - { - $str .= ' ('.$str_extra.')'; - } - - $var[] = Array( - 'field' => lang('Repetition'), - 'data' => $str - ); } - for($i=0;$ioutput_template_array($p,'row','list',$var[$i]); - } - - if($alarms && @isset($event['alarm'])) + if($alarms && count($event['alarm'])) { + $p->set_var('th_bg',$this->theme['th_bg']); $p->set_var('hr_text',lang('Alarms')); $p->parse('row','hr',True); @@ -3610,7 +3163,7 @@ $icon = ''; $var = Array( 'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']), - 'data' => $alarm['text'] + 'data' => 'Email Notification' ); $this->output_template_array($p,'row','list',$var); } @@ -3620,13 +3173,30 @@ function nm_on_off() { - if($GLOBALS['phpgw']->nextmatchs->alternate_row_color() == 'row_on') + if($GLOBALS['phpgw']->nextmatchs->alternate_row_color() == $this->theme['row_on']) { return '_on'; } return '_off'; } + function slot_num($time,$set_day_start=0,$set_day_end=0) + { + static $day_start, $day_end, $interval=0; + + if ($set_day_start) $day_start = $set_day_start; + if ($set_day_end) $day_end = $set_day_end; + if (!$interval) $interval = 60*$this->bo->prefs['calendar']['interval']; + + if ($time > $day_end) + { + $time = $day_end; + } + $slot = intval(($time - $day_start) / $interval); + + return $slot < 0 ? 0 : 1+$slot; + } + function print_day($params) { if(!is_array($params)) @@ -3638,12 +3208,12 @@ $this->bo->store_to_cache( Array( - 'syear' => $params['year'], - 'smonth' => $params['month'], - 'sday' => $params['day'], - 'eyear' => $params['year'], - 'emonth' => $params['month'], - 'eday' => $params['day'] + 'syear' => $params['year'], + 'smonth' => $params['month'], + 'sday' => $params['day'], + 'eyear' => $params['year'], + 'emonth' => $params['month'], + 'eday' => $params['day'] ) ); @@ -3660,142 +3230,53 @@ $p->set_block('day_cal','day_event_off','day_event_off'); $p->set_block('day_cal','day_event_holiday','day_event_holiday'); $p->set_block('day_cal','day_time','day_time'); - - if (! $this->bo->prefs['calendar']['workdaystarts'] && - ! $this->bo->prefs['calendar']['workdayends']) - { - - $GLOBALS['phpgw']->preferences->add('calendar','workdaystarts',8); - $GLOBALS['phpgw']->preferences->add('calendar','workdayends',16); - $GLOBALS['phpgw']->preferences->save_repository(); - $this->bo->prefs['calendar']['workdaystarts'] = 8; - $this->bo->prefs['calendar']['workdayends'] = 16; - } - - if(!isset($this->bo->prefs['calendar']['interval'])) - { - $GLOBALS['phpgw']->preferences->add('calendar','interval',60); - $GLOBALS['phpgw']->preferences->save_repository(); - $this->bo->prefs['calendar']['interval'] = 60; - } - - print_debug('Interval set to',intval($this->bo->prefs['calendar']['interval'])); - - for ($i=0;$i<24;$i++) - { - for($j=0;$j<(60 / intval($this->bo->prefs['calendar']['interval']));$j++) - { - $rowspan_arr[$i][$j] = 0; - $time[$ind][$j] = ''; - } - } - + $date_to_eval = sprintf("%04d%02d%02d",$params['year'],$params['month'],$params['day']); - - $time = Array(); + $day_start = mktime(intval($this->bo->prefs['calendar']['workdaystarts']),0,0,$params['month'],$params['day'],$params['year']); + $day_end = mktime(intval($this->bo->prefs['calendar']['workdayends']),0,1,$params['month'],$params['day'],$params['year']); $daily = $this->set_week_array($GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True); print_debug('Date to Eval',$date_to_eval); if($daily[$date_to_eval]['appts']) { - $day_start = mktime(intval($this->bo->prefs['calendar']['workdaystarts']),-intval($this->bo->prefs['calendar']['interval']),0,$params['month'],$params['day'],$params['year']); - $day_end = mktime(intval($this->bo->prefs['calendar']['workdayends']),0,1,$params['month'],$params['day'],$params['year']); - $last_starttime = $starttime = 0; - $last_endtime = $endtime = 0; $events = $this->bo->cached_events[$date_to_eval]; print_debug('Date',$date_to_eval); print_debug('Count',count($events)); - $last_ind = -1; + $last_slot_end = -1; foreach($events as $event) { + if ($this->bo->rejected_no_show($event)) + { + continue; // user does not want to see rejected events + } if ($event['recur_type']) // calculate start- + end-datetime for recuring events { $this->bo->set_recur_date($event,$date_to_eval); } $starttime = $this->bo->maketime($event['start']); $endtime = $this->bo->maketime($event['end']); + $slot = $this->slot_num($starttime,$day_start,$day_end); + $slot_end = $this->slot_num($endtime-1); // -1 to no occupy eg. the 18.00 slot for a 17-18h date + + if ($slot <= $last_slot_end) + { + $slot = $last_slot; + $slot_end = max($last_slot_end,$slot_end); + } + $rows[$slot] .= $this->link_to_entry($event,$params['month'],$params['day'],$params['year']); + + print_debug('slot',$slot); + print_debug('row',$rows[$slot]); + + $row_span[$slot] = 1 + $slot_end - $slot; - $interval_start = 0; - if ($starttime < $day_start) - { - $ind = 0; - } - elseif ($starttime >= $day_end) - { - $ind = 99; - } - else - { - $ind = intval($event['start']['hour']); - $interval_start = intval($event['start']['min'] / intval($this->bo->prefs['calendar']['interval'])); - print_debug('Start Time Minutes',$event['start']['min']); - print_debug('Interval',$interval_start); - } - if(($ind < intval($this->bo->prefs['calendar']['workdaystarts'])) || ($ind > intval($this->bo->prefs['calendar']['workdayends']))) - { - $ind = $ind < intval($this->bo->prefs['calendar']['workdaystarts']) ? 0 : 99; - $interval_start = 0; - } - - print_debug('IND before',$ind); - if($ind <= date('H',$last_endtime-1) && $last_ind >= 0) // -1 to allow events to end on a full hour, without blocking the next hour-slot - { - $ind = $last_ind; - $interval_start = $last_interval_start; - } - print_debug('IND after',$ind); - - $time[$ind][$interval_start] .= $this->link_to_entry($event,$params['month'],$params['day'],$params['year']); - - print_debug('IND',$ind); - print_debug('TIME',$time[$ind][$interval_start]); - - if ($starttime < $day_start) - { - $starttime = $day_start; - } - if ($endtime > $day_end) - { - $endtime = $day_end; - } - if ($starttime != $endtime) - { - $rowspan = $rowspan_arr[$ind][$interval_start]; - if($rowspan == 0 || $last_endtime <= $starttime) - { - $rowspan = intval(round(($endtime - $starttime) / (60 * intval($this->bo->prefs['calendar']['interval'])))); - } - elseif($last_endtime < $endtime && $last_starttime) - { - $rowspan = intval(round(($endtime - $last_starttime) / (60 * intval($this->bo->prefs['calendar']['interval'])))); - } - $mins = (int)((($endtime - $starttime) / 60) % 60); - - if($mins != 0 && $mins <= intval(60 / intval($this->bo->prefs['calendar']['interval'])) || - $mins == 0 && date('i',$endtime) > intval($this->bo->prefs['calendar']['interval'])) - { - $rowspan += 1; - } - print_debug('Rowspan being set to',$rowspan); - - if ($rowspan > $rowspan_arr[$ind][$interval_start]) - { - $rowspan_arr[$ind][$interval_start] = $rowspan; - } - } - $last_ind = $ind; - $last_interval_start = $interval_start; - $last_starttime = $starttime; - $last_endtime = $endtime; + $last_slot = $slot; + $last_slot_end = $slot_end; print_debug('Time',$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start']) - $GLOBALS['phpgw']->datetime->tz_offset).' - '.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end']) - $GLOBALS['phpgw']->datetime->tz_offset)); - print_debug('Start',$ind); - print_debug('Interval #',$interval_start); + print_debug('Slot',$slot); } + //echo "rows=
"; print_r($rows); echo "
row_span="; print_r($row_span); echo "
\n"; } - - // squish events that use the same cell into the same cell. - // For example, an event from 8:00-9:15 and another from 9:30-9:45 both - // want to show up in the 8:00-9:59 cell. $holiday_names = $daily[$date_to_eval]['holidays']; if(!$holiday_names) { @@ -3804,104 +3285,65 @@ else { $row_to_print = '_holiday'; - while(list($index,$name) = each($holiday_names)) + foreach($holiday_names as $name) { - $time[0][0] = '
'.$name.'
'.$time[0][0]; + $rows[0] = '
'.$name.'
' . $rows[0]; } } - + $last_slot = $this->slot_num($day_end,$day_start,$day_end); $rowspan = 0; - $i = isset($time[0][0]) ? 0 : (int)$this->bo->prefs['calendar']['workdaystarts']; - $i_end = isset($time[99][0]) ? 99 : (int)$this->bo->prefs['calendar']['workdayends']; - while ($i <= $i_end) + for ($slot = 0; $slot <= $last_slot; ++$slot) { - $j_end = $i ? 60 / intval($this->bo->prefs['calendar']['interval']) : 1; - for($j = 0; $j < $j_end; $j++) + $p->set_var('extras',''); + if ($rowspan > 1) { - $dtime = $this->bo->build_time_for_display(($i * 10000) + (($j *intval($this->bo->prefs['calendar']['interval'])) * 100)); - $p->set_var('extras',''); - $p->set_var('event',' '); - if ($rowspan > 1) - { - // this might mean there's an overlap, or it could mean one event - // ends at 11:15 and another starts at 11:30. - if (isset($time[$i][$j])) - { - $p->set_var('event',$time[$i][$j]); - $row_to_print = $this->nm_on_off(); - $p->parse('item','day_event'.$row_to_print,False); - } - $rowspan--; - } - elseif (!isset($time[$i][$j])) - { - $p->set_var('event',' '); - $row_to_print = $this->nm_on_off(); - $p->parse('item','day_event'.$row_to_print,False); - } - else - { - $rowspan = intval($rowspan_arr[$i][$j]); - if ($rowspan > 1) - { - $p->set_var('extras',' rowspan="'.$rowspan.'"'); - } - $p->set_var('event',$time[$i][$j]); - $row_to_print = $this->nm_on_off(); - $p->parse('item','day_event'.$row_to_print,False); - } - - if (0 < $i && $i < 99) - { - $open_link = ' - '; - $close_link = ''; - - if(!$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_ADD)) - { - $new_hour = intval(substr($dtime,0,strpos($dtime,':'))); - if ($this->bo->prefs['common']['timeformat'] == '12' && $i > 12) - { - $new_hour += 12; - } - - $open_link .= ''; - - $close_link = ''; - } - - $var = Array( - 'open_link' => $open_link, - 'time' => (intval(substr($dtime,0,strpos($dtime,':')))<10?'0'.$dtime:$dtime), - 'close_link' => $close_link - ); - } - else - { - $var = Array( - 'open_link' => '', - 'time' => ' ', - 'close_link' => '' - ); - } - $var['tr_color'] = ''; // dummy to stop output_template_array to set it - $this->output_template_array($p,'item','day_time',$var); - $p->parse('row','day_row',True); - $p->set_var('event',''); $p->set_var('item',''); + $rowspan--; } - if ($i == 0) + elseif (!isset($rows[$slot])) { - $i = (int)$this->bo->prefs['calendar']['workdaystarts']; - } - elseif ($i == (int)$this->bo->prefs['calendar']['workdayends']) - { - $i = 99; + $p->set_var('event',' '); + $row_to_print = $this->nm_on_off(); + $p->parse('item','day_event'.$row_to_print,False); } else { - ++$i; + $rowspan = intval($row_span[$slot]); + if ($rowspan > 1) + { + $p->set_var('extras',' rowspan="'.$rowspan.'"'); + } + $p->set_var('event',$rows[$slot]); + $row_to_print = $this->nm_on_off(); + $p->parse('item','day_event'.$row_to_print,False); } - } // end for + $open_link = $close_link = ''; + $time = ' '; + + if (0 < $slot && $slot < $last_slot) // normal time-slot not before or after day_start/end + { + $time = $day_start + ($slot-1) * 60 * $this->bo->prefs['calendar']['interval']; + $hour = date('H',$time); + $min = date('i',$time); + $time = $GLOBALS['phpgw']->common->formattime($hour,$min); + + $open_link = ' - '; + if(!$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_ADD)) + { + $open_link .= ''; + $close_link = ''; + } + } + $var = Array( + 'open_link' => $open_link, + 'time' => $time, + 'close_link' => $close_link, + 'tr_color' => '' // dummy to stop output_template_array to set it + ); + $this->output_template_array($p,'item','day_time',$var); + + $p->parse('row','day_row',True); + } return $p->fp('out','day'); } // end function @@ -3916,6 +3358,11 @@ $starttime = $param['starttime']; $endtime = $param['endtime']; $participants = $param['participants']; + foreach($participants as $part => $nul) + { + $participants[$part] = $GLOBALS['phpgw']->common->grab_owner_name($part); + } + uasort($participants,'strnatcasecmp'); // sort them after their fullname if(!isset($this->bo->prefs['calendar']['interval'])) { @@ -3924,7 +3371,6 @@ $GLOBALS['phpgw']->preferences->save_repository(); } $increment = $this->bo->prefs['calendar']['interval']; -// $increment = 15; $interval = (int)(60 / $increment); $pix = $GLOBALS['phpgw']->common->image('calendar','pix'); @@ -3938,35 +3384,11 @@ { for($j=0;$j<$interval;$j++) { - switch($j) - { - case 0: - case 1: - switch($j) - { - case 0: - $pre = '0'; - break; - case 1: - $pre = substr(strval($i),0,1); - break; - } - - $k = ($i<=9?$pre:substr($i,$j,$j+1)); - if($increment == 60) - { - $k .= substr(strval($i),strlen(strval($i)) - 1,1); - } - $str .= '' - . '" - . $k.''; - break; - default: - $str .= '' - . '" - . ' '; - break; - } + $k = ($j == 0 ? sprintf('%02d',$i).'
':'').sprintf('%02d',$j*$increment); + + $str .= '' + . '" + . $k." \n"; } } $str .= '' @@ -3976,13 +3398,12 @@ $endtime = $starttime; } $owner = $this->bo->owner; - while(list($part,$status) = each($participants)) + foreach($participants as $part => $fullname) { - $str .= '' - . ''.$this->bo->get_fullname($part).''; + $str .= '' + . ''.$fullname.''; $this->bo->cached_events = Array(); - $this->bo->owner = $part; $this->bo->so->owner = $part; $this->bo->so->open_box($part); $this->bo->store_to_cache( @@ -4004,11 +3425,12 @@ { $str .= ' '; } + $str .= "\n"; } } else { - $time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$status,$date['full']); + $time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$date['full']); for($h=0;$h<24;$h++) { $hour = $h * 10000; @@ -4019,13 +3441,17 @@ { case ' ': $time_slice[$index]['color'] = $this->theme['bg_color']; + $extra = ''; break; case '-': $time_slice[$index]['color'] = $this->theme['bg01']; + $link = $this->page('view','&cal_id='.$time_slice[$index]['id'].'&date='.$date['full']); + $extra =' title="'.$time_slice[$index]['description'].'" onClick="location.href=\''.$link.'\';" style="cursor:pointer; cursor:hand;"'; break; } - $str .= '".''.$time_slice[$index]['marker'].''; + $str .= ''.$time_slice[$index]['marker'].''; } + $str .= "\n"; } } $str .= '' @@ -4081,6 +3507,11 @@ return ''."\n".$str.'
'."\n"; } + function accounts_popup() + { + $GLOBALS['phpgw']->accounts->accounts_popup('calendar'); + } + function edit_form($param) { if(!is_array($param)) @@ -4095,7 +3526,9 @@ $hourformat = substr($this->bo->users_timeformat,0,1); - $sb = CreateObject('phpgwapi.sbox'); + // $sb = CreateObject('phpgwapi.sbox'); + $sb = CreateObject('phpgwapi.sbox2'); + $jscal = CreateObject('phpgwapi.jscalendar'); // before phpgw_header() !!! unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); @@ -4119,10 +3552,11 @@ 'font' => $this->theme['font'], 'bg_color' => $this->theme['bg_text'], 'action_url' => $GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.bocalendar.update')), + 'accounts_link' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.accounts_popup'), 'common_hidden' => ''."\n" . ''."\n" . ''."\n" - . ($GLOBALS['HTTP_GET_VARS']['cal_id'] && $event['id'] == 0?''."\n": + . ($_GET['cal_id'] && $event['id'] == 0?''."\n": (@isset($event['reference'])?''."\n":'')) . (@isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && $GLOBALS['phpgw_info']['server']['deny_user_grants_access']? ''."\n":''), @@ -4131,14 +3565,14 @@ $p->set_var($vars); // Brief Description - $var[] = Array( - 'tr_color' => 'th', + $var['title'] = Array( + 'tr_color' => $this->theme['th_bg'], 'field' => lang('Title'), 'data' => '' ); // Full Description - $var[] = Array( + $var['description'] = Array( 'field' => lang('Full Description'), 'data' => '' ); @@ -4161,26 +3595,30 @@ { $check_cats[] = 0; } - $var[] = Array( + $var['category'] = Array( 'field' => lang('Category'), - 'data' => '' + 'data' => '' ); // Location - $var[] = Array( + $var['location'] = Array( 'field' => lang('Location'), 'data' => '' ); // Date + $start = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; - $var[] = Array( + $var['startdate'] = Array( 'field' => lang('Start Date'), +/* 'data' => $GLOBALS['phpgw']->common->dateformatorder( $sb->getYears('start[year]',intval($GLOBALS['phpgw']->common->show_date($start,'Y'))), $sb->getMonthText('start[month]',intval($GLOBALS['phpgw']->common->show_date($start,'n'))), $sb->getDays('start[mday]',intval($GLOBALS['phpgw']->common->show_date($start,'d'))) - ) + ) +*/ + 'data' => $jscal->input('start[str]',$start) ); // Time @@ -4189,20 +3627,23 @@ $str .= '= 12?'':' checked').'>am'."\n" . '= 12?' checked':'').'>pm'."\n"; } - $var[] = Array( + $var['starttime'] = Array( 'field' => lang('Start Time'), 'data' => ':'."\n".$str ); // End Date $end = $this->bo->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; - $var[] = Array( + $var['enddate'] = Array( 'field' => lang('End Date'), +/* 'data' => $GLOBALS['phpgw']->common->dateformatorder( $sb->getYears('end[year]',intval($GLOBALS['phpgw']->common->show_date($end,'Y'))), $sb->getMonthText('end[month]',intval($GLOBALS['phpgw']->common->show_date($end,'n'))), $sb->getDays('end[mday]',intval($GLOBALS['phpgw']->common->show_date($end,'d'))) ) +*/ + 'data' => $jscal->input('end[str]',$end) ); // End Time @@ -4211,19 +3652,19 @@ $str = '= 12?'':' checked').'>am'."\n" . '= 12?' checked':'').'>pm'."\n"; } - $var[] = Array( + $var['endtime'] = Array( 'field' => lang('End Time'), 'data' => ':'."\n".$str ); // Priority - $var[] = Array( + $var['priority'] = Array( 'field' => lang('Priority'), 'data' => $sb->getPriority('cal[priority]',$event['priority']) ); // Access - $var[] = Array( + $var['access'] = Array( 'field' => lang('Private'), 'data' => '' ); @@ -4238,18 +3679,84 @@ $str = ''; @asort($users); @reset($users); - while (list($id,$user_array) = each($users)) - { - if($id != intval($event['owner'])) - { - $str .= ' '."\n"; - } - } - $var[] = Array( - 'field' => lang('Participants'), - 'data' => "\n".' ' - ); + switch($GLOBALS['phpgw_info']['user']['preferences']['common']['account_selection']) + { + case 'popup': + while (is_array($event['participants']) && list($id) = each($event['participants'])) + { + if($id != intval($event['owner'])) + { + $str .= '' . "\n"; + } + } + $var['participants'] = array + ( + 'field' => '' . "\n" + . '', + 'data' => "\n".' ' + ); + break; + default: + foreach($users as $id => $user_array) + { + if($id != intval($event['owner'])) + { + $str .= ' '."\n"; + } + } + $var['participants'] = array + ( + 'field' => lang('Participants'), + 'data' => "\n".' ' + ); + break; + } +/* +// External Participants + + // FIXME: where does the list of external participants come from? + // + $id = '1_h'; + $test_contact[$id] = array(); + $test_contact[$id]['name'] = "Stephan Cremer"; + $id = '3_b'; + $test_contact[$id] = array(); + $test_contact[$id]['name'] = "Stephan_Uni Cremer_Uni"; + + $part = ""; + $ext_disp = ''."\n".'
'; + + $url = $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uiextpartlist.modify')); + // $url = $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.modify_ext_partlist')); + $mod_ext = '\n".$ext_disp."\n" +// DEBUG START +. ''."\n" +// DEBUG END + . ''."\n" + . ''."\n"; + + $var[] = Array( + 'field' => "\n".lang('External Participants'), + 'data' => "\n".$mod_ext."\n" + ); +*/ // I Participate if((($event['id'] > 0) && isset($event['participants'][$event['owner']])) || !$event['id']) { @@ -4259,45 +3766,78 @@ { $checked = ''; } - $var[] = Array( + $var['owner'] = Array( 'field' => $GLOBALS['phpgw']->common->grab_owner_name($event['owner']).' '.lang('Participates'), 'data' => '' ); } - for($i=0;$ioutput_template_array($p,'row','list',$var[$i]); - } +// Reminder + // The user must use "Alarm Management" to change/modify an alarm + // so only display the email reminder fields if this is a new event + // i.e. not editing an existing event - unset($var); + if ($event['id'] == 0) { + // get defaults + $days = $this->bo->prefs['calendar']['default_email_days']; + $hours = $this->bo->prefs['calendar']['default_email_hours']; + $min = $this->bo->prefs['calendar']['default_email_min']; + if (count($event['alarm']) > 1) + { + // this should not happen because when creating a new event + // only 1 alarm is displayed on the screen + // if the user wants more than 1 alarm they should + // use "Alarm Management" + echo ''."\n"; + } + // if there was an error pick up what the user entered + if (@isset($event['alarm'])) + { + @reset($event['alarm']); + // just get the first one see above!!! + list($key,$alarm) = @each($event['alarm']); + $diff = $start - $alarm['time']; + $days = intval($diff / (24*3600)); + $hours = intval(($diff - ($days * 24 * 3600))/3600); + $min = intval(($diff - ($days * 24 * 3600) - ($hours * 3600))/60); + } + + // days + $dout = ''."\n".' '.lang('days').' '; + // hours + $hout = ''."\n".' '.lang('hours').' '; + // minutes + $mout = ''."\n".' '.lang('minutes').' '; + + $var['alarm'] = Array( + 'field' => lang('Alarm'), + 'data' => $dout.$hout.$mout.lang('before the event') + ); + + } // Repeat Type - $p->set_var('tr_color','th'); - $p->set_var('hr_text','
'.lang('Repeating Event Information').'
'); - $p->parse('row','hr',True); - $rpt_type = Array( - MCAL_RECUR_NONE, - MCAL_RECUR_DAILY, - MCAL_RECUR_WEEKLY, - MCAL_RECUR_MONTHLY_WDAY, - MCAL_RECUR_MONTHLY_MDAY, - MCAL_RECUR_YEARLY - ); - $rpt_type_out = Array( - MCAL_RECUR_NONE => 'None', - MCAL_RECUR_DAILY => 'Daily', - MCAL_RECUR_WEEKLY => 'Weekly', - MCAL_RECUR_MONTHLY_WDAY => 'Monthly (by day)', - MCAL_RECUR_MONTHLY_MDAY => 'Monthly (by date)', - MCAL_RECUR_YEARLY => 'Yearly' - ); $str = ''; - for($l=0;$lbo->rpt_type as $type => $label) { - $str .= ''; + $str .= ''; } - $var[] = Array( + $var['recure_type'] = Array( 'field' => lang('Repeat Type'), 'data' => ''."\n" ); @@ -4313,37 +3853,123 @@ $recur_end = $this->bo->maketime($event['start']) + 86400 - $GLOBALS['phpgw']->datetime->tz_offset; } - $var[] = Array( + $var['recure_enddate'] = Array( 'field' => lang('Repeat End Date'), - 'data' => ''.lang('Use End Date').' ' - .$GLOBALS['phpgw']->common->dateformatorder( - $sb->getYears('recur_enddate[year]',intval($GLOBALS['phpgw']->common->show_date($recur_end,'Y'))), - $sb->getMonthText('recur_enddate[month]',intval($GLOBALS['phpgw']->common->show_date($recur_end,'n'))), - $sb->getDays('recur_enddate[mday]',intval($GLOBALS['phpgw']->common->show_date($recur_end,'d'))) - ) + 'data' => ''.lang('Use End Date').' '. +/* + $GLOBALS['phpgw']->common->dateformatorder( + $sb->getYears('recur_enddate[year]',intval($GLOBALS['phpgw']->common->show_date($recur_end,'Y'))), + $sb->getMonthText('recur_enddate[month]',intval($GLOBALS['phpgw']->common->show_date($recur_end,'n'))), + $sb->getDays('recur_enddate[mday]',intval($GLOBALS['phpgw']->common->show_date($recur_end,'d'))) + ) +*/ + $jscal->input('recur_enddate[str]',$recur_end) ); - $var[] = Array( + $i = 0; $boxes = ''; + foreach ($this->bo->rpt_day as $mask => $name) + { + $boxes .= ' '.lang($name)."\n"; + if (++$i == 5) $boxes .= '
'; + } + $var['recure_day'] = Array( 'field' => lang('Repeat Day').'
'.lang('(for weekly)'), - 'data' => ' '.lang('Sunday').' ' - . ' '.lang('Monday').' ' - . ' '.lang('Tuesday').' ' - . ' '.lang('Wednesday').'
' - . ' '.lang('Thursday').' ' - . ' '.lang('Friday').' ' - . ' '.lang('Saturday').' ' + 'data' => $boxes ); - $var[] = Array( + $var['recure_interval'] = Array( 'field' => lang('Interval'), 'data' => '' ); - for($i=0;$ifields)) { - $this->output_template_array($p,'row','list',$var[$i]); + $this->custom_fields = CreateObject('calendar.bocustom_fields'); + $this->fields = &$this->custom_fields->fields; + $this->stock_fields = &$this->custom_fields->stock_fields; + } + $preserved = False; + foreach($this->fields as $field => $data) + { + if (!$data['disabled']) + { + if (isset($var[$field])) + { + switch($field) + { + case 'startdate': + $this->output_template_array($p,'row','list',$var['startdate']); + $this->output_template_array($p,'row','list',$var['starttime']); + break; + case 'enddate': + $this->output_template_array($p,'row','list',$var['enddate']); + $this->output_template_array($p,'row','list',$var['endtime']); + break; + case 'recure_type': + $p->set_var('tr_color',$this->theme['th_bg']); + $p->set_var('hr_text','
'.lang('Repeating Event Information').'
'); + $p->parse('row','hr',True); + $this->output_template_array($p,'row','list',$var['recure_type']); + $this->output_template_array($p,'row','list',$var['recure_enddate']); + $this->output_template_array($p,'row','list',$var['recure_day']); + $this->output_template_array($p,'row','list',$var['recure_interval']); + break; + default: + $this->output_template_array($p,'row','list',$var[$field]); + } + } + elseif (!isset($this->stock_fields[$field])) // Custom field + { + $lang = lang($name = substr($field,1)); + $size = 'SIZE='.($data['shown'] ? $data['shown'] : ($data['length'] ? $data['length'] : 30)). + ' MAXLENGTH='.($data['length'] ? $data['length'] : 255); + $v = array( + 'field' => $lang == $name.'*' ? $name : $lang, + 'data' => '' + ); + if ($data['title']) + { + $v['tr_color'] = $this->theme['th_bg']; + } + if (!$data['length'] && $data['title']) + { + $p->set_var('tr_color',$this->theme['th_bg']); + $p->set_var('hr_text','
'.$v['field'].'
'); + $p->parse('row','hr',True); + } + else + { + $this->output_template_array($p,'row','list',$v); + } + } + } + else // preserve disabled fields + { + switch ($field) + { + case 'owner': + $preserved[$field] = $event['id'] ? $event['participants'][$event['owner']] : 'A'; + break; + case 'recure_type': + foreach(array('recur_type','recur_enddate','recur_data','recur_interval') as $field) + { + $preserved[$field] = $event[$field]; + } + break; + case 'startdate': + case 'enddate': + $field = substr($field,0,-4); + default: + $preserved[$field] = $event[$field]; + } + } + } + unset($var); + if (is_array($preserved)) + { + //echo "preserving
"; print_r($preserved); echo "
\n"; + $p->set_var('common_hidden',$p->get_var('common_hidden').''."\n"); } - $p->set_var('submit_button',lang('Save')); $delete_button = $cancel_button = ''; @@ -4375,50 +4001,242 @@ $p->pparse('out','edit_entry'); } + // modify list of an event's external participants (i.e. non pgpgw users) + // + function modify_ext_partlist() + { + $GLOBALS['phpgw_info']['flags']['noheader'] = True; + $GLOBALS['phpgw_info']['flags']['nonavbar'] = True; + $GLOBALS['phpgw_info']['flags']['noappheader'] = True; + $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; + + $total_contacts = 0; + $participant = array(); + $control_data= array(); + + $control_data['action'] = ''; + $control_data['delete'] = array(); + $control_data['part'] = array(); + + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_file( + Array( + 'T_edit_partlist' => 'edit_partlist.tpl', + 'T_edit_partlist_blocks' => 'edit_partlist_blocks.tpl' + ) + ); + + $p->set_block('T_edit_partlist_blocks','B_alert_msg','V_alert_msg'); + $p->set_block('T_edit_partlist_blocks','B_partlist','V_partlist'); + $p->set_block('T_edit_partlist_blocks','B_participants_none','V_participants_none'); + $p->set_block('T_edit_partlist_blocks','B_delete_btn','V_delete_btn'); + + global $query_addr; + $sb = CreateObject('phpgwapi.sbox2'); + $addy = $sb->getAddress('addr','',$query_addr); + + $add_ext = $addy['doSearchFkt']; + $add_ext .= $addy['addr_title']!=lang('Address Book')?$addy['addr_title']:''; + $add_ext .= " ".$addy['addr'].$addy['addr_nojs']; + + $p->set_var('text_add_name',$add_ext); + + if(isset($_GET['part']) && $_GET['part']) + { + $control_data['part'] = split(",", $_GET['part']); + } + else + { + $control_data['part'] = $_POST['participant']; + $control_data['action'] = $_POST['action']; + $control_data['delete'] = $_POST['delete']; + } + + for ($i=0; $iread_contact($id); + + $participant[$id] = array(); + $participant[$id]['name'] = $contact['n_given'].' '.$contact['n_family']; + } + + if ($control_data['action'] == lang('Delete selected contacts')) + { + for ($i=0; $iread_contact($id); + $participant[$id] = array(); + $participant[$id]['name'] = $contact['n_given'].' '.$contact['n_family']; + } + } + + // create list of currently selected contacts + // + while(list($id,$contact) = each($participant)) + { + $p->set_var('hidden_delete_name','participant[]'); + $p->set_var('hidden_delete_value',$id); + $p->set_var('ckbox_delete_name','delete[]'); + $p->set_var('ckbox_delete_value',$id); + $p->set_var('ckbox_delete_participant',$contact['name']); + $p->parse('V_partlist','B_partlist',True); + $total_contacts++; + } + + if ($total_contacts == 0) + { + // no contacts have been selected + // => clear the delete form, remove delete button and show the none block + // + $p->set_var('V_partlist',''); + $p->set_var('V_delete_btn',''); + $p->set_var('text_none',lang('None')); + $p->parse('V_participants_none','B_participants_none'); + } + else + { + // at least one contact has been selected + // => clear the none block, fill the delete form and add delete button + // + $p->set_var('V_participants_none',''); + $p->set_var('btn_delete_name','action'); + $p->set_var('btn_delete_value',lang('Delete selected contacts')); + $p->parse('V_delete_btn','B_delete_btn'); + } + + $body_tags = 'bgcolor="'.$GLOBALS['phpgw_info']['theme']['bg_color'] + . '" alink="'.$GLOBALS['phpgw_info']['theme']['alink'] + . '" link="'.$GLOBALS['phpgw_info']['theme']['link'] + .'" vlink="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"'; + + $form_action = $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'calendar.uicalendar.modify')); + + $charset = lang('charset'); + $p->set_var('charset',$charset); + $p->set_var('page_title',$GLOBALS['phpgw_flags']['currentapp'] + . ' - ' .lang('External Participants')); + $p->set_var('font_family',$GLOBALS['phpgw_info']['theme']['font']); + $p->set_var('body_tags',$body_tags); + $p->set_var('form_method','POST'); + $p->set_var('form_action',$form_action); + $p->set_var('text_add_contact',lang('External Participants')); + $p->set_var('text_contacts_selected',lang('Selected contacts (%1)',$total_contacts)); + $p->set_var('btn_add_name','action'); + $p->set_var('btn_add_value',lang('Add Contact')); + $p->set_var('btn_done_name','done'); + $p->set_var('btn_done_value',lang('Done')); + $p->set_var('btn_done_js','copyback()'); + $p->set_var('form1_name','ext_form'); + + $p->pfp('out','T_edit_partlist'); + } + + function read_contact($id) + { + $query_fields = Array( + 'n_given' => 'n_given', + 'n_family' => 'n_family', + 'email' => 'email', + 'email_home' => 'email_home' + ); + + /* + if ($this->rights & PHPGW_ACL_READ) + { + return $this->contacts->read_single_entry($id,$fields); + } + else + { + $rtrn = array(0 => array('No access' => 'No access')); + return $rtrn; + } + */ + + $contacts = CreateObject('phpgwapi.contacts', False); + return $contacts->read_single_entry($id,$query_fields); + } + function build_part_list(&$users,$accounts,$owner) { - if($accounts == False) + if(!is_array($accounts)) { return; } - @reset($accounts); - while(list($index,$id) = each($accounts)) + foreach($accounts as $id) { - $i_id = intval($id); - if($i_id == $owner) + $id = intval($id); + if($id == $owner) { continue; } - elseif(!isset($users[$i_id])) + elseif(!isset($users[$id])) { - if($GLOBALS['phpgw']->accounts->exists($i_id) == True) + if($GLOBALS['phpgw']->accounts->exists($id) == True) { - $users[$i_id] = Array( - 'name' => $GLOBALS['phpgw']->common->grab_owner_name($i_id), - 'type' => $GLOBALS['phpgw']->accounts->get_type($i_id) + $users[$id] = Array( + 'name' => $GLOBALS['phpgw']->common->grab_owner_name($id), + 'type' => $GLOBALS['phpgw']->accounts->get_type($id) ); } - if($GLOBALS['phpgw']->accounts->get_type($i_id) == 'g') + if($GLOBALS['phpgw']->accounts->get_type($id) == 'g') { - $this->build_part_list($users,$GLOBALS['phpgw']->acl->get_ids_for_location($i_id,1,'phpgw_group'),$owner); + $this->build_part_list($users,$GLOBALS['phpgw']->acl->get_ids_for_location($id,1,'phpgw_group'),$owner); } } } + if (!function_exists('strcmp_name')) + { + function strcmp_name($arr1,$arr2) + { + if ($diff = strcmp($arr1['type'],$arr2['type'])) + { + return $diff; // groups before users + } + return strnatcasecmp($arr1['name'],$arr2['name']); + } + } + uasort($users,'strcmp_name'); } function set_week_array($startdate,$cellcolor,$weekly) { for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime += 86400) { - $date = date('Ymd',$datetime + (60 * 60 * 2)); + $date = date('Ymd',$datetime + (60 * 60 * 2)); // +2h to be save when switching to and from dst, $datetime is alreay + TZ-Offset + print_debug('set_week_array : Date ',$date); - print_debug('set_week_array:Date',$date); - - if($this->bo->cached_events[$date]) + if($events = $this->bo->cached_events[$date]) { print_debug('Date',$date); - print_debug('Appointments Found',count($this->bo->cached_events[$date])); - $appts = True; + print_debug('Appointments Found',count($events)); + + if (!$this->bo->prefs['calendar']['show_rejected']) + { + $appts = False; + foreach($events as $event) // check for a not-rejected event + { + if (!$this->bo->rejected_no_show($event)) + { + $appts = True; + break; + } + } + } + else + { + $appts = True; + } } else { @@ -4434,7 +4252,7 @@ $day_image = ''; if($holidays) { - $extra = ' class="cal_holiday"'; + $extra = ' bgcolor="'.$this->bo->holiday_color.'"'; $class = ($appts?'b':'').'minicalhol'; if ($date == $this->bo->today) { @@ -4443,12 +4261,12 @@ } elseif ($date != $this->bo->today) { - $extra = ' class="'.$cellcolor.'"'; + $extra = ' bgcolor="'.$cellcolor.'"'; $class = ($appts?'b':'').'minicalendar'; } else { - $extra = ' class="cal_today"'; + $extra = ' bgcolor="'.$GLOBALS['phpgw_info']['theme']['cal_today'].'"'; $class = ($appts?'b':'').'minicalendar'; $day_image = ' background="'.$GLOBALS['phpgw']->common->image('calendar','mini_day_block').'"'; } diff --git a/calendar/inc/class.uicustom_fields.inc.php b/calendar/inc/class.uicustom_fields.inc.php new file mode 100644 index 0000000000..10dd1ee99e --- /dev/null +++ b/calendar/inc/class.uicustom_fields.inc.php @@ -0,0 +1,202 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + /* $Id$ */ + + require_once(PHPGW_INCLUDE_ROOT.'/calendar/inc/class.bocustom_fields.inc.php'); + $GLOBALS['phpgw_info']['flags']['included_classes']['bocustom_fields'] = True; // for 0.9.14 + + class uicustom_fields extends bocustom_fields + { + var $public_functions = array( + 'index' => True, + 'submited' => True + ); + + function uicustom_fields() + { + $this->bocustom_fields(); // call constructor of extended class + + $this->tpl = $GLOBALS['phpgw']->template; + if (!is_object($GLOBALS['phpgw']->nextmatchs)) + { + $GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs'); + } + $this->html = CreateObject('calendar.html'); + } + + function index($error='') + { + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Custom fields and sorting'); + $GLOBALS['phpgw']->common->phpgw_header(); + + $this->tpl = $GLOBALS['phpgw']->template; + + $this->tpl->set_unknowns('remove'); + $this->tpl->set_file(array( + 'custom_fields_tpl' => 'custom_fields.tpl' + )); + $this->tpl->set_block('custom_fields_tpl','custom_fields','custom_fields'); + $this->tpl->set_block('custom_fields_tpl','row','row'); + + $n = 0; + foreach($this->fields as $field => $data) + { + $data['order'] = ($n += 10); + if (isset($this->stock_fields[$field])) + { + $this->set_row($data,$field); + } + else + { + $this->set_row($data,$field,'delete','Delete'); + } + } + $this->tpl->set_var(array( + 'hidden_vars' => '', + 'lang_error' => $error, + 'lang_name' => lang('Name'), + 'lang_length' => lang('Length
(<= 255)'), + 'lang_shown' => lang('Length shown
(emtpy for full length)'), + 'lang_order' => lang('Order'), + 'lang_title' => lang('Title-row'), + 'lang_disabled'=> lang('Disabled'), + 'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.submited'), + 'save_button' => $this->html->submit_button('save','Save'), + 'cancel_button'=> $this->html->submit_button('cancel','Cancel'), + )); + + $this->set_row(array('order' => $n+10),'***new***','add','Add'); + + $this->tpl->pfp('out','custom_fields'); + } + + function set_row($values,$id='',$name='',$label='') + { + if ($id !== '') + { + $id = '['.htmlspecialchars($id).']'; + } + $this->tpl->set_var(array( + 'name' => $values['label'] ? lang($values['label']) : $this->html->input('name'.$id,$values['name'],'','SIZE="40" MAXLENGTH="40"'), + 'length' => $values['label'] ? ' ' : $this->html->input('length'.$id,$values['length'],'','SIZE="3"'), + 'shown' => $values['label'] ? ' ' : $this->html->input('shown'.$id,$values['shown'],'','SIZE="3"'), + 'order' => $this->html->input('order'.$id,$values['order'],'','SIZE="3"'), + 'title' => $this->html->checkbox('title'.$id,$values['title']), + 'disabled'=> $this->html->checkbox('disabled'.$id,$values['disabled']), + 'button' => $name ? $this->html->submit_button($name.$id,$label) : ' ' + )); + if ($name !== 'add') + { + $this->tpl->set_var('tr_color',$values['title'] ? $GLOBALS['phpgw_info']['theme']['th_bg'] : $GLOBALS['phpgw']->nextmatchs->alternate_row_color()); + $this->tpl->parse('rows','row',True); + } + } + + function submited() + { + if ($_POST['cancel']) + { + $GLOBALS['phpgw']->redirect_link('/admin/'); + } + //echo "
"; print_r($_POST); echo "
"; + + foreach ($_POST['order'] as $field => $order) + { + if (isset($_POST['delete'][$field]) || $field == '***new***') + { + continue; + } + while(isset($ordered[$order])) + { + ++$order; + } + $ordered[$order] = array( + 'field' => $field, + 'name' => stripslashes($_POST['name'][$field]), + 'length' => intval($_POST['length'][$field]), + 'shown' => intval($_POST['shown'][$field]), + 'title' => !!$_POST['title'][$field], + 'disabled' => !!$_POST['disabled'][$field] + ); + if (isset($this->stock_fields[$field])) + { + $ordered[$order]['name'] = $this->fields[$field]['name']; + $ordered[$order]['label'] = $this->fields[$field]['label']; + } + } + if (isset($_POST['add']) || strlen($_POST['name']['***new***'])) + { + $name = stripslashes($_POST['name']['***new***']); + + if (!strlen($name) || array_search($name,$_POST['name']) != '***new***') + { + $error .= lang('New name must not exist and not be empty!!!'); + } + else + { + $order = $_POST['order']['***new***']; + while(isset($_POST['order'][$order])) + { + ++$order; + } + $ordered[$order] = array( + 'field' => '#'.$name, + 'name' => $name, + 'length' => intval($_POST['length']['***new***']), + 'shown' => intval($_POST['shown']['***new***']), + 'title' => !!$_POST['title']['***new***'], + 'disabled' => !!$_POST['disabled']['***new***'] + ); + } + } + //echo "
"; print_r($ordered); echo "
\n"; + ksort($ordered,SORT_NUMERIC); + + $this->fields = array(); + foreach($ordered as $order => $data) + { + if ($data['length'] > 255) + { + $data['length'] = 255; + } + if ($data['length'] <= 0) + { + unset($data['length']); + } + if ($data['shown'] >= $data['length'] || $data['shown'] <= 0) + { + unset($data['shown']); + } + if (!$data['title']) + { + unset($data['title']); + } + if (!$data['disabled']) + { + unset($data['disabled']); + } + $field = $data['field']; + unset($data['field']); + $this->fields[$field] = $data; + } + if (!$error && isset($_POST['save'])) + { + $this->save(); + $GLOBALS['phpgw']->redirect_link('/admin/'); + } + $this->index($error); + } + } +?> diff --git a/calendar/inc/class.uiholiday.inc.php b/calendar/inc/class.uiholiday.inc.php index 0d18c1781e..e825100549 100755 --- a/calendar/inc/class.uiholiday.inc.php +++ b/calendar/inc/class.uiholiday.inc.php @@ -81,7 +81,7 @@ @reset($locales); if (!$locales) { - $p->set_var('message',lang('No matches found.')); + $p->set_var('message',lang('no matches found')); $p->parse('rows','row_empty',True); } else @@ -118,6 +118,10 @@ function edit_locale($locale='') { + if ($locale === '') + { + $locale = $this->bo->locale; + } if ($locale) { $this->bo->locales = array($locale); @@ -128,7 +132,7 @@ $link_params = Array( 'menuaction' => 'calendar.uiholiday.admin' ); - Header('Location: ' . $GLOBALS['phpgw']->link($this->base_url,$link_params)); + $GLOBALS['phpgw']->redirect_link($this->base_url,$link_params); } unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); @@ -165,7 +169,7 @@ if (!count($holidays)) { - $p->set_var('message',lang('No matches found.')); + $p->set_var('message',lang('no matches found')); $p->parse('rows','row_empty',True); } else @@ -228,9 +232,9 @@ { $holiday = $this->bo->read_entry($this->bo->id); } - if ($GLOBALS['HTTP_GET_VARS']['locale']) + if ($this->locale) { - $holiday['locale'] = $GLOBALS['HTTP_GET_VARS']['locale']; + $holiday['locale'] = $this->locale; } unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); @@ -445,7 +449,7 @@ $this->bo->year = 0; // for a complete list with all years $holidays = $this->bo->get_holiday_list(); - if (isset($GLOBALS['HTTP_GET_VARS']['download'])) + if (isset($_GET['download'])) { $locale = $this->bo->locales[0]; $browser = CreateObject('phpgwapi.browser'); diff --git a/calendar/inc/class.uiicalendar.inc.php b/calendar/inc/class.uiicalendar.inc.php index e10f9a1e34..61572e79e0 100755 --- a/calendar/inc/class.uiicalendar.inc.php +++ b/calendar/inc/class.uiicalendar.inc.php @@ -87,7 +87,7 @@ echo "Start Time : ".$GLOBALS['phpgw']->common->show_date()."
\n"; @set_time_limit(0); - $icsfile=PHPGW_APP_INC.'/events.vcs'; + $icsfile=PHPGW_APP_INC.'/events.ics'; $fp=fopen($icsfile,'rt'); $contents = explode("\n",fread($fp, filesize($icsfile))); fclose($fp); diff --git a/calendar/inc/hook_admin.inc.php b/calendar/inc/hook_admin.inc.php index cae489ddd8..bd2794cd8b 100755 --- a/calendar/inc/hook_admin.inc.php +++ b/calendar/inc/hook_admin.inc.php @@ -9,18 +9,18 @@ * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ + /* $Id$ */ - { - +{ // Only Modify the $file and $title variables..... - - $file = Array - ( - 'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), - 'Calendar Holiday Management' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'), - 'Global categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True') - ); + $title = $appname; + $file = Array( + 'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), + 'Custom fields and sorting' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'), + 'Calendar Holiday Management' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'), + 'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar') + ); //Do not modify below this line - $GLOBALS['phpgw']->common->display_mainscreen($appname,$file); - } + display_section($appname,$title,$file); +} ?> diff --git a/calendar/inc/hook_email.inc.php b/calendar/inc/hook_email.inc.php index 8ca533cdef..7aea2e999a 100755 --- a/calendar/inc/hook_email.inc.php +++ b/calendar/inc/hook_email.inc.php @@ -20,33 +20,35 @@ if($d1 == 'htt' || $d1 == 'ftp') { echo 'Failed attempt to break in via an old Security Hole!
'."\n"; - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $phpgw->common->phpgw_exit(); } unset($d1); - $GLOBALS['phpgw']->translation->add_app('calendar'); + if ($calendar_id) + { + $GLOBALS['phpgw']->translation->add_app('calendar'); - $cal = CreateObject('calendar.uicalendar'); - //echo "Event ID: $calendar_id
\n"; + $cal = CreateObject('calendar.uicalendar'); + //echo "Event ID: $calendar_id
\n"; - $event = $cal->bo->read_entry($calendar_id); + if ($event = $cal->bo->read_entry($calendar_id)) + { + echo $cal->timematrix( + Array( + 'date' => $GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $phpgw->calendar->tz_offset), + 'starttime' => $cal->bo->splittime('000000',False), + 'endtime' => 0, + 'participants' => $event['participants']) + ) . - echo $cal->timematrix( - Array( - 'date' => $GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $phpgw->calendar->tz_offset), - 'starttime' => $cal->bo->splittime('000000',False), - 'endtime' => 0, - 'participants' => $event['participants']) - ) . + '' . - '' . + $cal->view_event($event) . - $cal->view_event($event) . + '' . - '' . - - $cal->get_response($calendar_id); - - unset($cal); unset($event); + $cal->get_response($calendar_id); + } + unset($cal); unset($event); + } ?> diff --git a/calendar/inc/hook_home.inc.php b/calendar/inc/hook_home.inc.php index b2442b2ace..b9b8c7e2f0 100755 --- a/calendar/inc/hook_home.inc.php +++ b/calendar/inc/hook_home.inc.php @@ -18,8 +18,7 @@ if($d1 == 'htt' || $d1 == 'ftp' ) { echo 'Failed attempt to break in via an old Security Hole!
'."\n"; - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } unset($d1); @@ -36,6 +35,8 @@ $GLOBALS['g_month'] = substr($GLOBALS['date'],4,2); $GLOBALS['g_day'] = substr($GLOBALS['date'],6,2); $GLOBALS['owner'] = $GLOBALS['phpgw_info']['user']['account_id']; + $GLOBALS['css'] = "\n".''; $page_ = explode('.',$GLOBALS['phpgw_info']['user']['preferences']['calendar']['defaultcalendar']); $_page = substr($page_[0],0,7); // makes planner from planner_{user|category} @@ -52,11 +53,39 @@ } include(PHPGW_INCLUDE_ROOT.'/calendar/inc/hook_home_'.$_page.'.inc.php'); + $title = ''.lang('Calendar').''; + + $portalbox = CreateObject('phpgwapi.listbox', + Array( + 'title' => $title, + 'primary' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], + 'secondary' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], + 'tertiary' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], + 'width' => '100%', + 'outerborderwidth' => '0', + 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler') + ) + ); + $app_id = $GLOBALS['phpgw']->applications->name2id('calendar'); $GLOBALS['portal_order'][] = $app_id; + $var = Array( + 'up' => Array('url' => '/set_box.php', 'app' => $app_id), + 'down' => Array('url' => '/set_box.php', 'app' => $app_id), + 'close' => Array('url' => '/set_box.php', 'app' => $app_id), + 'question' => Array('url' => '/set_box.php', 'app' => $app_id), + 'edit' => Array('url' => '/set_box.php', 'app' => $app_id) + ); - $GLOBALS['phpgw']->portalbox->set_params(array('app_id' => $app_id, - 'title' => lang('calendar'))); - $GLOBALS['phpgw']->portalbox->draw($GLOBALS['extra_data']); - } + while(list($key,$value) = each($var)) + { + $portalbox->set_controls($key,$value); + } + + $portalbox->data = Array(); + + echo "\n".''."\n".$portalbox->draw($GLOBALS['extra_data'])."\n".''."\n"; + unset($cal); + } + flush(); ?> diff --git a/calendar/inc/hook_home_day.inc.php b/calendar/inc/hook_home_day.inc.php index 45e8f13ef7..0bcf11f2dd 100755 --- a/calendar/inc/hook_home_day.inc.php +++ b/calendar/inc/hook_home_day.inc.php @@ -18,12 +18,11 @@ if($d1 == 'htt' || $d1 == 'ftp' ) { echo 'Failed attempt to break in via an old Security Hole!
'."\n"; - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } unset($d1); - $GLOBALS['extra_data'] = ''."\n".' + diff --git a/calendar/templates/default/view.tpl b/calendar/templates/default/view.tpl index d2c26e6998..59bc413deb 100755 --- a/calendar/templates/default/view.tpl +++ b/calendar/templates/default/view.tpl @@ -12,14 +12,14 @@ - + - diff --git a/calendar/templates/idots/day.tpl b/calendar/templates/idots/day.tpl new file mode 100755 index 0000000000..9dcc8278dc --- /dev/null +++ b/calendar/templates/idots/day.tpl @@ -0,0 +1,38 @@ + + +{printer_friendly} +
' + $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".' diff --git a/calendar/templates/default/day_cal.tpl b/calendar/templates/default/day_cal.tpl index 77c15dcfa0..7213fafdc3 100755 --- a/calendar/templates/default/day_cal.tpl +++ b/calendar/templates/default/day_cal.tpl @@ -9,15 +9,15 @@ - + - + - + - + diff --git a/calendar/templates/default/edit.tpl b/calendar/templates/default/edit.tpl index ad1e9d3b3f..5aad728a94 100755 --- a/calendar/templates/default/edit.tpl +++ b/calendar/templates/default/edit.tpl @@ -1,9 +1,16 @@ +
-
+ {common_hidden}
' . ExecMethod('calendar.uicalendar.mini_calendar', Array( 'day' => $GLOBALS['g_day'], diff --git a/calendar/inc/hook_home_month.inc.php b/calendar/inc/hook_home_month.inc.php index de0b82671f..8e1c0bc356 100755 --- a/calendar/inc/hook_home_month.inc.php +++ b/calendar/inc/hook_home_month.inc.php @@ -18,12 +18,11 @@ if($d1 == 'htt' || $d1 == 'ftp' ) { echo 'Failed attempt to break in via an old Security Hole!
'."\n"; - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } unset($d1); - $GLOBALS['extra_data'] = '
'."\n".''."\n"; ?> diff --git a/calendar/inc/hook_home_week.inc.php b/calendar/inc/hook_home_week.inc.php index 1ecc813c61..22c5334047 100755 --- a/calendar/inc/hook_home_week.inc.php +++ b/calendar/inc/hook_home_week.inc.php @@ -18,12 +18,11 @@ if($d1 == 'htt' || $d1 == 'ftp' ) { echo 'Failed attempt to break in via an old Security Hole!
'."\n"; - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } unset($d1); - $GLOBALS['extra_data'] = ' + + + + + + + + + diff --git a/calendar/templates/default/day.tpl b/calendar/templates/default/day.tpl index ac4afdfd1b..571ae4fe8a 100755 --- a/calendar/templates/default/day.tpl +++ b/calendar/templates/default/day.tpl @@ -14,7 +14,7 @@
' + $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".''."\n".''."\n".'
' . ExecMethod('calendar.uicalendar.get_month') .'
'."\n".'
'."\n".''."\n"; ?> diff --git a/calendar/inc/hook_home_year.inc.php b/calendar/inc/hook_home_year.inc.php index 6c0a470272..ce157329be 100755 --- a/calendar/inc/hook_home_year.inc.php +++ b/calendar/inc/hook_home_year.inc.php @@ -18,12 +18,11 @@ if($d1 == 'htt' || $d1 == 'ftp' ) { echo 'Failed attempt to break in via an old Security Hole!
'."\n"; - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); } unset($d1); - $GLOBALS['extra_data'] = ' - - - - - + + + + + + - - - - - - + + + + + + - + + + + + + diff --git a/calendar/templates/default/config.tpl b/calendar/templates/default/config.tpl index 19d3f172fa..b32ccf1547 100644 --- a/calendar/templates/default/config.tpl +++ b/calendar/templates/default/config.tpl @@ -1,20 +1,20 @@
' + $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".''."\n".''."\n".'
' . ExecMethod('calendar.uicalendar.get_week') .'
'."\n".'
'."\n".''."\n"; ?> diff --git a/calendar/inc/hook_settings.inc.php b/calendar/inc/hook_settings.inc.php index 8680184387..d660ff7b21 100644 --- a/calendar/inc/hook_settings.inc.php +++ b/calendar/inc/hook_settings.inc.php @@ -15,52 +15,103 @@ /* $Id$ */ - create_check_box('show default view on main screen','mainscreen_showevents'); - - create_select_box('weekday starts on','weekdaystarts',array( + ExecMethod('calendar.bocalendar.check_set_default_prefs'); + + $default = array( + 'day' => lang('Daily'), + 'week' => lang('Weekly'), + 'month' => lang('Monthly'), + 'year' => lang('Yearly'), + 'planner_cat' => lang('Planner by category'), + 'planner_user' => lang('Planner by user'), + ); + create_select_box('default calendar view','defaultcalendar',$default, + 'Which of calendar view do you want to see, when you start calendar ?'); + + create_check_box('show default view on main screen','mainscreen_showevents', + 'Displays your default calendar view on the startpage (page you get when you enter phpGroupWare or click on the homepage icon)?'); +/* + $summary = array( + 'no' => lang('Never'), + 'daily' => lang('Daily'), + 'weekly' => lang('Weekly') + ); + create_select_box('Receive summary of appointments','summary',$summary, + 'Do you want to receive a regulary summary of your appointsments via email?
The summary is sent to your standard email-address on the morning of that day or on Monday for weekly summarys.
It is only sent when you have any appointments on that day or week.'); +*/ + $updates = array( + 'no' => lang('Never'), + 'add_cancel' => lang('on invitation / cancelation only'), + 'time_change_4h' => lang('on time change of more than 4 hours too'), + 'time_change' => lang('on any time change too'), + 'modifications' => lang('on all modification, but responses'), + 'responses' => lang('on participant responses too') + ); + create_select_box('Receive email updates','receive_updates',$updates, + "Do you want to be notified about new or changed appointments? You be notified about changes you make yourself.
You can limit the notifications to certain changes only. Each item includes all the notification listed above it. All modifications include changes of title, description, participants, but no participant responses. If the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too."); + + $update_formats = array( + 'none' => lang('None'), + 'extended' => lang('Extended'), + 'ical' => lang('iCal / rfc2445') + ); + create_select_box('Format of event updates','update_format',$update_formats, + 'Extended updates always include the complete event-details. iCal\'s can be imported by certain other calendar-applications.'); + + $event_details = array( + 'to-fullname' => lang('Fullname of person to notify'), + 'to-firstname'=> lang('Firstname of person to notify'), + 'to-lastname' => lang('Lastname of person to notify'), + 'title' => lang('Title of the event'), + 'description' => lang('Description'), + 'startdate' => lang('Start Date/Time'), + 'enddate' => lang('End Date/Time'), + 'olddate' => lang('Old Startdate'), + 'category' => lang('Category'), + 'location' => lang('Location'), + 'priority' => lang('Priority'), + 'participants'=> lang('Participants'), + 'owner' => lang('Owner'), + 'repetition' => lang('Repetitiondetails (or empty)'), + 'action' => lang('Action that caused the notify: Added, Canceled, Accepted, Rejected, ...') + ); + create_notify('Notification messages for added events ','notifyAdded',5,50, + 'This message is sent to every participant of events you own, who has requested notifcations about new events.
You can use certain variables which get substituted with the data of the event. The first line is the subject of the email.', + '',$event_details); + create_notify('Notification messages for canceled events ','notifyCanceled',5,50, + 'This message is sent for canceled or deleted events.','',$event_details,False); + create_notify('Notification messages for modified events ','notifyModified',5,50, + 'This message is sent for modified or moved events.','',$event_details,False); + create_notify('Notification messages for your responses ','notifyResponse',5,50, + 'This message is sent when you accept, tentative accept or reject an event.', + '',$event_details,False); + create_notify('Notification messages for your alarms','notifyAlarm',5,50, + 'This message is sent when you set an Alarm for a certain event. Include all information you might need.', + '',$event_details,False); + + create_check_box('Show invitations you rejected','show_rejected', + 'Should invitations you rejected still be shown in your calendar ?
You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!'); + + create_check_box('Display status of events','display_status', + 'Should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ?'); + + $weekdaystarts = array( 'Monday' => lang('Monday'), 'Sunday' => lang('Sunday'), 'Saturday' => lang('Saturday') - )); + ); + create_select_box('weekday starts on','weekdaystarts',$weekdaystarts, + 'This day is shown as first day in the week or month view.'); for ($i=0; $i < 24; ++$i) { $options[$i] = $GLOBALS['phpgw']->common->formattime($i,'00'); } - create_select_box('work day starts on','workdaystarts',$options); - create_select_box('work day ends on','workdayends',$options); - unset($options); - - create_select_box('default calendar view','defaultcalendar',array( - 'planner_cat' => lang('Planner by category'), - 'planner_user' => lang('Planner by user'), - 'year' => lang('Yearly'), - 'month' => lang('Monthly'), - 'week' => lang('Weekly'), - 'day' => lang('Daily') - )); - $groups = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); - $options = array(-1 => lang('none')); - foreach($groups as $group) - { - $options[$group['account_id']] = $GLOBALS['phpgw']->common->grab_owner_name($group['account_id']); - } - create_select_box('Preselected group for entering the planner','planner_start_with_group',$options); - unset($groups); - unset($options); - unset($group); - - create_select_box('Default calendar filter','defaultfilter',array( - 'all' => lang('all'), - 'private' => lang('private only'), -// 'public' => lang('global public only'), -// 'group' => lang('group public only'), -// 'private+public' => lang('private and global public'), -// 'private+group' => lang('private and group public'), -// 'public+group' => lang('global public and group public') - )); - - create_select_box('Display interval in Day View','interval',array( + create_select_box('work day starts on','workdaystarts',$options, + 'This defines the start of your dayview. Events before this time, are shown above the dayview.
This time is also used as a default starttime for new events.'); + create_select_box('work day ends on','workdayends',$options, + 'This defines the end of your dayview. Events after this time, are shown below the dayview.'); + $intervals = array( 5 => '5', 10 => '10', 15 => '15', @@ -68,22 +119,50 @@ 30 => '30', 45 => '45', 60 => '60' - )); + ); + create_select_box('Intervals in day view','interval',$intervals, + 'Defines the size in minutes of the lines in the day view.'); + create_input_box('default appointment length (in minutes)','defaultlength', + 'Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.','',3); + + $groups = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); + $options = array(-1 => lang('none')); + if (is_array($groups)) + { + foreach($groups as $group) + { + $options[$group['account_id']] = $GLOBALS['phpgw']->common->grab_owner_name($group['account_id']); + } + } + create_select_box('Preselected group for entering the planner','planner_start_with_group',$options, + 'This group that is preselected when you enter the planner. You can change it in the planner anytime you want.'); - create_select_box('Number of Intervals per Day in Planner View','planner_intervals_per_day',array( + $planner_intervals = array( 1 => '1', 2 => '2', 3 => '3', 4 => '4', - )); + ); + create_select_box('Intervals per day in planner view','planner_intervals_per_day', + $planner_intervals,'Specifies the the number of intervals shown in the planner view.'); - create_check_box('Send/receive updates via email','send_updates'); - create_check_box('Receive extra information in event mails','send_extra'); + $defaultfilter = array( + 'all' => lang('all'), + 'private' => lang('private only'), +// 'public' => lang('global public only'), +// 'group' => lang('group public only'), +// 'private+public' => lang('private and global public'), +// 'private+group' => lang('private and group public'), +// 'public+group' => lang('global public and group public') + ); + create_select_box('Default calendar filter','defaultfilter',$defaultfilter, + 'Which events do you want to see when you enter the calendar.'); - create_check_box('Display status of events','display_status'); + create_check_box('Set new events to private','default_private', + 'Should new events created as private by default ?'); - create_check_box('When creating new events default set to private','default_private'); + create_check_box('Print the mini calendars','display_minicals', + 'Should the mini calendars by printed / displayed in the printer friendly views ?'); - create_check_box('Display mini calendars when printing','display_minicals'); - - create_check_box('Print calendars in black & white','print_black_white'); + create_check_box('Print calendars in black & white','print_black_white', + 'Should the printer friendly view be in black & white or in color (as in normal view)?'); diff --git a/calendar/inc/hook_sidebox_menu.inc.php b/calendar/inc/hook_sidebox_menu.inc.php new file mode 100644 index 0000000000..cb83898aec --- /dev/null +++ b/calendar/inc/hook_sidebox_menu.inc.php @@ -0,0 +1,64 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + /* $Id$ */ +{ + + /* + This hookfile is for generating an app-specific side menu used in the idots + template set. + + $menu_title speaks for itself + $file is the array with link to app functions + + display_sidebox can be called as much as you like + */ + + $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); + $file = Array( + 'New Entry' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'), + '_NewLine_'=>'', // give a newline + 'Today'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day'), + 'This week'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week'), + 'This month'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month'), + 'This year'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year'), + '_NewLine_'=>'', // give a newline + 'Group Planner'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner'), + 'Daily Matrix View'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect'), + 'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import') + ); + display_sidebox($appname,$menu_title,$file); + + if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) + { + $menu_title = lang('Preferences'); + $file = Array( + 'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'), + 'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'), + 'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'), + ); + display_sidebox($appname,$menu_title,$file); + } + + if ($GLOBALS['phpgw_info']['user']['apps']['admin']) + { + $menu_title = lang('Administration'); + $file = Array( + 'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'), + 'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'), + 'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'), + 'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar'), + ); + display_sidebox($appname,$menu_title,$file); + } +} +?> diff --git a/calendar/index.php b/calendar/index.php index 848d7b7047..e4c11b5a5a 100755 --- a/calendar/index.php +++ b/calendar/index.php @@ -35,8 +35,9 @@ 'menuaction'=> 'calendar.uicalendar.index', 'date' => date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime) ); + +// echo 'Local DateTime: '.date('Ymd H:i:s',$GLOBALS['phpgw']->datetime->users_localtime).'
'."\n"; Header('Location: '.$GLOBALS['phpgw']->link('/index.php',$parms)); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $GLOBALS['phpgw']->common->phpgw_exit(); ?> diff --git a/calendar/preferences.php b/calendar/preferences.php index 1ed4e686c5..9e1a39394c 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -88,8 +88,7 @@ $phpgw->preferences->save_repository(True); Header('Location: '.$phpgw->link('/preferences/index.php')); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $phpgw->common->phpgw_exit(); } function display_item($field,$data) @@ -107,6 +106,7 @@ } $phpgw->common->phpgw_header(); + echo parse_navbar(); $p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('calendar')); $templates = Array( @@ -235,4 +235,5 @@ display_item(lang('Print calendars in black & white'),$str); $p->pparse('out','pref'); + $phpgw->common->phpgw_footer(); ?> diff --git a/calendar/setup/holidays.AU b/calendar/setup/holidays.AU new file mode 100755 index 0000000000..bd95bf124d --- /dev/null +++ b/calendar/setup/holidays.AU @@ -0,0 +1,99 @@ +National Fixed: +AU New Year's Day 1 1 0 0 1 +AU Australia Day 26 1 0 0 1 +AU ANZAC Day 25 4 0 0 1 +AU Queen's Birthday (not WA) 0 6 2 1 0 +AU Christmas Day 25 12 0 0 1 +AU Boxing Day (not SA) 26 12 0 0 1 + +Regional: +AU ACT: Union Picnic Day 0 3 1 1 0 +AU Tas: Royal Hobart Regatta 0 2 2 1 0 +AU Tas: Launceston Cup 0 2 99 3 0 +AU Vic: Labour Day 0 3 2 1 0 +AU Tas: Eight Hours Day 0 3 2 1 0 +AU ACT: Canberra Day 0 3 3 1 0 +AU NT: May Day 0 5 1 1 0 +AU Qld: Labour Day 0 5 1 1 0 +AU SA: Adelaide Cup Day 0 5 3 1 0 +AU WA: Foundation Day 0 6 1 1 0 +AU ACT/NSW: Bank Holiday 0 8 1 1 0 +AU NT: Picnic Day 0 8 1 1 0 +AU Qld: Show Day 0 8 2 3 0 +AU ACT/NSW/SA: Labour Day 0 10 1 1 0 +AU Tas: Launceston Show 0 10 1 4 0 +AU Tas: Hobart Show 0 10 3 4 0 +AU WA: Queen's Birthday 0 10 5 1 0 +AU Tas: Recreation Day 0 11 1 1 0 +AU Vic: Melbourne Cup 0 11 1 2 0 +AU SA: Proclamation Day 26 12 0 0 1 + +2002: +AU Good Friday 29 3 2002 0 0 +AU Easter Sunday 1 4 2002 0 0 +AU Easter Monday 2 4 2002 0 0 + +2003: +AU Good Friday 18 4 2003 0 0 +AU Easter Sunday 20 4 2003 0 0 +AU Easter Monday 21 4 2003 0 0 + +2004: +AU Good Friday 9 4 2004 0 0 +AU Easter Sunday 11 4 2004 0 0 +AU Easter Monday 12 4 2004 0 0 + +2005: +AU Good Friday 25 3 2005 0 0 +AU Easter Sunday 27 3 2005 0 0 +AU Easter Monday 28 3 2005 0 0 + +2006: +AU Good Friday 14 4 2006 0 0 +AU Easter Sunday 16 4 2006 0 0 +AU Easter Monday 17 4 2006 0 0 + +2007: +AU Good Friday 6 4 2007 0 0 +AU Easter Sunday 8 4 2007 0 0 +AU Easter Monday 9 4 2007 0 0 + +2008: +AU Good Friday 21 3 2008 0 0 +AU Easter Sunday 23 3 2008 0 0 +AU Easter Monday 24 3 2008 0 0 + +2009: +AU Good Friday 10 4 2009 0 0 +AU Easter Sunday 12 4 2009 0 0 +AU Easter Monday 13 4 2009 0 0 + +2010: +AU Good Friday 2 4 2010 0 0 +AU Easter Sunday 4 4 2010 0 0 +AU Easter Monday 5 4 2010 0 0 + +2011: +AU Good Friday 22 4 2011 0 0 +AU Easter Sunday 24 4 2011 0 0 +AU Easter Monday 25 4 2011 0 0 + +2012: +AU Good Friday 6 4 2012 0 0 +AU Easter Sunday 8 4 2012 0 0 +AU Easter Monday 9 4 2012 0 0 + +2013: +AU Good Friday 29 3 2013 0 0 +AU Easter Sunday 31 3 2013 0 0 +AU Easter Monday 1 4 2013 0 0 + +2014: +AU Good Friday 18 4 2014 0 0 +AU Easter Sunday 20 4 2014 0 0 +AU Easter Monday 21 4 2014 0 0 + +2015: +AU Good Friday 3 4 2015 0 0 +AU Easter Sunday 5 4 2015 0 0 +AU Easter Monday 6 4 2015 0 0 diff --git a/calendar/setup/holidays.CA b/calendar/setup/holidays.CA index 3c899dc5da..31a170980a 100755 --- a/calendar/setup/holidays.CA +++ b/calendar/setup/holidays.CA @@ -1,5 +1,25 @@ -CA Quebec Civic Holiday 3 1 0 0 1 +CA New Years 1 1 0 0 0 +CA Civic Holiday (Quebec) 2 1 0 0 0 +CA Valentines Day 14 2 0 0 0 +CA St Patricks Day 17 3 0 0 0 +CA Beginning of Spring 20 3 0 0 0 +CA Good Friday 25 3 2005 0 0 +CA Easter 27 3 2005 0 0 +CA Easter Monday 28 3 2005 0 0 +CA Good Friday 9 4 2004 0 0 +CA Easter 11 4 2004 0 0 +CA Easter Monday 12 4 2004 0 0 +CA Good Friday 18 4 2003 5 0 +CA Easter 20 4 2003 0 0 +CA Easter Monday 21 4 2003 1 0 +CA Victoria Day (Monday b4 M24) 0 5 3 1 0 +CA Mothers Day 0 5 2 0 0 +CA Fathers Day 0 6 3 0 0 +CA St Jean Baptiste Day (Quebec) 24 6 0 0 0 +CA Canada Day 1 7 0 0 0 CA Canadian Civic Holiday 0 8 1 1 0 -CA Rememberence Day 11 11 0 0 1 +CA Labour Day 0 9 1 1 0 +CA Thanksgiving 25 10 2 1 0 +CA Remembrance Day 11 11 0 0 0 CA Christmas Day 25 12 0 0 1 -CA Boxing Day 26 12 0 0 1 +CA Boxing Day 26 12 0 0 0 diff --git a/calendar/setup/holidays.DE b/calendar/setup/holidays.DE new file mode 100644 index 0000000000..51b1ec6c33 --- /dev/null +++ b/calendar/setup/holidays.DE @@ -0,0 +1,256 @@ +Regelmässig: +DE Sylvester 31 12 0 0 0 +DE Neujahr 1 1 0 0 0 +DE Hl. Drei Könige (Bw,By,St) 6 1 0 0 0 +DE Maifeiertag 1 5 0 0 0 +DE Maria Himmelfahrt (Sl) 15 8 0 0 0 +DE Tag d. Dt. Einheit 3 10 0 0 0 +DE Reformationstag (Bb,Mv,Sn,St) 31 10 0 0 0 +DE Allerheiligen (Bw,By,Nw,Rp,Sl) 1 11 0 0 0 +DE Heiliger Abend 24 12 0 0 0 +DE 1. Weihnachtstag 25 12 0 0 0 +DE 2. Weihnachtstag 26 12 0 0 0 + +2002: +DE Gründonnerstag 28 3 2002 0 0 +DE Karfreitag 29 3 2002 0 0 +DE Ostersonntag 1 4 2002 0 0 +DE Ostermontag 2 4 2002 0 0 +DE Christi Himmelfahrt 9 5 2002 0 0 +DE Pfingstsonntag 19 5 2002 0 0 +DE Pfingstmontag 20 5 2002 0 0 +DE Fronleichnam 30 5 2002 0 0 + +2003: +DE Rosenmontag 3 3 2003 0 0 +DE Fastnacht 4 3 2003 0 0 +DE Aschermittwoch 5 3 2003 0 0 +DE Gründonnerstag 17 4 2003 0 0 +DE Karfreitag 18 4 2003 0 0 +DE Ostersonntag 20 4 2003 0 0 +DE Ostermontag 21 4 2003 0 0 +DE Christi Himmelfahrt 29 5 2003 0 0 +DE Pfingstsonntag 8 6 2003 0 0 +DE Pfingstmontag 9 6 2003 0 0 +DE Fronleichnam 19 6 2003 0 0 +DE Buß- und Bettag 19 11 2003 0 0 +DE 1. Advent 30 11 2003 0 0 +DE 2. Advent 7 12 2003 0 0 +DE 3. Advent 14 12 2003 0 0 +DE 4. Advent 21 12 2003 0 0 + +2004: +DE Rosenmontag 23 2 2004 0 0 +DE Fastnacht 24 2 2004 0 0 +DE Aschermittwoch 25 2 2004 0 0 +DE Gründonnerstag 8 4 2004 0 0 +DE Karfreitag 9 4 2004 0 0 +DE Ostersonntag 11 4 2004 0 0 +DE Ostermontag 12 4 2004 0 0 +DE Christi Himmelfahrt 20 5 2004 0 0 +DE Pfingstsonntag 30 5 2004 0 0 +DE Pfingstmontag 31 5 2004 0 0 +DE Fronleichnam 10 6 2004 0 0 +DE Buß- und Bettag 17 11 2004 0 0 +DE 1. Advent 28 11 2004 0 0 +DE 2. Advent 5 12 2004 0 0 +DE 3. Advent 12 12 2004 0 0 +DE 4. Advent 19 12 2004 0 0 + +2005: +DE Rosenmontag 7 2 2005 0 0 +DE Fastnacht 8 2 2005 0 0 +DE Aschermittwoch 9 2 2005 0 0 +DE Gründonnerstag 24 3 2005 0 0 +DE Karfreitag 25 3 2005 0 0 +DE Ostersonntag 27 3 2005 0 0 +DE Ostermontag 28 3 2005 0 0 +DE Christi Himmelfahrt 5 5 2005 0 0 +DE Pfingstsonntag 15 5 2005 0 0 +DE Pfingstmontag 16 5 2005 0 0 +DE Fronleichnam 26 5 2005 0 0 +DE Buß- und Bettag 16 11 2005 0 0 +DE 1. Advent 27 11 2005 0 0 +DE 2. Advent 4 12 2005 0 0 +DE 3. Advent 11 12 2005 0 0 +DE 4. Advent 18 12 2005 0 0 + +2006: +DE Rosenmontag 27 2 2006 0 0 +DE Fastnacht 28 2 2006 0 0 +DE Aschermittwoch 1 3 2006 0 0 +DE Gründonnerstag 13 4 2006 0 0 +DE Karfreitag 14 4 2006 0 0 +DE Ostersonntag 16 4 2006 0 0 +DE Ostermontag 17 4 2006 0 0 +DE Christi Himmelfahrt 25 5 2006 0 0 +DE Pfingstsonntag 4 6 2006 0 0 +DE Pfingstmontag 5 6 2006 0 0 +DE Fronleichnam 15 6 2006 0 0 +DE Buß- und Bettag 22 11 2006 0 0 +DE 1. Advent 3 12 2006 0 0 +DE 2. Advent 10 12 2006 0 0 +DE 3. Advent 17 12 2006 0 0 +DE 4. Advent 24 12 2006 0 0 + +2007: +DE Rosenmontag 19 2 2007 0 0 +DE Fastnacht 20 2 2007 0 0 +DE Aschermittwoch 21 2 2007 0 0 +DE Gründonnerstag 5 4 2007 0 0 +DE Karfreitag 6 4 2007 0 0 +DE Ostersonntag 8 4 2007 0 0 +DE Ostermontag 9 4 2007 0 0 +DE Christi Himmelfahrt 17 5 2007 0 0 +DE Pfingstsonntag 27 5 2007 0 0 +DE Pfingstmontag 28 5 2007 0 0 +DE Fronleichnam 7 6 2007 0 0 +DE Buß- und Bettag 21 11 2007 0 0 +DE 1. Advent 2 12 2007 0 0 +DE 2. Advent 9 12 2007 0 0 +DE 3. Advent 16 12 2007 0 0 +DE 4. Advent 23 12 2007 0 0 + +2008: +DE Rosenmontag 4 2 2008 0 0 +DE Fastnacht 5 2 2008 0 0 +DE Aschermittwoch 6 2 2008 0 0 +DE Gründonnerstag 20 3 2008 0 0 +DE Karfreitag 21 3 2008 0 0 +DE Ostersonntag 23 3 2008 0 0 +DE Ostermontag 24 3 2008 0 0 +DE Christi Himmelfahrt 1 5 2008 0 0 +DE Pfingstsonntag 11 5 2008 0 0 +DE Pfingstmontag 12 5 2008 0 0 +DE Fronleichnam 22 5 2008 0 0 +DE Buß- und Bettag 19 11 2008 0 0 +DE 1. Advent 30 11 2008 0 0 +DE 2. Advent 7 12 2008 0 0 +DE 3. Advent 14 12 2008 0 0 +DE 4. Advent 21 12 2008 0 0 + +2009: +DE Rosenmontag 23 2 2009 0 0 +DE Fastnacht 24 2 2009 0 0 +DE Aschermittwoch 25 2 2009 0 0 +DE Gründonnerstag 9 4 2009 0 0 +DE Karfreitag 10 4 2009 0 0 +DE Ostersonntag 12 4 2009 0 0 +DE Ostermontag 13 4 2009 0 0 +DE Christi Himmelfahrt 21 5 2009 0 0 +DE Pfingstsonntag 31 5 2009 0 0 +DE Pfingstmontag 1 6 2009 0 0 +DE Fronleichnam 11 6 2009 0 0 +DE Buß- und Bettag 18 11 2009 0 0 +DE 1. Advent 29 11 2009 0 0 +DE 2. Advent 6 12 2009 0 0 +DE 3. Advent 13 12 2009 0 0 +DE 4. Advent 20 12 2009 0 0 + +2010: +DE Rosenmontag 15 2 2010 0 0 +DE Fastnacht 16 2 2010 0 0 +DE Aschermittwoch 17 2 2010 0 0 +DE Gründonnerstag 1 4 2010 0 0 +DE Karfreitag 2 4 2010 0 0 +DE Ostersonntag 4 4 2010 0 0 +DE Ostermontag 5 4 2010 0 0 +DE Christi Himmelfahrt 13 5 2010 0 0 +DE Pfingstsonntag 23 5 2010 0 0 +DE Pfingstmontag 24 5 2010 0 0 +DE Fronleichnam 3 6 2010 0 0 +DE Buß- und Bettag 17 11 2010 0 0 +DE 1. Advent 28 11 2010 0 0 +DE 2. Advent 5 12 2010 0 0 +DE 3. Advent 12 12 2010 0 0 +DE 4. Advent 19 12 2010 0 0 + +2011: +DE Rosenmontag 7 3 2011 0 0 +DE Fastnacht 8 3 2011 0 0 +DE Aschermittwoch 9 3 2011 0 0 +DE Gründonnerstag 21 4 2011 0 0 +DE Karfreitag 22 4 2011 0 0 +DE Ostersonntag 24 4 2011 0 0 +DE Ostermontag 25 4 2011 0 0 +DE Christi Himmelfahrt 2 6 2011 0 0 +DE Pfingstsonntag 12 6 2011 0 0 +DE Pfingstmontag 13 6 2011 0 0 +DE Fronleichnam 23 6 2011 0 0 +DE Buß- und Bettag 16 11 2011 0 0 +DE 1. Advent 27 11 2011 0 0 +DE 2. Advent 4 12 2011 0 0 +DE 3. Advent 11 12 2011 0 0 +DE 4. Advent 18 12 2011 0 0 + +2012: +DE Rosenmontag 20 2 2012 0 0 +DE Fastnacht 21 2 2012 0 0 +DE Aschermittwoch 22 2 2012 0 0 +DE Gründonnerstag 5 4 2012 0 0 +DE Karfreitag 6 4 2012 0 0 +DE Ostersonntag 8 4 2012 0 0 +DE Ostermontag 9 4 2012 0 0 +DE Christi Himmelfahrt 17 5 2012 0 0 +DE Pfingstsonntag 27 5 2012 0 0 +DE Pfingstmontag 28 5 2012 0 0 +DE Fronleichnam 7 6 2012 0 0 +DE Buß- und Bettag 21 11 2012 0 0 +DE 1. Advent 2 12 2012 0 0 +DE 2. Advent 9 12 2012 0 0 +DE 3. Advent 16 12 2012 0 0 +DE 4. Advent 23 12 2012 0 0 + +2013: +DE Rosenmontag 11 2 2013 0 0 +DE Fastnacht 12 2 2013 0 0 +DE Aschermittwoch 13 2 2013 0 0 +DE Gründonnerstag 28 3 2013 0 0 +DE Karfreitag 29 3 2013 0 0 +DE Ostersonntag 31 3 2013 0 0 +DE Ostermontag 1 4 2013 0 0 +DE Christi Himmelfahrt 9 5 2013 0 0 +DE Pfingstsonntag 19 5 2013 0 0 +DE Pfingstmontag 20 5 2013 0 0 +DE Fronleichnam 30 5 2013 0 0 +DE Buß- und Bettag 20 11 2013 0 0 +DE 1. Advent 1 12 2013 0 0 +DE 2. Advent 8 12 2013 0 0 +DE 3. Advent 15 12 2013 0 0 +DE 4. Advent 22 12 2013 0 0 + +2014: +DE Rosenmontag 3 3 2014 0 0 +DE Fastnacht 4 3 2014 0 0 +DE Aschermittwoch 5 3 2014 0 0 +DE Gründonnerstag 17 4 2014 0 0 +DE Karfreitag 18 4 2014 0 0 +DE Ostersonntag 20 4 2014 0 0 +DE Ostermontag 21 4 2014 0 0 +DE Christi Himmelfahrt 29 5 2014 0 0 +DE Pfingstsonntag 8 6 2014 0 0 +DE Pfingstmontag 9 6 2014 0 0 +DE Fronleichnam 19 6 2014 0 0 +DE Buß- und Bettag 19 11 2014 0 0 +DE 1. Advent 30 11 2014 0 0 +DE 2. Advent 7 12 2014 0 0 +DE 3. Advent 14 12 2014 0 0 +DE 4. Advent 21 12 2014 0 0 + +2015: +DE Rosenmontag 16 2 2015 0 0 +DE Fastnacht 17 2 2015 0 0 +DE Aschermittwoch 18 2 2015 0 0 +DE Gründonnerstag 2 4 2015 0 0 +DE Karfreitag 3 4 2015 0 0 +DE Ostersonntag 5 4 2015 0 0 +DE Ostermontag 6 4 2015 0 0 +DE Christi Himmelfahrt 14 5 2015 0 0 +DE Pfingstsonntag 24 5 2015 0 0 +DE Pfingstmontag 25 5 2015 0 0 +DE Fronleichnam 4 6 2015 0 0 +DE Buß- und Bettag 18 11 2015 0 0 +DE 1. Advent 29 11 2015 0 0 +DE 2. Advent 6 12 2015 0 0 +DE 3. Advent 13 12 2015 0 0 +DE 4. Advent 20 12 2015 0 0 diff --git a/calendar/setup/holidays.FR b/calendar/setup/holidays.FR new file mode 100644 index 0000000000..ff0b17df9c --- /dev/null +++ b/calendar/setup/holidays.FR @@ -0,0 +1,26 @@ +FR Jour de l'an 1 1 0 0 0 +FR Lundi de Pâques 24 3 2008 0 0 +FR Lundi de Pâques 28 3 2005 0 0 +FR Lundi de Pâques 9 4 2007 0 0 +FR Lundi de Pâques 12 4 2004 0 0 +FR Lundi de Pâques 17 4 2006 0 0 +FR Lundi de Pâques 21 4 2003 0 0 +FR Fête du travail 1 5 0 0 0 +FR Ascension 1 5 2008 0 0 +FR Ascension 5 5 2005 0 0 +FR Fête de la libération 8 5 0 0 0 +FR Lundi de Pentecôte 12 5 2008 0 0 +FR Lundi de Pentecôte 16 5 2005 0 0 +FR Ascension 17 5 2007 0 0 +FR Ascension 20 5 2004 0 0 +FR Ascension 25 5 2006 0 0 +FR Lundi de Pentecôte 28 5 2007 0 0 +FR Ascension 29 5 2003 0 0 +FR Lundi de Pentecôte 31 5 2004 0 0 +FR Lundi de Pentecôte 5 6 2006 0 0 +FR Lundi de Pentecôte 9 6 2003 0 0 +FR Fête nationale 14 7 0 0 0 +FR Assomption 15 8 0 0 0 +FR Toussaint 1 11 0 0 0 +FR Armistice 11 11 0 0 0 +FR Noël 25 12 0 0 0 diff --git a/calendar/setup/holidays.JP b/calendar/setup/holidays.JP index c9516b0f87..316e54e82f 100755 --- a/calendar/setup/holidays.JP +++ b/calendar/setup/holidays.JP @@ -4,10 +4,9 @@ JP JP ½Õʬ¤ÎÆü 0 3 0 0 1 JP ¤ß¤É¤ê¤ÎÆü 29 4 0 0 1 JP ·ûË¡µ­Ç°Æü 3 5 0 0 1 -JP ¹ṉ̃¤Î½ËÆü 4 5 0 0 1 JP ¤³¤É¤â¤ÎÆü 5 5 0 0 1 -JP ³¤¤ÎÆü 20 7 0 0 1 -JP ·ÉÏ·¤ÎÆü 15 9 0 0 1 +JP ³¤¤ÎÆü 0 7 3 1 1 +JP ·ÉÏ·¤ÎÆü 0 9 3 1 1 JP ½©Ê¬¤ÎÆü 0 9 0 0 1 JP Âΰé¤ÎÆü 0 10 2 1 1 JP ʸ²½¤ÎÆü 3 11 0 0 1 diff --git a/calendar/setup/phpgw_de.lang b/calendar/setup/phpgw_de.lang index 162ec8b6e7..14398f3ff1 100644 --- a/calendar/setup/phpgw_de.lang +++ b/calendar/setup/phpgw_de.lang @@ -8,20 +8,28 @@ a calendar de a accept calendar de Zusagen accepted calendar de Zugesagt +action that caused the notify: added, canceled, accepted, rejected, ... calendar de Aktion die die Benachrichtigung verursacht hat: Zugefügt, Storniert, Zugesagt, Abgesagt add a single entry by passing the fields. calendar de Einen einzelnen neuen Eintrag über seine Felder erzeugen. add alarm calendar de Alarm zufügen +add contact calendar de Kontakt zufügen added calendar de Neuer Termin +address book calendar de Adressbuch alarm calendar de Alarm +alarm for %1 at %2 in %3 calendar de Alarm für %1 am %2 in %3 alarm management calendar de Alarm Management +alarm-management calendar de Alarm Management alarms calendar de Alarme all day calendar de ganztägig are you sure you want to delete this country ? calendar de Sind Sie sicher, dass Sie dieses Land löschen wollen ? are you sure you want to delete this holiday ? calendar de Sind Sie sicher, dass Sie diesen Feiertag löschen wollen ? +are you sure\nyou want to\ndelete these alarms? calendar de Sind Sie sicher,\ndass Sie diese\nAlarme löschen wollen ? are you sure\nyou want to\ndelete this entry ? calendar de Sind Sie sicher,\ndass Sie diesen\nEintrag löschen wollen ? are you sure\nyou want to\ndelete this entry ?\n\nthis will delete\nthis entry for all users. calendar de Sind Sie sicher,\ndass Sie diesen\nEintrag löschen wollen ?\n\nDieser Eintrag wird damit\nfür alle Benutzer gelöscht. are you sure\nyou want to\ndelete this single occurence ?\n\nthis will delete\nthis entry for all users. calendar de Sind Sie sicher,\ndass Sie diesen einzelnen\nEintrag löschen wollen ?\n\nDieser Eintrag wird damit\nfür alle Benutzer gelöscht. back calendar de zurück +before the event calendar de vor dem Termin brief description calendar de Kurzbeschreibung +business calendar de geschäftlich calendar common de Kalender calendar - [iv]cal importer calendar de Kalendar - [iv]Cal Importieren calendar - add calendar de Kalendereintrag hinzufügen @@ -31,21 +39,32 @@ calendar holiday management admin de Feiertage verwalten calendar preferences calendar de Kalender Einstellungen calendar settings admin de Kalender Einstellungen calendar-fieldname calendar de Kalender Feldname +canceled calendar de Abgesagt change all events for $params['old_owner'] to $params['new_owner']. calendar de Ändere alle Termine für $params['old_owner'] auf $params['new_owner']. change status calendar de Zusage ändern choose the category calendar de Kategorie auswählen +click %1here%2 to return to the calendar. calendar de %1Hier%2 klicken um zum Kalender zurück zu kehren. +configuration calendar de Konfiguration countries calendar de Länder country calendar de Land csv-fieldname calendar de CSV-Feldname csv-filename calendar de CSV-Dateiname +custom fields calendar de Benutzerdefinierte Felder +custom fields and sorting common de Benutzerdefinierte Felder und Sortierung daily calendar de Täglich -daily matrix view calendar de Matrix-Ansicht des Tages +daily matrix view calendar de Matrix-Ansicht +days calendar de Tage days repeated calendar de wiederholte Tage dayview calendar de Tagesansicht +default appointment length (in minutes) calendar de Standardlänge eines neuen Kalendareintrags (in Minuten) default calendar filter calendar de Standard-Filter des Kalenders default calendar view calendar de Standard-Ansicht des Kalenders +default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar de Vorgabe für die Länge von neuen Kalendareinträgen. Die Länge ist in Minuten, zb. 60 für 1 Stunde. +default view of appointments calendar de Standard-Ansicht der Termine +defines the size in minutes of the lines in the day view. calendar de Bestimmt die Zeitskala in Minuten der Tagesansicht des Kalendars. delete a single entry by passing the id. calendar de Lösche einen einzelnen Eintrag über seine Id. delete an entire users calendar. calendar de Lösche den kompletten Kalender eines Benutzers. +delete selected contacts calendar de Löscht die ausgewählten Kontakte. delete series calendar de Serie löschen delete single calendar de Einzelevent löschen deleted calendar de Abgesagt @@ -53,44 +72,68 @@ description calendar de Beschreibung display interval in day view calendar de Intervall der Tagesansicht display mini calendars when printing calendar de zeige einen kleinen Kalender beim drucken display status of events calendar de Status von Terminen anzeigen +displays your default calendar view on the startpage (page you get when you enter phpgroupware or click on the homepage icon)? calendar de Soll Ihr Kalender auf der phpGroupWare Startseite angezeigt werden (die Seite welche sich nach dem Login öffnet oder wenn Sie auch Home klicken)? +do you want to be notified about new or changed appointments? you be notified about changes you make yourself.
you can limit the notifications to certain changes only. each item includes all the notification listed above it. all changes include changes of title, description, participants and the acceptions and rejections of the appointment. calendar de Möchten Sie über neue oder geänderte Termine benachrichtigt werden? Sie werden benachrichtigt werden über Änderungen welche Sie selbst durchführen.
Sie können die benachrichtigungen beschränken auf bestimmte Änderungen. Jeder auszuwählende Punkt schließt auch die darüber aufgeführten Benachrichtigungen mit ein. Alle Änderungen beinhaltet Änderungen des Titels, der Beschreibung, Teilnehmer so wie Zusagen so wie Absagen von Terminen. +do you want to be notified about new or changed appointments? you be notified about changes you make yourself.
you can limit the notifications to certain changes only. each item includes all the notification listed above it. all modifications include changes of title, description, participants, but no participant responses. if the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. calendar de Wollen Sie über neue oder geänderte Termine benachrichtigt werden? Sie werden nie über eigene Änderungen benachrichtig.
Sie können die Benachrichtigungen auf verschiedene Änderungen begrenzen. Jede Zeile enthält die Benachrichtigungen der darüberliegenden. Alle Änderungen umfasst den Title, die Beschreibung, Teilnehmer, aber keine Antworten der Teilnehmer. Wenn der Ersteller eines Event irgendeine Benachrichtigung will, erhält er automatisch auch die Antworten der Teilnehmer, wie Zusagen und Absagen. +do you want to be notified about new or changed appointments? you dont get notifications for changes you made yourself.
you can limit the notifications on certain changes only. every item include all notification above. all changes include changes of title, description, participants and the acceptions and rejections of them. calendar de +do you want to receive a regulary summary of your appointsments via email?
the summary is send to your standard email-address in the morning of that day or on monday for weekly summarys.
it is only send when you have any appointments on that day or week. calendar de +do you want to receive a regulary summary of your appointsments via email?
the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.
it is only sent when you have any appointments on that day or week. calendar de Möchten Sie eine regelmäßige Zusammenfassung Ihrer Termine via E-Mail erhalten?
Die Zusammenfassung wird täglich (jeden Morgen), oder für eine wöchentliche Zusammenfassung Montags an Ihre standard E-Mail Adresse gesendet.
Die Benachrichtigung wird nur versendet wenn Sie am nächsten Tag oder in der nächsten Woche auch einen Termin haben. do you wish to autoload calendar holidays files dynamically? admin de Sollen die Feiertage automatisch geladen werden? download calendar de Herunterladen duration calendar de Dauer edit series calendar de Serie bearbeiten edit single calendar de Einzel bearbeiten end date/time calendar de Enddatum/-zeit +enddate calendar de Enddatum ends calendar de endet enter output filename: ( .vcs appended ) calendar de Namen der Ausgabedatei (.vcs angehangen) event details follow calendar de Details zum Termin folgen exceptions calendar de Ausnahmen export calendar de Exportieren export a list of entries in ical format. calendar de Eine Liste von Einträgen im iCal Format exportieren. +extended calendar de Erweitert +extended updates always include the complete event-details. ical's can be imported by certain other calendar-applications. calendar de Erweiterte Benachrichtigungen enthälten immer die kompletten Termindetails. iCal's können von vielen anderen Kalendarprogrammen importiert werden. +external participants calendar de Externe Teilnehmer +failed sending message to '%1' #%2 subject='%3', sender='%4' !!! calendar de Fehler beim Senden einer Email an '%1' #%2 Betreff='%3', Absender='%4' !!! fieldseparator calendar de Feldtrenner +firstname of person to notify calendar de Vorname der zu benachrichtigenden Person +format of event updates calendar de Format der Benachrichtigungen fr calendar de Fr free/busy calendar de frei/belegt frequency calendar de Häufigkeit fri calendar de Fr full description calendar de vollständige Beschreibung +fullname of person to notify calendar de Name der zu benachrichtigenden Person generate printer-friendly version calendar de Drucker-freundliche Version erzeugen -global public and group public calendar de Global Öffentlich und Gruppen-Öffentlich -global public only calendar de nur Global Öffentlich +global categories calendar de Globale Kategorien +global public and group public calendar de Global öffentlich und Gruppen-öffentlich +global public only calendar de nur Global öffentlich go! calendar de Go! -grant calendar access common de Berechtigungen für Kalenderzugriffe +grant calendar access common de Berechtigungen für Kalenderzugriffe +group planner calendar de Gruppenplaner group public only calendar de Gruppen-Öffentlich -has been canceled calendar de wurde abgesagt -has been rescheduled to calendar de wurde verschoben auf +here is your requested alarm. calendar de Hier ist ihr bestellter Alarm. high calendar de hoch high priority calendar de Hohe Priorität holiday calendar de Feiertag +holiday management calendar de Feitertagsverwaltung +holiday-management calendar de Feitertagsverwaltung holidays calendar de Feiertage +hours calendar de Stunden i participate calendar de Ich nehme teil +ical / rfc2445 calendar de iCal / RFC2445 if checked holidays falling on a weekend, are taken on the monday after. calendar de Wenn ausgewählt werden Feiertage die auf ein Wochenende fallen, am drauffolgenden Montag nachgeholt. ignore conflict calendar de Konflikt ignorieren import calendar de Importieren import csv-file into calendar calendar de CSV-Datei in den Kalender importieren interval calendar de Interval +intervals in day view calendar de Zeitintervalle in der Tagesansicht +intervals per day in planner view calendar de Zeitintervalle pro Tag in der Planeransicht invalid entry id. calendar de ungültige Id des Eintrags. last calendar de letzte +lastname of person to notify calendar de Nachname der zu benachrichtigenden Person +length shown
(emtpy for full length) calendar de angezeigte Länge
(leer für volle Länge) +length
(<= 255) calendar de Länge
(<= 255) load [iv]cal calendar de [iv]Cal Laden location calendar de Ort location to autoload from admin de Von wo sollen sie geladen werden @@ -99,6 +142,7 @@ matrixview calendar de Matrixansicht minutes calendar de Minuten mo calendar de Mo modified calendar de Geändert +modify list of external participants calendar de Liste der externen Teilnehmer änderen mon calendar de Mo month calendar de Monat monthly calendar de Monatlich @@ -106,16 +150,38 @@ monthly (by date) calendar de Monatlich (nach Datum) monthly (by day) calendar de Monatlich (nach Wochentag) monthview calendar de Monatsansicht new entry calendar de Neuer Eintrag +new name must not exist and not be empty!!! calendar de Neuer Name darf nicht exisitieren und nicht leer sein!!! +no matches found calendar de Keine Treffer gefunden no matches found. calendar de Keine Treffer gefunden. no response calendar de Keine Antwort normal calendar de normal +notification message for updates you send calendar de Mitteilungs Text für updates welche Sie versenden +notification messages for added events calendar de Benachrichtigungstext für neue Termine +notification messages for canceled events calendar de Benachrichtigungstext für stornierte Termine +notification messages for modified events calendar de Benachrichtigungstext für geänderte Termine +notification messages for your alarms calendar de Benachrichtigungstext für ihre Alarem +notification messages for your responses calendar de Benachrichtigungstext für ihre Antworten number of intervals per day in planner view calendar de Anzahl Intervale pro Tag im Planer number of months calendar de Anzahl Monate number of records to read (<=200) calendar de Anzeil Datensätze zu lesen (<= 200) observance rule calendar de Observance Rule occurence calendar de Wiederholung +old startdate calendar de Altes Startdatum +olddate calendar de AltesDatum on %1 %2 %3 your meeting request for %4 calendar de Am %1 hat %2 Ihre Einladung für den %4 %3 -overlap holiday calendar de überlappender Urlaub +on all changes calendar de bei allen Veränderungen +on all changes too calendar de +on all modification, but responses calendar de bei allen Änderungen, außer Antworten +on any time change (and above options) calendar de bei allen zeitliche Änderunge (und obige optionen) +on any time change too calendar de auch jede zeitliche Veränderung +on every time-change too calendar de +on invitation / cancelation only calendar de nur bei Einladungen/Absagen +on participant responses too calendar de auch bei Antworten der Teilnehmer +on time change of more than 4 hours too calendar de bei zeitlichen Änderungen größer als 4 Stunden +on time change of time of more than 4 hours (and above options) calendar de wenn der Termin sich um mehr als 4 Stunde verschiebt (und obige Optionen) +on time-changes >= 4 hours too calendar de +order calendar de Reihenfolge +overlap holiday calendar de überlappender Feiertag participant calendar de Teilnehmer participants calendar de Teilnehmer participates calendar de nimmt teil @@ -124,21 +190,26 @@ permission denied calendar de Zugriff verweigert planner calendar de Planer planner by category calendar de Planer nach Kategorien planner by user calendar de Planer nach Benutzern -please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar de Bitte den entsprechenden Eintrag im Ihrem Kalendar bestätigen, zusagen, absagen oder die Änderungen beachten +please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar de Bitte den entsprechenden Eintrag im Ihrem Kalendar bestätigen, Zusagen, Absagen oder die Änderungen beachten preselected group for entering the planner calendar de vorausgewählte Gruppe beim Planeraufruf -print calendars in black & white calendar de Kalender in Schwarz und Weiß drucken +print calendars in black & white calendar de Kalender in schwarz und weiß drucken +print the mini calendars calendar de Mini- Kalender drucken printer friendly calendar de Drucker-freundlich privat calendar de Privat -private and global public calendar de Privat und Global Öffentlich -private and group public calendar de Privat und Gruppen Öffentlich +private and global public calendar de Privat und Global öffentlich +private and group public calendar de Privat und Gruppen öffentlich private only calendar de nur private re-edit event calendar de Event erneut bearbeiten read a list of entries. calendar de Eine Liste von Einträgen lesen. read a single entry by passing the id and fieldlist. calendar de Einen einzelnen Eintrag über seine Id und eine Feldliste lesen. read this list of methods. calendar de Diese Liste der Methoden lesen. +receive email updates calendar de Empfange E-Mail updates +receive email updates when: calendar de Empfange E-Mail updates wenn: receive extra information in event mails calendar de Zusätzliche Informationen bei EMail-Benachrichtigung -recurring event calendar de Wiederholender Termin event +receive summary of appointments calendar de Zusammenfassung der Termine erhalten +recurring event calendar de Wiederholender Termin refresh calendar de Aktualisieren +regular summary of your appointments calendar de reinstate calendar de Wiedereinsetzen reject calendar de Absagen rejected calendar de Abgesagt @@ -147,26 +218,40 @@ repeat end date calendar de Enddatum repeat type calendar de Wiederholungstyp repeating event information calendar de Informationen zu sich wiederholenden Ereignissen repetition calendar de Wiederholung +repetitiondetails (or empty) calendar de Details der Wiederholung (oder leer) reset calendar de Zurücksetzen rule calendar de Regel sa calendar de Sa sat calendar de Sa scheduling conflict calendar de Terminüberschneidung search results calendar de Suchergebnisse -send updates via email common de Updates via EMail senden +selected contacts (%1) calendar de Ausgewählte Kontakte (%1) +send updates via email common de Updates via E-Mail senden send/receive updates via email calendar de Senden/Empfangen von Aktualisierungen via EMail -send_extra calendar de -set a year only for one-time / non-regular holidays. calendar de Nur für einmalige / unregelmäßige Feiertage das Jahr angeben. +set a year only for one-time / non-regular holidays. calendar de Nur für einmalige/unregelmäßige Feiertage das Jahr angeben. +set new events to private calendar de Neue Termine als private Termine eintragen +should invitations you rejected still be shown in your calendar ?
you can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar! calendar de Sollen Einladungen welche von Ihnen abgelehnt wurden in Ihrem Kalender angezeigt werden?
Sie können diese Einladungen dann später akzeptieren (z. B. wenn Sie eine Terminkolission gelöst haben), wenn Sie in Ihrem Kalender noch vorhanden sind! +should invitations you rejected still be shown in your calendar ?
you can only accept them later (eg. when your sheduling conflict disappears), if they are still in your calendar! calendar de +should new events created as private by default ? calendar de Sollen neue Termine generell als Privat angelegt werden? +should new events created private by default ? calendar de +should the mini calendars by printed / displayed in the printer friendly views ? calendar de Soll der Mini Kalender "gedruckt werden/angezeigt werden" in einer Druck freundlichen Ansicht ? +should the printer friendly view be in black & white or in color (as in normal view)? calendar de Soll die Drucker freundliche Ansicht in schwarz-weiß dargestellt werden oder in Farbe (identisch der normalen Ansicht)? +should the printer friendly view be in black & white or in color, like the normal view? calendar de +should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ? calendar de Soll der Status (Zugesagt,Abgesagt ...)der Termin- Teilnehmer in Klammern hinter jeden Teilnehmer angezeigt werden? show day view on main screen calendar de Tagesansicht auf Startseite anzeigen show default view on main screen calendar de Standardansicht auf der Startseite anzeigen show high priority events on main screen calendar de Termine mit hoher Priorität auf der Startseite anzeigen +show invitations you rejected calendar de Zeige Einladungen welche abgelehnt wurden an single event calendar de Einzelner Termin sorry, the owner has just deleted this event calendar de Der Eigentümer hat diesen Termin gerade gelöscht sorry, this event does not exist calendar de Dieser Termin existiert nicht sorry, this event does not have exceptions defined calendar de Dieser Termin hat keine Ausnahmen definiert sort by calendar de Sortieren nach +specifies the granularity of the planner view. calendar de +specifies the the number of intervals shown in the planner view. calendar de Legt die Anzahl der Zeitintervalle fest welche in der Kalenderplanung angezeigt werden. start date/time calendar de Startdatum/-zeit start- and enddates calendar de Start- und Enddatum/-zeit +startdate calendar de Startdatum startrecord calendar de Startdatensatz su calendar de So submit to repository calendar de Übertragen zu phpGroupWare.org @@ -178,17 +263,39 @@ th calendar de Do the following conflicts with the suggested time:
    %1
calendar de Im gewählten Zeitraum gibt es einen Konflikt:
    %1
the user %1 is not participating in this event! calendar de Der Benutzer %1 nimmt nicht an diesem Event teil! there was an error trying to connect to your news server.
please contact your admin to check the news servername, username or password. calendar de Fehler beim Kontaktieren Ihres News-Servers.
Bitte benachrichtigen Sie ihren Administrator um Servername, Username und Passwort für News zu überprüfen. +this day is shown as first day in the week or month view. calendar de Dieser Tag wird als erster in der Wochen- oder Monatsansicht angezeigt +this defines the end of your dayview. events after that time, are shown below the dayview. calendar de +this defines the end of your dayview. events after this time, are shown below the dayview. calendar de Diese Zeit definiert das Ende des Arbeitstags in der Tagesansicht. Alle späteren Einträge werden darunter dargestellt. +this defines the start of your dayview. events before that time, are shown above the dayview. calendar de +this defines the start of your dayview. events before this time, are shown above the dayview. calendar de Diese Zeit definiert das Start des Arbeitstags in der Tageseinsicht. Alle späteren Einträge werden darüber dargestellt. +this defines the start of your dayview. events before this time, are shown above the dayview.
this time is also used as a default starttime for new events. calendar de Diese Zeit definiert den Anfang des Arbeitstags in der Tagesansicht. Alle früheren Einträge werden darüber dargestellt. +this group got preselected when you enter the planner. you can change it in the planner anytime you want. calendar de +this group that is preselected when you enter the planner. you can change it in the planner anytime you want. calendar de Diese Gruppe wird als vorauswahl ausgewählt wenn Sie den Planer öffnen. Sie können die Gruppe jederzeit wechseln wenn Sie möchten. +this is mostly caused by a not or wrongly configured smtp server. notify your administrator. calendar de Das wird meistens durch einen nicht oder falsch konfigurierten SMTP Server verursacht. Benachrichtigen sie ihren Administrator. +this message is send to every participant of events you own, who requested notifcations.
you can use certain variables which get substituted with the data of the event. the first line is the subject of the email. calendar de +this message is sent for canceled or deleted events. calendar de Diese Benachrichtigung wird für stornierte oder gelöschte Termine versandt. +this message is sent for modified or moved events. calendar de Diese Benachrichtigung wird für geänderte Termine versandt. +this message is sent to every participant of events you own, who has requested notifcations about new events.
you can use certain variables which get substituted with the data of the event. the first line is the subject of the email. calendar de Diese Nachricht wird an alle Teilnehmer der Termine die Sie anlegen versandt, die Benachrichtigungen wünschen.
Sie können verschiedene Variablen verwenden, welche durch die Daten des Termins ersetzt werden. Die erste Zeite ist der Betreff der E-Mail. +this message is sent to every participant of events you own, who has requested notifcations.
you can use certain variables which get substituted with the data of the event. the first line is the subject of the email. calendar de Mit dieser Nachricht laden Sie Teilnehmer zu einem Termin ein, welche eine automatische Benachrichtigung aktiviert haben.
Sie können verschiedene Variablen benutzen welche durch die Daten des Meetings ersetzt werden. Die erste Zeile ist der Betreff der E-Mail +this message is sent when you accept, tentative accept or reject an event. calendar de Diese Nachricht wird gesendet wenn Sie einen Termin zusagen, vorläufig zusagen oder absagen. +this message is sent when you set an alarm for a certain event. include all information you might need. calendar de Diese Meldung wird ihnen gesandt, wenn sie einen Alarm für einen Termin setzen. Nehmen sie alle Information darin auf, die sie benötigen. this month calendar de Dieser Monat this week calendar de Diese Woche this year calendar de Dieses Jahr thu calendar de Do -title calendar de TITEL +title calendar de Titel +title of the event calendar de Titel des Termin +title-row calendar de Titelzeile +to-firstname calendar de An-Vorname +to-fullname calendar de An-Name +to-lastname calendar de An-Nachname today calendar de Heute translation calendar de Übersetzung tu calendar de Di tue calendar de Di update a single entry by passing the fields. calendar de Einen einzelnen Termin über seine Felder updaten. updated calendar de Aktualisiert +updates of your appointments via email calendar de use end date calendar de Enddatum benutzen view this entry calendar de Diesen Eintrag anzeigen we calendar de Mi @@ -198,27 +305,34 @@ weekday starts on calendar de Arbeitswoche beginnt am weekly calendar de Wöchentlich weekview calendar de Wochenansicht when creating new events default set to private calendar de neue Termine sind privat +which events do you want to see when you enter the calendar. calendar de Welche Termine möchten Sie angezeigt bekommen wenn Sie den Kalender öffnen? +which of calendar view do you want to see, when you start calendar ? calendar de Welche der möglichen Ansichten des Kalenders möchten Sie als Standard sehen wenn der Kalender geöffnet wird? +which of the calendar-views do you want to see, when you enter the calendar ? calendar de work day ends on calendar de Arbeitstag endet um work day starts on calendar de Arbeitstag beginnt um -workdayends calendar de Arbeitstag endet um +workdayends calendar de Arbeitstag endet year calendar de Jahr yearly calendar de Jährlich -yearview calendar de -you can either set a year or a occurence, not both !!! calendar de Sie können nur entweder das Jahr oder die Wiederholung angeben, nicht beides !!! -you can only set a year or a occurence !!! calendar de Sie können nur ein Jahr oder eine Wiederholung angeben !!! +yearview calendar de Jährliche Ansicht +you can either set a year or a occurence, not both !!! calendar de Sie können nur entweder das Jahr oder die Wiederholung angeben, nicht beides! +you can only set a year or a occurence !!! calendar de Sie können nur ein Jahr oder eine Wiederholung angeben ! +you do not have permission to add alarms to this event !!! calendar de Sie haben keine Berechtigung Alarme zu diesem Termin zuzufügen !!! +you do not have permission to delete this alarm !!! calendar de Sie haben keine Berechtigung diesen Alarm zu löschen !!! +you do not have permission to enable/disable this alarm !!! calendar de Sie haben keine Berechtigung diesen Alarm ein- oder auszuschalten !!! you do not have permission to read this record! calendar de Sie haben keine Berechtigung diesen Eintrag zu lesen! +you have %1 high priority events on your calendar today. common de Sie haben heute %1 Einträge mit hoher Priorität auf Ihrer Liste! you have 1 high priority event on your calendar today. common de Sie haben heute einen Eintrag mit hoher Priorität auf Ihrer Liste! -you have a meeting scheduled for calendar de Sie haben einen Termin am +you have a meeting scheduled for %1 calendar de Sie haben einen Termin am %1. you have not entered a title calendar de Sie haben keinen Titel angegeben you have not entered a valid date calendar de Sie haben kein gültiges Datum angegeben you have not entered a valid time of day calendar de Sie haben keine gültige Uhrzeit angegeben you have not entered a\nbrief description calendar de Sie haben keine a\nKurzbeschreibung eingegeben you have not entered a\nvalid time of day calendar de Sie haben keine a\ngültige Tageszeit eingegeben. you have not entered participants calendar de Sie haben keine Teilnehmer angegeben -you have %1 high priority events on your calendar today. common de Sie haben heute %1 Einträge mit hoher Priorität auf Ihrer Liste! you must enter one or more search keywords calendar de Sie müssen einen oder mehrere Suchbegriffe angeben +you must enter one or more search keywords. calendar de Sie müssen einen oder mehrere Suchbegriffe angeben. you must select a [iv]cal. (*.[iv]cs) calendar de Sie müssen einen [iv]Cal (*.[iv]cs) auswählen. you need to set either a day or a occurence !!! calendar de Sie müssen entweder einen Tag oder eine Wiederholung angeben !!! -your meeting scheduled for calendar de Ihr Termin am -your meeting that had been scheduled for calendar de Ihr Termin am +your meeting scheduled for %1 has been canceled calendar de Ihr Termin am %1 wurde abgesagt. +your meeting that had been scheduled for %1 has been rescheduled to %2 calendar de Ihr Termin am %1 wurde auf %2 verschoben. your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar de Der von Ihnen gewählte Zeitraum %1 - %2 führt zu Konflikten mit folgenden bereits existierenden Kalendereinträgen: diff --git a/calendar/setup/phpgw_en.lang b/calendar/setup/phpgw_en.lang index ec2254f6bb..f82b26b1ea 100644 --- a/calendar/setup/phpgw_en.lang +++ b/calendar/setup/phpgw_en.lang @@ -8,44 +8,60 @@ a calendar en a accept calendar en Accept accepted calendar en Accepted +action that caused the notify: added, canceled, accepted, rejected, ... calendar en Action that caused the notify: Added, Canceled, Accepted, Rejected, ... add a single entry by passing the fields. calendar en Add a single entry by passing the fields. add alarm calendar en Add Alarm +add contact calendar en Add Contact added calendar en Added +address book calendar en Address Book alarm calendar en alarm +alarm for %1 at %2 in %3 calendar en Alarm for %1 at %2 in %3 alarm management calendar en Alarm Management alarm-management calendar en Alarm-Management alarms calendar en Alarms all day calendar en All Day are you sure you want to delete this country ? calendar en Are you sure you want to delete this Country ? are you sure you want to delete this holiday ? calendar en Are you sure you want to delete this holiday ? +are you sure\nyou want to\ndelete these alarms? calendar en Are you sure\nyou want to\ndelete these alarms? are you sure\nyou want to\ndelete this entry ? calendar en Are you sure\nyou want to\ndelete this entry ? are you sure\nyou want to\ndelete this entry ?\n\nthis will delete\nthis entry for all users. calendar en Are you sure\nyou want to\ndelete this entry ?\n\nThis will delete\nthis entry for all users. are you sure\nyou want to\ndelete this single occurence ?\n\nthis will delete\nthis entry for all users. calendar en Are you sure\nyou want to\ndelete this single occurence ?\n\nThis will delete\nthis entry for all users. +before the event calendar en before the event brief description calendar en Brief Description +business calendar en Business calendar common en Calendar +calendar - [iv]cal importer calendar en Calendar - [iv]Cal Importer calendar - add calendar en Calendar - Add calendar - edit calendar en Calendar - Edit -calendar - [iv]cal importer calendar en Calendar - [iv]Cal Importer calendar event calendar en Calendar Event calendar holiday management admin en Calendar Holiday Management calendar preferences calendar en Calendar Preferences calendar settings admin en Calendar Settings calendar-fieldname calendar en Calendar-Fieldname +canceled calendar en Canceled change all events for $params['old_owner'] to $params['new_owner']. calendar en Change all events for $params['old_owner'] to $params['new_owner']. change status calendar en Change Status +click %1here%2 to return to the calendar. calendar en Click %1here%2 to return to the calendar. configuration calendar en Configuration countries calendar en Countries country calendar en Country csv-fieldname calendar en CSV-Fieldname csv-filename calendar en CSV-Filename +custom fields calendar en Custom Fields +custom fields and sorting common en Custom fields and sorting daily calendar en Daily daily matrix view calendar en Daily Matrix View +days calendar en days days repeated calendar en days repeated dayview calendar en Dayview +default appointment length (in minutes) calendar en default appointment length (in minutes) default calendar filter calendar en Default calendar filter default calendar view calendar en Default calendar view +default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar en Default length of newly created events. The length is in minutes, eg. 60 for 1 hour. +defines the size in minutes of the lines in the day view. calendar en Defines the size in minutes of the lines in the day view. delete a single entry by passing the id. calendar en Delete a single entry by passing the id. delete an entire users calendar. calendar en Delete an entire users calendar. +delete selected contacts calendar en Delete selected contacts delete series calendar en Delete Series delete single calendar en Delete Single deleted calendar en Deleted @@ -53,47 +69,64 @@ description calendar en DESCRIPTION display interval in day view calendar en Display interval in Day View display mini calendars when printing calendar en Display mini calendars when printing display status of events calendar en Display Status of Events -Display week days only in Month/Week View calendar en Display week days only in Month/Week View +displays your default calendar view on the startpage (page you get when you enter phpgroupware or click on the homepage icon)? calendar en Displays your default calendar view on the startpage (page you get when you enter phpGroupWare or click on the homepage icon)? +do you want to be notified about new or changed appointments? you be notified about changes you make yourself.
you can limit the notifications to certain changes only. each item includes all the notification listed above it. all modifications include changes of title, description, participants, but no participant responses. if the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. calendar en Do you want to be notified about new or changed appointments? You be notified about changes you make yourself.
You can limit the notifications to certain changes only. Each item includes all the notification listed above it. All modifications include changes of title, description, participants, but no participant responses. If the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. +do you want to receive a regulary summary of your appointsments via email?
the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.
it is only sent when you have any appointments on that day or week. calendar en Do you want to receive a regulary summary of your appointsments via email?
The summary is sent to your standard email-address on the morning of that day or on Monday for weekly summarys.
It is only sent when you have any appointments on that day or week. do you wish to autoload calendar holidays files dynamically? admin en Do you wish to autoload calendar holidays files dynamically? download calendar en Download duration calendar en Duration edit series calendar en Edit Series edit single calendar en Edit Single end date/time calendar en End Date/Time +enddate calendar en Enddate ends calendar en ends enter output filename: ( .vcs appended ) calendar en Enter Output Filename: ( .vcs appended ) event details follow calendar en Event Details Follow exceptions calendar en Exceptions export calendar en Export export a list of entries in ical format. calendar en Export a list of entries in iCal format. +extended calendar en Extended +extended updates always include the complete event-details. ical's can be imported by certain other calendar-applications. calendar en Extended updates always include the complete event-details. iCal's can be imported by certain other calendar-applications. +external participants calendar en External Participants +failed sending message to '%1' #%2 subject='%3', sender='%4' !!! calendar en Failed sending message to '%1' #%2 subject='%3', sender='%4' !!! fieldseparator calendar en Fieldseparator +firstname of person to notify calendar en Firstname of person to notify +format of event updates calendar en Format of event updates fr calendar en F free/busy calendar en Free/Busy frequency calendar en Frequency fri calendar en Fri full description calendar en Full Description +fullname of person to notify calendar en Fullname of person to notify generate printer-friendly version calendar en Generate printer-friendly version +global categories calendar en Global Categories global public and group public calendar en Global Public and group public global public only calendar en Global Public Only go! calendar en Go! grant calendar access common en Grant Calendar Access group planner calendar en Group Planner group public only calendar en Group Public Only -has been canceled calendar en has been canceled -has been rescheduled to calendar en has been rescheduled to +here is your requested alarm. calendar en Here is your requested alarm. high priority calendar en high priority holiday calendar en Holiday holiday management calendar en Holiday Management holiday-management calendar en Holiday-Management holidays calendar en Holidays +hours calendar en hours i participate calendar en I Participate +ical / rfc2445 calendar en iCal / rfc2445 if checked holidays falling on a weekend, are taken on the monday after. calendar en If checked holidays falling on a weekend, are taken on the monday after. ignore conflict calendar en Ignore Conflict import calendar en Import import csv-file into calendar calendar en Import CSV-File into Calendar interval calendar en Interval +intervals in day view calendar en Intervals in day view +intervals per day in planner view calendar en Intervals per day in planner view invalid entry id. calendar en Invalid entry id. last calendar en last +lastname of person to notify calendar en Lastname of person to notify +length shown
(emtpy for full length) calendar en Length shown
(emtpy for full length) +length
(<= 255) calendar en Length
(<= 255) load [iv]cal calendar en Load [iv]Cal location calendar en Location location to autoload from admin en Location to autoload from @@ -101,6 +134,7 @@ matrixview calendar en Matrixview minutes calendar en minutes mo calendar en M modified calendar en Modified +modify list of external participants calendar en Modify List of External Participants mon calendar en Mon month calendar en Month monthly calendar en Monthly @@ -108,14 +142,29 @@ monthly (by date) calendar en Monthly (by date) monthly (by day) calendar en Monthly (by day) monthview calendar en Monthview new entry calendar en New Entry -no matches found. calendar en No matches found. +new name must not exist and not be empty!!! calendar en New name must not exist and not be empty!!! +no matches found calendar en No matches found no response calendar en No Response +notification messages for added events calendar en Notification messages for added events +notification messages for canceled events calendar en Notification messages for canceled events +notification messages for modified events calendar en Notification messages for modified events +notification messages for your alarms calendar en Notification messages for your alarms +notification messages for your responses calendar en Notification messages for your responses number of intervals per day in planner view calendar en Number of Intervals per Day in Planner View number of months calendar en Number of months number of records to read (<=200) calendar en Number of records to read (<=200) observance rule calendar en Observance Rule occurence calendar en Occurence +old startdate calendar en Old Startdate +olddate calendar en OldDate on %1 %2 %3 your meeting request for %4 calendar en On %1 %2 %3 your meeting request for %4 +on all changes calendar en on all changes +on all modification, but responses calendar en on all modification, but responses +on any time change too calendar en on any time change too +on invitation / cancelation only calendar en on invitation / cancelation only +on participant responses too calendar en on participant responses too +on time change of more than 4 hours too calendar en on time change of more than 4 hours too +order calendar en Order overlap holiday calendar en overlap holiday participant calendar en Participant participants calendar en Participants @@ -125,10 +174,10 @@ permission denied calendar en Permission denied planner calendar en Planner planner by category calendar en Planner by category planner by user calendar en Planner by user -planner_user calendar en planner_user please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar en Please confirm, accept, reject or examine changes in the corresponding entry in your calendar preselected group for entering the planner calendar en Preselected group for entering the planner print calendars in black & white calendar en Print calendars in black & white +print the mini calendars calendar en Print the mini calendars printer friendly calendar en Printer Friendly privat calendar en Privat private and global public calendar en Private and Global Public @@ -138,7 +187,9 @@ re-edit event calendar en Re-Edit Event read a list of entries. calendar en Read a list of entries. read a single entry by passing the id and fieldlist. calendar en Read a single entry by passing the id and fieldlist. read this list of methods. calendar en Read this list of methods. +receive email updates calendar en Receive email updates receive extra information in event mails calendar en Receive extra information in event mails +receive summary of appointments calendar en Receive summary of appointments recurring event calendar en recurring event refresh calendar en Refresh reinstate calendar en Reinstate @@ -148,26 +199,36 @@ repeat end date calendar en Repeat End date repeat type calendar en Repeat type repeating event information calendar en Repeating Event Information repetition calendar en Repetition +repetitiondetails (or empty) calendar en Repetitiondetails (or empty) reset calendar en Reset rule calendar en Rule sa calendar en Sa sat calendar en Sat scheduling conflict calendar en Scheduling Conflict search results calendar en Search Results +selected contacts (%1) calendar en Selected contacts (%1) send updates via email common en Send updates via EMail send/receive updates via email calendar en Send/Receive updates via EMail -send_extra calendar en send_extra set a year only for one-time / non-regular holidays. calendar en Set a Year only for one-time / non-regular holidays. +set new events to private calendar en Set new events to private +should invitations you rejected still be shown in your calendar ?
you can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar! calendar en Should invitations you rejected still be shown in your calendar ?
You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar! +should new events created as private by default ? calendar en Should new events created as private by default ? +should the mini calendars by printed / displayed in the printer friendly views ? calendar en Should the mini calendars by printed / displayed in the printer friendly views ? +should the printer friendly view be in black & white or in color (as in normal view)? calendar en Should the printer friendly view be in black & white or in color (as in normal view)? +should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ? calendar en Should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ? show day view on main screen calendar en show day view on main screen show default view on main screen calendar en Show default view on main screen show high priority events on main screen calendar en Show high priority events on main screen +show invitations you rejected calendar en Show invitations you rejected single event calendar en single event sorry, the owner has just deleted this event calendar en Sorry, the owner has just deleted this event sorry, this event does not exist calendar en Sorry, this event does not exist sorry, this event does not have exceptions defined calendar en Sorry, this event does not have exceptions defined sort by calendar en Sort by +specifies the the number of intervals shown in the planner view. calendar en Specifies the the number of intervals shown in the planner view. start date/time calendar en Start Date/Time start- and enddates calendar en Start- and Enddates +startdate calendar en Startdate startrecord calendar en Startrecord su calendar en Su submit to repository calendar en Submit to Repository @@ -179,11 +240,26 @@ th calendar en T the following conflicts with the suggested time:
    %1
calendar en The following conflicts with the suggested time:
    %1
the user %1 is not participating in this event! calendar en The user %1 is not participating in this event! there was an error trying to connect to your news server.
please contact your admin to check the news servername, username or password. calendar en There was an error trying to connect to your news server.
Please contact your admin to check the news servername, username or password. +this day is shown as first day in the week or month view. calendar en This day is shown as first day in the week or month view. +this defines the end of your dayview. events after this time, are shown below the dayview. calendar en This defines the end of your dayview. Events after this time, are shown below the dayview. +this defines the start of your dayview. events before this time, are shown above the dayview.
this time is also used as a default starttime for new events. calendar en This defines the start of your dayview. Events before this time, are shown above the dayview.
This time is also used as a default starttime for new events. +this group that is preselected when you enter the planner. you can change it in the planner anytime you want. calendar en This group that is preselected when you enter the planner. You can change it in the planner anytime you want. +this is mostly caused by a not or wrongly configured smtp server. notify your administrator. calendar en This is mostly caused by a not or wrongly configured SMTP server. Notify your administrator. +this message is sent for canceled or deleted events. calendar en This message is sent for canceled or deleted events. +this message is sent for modified or moved events. calendar en This message is sent for modified or moved events. +this message is sent to every participant of events you own, who has requested notifcations about new events.
you can use certain variables which get substituted with the data of the event. the first line is the subject of the email. calendar en This message is sent to every participant of events you own, who has requested notifcations about new events.
You can use certain variables which get substituted with the data of the event. The first line is the subject of the email. +this message is sent when you accept, tentative accept or reject an event. calendar en This message is sent when you accept, tentative accept or reject an event. +this message is sent when you set an alarm for a certain event. include all information you might need. calendar en This message is sent when you set an Alarm for a certain event. Include all information you might need. this month calendar en This month this week calendar en This week this year calendar en This year thu calendar en Thu title calendar en TITLE +title of the event calendar en Title of the event +title-row calendar en Title-row +to-firstname calendar en To-Firstname +to-fullname calendar en To-Fullname +to-lastname calendar en To-Lastname today calendar en Today translation calendar en Translation tu calendar en T @@ -199,6 +275,8 @@ weekday starts on calendar en Weekday starts on weekly calendar en Weekly weekview calendar en Weekview when creating new events default set to private calendar en When creating new events default set to private +which events do you want to see when you enter the calendar. calendar en Which events do you want to see when you enter the calendar. +which of calendar view do you want to see, when you start calendar ? calendar en Which of calendar view do you want to see, when you start calendar ? work day ends on calendar en Work day ends on work day starts on calendar en Work day starts on workdayends calendar en workdayends @@ -206,10 +284,13 @@ yearly calendar en Yearly yearview calendar en Yearview you can either set a year or a occurence, not both !!! calendar en You can either set a Year or a Occurence, not both !!! you can only set a year or a occurence !!! calendar en You can only set a year or a occurence !!! +you do not have permission to add alarms to this event !!! calendar en You do not have permission to add alarms to this event !!! +you do not have permission to delete this alarm !!! calendar en You do not have permission to delete this alarm !!! +you do not have permission to enable/disable this alarm !!! calendar en You do not have permission to enable/disable this alarm !!! you do not have permission to read this record! calendar en You do not have permission to read this record! you have %1 high priority events on your calendar today. common en You have %1 high priority events on your calendar today. you have 1 high priority event on your calendar today. common en You have 1 high priority event on your calendar today. -you have a meeting scheduled for calendar en You have a meeting scheduled for +you have a meeting scheduled for %1 calendar en You have a meeting scheduled for %1 you have not entered a title calendar en You have not entered a title you have not entered a valid date calendar en You have not entered a valid date you have not entered a valid time of day calendar en You have not entered a valid time of day @@ -217,6 +298,6 @@ you have not entered participants calendar en You have not entered participants you must enter one or more search keywords calendar en You must enter one or more search keywords you must select a [iv]cal. (*.[iv]cs) calendar en You must select a [iv]Cal. (*.[iv]cs) you need to set either a day or a occurence !!! calendar en You need to set either a day or a occurence !!! -your meeting scheduled for calendar en Your meeting scheduled for -your meeting that had been scheduled for calendar en Your meeting that had been scheduled for +your meeting scheduled for %1 has been canceled calendar en Your meeting scheduled for %1 has been canceled +your meeting that had been scheduled for %1 has been rescheduled to %2 calendar en Your meeting that had been scheduled for %1 has been rescheduled to %2 your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar en Your suggested time of %1 - %2 conflicts with the following existing calendar entries: diff --git a/calendar/setup/phpgw_fr.lang b/calendar/setup/phpgw_fr.lang index 331225dd2a..7f3fc967d9 100644 --- a/calendar/setup/phpgw_fr.lang +++ b/calendar/setup/phpgw_fr.lang @@ -8,29 +8,37 @@ a calendar fr un accept calendar fr Accepte accepted calendar fr Accepté +action that caused the notify: added, canceled, accepted, rejected, ... calendar fr L'action qui a causé la notification: Ajouté, Annulé, Accepté, Rejeté, ... add a single entry by passing the fields. calendar fr Ajouter une unique entrée en passant les champs. add alarm calendar fr Ajouter une alarme +add contact calendar fr Ajouter un contact added calendar fr Ajouté +address book calendar fr Carnet d'adresses alarm calendar fr Alarme +alarm for %1 at %2 in %3 calendar fr Alarme pour %1 à %2 dans %3 alarm management calendar fr Gestion des alarmes alarm-management calendar fr Gestion des alarmes alarms calendar fr Alarmes all day calendar fr Journée entière are you sure you want to delete this country ? calendar fr Etes-vous sûr de vouloir effacer ce pays ? are you sure you want to delete this holiday ? calendar fr Etes-vous sûr de vouloir effacer ces vacances ? +are you sure\nyou want to\ndelete these alarms? calendar fr Etes-vous sûr\nde vouloir\neffacer ces alarmes? are you sure\nyou want to\ndelete this entry ? calendar fr Etes-vous sûr\nde vouloir\neffacer cette entrée ? Are you sure\nyou want to\ndelete this entry ?\n\nThis will delete\nthis entry for all users. calendar fr Etes-vous sûr\nde vouloir\neffacer cette entrée ?\n\nCeci va effacer\ncette entrée pour tous les utilisateurs. Are you sure\nyou want to\ndelete this single occurence ?\n\nThis will delete\nthis entry for all users. calendar fr Etes-vous sûr\nde vouloir\neffacer cette unique occurence ?\n\nCeci va effacer\ncette entrée pour tous les utilisateurs. +before the event calendar fr avant l'évènement brief description calendar fr Description brève +business calendar fr Travail calendar common fr Calendrier +calendar - [iv]cal importer calendar fr Calendrier - Importateur [iv]Cal calendar - add calendar fr Calendrier - Ajouter calendar - edit calendar fr Calendrier - Modifier -calendar - [iv]cal importer calendar fr Calendrier - Importateur [iv]Cal calendar event calendar fr Evénement de calendrier calendar holiday management admin fr Gestion du calendrier des vacances calendar preferences calendar fr Préférences du calendrier calendar settings admin fr Réglages calendrier calendar-fieldname calendar fr Calendrier-nom des champs +canceled calendar fr Annulé change all events for $params['old_owner'] to $params['new_owner']. calendar fr Changer tous les évènements pour $params['old_owner'] vers $params['new_owner']. change status calendar fr Modifier le statut configuration calendar fr Configuration @@ -38,14 +46,21 @@ countries calendar fr Pays country calendar fr Pays csv-fieldname calendar fr CSV-nom des champs csv-filename calendar fr CSV-nom du fichier +custom fields calendar fr Champs personnalisés +custom fields and sorting common fr Champs personnalisés et tri daily calendar fr Journalier daily matrix view calendar fr Vue journalière de la matrice +days calendar fr Jours days repeated calendar fr Jours répétés dayview calendar fr Vue journalière +default appointment length (in minutes) calendar fr Durée du rendez-vous par défaut (en minutes) default calendar filter calendar fr Filtre de calendrier par défaut default calendar view calendar fr Vue du calendrier par défaut +default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar fr Durée par défaut des évènements nouvellement crées. La durée est en minutes, p.e. 60 pour 1 heure. +defines the size in minutes of the lines in the day view. calendar fr Définit la taille en minutes des lignes dans la vue journalière. delete a single entry by passing the id. calendar fr Effacer une unique entrée en passant l'ID. delete an entire users calendar. calendar fr Efface l'ensemble du calendrier de l'utilisateur. +delete selected contacts calendar fr Effacer les contacts sélectionnés delete series calendar fr Effacer les séries delete single calendar fr Effacer un unique deleted calendar fr Effacé @@ -53,47 +68,64 @@ description calendar fr Description display interval in day view calendar fr Afficher l'intervalle dans la vue journalière display mini calendars when printing calendar fr Afficher mini calendriers à l'impression display status of events calendar fr Afficher le statut des événements -Display week days only in Month/Week View calendar fr Afficher les jours ouvrés seulement dans la vue Mois/Semaine +displays your default calendar view on the startpage (page you get when you enter phpgroupware or click on the homepage icon)? calendar fr Afficher votre vue de calendrier par défaut sur la page de démarrage (page que vous obtenez quand vous entrez dans phpGroupWare ou cliquez sur l'icône page maison (homepage))? +do you want to be notified about new or changed appointments? you be notified about changes you make yourself.
you can limit the notifications to certain changes only. each item includes all the notification listed above it. all modifications include changes of title, description, participants, but no participant responses. if the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. calendar fr Voulez-vous être prévenu des rendez-vous nouveaux ou modifiés? Vous serez prévenu des modifications que vous faites vous-même.
Vous pouvez limiter les notifications à certains changements seulement. Chaque objet inclut toutes les notifications listées au-dessus de lui. Toutes les modifications inclut les modifications de titre, description, participants, mais pas les réponses des participants. Si le propriétaire d'un évènement a demandé aucune notification, il aura toujours les réponses des participants comme les acceptations et les rejets aussi. +do you want to receive a regulary summary of your appointsments via email?
the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.
it is only sent when you have any appointments on that day or week. calendar fr Voulez-vous recevoir un résumé régulier de vos rendez-vous par EMail?
Le résumé est envoyé à votre adresse EMail standard le matin de ce jour ou le lundi pour les résumés hebdomadaires.
Il est envoyé seulement quand vous avez des rendez-vous ce jour-là ou cette semaine-là. do you wish to autoload calendar holidays files dynamically? admin fr Voulez-vous auto-charger les fichiers de vacances calendrier dynamiquement? download calendar fr Downloader duration calendar fr Durée edit series calendar fr Modifier toutes les occurrences edit single calendar fr Modifier cette occurrence +email reminder calendar fr EMail de rappel end date/time calendar fr Date/Heure de fin +enddate calendar fr Date de fin ends calendar fr Finit enter output filename: ( .vcs appended ) calendar fr Entrer le nom du fichier de sortie: ( .vcs ajouté ) event details follow calendar fr Les détails de l'évènement suivent exceptions calendar fr Exceptions export calendar fr Export export a list of entries in ical format. calendar fr Exporter une liste d'entrées dans le format iCal. +extended calendar fr Etendu +extended updates always include the complete event-details. ical's can be imported by certain other calendar-applications. calendar fr Les mises à jour étendues incluent toujours les détails complets de l'évènement. Les iCals peuvent être importés par certaines autres applications de calendrier. +external participants calendar fr Participants extérieurs fieldseparator calendar fr Séparateur de champs +firstname of person to notify calendar fr Prénom de la personne à prévenir +format of event updates calendar fr Format des mises à jour d'évènement fr calendar fr F free/busy calendar fr Libre/occupé frequency calendar fr Fréquence fri calendar fr Ven full description calendar fr Description complète +fullname of person to notify calendar fr Nom complet de la personne à prévenir generate printer-friendly version calendar fr Générer une version imprimable +global categories calendar fr Catégories globales global public and group public calendar fr Public global et groupe public global public only calendar fr Public global seulement go! calendar fr Go! grant calendar access common fr Régler les autorisations d'accès au calendrier group planner calendar fr Planificateur de groupe group public only calendar fr Groupe public seulement -has been canceled calendar fr a été annulé -has been rescheduled to calendar fr a été replanifié le +here is your requested alarm. calendar fr Voici votre alarme demandée. high priority calendar fr Priorité haute holiday calendar fr Vacance holiday management calendar fr Gestion des vacances holiday-management calendar fr Gestion des vacances holidays calendar fr Vacances +hours calendar fr Heures i participate calendar fr Je participe +ical / rfc2445 calendar fr iCal / rfc2445 if checked holidays falling on a weekend, are taken on the monday after. calendar fr Si activé les vacances tombant sur un Week-End, sont prises sur le lundi d'après. ignore conflict calendar fr Ignorer le conflit import calendar fr Import import csv-file into calendar calendar fr Importer un fichier CSV dans le calendrier interval calendar fr Intervalle +intervals in day view calendar fr Intervalles dans la vue journalière +intervals per day in planner view calendar fr Intervalles par jour dans la vue planning invalid entry id. calendar fr ID d'entrée invalide. last calendar fr Dernier +lastname of person to notify calendar fr Nom de famille de la personne à prévenir +length shown
(emtpy for full length) calendar fr Longueur montrée
(vide pour longueur complète) +length
(<= 255) calendar fr Longueur
(<= 255) load [iv]cal calendar fr Charger [iv]Cal location calendar fr Emplacement location to autoload from admin fr Emplacement depuis lequel auto-charger @@ -101,6 +133,7 @@ matrixview calendar fr Vue matricielle minutes calendar fr minutes mo calendar fr L modified calendar fr Modifié +modify list of external participants calendar fr Modifier la liste des participants extérieurs mon calendar fr Lun month calendar fr Mois monthly calendar fr Mensuel @@ -108,14 +141,29 @@ monthly (by date) calendar fr Mensuel (par date) monthly (by day) calendar fr Mensuel (par jour) monthview calendar fr Vue mensuelle new entry calendar fr Nouvelle entrée -no matches found. calendar fr Pas d'occurences trouvées. +new name must not exist and not be empty!!! calendar fr Le nouveau nom ne doit pas exister et ne doit pas être vide!!! +no matches found calendar fr Pas d'occurences trouvées no response calendar fr Pas de réponse +notification messages for added events calendar fr Messages de notification pour les évènements ajoutés +notification messages for canceled events calendar fr Messages de notification pour les évènements annulés +notification messages for modified events calendar fr Messages de notification pour les évènements modifiés +notification messages for your alarms calendar fr Messages de notification pour vos alarmes +notification messages for your responses calendar fr Messages de notification pour vos réponses number of intervals per day in planner view calendar fr Nombre d'intervalles par jour dans la vue planificateur number of months calendar fr Nombre de mois number of records to read (<=200) calendar fr Nombre d'enregistrements à lire (<=200) observance rule calendar fr Règle d'observation occurence calendar fr Occurence +old startdate calendar fr Ancienne date de début +olddate calendar fr Ancienne date on %1 %2 %3 your meeting request for %4 calendar fr Le %1 %2 %3 votre demande de réunion pour %4 +on all changes calendar fr Sur tous les changements +on all modification, but responses calendar fr Sur toutes les modifications, sauf les réponses +on any time change too calendar fr Sur n'importe quel changement de temps aussi +on invitation / cancelation only calendar fr sur invitation / annulation seulement +on participant responses too calendar fr Sur les réponses des participants aussi +on time change of more than 4 hours too calendar fr sur le changement de temps de plus de 4 heures aussi +order calendar fr Ordre overlap holiday calendar fr Vacances recouvrantes participant calendar fr Participant participants calendar fr Participants @@ -125,10 +173,10 @@ permission denied calendar fr Permission refus planner calendar fr Planificateur planner by category calendar fr Planificateur par catégrie planner by user calendar fr Planificateur par utilisateur -planner_user calendar fr Utilisateur planificateur please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar fr SVP confirmez, acceptez, rejetez ou examinez les modifications dans l'entrée correspondante de votre calendrier preselected group for entering the planner calendar fr Groupe présélectionné pour entrer le planificateur print calendars in black & white calendar fr Imprimer les calendriers en noir & blanc +print the mini calendars calendar fr Imprimer les mini-calendriers printer friendly calendar fr Imprimable privat calendar fr Privée private and global public calendar fr Public privé et global @@ -138,7 +186,9 @@ re-edit event calendar fr Remodifier l' read a list of entries. calendar fr Lire une liste d'entrées. read a single entry by passing the id and fieldlist. calendar fr Lire une unique entrée en passant l'ID et la liste des champs. read this list of methods. calendar fr Lire cette liste de méthodes. +receive email updates calendar fr Recevoir les mises à jour par EMail receive extra information in event mails calendar fr Recevoir des informations supplémentaires dans les EMails d'évènements +receive summary of appointments calendar fr Recevoir le résumé des rendez-vous recurring event calendar fr Evènement récurrent refresh calendar fr Rafraîchir reinstate calendar fr Réinstaller @@ -148,26 +198,36 @@ repeat end date calendar fr Date de fin de r repeat type calendar fr Type de répétition repeating event information calendar fr Informations d'événement répétitif repetition calendar fr Répétition +repetitiondetails (or empty) calendar fr Détails de répétition (ou vide) reset calendar fr Réinitialiser rule calendar fr Règle sa calendar fr Sa sat calendar fr Sam scheduling conflict calendar fr Conflit de planification search results calendar fr Résultats de recherche +selected contacts (%1) calendar fr Contacts choisis (%1) send updates via email common fr Envoyer les mises à jour par EMail send/receive updates via email calendar fr Envoyer/recevoir les mises à jour par EMail -send_extra calendar fr Envoyer extra set a year only for one-time / non-regular holidays. calendar fr Régler sur une année seulement pour les vacances uniques / non-régulières. +set new events to private calendar fr Régler les nouveaux évènements comme privés +should invitations you rejected still be shown in your calendar ?
you can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar! calendar fr Les invitations que vous avez rejeté doivent-elles être encore montrées dans votre calendrier ?
Vous ne pourrez les accepter plus tard (p.e. quand le conflit de rendez-vous est supprimé), que si elles sont encore montrées dans votre calendrier! +should new events created as private by default ? calendar fr Les nouveaux évènements doivent-ils être crées comme privés par défaut ? +should the mini calendars by printed / displayed in the printer friendly views ? calendar fr Les mini-calendriers doivent-ils être imprimés / affichés dans les vues compatibles imprimante ? +should the printer friendly view be in black & white or in color (as in normal view)? calendar fr La vue compatible imprimante doit-elle être en noir & blanc ou en couleur (comme dans la vue normale)? +should the status of the event-participants (accept, reject, ...) be shown in brakets after each participants name ? calendar fr Le statut de chaque participant à l'évènement (accepté, rejeté, ...) doit-il être montré entre crochets après le nom de chaque participant ? show day view on main screen calendar fr Montrer la vue du jour sur l'écran principal show default view on main screen calendar fr Montrer la vue par défaut sur l'écran principal show high priority events on main screen calendar fr Montrer les événements prioritaires sur la page principale +show invitations you rejected calendar fr Montrer les invitations que vous avez rejeté single event calendar fr Evènement unique sorry, the owner has just deleted this event calendar fr Désolé, le propriétaire vient juste d'effacer cet événement sorry, this event does not exist calendar fr Désolé, cet évènement n'existe pas sorry, this event does not have exceptions defined calendar fr Désolé, cet évènement n'a pas d'exceptions définies sort by calendar fr Sort by +specifies the the number of intervals shown in the planner view. calendar fr Spécifie le nombre d'intervalles montrés dans la vue planning. start date/time calendar fr Date/heure de début start- and enddates calendar fr Dates de début et de fin +startdate calendar fr Date de début startrecord calendar fr Enregistrement de début su calendar fr Di submit to repository calendar fr Soumettre au dépôt @@ -179,11 +239,25 @@ th calendar fr J the following conflicts with the suggested time:
    %1
calendar fr L'élément suivant entre en conflit avec l'heure suggérée:
    %1
the user %1 is not participating in this event! calendar fr L'utilisateur %1 ne participe pas à cet évènement! there was an error trying to connect to your news server.
please contact your admin to check the news servername, username or password. calendar fr Il y a eu une erreur en essayant de se connecter à votre serveur de News.
SVP, contactez votre administrateur pour vérifier le nom du serveur de News, votre nom ou mot de passe. +this day is shown as first day in the week or month view. calendar fr Ce jour est montré comme le premier jour dans la vue hebdomadaire ou mensuelle. +this defines the end of your dayview. events after this time, are shown below the dayview. calendar fr Ceci définit la fin de votre vue journalière. Les évènements après cette heure sont montrés sous la vue journalière. +this defines the start of your dayview. events before this time, are shown above the dayview.
this time is also used as a default starttime for new events. calendar fr Ceci définit le début de votre vue journalière. Les évènements avant cette heuresont montrés au-dessus de la vue journalière.
Cette heure est aussi utilisée comme l'heure de début par défaut pour les nouveaux évènements. +this group that is preselected when you enter the planner. you can change it in the planner anytime you want. calendar fr Ce groupe qui est présélectionné quand vous entrez dans le planning. Vous pouvez le changer dans le planning chaque fois que vous le voulez. +this message is sent for canceled or deleted events. calendar fr Ce message est envoyé pour les évènements annulés ou effacés. +this message is sent for modified or moved events. calendar fr Ce message est envoyé pour les évènements modifiés ou déplacés. +this message is sent to every participant of events you own, who has requested notifcations about new events.
you can use certain variables which get substituted with the data of the event. the first line is the subject of the email. calendar fr Ce message est envoyé à tous les participants des évènements vous appartenant qui ont demandé des notifications à propos des nouveaux évènements.
Vous pouvez utiliser certaines variables qui seront remplacées par les données de l'évènement. La première ligne est le sujet de l'EMail. +this message is sent when you accept, tentative accept or reject an event. calendar fr Ce message est envoyé quand vous acceptez, essayez d'accepter ou rejetez un évènement. +this message is sent when you set an alarm for a certain event. include all information you might need. calendar fr Ce message est envoyé quand vous réglez une Alarme pour un évènement précis. Incluez toutes les informations dont vous pourriez avoir besoin. this month calendar fr Ce mois this week calendar fr Cette semaine this year calendar fr Cette année thu calendar fr Jeu title calendar fr Titre +title of the event calendar fr Titre de l'évènement +title-row calendar fr Titre de ligne +to-firstname calendar fr A-prénom +to-fullname calendar fr A-Nom complet +to-lastname calendar fr A-Nom de famille today calendar fr Aujourd'hui translation calendar fr Traduction tu calendar fr M @@ -199,6 +273,8 @@ weekday starts on calendar fr La semaine d weekly calendar fr Hebdomadaire weekview calendar fr Vue hebdomadaire when creating new events default set to private calendar fr A la création de nouveaux événements mettre par défaut en privé +which events do you want to see when you enter the calendar. calendar fr Quels évènements voulez-vous voir quand vous entrez dans le calendrier. +which of calendar view do you want to see, when you start calendar ? calendar fr Laquelle des vues du calendrier vous voulez voir, quand vous entrez dans le calendrier ? work day ends on calendar fr Jour de travail finit à work day starts on calendar fr Jour de travail démarre à workdayends calendar fr Le jour de travail finit @@ -206,10 +282,13 @@ yearly calendar fr Annuel yearview calendar fr Vue annuelle you can either set a year or a occurence, not both !!! calendar fr Vous pouvez soit régler une année ou une Occurence, pas les deux !!! you can only set a year or a occurence !!! calendar fr Vous pouvez uniquement régler une année ou une occurrence !!! +you do not have permission to add alarms to this event !!! calendar fr Vous n'avez pas les droits pour ajouter des alarmes à cet évènement !!! +you do not have permission to delete this alarm !!! calendar fr Vous n'avez pas les droits pour effacer cette alarme !!! +you do not have permission to enable/disable this alarm !!! calendar fr Vous n'avez pas les droits pour activer/désactiver cette alarme !!! you do not have permission to read this record! calendar fr Vous n'avez pas les droits pour lire cet enregistrement! you have %1 high priority events on your calendar today. common fr Vous avez %1 événements de haute priorité dans votre calendrier aujourd'hui. you have 1 high priority event on your calendar today. common fr Vous avez 1 événement de haute priorité dans votre calendrier aujourd'hui. -you have a meeting scheduled for calendar fr Vous avez une réunion planifiée le +you have a meeting scheduled for %1 calendar fr Vous avez une réunion planifiée pour %1 you have not entered a title calendar fr Vous n'avez pas entré de titre you have not entered a valid date calendar fr Vous n'avez pas entré une date correcte you have not entered a valid time of day calendar fr Vous n'avez pas entré une heure de la journée correcte @@ -217,6 +296,6 @@ you have not entered participants calendar fr Vous n'avez pas s you must enter one or more search keywords calendar fr Vous devez entrer un ou plusieurs mots clés de recherche you must select a [iv]cal. (*.[iv]cs) calendar fr Vous devez choisir un [iv]Cal. (*.[iv]cs) you need to set either a day or a occurence !!! calendar fr Vous devez régler soit un jour soit une occurrence !!! -your meeting scheduled for calendar fr Votre réunion planifiée le -your meeting that had been scheduled for calendar fr Votre réunion qui a été planifiée le +your meeting scheduled for %1 has been canceled calendar fr Votre réunion planifiée pour %1 a été annulée +your meeting that had been scheduled for %1 has been rescheduled to %2 calendar fr Votre réunion qui avait été planifiée pour %1 a été replanifiée pour %2 your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar fr L'heure que vous avez suggéré %1 - %2 entre en conflit avec les entrés suivantes du calendrier: diff --git a/calendar/setup/phpgw_ja.lang b/calendar/setup/phpgw_ja.lang index 65c4bf06dd..9e3fc65bcf 100644 --- a/calendar/setup/phpgw_ja.lang +++ b/calendar/setup/phpgw_ja.lang @@ -6,9 +6,11 @@ alarms calendar ja alarm management calendar ja ¥¢¥é¡¼¥à´ÉÍý all day calendar ja Á´¤Æ¤ÎÆü am calendar ja ¸áÁ° +are you sure you want to delete this country ? calendar ja ¤³¤Î¹ñ¤ÎµÙÆü¤òºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡£ are you sure\nyou want to\ndelete this entry ? calendar ja ¤³¤Î¹àÌܤò\nºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡£ are you sure\nyou want to\ndelete this entry ?\n\nthis will delete\nthis entry for all users. calendar ja ºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡£\n¡ÊÁ´¤Æ¤Î¥æ¡¼¥¶¤Ë±Æ¶Á¤·¤Þ¤¹¡Ë Are you sure\nyou want to\ndelete this single occurence ?\n\nThis will delete\nthis entry for all users. calendar ja ºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡£\n¡ÊÁ´¤Æ¤Î¥æ¡¼¥¶¤Ë±Æ¶Á¤·¤Þ¤¹¡Ë +back calendar ja Ìá¤ë brief description calendar ja ·ï̾ calendar common ja ¥«¥ì¥ó¥À¡¼ calendar preferences common ja ¥«¥ì¥ó¥À¡¼¥æ¡¼¥¶ÀßÄê @@ -17,6 +19,7 @@ calendar - add calendar ja calendar - edit calendar ja ¥«¥ì¥ó¥À¡¼ - ÄûÀµ calendar holiday management admin ja µÙÆüÀßÄê countries calendar ja ¹ñ°ìÍ÷ +country calendar ja ¹ñ daily calendar ja Æüñ°Ì daily matrix view calendar ja ÆüÄøɽ¼¨ days repeated calendar ja ÍËÆü @@ -24,6 +27,7 @@ delete series calendar ja Ϣ³ delete single calendar ja ñÆȺï½ü default calendar filter calendar ja ¥«¥ì¥ó¥À¡¼¤Î½é´üÁªÂò default calendar view calendar ja ¥«¥ì¥ó¥À¡¼¤Î½é´üɽ¼¨ +display interval in day View calendar ja Æüɽ¼¨»þ¤Î»þ´Ö´Ö³Ö display mini calendars when printing calendar ja °õºþÍѤλþ¡¢¾®¥«¥ì¥ó¥À¤òɽ¼¨ display status of events calendar ja ¥¤¥Ù¥ó¥È¾õ¶·É½¼¨ do you wish to autoload calendar holidays files dynamically? admin ja µÙÆü¥Õ¥¡¥¤¥ë¤ò¼«Æ°¥í¡¼¥É¤¹¤ë @@ -66,12 +70,15 @@ no matches found. calendar ja no matchs found calendar ja ¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£ no response calendar ja ÊÖÅú¤Ê¤· observance rule calendar ja µÙÆü¤Î¥ë¡¼¥ë¤òŬÍÑ +overlap holiday calendar ja ¿¶ÂصÙÆü occurence calendar ja ÍËÆü»ØÄê participant calendar ja »²²Ã¼Ô participates calendar ja ¤â»²²Ã participants calendar ja »²²Ã¼Ô +people holiday calendar ja ¹ṉ̃¤ÎµÙÆü planner calendar ja ¥×¥é¥ó¥Ê¡¼ pm calendar ja ¸á¸å +print calendars in black & white calendar ja °õºþÍѤλþ¡¢Çò¹õɽ¼¨¤Ë¤¹¤ë printer friendly calendar ja °õºþÍÑ¤Ø private and global public calendar ja ¥×¥é¥¤¥Ù¡¼¥È¤È¶¦Í­ private and group public calendar ja ¥×¥é¥¤¥Ù¡¼¥È¤È½ê°¥°¥ë¡¼¥× @@ -94,6 +101,7 @@ search results calendar ja select country for including holidays calendar ja µÙÆü¥Ç¡¼¥¿ÁªÂò send/receive updates via email calendar ja ¹¹¿·¾ðÊó¤òÅŻҥ᡼¥ë¤Ç¼õ¼è¤ë show day view on main screen calendar ja º£Æü¤ÎͽÄê¤ò¥á¥¤¥ó²èÌ̤Ëɽ¼¨ +show default view on main screen calendar ja ½é´üɽ¼¨¤ò¥á¥¤¥ó²èÌ̤Ëɽ¼¨ show high priority events on main screen calendar ja Í¥ÀèÅÙ¤¬¹â¤¤¥¤¥Ù¥ó¥È¤ò¥á¥¤¥ó²èÌ̤Ëɽ¼¨ start date/time calendar ja ³«»ÏÆü»þ su calendar ja Æü diff --git a/calendar/setup/phpgw_sv.lang b/calendar/setup/phpgw_sv.lang index 2c3603300c..3141be8d72 100644 --- a/calendar/setup/phpgw_sv.lang +++ b/calendar/setup/phpgw_sv.lang @@ -2,12 +2,9 @@ 1 match found calendar sv 1 träff hittad a calendar sv a all calendar sv Alla -are you sure\\\\nyou want to\\\\ndelete this entry ? calendar sv Är du säker på attndu villnta bort denna? -are you sure\\\\nyou want to\\\\ndelete this entry ?\\\\n\\\\nthis will delete\\\\nthis entry for all users. calendar sv Är du säker på attndu villnta bort denna entry ?nnDetta vill ta bortndenna entry för alla användare. -are you sure\\nyou want to\\ndelete this entry ? calendar sv Är du säker\\natt du vill\\ntabort denna post? -are you sure\\nyou want to\\ndelete this entry ?\\n\\nthis will delete\\nthis entry for all users. calendar sv Är du säker\\natt du vill\\ntabort denna post?\\n\\nDetta tar bort den\\nför alla användare. -are you sure\nyou want to\ndelete this entry ? calendar sv Är du säker\natt du vill\\nradera denna post? -are you sure\nyou want to\ndelete this entry ?\n\nthis will delete\nthis entry for all users. calendar sv Är du säker\\natt du vill\\nradera denna post?\\n\\nDetta tar bort\\ndenna post för alla\\nanvändare. +are you sure\nyou want to\ndelete this entry ? calendar sv Är du säker på att\ndu vill\nta bort denna? +are you sure\nyou want to\ndelete this entry ?\n\nthis will delete\nthis entry for all users. calendar sv Är du säker på attndu villnta bort denna entry ?\n\nDetta vill ta bortndenna entry för alla användare. +are you sure\nyou want to\ndelete this entry ?\n\nthis will delete\nthis entry for all users. calendar sv Är du säker\natt du vill\ntabort denna post?\n\nDetta tar bort den\nför alla användare. brief description calendar sv Kort beskrivning calendar common sv kalender calendar preferences common sv Kalender inställningar @@ -80,11 +77,11 @@ year calendar sv yearly calendar sv Årligen you have 1 high priority event on your calendar today. common sv Du har 1 högprioritets händelse i din kalender i dag. you have %1 high priority events on your calendar today. common sv Du har %1 högprioritets händelse i din kalender i dag. -you have not entered a\\\\nbrief description calendar sv Du har inte skrivit in ennkort beskrivning -you have not entered a\\\\nvalid time of day. calendar sv Du har inte skrivit in enngiltig tid. -you have not entered a\\nbrief description calendar sv Du har inte gett\\nnågon beskrivning -you have not entered a\\nvalid time of day. calendar sv Du har inte angett\\nnågon giltig tid på dagen. -you have not entered a\nbrief description calendar sv Du har inte skrivit\\nen beskrivning. -you have not entered a\nvalid time of day. calendar sv Du har inte angivit\\nen giltig tid. +you have not entered a\nbrief description calendar sv Du har inte skrivit in ennkort beskrivning +you have not entered a\nvalid time of day. calendar sv Du har inte skrivit in enngiltig tid. +you have not entered a\nbrief description calendar sv Du har inte gett\nnågon beskrivning +you have not entered a\nvalid time of day. calendar sv Du har inte angett\nnågon giltig tid på dagen. +you have not entered a\nbrief description calendar sv Du har inte skrivit\nen beskrivning. +you have not entered a\nvalid time of day. calendar sv Du har inte angivit\nen giltig tid. you must enter one or more search keywords calendar sv Du måste skriva in ett eller flera sökord your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar sv Din föreslagna tid av %1 - %2 är i konflikt med de följande kalender entries: diff --git a/calendar/setup/setup.inc.php b/calendar/setup/setup.inc.php index 66d47cf795..d8f4a08048 100755 --- a/calendar/setup/setup.inc.php +++ b/calendar/setup/setup.inc.php @@ -12,58 +12,50 @@ /* $Id$ */ $setup_info['calendar']['name'] = 'calendar'; - $setup_info['calendar']['version'] = '0.9.13.007'; + $setup_info['calendar']['version'] = '0.9.16.001'; $setup_info['calendar']['app_order'] = 3; $setup_info['calendar']['enable'] = 1; - $setup_info['calendar']['author'] = array - ( - 'name' => 'Mark Peters', - 'email' => 'skeeter@phpgroupware.org' - ); - + $setup_info['calendar']['author'] = 'Mark Peters'; $setup_info['calendar']['license'] = 'GPL'; - - $setup_info['calendar']['description'] = 'Powerful calendar with meeting request system and ACL security.'; - + $setup_info['calendar']['description'] = + 'Powerful calendar with meeting request system and ACL security.'; + $setup_info['calendar']['note'] = + 'Bassed on Webcalendar by Craig Knudsen.

+ More information about the calendar and the current development-status can be found on the + Calendar page in our Wiki or + Calendar FAQs.'; $setup_info['calendar']['maintainer'] = array( 'name' => 'Ralf Becker', - 'email' => 'ralfbecker@outdoor-training.de' - ); - - $setup_info['calendar']['based_on'] = array - ( - 'info' => 'Webcalendar by Craig Knudsen', - 'email' => 'cknudsen@radix.net', - 'url' => 'http://www.radix.net/~cknudsen' + 'email' => 'RalfBecker@outdoor-training.de' ); $setup_info['calendar']['tables'][] = 'phpgw_cal'; $setup_info['calendar']['tables'][] = 'phpgw_cal_holidays'; $setup_info['calendar']['tables'][] = 'phpgw_cal_repeats'; $setup_info['calendar']['tables'][] = 'phpgw_cal_user'; - $setup_info['calendar']['tables'][] = 'phpgw_cal_alarm'; + $setup_info['calendar']['tables'][] = 'phpgw_cal_extra'; /* The hooks this app includes, needed for hooks registration */ - $setup_info['calendar']['hooks'] = array - ( - 'add_def_prefs', - 'admin', - 'deleteaccount', - 'email', - 'home', - 'home_day', - 'home_month', - 'home_week', - 'home_year', - 'manual', - 'preferences', - 'settings' - ); + $setup_info['calendar']['hooks'][] = 'add_def_prefs'; + $setup_info['calendar']['hooks'][] = 'admin'; + $setup_info['calendar']['hooks'][] = 'deleteaccount'; + $setup_info['calendar']['hooks'][] = 'email'; + $setup_info['calendar']['hooks'][] = 'home'; + $setup_info['calendar']['hooks'][] = 'home_day'; + $setup_info['calendar']['hooks'][] = 'home_month'; + $setup_info['calendar']['hooks'][] = 'home_week'; + $setup_info['calendar']['hooks'][] = 'home_year'; + $setup_info['calendar']['hooks'][] = 'manual'; + $setup_info['calendar']['hooks'][] = 'preferences'; + $setup_info['calendar']['hooks'][] = 'settings'; + $setup_info['calendar']['hooks'][] = 'sidebox_menu'; /* Dependencies for this app to work */ $setup_info['calendar']['depends'][] = array( 'appname' => 'phpgwapi', - 'versions' => Array('0.9.13', '0.9.14','0.9.15') + 'versions' => Array('0.9.14','0.9.15','0.9.16') ); -?> + + + diff --git a/calendar/setup/tables_current.inc.php b/calendar/setup/tables_current.inc.php index bbae403bb2..610f2409d6 100644 --- a/calendar/setup/tables_current.inc.php +++ b/calendar/setup/tables_current.inc.php @@ -15,20 +15,20 @@ 'phpgw_cal' => array( 'fd' => array( 'cal_id' => array('type' => 'auto','nullable' => False), - 'uid' => array('type' => 'varchar', 'precision' => 255,'nullable' => False), - 'owner' => array('type' => 'int', 'precision' => 8,'nullable' => False), - 'category' => array('type' => 'varchar', 'precision' => 30,'nullable' => True), - 'groups' => array('type' => 'varchar', 'precision' => 255,'nullable' => True), - 'datetime' => array('type' => 'int', 'precision' => 8,'nullable' => True), - 'mdatetime' => array('type' => 'int', 'precision' => 8,'nullable' => True), - 'edatetime' => array('type' => 'int', 'precision' => 8,'nullable' => True), - 'priority' => array('type' => 'int', 'precision' => 8,'nullable' => False,'default' => 2), - 'cal_type' => array('type' => 'varchar', 'precision' => 10,'nullable' => True), - 'is_public' => array('type' => 'int', 'precision' => 8,'nullable' => False,'default' => 1), - 'title' => array('type' => 'varchar', 'precision' => 80,'nullable' => False,'default' => '1'), + 'uid' => array('type' => 'varchar','precision' => '255','nullable' => False), + 'owner' => array('type' => 'int','precision' => '8','nullable' => False), + 'category' => array('type' => 'varchar','precision' => '30','nullable' => True), + 'groups' => array('type' => 'varchar','precision' => '255','nullable' => True), + 'datetime' => array('type' => 'int','precision' => '8','nullable' => True), + 'mdatetime' => array('type' => 'int','precision' => '8','nullable' => True), + 'edatetime' => array('type' => 'int','precision' => '8','nullable' => True), + 'priority' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '2'), + 'cal_type' => array('type' => 'varchar','precision' => '10','nullable' => True), + 'is_public' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '1'), + 'title' => array('type' => 'varchar','precision' => '80','nullable' => False,'default' => '1'), 'description' => array('type' => 'text','nullable' => True), - 'location' => array('type' => 'varchar', 'precision' => 255,'nullable' => True), - 'reference' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0) + 'location' => array('type' => 'varchar','precision' => '255','nullable' => True), + 'reference' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0') ), 'pk' => array('cal_id'), 'fk' => array(), @@ -38,13 +38,13 @@ 'phpgw_cal_holidays' => array( 'fd' => array( 'hol_id' => array('type' => 'auto','nullable' => False), - 'locale' => array('type' => 'char', 'precision' => 2, 'nullable' => False), - 'name' => array('type' => 'varchar', 'precision' => 50, 'nullable' => False), - 'mday' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0), - 'month_num' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0), - 'occurence' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0), - 'dow' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0), - 'observance_rule' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0) + 'locale' => array('type' => 'char','precision' => '2','nullable' => False), + 'name' => array('type' => 'varchar','precision' => '50','nullable' => False), + 'mday' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'month_num' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'occurence' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'dow' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'observance_rule' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0') ), 'pk' => array('hol_id'), 'fk' => array(), @@ -53,13 +53,13 @@ ), 'phpgw_cal_repeats' => array( 'fd' => array( - 'cal_id' => array('type' => 'int', 'precision' => 8, 'nullable' => False), - 'recur_type' => array('type' => 'int', 'precision' => 8, 'nullable' => False), - 'recur_use_end' => array('type' => 'int', 'precision' => 8, 'nullable' => True, 'default' => 0), - 'recur_enddate' => array('type' => 'int', 'precision' => 8, 'nullable' => True), - 'recur_interval' => array('type' => 'int', 'precision' => 8, 'nullable' => True, 'default' => 1), - 'recur_data' => array('type' => 'int', 'precision' => 8, 'nullable' => True, 'default' => 1), - 'recur_exception' => array('type' => 'varchar', 'precision' => 255, 'nullable' => True, 'default' => '') + 'cal_id' => array('type' => 'int','precision' => '8','nullable' => False), + 'recur_type' => array('type' => 'int','precision' => '8','nullable' => False), + 'recur_use_end' => array('type' => 'int','precision' => '8','nullable' => True,'default' => '0'), + 'recur_enddate' => array('type' => 'int','precision' => '8','nullable' => True), + 'recur_interval' => array('type' => 'int','precision' => '8','nullable' => True,'default' => '1'), + 'recur_data' => array('type' => 'int','precision' => '8','nullable' => True,'default' => '1'), + 'recur_exception' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => '') ), 'pk' => array(), 'fk' => array(), @@ -68,25 +68,23 @@ ), 'phpgw_cal_user' => array( 'fd' => array( - 'cal_id' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0), - 'cal_login' => array('type' => 'int', 'precision' => 8, 'nullable' => False, 'default' => 0), - 'cal_status' => array('type' => 'char', 'precision' => 1, 'nullable' => True, 'default' => 'A') + 'cal_id' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'cal_login' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'cal_status' => array('type' => 'char','precision' => '1','nullable' => True,'default' => 'A'), + 'cal_type' => array('type' => 'varchar','precision' => '1','nullable' => False,'default' => '') ), 'pk' => array('cal_id','cal_login'), 'fk' => array(), 'ix' => array(), 'uc' => array() ), - 'phpgw_cal_alarm' => array( + 'phpgw_cal_extra' => array( 'fd' => array( - 'alarm_id' => array('type' => 'auto','nullable' => False), - 'cal_id' => array('type' => 'int', 'precision' => 8, 'nullable' => False), - 'cal_owner' => array('type' => 'int', 'precision' => 8, 'nullable' => False), - 'cal_time' => array('type' => 'int', 'precision' => 8, 'nullable' => False), - 'cal_text' => array('type' => 'varchar', 'precision' => 50, 'nullable' => False), - 'alarm_enabled' => array('type' => 'int', 'precision' => 4, 'nullable' => False, 'default' => '1') + 'cal_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'cal_extra_name' => array('type' => 'varchar','precision' => '40','nullable' => False), + 'cal_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '') ), - 'pk' => array('alarm_id'), + 'pk' => array('cal_id','cal_extra_name'), 'fk' => array(), 'ix' => array(), 'uc' => array() diff --git a/calendar/setup/tables_update.inc.php b/calendar/setup/tables_update.inc.php index 020f0782ad..b92a23b282 100644 --- a/calendar/setup/tables_update.inc.php +++ b/calendar/setup/tables_update.inc.php @@ -827,6 +827,12 @@ $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.13.001'; return $GLOBALS['setup_info']['calendar']['currentver']; } + $test[] = '0.9.12'; + function calendar_upgrade0_9_12() + { + $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.13.001'; + return $GLOBALS['setup_info']['calendar']['currentver']; + } $test[] = '0.9.13.001'; function calendar_upgrade0_9_13_001() { @@ -907,4 +913,33 @@ $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.13.007'; return $GLOBALS['setup_info']['calendar']['currentver']; } + + + $test[] = '0.9.13.007'; + function calendar_upgrade0_9_13_007() + { + $GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_cal_user','cal_type',array( + 'type' => 'varchar', + 'precision' => '1', + 'nullable' => False, + 'default' => '' + )); + + $GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_cal_extra',array( + 'fd' => array( + 'cal_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'cal_extra_name' => array('type' => 'varchar','precision' => '40','nullable' => False), + 'cal_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '') + ), + 'pk' => array('cal_id','cal_extra_name'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + )); + + $GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_cal_alarm'); + + $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.16.001'; + return $GLOBALS['setup_info']['calendar']['currentver']; + } ?> diff --git a/calendar/templates/default/alarm.tpl b/calendar/templates/default/alarm.tpl index a771a44f0a..23cc249cfb 100755 --- a/calendar/templates/default/alarm.tpl +++ b/calendar/templates/default/alarm.tpl @@ -1,33 +1,48 @@
+{hidden_vars}

' + $GLOBALS['extra_data'] = $GLOBALS['css']."\n".''."\n".''."\n".''."\n".'
' . ExecMethod('calendar.uicalendar.get_year') .'
'."\n".'
- {row} + {rows}
+

+

+{input_text}

+{input_days} {input_hours} {input_minutes} {input_owner} +

+{input_add} +

-
  {time_lang} {text_lang}enableddisabled
{lang_time}{lang_text}{lang_owner}{lang_enabled}{lang_select}
{edit_box}{field}:{data}{alarm_enabled}{alarm_disabled}
{field}:{data}{owner}{enabled}{select}
{hr_text}
+ {enable_button} {disable_button} {delete_button} +
- + - + - + - + - + + diff --git a/calendar/templates/default/custom_fields.tpl b/calendar/templates/default/custom_fields.tpl new file mode 100644 index 0000000000..57bba92875 --- /dev/null +++ b/calendar/templates/default/custom_fields.tpl @@ -0,0 +1,46 @@ + + +{lang_error}
+ + {hidden_vars} +
+
 {title}
 
{lang_Calendar_settings}
{lang_Do_you_wish_to_autoload_calendar_holidays_files_dynamically?}
{lang_Location_to_autoload_from}:
 
+ + + + + + + + + + {rows} + + + + + + + + + + + + +
{lang_name}{lang_length}{lang_shown}{lang_order}{lang_title}{lang_disabled} 
{name}{length}{shown}{order}{title}{disabled}{button}
{save_button}   {cancel_button}
+ + +
+ + + +
{name}{length}{shown}{order}{title}{disabled}{button}
- +
{day_events}
{event}{event} {event}{event} {event}{event} {open_link}{time}{close_link}{open_link}{time}{close_link}
@@ -14,7 +21,7 @@ {row} + - + diff --git a/calendar/templates/default/header.inc.php b/calendar/templates/default/header.inc.php index 4b3ada6d44..6f2d2eb56a 100755 --- a/calendar/templates/default/header.inc.php +++ b/calendar/templates/default/header.inc.php @@ -22,7 +22,7 @@ return ''.$alt.''; } - $refer = explode('.',MENUACTION); + $refer = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); $referrer = $refer[2]; $templates = Array( @@ -30,7 +30,6 @@ 'form_button_dropdown' => 'form_button_dropdown.tpl', 'form_button_script' => 'form_button_script.tpl' ); - $tpl = &$GLOBALS['phpgw']->template; $tpl->set_file($templates); $tpl->set_block('head_tpl','head','head'); $tpl->set_block('head_tpl','head_table','head_table'); @@ -70,7 +69,7 @@ add_col($tpl,' '); - $tpl->parse('phpgw_body','head_table',True); + $tpl->parse('row','head_table',True); $tpl->set_var('header_column',''); $tpl->set_var('cols',$cols); @@ -78,38 +77,37 @@ if($referrer!='view') { $remainder = 72; - $cal_id = get_var('cal_id',Array('GET','DEFAULT'),0); - $keywords = get_var('keywords',Array('POST','DEFAULT'),''); - $matrixtype = get_var('matrixtype',Array('POST','DEFAULT'),''); - $participants = get_var('participants',Array('POST')); - $date = get_var('date',Array('GET','POST')); - $year = $this->bo->year; - $month = $this->bo->month; - $day = $this->bo->day; - $var_list = Array( - 'cal_id', - 'keywords', - 'matrixtype', - 'date', - 'year', - 'month', - 'day' - ); + + $date = (isset($GLOBALS['date'])?$GLOBALS['date']:''); + $date = (isset($GLOBALS['HTTP_GET_VARS']['date'])?$GLOBALS['HTTP_GET_VARS']['date']:$date); + $date = ($date=='' && isset($GLOBALS['HTTP_POST_VARS']['date'])?$GLOBALS['HTTP_POST_VARS']['date']:$date); - $base_hidden_vars = ''."\n"; - for($i=0;$i'."\n"; + if(isset($GLOBALS['HTTP_GET_VARS']['cal_id']) && $GLOBALS['HTTP_GET_VARS']['cal_id'] != 0) { - if($$var_list[$i]) - { - $base_hidden_vars .= ' '."\n"; - } + $base_hidden_vars .= ' '."\n"; } - $hidden_vars = ''; - if($participants) + if(isset($GLOBALS['HTTP_POST_VARS']['keywords']) && $GLOBALS['HTTP_POST_VARS']['keywords']) { - for ($i=0;$i'."\n"; + } + if(isset($GLOBALS['HTTP_POST_VARS']['matrixtype']) && $GLOBALS['HTTP_POST_VARS']['matrixtype']) + { + $base_hidden_vars .= ' '."\n"; + } + if($date) + { + $base_hidden_vars .= ' '."\n"; + } + $base_hidden_vars .= ' '."\n"; + $base_hidden_vars .= ' '."\n"; + $base_hidden_vars .= ' '."\n"; + + if(isset($GLOBALS['HTTP_POST_VARS']['participants']) && $GLOBALS['HTTP_POST_VARS']['participants']) + { + for ($i=0;$i'."\n"; + $base_hidden_vars .= ' '."\n"; } } @@ -118,15 +116,15 @@ 'form_link' => $this->page($referrer), 'form_name' => 'cat_id', 'title' => lang('Category'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => ''.$this->cat->formatted_list('select','all',$this->bo->cat_id,'True'), + 'hidden_vars' => $base_hidden_vars, + 'form_options' => ''.$this->cat->formated_list('select','all',$this->bo->cat_id,'True'), 'button_value' => lang('Go!') ); $tpl->set_var($var); $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); $tpl->parse('header_column','head_col',True); - if(MENUACTION == 'calendar.uicalendar.planner') + if($GLOBALS['HTTP_GET_VARS']['menuaction'] == 'calendar.uicalendar.planner') { $remainder -= 28; print_debug('Sort By',$this->bo->sortby); @@ -151,23 +149,15 @@ if($this->bo->check_perms(PHPGW_ACL_PRIVATE)) { $remainder -= 28; - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } $form_options = ''."\n"; $form_options .= ' '."\n"; - + $var = Array( 'form_width' => '28', 'form_link' => $this->page($referrer), 'form_name' => 'filter', 'title' => lang('Filter'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, + 'hidden_vars' => $base_hidden_vars, 'form_options' => $form_options, 'button_value' => lang('Go!') ); @@ -179,46 +169,12 @@ if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0) { $form_options = ''; - reset($this->bo->grants); - while(list($grantor,$temp_rights) = each($this->bo->grants)) - { - $GLOBALS['phpgw']->accounts->get_account_name($grantor,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $grantor, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($grantor)=='g'?'g_':'').$grantor, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - $memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); - while($memberships != False && list($key,$group_info) = each($memberships)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_info['account_id'],$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_info['account_id'], - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_info['account_id'])=='g'?'g_':'').$group_info['account_id'], - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - - $account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'); - while($account_perms && list($key,$group_id) = each($account_perms)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_id,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_id, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_id)=='g'?'g_':'').$group_id, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - } - - @reset($drop_down); - @ksort($drop_down); - while(list($key,$grant) = each($drop_down)) + $drop_down = $this->bo->list_cals(); + foreach($drop_down as $key => $grant) { $form_options .= ' '."\n"; } - reset($this->bo->grants); - + $var = Array( 'form_width' => $remainder, 'form_link' => $this->page($referrer), @@ -234,11 +190,10 @@ } } - $hidden_vars = ' '."\n"; - $date = get_var('date',Array('GET')); - if($date) + $hidden_vars = ' '."\n"; + if(isset($GLOBALS['HTTP_GET_VARS']['date']) && $GLOBALS['HTTP_GET_VARS']['date']) { - $hidden_vars .= ' '."\n"; + $hidden_vars .= ' '."\n"; } $hidden_vars .= ' '."\n"; $hidden_vars .= ' '."\n"; @@ -255,7 +210,7 @@ { $hidden_vars .= ' '."\n"; } - $hidden_vars .= ' '; + $hidden_vars .= ' '; $var = Array( 'action_url_button' => $this->page('search'), @@ -267,5 +222,5 @@ $button = $tpl->fp('out','form_button'); $tpl->set_var('str',''); $tpl->parse('header_column','head_col',True); - $tpl->parse('phpgw_body','head_table',True); + $tpl->parse('row','head_table',True); ?> diff --git a/calendar/templates/default/holiday.tpl b/calendar/templates/default/holiday.tpl index ae4d5197a0..534acbeb81 100755 --- a/calendar/templates/default/holiday.tpl +++ b/calendar/templates/default/holiday.tpl @@ -9,7 +9,7 @@ + {rule} diff --git a/calendar/templates/default/matrix_query.tpl b/calendar/templates/default/matrix_query.tpl index e09a9edca6..a9ae26ae5b 100755 --- a/calendar/templates/default/matrix_query.tpl +++ b/calendar/templates/default/matrix_query.tpl @@ -1,15 +1,15 @@
-
+
- +
  {cancel_button}
@@ -26,13 +33,13 @@ -
 {field}: {data}
{hr_text}  '.$button.'
- + @@ -27,7 +27,7 @@ - + diff --git a/calendar/templates/default/images/navbar.png b/calendar/templates/default/images/navbar.png index d038d8d94c..0b4fa60243 100644 Binary files a/calendar/templates/default/images/navbar.png and b/calendar/templates/default/images/navbar.png differ diff --git a/calendar/templates/default/images/year.png b/calendar/templates/default/images/year.png index 6d98f82867..b550a28216 100644 Binary files a/calendar/templates/default/images/year.png and b/calendar/templates/default/images/year.png differ diff --git a/calendar/templates/default/locales.tpl b/calendar/templates/default/locales.tpl index 705728eda6..89cf69f022 100755 --- a/calendar/templates/default/locales.tpl +++ b/calendar/templates/default/locales.tpl @@ -9,8 +9,8 @@
{field}: {data}
- - + + {header_rule} @@ -38,7 +38,7 @@
{sort_name}
 {sort_name}{header_edit} {header_delete}
-
 {group_name}{edit_link}
- + {rows} + diff --git a/calendar/templates/default/month_header.tpl b/calendar/templates/default/month_header.tpl index fa15267d7e..2d39092c05 100755 --- a/calendar/templates/default/month_header.tpl +++ b/calendar/templates/default/month_header.tpl @@ -4,7 +4,7 @@ {column_header} - + + + + + + + + + + + diff --git a/calendar/templates/default/pref_colspan.tpl b/calendar/templates/default/pref_colspan.tpl deleted file mode 100755 index 833dd51fd6..0000000000 --- a/calendar/templates/default/pref_colspan.tpl +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/calendar/templates/default/pref_list.tpl b/calendar/templates/default/pref_list.tpl deleted file mode 100755 index 91d3c7a081..0000000000 --- a/calendar/templates/default/pref_list.tpl +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/calendar/templates/default/preference_acl_row.tpl b/calendar/templates/default/preference_acl_row.tpl index 8b47c61fbf..01b22d84b5 100755 --- a/calendar/templates/default/preference_acl_row.tpl +++ b/calendar/templates/default/preference_acl_row.tpl @@ -1,5 +1,5 @@ - + diff --git a/calendar/templates/default/preference_colspan.tpl b/calendar/templates/default/preference_colspan.tpl index 50cef83c0f..4b97c5dbd8 100755 --- a/calendar/templates/default/preference_colspan.tpl +++ b/calendar/templates/default/preference_colspan.tpl @@ -1,8 +1,8 @@ - + - - - - - + + + + + diff --git a/calendar/templates/default/search.tpl b/calendar/templates/default/search.tpl index 97c8dcef18..363ebafb62 100755 --- a/calendar/templates/default/search.tpl +++ b/calendar/templates/default/search.tpl @@ -1,7 +1,7 @@
{title}
- +
{cancel_button}
@@ -19,7 +19,7 @@ -
 {field}: {data}
{col_title}{col_title} diff --git a/calendar/templates/default/pref.tpl b/calendar/templates/default/pref.tpl index 4b40117d0d..df3b6308f7 100755 --- a/calendar/templates/default/pref.tpl +++ b/calendar/templates/default/pref.tpl @@ -1,3 +1,4 @@ +

{title}:


@@ -5,3 +6,17 @@
+ + + +
{text}
{field}{data}
{text}
{field}{data}
{user}
{string}{read_lang}{add_lang}{edit_lang}{delete_lang}{private_lang}{lang_read}{lang_add}{lang_edit}{lang_delete}{lang_private}
- + {rows}
{quantity}
{quantity}
@@ -9,7 +9,7 @@ -
 {date} {link}
 {field}: {data}
+ {hr_text}
+ + + + + + +
+
+ + + + +
+ {date}
+ {username} +
+ + + {day_events} +
+
+ {small_calendar} +
+{print} + + + + + {daily_events} + + + + diff --git a/calendar/templates/idots/images/month.png b/calendar/templates/idots/images/month.png new file mode 100644 index 0000000000..d2c75a0416 Binary files /dev/null and b/calendar/templates/idots/images/month.png differ diff --git a/calendar/templates/idots/images/navbar.png b/calendar/templates/idots/images/navbar.png new file mode 100755 index 0000000000..40a0ed550e Binary files /dev/null and b/calendar/templates/idots/images/navbar.png differ diff --git a/calendar/templates/idots/images/planner.png b/calendar/templates/idots/images/planner.png new file mode 100644 index 0000000000..053e7c6248 Binary files /dev/null and b/calendar/templates/idots/images/planner.png differ diff --git a/calendar/templates/idots/images/today.png b/calendar/templates/idots/images/today.png new file mode 100644 index 0000000000..c03a73eb67 Binary files /dev/null and b/calendar/templates/idots/images/today.png differ diff --git a/calendar/templates/idots/images/view.png b/calendar/templates/idots/images/view.png new file mode 100644 index 0000000000..b0dc4b1d54 Binary files /dev/null and b/calendar/templates/idots/images/view.png differ diff --git a/calendar/templates/idots/images/week.png b/calendar/templates/idots/images/week.png new file mode 100644 index 0000000000..5eb69ecca3 Binary files /dev/null and b/calendar/templates/idots/images/week.png differ diff --git a/calendar/templates/idots/images/year.png b/calendar/templates/idots/images/year.png new file mode 100644 index 0000000000..a065749d98 Binary files /dev/null and b/calendar/templates/idots/images/year.png differ diff --git a/calendar/templates/idsociety/header.inc.php b/calendar/templates/idsociety/header.inc.php deleted file mode 100755 index 451b40b21d..0000000000 --- a/calendar/templates/idsociety/header.inc.php +++ /dev/null @@ -1,270 +0,0 @@ -set_var('str',$str); - $tpl->parse('header_column','head_col',True); - } - - function add_image_ahref($link,$image,$alt) - { - return ''.$alt.''; - } - - $refer = explode('.',MENUACTION); - $referrer = $refer[2]; - - $templates = Array( - 'head_tpl' => 'head.tpl', - 'form_button_dropdown' => 'form_button_dropdown.tpl', - 'form_button_script' => 'form_button_script.tpl' - ); - $tpl->set_file($templates); - $tpl->set_block('head_tpl','head','head'); - $tpl->set_block('head_tpl','head_table','head_table'); - $tpl->set_block('head_tpl','head_col','head_col'); - $tpl->set_block('form_button_script','form_button'); - - if(floor(phpversion()) >= 4) - { - $tpl->set_var('cols',8); - } - else - { - $tpl->set_var('cols',7); - } - - $today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); - - $col_width = 12; - - add_col($tpl,'  '); - - add_col($tpl,' '.add_image_ahref($this->page('day','&date='.$today),'today',lang('Today')).''); - - add_col($tpl,' '.add_image_ahref($this->page('week','&date='.$today),'week',lang('This week')).''); - - add_col($tpl,' '.add_image_ahref($this->page('month','&date='.$today),'month',lang('This month')).''); - - add_col($tpl,' '.add_image_ahref($this->page('year','&date='.$today),'year',lang('This Year')).''); - - if(floor(phpversion()) >= 4) - { - add_col($tpl,' '.add_image_ahref($this->page('planner','&date='.$today),'planner',lang('Planner')).''); - $col_width += 2; - } - - add_col($tpl,' '.add_image_ahref($this->page('matrixselect'),'view',lang('Daily Matrix View')).''); - - add_col($tpl,'  '); - - $tpl->parse('row','head_table',True); - - $tpl->set_var('header_column',''); - $tpl->set_var('cols',$cols); - - if($referrer!='view') - { - $remainder = 72; - $cal_id = get_var('cal_id',Array('GET','DEFAULT'),0); - $keywords = get_var('keywords',Array('POST','DEFAULT'),''); - $matrixtype = get_var('matrixtype',Array('POST','DEFAULT'),''); - $participants = get_var('participants',Array('POST')); - $date = get_var('date',Array('GET','POST')); - $year = $this->bo->year; - $month = $this->bo-month; - $day = $this->bo->day; - $var_list = Array( - 'cal_id', - 'keywords', - 'matrixtype', - 'date', - 'year', - 'month', - 'day' - ); - - $base_hidden_vars = ''."\n"; - for($i=0;$i'."\n"; - } - } - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'cat_id', - 'title' => lang('Category'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => ''.$this->cat->formated_list('select','all',$this->bo->cat_id,'True'), - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - - if(MENUACTION == 'calendar.uicalendar.planner') - { - $remainder -= 28; - print_debug('Sort By',$this->bo->sortby); - - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'sortby', - 'title' => lang('Sort By'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if($this->bo->check_perms(PHPGW_ACL_PRIVATE)) - { - $remainder -= 28; - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'filter', - 'title' => lang('Filter'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0) - { - $form_options = ''; - reset($this->bo->grants); - while(list($grantor,$temp_rights) = each($this->bo->grants)) - { - $GLOBALS['phpgw']->accounts->get_account_name($grantor,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $grantor, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($grantor)=='g'?'g_':'').$grantor, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - $memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); - while($memberships != False && list($key,$group_info) = each($memberships)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_info['account_id'],$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_info['account_id'], - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_info['account_id'])=='g'?'g_':'').$group_info['account_id'], - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - - $account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'); - while($account_perms && list($key,$group_id) = each($account_perms)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_id,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_id, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_id)=='g'?'g_':'').$group_id, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - } - - @reset($drop_down); - @ksort($drop_down); - while(list($key,$grant) = each($drop_down)) - { - $form_options .= ' '."\n"; - } - reset($this->bo->grants); - - $var = Array( - 'form_width' => $remainder, - 'form_link' => $this->page($referrer), - 'form_name' => 'owner', - 'title' => lang('User'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - } - - $hidden_vars = ' '."\n"; - $date = get_var('date',Array('GET')); - if($date) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - if(isset($this->bo->filter) && $this->bo->filter) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->sortby) && $this->bo->sortby) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->num_months) && $this->bo->num_months) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '; - - $var = Array( - 'action_url_button' => $this->page('search'), - 'action_text_button' => lang('Search'), - 'action_confirm_button' => '', - 'action_extra_field' => $hidden_vars - ); - $tpl->set_var($var); - $button = $tpl->fp('out','form_button'); - $tpl->set_var('str',''.$button.''); - $tpl->parse('header_column','head_col',True); - $tpl->parse('row','head_table',True); -?> diff --git a/calendar/templates/justweb/header.inc.php b/calendar/templates/justweb/header.inc.php deleted file mode 100755 index 451b40b21d..0000000000 --- a/calendar/templates/justweb/header.inc.php +++ /dev/null @@ -1,270 +0,0 @@ -set_var('str',$str); - $tpl->parse('header_column','head_col',True); - } - - function add_image_ahref($link,$image,$alt) - { - return ''.$alt.''; - } - - $refer = explode('.',MENUACTION); - $referrer = $refer[2]; - - $templates = Array( - 'head_tpl' => 'head.tpl', - 'form_button_dropdown' => 'form_button_dropdown.tpl', - 'form_button_script' => 'form_button_script.tpl' - ); - $tpl->set_file($templates); - $tpl->set_block('head_tpl','head','head'); - $tpl->set_block('head_tpl','head_table','head_table'); - $tpl->set_block('head_tpl','head_col','head_col'); - $tpl->set_block('form_button_script','form_button'); - - if(floor(phpversion()) >= 4) - { - $tpl->set_var('cols',8); - } - else - { - $tpl->set_var('cols',7); - } - - $today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); - - $col_width = 12; - - add_col($tpl,'  '); - - add_col($tpl,' '.add_image_ahref($this->page('day','&date='.$today),'today',lang('Today')).''); - - add_col($tpl,' '.add_image_ahref($this->page('week','&date='.$today),'week',lang('This week')).''); - - add_col($tpl,' '.add_image_ahref($this->page('month','&date='.$today),'month',lang('This month')).''); - - add_col($tpl,' '.add_image_ahref($this->page('year','&date='.$today),'year',lang('This Year')).''); - - if(floor(phpversion()) >= 4) - { - add_col($tpl,' '.add_image_ahref($this->page('planner','&date='.$today),'planner',lang('Planner')).''); - $col_width += 2; - } - - add_col($tpl,' '.add_image_ahref($this->page('matrixselect'),'view',lang('Daily Matrix View')).''); - - add_col($tpl,'  '); - - $tpl->parse('row','head_table',True); - - $tpl->set_var('header_column',''); - $tpl->set_var('cols',$cols); - - if($referrer!='view') - { - $remainder = 72; - $cal_id = get_var('cal_id',Array('GET','DEFAULT'),0); - $keywords = get_var('keywords',Array('POST','DEFAULT'),''); - $matrixtype = get_var('matrixtype',Array('POST','DEFAULT'),''); - $participants = get_var('participants',Array('POST')); - $date = get_var('date',Array('GET','POST')); - $year = $this->bo->year; - $month = $this->bo-month; - $day = $this->bo->day; - $var_list = Array( - 'cal_id', - 'keywords', - 'matrixtype', - 'date', - 'year', - 'month', - 'day' - ); - - $base_hidden_vars = ''."\n"; - for($i=0;$i'."\n"; - } - } - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'cat_id', - 'title' => lang('Category'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => ''.$this->cat->formated_list('select','all',$this->bo->cat_id,'True'), - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - - if(MENUACTION == 'calendar.uicalendar.planner') - { - $remainder -= 28; - print_debug('Sort By',$this->bo->sortby); - - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'sortby', - 'title' => lang('Sort By'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if($this->bo->check_perms(PHPGW_ACL_PRIVATE)) - { - $remainder -= 28; - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'filter', - 'title' => lang('Filter'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0) - { - $form_options = ''; - reset($this->bo->grants); - while(list($grantor,$temp_rights) = each($this->bo->grants)) - { - $GLOBALS['phpgw']->accounts->get_account_name($grantor,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $grantor, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($grantor)=='g'?'g_':'').$grantor, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - $memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); - while($memberships != False && list($key,$group_info) = each($memberships)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_info['account_id'],$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_info['account_id'], - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_info['account_id'])=='g'?'g_':'').$group_info['account_id'], - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - - $account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'); - while($account_perms && list($key,$group_id) = each($account_perms)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_id,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_id, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_id)=='g'?'g_':'').$group_id, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - } - - @reset($drop_down); - @ksort($drop_down); - while(list($key,$grant) = each($drop_down)) - { - $form_options .= ' '."\n"; - } - reset($this->bo->grants); - - $var = Array( - 'form_width' => $remainder, - 'form_link' => $this->page($referrer), - 'form_name' => 'owner', - 'title' => lang('User'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - } - - $hidden_vars = ' '."\n"; - $date = get_var('date',Array('GET')); - if($date) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - if(isset($this->bo->filter) && $this->bo->filter) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->sortby) && $this->bo->sortby) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->num_months) && $this->bo->num_months) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '; - - $var = Array( - 'action_url_button' => $this->page('search'), - 'action_text_button' => lang('Search'), - 'action_confirm_button' => '', - 'action_extra_field' => $hidden_vars - ); - $tpl->set_var($var); - $button = $tpl->fp('out','form_button'); - $tpl->set_var('str',''.$button.''); - $tpl->parse('header_column','head_col',True); - $tpl->parse('row','head_table',True); -?> diff --git a/calendar/templates/verdilak/header.inc.php b/calendar/templates/verdilak/header.inc.php deleted file mode 100755 index 451b40b21d..0000000000 --- a/calendar/templates/verdilak/header.inc.php +++ /dev/null @@ -1,270 +0,0 @@ -set_var('str',$str); - $tpl->parse('header_column','head_col',True); - } - - function add_image_ahref($link,$image,$alt) - { - return ''.$alt.''; - } - - $refer = explode('.',MENUACTION); - $referrer = $refer[2]; - - $templates = Array( - 'head_tpl' => 'head.tpl', - 'form_button_dropdown' => 'form_button_dropdown.tpl', - 'form_button_script' => 'form_button_script.tpl' - ); - $tpl->set_file($templates); - $tpl->set_block('head_tpl','head','head'); - $tpl->set_block('head_tpl','head_table','head_table'); - $tpl->set_block('head_tpl','head_col','head_col'); - $tpl->set_block('form_button_script','form_button'); - - if(floor(phpversion()) >= 4) - { - $tpl->set_var('cols',8); - } - else - { - $tpl->set_var('cols',7); - } - - $today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); - - $col_width = 12; - - add_col($tpl,'  '); - - add_col($tpl,' '.add_image_ahref($this->page('day','&date='.$today),'today',lang('Today')).''); - - add_col($tpl,' '.add_image_ahref($this->page('week','&date='.$today),'week',lang('This week')).''); - - add_col($tpl,' '.add_image_ahref($this->page('month','&date='.$today),'month',lang('This month')).''); - - add_col($tpl,' '.add_image_ahref($this->page('year','&date='.$today),'year',lang('This Year')).''); - - if(floor(phpversion()) >= 4) - { - add_col($tpl,' '.add_image_ahref($this->page('planner','&date='.$today),'planner',lang('Planner')).''); - $col_width += 2; - } - - add_col($tpl,' '.add_image_ahref($this->page('matrixselect'),'view',lang('Daily Matrix View')).''); - - add_col($tpl,'  '); - - $tpl->parse('row','head_table',True); - - $tpl->set_var('header_column',''); - $tpl->set_var('cols',$cols); - - if($referrer!='view') - { - $remainder = 72; - $cal_id = get_var('cal_id',Array('GET','DEFAULT'),0); - $keywords = get_var('keywords',Array('POST','DEFAULT'),''); - $matrixtype = get_var('matrixtype',Array('POST','DEFAULT'),''); - $participants = get_var('participants',Array('POST')); - $date = get_var('date',Array('GET','POST')); - $year = $this->bo->year; - $month = $this->bo-month; - $day = $this->bo->day; - $var_list = Array( - 'cal_id', - 'keywords', - 'matrixtype', - 'date', - 'year', - 'month', - 'day' - ); - - $base_hidden_vars = ''."\n"; - for($i=0;$i'."\n"; - } - } - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'cat_id', - 'title' => lang('Category'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => ''.$this->cat->formated_list('select','all',$this->bo->cat_id,'True'), - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - - if(MENUACTION == 'calendar.uicalendar.planner') - { - $remainder -= 28; - print_debug('Sort By',$this->bo->sortby); - - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'sortby', - 'title' => lang('Sort By'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if($this->bo->check_perms(PHPGW_ACL_PRIVATE)) - { - $remainder -= 28; - $hidden_vars = ''; - if($participants) - { - for ($i=0;$i'."\n"; - } - } - $form_options = ''."\n"; - $form_options .= ' '."\n"; - - $var = Array( - 'form_width' => '28', - 'form_link' => $this->page($referrer), - 'form_name' => 'filter', - 'title' => lang('Filter'), - 'hidden_vars' => $base_hidden_vars.$hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - - if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0) - { - $form_options = ''; - reset($this->bo->grants); - while(list($grantor,$temp_rights) = each($this->bo->grants)) - { - $GLOBALS['phpgw']->accounts->get_account_name($grantor,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $grantor, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($grantor)=='g'?'g_':'').$grantor, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - $memberships = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); - while($memberships != False && list($key,$group_info) = each($memberships)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_info['account_id'],$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_info['account_id'], - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_info['account_id'])=='g'?'g_':'').$group_info['account_id'], - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - - $account_perms = $GLOBALS['phpgw']->acl->get_ids_for_location($group_info['account_id'],PHPGW_ACL_READ,'calendar'); - while($account_perms && list($key,$group_id) = each($account_perms)) - { - $GLOBALS['phpgw']->accounts->get_account_name($group_id,$lid,$fname,$lname); - $drop_down[$lname.' '.$fname] = Array( - 'grantor' => $group_id, - 'value' => ($GLOBALS['phpgw']->accounts->get_type($group_id)=='g'?'g_':'').$group_id, - 'name' => $GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname) - ); - } - } - - @reset($drop_down); - @ksort($drop_down); - while(list($key,$grant) = each($drop_down)) - { - $form_options .= ' '."\n"; - } - reset($this->bo->grants); - - $var = Array( - 'form_width' => $remainder, - 'form_link' => $this->page($referrer), - 'form_name' => 'owner', - 'title' => lang('User'), - 'hidden_vars' => $base_hidden_vars, - 'form_options' => $form_options, - 'button_value' => lang('Go!') - ); - $tpl->set_var($var); - $tpl->set_var('str',$tpl->fp('out','form_button_dropdown')); - $tpl->parse('header_column','head_col',True); - } - } - - $hidden_vars = ' '."\n"; - $date = get_var('date',Array('GET')); - if($date) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - $hidden_vars .= ' '."\n"; - if(isset($this->bo->filter) && $this->bo->filter) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->sortby) && $this->bo->sortby) - { - $hidden_vars .= ' '."\n"; - } - if(isset($this->bo->num_months) && $this->bo->num_months) - { - $hidden_vars .= ' '."\n"; - } - $hidden_vars .= ' '; - - $var = Array( - 'action_url_button' => $this->page('search'), - 'action_text_button' => lang('Search'), - 'action_confirm_button' => '', - 'action_extra_field' => $hidden_vars - ); - $tpl->set_var($var); - $button = $tpl->fp('out','form_button'); - $tpl->set_var('str',''.$button.''); - $tpl->parse('header_column','head_col',True); - $tpl->parse('row','head_table',True); -?> diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index a6fdb5fb61..0000000000 --- a/debian/changelog +++ /dev/null @@ -1,6 +0,0 @@ -phpgroupware-phpgroupware (0.9.14-0.RC3.3) unstable; urgency=low - - * New release. - - Source is now splitted into modules. - - -- Luca - De Whiskey's - De Vitis Mon, 21 May 2001 15:00:56 +0200 diff --git a/debian/control b/debian/control deleted file mode 100644 index 749a943fd4..0000000000 --- a/debian/control +++ /dev/null @@ -1,37 +0,0 @@ -Source: phpgroupware-phpgroupware -Section: web -Priority: optional -Maintainer: Luca - De Whiskey's - De Vitis -Build-Depends: debhelper (>> 3.0.0) -Standards-Version: 3.5.2 - -Package: phpgroupware-core -Section: web -Architecture: all -Depends: phpgroupware (>= ${Source-Version}), php3-pgsql | php3-cgi-pgsql | php4-pgsql | php3-mysql | php3-cgi-mysql | php4-mysql -Provides: phpgroupware-core-doc -Conflicts: phpgroupware-core-doc -Description: The phpGroupWare core module - This is the phpGroupWare core module. It provides the XMLRPC server, the SOAP - server, the wrapper for anonymous login and other core files. - -Package: phpgroupware -Architecture: all -Section: web -Depends: apache | httpd, php3-imap | php3-cgi-imap | php4-imap, phpgroupware-core (>= ${Source-Version}), phpgroupware-api (>= ${Source-Version}), phpgroupware-setup (>= ${Source-Version}), phpgroupware-admin (>= ${Source-Version}), phpgroupware-preferences (>= ${Source-Version}), debconf, wwwconfig-common -Recommends: php3-ldap | php3-cgi-ldap | php4-ldap -Suggests: slapd | ldap-server, postgresql | mysql-server, courier-imap | imap-server, libdbi-perl, phpgroupware-manual, phpgroupware-todo, phpgroupware-notes, phpgroupware-email, phpgroupware-nntp, phpgroupware-calendar, phpgroupware-addressbook -Conflicts: phpgroupware-doc, phpgroupware-unstable-apps, phpgroupware-transy -Description: Web based GroupWare system written in PHP - phpGroupWare is a web based GroupWare system. It comes with several core - apps for email, calendar, todo list, address book, file manager, and a - notepad. It also provides a framework for add-on modules to integrate - seamlessly in phpGroupWare. Some samples are a bookmark manager, a trouble - ticket system, a weather reporter, a phone log, a chat program, and a forum - system. There are many more in development, and you can develop your own as - well. - . - You should use it if you would like a powerful groupware system that can be - access from anywhere on the Internet, and allows for custom add-ons. For - companies with a distributed user base, it's an ideal solution. Oh, and did I - mention that its FREE? diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 900148502e..0000000000 --- a/debian/copyright +++ /dev/null @@ -1,15 +0,0 @@ -This package was debianized by Luca - De Whiskey's - De Vitis on -Sat, 29 Jun 2002 17:13:40 +0200 - -It was downloaded from the CVS repository at subversion.gnu.org. Try: -prompt$ CVSROOT=:pserver:anoncvs@subversions.gnu.org:/cvsroot/phpgroupware -prompt$ CVS_RSH=ssh -prompt$ cvs login -prompt$ cvs get all packages - -Upstream Author(s): -Please, see credits.txt, the README file or visit http://apps.phpgroupware.org/ - -Copyright: -A copy of the GNU General Public License, version 2, can be found in -/usr/share/common-licenses/GPL . diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 84c14f97d9..0000000000 --- a/debian/rules +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 by Joey Hess. -# -# This version is for a hypothetical package that builds an -# architecture-dependant package, as well as an architecture-independent -# package. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# This is the debhelper compatability version to use. -export DH_COMPAT=3 - -APP = core -PACKAGE = debian/phpgroupware-$(APP)/usr/share/phpgroupware/ -PACKAGEDOC = debian/phpgroupware-$(APP)/usr/share/doc/phpgroupware-$(APP) - -COPYRIGHT = -iname copyright\* -or -iname license -CHANGELOG = -iname change\* -INSTALL = -iname install -FINDOPT = -type f -not \( -path \*CVS\* -or -path \*debian\* -or -name .cvsignore \) -SPECIAL = -size 0 -or $(INSTALL) -or $(CHANGELOG) -or $(COPYRIGHT) -or -name \*.sgml -STAMPS = -name configure-stamp -or -name build-stamp -APPFILES = -not \( -path \*doc\* -or -path \. -or -name '*.pl' -or -name '*.py' -or $(STAMPS) \) -DOCFILES = -not \( $(SPECIAL) \) - -configure: configure-stamp -configure-stamp: - dh_testdir - # No configuration needed. - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - # Here should go the commands necessary to build the sgml documentation... - touch build-stamp - -clean: - dh_testdir - rm -f build-stamp configure-stamp - rm -f debian/.builded - rm -f debian/files - # Here should go the commands to clean the builded sgml documents. - dh_clean - -install: build - dh_installdirs - dh_testdir - - # Install $(APP) files in $(PACKAGE) - find $(FINDOPT) $(APPFILES) \ - -exec install -D --mode=644 {} $(PACKAGE)/{} \; - - # Install $(APP) doc files in $(PACKAGEDOC) - cd doc ;\ - find $(FINDOPT) $(DOCFILES) \ - -exec install -D --mode=644 {} ../$(PACKAGEDOC)/{} \; - - install --mode=644 debian/etc/apache.conf \ - debian/phpgroupware/etc/phpgroupware - -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs doc/CHANGELOG - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb | tee debian/.builded - -binary: binary-indep -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/doc/copyright.gpl b/doc/LICENSE similarity index 100% rename from doc/copyright.gpl rename to doc/LICENSE diff --git a/doc/cvs_full_checkout.php b/doc/cvs_full_checkout.php index 2a66336e64..6cf7253896 100755 --- a/doc/cvs_full_checkout.php +++ b/doc/cvs_full_checkout.php @@ -28,76 +28,65 @@ // Modules you want to checkout, do NOT add the phpgroupware module - $co_modules[] = array - ( - 'addbook', - 'addressbook', - 'admin', - 'backup', - 'bookkeeping', - 'bookmarks', - 'brewer', - 'calendar', - 'cart', - 'ccs', - 'cdb', - 'chat', - 'chora', - 'comic', - 'cron', - 'developer_tools', - 'dj', - 'eldaptir', - 'email', - 'etemplate', - 'felamimail' - 'filemanager', - 'forum'; - 'ftp', - 'headlines', - 'hr', - 'img', - 'infolog', - 'inv', - 'manual', - 'mediadb', - 'meerkat', - 'messenger', - 'napster', - 'netsaint', - 'news_admin', - 'nntp', - 'notes', - 'packages', - 'phonelog', - 'phpGWShell_Win32_VB', - 'phpgwapi', - 'phpgwnetsaint', - 'phpsysinfo', - 'polls', - 'preferences', - 'projects', - 'property' - 'qmailldap', - 'rbs', - 'registration', - 'setup', - 'sitemgr' - 'skel', - 'soap', - 'squirrelmail', - 'stocks', - 'syncml-server', - 'timetrack', - 'todo', - 'transy', - 'tts', - 'vmailmgr', - 'wap', - 'wcm', - 'weather', - 'xmlrpc' - ); + $co_modules[] = 'addressbook'; + $co_modules[] = 'admin'; + $co_modules[] = 'backup'; + $co_modules[] = 'bookkeeping'; + $co_modules[] = 'bookmarks'; + $co_modules[] = 'brewer'; + $co_modules[] = 'calendar'; + $co_modules[] = 'cart'; + $co_modules[] = 'ccs'; + $co_modules[] = 'cdb'; + $co_modules[] = 'chat'; + $co_modules[] = 'chora'; + $co_modules[] = 'comic'; + $co_modules[] = 'cron'; + $co_modules[] = 'developer_tools'; + $co_modules[] = 'dj'; + $co_modules[] = 'eldaptir'; + $co_modules[] = 'email'; + $co_modules[] = 'filemanager'; + $co_modules[] = 'forum'; + $co_modules[] = 'ftp'; + $co_modules[] = 'headlines'; + $co_modules[] = 'hr'; + $co_modules[] = 'infolog'; + $co_modules[] = 'inv'; + $co_modules[] = 'manual'; + $co_modules[] = 'mediadb'; + $co_modules[] = 'meerkat'; + $co_modules[] = 'messenger'; + $co_modules[] = 'napster'; + $co_modules[] = 'netsaint'; + $co_modules[] = 'news_admin'; + $co_modules[] = 'nntp'; + $co_modules[] = 'notes'; + $co_modules[] = 'phonelog'; + $co_modules[] = 'phpGWShell_Win32_VB'; + $co_modules[] = 'phpgwapi'; + $co_modules[] = 'phpgwnetsaint'; + $co_modules[] = 'phpsysinfo'; + $co_modules[] = 'phpwebhosting'; + $co_modules[] = 'polls'; + $co_modules[] = 'preferences'; + $co_modules[] = 'projects'; + $co_modules[] = 'qmailldap'; + $co_modules[] = 'rbs'; + $co_modules[] = 'setup'; + $co_modules[] = 'skel'; + $co_modules[] = 'soap'; + $co_modules[] = 'squirrelmail'; + $co_modules[] = 'stocks'; + $co_modules[] = 'syncml-server'; + $co_modules[] = 'timetrack'; + $co_modules[] = 'todo'; + $co_modules[] = 'transy'; + $co_modules[] = 'tts'; + $co_modules[] = 'wap'; + $co_modules[] = 'wcm'; + $co_modules[] = 'weather'; + $co_modules[] = 'xmlrpc'; // -- End config section diff --git a/doc/cvs_full_checkout.pl b/doc/cvs_full_checkout.pl index 7bcd3766bd..ba9cd55607 100755 --- a/doc/cvs_full_checkout.pl +++ b/doc/cvs_full_checkout.pl @@ -65,6 +65,7 @@ 'phpgwapi', 'phpgwnetsaint', 'phpsysinfo', + 'phpwebhosting', 'polls', 'preferences', 'projects', diff --git a/doc/inlinedocparser.php b/doc/inlinedocparser.php index ef4de55c2f..7cbbac8d83 100755 --- a/doc/inlinedocparser.php +++ b/doc/inlinedocparser.php @@ -53,7 +53,7 @@ */ function parseobject($input) { - $types = array('abstract','param','example','syntax','result','description','discussion','author','copyright','package','access','required','optional'); + $types = array('abstract','param','example','syntax','result','description','discussion','author','copyright','package','access'); $new = explode("@",$input); while (list($x,$y) = each($new)) { @@ -83,7 +83,7 @@ } } } - + if ($GLOBALS['object_type'].' '.$GLOBALS['HTTP_GET_VARS']['object'] == $t) { $GLOBALS['special_request'] = $output[$t]; @@ -100,7 +100,8 @@ */ function parsesimpleobject($input) { - $types = array('abstract','param','example','syntax','result','description','discussion','author','copyright','package','access','required','optional'); + + $types = array('abstract','param','example','syntax','result','description','discussion','author','copyright','package','access'); $input = ereg_replace ("@", "@#", $input); $new = explode("@",$input); if (count($new) < 3) @@ -148,18 +149,6 @@ * limiting and selecting what to print * \**************************************************************************/ - /* Prevents passing files[]=../../../secret_file or files[]=/etc/passwd */ - if (is_array($GLOBALS['files'])) - { - while (list($p, $fn) = each ($GLOBALS['files'])) - { - if (ereg('\.\.', $fn) || ereg('^/', $fn)) - { - unset($GLOBALS['files'][$p]); - } - } - } - if (!isset($GLOBALS['HTTP_GET_VARS']['object_type'])) { $GLOBALS['object_type'] = 'function'; @@ -168,7 +157,7 @@ { $GLOBALS['object_type'] = $GLOBALS['HTTP_GET_VARS']['object_type']; } - + $app = $GLOBALS['HTTP_GET_VARS']['app']; $fn = $GLOBALS['HTTP_GET_VARS']['fn']; @@ -293,7 +282,7 @@ unset($sstype); unset($idx); reset($startstop); - + /**************************************************************************\ * Now that I have the list groups and which records belong in which groups * * its time to parse each function and stick it under the appropriate group * @@ -303,7 +292,6 @@ while (list($key,$val) = each($matches)) { preg_match_all("#@(.*)$#sUi",$val[1],$data); - $data[1][0] = ereg_replace ("\n([[:space:]]+)\*", "\n\\1", $data[1][0]); $data[1][0] = ereg_replace ("@", "@#", $data[1][0]); $returndata = parseobject($data[1][0], $fn); if ($startstop[$key] == 'some_lame_string_that_wont_be_used_by_a_function') @@ -452,6 +440,7 @@ } } + $GLOBALS['template']->fp('doc','border_top',True); reset($doc_array); while(list($group_key, $group_value) = each($doc_array)) @@ -472,7 +461,7 @@ } if(is_array($object_value)) { - parsedetails($object_value); + parsedetails($object_value); $GLOBALS['template']->set_var('generic_name',$docline_key); $GLOBALS['template']->set_var('generic_value',$docline_value[0]); $GLOBALS['template']->fp('group_contents','object',True); diff --git a/doc/rpm-build/build-phpgw-rpms b/doc/rpm-build/build-phpgw-rpms new file mode 100644 index 0000000000..b0606caa74 --- /dev/null +++ b/doc/rpm-build/build-phpgw-rpms @@ -0,0 +1,73 @@ +#! /bin/bash +# This script work for generating rpms without Root rights +# When you create rmp's with Root rights and you have as example +# the follow command rm -rf / in your script you are in trouble :-) +# +# Change the path names for ANONCVSDIR and RHBASE to you needs. +# +# When you would create daily rpm's with update from CVS include +# delete the # sign at the start from the follow lines +# +# cd $ANONCVSDIR +# cvs update -Pd +# This scipt create auotmaticly signed rpm's +# When you don't want signed rpm's change the follow line from +# +# rpmbuild -bb --sign phpgroupware-rh.spec >> $LOGFILE 2>&1 +# +# to +# rpmbuild -bb phpgroupware-rh.spec >> $LOGFILE 2>&1 +# +# in the sript +# How to create GPG keys to sign your rpm's you will found in a seperate +# Document +# +# Script changed 2003 Jul 06 Reiner Jung + +VERSION=`grep "%define version" phpgroupware-rh.spec | cut -f3 -d' '` +HOMEBUILDDIR=`whoami` +ANONCVSDIR=/build_root/phpgroupware_stable/phpgroupware +RHBASE=/home/$HOMEBUILDDIR/redhat +SRCDIR=$RHBASE/SOURCES +SPECDIR=$RHBASE/SPECS +LOGFILE=$SPECDIR/build-$VERSION.log +MD5SUM=$SRCDIR/md5sum-$VERSION.txt + +echo "Start Build Process of - $VERSION" > $LOGFILE +echo "---------------------------------------" >> $LOGFILE 2>&1 +date >> $LOGFILE 2>&1 +cd $ANONCVSDIR +cvs update -dP >> $LOGFILE 2>&1 +cd $ANONCVSDIR/.. +tar czvf $SRCDIR/phpgroupware-$VERSION.tar.gz phpgroupware >> $LOGFILE 2>&1 +tar cjvf $SRCDIR/phpgroupware-$VERSION.tar.bz2 phpgroupware >> $LOGFILE 2>&1 +zip -r -9 $SRCDIR/phpgroupware-$VERSION.zip phpgroupware >> $LOGFILE 2>&1 +echo "End Build Process of tar.gz, tar.bz, zip" >> $LOGFILE 2>&1 +echo "---------------------------------------" >> $LOGFILE 2>&1 +echo "Create the md5sum file for tar.gz, tar.bz, zip" >> $LOGFILE 2>&1 +echo "md5sum from file phpgroupware-$VERSION.tar.gz is:" > $MD5SUM +md5sum $SRCDIR/phpgroupware-$VERSION.tar.gz | cut -f1 -d' ' >> $MD5SUM 2>&1 +echo "---------------------------------------" >> $MD5SUM 2>&1 +echo " " >> $MD5SUM 2>&1 +echo "md5sum from file phpgroupware-$VERSION.tar.bz2 is:" >> $MD5SUM 2>&1 +md5sum $SRCDIR/phpgroupware-$VERSION.tar.bz2 | cut -f1 -d' '>> $MD5SUM 2>&1 +echo "---------------------------------------" >> $MD5SUM 2>&1 +echo " " >> $MD5SUM 2>&1 +echo "md5sum from file phpgroupware-$VERSION.zip is:" >> $MD5SUM 2>&1 +md5sum $SRCDIR/phpgroupware-$VERSION.zip | cut -f1 -d' ' >> $MD5SUM 2>&1 +echo "End Build md5sum of tar.gz, tar.bz, zip" >> $LOGFILE 2>&1 +echo "---------------------------------------" >> $LOGFILE 2>&1 +echo "Build signed source files" >> $LOGFILE 2>&1 +gpg -s $SRCDIR/phpgroupware-$VERSION.tar.gz >> $LOGFILE 2>&1 +gpg -s $SRCDIR/phpgroupware-$VERSION.tar.bz2 >> $LOGFILE 2>&1 +gpg -s $SRCDIR/phpgroupware-$VERSION.zip >> $LOGFILE 2>&1 +echo "End build of signed of tar.gz, tar.bz, zip" >> $LOGFILE 2>&1 +echo "---------------------------------------" >> $LOGFILE 2>&1 +cd $SPECDIR +rpmbuild -ba --sign phpgroupware-rh.spec >> $LOGFILE 2>&1 +echo "End Build Process of - $VERSION single packages" >> $LOGFILE 2>&1 +echo "---------------------------------------" >> $LOGFILE 2>&1 +rpmbuild -ba --sign phpgroupware-rh-allapp.spec >> $LOGFILE 2>&1 +echo "End Build Process of - $VERSION all applications" >> $LOGFILE 2>&1 +echo "---------------------------------------" >> $LOGFILE 2>&1 + diff --git a/doc/rpm-build/phpgroupware-rh-allapp.spec b/doc/rpm-build/phpgroupware-rh-allapp.spec new file mode 100644 index 0000000000..78f3db70bc --- /dev/null +++ b/doc/rpm-build/phpgroupware-rh-allapp.spec @@ -0,0 +1,166 @@ +%define packagename phpGroupWare-all-apps +%define phpgwdirname phpgroupware +%define version 0.9.14.508 +%define packaging 1 +%define httpdroot /var/www/html + +Summary: phpGroupWare is a web-based groupware suite written in php. +Name: %{packagename} +Version: %{version} +Release: %{packaging} +Copyright: GPL +Group: Web/Database +URL: http://www.phpgroupware.org/ +Source: phpgroupware-%{version}.tar.bz2 +BuildRoot: /tmp/%{packagename}-buildroot +Prefix: %{httpdroot} +Vendor: phpGroupWare +Packager: phpGroupWare +Buildarch: noarch +AutoReqProv: no +Requires: php >= 4.0.6 +%description +phpGroupWare is a web-based groupware suite written in PHP. This package provides: + +phpgroupware core app, addressbook, backup, bookmark, brewer, calendar, chat, chora (view cvs repository), comic, developer_tools, dj, doc, eldaptir, email, felamimail, forum, ftp, headlines hr (human resources), +img (image editor), infolog (CRM), inv (inventory application), manual, meerkat (example XML-RPC application), messenger (internel message app), netsaint (configuration tool for netsaint network monitor), news_admin, nntp, phonelog, phpsysinfo, polls, projects (advanced project management), qmailldap, registration, sitemgr (web content manager), skel, soap, stocks, timetrack, todo, xmlrpc. + +It also provides an API for developing additional applications. See the phpgroupware +apps project for add-on apps. + +%prep +%setup -n %{phpgwdirname} + +%build +# no build required + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname} +cp -aRf * $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname} +#mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname}/files/home +#mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname}/files/groups +#mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname}/files/users + + +%clean +rm -rf $RPM_BUILD_ROOT + +%post + +%postun + +%files +#%attr(0770,apache,apache) %{prefix}/%{phpgwdirname}/files/groups +#%attr(0770,apache,apache) %{prefix}/%{phpgwdirname}/files/users +#%attr(0770,apache,apache) %{prefix}/%{phpgwdirname}/files/home +%defattr(-,root,root) +%dir %{prefix}/%{phpgwdirname} +%{prefix}/%{phpgwdirname}/home.php +%{prefix}/%{phpgwdirname}/about.php +%{prefix}/%{phpgwdirname}/anon_wrapper.php +%{prefix}/%{phpgwdirname}/notify.php +%{prefix}/%{phpgwdirname}/notify_simple.php +%{prefix}/%{phpgwdirname}/redirect.php +%{prefix}/%{phpgwdirname}/set_box.php +%{prefix}/%{phpgwdirname}/header.inc.php.template +%{prefix}/%{phpgwdirname}/version.inc.php +%{prefix}/%{phpgwdirname}/index.php +%{prefix}/%{phpgwdirname}/login.php +%{prefix}/%{phpgwdirname}/logout.php +%{prefix}/%{phpgwdirname}/CVS +%{prefix}/%{phpgwdirname}/doc +%{prefix}/%{phpgwdirname}/phpgwapi +%{prefix}/%{phpgwdirname}/admin +%{prefix}/%{phpgwdirname}/preferences +%{prefix}/%{phpgwdirname}/setup +#%{prefix}/%{phpgwdirname}/files +%{prefix}/%{phpgwdirname}/addressbook +%{prefix}/%{phpgwdirname}/backup +%{prefix}/%{phpgwdirname}/bookmarks +%{prefix}/%{phpgwdirname}/brewer +%{prefix}/%{phpgwdirname}/calendar +%{prefix}/%{phpgwdirname}/chat +%{prefix}/%{phpgwdirname}/chora +%{prefix}/%{phpgwdirname}/comic +%{prefix}/%{phpgwdirname}/developer_tools +%{prefix}/%{phpgwdirname}/dj +%{prefix}/%{phpgwdirname}/eldaptir +%{prefix}/%{phpgwdirname}/email +%{prefix}/%{phpgwdirname}/etemplate +%{prefix}/%{phpgwdirname}/felamimail +%{prefix}/%{phpgwdirname}/filemanager +%{prefix}/%{phpgwdirname}/forum +%{prefix}/%{phpgwdirname}/ftp +%{prefix}/%{phpgwdirname}/headlines +%{prefix}/%{phpgwdirname}/hr +%{prefix}/%{phpgwdirname}/img +%{prefix}/%{phpgwdirname}/infolog +%{prefix}/%{phpgwdirname}/inv +%{prefix}/%{phpgwdirname}/manual +%{prefix}/%{phpgwdirname}/meerkat +%{prefix}/%{phpgwdirname}/messenger +%{prefix}/%{phpgwdirname}/netsaint +%{prefix}/%{phpgwdirname}/news_admin +%{prefix}/%{phpgwdirname}/nntp +%{prefix}/%{phpgwdirname}/notes +%{prefix}/%{phpgwdirname}/phpbrain +%{prefix}/%{phpgwdirname}/phonelog +%{prefix}/%{phpgwdirname}/phpsysinfo +%{prefix}/%{phpgwdirname}/polls +%{prefix}/%{phpgwdirname}/projects +%{prefix}/%{phpgwdirname}/property +%{prefix}/%{phpgwdirname}/qmailldap +%{prefix}/%{phpgwdirname}/registration +%{prefix}/%{phpgwdirname}/sitemgr +%{prefix}/%{phpgwdirname}/skel +%{prefix}/%{phpgwdirname}/soap.php +%{prefix}/%{phpgwdirname}/soap +%{prefix}/%{phpgwdirname}/stocks +%{prefix}/%{phpgwdirname}/timetrack +%{prefix}/%{phpgwdirname}/todo +%{prefix}/%{phpgwdirname}/tts +%{prefix}/%{phpgwdirname}/wiki +%{prefix}/%{phpgwdirname}/xmlrpc.php +%{prefix}/%{phpgwdirname}/xmlrpc + +%changelog +* Sat Jul 05 2003 Reiner Jung 0.9.14.005 +- fix a typo error in the 005 packages. + +* Sat Jul 05 2003 Reiner Jung 0.9.14.005 +- security release update for users from php3. + +* Thu Jul 03 2003 Reiner Jung 0.9.14.004 +- Security Release for phpGroupWare. +- bugfix for XSS exploit +- Vfs move out of the webserver Root + +* Fri Apr 18 2003 Reiner Jung 0.9.14.003 +- RPM depecies bug fixed +- calendar, day view fixed display prob. +- bookmarks,img,inv,netsaint no labels in ACL +- loging in or calling the welcome page displays a "available Memory exhausted" error fixed +- postgreSql and language Setup + +* Fri Mar 28 2003 Reiner Jung 0.9.14.002 +- Bufix for user management + +* Sun Mar 23 2003 Reiner Jung 0.9.14.002 +- bugfix release + +* Sat Dec 28 2002 Reiner Jung 0.9.14.001 +- Build from first all application based rpm +- This is the bugfix release of phpGroupWare +- Packackes LSB compliant. Not tested on United Linux (SuSE, SCO ..). +- Add depencies to the rpm packages +- Include package admin, setup,phpgwapi and preferences to the base package +- rpm change to install folder /var/www/html for RedHat install +- Apache 2 support +- Ported Anglemail back as the default email app +- Improved LDAP support +- Added additional translations +- Offical added sitemgr to the .14 branch with multilingual support +- Various fixes for most apps + +# end of file diff --git a/doc/rpm-build/phpgroupware-rh.spec b/doc/rpm-build/phpgroupware-rh.spec new file mode 100644 index 0000000000..a93b9696a8 --- /dev/null +++ b/doc/rpm-build/phpgroupware-rh.spec @@ -0,0 +1,777 @@ +%define packagename phpGroupWare +%define phpgwdirname phpgroupware +%define version 0.9.14.508 +%define packaging 1 +%define httpdroot /var/www/html + +%define addressbook addressbook +%define admin admin +%define backup backup +%define bookmarks bookmarks +%define brewer brewer +%define calendar calendar +%define cart cart +%define chat chat +%define chora chora +%define comic comic +%define developer_tools developer_tools +%define discjockey dj +%define docs doc +%define eldaptir eldaptir +%define email email +%define felamimail felamimail +%define etemplate etemplate +%define filemanager filemanager +%define forum forum +%define ftp ftp +%define headlines headlines +%define human_resources hr +%define img img +%define infolog infolog +%define inv inv +%define manual manual +%define meerkat meerkat +%define messenger messenger +%define netsaint netsaint +%define news_admin news_admin +%define nntp nntp +%define notes notes +%define phonelog phonelog +%define phpbrain phpbrain +%define phpgwapi phpgwapi +%define phpsysinfo phpsysinfo +%define polls polls +%define preferences preferences +%define projects projects +%define property property +%define qmailldap qmailldap +%define registration registration +%define setup_module setup +%define sitemgr sitemgr +%define skel skel +%define soap soap +%define stocks stocks +%define timetrack timetrack +%define todo todo +%define tts tts +%define wap wap +%define wcm wcm +%define weather weather +%define wiki wiki +%define xmlrpc xmlrpc + +Summary: phpGroupWare is a web-based groupware suite written in php. +Name: %{packagename} +Version: %{version} +Release: %{packaging} +Copyright: GPL +Group: Web/Database +URL: http://www.phpgroupware.org/ +Source: phpgroupware-%{version}.tar.bz2 +BuildRoot: /tmp/%{packagename}-buildroot +Prefix: %{httpdroot} +Vendor: phpGroupWare +Packager: phpGroupWare +Buildarch: noarch +AutoReqProv: no +Requires: php >= 4.0.6 +%description +phpGroupWare is a web-based groupware suite written in PHP. +The core package provides the admin, setup, phpgwapi and preferences +packages. It also provides an API for developing additional applications. +See the phpgroupware apps project for add-on apps. + +%package %{addressbook} +Summary: The phpGroupWare %{addressbook} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{addressbook} +Contact manager with Vcard support. +%{addressbook} is the phpgroupware default contact application. +It makes use of the phpgroupware contacts class to store and retrieve +contact information via SQL or LDAP. + +%package %{backup} +Summary: The phpGroupWare %{backup} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{backup} +An online configurable backup app to store data offline. +Can store files in zip, tar.gz and tar.bz2 on the local machine +or Remote via FTP, SMBMOUNT or NFS + +%package %{bookmarks} +Summary: The phpGroupWare %{bookmarks} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{bookmarks} +Manage your bookmarks with phpGW. Has Netscape plugin. + +%package %{brewer} +Summary: The phpGroupWare %{brewer} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{brewer} +Manages your home-brew recipes. + +%package %{calendar} +Summary: The phpGroupWare %{calendar} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{calendar} +Powerful calendar with meeting request system, ICal and E-Mail support, +and ACL security. + +%package %{chat} +Summary: The phpGroupWare %{chat} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{chat} +This is the %{chat} app for phpGroupWare. + +%package %{chora} +Summary: The phpGroupWare %{chora} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{chora} +This is the %{chora} app for phpGroupWare. + +%package %{comic} +Summary: The phpGroupWare %{comic} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{comic} +This application display comic strips. + +%package %{developer_tools} +Summary: The phpGroupWare %{developer_tools} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{developer_tools} +The TranslationTools allow to create and extend translations-files for phpGroupWare. They can search the sources for new / added phrases and show you the ones missing in your language. + +%package %{discjockey} +Summary: The phpGroupWare %{discjockey} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{discjockey} +This is the %{discjockey} app for phpGroupWare. + +%package %{docs} +Summary: The phpGroupWare %{docs} +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{docs} +This is the %{docs} for phpGroupWare. + +%package %{eldaptir} +Summary: The phpGroupWare %{eldaptir} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{eldaptir} +This is the LDAP browser application for phpGroupWare. + +%package %{email} +Summary: The phpGroupWare %{email} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{email} +AngleMail for phpGroupWare at www.anglemail.org is an Email reader with multiple accounts and mailbox filtering. . + +%package %{etemplate} +Summary: The phpGroupWare %{etempalte} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{etemplate} +eTemplates are a new widget-based template system for phpGroupWare with an interactive editor and a database table-editor (creates tables_current.inc.php and updates automaticaly tables_update.inc.php) + +%package %{felamimail} +Summary: The phpGroupWare %{felamimail} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{felamimail} +This is the %{felamimail} app for phpGroupWare. + +%package %{filemanager} +Summary: The phpGroupWare %{filemanager} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{filemanager} +This is the %{filemanager} app for phpGroupWare. + +%package %{forum} +Summary: The phpGroupWare %{forum} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{forum} +This is the %{forum} app for phpGroupWare. + +%package %{ftp} +Summary: The phpGroupWare %{ftp} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{ftp} +This is the %{ftp} app for phpGroupWare. + +%package %{headlines} +Summary: The phpGroupWare %{headlines} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{headlines} +This is the %{headlines} app for phpGroupWare. + +%package %{human_resources} +Summary: The phpGroupWare %{human_resources} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{human_resources} +This is the %{human_resources} app for phpGroupWare. + +%package %{img} +Summary: The phpGroupWare %{img} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, gd +%description %{img} +This is the %{img} app for phpGroupWare. + +%package %{infolog} +Summary: The phpGroupWare %{infolog} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{infolog} +This is the %{infolog} app for phpGroupWare. + +%package %{inv} +Summary: The phpGroupWare %{inv} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{inv} +This is the %{inv} app for phpGroupWare. + +%package %{manual} +Summary: The phpGroupWare %{manual} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{manual} +This is the %{manual} app for phpGroupWare. + +%package %{meerkat} +Summary: The phpGroupWare %{meerkat} application +Group: Web/Database +AutoReqProv: no +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{meerkat} +This is the %{meerkat} app for phpGroupWare. + +%package %{messenger} +Summary: The phpGroupWare %{messenger} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{messenger} +This is the %{messenger} app for phpGroupWare. + +%package %{netsaint} +Summary: The phpGroupWare %{netsaint} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{netsaint} +This is the %{netsaint} app for phpGroupWare. + +%package %{news_admin} +Summary: The phpGroupWare %{news_admin} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{news_admin} +This is the %{news_admin} app for phpGroupWare. + +%package %{nntp} +Summary: The phpGroupWare %{nntp} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{nntp} +This is the %{nntp} app for phpGroupWare. + +%package %{notes} +Summary: The phpGroupWare %{notes} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{notes} +This is the %{notes} app for phpGroupWare. + +%package %{phonelog} +Summary: The phpGroupWare %{phonelog} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{phonelog} +This is the %{phonelog} app for phpGroupWare. + +%package %{phpbrain} +Summary: The phpGroupWare %{phpbrain} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{phpbrain} +This is the %{phpbrain} app for phpGroupWare. + +%package %{phpsysinfo} +Summary: The phpGroupWare %{phpsysinfo} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{phpsysinfo} +This is the cire %{phpsysinfo} of phpGroupWare. + +%package %{polls} +Summary: The phpGroupWare %{polls} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{polls} +This is the %{polls} app for phpGroupWare. + +%package %{projects} +Summary: The phpGroupWare %{projects} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{projects} +This is the %{projects} app for phpGroupWare. + +%package %{property} +Summary: The phpGroupWare %{property} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{property} +This is the %{property} app for phpGroupWare. + +%package %{qmailldap} +Summary: The phpGroupWare %{qmailldap} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{qmailldap} +This is the %{qmailldap} app for phpGroupWare. + +%package %{registration} +Summary: The phpGroupWare %{registration} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{registration} +This is the %{registration} app for phpGroupWare. + +%package %{sitemgr} +Summary: The phpGroupWare %{sitemgr} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{sitemgr} +This is the %{sitemgr} app for phpGroupWare. + +%package %{skel} +Summary: The phpGroupWare %{skel} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-email = %{version}-%{packaging} +%description %{skel} +This is the %{skel} app for phpGroupWare. + +%package %{soap} +Summary: The phpGroupWare %{soap} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{soap} +This is the %{soap} app for phpGroupWare. + +%package %{stocks} +Summary: The phpGroupWare %{stocks} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{stocks} +This is the %{stocks} app for phpGroupWare. + +%package %{timetrack} +Summary: The phpGroupWare %{timetrack} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{timetrack} +This is the %{timetrack} app for phpGroupWare. + +%package %{todo} +Summary: The phpGroupWare %{todo} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{todo} +This is the %{todo} app for phpGroupWare. + +%package %{tts} +Summary: The phpGroupWare %{tts} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{tts} +This is the %{tts} app for phpGroupWare. + + +%package %{wiki} +Summary: The phpGroupWare %{wiki} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging}, phpGroupWare-addressbook = %{version}-%{packaging} +%description %{wiki} +This is the %{wiki} app for phpGroupWare. + +%package %{xmlrpc} +Summary: The phpGroupWare %{xmlrpc} application +Group: Web/Database +AutoReqProv: no +Requires: phpGroupWare = %{version}-%{packaging} +%description %{xmlrpc} +This is the %{xmlrpc} app for phpGroupWare. + +%prep +%setup -n %{phpgwdirname} + +%build +# no build required + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname} +cp -aRf * $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname} +#mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname}/files/home +#mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname}/files/groups +#mkdir -p $RPM_BUILD_ROOT%{prefix}/%{phpgwdirname}/files/users + +%clean +rm -rf $RPM_BUILD_ROOT + +%post + +%postun + +%files +#%attr(0770,apache,apache) %{prefix}/%{phpgwdirname}/files/groups +#%attr(0770,apache,apache) %{prefix}/%{phpgwdirname}/files/users +#%attr(0770,apache,apache) %{prefix}/%{phpgwdirname}/files/home +%defattr(-,root,root) +%dir %{prefix}/%{phpgwdirname} +%{prefix}/%{phpgwdirname}/home.php +%{prefix}/%{phpgwdirname}/about.php +%{prefix}/%{phpgwdirname}/anon_wrapper.php +%{prefix}/%{phpgwdirname}/notify.php +%{prefix}/%{phpgwdirname}/notify_simple.php +%{prefix}/%{phpgwdirname}/redirect.php +%{prefix}/%{phpgwdirname}/set_box.php +%{prefix}/%{phpgwdirname}/header.inc.php.template +%{prefix}/%{phpgwdirname}/version.inc.php +%{prefix}/%{phpgwdirname}/index.php +%{prefix}/%{phpgwdirname}/login.php +%{prefix}/%{phpgwdirname}/logout.php +%{prefix}/%{phpgwdirname}/CVS +%{prefix}/%{phpgwdirname}/doc +%{prefix}/%{phpgwdirname}/phpgwapi +%{prefix}/%{phpgwdirname}/admin +%{prefix}/%{phpgwdirname}/preferences +%{prefix}/%{phpgwdirname}/setup +#%{prefix}/%{phpgwdirname}/files + +%files %{addressbook} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{addressbook} + +%files %{backup} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{backup} + +%files %{bookmarks} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{bookmarks} + +%files %{brewer} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{brewer} + +%files %{calendar} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{calendar} + +%files %{chat} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{chat} + +%files %{chora} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{chora} + +%files %{comic} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{comic} + +%files %{developer_tools} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{developer_tools} + +%files %{discjockey} +%{prefix}/%{phpgwdirname}/%{discjockey} + +%files %{docs} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/phpgwapi/%{docs} + +%files %{eldaptir} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{eldaptir} + +%files %{email} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{email} + +%files %{etemplate} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{etemplate} + +%files %{felamimail} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{felamimail} + +%files %{filemanager} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{filemanager} + +%files %{forum} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{forum} + +%files %{ftp} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{ftp} + +%files %{headlines} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{headlines} + +%files %{human_resources} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{human_resources} + +%files %{img} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{img} + +%files %{infolog} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{infolog} + +%files %{inv} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{inv} + +%files %{manual} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{manual} + +%files %{meerkat} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{meerkat} + +%files %{messenger} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{messenger} + +%files %{netsaint} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{netsaint} + +%files %{news_admin} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{news_admin} + +%files %{nntp} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{nntp} + +%files %{notes} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{notes} + +%files %{phonelog} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{phonelog} + +%files %{phpbrain} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{phpbrain} + +%files %{phpsysinfo} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{phpsysinfo} + +%files %{polls} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{polls} + +%files %{projects} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{projects} + +%files %{property} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{property} + +%files %{qmailldap} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{qmailldap} + +%files %{registration} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{registration} + +%files %{sitemgr} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{sitemgr} + +%files %{skel} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{skel} + +%files %{soap} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/soap.php +%{prefix}/%{phpgwdirname}/%{soap} + +%files %{stocks} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{stocks} + +%files %{timetrack} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{timetrack} + +%files %{todo} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{todo} + +%files %{tts} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{tts} + +%files %{wiki} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/%{wiki} + +%files %{xmlrpc} +%defattr(-,root,root) +%{prefix}/%{phpgwdirname}/xmlrpc.php +%{prefix}/%{phpgwdirname}/%{xmlrpc} + +%changelog +* Sat Jul 05 2003 Reiner Jung 0.9.14.005 +- fix a typo error in the 005 packages. + +* Sat Jul 05 2003 Reiner Jung 0.9.14.005 +- security release update for users from php3. + +* Thu Jul 03 2003 Reiner Jung 0.9.14.004 +- Security Release for phpGroupWare. +- bugfix for XSS exploit +- Vfs move out of the webserver Root + +* Fri Apr 18 2003 Reiner Jung 0.9.14.003 +- RPM depecies bug fixed +- calendar, day view fixed display prob. +- bookmarks,img,inv,netsaint no labels in ACL +- loging in or calling the welcome page displays a "available Memory exhausted" error fixed +- postgreSql and language Setup + +* Fri Mar 28 2003 Reiner Jung 0.9.14.002 +- Bufix for user management + +* Sun Mar 23 2003 Reiner Jung 0.9.14.002 +- bugfix release + +* Fri Dec 27 2002 Reiner Jung 0.9.14.001 +- Packackes LSB compliant. Not tested on United Linux (SuSE, SCO ..). +- Add depencies to the rpm packages +- Include package admin, setup,phpgwapi and preferences to the base package + +* Fri Dec 20 2002 Reiner Jung 0.9.14.001 +- This is the bugfix release of phpGroupWare +- rpm change to install folder /var/www/html for RedHat install +- Apache 2 support +- Ported Anglemail back as the default email app +- Improved LDAP support +- Added additional translations +- Offical added sitemgr to the .14 branch with multilingual support +- Various fixes for most apps + +* Sun Aug 25 2002 Mark Peters 0.9.14.000 +- This is the official release of phpGroupWare 0.9.14.000 +* Fri Apr 14 2002 Mark Peters 0.9.14.RC3 +- Added the BLANK files to the files directory. +- Package relocation is more flexible. +- Added timetrack as a working app. + +* Sun Mar 03 2002 Mark Peters 0.9.14.RC2 + +* Fri Jan 13 2002 Mark Peters 0.9.14.RC1 + +* Fri Nov 16 2001 Mark Peters 0.9.12.001 +- Created subpackaging in the RPM spec file +- Upgraded to new 0.9.12.001 version. +- Reconfigured package name. +- Defined serial version numbers to allow subapps to have dependencies + +* Sat Jan 6 2001 Dan Kuykendall 0.9.9 +- Upgraded to new 0.9.8 version. +- Removed lots of unneeded code that was needed for the pre-beta versions. +- Added support for RedHat and Mandrake distro's. +- General clean up so that this can be reused by the project + +* Sat Sep 16 2000 Geoffrey Lee 09072000-2mdk +- Add url. +- turn off autorequires. +- use /var/www. + +* Wed Sep 13 2000 09072000-1mdk +- first rpm-zed distribution. +- cutom configuration files from Dan Kuykendall. +- suggestions on packaging from Dan. + +# end of file diff --git a/etemplate/doc/referenz.html b/etemplate/doc/referenz.html index b06440837b..d65dbb84df 100644 --- a/etemplate/doc/referenz.html +++ b/etemplate/doc/referenz.html @@ -320,7 +320,7 @@ implement only a subset of XUL. Here are the main differences:

Disabled
column-attr.
row-attr. disabled no -   + disabled Syntax: [!]{@name|value}[={@name2|value2}]
Disables (=dont show it) a row/column if a certain criteria is (not (=!)) meet.
@@ -345,6 +345,18 @@ implement only a subset of XUL. Here are the main differences:

or 'bottom' + + blurText + blur + no + blur + + This text get displayed if an input-field is empty and does not have the + input-focus (blur). It can be used to show a default value or a kind of help-text.
+ If it contains a text (eg. 'Search...'), this text is run through lang(), if it contains + a reference to the content array (eg. '@blur_text') it does not get translated. + + @@ -548,7 +560,9 @@ implement only a subset of XUL. Here are the main differences:

years from now or if > 100 a absolut year)
select-number:
Select a number out of a range specified by the options-field:
- ,{start (default=1)},{end (incl., default=10)},{decrement (default=1)}
+ ,{start (default=1)},{end (incl., default=10)},{decrement (default={padding zeros}1)}.
+ Example with padding zeros: options=',0,59,05' will give values: 00, 05, 10, ..., 55 + (like you would use it for minutes in a time-field)
select-app:
Select an application, availible options: ,{''=user enabled(default)|installed|all)} diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 24c80da23d..56065ce310 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -56,6 +56,10 @@ function boetemplate($name='',$load_via='') { $this->public_functions += array( + 'set_row_attribute' => True, + 'disable_row' => True, + 'set_column_attribute' => True, + 'disable_column' => True, 'disable_cells' => True, 'set_cell_attribute' => True, 'get_cell_attribute' => True, @@ -202,6 +206,87 @@ return $id; } + /*! + @functin appsession + @syntax appsession($location = 'default', $appname = '', $data = '##NOTHING##') + @abstract db-sessions appsession function + @note It is used to overcome the problem with overflowing php4-sessions + */ + function appsession($location = 'default', $appname = '', $data = '##NOTHING##') + { + // use the version from the sessions-class if we use db-sessions + // + if ($GLOBALS['phpgw_info']['server']['sessions_type'] == 'db') + { + return $GLOBALS['phpgw']->session->appsession($location,$appname,$data); + } + // if not, we use or own copy of the appsessions function + // setting these class vars to be compatible with the session-class + // + $this->sessionid = $GLOBALS['phpgw']->session->sessionid; + $this->account_id = $GLOBALS['phpgw']->session->account_id; + + if (! $appname) + { + $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; + } + + if ($data == '##NOTHING##') + { + $query = "SELECT content FROM phpgw_app_sessions WHERE" + ." sessionid='".$this->sessionid."' AND loginid='".$this->account_id."'" + ." AND app = '".$appname."' AND location='".$location."'"; + + $GLOBALS['phpgw']->db->query($query,__LINE__,__FILE__); + $GLOBALS['phpgw']->db->next_record(); + + // I added these into seperate steps for easier debugging + $data = $GLOBALS['phpgw']->db->f('content'); + // Changed by Skeeter 2001 Mar 04 0400Z + // This was not properly decoding structures saved into session data properly +// $data = $GLOBALS['phpgw']->common->decrypt($data); +// return stripslashes($data); + // Changed by milosch 2001 Dec 20 + // do not stripslashes here unless this proves to be a problem. + // Changed by milosch 2001 Dec 25 + /* do not decrypt and return if no data (decrypt returning garbage) */ + if($data) + { + $data = $GLOBALS['phpgw']->crypto->decrypt($data); +// echo 'appsession returning: '; _debug_array($data); + } + } + else + { + $GLOBALS['phpgw']->db->query("SELECT content FROM phpgw_app_sessions WHERE " + . "sessionid = '".$this->sessionid."' AND loginid = '".$this->account_id."'" + . " AND app = '".$appname."' AND location = '".$location."'",__LINE__,__FILE__); + + $encrypteddata = $GLOBALS['phpgw']->crypto->encrypt($data); + $encrypteddata = $GLOBALS['phpgw']->db->db_addslashes($encrypteddata); + + if ($GLOBALS['phpgw']->db->num_rows()==0) + { + $GLOBALS['phpgw']->db->query("INSERT INTO phpgw_app_sessions (sessionid,loginid,app,location,content,session_dla) " + . "VALUES ('".$this->sessionid."','".$this->account_id."','".$appname + . "','".$location."','".$encrypteddata."','" . time() . "')",__LINE__,__FILE__); + } + else + { + $GLOBALS['phpgw']->db->query("UPDATE phpgw_app_sessions SET content='".$encrypteddata."'" + . "WHERE sessionid = '".$this->sessionid."'" + . "AND loginid = '".$this->account_id."' AND app = '".$appname."'" + . "AND location = '".$location."'",__LINE__,__FILE__); + } + } + // we need to clean up not longer used records, else the db gets bigger and bigger + // + $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_app_sessions WHERE session_dla <= '" . (time() - $GLOBALS['phpgw_info']['server']['sessions_timeout']) + . "'",__LINE__,__FILE__); + + return $data; + } + /*! @function save_appsession @syntax save_appsession( $data,$id='' ) @@ -221,7 +306,7 @@ { $id = $this->appsession_id; } - $GLOBALS['phpgw']->session->appsession($id,'etemplate',$data); + $this/*GLOBALS['phpgw']->session*/->appsession($id,'etemplate',$data); return $id; } @@ -236,10 +321,14 @@ */ function get_appsession($id) { - $data = $GLOBALS['phpgw']->session->appsession($id,'etemplate'); + $data = $this/*GLOBALS['phpgw']->session*/->appsession($id,'etemplate'); //echo "

get_appsession('$id') data="; _debug_array($data); + // if we delete the returned value here, we cant get back (back-button), + // not even to a non-submitted page + //$GLOBALS['phpgw']->session->appsession_delete($id,'etemplate'); + return $data; } @@ -280,11 +369,10 @@ { //echo "

set_cell_attribute(tpl->name=$this->name, name='$name', attr='$attr',val='$val')

\n"; - reset($this->data); $n = 0; - while(list($row,$cols) = each($this->data)) + foreach($this->data as $row => $cols) { - while(list($col,$cell) = each($cols)) + foreach($cols as $col => $cell) { if ($cell['name'] == $name) { @@ -301,7 +389,6 @@ } } } - reset($this->data); return $n; } @@ -317,18 +404,63 @@ return $this->set_cell_attribute($name,'disabled',True); } + /*! + @function set_row_attributes + @syntax set_row_attibutes( $n,$height=0,$class=0,$valign=0,$disabled=0 ) + @author ralfbecker + @abstract set one or more attibutes for row $n + @param $n is numerical row-number starting with 1 (!) + @param $height in percent or pixel or '' for no height + @param $class name of css class (without the leading '.') or '' for no class + @param $valign alignment (top,middle,bottom) or '' for none + @param $disabled True or expression or False to disable or enable the row + @param Only the number 0 means dont change the attribute !!! + */ + function set_row_attributes($n,$height=0,$class=0,$valign=0,$disabled=0) + { + list($old_height,$old_disabled) = explode(',',$this->data[0]["h$n"]); + $disabled = $disabled !== 0 ? $disabled : $old_disabled; + $this->data[0]["h$n"] = ($height !== 0 ? $height : $old_height). + ($disabled ? ','.$disabled : ''); + list($old_class,$old_valign) = explode(',',$this->data[0]["c$n"]); + $valign = $valign !== 0 ? $valign : $old_valign; + $this->data[0]["c$n"] = ($class !== 0 ? $class : $old_class). + ($valign ? ','.$valign : ''); + } + /*! @function disable_row @syntax disable_row( $n,$enable=False ) @author ralfbecker @abstract disables row $n - @param $n is numerical row-number starting with 1 (!) + @param $n is numerical row-number starting with 1 (!) @param $enable can be used to re-enable a row if set to True */ function disable_row($n,$enable=False) { - list($height) = explode(',',$this->data[0]["h$n"]); - $this->data[0]["h$n"] = $height.($enable?'':',1'); + $this->set_row_attributes($n,0,0,0,!$enable); + } + + /*! + @function set_column_attributes + @syntax set_column_attibutes( $n,$width=0,$disabled=0 ) + @author ralfbecker + @abstract set one or more attibutes for column $c + @param $c is numerical column-number starting with 0 (!), or the char-code starting with 'A' + @param $width in percent or pixel or '' for no height + @param $disabled True or expression or False to disable or enable the column + @param Only the number 0 means dont change the attribute !!! + */ + function set_column_attributes($c,$width=0,$disabled=0) + { + if (is_numeric($c)) + { + $c = $this->num2chrs($c); + } + list($old_width,$old_disabled) = explode(',',$this->data[0][$c]); + $disabled = $disabled !== 0 ? $disabled : $old_disabled; + $this->data[0][$c] = ($width !== 0 ? $width : $old_width). + ($disabled ? ','.$disabled : ''); } /*! @@ -336,17 +468,12 @@ @syntax disable_column( $c,$enable=False ) @author ralfbecker @abstract disables column $c - @param $c is numerical column-number starting with 1 (!), or the char-code starting with 'A' + @param $c is numerical column-number starting with 0 (!), or the char-code starting with 'A' @param $enable can be used to re-enable a column if set to True */ function disable_column($c,$enable=False) { - if (is_numeric($c)) - { - $c = $this->num2chars($c); - } - list($height) = explode(',',$this->data[0][$c]); - $this->data[0][$c] = $height.($enable?'':',1'); + $this->set_column_attributes($c,0,!$enable); } /*! diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index cd868a1bbb..c6e13e8a46 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -134,8 +134,8 @@ 'i' => 'select-number' ); $opts = array( - 'H' => $this->timeformat == '12' ? ',0,12' : ',0,23', - 'i' => $value['i'] % 5 || $options & 4 ? ',0,59' : ',0,59,5' // 5min steps, if ok with value + 'H' => $this->timeformat == '12' ? ',0,12' : ',0,23,01', + 'i' => $value['i'] % 5 || $options & 4 ? ',0,59,01' : ',0,59,05' // 5min steps, if ok with value ); $help = array( 'Y' => 'Year', @@ -153,7 +153,7 @@ { $dcell['type'] = 'html'; $dcell['name'] = 'str'; - $value['str'] = $this->jscal->input($name.'[str]',False,$value['Y'],$value['m'],$value['d'],$cell['help']); + $value['str'] = $this->jscal->input($name.'[str]',False,$value['Y'],$value['m'],$value['d'],lang($cell['help'])); $n = 2; // no other fields $options &= ~2; // no set-today button // register us for process_exec @@ -164,7 +164,7 @@ $dcell['type'] = $types[$format[$n]]; $dcell['size'] = $opts[$format[$n]]; $dcell['name'] = $format[$n]; - $dcell['help'] = lang($help[$format[$n]]).': '.$cell['help']; // note: no lang on help, already done + $dcell['help'] = lang($help[$format[$n]]).': '.lang($cell['help']); // note: no lang on help, already done } if ($n == 4) { @@ -192,7 +192,7 @@ if ($n == 2 && $type == 'date-time') // insert some space between date+time { $dcell = $tpl->empty_cell(); - $dcell['type'] = 'label'; + $dcell['type'] = 'html'; $dcell['name'] = 'space'; $value['space'] = '     '; $dcell['no_lang'] = True; @@ -240,9 +240,13 @@ $value[$d] = date($d); } } - if (isset($value_in['str'])) + if (isset($value_in['str']) && !empty($value_in['str'])) { - $value = $this->jscal->input2date($value_in['str'],False,'d','m','Y'); + if (!is_array($value)) + { + $value = array(); + } + $value += $this->jscal->input2date($value_in['str'],False,'d','m','Y'); } if ($value['d'] || isset($value['H']) && $value['H'] !== '' || isset($value['i']) && $value['i'] !== '') diff --git a/etemplate/inc/class.html.inc.php b/etemplate/inc/class.html.inc.php index 17c8513a4f..9cd4c86ece 100644 --- a/etemplate/inc/class.html.inc.php +++ b/etemplate/inc/class.html.inc.php @@ -168,14 +168,16 @@ class html */ function link($url,$vars='') { + //echo "

html::link(url='$url',vars='"; print_r($vars); echo "')

\n"; if (!is_array($vars)) { - $vars = explode('&',$vars); + parse_str($vars,$vars); } list($url,$v) = explode('?',$url); // url may contain additional vars if ($v) { - $vars += explode('&',$v); + parse_str($v,$v); + $vars += $v; } return $GLOBALS['phpgw']->link($url,$vars); } diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index ef55750e98..fc2a6cb61a 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -152,7 +152,7 @@ } unset($value['bottom']); } - if ($value['start_search'] || + if ($value['start_search'] || $value['search'] != $old_value['search'] || isset($value['cat_id']) && $value['cat_id'] != $old_value['cat_id'] || $old_value['filter'] != '' && isset($value['filter']) && $value['filter'] != $old_value['filter'] || $old_value['filter2'] != '' && isset($value['filter2']) && $value['filter2'] != $old_value['filter2']) diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index 3d7597cabe..7e1507a808 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -489,18 +489,22 @@ $type3 = 1; // fall-through - case 'select-number': // options: rows,min,max,dec - $cell['sel_options'][''] = ''; - $type = $type === '' ? 1 : intval($type); - $type2 = $type2 === '' ? 10 : intval($type2); - $type3 = !$type3 ? 1 : intval($type3); + case 'select-number': // options: rows,min,max,decrement + $type = $type === '' ? 1 : intval($type); // min + $type2 = $type2 === '' ? 10 : intval($type2); // max + $format = '%d'; + if (!empty($type3) && $type3[0] == '0') // leading zero + { + $format = '%0'.strlen($type3).'d'; + } + $type3 = !$type3 ? 1 : intval($type3); // decrement if (($type < $type2) != ($type3 > 0)) { $type3 = -$type3; // void infinite loop } for ($i=0,$n=$type; $n <= $type2 && $i <= 100; $n += $type3) { - $cell['sel_options'][$n] = $n; + $cell['sel_options'][$n] = sprintf($format,$n); } $cell['no_lang'] = True; break; diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index 954970a87e..a723ff0e49 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -34,6 +34,8 @@ { var $public_functions = array( 'init' => True, + 'empty_cell' => True, + 'new_cell' => True, 'read' => True, 'search' => True, 'save' => True, @@ -113,9 +115,58 @@ @syntax empty_cell() @result the cell */ - function empty_cell() + function empty_cell($type='label',$name='') { - return array('type' => 'label', 'name' => ''); + return array( + 'type' => $type, + 'name' => $name, + ); + } + + /*! + @function new_cell + @abstract constructs a new cell in a give row or the last row, not existing rows will be created + @syntax new_cell( $row=False ) + @param int $row row-number starting with 1 (!) + @param string $type type of the cell + @param string $label label for the cell + @param string $name name of the cell (index in the content-array) + @param array $attributes other attributes for the cell + @returns a reference to the new cell, use $new_cell = &$tpl->new_cell(); (!) + */ + function &new_cell($row=False,$type='label',$label='',$name='',$attributes=False) + { + $row = $row >= 0 ? intval($row) : 0; + if ($row && !isset($this->data[$row]) || !isset($this->data[1])) // new row ? + { + if (!$row) $row = 1; + + $this->data[$row] = array(); + } + if (!$row) // use last row + { + $row = count($this->data); + while (!isset($this->data[$row])) + { + --$row; + } + } + $row = &$this->data[$row]; + $col = $this->num2chrs(count($row)); + $cell = &$row[$col]; + $cell = $this->empty_cell($type,$name); + if ($label !== '') + { + $attributes['label'] = $label; + } + if (is_array($attributes)) + { + foreach($attributes as $name => $value) + { + $cell[$name] = $value; + } + } + return $cell; } /*! @@ -160,7 +211,7 @@ return; // data already set } $this->size = $this->style = ''; - $this->data = array(); + $this->data = array(0 => array()); $this->rows = $rows < 0 ? 1 : $rows; $this->cols = $cols < 0 ? 1 : $cols; for ($row = 1; $row <= $rows; ++$row) @@ -641,16 +692,26 @@ function getToTranslateCell($cell,&$to_trans) { + $strings = explode('|',$cell['help']); + + if ($cell['type'] != 'image') + { + $strings += explode('|',$cell['label']); + } list($extra_row) = explode(',',$cell['size']); - if (substr($cell['type'],0,6) != 'select' || !empty($extra_row) && $extra_row > 0) - $extra_row = ''; - $all = explode('|',$cell['help'].($cell['type'] != 'image'?'|'.$cell['label']:''). - (!empty($extra_row) ? '|'.$extra_row : '')); - while (list(,$str) = each($all)) + if (substr($cell['type'],0,6) == 'select' && !empty($extra_row) && !intval($extra_row)) + { + $strings[] = $extra_row; + } + if (!empty($cell['blur'])) + { + $strings[] = $cell['blur']; + } + foreach($strings as $str) { if (strlen($str) > 1 && $str[0] != '@') { - $to_trans[strtolower($str)] = $str; + $to_trans[trim(strtolower($str))] = $str; } } } @@ -669,7 +730,7 @@ reset($this->data); each($this->data); // skip width while (list($row,$cols) = each($this->data)) { - while (list($col,$cell) = each($cols)) + foreach($cols as $col => $cell) { $this->getToTranslateCell($cell,$to_trans); @@ -745,29 +806,31 @@ { $langarr = array(); } + $commonarr = $solangfile->load_app('phpgwapi',$lang) + $solangfile->load_app('etemplate',$lang); + $to_trans = $this->getToTranslateApp($app); if (is_array($additional)) { //echo "writeLangFile: additional ="; _debug_array($additional); - reset($additional); - while (list($nul,$msg) = each($additional)) + foreach($additional as $msg) { - $to_trans[strtolower($msg)] = $msg; + $to_trans[trim(strtolower($msg))] = $msg; } } unset($to_trans['']); - for ($new = $n = 0; list($message_id,$content) = each($to_trans); ++$n) { - if (!isset($langarr[$message_id])) + for ($new = $n = 0; list($message_id,$content) = each($to_trans); ++$n) + { + if (!isset($langarr[$message_id]) && !isset($commonarr[$message_id])) { - if (isset($langarr[$content])) // caused by not lowercased-message_id's + if (@isset($langarr[$content])) // caused by not lowercased-message_id's { unset($langarr[$content]); } $langarr[$message_id] = array( 'message_id' => $message_id, - 'app_name' => $app, - 'content' => $content + 'app_name' => $app, + 'content' => $content ); ++$new; } diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 6f8c2a5a59..287445b198 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -77,8 +77,8 @@ @discussion do NOT abstract the UI-layer, because they return HTML. @discussion Generates a webpage with a form from the template and puts process_exec in the @discussion form as submit-url to call process_show for the template before it - @discussion ExecuteMethod's the given $methode of the caller. - @param $methode Methode (e.g. 'etemplate.editor.edit') to be called if form is submitted + @discussion ExecuteMethod's the given $method of the caller. + @param $method Methode (e.g. 'etemplate.editor.edit') to be called if form is submitted @param $content Array with content to fill the input-fields of template, eg. the text-field @param with name 'name' gets its content from $content['name'] @param $sel_options Array or arrays with the options for each select-field, keys are the @@ -86,8 +86,8 @@ @param options for field 'name'. ($content['options-name'] is possible too !!!) @param $readonlys Array with field-names as keys for fields with should be readonly @param (eg. to implement ACL grants on field-level or to remove buttons not applicable) - @param $preserv Array with vars which should be transported to the $method-call (eg. an id) array('id' => $id) - sets $HTTP_POST_VARS['id'] for the $method-call + @param $preserv Array with vars which should be transported to the $method-call (eg. an id) array('id' => $id) + sets $_POST['id'] for the $method-call @param $return_html if true, dont show the page, just return the html @result nothing */ @@ -114,28 +114,6 @@ { $GLOBALS['phpgw_info']['flags']['app_header'] = $content['app_header']; } -/* - $html = ''; - if ($this->stable) - { - $hooked = $GLOBALS['phpgw']->template->get_var('phpgw_body'); - if (!@$GLOBALS['phpgw_info']['etemplate']['hooked'] && !$return_html) - { - $GLOBALS['phpgw_info']['flags']['java_script'] = $this->include_java_script(2); - $GLOBALS['phpgw']->common->phpgw_header(); - } - else - { - $html = $this->include_java_script(2); // better than nothing - } - } - else - { - $hooked = $GLOBALS['phpgw']->xslttpl->get_var('phpgw'); - $hooked = $hooked['body_data']; - $GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('java_script' => $this->include_java_script(2))); - } -*/ if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'etemplate') { $GLOBALS['phpgw']->translation->add_app('etemplate'); // some extensions have own texts @@ -147,9 +125,8 @@ $html = ($this->stable ? $this->html->themeStyles()."\n\n" : ''). // so they get included once $this->html->form($this->include_java_script(1). $this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),array( - 'etemplate_exec_id' => $id, - 'etemplate_exec_app' => $GLOBALS['phpgw_info']['flags']['currentapp'] - ),'/etemplate/process_exec.php','','eTemplate',$GLOBALS['phpgw_info']['etemplate']['form_options']); + 'etemplate_exec_id' => $id + ),'/etemplate/process_exec.php?menuaction='.$method,'','eTemplate',$GLOBALS['phpgw_info']['etemplate']['form_options']); //_debug_array($GLOBALS['phpgw_info']['etemplate']['to_process']); if ($this->stable) { @@ -170,11 +147,13 @@ $hooked = $hooked['body_data']; $GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('java_script' => $GLOBALS['phpgw_info']['flags']['java_script'].$this->include_java_script(2))); } + /* is in show now for every template list($width,$height,,,,,$overflow) = explode(',',$this->size); if ($overflow) { $html = $this->html->div($html,'STYLE="'.($width?"width: $width; ":'').($height?"height: $height; ":'')."overflow: $overflow;\""); } + */ $id = $this->save_appsession($this->as_array(1) + array( 'readonlys' => $readonlys, 'content' => $content, @@ -185,8 +164,7 @@ 'to_process' => $GLOBALS['phpgw_info']['etemplate']['to_process'], 'java_script' => $GLOBALS['phpgw_info']['etemplate']['java_script'], 'dom_enabled' => $GLOBALS['phpgw_info']['etemplate']['dom_enabled'], - 'method' => $method, - 'hooked' => $hooked + 'hooked' => $hooked != '' ? $hooked : $GLOBALS['phpgw_info']['etemplate']['hook_content'] ),$id); if ($return_html) @@ -199,9 +177,10 @@ { echo parse_navbar(); } - echo $html; + echo $GLOBALS['phpgw_info']['etemplate']['hook_content'].$html; - if (!@$GLOBALS['phpgw_info']['etemplate']['hooked'] && !isset($_GET['menuaction'])) + if (!@$GLOBALS['phpgw_info']['etemplate']['hooked'] && + (!isset($_GET['menuaction']) || strstr($_SERVER['PHP_SELF'],'process_exec.php'))) { $GLOBALS['phpgw']->common->phpgw_footer(); } @@ -214,29 +193,34 @@ /*! @function process_exec - @abstract Makes the necessary adjustments to HTTP_POST_VARS before it calls the app's method + @abstract Makes the necessary adjustments to _POST before it calls the app's method @discussion This function is only to submit forms to, create with exec. @discussion All eTemplates / forms executed with exec are submited to this function @discussion (via the global index.php and menuaction). It then calls process_show - @discussion for the eTemplate (to adjust the content of the HTTP_POST_VARS) and + @discussion for the eTemplate (to adjust the content of the _POST) and @discussion ExecMethod's the given callback from the app with the content of the form as first argument. */ function process_exec() { - //echo "process_exec: HTTP_POST_VARS ="; _debug_array($GLOBALS['HTTP_POST_VARS']); - $session_data = $this->get_appsession($GLOBALS['HTTP_POST_VARS']['etemplate_exec_id']); + //echo "process_exec: _POST ="; _debug_array($_POST); + $session_data = $this->get_appsession($_POST['etemplate_exec_id']); //echo "

process_exec: session_data ="; _debug_array($session_data); - $content = $GLOBALS['HTTP_POST_VARS']['exec']; + if (!$_POST['etemplate_exec_id'] || !is_array($session_data) || count($session_data) < 10) + { + // this prevents an empty screen, if the sessiondata gets lost somehow + $this->location(array('menuaction' => $_GET['menuaction'])); + } + $content = $_POST['exec']; if (!is_array($content)) { $content = array(); } $this->init($session_data); $GLOBALS['phpgw_info']['etemplate']['extension_data'] = $session_data['extension_data']; - $GLOBALS['phpgw_info']['etemplate']['java_script'] = $session_data['java_script'] || $GLOBALS['HTTP_POST_VARS']['java_script']; - $GLOBALS['phpgw_info']['etemplate']['dom_enabled'] = $session_data['dom_enabled'] || $GLOBALS['HTTP_POST_VARS']['dom_enabled']; - //echo "globals[java_script] = '".$GLOBALS['phpgw_info']['etemplate']['java_script']."', session_data[java_script] = '".$session_data['java_script']."', HTTP_POST_VARS[java_script] = '".$GLOBALS['HTTP_POST_VARS']['java_script']."'\n"; + $GLOBALS['phpgw_info']['etemplate']['java_script'] = $session_data['java_script'] || $_POST['java_script']; + $GLOBALS['phpgw_info']['etemplate']['dom_enabled'] = $session_data['dom_enabled'] || $_POST['dom_enabled']; + //echo "globals[java_script] = '".$GLOBALS['phpgw_info']['etemplate']['java_script']."', session_data[java_script] = '".$session_data['java_script']."', _POST[java_script] = '".$_POST['java_script']."'\n"; //echo "process_exec($this->name) content ="; _debug_array($content); $this->process_show($content,$session_data['to_process'],'exec'); @@ -251,7 +235,8 @@ { if ($this->stable) { - $GLOBALS['phpgw']->template->set_var('phpgw_body',$session_data['hooked']); + //echo "

process_exec: hook_content set

\n"; + $GLOBALS['phpgw_info']['etemplate']['hook_content'] = $session_data['hooked']; } else { @@ -259,12 +244,12 @@ } } //echo "

process_exec($this->name): loop is set, content=

\n"; _debug_array($content); - $this->exec($session_data['method'],$session_data['content'],$session_data['sel_options'], + $this->exec($_GET['menuaction'],$session_data['content'],$session_data['sel_options'], $session_data['readonlys'],$session_data['preserv'],$content); } else { - ExecMethod($session_data['method'],$this->complete_array_merge($session_data['preserv'],$content)); + ExecMethod($_GET['menuaction'],$this->complete_array_merge($session_data['preserv'],$content)); } } @@ -303,8 +288,8 @@ @param $sel_options array with options for the selectboxes, keys are the name of the selectbox @param $readonlys array with names of cells/form-elements to be not allowed to change @param This is to facilitate complex ACL's which denies access on field-level !!! - @param $cname basename of names for form-elements, means index in $HTTP_POST_VARS - @param eg. $cname='cont', element-name = 'name' returned content in $HTTP_POST_VARS['cont']['name'] + @param $cname basename of names for form-elements, means index in $_POST + @param eg. $cname='cont', element-name = 'name' returned content in $_POST['cont']['name'] @param $show_xxx row,col name/index for name expansion @result the generated HTML */ @@ -434,7 +419,7 @@ $colspan = $span == 'all' ? $this->cols-$c : 0+$span; if ($colspan > 1) { - $row_data[".$col"] .= " COLSPAN=$colspan"; + $row_data[".$col"] .= " COLSPAN=\"$colspan\""; for ($i = 1; $i < $colspan; ++$i,++$c) { each($cols); // skip next cell(s) @@ -464,12 +449,11 @@ } $html = $this->html->table($rows,$this->html->formatOptions($this->size,'WIDTH,HEIGHT,BORDER,CLASS,CELLSPACING,CELLPADDING'),$no_table_tr); - /* does NOT work with mozilla: shows nothing if a div is inside a form list($width,$height,,,,,$overflow) = explode(',',$this->size); if (!empty($overflow)) { $div_style=' STYLE="'.($width?"width: $width; ":'').($height ? "height: $height; ":'')."overflow: $overflow\""; $html = $this->html->div($html,$div_style); - }*/ + } return "\n\n\n$style\n".$html."\n\n"; } @@ -507,7 +491,7 @@ } $value = $this->get_array($content,$name); - if ($readonly = $cell['readonly'] || @$readonlys[$name] || $readonlys['__ALL__']) + if ($readonly = $cell['readonly'] || (@$readonlys[$name] && !is_array($readonlys[$name])) || $readonlys['__ALL__']) { $options .= ' READONLY'; } @@ -541,18 +525,38 @@ { $help = $this->get_array($content,substr($help,1)); } + $blur = $cell['blur'][0] == '@' ? $this->get_array($content,substr($cell['blur'],1)) : + (strlen($cell['blur']) <= 1 ? $cell['blur'] : lang($cell['blur'])); + if ($this->java_script()) { + if ($blur) + { + if (empty($value)) + { + $value = $blur; + } + $onFocus .= "if(this.value=='".addslashes(htmlspecialchars($blur))."') this.value='';"; + $onBlur .= "if(this.value=='') this.value='".addslashes(htmlspecialchars($blur))."';"; + } if ($help) { - $options .= " onFocus=\"self.status='".addslashes(lang($help))."'; return true;\""; - $options .= " onBlur=\"self.status=''; return true;\""; + if ($cell['no_lang'] < 2) + { + $help = lang($help); + } + $onFocus .= "self.status='".addslashes(htmlspecialchars($help))."'; return true;"; + $onBlur .= "self.status=''; return true;"; if ($cell['type'] == 'button' || $cell['type'] == 'file') // for button additionally when mouse over button { - $options .= " onMouseOver=\"self.status='".addslashes(lang($help))."'; return true;\""; + $options .= " onMouseOver=\"self.status='".addslashes(htmlspecialchars($help))."'; return true;\""; $options .= " onMouseOut=\"self.status=''; return true;\""; } } + if ($onBlur) + { + $options .= " onFocus=\"$onFocus\" onBlur=\"$onBlur\""; + } if ($cell['onchange'] && $cell['type'] != 'button') // values != '1' can only set by a program (not in the editor so fa { $options .= ' onChange="'.($cell['onchange']=='1'?'this.form.submit();':$cell['onchange']).'"'; @@ -742,7 +746,11 @@ list($multiple) = explode(',',$cell_options); if (!empty($multiple) && 0+$multiple <= 0) { - $sels[''] = $multiple < 0 ? lang('all') : lang($multiple); + $sels[''] = $multiple < 0 ? 'all' : $multiple; + if ($cell['no_lang']) + { + $sels[''] = lang($sels['']); + } $multiple = 0; } if (!empty($cell['sel_options'])) @@ -892,9 +900,15 @@ unset($GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name]); $GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = 'ext-'.$ext_type; } + // save blur-value to strip it in process_exec + if (!empty($blur) && isset($GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name])) + { + $GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = is_array($GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name]) ? $GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] : array('type' => $GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name]); + $GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name]['blur'] = $blur; + } if ($extra_label && ($label != '' || $html == '')) { - if (strlen($label) > 1 && !($cell['no_lang'] && $cell['label'] != $label)) + if (strlen($label) > 1 && !($cell['no_lang'] && $cell['label'] != $label || $cell['no_lang'] == 2)) { $label = lang($label); } @@ -933,11 +947,11 @@ /*! @function process_show - @abstract makes necessary adjustments on HTTP_POST_VARS after a eTemplate / form gots submitted + @abstract makes necessary adjustments on _POST after a eTemplate / form gots submitted @discussion This is only an internal function, dont call it direct use only exec @discussion Process_show uses a list of input-fields/widgets generated by show. @syntax process_show(&$content,$to_process,$cname='') - @param $content HTTP_POST_VARS[$cname] + @param $content _POST[$cname] @param $to_process list of widgets/form-fields to process @param $cname basename of our returnt content (same as in call to show) @result the adjusted content (by using the var-param &$content) @@ -967,6 +981,11 @@ $attr = array(); } $value = $this->get_array($content_in,$form_name); + + if (isset($attr['blur']) && $attr['blur'] == stripslashes($value)) + { + $value = ''; // blur-values is equal to emtpy + } //echo "

process_show($this->name) $type: $form_name = '$value'

\n"; list($type,$sub) = explode('-',$type); switch ($type) @@ -1082,61 +1101,8 @@ if (document.getElementById) { // here are going all the necesarry functions if javascript is enabled if ($what & 2 && $this->java_script(True)) { - $js .= " -"; + $js .= ''; } return $js; } diff --git a/etemplate/js/etemplate.js b/etemplate/js/etemplate.js new file mode 100644 index 0000000000..82b0bd33c1 --- /dev/null +++ b/etemplate/js/etemplate.js @@ -0,0 +1,65 @@ +/**************************************************************************\ +* phpGroupWare - EditableTemplates - javascript support functions * +* http://www.phpgroupware.org * +* Written by Ralf Becker * +* -------------------------------------------- * +* This program is free software; you can redistribute it and/or modify it * +* under the terms of the GNU General Public License as published by the * +* Free Software Foundation; either version 2 of the License, or (at your * +* option) any later version. * +\**************************************************************************/ + +/* $Id$ */ + +function set_element(form,name,value) +{ + //alert('set_element: '+name+'='+value); + for (i = 0; i < form.length; i++) + { + if (form.elements[i].name == name) + { + form.elements[i].value = value; + } + } +} + +function set_element2(form,name,vname) +{ + //alert('set_element2: '+name+'='+vname); + for (i = 0; i < form.length; i++) + { + if (form.elements[i].name == vname) + { + value = form.elements[i].value; + } + } + //alert('set_element2: '+name+'='+value); + for (i = 0; i < form.length; i++) + { + if (form.elements[i].name == name) + { + form.elements[i].value = value; + } + } +} + +function activate_tab(tab,all_tabs,name) +{ + var tabs = all_tabs.split('|'); + var parts = tab.split('.'); + var last_part = parts.length-1; + + for (n = 0; n < tabs.length; n++) + { + var t = tabs[n]; + + if (t.indexOf('.') < 0 && parts.length > 1) + { + parts[last_part] = t; + t = parts.join('.'); + } + document.getElementById(t).style.visibility = t == tab ? 'visible' : 'hidden'; + document.getElementById(t+'-tab').className = 'etemplate_tab'+(t == tab ? '_active th' : ' row_on'); + } + document.getElementByName(name).value = tab; +} diff --git a/etemplate/process_exec.php b/etemplate/process_exec.php index cef8d0f5a8..e11a6d1e95 100644 --- a/etemplate/process_exec.php +++ b/etemplate/process_exec.php @@ -12,8 +12,10 @@ /* $Id$ */ + list($app) = explode('.',$_GET['menuaction']); + $GLOBALS['phpgw_info']['flags'] = array( - 'currentapp' => $GLOBALS['HTTP_POST_VARS']['etemplate_exec_app'], + 'currentapp' => $app, 'noheader' => True, 'nonavbar' => True ); diff --git a/etemplate/setup/etemplates.inc.php b/etemplate/setup/etemplates.inc.php index b4e3c9571d..a84222d090 100644 --- a/etemplate/setup/etemplates.inc.php +++ b/etemplate/setup/etemplates.inc.php @@ -1,5 +1,5 @@ 'etemplate.nextmatch_widget','template' => '','l $templ_data[] = array('name' => 'etemplate.nextmatch_widget.header_only','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:3:{i:0;a:2:{s:1:\"A\";s:3:\"50%\";s:1:\"B\";s:3:\"50%\";}i:1;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:8:\"template\";s:4:\"name\";s:12:\"@header_left\";}s:1:\"B\";a:3:{s:4:\"type\";s:8:\"template\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:13:\"@header_right\";}}i:2;a:2:{s:1:\"A\";a:5:{s:4:\"type\";s:8:\"template\";s:4:\"size\";s:4:\"rows\";s:4:\"span\";s:3:\"all\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:9:\"@template\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}}','size' => '100%','style' => '','modified' => '1056877177',); +$templ_data[] = array('name' => 'etemplate.db-tools.ask_save','template' => '','lang' => '','group' => '0','version' => '0.9.14.002','data' => 'a:9:{i:0;a:0:{}i:1;a:2:{s:1:\"A\";a:6:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:2:\"bi\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:29:\"Editable Templates - DB-Tools\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:3:\"msg\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:2;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"hrule\";s:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:2:{s:1:\"A\";a:6:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:2:\"bi\";s:5:\"label\";s:27:\"Update from Version \'%s\' to\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:7:\"version\";}s:1:\"B\";a:3:{s:4:\"type\";s:4:\"text\";s:4:\"name\";s:11:\"new_version\";s:4:\"help\";s:75:\"enter the new version number here (> old_version), empty for no update-file\";}}i:5;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:6;a:2:{s:1:\"A\";a:7:{s:4:\"type\";s:5:\"label\";s:4:\"size\";s:1:\"b\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:53:\"Do you want to save the changes you made in table %s?\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:5:\"table\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:7;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:8;a:2:{s:1:\"A\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:3:\"Yes\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:3:\"yes\";s:4:\"help\";s:39:\"saves changes to tables_current.inc.php\";}s:1:\"B\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:2:\"No\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:2:\"no\";s:4:\"help\";s:15:\"discard changes\";}}}','size' => '100%','style' => '','modified' => '1060350447',); + +$templ_data[] = array('name' => 'etemplate.editor.cell','template' => '','lang' => '','group' => '0','version' => '0.9.15.003','data' => 'a:5:{i:0;a:4:{s:2:\"c1\";s:3:\"row\";s:2:\"c2\";s:3:\"row\";s:2:\"c3\";s:3:\"row\";s:2:\"c4\";s:3:\"row\";}i:1;a:6:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Type\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:4:\"type\";s:4:\"help\";s:57:\"type of the field (select Label if field should be empty)\";}s:1:\"C\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Options\";s:5:\"align\";s:6:\"center\";}s:1:\"D\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"10\";s:4:\"name\";s:4:\"size\";s:4:\"help\";s:187:\"Label:[bold][italic] Text:[len][,max] Numbers:[min][,[max][,len]] T.area:[rows][,cols] Radiob.:value H.Rule:[width] Templ.:[IndexInContent] Select:[multiselect] Date:[values: eg. \'Y-m-d\']\";}s:1:\"E\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:11:\"Span, Class\";s:5:\"align\";s:6:\"center\";}s:1:\"F\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"10\";s:4:\"name\";s:4:\"span\";s:4:\"help\";s:111:\"number of colums the field/cell should span or \'all\' for the remaining columns, CSS-class name (for the TD tag)\";}}i:2;a:6:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Label\";}s:1:\"B\";a:3:{s:4:\"type\";s:4:\"text\";s:4:\"name\";s:5:\"label\";s:4:\"help\";s:118:\"displayed in front of input or input is inserted for a \'%s\' in the label (label of the Submitbutton or Image-filename)\";}s:1:\"C\";a:6:{s:4:\"type\";s:8:\"checkbox\";s:4:\"span\";s:1:\"2\";s:5:\"label\";s:16:\"%s NoTranslation\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:7:\"no_lang\";s:4:\"help\";s:82:\"select if content of field should not be translated (label gets always translated)\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Align\";s:5:\"align\";s:6:\"center\";}s:1:\"F\";a:3:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:5:\"align\";s:4:\"help\";s:48:\"alignment of label and input-field in table-cell\";}}i:3;a:6:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Name\";}s:1:\"B\";a:3:{s:4:\"type\";s:4:\"text\";s:4:\"name\";s:4:\"name\";s:4:\"help\";s:78:\"index/name of returned content (name of the Template, Link / Method for Image)\";}s:1:\"C\";a:7:{s:4:\"type\";s:4:\"hbox\";s:4:\"size\";s:1:\"4\";s:4:\"span\";s:1:\"4\";i:1;a:5:{s:4:\"type\";s:8:\"checkbox\";s:5:\"label\";s:9:\"%s needed\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:6:\"needed\";s:4:\"help\";s:39:\"check if field has to be filled by user\";}i:2;a:5:{s:4:\"type\";s:8:\"checkbox\";s:5:\"label\";s:11:\"%s readonly\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:8:\"readonly\";s:4:\"help\";s:94:\"check if content should only be displayed but not altered (the content is not send back then!)\";}i:3;a:5:{s:4:\"type\";s:8:\"checkbox\";s:5:\"label\";s:11:\"%s disabled\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:8:\"disabled\";s:4:\"help\";s:96:\"if field is disabled an empty table-cell is displayed, for (temporal) removement of a field/cell\";}i:4;a:5:{s:4:\"type\";s:8:\"checkbox\";s:5:\"label\";s:11:\"%s onChange\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:8:\"onchange\";s:4:\"help\";s:33:\"enable JavaScript onChange submit\";}}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:6:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Help\";}s:1:\"B\";a:5:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"45\";s:4:\"span\";s:1:\"3\";s:4:\"name\";s:4:\"help\";s:4:\"help\";s:60:\"displayed in statusline of browser if input-field gets focus\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"blurText\";s:5:\"align\";s:6:\"center\";}s:1:\"F\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"10\";s:4:\"name\";s:4:\"blur\";s:4:\"help\";s:76:\"this text gets displayed if the input-field is empty and has no focus (blur)\";}}}','size' => ',100%','style' => '','modified' => '1061339128',); + +$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '0.9.15.006','data' => 'a:2:{i:0;a:9:{s:1:\"A\";s:2:\"1%\";s:1:\"B\";s:2:\"1%\";s:1:\"C\";s:3:\"30%\";s:1:\"D\";s:3:\"30%\";s:1:\"F\";s:3:\"15%\";s:1:\"G\";s:2:\"5%\";s:1:\"H\";s:2:\"1%\";s:1:\"I\";s:2:\"1%\";s:2:\"c1\";s:3:\"nmh\";}i:1;a:9:{s:1:\"A\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:24:\"first.gif,first-grey.gif\";s:5:\"label\";s:5:\"First\";s:4:\"name\";s:5:\"first\";s:4:\"help\";s:21:\"go to the first entry\";}s:1:\"B\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:22:\"left.gif,left-grey.gif\";s:5:\"label\";s:4:\"Left\";s:4:\"name\";s:4:\"left\";s:4:\"help\";s:34:\"go to the previous page of entries\";}s:1:\"C\";a:6:{s:4:\"type\";s:10:\"select-cat\";s:4:\"size\";s:2:\"-1\";s:5:\"label\";s:8:\"Category\";s:4:\"name\";s:6:\"cat_id\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:17:\"select a Category\";}s:1:\"D\";a:6:{s:4:\"type\";s:6:\"select\";s:5:\"label\";s:13:\"@filter_label\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:6:\"filter\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:12:\"@filter_help\";}s:1:\"E\";a:6:{s:4:\"type\";s:6:\"select\";s:5:\"label\";s:14:\"@filter2_label\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:7:\"filter2\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:13:\"@filter2_help\";}s:1:\"F\";a:5:{s:4:\"type\";s:4:\"text\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:6:\"search\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:28:\"a pattern to be searched for\";}s:1:\"G\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Search\";s:4:\"name\";s:12:\"start_search\";s:4:\"help\";s:19:\"to start the search\";}s:1:\"H\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:24:\"right.gif,right-grey.gif\";s:5:\"label\";s:5:\"Right\";s:4:\"name\";s:5:\"right\";s:4:\"help\";s:30:\"go to the next page of entries\";}s:1:\"I\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:22:\"last.gif,last-grey.gif\";s:5:\"label\";s:4:\"Last\";s:4:\"name\";s:4:\"last\";s:4:\"help\";s:20:\"go to the last entry\";}}}','size' => '100%,,,,0,5','style' => '','modified' => '1061331789',); + diff --git a/etemplate/setup/phpgw_de.lang b/etemplate/setup/phpgw_de.lang index 9eadb362e3..805098f3f1 100644 --- a/etemplate/setup/phpgw_de.lang +++ b/etemplate/setup/phpgw_de.lang @@ -1,5 +1,9 @@ +%1 (%2 new) messages writen for application '%3' and languages '%4' etemplate de %1 (%2 neue) Texte für die Anwendung '%3' und die Sprache '%4' geschrieben %1 etemplates deleted etemplate de %1 eTemplates gelöscht +%1 etemplates for application '%2' dumped to '%3' etemplate de %1 eTemplates für die Anwendung '%2' nach '%3' geschrieben %1 etemplates found etemplate de %1 eTemplates gefunden +%1 matches on search criteria etemplate de %1 Treffer bei der Suche +%1 new etemplates imported for application '%2' etemplate de %1 neue eTemplates importiert für die Anwendung '%2' %s disabled etemplate de %s deaktiviert %s needed etemplate de %s benötigt %s notranslation etemplate de %s nicht übersetzen @@ -18,6 +22,7 @@ application etemplate de Anwendung application name needed to write a langfile or dump the etemplates !!! etemplate de Name der Anwendung benötigt um eine Sprachdatei oder eTemplate-Distibutionsdate zu schreiben !!! attach etemplate de Anhängen attach file etemplate de Datei anhängen +blurtext etemplate de blurText border etemplate de Rand border-line-thickness for the table-tag etemplate de Randbreite (border) für die Tabelle can have special sql-value null etemplate de darf speziellen SQL Wert NULL annehmen @@ -80,9 +85,12 @@ enter a search pattern etemplate de Suchmuster eingeben enter filename to upload and attach, use [browse...] to search for it etemplate de Dateinamen zum Hochland oder Anhängen eingeben, [Browse ...] zum Suchen verwenden enter the new version number here (> old_version), empty for no update-file etemplate de Neue Versionsnummer eingeben (größer als alte), leer wenn keine Update-Datei erzeugt werden soll enter the new version number here (has to be > old_version) etemplate de Neue Versionsnummer eingeben (muss größer als die alte sein) +entry saved etemplate de Eintrag gespeichert error: template not found !!! etemplate de Fehler: eTemplate nicht gefunden !!! error: webserver is not allowed to write into '%1' !!! etemplate de Fehler: der Webserver hat keine Schreibberechtigung in '%1' !!! error: while saveing !!! etemplate de Fehler: beim Speichern !!! +error: writeing !!! etemplate de Fehler: schreiben !!! +error: writing file (no write-permission for the webserver) !!! etemplate de Fehler: Datei schreiben (keine Schreibberechtigung für den Webserver) !!! etemplate common de eTemplate etemplate '%1' imported, use save to put it in the database etemplate de eTemplate '%1' importiert, benutze Speichern um es in der Datenbank abzulegen etemplate '%1' written to '%2' etemplate de eTemplate '%1' wurde nach '%2' geschrieben @@ -93,6 +101,7 @@ export the loaded etemplate into a xml-file etemplate de das geladene eTemplate export xml etemplate de XML Export extensions loaded: etemplate de Erweiterungen geladen: file etemplate de Datei +file contains more than one etemplate, last one is shown !!! etemplate de Datei enthält mehr als ein eTemplate, das letzte wird angezeigt !!! file writen etemplate de Datei geschrieben fileupload etemplate de DateiUpload first etemplate de Zuerst @@ -152,6 +161,7 @@ nextmatch etemplate de Nextmatch no file etemplate de keine Datei no filename given or selected via browse... etemplate de kein Dateiname angegeben oder mit [Browse...] ausgewählt nothing found - try again !!! etemplate de Nichts gefunden - nochmal versuchen !!! +nothing matched search criteria !!! etemplate de Nicht gefunden bei diesem Suchkriterium !!! nullable etemplate de Nullable number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate de Anzahl der Spalten die ein Feld überspannt oder 'all' für die übrigen Spalten, CSS class Name (für das TD-tag) number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate de Anzahl Zeilen/Spalten der V/HBox, Innenabstand (Cellpadding), Zellenabstand (Cellspacing) @@ -226,6 +236,7 @@ template deleted etemplate de Template gel template saved etemplate de Template gespeichert text etemplate de Textfeld textarea etemplate de mehrzeiliges Textfeld +this text gets displayed if the input-field is empty and has no focus (blur) etemplate de dieser Text wird im Eingabefeld angezeigt, wenn es leer ist und nicht im Fokus ist (engl. blur) time etemplate de Uhrzeit to start the db-tools etemplate de startet die DB-Tools to start the etemplate editor etemplate de startet den eTemplate Editor diff --git a/etemplate/setup/phpgw_en.lang b/etemplate/setup/phpgw_en.lang index 44b2c2ef74..54e18f9ea9 100644 --- a/etemplate/setup/phpgw_en.lang +++ b/etemplate/setup/phpgw_en.lang @@ -1,5 +1,9 @@ +%1 (%2 new) messages writen for application '%3' and languages '%4' etemplate en %1 (%2 new) Messages writen for Application '%3' and Languages '%4' %1 etemplates deleted etemplate en %1 eTemplates deleted +%1 etemplates for application '%2' dumped to '%3' etemplate en %1 eTemplates for Application '%2' dumped to '%3' %1 etemplates found etemplate en %1 eTemplates found +%1 matches on search criteria etemplate en %1 matches on search criteria +%1 new etemplates imported for application '%2' etemplate en %1 new eTemplates imported for Application '%2' %s disabled etemplate en %s disabled %s needed etemplate en %s needed %s notranslation etemplate en %s NoTranslation @@ -18,6 +22,7 @@ application etemplate en Application application name needed to write a langfile or dump the etemplates !!! etemplate en Application name needed to write a langfile or dump the eTemplates !!! attach etemplate en Attach attach file etemplate en attach file +blurtext etemplate en blurText border etemplate en Border border-line-thickness for the table-tag etemplate en Border-line-thickness for the table-tag can have special sql-value null etemplate en can have special SQL-value NULL @@ -80,9 +85,12 @@ enter a search pattern etemplate en Enter a search pattern enter filename to upload and attach, use [browse...] to search for it etemplate en Enter filename to upload and attach, use [Browse...] to search for it enter the new version number here (> old_version), empty for no update-file etemplate en enter the new version number here (> old_version), empty for no update-file enter the new version number here (has to be > old_version) etemplate en enter the new version number here (has to be > old_version) +entry saved etemplate en Entry saved error: template not found !!! etemplate en Error: Template not found !!! error: webserver is not allowed to write into '%1' !!! etemplate en Error: webserver is not allowed to write into '%1' !!! error: while saveing !!! etemplate en Error: while saveing !!! +error: writeing !!! etemplate en Error: writeing !!! +error: writing file (no write-permission for the webserver) !!! etemplate en Error: writing file (no write-permission for the webserver) !!! etemplate common en eTemplate etemplate '%1' imported, use save to put it in the database etemplate en eTemplate '%1' imported, use Save to put it in the database etemplate '%1' written to '%2' etemplate en eTemplate '%1' written to '%2' @@ -93,6 +101,7 @@ export the loaded etemplate into a xml-file etemplate en export the loaded eTemp export xml etemplate en Export XML extensions loaded: etemplate en Extensions loaded: file etemplate en File +file contains more than one etemplate, last one is shown !!! etemplate en File contains more than one eTemplate, last one is shown !!! file writen etemplate en File writen fileupload etemplate en FileUpload first etemplate en First @@ -152,6 +161,7 @@ nextmatch etemplate en Nextmatch no file etemplate en no file no filename given or selected via browse... etemplate en no filename given or selected via Browse... nothing found - try again !!! etemplate en Nothing found - try again !!! +nothing matched search criteria !!! etemplate en Nothing matched search criteria !!! nullable etemplate en Nullable number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate en number of colums the field/cell should span or 'all' for the remaining columns, CSS-class name (for the TD tag) number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate en number of rows/cols in a V/HBox, Cellpadding, Cellspacing @@ -226,6 +236,7 @@ template deleted etemplate en Template deleted template saved etemplate en Template saved text etemplate en Text textarea etemplate en Textarea +this text gets displayed if the input-field is empty and has no focus (blur) etemplate en this text gets displayed if the input-field is empty and has no focus (blur) time etemplate en Time to start the db-tools etemplate en to start the DB-Tools to start the etemplate editor etemplate en to start the eTemplate editor diff --git a/etemplate/setup/phpgw_fr.lang b/etemplate/setup/phpgw_fr.lang index c36f4d8718..1c235db613 100644 --- a/etemplate/setup/phpgw_fr.lang +++ b/etemplate/setup/phpgw_fr.lang @@ -1,10 +1,14 @@ +%1 (%2 new) messages writen for application '%3' and languages '%4' etemplate fr %1 (%2 nouveaux) Messages écrits pour l'Application '%3' et les langues '%4' %1 etemplates deleted etemplate fr %1 eTemplates effacé(s) +%1 etemplates for application '%2' dumped to '%3' etemplate fr %1 eTemplates pour l'Application '%2' écrits dans '%3' %1 etemplates found etemplate fr %1 eTemplates trouvé(s) -%1 disabled etemplate fr %1 désactivé -%1 needed etemplate fr %1 nécessaire -%1 notranslation etemplate fr %1 PasDeTraduction -%1 onchange etemplate fr %1 EnCoursDeModification -%1 readonly etemplate fr %1 LectureSeulement +%1 matches on search criteria etemplate fr %1 occurences sur les critères de recherche +%1 new etemplates imported for application '%2' etemplate fr %1 nouveaux eTemplates importés pour l'Application '%2' +%s disabled etemplate fr %s désactivé +%s needed etemplate fr %s nécessaire +%s notranslation etemplate fr %s PasDeTraduction +%s onchange etemplate fr %s surChangement +%s readonly etemplate fr %s LectureSeule a pattern to be searched for etemplate fr Une chaine de caractères à rechercher add a new column (after the existing ones) etemplate fr Ajouter une nouvelle colonne (après celles existant déjà) add column etemplate fr Ajouter une colonne @@ -60,9 +64,9 @@ deletes the above spez. etemplate from the database, can not be undone etemplate deletes the etemplate spez. above etemplate fr fface le eTemplate spécifié ci-dessus deletes this column etemplate fr Efface cette colonne discard changes etemplate fr Annuler les changements -displayed in front of input or input is inserted for a '%1' in the label (label of the submitbutton or image-filename) etemplate fr affiché devant l'entrée ou l'entrée est insérée pour un '%1' dans le label (label du bouton de soumission ou nom de fichier image) +displayed in front of input or input is inserted for a '%s' in the label (label of the submitbutton or image-filename) etemplate fr affiché en face de l'entrée our l'entrée est insérée pour un '%s' dans le label (le label du Boutonsoumettre ou le nom du fichierimage) displayed in statusline of browser if input-field gets focus etemplate fr affiché dans la ligne de statut du navigateur si le champ d'entrée a le focus -do you want to save the changes you made in table %1? etemplate fr Voulez-vous enregistrer les modifications que vous avez apporté à la table %1 ? +do you want to save the changes you made in table %s? etemplate fr Voulez-vous enregistrer les modifications que vous avez effectuées dans la table %s? drop a table - this can not be undone etemplate fr Détruire une table - ceci ne peut PAS être annulé drop table etemplate fr Effacer table dump4setup etemplate fr DumpPourRéglage @@ -80,6 +84,7 @@ enter a search pattern etemplate fr Entrez une cha enter filename to upload and attach, use [browse...] to search for it etemplate fr Entrez un nom de fichier à uploader et attacher, utilisez [naviguer...] pour le rechercher enter the new version number here (> old_version), empty for no update-file etemplate fr Entrez le nouveau numéro de version ici (> ancienne_version), vide pour aucun fichier de mise à jour enter the new version number here (has to be > old_version) etemplate fr Entrez le nouveau numéro de version ici (doit être > à la vieille_version) +entry saved etemplate fr Entrée enregistrée error: template not found !!! etemplate fr Erreur: Template non trouvé !!! error: webserver is not allowed to write into '%1' !!! etemplate fr Erreur: le serveur web n'est pas autorisé à écrire dans '%1' !!! error: while saveing !!! etemplate fr Erreur: pendant la sauvegarde !!! @@ -93,6 +98,7 @@ export the loaded etemplate into a xml-file etemplate fr exporter l'eTemplate ch export xml etemplate fr Exporter XML extensions loaded: etemplate fr Extensions chargées: file etemplate fr Fichier +file contains more than one etemplate, last one is shown !!! etemplate fr Le fichier contient plus d'un eTemplate, le dernier est affiché !!! file writen etemplate fr Fichier écrit fileupload etemplate fr UploadFichier first etemplate fr Premier @@ -134,6 +140,7 @@ left etemplate fr Gauche length for char+varchar, precisions int: 2, 4, 8 and float: 4, 8 etemplate fr Longueur pour char+varchar, précision d'entiers: 2, 4, 8 et flottants: 4, 8 link etemplate fr Lien linklist etemplate fr Liste de liens +linkstring etemplate fr ChaîneDeLien linkto etemplate fr LierVers load this template into the editor etemplate fr Charger ce template dans l'éditeur minute etemplate fr Minute @@ -151,6 +158,7 @@ nextmatch etemplate fr Occurrence trouv no file etemplate fr Pas de fichier no filename given or selected via browse... etemplate fr Pas de nom de fichier donné ou sélectionnée avec naviguer... nothing found - try again !!! etemplate fr Rien trouvé - essayez encore !!! +nothing matched search criteria !!! etemplate fr Aucune occurrence correspondant aux critères de recherche !!! nullable etemplate fr Positionnable à zéro number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate fr Nombre de colonnes sur lesquelles le champ/cellule devrait s'étendre ou 'tous' pour les colonnes qui restent, nom de la classe CSS (pour le tag TD) number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate fr Nombre de lignes/colonnes dans une boîte H/V, remplissage de cellule, espacement de cellule @@ -236,7 +244,7 @@ type of the field (select label if field should be empty) etemplate fr Type du c unique etemplate fr Unique unlink etemplate fr Délier update a single entry by passing the fields. etemplate fr Mettre à jour une unique entrée en passant les champs. -update from version '%1' to etemplate fr Mettre à jour depuis la version '%1' vers +update from version '%s' to etemplate fr Mettre à jour depuis la Version '%s' vers upload etemplate fr Uploader value etemplate fr Valeur vbox etemplate fr BoîteV diff --git a/filemanager/debian/changelog b/filemanager/debian/changelog deleted file mode 100644 index f8bb37a8f3..0000000000 --- a/filemanager/debian/changelog +++ /dev/null @@ -1,6 +0,0 @@ -phpgroupware-filemanager (0.9.14-0.RC3.3) unstable; urgency=low - - * New release. - - Source is now splitted into modules. - - -- Luca - De Whiskey's - De Vitis Mon, 21 May 2001 15:00:56 +0200 diff --git a/filemanager/debian/control b/filemanager/debian/control deleted file mode 100644 index dc4c357504..0000000000 --- a/filemanager/debian/control +++ /dev/null @@ -1,18 +0,0 @@ -Source: phpgroupware-filemanager -Section: web -Priority: optional -Maintainer: Luca - De Whiskey's - De Vitis -Build-Depends: debhelper (>> 3.0.0) -Standards-Version: 3.5.2 - -Package: phpgroupware-filemanager -Section: web -Architecture: all -Depends: phpgroupware (>= ${Source-Version}), php3-pgsql | php3-cgi-pgsql | php4-pgsql | php3-mysql | php3-cgi-mysql | php4-mysql -Description: The phpGroupWare file manager module. - The file manager for phpGroupWare. Abilities include all - common file actions (upload, mkdir, rename, delete, copy, move), creating and - editing text files, and syncing with the file system. Per file/directory - comments are stored, and version history is tracked. Group sharing and ACL - are fully supported. - diff --git a/filemanager/debian/copyright b/filemanager/debian/copyright deleted file mode 100644 index 900148502e..0000000000 --- a/filemanager/debian/copyright +++ /dev/null @@ -1,15 +0,0 @@ -This package was debianized by Luca - De Whiskey's - De Vitis on -Sat, 29 Jun 2002 17:13:40 +0200 - -It was downloaded from the CVS repository at subversion.gnu.org. Try: -prompt$ CVSROOT=:pserver:anoncvs@subversions.gnu.org:/cvsroot/phpgroupware -prompt$ CVS_RSH=ssh -prompt$ cvs login -prompt$ cvs get all packages - -Upstream Author(s): -Please, see credits.txt, the README file or visit http://apps.phpgroupware.org/ - -Copyright: -A copy of the GNU General Public License, version 2, can be found in -/usr/share/common-licenses/GPL . diff --git a/filemanager/debian/rules b/filemanager/debian/rules deleted file mode 100755 index 05a9cb3c5b..0000000000 --- a/filemanager/debian/rules +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 by Joey Hess. -# -# This version is for a hypothetical package that builds an -# architecture-dependant package, as well as an architecture-independent -# package. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# This is the debhelper compatability version to use. -export DH_COMPAT=3 - -APP = filemanager -PACKAGE = debian/phpgroupware-$(APP)/usr/share/phpgroupware/$(APP) -PACKAGEDOC = debian/phpgroupware-$(APP)/usr/share/doc/phpgroupware-$(APP) - -COPYRIGHT = -iname copyright\* -or -iname license -CHANGELOG = -iname change\* -INSTALL = -iname install -FINDOPT = -type f -not \( -path \*CVS\* -or -path \*debian\* -or -name .cvsignore \) -SPECIAL = -size 0 -or $(INSTALL) -or $(CHANGELOG) -or $(COPYRIGHT) -or -name \*.sgml -STAMPS = -name configure-stamp -or -name build-stamp -APPFILES = -not \( -path \*doc\* -or -path \. -or -name '*.pl' -or -name '*.py' -or $(STAMPS) \) -DOCFILES = -not \( $(SPECIAL) \) - -configure: configure-stamp -configure-stamp: - dh_testdir - # No configuration needed. - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - # Here should go the commands necessary to build the sgml documentation... - touch build-stamp - -clean: - dh_testdir - rm -f build-stamp configure-stamp - rm -f debian/.builded - rm -f debian/files - # Here should go the commands to clean the builded sgml documents. - dh_clean - -install: build - dh_testdir - - # Install $(APP) files in $(PACKAGE) - find $(FINDOPT) $(APPFILES) \ - -exec install -D --mode=644 {} $(PACKAGE)/{} \; - - # Install $(APP) doc files in $(PACKAGEDOC) - cd doc ;\ - find $(FINDOPT) $(DOCFILES) \ - -exec install -D --mode=644 {} ../$(PACKAGEDOC)/{} \; - -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb | tee debian/.builded - -binary: binary-indep -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/filemanager/doc/INSTALL b/filemanager/doc/INSTALL index 9d78f2f8bf..f926052878 100644 --- a/filemanager/doc/INSTALL +++ b/filemanager/doc/INSTALL @@ -33,7 +33,7 @@ FULL EXPLANATION SECURITY CONCERNS ----------------- -There are many security concerns related with allowing users to store files on the server. The most common problem is that users can upload any type of file, including CGI and PHP scripts. This in effect grants them local access to the machine, and can be used to read database passwords and other sensitive files. The ability to upload files of any type is not forbidden by filemanager because it is sometimes desired, and also the types of vulnerable files differ from server to server. To combat this, you can add a simple entry to Apache's httpd.conf to prevent certain types of files from being executed. Included below is an example that results in .cgi, .pl, .php, .php3, and .phps files being treated as normal text files. It also explicitly turns all Options off, which includes turning Indexes (listing of files) off. +There are many security concerns related with allowing users to store files on the server. The most common problem is that users can upload any type of file, including CGI and PHP scripts. This in effect grants them local access to the machine, and can be used to read database passwords and other sensitive files. The ability to upload files of any type is not forbidden by phpwebhosting because it is sometimes desired, and also the types of vulnerable files differ from server to server. To combat this, you can add a simple entry to Apache's httpd.conf to prevent certain types of files from being executed. Included below is an example that results in .cgi, .pl, .php, .php3, and .phps files being treated as normal text files. It also explicitly turns all Options off, which includes turning Indexes (listing of files) off. Options None diff --git a/filemanager/doc/INSTALL_WebDAV b/filemanager/doc/INSTALL_WebDAV new file mode 100644 index 0000000000..1e7280dec9 --- /dev/null +++ b/filemanager/doc/INSTALL_WebDAV @@ -0,0 +1,76 @@ +INSTALL : WebDAV file share +--------------------------- +Note: if you don't know what WebDAV is you probably don't need it. The default +vfs_sql is generally faster and easier to setup. + +Filemanager's WebDAV support allows you to store your files online in +phpgroupware, in a way that cooperates well with other web applications (for +instance, in Windows you can then access your files as a "web folder", and +similarly KDE, Gnome, MacOSX, and amultitude of applications (eg MS Office and +OpenOffice.org) all include some way of browsing files on a WebDAV share) + + +Installation +------------ +To install: + +1/ Setup a WebDAV server - currently this code has only been well tested using + Apache's mod_dav (http://www.webdav.org/mod_dav/). mod_dav is included in + Apache 2, and most Linux distributions include it as a package. + + To setup mod_dav ensure that you have the module installed correctly ( RTFM :) + and create a virtual host (eg files.yourdomain.com) something like this: + + + AccessFileName .htaccess + ServerAdmin webmaster@yourdomain.com + DocumentRoot /var/files + + AllowOverride All + Options +Indexes + DAV on + DirectoryIndex / + RemoveHandler cgi-script .cgi .pl + RemoveType application/x-httpd-php .php .php3 + RemoveType application/x-httpd-php-source .phps + + + #This ensures phpgroupware can modify .htaccess files + order deny,allow + deny from all + #make sure your phpgroupware server is included here. + allow from localhost .localdomain + + ServerName files.yourdomain.com + ErrorLog logs/dav_err + CustomLog logs/dav_acc combined + + +2/ On the setup page (phpgroupware/setup/config.php) specify + the WebDAV server URL (eg http://files.yourdomain.com ) in the: "Full path + for users and groups files" text area, and select DAV in the: + "Select where you want to store/retrieve filesystem information" + combo. If your file repository supports SSL you might want to enter + 'https://files.yourdomain.com' instead - note that phpGroupWare itself wont + use SSL to access the repository, but when it redirects the users browser to + the repository it will use the secure https url. + +3/ Make sure your WebDAV repository contains a "home" directory (important!) + So if your WebDAV directory is /var/files, you would need: + /var/files/ + /var/files/home/ + +4/ (OPTIONAL) Ideally you want some kind of authentication on the WebDAV + repository, so that users accessing it directly still need their phpgroupware + password. + To enable authentication you must use a third-party Apache authentication + module. Which you use depends on how you have setup authentication in + phpGroupWare - for instance if you use an SQL DB (the default) then set up + mod_auth_pgsql (http://www.giuseppetanzilli.it/mod_auth_pgsql/) or + mod_auth_mysql (http://modauthmysql.sourceforge.net/) + An example .htaccess file is included for postgresql - mysql would be + similar. Your file repository also needs to be configured to allow + phpGroupWare to write .htaccess files (the setup in (3) will allow this) + + Note that using an Apache module for authentication is not strictly + required in order to use WebDAV within phpGroupWare. diff --git a/filemanager/doc/README b/filemanager/doc/README index a04039cb4f..ad3b17fd78 100644 --- a/filemanager/doc/README +++ b/filemanager/doc/README @@ -1,24 +1,22 @@ -Module: filemanager (formerly phpwebhosting) -Author: Jason Wies -Comments to: phpgroupware-developers@gnu.org, zone@phpgroupware.org -Description: The file manager for phpGroupWare. Abilities include all common file actions (upload, mkdir, rename, delete, copy, move), creating and editing text files, and syncing with the file system. Per file/directory comments are stored, and version history is tracked. Group sharing and ACL are fully supported. +Module: filemanager +Authors: Jason Wies , Jonathon Sim and the team at Zeald -NOTES ------ -filemanager started as an independent (non-phpGroupWare) project named phpwebhosting, and there continues to be a separate stand-alone distribution available at http://phpwebhosting.sourceforge.net/. +Description: The file manager for phpGroupWare. Abilities include all common +file actions (upload, mkdir, rename, delete, copy, move), creating and editing +text files, and syncing with the file system. Per file/directory comments are +stored, and version history is tracked. Group sharing and ACL are fully +supported. Files can be stored either as files on the web server, or on a remote WebDAV +repository. For installation notes see the file INSTALL in this directory - at minimum +you will probably need to set some file permissions. -For installation help, see the INSTALL file in this directory. DEV NOTES --------- -index.php is depreciated by the inc/class.xxfilemanager.inc.php files. index.php is still used in the 0.9.14 release, but all future changes should be made to the inc/class.xxfilemanager.inc.php files (3-tiered). This includes using templates. +index.php is depreciated by the inc/class.xxphpwebhosting.inc.php files. +index.php is still used in the 0.9.16 release, but all future changes should be +made to the inc/class.xxphpwebhosting.inc.php files in CVS (3-tiered). This includes +using templates. See the docs in phpgwapi/doc/vfs for more information on +interacting with the VFS (Virtual File System). -See the docs in phpgwapi/doc/vfs for more information on interacting with the VFS (Virtual File System). - -OLD NOTES ---------- -phpwebhosting replaces filemanger. phpwebhosting should be used instead of filemanager in all new installs. - -phpwebhosting will be renamed after 0.9.14, at least in time for 0.9.16, but perhaps much sooner. Most likely it will be renamed to 'filemanager', and the current 'filemanager' removed completely. - -UPDATE: The above renaming has occurred, the module formerly known as 'phpwebhosting' is now 'filemanager', the default file manager for phpGroupWare. Any references to phpwebhosting should be replaced in favor of filemanger. +There are some simple unit tests in the tests directory : they mainly test the +functionality of the VFS classes. \ No newline at end of file diff --git a/filemanager/images/.xvpics/folder-home.gif b/filemanager/images/.xvpics/folder-home.gif deleted file mode 100755 index c40685e7ef..0000000000 Binary files a/filemanager/images/.xvpics/folder-home.gif and /dev/null differ diff --git a/filemanager/images/.xvpics/folder-open.gif b/filemanager/images/.xvpics/folder-open.gif deleted file mode 100755 index acff62427d..0000000000 Binary files a/filemanager/images/.xvpics/folder-open.gif and /dev/null differ diff --git a/filemanager/images/.xvpics/folder-up.gif b/filemanager/images/.xvpics/folder-up.gif deleted file mode 100755 index b040fdeba0..0000000000 Binary files a/filemanager/images/.xvpics/folder-up.gif and /dev/null differ diff --git a/filemanager/images/.xvpics/folder.gif b/filemanager/images/.xvpics/folder.gif deleted file mode 100755 index 4aec61e327..0000000000 Binary files a/filemanager/images/.xvpics/folder.gif and /dev/null differ diff --git a/filemanager/images/.xvpics/locked.gif b/filemanager/images/.xvpics/locked.gif deleted file mode 100755 index 6491c5b94b..0000000000 --- a/filemanager/images/.xvpics/locked.gif +++ /dev/null @@ -1,5 +0,0 @@ -P7 332 -#IMGINFO:14x12 Indexed (348 bytes) -#END_OF_COMMENTS -14 12 255 -I$IIÛ¶¶¶ÿÿm’Û¶I$IIÛ¶ºÿÛÖ¶IÛ¶I$IIÛ¶’ÿ‘’ÿ$Û¶I$IµúI·H’·þ·m¶Û¶¶±Þ‰­Žm¶ÿ’’$Û¶¶µú­²’Úû»±)Û¶mµ©–h’¶·µ·‘nÛ‘²m‘¶)IiMImŽmI‘²H—ÖMIHJHermmII¶’ÿm%HI)E‘nI$II¶ÿ’HnMimrI$II¶Û‘InmmI’m \ No newline at end of file diff --git a/filemanager/inc/class.bofilemanager.inc.php b/filemanager/inc/class.bophpwebhosting.inc.php similarity index 60% rename from filemanager/inc/class.bofilemanager.inc.php rename to filemanager/inc/class.bophpwebhosting.inc.php index 87b9fd4e0b..63e717aaea 100755 --- a/filemanager/inc/class.bofilemanager.inc.php +++ b/filemanager/inc/class.bophpwebhosting.inc.php @@ -4,7 +4,7 @@ - class bofilemanager + class bophpwebhosting { var $public_functions = array( 'delete' => True @@ -37,9 +37,6 @@ var $newfile; var $fileman = Array(); - var $changes = Array(); - var $upload_comment = Array(); - var $upload_file = Array(); var $op; var $file; var $help_name; @@ -58,10 +55,10 @@ // var $debug = True; var $debug = False; - function bofilemanager() + function bophpwebhosting() { - $this->vfs = CreateObject('phpgwapi.vfs'); + $to_decode = Array( /* Decode @@ -77,24 +74,14 @@ 'todir', 'sortby', 'fileman', - 'upload_file', - 'upload_comment', - 'upload_name', 'messages', 'help_name', 'renamefiles', 'comment_files', 'show_upload_boxes', 'submit', - 'cancel', 'rename', - 'upload', - 'edit_comments', - 'apply_edit_comment', - 'apply_edit_name', - 'changes', 'delete', - 'edit', 'go', 'copy', 'move', @@ -135,7 +122,7 @@ define('NULL',''); } - $this->so = CreateObject('filemanager.sofilemanager'); + $this->so = CreateObject('filemanager.sophpwebhosting'); $this->file_attributes = Array( 'name' => 'Filename', @@ -159,28 +146,19 @@ if($this->debug) { - echo 'DEBUG: bo.bofilemanager: PATH = '.$this->path.'
'."\n"; + echo 'DEBUG: bo.bophpwebhosting: PATH = '.$this->path.'
'."\n"; } if(!$this->path) { $this->path = $this->vfs->pwd(); - if (!$this->path || $this->vfs->pwd(array( - 'full' => False - )) == '') + if (!$this->path || $this->vfs->pwd(False) == '') { $this->path = $this->homedir; } } - $this->vfs->cd(array( - 'relative' => False, - 'relatives'=>Array(RELATIVE_NONE) - )); - $this->vfs->cd(array( - 'string' => $this->path, - 'relative' => False, - 'relatives' => Array(RELATIVE_NONE) - )); + $this->vfs->cd(False,False,Array(RELATIVE_NONE)); + $this->vfs->cd($this->path,False,Array(RELATIVE_NONE)); $this->pwd = $this->vfs->pwd(); @@ -214,7 +192,7 @@ if($this->debug) { - echo 'Filemanager debug:
' + echo 'PHPWebHosting debug:
' . 'path: '.$this->path.'
' . 'disppath: '.$this->disppath.'
' . 'cwd: '.$this->cwd.'
' @@ -222,11 +200,8 @@ . 'fakebase: '.$this->fakebase.'
' . 'homedir: '.$this->homedir.'

' . 'phpGW debug:
' - . 'real cabsolutepath: '.$this->vfs->getabsolutepath(array( - 'string' => False, - 'fake' => False - )).'
' - . 'fake getabsolutepath: '.$this->vfs->getabsolutepath().'
' + . 'real getabsolutepath: '.$this->vfs->getabsolutepath(False, False, False).'
' + . 'fake getabsolutepath: '.$this->vfs->getabsolutepath(False).'
' . 'appsession: '.$GLOBALS['phpgw']->session->appsession('vfs','').'
' . 'pwd: '.$this->vfs->pwd().'
'; } @@ -267,21 +242,8 @@ function initialize_vars($name) { - $var = get_var($name,Array('GET','POST')); - - //to get the file uploads, without requiring register_globals in php.ini - if(phpversion() >= '4.2.0') - { - $meth = '_FILES'; - } - else - { - $meth = 'HTTP_POST_FILES'; - } - if(@isset($GLOBALS[$meth][$name])) - { - $var = $GLOBALS[$meth][$name]; - } + $var = ($GLOBALS['HTTP_GET_VARS'][$name]?$GLOBALS['HTTP_GET_VARS'][$name]:''); + $var = ($GLOBALS['HTTP_POST_VARS'][$name]?$GLOBALS['HTTP_POST_VARS'][$name]:$var); if($this->debug) { echo ''."\n"; @@ -321,23 +283,12 @@ if ($this->path == $this->fakebase) { - if (!$this->vfs->file_exists(array( - 'string' => $this->homedir, - 'relatives' =>Array(RELATIVE_NONE) - ))) + if (!$this->vfs->file_exists($this->homedir,Array(RELATIVE_NONE))) { - $this->vfs->mkdir(array( - 'string' => $this->homedir, - 'relatives' => Array(RELATIVE_NONE) - )); + $this->vfs->mkdir($this->homedir,Array(RELATIVE_NONE)); } - $ls_array = $this->vfs->ls(array( - 'string' => $this->homedir, - 'relatives' =>Array(RELATIVE_NONE), - 'checksubdirs' => False, - 'nofiles' => True - )); + $ls_array = $this->vfs->ls($this->homedir,Array(RELATIVE_NONE),False,False,True); $this->files_array[] = $ls_array[0]; reset ($this->memberships); @@ -352,40 +303,20 @@ continue; } - if (!$this->vfs->file_exists(array( - 'string' => $this->fakebase.'/'.$group_array['account_name'], - 'relatives' => Array(RELATIVE_NONE) - ))) + if (!$this->vfs->file_exists($this->fakebase.'/'.$group_array['account_name'],Array(RELATIVE_NONE))) { - $this->vfs->mkdir(array( - 'string' => $this->fakebase.'/'.$group_array['account_name'], - 'relatives' => Array(RELATIVE_NONE) - )); - $this->vfs->set_attributes(array( - 'string' => $this->fakebase.'/'.$group_array['account_name'], - 'relatives' => Array(RELATIVE_NONE), - 'attributes'=> Array('owner_id' => $group_array['account_id'], 'createdby_id' => $group_array['account_id']) - )); + $this->vfs->mkdir($this->fakebase.'/'.$group_array['account_name'],Array(RELATIVE_NONE)); + $this->vfs->set_attributes($this->fakebase.'/'.$group_array['account_name'],Array(RELATIVE_NONE),Array('owner_id' => $group_array['account_id'], 'createdby_id' => $group_array['account_id'])); } - $ls_array = $this->vfs->ls(array( - 'string' => $this->fakebase.'/'.$group_array['account_name'], - 'relatives' => Array(RELATIVE_NONE), - 'checksubdirs' => False, - 'nofiles' => True - )); + $ls_array = $this->vfs->ls($this->fakebase.'/'.$group_array['account_name'],Array(RELATIVE_NONE),False,False,True); $this->files_array[] = $ls_array[0]; } } else { - $ls_array = $this->vfs->ls(array( - 'string' => $this->path, - 'relatives' => Array(RELATIVE_NONE), - 'checksubdirs' => False, - 'orderby' =>$this->sortby - )); + $ls_array = $this->vfs->ls($this->path,Array(RELATIVE_NONE),False,False,False,$this->sortby); if ($this->debug) { @@ -405,6 +336,7 @@ { $this->files_array = Array(); } + return $this->files_array; } @@ -420,7 +352,7 @@ } else { - $data = ''; + $data = ' '; } return $data; } @@ -429,76 +361,15 @@ { $this->path = $this->todir; } - function f_apply_edit_comment() - { - $result=Array(); - for ($i=0; $ifileman) ; $i++) - { - $file = $this->fileman[$i]; - - if (!$this->vfs->set_attributes (array ( - 'string' => $file, - 'relatives' => array (RELATIVE_ALL), - 'attributes' => array ( - 'comment' => stripslashes ($this->changes[$file]) - ) - ) - )) - { - $result[] = lang('error: failed to change comment for : %1', $file); - } - } - - return $result; - } - - function f_apply_edit_name() - { - $result = Array(); - while (list ($from, $to) = each ($this->changes)) - { - if ($badchar = $this->bad_chars ($to, True, True)) - { - $result[] = lang('file names cannot contain %1', $badchar); - continue; - } - - if (ereg ("/", $to) || ereg ("\\\\", $to)) - { - //echo $GLOBALS['phpgw']->common->error_list (array ("File names cannot contain \\ or /")); - $result[] = lang('file names cannot contain \\ or /'); - } - elseif (!$this->vfs->mv (array ( - 'from' => $from, - 'to' => $to - )) - ) - { - //echo $GLOBALS['phpgw']->common->error_list (array ('Could not rename '.$disppath.'/'.$from.' to '.$disppath.'/'.$to)); - $result[] = lang('could not rename %1 to %2', $this->path.'/'.$from, $this->path.'/'.$to); - } - else - { - $result[] = lang('renamed %1 to %2', $this->path.'/'.$this->path.'/'.$from, $to); - } - } - return $result; - } function f_delete() { - $result = Array(); $numoffiles = count($this->fileman); for($i=0;$i!=$numoffiles;$i++) { if($this->fileman[$i]) { - $ls_array = $this->vfs->ls(array( - 'string' => $this->path.SEP.$this->fileman[$i], - 'relatives' => Array(RELATIVE_NONE), - 'checksubdirs' =>False, - 'nofiles' => True - )); + $ls_array = $this->vfs->ls($this->path.SEP.$this->fileman[$i],Array(RELATIVE_NONE),False,False,True); $fileinfo = $ls_array[0]; if($fileinfo) { @@ -510,87 +381,70 @@ { $mime_type = 'File'; } - if($this->vfs->delete(array( - 'string' => $this->path.SEP.$this->fileman[$i], - 'relatives' => Array(RELATIVE_USER_NONE) - ))) + if($this->vfs->delete($this->path.SEP.$this->fileman[$i],Array(RELATIVE_USER_NONE))) { - $result[] = lang('deleted: %1', $this->path.SEP.$this->fileman[$i]); + $errors[] = ''.$mime_type.' Deleted: '.$this->path.SEP.$this->fileman[$i].''; } else { - $result[] = lang('could not delete: %1',$this->path.SEP.$this->fileman[$i]); + $errors[] = 'Could not delete '.$this->path.SEP.$this->fileman[$i].''; } } else { - $result[] = lang('%1 does not exist!', $this->path.SEP.$this->fileman[$i]); + $errors[] = ''.$this->path.SEP.$this->fileman[$i].' does not exist!'; } } } - return $result; + return $errors; } function f_copy() { - $result = Array(); $numoffiles = count($this->fileman); for($i=0;$i!=$numoffiles;$i++) { if($this->fileman[$i]) { - if($this->vfs->cp(array( - 'from' => $this->path.SEP.$this->fileman[$i], - 'to' => $this->todir.SEP.$this->fileman[$i], - 'relatives' => Array(RELATIVE_NONE,RELATIVE_NONE) - ))) + if($this->vfs->cp($this->path.SEP.$this->fileman[$i],$this->todir.SEP.$this->fileman[$i],Array(RELATIVE_NONE,RELATIVE_NONE))) { - $result[] = lang('file copied: %1 to %2'.$this->path.SEP.$this->fileman[$i],$this->todir.SEP.$this->fileman[$i]); + $errors[] = 'File copied: '.$this->path.SEP.$this->fileman[$i].' to '.$this->todir.SEP.$this->fileman[$i].''; } else { - $result[] = lang('could not copy %1 to %2', $this->path.SEP.$this->fileman[$i],$this->todir.SEP.$this->fileman[$i]); + $errors[] = 'Could not copy '.$this->path.SEP.$this->fileman[$i].' to '.$this->todir.SEP.$this->fileman[$i].''; } } } - return $result; + return $errors; } function f_move() { - $result = Array(); $numoffiles = count($this->fileman); for($i=0;$i!=$numoffiles;$i++) { if($this->fileman[$i]) { - if($this->vfs->mv(array( - 'from' => $this->path.SEP.$this->fileman[$i], - 'to' => $this->todir.SEP.$this->fileman[$i], - 'relatives' => Array(RELATIVE_NONE,RELATIVE_NONE) - ))) + if($this->vfs->mv($this->path.SEP.$this->fileman[$i],$this->todir.SEP.$this->fileman[$i],Array(RELATIVE_NONE,RELATIVE_NONE))) { - $result[] = lang('file moved: %1 to %2',$this->path.SEP.$this->fileman[$i], $this->todir.SEP.$this->fileman[$i]); + $errors[] = 'File moved: '.$this->path.SEP.$this->fileman[$i].' to '.$this->todir.SEP.$this->fileman[$i].''; } else { - $result[] = lang('could not move: %1 to %2',$this->path.SEP.$this->fileman[$i], $this->todir.SEP.$this->fileman[$i]); + $errors[] = 'Could not move '.$this->path.SEP.$this->fileman[$i].' to '.$this->todir.SEP.$this->fileman[$i].''; } } } - return $result; + return $errors; } function f_download() { - $result = Array(); $numoffiles = count($this->fileman); for($i=0;$i!=$numoffiles;$i++) { - if($this->fileman[$i] && $this->vfs->file_exists(array( - 'string' => $this->bo->path.SEP.$this->bo->fileman[$i], - 'relatives' => Array(RELATIVE_NONE) - ))) + if($this->fileman[$i] && $this->vfs->file_exists($this->bo->path.SEP.$this->bo->fileman[$i],Array(RELATIVE_NONE))) { execmethod($this->appname.'.ui'.$this->appname.'.view_file', Array( @@ -598,228 +452,88 @@ 'file' => $this->fileman[$i] ) ); - $result[] = lang('file downloaded: %1', $this->path.SEP.$this->fileman[$i]); + $errors[] = 'File downloaded: '.$this->path.SEP.$this->fileman[$i].''; } else { - $result[] = lang('file does not exist: %1', $this->path.SEP.$this->fileman[$i]); + $errors[] = 'File does not exist: '.$this->path.SEP.$this->fileman[$i].''; } } - return $result; + return $errors; } function f_newdir() { - $result = Array(); if ($this->newdir && $this->createdir) { if ($badchar = $this->bad_chars($this->createdir,True,True)) { - $result[] = lang('directory names cannot contain "%1"', $badchar); - return $result; + $errors[] = 'Directory names cannot contain "'.$badchar.'"'; + return $errors; } if (substr($this->createdir,strlen($this->createdir)-1,1) == ' ' || substr($this->createdir,0,1) == ' ') { - $result[] = lang('cannot create directory because it begins or ends in a space'); - return $result; + $errors[] = 'Cannot create directory because it begins or ends in a space'; + return $errors; } - $ls_array = $this->vfs->ls(array( - 'string' => $this->path.SEP.$this->createdir, - 'relatives' => Array(RELATIVE_NONE), - 'checksubdirs' => False, - 'nofiles' => True - )); + $ls_array = $this->vfs->ls($this->path.SEP.$this->createdir,Array(RELATIVE_NONE),False,False,True); $fileinfo = $ls_array[0]; if ($fileinfo['name']) { if ($fileinfo['mime_type'] != 'Directory') { - $result[] = lang('%1 already exists as a file', $fileinfo['name']); + $errors[] = ''.$fileinfo['name'].' already exists as a file'; } else { - $result[] = lang('directory %1 already exists', $fileinfo['name']); + $errors[] = 'Directory '.$fileinfo['name'].' already exists.'; } } else { - if ($this->vfs->mkdir(array( - 'string' => $this->path.SEP.$this->createdir, - 'relatives' => Array(RELATIVE_NONE) - ))) + if ($this->vfs->mkdir($this->path.SEP.$this->createdir,Array(RELATIVE_NONE))) { - $result[] = lang('created directory %1', $this->path.SEP.$this->createdir); - $this->path = $this->path.SEP.$this->createdir; + $errors[] = 'Created directory '.$this->path.SEP.$this->createdir.''; +// $this->path = $this->path.SEP.$this->createdir; } else { - $result[] = lang('could not create ', $this->path.SEP.$this->createdir); + $errors[] = 'Could not create '.$this->path.SEP.$this->createdir.''; } } } - return $result; + return $errors; } function f_newfile() { - $result = Array(); - //echo "newfile: ".$this->newfile ." createfile: ".$this->createfile; - //die(); if ($this->newfile && $this->createfile) { if($badchar = $this->bad_chars($this->createfile,True,True)) { - $result[] = lang('file names cannot contain %1', $badchar); - return $result; + $errors[] = 'Filenames cannot contain "'.$badchar.'"'; + return $errors; } - if($this->vfs->file_exists(array( - 'string' => $this->createfile, - 'relatives' => Array(RELATIVE_ALL) - ))) + if($this->vfs->file_exists($this->path.SEP.$this->createfile,Array(RELATIVE_NONE))) { - $result[] = lang('file %1 already exists. Please edit it or delete it first', $this->path.SEP.$this->createfile); - return $result; + $errors[] = 'File '.$this->path.SEP.$this->createfile.' already exists. Please edit it or delete it first.'; + return $errors; } - if(!$this->vfs->touch(array( - 'string' => $this->createfile, - 'relatives' => Array(RELATIVE_ALL) - ))) + if(!$this->vfs->touch($this->path.SEP.$this->createfile,Array(RELATIVE_NONE))) { - $result[] = lang('file %1 could not be created', $this->path.SEP.$this->createfile); + $errors[] = 'File '.$this->path.SEP.$this->createfile.' could not be created.'; } } else { - - $result[] = lang('filename not provided!'); + $errors[] = 'Filename not provided!'; } - return $result; + return $errors; } - - function f_upload() - { - $result = Array(); - for ($i = 0; $i != $this->show_upload_boxes; $i++) - { - if ($badchar = $this->bad_chars ($this->upload_file['name'][$i], True, True)) - { - $result[] = lang('file names cannot contain %1',$badchar); - //echo $GLOBALS['phpgw']->common->error_list (array (html_encode ('File names cannot contain "'.$badchar.'"', 1))); - continue; - } - - ### - # Check to see if the file exists in the database, and get its info at the same time - ### - - $ls_array = $this->vfs->ls (array ( - 'string' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_ALL), - 'checksubdirs' => False, - 'nofiles' => True - ) - ); - - $fileinfo = $ls_array[0]; - - if ($fileinfo['name']) - { - if ($fileinfo['mime_type'] == 'Directory') - { - $result[] = lang('cannot replace %1 because it is a directory', $fileinfo['name']); - continue; - } - } - - if ($this->upload_file['size'][$i] > 0) - { - if ($fileinfo['name'] && $fileinfo['deleteable'] != 'N') - { - if ( - $this->vfs->cp (array ( - 'from' => $this->upload_file['tmp_name'][$i], - 'to' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) - ) - ) - ) { - $this->vfs->set_attributes (array ( - 'string' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_ALL), - 'attributes' => array ( - 'owner_id' => $GLOBALS['userinfo']['username'], - 'modifiedby_id' => $GLOBALS['userinfo']['username'], - 'modified' => $now, - 'size' => $this->upload_file['size'][$i], - 'mime_type' => $this->upload_file['type'][$i], - 'deleteable' => 'Y', - 'comment' => stripslashes ($upload_comment[$i]) - ) - ) - ); - } else { - $result[] = lang( 'failed to upload file: %1',$this->upload_file['name'][$i]); - continue; - } - - $result[] = lang('replaced %1 (%2 bytes)',$this->path.'/'.$this->upload_file['name'][$i],$this->upload_file['size'][$i]); - } - else - { - if ( - $this->vfs->cp (array ( - 'from' => $this->upload_file['tmp_name'][$i], - 'to' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) - ) - ) - ) { - - $this->vfs->set_attributes (array ( - 'string' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_ALL), - 'attributes' => array ( - 'mime_type' => $this->upload_file['type'][$i], - 'comment' => stripslashes ($this->upload_comment[$i]) - ) - ) - ); - } else { - $result[] = lang('failed to upload file: %1',$this->upload_file['name'][$i]); - continue; - } - $result[] = lang('created %1 (%2 bytes)',$this->path.'/'.$this->upload_file['name'][$i] , $this->upload_file['size'][$i]); - } - } - elseif ($this->upload_file['name'][$i]) - { - $this->vfs->touch (array ( - 'string' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_ALL) - ) - ); - - $this->vfs->set_attributes (array ( - 'string' => $this->upload_file['name'][$i], - 'relatives' => array (RELATIVE_ALL), - 'attributes' => array ( - 'mime_type' => $this->upload_file['type'][$i], - 'comment' => $this->upload_comment[$i] - ) - ) - ); - - $result .= ' Created '.$this->path.'/'.$this->upload_file['name'][$i].' '. $this->file_size[$i]; - } - } - - return $result; - - } function load_help_info() { $this->help_info = Array( @@ -987,9 +701,9 @@ return($this->eor(htmlspecialchars($string),$return)); } - /* function translate ($text) + function translate ($text) { return($GLOBALS['phpgw']->lang($text)); - }*/ + } } ?> diff --git a/filemanager/inc/class.sofilemanager.inc.php b/filemanager/inc/class.sophpwebhosting.inc.php similarity index 91% rename from filemanager/inc/class.sofilemanager.inc.php rename to filemanager/inc/class.sophpwebhosting.inc.php index a7c9311b70..f3f5097500 100755 --- a/filemanager/inc/class.sofilemanager.inc.php +++ b/filemanager/inc/class.sophpwebhosting.inc.php @@ -1,10 +1,10 @@ db->Auto_Free = 0; } diff --git a/filemanager/inc/class.uiaction_base.inc.php b/filemanager/inc/class.uiaction_base.inc.php deleted file mode 100644 index 94a775cac6..0000000000 --- a/filemanager/inc/class.uiaction_base.inc.php +++ /dev/null @@ -1,28 +0,0 @@ -common->phpgw_header(); - } - - function action_link($action) - { - return $GLOBALS['phpgw']->link('/index.php', - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.action', - 'path' => urlencode($this->bo->path), - 'uiaction' => urlencode($action) - ) - ); - - } - } - - -?> \ No newline at end of file diff --git a/filemanager/inc/class.uiaction_edit.inc.php b/filemanager/inc/class.uiaction_edit.inc.php deleted file mode 100644 index cf38a6f3ca..0000000000 --- a/filemanager/inc/class.uiaction_edit.inc.php +++ /dev/null @@ -1,185 +0,0 @@ - 'Edit', - 'edit_save' => false, - 'edit_preview' => false, - 'edit_cancel' => false - ); - - function uiaction_edit() - { - $this->bo = CreateObject('filemanager.bofilemanager'); - - $GLOBALS['phpgw']->xslttpl->add_file(array('widgets',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'app_header')); - - $var = Array( - 'img_up' => array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'up'), - 'alt' => lang('up'), - 'link' => $GLOBALS['phpgw']->link('/index.php',Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->lesspath) - )) - )), - - 'img_home' => array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'folder_home'), - 'alt' => lang('folder'), - 'link' => $GLOBALS['phpgw']->link('/index.php',Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->homedir) - )) - )), - - 'dir' => $this->bo->path, - 'img_dir' => array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'folder_large'), - 'alt' => lang('folder') - )), - ); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('filemanager_nav' => $var)); - - $this->template_dir = $GLOBALS['phpgw']->common->get_tpl_dir($GLOBALS['phpgw_info']['flags']['currentapp']); - } - function edit($parent, $param=false) - { - - $GLOBALS['phpgw']->xslttpl->add_file(array('edit',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'app_header')); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('form_action' =>$GLOBALS['phpgw']->link('/index.php', - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.action', - 'path' => $this->bo->path - ) - ))); - $this->load_header(); - $this->bo = &$parent->bo; - if (UIEDIT_DEBUG) echo ' action::edit '; - $edit_file = get_var('file', array('GET', 'POST')); - if (!strlen($edit_file)) - { - $edit_file = $this->bo->fileman[0]; - } -/* $this->bo->vfs->cd(array( - 'string' => $this->bo->path, - 'relatives' => array(RELATIVE_NONE) - )); - - // echo "path ".$this->bo->vfs->pwd()." Editing: ".$edit_file; -*/ - $vars = array(); - $vars['action1'][] = array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'preview'), - )); - $vars['action1'][] = array('widget' => array('type' => 'submit', - 'name' => "uiaction_edit_preview", - 'value'=>lang('preview') - )); - $vars['action2'][] = array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'filesave'), - )); - $vars['action2'][] = array('widget' => array('type' => 'submit', - 'name' => 'uiaction_edit_save', - 'value'=>lang('save') - )); - $vars['action3'][] = array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'button_cancel'), - )); - - $vars['action3'][] = array('widget' => array('type' => 'submit', - 'name' => 'uiaction_edit_cancel', - 'value'=>lang('close') - )); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('nav_data' => $vars)); - $vars = array('filename' => $edit_file); - - if (get_var('edited', array('GET', 'POST'))) - { - $content = get_var('edit_file_content', array('GET', 'POST')); - if (get_magic_quotes_gpc()) //a thousand curses! - { - $content = stripslashes($content); - } - } - else - { - $content = $this->bo->vfs->read (array ('string' => $edit_file)); - } - - if ($param == 'edit_preview') - { - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('preview'=>$content)); - // $vars['preview'] = nl2br($content); - } - - elseif ($param =='edit_save') - { - if ($this->bo->vfs->write (array ( - 'string' => $parent->bo->path.'/'.$edit_file , - 'relatives' => array(RELATIVE_NONE), - 'content' => $content - )) - ) - { - $vars['output'] = lang('Saved %1', $parent->bo->path.'/'.$edit_file); - } - else - { - $vars['output'] = lang('Could not save %1', $parent->bo->path.'/'.$edit_file); - } - } - - if ($edit_file && $this->bo->vfs->file_exists (array ( - 'string' => $edit_file, - 'relatives' => array (RELATIVE_ALL) - )) - ) - { - $vars['form_data'][] = array('widget' => array('type' => "hidden" , - 'name'=> "edited", - 'value'=>"1" - )); - - $vars['form_data'][] = array('widget' => array('type' => "hidden", - 'name' => 'edit_file', - 'value' => $edit_file - )); - - $vars['form_data'][] = array('widget' => array('type'=>"hidden", - 'name'=> "fileman[0]", - 'value' => $this->bo->html_encode($edit_file,1) - )); - $vars['file_content'] = $content; - } - //} - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('filemanager_edit' => $vars)); - } - - function edit_cancel($parent) - { - $url = $GLOBALS['phpgw']->link('/index.php', - Array( - 'menuaction' => $parent->bo->appname.'.ui'.$parent->bo->appname.'.index', - 'path' => urlencode($parent->bo->path), - ) - ); - //echo "cancel : $url"; - header('Location: '. $url); - exit(); - } - function edit_save($parent) - { - $this->edit($parent, 'edit_save'); - } - - function edit_preview($parent) - { - $this->edit($parent, 'edit_preview'); - } - } -?> diff --git a/filemanager/inc/class.uiactions.inc.php b/filemanager/inc/class.uiactions.inc.php deleted file mode 100644 index 57a6fac29e..0000000000 --- a/filemanager/inc/class.uiactions.inc.php +++ /dev/null @@ -1,50 +0,0 @@ -'filemanager.uiaction_edit' - ); - var $actions = array(); - - function uiactions() - { - //Construct the action objects - foreach($this->action_classes as $action_class) - { - $o = CreateObject($action_class); - foreach ($o->actions as $name => $displayname) - { - $this->actions[$name] = &$o; - } - } - } - function run_action($parent, $action) - { - - - // print_r($this->actions); - $this->actions[$action]->$action($parent); - exit(); - } - function dispatch($parent) - { - //First, see if the action is specified in the url with a 'uiaction=' param - if ($action = get_var('uiaction', array('GET', 'POST'))) - { - $this->run_action($parent, $action); - } - @reset($_POST); - while(list($name,$value) = each($_POST)) - { - if (substr($name, 0 , 8) == 'uiaction') - { - $action = substr($name, 9); - $this->run_action($parent, $action); - - } - } - - } - } -?> diff --git a/filemanager/inc/class.uifilemanager.inc.php b/filemanager/inc/class.uifilemanager.inc.php deleted file mode 100755 index a3ac4a0771..0000000000 --- a/filemanager/inc/class.uifilemanager.inc.php +++ /dev/null @@ -1,1133 +0,0 @@ - * - * Modified by Jonathon Sim for Zeald Ltd * - * User interface for the filemanager app * - * Copyright (C) 2002 Mark A Peters (C) 2003 Zeald Ltd * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - - /* $Id$ */ - define('UI_DEBUG', 0); - - class uifilemanager - { - - var $public_functions = array( - 'index' => True, - 'action' => True, - 'help' => True, - 'history' => True, - 'view' => True, - 'view_file' => True, - 'edit' => True, - 'rename' => True, - 'edit_comments' => True - ); - - var $bo; - var $nextmatchs; - var $browser; - var $template_dir; - var $help_info; - var $mime_ico = array ( - 'application/pdf' => 'pdf', - 'application/postscript' => 'postscript', - 'application/msword' => 'word', - 'application/vnd.ms-excel' => 'excel', - 'application/vnd.ms-powerpoint' => 'ppt', - 'application/x-gzip' => 'tgz', - 'application/x-bzip' => 'tgz', - 'application/zip' => 'tgz', - 'application/x-debian-package' => 'deb', - 'application/x-rpm' => 'rpm', - 'application' => 'document', - 'application/octet-stream' => 'unknown', - 'audio' => 'sound', - 'audio/mpeg' => 'sound', - 'Directory' => 'folder', - 'exe' => 'exe', - 'image' => 'image', - 'text' => 'txt', - 'text/html' => 'html', - 'text/plain' => 'txt', - 'text/xml' => 'html', - 'text/x-vcalendar' => 'vcalendar', - 'text/calendar' => 'vcalendar', - 'text/x-vcard' => 'vcard', - 'text/x-tex' => 'tex', - 'unknown' => 'unknown', - 'video' => 'video', - 'message' => 'message' -); - - function uifilemanager() - { - $this->no_header(); - $this->actions = CreateObject('filemanager.uiactions'); - $this->bo = CreateObject('filemanager.bofilemanager'); - $this->nextmatchs = CreateObject('phpgwapi.nextmatchs'); - $this->browser = CreateObject('phpgwapi.browser'); - //$this->template_dir = $GLOBALS['phpgw']->common->get_tpl_dir($GLOBALS['phpgw_info']['flags']['currentapp']); - $this->check_access(); - $this->create_home_dir(); - $this->verify_path(); - $this->update(); - - } - - function load_header() - { - unset($GLOBALS['phpgw_info']['flags']['noheader']); - unset($GLOBALS['phpgw_info']['flags']['nonavbar']); - unset($GLOBALS['phpgw_info']['flags']['noappheader']); - unset($GLOBALS['phpgw_info']['flags']['noappfooter']); - unset($GLOBALS['phpgw_info']['flags']['noappfooter']); - unset($GLOBALS['phpgw_info']['flags']['headonly']); - $GLOBALS['phpgw']->xslttpl->add_file(array('widgets')); - $GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'app_header')); - - } - function no_header() - { - $GLOBALS['phpgw_info']['flags']['noheader'] = True; - $GLOBALS['phpgw_info']['flags']['nonavbar'] = True; - $GLOBALS['phpgw_info']['flags']['noappheader'] = True; - $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; - $GLOBALS['phpgw_info']['flags']['headonly'] = True; - $GLOBALS['phpgw']->xslttpl->add_file(array('widgets')); - - - } - function check_access() - { - if($this->bo->path != $this->bo->homedir && $this->bo->path != $this->bo->fakebase && $this->bo->path != '/' && !$this->bo->vfs->acl_check(array( - 'string'=>$this->bo->path, - 'relatives' => Array(RELATIVE_NONE), - 'operation' => PHPGW_ACL_READ))) - { - $this->no_access_exists(lang('you do not have access to %1',$this->bo->path)); - } - $this->bo->userinfo['working_id'] = $this->bo->vfs->working_id; - $this->bo->userinfo['working_lid'] = $GLOBALS['phpgw']->accounts->id2name($this->bo->userinfo['working_id']); - } - - /**TODO: xslt-ise this (and get rid of the hard-coded html)*/ - function no_access_exists($error_msg) - { - if($this->bo->debug) - { - echo 'DEBUG: ui.no_access_exists: you do not have access to this directory
'."\n"; - } - $p = CreateObject('phpgwapi.Template',$this->template_dir); - $p->set_unknowns('remove'); - - $p->set_file( - Array( - '_errors' => 'errors.tpl' - ) - ); - $p->set_block('_errors','error_page','error_page'); - $p->set_block('_errors','ind_error','ind_error'); - - $p->set_var('error',$error_msg); - $p->parse('errors','ind_error',True); - - $p->set_var('error','

Go to your
Home directory' - ); - $p->parse('errors','ind_error',True); - $p->pfp('output','error_page'); - exit(); - } - - function create_home_dir() - { - ### - # If their home directory doesn't exist, we create it - # Same for group directories - ### - - if($this->bo->debug) - { - echo 'DEBUG: ui.create_home_dir: PATH = '.$this->bo->path.'
'."\n"; - echo 'DEBUG: ui.create_home_dir: PATH = '.urlencode($this->bo->path).'
'."\n"; - } - - if(($this->bo->path == $this->bo->homedir) && !$this->bo->vfs->file_exists(array( - 'string' => $this->bo->homedir, - 'relatives' => Array(RELATIVE_NONE) - ))) - { - $this->bo->vfs->override_acl = 1; - if (!$this->bo->vfs->mkdir(array( - 'string' => $this->bo->homedir, - 'relatives' => Array(RELATIVE_NONE) - ))) - { -//TODO: xsltise echo lang('failed to create directory') . ' :'. $this->bo->homedir . "\n"; - } - $this->bo->vfs->override_acl = 0; - } - elseif(preg_match("|^".$this->bo->fakebase."\/(.*)$|U",$this->bo->path,$this->bo->matches)) - { - if (!$this->bo->vfs->file_exists(array( - 'string' => $this->bo->path, - 'relatives' => Array(RELATIVE_NONE) - ))) - { - //$this->bo->vfs->override_acl = 1; - if (!$this->bo->vfs->mkdir(array( - 'string' => $this->bo->homedir, - 'relatives' => Array(RELATIVE_NONE) - ))) - { -//TODO: xsltise echo lang('failed to create directory') . ' '. $this->bo->homedir . '

'; - } - //$this->bo->vfs->override_acl = 0; - - if($this->bo->debug) - { - echo 'DEBUG: ui.create_home_dir: PATH = '.$this->bo->path.'
'."\n"; - echo 'DEBUG: ui.create_home_dir(): matches[1] = '.$this->bo->matches[1].'
'."\n"; - } - - $group_id = $GLOBALS['phpgw']->accounts->name2id($this->bo->matches[1]); - if($group_id) - { - $this->bo->vfs->set_attributes(array( - 'string' => $this->bo->path, - 'relatives' => Array(RELATIVE_NONE), - 'attributes' => Array('owner_id' => $group_id, 'createdby_id' => $group_id) - )); - } - } - } - } - - function verify_path() - { - ### - # Verify path is real - ### - - if($this->bo->debug) - { - echo 'DEBUG: ui.verify_path: PATH = '.$this->bo->path.'
'."\n"; - echo 'DEBUG: ui.verify_path: exists = '.$this->bo->vfs->file_exists(array( - 'string' => $this->bo->path, - 'relatives' => Array(RELATIVE_NONE))).'
'."\n"; - } - - if($this->bo->path != $this->bo->homedir && - $this->bo->path != '/' && - $this->bo->path != $this->bo->fakebase && - !$this->bo->vfs->file_exists(array( - 'string' => $this->bo->path, - 'relatives' => Array(RELATIVE_NONE) - ))) - { - $this->no_access_exists(lang('directory %1 does not exist',$this->bo->path)); - } - } - - function update() - { - /* Update if they request it, or one out of 20 page loads */ - srand((double)microtime() * 1000000); - if($this->bo->update || rand(0,19) == 4) - { - $this->bo->vfs->update_real( array( - 'string' => $this->bo->path, - 'relatives' =>Array(RELATIVE_NONE) - )); - } - if($this->bo->update) - { - Header('Location: '.$GLOBALS['phpgw']->link( - '/index.php', - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path) - ) - ) - ); - } - } - //Dispatches various file manager actions to the appropriate handler - function action() - { - if (UI_DEBUG) - { - echo " Debug mode
"; - echo "function : ".$this->bo->$function; - print_r($_POST); - die(); - - } - $actions = Array( - 'rename' => lang('rename'), - 'delete' => lang('delete'), - 'go' => lang('go to'), - 'copy' => lang('copy to'), - 'move' => lang('move to'), - 'download' => lang('download'), - 'newdir' => lang('create folder'), - 'newfile' => lang('create file'), - 'edit' => lang('edit'), - 'edit_comments' => lang('edit comments'), - 'apply_edit_comment' => '1', - 'apply_edit_name' => '1', - 'cancel' => lang('cancel'), - 'upload' => lang('upload files') - ); - - $local_functions = array( - 'rename', - 'edit_comments' - ); - $bo_functions = array( - 'apply_edit_comment', - 'apply_edit_name', - 'copy', - 'delete', - 'move', - 'newdir', - 'newfile', - 'go', - 'upload', - 'download' - ); - if (trim(strtolower($this->bo->cancel)) == strtolower(lang('cancel'))) { - $this->cancel(); - exit(); - } - //If the action is a "uiaction" (ie it has its own seperate interface), this will run it - $this->actions->dispatch($this); - @reset($actions); - while(list($function,$text) = each($actions)) - { - if(isset($this->bo->$function) && !empty($this->bo->$function) && trim(strtolower($this->bo->$function)) == strtolower($text)) - { - //If the action is provided by this class, this'l do it - if (in_array($function, $local_functions)) - { - //echo " uifunction $function "; - //Header('Location: '.$GLOBALS['phpgw']->link('/index.php',$var)); - $this->$function(); - exit(); - } //For actions provided by the back-end, with no gui - elseif (in_array($function, $bo_functions)) - { - //echo " bofunction $function "; - $f_function = 'f_'.$function; - $errors = implode("\n", $this->bo->$f_function()); - $var = Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path) - ); - if($function == 'newfile') - { - $var = Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.action', - 'uiaction' => 'edit', - 'path' => urlencode($this->bo->path), - 'file' => urlencode($this->bo->createfile) - ); - } - elseif(strlen($errors)) - { - $var['errors'] = $errors; - } - Header('Location: '.$GLOBALS['phpgw']->link('/index.php',$var)); - exit(); - } - } - - } - Header('Location: '.$GLOBALS['phpgw']->link('/index.php',Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path), - 'errors' => lang('unknown action!') - ))); - } - - /**TODO : xslt-ise this */ - function help() - { - $this->load_header(); - $this->bo->load_help_info(); - @reset($this->bo->help_info); - while(list($num,$help_array) = each($this->bo->help_info)) - { - if ($help_array[0] != $this->bo->help_name) - { - continue; - } - - $help_array[1] = preg_replace("/\[(.*)\|(.*)\]/Ue","\$this->build_help('\\1','\\2')",$help_array[1]); - $help_array[1] = preg_replace("/\[(.*)\]/Ue","\$this->build_help('\\1','\\1')",$help_array[1]); - -// echo ''."\n".ucwords(str_replace('_',' ',$help_array[0]))."\n".'
'."\n"; -// echo ''."\n".$help_array[1].''; - } - exit(); - } - /**TODO : xslt-ise this */ - function build_help($help_option,$text='') - { - if($this->bo->settings['show_help']) - { - $help = ($text?'':''."\n"); - $help .= ' '; - $help .= ($text?$text:'[?]'); - $help .= ''; - $help .= ($text?'':"\n".' '); - return $help; - } - else - { - return ''; - } - } - - function display_buttons() - { - $var = array(); - - $button['type'] = 'submit'; - $button['name'] = 'uiaction_edit'; - $button['value'] = lang('edit'); - $button['caption'] = $this->build_help('edit'); - - $var[] = array('widget' => $button); - $button['name'] = "rename"; - $button['value'] =lang('rename'); - $button['caption'] = $this->build_help('rename'); - - $var[] = array('widget' => $button); - $button['name'] = "delete"; - $button['value'] =lang('delete'); - $button['caption'] = $this->build_help('delete'); - $var[] = array('widget' => $button); - - $button['name'] = "edit_comments"; - $button['value'] =lang('edit comments'); - $button['caption'] = $this->build_help('edit_comments'); - $var[] = array('widget' => $button); - - $var[] = array('widget' => array( 'type' => 'seperator' )); - - $button['name'] = "go"; - $button['value'] = lang('go to'); - $button['caption'] = $this->build_help('go_to'); - $var[] = array('widget' => $button); - - $button['name'] = "copy"; - $button['value'] = lang('copy to'); - $button['caption'] = $this->build_help('copy_to'); - $var[] = array('widget' => $button); - - $button['name'] = "move"; - $button['value'] = lang('move to'); - $button['caption'] =$this->build_help('move_to'); - $var[] = array('widget' => $button); - - - ### - # First we get the directories in their home directory - ### - - $dirs[] = Array( - 'directory' => $this->bo->fakebase, - 'name' => $this->bo->userinfo['account_lid'] - ); - $ls_array = $this->bo->vfs->ls(array( - 'string' => $this->bo->homedir, - 'relatives' => Array(RELATIVE_NONE), - 'nofiles' => True, - 'mime_type' => 'Directory')); - while(list($num,$dir) = each($ls_array)) - { - $dirs[] = $dir; - } - - ### - # Then we get the directories in their membership's home directories - ### - - reset($this->bo->memberships); - while(list($num,$group_array) = each($this->bo->memberships)) - { - ### - # Don't list directories for groups that don't have access - ### - - if(!$this->bo->membership_applications[$group_array['account_name']][$this->bo->appname]['enabled']) - { - continue; - } - - $dirs[] = Array( - 'directory' => $this->bo->fakebase, - 'name' => $group_array['account_name'] - ); - - $ls_array = $this->bo->vfs->ls(array( - 'string' => $this->bo->fakebase.SEP.$group_array['account_name'], - 'relatives' => Array(RELATIVE_NONE), - 'nofiles' => True, - 'mime_type' => 'Directory' - )); - while(list($num,$dir) = each($ls_array)) - { - $dirs[] = $dir; - } - } - - $dir_list = array(); - reset($dirs); - while(list($num, $dir) = each($dirs)) - { - if(!$dir['directory']) - { - continue; - } - - ### - # So we don't display // - ### - - if($dir['directory'] != '/') - { - $dir['directory'] .= SEP; - } - - $selected = ''; - if($num == 0) - { - $selected = ' selected'; - } - - ### - # No point in displaying the current directory, or a directory that doesn't exist - ### - - if((($dir['directory'].$dir['name']) != $this->bo->path) && $this->bo->vfs->file_exists(array( - 'string' => $dir['directory'].$dir['name'], - 'relatives' => Array(RELATIVE_NONE) - ))) - { - $dir_list[] =array('option'=> array('value'=> urlencode($dir['directory'].$dir['name']), - 'selected' => $selected, - 'caption' => $dir['directory'].$dir['name'] - )); - } - } - - $var[] = array('widget' => array( 'type' => 'select', - 'name'=> 'todir', - 'options' => $dir_list, - 'caption' => $this->build_help('directory_list') - )); - - if($this->bo->path != '/' && $this->bo->path != $this->bo->fakebase) - { - $var[] = array('widget' => array('type'=>'submit', - 'name'=> 'download', - 'value' => lang('download'), - 'caption' => $this->build_help('download') - )); - $var[] = array('widget' => array( 'type' => 'seperator' )); - $var[] = array('widget' => array('type' => 'text', - 'name' => 'createdir', - 'maxlength' => '255', - 'size' => '15' - )); - $var[] = array('widget' => array('type' => 'submit', - 'name' => 'newdir', - 'value' => lang('create folder'), - 'caption' => $this->build_help('create_folder') - )); - $var[] = array('widget' => array( 'type' => 'seperator' )); - } - /* $var[] = array('widget' => array('type' => 'submit', - 'name' => 'update', - 'value' => lang('update'), - 'caption' => $this->build_help('update') - )); -*/ - if($this->bo->path != '/' && $this->bo->path != $this->bo->fakebase) - { - $var[] = array('widget' => array( 'type' => 'text', - 'name' => 'createfile', - 'maxlength' => '255', - 'size' => '15' - )); - $var[] = array('widget' => array('type' => 'submit', - 'name' => 'newfile', - 'value' => lang('create file'), - 'caption' => $this->build_help('create_file') - )); - $var[] = array('widget' => array( 'type' => 'seperator' )); - } - - if($this->bo->settings['show_command_line']) - { - - $var[] = array('widget' => array( 'type' => 'text' , - 'name'=> 'command_line', - 'size' => '50', - 'caption' => $this->build_help('command_line') - )); - $var[] = array('widget' => array( 'type' => 'submit', - 'name' => 'execute', - 'value' => lang('execute'), - 'caption' => $this->build_help('execute') - )); - $var[] = array('widget' => array( 'type' => 'seperator' )); - } - return $var; - } -/* - function display_summary_info($numoffiles,$usedspace) - { - - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',True); - - $var['td_extras'] = ' align="right"'; - $var['column_header'] = ''.lang('used space').':'; - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',True); - - $var['td_extras'] = ' align="left"'; - $var['column_header'] = $this->bo->borkb($usedspace); - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',True); - - if($this_homedir) - { - $var['td_extras'] = ' align="right"'; - $var['column_header'] = ''.lang('unused space').':'; - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',True); - - $var['td_extras'] = ' align="left"'; - $var['column_header'] = $this->bo->borkb($this->bo->userinfo['hdspace'] - $usedspace); - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',True); - } - - $p->parse('list','column_rows',True); - $p->set_var('col_headers',''); - - if($this_homedir) - { - $var['td_extras'] = ' colspan="'.($info_columns / 2).'" align="right" width="50%"'; - $var['column_header'] = ''.lang('total files').':'; - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',False); - - $var['td_extras'] = ' colspan="'.($info_columns / 2).'" align="left" width="50%"'; - $var['column_header'] = count($this->bo->vfs->ls(array( - 'string' => $this->bo->path, - 'relatives' => Array(RELATIVE_NONE) - ))); - $p->set_var($var); - $p->parse('col_headers','column_headers_normal',True); - - $p->parse('list','column_rows',True); - $p->set_var('col_headers',''); - } - return $p->fp('output','table'); - } -*/ - function display_uploads() - { - - $var_head[] = array('widget' => array('type' => 'label', - 'caption' => lang('file').$this->build_help('upload_file') - )); - - - $var_head[] = array('widget' => array('type' => 'label', - 'caption' => lang('comment').$this->build_help('upload_comment') - )); - $table_head [] =array('table_col' => $var_head); - // $var[] = array('widget' => array('type' => 'seperator')); - for($i=0;$i<$this->bo->show_upload_boxes;$i++) - { - $var = array(); - $var[] = array('widget' => array('type' => 'file', - 'name' => 'upload_file[]' , - 'maxlength'=> '255' - )); - - $var[] = array('widget' => array('type' => 'text', - 'name' => 'upload_comment[]' - )); - -/* $var[] = array('widget' => array('type' => 'label', - 'caption' => $input_file.$input_comment - )); */ - $table_rows [] = array('table_col' => $var); - } - $var = array(); - $var[] = array('widget' => array('type' =>'submit', - 'name' => 'upload', - 'value' => lang('upload Files'), - 'caption' => $this->build_help('upload_files') - )); - - $var[] = array('widget' => array('type' => 'hidden', - 'name' => 'show_upload_boxes', - 'value' => $this->bo->show_upload_boxes - )); - - $table_rows [] = array('table_col' => $var); - - - return array('table' => array('table_head' =>$table_head , - 'table_row' => $table_rows) - ); - } - - function dirs_first($files_array) - { - $dirs = array(); - $files = array(); - $result = array(); - - for($i=0;$i!=count($files_array);$i++) - { - $file = $files_array[$i]; - if ($file['mime_type'] == 'Directory') - { - $dirs[] = $file; - } - else - { - $files[] = $file; - } - } - return array_merge($dirs, $files); - } - - function index( $edit=array()) - { - //This lets you use an alternate xslt by appending &template= to the url - if (!($template = get_var('template', array('GET', 'POST'))) ) - { - $GLOBALS['phpgw']->xslttpl->add_file(array('index',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'app_header')); - } - else - { - $GLOBALS['phpgw']->xslttpl->add_file($template); - } - - $files_array = $this->bo->load_files(); - - $usage = 0; - $files_array = $this->dirs_first($files_array); - if(count($files_array) || $this->bo->cwd) - { - $file_output = array(); - for($i=0;$i!=count($files_array);$i++) - { - $file = $files_array[$i]; - $usage += $file['size']; - if (!count($edit) ) - { - $file_attributes['checkbox'] = ''; - $file_output[$i]['checkbox'] =array('widget' => array( 'type' => 'checkbox', - 'name' => 'fileman[]', - 'value' => $file['name'] - )); - } - @reset($this->bo->file_attributes); - while(list($internal,$displayed) = each($this->bo->file_attributes)) - { - if (!is_array($this->bo->settings)||$this->bo->settings[$internal]) - { - if ($internal==$edit[$file['name']]) - { - $file_output[$i][$internal] = array('widget' => array('type' => 'text', - 'name' => 'changes['.$file['name'].']', - 'value' => $file[$internal] - )); - } - else - { - switch($internal) - { - case 'owner_id': - case 'owner': - case 'createdby_id': - case 'modifiedby_id': - $name = $GLOBALS['phpgw']->accounts->id2name($file[$internal]) ; - $file_output[$i][$internal] = $name ? $name: ''; - break; - case 'created': - case 'modified': - //Convert ISO 8601 date format used by DAV into something people can read - $file_output[$i][$internal] = $this->bo->convert_date($file[$internal]); - break; - case 'name': - $mime_parts = explode('/',$file['mime_type']); - $file_icon = $this->mime_ico[$file['mime_type']]; - if (!$file_icon) { - $file_icon = ( $this->mime_ico[$mime_parts[0]]) ? $this->mime_ico[$mime_parts[0]] : $this->mime_ico['unknown']; - if (strpos($file['name'],'.exe') !== false) $file_icon = $this->mime_ico['exe']; - } - - $file_output[$i]['name']['icon'] = array( - 'widget' => array( 'type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,$file_icon) - )); - - if ($file['mime_type']=='Directory') - { - $href = array('menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => $this->bo->path.SEP.$file['name'] - ); - } - else - { - $href = Array( 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.view', - 'path' => urlencode($this->bo->path), - 'file' => urlencode($file['name']) - ); - - } - $file_output[$i]['name']['link'] = array( - "widget"=> array( - 'type' => 'link', - 'caption' => $file['name'], - 'href' => $GLOBALS['phpgw']->link('/index.php', $href) - )); - if ($mime_parts[0] == 'text') - { - $href['menuaction'] = $this->bo->appname.'.ui'.$this->bo->appname.'.action'; - $href['uiaction'] = 'edit'; - $file_output[$i]['name']['edit'] = array('widget' => array( 'type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'pencil'), - 'link' => $GLOBALS['phpgw']->link('/index.php', $href) - )); - } - break; - default: - $file_output[$i][$internal] = $file[$internal]; - - } - } - $file_attributes[$internal] = array("widget"=> array( - 'type' => 'link', - 'caption' => $displayed, - 'href' => $GLOBALS['phpgw']->link('/index.php', array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path'=>$this->bo->path, - 'sortby' => $internal - )) - )); - } - } - } - - - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('summary' => array( - 'file_count' => count($files_array), - 'usage' => $usage - ))); - - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('file_attributes' => $file_attributes)); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array( - 'files' => array( - 'file' => $file_output - ) - ) - ); - - - $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off']; - $var = Array( - - 'form_action' => $GLOBALS['phpgw']->link('/index.php', - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.action', - 'path' => urlencode($this->bo->path) - ) - ), - 'error' => (isset($this->bo->errors) && is_array(unserialize(base64_decode($this->bo->errors)))?$GLOBALS['phpgw']->common->error_list(unserialize(base64_decode($this->bo->errors)),'Results'):''), - 'img_up' => array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'up'), - 'alt' => lang('up'), - 'link' => $GLOBALS['phpgw']->link('/index.php',Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->lesspath) - )) - )), - 'help_up' => $this->build_help('up'), - 'img_home' => array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'folder_home'), - 'alt' => lang('folder'), - 'link' => $GLOBALS['phpgw']->link('/index.php',Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->homedir) - )) - )), - 'dir' => $this->bo->path, - 'img_dir' => array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'folder_large'), - 'alt' => lang('folder'), 'link' => $GLOBALS['phpgw']->link('/index.php',Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path) - )) - )), - 'help_home' => $this->build_help('home'), - ); - if (strlen($this->bo->errors)) - { - $var['errors'] = $this->bo->errors; - } - - if (count($edit)) - { - $var['img_cancel'] = array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'button_cancel'), - 'alt' => lang('folder') - )); - $var['button_cancel'] = array('widget' => array('type' => 'submit', - 'name' => 'cancel', - 'value' => lang('cancel') - )); - $var['img_ok'] = array('widget' => array('type' => 'img', - 'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'button_ok'), - 'alt' => lang('folder') - )); - $var['button_ok'] = array('widget' => array('type' => 'submit', - 'name' => 'submit', - 'value' => lang('ok') - )); - @reset($edit); - while( list($file,$prop) = each($edit)) - { - $var['fileman'][] = array('widget' => array('type'=>'hidden', - 'name' => 'fileman[]', - 'value' => $file - )); - } - @reset($edit); list($file,$prop) = each($edit); - $var['action'] = array('widget' => array('type'=>'hidden', - 'name' => 'apply_edit_'.$prop, - 'value' => 1 - )); - } - - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('index' => $var)); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('sidebar' => array( - 'url' => $GLOBALS['phpgw']->link('/index.php', - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path) - ), 1 - ), - 'label' => lang('phpgroupware files'), - 'link_label' => lang('add mozilla/netscape sidebar tab') - ) - )); - @reset($this->bo->file_attributes); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('settings' => $this->bo->settings)); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('display_settings' => $GLOBALS['phpgw_info']['theme'])); - - if(!count($edit)) - { - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('buttons'=> array('button' => $this->display_buttons()) )); - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('uploads' => $this->display_uploads() )); - } - $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('index' => $var)); - } - - } - function cancel() - { - $var = Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path) - ); - Header('Location: '.$GLOBALS['phpgw']->link('/index.php',$var)); - } - function rename() - { - $edit=array(); - for ($i=0; $i!=count($this->bo->fileman);$i++) - { - $edit[$this->bo->fileman[$i]] = 'name'; - } - $this->index($edit); - } - function edit_comments() - { - $edit=array(); - for ($i=0; $i!=count($this->bo->fileman);$i++) - { - $edit[$this->bo->fileman[$i]] = 'comment'; - } - $this->index($edit); - } - function view() - { - Header('Location: '.$GLOBALS['phpgw']->link( - 'view.php', - Array('path' => urlencode($this->bo->path), - 'file' => urlencode($this->bo->file)) - ) - ); - - } - - function history() - { - $this->load_header(); - $file = $this->bo->path.$this->bo->dispsep.$this->bo->file; - if($this->bo->vfs->file_exists(array( - 'string' => $file, - 'relatives' => Array(RELATIVE_NONE) - ))) - { - $col_headers = Array( - 'Date' => 'created', - 'Version' => 'version', - 'Action Performed by' => 'owner_id', - 'Operation' => 'comment' - ); - $p = CreateObject('phpgwapi.Template',$this->template_dir); - $p->set_unknowns('remove'); - - $p->set_file( - Array( - '_history' => 'history.tpl' - ) - ); - $p->set_block('_history','history','history'); - $p->set_block('_history','column_headers','column_headers'); - $p->set_block('_history','column_rows','column_rows'); - - $var = Array( - 'path' => $this->link( - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', - 'path' => urlencode($this->bo->path) - ), - $this->bo->path - ), - 'filename' => $this->link( - Array( - 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.view', - 'path' => urlencode($this->bo->path), - 'file' => urlencode($this->bo->file) - ), - $this->bo->file - ) - ); - $p->set_var($var); - - $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off']; - $var = Array( - 'td_extras' => '' - ); - @reset($col_headers); - while(list($label,$field)= each($col_headers)) - { - $var['column_header'] = ''.$label.''; - $this->set_col_headers($p,$var); - } - $p->set_var('tr_extras',' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"'); - $p->parse('col_row','column_rows',True); - $p->set_var('col_headers',''); - - $journal_array = $this->bo->vfs->get_journal(array( - 'string' => $file, - 'relatives' => Array(RELATIVE_NONE) - )); - while(list($num,$journal_entry) = each($journal_array)) - { - @reset($col_headers); - while(list($label,$field)= each($col_headers)) - { - switch($field) - { - case 'owner_id': - $var['column_header'] = ''.$GLOBALS['phpgw']->accounts->id2name($journal_entry[$field]).''; - break; - case 'created': - $var['column_header'] = ''.$this->bo->convert_date($journal_entry[$field]).''; - break; - default: - $var['column_header'] = ''.$journal_entry[$field].''; - break; - } - $this->set_col_headers($p,$var); - } - $p->set_var('tr_extras',' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"'); - $p->parse('col_row','column_rows',True); - $p->set_var('col_headers',''); - } - $p->pfp('output','history'); - } - } - - function view_file($file_array='') - { - if(is_array($file_array)) - { - $this->bo->path = $file_array['path']; - $this->bo->file = $file_array['file']; - } - $file = $this->bo->path.SEP.$this->bo->file; - if($this->bo->vfs->file_exists(array( - 'string' => $file, - 'relatives' => Array(RELATIVE_NONE) - ))) - { - $browser = CreateObject('phpgwapi.browser'); - $browser->content_header($this->bo->file,$this->bo->vfs->file_type(array( - 'string' => $file, - 'relatives' => Array(RELATIVE_NONE))), - $this->bo->vfs->get_size(array( - 'string' => $file, - 'relatives' => Array(RELATIVE_NONE), - 'checksubdirs' => True - ))); -// $browser->content_header($this->bo->file); - echo $this->bo->vfs->read(array( - 'string' => $file, - 'relatives' => Array(RELATIVE_NONE) - )); - flush(); - } - if(!is_array($file_array)) - { - exit(); - } - } - - } diff --git a/filemanager/inc/class.uiphpwebhosting.inc.php b/filemanager/inc/class.uiphpwebhosting.inc.php new file mode 100755 index 0000000000..ee5669479a --- /dev/null +++ b/filemanager/inc/class.uiphpwebhosting.inc.php @@ -0,0 +1,1060 @@ + * + * This class user interface for the phpwebhosting app * + * Copyright (C) 2002 Mark A Peters * + * -------------------------------------------------------------------------* + * This library is free software; you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as published by * + * the Free Software Foundation; either version 2.1 of the License, * + * or any later version. * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License * + * along with this library; if not, write to the Free Software Foundation, * + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + \**************************************************************************/ + + /* $Id$ */ + + class uiphpwebhosting + { + + var $public_functions = array( + 'index' => True, + 'action' => True, + 'help' => True, + 'history' => True, + 'view' => True, + 'view_file' => True, + 'edit' => True + ); + + var $bo; + var $nextmatchs; + var $browser; + var $template_dir; + var $help_info; + + function uiphpwebhosting() + { + $this->bo = CreateObject('filemanager.bophpwebhosting'); + $this->nextmatchs = CreateObject('phpgwapi.nextmatchs'); + $this->browser = CreateObject('phpgwapi.browser'); + $this->template_dir = $GLOBALS['phpgw']->common->get_tpl_dir($GLOBALS['phpgw_info']['flags']['currentapp']); + $this->check_access(); + $this->create_home_dir(); + $this->verify_path(); + $this->update(); + } + + function load_header() + { + unset($GLOBALS['phpgw_info']['flags']['noheader']); + unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + unset($GLOBALS['phpgw_info']['flags']['noappheader']); + unset($GLOBALS['phpgw_info']['flags']['noappfooter']); + $GLOBALS['phpgw']->common->phpgw_header(); + } + + function check_access() + { + if($this->bo->path != $this->bo->homedir && $this->bo->path != $this->bo->fakebase && $this->bo->path != '/' && !$this->bo->vfs->acl_check($this->bo->path,Array(RELATIVE_NONE),PHPGW_ACL_READ)) + { + $this->no_access_exists(lang('You do not have access to %1',$this->bo->path)); + } + $this->bo->userinfo['working_id'] = $this->bo->vfs->working_id; + $this->bo->userinfo['working_lid'] = $GLOBALS['phpgw']->accounts->id2name($this->bo->userinfo['working_id']); + } + + function set_col_headers(&$p,$var,$append=True) + { + $p->set_var($var); + $p->parse('col_headers','column_headers',$append); + } + + function no_access_exists($error_msg) + { + if($this->bo->debug) + { + echo 'DEBUG: ui.no_access_exists: you do not have access to this directory
'."\n"; + } + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_unknowns('remove'); + + $p->set_file( + Array( + '_errors' => 'errors.tpl' + ) + ); + $p->set_block('_errors','error_page','error_page'); + $p->set_block('_errors','ind_error','ind_error'); + + $p->set_var('error',$error_msg); + $p->parse('errors','ind_error',True); + + $p->set_var('error','

Go to your Home directory' + ); + $p->parse('errors','ind_error',True); + $p->pfp('output','error_page'); + $GLOBALS['phpgw']->common->phpgw_exit(); + } + + function create_home_dir() + { + ### + # If their home directory doesn't exist, we create it + # Same for group directories + ### + + if($this->bo->debug) + { + echo 'DEBUG: ui.create_home_dir: PATH = '.$this->bo->path.'
'."\n"; + echo 'DEBUG: ui.create_home_dir: PATH = '.urlencode($this->bo->path).'
'."\n"; + } + + if(($this->bo->path == $this->bo->homedir) && !$this->bo->vfs->file_exists($this->bo->homedir,Array(RELATIVE_NONE))) + { + //$this->bo->vfs->override_acl = 1; + if (!$this->bo->vfs->mkdir($this->bo->homedir,Array(RELATIVE_NONE))) + { + echo lang('failed to create directory') . ' '. $this->bo->homedir . '

'; + } + //$this->bo->vfs->override_acl = 0; + } + elseif(preg_match("|^".$this->bo->fakebase."\/(.*)$|U",$this->bo->path,$this->bo->matches)) + { + if (!$this->bo->vfs->file_exists($this->bo->path,Array(RELATIVE_NONE))) + { + //$this->bo->vfs->override_acl = 1; + if (!$this->bo->vfs->mkdir($this->bo->homedir,Array(RELATIVE_NONE))) + { + echo lang('failed to create directory') . ' '. $this->bo->homedir . '

'; + } + //$this->bo->vfs->override_acl = 0; + + if($this->bo->debug) + { + echo 'DEBUG: ui.create_home_dir: PATH = '.$this->bo->path.'
'."\n"; + echo 'DEBUG: ui.create_home_dir(): matches[1] = '.$this->bo->matches[1].'
'."\n"; + } + + $group_id = $GLOBALS['phpgw']->accounts->name2id($this->bo->matches[1]); + if($group_id) + { + $this->bo->vfs->set_attributes($this->bo->path,Array(RELATIVE_NONE),Array('owner_id' => $group_id, 'createdby_id' => $group_id)); + } + } + } + } + + function verify_path() + { + ### + # Verify path is real + ### + + if($this->bo->debug) + { + echo 'DEBUG: ui.verify_path: PATH = '.$this->bo->path.'
'."\n"; + echo 'DEBUG: ui.verify_path: exists = '.$this->bo->vfs->file_exists($this->bo->path,Array(RELATIVE_NONE)).'
'."\n"; + } + + if($this->bo->path != $this->bo->homedir && + $this->bo->path != '/' && + $this->bo->path != $this->bo->fakebase && + !$this->bo->vfs->file_exists($this->bo->path,Array(RELATIVE_NONE))) + { + $this->no_access_exists(lang('Directory %1 does not exist',$this->bo->path)); + } + } + + function update() + { + /* Update if they request it, or one out of 20 page loads */ + srand((double)microtime() * 1000000); + if($this->bo->update || rand(0,19) == 4) + { + $this->bo->vfs->update_real($this->bo->path,Array(RELATIVE_NONE)); + } + if($this->bo->update) + { + Header('Location: '.$GLOBALS['phpgw']->link( + '/index.php', + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', + 'path' => urlencode($this->bo->path) + ) + ) + ); + } + } + + function action() + { + $actions = Array( + 'rename' => lang('Rename'), + 'delete' => lang('Delete'), + 'go' => lang('Go To'), + 'copy' => lang('Copy To'), + 'move' => lang('Move To'), + 'download' => lang('Download'), + 'newdir' => lang('Create Folder'), + 'newfile' => lang('Create File') + ); + @reset($actions); + while(list($function,$text) = each($actions)) + { + if(isset($this->bo->$function) && !empty($this->bo->$function) && trim(strtolower($this->bo->$function)) == strtolower($text)) + { + $f_function = 'f_'.$function; + $errors = $this->bo->$f_function(); + $var = Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', + 'path' => urlencode($this->bo->path) + ); + if($function == 'newfile') + { + $var = Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.edit', + 'path' => urlencode($this->bo->path), + 'file' => urlencode($this->bo->createfile) + ); + } + elseif(is_array($errors)) + { + $var['errors'] = urlencode(base64_encode(serialize($errors))); + } + Header('Location: '.$GLOBALS['phpgw']->link('/index.php',$var)); + } + } + } + + function help() + { + $this->load_header(); + $this->bo->load_help_info(); + @reset($this->bo->help_info); + while(list($num,$help_array) = each($this->bo->help_info)) + { + if ($help_array[0] != $this->bo->help_name) + { + continue; + } + + $help_array[1] = preg_replace("/\[(.*)\|(.*)\]/Ue","\$this->build_help('\\1','\\2')",$help_array[1]); + $help_array[1] = preg_replace("/\[(.*)\]/Ue","\$this->build_help('\\1','\\1')",$help_array[1]); + + echo ''."\n".ucwords(str_replace('_',' ',$help_array[0]))."\n".'
'."\n"; + echo ''."\n".$help_array[1].''; + } + $GLOBALS['phpgw']->common->phpgw_exit (); + } + + function build_help($help_option,$text='') + { + if($this->bo->settings['show_help']) + { + $help = ($text?'':''."\n"); + $help .= ' '; + $help .= ($text?$text:'[?]'); + $help .= ''; + $help .= ($text?'':"\n".' '); + return $help; + } + else + { + return ''; + } + } + + function image($image,$alt) + { + return ''.$alt.''; + } + + function link($array_params,$text) + { + return ''.$text.''; + } + + function build_upload_choices($number) + { + return $this->link( + Array( + 'menuaction' => $GLOBALS['HTTP_GET_VARS']['menuaction'], + 'path' => $this->bo->path, + 'show_upload_boxes' => $number + ), + $number).'  '; + } + + function column_header(&$p,$internal,$displayed,$link=True) + { + if($link) + { + $header_str = ''.lang($displayed).''; + } + else + { + $header_str = $displayed; + } + $this->set_col_headers( + $p, + Array( + 'td_extras' => '', + 'column_header' => $header_str.$this->build_help($internal) + ) + ); + } + + function display_buttons() + { + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_file( + Array( + '_buttons' => 'small_table.tpl' + ) + ); + $p->set_block('_buttons','table','table'); + $p->set_block('_buttons','column_headers','column_headers'); + $p->set_block('_buttons','column_headers_normal','column_headers_normal'); + $p->set_block('_buttons','column_rows','column_rows'); + + $var = Array( + 'table_extras' => '', + 'tr_extras' => '', + 'td_extras' => ' align="center" width="25%"' + ); + + $var['column_header'] = ''.$this->build_help('edit'); + $this->set_col_headers($p,$var,False); + + $var['column_header'] = ''.$this->build_help('rename'); + $this->set_col_headers($p,$var); + + $var['column_header'] = ''.$this->build_help('delete'); + $this->set_col_headers($p,$var); + + $var['column_header'] = ''.$this->build_help('edit_comments'); + $this->set_col_headers($p,$var); + $p->parse('list','column_rows',True); + + $var['column_header'] = ''.$this->build_help('go_to'); + $this->set_col_headers($p,$var,False); + + $var['column_header'] = ''.$this->build_help('copy_to'); + $this->set_col_headers($p,$var); + + $var['column_header'] = ''.$this->build_help('move_to'); + $this->set_col_headers($p,$var); + + ### + # First we get the directories in their home directory + ### + + $dirs[] = Array( + 'directory' => $this->bo->fakebase, + 'name' => $this->bo->userinfo['account_lid'] + ); + $ls_array = $this->bo->vfs->ls($this->bo->homedir,Array(RELATIVE_NONE),True,'Directory'); + while(list($num,$dir) = each($ls_array)) + { + $dirs[] = $dir; + } + + ### + # Then we get the directories in their membership's home directories + ### + + reset($this->bo->memberships); + while(list($num,$group_array) = each($this->bo->memberships)) + { + ### + # Don't list directories for groups that don't have access + ### + + if(!$this->bo->membership_applications[$group_array['account_name']][$this->bo->appname]['enabled']) + { + continue; + } + + $dirs[] = Array( + 'directory' => $this->bo->fakebase, + 'name' => $group_array['account_name'] + ); + + $ls_array = $this->bo->vfs->ls($this->bo->fakebase.SEP.$group_array['account_name'],Array(RELATIVE_NONE),True,'Directory'); + while(list($num,$dir) = each($ls_array)) + { + $dirs[] = $dir; + } + } + + $dir_list = ''; + reset($dirs); + while(list($num, $dir) = each($dirs)) + { + if(!$dir['directory']) + { + continue; + } + + ### + # So we don't display // + ### + + if($dir['directory'] != '/') + { + $dir['directory'] .= SEP; + } + + $selected = ''; + if($num == 0) + { + $selected = ' selected'; + } + + ### + # No point in displaying the current directory, or a directory that doesn't exist + ### + + if((($dir['directory'].$dir['name']) != $this->bo->path) && $this->bo->vfs->file_exists($dir['directory'].$dir['name'],Array(RELATIVE_NONE))) + { + $dir_list .= ''; + } + } + + $var['column_header'] = ''.$this->build_help('directory_list'); + $this->set_col_headers($p,$var); + $p->parse('list','column_rows',True); + $p->set_var('col_headers',''); + + $var = Array( + 'tr_extras' => '', + 'td_extras' => ' colspan="2" align="center" width="50%"' + ); + + if($this->bo->path != '/' && $this->bo->path != $this->bo->fakebase) + { + $var['column_header'] = ''.$this->build_help('download'); + $this->set_col_headers($p,$var); + + $var['column_header'] = '    '.$this->build_help('create_folder'); + $this->set_col_headers($p,$var); + $p->parse('list','column_rows',True); + } + + $var['column_header'] = ''.$this->build_help('update'); + $this->set_col_headers($p,$var,False); + + if($this->bo->path != '/' && $this->bo->path != $this->bo->fakebase) + { + $var['column_header'] = '    '.$this->build_help('create_file'); + } + else + { + $var['column_header'] = ' '; + } + $this->set_col_headers($p,$var); + $p->parse('list','column_rows',True); + $p->set_var('col_headers',''); + + if($this->bo->settings['show_command_line']) + { + $var = Array( + 'tr_extras' => '', + 'td_extras' => ' colspan="4" align="center" width="100%"', + 'column_header' => ''.$this->build_help('command_line').'
'.$this->build_help('execute') + ); + $this->set_col_headers($p,$var); + $p->parse('list','column_rows',True); + $p->set_var('col_headers',''); + } + return $p->fp('output','table'); + } + + function display_summary_info($numoffiles,$usedspace) + { + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_file( + Array( + '_info' => 'small_table.tpl' + ) + ); + $p->set_block('_info','table','table'); + $p->set_block('_info','column_headers','column_headers'); + $p->set_block('_info','column_headers_normal','column_headers_normal'); + $p->set_block('_info','column_rows','column_rows'); + $this_homedir = ($this->bo->path == $this->bo->homedir || $this->bo->path == $this->bo->fakedir); + $info_columns = 4 + ($this_homedir?2:0); + + $var = Array( + 'table_extras' => ' cols="'.$info_columns.'"', + 'tr_extras' => '', + 'td_extras' => ' colspan="'.$info_columns.'" align="center" width="100%"', + 'column_header' => $this->build_help('file_stats') + ); + $this->set_col_headers($p,$var,False); + $p->parse('list','column_rows',True); + $p->set_var('col_headers',''); + + $var = Array( + 'tr_extras' => '', + 'td_extras' => ' align="right"' + ); + + $var['column_header'] = ''.lang('Files').':'; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + + $var['td_extras'] = ' align="left"'; + $var['column_header'] = $numoffiles; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + $var['td_extras'] = ' align="right"'; + $var['column_header'] = ''.lang('Used Space').':'; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + $var['td_extras'] = ' align="left"'; + $var['column_header'] = $this->bo->borkb($usedspace); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + if($this_homedir) + { + $var['td_extras'] = ' align="right"'; + $var['column_header'] = ''.lang('Unused space').':'; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + $var['td_extras'] = ' align="left"'; + $var['column_header'] = $this->bo->borkb($this->bo->userinfo['hdspace'] - $usedspace); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + } + + $p->parse('list','column_rows',True); + $p->set_var('col_headers',''); + + if($this_homedir) + { + $var['td_extras'] = ' colspan="'.($info_columns / 2).'" align="right" width="50%"'; + $var['column_header'] = ''.lang('Total Files').':'; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + + $var['td_extras'] = ' colspan="'.($info_columns / 2).'" align="left" width="50%"'; + $var['column_header'] = count($this->bo->vfs->ls($this->bo->path,Array(RELATIVE_NONE))); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + $p->parse('list','column_rows',True); + $p->set_var('col_headers',''); + } + return $p->fp('output','table'); + } + + function display_uploads() + { + + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_file( + Array( + '_uploads' => 'small_table.tpl' + ) + ); + $p->set_block('_uploads','table','table'); + $p->set_block('_uploads','column_headers','column_headers'); + $p->set_block('_uploads','column_headers_normal','column_headers_normal'); + $p->set_block('_uploads','column_rows','column_rows'); + + $var = Array( + 'table_extras' => ' cols="3"', + 'tr_extras' => '' + ); + + $var['td_extras'] = ' align="right" width="45%"'; + $var['column_header'] = ''.lang('File').''.$this->build_help('upload_file'); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + + $var['td_extras'] = ' align="center" width="10%"'; + $var['column_header'] = ' '; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + $var['td_extras'] = ' align="left" width="45%"'; + $var['column_header'] = ''.lang('Comment').''.$this->build_help('upload_comment'); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',True); + + $p->parse('list','column_rows',True); + + $input_file = ''; + $input_comment = ''; + + $var['tr_extras'] = ''; + $var['td_extras'] = ' colspan="3" align="center"'; + $var['column_header'] = ''."\n".$input_file.$input_comment; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + $p->parse('list','column_rows',True); + + for($i=1;$i<$this->bo->show_upload_boxes;$i++) + { + $var['column_header'] = $input_file.$input_comment; + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + $p->parse('list','column_rows',True); + } + + $var['column_header'] = ''.$this->build_help('upload_files'); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + $p->parse('list','column_rows',True); + + $var['column_header'] = lang('Show').'  '.$this->build_upload_choices(5).$this->build_upload_choices(10).$this->build_upload_choices(20).$this->build_upload_choices(30).lang('upload fields').$this->build_help('show_upload_fields'); + $p->set_var($var); + $p->parse('col_headers','column_headers_normal',False); + $p->parse('list','column_rows',True); + + return '

'."\n".$p->fp('output','table').'
'."\n"; + } + + function index() + { + $this->load_header(); + $files_array = $this->bo->load_files(); + if(count($files_array) || $this->bo->cwd) + { + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_unknowns('remove'); + + $p->set_file( + Array( + '_index' => 'index.tpl' + ) + ); + $p->set_block('_index','index','index'); + $p->set_block('_index','column_headers','column_headers'); + $p->set_block('_index','column_headers_normal','column_headers_normal'); + $p->set_block('_index','column_rows','column_rows'); + + $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off']; + $var = Array( + 'error' => (isset($this->bo->errors) && is_array(unserialize(base64_decode($this->bo->errors)))?$GLOBALS['phpgw']->common->error_list(unserialize(base64_decode($this->bo->errors)),'Results'):''), + 'tr_extras' => ' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"', + 'form_action' => $GLOBALS['phpgw']->link('/index.php', + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.action', + 'path' => urlencode($this->bo->path) + ) + ), + 'img_up' => $this->link(Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', + 'path' => urlencode($this->bo->lesspath) + ), + $this->image('folder_up.gif',lang('Up'))), + 'help_up' => $this->build_help('up'), + 'img_home' => $this->image('folder_home.gif',lang('Folder')), + 'dir' => ''."\n" + . ' '.strtoupper($this->bo->path).''."\n" + . ' ', + 'help_home' => $this->build_help('home'), + 'col_headers' => '', + 'column_header' => '' + ); + $p->set_var($var); + + $this->column_header($p,'sort_by','Sort By',False); + + $columns = 1; + @reset($this->bo->file_attributes); + while(list($internal,$displayed) = each($this->bo->file_attributes)) + { + if ($this->bo->settings[$internal]) + { + $this->column_header($p,$internal,$displayed,True); + $columns++; + } + } + $p->parse('col_row','column_rows',True); + $p->set_var('col_headers',''); + +// $var = Array( +// 'tr_extras' => ' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"' +// ); +// $this->set_col_headers($p,$var,True); + + $p->set_var('colspan',$columns); + + if($this->bo->settings['dotdot'] && $this->bo->settings['name'] && $this->bo->path != '/') + { + $this->set_col_headers( + $p, + Array( + 'tr_extras' => ' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"', + 'col_headers' => '', + 'td_extras' => '', + 'column_header' => ' ' + ) + ); + + $this->set_col_headers( + $p, + Array( + 'column_header' => $this->image('folder.gif','folder') + .$this->link( + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', + 'path' => $this->bo->lesspath + ), + '..' + ) + ) + ); + + $loop_cntr = 2; + + if($this->bo->settings['mime_type']) + { + $this->set_col_headers( + $p, + Array( + 'column_header' => 'Directory' + ) + ); + $loop_cntr++; + } + + for($i=$loop_cntr;$i<$columns;$i++) + { + $this->set_col_headers( + $p, + Array( + 'column_header' => ' ' + ) + ); + } + $p->parse('col_row','column_rows',True); + $p->set_var('col_headers',''); + } + + $usedspace = 0; + reset($files_array); + $numoffiles = count($files_array); + for($i=0;$i!=$numoffiles;$i++) + { + $files = $files_array[$i]; + $var = Array( + 'tr_extras' => ' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"', + 'td_extras' => '', + 'column_header' => '' + ); + $this->set_col_headers($p,$var,False); +// $p->set_var($var); +// $p->parse('col_headers','column_headers'); + + $usedspace += $files['size']; + + @reset($this->bo->file_attributes); + while(list($internal,$displayed) = each($this->bo->file_attributes)) + { + if($this->bo->settings[$internal]) + { + $var = Array( + 'td_extras' => '' + ); + switch($internal) + { + case 'name': + switch($files['mime_type']) + { + case 'Directory': + $var['column_header'] = $this->image('folder.gif','folder') + .$this->link( + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', + 'path' => $this->bo->path.SEP.$files['name'] + ), + ''.$files['name'].'' + ); + break; + default: + $var['column_header'] = $this->link( + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.view', + 'path' => urlencode($this->bo->path), + 'file' => urlencode($files['name']) + ), + ''.$files['name'].'' + ); + break; + } + break; + case 'deletable': + if ($files['deleteable'] == 'N') + { + $var['column_header'] = $this->image('locked.gif','locked'); + } + else + { + $var['column_header'] = ' '; + } + break; + case 'size': + $var['column_header'] = $this->bo->borkb($files['size']); + $var['td_extras'] = ' align="right"'; + break; + case 'version': + $var['column_header'] = $this->link( + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.history', + 'path' => $this->bo->path, + 'file' => $files['name'] + ), + $files['version'] + ); + break; + case 'modified': + case 'created': + $var['column_header'] = $this->bo->convert_date($files[$internal]); + break; + case 'owner': + case 'createdby_id': + case 'modifiedby_id': + switch($internal) + { + case 'owner': + $ivar = 'owner_id'; + break; + default: + $ivar = $internal; + break; + } + $var['column_header'] = ($files[$ivar]?$GLOBALS['phpgw']->accounts->id2name($files[$ivar]):' '); + break; + default: + $var['column_header'] = ($files[$internal]?$files[$internal]:' '); + break; + } + $this->set_col_headers($p,$var); + } + } + $p->parse('col_row','column_rows',True); + $p->set_var('col_headers',''); + } + + $p->set_var('buttons',$this->display_buttons()); + $p->set_var('info',$this->display_summary_info($numoffiles,$usedspace)); + $p->set_var('uploads',$this->display_uploads()); + + $p->pfp('output','index'); + } + } + + function view() + { + $this->load_header(); + if($this->bo->vfs->file_exists($this->bo->path.'/'.$this->bo->file,Array(RELATIVE_NONE))) + { + $content_type = $this->bo->vfs->file_type($this->bo->path.$this->bo->dispsep.$this->bo->file,Array(RELATIVE_NONE)); + if($content_type) + { + $cont_type = explode('/',$content_type); + $content_type = $cont_type[1]; + } + else + { + } + switch($content_type) + { + case 'jpeg': + case 'gif': + case 'bmp': + case 'png': + $alignment = 'center'; + $file_content = ''."\n"; + break; + default: + $alignment = 'left'; + $file_content = nl2br($this->bo->vfs->read($this->bo->path.$this->bo->dispsep.$this->bo->file,Array(RELATIVE_NONE))); + break; + } + $file = $this->bo->path.$this->bo->dispsep.$this->bo->file; + $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off']; + + echo ''."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . ' '."\n" + . '
'."\n" + . ' TYPE: '.$this->bo->vfs->file_type($file,Array(RELATIVE_NONE)).'
'."\n" + . '
'."\n" + . ' FILENAME: '.$file."\n" + . '
'."\n" + . ' VERSION: '.$this->bo->vfs->get_version($file,Array(RELATIVE_NONE))."\n" + . '
'."\n" + . $file_content."\n" + . '
'."\n"; + } + } + + function history() + { + $this->load_header(); + $file = $this->bo->path.$this->bo->dispsep.$this->bo->file; + if($this->bo->vfs->file_exists($file,Array(RELATIVE_NONE))) + { + $col_headers = Array( + 'Date' => 'created', + 'Version' => 'version', + 'Action Performed by' => 'owner_id', + 'Operation' => 'comment' + ); + $p = CreateObject('phpgwapi.Template',$this->template_dir); + $p->set_unknowns('remove'); + + $p->set_file( + Array( + '_history' => 'history.tpl' + ) + ); + $p->set_block('_history','history','history'); + $p->set_block('_history','column_headers','column_headers'); + $p->set_block('_history','column_rows','column_rows'); + + $var = Array( + 'path' => $this->link( + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index', + 'path' => urlencode($this->bo->path) + ), + $this->bo->path + ), + 'filename' => $this->link( + Array( + 'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.view', + 'path' => urlencode($this->bo->path), + 'file' => urlencode($this->bo->file) + ), + $this->bo->file + ) + ); + $p->set_var($var); + + $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off']; + $var = Array( + 'td_extras' => '' + ); + @reset($col_headers); + while(list($label,$field)= each($col_headers)) + { + $var['column_header'] = ''.$label.''; + $this->set_col_headers($p,$var); + } + $p->set_var('tr_extras',' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"'); + $p->parse('col_row','column_rows',True); + $p->set_var('col_headers',''); + + $journal_array = $this->bo->vfs->get_journal($file,Array(RELATIVE_NONE)); + while(list($num,$journal_entry) = each($journal_array)) + { + @reset($col_headers); + while(list($label,$field)= each($col_headers)) + { + switch($field) + { + case 'owner_id': + $var['column_header'] = ''.$GLOBALS['phpgw']->accounts->id2name($journal_entry[$field]).''; + break; + case 'created': + $var['column_header'] = ''.$this->bo->convert_date($journal_entry[$field]).''; + break; + default: + $var['column_header'] = ''.$journal_entry[$field].''; + break; + } + $this->set_col_headers($p,$var); + } + $p->set_var('tr_extras',' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"'); + $p->parse('col_row','column_rows',True); + $p->set_var('col_headers',''); + } + $p->pfp('output','history'); + } + } + + function view_file($file_array='') + { + if(is_array($file_array)) + { + $this->bo->path = $file_array['path']; + $this->bo->file = $file_array['file']; + } + $file = $this->bo->path.SEP.$this->bo->file; + if($this->bo->vfs->file_exists($file,Array(RELATIVE_NONE))) + { + $browser = CreateObject('phpgwapi.browser'); + $browser->content_header($this->bo->file,$this->bo->vfs->file_type($file,Array(RELATIVE_NONE)),$this->bo->vfs->get_size($file,Array(RELATIVE_NONE)),True); +// $browser->content_header($this->bo->file); + echo $this->bo->vfs->read($file,Array(RELATIVE_NONE)); + flush(); + } + if(!is_array($file_array)) + { + $GLOBALS['phpgw']->common->phpgw_exit (); + } + } + + function edit() + { + $this->load_header(); + } + } diff --git a/filemanager/inc/db.inc.php b/filemanager/inc/db.inc.php new file mode 100755 index 0000000000..ff0afccde6 --- /dev/null +++ b/filemanager/inc/db.inc.php @@ -0,0 +1,47 @@ +db->Auto_Free = 0; +} + +/* General SQL query */ +function db_query ($query) +{ + global $phpgw; + global $phpgw_info; + + return $phpgw->db->query ($query); +} + +/* Fetch next array for $query_id */ +function db_fetch_array ($query_id) +{ + global $phpgw; + global $phpgw_info; + +// $phpgw->db->Query_ID = $query_id; + $phpgw->db->next_record (); + return $phpgw->db->Record; +} + +/* + General wrapper for all other db calls + Calls in here are simply returned, so not all will work +*/ +function db_call ($function, $query_id) +{ + global $phpgw; + global $phpgw_info; + +// $phpgw->db->Query_ID = $query_id; + return $phpgw->db->$function (); +} + +?> diff --git a/filemanager/inc/hook_add_def_pref.inc.php b/filemanager/inc/hook_add_def_pref.inc.php index a9104e3a02..a5dde9210d 100755 --- a/filemanager/inc/hook_add_def_pref.inc.php +++ b/filemanager/inc/hook_add_def_pref.inc.php @@ -2,22 +2,22 @@ global $pref; -$pref->change ('filemanager', 'name', True); -$pref->change ('filemanager', 'mime_type', False); -$pref->change ('filemanager', 'size', True); -$pref->change ('filemanager', 'created', True); -$pref->change ('filemanager', 'modified', True); -//$pref->change ('filemanager', 'owner', False); -$pref->change ('filemanager', 'createdby_id', True); -$pref->change ('filemanager', 'modifiedby_id', True); -//$pref->change ('filemanager', 'app', False); -$pref->change ('filemanager', 'comment', True); -//$pref->change ('filemanager', 'viewinnewwin', False); -//$pref->change ('filemanager', 'viewonserver', False); -$pref->change ('filemanager', 'viewtextplain', True); -//$pref->change ('filemanager', 'dotdot', False); -//$pref->change ('filemanager', 'dotfiles', False); -//$pref->change ('filemanager', 'show_help', False); -$pref->change ('filemanager', 'show_upload_boxes', '5'); +$pref->change ("filemanager", "name", "True"); +$pref->change ("filemanager", "mime_type", "True"); +$pref->change ("filemanager", "size", "True"); +$pref->change ("filemanager", "created", "True"); +$pref->change ("filemanager", "modified", "True"); +//$pref->change ("filemanager", "owner", "False"); +$pref->change ("filemanager", "createdby_id", "True"); +$pref->change ("filemanager", "modifiedby_id", "True"); +//$pref->change ("filemanager", "app", "False"); +$pref->change ("filemanager", "comment", "True"); +//$pref->change ("filemanager", "viewinnewwin", "False"); +//$pref->change ("filemanager", "viewonserver", "False"); +$pref->change ("filemanager", "viewtextplain", True); +//$pref->change ("filemanager", "dotdot", "False"); +//$pref->change ("filemanager", "dotfiles", "False"); +//$pref->change ("filemanager", "show_help", "False"); +$pref->change ("filemanager", "show_upload_boxes", "5"); ?> diff --git a/filemanager/inc/hook_preferences.inc.php b/filemanager/inc/hook_preferences.inc.php index c7a99be29b..b56245e026 100644 --- a/filemanager/inc/hook_preferences.inc.php +++ b/filemanager/inc/hook_preferences.inc.php @@ -1,5 +1,9 @@ * + * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * @@ -8,14 +12,12 @@ /* $Id$ */ { - +// Only Modify the $file and $title variables..... + $title = $appname; $file = Array( - 'Preferences' => $GLOBALS['phpgw']->link('/preferences/preferences.php',array( - 'appname' =>$appname, - 'type' => 'user') - ) + lang('Preferences') => $GLOBALS['phpgw']->link('/filemanager/preferences.php') ); //Do not modify below this line - display_section($appname,$file); + display_section($appname,$title,$file); } ?> diff --git a/filemanager/inc/hook_settings.inc.php b/filemanager/inc/hook_settings.inc.php deleted file mode 100644 index 1050fe0137..0000000000 --- a/filemanager/inc/hook_settings.inc.php +++ /dev/null @@ -1,124 +0,0 @@ -common->list_templates(); - while (list($var,$value) = each($templates)) - { - $_templates[$var] = $templates[$var]['title']; - } - - $themes = $GLOBALS['phpgw']->common->list_themes(); - while (list(,$value) = each($themes)) - { - $_themes[$value] = $value; - } - - $this->bo = CreateObject('filemanager.bofilemanager'); - $this->pref_type = $GLOBALS['type']; - } - - function display_item($label_name, $preference_name, $s) - { - global $t; - - $_appname = check_app(); - if (is_forced_value($_appname,$preference_name)) - { - return True; - } - - $GLOBALS['phpgw']->nextmatchs->template_alternate_row_color($t); - - $t->set_var('row_name',$label_name); - - switch ($GLOBALS['type']) - { - case 'user': - $t->set_var('row_value',$s ); - break; - case 'default': - $t->set_var('row_value', $s ); - break; - case 'forced': - $t->set_var('row_value', $s); - break; - } - - $t->fp('rows','row',True); - } - - function index() - { - $phpgw_info = $GLOBALS['phpgw_info']; - echo 'Current Preferences '; - //print_r($phpgw_info[$this->pref_type]['preferences']['filemanager']); - - /* - To add an on/off preference, just add it here. Key is internal name, value is displayed name - */ - $other_checkboxes = array ("viewinnewwin" => lang("View documents in new window"), "viewonserver" => lang("View documents on server (if available)"), "viewtextplain" => lang("Unknown MIME-type defaults to text/plain when viewing"), "dotdot" => lang("Show .."), "dotfiles" => lang("Show .files"), "show_help" => lang("Show help"), "show_command_line" => lang("Show command line (EXPERIMENTAL. DANGEROUS.)")); - - /* - To add a dropdown preferences, add it here. Key is internal name, value key is - displayed name, value values are choices in the dropdown - */ - //$other_dropdown = array ("show_upload_boxes" => array (, "5", "10", "20", "30")); - - create_select_box(lang("Default number of upload fields to show"), 'show_upload_boxes', array ("5"=>"5", "10"=>'10', "20"=>'20', "30"=>'30')); - $this->display_item(''.lang('File attributes to display:').'','',''); - while (list ($internal, $displayed) = each ($this->bo->file_attributes)) - { - unset ($checked); - - if ($phpgw_info[$this->pref_type]['preferences']['filemanager'][$internal]) - { - $checked = '1'; - $extra = 'checked'; - } - else - { - $checked = '0'; - $extra = ''; - } - $str = ''; - //$this->display_item (lang($displayed), $internal, $str); - create_select_box(lang("$displayed"), $internal, array ("1"=>"yes", "0"=>'no')); - } - $this->display_item ('
','',''); - - reset ($other_checkboxes); - while (list ($internal, $displayed) = each ($other_checkboxes)) - { - unset ($checked); - if ($phpgw_info[$this->pref_type]['preferences']['filemanager'][$internal]) - { - $checked = 1; - $extra = 'checked'; - } - else - { - $checked = 0; - $extra = ''; - } - - $str = ''; - $this->display_item ($displayed, $internal, $str); - } - } - } - - $a = new uipreferences(); - $a->index(); - diff --git a/filemanager/inc/html.inc.php b/filemanager/inc/html.inc.php new file mode 100755 index 0000000000..6082066e02 --- /dev/null +++ b/filemanager/inc/html.inc.php @@ -0,0 +1,545 @@ +'; + return (eor ($rstring, $return)); +} + +function html_form_input ($type = NULL, $name = NULL, $value = NULL, $maxlength = NULL, $size = NULL, $checked = NULL, $string = HTML_FORM_INPUT_STRING, $return = 0) +{ + $text = ' '; + if ($type != NULL && $type) + { + if ($type == 'checkbox') + { + $value = string_encode ($value, 1); + } + $text .= 'type="'.$type.'" '; + } + if ($name != NULL && $name) + { + $text .= 'name="'.$name.'" '; + } + if ($value != NULL && $value) + { + $text .= 'value="'.$value.'" '; + } + if (is_int ($maxlength) && $maxlength >= 0) + { + $text .= 'maxlength="'.$maxlength.'" '; + } + if (is_int ($size) && $size >= 0) + { + $text .= 'size="'.$size.'" '; + } + if ($checked != NULL && $checked) + { + $text .= 'checked '; + } + + $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_form_textarea ($name = NULL, $rows = NULL, $cols = NULL, $value = NULL, $string = HTML_FORM_TEXTAREA_STRING, $return = 0) +{ + $text =' '; + if ($name != NULL && $name) + { + $text .= 'name="'.$name.'" '; + } + if (is_int ($rows) && $rows >= 0) + { + $text .= 'rows="'.$rows.'" '; + } + if (is_int ($cols) && $cols >= 0) + { + $text .= 'cols="'.$cols.'" '; + } + $rstring = ''.$value.''; + return (eor ($rstring, $return)); +} + +function html_form_select_begin ($name = NULL, $return = 0) +{ + $text = ' '; + if ($name != NULL && $name) + { + $text .= 'name="'.$name.'" '; + } + $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_form_select_end ($return = 0) +{ + $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_form_option ($value = NULL, $displayed = NULL, $selected = NULL, $return = 0) +{ + $text = ' '; + if ($value != NULL && $value) + { + $text .= ' value="'.$value.'" '; + } + if ($selected != NULL && $selected) + { + $text .= ' selected'; + } + $rstring = ''.$displayed.''; + return (eor ($rstring, $return)); +} + +function html_form_end ($return = 0) +{ + $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_nbsp ($times = 1, $return = 0) +{ + if ($times == NULL) + { + $times = 1; + } + for ($i = 0; $i != $times; $i++) + { + if ($return) + { + $rstring .= ' '; + } + else + { + echo ' '; + } + } + if ($return) + { + return ($rstring); + } +} + +function html ($string, $times = 1, $return = 0) +{ + for ($i = 0; $i != $times; $i++) + { + if ($return) + { + $rstring .= $string; + } + else + { + echo $string; + } + } + if ($return) + { + return ($rstring); + } +} + +function html_break ($break, $string = '', $return = 0) +{ + switch($break) + { + case 1: + $break_str = '
'; + break; + case 2: + $break_str = '

'; + break; + case 5: + $break_str = '


'; + break; + } + return (eor ($break_str . $string, $return)); +} + +function html_page_begin ($title = NULL, $return = 0) +{ +// $rstring = HTML_PAGE_BEGIN_BEFORE_TITLE . $title . HTML_PAGE_BEGIN_AFTER_TITLE; + return (eor ($rstring, $return)); +} + +function html_page_body_begin ($bgcolor = HTML_PAGE_BODY_COLOR, $background = NULL, $text = NULL, $link = NULL, $vlink = NULL, $alink = NULL, $string = HTML_PAGE_BODY_STRING, $return = 0) +{ + $text_out = ' '; + if ($bgcolor != NULL && $bgcolor) + { + $text_out .= 'bgcolor="'.$bgcolor.'" '; + } + if ($background != NULL && $background) + { + $text_out .= 'background="'.$background.'" '; + } + if ($text != NULL && $text) + { + $text_out .= 'text="'.$text.'" '; + } + if ($link != NULL && $link) + { + $text_out .= 'link="'.$link.'" '; + } + if ($vlink != NULL && $vlink) + { + $text_out .= 'vlink="'.$vlink.'" '; + } + if ($alink != NULL && $alink) + { + $text_out .= 'alink="'.$alink.'" '; + } +// $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_page_body_end ($return = 0) +{ +// $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_page_end ($return = 0) +{ +// $rstring = ''; + return (eor ($rstring, $return)); +} + +function html_page_close () +{ +// html_page_body_end (); +// html_page_end (); + $GLOBALS['phpgw']->common->phpgw_footer (); + $GLOBALS['phpgw']->common->phpgw_exit (); +} +function html_text_bold ($text = NULL, $return = 0, $lang = 0) +{ + if ($lang) + { + $text = translate ($text); + } + $rstring = ''.$text.''; + return (eor ($rstring, $return)); +} + +function html_text_underline ($text = NULL, $return = 0, $lang = 0) +{ + if ($lang) + { + $text = translate ($text); + } + $rstring = ''.$text.''; + return (eor ($rstring, $return)); +} + +function html_text_italic ($text = NULL, $return = 0, $lang = 0) +{ + if ($lang) + { + $text = translate ($text); + } + $rstring = ''.$text.''; + return (eor ($rstring, $return)); +} + +function html_text_summary ($text = NULL, $size = NULL, $return = 0, $lang = 0) +{ + if ($lang) + { + $text = translate ($text); + } + $rstring = html_break (1, NULL, $return); + $rstring .= html_text_bold ($text, $return); + $rstring .= html_nbsp (3, $return); + if ($size != NULL && $size >= 0) + $rstring .= borkb ($size, 1, $return); + + $rstring = html_encode ($rstring, 1); + + if ($return) + { + return ($rstring); + } +} + +function html_text_summary_error ($text = NULL, $text2 = NULL, $size = NULL, $return = 0, $lang = 0) +{ + if ($lang) + { + $text = translate ($lang); + } + $rstring = html_text_error ($text, 1, $return); + + if (($text2 != NULL && $text2) || ($size != NULL && $size)) + { + $rstring .= html_nbsp (3, $return); + } + if ($text2 != NULL && $text2) + { + $rstring .= html_text_error ($text2, NULL, $return); + } + if ($size != NULL && $size >= 0) + { + $rstring .= borkb ($size, 1, $return); + } + + if ($return) + { + return ($rstring); + } +} + +function html_font_set ($size = NULL, $color = NULL, $family = NULL, $return = 0) +{ + if ($size != NULL && $size) + $size = "size=$size"; + if ($color != NULL && $color) + $color = "color=$color"; + if ($family != NULL && $family) + $family = "family=$family"; + + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_font_end ($return = 0) +{ + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_text_error ($errorwas = NULL, $break = 1, $return = 0) +{ + if ($break) + $rstring .= html_break (1, NULL, 1); + + $rstring .= html_font_set (NULL, HTML_TEXT_ERROR_COLOR, NULL, 1); + $rstring .= html_text_bold (html_text_italic ($errorwas, 1), 1); + $rstring .= html_font_end (1); + return (eor ($rstring, $return)); +} + +function html_page_error ($errorwas = NULL, $title = "Error", $return = 0) +{ + $rstring = html_page_begin ($title, $return); + $rstring .= html_page_body_begin (HTML_PAGE_BODY_COLOR, $return); + $rstring .= html_break (2, NULL, $return); + $rstring .= html_text_error ($errorwas, $return); + $rstring .= html_page_body_end ($return); + $rstring .= html_page_end ($return); + if (!$return) + html_page_close (); + else + return ($rstring); +} + +function html_link ($href = NULL, $text = NULL, $return = 0, $encode = 1, $linkonly = 0, $target = NULL) +{ + if ($encode) + $href = string_encode ($href, 1); + + ### + # This decodes / back to normal + ### + $href = preg_replace ("/%2F/", "/", $href); + $text = trim ($text); + + /* Auto-detect and don't disturb absolute links */ + if (!preg_match ("|^http(.{0,1})://|", $href)) + { + //Only add an extra / if there isn't already one there + if (!($href[0] == SEP)) + { + $href = SEP . $href; + } + + /* $phpgw->link requires that the extra vars be passed separately */ + $link_parts = explode ("?", $href); + $address = $GLOBALS['phpgw']->link ($link_parts[0], $link_parts[1]); + } + else + { + $address = $href; + } + + /* If $linkonly is set, don't add any HTML */ + if ($linkonly) + { + $rstring = $address; + } + else + { + if ($target) + { + $target = 'target='.$target; + } + + $rstring = ''.$text.''; + } + + return (eor ($rstring, $return)); +} + +function html_link_back ($return = 0) +{ + global $path; + + $rstring .= html_link ($GLOBALS['appname'].'/index.php?path='.$path, HTML_TEXT_NAVIGATION_BACK_TO_USER, 1); + + return (eor ($rstring, $return)); +} + +function html_table_begin ($width = NULL, $border = NULL, $cellspacing = NULL, $cellpadding = NULL, $rules = NULL, $string = HTML_TABLE_BEGIN_STRING, $return = 0) +{ + if ($width != NULL && $width) + $width = "width=$width"; + if (is_int ($border) && $border >= 0) + $border = "border=$border"; + if (is_int ($cellspacing) && $cellspacing >= 0) + $cellspacing = "cellspacing=$cellspacing"; + if (is_int ($cellpadding) && $cellpadding >= 0) + $cellpadding = "cellpadding=$cellpadding"; + if ($rules != NULL && $rules) + $rules = "rules=$rules"; + + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_link_email ($address = NULL, $text = NULL, $return = 0, $encode = 1) +{ + if ($encode) + $href = string_encode ($href, 1); + + $rstring = "$text"; + return (eor ($rstring, $return)); +} + +function html_table_end ($return = 0) +{ + $rstring = "
"; + return (eor ($rstring, $return)); +} + +function html_table_row_begin ($align = NULL, $halign = NULL, $valign = NULL, $bgcolor = NULL, $string = HTML_TABLE_ROW_BEGIN_STRING, $return = 0) +{ + if ($align != NULL && $align) + $align = "align=$align"; + if ($halign != NULL && $halign) + $halign = "halign=$halign"; + if ($valign != NULL && $valign) + $valign = "valign=$valign"; + if ($bgcolor != NULL && $bgcolor) + $bgcolor = "bgcolor=$bgcolor"; + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_table_row_end ($return = 0) +{ + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_table_col_begin ($align = NULL, $halign = NULL, $valign = NULL, $rowspan = NULL, $colspan = NULL, $string = HTML_TABLE_COL_BEGIN_STRING, $return = 0) +{ + if ($align != NULL && $align) + $align = "align=$align"; + if ($halign != NULL && $halign) + $halign = "halign=$halign"; + if ($valign != NULL && $valign) + $valign = "valign=$valign"; + if (is_int ($rowspan) && $rowspan >= 0) + $rowspan = "rowspan=$rowspan"; + if (is_int ($colspan) && $colspan >= 0) + $colspan = "colspan=$colspan"; + + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_table_col_end ($return = 0) +{ + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_text ($string, $times = 1, $return = 0, $lang = 0) +{ + global $phpgw; + + if ($lang) + $string = translate ($string); + + if ($times == NULL) + $times = 1; + for ($i = 0; $i != $times; $i++) + { + if ($return) + $rstring .= $string; + else + echo $string; + } + if ($return) + return ($rstring); +} + +function html_text_header ($size = 1, $string = NULL, $return = 0, $lang = 0) +{ + $rstring = "$string"; + return (eor ($rstring, $return)); +} + +function html_align ($align = NULL, $string = HTML_ALIGN_MAIN_STRING, $return = 0) +{ + $rstring = "

"; + return (eor ($rstring, $return)); +} + +function html_image ($src = NULL, $alt = NULL, $align = NULL, $border = NULL, $string = HTML_IMAGE_MAIN_STRING, $return = 0) +{ + if ($src != NULL && $src) + $src = "src=$src"; + if ($alt != NULL && $alt) + $alt = "alt=\"$alt\""; + if ($align != NULL && $align) + $align = "align=$align"; + if (is_int ($border) && $border >= 0) + $border = "border=$border"; + $rstring = ""; + return (eor ($rstring, $return)); +} + +function html_help_link ($help_name = NULL, $text = "[?]", $target = "_new", $return = 0) +{ + global $settings; + global $appname; + + if (!$settings["show_help"]) + { + return 0; + } + + $rstring = html_link ("$appname/index.php?op=help&help_name=$help_name", $text, True, 1, 0, $target); + + return (eor ($rstring, $return)); +} + +?> diff --git a/filemanager/inc/main.inc.php b/filemanager/inc/main.inc.php new file mode 100755 index 0000000000..c2e5c72860 --- /dev/null +++ b/filemanager/inc/main.inc.php @@ -0,0 +1,271 @@ +vfs)) +{ + $GLOBALS['phpgw']->vfs = CreateObject ('phpgwapi.vfs'); +} + +### Start Configuration Options ### +### These are automatically set in phpGW - do not edit ### + +$sep = SEP; +$GLOBALS['rootdir'] = $GLOBALS['phpgw']->vfs->basedir; +$GLOBALS['fakebase'] = $GLOBALS['phpgw']->vfs->fakebase; +$GLOBALS['appname'] = $GLOBALS['phpgw_info']['flags']['currentapp']; +$GLOBALS['settings'] = $GLOBALS['phpgw_info']['user']['preferences'][$appname]; + +if (stristr ($GLOBALS['rootdir'], PHPGW_SERVER_ROOT)) +{ + $GLOBALS['filesdir'] = substr ($GLOBALS['rootdir'], strlen (PHPGW_SERVER_ROOT)); +} +else +{ + unset ($GLOBALS['filesdir']); +} + +$GLOBALS['hostname'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . $GLOBALS['filesdir']; + +### +# Note that $userinfo["username"] is actually the id number, not the login name +### + +$GLOBALS['userinfo']['username'] = $GLOBALS['phpgw_info']['user']['account_id']; +$GLOBALS['userinfo']['account_lid'] = $GLOBALS['phpgw']->accounts->id2name ($GLOBALS['userinfo']['username']); +$GLOBALS['userinfo']['hdspace'] = 10000000000; +$GLOBALS['homedir'] = $GLOBALS['fakebase'].'/'.$GLOBALS['userinfo']['account_lid']; + +### End Configuration Options ### + +if (!defined ('NULL')) +{ + define ('NULL', ''); +} + +require (PHPGW_APP_INC . '/db.inc.php'); + +/* Set up any initial db settings */ +db_init (); + +### +# Get user settings from database +### + +/* We have to define these by hand in phpGW, or rely on it's templates */ + +define ('HTML_TABLE_FILES_HEADER_BG_COLOR', ''); +define ('HTML_TABLE_FILES_HEADER_TEXT_COLOR', 'maroon'); +define ('HTML_TABLE_FILES_COLUMN_HEADER_BG_COLOR', ''); +define ('HTML_TABLE_FILES_COLUMN_HEADER_TEXT_COLOR', 'maroon'); +define ('HTML_TABLE_FILES_BG_COLOR', ''); +define ('HTML_TABLE_FILES_TEXT_COLOR', 'maroon'); +define ('HTML_TEXT_ERROR_COLOR', 'red'); +define ('HTML_TEXT_NAVIGATION_BACK_TO_USER', lang('Back to file manager')); + +### +# Need to include this here so they recognize the settings +### + +require (PHPGW_APP_INC . '/html.inc.php'); + +### +# Define the list of file attributes. Format is "internal_name" => "Displayed name" +# This is used both by internally and externally for things like preferences +### + +$file_attributes = Array( + 'name' => lang('File Name'), + 'mime_type' => lang('MIME Type'), + 'size' => lang('Size'), + 'created' => lang('Created'), + 'modified' => lang('Modified'), + 'owner' => lang('Owner'), + 'createdby_id' => lang('Created by'), + 'modifiedby_id' => lang('Created by'), + 'modifiedby_id' => lang('Modified by'), + 'app' => lang('Application'), + 'comment' => lang('Comment'), + 'version' => lang('Version') +); + +### +# Calculate and display B or KB +# And yes, that first if is strange, +# but it does do something +### + +function borkb ($size, $enclosed = NULL, $return = 0) +{ + if (!$size) + $size = 0; + + if ($enclosed) + { + $left = '('; + $right = ')'; + } + + if ($size < 1024) + $rstring = $left . $size . 'B' . $right; + else + $rstring = $left . round($size/1024) . 'KB' . $right; + + return (eor ($rstring, $return)); +} + +### +# Check for and return the first unwanted character +### + +function bad_chars ($string, $all = True, $return = 0) +{ + if ($all) + { + if (preg_match("-([\\/<>\'\"\&])-", $string, $badchars)) + $rstring = $badchars[1]; + } + else + { + if (preg_match("-([\\/<>])-", $string, $badchars)) + $rstring = $badchars[1]; + } + + return trim ((eor ($rstring, $return))); +} + +### +# Match character in string using ord (). +### + +function ord_match ($string, $charnum) +{ + for ($i = 0; $i < strlen ($string); $i++) + { + $character = ord (substr ($string, $i, 1)); + + if ($character == $charnum) + { + return True; + } + } + + return False; +} + +### +# Decide whether to echo or return. Used by HTML functions +### + +function eor ($rstring, $return) +{ + if ($return) + return ($rstring); + else + { + html_text ($rstring . "\n"); + return (0); + } +} + +### +# URL encode a string +# First check if its a query string, then if its just a URL, then just encodes it all +# Note: this is a hack. It was made to work with form actions, form values, and links only, +# but should be able to handle any normal query string or URL +### + +function string_encode ($string, $return = False) +{ + if (preg_match ("/=(.*)(&|$)/U", $string)) + { + $rstring = $string; + + preg_match_all ("/=(.*)(&|$)/U", $string, $matches, PREG_SET_ORDER); + + reset ($matches); + while (list (,$match_array) = each ($matches)) + { + $var_encoded = rawurlencode (base64_encode ($match_array[1])); + $rstring = str_replace ($match_array[0], '=' . $var_encoded . $match_array[2], $rstring); + } + } + elseif (ereg ('^'.$GLOBALS['hostname'], $string)) + { + $rstring = ereg_replace ('^'.$GLOBALS['hostname'].'/', '', $string); + $rstring = preg_replace ("/(.*)(\/|$)/Ue", "rawurlencode (base64_encode ('\\1')) . '\\2'", $rstring); + $rstring = $GLOBALS['hostname'].'/'.$rstring; + } + else + { + $rstring = rawurlencode ($string); + + /* Terrible hack, decodes all /'s back to normal */ + $rstring = preg_replace ("/%2F/", '/', $rstring); + } + + return (eor ($rstring, $return)); +} + +function string_decode ($string, $return = False) +{ + $rstring = rawurldecode ($string); + + return (eor ($rstring, $return)); +} + +### +# HTML encode a string +# This should be used with anything in an HTML tag that might contain < or > +### + +function html_encode ($string, $return) +{ + $rstring = htmlspecialchars ($string); + + return (eor ($rstring, $return)); +} + +function translate ($text) +{ + return ($GLOBALS['phpgw']->lang($text)); +} + +$help_info = Array( + array ("up", "The Up button takes you to the directory above the current directory. For example, if you're in /home/jdoe/mydir, the Up button would take you to /home/jdoe."), + array ("directory_name", "The name of the directory you're currently in."), + array ("home", "The Home button takes you to your personal home directory."), + array ("sort_by", "Click on any of the column headers to sort the list by that column."), + array ("filename", "The name of the file or directory."), + array ("mime_type", "The MIME-type of the file. Examples include text/plain, text/html, image/jpeg. The special MIME-type Directory is used for directories."), + array ("size", "The size of the file or directory in the most convenient units: bytes (B), kilobytes (KB), megabytes (MB), gigabytes (GB). Sizes for directories include subfiles and subdirectories."), + array ("created", "When the file or directory was created."), + array ("modified", "When the file or directory was last modified."), + array ("owner", "The owner of the file or directory. This can be a user or group name."), + array ("created_by", "Displays who created the file or directory."), + array ("modified_by", "Displays who last modified the file or directory."), + array ("application", "The application associated with the file or directory. Usually the application used to create it. A blank application field is ok."), + array ("comment", "The comment for the file or directory. Comments can be set when creating the file or directory, and created or edited any time thereafter."), + array ("version", "The current version for the file or directory. Clicking on the version number will display a list of changes made to the file or directory."), + array ("edit", "Edit the text of the selected file(s). You can select more than one file; this is useful when you want to copy part of one file into another. Clicking Preview will show you a preview of the file. Click Save to save your changes."), + array ("rename", "Rename the selected file(s). You can select as many files or directories as you want. You are presented with a text field to enter the new name of each file or directory."), + array ("delete", "Delete the selected file(s). You can select as many files or directories as you want. When deleting directories, the entire directory and all of its contents are deleted. You will not be prompted to make sure you want to delete the file(s); make sure you really want to delete them before clicking Delete."), + array ("edit_comments", "Create a comment for a file or directory, or edit an existing comment. You can select as many files or directories as you want."), + array ("go_to", "The Go to button takes you to the directory selected in the drop down [directory_list|Directory List]."), + array ("copy_to", "This will copy all selected files and directories to the directory selected in the drop down [directory_list|Directory List]."), + array ("move_to", "This will move all selected files and directories to the directory selected in the drop down [directory_list|Directory List]."), + array ("directory_list", "The Directory List contains a list of all directories you have (at least) read access to. Selecting a directory and clicking one of the [go_to|Go to]/[copy_to|Copy to]/[move_to|Move to] buttons will perform the selected action on that directory. For example, if you select \"/home/somegroup/reports\" from the Directory List, and click the \"[copy_to|Copy to]\" button, all selected files and directories will be copied to \"/home/somegroup/reports\"."), + array ("download", "Download the first selected file to your local computer. You can only download one file at a time. Directories cannot be downloaded, only files."), + array ("create_folder", "Creates a directory (folder == directory). The name of the directory is specified in the text box next to the Create Folder button."), + array ("create_file", "Creates a file in the current directory. The name of the file is specified in the text box next to the Create File button. After clicking the Create File button you will be presented with the [edit|Edit] screen, where you may edit the file you just created. If you do not with to make any changes to the file at this time, simply click the Save button and the file will be saved as an empty file."), + array ("command_line", "Enter a Unix-style command line here, which will be executed when the [execute|Execute] button is pressed. If you don't know what this is, you probably should turn the option off in the Preferences."), + array ("execute", "Clicking the Execute button will execute the Unix-style [command_line|command line] specified in the text box above. If you don't know what this is, you probably should turn the option off in the Preferences."), + array ("update", "Sync the database with the filesystem for the current directory. This is useful if you use another interface to access the same files. Any new files or directories in the current directory will be read in, and the attributes for the other files will be updated to reflect any changes to the filesystem. Update is run automatically every few page loads (currently every 20 page loads as of this writing, but that may have changed by now)."), + array ("file_stats", "Various statistics on the number and size of the files in the current directory. In some situations, these reflect different statistics. For example, when in / or the base directory."), + array ("upload_file", "The full path of the local file to upload. You can type it in or use the Browse.. button to select it. The file will be uploaded to the current directory. You cannot upload directories, only files."), + array ("upload_comment", "The inital comment to use for the newly uploaded file. Totally optional and completely arbitrary. You can [edit_comments|create or edit the comment] at any time in the future."), + array ("upload_files", "This will upload the files listed in the input boxes above, and store them in the current directory."), + array ("show_upload_fields", "This setting determines how many [upload_files|upload fields] will be shown at once. You can change the default number that will be shown in the [preferences].") + ); + +?> diff --git a/filemanager/index.php b/filemanager/index.php index 73e49ae8cf..b2175b3a0b 100755 --- a/filemanager/index.php +++ b/filemanager/index.php @@ -3,32 +3,1783 @@ ### # DEV NOTE: # -# index.php is depreciated by the inc/class.xxfilemanager.inc.php files. +# index.php is depreciated by the inc/class.xxphpwebhosting.inc.php files. # index.php is still used in the 0.9.14 release, but all future changes should be -# made to the inc/class.xxfilemanager.inc.php files (3-tiered). This includes using templates. +# made to the inc/class.xxphpwebhosting.inc.php files (3-tiered). This includes using templates. ### ### # Enable this to display some debugging info ### - $phpgw_flags = Array( - 'currentapp' => 'filemanager', - 'noheader' => True, - 'nonavbar' => True, - 'noappheader' => True, - 'noappfooter' => True, - 'nofooter' => True +$phpwh_debug = 0; + +@reset ($GLOBALS['HTTP_POST_VARS']); +while (list ($name,) = @each ($GLOBALS['HTTP_POST_VARS'])) +{ + $$name = $GLOBALS['HTTP_POST_VARS'][$name]; +} + +@reset ($GLOBALS['HTTP_GET_VARS']); +while (list ($name,) = @each ($GLOBALS['HTTP_GET_VARS'])) +{ + $$name = $GLOBALS['HTTP_GET_VARS'][$name]; +} + +$to_decode = array +( + /* + Decode + 'var' when 'avar' == 'value' + or + 'var' when 'var' is set + */ + 'op' => array ('op' => ''), + 'path' => array ('path' => ''), + 'file' => array ('file' => ''), + 'sortby' => array ('sortby' => ''), + 'fileman' => array ('fileman' => ''), + 'messages' => array ('messages' => ''), + 'help_name' => array ('help_name' => ''), + 'renamefiles' => array ('renamefiles' => ''), + 'comment_files' => array ('comment_files' => ''), + 'show_upload_boxes' => array ('show_upload_boxes' => '') +); + +reset ($to_decode); +while (list ($var, $conditions) = each ($to_decode)) +{ + while (list ($condvar, $condvalue) = each ($conditions)) + { + if (isset ($$condvar) && ($condvar == $var || $$condvar == $condvalue)) + { + if (is_array ($$var)) + { + $temp = array (); + //some fixes in this section were supplied by Michael Totschnig + while (list ($varkey, $varvalue) = each ($$var)) + { + if (is_int ($varkey)) + { + $temp[$varkey] = stripslashes (base64_decode(urldecode(($varvalue)))); + } + else + { + $temp[stripslashes (base64_decode(urldecode(($varkey))))] = $varvalue; + } + } + $$var = $temp; + } + elseif (isset ($$var)) + { + $$var = stripslashes (base64_decode(urldecode ($$var))); + } + } + } +} + +if ($noheader || $nofooter || ($download && (count ($fileman) > 0)) || ($op == 'view' && $file) || ($op == 'history' && $file) || ($op == 'help' && $help_name)) +{ + $noheader = True; + $nofooter = True; +} + +$GLOBALS['phpgw_info']['flags'] = array +( + 'currentapp' => 'filemanager', + 'noheader' => $noheader, + 'nofooter' => $nofooter, + 'noappheader' => False, + 'enable_vfs_class' => True, + 'enable_browser_class' => True +); + +include ('../header.inc.php'); + +if ($execute && $command_line) +{ + if ($result = $GLOBALS['phpgw']->vfs->command_line (array ('command_line' => stripslashes ($command_line)))) + { + $messages = html_text_bold (lang('Command sucessfully run'),1); + if ($result != 1 && strlen ($result) > 0) + { + $messages .= html_break (2, NULL, 1) . $result; + } + } + else + { + $messages = $GLOBALS['phpgw']->common->error_list (array (lang('Error running command'))); + } +} + +### +# Page to process users +# Code is fairly hackish at the beginning, but it gets better +# Highly suggest turning wrapping off due to long SQL queries +### + +### +# Some hacks to set and display directory paths correctly +### + +if ($go) +{ + $path = $todir; +} + +if (!$path) +{ + $path = $GLOBALS['phpgw']->vfs->pwd (); + + if (!$path || $GLOBALS['phpgw']->vfs->pwd (array ('full' => False)) == '') + { + $path = $GLOBALS['homedir']; + } +} + +$GLOBALS['phpgw']->vfs->cd (array ('string' => False, 'relatives' => array (RELATIVE_NONE), 'relative' => False)); +$GLOBALS['phpgw']->vfs->cd (array ('string' => $path, 'relatives' => array (RELATIVE_NONE), 'relative' => False)); + +$pwd = $GLOBALS['phpgw']->vfs->pwd (); + +if (!$cwd = substr ($path, strlen ($GLOBALS['homedir']) + 1)) +{ + $cwd = '/'; +} +else +{ + $cwd = substr ($pwd, strrpos ($pwd, '/') + 1); +} + +$disppath = $path; + +/* This just prevents // in some cases */ +if ($path == '/') + $dispsep = ''; +else + $dispsep = '/'; + +if (!($lesspath = substr ($path, 0, strrpos ($path, '/')))) + $lesspath = '/'; + +$now = date ('Y-m-d'); + +if ($phpwh_debug) +{ + echo "PHPWebHosting debug:
+ path: $path
+ disppath: $disppath
+ cwd: $cwd
+ lesspath: $lesspath +

+ phpGW debug:
+ real getabsolutepath: " . $GLOBALS['phpgw']->vfs->getabsolutepath (array ('target' => False, 'mask' => False, 'fake' => False)) . "
+ fake getabsolutepath: " . $GLOBALS['phpgw']->vfs->getabsolutepath (array ('target' => False)) . "
+ appsession: " . $GLOBALS['phpgw']->session->appsession ('vfs','') . "
+ pwd: " . $GLOBALS['phpgw']->vfs->pwd () . "
"; +} + +### +# Get their readable groups to be used throughout the script +### + +$groups = array (); + +$groups = $GLOBALS['phpgw']->accounts->get_list ('groups'); + +$readable_groups = array (); + +while (list ($num, $account) = each ($groups)) +{ + if ($GLOBALS['phpgw']->vfs->acl_check (array ( + 'owner_id' => $account['account_id'], + 'operation' => PHPGW_ACL_READ + )) + ) + { + $readable_groups[$account['account_lid']] = Array('account_id' => $account['account_id'], 'account_name' => $account['account_lid']); + } +} + +$groups_applications = array (); + +while (list ($num, $group_array) = each ($readable_groups)) +{ + $group_id = $GLOBALS['phpgw']->accounts->name2id ($group_array['account_name']); + + $applications = CreateObject('phpgwapi.applications', $group_id); + $groups_applications[$group_array['account_name']] = $applications->read_account_specific (); +} + +### +# We determine if they're in their home directory or a group's directory, +# and set the VFS working_id appropriately +### + +if ((preg_match ('+^'.$GLOBALS['fakebase'].'\/(.*)(\/|$)+U', $path, $matches)) && $matches[1] != $GLOBALS['userinfo']['account_lid']) +{ + $GLOBALS['phpgw']->vfs->working_id = $GLOBALS['phpgw']->accounts->name2id ($matches[1]); +} +else +{ + $GLOBALS['phpgw']->vfs->working_id = $GLOBALS['userinfo']['username']; +} + +if ($path != $GLOBALS['homedir'] + && $path != $GLOBALS['fakebase'] + && $path != '/' + && !$GLOBALS['phpgw']->vfs->acl_check (array ( + 'string' => $path, + 'relatives' => array (RELATIVE_NONE), + 'operation' => PHPGW_ACL_READ + )) +) +{ + echo $GLOBALS['phpgw']->common->error_list (array (lang('You do not have access to %1', $path))); + html_break (2); + html_link ($GLOBALS['appname'].'/index.php?path='.$GLOBALS['homedir'], lang('Go to your home directory')); + html_page_close (); +} + +$GLOBALS['userinfo']['working_id'] = $GLOBALS['phpgw']->vfs->working_id; +$GLOBALS['userinfo']['working_lid'] = $GLOBALS['phpgw']->accounts->id2name ($GLOBALS['userinfo']['working_id']); + +### +# If their home directory doesn't exist, we create it +# Same for group directories +### + +if (($path == $GLOBALS['homedir']) + && !$GLOBALS['phpgw']->vfs->file_exists (array ( + 'string' => $GLOBALS['homedir'], + 'relatives' => array (RELATIVE_NONE) + )) +) +{ + $GLOBALS['phpgw']->vfs->override_acl = 1; + + if (!$GLOBALS['phpgw']->vfs->mkdir (array ('string' => $GLOBALS['homedir'], 'relatives' => array (RELATIVE_NONE)))) + { + $p = $phpgw->vfs->path_parts (array ('string' => $GLOBALS['homedir'], 'relatives' => array (RELATIVE_NONE))); + echo $GLOBALS['phpgw']->common->error_list (array (lang('Could not create directory %1', $GLOBALS['homedir'] . ' (' . $p->real_full_path . ')'))); + } + + $GLOBALS['phpgw']->vfs->override_acl = 0; +} + +### +# Verify path is real +### + +if ($path != $GLOBALS['homedir'] && $path != '/' && $path != $GLOBALS['fakebase']) +{ + if (!$GLOBALS['phpgw']->vfs->file_exists (array ('string' => $path, 'relatives' => array (RELATIVE_NONE)))) + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Directory %1 does not exist', $path))); + html_break (2); + html_link ($GLOBALS['appname'].'/index.php?path='.$GLOBALS['homedir'], lang('Go to your home directory')); + html_break (2); + html_link_back (); + html_page_close (); + } +} + +/* Update if they request it, or one out of 20 page loads */ +srand ((double) microtime() * 1000000); +if ($update || rand (0, 19) == 4) +{ + $GLOBALS['phpgw']->vfs->update_real (array ('string' => $path, 'relatives' => array (RELATIVE_NONE))); +} + +### +# Check available permissions for $path, so we can disable unusable operations in user interface +### + +if ($GLOBALS['phpgw']->vfs->acl_check (array ( + 'string' => $path, + 'relatives' => array (RELATIVE_NONE), + 'operation' => PHPGW_ACL_ADD + )) +) +{ + $can_add = True; +} + +### +# Default is to sort by name +### + +if (!$sortby) +{ + $sortby = 'name'; +} + +### +# Decide how many upload boxes to show +### + +if (!$show_upload_boxes || $show_upload_boxes <= 0) +{ + if (!$show_upload_boxes = $GLOBALS['settings']['show_upload_boxes']) + { + $show_upload_boxes = 5; + } +} + + +### +# Read in file info from database to use in the rest of the script +# $fakebase is a special directory. In that directory, we list the user's +# home directory and the directories for the groups they're in +### + +$numoffiles = 0; +if ($path == $GLOBALS['fakebase']) +{ + if (!$GLOBALS['phpgw']->vfs->file_exists (array ('string' => $GLOBALS['homedir'], 'relatives' => array (RELATIVE_NONE)))) + { + $GLOBALS['phpgw']->vfs->mkdir (array ('string' => $GLOBALS['homedir'], 'relatives' => array (RELATIVE_NONE))); + } + + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $GLOBALS['homedir'], + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => False, + 'nofiles' => True + ) ); - $GLOBALS['phpgw_info']['flags'] = $phpgw_flags; + $files_array[] = $ls_array[0]; + $numoffiles++; +// $files_array = $ls_array; +// $numoffiles = count($ls_array); + + reset ($readable_groups); + while (list ($num, $group_array) = each ($readable_groups)) + { + ### + # If the group doesn't have access to this app, we don't show it + ### + + if (!$groups_applications[$group_array['account_name']][$GLOBALS['appname']]['enabled']) + { + continue; + } + + if (!$GLOBALS['phpgw']->vfs->file_exists (array ( + 'string' => $GLOBALS['fakebase'].'/'.$group_array['account_name'], + 'relatives' => array (RELATIVE_NONE) + )) + ) + { + $GLOBALS['phpgw']->vfs->override_acl = 1; + $GLOBALS['phpgw']->vfs->mkdir (array ( + 'string' => $GLOBALS['fakebase'].'/'.$group_array['account_name'], + 'relatives' => array (RELATIVE_NONE) + ) + ); + $GLOBALS['phpgw']->vfs->override_acl = 0; + + $GLOBALS['phpgw']->vfs->set_attributes (array ( + 'string' => $GLOBALS['fakebase'].'/'.$group_array['account_name'], + 'relatives' => array (RELATIVE_NONE), + 'attributes' => array ( + 'owner_id' => $group_array['account_id'], + 'createdby_id' => $group_array['account_id'] + ) + ) + ); + } + + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $GLOBALS['fakebase'].'/'.$group_array['account_name'], + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => False, + 'nofiles' => True + ) + ); + + $files_array[] = $ls_array[0]; + + $numoffiles++; + } +} +else +{ + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $path, + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => False, + 'nofiles' => False, + 'orderby' => $sortby + ) + ); + + if ($phpwh_debug) + { + echo '# of files found in "'.$path.'" : '.count($ls_array).'
'."\n"; + } + + while (list ($num, $file_array) = each ($ls_array)) + { + $numoffiles++; + $files_array[] = $file_array; + if ($phpwh_debug) + { + echo 'Filename: '.$file_array['name'].'
'."\n"; + } + } +} + +if (!is_array ($files_array)) +{ + $files_array = array (); +} + +if ($download) +{ + for ($i = 0; $i != $numoffiles; $i++) + { + if (!$fileman[$i]) + { + continue; + } + + $download_browser = CreateObject ('phpgwapi.browser'); + $download_browser->content_header ($fileman[$i]); + echo $GLOBALS['phpgw']->vfs->read (array ('string' => $fileman[$i])); + $GLOBALS['phpgw']->common->phpgw_exit (); + } +} + +if ($op == 'view' && $file) +{ + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $path.'/'.$file, + 'relatives' => array (RELATIVE_ALL), + 'checksubdirs' => False, + 'nofiles' => True + ) + ); + + if ($ls_array[0]['mime_type']) + { + $mime_type = $ls_array[0]['mime_type']; + } + elseif ($GLOBALS['settings']['viewtextplain']) + { + $mime_type = 'text/plain'; + } + + header('Content-type: ' . $mime_type); + echo $GLOBALS['phpgw']->vfs->read (array ( + 'string' => $path.'/'.$file, + 'relatives' => array (RELATIVE_NONE) + ) + ); + $GLOBALS['phpgw']->common->phpgw_exit (); +} + +if ($op == 'history' && $file) +{ + $journal_array = $GLOBALS['phpgw']->vfs->get_journal (array ( + 'string' => $file, + 'relatives' => array (RELATIVE_ALL) + ) + ); + + if (is_array ($journal_array)) + { + html_table_begin (); + html_table_row_begin (); + html_table_col_begin (); + html_text_bold (lang('Date')); + html_table_col_end (); + html_table_col_begin (); + html_text_bold (lang('Version')); + html_table_col_end (); + html_table_col_begin (); + html_text_bold (lang('Who')); + html_table_col_end (); + html_table_col_begin (); + html_text_bold (lang('Operation')); + html_table_col_end (); + html_table_row_end (); + + while (list ($num, $journal_entry) = each ($journal_array)) + { + html_table_row_begin (); + html_table_col_begin (); + html_text ($journal_entry['created'] . html_nbsp (3, 1)); + html_table_col_end (); + html_table_col_begin (); + html_text ($journal_entry['version'] . html_nbsp (3, 1)); + html_table_col_end (); + html_table_col_begin (); + html_text ($GLOBALS['phpgw']->accounts->id2name ($journal_entry['owner_id']) . html_nbsp (3, 1)); + html_table_col_end (); + html_table_col_begin (); + html_text ($journal_entry['comment']); + html_table_col_end (); + } + + html_table_end (); + html_page_close (); + } + else + { + html_text_bold (lang('No version history for this file/directory')); + } + +} + +if ($newfile && $createfile) +{ + if ($badchar = bad_chars ($createfile, True, True)) + { + echo $GLOBALS['phpgw']->common->error_list (array (html_encode (lang('File names cannot contain "%1"',$badchar), 1))); + html_break (2); + html_link_back (); + html_page_close (); + } + + if ($GLOBALS['phpgw']->vfs->file_exists (array ( + 'string' => $createfile, + 'relatives' => array (RELATIVE_ALL) + )) + ) + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('File %1 already exists. Please edit it or delete it first.', $createfile))); + html_break (2); + html_link_back (); + html_page_close (); + } + + if ($GLOBALS['phpgw']->vfs->touch (array ( + 'string' => $createfile, + 'relatives' => array (RELATIVE_ALL) + )) + ) + { + $fileman = array (); + $fileman[0] = $createfile; + $edit = 1; + $numoffiles++; + } + else + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('File %1 could not be created.', $createfile))); + } +} + +if ($op == 'help' && $help_name) +{ + while (list ($num, $help_array) = each ($help_info)) + { + if ($help_array[0] != $help_name) + continue; + + $help_array[1] = preg_replace ("/\[(.*)\|(.*)\]/Ue", "html_help_link ('\\1', '\\2', False, True)", $help_array[1]); + $help_array[1] = preg_replace ("/\[(.*)\]/Ue", "html_help_link ('\\1', '\\1', False, True)", $help_array[1]); + + html_font_set ('4'); + $title = ereg_replace ('_', ' ', $help_array[0]); + $title = ucwords ($title); + html_text ($title); + html_font_end (); + + html_break (2); + + html_font_set ('2'); + html_text ($help_array[1]); + html_font_end (); + } + + $GLOBALS['phpgw']->common->phpgw_exit (); +} + +### +# Start Main Page +### + +html_page_begin (lang('Users').' :: '.$GLOBALS['userinfo']['username']); +html_page_body_begin (HTML_PAGE_BODY_COLOR); + +if ($messages) +{ + html_text ($messages); +} + +if (!count ($GLOBALS['settings'])) +{ + $pref = CreateObject ('phpgwapi.preferences', $GLOBALS['userinfo']['username']); + $pref->read_repository (); + $GLOBALS['phpgw']->hooks->single ('add_def_pref', $GLOBALS['appname']); + $pref->save_repository (True); + $pref_array = $pref->read_repository (); + $GLOBALS['settings'] = $pref_array[$GLOBALS['appname']]; +} + +### +# Start Main Table +### + +if (!$op && !$delete && !$createdir && !$renamefiles && !$move && !$copy && !$edit && !$comment_files) +{ + html_table_begin ('100%'); + html_table_row_begin (); + html_table_col_begin ('center', NULL, 'top'); + html_align ('center'); + html_form_begin ($GLOBALS['appname'].'/index.php?path='.$path); + if ($numoffiles || $cwd) + { + while (list ($num, $name) = each ($GLOBALS['settings'])) + { + if ($name) + { + $columns++; + } + } + $columns++; + html_table_begin (); + html_table_row_begin (NULL, NULL, NULL, HTML_TABLE_FILES_HEADER_BG_COLOR); + html_table_col_begin ('center', NULL, NULL, NULL, $columns); + html_table_begin ('100%'); + html_table_row_begin (); + html_table_col_begin ('left'); + + if ($path != '/') + { + html_link ($GLOBALS['appname'].'/index.php?path='.$lesspath, html_image ('images/folder-up.gif', lang('Up'), 'left', 0, NULL, 1)); + html_help_link ('up'); + } + + html_table_col_end (); + html_table_col_begin ('center'); + + if ($cwd) + { + if ($path == $GLOBALS['homedir']) + { + html_image ('images/folder-home.gif', lang('Folder'), 'center'); + } + else + { + html_image ('images/folder.gif', lang('Folder'), 'center'); + } + } + else + { + html_image ('images/folder-home.gif', lang('Home')); + } + + html_font_set (4, HTML_TABLE_FILES_HEADER_TEXT_COLOR); + html_text_bold (strtoupper ($disppath)); + html_font_end (); + html_help_link ('directory_name'); + html_table_col_end (); + html_table_col_begin ('right'); + + if ($path != $GLOBALS['homedir']) + { + html_link ($GLOBALS['appname'].'/index.php?path='.$GLOBALS['homedir'], html_image ('images/folder-home.gif', lang('Home'), 'right', 0, NULL, 1)); + html_help_link ('home'); + } + + html_table_col_end (); + html_table_row_end (); + html_table_end (); + html_table_col_end (); + html_table_row_end (); + html_table_row_begin (NULL, NULL, NULL, HTML_TABLE_FILES_COLUMN_HEADER_BG_COLOR); + + ### + # Start File Table Column Headers + # Reads values from $file_attributes array and preferences + ### + + html_table_col_begin (); + html_text (lang('Sort by:') . html_nbsp (1, 1), NULL, NULL, 0); + html_help_link ('sort_by'); + html_table_col_end (); + + reset ($file_attributes); + while (list ($internal, $displayed) = each ($file_attributes)) + { + if ($GLOBALS['settings'][$internal]) + { + html_table_col_begin (); + html_link ($GLOBALS['appname'].'/index.php?path='.$path.'&sortby='.$internal, html_text_bold ($displayed, 1, 0)); + html_help_link (strtolower (ereg_replace (' ', '_', $displayed))); + html_table_col_end (); + } + } + + html_table_col_begin (); + html_table_col_end (); + html_table_row_end (); + + if ($GLOBALS['settings']['dotdot'] && $GLOBALS['settings']['name'] && $path != '/') + { + html_table_row_begin (); + html_table_col_begin (); + html_table_col_end (); + + /* We can assume the next column is the name */ + html_table_col_begin (); + html_image ('images/folder.gif', lang('Folder')); + html_link ($GLOBALS['appname'].'/index.php?path='.$lesspath, '..'); + html_table_col_end (); + + if ($GLOBALS['settings']['mime_type']) + { + html_table_col_begin (); + html_text (lang('Directory')); + html_table_col_end (); + } + + html_table_row_end (); + } + + ### + # List all of the files, with their attributes + ### + + reset ($files_array); + for ($i = 0; $i != $numoffiles; $i++) + { + $files = $files_array[$i]; + + if ($rename || $edit_comments) + { + unset ($this_selected); + unset ($renamethis); + unset ($edit_this_comment); + + for ($j = 0; $j != $numoffiles; $j++) + { + if ($fileman[$j] == $files['name']) + { + $this_selected = 1; + break; + } + } + + if ($rename && $this_selected) + { + $renamethis = 1; + } + elseif ($edit_comments && $this_selected) + { + $edit_this_comment = 1; + } + } + + if (!$GLOBALS['settings']['dotfiles'] && ereg ("^\.", $files['name'])) + { + continue; + } + + html_table_row_begin (NULL, NULL, NULL, HTML_TABLE_FILES_BG_COLOR); + + ### + # Checkboxes + ### + + html_table_col_begin ('right'); + + if (!$rename && !$edit_comments && $path != $GLOBALS['fakebase'] && $path != '/') + { + html_form_input ('checkbox', 'fileman['.$i.']', base64_encode ($files['name'])); + } + elseif ($renamethis) + { + html_form_input ('hidden', 'fileman[' . base64_encode ($files['name']) . ']', $files['name'], NULL, NULL, 'checked'); + } + else + { + html_nbsp(); + } + + html_table_col_end (); + + ### + # File name and icon + ### + + if ($GLOBALS['settings']['name']) + { + if ($phpwh_debug) + { + echo 'Setting file name: '.$files['name'].'
'."\n"; + } + + html_table_col_begin (); + + if ($renamethis) + { + if ($files['mime_type'] == 'Directory') + { + html_image ('images/folder.gif', lang('Folder')); + } + html_form_input ('text', 'renamefiles[' . base64_encode ($files['name']) . ']', $files['name'], 255); + } + else + { + if ($files['mime_type'] == 'Directory') + { + html_image ('images/folder.gif', lang('Folder')); + html_link ($GLOBALS['appname'].'/index.php?path='.$path.$dispsep.$files['name'], $files['name']); + } + else + { + if ($GLOBALS['settings']['viewonserver'] && isset ($GLOBALS['filesdir']) && !$files['link_directory']) + { + $clickview = $GLOBALS['filesdir'].$pwd.'/'.$files['name']; + + if ($phpwh_debug) + { + echo 'Setting clickview = '.$clickview.'
'."\n"; + } + } + else + { + $clickview = $GLOBALS['appname'].'/index.php?op=view&file='.$files['name'].'&path='.$path; + } + + if ($GLOBALS['settings']['viewinnewwin']) + { + $target = '_new'; + } + + html_link ($clickview, $files['name'], 0, 1, 0, $target); + } + } + + html_table_col_end (); + } + + ### + # MIME type + ### + + if ($GLOBALS['settings']['mime_type']) + { + html_table_col_begin (); + html_text ($files['mime_type']); + html_table_col_end (); + } + + ### + # File size + ### + + if ($GLOBALS['settings']['size']) + { + html_table_col_begin (); + + $size = $GLOBALS['phpgw']->vfs->get_size (array ( + 'string' => $files['directory'] . '/' . $files['name'], + 'relatives' => array (RELATIVE_NONE) + ) + ); + + borkb ($size); + + html_table_col_end (); + } + + ### + # Date created + ### + if ($GLOBALS['settings']['created']) + { + html_table_col_begin (); + html_text ($files['created']); + html_table_col_end (); + } + + ### + # Date modified + ### + + if ($GLOBALS['settings']['modified']) + { + html_table_col_begin (); + if ($files['modified'] != '0000-00-00') + { + html_text ($files['modified']); + } + html_table_col_end (); + } + + ### + # Owner name + ### + + if ($GLOBALS['settings']['owner']) + { + html_table_col_begin (); + html_text ($GLOBALS['phpgw']->accounts->id2name ($files['owner_id'])); + html_table_col_end (); + } + + ### + # Creator name + ### + + if ($GLOBALS['settings']['createdby_id']) + { + html_table_col_begin (); + if ($files['createdby_id']) + { + html_text ($GLOBALS['phpgw']->accounts->id2name ($files['createdby_id'])); + } + html_table_col_end (); + } + + ### + # Modified by name + ### + + if ($GLOBALS['settings']['modifiedby_id']) + { + html_table_col_begin (); + if ($files['modifiedby_id']) + { + html_text ($GLOBALS['phpgw']->accounts->id2name ($files['modifiedby_id'])); + } + html_table_col_end (); + } + + ### + # Application + ### + + if ($GLOBALS['settings']['app']) + { + html_table_col_begin (); + html_text ($files['app']); + html_table_col_end (); + } + + ### + # Comment + ### + + if ($GLOBALS['settings']['comment']) + { + html_table_col_begin (); + if ($edit_this_comment) + { + html_form_input ('text', 'comment_files[' . base64_encode ($files['name']) . ']', html_encode ($files['comment'], 1), 255); + } + else + { + html_text ($files['comment']); + } + html_table_col_end (); + } + + ### + # Version + ### + + if ($GLOBALS['settings']['version']) + { + html_table_col_begin (); + html_link ($GLOBALS['appname'].'/index.php?op=history&file='.$files['name'].'&path='.$path, $files['version'], NULL, True, NULL, '_new'); + html_table_col_end (); + } + + ### + # Deleteable (currently not used) + ### + + if ($GLOBALS['settings']['deleteable']) + { + if ($files['deleteable'] == 'N') + { + html_table_col_begin (); + html_image ('images/locked.gif', lang('Locked')); + html_table_col_end (); + } + else + { + html_table_col_begin (); + html_table_col_end (); + } + } + + html_table_row_end (); + + if ($files['mime_type'] == 'Directory') + { + $usedspace += $fileinfo[0]; + } + else + { + $usedspace += $files['size']; + } + } + + html_table_end (); + html_break (2); + + if ($path != '/' && $path != $GLOBALS['fakebase']) + { + if (!$rename && !$edit_comments) + { + html_form_input ('submit', 'edit', lang('Edit')); + html_help_link ('edit'); + html_nbsp (3); + } + + if (!$edit_comments) + { + html_form_input ('submit', 'rename', lang('Rename')); + html_help_link ('rename'); + html_nbsp (3); + } + + if (!$rename && !$edit_comments) + { + html_form_input ('submit', 'delete', lang('Delete')); + html_help_link ('delete'); + html_nbsp (3); + } + + if (!$rename) + { + html_form_input ('submit', 'edit_comments', lang('Edit comments')); + html_help_link ('edit_comments'); + } + } + } + + ### + # Display some inputs and info, but not when renaming or editing comments + ### + + if (!$rename && !$edit_comments) + { + ### + # Begin Copy to/Move to selection + ### + + html_break (1); + html_form_input ('submit', 'go', lang('Go to:')); + html_help_link ('go_to'); + + if ($path != '/' && $path != $GLOBALS['fakebase']) + { + html_form_input ('submit', 'copy', lang('Copy to:')); + html_help_link ('copy_to'); + html_form_input ('submit', 'move', lang('Move to:')); + html_help_link ('move_to'); + } + + html_form_select_begin ('todir'); + + html_break (1); + + ### + # First we get the directories in their home directory + ### + + $dirs = array (); + $dirs[] = array ('directory' => $GLOBALS['fakebase'], 'name' => $GLOBALS['userinfo']['account_lid']); + + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $GLOBALS['homedir'], + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => True, + 'mime_type' => 'Directory' + ) + ); + + while (list ($num, $dir) = each ($ls_array)) + { + $dirs[] = $dir; + } + + + ### + # Then we get the directories in their readable groups' home directories + ### + + reset ($readable_groups); + while (list ($num, $group_array) = each ($readable_groups)) + { + ### + # Don't list directories for groups that don't have access + ### + + if (!$groups_applications[$group_array['account_name']][$GLOBALS['appname']]['enabled']) + { + continue; + } + + $dirs[] = array ('directory' => $GLOBALS['fakebase'], 'name' => $group_array['account_name']); + + $ls_array = $phpgw->vfs->ls (array ( + 'string' => $GLOBALS['fakebase'].'/'.$group_array['account_name'], + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => True, + 'mime_type' => 'Directory' + ) + ); + while (list ($num, $dir) = each ($ls_array)) + { + $dirs[] = $dir; + } + } + + reset ($dirs); + while (list ($num, $dir) = each ($dirs)) + { + if (!$dir['directory']) + { + continue; + } + + ### + # So we don't display // + ### + + if ($dir['directory'] != '/') + { + $dir['directory'] .= '/'; + } + + ### + # No point in displaying the current directory, or a directory that doesn't exist + ### + + if ((($dir['directory'] . $dir['name']) != $path) + && $GLOBALS['phpgw']->vfs->file_exists (array ( + 'string' => $dir['directory'] . $dir['name'], + 'relatives' => array (RELATIVE_NONE) + )) + ) + { + html_form_option ($dir['directory'] . $dir['name'], $dir['directory'] . $dir['name']); + } + } + + html_form_select_end (); + html_help_link ('directory_list'); + + if ($path != '/' && $path != $GLOBALS['fakebase']) + { + html_break (1); + + html_form_input ('submit', 'download', lang('Download')); + html_help_link ('download'); + html_nbsp (3); + + if ($can_add) + { + html_form_input ('text', 'createdir', NULL, 255, 15); + html_form_input ('submit', 'newdir', lang('Create Folder')); + html_help_link ('create_folder'); + } + } + + html_break (1); + html_form_input ('submit', 'update', lang('Update')); + html_help_link ('update'); + + if ($path != '/' && $path != $GLOBALS['fakebase'] && $can_add) + { + html_nbsp (3); + html_form_input ('text', 'createfile', NULL, 255, 15); + html_form_input ('submit', 'newfile', lang('Create File')); + html_help_link ('create_file'); + } + + if ($GLOBALS['settings']['show_command_line']) + { + html_break (2); + html_form_input ('text', 'command_line', NULL, NULL, 50); + html_help_link ('command_line'); + + html_break (1); + html_form_input ('submit', 'execute', lang('Execute')); + html_help_link ('execute'); + } + + html_form_end (); + + html_help_link ('file_stats'); + html_break (1); + html_text_bold (lang('Files').': '); + html_text ($numoffiles); + html_nbsp (3); + + html_text_bold (lang('Used space').': '); + html_text (borkb ($usedspace, NULL, 1)); + html_nbsp (3); + + if ($path == $GLOBALS['homedir'] || $path == $GLOBALS['fakebase']) + { + html_text_bold (lang('Unused space').': '); + html_text (borkb ($GLOBALS['userinfo']['hdspace'] - $usedspace, NULL, 1)); + + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $path, + 'relatives' => array (RELATIVE_NONE) + ) + ); + + $i = count ($ls_array); + + html_break (2); + html_text_bold (lang('Total Files').': '); + html_text ($i); + } + + ### + # Show file upload boxes. Note the last argument to html (). Repeats $show_upload_boxes times + ### + + if ($path != '/' && $path != $GLOBALS['fakebase'] && $can_add) + { + html_break (2); + html_form_begin ($GLOBALS['appname'].'/index.php?op=upload&path='.$path, 'post', 'multipart/form-data'); + html_table_begin (); + html_table_row_begin ('center'); + html_table_col_begin (); + html_text_bold (lang('File')); + html_help_link ('upload_file'); + html_table_col_end (); + html_table_col_begin (); + html_text_bold (lang('Comment')); + html_help_link ('upload_comment'); + html_table_col_end (); + html_table_row_end (); + + html_table_row_begin (); + html_table_col_begin (); + html_form_input ('hidden', 'show_upload_boxes', base64_encode ($show_upload_boxes)); + html (html_form_input ('file', 'upload_file[]', NULL, 255, NULL, NULL, NULL, 1) . html_break (1, NULL, 1), $show_upload_boxes); + html_table_col_end (); + html_table_col_begin (); + html (html_form_input ('text', 'upload_comment[]', NULL, NULL, NULL, NULL, NULL, 1) . html_break (1, NULL, 1), $show_upload_boxes); + html_table_col_end (); + html_table_row_end (); + html_table_end (); + html_form_input ('submit', 'upload_files', lang('Upload files')); + html_help_link ('upload_files'); + html_break (2); + html_text (lang('Show') . html_nbsp (1, True)); + html_link ($GLOBALS['appname'].'/index.php?show_upload_boxes=5', '5'); + html_nbsp (); + html_link ($GLOBALS['appname'].'/index.php?show_upload_boxes=10', '10'); + html_nbsp (); + html_link ($GLOBALS['appname'].'/index.php?show_upload_boxes=20', '20'); + html_nbsp (); + html_link ($GLOBALS['appname'].'/index.php?show_upload_boxes=50', '50'); + html_nbsp (); + html_text (lang('upload fields')); + html_nbsp (); + html_help_link ('show_upload_fields'); + html_form_end (); + } + } + + html_table_col_end (); + html_table_row_end (); + html_table_end (); + html_page_close (); +} + +### +# Handle Editing files +### + +if ($edit) +{ + ### + # If $edit is "Edit", we do nothing, and let the for loop take over + ### + + if ($edit_file) + { + $edit_file_content = stripslashes ($edit_file_content); + } + + if ($edit_preview) + { + $content = $edit_file_content; + + html_break (1); + html_text_bold (lang('Preview of %1', $path.'/'.$edit_file)); + html_break (2); + + html_table_begin ('90%'); + html_table_row_begin (); + html_table_col_begin (); + html_text (nl2br ($content)); + html_table_col_end (); + html_table_row_end (); + html_table_end (); + } + elseif ($edit_save) + { + $content = $edit_file_content; + + if ($GLOBALS['phpgw']->vfs->write (array ( + 'string' => $edit_file, + 'relatives' => array (RELATIVE_ALL), + 'content' => $content + )) + ) + { + html_text_bold (lang('Saved %1', $path.'/'.$edit_file)); + html_break (2); + html_link_back (); + } + else + { + html_text_error (lang('Could not save %1', $path.'/'.$edit_file)); + html_break (2); + html_link_back (); + } + } + +/* This doesn't work just yet + elseif ($edit_save_all) + { + for ($j = 0; $j != $numoffiles; $j++) + { + $fileman[$j]; + + $content = $fileman[$j]; + echo 'fileman['.$j.']: '.$fileman[$j].'
'.$content.'
'; + continue; + + if ($GLOBALS['phpgw']->vfs->write (array ( + 'string' => $fileman[$j], + 'relatives' => array (RELATIVE_ALL), + 'content' => $content + )) + ) + { + html_text_bold (lang('Saved %1', $path.'/'.$fileman[$j])); + html_break (1); + } + else + { + html_text_error (lang('Could not save %1', $path.'/'.$fileman[$j])); + html_break (1); + } + } + + html_break (1); + } +*/ + + ### + # Now we display the edit boxes and forms + ### + + for ($j = 0; $j != $numoffiles; $j++) + { + ### + # If we're in preview or save mode, we only show the file + # being previewed or saved + ### + + if ($edit_file && ($fileman[$j] != $edit_file)) + { + continue; + } + + if ($fileman[$j] && $GLOBALS['phpgw']->vfs->file_exists (array ( + 'string' => $fileman[$j], + 'relatives' => array (RELATIVE_ALL) + )) + ) + { + if ($edit_file) + { + $content = stripslashes ($edit_file_content); + } + else + { + $content = $GLOBALS['phpgw']->vfs->read (array ('string' => $fileman[$j])); + } + + html_table_begin ('100%'); + html_form_begin ($GLOBALS['appname'].'/index.php?path='.$path); + html_form_input ('hidden', 'edit', True); + html_form_input ('hidden', 'edit_file', $fileman[$j]); + + ### + # We need to include all of the fileman entries for each file's form, + # so we loop through again + ### + + for ($i = 0; $i != $numoffiles; $i++) + { + html_form_input ('hidden', 'fileman['.$i.']', base64_encode ($fileman[$i])); + } + + html_table_row_begin (); + html_table_col_begin (); + html_form_textarea ('edit_file_content', 35, 75, $content); + html_table_col_end (); + html_table_col_begin ('center'); + html_form_input ('submit', 'edit_preview', lang('Preview %1', html_encode ($fileman[$j], 1))); + html_break (1); + html_form_input ('submit', 'edit_save', lang('Save %1', html_encode ($fileman[$j], 1))); +// html_break (1); +// html_form_input ('submit', 'edit_save_all', lang('Save all')); + html_table_col_end (); + html_table_row_end (); + html_break (2); + html_form_end (); + html_table_end (); + } + } +} + +### +# Handle File Uploads +### + +elseif ($op == 'upload' && $path != '/' && $path != $GLOBALS['fakebase']) +{ + for ($i = 0; $i != $show_upload_boxes; $i++) + { + if ($badchar = bad_chars ($_FILES['upload_file']['name'][$i], True, True)) + { + echo $GLOBALS['phpgw']->common->error_list (array (html_encode (lang('File names cannot contain "%1"', $badchar), 1))); + + continue; + } + + ### + # Check to see if the file exists in the database, and get its info at the same time + ### + + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $path . '/' . $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => False, + 'nofiles' => True + ) + ); + + $fileinfo = $ls_array[0]; + + if ($fileinfo['name']) + { + if ($fileinfo['mime_type'] == 'Directory') + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Cannot replace %1 because it is a directory', $fileinfo['name']))); + continue; + } + } + + if ($_FILES['upload_file']['size'][$i] > 0) + { + if ($fileinfo['name'] && $fileinfo['deleteable'] != 'N') + { + $GLOBALS['phpgw']->vfs->set_attributes (array ( + 'string' => $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_ALL), + 'attributes' => array ( + 'owner_id' => $GLOBALS['userinfo']['username'], + 'modifiedby_id' => $GLOBALS['userinfo']['username'], + 'modified' => $now, + 'size' => $_FILES['upload_file']['size'][$i], + 'mime_type' => $_FILES['upload_file']['type'][$i], + 'deleteable' => 'Y', + 'comment' => stripslashes ($upload_comment[$i]) + ) + ) + ); + + $GLOBALS['phpgw']->vfs->cp(array ( + 'from' => $_FILES['upload_file']['tmp_name'][$i], + 'to' => $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) + ) + ); + + html_text_summary(lang('Replaced %1', $disppath.'/'.$_FILES['upload_file']['name'][$i]), $_FILES['upload_file']['size'][$i]); + } + else + { + $GLOBALS['phpgw']->vfs->cp (array ( + 'from' => $_FILES['upload_file']['tmp_name'][$i], + 'to' => $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) + ) + ); + + $GLOBALS['phpgw']->vfs->set_attributes (array ( + 'string' => $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_ALL), + 'attributes' => array ( + 'mime_type' => $_FILES['upload_file']['type'][$i], + 'comment' => stripslashes ($upload_comment[$i]) + ) + ) + ); + + html_text_summary(lang('Created %1', $disppath.'/'.$_FILES['upload_file']['name'][$i]), $_FILES['upload_file']['size'][$i]); + } + } + elseif ($_FILES['upload_file']['name'][$i]) + { + $GLOBALS['phpgw']->vfs->touch (array ( + 'string' => $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_ALL) + ) + ); + + $GLOBALS['phpgw']->vfs->set_attributes (array ( + 'string' => $_FILES['upload_file']['name'][$i], + 'relatives' => array (RELATIVE_ALL), + 'attributes' => array ( + 'mime_type' => $_FILES['upload_file']['type'][$i], + 'comment' => $upload_comment[$i] + ) + ) + ); + + html_text_summary(lang('Created %1', $disppath.'/'.$_FILES['upload_file']['name'][$i]), $file_size[$i]); + } + } + + html_break (2); + html_link_back (); +} + +### +# Handle Editing comments +### + +elseif ($comment_files) +{ + while (list ($file) = each ($comment_files)) + { + if ($badchar = bad_chars ($comment_files[$file], False, True)) + { + echo $GLOBALS['phpgw']->common->error_list (array (html_text_italic ($file, 1) . html_encode (': ' . lang('Comments cannot contain "%1"', $badchar), 1))); + continue; + } + + $GLOBALS['phpgw']->vfs->set_attributes (array ( + 'string' => $file, + 'relatives' => array (RELATIVE_ALL), + 'attributes' => array ( + 'comment' => stripslashes ($comment_files[$file]) + ) + ) + ); + + html_text_summary (lang('Updated comment for %1', $path.'/'.$file)); + } + + html_break (2); + html_link_back (); +} + +### +# Handle Renaming Files and Directories +### + +elseif ($renamefiles) +{ + while (list ($from, $to) = each ($renamefiles)) + { + if ($badchar = bad_chars ($to, True, True)) + { + echo $GLOBALS['phpgw']->common->error_list (array (html_encode (lang('File names cannot contain "%1"', $badchar), 1))); + continue; + } + + if (ereg ("/", $to) || ereg ("\\\\", $to)) + { + echo $GLOBALS['phpgw']->common->error_list (array (lang("File names cannot contain \\ or /"))); + } + elseif (!$GLOBALS['phpgw']->vfs->mv (array ( + 'from' => $from, + 'to' => $to + )) + ) + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Could not rename %1 to %2', $disppath.'/'.$from, $disppath.'/'.$to))); + } + else + { + html_text_summary (lang('Renamed %1 to %2', $disppath.'/'.$from, $disppath.'/'.$to)); + } + } + + html_break (2); + html_link_back (); +} + +### +# Handle Moving Files and Directories +### + +elseif ($move) +{ + while (list ($num, $file) = each ($fileman)) + { + if ($GLOBALS['phpgw']->vfs->mv (array ( + 'from' => $file, + 'to' => $todir . '/' . $file, + 'relatives' => array (RELATIVE_ALL, RELATIVE_NONE) + )) + ) + { + $moved++; + html_text_summary (lang('Moved %1 to %2', $disppath.'/'.$file, $todir.'/'.$file)); + } + else + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Could not move %1 to %2', $disppath.'/'.$file, $todir.'/'.$file))); + } + } + + if ($moved) + { + html_break (2); + html_link ($GLOBALS['appname'].'/index.php?path='.$todir, lang('Go to %1', $todir)); + } + + html_break (2); + html_link_back (); +} + +### +# Handle Copying of Files and Directories +### + +elseif ($copy) +{ + while (list ($num, $file) = each ($fileman)) + { + if ($GLOBALS['phpgw']->vfs->cp (array ( + 'from' => $file, + 'to' => $todir . '/' . $file, + 'relatives' => array (RELATIVE_ALL, RELATIVE_NONE) + )) + ) + { + $copied++; + html_text_summary (lang('Copied %1 to %2', $disppath.'/'.$file, $todir.'/'.$file)); + } + else + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Could not copy %1 to %2', $disppath.'/'.$file, $todir.'/'.$file))); + } + } + + if ($copied) + { + html_break (2); + html_link ($GLOBALS['appname'].'/index.php?path='.$todir, lang('Go to %1', $todir)); + } + + html_break (2); + html_link_back (); +} + +### +# Handle Deleting Files and Directories +### + +elseif ($delete) +{ + for ($i = 0; $i != $numoffiles; $i++) + { + if ($fileman[$i]) + { + if ($GLOBALS['phpgw']->vfs->delete (array ('string' => $fileman[$i]))) + { + html_text_summary (lang('Deleted %1', $disppath.'/'.$fileman[$i]), $fileinfo['size']); + } + else + { + $GLOBALS['phpgw']->common->error_list (array (lang('Could not delete %1', $disppath.'/'.$fileman[$i]))); + } + } + } + + html_break (2); + html_link_back (); +} + +elseif ($newdir && $createdir) +{ + if ($badchar = bad_chars ($createdir, True, True)) + { + echo $GLOBALS['phpgw']->common->error_list (array (html_encode (lang('Directory names cannot contain "%1"', $badchar), 1))); + html_break (2); + html_link_back (); + html_page_close (); + } - include('../header.inc.php'); + if ($createdir[strlen($createdir)-1] == ' ' || $createdir[0] == ' ') + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Cannot create directory because it begins or ends in a space'))); + html_break (2); + html_link_back (); + html_page_close (); + } - $parms = Array( - 'menuaction'=> 'filemanager.uifilemanager.index' + $ls_array = $GLOBALS['phpgw']->vfs->ls (array ( + 'string' => $path . '/' . $createdir, + 'relatives' => array (RELATIVE_NONE), + 'checksubdirs' => False, + 'nofiles' => True + ) ); - $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php',$parms)); - $GLOBALS['phpgw_info']['flags']['nodisplay'] = True; - exit; + $fileinfo = $ls_array[0]; + + if ($fileinfo['name']) + { + if ($fileinfo['mime_type'] != 'Directory') + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('%1 already exists as a file', $fileinfo['name']))); + html_break (2); + html_link_back (); + html_page_close (); + } + else + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Directory %1 already exists', $fileinfo['name']))); + html_break (2); + html_link_back (); + html_page_close (); + } + } + else + { + if ($GLOBALS['phpgw']->vfs->mkdir (array ('string' => $createdir))) + { + html_text_summary (lang('Created directory %1', $disppath.'/'.$createdir)); + html_break (2); + html_link ($GLOBALS['appname'].'/index.php?path='.$disppath.'/'.$createdir, lang('Go to %1', $disppath.'/'.$createdir)); + } + else + { + echo $GLOBALS['phpgw']->common->error_list (array (lang('Could not create %1', $disppath.'/'.$createdir))); + } + } + + html_break (2); + html_link_back (); +} + +html_page_close (); + ?> diff --git a/filemanager/preferences.php b/filemanager/preferences.php index 5a0d053230..d8abfaf240 100644 --- a/filemanager/preferences.php +++ b/filemanager/preferences.php @@ -1,6 +1,6 @@ 'filemanger', - 'enable_nextmatchs_class' => True, - 'noheader' => True, - 'nonavbar' => True + "currentapp" => "filemanager", + "enable_nextmatchs_class" => True, + "noheader" => True, + "nonavbar" => True ); - include('../header.inc.php'); + include("../header.inc.php"); /* To add an on/off preference, just add it here. Key is internal name, value is displayed name @@ -86,7 +86,7 @@ $p->set_file ($templates); $var = array ( - 'title' => lang ('Filemanager preferences'), + 'title' => lang ('FileManager preferences'), 'action_url' => $phpgw->link ('/' . $phpgw_info['flags']['currentapp'] . '/preferences.php'), 'bg_color' => $phpgw_info['theme']['th_bg'], 'submit_lang' => lang ('submit') @@ -104,7 +104,7 @@ while (list ($internal, $displayed) = each ($file_attributes)) { unset ($checked); - if ($phpgw_info['user']['preferences']['filemanager'][$internal]) + if ($phpgw_info["user"]["preferences"]["filemanager"][$internal]) { $checked = 1; } @@ -118,7 +118,7 @@ while (list ($internal, $displayed) = each ($other_checkboxes)) { unset ($checked); - if ($phpgw_info['user']['preferences']['filemanager'][$internal]) + if ($phpgw_info["user"]["preferences"]["filemanager"][$internal]) { $checked = 1; } @@ -140,7 +140,7 @@ continue; } - $options .= html_form_option ($value, $value, $phpgw_info['user']['preferences']['filemanager'][$internal] == $value, True); + $options .= html_form_option ($value, $value, $phpgw_info["user"]["preferences"]["filemanager"][$internal] == $value, True); } $output = html_form_select_begin ($internal, True); diff --git a/filemanager/setup/default_records.inc.php b/filemanager/setup/default_records.inc.php index 2133854f31..ccd0434b6f 100644 --- a/filemanager/setup/default_records.inc.php +++ b/filemanager/setup/default_records.inc.php @@ -11,4 +11,7 @@ /* $Id$ */ + $oProc->query ("INSERT INTO phpgw_vfs (owner_id, createdby_id, modifiedby_id, created, modified, size, mime_type, deleteable, comment, app, directory, name, link_directory, link_name) VALUES (1,0,0,'1970-01-01',NULL,NULL,'Directory','Y',NULL,NULL,'/','', NULL, NULL)"); + $oProc->query ("INSERT INTO phpgw_vfs (owner_id, createdby_id, modifiedby_id, created, modified, size, mime_type, deleteable, comment, app, directory, name, link_directory, link_name) VALUES (2,0,0,'1970-01-01',NULL,NULL,'Directory','Y',NULL,NULL,'/','home', NULL, NULL)"); + ?> diff --git a/filemanager/setup/phpgw_en.lang b/filemanager/setup/phpgw_en.lang index 904230c04a..cc1e6adfaa 100644 --- a/filemanager/setup/phpgw_en.lang +++ b/filemanager/setup/phpgw_en.lang @@ -1,65 +1,56 @@ -$displayed filemanager en $displayed %1 already exists as a file filemanager en %1 already exists as a file -%1 does not exist! filemanager en %1 does not exist! -add mozilla/netscape sidebar tab filemanager en add mozilla/netscape sidebar tab application filemanager en Application back to file manager filemanager en Back to file manager cannot create directory because it begins or ends in a space filemanager en Cannot create directory because it begins or ends in a space -cannot replace %1 because it is a directory filemanager en cannot replace %1 because it is a directory -close filemanager en close +cannot replace %1 because it is a directory filemanager en Cannot replace %1 because it is a directory command sucessfully run filemanager en Command sucessfully run comment filemanager en Comment +comments cannot contain "%1" filemanager en Comments cannot contain "%1" +copied %1 to %2 filemanager en Copied %1 to %2 copy to filemanager en Copy To copy to: filemanager en Copy to: -could not copy %1 to %2 filemanager en could not copy %1 to %2 -could not create filemanager en could not create -could not delete: %1 filemanager en could not delete: %1 -could not move: %1 to %2 filemanager en could not move: %1 to %2 -could not rename %1 to %2 filemanager en could not rename %1 to %2 +could not copy %1 to %2 filemanager en Could not copy %1 to %2 +could not create %1 filemanager en Could not create %1 +could not create directory %1 filemanager en Could not create directory %1 +could not delete %1 filemanager en Could not delete %1 +could not move %1 to %2 filemanager en Could not move %1 to %2 +could not rename %1 to %2 filemanager en Could not rename %1 to %2 could not save %1 filemanager en Could not save %1 create file filemanager en Create File create folder filemanager en Create Folder created filemanager en Created -created %1 (%2 bytes) filemanager en created %1 (%2 bytes) +created %1 filemanager en Created %1 created by filemanager en Created by -created directory %1 filemanager en created directory %1 +created directory %1 filemanager en Created directory %1 date filemanager en Date default number of upload fields to show filemanager en Default number of upload fields to show delete filemanager en Delete -deleted: %1 filemanager en deleted: %1 +deleted %1 filemanager en Deleted %1 directory filemanager en Directory -directory %1 already exists filemanager en directory %1 already exists -directory %1 does not exist filemanager en directory %1 does not exist -directory names cannot contain "%1" filemanager en directory names cannot contain "%1" +directory %1 already exists filemanager en Directory %1 already exists +directory %1 does not exist filemanager en Directory %1 does not exist +directory names cannot contain "%1" filemanager en Directory names cannot contain "%1" display attributes filemanager en Display attributes download filemanager en Download edit filemanager en Edit edit comments filemanager en Edit comments error running command filemanager en Error running command -error: failed to change comment for : %1 filemanager en error: failed to change comment for : %1 execute filemanager en Execute failed to create directory filemanager en failed to create directory -failed to upload file: %1 filemanager en failed to upload file: %1 file filemanager en File -file %1 already exists. please edit it or delete it first filemanager en file %1 already exists. Please edit it or delete it first file %1 already exists. please edit it or delete it first. filemanager en File %1 already exists. Please edit it or delete it first. -file %1 could not be created filemanager en file %1 could not be created file %1 could not be created. filemanager en File %1 could not be created. -file attributes to display: filemanager en File attributes to display: -file copied: %1 to %2 filemanager en file copied: %1 to %2 -file does not exist: %1 filemanager en file does not exist: %1 -file downloaded: %1 filemanager en file downloaded: %1 -file moved: %1 to %2 filemanager en file moved: %1 to %2 file name filemanager en File Name -file names cannot contain %1 filemanager en file names cannot contain %1 -file names cannot contain \\ or / filemanager en File names cannot contain \\ or / +file names cannot contain "%1" filemanager en File names cannot contain "%1" +file names cannot contain \ or / filemanager en File names cannot contain \ or / filemanager common en Filemanager -filemanager preferences filemanager en Filemanager preferences -filename not provided! filemanager en filename not provided! +filemanager preferences filemanager en FileManager preferences files filemanager en Files folder filemanager en Folder go to filemanager en Go To +go to %1 filemanager en Go to %1 go to your home directory filemanager en Go to your home directory +go to: filemanager en Go to: home filemanager en Home locked filemanager en Locked mime type filemanager en MIME Type @@ -67,14 +58,16 @@ modified filemanager en Modified modified by filemanager en Modified by move to filemanager en Move To move to: filemanager en Move to: +moved %1 to %2 filemanager en Moved %1 to %2 no version history for this file/directory filemanager en No version history for this file/directory operation filemanager en Operation owner filemanager en Owner -phpgroupware files filemanager en phpgroupware files -preview filemanager en preview +preview %1 filemanager en Preview %1 +preview of %1 filemanager en Preview of %1 rename filemanager en Rename -renamed %1 to %2 filemanager en renamed %1 to %2 -replaced %1 (%2 bytes) filemanager en replaced %1 (%2 bytes) +renamed %1 to %2 filemanager en Renamed %1 to %2 +replaced %1 filemanager en Replaced %1 +save %1 filemanager en Save %1 save all filemanager en Save all saved %1 filemanager en Saved %1 show filemanager en Show @@ -85,11 +78,11 @@ show help filemanager en Show help size filemanager en Size sort by: filemanager en Sort by: total files filemanager en Total Files -unknown action! filemanager en unknown action! unknown mime-type defaults to text/plain when viewing filemanager en Unknown MIME-type defaults to text/plain when viewing unused space filemanager en Unused space up filemanager en Up update filemanager en Update +updated comment for %1 filemanager en Updated comment for %1 upload fields filemanager en upload fields upload files filemanager en Upload files used space filemanager en Used Space @@ -98,4 +91,4 @@ version filemanager en Version view documents in new window filemanager en View documents in new window view documents on server (if available) filemanager en View documents on server (if available) who filemanager en Who -you do not have access to %1 filemanager en you do not have access to %1 +you do not have access to %1 filemanager en You do not have access to %1 diff --git a/filemanager/setup/phpgw_fr.lang b/filemanager/setup/phpgw_fr.lang index 439570b8db..2d9c7c9ab9 100644 --- a/filemanager/setup/phpgw_fr.lang +++ b/filemanager/setup/phpgw_fr.lang @@ -1,32 +1,31 @@ -$displayed filemanager fr $displayed %1 already exists as a file filemanager fr %1 existe déjà en tant que fichier -%1 does not exist! filemanager fr %1 n'existe pas! -add mozilla/netscape sidebar tab filemanager fr Ajouter le tableau barre latérale mozilla/netscape application filemanager fr Application back to file manager filemanager fr Retourner au gestionnaire de fichiers cannot create directory because it begins or ends in a space filemanager fr Ne peut créér le répertoire car il commence ou finit sur un espace cannot replace %1 because it is a directory filemanager fr Ne peut remplacer %1 parce-que c'est un répertoire -close filemanager fr Fermer command sucessfully run filemanager fr Commande exécutée avec succès comment filemanager fr Commentaire +comments cannot contain "%1" filemanager fr Les commentaires ne peuvent pas contenir "%1" +copied %1 to %2 filemanager fr Copié %1 vers %2 copy to filemanager fr Copier vers copy to: filemanager fr Copier vers: could not copy %1 to %2 filemanager fr N'a pas pu copier %1 vers %2 -could not create filemanager fr N'a pas pu créer -could not delete: %1 filemanager fr N'a pas pu effacer: %1 -could not move: %1 to %2 filemanager fr N'a pas pu déplacer: %1 vers %2 -could not rename %1 to %2 filemanager fr N'a pas pu renommer %1 vers %2 +could not create %1 filemanager fr N'a pas pu créér %1 +could not create directory %1 filemanager fr N'a pas pu créér le répertoire %1 +could not delete %1 filemanager fr N'a pas pu effacer %1 +could not move %1 to %2 filemanager fr N'a pas pu déplacer %1 to %2 +could not rename %1 to %2 filemanager fr N'a pas pu renommer %1 to %2 could not save %1 filemanager fr N'a pas pu enregistrer %1 create file filemanager fr Créér fichier create folder filemanager fr Créér dossier created filemanager fr Créé -created %1 (%2 bytes) filemanager fr A crée %1 (%2 octets) +created %1 filemanager fr %1 créé created by filemanager fr Créé par created directory %1 filemanager fr Répertoire %1 créé date filemanager fr Date default number of upload fields to show filemanager fr Nombre de champs d'upload par défaut à montrer delete filemanager fr Effacer -deleted: %1 filemanager fr Effacé(s): %1 +deleted %1 filemanager fr %1 effacé directory filemanager fr Répertoire directory %1 already exists filemanager fr Le répertoire %1 existe déjà Directory %1 does not exist filemanager fr Le répertoire %1 n'existe pas @@ -36,30 +35,22 @@ download filemanager fr Downloader edit filemanager fr Modifier edit comments filemanager fr Modifier les commentaires error running command filemanager fr Erreur à l'exécution de la commande -error: failed to change comment for : %1 filemanager fr Erreur: échec à la modification du commentaire pour : %1 execute filemanager fr Exécuter failed to create directory filemanager fr Echec de création du répertoire -failed to upload file: %1 filemanager fr Echec à l'upload du fichier: %1 file filemanager fr Fichier -file %1 already exists. please edit it or delete it first filemanager fr Le fichier %1 existe déjà. SVP modifiez-le ou effacez-le d'abord file %1 already exists. please edit it or delete it first. filemanager fr Le fichier %1 existe déjà. SVP modifiez-le ou effacez-le d'abord. -file %1 could not be created filemanager fr Le fichier %1 n'a pas pu être crée file %1 could not be created. filemanager fr Le fichier %1 n'a pas pu être créé. -file attributes to display: filemanager fr Les attributs de fichier à afficher: -file copied: %1 to %2 filemanager fr Fichier copié: %1 vers %2 -file does not exist: %1 filemanager fr Le fichier n'existe pas: %1 -file downloaded: %1 filemanager fr Fichier downloadé: %1 -file moved: %1 to %2 filemanager fr Fichier déplacé: %1 vers %2 file name filemanager fr Nom du fichier -file names cannot contain %1 filemanager fr Les noms de fichiers ne peuvent contenir %1 -file names cannot contain \\ or / filemanager fr Les noms de fichier ne peuvent contenir \\ ou / +file names cannot contain "%1" filemanager fr Les noms de fichier ne peuvent contenir "%1" +File names cannot contain \ or / filemanager fr Les noms de fichier ne peuvent contenir \ ou / filemanager common fr Gestionnaire de fichiers filemanager preferences filemanager fr Préférences filemanager -filename not provided! filemanager fr Nom de fichier non fourni! files filemanager fr Fichiers folder filemanager fr Dossier go to filemanager fr Aller dans +go to %1 filemanager fr Aller dans %1 go to your home directory filemanager fr Aller dans votre répertoire "home" (maison) +go to: filemanager fr Aller dans: home filemanager fr Maison locked filemanager fr Verouillé mime type filemanager fr Type MIME @@ -67,14 +58,16 @@ modified filemanager fr Modifi modified by filemanager fr Modifié par move to filemanager fr Déplacer dans move to: filemanager fr Déplacer dans: +moved %1 to %2 filemanager fr Déplacé %1 dans %2 no version history for this file/directory filemanager fr pas d'historique de versions pour ce fichier/répertoire operation filemanager fr Opération owner filemanager fr Propriétaire -phpgroupware files filemanager fr Fichiers phpgroupware -preview filemanager fr Prévisualisation +preview %1 filemanager fr Prévisualisation %1 +preview of %1 filemanager fr Prévisualisation de %1 rename filemanager fr Renommer renamed %1 to %2 filemanager fr Renommé %1 en %2 -replaced %1 (%2 bytes) filemanager fr Remplacé %1 (%2 octets) +replaced %1 filemanager fr Remplacé %1 +save %1 filemanager fr Enregistrer %1 save all filemanager fr Enregistrer tout saved %1 filemanager fr %1 enregistré show filemanager fr Montrer @@ -85,11 +78,11 @@ show help filemanager fr Montrer l'aide size filemanager fr Taille sort by: filemanager fr Trié par: total files filemanager fr Total de fichiers -unknown action! filemanager fr Action inconnue! unknown mime-type defaults to text/plain when viewing filemanager fr text/plain utilisé par défaut si type MIME inconnu unused space filemanager fr Espace inutilisé up filemanager fr Haut update filemanager fr Mettre à jour +updated comment for %1 filemanager fr Commentaire pour %1 mis à jour upload fields filemanager fr Champs d'upload upload files filemanager fr Fichiers d'upload used space filemanager fr Espace utilisé diff --git a/filemanager/setup/phpgw_pl.lang b/filemanager/setup/phpgw_pl.lang index ef5941098d..9ca946fc4f 100755 --- a/filemanager/setup/phpgw_pl.lang +++ b/filemanager/setup/phpgw_pl.lang @@ -25,7 +25,7 @@ created %1 filemanager pl Utworzono %1 date filemanager pl Data default number of upload fields to show filemanager pl delete filemanager pl Usuñ -deleted %1 filemanager pl Usuniêto 51 +deleted x filemanager pl Usuniêto 51 directory filemanager pl Katalog directory names cannot contain "%1" filemanager pl Nazwa katalogu zawiera "%1" directory %1 already exists filemanager pl Katalog %1 ju¿ istnieje @@ -40,7 +40,7 @@ failed to create directory filemanager pl file filemanager pl Plik file name filemanager pl Nazwa pliku file names cannot contain "%1" filemanager pl Plik nie zawiera "%1" -file names cannot contain \\ or / filemanager pl Nazwa pliku nie mo¿e zawierac \\ lub / +file names cannot contain \ or / filemanager pl Nazwa pliku nie mo¿e zawierac \ lub / file %1 already exists. please edit it or delete it first. filemanager pl Plik %1 ju¿ istnieje. proszê edytowaæ go lub usun±æ file %1 could not be created. filemanager pl Plik %1 nie mo¿e byæ utworzony filename filemanager pl Nazwa pliku @@ -82,7 +82,7 @@ unknown mime-type defaults to text/plain when viewing filemanager pl unused space filemanager pl Wolne miejsce up filemanager pl W górê update filemanager pl Aktualizuj -updated comment for %1 filemanager pl Zaktualizowano komentarz do 51 +updated comment for %1 filemanager pl Zaktualizowano komentarz do %1 upload fields filemanager pl wczytywanych plików upload files filemanager pl Wczytaj pliki used space filemanager pl Wykorzystane miejsce diff --git a/filemanager/setup/phpgw_pt.lang b/filemanager/setup/phpgw_pt.lang index 7c48e3910b..70e6abbb33 100644 --- a/filemanager/setup/phpgw_pt.lang +++ b/filemanager/setup/phpgw_pt.lang @@ -40,7 +40,7 @@ failed to create directory filemanager pt falhou ao criar pasta file filemanager pt Arquivo file name filemanager pt Nome do Arquivo file names cannot contain "%1" filemanager pt Nomes de arquivos não podem conter "%1" -file names cannot contain \\ or / filemanager pt Nomes de arquivos não podem conter \\ ou / +file names cannot contain \ or / filemanager pt Nomes de arquivos não podem conter \ ou / file %1 already exists. please edit it or delete it first. filemanager pt Arquivo %1 já existe. Por favor edite-o ou remova-o antes. file %1 could not be created. filemanager pt Arquivo %1 não pôde ser criado. files filemanager pt Arquivos diff --git a/filemanager/setup/setup.inc.php b/filemanager/setup/setup.inc.php index 292ebda7f8..c110a88b4b 100755 --- a/filemanager/setup/setup.inc.php +++ b/filemanager/setup/setup.inc.php @@ -1,6 +1,6 @@ 'phpgwapi', - 'versions' => array('0.9.15') + 'versions' => array('0.9.14','0.9.16') ); ?> diff --git a/filemanager/setup/tables_baseline.inc.php b/filemanager/setup/tables_baseline.inc.php index 234add4e59..56bd94cc8f 100644 --- a/filemanager/setup/tables_baseline.inc.php +++ b/filemanager/setup/tables_baseline.inc.php @@ -15,4 +15,29 @@ /* $Id$ */ + /* table array for phpwebhosting - MOVED TO API + $phpgw_baseline = array( + 'phpgw_vfs' => array( + 'fd' => array( + 'file_id' => array('type' => 'auto','nullable' => False), + 'owner_id' => array('type' => 'int', 'precision' => 4,'nullable' => False), + 'createdby_id' => array('type' => 'int', 'precision' => 4,'nullable' => True), + 'modifiedby_id' => array('type' => 'int', 'precision' => 4,'nullable' => True), + 'created' => array('type' => 'date','nullable' => False,'default' => '1970-01-01'), + 'modified' => array('type' => 'date','nullable' => True), + 'size' => array('type' => 'int', 'precision' => 4,'nullable' => True), + 'mime_type' => array('type' => 'varchar', 'precision' => 150,'nullable' => True), + 'deleteable' => array('type' => 'char', 'precision' => 1,'nullable' => True,'default' => 'Y'), + 'comment' => array('type' => 'text','nullable' => True), + 'app' => array('type' => 'varchar', 'precision' => 25,'nullable' => True), + 'directory' => array('type' => 'text','nullable' => True), + 'name' => array('type' => 'text','nullable' => False) + ), + 'pk' => array('file_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + ) + ); + */ ?> diff --git a/filemanager/setup/tables_current.inc.php b/filemanager/setup/tables_current.inc.php index 234add4e59..5a51483da8 100644 --- a/filemanager/setup/tables_current.inc.php +++ b/filemanager/setup/tables_current.inc.php @@ -15,4 +15,32 @@ /* $Id$ */ + /* table array for phpwebhosting - MOVED TO API + $phpgw_baseline = array( + 'phpgw_vfs' => array( + 'fd' => array( + 'file_id' => array('type' => 'auto','nullable' => False), + 'owner_id' => array('type' => 'int', 'precision' => 4,'nullable' => False), + 'createdby_id' => array('type' => 'int', 'precision' => 4,'nullable' => True), + 'modifiedby_id' => array('type' => 'int', 'precision' => 4,'nullable' => True), + 'created' => array('type' => 'date','nullable' => False,'default' => '1970-01-01'), + 'modified' => array('type' => 'date','nullable' => True), + 'size' => array('type' => 'int', 'precision' => 4,'nullable' => True), + 'mime_type' => array('type' => 'varchar', 'precision' => 150,'nullable' => True), + 'deleteable' => array('type' => 'char', 'precision' => 1,'nullable' => True,'default' => 'Y'), + 'comment' => array('type' => 'text','nullable' => True), + 'app' => array('type' => 'varchar', 'precision' => 25,'nullable' => True), + 'directory' => array('type' => 'text','nullable' => True), + 'name' => array('type' => 'text','nullable' => False), + 'link_directory' => array('type' => 'text','nullable' => True), + 'link_name' => array('type' => 'text','nullable' => True), + 'version' => array('type' => 'varchar', 'precision' => 30,'nullable' => False,'default' => '0.0.0.0') + ), + 'pk' => array('file_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + ) + ); + */ ?> diff --git a/filemanager/setup/tables_update.inc.php b/filemanager/setup/tables_update.inc.php index c9fd707a2d..4556012004 100644 --- a/filemanager/setup/tables_update.inc.php +++ b/filemanager/setup/tables_update.inc.php @@ -1,6 +1,6 @@ -

- - - - - - - - - - - - - - -
- - - -

Editing file: - -

-
- - - - - - -
- - -
-
-
-
-
-
- - - - -
- - -
- - - - - - - - - - diff --git a/filemanager/templates/default/errors.tpl b/filemanager/templates/default/errors.tpl new file mode 100755 index 0000000000..976ab6435f --- /dev/null +++ b/filemanager/templates/default/errors.tpl @@ -0,0 +1,6 @@ + +{errors} + + +{error} + diff --git a/filemanager/templates/default/history.tpl b/filemanager/templates/default/history.tpl new file mode 100755 index 0000000000..9a8e975dd0 --- /dev/null +++ b/filemanager/templates/default/history.tpl @@ -0,0 +1,29 @@ + + + + + + {col_row} +
+ + + + + +
+ Path: {path} + + Filename: {filename} +
+ +
+ + + + {col_headers} + + + + {column_header} + + diff --git a/filemanager/templates/default/images/binary.gif b/filemanager/templates/default/images/binary.gif deleted file mode 100644 index 85ec59b917..0000000000 Binary files a/filemanager/templates/default/images/binary.gif and /dev/null differ diff --git a/filemanager/templates/default/images/binary.png b/filemanager/templates/default/images/binary.png deleted file mode 100644 index de19a1fb7c..0000000000 Binary files a/filemanager/templates/default/images/binary.png and /dev/null differ diff --git a/filemanager/templates/default/images/button_cancel.gif b/filemanager/templates/default/images/button_cancel.gif deleted file mode 100644 index d3e85a4b4c..0000000000 Binary files a/filemanager/templates/default/images/button_cancel.gif and /dev/null differ diff --git a/filemanager/templates/default/images/button_cancel.png b/filemanager/templates/default/images/button_cancel.png deleted file mode 100644 index c6464d90a6..0000000000 Binary files a/filemanager/templates/default/images/button_cancel.png and /dev/null differ diff --git a/filemanager/templates/default/images/button_ok.gif b/filemanager/templates/default/images/button_ok.gif deleted file mode 100644 index 76c708d634..0000000000 Binary files a/filemanager/templates/default/images/button_ok.gif and /dev/null differ diff --git a/filemanager/templates/default/images/button_ok.png b/filemanager/templates/default/images/button_ok.png deleted file mode 100644 index 230de53029..0000000000 Binary files a/filemanager/templates/default/images/button_ok.png and /dev/null differ diff --git a/filemanager/templates/default/images/deb.gif b/filemanager/templates/default/images/deb.gif deleted file mode 100644 index 147861d45c..0000000000 Binary files a/filemanager/templates/default/images/deb.gif and /dev/null differ diff --git a/filemanager/templates/default/images/deb.png b/filemanager/templates/default/images/deb.png deleted file mode 100644 index 28d9f54504..0000000000 Binary files a/filemanager/templates/default/images/deb.png and /dev/null differ diff --git a/filemanager/templates/default/images/document.gif b/filemanager/templates/default/images/document.gif deleted file mode 100644 index 3e72a283b2..0000000000 Binary files a/filemanager/templates/default/images/document.gif and /dev/null differ diff --git a/filemanager/templates/default/images/document.png b/filemanager/templates/default/images/document.png deleted file mode 100644 index d90688fb46..0000000000 Binary files a/filemanager/templates/default/images/document.png and /dev/null differ diff --git a/filemanager/templates/default/images/excel.gif b/filemanager/templates/default/images/excel.gif deleted file mode 100755 index e52a9679d7..0000000000 Binary files a/filemanager/templates/default/images/excel.gif and /dev/null differ diff --git a/filemanager/templates/default/images/excel.png b/filemanager/templates/default/images/excel.png deleted file mode 100644 index 17a14e707b..0000000000 Binary files a/filemanager/templates/default/images/excel.png and /dev/null differ diff --git a/filemanager/templates/default/images/filesave.gif b/filemanager/templates/default/images/filesave.gif deleted file mode 100644 index ef9e8a0aab..0000000000 Binary files a/filemanager/templates/default/images/filesave.gif and /dev/null differ diff --git a/filemanager/templates/default/images/filesave.png b/filemanager/templates/default/images/filesave.png deleted file mode 100644 index dd00abd166..0000000000 Binary files a/filemanager/templates/default/images/filesave.png and /dev/null differ diff --git a/filemanager/templates/default/images/folder.gif b/filemanager/templates/default/images/folder.gif index d6caded34d..89d4c1f193 100755 Binary files a/filemanager/templates/default/images/folder.gif and b/filemanager/templates/default/images/folder.gif differ diff --git a/filemanager/templates/default/images/folder.png b/filemanager/templates/default/images/folder.png index 0472d19c0f..d783a06122 100644 Binary files a/filemanager/templates/default/images/folder.png and b/filemanager/templates/default/images/folder.png differ diff --git a/filemanager/templates/default/images/folder_home.gif b/filemanager/templates/default/images/folder_home.gif index 0c131bca77..843874f722 100755 Binary files a/filemanager/templates/default/images/folder_home.gif and b/filemanager/templates/default/images/folder_home.gif differ diff --git a/filemanager/templates/default/images/folder_home.png b/filemanager/templates/default/images/folder_home.png index d6857b3dcc..794e7f2238 100644 Binary files a/filemanager/templates/default/images/folder_home.png and b/filemanager/templates/default/images/folder_home.png differ diff --git a/filemanager/templates/default/images/folder_large.gif b/filemanager/templates/default/images/folder_large.gif deleted file mode 100644 index 3cf458fe98..0000000000 Binary files a/filemanager/templates/default/images/folder_large.gif and /dev/null differ diff --git a/filemanager/templates/default/images/folder_large.png b/filemanager/templates/default/images/folder_large.png deleted file mode 100644 index 7fda9e81ac..0000000000 Binary files a/filemanager/templates/default/images/folder_large.png and /dev/null differ diff --git a/filemanager/templates/default/images/html.gif b/filemanager/templates/default/images/html.gif deleted file mode 100644 index bac1466ad0..0000000000 Binary files a/filemanager/templates/default/images/html.gif and /dev/null differ diff --git a/filemanager/templates/default/images/html.png b/filemanager/templates/default/images/html.png deleted file mode 100644 index 98d91e17e3..0000000000 Binary files a/filemanager/templates/default/images/html.png and /dev/null differ diff --git a/filemanager/templates/default/images/image.gif b/filemanager/templates/default/images/image.gif deleted file mode 100644 index a45bf14e39..0000000000 Binary files a/filemanager/templates/default/images/image.gif and /dev/null differ diff --git a/filemanager/templates/default/images/image.png b/filemanager/templates/default/images/image.png deleted file mode 100644 index 0ff15f1a6e..0000000000 Binary files a/filemanager/templates/default/images/image.png and /dev/null differ diff --git a/filemanager/templates/default/images/message.gif b/filemanager/templates/default/images/message.gif deleted file mode 100644 index a5bc7261b2..0000000000 Binary files a/filemanager/templates/default/images/message.gif and /dev/null differ diff --git a/filemanager/templates/default/images/message.png b/filemanager/templates/default/images/message.png deleted file mode 100644 index 59717ec531..0000000000 Binary files a/filemanager/templates/default/images/message.png and /dev/null differ diff --git a/filemanager/templates/default/images/navbar.png b/filemanager/templates/default/images/navbar.png index a3dae79a83..1c741bd675 100644 Binary files a/filemanager/templates/default/images/navbar.png and b/filemanager/templates/default/images/navbar.png differ diff --git a/filemanager/templates/default/images/pdf.gif b/filemanager/templates/default/images/pdf.gif deleted file mode 100644 index 77f3ff942b..0000000000 Binary files a/filemanager/templates/default/images/pdf.gif and /dev/null differ diff --git a/filemanager/templates/default/images/pdf.png b/filemanager/templates/default/images/pdf.png deleted file mode 100644 index cd76e0f925..0000000000 Binary files a/filemanager/templates/default/images/pdf.png and /dev/null differ diff --git a/filemanager/templates/default/images/pencil.gif b/filemanager/templates/default/images/pencil.gif deleted file mode 100644 index 4ee54d9a25..0000000000 Binary files a/filemanager/templates/default/images/pencil.gif and /dev/null differ diff --git a/filemanager/templates/default/images/pencil.png b/filemanager/templates/default/images/pencil.png deleted file mode 100644 index f245684230..0000000000 Binary files a/filemanager/templates/default/images/pencil.png and /dev/null differ diff --git a/filemanager/templates/default/images/postscript.gif b/filemanager/templates/default/images/postscript.gif deleted file mode 100644 index 23e1a34de6..0000000000 Binary files a/filemanager/templates/default/images/postscript.gif and /dev/null differ diff --git a/filemanager/templates/default/images/postscript.png b/filemanager/templates/default/images/postscript.png deleted file mode 100644 index f3ce5f7a41..0000000000 Binary files a/filemanager/templates/default/images/postscript.png and /dev/null differ diff --git a/filemanager/templates/default/images/ppt.gif b/filemanager/templates/default/images/ppt.gif deleted file mode 100755 index e4231f0deb..0000000000 Binary files a/filemanager/templates/default/images/ppt.gif and /dev/null differ diff --git a/filemanager/templates/default/images/ppt.png b/filemanager/templates/default/images/ppt.png deleted file mode 100644 index a210676ef7..0000000000 Binary files a/filemanager/templates/default/images/ppt.png and /dev/null differ diff --git a/filemanager/templates/default/images/preview.gif b/filemanager/templates/default/images/preview.gif deleted file mode 100644 index 46d6b833bf..0000000000 Binary files a/filemanager/templates/default/images/preview.gif and /dev/null differ diff --git a/filemanager/templates/default/images/preview.png b/filemanager/templates/default/images/preview.png deleted file mode 100644 index f507381463..0000000000 Binary files a/filemanager/templates/default/images/preview.png and /dev/null differ diff --git a/filemanager/templates/default/images/rpm.gif b/filemanager/templates/default/images/rpm.gif deleted file mode 100644 index 147861d45c..0000000000 Binary files a/filemanager/templates/default/images/rpm.gif and /dev/null differ diff --git a/filemanager/templates/default/images/rpm.png b/filemanager/templates/default/images/rpm.png deleted file mode 100644 index 28d9f54504..0000000000 Binary files a/filemanager/templates/default/images/rpm.png and /dev/null differ diff --git a/filemanager/templates/default/images/shellscript.gif b/filemanager/templates/default/images/shellscript.gif deleted file mode 100644 index b67c650ae3..0000000000 Binary files a/filemanager/templates/default/images/shellscript.gif and /dev/null differ diff --git a/filemanager/templates/default/images/shellscript.png b/filemanager/templates/default/images/shellscript.png deleted file mode 100644 index abf457c2cd..0000000000 Binary files a/filemanager/templates/default/images/shellscript.png and /dev/null differ diff --git a/filemanager/templates/default/images/sound.gif b/filemanager/templates/default/images/sound.gif deleted file mode 100644 index ec8066ce3f..0000000000 Binary files a/filemanager/templates/default/images/sound.gif and /dev/null differ diff --git a/filemanager/templates/default/images/sound.png b/filemanager/templates/default/images/sound.png deleted file mode 100644 index c9e76a14b6..0000000000 Binary files a/filemanager/templates/default/images/sound.png and /dev/null differ diff --git a/filemanager/templates/default/images/spreadsheet.gif b/filemanager/templates/default/images/spreadsheet.gif deleted file mode 100644 index 35dd034eba..0000000000 Binary files a/filemanager/templates/default/images/spreadsheet.gif and /dev/null differ diff --git a/filemanager/templates/default/images/spreadsheet.png b/filemanager/templates/default/images/spreadsheet.png deleted file mode 100644 index ee760b3aa7..0000000000 Binary files a/filemanager/templates/default/images/spreadsheet.png and /dev/null differ diff --git a/filemanager/templates/default/images/tex.gif b/filemanager/templates/default/images/tex.gif deleted file mode 100644 index 7b2b8a4356..0000000000 Binary files a/filemanager/templates/default/images/tex.gif and /dev/null differ diff --git a/filemanager/templates/default/images/tex.png b/filemanager/templates/default/images/tex.png deleted file mode 100644 index 3c9c9a39e5..0000000000 Binary files a/filemanager/templates/default/images/tex.png and /dev/null differ diff --git a/filemanager/templates/default/images/tgz.gif b/filemanager/templates/default/images/tgz.gif deleted file mode 100644 index 77bf537b17..0000000000 Binary files a/filemanager/templates/default/images/tgz.gif and /dev/null differ diff --git a/filemanager/templates/default/images/tgz.png b/filemanager/templates/default/images/tgz.png deleted file mode 100644 index a186cf1e41..0000000000 Binary files a/filemanager/templates/default/images/tgz.png and /dev/null differ diff --git a/filemanager/templates/default/images/txt.gif b/filemanager/templates/default/images/txt.gif deleted file mode 100644 index a3287fc1f2..0000000000 Binary files a/filemanager/templates/default/images/txt.gif and /dev/null differ diff --git a/filemanager/templates/default/images/txt.png b/filemanager/templates/default/images/txt.png deleted file mode 100644 index 6d60dc1ccb..0000000000 Binary files a/filemanager/templates/default/images/txt.png and /dev/null differ diff --git a/filemanager/templates/default/images/unknown.gif b/filemanager/templates/default/images/unknown.gif deleted file mode 100644 index acbc61e138..0000000000 Binary files a/filemanager/templates/default/images/unknown.gif and /dev/null differ diff --git a/filemanager/templates/default/images/unknown.png b/filemanager/templates/default/images/unknown.png deleted file mode 100644 index da3771f3f7..0000000000 Binary files a/filemanager/templates/default/images/unknown.png and /dev/null differ diff --git a/filemanager/templates/default/images/up.gif b/filemanager/templates/default/images/up.gif deleted file mode 100644 index 4f1f55d8eb..0000000000 Binary files a/filemanager/templates/default/images/up.gif and /dev/null differ diff --git a/filemanager/templates/default/images/up.png b/filemanager/templates/default/images/up.png deleted file mode 100644 index 8e0dd82648..0000000000 Binary files a/filemanager/templates/default/images/up.png and /dev/null differ diff --git a/filemanager/templates/default/images/vcalendar.gif b/filemanager/templates/default/images/vcalendar.gif deleted file mode 100644 index 28f361a40f..0000000000 Binary files a/filemanager/templates/default/images/vcalendar.gif and /dev/null differ diff --git a/filemanager/templates/default/images/vcalendar.png b/filemanager/templates/default/images/vcalendar.png deleted file mode 100644 index b5f1bf4eef..0000000000 Binary files a/filemanager/templates/default/images/vcalendar.png and /dev/null differ diff --git a/filemanager/templates/default/images/vcard.gif b/filemanager/templates/default/images/vcard.gif deleted file mode 100644 index 01adde6879..0000000000 Binary files a/filemanager/templates/default/images/vcard.gif and /dev/null differ diff --git a/filemanager/templates/default/images/vcard.png b/filemanager/templates/default/images/vcard.png deleted file mode 100644 index 6c8bbeebf2..0000000000 Binary files a/filemanager/templates/default/images/vcard.png and /dev/null differ diff --git a/filemanager/templates/default/images/vectorgfx.gif b/filemanager/templates/default/images/vectorgfx.gif deleted file mode 100644 index 701022236d..0000000000 Binary files a/filemanager/templates/default/images/vectorgfx.gif and /dev/null differ diff --git a/filemanager/templates/default/images/vectorgfx.png b/filemanager/templates/default/images/vectorgfx.png deleted file mode 100644 index e58047f5b2..0000000000 Binary files a/filemanager/templates/default/images/vectorgfx.png and /dev/null differ diff --git a/filemanager/templates/default/images/video.gif b/filemanager/templates/default/images/video.gif deleted file mode 100644 index ec0cf47138..0000000000 Binary files a/filemanager/templates/default/images/video.gif and /dev/null differ diff --git a/filemanager/templates/default/images/video.png b/filemanager/templates/default/images/video.png deleted file mode 100644 index c743e2a692..0000000000 Binary files a/filemanager/templates/default/images/video.png and /dev/null differ diff --git a/filemanager/templates/default/images/word.gif b/filemanager/templates/default/images/word.gif deleted file mode 100755 index fbed21bf90..0000000000 Binary files a/filemanager/templates/default/images/word.gif and /dev/null differ diff --git a/filemanager/templates/default/images/word.png b/filemanager/templates/default/images/word.png deleted file mode 100644 index b0328a09ea..0000000000 Binary files a/filemanager/templates/default/images/word.png and /dev/null differ diff --git a/filemanager/templates/default/index.tpl b/filemanager/templates/default/index.tpl new file mode 100755 index 0000000000..7cd026c312 --- /dev/null +++ b/filemanager/templates/default/index.tpl @@ -0,0 +1,52 @@ + + + + + + + + {col_row} + + + + + + + + + +
{error} +
+
+ + + + + +
+ {img_up} + {help_up} + + {img_home} + {dir} + {help_home} +
+ +
+ {buttons} + +
{info} +
{uploads} +
+ + + {col_headers} + + + + {column_header} + + + {column_header} + + diff --git a/filemanager/templates/default/index.xsl b/filemanager/templates/default/index.xsl deleted file mode 100644 index 66f00a9a74..0000000000 --- a/filemanager/templates/default/index.xsl +++ /dev/null @@ -1,135 +0,0 @@ - -
-
- - post - - - -
- - - -
- -
- - - - - - - - -
- - - - - -

-

-
- - - - - - - - - - - files
- bytes -
-
-
- -

-
-
- - - - - - - - - - -
- - - - - - - - -
- -
- - - - - - - row_on - - - row_off - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Debug output
- -
-
- - - - - - diff --git a/filemanager/templates/default/small_table.tpl b/filemanager/templates/default/small_table.tpl new file mode 100755 index 0000000000..46542f36bd --- /dev/null +++ b/filemanager/templates/default/small_table.tpl @@ -0,0 +1,15 @@ + + {list} +
+ + + {col_headers} + + + + {column_header} + + + {column_header} + + diff --git a/filemanager/templates/default/widgets.xsl b/filemanager/templates/default/widgets.xsl deleted file mode 100644 index 51ab14b66e..0000000000 --- a/filemanager/templates/default/widgets.xsl +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - 0 - - - center - - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - - row_on - - - - - row_off - - - - -
-
- - - - - - - - tr - - - - - - - - - - diff --git a/filemanager/templates/idots/images/navbar.png b/filemanager/templates/idots/images/navbar.png new file mode 100644 index 0000000000..c4c7cf081d Binary files /dev/null and b/filemanager/templates/idots/images/navbar.png differ diff --git a/filemanager/tests/benchmark_dav.php b/filemanager/tests/benchmark_dav.php index a76caf910f..3bc69c6f62 100644 --- a/filemanager/tests/benchmark_dav.php +++ b/filemanager/tests/benchmark_dav.php @@ -1,7 +1,7 @@ "phpwebhosting", +$phpgw_info["flags"] = array("currentapp" => "filemanager", "noheader" => False, "noappheader" => False, "enable_vfs_class" => True); diff --git a/filemanager/tests/test.php b/filemanager/tests/test.php index 60a1374f1c..57df73e571 100644 --- a/filemanager/tests/test.php +++ b/filemanager/tests/test.php @@ -1,11 +1,11 @@ 'filemanager', - 'noheader' => False, - 'noappheader' => False, - 'enable_vfs_class' => True); +$phpgw_info["flags"] = array("currentapp" => "filemanager", + "noheader" => False, + "noappheader" => False, + "enable_vfs_class" => True); -include('../../header.inc.php'); +include("../header.inc.php"); /* General format for output is: @@ -272,7 +272,7 @@ while (list ($i, $o) = each ($io)) $phpgw->vfs->cd (); html_break (2); -html_text_bold ("The less output, the better. Please file errors as a " . html_link ('https://savannah.gnu.org/bugs/?group=phpgroupware', 'bug report', True, False) . ". Be sure to include the system information line at the top, and anything special about your setup. Thanks!"); +html_text_bold ("The less output, the better. Please file errors as a " . html_link ("https://sourceforge.net/tracker/?group_id=7305&atid=107305", "bug report", True, False) . ". Be sure to include the system information line at the top, and anything special about your setup. Thanks!"); html_page_close (); diff --git a/filemanager/view.php b/filemanager/view.php deleted file mode 100644 index 643e0f1818..0000000000 --- a/filemanager/view.php +++ /dev/null @@ -1,35 +0,0 @@ - for Zeald Ltd * - * View interface for the filemanager * - * Copyright (C) 2003 Zeald Ltd * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - -/*Due to incredibly annoying aspects of the XSLT template system, to be able to -output binary data you need to bypass XSLT altogether. Hence this file. */ - - $phpgw_flags = Array( - 'currentapp' => 'filemanager', - 'noheader' => True, - 'nonavbar' => True, - 'noappheader' => True, - 'noappfooter' => True, - 'nofooter' => True - ); - $GLOBALS['phpgw_info']['flags'] = $phpgw_flags; - - include('../header.inc.php'); - - $ui = CreateObject($phpgw_flags['currentapp'].'.uifilemanager'); - $ui->bo->vfs->view(array ( - 'string' => $ui->bo->path.'/'.$ui->bo->file, - 'relatives' => array (RELATIVE_NONE) - )); - -?> diff --git a/infolog/inc/class.boinfolog.inc.php b/infolog/inc/class.boinfolog.inc.php index 076d9ea26c..c7c51ba8b7 100644 --- a/infolog/inc/class.boinfolog.inc.php +++ b/infolog/inc/class.boinfolog.inc.php @@ -38,7 +38,7 @@ function boinfolog( $info_id = 0) { - $this->enums = array( + $this->enums = $this->stock_enums = array( 'priority' => array ( 'urgent' => 'urgent','high' => 'high','normal' => 'normal', 'low' => 'low' ), @@ -54,7 +54,7 @@ /* ,'confirm' => 'confirm','reject' => 'reject','email' => 'email', 'fax' => 'fax' not implemented so far */ ) ); - $this->status = array( + $this->status = $this->stock_status = array( 'defaults' => array( 'task' => 'ongoing', 'phone' => 'call', 'note' => 'done'), 'task' => array( @@ -76,15 +76,55 @@ $this->config = CreateObject('phpgwapi.config'); $this->config->read_repository(); + $this->customfields = array(); if ($this->config->config_data) { $this->link_pathes = $this->config->config_data['link_pathes']; $this->send_file_ips = $this->config->config_data['send_file_ips']; + + if (isset($this->config->config_data['status']) && is_array($this->config->config_data['status'])) + { + foreach($this->config->config_data['status'] as $key => $data) + { + if (!is_array($this->status[$key])) + { + $this->status[$key] = array(); + } + $this->status[$key] += $this->config->config_data['status'][$key]; + } + } + if (isset($this->config->config_data['types']) && is_array($this->config->config_data['types'])) + { + //echo "stock-types:
"; print_r($this->enums['type']); echo "
\n"; + //echo "config-types:
"; print_r($this->config->config_data['types']); echo "
\n"; + $this->enums['type'] += $this->config->config_data['types']; + //echo "types:
"; print_r($this->enums['type']); echo "
\n"; + } + if (isset($this->config->config_data['customfields']) && is_array($this->config->config_data['customfields'])) + { + $this->customfields = $this->config->config_data['customfields']; + } } $this->read( $info_id); } + /*! + @function has_customfields + @abstract checks if there are customfields for typ $typ + */ + function has_customfields($typ) + { + foreach($this->customfields as $name => $field) + { + if (empty($field['typ']) || $field['typ'] == $typ) + { + return True; + } + } + return False; + } + /* * check's if user has the requiered rights on entry $info_id */ @@ -100,34 +140,31 @@ function link_id2from(&$info,$not_app='',$not_id='') { - //echo "

boinfolog::link_id2from(subject='$info[info_subject]', link_id='$info[info_link_id], from='$info[info_from]')"; + //echo "

boinfolog::link_id2from(subject='$info[info_subject]', link_id='$info[info_link_id], from='$info[info_from]', not_app='$not_app', not_id='$not_id')"; if ($info['info_link_id'] > 0 && ($link = $this->link->get_link($info['info_link_id'])) !== False) { $nr = $link['link_app1'] == 'infolog' && $link['link_id1'] == $info['info_id'] ? '2' : '1'; $title = $this->link->title($link['link_app'.$nr],$link['link_id'.$nr]); - - if (htmlentities($title) == $info['info_from']) + + if ($title == $info['info_from'] || htmlentities($title) == $info['info_from']) { - $info['info_from'] = $title; // correct old entries + $info['info_from'] = ''; } if ($link['link_app'.$nr] == $not_app && $link['link_id'.$nr] == $not_id) { - if ($title == $info['info_from']) - { - $info['info_from'] = ''; - } return False; } $info['info_link_view'] = $this->link->view($link['link_app'.$nr],$link['link_id'.$nr]); - $info['info_link_title'] = $title; - + $info['info_link_title'] = !empty($info['info_from']) ? $info['info_from'] : $title; + //echo " title='$title'

\n"; - return $title; + return $info['blur_title'] = $title; } else { $info['info_link_title'] = $info['info_from']; + $info['info_link_id'] = 0; // link might have been deleted } return False; } @@ -157,7 +194,7 @@ { while (list($key,$val) = each($values)) { - if (substr($key,0,5) != 'info_') + if ($key[0] != '#' && substr($key,0,5) != 'info_') { $values['info_'.$key] = $val; unset($values[$key]); @@ -198,11 +235,9 @@ return $this->so->anzSubs( $info_id ); } - function search($order,$sort,$filter,$cat_id,$query,$action,$action_id, - $ordermethod,&$start,&$total) + function search($order,$sort,$filter,$cat_id,$query,$action,$action_id,$ordermethod,&$start,&$total) { - return $this->so->search($order,$sort,$filter,$cat_id,$query, - $action,$action_id,$ordermethod,$start,$total); + return $this->so->search($order,$sort,$filter,$cat_id,$query,$action,$action_id,$ordermethod,$start,$total); } /*! @@ -217,7 +252,7 @@ { $info = $this->read( $info ); } - return $info['info_subject']; + return $info ? $info['info_subject'] : False; } /*! diff --git a/infolog/inc/class.bolink.inc.php b/infolog/inc/class.bolink.inc.php index 954329098d..9dd8c4364e 100644 --- a/infolog/inc/class.bolink.inc.php +++ b/infolog/inc/class.bolink.inc.php @@ -327,7 +327,7 @@ { return $this->delete_attached($app,$id,$id2); } - if ($link_id > 0 || !is_array($id)) + if (!is_array($id)) { return solink::unlink($link_id,$app,$id,$owner,$app2,$id2); } @@ -388,7 +388,7 @@ @syntax title( $app,$id ) @author ralfbecker @abstract returns the title (short description) of entry $id and $app - @result the title + @result the title or false if $id does not exist in $app */ function title($app,$id,$link='') { @@ -427,7 +427,14 @@ } $method = $reg['title']; - return strchr($method,'.') ? ExecMethod($method,$id) : $this->$method($id); + $title = strchr($method,'.') ? ExecMethod($method,$id) : $this->$method($id); + + if (!$title) // $app,$id has been deleted ==> unlink als links to it + { + $this->unlink(0,$app,$id); + return False; + } + return $title; } /*! @@ -823,7 +830,7 @@ } if (!is_array($event)) { - return 'not an event !!!'; + return False; } $format = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] . ' '. ($GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] == '12' ? 'h:i a' : 'H:i'); @@ -846,12 +853,18 @@ { $this->bocal = createobject('calendar.bocalendar'); } - $event_ids = $this->bocal->search_keywords($pattern); - $content = array( ); - while (is_array($event_ids) && list( $key,$id ) = each( $event_ids )) + + if ($event_ids = $this->bocal->search_keywords($pattern)) { - $content[$id] = $this->calendar_title( $id ); + foreach($event_ids as $id) + { + // only include it in the list, if we have permissions to read it + if ($this->bocal->check_perms(PHPGW_ACL_READ,$id)) + { + $content[$id] = $this->calendar_title( $id ); + } + } } return $content; } @@ -872,6 +885,10 @@ { list( $addr ) = $this->contacts->read_single_entry( $addr ); } + if (!is_array($addr)) + { + return False; + } $name = $addr['n_family']; if ($addr['n_given']) { @@ -930,7 +947,7 @@ { $proj = $this->boprojects->read_single_project( $proj ); } - return $proj['title']; + return is_array($proj) ? $proj['title'] : False; } /*! diff --git a/infolog/inc/class.customfields_widget.inc.php b/infolog/inc/class.customfields_widget.inc.php new file mode 100644 index 0000000000..d7252df273 --- /dev/null +++ b/infolog/inc/class.customfields_widget.inc.php @@ -0,0 +1,122 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + /* $Id$ */ + + /*! + @class customfields_widget + @author ralfbecker + @abstract generates a template based on an array with definitions + @discussion This widget has neither a render nor a post_process function as it only generates a template + */ + class customfields_widget + { + var $public_functions = array( + 'pre_process' => True + ); + var $human_name = 'InfoLog custom fields'; + + function customfields_widget($ui) + { + } + + function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl) + { + if (!is_array($value)) + { + $cell['type'] = 'label'; + return True; + } + $tpl = new etemplate; + $tpl->init('*** generated custom fields for InfoLog','','',0,'',0,0); // make an empty template + + $typ = $value['###typ###']; + unset($value['###typ###']); + + //echo '
'; print_r($value); echo "
\n"; + foreach($value as $name => $field) + { + if (!empty($field['typ']) && $field['typ'] != $typ) + { + continue; // not for our typ + } + $row_class = 'row'; + $label = &$tpl->new_cell(++$n,'label',$field['label'],'',array( + 'no_lang' => substr(lang($field['label']),-1) == '*' ? 2 : 0 + )); + if (count($field['values'])) // selectbox + { + foreach($field['values'] as $key => $val) + { + if (substr($val = lang($val),-1) != '*') + { + $field['values'][$key] = $val; + } + } + $input = &$tpl->new_cell($n,'select','','#'.$name,array( + 'sel_options' => $field['values'], + 'size' => $field['rows'], + 'no_lang' => True + )); + } + elseif ($field['rows'] > 1) // textarea + { + $input = &$tpl->new_cell($n,'textarea','','#'.$name,array( + 'size' => $field['rows'].($field['len'] > 0 ? ','.intval($field['len']) : '') + )); + } + elseif (intval($field['len']) > 0) // regular input field + { + list($max,$shown) = explode(',',$field['len']); + $input = &$tpl->new_cell($n,'text','','#'.$name,array( + 'size' => intval($shown > 0 ? $shown : $max).','.intval($max) + )); + } + else // header-row + { + $label['span'] = 'all'; + $tpl->new_cell($n); // is needed even if its over-span-ed + $row_class = 'th'; + } + if (!empty($field['help']) && $row_class != 'th') + { + $input['help'] = $field['help']; + $input['no_lang'] = substr(lang($help),-1) == '*' ? 2 : 0; + } + $tpl->set_row_attributes($n,0,$row_class); + } + // create an empty line which (should) take all the remaining height + $tpl->new_cell(++$n,'label','','',array( + 'span' => 'all' + )); + $tpl->set_row_attributes($n,'99%','row'); + + // set width of 1. (label) column to 100 + $tpl->set_column_attributes(0,'100'); + + $tpl->set_rows_cols(); // msie (at least 5.5 shows nothing with div overflow=auto) + $tpl->size = '100%,100%'.($tpl->html->user_agent != 'msie' ? ',,,,,auto' : ''); + //echo '
'; print_r($tpl); echo "
\n"; + + if (count($tpl->data) < 2) + { + $cell['type'] = 'label'; + return True; + } + $cell['size'] = ''; // no separate namespace + $cell['type'] = 'template'; + $cell['name'] = $tpl->name; + $cell['obj'] = &$tpl; + + return True; // extra Label is ok + } + } diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index ca839c7645..19c3b1ef32 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -236,8 +236,8 @@ $info_id = intval($info_id); if ($info_id <= 0 || $info_id != $this->data['info_id'] && - (!$this->db->query("select * FROM phpgw_infolog where info_id=$info_id",__LINE__,__FILE__) || - !$this->db->next_record())) + (!$this->db->query("select * FROM phpgw_infolog WHERE info_id=$info_id",__LINE__,__FILE__) || + !$this->db->next_record())) { $this->init( ); return False; @@ -245,6 +245,12 @@ if ($info_id != $this->data['info_id']) // data yet read in { $this->db2data($this->data); + + $this->db->query("SELECT info_extra_name,info_extra_value FROM phpgw_infolog_extra WHERE info_id=$info_id",__LINE__,__FILE__); + while ($this->db->next_record()) + { + $this->data['#'.$this->db->f(0)] = $this->db->f(1); + } } return $this->data; } @@ -254,23 +260,34 @@ @abstract delete InfoLog entry $info_id AND the links to it @syntax delete( $info_id ) @param $info_id id of log-entry + @param int $delete_children delete the children, if not set there parent-id to 0 */ - function delete($info_id) // did _not_ ensure ACL + function delete($info_id,$delete_children=True) // did _not_ ensure ACL { if (($info_id = intval($info_id)) <= 0) { return; } - $this->db->query("delete FROM phpgw_infolog where info_id=$info_id or info_id_parent=$info_id" . - " AND ((info_access='public' and info_owner != $this->user) OR (info_owner=$this->user))", - __LINE__,__FILE__); - + $this->db->query("DELETE FROM phpgw_infolog WHERE info_id=$info_id",__LINE__,__FILE__); + $this->db->query("DELETE FORM phpgw_infolog_extra WHERE info_id=$info_id"); $this->links->unlink(0,'infolog',$info_id); if ($this->data['info_id'] == $info_id) { $this->init( ); } + // delete children, if they are owned by the user + if ($delete_children) + { + $db2 = $this->db; // we need an extra result-set + $db2->query("SELECT info_id FROM phpgw_infolog WHERE info_id_parent=$info_id AND info_owner=$this->user",__LINE__,__FILE__); + while ($db2->next_record()) + { + $this->delete($db2->f(0),$delete_children); + } + } + // set parent_id to 0 for all not deleted children + $this->db->query("UPDATA phpgw_infolog SET info_parent_id=0 WHERE info_parent_id=$info_id",__LINE__,__FILE__); } /*! @@ -285,16 +302,18 @@ $owner = intval($owner); if (!($new_owner = intval($new_owner))) { - $sql = "delete FROM phpgw_infolog where info_owner=$owner"; - $sql2 = "update phpgw_infolog set info_responsible=0 where info_responsible=$owner"; + $db2 = $this->db; // we need an extra result-set + $db2->db->query("SELECT info_id FROM phpgw_infolog WHERE info_owner=$owner",__LINE__,__FILE__); + while($db2->next_record()) + { + $this->delete($this->db->f(0),False); + } } else { - $sql = "update phpgw_infolog set info_owner=$new_owner where info_owner=$owner"; - $sql2 = "update phpgw_infolog set info_responsible=$new_owner where info_responsible=$owner"; + $this->db->query("UPDATE phpgw_infolog SET info_owner=$new_owner WHERE info_owner=$owner",__LINE__,__FILE__); } - $this->db->query($sql,__LINE__,__FILE__); - $this->db->query($sql2,__LINE__,__FILE__); + $this->db->query("UPDATE phpgw_infolog SET info_responsible=$new_owner WHERE info_responsible=$owner",__LINE__,__FILE__); } /*! @@ -310,7 +329,9 @@ $db_cols = $phpgw_baseline['phpgw_infolog']['fd']; unset($phpgw_baseline); - while (list($key,$val) = each($values)) + $info_id = intval($values['info_id']) > 0 ? intval($values['info_id']) : 0; + + foreach($values as $key => $val) { if ($key != 'info_id') { @@ -334,9 +355,9 @@ $query .= (strlen($query) ? ',' : '')."$key=$val"; } } - if (($this->data['info_id'] = intval($values['info_id'])) > 0) + if (($this->data['info_id'] = $info_id)) { - $query = "UPDATE phpgw_infolog SET $query where info_id='".$this->data['info_id']."'"; + $query = "UPDATE phpgw_infolog SET $query WHERE info_id=$info_id"; $this->db->query($query,__LINE__,__FILE__); } else @@ -345,7 +366,38 @@ $this->db->query($query,__LINE__,__FILE__); $this->data['info_id']=$this->db->get_last_insert_id('phpgw_infolog','info_id'); } - // echo "

soinfolog.write values= "; _debug_array($values); + //echo "

soinfolog.write values= "; _debug_array($values); + + // write customfields now + $existing = array(); + if ($info_id) // existing entry + { + $this->db->query("SELECT info_extra_name FROM phpgw_infolog_extra WHERE info_id=$info_id",__LINE__,__FILE__); + while($this->db->next_record()) + { + $existing[strtolower($this->db->f(0))] = True; + } + } + foreach($values as $key => $val) + { + if ($key[0] != '#') + { + continue; // no customfield + } + $this->data[$key] = $val; // update internal data + + $val = $this->db->db_addslashes($val); + $name = $this->db->db_addslashes($key = substr($key,1)); + if ($existing[strtolower($key)]) + { + $query = "UPDATE phpgw_infolog_extra SET info_extra_value='$val' WHERE info_id=$info_id AND info_extra_name='$name'"; + } + else + { + $query = "INSERT INTO phpgw_infolog_extra (info_id,info_extra_name,info_extra_value) VALUES ($info_id,'$name','$val')"; + } + $this->db->query($query,__LINE__,__FILE__); + } // echo "

soinfolog.write this->data= "; _debug_array($this->data); return $this->data['info_id']; @@ -364,7 +416,7 @@ { return 0; } - $this->db->query("select count(*) FROM phpgw_infolog where info_id_parent=$info_id",__LINE__,__FILE__); + $this->db->query("select count(*) FROM phpgw_infolog WHERE info_id_parent=$info_id",__LINE__,__FILE__); $this->db->next_record(); @@ -402,7 +454,7 @@ if (count($links)) { - $link_extra = ($action == 'sp' ? 'OR' : 'AND').' info_id IN ('.implode(',',$links).')'; + $link_extra = ($action == 'sp' ? 'OR' : 'AND').' phpgw_infolog.info_id IN ('.implode(',',$links).')'; } } if ($order) @@ -422,11 +474,13 @@ { $filtermethod .= ' AND info_cat='.intval($cat_id).' '; } - if ($query) // we search in _from, _subject and _des for $query + $join = ''; + if ($query) // we search in _from, _subject, _des and _extra_value for $query { $query = $this->db->db_addslashes($query); $sql_query = "AND (info_from like '%$query%' OR info_subject ". - "LIKE '%$query%' OR info_des LIKE '%$query%') "; + "LIKE '%$query%' OR info_des LIKE '%$query%' OR info_extra_value LIKE '%$query%') "; + $join = 'LEFT JOIN phpgw_infolog_extra ON phpgw_infolog.info_id=phpgw_infolog_extra.info_id'; } $pid = 'AND info_id_parent='.($action == 'sp' ? $action_id : 0); @@ -438,17 +492,15 @@ $ids = array( ); if ($action == '' || $action == 'sp' || count($links)) { - $this->db->query($sql="SELECT COUNT(*) FROM phpgw_infolog i WHERE ($filtermethod $pid $sql_query) $link_extra",__LINE__,__FILE__); - - $this->db->next_record(); - $total = $this->db->f(0); + $query = "FROM phpgw_infolog $join WHERE ($filtermethod $pid $sql_query) $link_extra"; + $this->db->query($sql='SELECT DISTINCT phpgw_infolog.info_id '.$query,__LINE__,__FILE__); + $total = $this->db->num_rows(); if (!$start || $start > $total) { $start = 0; } - $this->db->limit_query($sql="SELECT * FROM phpgw_infolog WHERE ($filtermethod $pid $sql_query) $link_extra $ordermethod",$start,__LINE__,__FILE__); - + $this->db->limit_query($sql="SELECT DISTINCT phpgw_infolog.* $query $ordermethod",$start,__LINE__,__FILE__); while ($this->db->next_record()) { $this->db2data(&$info); diff --git a/infolog/inc/class.uicustomfields.inc.php b/infolog/inc/class.uicustomfields.inc.php new file mode 100644 index 0000000000..3f2646b915 --- /dev/null +++ b/infolog/inc/class.uicustomfields.inc.php @@ -0,0 +1,339 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + /* $Id$ */ + + class uicustomfields + { + var $public_functions = array + ( + 'edit' => True + ); + + function uicustomfields( ) + { + $this->bo = CreateObject('infolog.boinfolog'); + $this->tmpl = CreateObject('etemplate.etemplate'); + $this->types = &$this->bo->enums['type']; + $this->status = &$this->bo->status; + $this->config = &$this->bo->config; + $this->fields = &$this->bo->customfields; + } + + /*! + @function edit + @syntax edit( $content=0 ) + @author ralfbecker + @abstract Edit/Create an InfoLog Custom fields, typ and status + @param $content Content from the eTemplate Exec + */ + function edit($content = 0) + { + $GLOBALS['phpgw_info']['flags']['app_header'] = lang('InfoLog').' - '.lang('Custom fields, typ and status'); + if (is_array($content)) + { + //echo '

'; print_r($content); echo "
\n"; + list($action) = @each($content['button']); + switch($action) + { + case 'create': + $this->create($content); + break; + case 'delete': + $this->delete($content); + break; + default: + if (!$content['status']['create'] && !$content['status']['delete'] && + !$content['fields']['create'] && !$content['fields']['delete']) + { + break; // typ change + } + case 'save': + case 'apply': + $this->update($content); + if ($action != 'save') + { + break; + } + case 'cancel': + $GLOBALS['phpgw']->redirect_link('/admin/'); + exit; + } + } + else + { + list($typ) = each($this->types); + $content = array( + 'typ' => $typ, + ); + } + $readonlys = array(); + $readonlys['button[delete]'] = isset($this->bo->stock_enums['type'][$content['typ']]); + + $content['status'] = array( + 'default' => $this->status['defaults'][$content['typ']] + ); + $n = 0; + foreach($this->status[$content['typ']] as $name => $label) + { + $content['status'][++$n] = array( + 'name' => $name, + 'label' => $label, + 'disabled' => False + ); + $preserv_status[$n]['old_name'] = $name; + if (isset($this->bo->stock_status[$content['typ']][$name])) + { + $readonlys['status']["delete[$name]"] = + $readonlys['status'][$n.'[name]'] = True; + } + $readonlys['status']["create$name"] = True; + } + $content['status'][++$n] = array('name'=>''); // new line for create + $readonlys['status']["delete[]"] = True; + + //echo 'customfields=
'; print_r($this->fields); echo "
\n"; + $content['fields'] = array(); + $n = 0; + foreach($this->fields as $name => $data) + { + if (is_array($data['values'])) + { + $values = ''; + foreach($data['values'] as $var => $value) + { + $values .= (!empty($values) ? "\n" : '').$var.'='.$value; + } + $data['values'] = $values; + } + $content['fields'][++$n] = $data + array( + 'name' => $name + ); + $preserv_fields[$n]['old_name'] = $name; + $readonlys['fields']["create$name"] = True; + } + $content['fields'][++$n] = array('typ'=>'','order' => 10 * $n); // new line for create + $readonlys['fields']["delete[]"] = True; + + //echo '

uicustomfields.edit(content =

'; print_r($content); echo "
\n"; + //echo 'readonlys =
'; print_r($readonlys); echo "
\n"; + $this->tmpl->read('infolog.customfields'); + $this->tmpl->exec('infolog.uicustomfields.edit',$content,array( + 'typ' => $this->types, + ),$readonlys,array( + 'status' => $preserv_status, + 'fields' => $preserv_fields + )); + } + + function update_fields(&$content) + { + $typ = $content['typ']; + $fields = &$content['fields']; + + $create = $fields['create']; + unset($fields['create']); + + if ($fields['delete']) + { + list($delete) = each($fields['delete']); + unset($fields['delete']); + } + + foreach($fields as $field) + { + $name = trim($field['name']); + $old_name = $field['old_name']; + + if (!empty($delete) && $delete == $old_name) + { + unset($this->fields[$old_name]); + continue; + } + if (isset($field['name']) && empty($name) && ($create || !empty($old_name))) // empty name not allowed + { + $content['error_msg'] = lang('Name must not be empty !!!'); + } + if (isset($field['old_name'])) + { + if (!empty($name) && $old_name != $name) // renamed + { + unset($this->fields[$old_name]); + } + elseif (empty($name)) + { + $name = $old_name; + } + } + elseif (empty($name)) // new item and empty ==> ignore it + { + continue; + } + $values = array(); + if (!empty($field['values'])) + { + foreach(explode("\n",$field['values']) as $line) + { + list($var,$value) = split('=',trim($line),2); + $var = trim($var); + $values[$var] = empty($value) ? $var : $value; + } + } + $this->fields[$name] = array( + 'typ' => $field['typ'], + 'label' => empty($field['label']) ? $name : $field['label'], + 'help' => $field['help'], + 'values'=> $values, + 'len' => $field['len'], + 'rows' => intval($field['rows']), + 'order' => intval($field['order']) + ); + } + if (!function_exists('sort_by_order')) + { + function sort_by_order($arr1,$arr2) + { + return $arr1['order'] - $arr2['order']; + } + } + uasort($this->fields,sort_by_order); + + $n = 0; + foreach($this->fields as $name => $data) + { + $this->fields[$name]['order'] = ($n += 10); + } + } + + function update_status(&$content) + { + $typ = $content['typ']; + $status = &$content['status']; + + $default = $status['default']; + unset($status['default']); + + $create = $status['create']; + unset($status['create']); + + if ($status['delete']) + { + list($delete) = each($status['delete']); + unset($status['delete']); + } + + foreach($status as $stat) + { + $name = trim($stat['name']); + $old_name = $stat['old_name']; + + if (!empty($delete) && $delete == $old_name) + { + unset($this->status[$typ][$old_name]); + continue; + } + if (isset($stat['name']) && empty($name) && ($create || !empty($old_name))) // empty name not allowed + { + $content['error_msg'] = lang('Name must not be empty !!!'); + } + if (isset($stat['old_name'])) + { + if (!empty($name) && $old_name != $name) // renamed + { + unset($this->status[$typ][$old_name]); + + if ($default == $old_name) + { + $default = $name; + } + } + elseif (empty($name)) + { + $name = $old_name; + } + } + elseif (empty($name)) // new item and empty ==> ignore it + { + continue; + } + $this->status[$typ][$name] = empty($stat['label']) ? $name : $stat['label']; + } + $this->status['defaults'][$typ] = empty($default) ? $name : $default; + if (!isset($this->status[$typ][$this->status['defaults'][$typ]])) + { + list($this->status['defaults'][$typ]) = @each($this->status[$typ]); + } + } + + function update(&$content) + { + $this->update_status($content); + $this->update_fields($content); + + // save changes to repository + $this->save_repository(); + } + + function delete(&$content) + { + if (isset($this->bo->stock_enums['type'][$content['typ']])) + { + $content['error_msg'] .= lang("You can't delete one of the stock types !!!"); + return; + } + unset($this->types[$content['typ']]); + unset($this->status[$content['typ']]); + unset($this->status['defaults'][$content['typ']]); + $content['typ'] = ''; + + // save changes to repository + $this->save_repository(); + } + + function create(&$content) + { + $new_name = trim($content['new_name']); + unset($content['new_name']); + if (empty($new_name) || isset($this->types[$new_name])) + { + $content['error_msg'] .= empty($new_name) ? + lang('You have to enter a name, to create a new typ!!!') : + lang("Typ '%1' already exists !!!",$new_name); + } + else + { + $this->types[$new_name] = $new_name; + $this->status[$new_name] = array( + 'ongoing' => 'ongoing', + 'done' => 'done' + ); + $this->status['defaults'][$new_name] = 'ongoing'; + + // save changes to repository + $this->save_repository(); + + $content['typ'] = $new_name; // show the new entry + } + } + + function save_repository() + { + // save changes to repository + $this->config->value('types',$this->types); + //echo '

uicustomfields::save_repository() \$this->status=

'; print_r($this->status); echo "
\n"; + $this->config->value('status',$this->status); + //echo '

uicustomfields::save_repository() \$this->fields=

'; print_r($this->fields); echo "
\n"; + $this->config->value('customfields',$this->fields); + + $this->config->save_repository(); + } + } diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index ca0f228511..c6d5e5c5ab 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -115,6 +115,9 @@ } } } + $info['info_type_label'] = $this->bo->enums['type'][$info['info_type']]; + $info['info_status_label'] = $this->bo->status[$info['info_type']][$info['info_status']]; + return $info; } @@ -295,11 +298,6 @@ { $content['info_link_id'] = $content['link_to']['primary']; } - if ($content['set_today']) - { - $content['info_startdate'] = time(); - unset($content['set_today']); - } if ($content['save'] || $content['delete'] || $content['cancel']) { if ($content['save'] && (!$info_id || $this->bo->check_access($info_id,PHPGW_ACL_EDIT))) @@ -387,6 +385,10 @@ { $content['info_startdate'] = time(); } + if ($content['info_enddate'] < time()) // parent-enddate is in the past => empty + { + $content['info_enddate'] = ''; + } } else { @@ -442,8 +444,17 @@ $readonlys['delete'] = $action != ''; $GLOBALS['phpgw_info']['flags']['app_header'] = lang($this->messages[$info_id ? 'edit' : ($action == 'sp' ? 'add_sub' : 'add')]); - //echo "

uiinfolog.edit(info_id=$info_id,mode=$mode) content = "; _debug_array($content); $this->tmpl->read('infolog.edit'); + if ($this->bo->has_customfields($content['info_type'])) + { + $content['customfields'] = $this->bo->customfields; + $content['customfields']['###typ###'] = $content['info_type']; + } + else + { + $this->tmpl->set_cell_attribute('description|links|delegation|customfields','name','description|links|delegation'); + } + //echo "

uiinfolog.edit(info_id=$info_id,mode=$mode) content = "; _debug_array($content); $this->tmpl->exec('infolog.uiinfolog.edit',$content,array( 'info_type' => $this->bo->enums['type'], 'info_pri' => $this->bo->enums['priority'], diff --git a/infolog/inc/hook_admin.inc.php b/infolog/inc/hook_admin.inc.php index 8adedbb753..42e6a8fcb7 100644 --- a/infolog/inc/hook_admin.inc.php +++ b/infolog/inc/hook_admin.inc.php @@ -13,9 +13,15 @@ { $file = Array ( - 'Site configuration' => $GLOBALS['phpgw']->link('/index.php',array('menuaction' => 'infolog.uiinfolog.admin' )), - 'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True'), - 'CSV-Import' => $GLOBALS['phpgw']->link('/infolog/csv_import.php') + 'Site configuration' => $GLOBALS['phpgw']->link('/index.php',array( + 'menuaction' => 'infolog.uiinfolog.admin' )), + 'Global Categories' => $GLOBALS['phpgw']->link('/index.php',array( + 'menuaction' => 'admin.uicategories.index', + 'appname' => $appname, + 'global_cats'=> True)), + 'Custom fields, typ and status' => $GLOBALS['phpgw']->link('/index.php',array( + 'menuaction' => 'infolog.uicustomfields.edit')), + 'CSV-Import' => $GLOBALS['phpgw']->link('/infolog/csv_import.php') ); //Do not modify below this line diff --git a/infolog/setup/etemplates.inc.php b/infolog/setup/etemplates.inc.php index f5dac180e1..d41dcefad8 100644 --- a/infolog/setup/etemplates.inc.php +++ b/infolog/setup/etemplates.inc.php @@ -1,8 +1,15 @@ 'infolog.customfields','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:7:{i:0;a:3:{s:1:\"F\";s:3:\"80%\";s:2:\"c2\";s:6:\"header\";s:2:\"c4\";s:6:\"header\";}i:1;a:6:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:3:\"Typ\";}s:1:\"B\";a:4:{s:4:\"type\";s:6:\"select\";s:4:\"name\";s:3:\"typ\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:52:\"select a typ to edit it\'s status-values or delete it\";}s:1:\"C\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Delete\";s:4:\"name\";s:14:\"button[delete]\";s:4:\"help\";s:24:\"deletes the selected typ\";}s:1:\"D\";a:5:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"10,10\";s:4:\"name\";s:8:\"new_name\";s:4:\"help\";s:26:\"name of new type to create\";s:4:\"blur\";s:8:\"new name\";}s:1:\"E\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Create\";s:4:\"name\";s:14:\"button[create]\";s:4:\"help\";s:37:\"creates a new typ with the given name\";}s:1:\"F\";a:5:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:10:\",error_msg\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:9:\"error_msg\";}}i:2;a:6:{s:1:\"A\";a:4:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:21:\"Custom status for typ\";s:4:\"name\";s:3:\"typ\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:6:{s:1:\"A\";a:4:{s:4:\"type\";s:8:\"template\";s:4:\"size\";s:6:\"status\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:6:\"status\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}}i:4;a:6:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:13:\"Custom fields\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}}i:5;a:6:{s:1:\"A\";a:4:{s:4:\"type\";s:8:\"template\";s:4:\"size\";s:6:\"fields\";s:4:\"span\";s:3:\"all\";s:4:\"name\";s:6:\"fields\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}}i:6;a:6:{s:1:\"A\";a:6:{s:4:\"type\";s:4:\"hbox\";s:4:\"size\";s:1:\"3\";s:4:\"span\";s:3:\"all\";i:1;a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Save\";s:4:\"name\";s:12:\"button[save]\";s:4:\"help\";s:33:\"saves the changes made and leaves\";}i:2;a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:5:\"Apply\";s:4:\"name\";s:13:\"button[apply]\";s:4:\"help\";s:19:\"applies the changes\";}i:3;a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Cancel\";s:4:\"name\";s:14:\"button[cancel]\";s:4:\"help\";s:22:\"leaves without saveing\";}}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"E\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}}}','size' => '','style' => '.header { font-weight: bold; font-size: 120%; } +.error_msg { color: red; font-style: italics; }','modified' => '1061729975',); + +$templ_data[] = array('name' => 'infolog.customfields.fields','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:3:{i:0;a:2:{s:2:\"c1\";s:2:\"th\";s:2:\"c2\";s:7:\"row,top\";}i:1;a:7:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:3:\"Typ\";}s:1:\"B\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Name\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:20:\"Values for selectbox\";}s:1:\"E\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:14:\"Length
Rows\";}s:1:\"F\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Order\";}s:1:\"G\";a:4:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:6:\"Action\";s:5:\"align\";s:6:\"center\";s:4:\"help\";s:18:\"deletes this field\";}}i:2;a:7:{s:1:\"A\";a:4:{s:4:\"type\";s:6:\"select\";s:4:\"size\";s:3:\"All\";s:4:\"name\";s:11:\"${row}[typ]\";s:4:\"help\";s:41:\"for which types should this field be used\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:5:\"20,32\";s:4:\"name\";s:12:\"${row}[name]\";s:4:\"help\";s:83:\"the name used internaly (<= 20 chars), changeing it makes existing data unavailible\";}s:1:\"C\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:4:\",255\";s:4:\"name\";s:13:\"${row}[label]\";s:4:\"help\";s:30:\"the text displayed to the user\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";s:4:\"name\";s:13:\"${row}[label]\";}}s:1:\"D\";a:4:{s:4:\"type\";s:8:\"textarea\";s:4:\"size\";s:4:\"2,30\";s:4:\"name\";s:14:\"${row}[values]\";s:4:\"help\";s:40:\"each value is a line like [=

@@ -46,22 +45,16 @@ - + {hidden_vars}
{delete} - + + - - - - {lang_data} - {td_data} - - - + diff --git a/preferences/templates/default/delete.tpl b/preferences/templates/default/delete.tpl index 3fbbc939fc..fa5cc3f968 100644 --- a/preferences/templates/default/delete.tpl +++ b/preferences/templates/default/delete.tpl @@ -9,7 +9,7 @@ {deleteheader} - {sub_select} + {lang_subs} {subs} diff --git a/preferences/templates/default/images/navbar.png b/preferences/templates/default/images/navbar.png index 9551939916..2feadf8d20 100644 Binary files a/preferences/templates/default/images/navbar.png and b/preferences/templates/default/images/navbar.png differ diff --git a/preferences/templates/default/index.tpl b/preferences/templates/default/index.tpl index 7147dcd986..c9b80a840c 100644 --- a/preferences/templates/default/index.tpl +++ b/preferences/templates/default/index.tpl @@ -11,15 +11,15 @@ - - [ {app_title} ] -   {app_title} + + [ {app_name} ] +   {app_name} - -  {app_title} + +   {app_name} diff --git a/preferences/templates/default/listcats.tpl b/preferences/templates/default/listcats.tpl index c93063d389..b99800d44a 100644 --- a/preferences/templates/default/listcats.tpl +++ b/preferences/templates/default/listcats.tpl @@ -1,45 +1,55 @@ - -
- - - - - - + + + + + - +
- - - {left} - - {right} - -
{lang_showing}
-
  -
+
+ + + {left} + + {right} + +
{lang_showing}
+
  +  
- - - - - {th_data} - - - - - + + + + {sort_data} + + + + - {rows} -
{sort_name}{sort_description}{lang_app}{lang_sub}{lang_edit}{lang_delete}
{sort_name}{sort_description}{lang_app}{lang_sub}{lang_edit}{lang_delete}
+ - + + + + {td_data} + + + + + + + + + + +
{name}{descr}{lang_app}{lang_sub_entry}{lang_edit_entry}{lang_delete_entry}
+
@@ -54,19 +64,6 @@
+ +
- - - - - - {name} - {descr} - {td_data} - {lang_app} - {lang_sub_entry} - {lang_edit_entry} - {lang_delete_entry} - - - diff --git a/preferences/templates/default/preferences.tpl b/preferences/templates/default/preferences.tpl index 7aeba2a177..99cba0a48c 100644 --- a/preferences/templates/default/preferences.tpl +++ b/preferences/templates/default/preferences.tpl @@ -10,7 +10,7 @@ - + {list_header} {rows} @@ -29,18 +29,18 @@ - + {row_name} {row_value} - + {row_name} {row_value} - + {help_value} diff --git a/preferences/templates/funkwerk/app_data.xsl b/preferences/templates/funkwerk/app_data.xsl deleted file mode 100644 index 838bf8643c..0000000000 --- a/preferences/templates/funkwerk/app_data.xsl +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - -
- - -
-
- - - - - - [] - - -  •  - - -   - - diff --git a/preferences/templates/idots/images/navbar.png b/preferences/templates/idots/images/navbar.png new file mode 100755 index 0000000000..bcb9d5aee8 Binary files /dev/null and b/preferences/templates/idots/images/navbar.png differ diff --git a/preferences/templates/idots/index.tpl b/preferences/templates/idots/index.tpl new file mode 100755 index 0000000000..9e91bbe146 --- /dev/null +++ b/preferences/templates/idots/index.tpl @@ -0,0 +1,30 @@ + + + {rows} +
+ + + + + [ {app_name} ] +   {app_name} + + + + + +   {app_name} + + + + + +  • {pref_text} + + + + + +   + + diff --git a/preferences/templates/justweb/images/tab_prefs.gif b/preferences/templates/justweb/images/tab_prefs.gif deleted file mode 100644 index c08d968c10..0000000000 Binary files a/preferences/templates/justweb/images/tab_prefs.gif and /dev/null differ diff --git a/preferences/templates/justweb/images/tab_prefs.png b/preferences/templates/justweb/images/tab_prefs.png deleted file mode 100644 index f141047f3d..0000000000 Binary files a/preferences/templates/justweb/images/tab_prefs.png and /dev/null differ diff --git a/preferences/templates/verdilak/images/preferences-grey.gif b/preferences/templates/verdilak/images/preferences-grey.gif deleted file mode 100644 index 087d0d2d17..0000000000 Binary files a/preferences/templates/verdilak/images/preferences-grey.gif and /dev/null differ diff --git a/preferences/templates/verdilak/images/preferences-grey.png b/preferences/templates/verdilak/images/preferences-grey.png deleted file mode 100644 index 9b114fc0a2..0000000000 Binary files a/preferences/templates/verdilak/images/preferences-grey.png and /dev/null differ diff --git a/preferences/templates/verdilak/images/preferences-red.gif b/preferences/templates/verdilak/images/preferences-red.gif deleted file mode 100644 index 39af68e46f..0000000000 Binary files a/preferences/templates/verdilak/images/preferences-red.gif and /dev/null differ diff --git a/preferences/templates/verdilak/images/preferences-red.png b/preferences/templates/verdilak/images/preferences-red.png deleted file mode 100644 index a015e66e9b..0000000000 Binary files a/preferences/templates/verdilak/images/preferences-red.png and /dev/null differ diff --git a/setup/applications.php b/setup/applications.php index 49e9386dbb..ed9747821e 100644 --- a/setup/applications.php +++ b/setup/applications.php @@ -11,7 +11,7 @@ /* $Id$ */ - $DEBUG = False; + $DEBUG = $_POST['debug'] || $_GET['debug']; /* TODO: We allow a user to hose their setup here, need to make use of dependencies so they are warned that they are pulling the rug @@ -69,9 +69,9 @@ function parsedep($depends,$main=True) { $depstring = '('; - while (list($a,$b) = each ($depends)) + foreach($depends as $a => $b) { - while (list($c,$d) = each($b)) + foreach($b as $c => $d) { if (is_array($d)) { @@ -126,91 +126,100 @@ $install = get_var('install',Array('POST')); $upgrade = get_var('upgrade',Array('POST')); - while (list($appname,$key) = @each($remove)) + if(!empty($remove) && is_array($remove)) { - $terror = array(); - $terror[] = $setup_info[$appname]; - - if ($setup_info[$appname]['tables']) + foreach($remove as $appname => $key) { - $GLOBALS['phpgw_setup']->process->droptables($terror,$DEBUG); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('tables dropped') . '.'; - } + $terror = array(); + $terror[] = $setup_info[$appname]; - $GLOBALS['phpgw_setup']->deregister_app($setup_info[$appname]['name']); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('deregistered') . '.'; - - if ($setup_info[$appname]['hooks']) - { - $GLOBALS['phpgw_setup']->deregister_hooks($setup_info[$appname]['name']); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('hooks deregistered') . '.'; - } - - $terror = $GLOBALS['phpgw_setup']->process->drop_langs($terror,$DEBUG); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('Translations removed') . '.'; - } - - while (list($appname,$key) = @each($install)) - { - $terror = array(); - $terror[] = $setup_info[$appname]; - - if ($setup_info[$appname]['tables']) - { - $terror = $GLOBALS['phpgw_setup']->process->current($terror,$DEBUG); - $terror = $GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG); - echo '
' . $setup_info[$appname]['title'] . ' ' - . lang('tables installed, unless there are errors printed above') . '.'; - } - else - { - if ($GLOBALS['phpgw_setup']->app_registered($setup_info[$appname]['name'])) + if ($setup_info[$appname]['tables']) { - $GLOBALS['phpgw_setup']->update_app($setup_info[$appname]['name']); + $GLOBALS['phpgw_setup']->process->droptables($terror,$DEBUG); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('tables dropped') . '.'; } - else - { - $GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']); - } - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('registered') . '.'; + + $GLOBALS['phpgw_setup']->deregister_app($setup_info[$appname]['name']); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('deregistered') . '.'; if ($setup_info[$appname]['hooks']) { - $GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.'; + $GLOBALS['phpgw_setup']->deregister_hooks($setup_info[$appname]['name']); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('hooks deregistered') . '.'; } + + $terror = $GLOBALS['phpgw_setup']->process->drop_langs($terror,$DEBUG); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('Translations removed') . '.'; } - $force_en = False; - if($appname == 'phpgwapi') - { - $force_en = True; - } - $terror = $GLOBALS['phpgw_setup']->process->add_langs($terror,$DEBUG,$force_en); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('Translations added') . '.'; } - while (list($appname,$key) = @each($upgrade)) + if(!empty($install) && is_array($install)) { - $terror = array(); - $terror[] = $setup_info[$appname]; - - $GLOBALS['phpgw_setup']->process->upgrade($terror,$DEBUG); - if ($setup_info[$appname]['tables']) + foreach($install as $appname => $key) { - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('tables upgraded') . '.'; - // The process_upgrade() function also handles registration - } - else - { - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('upgraded') . '.'; - } + $terror = array(); + $terror[] = $setup_info[$appname]; - $terror = $GLOBALS['phpgw_setup']->process->upgrade_langs($terror,$DEBUG); - echo '
' . $setup_info[$appname]['title'] . ' ' . lang('Translations upgraded') . '.'; + if ($setup_info[$appname]['tables']) + { + $terror = $GLOBALS['phpgw_setup']->process->current($terror,$DEBUG); + $terror = $GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG); + echo '
' . $setup_info[$appname]['title'] . ' ' + . lang('tables installed, unless there are errors printed above') . '.'; + } + else + { + if ($GLOBALS['phpgw_setup']->app_registered($setup_info[$appname]['name'])) + { + $GLOBALS['phpgw_setup']->update_app($setup_info[$appname]['name']); + } + else + { + $GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']); + } + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('registered') . '.'; + + if ($setup_info[$appname]['hooks']) + { + $GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.'; + } + } + $force_en = False; + if($appname == 'phpgwapi') + { + $force_en = True; + } + $terror = $GLOBALS['phpgw_setup']->process->add_langs($terror,$DEBUG,$force_en); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('Translations added') . '.'; + } + } + + if(!empty($upgrade) && is_array($upgrade)) + { + foreach($upgrade as $appname => $key) + { + $terror = array(); + $terror[] = $setup_info[$appname]; + + $GLOBALS['phpgw_setup']->process->upgrade($terror,$DEBUG); + if ($setup_info[$appname]['tables']) + { + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('tables upgraded') . '.'; + // The process_upgrade() function also handles registration + } + else + { + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('upgraded') . '.'; + } + + $terror = $GLOBALS['phpgw_setup']->process->upgrade_langs($terror,$DEBUG); + echo '
' . $setup_info[$appname]['title'] . ' ' . lang('Translations upgraded') . '.'; + } } //$setup_tpl->set_var('goback', - echo '
' . lang('Go back') . ''; + echo '
' . lang('Go back') . ''; //$setup_tpl->pparse('out','submit'); $setup_tpl->pparse('out','footer'); exit; @@ -225,37 +234,41 @@ if(@$detail) { @ksort($setup_info[$detail]); - @reset($setup_info[$detail]); $setup_tpl->set_var('description',lang('App details') . ':'); $setup_tpl->pparse('out','header'); - - while (list($key,$val) = each($setup_info[$detail])) + + $setup_tpl->set_var('name','application'); + $setup_tpl->set_var('details', lang($setup_info[$detail]['title'])); + $setup_tpl->pparse('out','detail'); + + foreach($setup_info[$detail] as $key => $val) { - if ($i) { $i = 0; } - else { $i = 1; } - - //if(!$val) { $val = 'none'; } - - if ($key == 'tables') + if($key != 'title') { - $tblcnt = count($setup_info[$detail][$key]); - if(is_array($val)) - { - $key = '' . $key . '(' . $tblcnt . ')' . "\n"; - $val = implode(',' . "\n",$val); - } - } - if ($key == 'hooks') { $val = implode(',',$val); } - if ($key == 'depends') { $val = parsedep($val); } - if (is_array($val)) { $val = implode(',',$val); } + $i = ($i ? 0 : 1); + - $setup_tpl->set_var('bg_color',$bgcolor[$i]); - $setup_tpl->set_var('name',$key); - $setup_tpl->set_var('details',$val); - $setup_tpl->pparse('out','detail'); + if ($key == 'tables') + { + $tblcnt = count($setup_info[$detail][$key]); + if(is_array($val)) + { + $key = '' . $key . '(' . $tblcnt . ')' . "\n"; + $val = implode(',' . "\n",$val); + } + } + if ($key == 'hooks') { $val = implode(',',$val); } + if ($key == 'depends') { $val = parsedep($val); } + if (is_array($val)) { $val = implode(',',$val); } + + $setup_tpl->set_var('bg_color',$bgcolor[$i]); + $setup_tpl->set_var('name',$key); + $setup_tpl->set_var('details',$val); + $setup_tpl->pparse('out','detail'); + } } - echo '
' . lang('Go back') . ''; + echo '
' . lang('Go back') . ''; $setup_tpl->pparse('out','footer'); exit; } @@ -301,11 +314,12 @@ { echo lang('because it depends upon') . ':
' . "\n"; list($depapp,$depver) = parsedep($setup_info[$resolve]['depends'],False); - for ($i=0;$i' . $depapp[$i] . ': '; $list = ''; - while(list($x,$y) = @each($depver[$i])) + foreach($depver[$i] as $x => $y) { $list .= $y . ', '; } @@ -343,7 +357,7 @@ echo '
' . lang('However, the application is otherwise installed') . '.'; } - echo '
' . lang('Go back') . ''; + echo '
' . lang('Go back') . ''; $setup_tpl->pparse('out','footer'); exit; } @@ -367,29 +381,23 @@ $setup_tpl->set_var('install_all',lang('Install All')); $setup_tpl->set_var('upgrade_all',lang('Upgrade All')); $setup_tpl->set_var('remove_all',lang('Remove All')); + $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); + $setup_tpl->set_var('debug',''); $setup_tpl->set_var('bg_color',$bgcolor[0]); $setup_tpl->pparse('out','app_header'); - @reset ($setup_info); $i = 0; - while (list ($key, $value) = each ($setup_info)) + foreach($setup_info as $key => $value) { if(@$value['name']) { - if ($i) - { - $i = 0; - } - else - { - $i = 1; - } + $i = ($i ? 0 : 1); $setup_tpl->set_var('apptitle',$value['title']); $setup_tpl->set_var('currentver',@$value['currentver']); $setup_tpl->set_var('version',$value['version']); $setup_tpl->set_var('bg_color',$bgcolor[$i]); - + switch($value['status']) { case 'C': @@ -513,7 +521,7 @@ } } - $setup_tpl->set_var('submit',lang('Submit')); + $setup_tpl->set_var('submit',lang('Save')); $setup_tpl->set_var('cancel',lang('Cancel')); $setup_tpl->pparse('out','app_footer'); $setup_tpl->pparse('out','footer'); diff --git a/setup/config.php b/setup/config.php index a355493173..9454b6bc47 100644 --- a/setup/config.php +++ b/setup/config.php @@ -32,6 +32,30 @@ $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup'); $setup_tpl = CreateObject('setup.Template',$tpl_root); + + // test if $path lies within the webservers document-root + // + function in_docroot($path) + { + $docroots = array(PHPGW_SERVER_ROOT,$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']); + + foreach ($docroots as $docroot) + { + $len = strlen($docroot); + + if ($docroot == substr($path,0,$len)) + { + $rest = substr($path,$len); + + if (!strlen($rest) || $rest[0] == DIRECTORY_SEPARATOR) + { + return True; + } + } + } + return False; + } + $setup_tpl->set_file(array( 'T_head' => 'head.tpl', 'T_footer' => 'footer.tpl', @@ -46,8 +70,10 @@ $GLOBALS['phpgw_setup']->loaddb(); /* Guessing default values. */ - $GLOBALS['current_config']['hostname'] = $HTTP_HOST; - $GLOBALS['current_config']['files_dir'] = ereg_replace('/setup','/files',dirname($SCRIPT_FILENAME)); + $GLOBALS['current_config']['hostname'] = $_SERVER['HTTP_HOST']; + // files-dir is not longer allowed in document root, for security reasons !!! + $GLOBALS['current_config']['files_dir'] = '/outside/webserver/docroot'; + if(@is_dir('/tmp')) { $GLOBALS['current_config']['temp_dir'] = '/tmp'; @@ -56,6 +82,11 @@ { $GLOBALS['current_config']['temp_dir'] = '/path/to/temp/dir'; } + // guessing the phpGW url + $parts = explode('/',$_SERVER['PHP_SELF']); + unset($parts[count($parts)-1]); // config.php + unset($parts[count($parts)-1]); // setup + $GLOBALS['current_config']['webserver_url'] = implode('/',$parts); if(@get_var('cancel',Array('POST'))) { @@ -65,6 +96,7 @@ /* Check api version, use correct table */ $setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions(); + if($GLOBALS['phpgw_setup']->alessthanb($setup_info['phpgwapi']['currentver'], '0.9.10pre7')) { $configtbl = 'config'; @@ -75,7 +107,9 @@ } $newsettings = get_var('newsettings',Array('POST')); - if(@get_var('submit',Array('POST')) && @$newsettings) + $files_in_docroot = in_docroot($GLOBALS['HTTP_POST_VARS']['newsettings']['files_dir']); + + if(@get_var('submit',Array('POST')) && @$newsettings && !$files_in_docroot) { $datetime = CreateObject('phpgwapi.datetime'); switch (intval($newsettings['daytime_port'])) @@ -103,7 +137,7 @@ { /* echo '
Updating: ' . $setting . '=' . $value; */ /* Don't erase passwords, since we also do not print them below */ - if(!ereg('passwd',$setting) && !ereg('password',$setting) && !ereg('root_pw',$setting)) + if($value || (!ereg('passwd',$setting) && !ereg('password',$setting) && !ereg('root_pw',$setting))) { @$GLOBALS['phpgw_setup']->db->query("DELETE FROM $configtbl WHERE config_name='" . $setting . "'"); } @@ -151,10 +185,16 @@ { $GLOBALS['current_config'][$GLOBALS['phpgw_setup']->db->f('config_name')] = $GLOBALS['phpgw_setup']->db->f('config_value'); } - - if($GLOBALS['current_config']['files_dir'] == '/path/to/dir/phpgroupware/files') + + // are we here because of an error: files-dir in docroot + if (is_array($GLOBALS['HTTP_POST_VARS']['newsettings']) && $files_in_docroot) { - $GLOBALS['current_config']['files_dir'] = $GLOBALS['phpgw_info']['server']['server_root'] . '/files'; + echo '

'.lang('Path to user and group files HAS TO BE OUTSIDE of the webservers document-root!!!')."

\n"; + + foreach($GLOBALS['HTTP_POST_VARS']['newsettings'] as $key => $val) + { + $GLOBALS['current_config'][$key] = $val; + } } if($GLOBALS['error'] == 'badldapconnection') @@ -187,10 +227,6 @@ $t->set_unknowns('keep'); $t->set_file(array('config' => 'config.tpl')); $t->set_block('config','body','body'); - $t->set_var('th_bg', '486591'); - $t->set_var('th_text', 'FFFFFF'); - $t->set_var('row_on', 'DDDDDD'); - $t->set_var('row_off', 'EEEEEE'); $vars = $t->get_undefined('body'); $GLOBALS['phpgw_setup']->hook('config','setup'); @@ -260,9 +296,10 @@ $setup_tpl->set_var('more_configs',lang('Please login to phpgroupware and run the admin application for additional site configuration') . '.'); - $setup_tpl->set_var('lang_submit',lang('submit')); - $setup_tpl->set_var('lang_cancel',lang('cancel')); + $setup_tpl->set_var('lang_submit',lang('Save')); + $setup_tpl->set_var('lang_cancel',lang('Cancel')); $setup_tpl->pparse('out','T_config_post_script'); $GLOBALS['phpgw_setup']->html->show_footer(); ?> + diff --git a/setup/doc/setup3.txt b/setup/doc/setup3.txt index b1c3cf35a8..be764ec7f7 100644 --- a/setup/doc/setup3.txt +++ b/setup/doc/setup3.txt @@ -3,7 +3,7 @@ phpGroupWare Setup June 18, 2001 - +Updated May 9, 2003 Abstract @@ -71,7 +71,7 @@ a look at the following section: $setup_info['addressbook']['name'] = 'addressbook'; -$setup_info['addressbook']['title'] = 'Addressbook'; +$setup_info['addressbook']['title'] = 'Addressbook'; - Deprecated .0.9.16+ $setup_info['addressbook']['version'] = '0.9.13.002'; @@ -83,8 +83,9 @@ $setup_info['addressbook']['enable'] = 1; flags such as 'currentapp' or as the 'app_name' almost everywhere else. -'title' would be used in the navbar, admin, preferences, -as well as in the application itself. +'title' is now deprecated. Now simply include an entry like this +in the lang file for you application: +addressbook en common Address Book The 'version' string defines the version of the application and table code. This would be incremented whenever you create diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index 9389fd12ea..be36d09b58 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -32,6 +32,16 @@ { include('../header.inc.php'); } + + if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+ + { + echo 'phpGroupWare now requires PHP 4.1 or greater.
'; + echo 'Please contact your System Administrator'; + exit; + } + + + /* If we included the header.inc.php, but it is somehow broken, cover ourselves... */ if(!defined('PHPGW_SERVER_ROOT') && !defined('PHPGW_INCLUDE_ROOT')) { @@ -39,10 +49,6 @@ define('PHPGW_INCLUDE_ROOT','..'); } - if (floor(phpversion()) == 3) - { - include(PHPGW_INCLUDE_ROOT . '/phpgwapi/inc/php3_support_functions.inc.php'); - } include(PHPGW_INCLUDE_ROOT . '/phpgwapi/inc/common_functions.inc.php'); define('SEP',filesystem_separator()); @@ -97,19 +103,19 @@ return $languages; } - function lang_select() + function lang_select($onChange=False) { $ConfigLang = get_var('ConfigLang',Array('POST','COOKIE')); - $select = '' . "\n"; $languages = get_langs(); while(list($null,$data) = each($languages)) { - if($data['available']) + if($data['available'] && !empty($data['lang'])) { $selected = ''; $short = substr($data['lang'],0,2); - if ($short == $ConfigLang) + if ($short == $ConfigLang || empty($ConfigLang) && $short == substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2)) { $selected = ' selected'; } diff --git a/setup/index.php b/setup/index.php index 47940d2ce3..06c2b01454 100644 --- a/setup/index.php +++ b/setup/index.php @@ -101,42 +101,42 @@ case 'Uninstall all applications': $subtitle = lang('Deleting Tables'); $submsg = lang('Are you sure you want to delete your existing tables and data?') . '.'; - $subaction = 'uninstall'; + $subaction = lang('uninstall'); $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'predrop'; $GLOBALS['phpgw_info']['setup']['stage']['db'] = 5; break; case 'Create Database': $subtitle = lang('Create Database'); $submsg = lang('At your request, this script is going to attempt to create the database and assign the db user rights to it'); - $subaction = 'created'; + $subaction = lang('created'); $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'dbcreate'; $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6; break; case 'REALLY Uninstall all applications': $subtitle = lang('Deleting Tables'); $submsg = lang('At your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data') . '.'; - $subaction = 'uninstalled'; + $subaction = lang('uninstalled'); $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'drop'; $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6; break; case 'Upgrade': $subtitle = lang('Upgrading Tables'); $submsg = lang('At your request, this script is going to attempt to upgrade your old applications to the current versions').'.'; - $subaction = 'upgraded'; + $subaction = lang('upgraded'); $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion'; $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6; break; case 'Install': $subtitle = lang('Creating Tables'); $submsg = lang('At your request, this script is going to attempt to install the core tables and the admin and preferences applications for you').'.'; - $subaction = 'installed'; + $subaction = lang('installed'); $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'new'; $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6; break; } $setup_tpl->set_var('subtitle',@$subtitle); $setup_tpl->set_var('submsg',@$submsg); - $setup_tpl->set_var('subaction',lang(@$subaction)); + $setup_tpl->set_var('subaction',@$subaction); // Old PHP if (phpversion() < '3.0.16') @@ -168,6 +168,7 @@ $setup_tpl->set_var('notcomplete',lang('not complete')); $setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly')); $setup_tpl->set_var('createdb',lang('Or we can attempt to create the database for you:')); + $setup_tpl->set_var('create_database',lang('Create database')); switch ($phpgw_domain[$GLOBALS['ConfigDomain']]['db_type']) { case 'mysql': @@ -421,7 +422,6 @@ // $GLOBALS['phpgw_info']['setup']['stage']['apps'] = $GLOBALS['phpgw_setup']->check_apps(); switch($GLOBALS['phpgw_info']['setup']['stage']['db']) { - case 1: case 10: $setup_tpl->set_var('apps_status_img',$completed); $setup_tpl->set_var('apps_status_alt',lang('completed')); diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index 736da12df2..e548c2af35 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -1,74 +1,110 @@ (account deletion in sql only) setup de (Benutzerkontenlöschung NUR in SQL) -00 (disable) setup de 00 (abgeschaltet) +00 (disable) setup de 00 (abgeschaltet / empfohlen) 13 (ntp) setup de 13 (ntp) 80 (http) setup de 80 (http) -
import has been completed! click here to return to setup
setup de
Import ist beendet! Hier clicken um zum Setup zurück zu kommen
actions setup de Aktionen +add a domain setup de Eine Domain zufügen add auto-created users to this group ('default' will be attempted if this is empty.) setup de Automatisch erzeugte Benutzer zu dieser Grupper zufügen ('Default' wird versucht wenn nichts angegeben.) +additional settings setup de Zusätzliche Einstellungen admin first name setup de Admin Vorname admin last name setup de Admin Nachname admin password setup de Admin Passwort +admin password to header manager setup de Admin Passwort für header Manager admin username setup de Admin Username admins setup de Administratoren +after retrieving the file, put it into place as the header.inc.php. then, click "continue". setup de Datei nach dem Herunterladen, als header.inc.php speichern. Danach auf "weiter" klicken. all applications setup de Alle Applikationen +all core tables and the admin and preferences applications setup de all Kern-Tabellen und die Anwendungen Admin und Einstellungen all users setup de Alle Benutzer -app details setup de App Details +analysis setup de Analyse +app details setup de Applikations-Details app install/remove/upgrade setup de Applikation installierenn/entfernen/aktualisieren +app process setup de Applikation bearbeiten application data setup de Applikations Daten +application list setup de Liste der Applikationen application management setup de Applikation Management application name and status setup de Applikation Name und Status application name and status information setup de Applikation Name und Status Information application title setup de Applikation Titel +are you sure you want to delete your existing tables and data? setup de Sind sie sicher, dass sie ihrer bestehenden Tabellen und Daten löschen wollen? are you sure? setup de SIND SIE SICHER? at your request, this script is going to attempt to create the database and assign the db user rights to it setup de Auf Ihre Anforderung hin wird dieses Script nun versuchen, die Datendank zu erstellen und die Benutzerrechte zuzuordnen at your request, this script is going to attempt to install all the applications for you setup de Auf Ihre Anforderung hin wird dieses Script nun versuchen, alle Applikationen für Sie zu installieren -at your request, this script is going to attempt to upgrade your old applications to the current versions setup de Auf Ihre Anforderung wird dieses Script versuchen, Ihre Applikationen auf die gegenwärtige Version zu aktualisieren +at your request, this script is going to attempt to install the core tables and the admin and preferences applications for you setup de Auf ihre Anforderung wird diese Skript nun versuchen die Kern-Tabellen und die Applikationen Admin und Einstellungen für sie installieren. +at your request, this script is going to attempt to upgrade your old applications to the current versions setup de Auf Ihre Anforderung wird dieses Script versuchen, Ihre Applikationen auf die gegenwärtige Version zu aktualisieren at your request, this script is going to attempt to upgrade your old tables to the new format setup de Auf Ihre Anforderung wird dieses Script versuchen, Ihre Tabellen auf das neue Format zu aktualisieren -at your request, this script is going to take the evil action of deleting your existing tables and re-creating them in the new format setup de auf Ihre Anforderung wird dieses Script die üble Aktion auf sich nehmen, Ihre existierenden Tabellen zu löschen und sie im neuen Format wieder herzustellen ! -at your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data setup de Auf Ihre Anforderung wird dieses Script die üble Aktion auf sich nehmen, alle Ihre Applikationen zu deinstallieren, was ebenfalls Ihre existierenden Tabellen und Daten löschen wird ! +at your request, this script is going to take the evil action of deleting your existing tables and re-creating them in the new format setup de auf Ihre Anforderung wird dieses Script die üble Aktion auf sich nehmen, Ihre existierenden Tabellen zu löschen und sie im neuen Format wieder herzustellen ! +at your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data setup de Auf Ihre Anforderung wird dieses Script die üble Aktion auf sich nehmen, alle Ihre Applikationen zu deinstallieren, was ebenfalls Ihre existierenden Tabellen und Daten löschen wird ! attempt to use correct mimetype for ftp instead of default 'application/octet-stream' setup de Soll versucht werden den korrekten MIME-typ für FTP zu verwenden statt dem Vorgabewert 'application/octet-stream' authentication / accounts setup de Authentifizierung / Benutzerkonten auto create account records for authenticated users setup de Benutzerkonten für authentifiziere Benutzer automatisch anlegen auto-created user accounts expire setup de Automatisch angelegte Benutzerkonten laufen ab am -available version setup de Verfügbare Version +available version setup de Verfügbare Version backupwarn setup de Aber wir raten Ihnen dringend, eine Sicherungskopie anzulegen für den Fall, daß dieses Script Ihre bestehenden Daten beschädigt !
Diese automatisierten Scripts können leicht Ihre Daten beschädigen !.
or the table definition was incorrect setup de weil es manuelle Installation der Tabelle erfordert,
oder die Tabellen-definition war nicht korrekt because it was manually disabled setup de weil es manuell ausgeschaltet wurde because of a failed upgrade or install setup de weil eine Aktualisierung oder eine Installation fehlgeschlug because of a failed upgrade, or the database is newer than the installed version of this app setup de weil eine Aktualisierung fehlschlug, oder die Datenbank ist neuer als die installierte Version dieser Applikation -because the enable flag for this app is set to 0, or is undefined setup de weil der verfügbar-Eintrag für diese Applikation auf 0 gesetzt oder undefiniert ist +because the enable flag for this app is set to 0, or is undefined setup de weil der verfügbar-Eintrag für diese Applikation auf 0 gesetzt oder undefiniert ist bottom setup de unten cancel setup de Abbrechen +cannot create the header.inc.php due to file permission restrictions.
instead you can %1 the file. setup de Kann die Datei header.inc.php wegen unzureichenden Zugriffsrechten nicht erzeugen.
Stattdessen können sie die Datei %1. charset setup de ISO-8859-1 check ip address of all sessions setup de IP Adresse bei allen Sessions überprüfen +click here to return to setup. setup de Hier clicken um zum Setup zurück zu kommen. click here setup de Hier clicken +completed setup de Abgeschlossen configuration setup de Konfiguration configuration completed setup de Konfiguration abgeschlossen +configuration password setup de Konfigurationspasswort configure now setup de Jetzt konfigurieren +continue setup de Weiter +could not open header.inc.php for writing! setup de Konnte die Datei header.inc.php nicht zum schreiben öffen! country selection setup de Länderauswahl create setup de erstellen create database setup de Datenbank erzeugen +create demo accounts setup de Demo Benutzer anlegen create one now setup de Jetzt erstellen -creating tables setup de erstelle Tabellen -current version setup de Gegenwärtige Version -currently installed languages: %1
setup de Gegenwärtig installierte Sprachen: %1
+create your header.inc.php setup de Datei header.inc.php anlegen +created setup de erzeugt +creating tables setup de Erstelle Tabellen +current version setup de Gegenwärtige Version +currently installed languages: %1
setup de Gegenwärtig installierte Sprachen: %1
datetime port.
if using port 13, please set firewall rules appropriately before submitting this page.
(port: 13 / host: 129.6.15.28) setup de Port für Datum/Zeitabfragen
Wenn der Port 13 verwendet wird, bitte VOR dem Absenden die Firewallregeln dementsprechend setzen.
(Port 13/Host: 129.6.15.28) +db host setup de Datenbank Host +db name setup de Datenbank Name +db password setup de Datenbank Passwort db root password setup de Datenbank Root Passwort db root username setup de Datenbank Root Benutzername +db type setup de Datenbank Type +db user setup de Datenbank Benutzer default file system space per user/group ? setup de Vorgabewert Festplatenplatz pro Benutzer / Gruppe ? -delete all my tables and data setup de Alle meine Tabellen und Daten löschen -delete all old languages and install new ones setup de Alle installierten Sprachen löschen und neu installieren -deleting tables setup de lösche Tabellen +delete setup de Löschen +delete all my tables and data setup de Alle meine Tabellen und Daten löschen +delete all old languages and install new ones setup de Alle installierten Sprachen löschen und neu installieren +deleting tables setup de Lösche Tabellen demo server setup setup de Demo Server Setup deny access setup de Zugrif verweigern deny all users access to grant other users access to their entries ? setup de Alle Benutzern verbieten anderen Benutzern Zugriff auf ihre Daten zu gewähren ? +dependency failure setup de Abhängigkeit Fehler deregistered setup de nicht registriert details for admin account setup de Details des Admin Accounts +developers' table schema toy setup de Entwickler Tabellen Schema "Spielzeug" +did not find any valid db support! setup de Konnte keine gültige Datenbankunterstützung finden! +do you want persistent connections (higher performance, but consumes more resources) setup de Wollen sie eine permannente Datenbankverbindung (höher Performance, braucht aber mehr Resourcen) +do you want to manage homedirectory and loginshell attributes? setup de Wollen sie Benutzerverzeichnisse und Login-Shell Attribute verwalten? domain setup de Domain +domain select box on login setup de Domain Auswahlbox beim Einlogen dont touch my data setup de Meine Daten nicht verändern -edit current configuration setup de Gegenwärtige Konfiguration überarbeiten +download setup de Herunterladen +edit current configuration setup de Gegenwärtige Konfiguration überarbeiten +edit your existing header.inc.php setup de Bearbeiten ihrer existierenden header.inc.php +edit your header.inc.php setup de Bearbeiten ihrer header.inc.php +enable for extra debug-messages setup de ankreutzen für zusätzliche Diagnosemeldungen +enable mcrypt setup de MCrypt einschalten enter some random text for app session encryption setup de Zufallstext zur Verschlüssellung der app session enter some random text for app_session
encryption (requires mcrypt) setup de Zufallstext zur Verschlüssellung der app session
(benötigt mcrypt) enter the full path for temporary files.
examples: /tmp, c:\temp setup de Vollständiger Pfad für temporäre Dateien.
Beispiel: /tmp, C:\TEMP @@ -81,30 +117,45 @@ enter the title for your site setup de Titel der phpGroupWare Installation enter your default ftp server setup de Default FTP Server enter your http proxy server setup de HTTP Proxy Server enter your http proxy server port setup de HTTP Proxy Server Port +export has been completed! you will need to set the user passwords manually. setup de Export ist abgeschlossen! Sie müssen die Benutzerpasswörter manuell setzen. export phpgroupware accounts from sql to ldap setup de phpGroupWare Benutzerkonten von SQL nach LDAP exportieren export sql users to ldap setup de SQL-Benutzer in LDAP exportieren -for a new install, select import. to convert existing sql accounts to ldap, select export setup de Für eine Neuinstallation, wählen sie importieren. Um existierende SQL-Accounts zu LDAP zu konvertieren, wählen Sie exportieren. +file setup de DATEI +file type, size, version, etc. setup de Datei Typ, Größe, Version, usw. +for a new install, select import. to convert existing sql accounts to ldap, select export setup de Für eine Neuinstallation, wählen sie importieren. Um existierende SQL-Accounts zu LDAP zu konvertieren, wählen Sie exportieren. force selectbox setup de Auswahl erzwingen -go back setup de Zurück gehen +found existing configuration file. loading settings from the file... setup de Existierende Konfigurationdate gefunden. Lade Einstellungen von der Datei ... +go back setup de Zurück gehen go to setup de Gehen zu grant access setup de Zugriff gewähren has a version mismatch setup de hat eine falsche Versionsanpassung hooks deregistered setup de Haken nicht mehr aktiv hooks registered setup de Haken registriert host information setup de Host Informationen +hostname/ip of database server setup de Hostname/IP des Datenbank Servers however, the application is otherwise installed setup de Wie auch immer, die Applikation ist ansonsten installiert +however, the application may still work setup de Wie auch immer, die Applikation mag denoch arbeiten if no acl records for user or any group the user is a member of setup de Wenn es keinen ACL Eintrag für einen Benutzer oder oder eine Gruppe der er angehört gibt -if the application has no defined tables, selecting upgrade should remedy the problem setup de Wenn die Applikation keine definierten Tabellen hat, wählen Sie überarbeiten. Das Problem sollte damit behoben werden. +if the application has no defined tables, selecting upgrade should remedy the problem setup de Wenn die Applikation keine definierten Tabellen hat, wählen Sie überarbeiten. Das Problem sollte damit behoben werden. +if using ldap setup de Wenn sie LDAP verwenden if using ldap, do you want to manage homedirectory and loginshell attributes? setup de Wenn sie LDAP verwenden, wollen Sie Benutzerverzeichnisse und Komandointerpreter verwalten ? if you did not receive any errors, your applications have been setup de Wenn Sie keine Fehlermeldungen erhalten, wurden Ihre Applikationen if you did not receive any errors, your tables have been setup de Wenn sie keine Fehlermeldungen erhalten, wurden Ihre Tabellen +if you running this the first time, don't forget to manualy %1 !!! setup de Wenn sie das zum ersten mal ausführen, vergessen sie nicht manuell die %1 !!! +image type selection order setup de Auswahlreihenfolge der Bilddateitypen import accounts from ldap to the phpgroupware accounts table (for a new install using sql accounts) setup de Benutzerkonton von LDAP in die phpGroupWare Kontentabelle importieren (für eine neue Installation mit SQL Konten) +import has been completed! setup de Import ist beendet! import ldap users/groups setup de LDAP Benutzer/Gruppen importieren +importing old settings into the new format.... setup de Importiere alte Einstellung in das neue Format ... +include root (this should be the same as server root unless you know what you are doing) setup de Include Root (sollte das gleiche Verzeichniss wie die Server Root sein, ausser sie wissen was sie tun) insanity setup de Irrsinn install setup de Installieren +install all setup de Alle Installieren install applications setup de Applikationen installieren install language setup de Sprachen installieren installed setup de installiert +invalid ip address setup de Ungültige IP Adresse +invalid password setup de Ungültiges Passwort is broken setup de ist kaputt is disabled setup de ist nicht aktiv ldap account import/export setup de LDAP Benutzerkonten importieren/exportieren @@ -114,130 +165,209 @@ ldap config setup de LDAP Konfiguration ldap default homedirectory prefix (e.g. /home for /home/username) setup de LDAP Vorgabewert für Benutzerverzeichnisse (zB. /home für /home/username) ldap default shell (e.g. /bin/bash) setup de LDAP Vorgabewert für Komandointerpreter (shell) (zB. /bin/bash) ldap encryption type setup de LDAP Verschlüsselungstyp -ldap export users setup de LDAP-Benutzer exportieren +ldap export users setup de LDAP Benutzer exportieren ldap groups context setup de LDAP Kontext für Gruppe ldap host setup de LDAP Host -ldap import users setup de LDAP-Benutzer importieren +ldap import users setup de LDAP Benutzer importieren +ldap modify setup de LDAP Ändern ldap root password setup de LDAP Root Passwort ldap rootdn setup de LDAP rootdn -logout setup de Logout -makesure setup de Stellen Sie sicher, daß Ihre Datenbank erstellt und die Benutzerrechte gesetzt wurden +limit access to setup to the following addresses or networks (e.g. 10.1.1,127.0.0.1) setup de Zugang zu Setup auf die folgenden IP Adressen oder Netzwerke beschränken (z.B. 127.0.0.1,10.1.1) +logout setup de Abmelden +makesure setup de Stellen Sie sicher, dass Ihre Datenbank erstellt und die Benutzerrechte gesetzt wurden manage applications setup de Applikationen verwalten manage languages setup de Sprachen verwalten maximum account id (e.g. 65535 or 1000000) setup de Maximum für Benutzer Id (zB. 65535 oder 1000000) -mcrypt algorithm (default tripledes) setup de Mcrypt Algorithmus (Vorgabe TRIPLEDES) -mcrypt mode (default cbc) setup de Mcrpyt Modus (Vorgabe CBC) -mcrypt settings (requires mcrypt php extension) setup de Mcrypt Einstellungen (benötigt die mcrypt Erweiterung von PHP) +may be broken setup de kann kaput sein +mcrypt algorithm (default tripledes) setup de MCrypt Algorithmus (Vorgabe TRIPLEDES) +mcrypt initialization vector setup de MCrypt Initialisierungsvektor +mcrypt mode (default cbc) setup de MCrpyt Modus (Vorgabe CBC) +mcrypt settings (requires mcrypt php extension) setup de MCrypt Einstellungen (benötigt die mcrypt Erweiterung von PHP) +mcrypt version setup de MCrypt Version minimum account id (e.g. 500 or 100, etc.) setup de Minimum für Benutzer Id (zB. 500 oder 100) +modifications have been completed! setup de Änderung ist abgeschlossen! +modify setup de Ändern modify an existing ldap account store for use with phpgroupware (for a new install using ldap accounts) setup de Bestehende LDAP Benutzerkonten für die Benutzung durch phpGroupWare anpassen (für eine neue Installation mit LDAP Konten) -multi-language support setup setup de Mehr-Sprachen Unterstützung einrichten -mysqlinstr setup de Hinweise zum erstellen der Datenbank in MySQL:
Login zu mysql -
[user@server user]# mysql -u root -p
Erstellen Sie die leere Datenbank und bewilligen Sie Benutzer Erlaubnis -
mysql> create database phpgroupware;
mysql> +multi-language support setup setup de Mehr-Sprachen Unterstützung einrichten +mysqlinstr setup de Hinweise zum erstellen der Datenbank in MySQL:
Login zu mysql -
[user@server user]# mysql -u root -p
Erstellen Sie die leere Datenbank und bewilligen Sie Benutzer Erlaubnis -
mysql> create database phpgroupware;
mysql> grant all on phpgroupware.* to phpgroupware@localhost identified by 'password'; +name of database setup de Name der Datenbank +name of db user phpgroupware uses to connect setup de Name des Datenbank-Benutzers den phpGroupWare verwendet never setup de niemals +new setup de Neu no setup de Nein no algorithms available setup de Kein Algorithmus verfügbar +no microsoft sql server support found. disabling setup de Keine Unterstützung für Microsoft SQL Server gefunden. Abgeschaltet no modes available setup de kein Modus verfügbar +no mysql support found. disabling setup de Keine Unterstützung für MySQL gefunden. Abgeschaltet +no oracle-db support found. disabling setup de Keine Unterstützung für Oracle gefunden. Abgeschaltet +no postgres-db support found. disabling setup de Keine Unterstützung für Postgres gefunden. Abgeschaltet +no xml support found. disabling setup de Keine Unterstützung für XML gefunden. Abgeschaltet not complete setup de nicht komplett not completed setup de Nicht komplett -not ready for this stage yet setup de Noch nicht fertig für diesen Schritt -note: you will be able to customize this later setup de Notiz: Sie können dies später anpassen +not ready for this stage yet setup de Noch nicht fertig für diesen Schritt +note: you will be able to customize this later setup de Notiz: Sie können dies später anpassen +now guessing better values for defaults... setup de Nun wird versucht bessere Werte für die Vorgaben zu finden ... ok setup de OK once the database is setup correctly setup de Wenn die Datenbank einmal korrekt eingerichtet ist one month setup de ein Monat one week setup de eine Woche -only add languages that are not in the database already setup de Nur Sprachen hinzufügen, die noch nicht in der Datenbank sind -only add new phrases setup de Nur neue Begriffe hinzufügen -passwords did not match, please re-enter setup de Passworte stimmten nicht überein, bitte nocheinmal eingeben +only add languages that are not in the database already setup de Nur Sprachen hinzufügen, die noch nicht in der Datenbank sind +only add new phrases setup de Nur neue Begriffe hinzufügen +or setup de oder +or http://webdav.domain.com (webdav) setup de oder http://webdav.domain.com (für WebDAV) +or we can attempt to create the database for you: setup de Oder wir können versuchen die Datenbank für sie anzulegen: +password needed for configuration setup de Passwork wird für die Konfiguration benötigt +password of db user setup de Passwort des Datenbank Benutzers +passwords did not match, please re-enter setup de Passworte stimmten nicht überein, bitte nocheinmal eingeben path information setup de Pfadinformationen +path to user and group files has to be outside of the webservers document-root!!! setup de Pfad zu Benutzer und Gruppen Dateien MUSS AUSSERHALB des Wurzelverzeichnisses (Document-root) des Webservers sein!!! +persistent connections setup de Permanennte Verbindungen pgsqlinstr setup de Hinweise zum erstellen der Datenbank in PostgreSQL:
Starten des postmaster
[user@server user]# postmaster -i -D /home/[username]/[dataDir]
Erstellen Sie die leere Datenbank -
[user@server user]# createdb phpgroupware +phpgroupware administration manual setup de phpGroupWare Adminsitrationsmanual (nur in englisch) please check for sql scripts within the application's directory setup de Bitte schauen Sie nach sql-Scripten im Applikations-Ordner -please configure phpgroupware for your environment setup de Bitte konfigurieren Sie phpGroupWare für Ihre Umgebung +please check read/write permissions on directories, or back up and use another option. setup de Bitte überprüfen sie die lese/schreib Rechte der Verzeichnisse oder gehen sie zurück und benutzen eine andere Option. +please configure phpgroupware for your environment setup de Bitte konfigurieren Sie phpGroupWare für Ihre Umgebung +please consult the %1. setup de Bitte konsultieren sie das %1. please install setup de Bitte installieren -please wait... setup de Please Wait... +please login setup de Bitte einlogen please login to phpgroupware and run the admin application for additional site configuration setup de Bitte in phpGroupWare einloggen und die Administration für weitere Konfigurationen aufrufen. -possible solutions setup de Mögliche Lösungen +please wait... setup de Please Wait... +possible reasons setup de Mögliche Gründe +possible solutions setup de Mögliche Lösungen +post-install dependency failure setup de Abhängigkeitsfehler nach der Installation potential problem setup de Potentielles Problem preferences setup de Einstellungen -problem resolution setup de Problem Lösung +problem resolution setup de Problem Lösung process setup de Prozess re-check my database setup de Datenbank erneut überprofen re-check my installation setup de Installation erneut überprüfen re-enter password setup de Passworteingabe wiederholen +read translations from setup de Lese Übersetzungen von really uninstall all applications setup de WIRKLICH alle Anwendungen deinstallieren +recommended: filesystem setup de Empfohlen: Dateisystem registered setup de registriert remove setup de Entfernen +remove all setup de Alle Entfernen requires reinstall or manual repair setup de Erfordert Neuinstallation oder manuelle Reparatur requires upgrade setup de Erfordert Aktualisierung -resolve setup de Lösen -select an app, enter a target version, then submit to process to that version.
if you do not enter a version, only the baseline tables will be installed for the app.
this will drop all of the apps' tables first! setup de Wählen Sie eine Applikation, geben Sie eine Zielversion ein, dann bestätigen Sie den Vorgang.
Wenn Sie keine Version angeben, werden nur die Basis-Tabellen der Applikation installiert werden.
DIES WIRD ZUERST ALLE TABELLEN DER APPLI -select the default applications to which your users will have access setup de Wählen Sie die voreingestellten Applikationen, zu denen Ihre Benutzer Zugriff haben werden -select the desired action(s) from the available choices setup de Wählen Sie die verlangten Aktion(en) aus der verfügbaren Auswahl +resolve setup de Lösen +sample configuration not found. using built in defaults setup de Beispiel Konfiguration nicht gefunden, benutze eingebaute Voreinstellungen +save setup de Speichern +save this text as contents of your header.inc.php setup de Sichern sie diesen Text als Datei header.inc.php +select an app, enter a target version, then submit to process to that version.
if you do not enter a version, only the baseline tables will be installed for the app.
this will drop all of the apps' tables first! setup de Wählen Sie eine Applikation, geben Sie eine Zielversion ein, dann bestätigen Sie den Vorgang.
Wenn Sie keine Version angeben, werden nur die Basis-Tabellen der Applikation installiert werden.
DIES WIRD ZUERST ALLE TABELLEN DER APPLI +select the default applications to which your users will have access setup de Wählen Sie die voreingestellten Applikationen, zu denen Ihre Benutzer Zugriff haben werden +select the desired action(s) from the available choices setup de Wählen Sie die verlangten Aktion(en) aus der verfügbaren Auswahl select to download file setup de Auswähle um die Datei herunterzuladen -select where you want to store/retrieve filesystem information setup de Wo wollen Sie Datei Informationen ablegen / lesen -select where you want to store/retrieve user accounts setup de Wo wollen Sie die Benutzerkonten speichern -select which group(s) will be exported (group membership will be maintained) setup de Wählen Sie die zu exportierende(n) Gruppe(n) (Gruppenmitgliedschaft wird erhalten) -select which group(s) will be imported (group membership will be maintained) setup de Wählen Sie die zu importierende(n) Gruppe(n) (Gruppenmitgliedschaft wird erhalten) -select which languages you would like to use setup de Wählen Sie die Sprachen, die Sie benutzen möchten -select which method of upgrade you would like to do setup de Wählen Sie die Methode der Aktualisierung, die Sie durchführen möchten +select where you want to store/retrieve file contents setup de Wählen sie aus wo sie Dateiinhalte speichern/lesen wollen +select where you want to store/retrieve filesystem information setup de Wo wollen sie Datei Informationen ablegen / lesen +select where you want to store/retrieve user accounts setup de Wo wollen sie die Benutzerkonten speichern +select which group(s) will be exported (group membership will be maintained) setup de Wählen sie die zu exportierende(n) Gruppe(n) (Gruppenmitgliedschaft wird erhalten) +select which group(s) will be imported (group membership will be maintained) setup de Wählen sie die zu importierende(n) Gruppe(n) (Gruppenmitgliedschaft wird erhalten) +select which group(s) will be modified (group membership will be maintained) setup de Wählen sie welche Gruppe(n) verändert werden sollen (Gruppenmitgliedschaft wird erhalten) +select which languages you would like to use setup de Wählen Sie die Sprachen, die Sie benutzen möchten +select which method of upgrade you would like to do setup de Wählen Sie die Methode der Aktualisierung, die Sie durchführen möchten select which type of authentication you are using setup de Welche Art der Authentifizierung wollen Sie benutzen -select which user(s) will be exported setup de Wählen Sie den/die zu exportierenden Benutzer -select which user(s) will be imported setup de Wählen Sie den/die zu importierenden Benutzer -select which user(s) will have admin privileges setup de Wählen Sie den/die Benutzer, der/die Administrationsrechte hat/haben -select your old version setup de Wählen Sie Ihre alte Version +select which user(s) will also have admin privileges setup de Wählen sie welche Benutzer Administrationsrechte erhalten sollen +select which user(s) will be exported setup de Wählen Sie den/die zu exportierenden Benutzer +select which user(s) will be imported setup de Wählen Sie den/die zu importierenden Benutzer +select which user(s) will be modified setup de Wählen sie den/die zu verändernden Benutzer +select which user(s) will have admin privileges setup de Wählen Sie den/die Benutzer, der/die Administrationsrechte haben soll(en) +select your old version setup de Wählen Sie Ihre alte Version selectbox setup de Auswahlfeld +server root setup de Server Root +sessions type setup de Session Typ +set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. setup de Setzen sie dies auf "alt" für Versionen < 2.4, ansonsten auf die exakte MCrypt Version die sie benutzen. +settings setup de Einstellungen setup setup de Einrichtung setup demo accounts in ldap setup de Demo-Benutzer in LDAP einrichten +setup the database setup de Datenbank einzurichten show 'powered by' logo on setup de Zeige 'powered by' Logo some or all of its tables are missing setup de Einige oder alle Tabellen fehlen status setup de Status step 1 - simple application management setup de Schritt 1 - Einfache Applikations Verwaltung step 2 - configuration setup de Schritt 2 - Konfiguration step 3 - language management setup de Schritt 3 - Sprach Verwaltung -step 4 - advanced application management setup de Step 4 - Erweiterte Applikations Verwaltung -submit setup de ermöglichen -table change messages setup de Tabellen Änderungs Meldungen -tables dropped setup de Tabellen wurden gelöscht +step 4 - advanced application management setup de Schritt 4 - Erweiterte Applikations Verwaltung +table change messages setup de Tabellen Änderungs Meldungen +tables dropped setup de Tabellen wurden gelöscht tables installed, unless there are errors printed above setup de Tabellen wurden installiert, auß oben sind Fehlermelungen zu sehen tables upgraded setup de Tabellen wurden aktualisiert target version setup de Ziel Version text entry setup de Texteingabe +the db_type in defaults (%1) is not supported on this server. using first supported type. setup de Der Datenbanktyp in den Vorgaben (%1) wird von diesem Server nicht unterstützt, verwende ersten unterstützten Typ. +the file setup de der Datei the table definition was correct, and the tables were installed setup de Die Tabellen Definition war korrekt und die Tabellen wurden installiert the tables setup de die Tabellen there was a problem tring to connect to your ldap server.
please check your ldap server configuration setup de Es gab ein Problem bei dem Versuch, eine Verbindung mit Ihrem LDAP Server aufzubauen.
Bitte überprüfen Sie die Konfiguration Ihres LDAP Servers. -this program will help you upgrade or install different languages for phpgroupware setup de Dieses Programm wird Ihnen bei der Aktualisierung oder Installation verschiedender Sprachen für phpGroupWare behilflich sein +there was a problem trying to connect to your ldap server.
setup de Es gab ein Problem eine Verbindung zu ihrem LDAP Server herzustellen.
+there was a problem trying to connect to your ldap server.
please check your ldap server configuration setup de Es gab ein Problem eine Verbindung zu ihrem LDAP Server herzustellen.
Bitte überprüfen sie die Konfiguration ihres LDAP servers. +this has to be outside the webservers document-root!!! setup de Muss ausserhalb der document-root des Webservers sein!!! +this program will help you upgrade or install different languages for phpgroupware setup de Dieses Programm wird Ihnen bei der Aktualisierung oder Installation verschiedender Sprachen für phpGroupWare behilflich sein this section will help you export users and groups from phpgroupware's account tables into your ldap tree setup de Dieser Abschnitt wird Ihnen beim exportieren von Benutzern/Gruppen aus phpGroupWare's Account Tabellen in Ihren LDAP Baum behilflich sein this section will help you import users and groups from your ldap tree into phpgroupware's account tables setup de Dieser Abschnitt wird Ihnen beim importieren von Benutzern/Gruppen aus Ihrem LDAP Baum in phpGroupWare's Account Tabellen behilflich sein +this section will help you setup your ldap accounts for use with phpgroupware setup de Dieser Abschnitt wird ihnen helfen ihrer LDAP Benutzer für phpGroupWare vorzubereiten. +this should be around 30 bytes in length.
note: the default has been randomly generated. setup de Das sollte ungefähr 30 Zeichen lang sein
Hinweis: Die Vorgabe wurde zufällig erzeugt. this stage is completed
setup de Dieser Schritt ist abgeschlossen
-this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest.
!!!this will delete all existing accounts!!!
setup de Dies wird 1 Admin- und 3 Demo Benutzerkonten erstellen
Die Benutzernamen/Passworte sind: demo/guest, demo2/guest and demo3/guest.
!!!DIES WIRD ALLE EXISTIERENDEN BENUTZERKONTEN LÖSCHEN!!!
-to setup 1 admin account and 3 demo accounts.
this will delete all existing accounts setup de zum einrichten von 1 Admin- und 3 Demo-Benutzerkonten.
Dies wird alle existierenden Benutzerkonten löschen! +this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest.
!!!this will delete all existing accounts!!!
setup de Dies wird 1 Admin- und 3 Demo Benutzerkonten erstellen
Die Benutzernamen/Passworte sind: demo/guest, demo2/guest and demo3/guest.
!!!DIES WIRD ALLE EXISTIERENDEN BENUTZERKONTEN LÖSCHEN!!!
+to a version it does not know about setup de auf eine Version von der nichts bekannt ist +to setup 1 admin account and 3 demo accounts.
this will delete all existing accounts setup de zum einrichten von 1 Admin- und 3 Demo-Benutzerkonten.
Dies wird alle existierenden Benutzerkonten löschen! top setup de oben translations added setup de Übersetzungen hinzugefügt translations removed setup de Übersetzungen entfernt -translations upgraded setup de Übersetuungen upgedated +translations upgraded setup de Übersetzungen aktualisiert +try to configure your php to support one of the above mentioned dbms, or install phpgroupware by hand. setup de Versuchen sie ihr php so zu konfigurieren, dass es eine der oben genannten Datenbanken unterstützt, oder installieren sie phpGroupWare von Hand. two weeks setup de zwei Wochen +uninstall setup de deinstaliert uninstall all applications setup de Alle Anwendungen deinstallieren uninstalled setup de nicht installiert upgrade setup de Aktualisieren +upgrade all setup de Alle Aktualiseren upgraded setup de Aktualisiert upgrading tables setup de aktualisiere Tabellen use cookies to pass sessionid setup de SitzungsId in einem Cookie speichern use pure html compliant code (not fully working yet) setup de Vollständig HTML kompatiblen Code verwenden (nicht vollständig implementiert) users choice setup de Benutzerauswahl -version mismatch setup de Falsche Versionsanpassung -we will automatically update your tables/records to %1 setup de Wir werden Ihre Tabellen/Einträge automatisch zu %1 aktualisieren +version mismatch setup de Versionen passen nicht zueinander +view setup de Anzeigen +warning! setup de Warnung! +we can proceed setup de Wir können fortfahren +we will automatically update your tables/records to %1 setup de Wir werden Ihre Tabellen/Einträge automatisch zu %1 aktualisieren +what type of sessions management do you want to use (php4 session management may perform better)? setup de Welches Session Management wollen sie verwenden (PHP4 Session Management hat eine bessere performance)? +which database type do you want to use with phpgroupware? setup de Welchen Datanbanktyp wollen sie mit phpGroupWare verwenden? would you like phpgroupware to cache the phpgw info array ? setup de Soll phpGroupWare das phpgw info Array cachen ? would you like phpgroupware to check for a new version
when admins login ? setup de Soll phpGroupWare nach neuen Versionen suchen,
wenn sich ein Administrator anmeldet ? would you like to show each application's upgrade status ? setup de Soll der Upgrade-Status aller Anwendungen angezeigt werden ? +write config setup de Konfiguration schreiben yes setup de Ja -you appear to be running a pre-beta version of phpgroupware.
these versions are no longer supported, and there is no upgrade path for them in setup.
you may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. setup de Es sieht so aus, als ob Sie eine vor-beta Version von phpGroupWare benutzen.
Diese Versionen werden nicht länger unterstützt, und es gibt keinen Aktualisierungs-Pfad für sie im Einrichtung-Programm.
Sie möchten vieleicht erst auf -you appear to be running an old version of php
it its recommend that you upgrade to a new version.
older version of php might not run phpgroupware correctly, if at all.

please upgrade to at least version 3.0.16 setup de Es sieht so aus als ob Sie eine alte PHP-Version benutzen
Es ist notwendig auf eine neue Version zu aktualisieren.
Ältere PHP-Versionen könnten phpGroupWare nicht korrekt laufen lassen, wenn überhaupt.

Biite aktualisieren Sie +you appear to be running a pre-beta version of phpgroupware.
these versions are no longer supported, and there is no upgrade path for them in setup.
you may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. setup de Es sieht so aus, als ob Sie eine vor-beta Version von phpGroupWare benutzen.
Diese Versionen werden nicht länger unterstützt, und es gibt keinen Aktualisierungs-Pfad für sie im Einrichtung-Programm.
Sie möchten vieleicht erst auf +you appear to be running an old version of php
it its recommend that you upgrade to a new version.
older version of php might not run phpgroupware correctly, if at all.

please upgrade to at least version 3.0.16 setup de Es sieht so aus als ob Sie eine alte PHP-Version benutzen
Es ist notwendig auf eine neue Version zu aktualisieren.
Ältere PHP-Versionen könnten phpGroupWare nicht korrekt laufen lassen, wenn überhaupt.

Biite aktualisieren Sie you appear to be running version %1 of phpgroupware setup de Es sieht so aus als benutzen Sie Version %1 von phpGroupWare -you are ready for this stage, but this stage is not yet written.
setup de Sie sind bereit für diesen Schritt, aber dieser Abschnitt wurde noch nicht geschrieben.
+you appear to be using php earlier than 4.1.0. phpgroupware now requires 4.1.0 or later setup de Sie scheinen php in einer Version vor 4.1.0 zu verwenden. phpGroupWare benötigt nun Version 4.1.0 oder höher. +you appear to be using php3. disabling php4 sessions support setup de Sie scheinen PHP3 zu verwenden. Schalte PHP4 Session Unterstützung ab. +you appear to be using php4. enabling php4 sessions support setup de Sie scheinen PHP4 zu verwenden. Schalte PHP4 Session Unterstützung ein. +you appear to have microsoft sql server support enabled setup de Sie scheinen Microsoft SQL Server Unterstützung zu haben. +you appear to have mysql support enabled setup de Sie scheinen MySQL Unterstützung zu haben. +you appear to have oracle support enabled setup de Sie scheinen Oracle Unterstützung zu haben. +you appear to have oracle v8 (oci) support enabled setup de Sie scheinen Oracle V8 (OCI) Unterstützung zu haben. +you appear to have postgres-db support enabled setup de Sie scheinen Postgres Unterstützung zu haben. +you appear to have xml support enabled setup de Sie scheinen XML Unterstützung zu haben. +you are ready for this stage, but this stage is not yet written.
setup de Sie sind bereit für diesen Schritt, aber dieser Abschnitt wurde noch nicht geschrieben.
+you didn't enter a config password for domain %1 setup de Sie haben kein Passwort für die Domain %1 angegeben +you didn't enter a header admin password setup de Sie haben kein Passwort für die header Verwaltung eingegeben you do not have any languages installed. please install one now
setup de sie installierten noch keine Sprache. bitte installieren Sie nun eine.
-you must enter a username for the admin setup de sie müssen einen Benutzernamen für den Admin eingeben ! +you have not created your header.inc.php yet!
you can create it now. setup de Sie haben bisher noch keine header.inc.php angelegt!
Sie können sie jetzt anlegen. +you have successfully logged out setup de Sie haben sich erfolgreich abgemeldet. +you must enter a username for the admin setup de sie müssen einen Benutzernamen für den Administrator eingeben ! you should either uninstall and then reinstall it, or attempt manual repairs setup de Sie sollten entweder de- und neuinstallieren, oder manuelle Reparaturen versuchen +you're using an old configuration file format... setup de Sie verwenden ein altes Format der Konfigurationdatei ... +you're using an old header.inc.php version... setup de Sie verwenden eine alte header.inc.php Version ... your applications are current setup de Ihre Applikationen sind aktuell your database does not exist setup de Ihre Datenbank existiert nicht ! +your database is not working! setup de Ihre Datenbank funktioniert nicht! your database is working, but you dont have any applications installed setup de Ihre Datenbank arbeitet, aber Sie haben keine Applikationen installiert ! +your header admin password is not set. please set it now! setup de Ihr header admin Passwort wurde NICHT gesetzt. Bitte setzen sie es jetzt! +your header.inc.php needs upgrading. setup de Ihre header.inc.php muss aktualisiert werden. +your header.inc.php needs upgrading.
warning!
make backups! setup de Ihre header.inc.php muss aktualisiert werden.
WARNUNG!
MACHEN SIE EINE SICHERUNG! your tables are current setup de Ihre Tabellen sind aktuell -your tables may be altered and you may lose data setup de Ihre Tabellen könnten verändert werden, und Sie könnten Daten verlieren ! -your tables will be dropped and you will lose data setup de Ihre Tabellen werden gelöscht werden, und Sie werden Daten verlieren ! +your tables may be altered and you may lose data setup de Ihre Tabellen könnten verändert werden, und Sie könnten Daten verlieren ! +your tables will be dropped and you will lose data setup de Ihre Tabellen werden gelöscht werden, und Sie werden Daten verlieren ! diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index a9852a0f60..6fee46e839 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -1,14 +1,11 @@ -(account deletion in SQL Only) setup en (account deletion in SQL Only) -00 (disable) setup en 00 (disable) +(account deletion in sql only) setup en (account deletion in SQL Only) +00 (disable) setup en 00 (disable / recomended) 13 (ntp) setup en 13 (ntp) 80 (http) setup en 80 (http) -
click here to return to setup
setup en
Click here to return to setup
-
export has been completed! you will need to set the user passwords manually.
setup en
Export has been completed! You will need to set the user passwords manually.
-
Import has been completed! Click here to return to setup
setup en
Import has been completed! Click here to return to setup
-
modifications have been completed! click here to return to setup
setup en
Modifications have been completed! Click here to return to setup
actions setup en Actions add a domain setup en Add a domain -add auto-created users to this group ('Default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.) +add auto-created users to this group ('default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.) +additional settings setup en Additional settings admin first name setup en Admin first name admin last name setup en Admin last name admin password setup en Admin password @@ -36,8 +33,8 @@ at your request, this script is going to attempt to upgrade your old application at your request, this script is going to attempt to upgrade your old tables to the new format setup en At your request, this script is going to attempt to upgrade your old tables to the new format at your request, this script is going to take the evil action of deleting your existing tables and re-creating them in the new format setup en At your request, this script is going to take the evil action of deleting your existing tables and re-creating them in the new format at your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data setup en At your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data -attempt to use correct mimetype for FTP instead of default 'application/octet-stream' setup en Attempt to use correct mimetype for FTP instead of default 'application/octet-stream' -authentication / Accounts setup en Authentication / Accounts +attempt to use correct mimetype for ftp instead of default 'application/octet-stream' setup en Attempt to use correct mimetype for FTP instead of default 'application/octet-stream' +authentication / accounts setup en Authentication / Accounts auto create account records for authenticated users setup en Auto create account records for authenticated users auto-created user accounts expire setup en Auto-created user accounts expire available version setup en Available Version @@ -55,23 +52,26 @@ cancel setup en Cancel cannot create the header.inc.php due to file permission restrictions.
instead you can %1 the file. setup en Cannot create the header.inc.php due to file permission restrictions.
Instead you can %1 the file. charset setup en ISO-8859-1 check ip address of all sessions setup en check ip address of all sessions +click here to return to setup. setup en Click here to return to setup. click here setup en Click Here completed setup en Completed configuration setup en Configuration configuration completed setup en Configuration completed configuration password setup en Configuration Password configure now setup en Configure Now +continue setup en Continue could not open header.inc.php for writing! setup en Could not open header.inc.php for writing! -country Selection setup en Country Selection +country selection setup en Country Selection create setup en Create create database setup en Create Database create demo accounts setup en Create demo accounts create one now setup en Create one now create your header.inc.php setup en Create your header.inc.php +created setup en created creating tables setup en Creating Tables current version setup en Current Version currently installed languages: %1
setup en Currently installed languages: %1
-datetime port.
If using port 13, please set firewall rules appropriately before submitting this page.
(Port: 13 / Host: 129.6.15.28) setup en Datetime port.
If using port 13, please set firewall rules appropriately before submitting this page.
(Port: 13 / Host: 129.6.15.28) +datetime port.
if using port 13, please set firewall rules appropriately before submitting this page.
(port: 13 / host: 129.6.15.28) setup en Datetime port.
If using port 13, please set firewall rules appropriately before submitting this page.
(Port: 13 / Host: 129.6.15.28) db host setup en DB Host db name setup en DB Name db password setup en DB Password @@ -93,28 +93,33 @@ details for admin account setup en Details for Admin account developers' table schema toy setup en Developers' Table Schema Toy did not find any valid db support! setup en Did not find any valid DB support! do you want persistent connections (higher performance, but consumes more resources) setup en Do you want persistent connections (higher performance, but consumes more resources) +do you want to manage homedirectory and loginshell attributes? setup en Do you want to manage homedirectory and loginshell attributes? domain setup en Domain domain select box on login setup en Domain select box on login dont touch my data setup en Dont touch my data +download setup en Download edit current configuration setup en Edit Current Configuration edit your existing header.inc.php setup en Edit your existing header.inc.php edit your header.inc.php setup en Edit your header.inc.php +enable for extra debug-messages setup en enable for extra debug-messages enable mcrypt setup en Enable MCrypt enter some random text for app session encryption setup en Enter some random text for app session encryption enter some random text for app_session
encryption (requires mcrypt) setup en Enter some random text for app_session
encryption (requires mcrypt) -enter the full path for temporary files.
Examples: /tmp, C:\TEMP setup en Enter the full path for temporary files.
Examples: /tmp, C:\TEMP -enter the full path for users and group files.
Examples: /files, E:\FILES setup en Enter the full path for users and group files.
Examples: /files, E:\FILES +enter the full path for temporary files.
examples: /tmp, c:\temp setup en Enter the full path for temporary files.
Examples: /tmp, C:\TEMP +enter the full path for users and group files.
examples: /files, e:\files setup en Enter the full path for users and group files.
Examples: /files, E:\FILES enter the hostname of the machine on which this server is running setup en Enter the hostname of the machine on which this server is running -enter the location of phpGroupWare's URL.
Example: http://www.domain.com/phpgroupware   or   /phpgroupware
No trailing slash setup en Enter the location of phpGroupWare's URL.
Example: http://www.domain.com/phpgroupware   or   /phpgroupware
No trailing slash +enter the location of phpgroupware's url.
example: http://www.domain.com/phpgroupware   or   /phpgroupware
no trailing slash setup en Enter the location of phpGroupWare's URL.
Example: http://www.domain.com/phpgroupware   or   /phpgroupware
No trailing slash enter the site password for peer servers setup en Enter the site password for peer servers enter the site username for peer servers setup en Enter the site username for peer servers enter the title for your site setup en Enter the title for your site -enter your default FTP server setup en Enter your default FTP server -enter your HTTP proxy server setup en Enter your HTTP proxy server -enter your HTTP proxy server port setup en Enter your HTTP proxy server port +enter your default ftp server setup en Enter your default FTP server +enter your http proxy server setup en Enter your HTTP proxy server +enter your http proxy server port setup en Enter your HTTP proxy server port +export has been completed! you will need to set the user passwords manually. setup en Export has been completed! You will need to set the user passwords manually. export phpgroupware accounts from sql to ldap setup en Export phpGroupWare accounts from SQL to LDAP export sql users to ldap setup en Export SQL users to LDAP file setup en FILE +file type, size, version, etc. setup en file type, size, version, etc. for a new install, select import. to convert existing sql accounts to ldap, select export setup en For a new install, select import. To convert existing SQL accounts to LDAP, select export force selectbox setup en Force Selectbox found existing configuration file. loading settings from the file... setup en Found existing configuration file. Loading settings from the file... @@ -128,20 +133,23 @@ host information setup en Host information hostname/ip of database server setup en Hostname/IP of database server however, the application is otherwise installed setup en However, the application is otherwise installed however, the application may still work setup en However, the application may still work -if no ACL records for user or any group the user is a member of setup en If no ACL records for user or any group the user is a member of +if no acl records for user or any group the user is a member of setup en If no ACL records for user or any group the user is a member of if the application has no defined tables, selecting upgrade should remedy the problem setup en If the application has no defined tables, selecting upgrade should remedy the problem -if using LDAP, do you want to manage homedirectory and loginshell attributes? setup en If using LDAP, do you want to manage homedirectory and loginshell attributes? +if using ldap setup en If using LDAP +if using ldap, do you want to manage homedirectory and loginshell attributes? setup en If using LDAP, do you want to manage homedirectory and loginshell attributes? if you did not receive any errors, your applications have been setup en If you did not receive any errors, your applications have been if you did not receive any errors, your tables have been setup en If you did not receive any errors, your tables have been +if you running this the first time, don't forget to manualy %1 !!! setup en If you running this the first time, don't forget to manualy %1 !!! image type selection order setup en Image type selection order import accounts from ldap to the phpgroupware accounts table (for a new install using sql accounts) setup en Import accounts from LDAP to the phpGroupWare accounts table (for a new install using SQL accounts) +import has been completed! setup en Import has been completed! import ldap users/groups setup en Import LDAP users/groups importing old settings into the new format.... setup en Importing old settings into the new format.... include root (this should be the same as server root unless you know what you are doing) setup en Include Root (this should be the same as Server Root unless you know what you are doing) insanity setup en Insanity install setup en Install install all setup en Install All -install Applications setup en Install Applications +install applications setup en Install Applications install language setup en Install Language installed setup en installed invalid ip address setup en Invalid IP address @@ -152,8 +160,8 @@ ldap account import/export setup en LDAP account import/export ldap accounts configuration setup en LDAP Accounts Configuration ldap accounts context setup en LDAP accounts context ldap config setup en LDAP Config -ldap Default homedirectory prefix (e.g. /home for /home/username) setup en LDAP Default homedirectory prefix (e.g. /home for /home/username) -ldap Default shell (e.g. /bin/bash) setup en LDAP Default shell (e.g. /bin/bash) +ldap default homedirectory prefix (e.g. /home for /home/username) setup en LDAP Default homedirectory prefix (e.g. /home for /home/username) +ldap default shell (e.g. /bin/bash) setup en LDAP Default shell (e.g. /bin/bash) ldap encryption type setup en LDAP encryption type ldap export users setup en LDAP export users ldap groups context setup en LDAP groups context @@ -175,12 +183,13 @@ mcrypt mode (default cbc) setup en Mcrypt mode (default CBC) mcrypt settings (requires mcrypt php extension) setup en Mcrypt Settings (requires mcrypt PHP extension) mcrypt version setup en MCrypt version minimum account id (e.g. 500 or 100, etc.) setup en Minimum account id (e.g. 500 or 100, etc.) +modifications have been completed! setup en Modifications have been completed! modify setup en Modify modify an existing ldap account store for use with phpgroupware (for a new install using ldap accounts) setup en Modify an existing LDAP account store for use with phpGroupWare (for a new install using LDAP accounts) multi-language support setup setup en Multi-Language support setup -mysqlinstr setup en Instructions for creating the database in MySQL:
Login to mysql -
[user@server user]# mysql -u root -p
Create the empty database and grant user permissions -
mysql> create database phpgroupware;
mysql> grant all on phpgroupware.* to phpgroupware@localhost identified by 'password'; +mysqlinstr setup en Instructions for creating the database in MySQL:
Login to mysql -
[user@server user]# mysql -u root -p
Create the empty database and grant user permissions -
mysql> create database phpgroupware;
mysql> grant all on phpgroupware.* to phpgroupware@localhost identified by 'password'; name of database setup en Name of database -name of db user phpGroupWare uses to connect setup en Name of db user phpGroupWare uses to connect +name of db user phpgroupware uses to connect setup en Name of db user phpGroupWare uses to connect never setup en never new setup en New no setup en No @@ -203,16 +212,20 @@ one week setup en one week only add languages that are not in the database already setup en Only add languages that are not in the database already only add new phrases setup en Only add new phrases or setup en or +or http://webdav.domain.com (webdav) setup en or http://webdav.domain.com (WebDAV) or we can attempt to create the database for you: setup en Or we can attempt to create the database for you: password needed for configuration setup en Password needed for configuration password of db user setup en Password of db user passwords did not match, please re-enter setup en Passwords did not match, please re-enter path information setup en Path information +path to user and group files has to be outside of the webservers document-root!!! setup en Path to user and group files HAS TO BE OUTSIDE of the webservers document-root!!! persistent connections setup en Persistent connections pgsqlinstr setup en Instructions for creating the database in PostgreSQL:
Start the postmaster
[user@server user]# postmaster -i -D /home/[username]/[dataDir]
Create the empty database -
[user@server user]# createdb phpgroupware +phpgroupware administration manual setup en phpGroupWare Administration Manual please check for sql scripts within the application's directory setup en Please check for sql scripts within the application's directory please check read/write permissions on directories, or back up and use another option. setup en Please check read/write permissions on directories, or back up and use another option. -please configure phpGroupWare for your environment setup en Please configure phpGroupWare for your environment +please configure phpgroupware for your environment setup en Please configure phpGroupWare for your environment +please consult the %1. setup en Please consult the %1. please install setup en Please install please login setup en Please login please login to phpgroupware and run the admin application for additional site configuration setup en Please login to phpgroupware and run the admin application for additional site configuration @@ -229,6 +242,7 @@ re-check my installation setup en Re-Check My Installation re-enter password setup en Re-enter password read translations from setup en Read translations from really uninstall all applications setup en REALLY Uninstall all applications +recommended: filesystem setup en Recommended: Filesystem registered setup en registered remove setup en Remove remove all setup en Remove All @@ -236,11 +250,13 @@ requires reinstall or manual repair setup en Requires reinstall or manual repair requires upgrade setup en Requires upgrade resolve setup en Resolve sample configuration not found. using built in defaults setup en Sample configuration not found. using built in defaults +save setup en Save save this text as contents of your header.inc.php setup en Save this text as contents of your header.inc.php -select an app, enter a target version, then submit to process to that version.
If you do not enter a version, only the baseline tables will be installed for the app.
THIS WILL DROP ALL OF THE APPS' TABLES FIRST! setup en Select an app, enter a target version, then submit to process to that version.
If you do not enter a version, only the baseline tables will be installed for the app.
THIS WILL DROP ALL OF THE APPS' TABLES FIRST! +select an app, enter a target version, then submit to process to that version.
if you do not enter a version, only the baseline tables will be installed for the app.
this will drop all of the apps' tables first! setup en Select an app, enter a target version, then submit to process to that version.
If you do not enter a version, only the baseline tables will be installed for the app.
THIS WILL DROP ALL OF THE APPS' TABLES FIRST! select the default applications to which your users will have access setup en Select the default applications to which your users will have access select the desired action(s) from the available choices setup en Select the desired action(s) from the available choices select to download file setup en Select to download file +select where you want to store/retrieve file contents setup en Select where you want to store/retrieve file contents select where you want to store/retrieve filesystem information setup en Select where you want to store/retrieve filesystem information select where you want to store/retrieve user accounts setup en Select where you want to store/retrieve user accounts select which group(s) will be exported (group membership will be maintained) setup en Select which group(s) will be exported (group membership will be maintained) @@ -262,6 +278,7 @@ set this to "old" for versions < 2.4, otherwise the exact mcrypt version you settings setup en Settings setup setup en Setup setup demo accounts in ldap setup en Setup demo accounts in LDAP +setup the database setup en Setup the database show 'powered by' logo on setup en Show 'powered by' logo on some or all of its tables are missing setup en Some or all of its tables are missing status setup en Status @@ -269,24 +286,26 @@ step 1 - simple application management setup en Step 1 - Simple Application Mana step 2 - configuration setup en Step 2 - Configuration step 3 - language management setup en Step 3 - Language Management step 4 - advanced application management setup en Step 4 - Advanced Application Management -submit setup en Submit table change messages setup en Table Change Messages tables dropped setup en tables dropped tables installed, unless there are errors printed above setup en tables installed, unless there are errors printed above tables upgraded setup en tables upgraded target version setup en Target Version -text Entry setup en Text Entry +text entry setup en Text Entry the db_type in defaults (%1) is not supported on this server. using first supported type. setup en The db_type in defaults (%1) is not supported on this server. using first supported type. +the file setup en the file the table definition was correct, and the tables were installed setup en The table definition was correct, and the tables were installed the tables setup en the tables -there was a problem tring to connect to your ldap server.
please check your LDAP server configuration setup en There was a problem tring to connect to your LDAP server.
please check your LDAP server configuration -this program will help you upgrade or install different languages for phpGroupWare setup en This program will help you upgrade or install different languages for phpGroupWare -this section will help you export users and groups from phpgroupWare's account tables into your ldap tree setup en This section will help you export users and groups from phpGroupWare's account tables into your LDAP tree -this section will help you import users and groups from your ldap tree into phpGroupWare's account tables setup en This section will help you import users and groups from your LDAP tree into phpGroupWare's account tables +there was a problem trying to connect to your ldap server.
setup en There was a problem trying to connect to your LDAP server.
+there was a problem trying to connect to your ldap server.
please check your ldap server configuration setup en There was a problem trying to connect to your LDAP server.
please check your LDAP server configuration +this has to be outside the webservers document-root!!! setup en This has to be outside the webservers document-root!!! +this program will help you upgrade or install different languages for phpgroupware setup en This program will help you upgrade or install different languages for phpGroupWare +this section will help you export users and groups from phpgroupware's account tables into your ldap tree setup en This section will help you export users and groups from phpGroupWare's account tables into your LDAP tree +this section will help you import users and groups from your ldap tree into phpgroupware's account tables setup en This section will help you import users and groups from your LDAP tree into phpGroupWare's account tables this section will help you setup your ldap accounts for use with phpgroupware setup en This section will help you setup your LDAP accounts for use with phpGroupWare this should be around 30 bytes in length.
note: the default has been randomly generated. setup en This should be around 30 bytes in length.
Note: The default has been randomly generated. this stage is completed
setup en This stage is completed
-this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest.
!!!THIS WILL DELETE ALL EXISTING ACCOUNTS!!!
setup en This will create 1 admin account and 3 demo accounts
The username/passwords are: demo/guest, demo2/guest and demo3/guest.
!!!THIS WILL DELETE ALL EXISTING ACCOUNTS!!!
+this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest.
!!!this will delete all existing accounts!!!
setup en This will create 1 admin account and 3 demo accounts
The username/passwords are: demo/guest, demo2/guest and demo3/guest.
!!!THIS WILL DELETE ALL EXISTING ACCOUNTS!!!
to a version it does not know about setup en to a version it does not know about to setup 1 admin account and 3 demo accounts.
this will delete all existing accounts setup en to setup 1 admin account and 3 demo accounts.
This will delete all existing accounts top setup en top @@ -295,6 +314,7 @@ translations removed setup en Translations Removed translations upgraded setup en Translations Upgraded try to configure your php to support one of the above mentioned dbms, or install phpgroupware by hand. setup en Try to configure your php to support one of the above mentioned DBMS, or install phpGroupWare by hand. two weeks setup en two weeks +uninstall setup en uninstall uninstall all applications setup en Uninstall all applications uninstalled setup en uninstalled upgrade setup en Upgrade @@ -302,21 +322,24 @@ upgrade all setup en Upgrade All upgraded setup en upgraded upgrading tables setup en Upgrading Tables use cookies to pass sessionid setup en Use cookies to pass sessionid -use pure HTML compliant code (not fully working yet) setup en Use pure HTML compliant code (not fully working yet) -users Choice setup en Users Choice +use pure html compliant code (not fully working yet) setup en Use pure HTML compliant code (not fully working yet) +users choice setup en Users Choice version mismatch setup en Version Mismatch +view setup en View warning! setup en Warning! we can proceed setup en We can proceed we will automatically update your tables/records to %1 setup en We will automatically update your tables/records to %1 what type of sessions management do you want to use (php4 session management may perform better)? setup en What type of sessions management do you want to use (PHP4 session management may perform better)? which database type do you want to use with phpgroupware? setup en Which database type do you want to use with phpGroupWare? -would you like phpGroupWare to cache the phpgw info array ? setup en Would you like phpGroupWare to cache the phpgw info array ? -would you like phpGroupWare to check for a new version
when admins login ? setup en Would you like phpGroupWare to check for a new version
when admins login ? +would you like phpgroupware to cache the phpgw info array ? setup en Would you like phpGroupWare to cache the phpgw info array ? +would you like phpgroupware to check for a new version
when admins login ? setup en Would you like phpGroupWare to check for a new version
when admins login ? would you like to show each application's upgrade status ? setup en Would you like to show each application's upgrade status ? +write config setup en Write config yes setup en Yes -you appear to be running a pre-beta version of phpGroupWare.
These versions are no longer supported, and there is no upgrade path for them in setup.
You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. setup en You appear to be running a pre-beta version of phpGroupWare.
These versions are no longer supported, and there is no upgrade path for them in setup.
You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. -you appear to be running an old version of PHP
It its recommend that you upgrade to a new version.
Older version of PHP might not run phpGroupWare correctly, if at all.

Please upgrade to at least version 3.0.16 setup en You appear to be running an old version of PHP
It its recommend that you upgrade to a new version.
Older version of PHP might not run phpGroupWare correctly, if at all.

Please upgrade to at least version 3.0.16 -you appear to be running version %1 of phpGroupWare setup en You appear to be running version %1 of phpGroupWare +you appear to be running a pre-beta version of phpgroupware.
these versions are no longer supported, and there is no upgrade path for them in setup.
you may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. setup en You appear to be running a pre-beta version of phpGroupWare.
These versions are no longer supported, and there is no upgrade path for them in setup.
You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. +you appear to be running an old version of php
it its recommend that you upgrade to a new version.
older version of php might not run phpgroupware correctly, if at all.

please upgrade to at least version 3.0.16 setup en You appear to be running an old version of PHP
It its recommend that you upgrade to a new version.
Older version of PHP might not run phpGroupWare correctly, if at all.

Please upgrade to at least version 3.0.16 +you appear to be running version %1 of phpgroupware setup en You appear to be running version %1 of phpGroupWare +you appear to be using php earlier than 4.1.0. phpgroupware now requires 4.1.0 or later setup en You appear to be using PHP earlier than 4.1.0. phpGroupWare now requires 4.1.0 or later you appear to be using php3. disabling php4 sessions support setup en You appear to be using PHP3. Disabling PHP4 sessions support you appear to be using php4. enabling php4 sessions support setup en You appear to be using PHP4. Enabling PHP4 sessions support you appear to have microsoft sql server support enabled setup en You appear to have Microsoft SQL Server support enabled @@ -341,7 +364,7 @@ your database is not working! setup en Your Database is not working! your database is working, but you dont have any applications installed setup en Your database is working, but you dont have any applications installed your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now! your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading. -your header.inc.php needs upgrading.
warning!
make backups! setup en Your header.inc.php needs upgrading.
WARNING!
MAKE BACKUPS! +your header.inc.php needs upgrading.
warning!
make backups! setup en Your header.inc.php needs upgrading.
WARNING!
MAKE BACKUPS! your tables are current setup en Your tables are current your tables may be altered and you may lose data setup en Your tables may be altered and you may lose data. your tables will be dropped and you will lose data setup en Your tables will be dropped and you will lose data !! diff --git a/setup/lang/phpgw_fr.lang b/setup/lang/phpgw_fr.lang index be24e22dec..54adf28a9a 100644 --- a/setup/lang/phpgw_fr.lang +++ b/setup/lang/phpgw_fr.lang @@ -2,13 +2,10 @@ 00 (disable) setup fr 00 (désactiver) 13 (ntp) setup fr 13 (ntp) 80 (http) setup fr 80 (http) -
click here to return to setup
setup fr
Cliquez ici pour retourner au setup
-
export has been completed! you will need to set the user passwords manually.
setup fr
L'export a été complété! Vous allez devoir régler les mots de passe des utilisateurs manuellement.
-
import has been completed! click here to return to setup
setup fr
L'import a été complété! Cliquez ici pour retourner au setup
-
modifications have been completed! click here to return to setup
setup fr
Les modifications ont été complétées! Cliquez ici pour retourner au setup
actions setup fr Actions add a domain setup fr Ajouter un domaine add auto-created users to this group ('Default' will be attempted if this is empty.) setup fr Ajouter les utilisateurs auto-crées à ce groupe ('Default' sera tenté si ceci est vide.) +additional settings setup fr Réglages additionnels admin first name setup fr Prénom de l'admin admin last name setup fr Nom de l'admin admin password setup fr Mot de passe du compte admin @@ -55,12 +52,14 @@ cancel setup fr Abandon cannot create the header.inc.php due to file permission restrictions.
instead you can %1 the file. setup fr Ne peut pas créer le fichier header.inc.php à cause de restrictions sur les permissions sur le fichier.
A la place vous pouvez %1 le fichier. charset setup fr ISO-8859-1 check ip address of all sessions setup fr Vérifier l'adresse IP de toutes les sessions +click here to return to setup. setup fr Cliquez ici pour retourner au setup. click here setup fr Cliquez ici completed setup fr Complété configuration setup fr Configuration configuration completed setup fr Configuration complétée configuration password setup fr Mot de passe de configuration configure now setup fr Configurer maintenant +continue setup fr Continuer could not open header.inc.php for writing! setup fr N'a pas pu ouvrir le fichier header.inc.php puor y écrire! country selection setup fr Choix de pays create setup fr Créer @@ -68,6 +67,7 @@ create database setup fr Cr create demo accounts setup fr Créer les comptes de démo create one now setup fr Créer un exemplaire maintenant create your header.inc.php setup fr Créer votre fichier header.inc.php +created setup fr Crée creating tables setup fr Création de tables en cours current version setup fr Version actuelle currently installed languages: %1
setup fr Langues installées actuellement: %1
@@ -93,12 +93,15 @@ details for admin account setup fr D developers' table schema toy setup fr Jouet pour les schémas de table pour développeurs did not find any valid db support! setup fr N'a pas pu trouver de support de base de données valide! do you want persistent connections (higher performance, but consumes more resources) setup fr Voulez-vous des connexions persistantes (meilleure performance, mais consomme plus de ressources) +do you want to manage homedirectory and loginshell attributes? setup fr Voulez-vous gérer les attributs des répertoire maison (homedir) et shell de connexion? domain setup fr Domaine domain select box on login setup fr Boîte de sélection de domaine à la connexion dont touch my data setup fr Ne pas toucher à mes données +download setup fr Downloader edit current configuration setup fr Editer la configuration actuelle edit your existing header.inc.php setup fr Modifier votre fichier header.inc.php existant edit your header.inc.php setup fr Modifier votre fichier header.inc.php +enable for extra debug-messages setup fr Activer pour les messages de déboguage supplémentaires enable mcrypt setup fr Activer MCrypt enter some random text for app session encryption setup fr Entrez du texte au hasard pour le cryptage des sessions applicatives enter some random text for app_session
encryption (requires mcrypt) setup fr Entrez du texte au hasard pour le
cryptage app_session (nécessite mcrypt) @@ -112,9 +115,11 @@ enter the title for your site setup fr Entrez le titre pour votre site enter your default FTP server setup fr Entrez votre serveur FTP par défaut enter your HTTP proxy server setup fr Entrez votre serveur proxy HTTP enter your HTTP proxy server port setup fr Entrez le port de votre serveur proxy HTTP +export has been completed! you will need to set the user passwords manually. setup fr L'export a été complété! Vous allez devoir régler les mots de passe des utilisateurs manuellement. export phpgroupware accounts from sql to ldap setup fr Exporter les comptes phpGroupWare de SQL vers LDAP export sql users to ldap setup fr Exporter les utilisateurs SQL vers LDAP file setup fr Fichier +file type, size, version, etc. setup fr Type de fichier, taille, version, etc. for a new install, select import. to convert existing sql accounts to ldap, select export setup fr Pour une nouvelle install, choisir importer. Pour convertir les comptes SQL existants vers LDAP, choisir exporter force selectbox setup fr Forcer la boîte de sélection found existing configuration file. loading settings from the file... setup fr J'ai trouvé un fichier de configuration existant. Je charge les réglages depuis ce fichier... @@ -130,11 +135,14 @@ however, the application is otherwise installed setup fr De toutes fa however, the application may still work setup fr Malgré tout, l'application peut encore fonctionner if no ACL records for user or any group the user is a member of setup fr Si aucun enregistrement d'ACL pour un utilisateur ou groupe l'utilisateur est un membre de if the application has no defined tables, selecting upgrade should remedy the problem setup fr Si l'application n'a pas défini de tables, choisir mise à jour devrait résoudre le problème +if using ldap setup fr Si vous utilisez LDAP if using LDAP, do you want to manage homedirectory and loginshell attributes? setup fr Si vous utilisez LDAP, voulez-vous gérer les attributs répertoire maison (home) et shell de connexion? if you did not receive any errors, your applications have been setup fr Si vous n'avez pas reçu de messages d'erreur, vos applications ont été if you did not receive any errors, your tables have been setup fr Si vous n'avez pas reçu de messages d'erreur, vos tables ont été +if you running this the first time, don't forget to manualy %1 !!! setup fr Si vous exécutez ceci pour la première fois, n'oubliez pas de faire manuellement %1 !!! image type selection order setup fr Ordre de sélection de type d'image import accounts from ldap to the phpgroupware accounts table (for a new install using sql accounts) setup fr Importer les comptes de LDAP vers la table des comptes phpGroupWare (pour une nouvelle installation utilisant les comptes SQL) +import has been completed! setup fr L'import a été complété! import ldap users/groups setup fr Importer les utilisateurs/groupes LDAP importing old settings into the new format.... setup fr J'importe les vieux réglages dans le nouveau format.... include root (this should be the same as server root unless you know what you are doing) setup fr Racine d'inclusion (ceci devrait être la même chose de racine du serveur à moins que vous ne sachiez ce que vous faîtes) @@ -175,6 +183,7 @@ mcrypt mode (default cbc) setup fr Mode Mcrypt (d mcrypt settings (requires mcrypt php extension) setup fr Réglages Mcrypt (Nécessite l'extension PHP mcrypt) mcrypt version setup fr Versio de MCrypt minimum account id (e.g. 500 or 100, etc.) setup fr ID de compte minimum (p.e. 500 ou 100, etc.) +modifications have been completed! setup fr Les modifications ont été complétées! modify setup fr Modifier modify an existing ldap account store for use with phpgroupware (for a new install using ldap accounts) setup fr Modifier un compte LDAP existant pour stocker et utiliser avec phpGroupWare (pour une nouvelle installation utilisant les comptes LDAP) multi-language support setup setup fr Setup pour le support du multi-langues @@ -203,16 +212,20 @@ one week setup fr Une semaine only add languages that are not in the database already setup fr Ajouter seulement les langues qui ne sont pas déjà dans la base de données only add new phrases setup fr Ajouter seulement les nouvelles phrases or setup fr ou +or http://webdav.domain.com (webdav) setup fr ou http://webdav.domain.com (WebDAV) or we can attempt to create the database for you: setup fr Ou nous pouvons tenter de créer la base de données pour vous: password needed for configuration setup fr Mot de passe nécessaire pour la configuration password of db user setup fr Mot de passe de l'utilisateur de la base de données passwords did not match, please re-enter setup fr Les mots de passe ne correspondaient pas, SVP ré-entrez-les path information setup fr Information de chemin +path to user and group files has to be outside of the webservers document-root!!! setup fr Le chemin vers les fichiers utilisateur et groupe DOIT ETRE EN DEHORS du répertoire racine des serveurs web!!! persistent connections setup fr Connexions persistantes pgsqlinstr setup fr Instructions pour créer la base de données dans PostgreSQL:
Démarrer le postmaster
[user@server user]# postmaster -i -D /home/[username]/[dataDir]
Créer la base de données vide-
[user@server user]# createdb phpgroupware +phpgroupware administration manual setup fr Manuel d'Administration phpGroupWare please check for sql scripts within the application's directory setup fr SVP vérifiez la présence de scripts SQL dans le répertoire setup de l'application please check read/write permissions on directories, or back up and use another option. setup fr SVP vérifiez les permissions de lecture/écriture sur les répertoires, ou faîtes une sauvegarde et utilisez une autre option. please configure phpGroupWare for your environment setup fr SVP configurez phpGroupWare pour votre environnement +please consult the %1. setup fr SVP consultez le %1. please install setup fr SVP installez please login setup fr SVP connectez-vous please login to phpgroupware and run the admin application for additional site configuration setup fr SVP connectez-vous à phpgroupware et exécutez l'application admin pour les possibilités supplémentaires de configuration du site @@ -229,6 +242,7 @@ re-check my installation setup fr Re-v re-enter password setup fr Ré-entrer mon mot de passe read translations from setup fr Lire les traductions depuis really uninstall all applications setup fr Désinstaller VRAIMENT toutes les applications +recommended: filesystem setup fr Recommandé: système de fichiers registered setup fr Enregistré remove setup fr Enlever remove all setup fr Enlever tout @@ -236,11 +250,13 @@ requires reinstall or manual repair setup fr N requires upgrade setup fr Nécessite une mise à jour resolve setup fr Résoudre sample configuration not found. using built in defaults setup fr Configuration exemple non trouvée. J'utilise les valeurs par défaut définies en interne +save setup fr Enregistrer save this text as contents of your header.inc.php setup fr Enregistrer ce texte comme le contenu de votre fichier header.inc.php select an app, enter a target version, then submit to process to that version.
If you do not enter a version, only the baseline tables will be installed for the app.
THIS WILL DROP ALL OF THE APPS' TABLES FIRST! setup fr Choisissez une application, entrez une version de destination, puis soumettez pour transformer vers cette version.
Si vous n'entrez pas de version, seules les tables de base pour cette application seront installées.
CETTE MANIPULATION VA D'ABORD EFFACER TOUTES LES TABLES DE DONNEES DES APPLICATIONS! select the default applications to which your users will have access setup fr Choisissez les applications par défaut auxquelles vos utilisateurs auront accès select the desired action(s) from the available choices setup fr Choisissez la(les) action(s) désirée(s) dans les choix possibles select to download file setup fr Choisissez pour downloader le fichier +select where you want to store/retrieve file contents setup fr Choisissez où vous voulez stocker/récupérer les contenus de fichiers select where you want to store/retrieve filesystem information setup fr Choisissez où vous voulez stocker/récupérer les informations sur le système de fichiers select where you want to store/retrieve user accounts setup fr Choisissez où vous voulez stocker/récupérer les informations de comptes utilisateurs select which group(s) will be exported (group membership will be maintained) setup fr Choisissez quel(s) groupe(s) va(vont) être exporté(s) (l'appartenance au groupe sera conservée) @@ -262,6 +278,7 @@ set this to "old" for versions < 2.4, otherwise the exact mcrypt version you settings setup fr Réglages setup setup fr Setup setup demo accounts in ldap setup fr Configurer des comptes de démo dans LDAP +setup the database setup fr Configurer la base de données show 'powered by' logo on setup fr Montrer le logo 'propulsé par' sur some or all of its tables are missing setup fr Certaines ou toutes ses tables manquent status setup fr Etat @@ -269,7 +286,6 @@ step 1 - simple application management setup fr Etape 1 - Gestion simple d'appli step 2 - configuration setup fr Etape 2 - Configuration step 3 - language management setup fr Etape 3 - Gestion des langues step 4 - advanced application management setup fr Etape 4 - Gestion avancée d'applications -submit setup fr Soumettre table change messages setup fr Messages de changement de table tables dropped setup fr Tables supprimées tables installed, unless there are errors printed above setup fr Tables installées, à moins qu'il y ait des messages d'erreur imprimés ci-dessous @@ -277,9 +293,11 @@ tables upgraded setup fr Tables mises target version setup fr Version de destination text entry setup fr Entrée de texte the db_type in defaults (%1) is not supported on this server. using first supported type. setup fr Le type de base de données dans les valeurs par défaut (%1) n'est pas supporté sur ce server. J'utilise le 1er type supporté. +the file setup fr le fichier the table definition was correct, and the tables were installed setup fr La définition de table était correcte, et les tables étaient installées the tables setup fr Les tables -there was a problem tring to connect to your ldap server.
please check your LDAP server configuration setup fr Il y a eu un problème en essayant de se connecter à votre serveur LDAP.
SVP vérifiez la configuration de votre serveur LDAP +there was a problem trying to connect to your ldap server.
please check your LDAP server configuration setup fr Il y a eu un problème en essayant de se connecter à votre serveur LDAP.
SVP vérifiez la configuration de votre serveur LDAP +this has to be outside the webservers document-root!!! setup fr Ceci doit être en dehors du répertoire racine des documents des serveurs Web!!! this program will help you upgrade or install different languages for phpGroupWare setup fr Ce programme va vous aider à mettre à jour ou installer des langues différentes dans phpGroupWare this section will help you export users and groups from phpgroupWare's account tables into your ldap tree setup fr Cette section va vous aider à exporter les utilisateurs et groupes des tables de comptes de phpGroupWare vers votre arbre LDAP this section will help you import users and groups from your ldap tree into phpGroupWare's account tables setup fr Cette section va vous aider à importer les utilisateurs et groupes de votre arbre LDAP vers les tables de comptes de phpGroupWare @@ -295,6 +313,7 @@ translations removed setup fr Traductions enlev translations upgraded setup fr Traductions mises à jour try to configure your php to support one of the above mentioned dbms, or install phpgroupware by hand. setup fr Essayez de configurer votre php pour qu'il supporte une des bases de données mentionnées ci-dessus, ou installez phpGroupWare à la main. two weeks setup fr Deux semaines +uninstall setup fr Désinstaller uninstall all applications setup fr Désinstaller toutes les applications uninstalled setup fr Désinstallé upgrade setup fr MAJ @@ -305,6 +324,7 @@ use cookies to pass sessionid setup fr Utiliser les cookies pour passer l'ID de use pure HTML compliant code (not fully working yet) setup fr Utiliser du code HTML entièrement standard (ne fonctionne pas encore complètement) users choice setup fr Choix utilisateur version mismatch setup fr Différence de version +view setup fr Voir warning! setup fr Attention! we can proceed setup fr Nous pouvons continuer we will automatically update your tables/records to %1 setup fr Nous allons automatiquement mettre à jour vos tables/enregistrements vers %1 @@ -313,10 +333,12 @@ which database type do you want to use with phpgroupware? setup fr Quel type de would you like phpGroupWare to cache the phpgw info array ? setup fr Voudriez-vous que phpGroupWare mette en cache le champ phpgw info ? would you like phpGroupWare to check for a new version
when admins login ? setup fr Voudriez-vous que phpGroupWare vérifie la disponibilité d'une nouvelle version
quand les administrateurs se connectent ? would you like to show each application's upgrade status ? setup fr Voudriez-vous montrer le statut de mise à jour de chaque application ? +write config setup fr Ecrire la configuration yes setup fr Oui you appear to be running a pre-beta version of phpGroupWare.
These versions are no longer supported, and there is no upgrade path for them in setup.
You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades)
and then upgrade from there with the current version. setup fr Vous semblez utiliser une version pre-beta de phpGroupWare.
Ces versions ne sont plus supportées, et il n'y a pas de possibilité de mise à jour pour elles dans le setup.
Vous devriez d'abord mettre votre version à jour vers la version 0.9.10 (la dernière version à supporter les mises à jour pre-beta)
puis mettre à jour depuis cette version jusqu'à la version actuelle. you appear to be running an old version of PHP
It its recommend that you upgrade to a new version.
Older version of PHP might not run phpGroupWare correctly, if at all.

Please upgrade to at least version 3.0.16 setup fr Vous semblez utiliser une version ancienne de PHP
Il est recommandé que vous mettiez votre système à jour vers une version plus récente.
Les anciennes version de PHP pourraient ne pas faire fonctionner correctement phpGroupWare, voire pas du tout.

SVP, mettez votre système à jour vers au moins la version 3.0.16 you appear to be running version %1 of phpGroupWare setup fr Vous semblez utiliser la version %1 de phpGroupWare +you appear to be using php earlier than 4.1.0. phpgroupware now requires 4.1.0 or later setup fr Vous semblez utiliser une version de PHP plus ancienne que la 4.1.0. phpGroupWare nécessite maintenant 4.1.0 ou plus récent you appear to be using php3. disabling php4 sessions support setup fr Vous semblez utiliser PHP3. Je désactive le support des sessions PHP4 you appear to be using php4. enabling php4 sessions support setup fr Vous semblez utiliser PHP4. J'active le support des sessions PHP4 you appear to have microsoft sql server support enabled setup fr Vous semblez avoir le support de Microsoft SQL Server activé @@ -341,7 +363,7 @@ your database is not working! setup fr Votre base de donn your database is working, but you dont have any applications installed setup fr Votre base de données fonctionne, mais vous n'avez pas d'applications installées your header admin password is not set. please set it now! setup fr Votre mot de passe d'administration d'entête n'est PAS configuré. SVP configurez-le maintenant! your header.inc.php needs upgrading. setup fr Votre fichier header.inc.php a besoin d'être mis à jour. -your header.inc.php needs upgrading.
warning!
make backups! setup fr Votre fichier header.inc.php a besoin d'être mis à jour.
ATTENTION!
FAITES DES SAUVEGARDES! +your header.inc.php needs upgrading.
warning!
make backups! setup fr Votre fichier header.inc.php a besoin d'être mis à jour.
ATTENTION!
FAITES DES SAUVEGARDES! your tables are current setup fr Vos tables sont à jour your tables may be altered and you may lose data setup fr Vos tables pourraient être altérées et vous pourriez perdre des données your tables will be dropped and you will lose data setup fr Vos tables vont être supprimées et vous allez perdre des données diff --git a/setup/ldapexport.php b/setup/ldapexport.php index 6784610f2e..ea273884a1 100644 --- a/setup/ldapexport.php +++ b/setup/ldapexport.php @@ -240,8 +240,8 @@ if($setup_complete) { - echo lang('
Export has been completed! You will need to set the user passwords manually.
'); - echo lang('
Click here to return to setup
'); + echo '
'.lang('Export has been completed! You will need to set the user passwords manually.').'
'; + echo '
'.lang('Click here to return to setup.').'
'; $GLOBALS['phpgw_setup']->html->show_footer(); exit; } diff --git a/setup/ldapimport.php b/setup/ldapimport.php index d236790920..bce3930f46 100644 --- a/setup/ldapimport.php +++ b/setup/ldapimport.php @@ -405,7 +405,7 @@ if ($setup_complete) { - echo lang('
Import has been completed! Click here to return to setup
'); + echo '
'.lang('Import has been completed!').' '.lang('Click here to return to setup.').'
'; $GLOBALS['phpgw_setup']->html->show_footer(); exit; } diff --git a/setup/ldapmodify.php b/setup/ldapmodify.php index 8749690231..062ab59d43 100644 --- a/setup/ldapmodify.php +++ b/setup/ldapmodify.php @@ -347,7 +347,7 @@ if ($setup_complete) { - echo lang('
Modifications have been completed! Click here to return to setup
'); + echo '
'.lang('Modifications have been completed!').' '.lang('Click here to return to setup.').'
'; $GLOBALS['phpgw_setup']->html->show_footer(); exit; } diff --git a/setup/manageheader.php b/setup/manageheader.php index 82a35c8fe6..367474c3d9 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -95,7 +95,7 @@ break; case '3': $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.'); - $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.
WARNING!
MAKE BACKUPS!'); + $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.
WARNING!
MAKE BACKUPS!'); $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('Your header.inc.php needs upgrading.'); if (!$GLOBALS['phpgw_setup']->auth('Header')) { @@ -118,7 +118,9 @@ break; } - switch(@get_var('action',Array('POST'))) + $action = @get_var('action',Array('POST')); + list($action) = @each($action); + switch($action) { case 'download': check_form_values(); @@ -146,11 +148,11 @@ echo ''; echo '
' . lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".') . '
'; echo ''; - echo ''; + echo ''; echo ''; echo ''; break; - case 'write config': + case 'write': check_form_values(); $header_template = CreateObject('setup.Template','../'); if(is_writeable('../header.inc.php') || (!file_exists('../header.inc.php') && is_writeable('../'))) @@ -163,7 +165,7 @@ echo '
'; echo '
Created header.inc.php! '; echo ''; - echo ''; + echo ''; echo '
'; echo ''; break; @@ -179,13 +181,21 @@ default: $GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['HeaderFormMSG'], False, 'header'); - $detected = $GLOBALS['phpgw_info']['setup']['PageMSG']; + $detected = ''; - $detected .= '

Please consult the phpGroupWare Administration Manual.

'; - $detected .= 'If you running this the first time, don\'t forget to manualy Setup the database !!!'; + if (!$ConfigLang) + { + $_POST['ConfigLang'] = 'en'; + $detected .= '
Please Select your language '.lang_select(True)."
\n"; + } - $detected .= ''; - $detected .= '
' . lang('Analysis') . '
'; + $detected .= '' . "\n"; + + $detected .= ''; + $manual = ''.lang('phpGroupWare Administration Manual').''; + $detected .= ''. "\n"; + + $detected .= '

' . $GLOBALS['phpgw_info']['setup']['PageMSG'] . '
 

'.lang('Please consult the %1.',$manual).'
 

' . lang('Analysis') . '
'. "\n"; $supported_db = array(); if (extension_loaded('mysql') || function_exists('mysql_connect')) @@ -234,19 +244,22 @@ } if(!count($supported_db)) { - $detected .= '

' + $detected .= '

' . lang('Did not find any valid DB support!') - . '
' + . "
\n" . lang('Try to configure your php to support one of the above mentioned DBMS, or install phpGroupWare by hand.') - . '

'; + . '

'; echo $detected; exit; } - if (floor(phpversion()) == 3) + if (!function_exists('version_compare')) { - $detected .= lang('You appear to be using PHP3. Disabling PHP4 sessions support') . '
' . "\n"; - $supported_sessions_type[] = 'db'; + $detected .= '

' + . lang('You appear to be using PHP earlier than 4.1.0. phpGroupWare now requires 4.1.0 or later'). "\n" + . '

'; + echo $detected; + exit; } else { @@ -476,17 +489,24 @@ if(is_writeable('../header.inc.php') || (!file_exists('../header.inc.php') && is_writeable('../'))) { - $errors .= '
 ' - . lang('or') . '  ' - . lang('or') . '  the file.'; + $errors .= '
 ' + . lang('or') . '  ' + . lang('or') . '  '.lang('the file').'.'; } else { $errors .= '
' . lang('Cannot create the header.inc.php due to file permission restrictions.
Instead you can %1 the file.', - '' . lang('or') . ' ') + '' . lang('or') . ' ') . ''; } + // set domain and password for the continue button + @reset($GLOBALS['phpgw_domain']); + list($firstDomain) = @each($GLOBALS['phpgw_domain']); + $setup_tpl->set_var(array( + 'FormDomain' => $firstDomain, + 'FormPW' => $GLOBALS['phpgw_domain'][$firstDomain]['config_passwd'] + )); $setup_tpl->set_var('errors',$errors); $setup_tpl->set_var('lang_settings',lang('Settings')); @@ -517,8 +537,10 @@ $setup_tpl->set_var('lang_mcryptivdescr',lang('This should be around 30 bytes in length.
Note: The default has been randomly generated.')); $setup_tpl->set_var('lang_domselect',lang('Domain select box on login')); $setup_tpl->set_var('lang_finaldescr',lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".')); + $setup_tpl->set_var('lang_continue',lang('Continue')); $setup_tpl->pfp('out','manageheader'); break; // ending the switch default } ?> + diff --git a/setup/schematoy.php b/setup/schematoy.php index 7cf977893e..dabeb49668 100644 --- a/setup/schematoy.php +++ b/setup/schematoy.php @@ -267,7 +267,7 @@ } } } - $GLOBALS['setup_tpl']->set_var('submit',lang('Submit')); + $GLOBALS['setup_tpl']->set_var('submit',lang('Save')); $GLOBALS['setup_tpl']->set_var('cancel',lang('Cancel')); $GLOBALS['setup_tpl']->pparse('out','app_footer'); $GLOBALS['setup_tpl']->pparse('out','footer'); diff --git a/setup/setup_demo.php b/setup/setup_demo.php index 0d3e88aa16..20f9c6e71d 100644 --- a/setup/setup_demo.php +++ b/setup/setup_demo.php @@ -74,8 +74,8 @@ $setup_tpl->set_var('adminpassword2',lang('Re-enter password')); $setup_tpl->set_var('create_demo_accounts',lang('Create demo accounts')); - $setup_tpl->set_var('lang_submit',lang('submit')); - $setup_tpl->set_var('lang_cancel',lang('cancel')); + $setup_tpl->set_var('lang_submit',lang('Save')); + $setup_tpl->set_var('lang_cancel',lang('Cancel')); $setup_tpl->pparse('out','T_setup_demo'); $GLOBALS['phpgw_setup']->html->show_footer(); } @@ -145,8 +145,8 @@ $GLOBALS['phpgw_setup']->db->query('DELETE FROM phpgw_acl'); /* Create the demo groups */ - $defaultgroupid = add_account('Default','Default','Group',$passwd,'g'); - $admingroupid = add_account('Admins','Admin', 'Group',$passwd,'g'); + $defaultgroupid = intval(add_account('Default','Default','Group',$passwd,'g')); + $admingroupid = intval(add_account('Admins','Admin', 'Group',$passwd,'g')); /* Group perms for the default group */ $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) VALUES('addressbook','run'," . $defaultgroupid . ", 1)"); diff --git a/setup/templates/default/applications.tpl b/setup/templates/default/applications.tpl index dd03a55b70..9fc29f6611 100644 --- a/setup/templates/default/applications.tpl +++ b/setup/templates/default/applications.tpl @@ -21,19 +21,19 @@ function check_all(which)
- +
{description}
- +
- - - + + + @@ -62,7 +62,7 @@ function check_all(which) - + @@ -76,7 +76,8 @@ function check_all(which) - + + @@ -105,12 +106,12 @@ function check_all(which) -{goback] +{goback} - + @@ -135,6 +136,13 @@ function check_all(which) + +
{appdata}
{actions}
{appdata}{actions}
{app_info}
{instalt}{instalt} {appinfo}  {apptitle}  {currentver} 
{name} {details} {name} {details} 
 {debug} {lang_debug} {install_all}
+
+ + + +
diff --git a/setup/templates/default/config.tpl b/setup/templates/default/config.tpl index 0fe046e64b..880c0937cc 100644 --- a/setup/templates/default/config.tpl +++ b/setup/templates/default/config.tpl @@ -1,38 +1,37 @@ - + - - - +
 {title}
+ + - - - + + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - - + + @@ -149,11 +148,11 @@ - + - + @@ -197,7 +196,7 @@ - + @@ -205,7 +204,7 @@ - + - + - + - + - + - + - + - + - + - + - - + + @@ -291,11 +290,11 @@ - + - - + + + @@ -343,3 +342,5 @@
 {title}
 {lang_Path_information}
 {lang_Path_information}
{lang_Enter_the_full_path_for_temporary_files.
Examples:_/tmp,_C:\TEMP}:
{lang_Enter_the_full_path_for_users_and_group_files.
Examples:_/files,_E:\FILES,
http://webdav.domain.com (WebDAV)}:
{lang_Enter_the_full_path_for_users_and_group_files.
Examples:_/files,_E:\FILES}:
{lang_This_has_to_be_outside_the_webservers_document-root!!!}
{lang_or_http://webdav.domain.com_(WebDAV)}:
{lang_Enter_the_location_of_phpGroupWare's_URL.
Example:_http://www.domain.com/phpgroupware_ _or_ _/phpgroupware
No_trailing_slash}:
{lang_Image_type_selection_order}:
{lang_read_translations_from}:
 
 {lang_Host_information}
 {lang_Host_information}
{lang_Enter_the_hostname_of_the_machine_on_which_this_server_is_running}:
{lang_Enter_your_default_FTP_server}:
{lang_Attempt_to_use_correct_mimetype_for_FTP_instead_of_default_'application/octet-stream'}:
{lang_Datetime_port.
If_using_port_13,_please_set_firewall_rules_appropriately_before_submitting_this_page.
(Port:_13_/_Host:_129.6.15.28)}
{lang_Enter_your_HTTP_proxy_server}:
{lang_Enter_your_HTTP_proxy_server_port}:
{lang_Enter_the_site_username_for_peer_servers}.
{lang_Enter_the_site_password_for_peer_servers}.
 
{lang_Authentication_/_Accounts}
{lang_Authentication_/_Accounts}
{lang_Minimum_account_id_(e.g._500_or_100,_etc.)}:
{lang_Maximum_account_id_(e.g._65535_or_1000000)}:
 
{lang_If_using_LDAP}:
{lang_Do_you_want_to_manage_homedirectory_and_loginshell_attributes?}:
{lang_LDAP_Default_homedirectory_prefix_(e.g._/home_for_/home/username)}:
{lang_LDAP_Default_shell_(e.g._/bin/bash)}:
{lang_LDAP_host}:
{lang_LDAP_accounts_context}:
{lang_LDAP_groups_context}:
{lang_LDAP_rootdn}:
{lang_LDAP_root_password}:
{lang_LDAP_encryption_type}:
 
{lang_Mcrypt_settings_(requires_mcrypt_PHP_extension)}
{lang_Mcrypt_settings_(requires_mcrypt_PHP_extension)}
 
{lang_Additional_settings}
{lang_Additional_settings}
@@ -329,9 +328,9 @@ -
-  +  
+ + diff --git a/setup/templates/default/config_post_script.tpl b/setup/templates/default/config_post_script.tpl index af79cd3af1..d373e490ef 100644 --- a/setup/templates/default/config_post_script.tpl +++ b/setup/templates/default/config_post_script.tpl @@ -15,6 +15,12 @@ + + +   + + + diff --git a/setup/templates/default/config_pre_script.tpl b/setup/templates/default/config_pre_script.tpl index 03ceb550a4..d771336ff5 100644 --- a/setup/templates/default/config_pre_script.tpl +++ b/setup/templates/default/config_pre_script.tpl @@ -1,4 +1,5 @@
- +
+ diff --git a/setup/templates/default/head.tpl b/setup/templates/default/head.tpl index 5210730646..d61999536e 100644 --- a/setup/templates/default/head.tpl +++ b/setup/templates/default/head.tpl @@ -11,7 +11,14 @@ phpGroupWare {lang_setup} {page_title} @@ -19,13 +26,13 @@ -
- - + - - + + - - + + + {formend} + + + + + + +
-  phpGroupWare version {pgw_ver} {lang_setup} {configdomain} + + + - + +
{logoutbutton}
+ diff --git a/setup/templates/default/images/check.png b/setup/templates/default/images/check.png index 4076af89e0..38f7efb05d 100644 Binary files a/setup/templates/default/images/check.png and b/setup/templates/default/images/check.png differ diff --git a/setup/templates/default/images/completed.png b/setup/templates/default/images/completed.png index 28bef029eb..cabc9eed82 100644 Binary files a/setup/templates/default/images/completed.png and b/setup/templates/default/images/completed.png differ diff --git a/setup/templates/default/images/dep.png b/setup/templates/default/images/dep.png index beda51f4b0..8b137c5606 100644 Binary files a/setup/templates/default/images/dep.png and b/setup/templates/default/images/dep.png differ diff --git a/setup/templates/default/images/incomplete.png b/setup/templates/default/images/incomplete.png index 0eadd46313..220daa6eb0 100644 Binary files a/setup/templates/default/images/incomplete.png and b/setup/templates/default/images/incomplete.png differ diff --git a/setup/templates/default/login_main.tpl b/setup/templates/default/login_main.tpl index 1b15dcb642..f6d7209ad2 100644 --- a/setup/templates/default/login_main.tpl +++ b/setup/templates/default/login_main.tpl @@ -1,28 +1,34 @@

 

- +
{V_login_stage_header} - - + + - - + + - + + + + + + +
-  Header Admin Login -
 Header Admin Login
- {HeaderLoginMSG} -
{HeaderLoginMSG}
+ Password: + - - - -
+ {lang_select} + + +
+ + diff --git a/setup/templates/default/login_stage_header.tpl b/setup/templates/default/login_stage_header.tpl index 0f90dd4375..4802eef4d7 100644 --- a/setup/templates/default/login_stage_header.tpl +++ b/setup/templates/default/login_stage_header.tpl @@ -1,16 +1,14 @@ -
-  Setup/Config Admin Login +  Setup/Config Admin Login
- {ConfigLoginMSG} -
{ConfigLoginMSG}
+
@@ -19,7 +17,7 @@ Domain: @@ -46,3 +44,4 @@ + diff --git a/setup/templates/default/manageheader.tpl b/setup/templates/default/manageheader.tpl index 35b124c4f3..46b78e6696 100644 --- a/setup/templates/default/manageheader.tpl +++ b/setup/templates/default/manageheader.tpl @@ -1,7 +1,7 @@ {detected} - - + + @@ -59,12 +59,15 @@ {domains}{comment_l} - + {comment_r} -
- +
{lang_settings}
{lang_settings}
-{errors} +
{errors}

{lang_finaldescr}
@@ -72,15 +75,21 @@ - + +
- - {lang_domain}   {lang_delete} + + {lang_domain}:    {lang_delete} {lang_dbhost}
{lang_dbhostdescr} diff --git a/setup/templates/default/setup_db_blocks.tpl b/setup/templates/default/setup_db_blocks.tpl index 976e518cc1..250a961b0d 100644 --- a/setup/templates/default/setup_db_blocks.tpl +++ b/setup/templates/default/setup_db_blocks.tpl @@ -11,7 +11,7 @@ {dbnotexist}
{makesure}.

- {instr}
+ {instr}

{createdb}
DB root username: diff --git a/setup/templates/default/setup_demo.tpl b/setup/templates/default/setup_demo.tpl index 9dcaecaf3a..011caa59f6 100644 --- a/setup/templates/default/setup_demo.tpl +++ b/setup/templates/default/setup_demo.tpl @@ -4,8 +4,7 @@ {description} - {detailadmin}  - + {detailadmin} diff --git a/setup/templates/default/setup_main.tpl b/setup/templates/default/setup_main.tpl index b7ef93b72f..db102de9fe 100644 --- a/setup/templates/default/setup_main.tpl +++ b/setup/templates/default/setup_main.tpl @@ -1,26 +1,18 @@ - - - - +
- {db_step_text} - -   -
+ + + {V_db_filled_block} - - - + + + - - - + + + - - - + + + - + + +
{db_step_text} 
- {config_step_text} - -   -
{config_step_text} 
@@ -38,13 +30,9 @@
- {lang_step_text} - -   -
{lang_step_text} 
@@ -56,13 +44,9 @@
- {apps_step_text} - -   -
{apps_step_text} 
@@ -73,6 +57,8 @@