[Gforge-commits] r6324 - in
branches/Branch_4_6dev/gforge/plugins/webcalendar: . bin db
script www www/includes www/includes/js www/translations
lpedro at svr1.gforge.org
lpedro at svr1.gforge.org
Wed Jan 9 08:52:47 EST 2008
Author: lpedro
Date: 2008-01-09 08:51:10 -0500 (Wed, 09 Jan 2008)
New Revision: 6324
Added:
branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/lists_utils_projects.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/users_groups.xml
branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20070829.sql
branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20071109.sql
branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcal_update_user.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_roles_projects.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_users_role.php
Modified:
branches/Branch_4_6dev/gforge/plugins/webcalendar/ChangeLog
branches/Branch_4_6dev/gforge/plugins/webcalendar/README
branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcalendar-init.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin_handler.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/adminhome.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/approve_entry.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/day.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/del_entry.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry_handler.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/connect.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/functions.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/init.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/js/edit_entry.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/settings.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/trailer.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/user.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index2.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/layers.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_unapproved.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/login.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/month.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/pref.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/purge.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/reject_entry.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Danish.txt
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese.txt
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese_BR.txt
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/view_entry.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/views.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/views_edit.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/views_edit_handler.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/week.php
branches/Branch_4_6dev/gforge/plugins/webcalendar/www/year.php
Log:
Commit of the new version of webcalendar.
For change, see the changelog and the readme.
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/ChangeLog
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/ChangeLog 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/ChangeLog 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1,51 @@
+09 January 2008:
+
+Added files :
+
+ bin/lists_utils_projects.php
+ bin/users_groups.xml
+ db/20070829.sql
+ db/20071109.sql
+ script/webcal_update_user.php
+ www/list_roles_projects.php
+ www/list_users_role.php
+
+Modified files :
+ common/webcalendarPlugin.class.php
+ script/webcalendar-init.php
+ www/docs/WebCalendar-Database.html
+ www/docs/WebCalendar-DeveloperGuide.html
+ www/docs/WebCalendar-Styling.html
+ www/docs/WebCalendar-SysAdmin.html
+ www/includes/js/edit_entry.php
+ www/includes/connect.php
+ www/includes/functions.php
+ www/includes/index.php
+ www/includes/init.php
+ www/includes/settings.php
+ www/includes/trailer.php
+ www/includes/user.php
+ www/admin.php
+ www/admin_handler.php
+ www/adminhome.php
+ www/approve_entry.php
+ www/day.php
+ www/del_entry.php
+ www/edit_entry.php
+ www/edit_entry_handler.php
+ www/index.php
+ www/index2.php
+ www/layers.php
+ www/list_unapproved.php
+ www/login.php
+ www/month.php
+ www/pref.php
+ www/purge.php
+ www/reject_entry.php
+ www/view_entry.php
+ www/views.php
+ www/views_edit.php
+ www/views_edit_handler.php
+ www/week.php
+ www/year.php
+ ./README
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/README
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/README 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/README 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,3 +1,4 @@
+Complete the ficle www/includes/settings.php
Change owner of www/includes/settings.php
The owner must be apache
@@ -2 +3,18 @@
chown www-data www/includes/settings.php
+
+#########################################
+# Cronojobs #
+#########################################
+
+Add the file cronjobs/gforge_webcalendar_cron to the directory : /etc/cron.d/
+
+
+#########################################
+# Data Base #
+#########################################
+
+Launch the update file (and ONLY the update file) on the directory
+plugins/webcalendar/db/ and NOT THE INIT FILE.
+
+Launch manually the file plugins/webcalendar/bin/lists_utils_projects.php
+
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/lists_utils_projects.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/lists_utils_projects.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/lists_utils_projects.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1,142 @@
+<?php
+ require_once('www/env.inc.php');
+ require_once('pre.php');
+ require_once('common/include/cron_utils.php');
+
+ $groupname=0;
+ $rolename=0;
+ $dom = domxml_new_doc('1.0');
+ $root = $dom->create_element('projects');
+ $dom->append_child($root);
+
+ db_begin();
+ //Clear of the webcal_group_user table
+ db_query("delete from webcal_group_user");
+ db_commit();
+
+ db_begin();
+
+ $result=db_query("select g.group_id, g.unix_group_name, r.role_id, r.role_name, u.user_id, u.user_name, u.firstname, u.lastname
+ from (((groups g JOIN user_group ug ON g.group_id=ug.group_id)
+ JOIN users u ON u.user_id = ug.user_id)
+ JOIN role r ON r.role_id = ug.role_id)
+ ORDER BY g.group_id,r.role_id,u.user_id");
+
+ while ($trait = db_fetch_array($result)) {
+
+ if(strcmp($trait['unix_group_name'],$groupname)!= 0){
+ echo "\n".$trait['unix_group_name'];
+ $groupname = $trait['unix_group_name'];
+ $newGroup = $dom->create_element('project');
+ $newGroup->set_attribute('name', $groupname);
+ $root->append_child($newGroup);
+ $rolename=0;
+
+ $testvalue = "SELECT cal_name FROM webcal_group WHERE cal_name = '".$groupname."'";
+ $res = db_query($testvalue);
+ if (!$res || db_numrows($res) < 1){
+
+ $testvalue = "SELECT cal_name FROM webcal_group";
+ $res = db_query($testvalue);
+
+ $cal = "INSERT INTO webcal_group (cal_group_id,cal_owner, cal_name, cal_last_update)
+ VALUES ('".db_numrows($res)."',' ','" .$groupname."','".date("Ymd")."')";
+ $resul = db_query($cal);
+ db_commit();
+ echo "\n ".db_numrows($res);
+ }
+
+ }
+ if(strcmp($trait['role_name'],$rolename)!= 0){
+ echo "\n ".$trait['role_name'];
+ $rolename = $trait['role_name'];
+ $newRole = $dom->create_element('role');
+ $newRole->set_attribute('name', $rolename);
+ $newGroup->append_child($newRole);
+
+ $testvalue = "SELECT cal_name FROM webcal_group WHERE cal_name = '".$groupname.".".$rolename."'";
+ $res = db_query($testvalue);
+ if (!$res || db_numrows($res) < 1){
+ $testvalue = "SELECT cal_name FROM webcal_group";
+ $res = db_query($testvalue);
+
+ $cal = "INSERT INTO webcal_group (cal_group_id,cal_owner, cal_name, cal_last_update)
+ VALUES ('".db_numrows($res)."',' ','" .$groupname.".".$rolename."','".date("Ymd")."')";
+ $resul = db_query($cal);
+ db_commit();
+ echo "\n ".db_numrows($res);
+ }
+ $testvalue = "SELECT cal_login FROM webcal_user WHERE cal_login = '".$groupname.".".$rolename."'";
+ $res = db_query($testvalue);
+ if (!$res || db_numrows($res) < 1){
+ $cal = "INSERT INTO webcal_user (cal_login, cal_passwd, cal_email,
+ cal_firstname, cal_is_admin)
+ VALUES ('" .$groupname.".".$rolename. "','cccc',' ','" .$groupname.".".$rolename. "','N')";
+ $resul = db_query($cal);
+ db_commit();
+ echo "\n ".$resul;
+ }
+
+ }
+ echo "\n ".$trait['user_name'];
+ $username = $trait['user_name'];
+ $firstname = $trait['firstname'];
+ $lastname = $trait['lastname'];
+ $newUser = $dom->create_element('user');
+ $newUser->set_attribute('firstname', $firstname);
+ $newUser->set_attribute('lastname', $lastname);
+ $newRole->append_child($newUser);
+ $name = $dom->create_text_node($username);
+ $newUser->append_child($name);
+
+
+
+ $testvalue = "SELECT * FROM webcal_user WHERE cal_login = '".$groupname.".".$rolename."'";
+ $res = db_query($testvalue);
+ $cal_email = db_fetch_array($res);
+
+ $testgroup = "SELECT * FROM webcal_group WHERE cal_name = '".$groupname."'";
+ $resu = db_query($testgroup);
+ $calgroup = db_fetch_array($resu);
+
+ $testusergroup = "SELECT * FROM webcal_group_user WHERE cal_group_id = '".$calgroup['cal_group_id']."' and cal_login='".$username."'";
+ $re = db_query($testusergroup);
+ echo "\n ".$testusergroup;
+ if (!$re || db_numrows($re) < 1){
+ $cal = "INSERT INTO webcal_group_user (cal_group_id, cal_login)
+ VALUES ('".$calgroup['cal_group_id']."','".$username."')";
+ $resul = db_query($cal);
+ echo "\n ".$cal;
+ db_commit();
+ }
+
+ $testgroup = "SELECT * FROM webcal_group WHERE cal_name = '".$groupname.".".$rolename."'";
+ $resu = db_query($testgroup);
+ $calgroup = db_fetch_array($resu);
+
+ $testusergroup = "SELECT * FROM webcal_group_user WHERE cal_group_id = '".$calgroup['cal_group_id']."' and cal_login='".$username."'";
+ $re = db_query($testusergroup);
+ echo "\n ".$testusergroup;
+ if (!$re || db_numrows($re) < 1){
+ $cal = "INSERT INTO webcal_group_user (cal_group_id, cal_login)
+ VALUES ('".$calgroup['cal_group_id']."','".$username."')";
+ $resul = db_query($cal);
+ echo "\n ".$cal;
+ db_commit();
+ }
+
+
+ if ($res && db_numrows($res) == 1){
+ $query = "SELECT email FROM users WHERE user_name = '".$username."'";
+ $resu = db_query($query);
+ $traite = db_fetch_array($resu);
+ $cal_query = "UPDATE webcal_user SET cal_email = '".$cal_email['cal_email'].",".$traite['email']."' WHERE cal_login = '".$groupname.".".$rolename."'";
+ $res_cal = db_query($cal_query);
+ db_commit();
+ }
+ }
+
+ $dom->dump_file("users_groups.xml", false, true);
+
+ cron_entry(0,"Lists_utils_projects.php");
+?>
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/users_groups.xml
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/users_groups.xml 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/bin/users_groups.xml 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1 @@
+<?xml version="1.0"?>
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20070829.sql
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20070829.sql 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20070829.sql 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1 @@
+ALTER TABLE webcal_entry_user ADD COLUMN cal_group_status TEXT;
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20071109.sql
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20071109.sql 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/db/20071109.sql 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1,7 @@
+-- This script must be used only if you have activated the plugin webcalendar before
+-- the creation of this script in the repository of gforge.
+
+
+UPDATE role_setting SET value = '6' WHERE section_name = 'webcal' AND value = '2';
+UPDATE role_setting SET value = '2' WHERE section_name = 'webcal' AND value = '1';
+UPDATE role_setting SET value = '1' WHERE section_name = 'webcal' AND value = '6';
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcal_update_user.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcal_update_user.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcal_update_user.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1,370 @@
+<?php
+require_once('www/env.inc.php');
+require_once('pre.php');
+require_once('common/include/cron_utils.php');
+
+//create the config file for webcalendar
+$fichier_conf = "<?\n" .
+ "install_password: 764b9c698569b4e77fd69db363fef414" .
+ "\ndb_type: postgresql" .
+ "\ndb_host: ".$sys_gfdbhost.
+ "\ndb_database: ".$sys_gfdbname.
+ "\ndb_login: ".$sys_gfdbuser.
+ "\ndb_password: ".$sys_gfdbpasswd.
+ "\ndb_persistent: true" .
+ "\nsingle_user_login:" .
+ "\nreadonly: false" .
+ "\nuse_http_auth: false" .
+ "\nsingle_user: false" .
+ "\nuser_inc: user.php" .
+ "\n?>" ;
+
+$handle = fopen($sys_plugins_path . $pluginname . "/www/includes/settings.php", "w");
+fwrite($handle,$fichier_conf);
+fclose($handle);
+
+//user
+$query = "SELECT user_name,user_pw,email,user_id
+ FROM users
+ WHERE NOT user_name='None'
+ AND user_id > 99";
+$res = db_query($query);
+echo db_error();
+while ($row = db_fetch_array($res)) {
+
+ //Get the admin_flag
+ $res_flags = db_query("SELECT COUNT(*)
+ FROM user_group
+ WHERE user_id = '".$row['user_id']."'
+ AND admin_flags = 'A'
+ AND group_id = '1'");
+ $row_flags = db_fetch_array($res_flags);
+ $admin_flag = ($row_flags[0] == 1 ? 'Y' : 'N');
+
+ //Control if the gforge user exists in the webcalendar data base
+ $res_login = db_query("SELECT cal_login
+ FROM webcal_user
+ WHERE cal_login = '".$row['user_name']."'");
+ echo "login : ".$row['user_name'];
+
+ //if the user doesn't exists, insert his on the webcalendar database
+ if(pg_num_rows($res_login) < 1){
+
+ echo " not exist and must be insert\n";
+ $cal_query = "INSERT INTO webcal_user
+ (cal_login, cal_passwd, cal_email,cal_firstname, cal_is_admin)
+ VALUES ('" . $row['user_name'] . "','" . $row['user_pw'] . "','" . $row['email'] . "','" . $row['user_name'] . "','".$admin_flag."')";
+ echo "INSERTION : ".$cal_query;
+ $cal_res = db_query($cal_query);
+
+ //Control if any fields have changed
+ }else{
+
+ echo " exist";
+ $res_update = db_query("SELECT cal_login
+ FROM webcal_user
+ WHERE cal_login = '".$row['user_name']."'
+ and cal_passwd = '".$row['user_pw']."'
+ and cal_email = '".$row['email']."'
+ and cal_firstname = '".$row['user_name']."'
+ and cal_is_admin = '".$admin_flag."'");
+
+ echo "Number of result : ".pg_num_rows($res_update)."\n";
+
+ //if one or more field have changed, then update the user
+ if(pg_num_rows($res_update) < 1){
+ echo " and must be updated";
+ $cal_query = "UPDATE webcal_user
+ SET cal_login = '".$row['user_name']."',
+ cal_passwd = '".$row['user_pw']."',
+ cal_email = '".$row['email']."',
+ cal_firstname = '".$row['user_name']."',
+ cal_is_admin = '".$admin_flag."'
+ WHERE cal_login='".$row['user_name']."'";
+ echo "\nUPDATE : ".$cal_query;
+ echo "\nTEST : "."SELECT cal_login
+ FROM webcal_user
+ WHERE cal_login = '".$row['user_name']."'
+ and cal_passwd = '".$row['user_pw']."'
+ and cal_email = '".$row['email']."'
+ and cal_firstname = '".$row['user_name']."'
+ and cal_is_admin = '".$admin_flag."'";
+ $cal_res = db_query($cal_query);
+ }
+ }
+ echo "\n";
+}
+
+//group
+
+$query2 = "SELECT unix_group_name,groups.group_id,group_name,email
+ FROM groups,users,user_group
+ WHERE groups.group_id >5
+ AND groups.group_id = user_group.group_id
+ AND user_group.user_id = users.user_id
+ AND user_group.admin_flags = 'A' ";
+$res2 = db_query($query2);
+echo db_error();
+$IDS='';
+while ($row2 = db_fetch_array($res2)) {
+
+ if(!strpos($IDS, $row2['group_id'])){
+
+ //memorize the Project ID
+ $IDS .= ','.$row2['group_id'];
+
+ echo "\nQUERY : "."SELECT u.email
+ FROM users u, groups g, user_group ug
+ WHERE g.group_id = ".$row2['group_id']."
+ AND ug.user_id = u.user_id
+ LIMIT 1\n";
+ //get the e_mail of the project admin
+ $res_email = db_query("SELECT u.email
+ FROM users u, groups g, user_group ug
+ WHERE g.group_id = ".$row2['group_id']."
+ AND ug.user_id = u.user_id
+ LIMIT 1");
+ $row_email = pg_fetch_row($res_email);
+ $email = $row_email[0];
+
+ //Control if the Project exist on the webcalendar data base
+ $res_project = db_query("SELECT cal_login
+ FROM webcal_user
+ WHERE cal_login = '".$row2['unix_group_name']."'");
+
+ echo $row2['unix_group_name'];
+
+ //If the project doesn't exist, insert it in the database
+ if(pg_num_rows($res_project) < 1){
+
+ echo " doesn't exist and must be inserted";
+ $cal_query2 = "INSERT
+ INTO webcal_user
+ (cal_login, cal_passwd, cal_firstname,cal_email)
+ VALUES
+ ('" . $row2['unix_group_name'] . "','qdkqshjddoshd','" . addslashes($row2['group_name']) . "','" . $email . "')";
+
+ //Else test if any field have change for the project
+ }else{
+ echo " exist";
+ $res_update = db_query("SELECT cal_login
+ FROM webcal_user
+ WHERE cal_login = '".$row2['unix_group_name']."'
+ and cal_passwd = 'qdkqshjddoshd'
+ and cal_firstname = '".addslashes($row2['group_name'])."'
+ and cal_email = '".$email."'");
+
+ //If any field have changed, I update the project
+ if(pg_num_rows($res_update)<1){
+ echo " and must be updated";
+ $cal_query2 = "UPDATE webcal_user
+ SET cal_login = '".$row2['unix_group_name']."',
+ cal_passwd = 'qdkqshjddoshd',
+ cal_firstname = '".addslashes($row2['group_name'])."',
+ cal_email = '".$email."'
+ WHERE cal_login = '".$row2['unix_group_name']."'";
+ }
+ }
+
+ echo "\n";
+
+
+ //print $query_user_group ;
+ $res_user_group = db_query("SELECT user_group.user_id,user_name,email
+ FROM user_group,users
+ WHERE user_group.user_id = users.user_id
+ AND group_id = '".$row2['group_id']."'
+ AND admin_flags = 'A'");
+
+ //get the email of the admin
+ $query_mail ="SELECT cal_email
+ FROM webcal_user
+ WHERE cal_login = '".$row2['unix_group_name']."'";
+ $res_mail = db_query($query_mail);
+ $row_mail = db_fetch_array($res_mail);
+ $mail = $row_mail['cal_email'];
+
+ if(pg_num_rows($res_user_group) > 0){
+
+ while($row_user_group = db_fetch_array($res_user_group)) {
+
+ //Test if the assistant exists for this project in the webcalendar data base
+ $res_assistant = db_query("SELECT *
+ FROM webcal_asst
+ WHERE cal_boss='".$row2['unix_group_name']."'
+ and cal_assistant='".$row_user_group['user_name']."'");
+
+ echo $row2['unix_group_name']." assistant ".$row_user_group['user_name'];
+
+ //If the user doesn't exist, Insert it in the database
+ if(pg_num_rows($res_assistant) < 1){
+
+ echo " doesn't exist and must be inserted";
+
+ $insert_ass = "INSERT INTO webcal_asst
+ (cal_boss, cal_assistant)
+ VALUES ('".$row2['unix_group_name']."','".$row_user_group['user_name']."')";
+ $cal_res = db_query($insert_ass);
+
+ }
+
+ //Suppress the mail in the list
+ $mail = str_replace($row_user_group['email'],"",$mail);
+ $mail = str_replace(",".$row_user_group['email'],"",$mail);
+
+ if($mail == ""){
+ $virgule = "";
+ }else {
+ $virgule = ",";
+ }
+
+ //Add the mail in the list
+ $mail = $mail.$virgule.$row_user_group['email'] ;
+
+ echo "\n";
+ }
+
+ //update the list of email for the project
+ $update = "UPDATE webcal_user
+ SET cal_email = '".trim($mail,',')."'
+ WHERE cal_login = '".$row2['unix_group_name']."'" ;
+ db_query($update);
+
+ }
+
+ //If the project doesn't exist or must be updated in the webcalendar database I execute the query
+ if($cal_query2 != ""){
+ $cal_res = db_query($cal_query2);
+ }
+
+ }
+}
+
+//link
+
+/*$query_hierarchy = "SELECT p1.group_id as father_id,
+ p1.unix_group_name as father_unix_name,
+ p1.group_name as father_name,
+ p2.group_id as son_id,
+ p2.unix_group_name as son_unix_name,
+ p2.group_name as son_name
+ FROM groups as p1,
+ groups as p2,
+ plugin_projects_hierarchy
+ WHERE p1.group_id = plugin_projects_hierarchy.project_id
+ AND p2.group_id = plugin_projects_hierarchy.sub_project_id
+ AND plugin_projects_hierarchy.activated='t'
+ AND plugin_projects_hierarchy.link_type='shar'";
+$res_hierarchy = db_query($query_hierarchy);
+
+if(pg_num_rows($res_hierarchy) > 0){
+
+ while($row_hierarchy = db_fetch_array($res_hierarchy)) {
+
+ $query_entry = "SELECT cal_id
+ FROM webcal_entry_user
+ WHERE cal_login = '".$row_hierarchy['son_unix_name']."'
+ AND cal_status = 'A'" ;
+ $res_entry = db_query($query_entry);
+
+ if($res_entry){
+
+ while($row_entry = db_fetch_array($res_entry)) {
+
+ $insert_entry = "INSERT INTO webcal_entry_user
+ (cal_id, cal_login, cal_status)
+ VALUES ('".$row_entry['cal_id']."','".$row_hierarchy['father_unix_name']."','A')";
+ $res_insert_entry = db_query($insert_entry);
+
+ }
+
+ }
+
+ }
+
+} */
+
+//admin
+
+$query_flags = "SELECT value, user_id, group_id
+ FROM user_group,role_setting
+ WHERE role_setting.role_id = user_group.role_id
+ AND role_setting.section_name = 'webcal'" ;
+
+//$query_flags = "SELECT admin_flags FROM user_group WHERE user_id = '".$params[0]."' AND group_id = '".$params[1]."'";
+$res = db_query($query_flags);
+
+if(pg_num_rows($res) > 0){
+
+ while( $row_flags = db_fetch_array($res)){
+
+ //get project name :
+ $query_nom_boss = "SELECT unix_group_name
+ FROM groups
+ WHERE group_id = '".$row_flags['group_id']."' ";
+ $res_nom_boss = db_query($query_nom_boss);
+ $row_nom_boss = db_fetch_array($res_nom_boss);
+
+ //get user name
+ $query_nom_user = "SELECT user_name
+ FROM users
+ WHERE user_id = '".$row_flags['user_id']."' ";
+ $res_nom_user = db_query($query_nom_user);
+ $row_nom_user = db_fetch_array($res_nom_user);
+
+ //webcal admin flags
+ $query_flags = "SELECT COUNT(*)
+ FROM webcal_asst
+ WHERE cal_boss = '".$row_nom_boss['unix_group_name']."'
+ AND cal_assistant = '".$row_nom_user['user_name']."'";
+ $res_count = db_query($query_flags);
+ $row_num = db_fetch_array($res_count);
+
+ //select email
+ $query_mail ="SELECT cal_email
+ FROM webcal_user
+ WHERE cal_login = '".$row_nom_boss['unix_group_name']."'";
+ $res_mail = db_query($query_mail);
+ $row_mail = db_fetch_array($res_mail);
+
+ echo $row_nom_boss['unix_group_name']." assistant ".$row_nom_user['user_name'];
+
+ if(($row_num[0] != 1 ) && ($row_flags['value'] == 2)){
+
+ echo " must be inserted\n";
+
+ //recuperer le nom du user et du group
+ $insert_ass = "INSERT INTO webcal_asst
+ (cal_boss, cal_assistant)
+ VALUES ('".$row_nom_boss['unix_group_name']."','".$row_nom_user['user_name']."')";
+ $res_insert = db_query($insert_ass);
+
+ //we add email of the new admin
+ $mail = $row_mail['cal_email'].",".$row_nom_user['email'] ;
+ $update = "UPDATE webcal_user
+ SET cal_email = '".$mail."'
+ WHERE cal_login = '".$row_nom_boss['unix_group_name']."'" ;
+ db_query($update);
+
+ }else if($row_num[0] == 1 && ($row_flags['value'] != 2)){
+
+ echo " must be deleted\n";
+ $del_ass = "DELETE
+ FROM webcal_asst
+ WHERE cal_boss = '".$row_nom_boss['unix_group_name']."'
+ AND cal_assistant = '".$row_nom_user['user_name']."'";
+ $res_del = db_query($del_ass);
+
+ //we del email of the old admin
+ $mail = str_replace(",".$row_nom_user['email'],"",$row_mail['cal_email']) ;
+ $update = "UPDATE webcal_user
+ SET cal_email = '".$mail."'
+ WHERE cal_login = '".$row_nom_boss['unix_group_name']."'" ;
+ db_query($update);
+
+ }
+ echo "\n";
+ }
+}
+cron_entry(0,"webcal_update_user.php");
+?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcalendar-init.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcalendar-init.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/script/webcalendar-init.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,162 +1,162 @@
-<?php
-
-
-//create the config file for webcalendar
-$fichier_conf = "<?\n" .
- "install_password: 764b9c698569b4e77fd69db363fef414" .
- "\ndb_type: postgresql" .
- "\ndb_host: ".$sys_gfdbhost.
- "\ndb_database: ".$sys_gfdbname.
- "\ndb_login: ".$sys_gfdbuser.
- "\ndb_password: ".$sys_gfdbpasswd.
- "\ndb_persistent: true" .
- "\nsingle_user_login:" .
- "\nreadonly: false" .
- "\nuse_http_auth: false" .
- "\nsingle_user: false" .
- "\nuser_inc: user.php" .
- "\n?>" ;
-
-$handle = fopen($sys_plugins_path . $pluginname . "/www/includes/settings.php", "w");
-fwrite($handle,$fichier_conf);
-fclose($handle);
-
-//user
-$query = "SELECT user_name,user_pw,email,user_id FROM users WHERE NOT user_name='None' ";
-$res = db_query($query);
-echo db_error();
-while ($row = db_fetch_array($res)) {
- //verify if admin
- $query_flags = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$row['user_id']."' AND admin_flags = 'A' AND group_id = '1'";
- $res_flags = db_query($query_flags) ;
- $row_flags = db_fetch_array($res_flags) ;
- $cal_query = "INSERT INTO webcal_user (cal_login, cal_passwd, cal_email,cal_firstname, cal_is_admin) VALUES ('" . $row['user_name'] . "','" . $row['user_pw'] . "','" . $row['email'] . "','" . $row['user_name'] . "'";
- if ($row_flags[0] == 1)
- $cal_query .= ",'Y')";
- else
- $cal_query .= ",'N')";
-
- $cal_res = db_query($cal_query);
-
-}
-
-//group
-
-$query2 = "SELECT unix_group_name,groups.group_id,group_name,email FROM groups,users,user_group WHERE groups.group_id >5 AND groups.group_id = user_group.group_id AND user_group.user_id = users.user_id AND user_group.admin_flags = 'A' ";
-$res2 = db_query($query2);
-while ($row2 = db_fetch_array($res2)) {
- $cal_query2 = "INSERT INTO webcal_user (cal_login, cal_passwd, cal_firstname,cal_email) VALUES ('" . $row2['unix_group_name'] . "','qdkqshjddoshd','" . addslashes($row2['group_name']) . "','" . $row2['email'] . "')";
-
-
- //get for admin of project
- $query_user_group = "SELECT user_group.user_id,user_name,email from user_group,users WHERE user_group.user_id = users.user_id AND group_id = '".$row2['group_id']."' AND admin_flags = 'A'" ;
- //print $query_user_group ;
- $res_user_group = db_query($query_user_group);
-
- //get the email of the admin
- $query_mail ="SELECT cal_email FROM webcal_user WHERE cal_login = '".$row2['unix_group_name']."'";
- $res_mail = db_query($query_mail);
- $row_mail = db_fetch_array($res_mail);
- $mail = $row_mail['cal_email'];
-
- if($res_user_group){
- while($row_user_group = db_fetch_array($res_user_group)) {
- $insert_ass = "INSERT INTO webcal_asst (cal_boss, cal_assistant) VALUES ('".$row2['unix_group_name']."','".$row_user_group['user_name']."')";
- $cal_res = db_query($insert_ass);
-
- //add email
- $mail = str_replace($row_user_group['email'],"",$mail);
- $mail = str_replace(",".$row_user_group['email'],"",$mail);
-
- if($mail == ""){
- $virgule = "";
- }
- else {
- $virgule = ",";
- }
- $mail = $mail.$virgule.$row_user_group['email'] ;
-
- }
- $update = "UPDATE webcal_user SET cal_email = '".trim($mail,',')."' WHERE cal_login = '".$row2['unix_group_name']."'" ;
- db_query($update);
-
- }
- $cal_res = db_query($cal_query2);
-
-}
-
-
-//link
-
-$query_hierarchy = "select p1.group_id as father_id,p1.unix_group_name as father_unix_name,p1.group_name as father_name,p2.group_id as son_id,p2.unix_group_name as son_unix_name,p2.group_name as son_name from groups as p1,groups as p2,plugin_projects_hierarchy where p1.group_id=plugin_projects_hierarchy.project_id and p2.group_id=plugin_projects_hierarchy.sub_project_id and plugin_projects_hierarchy.activated='t' AND plugin_projects_hierarchy.link_type='shar'";
-$res_hierarchy = db_query($query_hierarchy);
-if($res_hierarchy){
- while($row_hierarchy = db_fetch_array($res_hierarchy)) {
- $query_entry = "SELECT cal_id FROM webcal_entry_user WHERE cal_login = '".$row_hierarchy['son_unix_name']."' AND cal_status = 'A'" ;
- $res_entry = db_query($query_entry);
- if($res_entry){
- while($row_entry = db_fetch_array($res_entry)) {
- $insert_entry = "INSERT INTO webcal_entry_user (cal_id,cal_login,cal_status) VALUES ('".$row_entry['cal_id']."','".$row_hierarchy['father_unix_name']."','A')";
- $res_insert_entry = db_query($insert_entry);
- }
- }
- }
-
- }
-
-//admin
-
-$query_flags = "SELECT value, user_id, group_id FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND role_setting.section_name = 'webcal'" ;
- //$query_flags = "SELECT admin_flags FROM user_group WHERE user_id = '".$params[0]."' AND group_id = '".$params[1]."'";
- $res = db_query($query_flags);
- if($res){
- while( $row_flags = db_fetch_array($res)){
-
-
-
- //get user name :
- $query_nom_boss = "SELECT unix_group_name FROM groups WHERE group_id = '".$row_flags['group_id']."' ";
- $res_nom_boss = db_query($query_nom_boss);
- $row_nom_boss = db_fetch_array($res_nom_boss);
-
-
- $query_nom_user = "SELECT user_name FROM users WHERE user_id = '".$row_flags['user_id']."' ";
- $res_nom_user = db_query($query_nom_user);
- $row_nom_user = db_fetch_array($res_nom_user);
-
- //webcal admin flags
- $query_flags = "SELECT COUNT(*) FROM webcal_asst WHERE cal_boss = '".$row_nom_boss['unix_group_name']."' AND cal_assistant = '".$row_nom_user['user_name']."'";
- $res_count = db_query($query_flags);
- $row_num = db_fetch_array($res_count);
-
- //select email
- $query_mail ="SELECT cal_email FROM webcal_user WHERE cal_login = '".$row_nom_boss['unix_group_name']."'";
- $res_mail = db_query($query_mail);
- $row_mail = db_fetch_array($res_mail);
-
- if(($row_num[0] != 1 ) && ($row_flags['value'] == 1)){
- //recuperer le nom du user et du group
- $insert_ass = "INSERT INTO webcal_asst (cal_boss, cal_assistant) VALUES ('".$row_nom_boss['unix_group_name']."','".$row_nom_user['user_name']."')";
- $res_insert = db_query($insert_ass);
-
- //we add email of the new admin
- $mail = $row_mail['cal_email'].",".$row_nom_user['email'] ;
- $update = "UPDATE webcal_user SET cal_email = '".$mail."' WHERE cal_login = '".$row_nom_boss['unix_group_name']."'" ;
- db_query($update);
- }
- elseif($row_num[0] == 1 && ($row_flags['value'] != 1)){
- $del_ass = "DELETE FROM webcal_asst WHERE cal_boss = '".$row_nom_boss['unix_group_name']."' AND cal_assistant = '".$row_nom_user['user_name']."'";
- $res_del = db_query($del_ass);
-
- //we del email of the old admin
- $mail = str_replace(",".$row_nom_user['email'],"",$row_mail['cal_email']) ;
- $update = "UPDATE webcal_user SET cal_email = '".$mail."' WHERE cal_login = '".$row_nom_boss['unix_group_name']."'" ;
- db_query($update);
- }
- }
- }
-
-
-
-
-?>
+<?php
+
+
+//create the config file for webcalendar
+$fichier_conf = "<?\n" .
+ "install_password: 764b9c698569b4e77fd69db363fef414" .
+ "\ndb_type: postgresql" .
+ "\ndb_host: ".$sys_gfdbhost.
+ "\ndb_database: ".$sys_gfdbname.
+ "\ndb_login: ".$sys_gfdbuser.
+ "\ndb_password: ".$sys_gfdbpasswd.
+ "\ndb_persistent: true" .
+ "\nsingle_user_login:" .
+ "\nreadonly: false" .
+ "\nuse_http_auth: false" .
+ "\nsingle_user: false" .
+ "\nuser_inc: user.php" .
+ "\n?>" ;
+
+$handle = fopen($sys_plugins_path . $pluginname . "/www/includes/settings.php", "w");
+fwrite($handle,$fichier_conf);
+fclose($handle);
+
+//user
+$query = "SELECT user_name,user_pw,email,user_id FROM users WHERE NOT user_name='None' AND user_id > 99";
+$res = db_query($query);
+echo db_error();
+while ($row = db_fetch_array($res)) {
+ //verify if admin
+ $query_flags = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$row['user_id']."' AND admin_flags = 'A' AND group_id = '1'";
+ $res_flags = db_query($query_flags) ;
+ $row_flags = db_fetch_array($res_flags) ;
+ $cal_query = "INSERT INTO webcal_user (cal_login, cal_passwd, cal_email,cal_firstname, cal_is_admin) VALUES ('" . $row['user_name'] . "','" . $row['user_pw'] . "','" . $row['email'] . "','" . $row['user_name'] . "'";
+ if ($row_flags[0] == 1)
+ $cal_query .= ",'Y')";
+ else
+ $cal_query .= ",'N')";
+
+ $cal_res = db_query($cal_query);
+
+}
+
+//group
+
+$query2 = "SELECT unix_group_name,groups.group_id,group_name,email FROM groups,users,user_group WHERE groups.group_id >5 AND groups.group_id = user_group.group_id AND user_group.user_id = users.user_id AND user_group.admin_flags = 'A' ";
+$res2 = db_query($query2);
+while ($row2 = db_fetch_array($res2)) {
+ $cal_query2 = "INSERT INTO webcal_user (cal_login, cal_passwd, cal_firstname,cal_email) VALUES ('" . $row2['unix_group_name'] . "','qdkqshjddoshd','" . addslashes($row2['group_name']) . "','" . $row2['email'] . "')";
+
+
+ //get for admin of project
+ $query_user_group = "SELECT user_group.user_id,user_name,email from user_group,users WHERE user_group.user_id = users.user_id AND group_id = '".$row2['group_id']."' AND admin_flags = 'A'" ;
+ //print $query_user_group ;
+ $res_user_group = db_query($query_user_group);
+
+ //get the email of the admin
+ $query_mail ="SELECT cal_email FROM webcal_user WHERE cal_login = '".$row2['unix_group_name']."'";
+ $res_mail = db_query($query_mail);
+ $row_mail = db_fetch_array($res_mail);
+ $mail = $row_mail['cal_email'];
+
+ if($res_user_group){
+ while($row_user_group = db_fetch_array($res_user_group)) {
+ $insert_ass = "INSERT INTO webcal_asst (cal_boss, cal_assistant) VALUES ('".$row2['unix_group_name']."','".$row_user_group['user_name']."')";
+ $cal_res = db_query($insert_ass);
+
+ //add email
+ $mail = str_replace($row_user_group['email'],"",$mail);
+ $mail = str_replace(",".$row_user_group['email'],"",$mail);
+
+ if($mail == ""){
+ $virgule = "";
+ }
+ else {
+ $virgule = ",";
+ }
+ $mail = $mail.$virgule.$row_user_group['email'] ;
+
+ }
+ $update = "UPDATE webcal_user SET cal_email = '".trim($mail,',')."' WHERE cal_login = '".$row2['unix_group_name']."'" ;
+ db_query($update);
+
+ }
+ $cal_res = db_query($cal_query2);
+
+}
+
+
+//link
+
+$query_hierarchy = "select p1.group_id as father_id,p1.unix_group_name as father_unix_name,p1.group_name as father_name,p2.group_id as son_id,p2.unix_group_name as son_unix_name,p2.group_name as son_name from groups as p1,groups as p2,plugin_projects_hierarchy where p1.group_id=plugin_projects_hierarchy.project_id and p2.group_id=plugin_projects_hierarchy.sub_project_id and plugin_projects_hierarchy.activated='t' AND plugin_projects_hierarchy.link_type='shar'";
+$res_hierarchy = db_query($query_hierarchy);
+if($res_hierarchy){
+ while($row_hierarchy = db_fetch_array($res_hierarchy)) {
+ $query_entry = "SELECT cal_id FROM webcal_entry_user WHERE cal_login = '".$row_hierarchy['son_unix_name']."' AND cal_status = 'A'" ;
+ $res_entry = db_query($query_entry);
+ if($res_entry){
+ while($row_entry = db_fetch_array($res_entry)) {
+ $insert_entry = "INSERT INTO webcal_entry_user (cal_id,cal_login,cal_status) VALUES ('".$row_entry['cal_id']."','".$row_hierarchy['father_unix_name']."','A')";
+ $res_insert_entry = db_query($insert_entry);
+ }
+ }
+ }
+
+ }
+
+//admin
+
+$query_flags = "SELECT value, user_id, group_id FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND role_setting.section_name = 'webcal'" ;
+ //$query_flags = "SELECT admin_flags FROM user_group WHERE user_id = '".$params[0]."' AND group_id = '".$params[1]."'";
+ $res = db_query($query_flags);
+ if($res){
+ while( $row_flags = db_fetch_array($res)){
+
+
+
+ //get user name :
+ $query_nom_boss = "SELECT unix_group_name FROM groups WHERE group_id = '".$row_flags['group_id']."' ";
+ $res_nom_boss = db_query($query_nom_boss);
+ $row_nom_boss = db_fetch_array($res_nom_boss);
+
+
+ $query_nom_user = "SELECT user_name FROM users WHERE user_id = '".$row_flags['user_id']."' ";
+ $res_nom_user = db_query($query_nom_user);
+ $row_nom_user = db_fetch_array($res_nom_user);
+
+ //webcal admin flags
+ $query_flags = "SELECT COUNT(*) FROM webcal_asst WHERE cal_boss = '".$row_nom_boss['unix_group_name']."' AND cal_assistant = '".$row_nom_user['user_name']."'";
+ $res_count = db_query($query_flags);
+ $row_num = db_fetch_array($res_count);
+
+ //select email
+ $query_mail ="SELECT cal_email FROM webcal_user WHERE cal_login = '".$row_nom_boss['unix_group_name']."'";
+ $res_mail = db_query($query_mail);
+ $row_mail = db_fetch_array($res_mail);
+
+ if(($row_num[0] != 1 ) && ($row_flags['value'] == 1)){
+ //recuperer le nom du user et du group
+ $insert_ass = "INSERT INTO webcal_asst (cal_boss, cal_assistant) VALUES ('".$row_nom_boss['unix_group_name']."','".$row_nom_user['user_name']."')";
+ $res_insert = db_query($insert_ass);
+
+ //we add email of the new admin
+ $mail = $row_mail['cal_email'].",".$row_nom_user['email'] ;
+ $update = "UPDATE webcal_user SET cal_email = '".$mail."' WHERE cal_login = '".$row_nom_boss['unix_group_name']."'" ;
+ db_query($update);
+ }
+ elseif($row_num[0] == 1 && ($row_flags['value'] != 1)){
+ $del_ass = "DELETE FROM webcal_asst WHERE cal_boss = '".$row_nom_boss['unix_group_name']."' AND cal_assistant = '".$row_nom_user['user_name']."'";
+ $res_del = db_query($del_ass);
+
+ //we del email of the old admin
+ $mail = str_replace(",".$row_nom_user['email'],"",$row_mail['cal_email']) ;
+ $update = "UPDATE webcal_user SET cal_email = '".$mail."' WHERE cal_login = '".$row_nom_boss['unix_group_name']."'" ;
+ db_query($update);
+ }
+ }
+ }
+
+
+
+
+?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,6 +1,25 @@
<?php
include_once 'includes/init.php';
+//Debug
+logs($log_file,"####### admin.php #######\n");
+//Debug
+
+//Debug
+logs($log_file,"login : ".$login."\n");
+//Debug
+
+if(isset($_GET['type_param'])){
+ $type_cal=$_GET['type_param'];
+}else{
+ $type_cal='user';
+}
+
+if(isset($_GET['group_param'])){
+ $group_cal=$_GET['group_param'];
+}
+
+
function print_color_sample ( $color ) {
echo "<table style=\"border-width:0px;\"><tr><td style=\"background-color:$color;\"> </td></tr></table>";
}
@@ -36,7 +55,7 @@
$error = true;
}
if ( ! $error ) {
- echo "<a title=\"" . translate("Admin") . "\" class=\"nav\" href=\"adminhome.php\">« " . translate("Admin") . "</a><br /><br />\n";
+ echo "<a title=\"" . translate("Admin") . "\" class=\"nav\" href=\"adminhome.php".($GLOBALS['type_param']=='group'? "?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'] : "?type_param=".$GLOBALS['type_param'])."\">« " . translate("Admin") . "</a><br /><br />\n";
}
if ( empty ( $ovrd ) && ! $error ) {
@@ -62,9 +81,18 @@
if ( ! $error ) {
?>
-<form action="admin_handler.php" method="post" onsubmit="return valid_form(this);" name="prefform">
+<form action="admin_handler.php?<?php// echo ($GLOBALS['type_param']=='group' ? "type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'] : "type_param=".$GLOBALS['type_param']) ?>" method="post" onsubmit="return valid_form(this);" name="prefform">
<table style="border-width:0px;"><tr><td>
<input type="submit" value="<?php etranslate("Save")?>" name="" />
+
+<?php
+ $echo = "<input type=\"hidden\" value=\"".$GLOBALS['type_param']."\" name=\"type_param\" />";
+ if($GLOBALS['type_param']=='group'){
+ $echo2 = "<input type=\"hidden\" value=\"".$GLOBALS['group_param']."\" name=\"group_param\" />";
+ }
+ echo $echo;
+ echo $echo2;
+?>
</td></tr></table>
<br />
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin_handler.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin_handler.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/admin_handler.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -2,6 +2,28 @@
/* $Id: admin_handler.php,v 1.7.4.4 2006/03/23 16:06:06 cknudsen Exp $ */
include_once 'includes/init.php';
+//Debug
+logs($log_file,"####### admin_handler.php #######\n");
+//Debug
+
+//Debug
+logs($log_file,"login : ".$login."\n");
+//Debug
+
+if(isset($_POST['type_param'])){
+ $GLOBALS['type_param']=$_POST['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
+}
+
+if(isset($_POST['group_param'])){
+ $GLOBALS['group_param']=$_POST['group_param'];
+}
+
+//Debug
+logs($log_file, 'type : '.$GLOBALS['type_param']);
+//Debug
+
$error = "";
if ( ! $is_admin ) {
@@ -10,41 +32,63 @@
if ( $error == "" ) {
while ( list ( $key, $value ) = each ( $HTTP_POST_VARS ) ) {
- $setting = substr ( $key, 6 );
- if ( $key == 'ovrd' )
- continue;
- // validate key name. should start with "admin_" and not include
- // any unusual characters that might cause SQL injection
- if ( ! preg_match ( '/admin_[A-Za-z0-9_]+$/', $key ) ) {
- die_miserable_death ( 'Invalid admin setting name "' .
- $key . '"' );
- }
- if ( strlen ( $setting ) > 0 ) {
- $sql = "DELETE FROM webcal_config WHERE cal_setting = '$setting'";
- if ( ! dbi_query ( $sql ) ) {
- $error = translate("Error") . ": " . dbi_error () .
- "<br /><br /><span style=\"font-weight:bold;\">SQL:</span> $sql";
- break;
+
+ //Debug
+ logs($log_file, "key : ".strcmp ( $key, "type_param"));
+ //Debug
+
+ if ( (strcmp ( $key, "type_param") != 0 ) && (strcmp ( $key, "group_param") != 0) ){
+
+ //Debug
+ logs($log_file, "key : ".$key);
+ //Debug
+
+ $setting = substr ( $key, 6 );
+ if ( $key == 'ovrd' )
+ continue;
+ // validate key name. should start with "admin_" and not include
+ // any unusual characters that might cause SQL injection
+ if ( ! preg_match ( '/admin_[A-Za-z0-9_]+$/', $key ) ) {
+ die_miserable_death ( 'Invalid admin setting name "' .
+ $key . '"' );
}
- if ( strlen ( $value ) > 0 ) {
- $sql = "INSERT INTO webcal_config " .
- "( cal_setting, cal_value ) VALUES " .
- "( '$setting', '$value' )";
+ if ( strlen ( $setting ) > 0 ) {
+ $sql = "DELETE FROM webcal_config WHERE cal_setting = '$setting'";
if ( ! dbi_query ( $sql ) ) {
$error = translate("Error") . ": " . dbi_error () .
"<br /><br /><span style=\"font-weight:bold;\">SQL:</span> $sql";
break;
}
+ if ( strlen ( $value ) > 0 ) {
+ $sql = "INSERT INTO webcal_config " .
+ "( cal_setting, cal_value ) VALUES " .
+ "( '$setting', '$value' )";
+ if ( ! dbi_query ( $sql ) ) {
+ $error = translate("Error") . ": " . dbi_error () .
+ "<br /><br /><span style=\"font-weight:bold;\">SQL:</span> $sql";
+ break;
+ }
+ }
}
}
}
}
+$u_url = "type_param=".$GLOBALS['type_param'];
+if($GLOBALS['type_param'] == 'group'){
+ $u_url .= "&group_param=".$GLOBALS['group_param'];
+}
+
+//Debug
+logs($log_file,"u_url : ".$u_url);
+//Debug
+
if ( empty ( $error ) ) {
- if ( empty ( $ovrd ) )
- do_redirect ( "admin.php" );
- else
- do_redirect ( "admin.php?ovrd=$ovrd" );
+ if ( empty ( $ovrd ) ){
+ do_redirect ( "admin.php?".$u_url );
+ }else{
+ do_redirect ( "admin.php?ovrd=".$ovrd."&".$u_url );
+ }
}
print_header();
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/adminhome.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/adminhome.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/adminhome.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -9,8 +9,32 @@
Security:
Users will see different options available on this page.
*/
+
include_once 'includes/init.php';
+include_once 'includes/user.php';
+//Debug
+logs($log_file,"####### admin_home.php #######\n");
+//Debug
+
+//Debug
+logs($log_file,"admin_home.php _ login : ".$login."\n");
+//Debug
+
+if(isset($_GET['type_param'])){
+ $type_cal=$_GET['type_param'];
+}else{
+ $type_cal='user';
+}
+
+if(isset($_GET['group_param'])){
+ $group_cal=$_GET['group_param'];
+}
+
+//Debug
+logs($log_file,"admin_home.php : group : ".$group_cal."\n");
+//Debug
+
$COLUMNS = 3;
$style = "<style type=\"text/css\">
@@ -58,12 +82,33 @@
$links = array ();
if ($is_admin) {
- $names[] = translate("System Settings");
- $links[] = "admin.php";
+ if ($type_cal=='group'){
+
+ if(user_project_role($login,$group_cal) == '3'){
+ $names[] = translate("System Settings");
+ $links[] = "admin.php?type_param=".$type_cal."&group_param=".$group_cal;
+ }
+
+ }else{
+
+ $names[] = translate("System Settings");
+ $links[] = "admin.php?type_param=".$type_cal;
+
+ }
}
-$names[] = translate("Preferences");
-$links[] = "pref.php";
+
+if ($type_cal=='group'){
+
+ $names[] = translate("Preferences");
+ $links[] = "pref.php?type_param=".$type_cal."&group_param=".$group_cal;
+
+}else {
+
+ $names[] = translate("Preferences");
+ $links[] = "pref.php?type_param=".$type_cal;
+
+}
//remove user admin
/*
if ( $is_admin ) {
@@ -75,44 +120,89 @@
}
*/
-if ( $single_user != 'Y' ) {
+/*if ( $single_user != 'Y' ) {
$names[] = translate("Assistants");
$links[] = "assistant_edit.php";
-}
+}*/
if ( $categories_enabled == 'Y' ) {
- $names[] = translate("Categories");
- $links[] = "category.php";
+ if ($type_cal=='group'){
+
+ if(user_project_role($login,$group_cal) >= '1'){
+ $names[] = translate("Categories");
+ $links[] = "category.php?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }
+
+ }else{
+ $names[] = translate("Categories");
+ $links[] = "category.php?type_param=".$GLOBALS['type_param'];
+ }
}
-$names[] = translate("Views");
-$links[] = "views.php";
+if ($type_cal=='group'){
+ if(user_project_role($login,$group_cal) >= '1'){
+ $names[] = translate("Views");
+ $links[] = "views.php?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }
+}else{
+ $names[] = translate("Views");
+ $links[] = "views.php?type_param=".$GLOBALS['type_param'];
+}
-$names[] = translate("Layers");
-$links[] = "layers.php";
+if ($type_cal=='group' && user_project_role($login,$group_cal) >= '1' ){
+ $names[] = translate("Layers");
+ $links[] = "layers.php?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+}else{
+ $names[] = translate("Layers");
+ $links[] = "layers.php?type_param=".$GLOBALS['type_param'];
+}
if ( $reports_enabled == 'Y' ) {
- $names[] = translate("Reports");
- $links[] = "report.php";
+ if ($type_cal=='group' && user_project_role($login,$group_cal) >= '1' ){
+ $names[] = translate("Reports");
+ $links[] = "report.php?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }else{
+ $names[] = translate("Reports");
+ $links[] = "report.php?type_param=".$GLOBALS['type_param'];
+ }
}
if ( $is_admin ) {
- $names[] = translate("Delete Events");
- $links[] = "purge.php";
+ if ($type_cal=='group' && user_project_role($login,$group_cal) >= '1' ){
+ $names[] = translate("Delete Events");
+ $links[] = "purge.php?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
- $names[] = translate("Activity Log");
- $links[] = "activity_log.php";
+ $names[] = translate("Activity Log");
+ $links[] = "activity_log.php?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }else{
+ $names[] = translate("Delete Events");
+ $links[] = "purge.php?type_param=".$GLOBALS['type_param'];
+
+ $names[] = translate("Activity Log");
+ $links[] = "activity_log.php?type_param=".$GLOBALS['type_param'];
+ }
}
if ( $is_admin && ! empty ($public_access) && $public_access == 'Y' ) {
- $names[] = translate("Public Preferences");
- $links[] = "pref.php?public=1";
+ if ($type_cal=='group' && user_project_role($login,$group_cal) >= '1' ){
+ $names[] = translate("Public Preferences");
+ $links[] = "pref.php?public=1&type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }else{
+ $names[] = translate("Public Preferences");
+ $links[] = "pref.php?public=1&type_param=".$GLOBALS['type_param'];
+ }
}
if ( $is_admin && ! empty ( $public_access ) && $public_access == 'Y' &&
$public_access_can_add == 'Y' && $public_access_add_needs_approval == 'Y' ) {
- $names[] = translate("Unapproved Public Events");
- $links[] = "list_unapproved.php?user=__public__";
+
+ if ($type_cal=='group' && user_project_role($login,$group_cal) >= '1' ){
+ $names[] = translate("Unapproved Public Events");
+ $links[] = "list_unapproved.php?user=__public__&type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }else{
+ $names[] = translate("Unapproved Public Events");
+ $links[] = "list_unapproved.php?user=__public__&type_param=".$GLOBALS['type_param'];
+ }
}
?>
@@ -126,7 +216,7 @@
echo "<td>";
if ( ! empty ($links[$i]) )
echo "<a href=\"$links[$i]\">";
- echo $names[$i];
+ echo $names[$i];
if ( ! empty ($links[$i]) )
echo "</a>";
echo "</td>\n";
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/approve_entry.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/approve_entry.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/approve_entry.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -15,16 +15,78 @@
$app_user = ( $is_assistant || $is_nonuser_admin ? $user : $login );
if ( empty ( $error ) && $id > 0 ) {
- if ( ! dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'A' " .
- "WHERE cal_login = '$app_user' AND cal_id = $id" ) ) {
- $error = translate("Error approving event") . ": " . dbi_error ();
- //plugin add father
- $params[0] = $app_user ;
- $params[1] = $id ;
- plugin_hook('add_cal_link_father_event',$params);
+
+ $res = dbi_query ( "select COUNT(*) as num FROM webcal_entry_user WHERE cal_status = 'W' " .
+ "AND cal_login = '$app_user' AND cal_id = ".$id );
+ if(!$res || $res['num'] < 1 ){
+ $result = dbi_query ( "SELECT * FROM webcal_entry_user WHERE cal_id = ".$id);
+ while ($trait = dbi_fetch_row($result)) {
+ if($trait['cal_group_status'] == null){
+ dbi_query ( "UPDATE webcal_entry_user SET cal_group_status = ',A:".$app_user.",' " .
+ "WHERE cal_id = ".$id." AND cal_login = '".$trait['cal_login']."'" );
+ }else{
+ //Get the users who approved the event
+ $res_grp_status = dbi_query("select cal_group_status
+ from webcal_entry_user
+ where cal_id=".$id." and cal_login='".$app_user."'");
+ $grp_status = dbi_fetch_row($res_grp_status);
+ if( !ereg('A:'.$app_user,$grp_status) ){
+ dbi_query ( "UPDATE webcal_entry_user SET cal_group_status = cal_group_status||',A:".$app_user.",' " .
+ "WHERE cal_id = ".$id." AND cal_login = '".$trait['cal_login']."'" );
+ }
+ }
+ }
- } else {
- activity_log ( $id, $login, $app_user, $LOG_APPROVE, "" );
+ //Get the groups of the user for this entry
+ $res_grps = dbi_query ( "select distinct(gu.cal_group_id),g.cal_name
+ from webcal_group_user gu, webcal_group g, webcal_entry_user eu
+ where gu.cal_login = '".$login."'
+ and g.cal_group_id = gu.cal_group_id
+ and g.cal_name = eu.cal_login
+ and eu.cal_id=".$id);
+ if ( $res_grps ) {
+ while ($group = dbi_fetch_row($res_grps) ){
+ //Get the users for the group
+ $res_users = dbi_query("select gu.cal_login
+ from webcal_group_user gu, webcal_entry e
+ where gu.cal_group_id=".$group["cal_group_id"]."
+ and e.cal_create_by <> gu.cal_login
+ and e.cal_id=".$id);
+ //Get the users who approved the event
+ $res_grp_status = dbi_query("select cal_group_status
+ from webcal_entry_user eu, webcal_group g
+ where cal_id=".$id." and eu.cal_login=g.cal_name and g.cal_group_id='".$group["cal_group_id"]."'");
+ $grp_status = dbi_fetch_row($res_grp_status);
+ $all_approve=1;
+ //Control if all the users for the group have approve the event
+ while ( $eu_user = dbi_fetch_row($res_users) ) {
+ if( strpos($grp_status["cal_group_status"],"A:".$eu_user["cal_login"])==false ){
+ $all_approve=0;
+ }
+ }
+
+ if($all_approve==1){
+ dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'A' " .
+ "WHERE cal_login = '".$group["cal_name"]."' AND cal_id = ".$id );
+ }
+ }
+ }
+
+ //update the line of the user
+ dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'A' " .
+ "WHERE cal_login = '".$app_user."' AND cal_id = ".$id );
+ }else {
+ if ( ! dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'A' " .
+ "WHERE cal_login = '".$app_user."' AND cal_id = ".$id ) ) {
+ $error = translate("Error approving event") . ": " . dbi_error ();
+ //plugin add father
+ $params[0] = $app_user ;
+ $params[1] = $id ;
+ plugin_hook('add_cal_link_father_event',$params);
+
+ } else {
+ activity_log ( $id, $login, $app_user, $LOG_APPROVE, "" );
+ }
}
// Update any extension events related to this one.
$res = dbi_query ( "SELECT cal_id FROM webcal_entry " .
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/day.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/day.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/day.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,6 +1,87 @@
<?php
include_once 'includes/init.php';
+global $get_unapproved;
+$get_unapproved = $GLOBALS['DISPLAY_UNAPPROVED']=='Y';
+
+//Debug
+logs($log_file,"####### day.php #######\n");
+//Debug
+
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
+}
+
+//Debug
+logs($log_file,"type : ".$GLOBALS['type_param']."\n");
+//Debug
+
+global $user;
+
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+
+ $res=dbi_query("select unix_group_name from groups where group_id=".$GLOBALS['group_param']);
+ $row = pg_fetch_array($res);
+ $GLOBALS['group_name_param']=$row[0];
+ $user = $GLOBALS['group_name_param'];
+}else{
+ $user = $login;
+}
+
+
+if($GLOBALS['type_param']=='group' && isset($_GET['group_param'])){
+
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$group_cal);
+
+ //Debug
+ logs($log_file,"trailer.php : role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+ //Debug
+}
+
+/*$can_add=false;
+if($GLOBALS['type_param'] == 'group' && $role_user >=2 ){
+ $can_add = true;
+ //debug
+ logs($log_file,"edit_entry_handler.php : can_modify \n");
+ //debug
+}else{
+ if($GLOBALS['type_param'] == 'user'){
+ $can_add = true;
+ }
+}*/
+
+//Determine the info type
+if($GLOBALS['type_param']=='group'){
+ $info_type="type_param=group&group_param=".$GLOBALS['group_param']."&";
+}else{
+ $info_type="type_param=user&";
+}
+
+//Determine if the user can add event on this calendar
+$can_add = Can_Add($login,$GLOBALS['type_param'],$GLOBALS['group_param']);
+
+//debug
+if($can_add){
+ logs($log_file,"CAN ADD\n");
+}else{
+ logs($log_file,"!!!!!!! CAN'T ADD !!!!!!!\n");
+}
+//Debug
+
+//Debug
+logs($log_file,"day.php:\n");
+logs($log_file,"GET:".print_r($_GET,true)." \n");
+//Debug
+
+//Debug
+logs($log_file,"day.php : type : ".$GLOBALS['type_param']."\n");
+//Debug
+
+
if (($user != $login) && $is_nonuser_admin)
load_user_layers ($user);
else
@@ -34,6 +115,16 @@
$startdate = sprintf ( "%04d%02d01", $thisyear, $thismonth );
$enddate = sprintf ( "%04d%02d31", $thisyear, $thismonth );
+if($GLOBALS['type_param'] == 'group'){
+ $u_url .= "type_param=group&group_param=".$GLOBALS['group_param']."&";
+}else{
+ $u_url .= "type_param=user&";
+}
+
+//Debug
+logs($log_file,"type : ".$GLOBALS['type_param']." u_url : ".$u_url."\n");
+//Debug
+
$HeadX = '';
if ( $auto_refresh == "Y" && ! empty ( $auto_refresh_time ) ) {
$refresh = $auto_refresh_time * 60; // convert to seconds
@@ -45,13 +136,26 @@
?>
<?php
+//Debug
+logs($log_file, "UNAPPROVED : ".$GLOBALS['DISPLAY_UNAPPROVED']."\n");
+logs($log_file,"avant repeat_event \n");
+//Debug
+
/* Pre-Load the repeated events for quckier access */
$repeated_events = read_repeated_events ( empty ( $user ) ? $login : $user,
$cat_id, $startdate );
+//Debug
+logs($log_file,"après repeat_event".print_r($repeated_events,true)."\n avant no repeat_event\n");
+//Debug
+
/* Pre-load the non-repeating events for quicker access */
$events = read_events ( empty ( $user ) ? $login : $user, $startdate, $enddate,
$cat_id );
+
+//Debug
+logs($log_file,"après no repeat_event".print_r($events,true)."\n");
+//Debug
?>
<table>
@@ -65,14 +169,22 @@
?></span>
<span class="user"><?php
// display current calendar's user (if not in single user)
- if ( $single_user == "N" ) {
+ /*if ( $single_user == "N" ) {
echo "<br />";
echo $user_fullname;
}
if ( $is_nonuser_admin )
echo "<br />-- " . translate("Admin mode") . " --";
if ( $is_assistant )
- echo "<br />-- " . translate("Assistant mode") . " --";
+ echo "<br />-- " . translate("Assistant mode") . " --";*/
+echo "<br />";
+if($GLOBALS['type_param'] == 'group'){
+ $res = dbi_query("SELECT group_name from groups where unix_group_name = '".$GLOBALS['group_name_param']."'");
+ $row = pg_fetch_array($res);
+ echo $row[0];
+}else{
+ echo $login;
+}
?></span>
<?php
if ( $categories_enabled == "Y" && (!$user || ($user == $login || $is_assistant ))) {
@@ -86,7 +198,7 @@
<td style="vertical-align:top;" rowspan="2">
<!-- START MINICAL -->
<div class="minicalcontainer">
-<?php display_small_month ( $thismonth, $thisyear, true ); ?>
+<?php display_small_month ( $thismonth, $thisyear, true, false, '', "month.php?", $info_type); ?>
</div>
</td></tr><tr><td>
<table class="glance" cellspacing="0" cellpadding="0">
@@ -117,4 +229,4 @@
<?php print_trailer (); ?>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/del_entry.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/del_entry.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/del_entry.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,53 +1,73 @@
<?php
+
include_once 'includes/init.php';
+//Debug
+logs($log_file,"####### del_entry.php #######\n");
+//Debug
+
$my_event = false;
-$can_edit = false;
+//$can_edit = false;
-// First, check to see if this user should be able to delete this event.
-if ( $id > 0 ) {
- // first see who has access to edit this entry
- if ( $is_admin ) {
- $can_edit = true;
- } else if ( $readonly == "Y" ) {
- $can_edit = false;
- } else {
- $can_edit = false;
- $sql = "SELECT webcal_entry.cal_id FROM webcal_entry, " .
- "webcal_entry_user WHERE webcal_entry.cal_id = " .
- "webcal_entry_user.cal_id AND webcal_entry.cal_id = $id " .
- "AND (webcal_entry.cal_create_by = '$login' " .
- "OR webcal_entry_user.cal_login = '$login')";
- $res = dbi_query ( $sql );
- if ( $res ) {
- $row = dbi_fetch_row ( $res );
- if ( $row && $row[0] > 0 )
- $can_edit = true;
- dbi_free_result ( $res );
- }
- }
+//Récupération du type et du groupe
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
}
-// See who owns the event. Owner should be able to delete.
-$res = dbi_query (
- "SELECT cal_create_by FROM webcal_entry WHERE cal_id = $id" );
-if ( $res ) {
- $row = dbi_fetch_row ( $res );
- $owner = $row[0];
- dbi_free_result ( $res );
+logs($log_file, "Type : ".$GLOBALS['type_param']."\n");
+
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+}
+
+if($GLOBALS['type_param']=='group' && isset($_GET['group_param'])){
+
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$group_cal);
+ $res=dbi_query("select unix_group_name from groups where group_id=".$GLOBALS['group_param']);
+ $row = pg_fetch_array($res);
+ $GLOBALS['group_name_param']=$row[0];
- if ( $owner == $login || $is_assistant && ( $user == $owner ) || $is_nonuser_admin && ( $user == $owner ) ) {
- $my_event = true;
- $can_edit = true;
- }
-
+ //debug
+ logs($log_file,"edit_entry.php : role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+ //debug
}
-if ( $readonly == 'Y' )
- $can_edit = false;
+//debug
+logs($log_file,"Start can_modifiy\n");
+//debug
-if ( ! $can_edit ) {
+$can_modify = Can_Modify($_GET['id'],$login);
+
+/*$can_edit=false;
+if($GLOBALS['type_param'] == 'group' && $role_user >=2 ){
+
+ $can_edit = true;
+
+ //debug
+
+ logs($log_file,"edit_entry_handler.php : can_modify 1 \n");
+ fclose($log);
+ //debug
+
+}else{
+ if($GLOBALS['type_param'] == 'user'){
+ if(isset($id) && $id!="" ){
+ $res = dbi_query("select cal_id
+ from webcal_entry
+ where cal_id = '".$id."'
+ and cal_create_by = '".$login."'");
+ if( pg_numrows($res) ){
+ $can_edit = true;
+ }
+ }
+ }
+}*/
+
+if ( ! $can_modify ) {
$error = translate ( "You are not authorized" );
}
@@ -66,6 +86,10 @@
$override_repeat = true;
}
+//debug
+logs($log_file,"repeating event? \n");
+//debug
+
if ( $id > 0 && empty ( $error ) ) {
if ( ! empty ( $date ) ) {
$thisdate = $date;
@@ -77,6 +101,10 @@
$thisdate = $row[0];
}
}
+
+ //debug
+ logs($log_file,"event date? \n");
+ //debug
// Only allow delete of webcal_entry & webcal_entry_repeats
// if owner or admin, not participant.
@@ -116,7 +144,17 @@
$do_send = get_pref_setting ( $partlogin[$i], "EMAIL_EVENT_DELETED" );
$user_TZ = get_pref_setting ( $partlogin[$i], "TZ_OFFSET" );
$user_language = get_pref_setting ( $partlogin[$i], "LANGUAGE" );
+
+ //debug
+ logs($log_file,"LOAD OF THE USER VARIABLES \n");
+ //debug
+
user_load_variables ( $partlogin[$i], "temp" );
+
+ //debug
+ logs($log_file,"AFTER LOAD OF THE USER VARIABLES \n");
+ //debug
+
// Want date/time in user's timezone
if ( $eventtime != '-1' ) {
$eventtime += ( $user_TZ * 10000 );
@@ -126,7 +164,11 @@
$eventtime -= 240000;
}
}
-
+
+ //debug
+ logs($log_file,"event time ? \n");
+ //debug
+
if ( /*$partlogin[$i] != $login &&*/ $do_send == "Y" && boss_must_be_notified ( $login, $partlogin[$i] ) &&
strlen ( $tempemail ) && $send_email != "N" ) {
if (($GLOBALS['LANGUAGE'] != $user_language) && ! empty ( $user_language ) && ( $user_language != 'none' )){
@@ -148,9 +190,13 @@
mail ( $tempemail,
translate($application_name) . " " .
translate("Notification") . ": " . $name,
- utf8_deconde(html_to_8bits ($msg)), $extra_hdrs );
+ utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
}
}
+
+ //debug
+ logs($log_file,"AFTER SEND MAIL \n");
+ //debug
// Instead of deleting from the database... mark it as deleted
// by setting the status for each participant to "D" (instead
@@ -163,17 +209,22 @@
// If it's a repeating event, delete any event exceptions
// that were entered.
if ( $event_repeats ) {
- $res = dbi_query ( "SELECT cal_id FROM webcal_entry " .
- "WHERE cal_group_id = $id" );
+ $res = dbi_query ( "SELECT cal_id
+ FROM webcal_entry " .
+ "WHERE cal_group_id = $id" );
if ( $res ) {
- $ex_events = array ();
+ $ex_events = array ();
+
while ( $row = dbi_fetch_row ( $res ) ) {
- $ex_events[] = $row[0];
- }
+ $ex_events[] = $row[0];
+ }
+
dbi_free_result ( $res );
+
for ( $i = 0; $i < count ( $ex_events ); $i++ ) {
- $res = dbi_query ( "SELECT cal_login FROM " .
- "webcal_entry_user WHERE cal_id = $ex_events[$i]" );
+ $res = dbi_query ( "SELECT cal_login
+ FROM " . "webcal_entry_user
+ WHERE cal_id = $ex_events[$i]" );
if ( $res ) {
$delusers = array ();
while ( $row = dbi_fetch_row ( $res ) ) {
@@ -182,20 +233,26 @@
dbi_free_result ( $res );
for ( $j = 0; $j < count ( $delusers ); $j++ ) {
// Log the deletion
- activity_log ( $ex_events[$i], $login, $delusers[$j],
- $LOG_DELETE, "" );
- dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'D' " .
- "WHERE cal_id = $ex_events[$i] " .
- "AND cal_login = '$delusers[$j]'" );
+ activity_log ( $ex_events[$i], $login, $delusers[$j],$LOG_DELETE, "" );
+ dbi_query ( "UPDATE webcal_entry_user
+ SET cal_status = 'D' " .
+ "WHERE cal_id = $ex_events[$i] " .
+ "AND cal_login = '$delusers[$j]'" );
}
}
}
- }
+ }
}
+
+ //debug
+ logs($log_file,"AFTER UPDATE OF WEBCAL_ENTRY_USER \n");
+ //debug
+
// Now, mark event as deleted for all users.
- dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'D' " .
- "WHERE cal_id = $id" );
+ dbi_query ( "UPDATE webcal_entry_user
+ SET cal_status = 'D' " .
+ "WHERE cal_id = $id" );
}
} else {
// Not the owner of the event and are not the admin.
@@ -203,22 +260,92 @@
// We could just set the status to 'D' instead of deleting.
// (but we would need to make some changes to edit_entry_handler.php
// to accomodate this).
- dbi_query ( "DELETE FROM webcal_entry_user " .
- "WHERE cal_id = $id AND cal_login = '$login'" );
+ dbi_query ( "DELETE
+ FROM webcal_entry_user " .
+ "WHERE cal_id = $id
+ AND cal_login = '$login'" );
activity_log ( $id, $login, $login, $LOG_REJECT, "" );
}
+
+ //debug
+ logs($log_file,"END IF \n");
+ //debug
}
-$ret = getValue ( "ret" );
+//debug
+logs($log_file,"AFTER IF \n");
+//debug
+
+/*$ret = getValue ( "ret" );
if ( ! empty ( $ret ) && $ret == "list" ) {
$url = "list_unapproved.php";
if ( ! empty ( $user ) )
$url .= "?user=$user";
} else {
$url = get_preferred_view ( "", empty ( $user ) ? "" : "user=$user" );
+}*/
+
+$res = dbi_query("SELECT cal_value
+ FROM webcal_user_pref
+ WHERE cal_login='".$login."'
+ AND cal_setting='STARTVIEW'");
+//debug
+logs($log_file,"view : "."SELECT cal_value
+ FROM webcal_user_pref
+ WHERE cal_login='".$login."'
+ AND cal_setting='STARTVIEW'"."\n");
+//debug
+
+$rows = pg_fetch_row($res);
+$view = $rows[0];
+
+//debug
+logs($log_file,"view : ".print_r($rows,true)."\n");
+//debug
+
+if($view == "" || empty($view)){
+ $res = dbi_query("SELECT cal_value
+ FROM webcal_config
+ WHERE cal_setting='STARTVIEW'");
+ $rows = pg_fetch_row($res);
+
+ //debug
+ logs($log_file,"sql : SELECT cal_value
+ FROM webcal_config
+ WHERE cal_setting='STARTVIEW'\n");
+ logs($log_file,"view : ".print_r($rows,true)."\n");
+ fclose($log);
+ //debug
+
+ $view = $rows[0];
}
+//debug
+logs($log_file,"view : ".$view."\n");
+//debug
+
+//Debug
+logs($log_file,"group_name : ".$GLOBALS['group_name']."\n");
+//Debug
+
+$url = $view.'?user=';
+
+if($GLOBALS['type_param'] == 'group'){
+ $url .= $GLOBALS['group_name_param']."&type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+}else{
+ $url .= $login."&type_param=".$GLOBALS['type_param'];
+}
+
+//Debug
+logs($log_file,"url : ".$url."\n");
+//Debug
+
if ( empty ( $error ) ) {
+
+ //Debug
+ logs($log_file, "Do_redirect \n");
+ //Debug
+
do_redirect ( $url );
exit;
}
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -10,23 +10,125 @@
* SysAdmin must enable HTML for event full descriptions.
* The htmlarea files should be installed so that the htmlarea.php
* file is in ../includes/htmlarea/htmlarea.php
- * The htmlarea code can be downloaded from:
+ * The htmlarea code can be downloaded from
* http://www.htmlarea.com
* TODO
* This file will not pass XHTML validation with HTMLArea enabled
*/
+
include_once 'includes/init.php';
include_once 'includes/site_extras.php';
+//Debug
+logs($log_file,"####### edit_entry.php #######\n");
+logs($log_file,"GET : ".print_r($_GET,true)." \n");
+//Debug
+
load_user_categories ();
+//Récupération du type et du groupe
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
+}
+
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+}
+
+if($GLOBALS['type_param'] == 'group' && isset($_GET['group_param'])){
+
+ //debug
+ logs($log_file,
+ "role : ".$role_user."\nlogin : ".$login."\ntype : ".$GLOBALS['type_param']."\ngroup : ".$GLOBALS['group_param']."\nuser : ".$user."\n" );
+ //debug
+
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$GLOBALS['group_param']);
+
+ //debug
+ logs($log_file,
+ "role : ".$role_user."\nlogin : ".$login."\ntype : ".$GLOBALS['type_param']."\ngroup : ".$GLOBALS['group_param']."\nuser : ".$user."\n" );
+ //debug
+
+}
+
+//debug
+logs($log_file,"edit_entry.php : Start can_modifiy\n");
+//debug
+
+if(isset($_GET['id'])){
+ $can_modify = Can_Modify($_GET['id'],$login);
+}else{
+ $can_modify = false;
+}
+
+$can_add = Can_Add($login,$GLOBALS['type_param'],$GLOBALS['group_param']);
+
+//debug
+if($can_add){
+ logs($log_file,"CAN ADD\n");
+}else{
+ logs($log_file,"!!!!!!! CAN'T ADD !!!!!!!\n");
+}
+
+if($can_modify){
+ logs($log_file,"CAN MODIFY\n");
+}else{
+ logs($log_file,"!!!!!!! CAN'T MODIFY !!!!!!!\n");
+}
+//debug
+
+/*$can_modify=false;
+if($GLOBALS['type_param'] == 'group' && $role_user >=2 ){
+ $can_modify = true;
+ //debug
+ logs($log_file,"edit_entry.php : can_modify 1 \n");
+ //debug
+}else{
+ //debug
+ logs($log_file,"edit_entry.php : can_modify 2.1 \n");
+ //debug
+ if($GLOBALS['type_param'] == 'user'){
+ if(isset($id) && $id!="" ){
+
+ //debug
+ logs($log_file,"select cal_id
+ from webcal_entry
+ where cal_id = '".$id."'
+ and cal_create_by = '".$login."' \n");
+ //debug
+ $res = dbi_query("select cal_id
+ from webcal_entry
+ where cal_id = '".$id."'
+ and cal_create_by = '".$login."'");
+ if( pg_numrows($res) ){
+ $can_modify = true;
+ //debug
+ logs($log_file,"edit_entry.php : can_modify 2 \n");
+ //debug
+ }
+ }else{
+ $can_modify=true;
+ //debug
+ logs($log_file,"edit_entry.php : can_modify 3 \n");
+ //debug
+ }
+ }
+}*/
+
+//debug
+logs($log_file,"edit_entry.php : type 1 : ".$GLOBALS['type_param']." \n");
+//debug
+
// Default for using tabs is enabled
if ( empty ( $EVENT_EDIT_TABS ) )
$EVENT_EDIT_TABS = 'Y'; // default
$useTabs = ( $EVENT_EDIT_TABS == 'Y' );
// make sure this is not a read-only calendar
-$can_edit = false;
+//$can_edit = false;
// Public access can only add events, not edit.
if ( $login == "__public__" && $id > 0 ) {
@@ -36,159 +138,192 @@
$external_users = "";
$participants = array ();
-if ( $readonly == 'Y' ) {
- $can_edit = false;
-} else if ( ! empty ( $id ) && $id > 0 ) {
- // first see who has access to edit this entry
- if ( $is_admin ) {
- $can_edit = true;
- } else {
- $can_edit = false;
- if ( $readonly == "N" || $is_admin ) {
- $sql = "SELECT webcal_entry.cal_id FROM webcal_entry, " .
- "webcal_entry_user WHERE webcal_entry.cal_id = " .
- "webcal_entry_user.cal_id AND webcal_entry.cal_id = $id " .
- "AND (webcal_entry.cal_create_by = '$login' " .
- "OR webcal_entry_user.cal_login = '$login')";
- $res = dbi_query ( $sql );
- if ( $res ) {
- $row = dbi_fetch_row ( $res );
- if ( $row && $row[0] > 0 )
- $can_edit = true;
- dbi_free_result ( $res );
- }
- }
- }
- $sql = "SELECT cal_create_by, cal_date, cal_time, cal_mod_date, " .
+//debug
+logs($log_file,"edit_entry.php : type 2 : ".$GLOBALS['type_param']." \n");
+//debug
+
+//debug
+if ($can_modify){
+ logs($log_file,"can modify \n");
+}else{
+ logs($log_file,"can't modify \n");
+}
+
+if (isset($_GET['id'])){
+ logs($log_file,"id is set \n");
+}else{
+ logs($log_file,"id isn't set \n");
+}
+
+if ($can_add){
+ logs($log_file,"can add \n");
+}else{
+ logs($log_file,"can't add \n");
+}
+//debug
+
+//If event Id is passed AND login can_modify OR event Id is not passed AND login can_add
+if ( ($can_modify && isset($_GET['id'])) || ($can_add && !isset($_GET['id'])) ) {
+
+ //Debug
+ logs($log_file,"test is passed \ncal_date : ".$cal_date."\n");
+ //Debug
+
+ if ( ! empty ( $id ) && $id > 0 ) {
+
+ //Debug
+ logs($log_file,"edit event \n");
+ //Debug
+
+ $sql = "SELECT cal_create_by, cal_date, cal_time, cal_mod_date, " .
"cal_mod_time, cal_duration, cal_priority, cal_type, cal_access, " .
"cal_name, cal_description, cal_group_id FROM webcal_entry WHERE cal_id = " . $id;
- $res = dbi_query ( $sql );
- if ( $res ) {
- $row = dbi_fetch_row ( $res );
- if ( ! empty ( $override ) && ! empty ( $date ) ) {
- // Leave $cal_date to what was set in URL with date=YYYYMMDD
- $cal_date = $date;
- } else {
- $cal_date = $row[1];
- }
- $create_by = $row[0];
- if (( $user == $create_by ) && ( $is_assistant || $is_nonuser_admin )) $can_edit = true;
+ $res = dbi_query ( $sql );
- $year = (int) ( $cal_date / 10000 );
- $month = ( $cal_date / 100 ) % 100;
- $day = $cal_date % 100;
- $time = $row[2];
- // test for AllDay event, if so, don't adjust time
- if ( $time > 0 || ( $time == 0 && $row[5] != 1440 ) ) { /* -1 = no time specified */
- $time += ( ! empty ( $TZ_OFFSET )?$TZ_OFFSET : 0) * 10000;
- if ( $time > 240000 ) {
- $time -= 240000;
- $gmt = mktime ( 3, 0, 0, $month, $day, $year );
- $gmt += $ONE_DAY;
- $month = date ( "m", $gmt );
- $day = date ( "d", $gmt );
- $year = date ( "Y", $gmt );
- } else if ( $time < 0 ) {
- $time += 240000;
- $gmt = mktime ( 3, 0, 0, $month, $day, $year );
- $gmt -= $ONE_DAY;
- $month = date ( "m", $gmt );
- $day = date ( "d", $gmt );
- $year = date ( "Y", $gmt );
+ if ( $res ) {
+ $row = dbi_fetch_row ( $res );
+ if ( ! empty ( $override ) && ! empty ( $date ) ) {
+ // Leave $cal_date to what was set in URL with date=YYYYMMDD
+ $cal_date = $date;
+ } else {
+ $cal_date = $row[1];
}
- // Set alterted date
- $cal_date = sprintf("%04d%02d%02d",$year,$month,$day);
- }
- if ( $time >= 0 ) {
- $hour = floor($time / 10000);
- $minute = ( $time / 100 ) % 100;
- $duration = $row[5];
- } else {
- $duration = "";
- $hour = -1;
- }
- $priority = $row[6];
- $type = $row[7];
- $access = $row[8];
- $name = $row[9];
- $description = $row[10];
- $parent = $row[11];
- // check for repeating event info...
- // but not if we are overriding a single entry of an already repeating
- // event... confusing, eh?
- if ( ! empty ( $override ) ) {
- $rpt_type = "none";
- $rpt_end = 0;
- $rpt_end_date = $cal_date;
- $rpt_freq = 1;
- $rpt_days = "nnnnnnn";
- $rpt_sun = $rpt_mon = $rpt_tue = $rpt_wed =
+ $create_by = $row[0];
+ //if (( $user == $create_by ) && ( $is_assistant || $is_nonuser_admin )) $can_ed = true;
+
+ $year = (int) ( $cal_date / 10000 );
+ $month = ( $cal_date / 100 ) % 100;
+ $day = $cal_date % 100;
+ $time = $row[2];
+ // test for AllDay event, if so, don't adjust time
+ if ( $time > 0 || ( $time == 0 && $row[5] != 1440 ) ) { /* -1 = no time specified */
+ $time += ( ! empty ( $TZ_OFFSET )?$TZ_OFFSET : 0) * 10000;
+ if ( $time > 240000 ) {
+ $time -= 240000;
+ $gmt = mktime ( 3, 0, 0, $month, $day, $year );
+ $gmt += $ONE_DAY;
+ $month = date ( "m", $gmt );
+ $day = date ( "d", $gmt );
+ $year = date ( "Y", $gmt );
+ } else if ( $time < 0 ) {
+ $time += 240000;
+ $gmt = mktime ( 3, 0, 0, $month, $day, $year );
+ $gmt -= $ONE_DAY;
+ $month = date ( "m", $gmt );
+ $day = date ( "d", $gmt );
+ $year = date ( "Y", $gmt );
+ }
+ // Set alterted date
+ $cal_date = sprintf("%04d%02d%02d",$year,$month,$day);
+ }
+
+ if ( $time >= 0 ) {
+ $hour = floor($time / 10000);
+ $minute = ( $time / 100 ) % 100;
+ $duration = $row[5];
+ } else {
+ $duration = "";
+ $hour = -1;
+ }
+
+ $priority = $row[6];
+ $type = $row[7];
+ $access = $row[8];
+ $name = $row[9];
+ $description = $row[10];
+ $parent = $row[11];
+ // check for repeating event info...
+ // but not if we are overriding a single entry of an already repeating
+ // event... confusing, eh?
+
+ if ( ! empty ( $override ) ) {
+ $rpt_type = "none";
+ $rpt_end = 0;
+ $rpt_end_date = $cal_date;
+ $rpt_freq = 1;
+ $rpt_days = "nnnnnnn";
+ $rpt_sun = $rpt_mon = $rpt_tue = $rpt_wed =
$rpt_thu = $rpt_fri = $rpt_sat = false;
- } else {
- $res = dbi_query ( "SELECT cal_id, cal_type, cal_end, " .
- "cal_frequency, cal_days FROM webcal_entry_repeats " .
- "WHERE cal_id = $id" );
- if ( $res ) {
- if ( $row = dbi_fetch_row ( $res ) ) {
- $rpt_type = $row[1];
- if ( $row[2] > 0 )
- $rpt_end = date_to_epoch ( $row[2] );
- else
- $rpt_end = 0;
- $rpt_end_date = $row[2];
- $rpt_freq = $row[3];
- $rpt_days = $row[4];
- $rpt_sun = ( substr ( $rpt_days, 0, 1 ) == 'y' );
- $rpt_mon = ( substr ( $rpt_days, 1, 1 ) == 'y' );
- $rpt_tue = ( substr ( $rpt_days, 2, 1 ) == 'y' );
- $rpt_wed = ( substr ( $rpt_days, 3, 1 ) == 'y' );
- $rpt_thu = ( substr ( $rpt_days, 4, 1 ) == 'y' );
- $rpt_fri = ( substr ( $rpt_days, 5, 1 ) == 'y' );
- $rpt_sat = ( substr ( $rpt_days, 6, 1 ) == 'y' );
+ } else {
+ $res = dbi_query ( "SELECT cal_id, cal_type, cal_end, " .
+ "cal_frequency, cal_days FROM webcal_entry_repeats " .
+ "WHERE cal_id = $id" );
+ if ( $res ) {
+ if ( $row = dbi_fetch_row ( $res ) ) {
+ $rpt_type = $row[1];
+
+ if ( $row[2] > 0 )
+ $rpt_end = date_to_epoch ( $row[2] );
+ else
+ $rpt_end = 0;
+
+ $rpt_end_date = $row[2];
+ $rpt_freq = $row[3];
+ $rpt_days = $row[4];
+ $rpt_sun = ( substr ( $rpt_days, 0, 1 ) == 'y' );
+ $rpt_mon = ( substr ( $rpt_days, 1, 1 ) == 'y' );
+ $rpt_tue = ( substr ( $rpt_days, 2, 1 ) == 'y' );
+ $rpt_wed = ( substr ( $rpt_days, 3, 1 ) == 'y' );
+ $rpt_thu = ( substr ( $rpt_days, 4, 1 ) == 'y' );
+ $rpt_fri = ( substr ( $rpt_days, 5, 1 ) == 'y' );
+ $rpt_sat = ( substr ( $rpt_days, 6, 1 ) == 'y' );
+ }
}
}
}
-
- }
- $sql = "SELECT cal_login, cal_category FROM webcal_entry_user WHERE cal_id = $id";
- $res = dbi_query ( $sql );
- if ( $res ) {
- while ( $row = dbi_fetch_row ( $res ) ) {
- $participants[$row[0]] = 1;
- if ($login == $row[0]) $cat_id = $row[1];
- if ( ( $is_assistant || $is_admin ) && $user == $row[0]) $cat_id = $row[1];
+
+ $sql = "SELECT cal_login, cal_category FROM webcal_entry_user WHERE cal_id = $id";
+ $res = dbi_query ( $sql );
+ if ( $res ) {
+ while ( $row = dbi_fetch_row ( $res ) ) {
+ $participants[$row[0]] = 1;
+ if ($login == $row[0]) $cat_id = $row[1];
+ if ( ( $is_assistant || $is_admin ) && $user == $row[0]) $cat_id = $row[1];
+ }
}
- }
- if ( ! empty ( $allow_external_users ) && $allow_external_users == "Y" ) {
- $external_users = event_get_external_users ( $id );
- }
-} else {
- // New event.
- $id = 0; // to avoid warnings below about use of undefined var
- // Anything other then testing for strlen breaks either hour=0 or no hour in URL
- if ( strlen ( $hour ) ) {
- $time = $hour * 100;
+
+ if ( ! empty ( $allow_external_users ) && $allow_external_users == "Y" ) {
+ $external_users = event_get_external_users ( $id );
+ }
+
} else {
- $time = -1;
- $hour = -1;
- }
- if ( ! empty ( $defusers ) ) {
- $tmp_ar = explode ( ",", $defusers );
- for ( $i = 0; $i < count ( $tmp_ar ); $i++ ) {
- $participants[$tmp_ar[$i]] = 1;
- }
- }
- if ( $readonly == "N" ) {
- // If public, then make sure we can add events
- if ( $login == '__public__' ) {
- if ( $public_access_can_add )
- $can_edit = true;
+ //Debug
+ logs($log_file,"new event \ncal_date : ".$cal_date."\n");
+ //Debug
+
+ // New event.
+ $id = 0; // to avoid warnings below about use of undefined var
+ // Anything other then testing for strlen breaks either hour=0 or no hour in URL
+ if ( strlen ( $hour ) ) {
+ $time = $hour * 100;
} else {
- // not public user
- $can_edit = true;
+ $time = -1;
+ $hour = -1;
}
+ if ( ! empty ( $defusers ) ) {
+ $tmp_ar = explode ( ",", $defusers );
+ for ( $i = 0; $i < count ( $tmp_ar ); $i++ ) {
+ $participants[$tmp_ar[$i]] = 1;
+ }
+ }
+ /*if ( $readonly == "N" ) {
+ // If public, then make sure we can add events
+ if ( $login == '__public__' ) {
+ if ( $public_access_can_add )
+ $can_edit = true;
+ } else {
+ // not public user
+ $can_edit = true;
+ }
+ }*/
}
}
+
+
+//Debug
+logs($log_file,"cal_date : ".$cal_date."\n");
+//Debug
+
if ( ! empty ( $year ) && $year )
$thisyear = $year;
if ( ! empty ( $month ) && $month )
@@ -197,6 +332,10 @@
$thisday = $day;
if ( empty ( $rpt_type ) || ! $rpt_type )
$rpt_type = "none";
+
+//Debug
+logs($log_file,"year : ".$thisyear."\nmonth : ".$thismonth."\nday : ".$thisday."\n");
+//Debug
// avoid error for using undefined vars
if ( ! isset ( $hour ) )
@@ -240,8 +379,21 @@
empty ( $thismonth ) ? date ( "m" ) : $thismonth,
empty ( $thisday ) ? date ( "d" ) : $thisday );
}
+
+//Debug
+logs($log_file,"date : ".$thisdate."\n");
+//Debug
+
+//Debug
+logs($log_file,"cal_date : ".$cal_date."\n");
+//Debug
+
if ( empty ( $cal_date ) || ! $cal_date )
$cal_date = $thisdate;
+
+//Debug
+logs($log_file,"cal_date : ".$cal_date."\n");
+//Debug
if ( $allow_html_description == "Y" ){
// Allow HTML in description
@@ -263,18 +415,17 @@
}
print_header ( $INC, '', $BodyX );
+
?>
<h2><?php if ( $id ) echo translate("Edit Entry"); else echo translate("Add Entry"); ?> <img src="help.gif" alt="<?php etranslate("Help")?>" class="help" onclick="window.open ( 'help_edit_entry.php<?php if ( empty ( $id ) ) echo "?add=1"; ?>', 'cal_help', 'dependent,menubar,scrollbars,height=400,width=400,innerHeight=420,outerWidth=420');" /></h2>
<?php
- if ( $can_edit ) {
+if ( ($can_modify && isset($_GET['id'])) || ($can_add && !isset($_GET['id'])) ) {
-?>
-<form action="edit_entry_handler.php" method="post" name="editentryform">
+echo '<form action="edit_entry_handler.php'.($GLOBALS['type_param']=='group'? '?type_param=group&group_param='.$GLOBALS['group_param'].'" ' : '?type_param=user" ').'method="post" name="editentryform">';
-<?php
if ( ! empty ( $id ) && ( empty ( $copy ) || $copy != '1' ) ) echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />\n";
// we need an additional hidden input field
echo "<input type=\"hidden\" name=\"entry_changed\" value=\"\" />\n";
@@ -376,6 +527,11 @@
<tr><td class="tooltip" title="<?php etooltip("date-help")?>">
<?php etranslate("Date")?>:</td><td colspan="2">
<?php
+
+ //Debug
+ logs($log_file, "cal_date : ".$cal_date."\n");
+ //Debug
+
print_date_selection ( "", $cal_date );
?>
</td></tr>
@@ -626,72 +782,67 @@
<?php } /* $useTabs */ ?>
<table>
<?php
-// Only ask for participants if we are multi-user.
-$show_participants = ( $disable_participants_field != "Y" );
-if ( $is_admin )
- $show_participants = true;
-if ( $login == "__public__" && $public_access_others != "Y" )
- $show_participants = false;
-if ( $single_user == "N" && $show_participants ) {
- $userlist = get_my_users ();
- if ($nonuser_enabled == "Y" ) {
- $nonusers = get_nonuser_cals ();
- $userlist = ($nonuser_at_top == "Y") ? array_merge($nonusers, $userlist) : array_merge($userlist, $nonusers);
- }
- $num_users = 0;
- $size = 0;
- $users = "";
- for ( $i = 0; $i < count ( $userlist ); $i++ ) {
- $l = $userlist[$i]['cal_login'];
- $size++;
- $users .= "<option value=\"" . $l . "\"";
- if ( $id > 0 ) {
- if ( ! empty ($participants[$l]) )
- $users .= " selected=\"selected\"";
- } else {
- if ( ! empty ($defusers) ) {
- // default selection of participants was in the URL
- if ( ! empty ( $participants[$l] ) )
- $users .= " selected=\"selected\"";
- } else {
- if ( ($l == $login && ! $is_assistant && ! $is_nonuser_admin) || (! empty ($user) && $l == $user) )
- $users .= " selected=\"selected\"";
- }
- if ( $l == '__public__' &&
- ! empty ($public_access_default_selected) &&
- $public_access_default_selected == 'Y' )
- $users .= " selected=\"selected\"";
+$contents = file_get_contents('../bin/users_groups.xml');
+$result = xml2array($contents);
+$project = array();
+
+print("<table border=\"0\" cellspacing=\"20\" cellpadding=\"0\">\n");
+print("<tr><td>\n");
+
+print("<select name=\"projects\">\n");
+print("<option value=\"null\"> </option>\n");
+foreach ($result['projects']['project'] as $proj)
+{
+ print("<option onclick=\"listRole('".$proj['attr']['name']."')\" value=\"".$proj['attr']['name']."\">".$proj['attr']['name']."</option>\n");
+}
+print("</select>\n");
+print("</td>");
+
+print("<td><div class=\"hideRole\" id=\"hideRole\">\n");
+print("</div></td>\n");
+
+print("<td><div class=\"hideUser\" id=\"hideUser\">\n");
+print("</div></td>\n");
+
+print("<td><div class=\"selected\" id=\"selected\">\n");
+print("<select MULTIPLE name=\"participants[]\" id=\"partlist\">\n");
+print("<option name=\"part\" value=\"");
+print($login);
+print("\">");
+print($login);
+print("</option>\n");
+if(sizeof($participants)>0){
+ foreach($participants as $part => $value){
+ if($part != $login){
+ print("<option name=\"part\" value=\"");
+ print($part);
+ print("\">");
+ print($part);
+ print("</option>\n");
}
- $users .= ">" . $userlist[$i]['cal_fullname'] . "</option>\n";
}
+}
+print("</select>\n");
+print("</div></td></tr>\n");
- if ( $size > 50 )
- $size = 15;
- else if ( $size > 5 )
- $size = 5;
- print "<tr title=\"" .
- tooltip("participants-help") . "\"><td class=\"tooltipselect\">\n<label for=\"entry_part\">" .
- translate("Participants") . ":</label></td><td>\n";
- print "<select name=\"participants[]\" id=\"entry_part\" size=\"$size\" multiple=\"multiple\">$users\n";
- print "</select>\n";
- if ( $groups_enabled == "Y" ) {
- echo "<input type=\"button\" onclick=\"selectUsers()\" value=\"" .
- translate("Select") . "...\" />\n";
- }
- echo "<input type=\"button\" onclick=\"showSchedule()\" value=\"" .
- translate("Availability") . "...\" />\n";
- print "</td></tr>\n";
+print("<tr><td><input type=\"button\" value=\"");
+etranslate('Ajouter Projet');
+print("\" onclick=\"addGroup()\" /></td>\n");
- // external users
- if ( ! empty ( $allow_external_users ) && $allow_external_users == "Y" ) {
- print "<tr title=\"" .
- tooltip("external-participants-help") . "\"><td style=\"vertical-align:top;\" class=\"tooltip\">\n<label for=\"entry_extpart\">" .
- translate("External Participants") . ":</label></td><td>\n";
- print "<textarea name=\"externalparticipants\" id=\"entry_extpart\" rows=\"5\" cols=\"40\">";
- print $external_users . "</textarea>\n</td></tr>\n";
- }
+print("<td><div class=\"hidebRole\" id=\"hidebRole\">\n");
+print("</div></td>\n");
+
+print("<td><div class=\"hidebUser\" id=\"hidebUser\">\n");
+print("</div></td>\n");
+
+print("<td><div class=\"hidebDel\" id=\"hidebDel\">\n");
+if(sizeof($participants)>0){
+ print("<input type=\"button\" value=\"".translate("Delete")."\" onclick=\"del()\" />\n");
}
+print("</div></td></tr>\n");
+
+print("</table>\n");
?>
</table>
<?php if ( $useTabs ) { ?>
@@ -806,7 +957,7 @@
<input type="hidden" name="participant_list" value="" />
</form>
-<?php if ( $id > 0 && ( $login == $create_by || $single_user == "Y" || $is_admin ) ) { ?>
+<?php if ( $can_modify/*$id > 0 && ( $login == $create_by || $single_user == "Y" || $is_admin )*/ ) { ?>
<a href="del_entry.php?id=<?php echo $id;?>" onclick="return confirm('<?php etranslate("Are you sure you want to delete this entry?")?>');"><?php etranslate("Delete entry")?></a><br />
<?php
} //end if clause for delete link
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry_handler.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry_handler.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/edit_entry_handler.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,896 +1,1092 @@
<?php
+
+/*Variables _GET to provide :
+ - type : Type of calendar (group or user)
+ Variable _GET to provide when type = group :
+ - group : Name of the group (project)
+*/
+
require_once('pre.php');
include_once 'includes/init.php';
include_once 'includes/site_extras.php';
+
load_user_categories ();
-$error = "";
+//debug
+logs($log_file,"####### edit_entry_handler.php ######\n");
+logs($log_file,"edit_entry_handler.php : POST:".print_r($_POST,true)." \n");
+//debug
-$do_override = false;
-$old_id = -1;
-if ( ! empty ( $override ) && ! empty ( $override_date ) ) {
- // override date specified. user is going to create an exception
- // to a repeating event.
- $do_override = true;
- $old_id = $id;
+//Récupération du type
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
}
-// Remember previous cal_goup_id if present
-$old_id = ( ! empty ( $parent ) ? $parent : $old_id );
-if ( empty ( $TZ_OFFSET ) ) {
- $TZ_OFFSET = 0;
-}
+//debug
+logs($log_file,"edit_entry_handler.php : après test type : ".$GLOBALS['type_param']." \n");
+//debug
-if ( empty ( $endhour ) ) {
- $endhour = 0;
+//recuperation du groupe
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+
+ //debug
+ logs($log_file,"edit_entry_handler.php select group_name from groups where group_id=".$GLOBALS['group_param']."\n");
+ //debug
+
+ $res=dbi_query("select unix_group_name from groups where group_id=".$GLOBALS['group_param']);
+ $row = pg_fetch_array($res);
+ $GLOBALS['group_name_param']=$row[0];
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : groupe name : ".$GLOBALS['group_name_param']."\n");
+ //debug
+
}
-// Modify the time to be server time rather than user time.
-if ( ! empty ( $hour ) && ( $timetype == 'T' ) ) {
- // Convert to 24 hour before subtracting TZ_OFFSET so am/pm isn't confused.
- // Note this obsoltes any code in the file below that deals with am/pm
- // so the code can be deleted
- if ( $TIME_FORMAT == '12' && $hour < 12 ) {
- if ( $ampm == 'pm' )
- $hour += 12;
- } elseif ($TIME_FORMAT == '12' && $hour == '12' && $ampm == 'am' ) {
- $hour = 0;
- }
- if ( $GLOBALS['TIMED_EVT_LEN'] == 'E') {
- if ( isset ( $endhour ) && $TIME_FORMAT == '12' ) {
- // Convert end time to a twenty-four hour time scale.
- if ( $endampm == 'pm' && $endhour < 12 ) {
- $endhour += 12;
- } elseif ( $endampm == 'am' && $endhour == 12 ) {
- $endhour = 0;
- }
- }
- }
- $TIME_FORMAT=24;
- $hour -= $TZ_OFFSET;
- if ( $hour < 0 ) {
- $hour += 24;
- // adjust date
- $date = mktime ( 3, 0, 0, $month, $day, $year );
- $date -= $ONE_DAY;
- $month = date ( "m", $date );
- $day = date ( "d", $date );
- $year = date ( "Y", $date );
- }
- if ( $hour >= 24 ) {
- $hour -= 24;
- // adjust date
- $date = mktime ( 3, 0, 0, $month, $day, $year );
- $date += $ONE_DAY;
- $month = date ( "m", $date );
- $day = date ( "d", $date );
- $year = date ( "Y", $date );
- }
- // Must adjust $endhour too
- if ($TZ_OFFSET) {
- $endhour -= $TZ_OFFSET;
- if ( $endhour < 0 ) $endhour += 24;
- if ( $endhour >= 24 ) $endhour -= 24;
- }
-}
+if($GLOBALS['type_param']=='group' && isset($_GET['group_param'])){
-// Make sure this user is really allowed to edit this event.
-// Otherwise, someone could hand type in the URL to edit someone else's
-// event.
-// Can edit if:
-// - new event
-// - user is admin
-// - user created event
-// - user is participant
-$can_edit = false;
-// value may be needed later for recreating event
-$old_create_by = ( ! empty ( $user )? $user : '');
-if ( empty ( $id ) ) {
- // New event...
- $can_edit = true;
-} else {
- // event owner or assistant event ?
- $sql = "SELECT cal_create_by FROM webcal_entry WHERE cal_id = '$id'";
- $res = dbi_query($sql);
- if ($res) {
- $row = dbi_fetch_row ( $res );
- // value may be needed later for recreating event
- $old_create_by = $row[0];
- if (( $row[0] == $login ) || (( $user == $row[0] ) && ( $is_assistant || $is_nonuser_admin )))
- $can_edit = true;
- dbi_free_result ( $res );
- } else
- $error = translate("Database error") . ": " . dbi_error ();
+ $group_cal=$GLOBALS['group_param'];
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : Avant user_project_role \n");
+ //debug
+
+ $role_user=user_project_role($login,$group_cal);
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : role : ".$role_user."\nedit_entry_handler.php : login : ".$login."\nedit_entry_handler.php : group : ".$group_cal."\nedit_entry_handler.php : user : ".$user."\n");
+ //debug
+
}
-if ( $is_admin ) {
- $can_edit = true;
-}
-if ( empty ( $error ) && ! $can_edit ) {
- // is user a participant of that event ?
- $sql = "SELECT cal_id FROM webcal_entry_user WHERE cal_id = '$id' " .
- "AND cal_login = '$login' AND cal_status IN ('W','A')";
- $res = dbi_query ( $sql );
- if ($res) {
- $row = dbi_fetch_row ( $res );
- if ( ! empty( $row[0] ) )
- $can_edit = true; // is participant
- dbi_free_result ( $res );
- } else
- $error = translate("Database error") . ": " . dbi_error ();
-}
-if ( ! $can_edit && empty ( $error ) ) {
- $error = translate ( "You are not authorized" );
+//debug
+logs($log_file,"edit_entry_handler.php : avant can_modify \n");
+//debug
+
+if(isset($id) && $id!=""){
+ $can_modify = Can_Modify($id, $login);
+}else{
+ $can_modify = true;
}
-// If display of participants is disabled, set the participant list
-// to the event creator. This also works for single-user mode.
-// Basically, if no participants were selected (because there
-// was no selection list available in the form or because the user
-// refused to select any participant from the list), then we will
-// assume the only participant is the current user.
-if ( empty ( $participants[0] ) ) {
- $participants[0] = $login;
- // There might be a better way to do this, but if Admin sets this value,
- // WebCalendar should respect it
- if ( ! empty ( $public_access_default_selected ) &&
- $public_access_default_selected == "Y" ) {
- $participants[1] = "__public__";
+/*$can_modify=false;
+if($GLOBALS['type_param'] == 'group' && $role_user >=2 ){
+ $can_modify = true;
+ //debug
+ logs($log_file,"edit_entry_handler.php : can_modify \n");
+ //debug
+}else{
+ if($GLOBALS['type_param'] == 'user'){
+ if(isset($id) && $id!="" ){
+ $res = dbi_query("select cal_id
+ from webcal_entry
+ where cal_id = '".$id."'
+ and cal_create_by = '".$login."'");
+ if( dbi_num_rows($res) ){
+ $can_modify = true;
+ }
+ }else{
+ $can_modify=true;
+ }
}
-}
-// If "all day event" was selected, then we set the event time
-// to be 12AM with a duration of 24 hours.
-// We don't actually store the "all day event" flag per se. This method
-// makes conflict checking much simpler. We just need to make sure
-// that we don't screw up the day view (which normally starts the
-// view with the first timed event).
-// Note that if someone actually wants to create an event that starts
-// at midnight and lasts exactly 24 hours, it will be treated in the
-// same manner.
+}*/
-$duration_h = getValue ( "duration_h" );
-$duration_m = getValue ( "duration_m" );
+//debug
+logs($log_file,"edit_entry_handler.php : après can_modify \n");
+//debug
-if ( $timetype == "A" ) {
- $duration_h = 24;
- $duration_m = 0;
- $hour = 0;
- $minute = 0;
-}
+//If the user can modify the event
+if($can_modify){
-$duration = ( $duration_h * 60 ) + $duration_m;
-if ( $hour > 0 && $timetype != 'U' ) {
- if ( $TIME_FORMAT == '12' ) {
- $ampmt = $ampm;
- //This way, a user can pick am and still
- //enter a 24 hour clock time.
- if ($hour > 12 && $ampm == 'am') {
- $ampmt = 'pm';
- }
- $hour %= 12;
- if ( $ampmt == 'pm' ) {
- $hour += 12;
- }
+ $error = "";
+
+ $do_override = false;
+ $old_id = -1;
+ if ( ! empty ( $override ) && ! empty ( $override_date ) ) {
+ // override date specified. user is going to create an exception
+ // to a repeating event.
+ $do_override = true;
+ $old_id = $id;
}
-}
-//echo "SERVER HOUR: $hour $ampm";
-
-if ( $GLOBALS['TIMED_EVT_LEN'] == 'E' && $timetype == "T" ) {
- if ( ! isset ( $endhour ) ) {
- $duration = 0;
- } else {
- // Calculate duration.
- $endmins = ( 60 * (int) ( $endhour ) ) + $endminute;
- $startmins = ( 60 * $hour ) + $minute;
- $duration = $endmins - $startmins;
+ // Remember previous cal_goup_id if present
+ $old_id = ( ! empty ( $parent ) ? $parent : $old_id );
+
+ if ( empty ( $TZ_OFFSET ) ) {
+ $TZ_OFFSET = 0;
+ }
+
+ if ( empty ( $endhour ) ) {
+ $endhour = 0;
+ }
+ // Modify the time to be server time rather than user time.
+ if ( ! empty ( $hour ) && ( $timetype == 'T' ) ) {
+ // Convert to 24 hour before subtracting TZ_OFFSET so am/pm isn't confused.
+ // Note this obsoltes any code in the file below that deals with am/pm
+ // so the code can be deleted
+ if ( $TIME_FORMAT == '12' && $hour < 12 ) {
+ if ( $ampm == 'pm' )
+ $hour += 12;
+ } elseif ($TIME_FORMAT == '12' && $hour == '12' && $ampm == 'am' ) {
+ $hour = 0;
}
- if ( $duration < 0 ) {
- $duration = 0;
- }
-}
-
-// handle external participants
-$ext_names = array ();
-$ext_emails = array ();
-$matches = array ();
-$ext_count = 0;
-if ( $single_user == "N" &&
- ! empty ( $allow_external_users ) &&
- $allow_external_users == "Y" &&
- ! empty ( $externalparticipants ) ) {
- $lines = explode ( "\n", $externalparticipants );
- if ( ! is_array ( $lines ) ) {
- $lines = array ( $externalparticipants );
- }
- if ( is_array ( $lines ) ) {
- for ( $i = 0; $i < count ( $lines ); $i++ ) {
- $ext_words = explode ( " ", $lines[$i] );
- if ( ! is_array ( $ext_words ) ) {
- $ext_words = array ( $lines[$i] );
- }
- if ( is_array ( $ext_words ) ) {
- $ext_names[$ext_count] = "";
- $ext_emails[$ext_count] = "";
- for ( $j = 0; $j < count ( $ext_words ); $j++ ) {
- // use regexp matching to pull email address out
- $ext_words[$j] = chop ( $ext_words[$j] ); // remove \r if there is one
- if ( preg_match ( "/<?\\S+@\\S+\\.\\S+>?/", $ext_words[$j],
- $matches ) ) {
- $ext_emails[$ext_count] = $matches[0];
- $ext_emails[$ext_count] = preg_replace ( "/[<>]/", "",
- $ext_emails[$ext_count] );
- } else {
- if ( strlen ( $ext_names[$ext_count] ) ) {
- $ext_names[$ext_count] .= " ";
- }
- $ext_names[$ext_count] .= $ext_words[$j];
- }
+ if ( $GLOBALS['TIMED_EVT_LEN'] == 'E') {
+ if ( isset ( $endhour ) && $TIME_FORMAT == '12' ) {
+ // Convert end time to a twenty-four hour time scale.
+ if ( $endampm == 'pm' && $endhour < 12 ) {
+ $endhour += 12;
+ } elseif ( $endampm == 'am' && $endhour == 12 ) {
+ $endhour = 0;
}
- // Test for duplicate Names
- if ( $i > 0 ) {
- for ( $k = $i ; $k > 0 ; $k-- ) {
- if ( $ext_names[$i] == $ext_names[$k] ) {
- $ext_names[$i] .= "[$k]";
- }
- }
- }
- if ( strlen ( $ext_emails[$ext_count] ) &&
- empty ( $ext_names[$ext_count] ) ) {
- $ext_names[$ext_count] = $ext_emails[$ext_count];
- }
- $ext_count++;
}
}
+ $TIME_FORMAT=24;
+ $hour -= $TZ_OFFSET;
+ if ( $hour < 0 ) {
+ $hour += 24;
+ // adjust date
+ $date = mktime ( 3, 0, 0, $month, $day, $year );
+ $date -= $ONE_DAY;
+ $month = date ( "m", $date );
+ $day = date ( "d", $date );
+ $year = date ( "Y", $date );
+ }
+ if ( $hour >= 24 ) {
+ $hour -= 24;
+ // adjust date
+ $date = mktime ( 3, 0, 0, $month, $day, $year );
+ $date += $ONE_DAY;
+ $month = date ( "m", $date );
+ $day = date ( "d", $date );
+ $year = date ( "Y", $date );
+ }
+
+ // Must adjust $endhour too
+ if ($TZ_OFFSET) {
+ $endhour -= $TZ_OFFSET;
+ if ( $endhour < 0 ) $endhour += 24;
+ if ( $endhour >= 24 ) $endhour -= 24;
+ }
}
-}
-
-// first check for any schedule conflicts
-if ( empty ( $allow_conflict_override ) || $allow_conflict_override != "Y" ) {
- $confirm_conflicts = ""; // security precaution
-}
-if ( $allow_conflicts != "Y" && empty ( $confirm_conflicts ) &&
- strlen ( $hour ) > 0 && $timetype != 'U' ) {
- $date = mktime ( 3, 0, 0, $month, $day, $year );
- $str_cal_date = date ( "Ymd", $date );
- if ( strlen ( $hour ) > 0 ) {
- $str_cal_time = sprintf ( "%02d%02d00", $hour, $minute );
- }
- if ( ! empty ( $rpt_end_use ) ) {
- $endt = mktime ( 3, 0, 0, $rpt_month, $rpt_day,$rpt_year );
+
+ // Make sure this user is really allowed to edit this event.
+ // Otherwise, someone could hand type in the URL to edit someone else's
+ // event.
+ // Can edit if:
+ // - new event
+ // - user is admin
+ // - user created event
+ // - user is participant
+
+ //$can_edit = false; #################!!!!!!!!!!!!!!!!!!!!!##################
+
+ // value may be needed later for recreating event
+ /*$old_create_by = ( ! empty ( $user )? $user : '');
+ if ( empty ( $id ) ) {
+ // New event...
+ $can_edit = true;
} else {
- $endt = 'NULL';
- }
-
- if ($rpt_type == 'weekly') {
- $dayst = ( empty( $rpt_sun ) ? 'n' : 'y' )
- . ( empty( $rpt_mon ) ? 'n' : 'y' )
- . ( empty( $rpt_tue ) ? 'n' : 'y' )
- . ( empty( $rpt_wed ) ? 'n' : 'y' )
- . ( empty( $rpt_thu ) ? 'n' : 'y' )
- . ( empty( $rpt_fri ) ? 'n' : 'y' )
- . ( empty( $rpt_sat ) ? 'n' : 'y' );
- } else {
- $dayst = "nnnnnnn";
- }
-
- // Load exception days... but not for a new event (which can't have
- // exception dates yet)
- $ex_days = array ();
- if ( ! empty ( $id ) ) {
- $res = dbi_query ( "SELECT cal_date FROM webcal_entry_repeats_not " .
- "WHERE cal_id = $id" );
- if ( $res ) {
- while ( $row = dbi_fetch_row ( $res ) ) {
- $ex_days[] = $row[0];
- }
+ // event owner or assistant event ?
+ $sql = "SELECT cal_create_by FROM webcal_entry WHERE cal_id = '$id'";
+ $res = dbi_query($sql);
+ if ($res) {
+ $row = dbi_fetch_row ( $res );
+ // value may be needed later for recreating event
+ $old_create_by = $row[0];
+ if (( $row[0] == $login ) || (( $user == $row[0] ) && ( $is_assistant || $is_nonuser_admin )))
+ $can_edit = true;
dbi_free_result ( $res );
- } else {
+ } else
$error = translate("Database error") . ": " . dbi_error ();
- }
}
-
- $dates = get_all_dates ( $date, $rpt_type, $endt, $dayst,
- $ex_days, $rpt_freq );
-
- $conflicts = check_for_conflicts ( $dates, $duration, $hour, $minute,
- $participants, $login, empty ( $id ) ? 0 : $id );
-}
-if ( empty ( $error ) && ! empty ( $conflicts ) ) {
- $error = translate("The following conflicts with the suggested time") .
- ": <ul>$conflicts</ul>";
-}
-//Avoid Undefined variable message
-$msg = '';
-if ( empty ( $error ) ) {
- $newevent = true;
- // now add the entries
- if ( empty ( $id ) || $do_override ) {
- $res = dbi_query ( "SELECT MAX(cal_id) FROM webcal_entry" );
- if ( $res ) {
+
+ if ( $is_admin ) {
+ $can_edit = true;
+ }*/
+
+ /*if ( empty ( $error ) && ! $can_edit ) {
+ // is user a participant of that event ?
+ $sql = "SELECT cal_id FROM webcal_entry_user WHERE cal_id = '$id' " .
+ "AND cal_login = '$login' AND cal_status IN ('W','A')";
+ $res = dbi_query ( $sql );
+ if ($res) {
$row = dbi_fetch_row ( $res );
- $id = $row[0] + 1;
+ if ( ! empty( $row[0] ) )
+ $can_edit = true; // is participant
dbi_free_result ( $res );
- } else {
- $id = 1;
- }
- } else {
- $newevent = false;
- // save old status values of participants
- $sql = "SELECT cal_login, cal_status, cal_category FROM webcal_entry_user " .
- "WHERE cal_id = $id ";
- $res = dbi_query ( $sql );
- if ( $res ) {
- for ( $i = 0; $tmprow = dbi_fetch_row ( $res ); $i++ ) {
- $old_status[$tmprow[0]] = $tmprow[1];
- $old_category[$tmprow[0]] = $tmprow[2];
- }
- dbi_free_result ( $res );
- } else {
+ } else
$error = translate("Database error") . ": " . dbi_error ();
- }
- if ( empty ( $error ) ) {
- dbi_query ( "DELETE FROM webcal_entry WHERE cal_id = $id" );
- dbi_query ( "DELETE FROM webcal_entry_user WHERE cal_id = $id" );
- dbi_query ( "DELETE FROM webcal_entry_ext_user WHERE cal_id = $id" );
- dbi_query ( "DELETE FROM webcal_entry_repeats WHERE cal_id = $id" );
- dbi_query ( "DELETE FROM webcal_site_extras WHERE cal_id = $id" );
- }
- $newevent = false;
}
-
- if ( $do_override ) {
- $sql = "INSERT INTO webcal_entry_repeats_not ( cal_id, cal_date ) " .
- "VALUES ( $old_id, $override_date )";
- if ( ! dbi_query ( $sql ) ) {
- $error = translate("Database error") . ": " . dbi_error ();
+
+ if ( ! $can_edit && empty ( $error ) ) {
+ $error = translate ( "You are not authorized" );
+ }*/
+
+ // If display of participants is disabled, set the participant list
+ // to the event creator. This also works for single-user mode.
+ // Basically, if no participants were selected (because there
+ // was no selection list available in the form or because the user
+ // refused to select any participant from the list), then we will
+ // assume the only participant is the current user.
+ if ( empty ( $participants[0] ) ) {
+ $participants[0] = $login;
+ // There might be a better way to do this, but if Admin sets this value,
+ // WebCalendar should respect it
+ if ( ! empty ( $public_access_default_selected ) &&
+ $public_access_default_selected == "Y" ) {
+ $participants[1] = "__public__";
}
}
- $sql = "INSERT INTO webcal_entry ( cal_id, " .
- ( $old_id > 0 ? " cal_group_id, " : "" ) .
- "cal_create_by, cal_date, " .
- "cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
- "cal_access, cal_type, cal_name, cal_description ) " .
- "VALUES ( $id, " .
- ( $old_id > 0 ? " $old_id, " : "" ) .
- "'" . ( ! empty ( $old_create_by ) &&
- ( ( $is_admin && ! $newevent ) || $is_assistant ||
- $is_nonuser_admin ) ? $old_create_by : $login ) . "', ";
-
- $date = mktime ( 3, 0, 0, $month, $day, $year );
- $sql .= date ( "Ymd", $date ) . ", ";
- if ( strlen ( $hour ) > 0 && $timetype != 'U' ) {
- $sql .= sprintf ( "%02d%02d00, ", $hour, $minute );
- } else {
- $sql .= "-1, ";
+ // If "all day event" was selected, then we set the event time
+ // to be 12AM with a duration of 24 hours.
+ // We don't actually store the "all day event" flag per se. This method
+ // makes conflict checking much simpler. We just need to make sure
+ // that we don't screw up the day view (which normally starts the
+ // view with the first timed event).
+ // Note that if someone actually wants to create an event that starts
+ // at midnight and lasts exactly 24 hours, it will be treated in the
+ // same manner.
+
+ $duration_h = getValue ( "duration_h" );
+ $duration_m = getValue ( "duration_m" );
+
+ if ( $timetype == "A" ) {
+ $duration_h = 24;
+ $duration_m = 0;
+ $hour = 0;
+ $minute = 0;
}
- $sql .= date ( "Ymd" ) . ", " . date ( "Gis" ) . ", ";
- $sql .= sprintf ( "%d, ", $duration );
- $sql .= ! empty ( $priority ) ? sprintf ( "%d,", $priority ) : "2,";
- $sql .= empty ( $access ) ? "'P', " : "'$access', ";
- if ( ! empty ( $rpt_type ) && $rpt_type != 'none' ) {
- $sql .= "'M', ";
- } else {
- $sql .= "'E', ";
- }
-
- if ( strlen ( $name ) == 0 ) {
- $name = translate("Unnamed Event");
- }
- $sql .= "'" . $name . "', ";
- if ( strlen ( $description ) == 0 ) {
- $description = $name;
- }
- $sql .= "'" . $description . "' )";
- if ( empty ( $error ) ) {
- if ( ! dbi_query ( $sql ) ) {
- $error = translate("Database error") . ": " . dbi_error ();
+ $duration = ( $duration_h * 60 ) + $duration_m;
+ if ( $hour > 0 && $timetype != 'U' ) {
+ if ( $TIME_FORMAT == '12' ) {
+ $ampmt = $ampm;
+ //This way, a user can pick am and still
+ //enter a 24 hour clock time.
+ if ($hour > 12 && $ampm == 'am') {
+ $ampmt = 'pm';
+ }
+ $hour %= 12;
+ if ( $ampmt == 'pm' ) {
+ $hour += 12;
+ }
}
- else {
- //mettre le plugin
- //add father
- $params[0] = $user ;
- $params[1] = $id ;
- plugin_hook('add_cal_link_father_event',$params);
- }
}
-
- // log add/update
- activity_log ( $id, $login, ($is_assistant || $is_nonuser_admin ? $user : $login),
- $newevent ? $LOG_CREATE : $LOG_UPDATE, "" );
+ //echo "SERVER HOUR: $hour $ampm";
- if ( $single_user == "Y" ) {
- $participants[0] = $single_user_login;
+ if ( $GLOBALS['TIMED_EVT_LEN'] == 'E' && $timetype == "T" ) {
+ if ( ! isset ( $endhour ) ) {
+ $duration = 0;
+ } else {
+ // Calculate duration.
+ $endmins = ( 60 * (int) ( $endhour ) ) + $endminute;
+ $startmins = ( 60 * $hour ) + $minute;
+ $duration = $endmins - $startmins;
+ }
+ if ( $duration < 0 ) {
+ $duration = 0;
+ }
}
-
- // check if participants have been removed and send out emails
- if ( ! $newevent && count ( $old_status ) > 0 ) { // nur bei Update!!!
- while ( list ( $old_participant, $dummy ) = each ( $old_status ) ) {
- $found_flag = false;
- for ( $i = 0; $i < count ( $participants ); $i++ ) {
- if ( $participants[$i] == $old_participant ) {
- $found_flag = true;
- break;
+
+ // handle external participants
+ $ext_names = array ();
+ $ext_emails = array ();
+ $matches = array ();
+ $ext_count = 0;
+ if ( $single_user == "N" &&
+ ! empty ( $allow_external_users ) &&
+ $allow_external_users == "Y" &&
+ ! empty ( $externalparticipants ) ) {
+ $lines = explode ( "\n", $externalparticipants );
+ if ( ! is_array ( $lines ) ) {
+ $lines = array ( $externalparticipants );
+ }
+ if ( is_array ( $lines ) ) {
+ for ( $i = 0; $i < count ( $lines ); $i++ ) {
+ $ext_words = explode ( " ", $lines[$i] );
+ if ( ! is_array ( $ext_words ) ) {
+ $ext_words = array ( $lines[$i] );
}
- }
- $is_nonuser_admin = user_is_nonuser_admin ( $login, $old_participant );
- // Don't send mail if we are editing a non-user calendar
- // and we are the admin
- if ( !$found_flag && !$is_nonuser_admin) {
- // only send mail if their email address is filled in
- $do_send = get_pref_setting ( $old_participant, "EMAIL_EVENT_DELETED" );
- $user_TZ = get_pref_setting ( $old_participant, "TZ_OFFSET" );
- $user_language = get_pref_setting ( $old_participant, "LANGUAGE" );
- user_load_variables ( $old_participant, "temp" );
- if ( $old_participant != $login && strlen ( $tempemail ) &&
- $do_send == "Y" && $send_email != "N" ) {
-
- // Want date/time in user's timezone
- $user_hour = $hour + $user_TZ;
- if ( $user_hour < 0 ) {
- $user_hour += 24;
- // adjust date
- $user_date = mktime ( 3, 0, 0, $month, $day, $year );
- $user_date -= $ONE_DAY;
- $user_month = date ( "m", $date );
- $user_day = date ( "d", $date );
- $user_year = date ( "Y", $date );
- } elseif ( $user_hour >= 24 ) {
- $user_hour -= 24;
- // adjust date
- $user_date = mktime ( 3, 0, 0, $month, $day, $year );
- $user_date += $ONE_DAY;
- $user_month = date ( "m", $date );
- $user_day = date ( "d", $date );
- $user_year = date ( "Y", $date );
- } else {
- $user_month = $month;
- $user_day = $day;
- $user_year = $year;
+ if ( is_array ( $ext_words ) ) {
+ $ext_names[$ext_count] = "";
+ $ext_emails[$ext_count] = "";
+ for ( $j = 0; $j < count ( $ext_words ); $j++ ) {
+ // use regexp matching to pull email address out
+ $ext_words[$j] = chop ( $ext_words[$j] ); // remove \r if there is one
+ if ( preg_match ( "/<?\\S+@\\S+\\.\\S+>?/", $ext_words[$j],
+ $matches ) ) {
+ $ext_emails[$ext_count] = $matches[0];
+ $ext_emails[$ext_count] = preg_replace ( "/[<>]/", "",
+ $ext_emails[$ext_count] );
+ } else {
+ if ( strlen ( $ext_names[$ext_count] ) ) {
+ $ext_names[$ext_count] .= " ";
+ }
+ $ext_names[$ext_count] .= $ext_words[$j];
+ }
}
- if (($GLOBALS['LANGUAGE'] != $user_language) &&
- ! empty ( $user_language ) && ( $user_language != 'none' )){
- reset_language ( $user_language );
+ // Test for duplicate Names
+ if ( $i > 0 ) {
+ for ( $k = $i ; $k > 0 ; $k-- ) {
+ if ( $ext_names[$i] == $ext_names[$k] ) {
+ $ext_names[$i] .= "[$k]";
+ }
+ }
}
- //do_debug($user_language);
- $fmtdate = sprintf ( "%04d%02d%02d", $user_year, $user_month, $user_day );
- $msg = translate("Hello") . ", " . $tempfullname . ".\n\n" .
- translate("An appointment has been canceled for you by") .
- " " . $login_fullname . ". " .
- translate("The subject was") . " \"" . $name . "\"\n\n" .
- translate("The description is") . " \"" . $description . "\"\n" .
- translate("Date") . ": " . date_to_str ( $fmtdate ) . "\n" .
- ( ( empty ( $user_hour ) && empty ( $minute ) ) ? "" :
- translate("Time") . ": " .
- display_time ( ( $user_hour * 10000 ) + ( $minute * 100 ), true ) ) .
- "\n\n\n";
- // add URL to event, if we can figure it out
- /*
- if ( ! empty ( $server_url ) ) {
- $url = $server_url . "view_entry.php?id=" . $id;
- $msg .= $url . "\n\n";
+ if ( strlen ( $ext_emails[$ext_count] ) &&
+ empty ( $ext_names[$ext_count] ) ) {
+ $ext_names[$ext_count] = $ext_emails[$ext_count];
}
- */
- if ( strlen ( $login_email ) ) {
- $extra_hdrs = "From: $login_email\r\nX-Mailer: " . translate($application_name);
- } else {
- $extra_hdrs = "From: $email_fallback_from\r\nX-Mailer: " . translate($application_name);
- }
- mail ( $tempemail,
- translate($application_name) . " " . translate("Notification") . ": " . $name,
- utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
- activity_log ( $id, $login, $old_participant, $LOG_NOTIFICATION,
- "User removed from participants list" );
+ $ext_count++;
}
}
}
}
-
- // now add participants and send out notifications
-
- for ( $i = 0; $i < count ( $participants ); $i++ ) {
- $my_cat_id = "";
+
+ // first check for any schedule conflicts
+ if ( empty ( $allow_conflict_override ) || $allow_conflict_override != "Y" ) {
+ $confirm_conflicts = ""; // security precaution
+ }
+ if ( $allow_conflicts != "Y" && empty ( $confirm_conflicts ) &&
+ strlen ( $hour ) > 0 && $timetype != 'U' ) {
+ $date = mktime ( 3, 0, 0, $month, $day, $year );
+ $str_cal_date = date ( "Ymd", $date );
+ if ( strlen ( $hour ) > 0 ) {
+ $str_cal_time = sprintf ( "%02d%02d00", $hour, $minute );
+ }
+ if ( ! empty ( $rpt_end_use ) ) {
+ $endt = mktime ( 3, 0, 0, $rpt_month, $rpt_day,$rpt_year );
+ } else {
+ $endt = 'NULL';
+ }
+
+ if ($rpt_type == 'weekly') {
+ $dayst = ( empty( $rpt_sun ) ? 'n' : 'y' )
+ . ( empty( $rpt_mon ) ? 'n' : 'y' )
+ . ( empty( $rpt_tue ) ? 'n' : 'y' )
+ . ( empty( $rpt_wed ) ? 'n' : 'y' )
+ . ( empty( $rpt_thu ) ? 'n' : 'y' )
+ . ( empty( $rpt_fri ) ? 'n' : 'y' )
+ . ( empty( $rpt_sat ) ? 'n' : 'y' );
+ } else {
+ $dayst = "nnnnnnn";
+ }
+
+ // Load exception days... but not for a new event (which can't have
+ // exception dates yet)
+ $ex_days = array ();
+ if ( ! empty ( $id ) ) {
+ $res = dbi_query ( "SELECT cal_date FROM webcal_entry_repeats_not " .
+ "WHERE cal_id = $id" );
+ if ( $res ) {
+ while ( $row = dbi_fetch_row ( $res ) ) {
+ $ex_days[] = $row[0];
+ }
+ dbi_free_result ( $res );
+ } else {
+ $error = translate("Database error") . ": " . dbi_error ();
+ }
+ }
+
+ $dates = get_all_dates ( $date, $rpt_type, $endt, $dayst,
+ $ex_days, $rpt_freq );
+
+ $conflicts = check_for_conflicts ( $dates, $duration, $hour, $minute,
+ $participants, $login, empty ( $id ) ? 0 : $id );
+ }
+ if ( empty ( $error ) && ! empty ( $conflicts ) ) {
+ $error = translate("The following conflicts with the suggested time") .
+ ": <ul>$conflicts</ul>";
+ }
+ //Avoid Undefined variable message
+ $msg = '';
+
+ //If not error
+ if ( empty ( $error ) ) {
+
+ //Fix newevent at true
+ $newevent = true;
- // Is the person adding the nonuser calendar admin
- $is_nonuser_admin = user_is_nonuser_admin ( $login, $participants[$i] );
-
- // if public access, require approval unless
- // $public_access_add_needs_approval is set to "N"
- if ( $login == "__public__" ) {
- if ( ! empty ( $public_access_add_needs_approval ) &&
- $public_access_add_needs_approval == "N" ) {
- $status = "A"; // no approval needed
+ // now add the entries
+ //If not event ID is passed or do_override is defined
+ if ( empty ( $id ) || $do_override ) {
+
+ //debug
+ logs($log_file,"it's a new entry \n");
+ //debug
+
+ //Determine the id for the new event
+ $res = dbi_query ( "SELECT MAX(cal_id) FROM webcal_entry" );
+
+ //If isn't the first event at 1 to the maw number of event
+ if ( $res ) {
+ $row = dbi_fetch_row ( $res );
+ $id = $row[0] + 1;
+ dbi_free_result ( $res );
+
+ //Else if it's the first event fixe id at 1
} else {
- // Approval required
- $status = "W"; // approval required
+ $id = 1;
}
- $my_cat_id = $cat_id;
- } else if ( ! $newevent ) {
- // keep the old status if no email will be sent
- $send_user_mail = ( empty ( $old_status[$participants[$i]] ) ||
- $entry_changed ) ? true : false;
- $tmp_status = ( ! empty ( $old_status[$participants[$i]] ) && ! $send_user_mail ) ?
- $old_status[$participants[$i]] : "W";
- $status = ( $participants[$i] != $login && boss_must_approve_event ( $login, $participants[$i] ) && $require_approvals == "Y" && ! $is_nonuser_admin ) ?
- $tmp_status : "A";
- $tmp_cat = ( ! empty ( $old_category[$participants[$i]]) ) ?
- $old_category[$participants[$i]] : 'NULL';
- $tmp_cat = ( $participants[$i] == $user ) ? $cat_id : $tmp_cat;
- // Allow cat to be changed for public access (if admin user)
- if ( $participants[$i] == "__public__" && $is_admin ) {
- $tmp_cat = $cat_id;
+
+ //Else It isn't a new event
+ } else {
+
+ //debug
+ logs($log_file,"it isn't a new entry \n");
+ //debug
+
+ $newevent = false;
+
+ //save old status values of participants
+ $sql = "SELECT cal_login, cal_status, cal_category FROM webcal_entry_user " .
+ "WHERE cal_id = $id ";
+ $res = dbi_query ( $sql );
+ if ( $res ) {
+ for ( $i = 0; $tmprow = dbi_fetch_row ( $res ); $i++ ) {
+ $old_status[$tmprow[0]] = $tmprow[1];
+ $old_category[$tmprow[0]] = $tmprow[2];
+ }
+ dbi_free_result ( $res );
+ } else {
+ $error = translate("Database error") . ": " . dbi_error ();
}
-
- // If user is admin and this event was previously approved for public,
- // keep it as approved even though date/time may have changed
- // This goes against stricter security, but it confuses users to have
- // to re-approve events they already approved.
- if ( $participants[$i] == "__public__" && $is_admin &&
- $old_status['__public__'] == 'A' ) {
- $status = 'A';
+
+ //Save the creator of the event
+ $res_creator = dbi_query( "SELECT cal_create_by
+ FROM webcal_entry
+ WHERE cal_id = ".$id);
+ $row_creator = pg_fetch_array($res_creator);
+ $creator = $row_creator[0];
+
+ if ( empty ( $error ) ) {
+ dbi_query ( "DELETE FROM webcal_entry WHERE cal_id = $id" );
+ dbi_query ( "DELETE FROM webcal_entry_user WHERE cal_id = $id" );
+ dbi_query ( "DELETE FROM webcal_entry_ext_user WHERE cal_id = $id" );
+ dbi_query ( "DELETE FROM webcal_entry_repeats WHERE cal_id = $id" );
+ dbi_query ( "DELETE FROM webcal_site_extras WHERE cal_id = $id" );
}
- $my_cat_id = ( $participants[$i] != $login ) ? $tmp_cat : $cat_id;
- // If user is admin and
- // if it's a global cat, then set it for other users as well.
- if ( $is_admin && ! empty ( $categories[$cat_id] ) &&
- empty ( $category_owners[$cat_id] ) ) {
- // found categ. and owner set to NULL; it is global
- $my_cat_id = $cat_id;
+ $newevent = false;
+ }
+
+ if ( $do_override ) {
+ $sql = "INSERT INTO webcal_entry_repeats_not ( cal_id, cal_date ) " .
+ "VALUES ( $old_id, $override_date )";
+ if ( ! dbi_query ( $sql ) ) {
+ $error = translate("Database error") . ": " . dbi_error ();
}
- } else { // New Event
+ }
+ /*$sql = "select group_id from groups where group_name="
+ $role=user_projet_role($login,$)*/
- $send_user_mail = true;
- $status = ( $participants[$i] != $login &&
- boss_must_approve_event ( $login, $participants[$i] ) &&
- $require_approvals == "Y" && ! $is_nonuser_admin ) ?
- "W" : "A";
- // If admin, no need to approve Public Access Events
- if ( $participants[$i] == "__public__" && $is_admin ) {
- $status = "A";
+ //debug
+ logs($log_file,"edit_entry_handler.php : old_create_by :".$old_create_by." \n");
+ logs($log_file,"edit_entry_handler.php : login : ".$login." type : ".$GLOBALS['type_param']." \n");
+ //debug
+
+ /*if($GLOBALS['type']='group' && $newevent){
+ $res = db_query("select cal_group_id from webcal_group where cal_name = '".$GLOBALS['group']);
+ $line = pg_fetch_row($res);
+ $old_id=$line['cal_group_id'];
+ }*/
+
+ $sql = "INSERT INTO webcal_entry ( cal_id, " .
+ ( $old_id > 0 || $GLOBALS['type_param']=='group' ? " cal_group_id, " : "" ) .
+ "cal_create_by, cal_date, " .
+ "cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
+ "cal_access, cal_type, cal_name, cal_description ) " .
+ "VALUES ( $id, " .
+ ( $old_id > 0 || $GLOBALS['type_param']=='group' ? " $old_id, " : "" ) ."";
+
+ if(!$newevent){
+ $sql .= "'".$creator."',";
+ }else{
+ $sql .= "'".(( $GLOBALS['type_param']=='group' ) ? $GLOBALS['group_name_param'] : $login ) . "',";
}
- if ( $participants[$i] == $login ) {
- $my_cat_id = $cat_id;
+
+ $date = mktime ( 3, 0, 0, $month, $day, $year );
+ $sql .= date ( "Ymd", $date ) . ", ";
+ if ( strlen ( $hour ) > 0 && $timetype != 'U' ) {
+ $sql .= sprintf ( "%02d%02d00, ", $hour, $minute );
} else {
- // if it's a global cat, then set it for other users as well.
- if ( ! empty ( $categories[$cat_id] ) &&
- empty ( $category_owners[$cat_id] ) ) {
- // found cat. and owner set to NULL; it is global
- $my_cat_id = $cat_id;
- } else {
- // not global category
- $my_cat_id = 'NULL';
- }
+ $sql .= "-1, ";
}
+ $sql .= date ( "Ymd" ) . ", " . date ( "Gis" ) . ", ";
+ $sql .= sprintf ( "%d, ", $duration );
+ $sql .= ! empty ( $priority ) ? sprintf ( "%d,", $priority ) : "2,";
+ $sql .= empty ( $access ) ? "'P', " : "'$access', ";
+ if ( ! empty ( $rpt_type ) && $rpt_type != 'none' ) {
+ $sql .= "'M', ";
+ } else {
+ $sql .= "'E', ";
+ }
+
+ if ( strlen ( $name ) == 0 ) {
+ $name = translate("Unnamed Event");
+ }
+ $sql .= "'" . $name . "', ";
+ if ( strlen ( $description ) == 0 ) {
+ $description = $name;
+ }
+ $sql .= "'" . $description . "' )";
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : sql :".$sql." \n");
+ //debug
+
+ if ( empty ( $error ) ) {
+ if ( ! dbi_query ( $sql ) ) {
+ $error = translate("Database error") . ": " . dbi_error ();
+ }
+ else {
+ //mettre le plugin
+ //add father
+ $params[0] = $user ;
+ $params[1] = $id ;
+ plugin_hook('add_cal_link_father_event',$params);
+ }
}
+
+ // log add/update
+ activity_log ( $id, $login, ($is_assistant || $is_nonuser_admin ? $user : $login),
+ $newevent ? $LOG_CREATE : $LOG_UPDATE, "" );
- // Some users report that they get an error on duplicate keys
- // on the following add... As a safety measure, delete any
- // existing entry with the id. Ignore the result.
- dbi_query ( "DELETE FROM webcal_entry_user WHERE cal_id = $id " .
- "AND cal_login = '$participants[$i]'" );
- if ( empty ( $my_cat_id ) ) $my_cat_id = 'NULL';
- $sql = "INSERT INTO webcal_entry_user " .
- "( cal_id, cal_login, cal_status, cal_category ) VALUES ( $id, '" .
- $participants[$i] . "', '$status', $my_cat_id )";
- if ( ! dbi_query ( $sql ) ) {
- $error = translate("Database error") . ": " . dbi_error ();
- break;
- } else {
- // Don't send mail if we are editing a non-user calendar
- // and we are the admin
- if (!$is_nonuser_admin) {
- $from = $user_email;
- if ( empty ( $from ) && ! empty ( $email_fallback_from ) )
- $from = $email_fallback_from;
- // only send mail if their email address is filled in
- $do_send = get_pref_setting ( $participants[$i],
- $newevent ? "EMAIL_EVENT_ADDED" : "EMAIL_EVENT_UPDATED" );
- $user_TZ = get_pref_setting ( $participants[$i], "TZ_OFFSET" );
- $user_language = get_pref_setting ( $participants[$i], "LANGUAGE" );
- user_load_variables ( $participants[$i], "temp" );
-
-
- if ( $participants[$i] != $login &&
- boss_must_be_notified ( $login, $participants[$i] ) &&
- strlen ( $tempemail ) &&
- $do_send == "Y" && $send_user_mail && $send_email != "N" ) {
-
- // Want date/time in user's timezone
- $user_hour = $hour + $user_TZ;
- if ( $user_hour < 0 ) {
- $user_hour += 24;
- // adjust date
- $user_date = mktime ( 3, 0, 0, $month, $day, $year );
- $user_date -= $ONE_DAY;
- $user_month = date ( "m", $date );
- $user_day = date ( "d", $date );
- $user_year = date ( "Y", $date );
- } elseif ( $user_hour >= 24 ) {
- $user_hour -= 24;
- // adjust date
- $user_date = mktime ( 3, 0, 0, $month, $day, $year );
- $user_date += $ONE_DAY;
- $user_month = date ( "m", $date );
- $user_day = date ( "d", $date );
- $user_year = date ( "Y", $date );
- } else {
- $user_month = $month;
- $user_day = $day;
- $user_year = $year;
+ if ( $single_user == "Y" ) {
+ $participants[0] = $single_user_login;
+ }
+
+ // check if participants have been removed and send out emails
+ if ( ! $newevent && count ( $old_status ) > 0 ) { // nur bei Update!!!
+ while ( list ( $old_participant, $dummy ) = each ( $old_status ) ) {
+ $found_flag = false;
+ for ( $i = 0; $i < count ( $participants ); $i++ ) {
+ if ( $participants[$i] == $old_participant ) {
+ $found_flag = true;
+ break;
}
- if (($GLOBALS['LANGUAGE'] != $user_language) &&
- ! empty ( $user_language ) && ( $user_language != 'none' )) {
- reset_language ( $user_language );
- }
- //do_debug($user_language);
- $fmtdate = sprintf ( "%04d%02d%02d", $user_year, $user_month, $user_day );
- $msg = translate("Hello") . ", " . $tempfullname . ".\n\n";
- if ( $newevent || ( empty ( $old_status[$participants[$i]] ) ) ) {
- $msg .= translate("A new appointment has been made for you by");
- } else {
- $msg .= translate("An appointment has been updated by");
- }
- $msg .= " " . $login_fullname . ". " .
- translate("The subject is") . " \"" . $name . "\"\n\n" .
- translate("The description is") . " \"" . $description . "\"\n" .
- translate("Date") . ": " . date_to_str ( $fmtdate ) . "\n" .
- ( ( empty ( $user_hour ) && empty ( $minute ) ) ? "" :
- translate("Time") . ": " .
- display_time ( ( $user_hour * 10000 ) + ( $minute * 100 ), true ) . "\n" ) .
- translate("Please look on") . " " . translate($application_name) . " " .
- ( $require_approvals == "Y" ?
- translate("to accept or reject this appointment") :
- translate("to view this appointment") ) . ".";
- // add URL to event, if we can figure it out
- /*
- if ( ! empty ( $server_url ) ) {
- $url = $server_url . "view_entry.php?id=" . $id;
- $msg .= "\n\n" . $url;
- }
+ }
+ $is_nonuser_admin = user_is_nonuser_admin ( $login, $old_participant );
+ // Don't send mail if we are editing a non-user calendar
+ // and we are the admin
+ if ( !$found_flag && !$is_nonuser_admin) {
+ // only send mail if their email address is filled in
+ $do_send = get_pref_setting ( $old_participant, "EMAIL_EVENT_DELETED" );
+ $user_TZ = get_pref_setting ( $old_participant, "TZ_OFFSET" );
+ $user_language = get_pref_setting ( $old_participant, "LANGUAGE" );
+ user_load_variables ( $old_participant, "temp" );
+ if ( $old_participant != $login && strlen ( $tempemail ) &&
+ $do_send == "Y" && $send_email != "N" ) {
+
+ // Want date/time in user's timezone
+ $user_hour = $hour + $user_TZ;
+ if ( $user_hour < 0 ) {
+ $user_hour += 24;
+ // adjust date
+ $user_date = mktime ( 3, 0, 0, $month, $day, $year );
+ $user_date -= $ONE_DAY;
+ $user_month = date ( "m", $date );
+ $user_day = date ( "d", $date );
+ $user_year = date ( "Y", $date );
+ } elseif ( $user_hour >= 24 ) {
+ $user_hour -= 24;
+ // adjust date
+ $user_date = mktime ( 3, 0, 0, $month, $day, $year );
+ $user_date += $ONE_DAY;
+ $user_month = date ( "m", $date );
+ $user_day = date ( "d", $date );
+ $user_year = date ( "Y", $date );
+ } else {
+ $user_month = $month;
+ $user_day = $day;
+ $user_year = $year;
+ }
+ if (($GLOBALS['LANGUAGE'] != $user_language) &&
+ ! empty ( $user_language ) && ( $user_language != 'none' )){
+ reset_language ( $user_language );
+ }
+ //do_debug($user_language);
+ $fmtdate = sprintf ( "%04d%02d%02d", $user_year, $user_month, $user_day );
+ $msg = translate("Hello") . ", " . $tempfullname . ".\n\n" .
+ translate("An appointment has been canceled for you by") .
+ " " . $login_fullname . ". " .
+ translate("The subject was") . " \"" . $name . "\"\n\n" .
+ translate("The description is") . " \"" . $description . "\"\n" .
+ translate("Date") . ": " . date_to_str ( $fmtdate ) . "\n" .
+ ( ( empty ( $user_hour ) && empty ( $minute ) ) ? "" :
+ translate("Time") . ": " .
+ display_time ( ( $user_hour * 10000 ) + ( $minute * 100 ), true ) ) .
+ "\n\n\n";
+ // add URL to event, if we can figure it out
+ /*
+ if ( ! empty ( $server_url ) ) {
+ $url = $server_url . "view_entry.php?id=" . $id;
+ $msg .= $url . "\n\n";
+ }
*/
- if ( strlen ( $from ) ) {
- $extra_hdrs = "From: $from\r\nX-Mailer: " . translate($application_name);
- } else {
- $extra_hdrs = "X-Mailer: " . translate($application_name);
+ if ( strlen ( $login_email ) ) {
+ $extra_hdrs = "From: $login_email\r\nX-Mailer: " . translate($application_name);
+ } else {
+ $extra_hdrs = "From: $email_fallback_from\r\nX-Mailer: " . translate($application_name);
+ }
+ mail ( $tempemail,
+ translate($application_name) . " " . translate("Notification") . ": " . $name,
+ utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
+ activity_log ( $id, $login, $old_participant, $LOG_NOTIFICATION,
+ "User removed from participants list" );
}
-
-
- mail ( $tempemail,
- translate($application_name) . " " . translate("Notification") . ": " . $name,
- utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
- activity_log ( $id, $login, $participants[$i], $LOG_NOTIFICATION, "" );
-
}
}
}
- }
-
- // add external participants
- // send notification if enabled.
- if ( is_array ( $ext_names ) && is_array ( $ext_emails ) ) {
- for ( $i = 0; $i < count ( $ext_names ); $i++ ) {
- if ( strlen ( $ext_names[$i] ) ) {
- $sql = "INSERT INTO webcal_entry_ext_user " .
- "( cal_id, cal_fullname, cal_email ) VALUES ( " .
- "$id, '$ext_names[$i]', ";
- if ( strlen ( $ext_emails[$i] ) ) {
- $sql .= "'$ext_emails[$i]' )";
+
+ // now add participants and send out notifications
+
+ //If it's a project event insert the project as a participant
+ if($GLOBALS['type_param'] == 'group'){
+
+ //Get the name of the project
+ $res_project_name = dbi_query("SELECT group_name
+ FROM groups
+ WHERE group_id = '".$GLOBALS['group_param']."'");
+ $row_project_name = pg_fetch_array($res_project_name);
+ $project_name = $row_project_name[0];
+
+ //Insert the project
+ dbi_query("INSERT INTO webcal_entry_user
+ ( cal_id, cal_login, cal_status, cal_category )
+ VALUES ( $id, '" .$project_name . "', 'W', NULL )");
+ }
+
+ for ( $i = 0; $i < count ( $participants ); $i++ ) {
+ $my_cat_id = "";
+
+ // Is the person adding the nonuser calendar admin
+ $is_nonuser_admin = user_is_nonuser_admin ( $login, $participants[$i] );
+
+ // if public access, require approval unless
+ // $public_access_add_needs_approval is set to "N"
+ if ( $login == "__public__" ) {
+ if ( ! empty ( $public_access_add_needs_approval ) &&
+ $public_access_add_needs_approval == "N" ) {
+ $status = "A"; // no approval needed
} else {
- $sql .= "NULL )";
+ // Approval required
+ $status = "W"; // approval required
}
- if ( ! dbi_query ( $sql ) ) {
- $error = translate("Database error") . ": " . dbi_error ();
+ $my_cat_id = $cat_id;
+ } else if ( ! $newevent ) {
+ // keep the old status if no email will be sent
+ $send_user_mail = ( empty ( $old_status[$participants[$i]] ) || $entry_changed ) ? true : false;
+
+ $tmp_status = ( ! empty ( $old_status[$participants[$i]] ) && ! $send_user_mail ) ? $old_status[$participants[$i]] : "W";
+
+ $status = ( $participants[$i] != $login && boss_must_approve_event ( $login, $participants[$i] ) && $require_approvals == "Y" && ! $is_nonuser_admin ) ? $tmp_status : "A";
+
+ $tmp_cat = ( ! empty ( $old_category[$participants[$i]]) ) ?$old_category[$participants[$i]] : 'NULL';
+
+ $tmp_cat = ( $participants[$i] == $user ) ? $cat_id : $tmp_cat;
+
+ // Allow cat to be changed for public access (if admin user)
+ if ( $participants[$i] == "__public__" && $is_admin ) {
+ $tmp_cat = $cat_id;
}
- // send mail notification if enabled
- // TODO: move this code into a function...
- if ( $external_notifications == "Y" && $send_email != "N" &&
- strlen ( $ext_emails[$i] ) > 0 ) {
- $fmtdate = sprintf ( "%04d%02d%02d", $year, $month, $day );
- // Strip [\d] from duplicate Names before emailing
- $ext_names[$i] = trim(preg_replace( '/\[[\d]]/', "", $ext_names[$i]) );
- $msg = translate("Hello") . ", " . $ext_names[$i] . ".\n\n";
- if ( $newevent ) {
- $msg .= translate("A new appointment has been made for you by");
+
+ // If user is admin and this event was previously approved for public,
+ // keep it as approved even though date/time may have changed
+ // This goes against stricter security, but it confuses users to have
+ // to re-approve events they already approved.
+ if ( $participants[$i] == "__public__" && $is_admin &&
+ $old_status['__public__'] == 'A' ) {
+ $status = 'A';
+ }
+ $my_cat_id = ( $participants[$i] != $login ) ? $tmp_cat : $cat_id;
+ // If user is admin and
+ // if it's a global cat, then set it for other users as well.
+ if ( $is_admin && ! empty ( $categories[$cat_id] ) &&
+ empty ( $category_owners[$cat_id] ) ) {
+ // found categ. and owner set to NULL; it is global
+ $my_cat_id = $cat_id;
+ }
+ } else { // New Event
+
+ $send_user_mail = true;
+ $status = ( $participants[$i] != $login &&
+ boss_must_approve_event ( $login, $participants[$i] ) &&
+ $require_approvals == "Y" && ! $is_nonuser_admin ) ?
+ "W" : "A";
+ // If admin, no need to approve Public Access Events
+ if ( $participants[$i] == "__public__" && $is_admin ) {
+ $status = "A";
+ }
+ if ( $participants[$i] == $login ) {
+ $my_cat_id = $cat_id;
+ } else {
+ // if it's a global cat, then set it for other users as well.
+ if ( ! empty ( $categories[$cat_id] ) &&
+ empty ( $category_owners[$cat_id] ) ) {
+ // found cat. and owner set to NULL; it is global
+ $my_cat_id = $cat_id;
} else {
- $msg .= translate("An appointment has been updated by");
+ // not global category
+ $my_cat_id = 'NULL';
}
- $msg .= " " . $login_fullname . ". " .
- translate("The subject is") . " \"" . $name . "\"\n\n" .
- translate("The description is") . " \"" . $description . "\"\n" .
- translate("Date") . ": " . date_to_str ( $fmtdate ) . "\n" .
- ( ( empty ( $hour ) && empty ( $minute ) ) ? "" :
- translate("Time") . ": " .
- display_time ( ( $hour * 10000 ) + ( $minute * 100 ) ) . "\n" ) .
- translate("Please look on") . " " . translate($application_name) .
- ".";
- // add URL to event, if we can figure it out
- /*
- if ( ! empty ( $server_url ) ) {
- $url = $server_url . "view_entry.php?id=" . $id;
- $msg .= "\n\n" . $url;
+ }
+ }
+
+ // Some users report that they get an error on duplicate keys
+ // on the following add... As a safety measure, delete any
+ // existing entry with the id. Ignore the result.
+ dbi_query ( "DELETE FROM webcal_entry_user WHERE cal_id = $id " .
+ "AND cal_login = '$participants[$i]'" );
+ if ( empty ( $my_cat_id ) ) $my_cat_id = 'NULL';
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : login : ".$login." type_param : ".$GLOBALS['type_param']." \n");
+ //debug
+
+ $sql = "INSERT INTO webcal_entry_user " .
+ "( cal_id, cal_login, cal_status, cal_category ) VALUES ( $id, '" .
+ $participants[$i] . "', '$status', $my_cat_id )";
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : SQL webcal_entry_user : ".$sql." \n");
+ //debug
+
+ if ( ! dbi_query ( $sql ) ) {
+ $error = translate("Database error") . ": " . dbi_error ();
+ break;
+ } else {
+ // Don't send mail if we are editing a non-user calendar
+ // and we are the admin
+ if (!$is_nonuser_admin) {
+ $from = $user_email;
+ if ( empty ( $from ) && ! empty ( $email_fallback_from ) )
+ $from = $email_fallback_from;
+ // only send mail if their email address is filled in
+ $do_send = get_pref_setting ( $participants[$i],
+ $newevent ? "EMAIL_EVENT_ADDED" : "EMAIL_EVENT_UPDATED" );
+ $user_TZ = get_pref_setting ( $participants[$i], "TZ_OFFSET" );
+ $user_language = get_pref_setting ( $participants[$i], "LANGUAGE" );
+ user_load_variables ( $participants[$i], "temp" );
+
+
+ if ( $participants[$i] != $login &&
+ boss_must_be_notified ( $login, $participants[$i] ) &&
+ strlen ( $tempemail ) &&
+ $do_send == "Y" && $send_user_mail && $send_email != "N" ) {
+
+ // Want date/time in user's timezone
+ $user_hour = $hour + $user_TZ;
+ if ( $user_hour < 0 ) {
+ $user_hour += 24;
+ // adjust date
+ $user_date = mktime ( 3, 0, 0, $month, $day, $year );
+ $user_date -= $ONE_DAY;
+ $user_month = date ( "m", $date );
+ $user_day = date ( "d", $date );
+ $user_year = date ( "Y", $date );
+ } elseif ( $user_hour >= 24 ) {
+ $user_hour -= 24;
+ // adjust date
+ $user_date = mktime ( 3, 0, 0, $month, $day, $year );
+ $user_date += $ONE_DAY;
+ $user_month = date ( "m", $date );
+ $user_day = date ( "d", $date );
+ $user_year = date ( "Y", $date );
+ } else {
+ $user_month = $month;
+ $user_day = $day;
+ $user_year = $year;
+ }
+ if (($GLOBALS['LANGUAGE'] != $user_language) &&
+ ! empty ( $user_language ) && ( $user_language != 'none' )) {
+ reset_language ( $user_language );
+ }
+ //do_debug($user_language);
+ $fmtdate = sprintf ( "%04d%02d%02d", $user_year, $user_month, $user_day );
+ $msg = translate("Hello") . ", " . $tempfullname . ".\n\n";
+ if ( $newevent || ( empty ( $old_status[$participants[$i]] ) ) ) {
+ $msg .= translate("A new appointment has been made for you by");
+ } else {
+ $msg .= translate("An appointment has been updated by");
+ }
+ $msg .= " " . $login_fullname . ". " .
+ translate("The subject is") . " \"" . $name . "\"\n\n" .
+ translate("The description is") . " \"" . $description . "\"\n" .
+ translate("Date") . ": " . date_to_str ( $fmtdate ) . "\n" .
+ ( ( empty ( $user_hour ) && empty ( $minute ) ) ? "" :
+ translate("Time") . ": " .
+ display_time ( ( $user_hour * 10000 ) + ( $minute * 100 ), true ) . "\n" ) .
+ translate("Please look on") . " " . translate($application_name) . " " .
+ ( $require_approvals == "Y" ?
+ translate("to accept or reject this appointment") :
+ translate("to view this appointment") ) . ".";
+ // add URL to event, if we can figure it out
+ /*
+ if ( ! empty ( $server_url ) ) {
+ $url = $server_url . "view_entry.php?id=" . $id;
+ $msg .= "\n\n" . $url;
+ }
+ */
+ if ( strlen ( $from ) ) {
+ $extra_hdrs = "From: $from\r\nX-Mailer: " . translate($application_name);
+ } else {
+ $extra_hdrs = "X-Mailer: " . translate($application_name);
+ }
+
+
+ mail ( $tempemail,
+ translate($application_name) . " " . translate("Notification") . ": " . $name,
+ utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
+ activity_log ( $id, $login, $participants[$i], $LOG_NOTIFICATION, "" );
+
}
- */
- if ( strlen ( $from ) ) {
- $extra_hdrs = "From: $from\r\nX-Mailer: " . translate($application_name);
+ }
+ }
+ }
+
+ // add external participants
+ // send notification if enabled.
+ if ( is_array ( $ext_names ) && is_array ( $ext_emails ) ) {
+ for ( $i = 0; $i < count ( $ext_names ); $i++ ) {
+ if ( strlen ( $ext_names[$i] ) ) {
+ $sql = "INSERT INTO webcal_entry_ext_user " .
+ "( cal_id, cal_fullname, cal_email ) VALUES ( " .
+ "$id, '$ext_names[$i]', ";
+ if ( strlen ( $ext_emails[$i] ) ) {
+ $sql .= "'$ext_emails[$i]' )";
} else {
- $extra_hdrs = "X-Mailer: " . translate($application_name);
+ $sql .= "NULL )";
}
- mail ( $ext_emails[$i],
- translate($application_name) . " " .
- translate("Notification") . ": " . $name,
- utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
-
+ if ( ! dbi_query ( $sql ) ) {
+ $error = translate("Database error") . ": " . dbi_error ();
+ }
+ // send mail notification if enabled
+ // TODO: move this code into a function...
+ if ( $external_notifications == "Y" && $send_email != "N" &&
+ strlen ( $ext_emails[$i] ) > 0 ) {
+ $fmtdate = sprintf ( "%04d%02d%02d", $year, $month, $day );
+ // Strip [\d] from duplicate Names before emailing
+ $ext_names[$i] = trim(preg_replace( '/\[[\d]]/', "", $ext_names[$i]) );
+ $msg = translate("Hello") . ", " . $ext_names[$i] . ".\n\n";
+ if ( $newevent ) {
+ $msg .= translate("A new appointment has been made for you by");
+ } else {
+ $msg .= translate("An appointment has been updated by");
+ }
+ $msg .= " " . $login_fullname . ". " .
+ translate("The subject is") . " \"" . $name . "\"\n\n" .
+ translate("The description is") . " \"" . $description . "\"\n" .
+ translate("Date") . ": " . date_to_str ( $fmtdate ) . "\n" .
+ ( ( empty ( $hour ) && empty ( $minute ) ) ? "" :
+ translate("Time") . ": " .
+ display_time ( ( $hour * 10000 ) + ( $minute * 100 ) ) . "\n" ) .
+ translate("Please look on") . " " . translate($application_name) .
+ ".";
+ // add URL to event, if we can figure it out
+ /*
+ if ( ! empty ( $server_url ) ) {
+ $url = $server_url . "view_entry.php?id=" . $id;
+ $msg .= "\n\n" . $url;
+ }
+ */
+ if ( strlen ( $from ) ) {
+ $extra_hdrs = "From: $from\r\nX-Mailer: " . translate($application_name);
+ } else {
+ $extra_hdrs = "X-Mailer: " . translate($application_name);
+ }
+ mail ( $ext_emails[$i],
+ translate($application_name) . " " .
+ translate("Notification") . ": " . $name,
+ utf8_decode(html_to_8bits ($msg)), $extra_hdrs );
+
+ }
}
}
}
- }
-
- // add site extras
- for ( $i = 0; $i < count ( $site_extras ) && empty ( $error ); $i++ ) {
- $sql = "";
- $extra_name = $site_extras[$i][0];
- $extra_type = $site_extras[$i][2];
- $extra_arg1 = $site_extras[$i][3];
- $extra_arg2 = $site_extras[$i][4];
- $value = $$extra_name;
- //echo "Looking for $extra_name... value = " . $value . " ... type = " .
- // $extra_type . "<br />\n";
- if ( strlen ( $$extra_name ) || $extra_type == $EXTRA_DATE ) {
- if ( $extra_type == $EXTRA_URL || $extra_type == $EXTRA_EMAIL ||
- $extra_type == $EXTRA_TEXT || $extra_type == $EXTRA_USER ||
- $extra_type == $EXTRA_MULTILINETEXT ||
- $extra_type == $EXTRA_SELECTLIST ) {
- $sql = "INSERT INTO webcal_site_extras " .
- "( cal_id, cal_name, cal_type, cal_data ) VALUES ( " .
- "$id, '$extra_name', $extra_type, '$value' )";
- } else if ( $extra_type == $EXTRA_REMINDER && $value == "1" ) {
- if ( ( $extra_arg2 & $EXTRA_REMINDER_WITH_DATE ) > 0 ) {
+
+ // add site extras
+ for ( $i = 0; $i < count ( $site_extras ) && empty ( $error ); $i++ ) {
+ $sql = "";
+ $extra_name = $site_extras[$i][0];
+ $extra_type = $site_extras[$i][2];
+ $extra_arg1 = $site_extras[$i][3];
+ $extra_arg2 = $site_extras[$i][4];
+ $value = $$extra_name;
+ //echo "Looking for $extra_name... value = " . $value . " ... type = " .
+ // $extra_type . "<br />\n";
+ if ( strlen ( $$extra_name ) || $extra_type == $EXTRA_DATE ) {
+ if ( $extra_type == $EXTRA_URL || $extra_type == $EXTRA_EMAIL ||
+ $extra_type == $EXTRA_TEXT || $extra_type == $EXTRA_USER ||
+ $extra_type == $EXTRA_MULTILINETEXT ||
+ $extra_type == $EXTRA_SELECTLIST ) {
+ $sql = "INSERT INTO webcal_site_extras " .
+ "( cal_id, cal_name, cal_type, cal_data ) VALUES ( " .
+ "$id, '$extra_name', $extra_type, '$value' )";
+ } else if ( $extra_type == $EXTRA_REMINDER && $value == "1" ) {
+ if ( ( $extra_arg2 & $EXTRA_REMINDER_WITH_DATE ) > 0 ) {
+ $yname = $extra_name . "year";
+ $mname = $extra_name . "month";
+ $dname = $extra_name . "day";
+ $edate = sprintf ( "%04d%02d%02d", $$yname, $$mname, $$dname );
+ $sql = "INSERT INTO webcal_site_extras " .
+ "( cal_id, cal_name, cal_type, cal_remind, cal_date ) VALUES ( " .
+ "$id, '$extra_name', $extra_type, 1, $edate )";
+ } else if ( ( $extra_arg2 & $EXTRA_REMINDER_WITH_OFFSET ) > 0 ) {
+ $dname = $extra_name . "_days";
+ $hname = $extra_name . "_hours";
+ $mname = $extra_name . "_minutes";
+ $minutes = ( $$dname * 24 * 60 ) + ( $$hname * 60 ) + $$mname;
+ $sql = "INSERT INTO webcal_site_extras " .
+ "( cal_id, cal_name, cal_type, cal_remind, cal_data ) VALUES ( " .
+ "$id, '$extra_name', $extra_type, 1, '" . $minutes . "' )";
+ } else {
+ $sql = "INSERT INTO webcal_site_extras " .
+ "( cal_id, cal_name, cal_type, cal_remind ) VALUES ( " .
+ "$id, '$extra_name', $extra_type, 1 )";
+ }
+ } else if ( $extra_type == $EXTRA_DATE ) {
$yname = $extra_name . "year";
$mname = $extra_name . "month";
$dname = $extra_name . "day";
$edate = sprintf ( "%04d%02d%02d", $$yname, $$mname, $$dname );
$sql = "INSERT INTO webcal_site_extras " .
- "( cal_id, cal_name, cal_type, cal_remind, cal_date ) VALUES ( " .
- "$id, '$extra_name', $extra_type, 1, $edate )";
- } else if ( ( $extra_arg2 & $EXTRA_REMINDER_WITH_OFFSET ) > 0 ) {
- $dname = $extra_name . "_days";
- $hname = $extra_name . "_hours";
- $mname = $extra_name . "_minutes";
- $minutes = ( $$dname * 24 * 60 ) + ( $$hname * 60 ) + $$mname;
- $sql = "INSERT INTO webcal_site_extras " .
- "( cal_id, cal_name, cal_type, cal_remind, cal_data ) VALUES ( " .
- "$id, '$extra_name', $extra_type, 1, '" . $minutes . "' )";
- } else {
- $sql = "INSERT INTO webcal_site_extras " .
- "( cal_id, cal_name, cal_type, cal_remind ) VALUES ( " .
- "$id, '$extra_name', $extra_type, 1 )";
+ "( cal_id, cal_name, cal_type, cal_date ) VALUES ( " .
+ "$id, '$extra_name', $extra_type, $edate )";
}
- } else if ( $extra_type == $EXTRA_DATE ) {
- $yname = $extra_name . "year";
- $mname = $extra_name . "month";
- $dname = $extra_name . "day";
- $edate = sprintf ( "%04d%02d%02d", $$yname, $$mname, $$dname );
- $sql = "INSERT INTO webcal_site_extras " .
- "( cal_id, cal_name, cal_type, cal_date ) VALUES ( " .
- "$id, '$extra_name', $extra_type, $edate )";
}
+ if ( strlen ( $sql ) && empty ( $error ) ) {
+ //echo "SQL: $sql<BR>\n";
+ if ( ! dbi_query ( $sql ) ) {
+ $error = translate("Database error") . ": " . dbi_error ();
+ }
+ }
}
- if ( strlen ( $sql ) && empty ( $error ) ) {
- //echo "SQL: $sql<BR>\n";
- if ( ! dbi_query ( $sql ) ) {
+
+ // clearly, we want to delete the old repeats, before inserting new...
+ if ( empty ( $error ) ) {
+ if ( ! dbi_query ( "DELETE FROM webcal_entry_repeats WHERE cal_id = $id") ) {
$error = translate("Database error") . ": " . dbi_error ();
}
+ // add repeating info
+ if ( ! empty ( $rpt_type ) && strlen ( $rpt_type ) && $rpt_type != 'none' ) {
+ $freq = ( $rpt_freq ? $rpt_freq : 1 );
+ if ( ! empty ( $rpt_end_use ) ) {
+ $end = sprintf ( "%04d%02d%02d", $rpt_year, $rpt_month, $rpt_day );
+ } else {
+ $end = 'NULL';
+ }
+ if ($rpt_type == 'weekly') {
+ $days = ( empty( $rpt_sun ) ? 'n' : 'y' )
+ . ( empty( $rpt_mon ) ? 'n' : 'y' )
+ . ( empty( $rpt_tue ) ? 'n' : 'y' )
+ . ( empty( $rpt_wed ) ? 'n' : 'y' )
+ . ( empty( $rpt_thu ) ? 'n' : 'y' )
+ . ( empty( $rpt_fri ) ? 'n' : 'y' )
+ . ( empty( $rpt_sat ) ? 'n' : 'y' );
+ } else {
+ $days = "nnnnnnn";
+ }
+
+ $sql = "INSERT INTO webcal_entry_repeats ( cal_id, " .
+ "cal_type, cal_end, cal_days, cal_frequency ) VALUES " .
+ "( $id, '$rpt_type', $end, '$days', $freq )";
+ dbi_query ( $sql );
+ $msg .= "<span style=\"font-weight:bold;\">SQL:</span> $sql<br />\n<br />";
+ }
}
}
-
- // clearly, we want to delete the old repeats, before inserting new...
+
+ // If we were editing this event, then go back to the last view (week, day,
+ // month). If this is a new event, then go to the preferred view for
+ // the date range that this event was added to.
if ( empty ( $error ) ) {
- if ( ! dbi_query ( "DELETE FROM webcal_entry_repeats WHERE cal_id = $id") ) {
- $error = translate("Database error") . ": " . dbi_error ();
+ if ($GLOBALS['type_param'] == 'group'){
+ $user=$GLOBALS['group_name_param'];
+ }else{
+ $user=$login;
}
- // add repeating info
- if ( ! empty ( $rpt_type ) && strlen ( $rpt_type ) && $rpt_type != 'none' ) {
- $freq = ( $rpt_freq ? $rpt_freq : 1 );
- if ( ! empty ( $rpt_end_use ) ) {
- $end = sprintf ( "%04d%02d%02d", $rpt_year, $rpt_month, $rpt_day );
- } else {
- $end = 'NULL';
- }
- if ($rpt_type == 'weekly') {
- $days = ( empty( $rpt_sun ) ? 'n' : 'y' )
- . ( empty( $rpt_mon ) ? 'n' : 'y' )
- . ( empty( $rpt_tue ) ? 'n' : 'y' )
- . ( empty( $rpt_wed ) ? 'n' : 'y' )
- . ( empty( $rpt_thu ) ? 'n' : 'y' )
- . ( empty( $rpt_fri ) ? 'n' : 'y' )
- . ( empty( $rpt_sat ) ? 'n' : 'y' );
- } else {
- $days = "nnnnnnn";
- }
+ $xdate = sprintf ( "%04d%02d%02d", $year, $month, $day );
+ $user_args = ( empty ( $user ) ? '&' : "user=$user&" );
+ $user_args .= "type_param=".($GLOBALS['type_param']=='group' ? "group&group_param=".$GLOBALS['group_param'] : "user");
+ send_to_preferred_view ( $xdate, $user_args );
+ }
- $sql = "INSERT INTO webcal_entry_repeats ( cal_id, " .
- "cal_type, cal_end, cal_days, cal_frequency ) VALUES " .
- "( $id, '$rpt_type', $end, '$days', $freq )";
- dbi_query ( $sql );
- $msg .= "<span style=\"font-weight:bold;\">SQL:</span> $sql<br />\n<br />";
+ print_header();
+ if ( strlen ( $conflicts ) ) {
+ ?>
+ <h2><?php etranslate("Scheduling Conflict")?></h2>
+
+ <?php etranslate("Your suggested time of")?> <span style="font-weight:bold;">
+ <?php
+ if ( ! empty ( $allday ) && $allday == "Y" ) {
+ etranslate("All day event");
+ } else {
+ $time = sprintf ( "%d%02d00", $hour, $minute );
+ echo display_time ( $time );
+ if ( $duration > 0 )
+ echo "-" . display_time ( add_duration ( $time, $duration ) );
}
- }
-}
-
-// If we were editing this event, then go back to the last view (week, day,
-// month). If this is a new event, then go to the preferred view for
-// the date range that this event was added to.
-if ( empty ( $error ) ) {
- $xdate = sprintf ( "%04d%02d%02d", $year, $month, $day );
- $user_args = ( empty ( $user ) ? '' : "user=$user" );
- send_to_preferred_view ( $xdate, $user_args );
-}
-
-print_header();
-if ( strlen ( $conflicts ) ) {
-?>
-<h2><?php etranslate("Scheduling Conflict")?></h2>
-
-<?php etranslate("Your suggested time of")?> <span style="font-weight:bold;">
-<?php
- if ( ! empty ( $allday ) && $allday == "Y" ) {
- etranslate("All day event");
- } else {
- $time = sprintf ( "%d%02d00", $hour, $minute );
- echo display_time ( $time );
- if ( $duration > 0 )
- echo "-" . display_time ( add_duration ( $time, $duration ) );
- }
-?></span> <?php etranslate("conflicts with the following existing calendar entries")?>:
-<ul>
-<?php echo $conflicts; ?>
-</ul>
-
-<?php
-// user can confirm conflicts
- echo "<form name=\"confirm\" method=\"post\">\n";
- if ( ! is_array ( $_POST ) && is_array ( $HTTP_POST_VARS ) )
- $_POST = $HTTP_POST_VARS;
- foreach ($_POST as $xkey=>$xval ) {
- if (is_array($xval)) {
- $xkey.="[]";
- foreach ( $xval as $ykey=>$yval ) {
+ ?></span> <?php etranslate("conflicts with the following existing calendar entries")?>:
+ <ul>
+ <?php echo $conflicts; ?>
+ </ul>
+
+ <?php
+ // user can confirm conflicts
+ echo "<form name=\"confirm\" method=\"post\">\n";
+ if ( ! is_array ( $_POST ) && is_array ( $HTTP_POST_VARS ) )
+ $_POST = $HTTP_POST_VARS;
+ foreach ($_POST as $xkey=>$xval ) {
+ if (is_array($xval)) {
+ $xkey.="[]";
+ foreach ( $xval as $ykey=>$yval ) {
+ if (get_magic_quotes_gpc())
+ $yval = stripslashes($yval);
+ $yval = htmlentities ( $yval );
+ echo "<input type=\"hidden\" name=\"$xkey\" value=\"$yval\" />\n";
+ }
+ } else {
if (get_magic_quotes_gpc())
- $yval = stripslashes($yval);
- $yval = htmlentities ( $yval );
- echo "<input type=\"hidden\" name=\"$xkey\" value=\"$yval\" />\n";
+ $xval = stripslashes($xval);
+ $xval = htmlentities ( $xval );
+ echo "<input type=\"hidden\" name=\"$xkey\" value=\"$xval\" />\n";
}
- } else {
- if (get_magic_quotes_gpc())
- $xval = stripslashes($xval);
- $xval = htmlentities ( $xval );
- echo "<input type=\"hidden\" name=\"$xkey\" value=\"$xval\" />\n";
}
- }
-?>
-<table>
- <tr>
+ ?>
+ <table>
+ <tr>
+ <?php
+ // Allow them to override a conflict if server settings allow it
+ if ( ! empty ( $allow_conflict_override ) &&
+ $allow_conflict_override == "Y" ) {
+ echo "<td><input type=\"submit\" name=\"confirm_conflicts\" " .
+ "value=\"" . translate("Save") . "\" /></td>\n";
+ }
+ ?>
+ <td><input type="button" value="<?php etranslate("Cancel")?>"
+ onclick="history.back()" /><td>
+ </tr>
+ </table>
+ </form>
+
+ <?php } else { ?>
+ <h2><?php etranslate("Error")?></h2>
+ <blockquote>
+ <?php echo $error; ?>
+ </blockquote>
+ <?php } ?>
+
<?php
- // Allow them to override a conflict if server settings allow it
- if ( ! empty ( $allow_conflict_override ) &&
- $allow_conflict_override == "Y" ) {
- echo "<td><input type=\"submit\" name=\"confirm_conflicts\" " .
- "value=\"" . translate("Save") . "\" /></td>\n";
- }
+}else{
+ print_header();
+ $error = translate ( "You are not authorized" );
+ echo '<h2>'.etranslate("Error").'</h2>
+ <blockquote>';
+ echo $error;
+}
?>
- <td><input type="button" value="<?php etranslate("Cancel")?>"
-onclick="history.back()" /><td>
- </tr>
-</table>
-</form>
-
-<?php } else { ?>
-<h2><?php etranslate("Error")?></h2>
-<blockquote>
-<?php echo $error; ?>
-</blockquote>
-<?php } ?>
-
<?php print_trailer(); ?>
-</body>
-</html>
+ </body>
+ </html>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/connect.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/connect.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/connect.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -87,6 +87,10 @@
if ( empty ( $PHP_SELF ) )
$PHP_SELF = $_SERVER["PHP_SELF"];
+
+ //debug
+ //logs($log_file,"connect.php : l-92 : login_is_admin :".$login_is_admin."\n");
+ //debug
if ( empty ( $login_url ) )
$login_url = "login.php";
@@ -96,10 +100,14 @@
$login_url .= "?";
if ( ! empty ( $login_return_path ) )
$login_url .= "return_path=$login_return_path";
-
+//debug
+//logs($log_file,"connect.php l-105 : login_is_admin :".$login_is_admin."\n");
+//debug
+
if ( empty ( $session_not_found ) )
$session_not_found = false;
+
if ( $pub_acc_enabled && ! empty ( $session_not_found ) ) {
$login = "__public__";
@@ -113,6 +121,10 @@
exit;
}
+//debug
+//logs($log_file,"connect.php l-125 : login_is_admin :".$login_is_admin."\n");
+//debug
+
if ( empty ( $login ) && $use_http_auth ) {
if ( strstr ( $PHP_SELF, "login.php" ) ) {
// ignore since login.php will redirect to index.php
@@ -130,7 +142,17 @@
$fullname = "Public Access";
$user_email = "";
} else {
+
+ //debug
+ //logs($log_file,"connect.php l-147 : login_is_admin :".$login_is_admin."\n");
+ //debug
+
user_load_variables ( $login, "login_" );
+
+ //debug
+ //logs($log_file,"connect.php l-151 : login_is_admin :".$login_is_admin."\n");
+ //debug
+
if ( ! empty ( $login_login ) ) {
$is_admin = ( $login_is_admin == "Y" ? true : false );
$lastname = $login_lastname;
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/functions.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/functions.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/functions.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -30,6 +30,14 @@
/**#@-*/
/**
+ *File to log
+ *
+ */
+global $log_file;
+$log_file="/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt";
+
+
+/**
* Number of seconds in a day
*
* @global int $ONE_DAY
@@ -185,6 +193,14 @@
}
*/
+function logs($logs_file, $msg){
+
+ /*$log=fopen($logs_file,"a+");
+ fputs($log,$msg."\n");
+ fclose($log);*/
+
+}
+
/*
* Functions start here. All non-function code should be above this
*
@@ -576,6 +592,19 @@
* @global resource Database connection
*/
function do_redirect ( $url ) {
+
+ //Debug
+ //$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+ //fputs($log,"####### functions.php #######\n------- do_redirect -------\n");
+ //fclose($log);
+ //Debug
+
+ //Debug
+ //$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+ //fputs($log,"url : ".$url."\n");
+ //fclose($log);
+ //Debug
+
global $SERVER_SOFTWARE, $_SERVER, $c;
// Replace any '&' with '&' since we don't want that in the HTTP
@@ -584,28 +613,43 @@
if ( empty ( $SERVER_SOFTWARE ) )
$SERVER_SOFTWARE = $_SERVER["SERVER_SOFTWARE"];
+
//echo "SERVER_SOFTWARE = $SERVER_SOFTWARE <br />\n"; exit;
- if ( ( substr ( $SERVER_SOFTWARE, 0, 5 ) == "Micro" ) ||
- ( substr ( $SERVER_SOFTWARE, 0, 3 ) == "WN/" ) ) {
- echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html
- PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
- \"DTD/xhtml1-transitional.dtd\">
+ if ( ( substr ( $SERVER_SOFTWARE, 0, 5 ) == "Micro" ) || ( substr ( $SERVER_SOFTWARE, 0, 3 ) == "WN/" ) ) {
+
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n
+<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\"DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">
-<head>\n<title>Redirect</title>\n" .
- "<meta http-equiv=\"refresh\" content=\"0; url=$url\" />\n</head>\n<body>\n" .
- "Redirecting to.. <a href=\"" . $url . "\">here</a>.</body>\n</html>";
- } else {
- Header ( "Location: $url" );
- //print "<javascript>window.location.href='index.php';</script>" ;
- echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html
- PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
- \"DTD/xhtml1-transitional.dtd\">
+ <head>\n
+ <title>Redirect</title>\n
+ <meta http-equiv=\"refresh\" content=\"0; url=\"".$url."\" />\n
+ </head>\n
+ <body>\n
+ Redirecting to.. <a href=\"".$url."\">here</a>
+ </body>\n
+</html>";
+
+ }else {
+
+ Header ( "Location: ".$url );
+ print "<script>window.location.href=\"".$url."\";</script>" ;
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n
+<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">
-<head>\n<title>Redirect</title>\n</head>\n<body>\n" .
- "Redirecting to aa... <a href=\"" . $url . "\">here</a>.</body>\n</html>";
+ <head>\n
+ <title>Redirect</title>\n
+ </head>\n
+ <body>\n
+ Redirecting to ... <a href=\"".$url."\">here</a>.
+ </body>\n
+</html>";
+
}
+
dbi_close ( $c );
+
exit;
+
}
/**
@@ -729,7 +773,7 @@
"POPUP_BG" => 1,
"POPUP_FG" => 1,
);
-
+
$browser = get_web_browser ();
$browser_lang = get_browser_language ();
$prefarray = array ();
@@ -805,6 +849,8 @@
if ( $is_nonuser_admin ) load_nonuser_preferences ($user);
}
+
+
/**
* Gets the list of external users for an event from the webcal_entry_ext_user table in an HTML format.
*
@@ -1279,17 +1325,33 @@
* month.php? or view_l.php?id=7&)
*/
function display_small_month ( $thismonth, $thisyear, $showyear,
- $show_weeknums=false, $minical_id='', $month_link='month.php?' ) {
+ $show_weeknums=false, $minical_id='', $month_link='month.php?', $info_type='&type_param=user' ) {
global $WEEK_START, $user, $login, $boldDays, $get_unapproved;
global $DISPLAY_WEEKNUMBER;
global $SCRIPT, $thisday; // Needed for day.php
global $caturl, $today;
+ global $log_file;
+
+ //Debug
+ logs($log_file,"####### function.php #######\n------- display_small_month -------\n");
+ if(isset($get_unapproved)){
+ logs($log_file, "1\n");
+ }else{
+ logs($log_file, "0\n");
+ }
+ //Debug
+
+ //Debug
+ logs($log_file, "UNAPPROVED : ".$GLOBALS['DISPLAY_UNAPPROVED']." get_unapproved : ".($get_unapproved?"1":"0")."\n");
+ //Debug
if ( $user != $login && ! empty ( $user ) ) {
$u_url = "user=$user" . "&";
} else {
$u_url = '';
}
+
+ $u_url .= $info_type."&";
//start the minical table for each month
echo "\n<table class=\"minical\"";
@@ -1460,11 +1522,17 @@
strstr ( $PHP_SELF, "view_t.php" ) )
$class = "entry";
+ if($GLOBALS['type_param'] == 'group'){
+ $info_type = "&type_param=group&group_param=".$GLOBALS['group_param'];
+ }else{
+ $info_type = "&type_param=user";
+ }
+
if ( $pri == 3 ) echo "<strong>";
$popupid = "eventinfo-$id-$key";
$key++;
echo "<a title=\"" .
- translate("View this entry") . "\" class=\"$class\" href=\"view_entry.php?id=$id&date=$date";
+ translate("View this entry") . "\" class=\"$class\" href=\"view_entry.php?id=$id&date=$date".$info_type;
if ( strlen ( $user ) > 0 )
echo "&user=" . $user;
echo "\" onmouseover=\"window.status='" .
@@ -1602,6 +1670,11 @@
global $login;
global $layers;
global $TZ_OFFSET;
+ global $log_file;
+
+ //debug
+ logs($log_file,"function.php : read_event \n");
+ //debug
$sy = substr ( $startdate, 0, 4 );
$sm = substr ( $startdate, 4, 2 );
@@ -1663,6 +1736,10 @@
"webcal_entry.cal_date < $enddate_plus1 ) )";
}
}
+
+ //debug
+ //logs($log_file,"function.php : read_event : ".$date_filter."\n");
+ //debug
return query_events ( $user, false, $date_filter, $cat_id );
}
@@ -1682,12 +1759,24 @@
*/
function get_entries ( $user, $date, $get_unapproved=true ) {
global $events, $TZ_OFFSET;
+ global $log_file;
$n = 0;
$ret = array ();
//echo "<br />\nChecking " . count ( $events ) . " events. TZ_OFFSET = $TZ_OFFSET, get_unapproved=" . $get_unapproved . "<br />\n";
//print_r ( $events );
+
+ //Debug
+ //logs($log_file,"######## function.php #######\n-------- get_entries -------\n");
+ //logs($log_file,"date : ".$date."\n");
+ //if($get_unapproved){
+ // logs($log_file,"get unapproved\n");
+ //}else{
+ // logs($log_file,"don't get unapproved\n");
+ //}
+ //logs($log_file,print_r($events,true)."\n");
+ //Debug
for ( $i = 0; $i < count ( $events ); $i++ ) {
// In case of data corruption (or some other bug...)
@@ -1695,6 +1784,9 @@
continue;
if ( ( ! $get_unapproved ) && $events[$i]['cal_status'] == 'W' ) {
// ignore this event
+ //debug
+ logs($log_file,"ignore this event\n");
+ //debug
//don't adjust anything if no TZ offset or ALL Day Event or Untimed
} else if ( empty ( $TZ_OFFSET) || ( $events[$i]['cal_time'] <= 0 ) ) {
if ( $events[$i]['cal_date'] == $date )
@@ -1747,6 +1839,11 @@
}
}
}
+
+ //Debug
+ //logs($log_file,"ret : ".print_r($ret,true)."\n");
+ //Debug
+
return $ret;
}
@@ -1766,39 +1863,37 @@
function query_events ( $user, $want_repeated, $date_filter, $cat_id = '' ) {
global $login;
global $layers, $public_access_default_visible;
+ global $log_file;
$result = array ();
$layers_byuser = array ();
- $sql = "SELECT webcal_entry.cal_name, webcal_entry.cal_description, "
- . "webcal_entry.cal_date, webcal_entry.cal_time, "
- . "webcal_entry.cal_id, webcal_entry.cal_ext_for_id, "
- . "webcal_entry.cal_priority, "
- . "webcal_entry.cal_access, webcal_entry.cal_duration, "
- . "webcal_entry_user.cal_status, "
- . "webcal_entry_user.cal_category, "
- . "webcal_entry_user.cal_login ";
+ $sql = "SELECT distinct e.cal_name, e.cal_description,e.cal_date, e.cal_time,e.cal_id,"
+ ." e.cal_ext_for_id,e.cal_priority,e.cal_access,e.cal_duration, "
+ ." eu1.cal_status,eu1.cal_category, eu1.cal_login ";
if ( $want_repeated ) {
$sql .= ", "
- . "webcal_entry_repeats.cal_type, webcal_entry_repeats.cal_end, "
- . "webcal_entry_repeats.cal_frequency, webcal_entry_repeats.cal_days "
- . "FROM webcal_entry, webcal_entry_repeats, webcal_entry_user "
- . "WHERE webcal_entry.cal_id = webcal_entry_repeats.cal_id AND ";
+ . "er.cal_type, er.cal_end, "
+ . "er.cal_frequency, er.cal_days "
+ . "FROM webcal_entry e, webcal_entry_repeats er, webcal_entry_user eu1 "
+ . "WHERE e.cal_id = er.cal_id AND ";
} else {
- $sql .= "FROM webcal_entry, webcal_entry_user WHERE ";
+ $sql .= "FROM webcal_entry e, webcal_entry_user eu1 "
+ . " WHERE ";
}
- $sql .= "webcal_entry.cal_id = webcal_entry_user.cal_id " .
- "AND webcal_entry_user.cal_status IN ('A','W') ";
+ $sql .= "e.cal_id = eu1.cal_id AND eu1.cal_status IN ('A','W') AND ".
+ "(eu1.cal_group_status NOT LIKE ('%,R:".$user.",%') ".
+ " OR eu1.cal_group_status is null)";
- if ( $cat_id != '' ) $sql .= "AND webcal_entry_user.cal_category LIKE '$cat_id' ";
+ if ( $cat_id != '' ) $sql .= "AND eu1.cal_category LIKE '$cat_id' ";
if ( strlen ( $user ) > 0 )
- $sql .= "AND (webcal_entry_user.cal_login = '" . $user . "' ";
+ $sql .= "AND (eu1.cal_login = '" . $user . "' ";
if ( $user == $login && strlen ( $user ) > 0 ) {
if ($layers) foreach ($layers as $layer) {
$layeruser = $layer['cal_layeruser'];
- $sql .= "OR webcal_entry_user.cal_login = '" . $layeruser . "' ";
+ $sql .= "OR eu1.cal_login = '" . $layeruser . "' ";
// while we are parsing the whole layers array, build ourselves
// a new array that will help when we have to check for dups
@@ -1807,17 +1902,39 @@
}
if ( $user == $login && strlen ( $user ) &&
$public_access_default_visible == 'Y' ) {
- $sql .= "OR webcal_entry_user.cal_login = '__public__' ";
+ $sql .= "OR eu1.cal_login = '__public__' ";
}
if ( strlen ( $user ) > 0 )
- $sql .= ") ";
+ $sql .= " OR ".
+ "eu1.cal_login in ( ".
+ "select ".
+ "eu2.cal_login ".
+ "from ".
+ "webcal_entry e, ".
+ "webcal_entry_user eu2, ".
+ "webcal_group_user gu, ".
+ "webcal_group g ".
+ "where ".
+ "e.cal_id = eu2.cal_id AND ".
+ "eu2.cal_login = g.cal_name AND ".
+ "g.cal_group_id = gu.cal_group_id AND ".
+ "eu2.cal_status IN ('A','W') AND ".
+ "gu.cal_login = '".$user."' AND ".
+ "(eu2.cal_group_status NOT LIKE ('%,R:".$user.",%') ".
+ " OR eu2.cal_group_status is null)".
+ ")
+ OR e.cal_create_by='".$user."')";
$sql .= $date_filter;
// now order the results by time and by entry id.
- $sql .= " ORDER BY webcal_entry.cal_time, webcal_entry.cal_id";
+ $sql .= " ORDER BY e.cal_time, e.cal_id";
//echo "<strong>SQL:</strong> $sql<br />\n";
+ //debug
+ logs($log_file,"function.php : query_events : ".$sql."\n");
+ //debug
+
$res = dbi_query ( $sql );
if ( $res ) {
$i = 0;
@@ -2422,34 +2539,64 @@
$month = substr ( $date, 4, 2 );
$day = substr ( $date, 6, 2 );
$dateu = mktime ( 3, 0, 0, $month, $day, $year );
- $can_add = ( $readonly == "N" || $is_admin );
- if ( $public_access == "Y" && $public_access_can_add != "Y" &&
- $login == "__public__" )
- $can_add = false;
- if ( $readonly == 'Y' )
- $can_add = false;
+
+ //Debug
+ logs($log_file,"print_date_entries : ".$login." group :".$GLOBALS['type_param']." \n");
+ //Debug
+
+ if($GLOBALS['type_param'] == 'group'){
+ $role_user=user_project_role($login,$GLOBALS['group_param']);
+ }
+
+ //Debug
+ logs($log_file,"print_date_entries : ".$login." group :".$GLOBALS['group_param']." \n");
+ //Debug
+
+ $can_add=false;
+ if($GLOBALS['type_param'] == 'group' && $role_user >=2 ){
+ $can_add = true;
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : can_modify \n");
+ //debug
+ }else{
+ if($GLOBALS['type_param'] == 'user'){
+ $can_add = true;
+ }
+ }
+
+ if ($GLOBALS['type_param']=='group'){
+ $info_type = "type_param=group&group_param=".$GLOBALS['group_param'];
+ }else{
+ $info_type = "type_param=user";
+ }
+
if ( ! $ssi && $can_add ) {
print "<a title=\"" .
translate("New Entry") . "\" href=\"edit_entry.php?";
- if ( strcmp ( $user, $GLOBALS["login"] ) )
+ if ( strcmp ( $user, $GLOBALS["login"] ) ){
print "user=$user&";
+ }
+
+ print $info_type;
+
if ( ! empty ( $cat_id ) )
- print "cat_id=$cat_id&";
- print "date=$date\"><img src=\"new.gif\" alt=\"" .
+ print "&cat_id=".$cat_id;
+ print "&date=$date\"><img src=\"new.gif\" alt=\"" .
translate("New Entry") . "\" class=\"new\" /></a>";
$cnt++;
}
if ( ! $ssi ) {
- echo "<a class=\"dayofmonth\" href=\"day.php?";
+ echo "<a class=\"dayofmonth\" href=\"day.php?".$info_type;
if ( strcmp ( $user, $GLOBALS["login"] ) )
- echo "user=$user&";
+ echo "&user=$user&";
if ( ! empty ( $cat_id ) )
- echo "cat_id=$cat_id&";
- echo "date=$date\">$day</a>";
+ echo "&cat_id=$cat_id&";
+ echo "&date=$date\">$day</a>";
if ( $GLOBALS["DISPLAY_WEEKNUMBER"] == "Y" &&
date ( "w", $dateu ) == $GLOBALS["WEEK_START"] ) {
echo " <a title=\"" .
- translate("Week") . " " . week_number ( $dateu ) . "\" href=\"week.php?date=$date";
+ translate("Week") . " " . week_number ( $dateu ) . "\" href=\"week.php?date=".$date."&".$info_type;
if ( strcmp ( $user, $GLOBALS["login"] ) )
echo "&user=$user";
if ( ! empty ( $cat_id ) )
@@ -2807,10 +2954,29 @@
* @return string The HTML for the add event icon
*/
function html_for_add_icon ( $date=0,$hour="", $minute="", $user="" ) {
+
+ //Debug
+ logs($log_file,"####### functions.php #######\n");
+ logs($log_file,"------- html_for_add_icon -------\n");
+ //Debug
+
global $TZ_OFFSET;
global $login, $readonly, $cat_id;
$u_url = '';
+
+ if(isset($GLOBALS['type_param']) && $GLOBALS['type_param']=='group'){
+ $u_url = "type_param=group&group_param=".$GLOBALS['group_param']."&";
+ }else{
+ if ( ! empty ( $user ) && $user != $login )
+ $u_url = "user=$user&";
+
+ $u_url .= "type_param=user&";
+ }
+ //Debug
+ logs($log_file,"u_url : ".$u_url."\n");
+ //Debug
+
if ( $readonly == 'Y' )
return '';
@@ -2818,8 +2984,7 @@
$minute = abs($minute);
$hour = $hour -1;
}
- if ( ! empty ( $user ) && $user != $login )
- $u_url = "user=$user&";
+
if ( isset ( $hour ) && $hour != NULL )
$hour += $TZ_OFFSET;
return "<a title=\"" .
@@ -2894,8 +3059,13 @@
$hour_arr[$ind] .= "<img src=\"$catIcon\" alt=\"$catIcon\" />";
}
+ if($GLOBALS['type_param']=='group'){
+ $info_type="&type_param=group&group_param=".$GLOBALS['group_param'];
+ }else{
+ $info_type="&type_param=user";
+ }
$hour_arr[$ind] .= "<a title=\"" .
- translate("View this entry") . "\" class=\"$class\" href=\"view_entry.php?id=$id&date=$date";
+ translate("View this entry") . "\" class=\"$class\" href=\"view_entry.php?id=$id&date=$date".$info_type;
if ( strlen ( $GLOBALS["user"] ) > 0 )
$hour_arr[$ind] .= "&user=" . $GLOBALS["user"];
$hour_arr[$ind] .= "\" onmouseover=\"window.status='" .
@@ -3003,6 +3173,13 @@
function html_for_event_day_at_a_glance ( $id, $date, $time,
$name, $description, $status, $pri, $access, $duration, $event_owner,
$event_category=-1 ) {
+
+ //debug
+ logs($log_file,"####### functions.php ######\n");
+ logs($log_file,"------- html_for_event_day_at_a_glance -------\n");
+ logs($log_file,"type : ".$GLOBALS['type_param']."\n");
+ //debug
+
global $first_slot, $last_slot, $hour_arr, $rowspan_arr, $rowspan,
$eventinfo, $login, $user;
static $key = 0;
@@ -3064,7 +3241,8 @@
}
$hour_arr[$ind] .= "<a title=\"" .
- translate("View this entry") . "\" class=\"$class\" href=\"view_entry.php?id=$id&date=$date";
+ translate("View this entry") . "\" class=\"$class\" href=\"view_entry.php?id=$id&date=$date"."&type_param=".($GLOBALS['type_param']=='group'?"group&group_param=".$GLOBALS['group_param']:"user");
+
if ( strlen ( $GLOBALS["user"] ) > 0 )
$hour_arr[$ind] .= "&user=" . $GLOBALS["user"];
$hour_arr[$ind] .= "\" onmouseover=\"window.status='" .
@@ -3152,6 +3330,11 @@
}
$hour_arr[$ind] .= "<br />\n";
+
+ //debug
+ logs($log_file,"------- html_for_event_day_at_a_glance -------\n");
+ //debug
+
}
/**
@@ -3164,6 +3347,13 @@
* @param string $user Username of calendar
*/
function print_day_at_a_glance ( $date, $user, $can_add=0 ) {
+
+ //debug
+ logs($log_file,"####### functions.php ######\n");
+ logs($log_file,"------- print_day_at_a_glance -------\n");
+ logs($log_file,"type : ".$GLOBALS['type_param']."\n");
+ //debug
+
global $first_slot, $last_slot, $hour_arr, $rowspan_arr, $rowspan;
global $TABLEBG, $CELLBG, $TODAYCELLBG, $THFG, $THBG, $TIME_SLOTS, $TZ_OFFSET;
global $WORK_DAY_START_HOUR, $WORK_DAY_END_HOUR;
@@ -3361,7 +3551,7 @@
*
* @param string $user Current user login
*/
-function display_unapproved_events ( $user ) {
+function display_unapproved_events ( $user , $info_type = "type_param=user") {
global $public_access, $is_admin, $nonuser_enabled, $login;
// Don't do this for public access login, admin user must approve public
@@ -3369,34 +3559,55 @@
if ( $user == "__public__" )
return;
- $sql = "SELECT COUNT(webcal_entry_user.cal_id) " .
- "FROM webcal_entry_user, webcal_entry " .
- "WHERE webcal_entry_user.cal_id = webcal_entry.cal_id " .
- "AND webcal_entry_user.cal_status = 'W' " .
- "AND ( webcal_entry.cal_ext_for_id IS NULL " .
- "OR webcal_entry.cal_ext_for_id = 0 ) " .
- "AND ( webcal_entry_user.cal_login = '$user'";
+
+ $sql = "SELECT COUNT(eu1.cal_id) " .
+ "FROM webcal_entry_user eu1, webcal_entry e " .
+ "WHERE eu1.cal_id = e.cal_id " .
+ "AND eu1.cal_status = 'W' " .
+ "AND (eu1.cal_group_status NOT LIKE ('%,A:".$user.",%') ".
+ "OR eu1.cal_group_status is null) ".
+ "AND (eu1.cal_group_status NOT LIKE ('%,R:".$user.",%') ".
+ "OR eu1.cal_group_status is null) ".
+ "AND ( eu1.cal_login = '".$user."'";
+
if ( $public_access == "Y" && $is_admin ) {
- $sql .= " OR webcal_entry_user.cal_login = '__public__'";
+ $sql .= " OR eu1.cal_login = '__public__'";
}
+
if ( $nonuser_enabled == 'Y' ) {
$admincals = get_nonuser_cals ( $login );
+
for ( $i = 0; $i < count ( $admincals ); $i++ ) {
- $sql .= " OR webcal_entry_user.cal_login = '" .
- $admincals[$i]['cal_login'] . "'";
- }
+ $sql .= " OR eu1.cal_login = '" . $admincals[$i]['cal_login'] . "'";
+ }
}
- $sql .= " )";
+
+ $sql .= " OR eu1.cal_login in ".
+ "( SELECT eu2.cal_login
+ FROM webcal_entry e, webcal_entry_user eu2, "."webcal_group_user gu,webcal_group g
+ WHERE e.cal_id = eu2.cal_id ".
+ "AND eu2.cal_login = g.cal_name ".
+ "AND g.cal_group_id = gu.cal_group_id ".
+ "AND gu.cal_login = '".$user."' ".
+ "AND ((eu2.cal_group_status NOT LIKE ('%,A:".$user.",%') ".
+ "AND eu2.cal_group_status NOT LIKE ('%,R:".$user.",%')) ".
+ "OR eu2.cal_group_status is null)))";
+
//print "SQL: $sql<br />\n";
$res = dbi_query ( $sql );
+
if ( $res ) {
if ( $row = dbi_fetch_row ( $res ) ) {
if ( $row[0] > 0 ) {
- $str = translate ("You have XXX unapproved events");
- $str = str_replace ( "XXX", $row[0], $str );
- echo "<a class=\"nav\" href=\"list_unapproved.php";
- if ( $user != $login )
- echo "?user=$user\"";
+ $str = translate ("You have XXX unapproved events");
+ $str = str_replace ( "XXX", $row[0], $str );
+ echo "<a class=\"nav\" href=\"list_unapproved.php?";
+
+ if ( $user != $login ){
+ echo "user=".$user."&";
+ }
+
+ echo $info_type;
echo "\">" . $str . "</a><br />\n";
}
}
@@ -4853,4 +5064,141 @@
//echo "add_duration ( $time, $duration ) = $ret <br />\n";
return $ret;
}
+
+/**
+ * Return true if the user ($Login) can add an event in the calendar
+ *
+ *@param String Login
+ *@param String type
+ *@param int group
+ *
+ */
+function Can_Add ($Login, $type, $group){
+
+ logs($log_file,"####### functions.php #######\n------- Can_Add -------\n");
+
+ $can_add = false;
+
+ if($type == 'user'){
+ $can_add = true;
+ }else{
+ if(user_project_role($Login,$group) >= 2){
+ $can_add = true;
+ }
+ }
+
+ return $can_add;
+
+}
+
+/**
+ * Return true if the user ($Login) can add an event in the calendar
+ *
+ *@param Int id event id
+ *@param String Login
+ *@param int project_id
+ *
+ */
+function Can_Modify ($id, $Login){
+
+ logs($log_file,"####### functions.php #######\n------- Can_Modify -------\n");
+ //Debug
+
+ //Debug
+ logs($log_file,"id : ".$id." login : ".$Login."\n");
+ //Debug
+
+ $can_modify = false;
+
+ //Get the creator of the event
+ $res_cal_entry = dbi_query("SELECT cal_create_by
+ FROM webcal_entry
+ WHERE cal_id = ".$id);
+ $row_creator = pg_fetch_array($res_cal_entry);
+ $creator = $row_creator[0];
+
+ //Debug
+ logs($log_file,"creator".$creator."\n");
+ //Debug
+
+ //IF Login is the creator of the event, He can modify it
+ if($Login == $creator){
+
+ //Debug
+ logs($log_file,"login is creator \n");
+ //Debug
+
+ $can_modify = true;
+
+ //Else test if it's a project and if Login can modify the calendar of the project
+ }else{
+
+ $res_project = dbi_query("SELECT cal_name
+ FROM webcal_group
+ WHERE cal_name = '".$creator."'");
+ //Debug
+ logs($log_file,"test id is a project \n");
+ //Debug
+
+ //If it's a project
+ if(pg_num_rows($res_project) > 0){
+
+ //Debug
+ logs($log_file,"id is a project SQL : SELECT group_id
+ FROM groups
+ WHERE unix_group_name = '".$creator."'\n");
+ //Debug
+
+ //Get the Gforge id of the project
+ $res_id_project = dbi_query("SELECT group_id
+ FROM groups
+ WHERE unix_group_name = '".$creator."'");
+ $row_project_id = pg_fetch_array($res_id_project);
+ $project_id = $row_project_id[0];
+
+ //Debug
+ logs($log_file,"project id : ".$project_id." \n");
+ //Debug
+
+ //Test if Login can modify the calendar of the project
+ if(user_project_role($Login,$project_id) >=2){
+ $can_modify = true;
+ }
+
+ }
+ }
+
+ //Debug
+ logs($log_file,"------- Can_Modify -------\n####### functions.php #######\n");
+ //Debug
+ return $can_modify;
+}
+
+/**
+ * Return true if the user ($Login) can add an event in the calendar
+ *
+ *@param String Login
+ *@param String type
+ *@param int group
+ *
+ */
+function Can_View ($Login, $type, $group){
+
+ //Debug
+ logs($log_file,"####### functions.php #######\n------- Can_View -------\n");
+ //Debug
+
+ $can_view = false;
+
+ if($type == 'user'){
+ $can_view = true;
+ }else{
+ if(user_project_role($Login,$group) >= 1){
+ $can_view = true;
+ }
+ }
+ return $can_view;
+}
+
+
?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/init.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/init.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/init.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -87,7 +87,7 @@
// error-check some commonly used form variable names
$id = getValue ( "id", "[0-9]+", true );
-$user = getValue ( "user", "[A-Za-z0-9_\.=@,\-]*", true );
+$user = getValue ( "user", "[\\p{L}A-Za-z0-9_\.=@,\-]*", true );
$date = getValue ( "date", "[0-9]+" );
$year = getValue ( "year", "[0-9]+" );
$month = getValue ( "month", "[0-9]+" );
@@ -105,8 +105,8 @@
send_no_cache_header ();
if ( $allow_view_other != 'Y' && ! $is_admin )
- $user = "";
-
+ // $user = "";
+
$can_add = ( $readonly == "N" || $is_admin == "Y" );
if ( $public_access == "Y" && $login == "__public__" ) {
if ( $public_access_can_add != "Y" )
@@ -127,11 +127,13 @@
if ( $user == $userlist[$i]['cal_login'] ) $valid_user = true;
}
if ($valid_user == false) {
- $user = ""; // security precaution
+ // $user = ""; // security precaution
}
}
if ( ! empty ( $user ) ) {
+
+
$u_url = "user=$user&";
user_load_variables ( $user, "user_" );
if ( $user == "__public__" )
@@ -395,3 +397,91 @@
}
}
?>
+
+<?php
+function xml2array($contents, $get_attributes=1) {
+ if(!$contents) return array();
+
+ if(!function_exists('xml_parser_create')) {
+ //print "'xml_parser_create()' function not found!";
+ return array();
+ }
+ //Get the XML parser of PHP - PHP must have this module for the parser to work
+ $parser = xml_parser_create();
+ xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );
+ xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );
+ xml_parse_into_struct( $parser, $contents, $xml_values );
+ xml_parser_free( $parser );
+
+ if(!$xml_values) return;//Hmm...
+
+ //Initializations
+ $xml_array = array();
+ $parents = array();
+ $opened_tags = array();
+ $arr = array();
+
+ $current = &$xml_array;
+
+ //Go through the tags.
+ foreach($xml_values as $data) {
+ unset($attributes,$value);//Remove existing values, or there will be trouble
+ extract($data);//We could use the array by itself, but this cooler.
+
+ $result = '';
+ if($get_attributes) {//The second argument of the function decides this.
+ $result = array();
+ if(isset($value)) $result['value'] = $value;
+
+ //Set the attributes too.
+ if(isset($attributes)) {
+ foreach($attributes as $attr => $val) {
+ if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
+ /** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */
+ }
+ }
+ } elseif(isset($value)) {
+ $result = $value;
+ }
+
+ //See tag status and do the needed.
+ if($type == "open") {//The starting of the tag '<tag>'
+ $parent[$level-1] = &$current;
+
+ if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
+ $current[$tag] = $result;
+ $current = &$current[$tag];
+
+ } else { //There was another element with the same tag name
+ if(isset($current[$tag][0])) {
+ array_push($current[$tag], $result);
+ } else {
+ $current[$tag] = array($current[$tag],$result);
+ }
+ $last = count($current[$tag]) - 1;
+ $current = &$current[$tag][$last];
+ }
+
+ } elseif($type == "complete") { //Tags that ends in 1 line '<tag />'
+ //See if the key is already taken.
+ if(!isset($current[$tag])) { //New Key
+ $current[$tag] = $result;
+
+ } else { //If taken, put all things inside a list(array)
+ if((is_array($current[$tag]) and $get_attributes == 0)//If it is already an array...
+ or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {
+ array_push($current[$tag],$result); // ...push the new element into that array.
+ } else { //If it is not an array...
+ $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value
+ }
+ }
+
+ } elseif($type == 'close') { //End of tag '</tag>'
+ $current = &$parent[$level-1];
+ }
+ }
+
+ return($xml_array);
+}
+
+?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/js/edit_entry.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/js/edit_entry.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/js/edit_entry.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -4,6 +4,9 @@
<!-- <![CDATA[
// do a little form verifying
function validate_and_submit () {
+ for(i=0;i < document.getElementsByName("part").length;i++) {
+ document.getElementsByName("part")[i].selected = true;
+ }
if ( document.editentryform.name.value == "" ) {
document.editentryform.name.select ();
<?php
@@ -254,5 +257,220 @@
}
}
+function listRole(project){
+
+ var xhr=null;
+
+ document.getElementById("hideRole").innerHTML = "";
+ document.getElementById("hideUser").innerHTML = "";
+ document.getElementById("hidebRole").innerHTML = "";
+ document.getElementById("hidebUser").innerHTML = "";
+
+ if (window.XMLHttpRequest) {
+ xhr = new XMLHttpRequest();
+ }
+ else if (window.ActiveXObject)
+ {
+ xhr = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ //on définit l'appel de la fonction au retour serveur
+ xhr.onreadystatechange = function() { genRole(xhr,project); };
+
+
+ //on appelle le fichier reponse.txt
+ xhr.open("GET", "list_roles_projects.php?groupe="+project, true);
+ xhr.send(null);
+}
+
+function genRole(xhr,project)
+{
+ if (xhr.readyState==4)
+ {
+ var docXML= xhr.responseXML;
+ var items = docXML.getElementsByTagName("role");
+ var text = "<select name=\"role\">\n"+
+ "<option value=\"null\"> </option>\n";
+ for (i=0;i<items.length;i++)
+ {
+ text=text+"<option value=\""+project+"."+items.item(i).firstChild.data+"\" onclick=\"listUser('"+items.item(i).firstChild.data+"','"+project+"')\">"
+ +items.item(i).firstChild.data+"</option>\n";
+
+ }
+ text=text+"</select>\n"+
+ "</td>\n";
+ document.getElementById("hideRole").innerHTML = text;
+ text = "<input type=\"button\" value=\"<?php etranslate("Add Group") ?>\" onclick=\"addRole()\" />\n";
+ document.getElementById("hidebRole").innerHTML = text;
+ }
+}
+
+function listUser(role,project){
+
+ var xhr=null;
+
+ document.getElementById("hideUser").innerHTML = "";
+ document.getElementById("hidebUser").innerHTML = "";
+
+ if (window.XMLHttpRequest) {
+ xhr = new XMLHttpRequest();
+ }
+ else if (window.ActiveXObject)
+ {
+ xhr = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ //on définit l'appel de la fonction au retour serveur
+ xhr.onreadystatechange = function() { genUser(xhr,role,project); };
+
+
+ //on appelle le fichier reponse.txt
+ xhr.open("GET", "list_users_role.php?groupe="+project+"&role="+role, true);
+ xhr.send(null);
+}
+
+function genUser(xhr,role,project)
+{
+ if (xhr.readyState==4)
+ {
+ var docXML= xhr.responseXML;
+ var items = docXML.getElementsByTagName("user");
+ var text = "<select MULTIPLE>\n";
+ for (i=0;i<items.length;i++)
+ {
+ var attrib = items.item(i).attributes;
+ text=text+"<option name=\"user\" value=\""+items.item(i).firstChild.data+"\">"+attrib[0].value+" " +attrib[1].value+" ("+items.item(i).firstChild.data+")"+"</option>\n";
+
+ }
+ text=text+"</select>\n"+
+ "</td>\n";
+ document.getElementById("hideUser").innerHTML = text;
+ text = "<input type=\"button\" value=\"<?php etranslate("Add User") ?>\" onclick=\"addUser()\" />\n";
+ document.getElementById("hidebUser").innerHTML = text;
+ }
+}
+
+function addUser()
+{
+ var text = document.getElementById("selected").innerHTML;
+ var test = 0;
+ if(document.getElementById("selected").innerHTML == "\n"){
+ test = 1;
+ text = "<select name=\"participants[]\" MULTIPLE>\n";
+ }else{
+ text = text.substring(0,text.indexOf("</select>",0));
+ }
+ for(i=0;i<document.getElementsByName("user").length;i++){
+ if(document.getElementsByName("user")[i].selected && text.indexOf(document.getElementsByName("user")[i].value,0)==-1){
+ text=text+"<option name=\"part\" value=\""+document.getElementsByName("user")[i].value+"\">"+document.getElementsByName("user")[i].firstChild.data+"</option>\n";
+ }
+ }
+ text = text+"</select>\n";
+ document.getElementById("selected").innerHTML=text;
+
+ text = "<input type=\"button\" value=\"<?php etranslate("Delete") ?>\" onclick=\"del()\" />\n";
+ document.getElementById("hidebDel").innerHTML = text;
+}
+
+function addRole()
+{
+ var text = document.getElementById("selected").innerHTML;
+ if(document.getElementById("selected").innerHTML == "\n"){
+ text = "<select name=\"participants[]\" MULTIPLE>\n";
+ }else{
+ text = text.substring(0,text.indexOf("</select>",0));
+ }
+ if(text.indexOf(document.getElementsByName("role")[0].value,0)==-1 && document.getElementsByName("role")[0].value != "null"){
+ text=text+"<option name=\"part\" value=\""+document.getElementsByName("role")[0].value+"\">"+document.getElementsByName("role")[0].value+"</option>\n";
+ }
+ text = text+"</select>\n";
+ document.getElementById("selected").innerHTML=text;
+
+ text = "<input type=\"button\" value=\"<?php etranslate("Delete") ?>\" onclick=\"del()\" />\n";
+ document.getElementById("hidebDel").innerHTML = text;
+}
+
+function addGroup()
+{
+ var text = document.getElementById("selected").innerHTML;
+ if(document.getElementById("selected").innerHTML == "\n"){
+ text = "<select name=\"participants[]\" MULTIPLE>\n";
+ }else{
+ text = text.substring(0,text.indexOf("</select>",0));
+ }
+ if(text.indexOf(document.getElementsByName("projects")[0].value,0)==-1 && document.getElementsByName("projects")[0].value != "null"){
+ text=text+"<option name=\"part\" value=\""+document.getElementsByName("projects")[0].value+"\">"+document.getElementsByName("projects")[0].value+"</option>\n";
+ }
+ text = text+"</select>\n";
+ document.getElementById("selected").innerHTML=text;
+
+ text = "<input type=\"button\" value=\"<?php etranslate("Delete") ?>\" onclick=\"del()\" />\n";
+ document.getElementById("hidebDel").innerHTML = text;
+}
+
+function addAll(value){
+ var text = document.getElementById("selected").innerHTML;
+ if(document.getElementById("selected").innerHTML == "\n"){
+ text = "<select name=\"participants[]\" MULTIPLE>\n";
+ }else{
+ text = text.substring(0,text.indexOf("</select>",0));
+ }
+ if(text.indexOf(value,0)==-1){
+ text=text+"<option name=\"part\" value=\""+value+"\">"+value+"</option>\n";
+ }
+ text = text+"</select>\n";
+ document.getElementById("selected").innerHTML=text;
+
+ text = "<input type=\"button\" value=\"<?php etranslate("Delete") ?>\" onclick=\"del()\" />\n";
+ document.getElementById("hidebDel").innerHTML = text;
+}
+
+function del(){
+ for(i=1;i < document.getElementsByName("part").length;i++) {
+ if(document.getElementsByName("part")[i].selected == true){
+ document.getElementById("partlist").options[i] = null;
+ }
+ }
+ if(document.getElementsByName("part").length < 1){
+ document.getElementById("selected").innerHTML="\n";
+ document.getElementById("hidebDel").innerHTML = "\n";
+ }
+}
+
+var aSelected = new Array();
+function selec(obj){
+ var found = false;
+
+ if(aSelected.length == 0){
+ for(i=0;i < document.getElementsByName("part").length;i++) {
+ aSelected[aSelected.length] = document.getElementsByName("part")[i].value;
+ }
+ }
+
+
+ for(i=0;i < aSelected.length;i++) {
+ if(obj.value == aSelected[i]) {
+ found = true;
+ for(j=i;j < aSelected.length-1;j++) {
+ aSelected[j] = aSelected[j+1];
+ }
+ delete aSelected[aSelected.length-1];
+ break;
+ }
+ }
+ if( !found ) {
+ aSelected[aSelected.length] = obj.value;
+ }
+ for(i=0;i < document.getElementsByName("part").length;i++) {
+ found = false;
+ for(j=0;j < aSelected.length;j++) {
+ if(document.getElementsByName("part")[i].value == aSelected[j]){
+ found = true;
+ document.getElementsByName("part")[i].selected = true;
+ }
+ }
+ if(!found){
+ document.getElementsByName("part")[i].selected = false;
+ }
+ }
+}
//]]> -->
</script>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/settings.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/settings.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/settings.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1 +1,14 @@
-
+<?
+install_password:
+db_type: postgresql
+db_host:
+db_database:
+db_login:
+db_password:
+db_persistent: true
+single_user_login:
+readonly: false
+use_http_auth: false
+single_user: false
+user_inc: user.php
+?>
\ No newline at end of file
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/trailer.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/trailer.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/trailer.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,5 +1,13 @@
<?php
+//Debug
+logs($log_file,"####### trailer.php #######\n");
+//Debug
+
+//Debug
+logs($log_file,"type : ".$GLOBALS['type_param']."\n");
+//Debug
+
if ( empty ( $PHP_SELF ) && ! empty ( $_SERVER ) &&
! empty ( $_SERVER['PHP_SELF'] ) ) {
$PHP_SELF = $_SERVER['PHP_SELF'];
@@ -8,6 +16,54 @@
die ( "You can't access this file directly!" );
}
+if(isset($GLOBALS['type_param'])){
+ $type_cal=$GLOBALS['type_param'];
+}else{
+ $type_cal='user';
+}
+
+if($type_cal=='group' && isset($GLOBALS['group_param'])){
+
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$group_cal);
+
+ //Debug
+ logs($log_file,"trailer.php : role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+ //Debug
+}
+
+//Determine the info type
+if($GLOBALS['type_param'] == 'group'){
+ $info_type = "type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+}else{
+ $info_type = "type_param=".$GLOBALs['type_param'];
+}
+
+$can_add = Can_Add($login,$GLOBALS['type_param'],$GLOBALS['group_param']);
+
+/*
+$can_add=false;
+if($GLOBALS['type_param'] == 'group' && $role_user >=2 ){
+ $can_add = true;
+ //debug
+ logs($log_file,"edit_entry_handler.php : can_modify \n");
+ //debug
+}else{
+ if($GLOBALS['type_param'] == 'user'){
+
+ //debug
+ logs($log_file,"edit_entry_handler.php : can_modify \n");
+ //debug
+
+ $can_add = true;
+ }
+}
+*/
+
+//Debug
+logs($log_file,"trailer.php : role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+//Debug
+
// NOTE: This file is included within the print_trailer function found
// in includes/init.php. If you add a global variable somewhere in this
// file, be sure to declare it global in the print_trialer function
@@ -24,6 +80,10 @@
&& ( ! $user || $user == $login ) ) {
echo "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\" />\n";
}
+ echo "<input type=\"hidden\" name=\"type_param\" value=\"".$GLOBALS['type_param']."\" />\n";
+ if($GLOBALS['type_param'] == 'group'){
+ echo "<input type=\"hidden\" name=\"group_param\" value=\"".$GLOBALS['group_param']."\" />\n";
+ }
?>
<label for="monthselect"><?php etranslate("Month")?>: </label>
<select name="date" id="monthselect" onchange="document.SelectMonth.submit()">
@@ -67,6 +127,10 @@
&& ( ! $user || $user == $login ) ) {
echo "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\" />\n";
}
+ echo "<input type=\"hidden\" name=\"type_param\" value=\"".$GLOBALS['type_param']."\" />\n";
+ if($GLOBALS['type_param'] == 'group'){
+ echo "<input type=\"hidden\" name=\"group_param\" value=\"".$GLOBALS['group_param']."\" />\n";
+ }
?>
<label for="weekselect"><?php etranslate("Week")?>: </label>
<select name="date" id="weekselect" onchange="document.SelectWeek.submit()">
@@ -120,6 +184,10 @@
&& ( ! $user || $user == $login ) ) {
echo "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\" />\n";
}
+ echo "<input type=\"hidden\" name=\"type_param\" value=\"".$GLOBALS['type_param']."\" />\n";
+ if($GLOBALS['type_param'] == 'group'){
+ echo "<input type=\"hidden\" name=\"group_param\" value=\"".$GLOBALS['group_param']."\" />\n";
+ }
?>
<label for="yearselect"><?php etranslate("Year")?>: </label>
<select name="year" id="yearselect" onchange="document.SelectYear.submit()">
@@ -149,18 +217,16 @@
$manage_calendar_link = array ( );
// Go To links
-$can_add = ( $readonly == "N" );
-if ( $public_access == "Y" && $public_access_can_add != "Y" &&
- $login == "__public__" ) {
- $can_add = false;
-}
+
if ( ! empty ( $GLOBALS['STARTVIEW'] ) ) {
$mycal = $GLOBALS['STARTVIEW'];
} else {
$mycal = "index.php";
}
+$mycal .= "?".$info_type;
+
// calc URL to today
$todayURL = 'month.php';
$reqURI = 'month.php';
@@ -192,9 +258,12 @@
translate("My Calendar") . "</a>";
*/
}
+ $todayURL .= "?";
if ( ! empty ( $user ) && $user != $login ) {
- $todayURL .= '?user=' . $user;
+ $todayURL .= 'user=' . $user."&";
}
+
+ $todayURL .= $info_type;
/*
$goto_link[] = "<a title=\"" .
translate("Today") . "\" style=\"font-weight:bold;\" " .
@@ -204,15 +273,16 @@
if ( $login != '__public__' && $readonly == 'N' ) {
$goto_link[] = "<a title=\"" .
translate("Admin") . "\" style=\"font-weight:bold;\" " .
- "href=\"adminhome.php\">" .
+ "href=\"adminhome.php?type_param=".$type_cal."".(isset($group_cal)? "&group_param=".$group_cal."" : "")."\">" .
translate("Admin") . "</a>";
}
if ( $login != "__public__" && $readonly == "N" &&
( $require_approvals == "Y" || $public_access == "Y" ) ) {
- $url = 'list_unapproved.php';
+ $url = 'list_unapproved.php?';
if ($is_nonuser_admin) {
- $url .= "?user=$user";
+ $url .= "user=".$user."&";
}
+ $url .= $info_type;
$goto_link[] = "<a title=\"" .
translate("Unapproved Events") . "\" href=\"$url\">" .
translate("Unapproved Events") . "</a>";
@@ -238,35 +308,36 @@
if ( $readonly == 'N' ) {
$goto_link[] = "<a title=\"" .
translate("Admin") . "\" style=\"font-weight:bold;\" " .
- "href=\"adminhome.php\">" .
+ "href=\"adminhome.php?type_param=".$type_cal."".(isset($group_cal)? "&group_param=".$group_cal."" : "")."\">" .
translate("Admin") . "</a>";
}
}
// only display some links if we're viewing our own calendar.
-if ( empty ( $user ) || $user == $login ) {
+if ( empty ( $user ) || $user == $login || $role_user >=1) {
$goto_link[] = "<a title=\"" .
- translate("Search") . "\" href=\"search.php\">" .
+ translate("Search") . "\" href=\"search.php?".$info_type."\">" .
translate("Search") . "</a>";
if ( $login != '__public__' ) {
$goto_link[] = "<a title=\"" .
- translate("Import") . "\" href=\"import.php\">" .
+ translate("Import") . "\" href=\"import.php?".$info_type."\">" .
translate("Import") . "</a>";
$goto_link[] = "<a title=\"" .
- translate("Export") . "\" href=\"export.php\">" .
+ translate("Export") . "\" href=\"export.php?".$info_type."\">" .
translate("Export") . "</a>";
}
if ( $can_add ) {
$url = "<a title=\"" .
- translate("Add New Entry") . "\" href=\"edit_entry.php";
+ translate("Add New Entry") . "\" href=\"edit_entry.php?";
if ( ! empty ( $thisyear ) ) {
- $url .= "?year=$thisyear";
+ $url .= "year=".$thisyear."&";
if ( ! empty ( $thismonth ) ) {
- $url .= "&month=$thismonth";
+ $url .= "month=".$thismonth."&";
}
if ( ! empty ( $thisday ) ) {
- $url .= "&day=$thisday";
+ $url .= "day=".$thisday."&";
}
}
+ $url .= $info_type;
$url .= "\">" . translate("Add New Entry") . "</a>";
$goto_link[] = $url;
}
@@ -301,6 +372,7 @@
htmlspecialchars ( $views[$i]['cal_name'] ) .
"\" href=\"";
$out .= $views[$i]['url'];
+ $out .= "&".$info_type;
if ( ! empty ( $thisdate ) )
$out .= "&date=$thisdate";
$out .= "\">" .
@@ -328,6 +400,7 @@
} else {
$u_url = "";
}
+ $u_url .= "&".$info_type;
$res = dbi_query ( "SELECT cal_report_name, cal_report_id " .
"FROM webcal_report " .
"WHERE cal_login = '$login' OR " .
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/user.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/user.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/includes/user.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,4 +1,5 @@
<?php
+
if ( empty ( $PHP_SELF ) && ! empty ( $_SERVER ) &&
! empty ( $_SERVER['PHP_SELF'] ) ) {
$PHP_SELF = $_SERVER['PHP_SELF'];
@@ -33,10 +34,15 @@
function user_valid_login ( $login, $password ) {
global $error;
$ret = false;
+
+ //Debug
+ logs($log_file,"user_valid_login \n");
+ //Debug
$sql = "SELECT cal_login FROM webcal_user WHERE " .
"cal_login = '" . $login . "' AND cal_passwd = '" . $password . "'";
// "cal_login = '" . $login . "' AND cal_passwd = '" . md5($password) . "'";
+
$res = dbi_query ( $sql );
if ( $res ) {
$row = dbi_fetch_row ( $res );
@@ -72,7 +78,6 @@
} else {
$error = translate("Database error") . ": " . dbi_error();
}
-
return $ret;
}
@@ -85,6 +90,10 @@
function user_valid_crypt ( $login, $crypt_password ) {
global $error;
$ret = false;
+
+ //Debug
+ logs($log_file,"user_valid_crypt \n");
+ //Debug
$salt = substr($crypt_password, 0, 2);
@@ -123,10 +132,15 @@
function user_load_variables ( $login, $prefix ) {
global $PUBLIC_ACCESS_FULLNAME, $NONUSER_PREFIX;
+ //Debug
+ logs($log_file,"user_load_variables \n");
+ //Debug
+
if ($NONUSER_PREFIX && substr($login, 0, strlen($NONUSER_PREFIX) ) == $NONUSER_PREFIX) {
nonuser_load_variables ( $login, $prefix );
return true;
}
+
if ( $login == "__public__" ) {
$GLOBALS[$prefix . "login"] = $login;
@@ -138,6 +152,9 @@
$GLOBALS[$prefix . "password"] = "";
return true;
}
+
+
+
$sql =
"SELECT cal_firstname, cal_lastname, cal_is_admin, cal_email, cal_passwd " .
"FROM webcal_user WHERE cal_login = '" . $login . "'";
@@ -174,6 +191,10 @@
function user_add_user ( $user, $password, $firstname, $lastname, $email,
$admin ) {
global $error;
+
+ //Debug
+ logs($log_file,"user_add_user \n");
+ //Debug
if ( $user == "__public__" ) {
$error = translate ("Invalid user login");
@@ -219,6 +240,10 @@
// $admin - is admin?
function user_update_user ( $user, $firstname, $lastname, $email, $admin ) {
global $error;
+
+ //Debug
+ logs($log_file,"user_update_user \n");
+ //Debug
if ( $user == "__public__" ) {
$error = translate ("Invalid user login");
@@ -255,6 +280,10 @@
// $password - last name
function user_update_user_password ( $user, $password ) {
global $error;
+
+ //Debug
+ logs($log_file,"user_update_user_password \n");
+ //Debug
$sql = "UPDATE webcal_user SET cal_passwd = '".md5($password)."' " .
"WHERE cal_login = '$user'";
@@ -273,6 +302,11 @@
function user_delete_user ( $user ) {
// Get event ids for all events this user is a participant
$events = array ();
+
+ //Debug
+ logs($log_file,"user_delete_user \n");
+ //Debug
+
$res = dbi_query ( "SELECT webcal_entry.cal_id " .
"FROM webcal_entry, webcal_entry_user " .
"WHERE webcal_entry.cal_id = webcal_entry_user.cal_id " .
@@ -379,4 +413,78 @@
}
return $ret;
}
+
+//add for Gforge
+function user_project_role($login,$project){
+
+ //debug
+ logs($log_file,"####### user.php #######\n------- user_project_role -------\n");
+ //debug
+
+ $res = dbi_query("select user_id from users where user_name = '".$login."'");
+ $row = pg_fetch_row($res);
+ $user_id = $row[0];
+
+ //debug
+ logs($log_file,"user_id : ".$user_id." group : ".$project."\n");
+ //debug
+
+ $res = dbi_query("select admin_flags from user_group where group_id=".$project." and user_id=".$user_id." and admin_flags='A'");
+
+ //debug
+ logs($log_file,"res : ".print_r($res,true)."\n");
+ //debug
+
+ //IF user is admin of the project
+ if(pg_num_rows($res)>0){
+
+ //debug
+ logs($log_file,"user_projet_role - user_id : ".$user_id."\n");
+ //debug
+
+ $role=3;
+
+ //else get his permission on role_setting table
+ }else{
+
+ //get projet_id
+ $sql ="select rs.value
+ from role_setting rs, user_group ug, users u
+ where rs.role_id=ug.role_id
+ and ug.group_id=".$project."
+ and ug.user_id=u.user_id
+ and u.user_name='".$login."'
+ and rs.section_name ='webcal'";
+
+ //debug
+ logs($log_file,"user_projet_role - sql : ".$sql."\n");
+ //debug
+
+ $res = dbi_query ($sql);
+ $row = pg_fetch_row($res);
+
+ //role get the value on the table
+ if (pg_num_rows($res)>0) {
+
+ $role = $row[0];
+
+ //Else if the value are not set, fixe the value at 0
+ }else{
+
+ $role = 0;
+
+ }
+ }
+
+ //debug
+ logs($log_file,"role : ".$role."\n");
+ //debug
+
+ //debug
+ logs($log_file,"------- user_project_role -------\n####### user.php #######\n");
+ //debug
+
+ return $role;
+}
+
?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -7,7 +7,28 @@
*
* This is an example to watch things in action. You can obviously modify things and logic as you see fit
*/
+//Debug
+//$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+//fputs($log,"####### index.php #######\n");
+//fclose($log);
+//Debug
+//Debug
+//$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+//fputs($log,"type GET : ".$_GET['type_param']."\n");
+//fclose($log);
+//Debug
+
+if(!isset($GLOBALS['type_param']) ){
+ $GLOBALS['type_param'] = $_GET['type_param'];
+
+ //Debug
+ //$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+ //fputs($log,"type GLOBALS : ".$GLOBALS['type_param']."\n");
+ //fclose($log);
+ //Debug
+}
+
require_once('pre.php');
//require_once ('plugins/webcalendar/config.php');
@@ -108,12 +129,18 @@
// If not yet logged in, you will be redirected to login.php before
// we get to this point (by connect.php included above)
-if ( ! empty ( $STARTVIEW ) )
- send_to_preferred_view ();
-else
- do_redirect ( "month.php" );
+if ( ! empty ( $STARTVIEW ) ){
+ if($GLOBALS['type_param']=='group'){
+ $url = "?type_param=group&group_param='".$GLOBALS['group_pram'];
+ }else{
+ $url = "?type_param=user";
+ }
+
+ send_to_preferred_view ("", $url);
+}else
+ do_redirect ( "month.php?type_param=user" );
- site_project_footer(array());
+site_project_footer(array());
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index2.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index2.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/index2.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,166 +1,183 @@
-<?php
-
-require_once('pre.php');
-
-function forum_header($params) {
- global $HTML,$group_id,$forum_name,$forum_id,$sys_datefmt,$sys_news_group,$Language,$f,$sys_use_forum,$group_forum_id;
-
- if ($group_forum_id) {
- $forum_id=$group_forum_id;
- }
- if (!$sys_use_forum) {
- exit_disabled();
- }
-
- $params['group']=$group_id;
- $params['toptab']='webcalendar';
-
- /*
- bastardization for news
- Show icon bar unless it's a news forum
- */
- if ($group_id == $sys_news_group) {
- //this is a news item, not a regular forum
- if ($forum_id) {
- // Show this news item at the top of the page
- $sql="SELECT submitted_by, post_date, group_id, forum_id, summary, details FROM news_bytes WHERE forum_id='$forum_id'";
- $result=db_query($sql);
-
- // checks which group the news item belongs to
- $params['group']=db_result($result,0,'group_id');
- $params['toptab']='news';
- $HTML->header($params);
-
-
- echo '<table><tr><td valign="top">';
- if (!$result || db_numrows($result) < 1) {
- echo '<h3>'.$Language->getText('forum_utils','nonewsitem').'</h3>';
- } else {
- $user = user_get_object(db_result($result,0,'submitted_by'));
- $group =& group_get_object($params['group']);
- if (!$group || !is_object($group) || $group->isError()) {
- exit_no_group();
- }
- echo '
- <strong>'.$Language->getText('forum_utils','postedby').':</strong> '.$user->getRealName().'<br />
- <strong>'.$Language->getText('forum_utils','date').':</strong> '. date($sys_datefmt,db_result($result,0,'post_date')).'<br />
- <strong>'.$Language->getText('forum_utils','summary').':</strong> <a href="/forum/forum.php?forum_id='.db_result($result,0,'forum_id').'&group_id='.$group_id.'">'. db_result($result,0,'summary').'</a><br/>
- <strong>'.$Language->getText('forum_utils','project').':</strong> <a href="/projects/'.$group->getUnixName().'">'.$group->getPublicName().'</a> <br />
- <p>
- '. (util_make_links(nl2br(db_result($result,0,'details'))));
-
- echo '</p>';
- }
- echo '</td><td valign="top" width="35%">';
- echo $HTML->boxTop($Language->getText('forum_utils','latest'));
- echo news_show_latest($params['group'],5,false);
- echo $HTML->boxBottom();
- echo '</td></tr></table>';
- } else {
- site_project_header($params);
- }
- } else {
- site_project_header($params);
- }
-
- $menu_text=array();
- $menu_links=array();
- if ($f && $forum_id) {
- $menu_text[]=$Language->getText('forum_utils','discussionforum') .' '. $f->getName();
- $menu_links[]='"/forum/forum.php?forum_id='.$forum_id.'"';
- }
- if ($f && $f->userIsAdmin()) {
- $menu_text[]=$Language->getText('forum_utils','admin');
- $menu_links[]='/forum/admin/?group_id='.$group_id;
- }
- if (count($menu_text) > 0) {
- echo $HTML->subMenu(
- $menu_text,
- $menu_links
- );
- }
-
- if (session_loggedin() ) {
- if ($f) {
- if ($f->isMonitoring()) {
- echo '<a href="/forum/monitor.php?forum_id='.$forum_id.'&group_id='.$group_id.'&stop=1">' .
- html_image('ic/xmail16w.png','20','20',array()).' '.$Language->getText('forum_utils','stopmonitor').'</a> | ';
- } else {
- echo '<a href="/forum/monitor.php?forum_id='.$forum_id.'&group_id='.$group_id.'&start=1">' .
- html_image('ic/mail16w.png','20','20',array()).' '.$Language->getText('forum_utils','monitor').'</a> | ';
- }
- echo '<a href="/forum/save.php?forum_id='.$forum_id.'&group_id='.$group_id.'">' .
- html_image('ic/save.png','24','24',array()) .' '.$Language->getText('forum_utils','saveplace').'</a> | ';
- }
- }
-
- if ($f && $forum_id) {
- echo '<a href="/forum/new.php?forum_id='.$forum_id.'&group_id='.$group_id.'">' .
- html_image('ic/write16w.png','20','20',array('alt'=>$Language->getText('forum_message','thread'))) .' '.
- $Language->getText('forum_message','thread').'</a>';
- }
-}
-
-function forum_footer($params) {
- site_project_footer($params);
-}
-
-forum_header(array('title'=>'Webcalendar' ));
-
-$group_id = getIntFromRequest('group_id');
-if ($group_id > 5) { // add '> 5' if you won't a calendar for the admin groups
- $g =& group_get_object($group_id);
- if (!$g || !is_object($g) || $g->isError()) {
- exit_no_group();
- } else {
- $user_id = user_getid() ;
- $belong = user_belongs_to_group($user_id,$group_id);
- if($belong > 0){
- ?>
- <iframe src="/plugins/webcalendar/login.php?type=group&group_id=<?php print $group_id ?>" border=no scrolling="yes" width="100%" height="700"></iframe>
- <?}
- else {
- print $Language->getText('webcalendar_user','allow');
- }
-
- }
-
-
-} else {
-
- print $Language->getText('webcalendar_user','nocalendar');
-
- //exit_no_group();
-
-}
-
-echo site_user_footer(array());
-
-function user_belongs_to_group($user_id,$group_id){
-global $HTML,$Language;
-$sql = "SELECT value,admin_flags FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND user_group.user_id = '".$user_id."' AND user_group.group_id = '".$group_id."' AND role_setting.section_name = 'webcal'";
-
-//$sql = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$user_id."' AND group_id = '".$group_id."'";
-$res = db_query($sql);
-$row = db_fetch_array($res);
-if($row[0] < 1 ){
-//verif si admin
- $sql_admin = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$user_id."' AND group_id = '".$group_id."' AND admin_flags = 'A'" ;
- $res_admin = db_query($sql_admin);
- $row_admin = db_fetch_array($res_admin);
- $row[0] = $row_admin[0];
-}
-if( $row[0] < 1) {
- //verif si admin
- $sql_admin = "SELECT COUNT(*) FROM webcal_user,users WHERE users.user_name = webcal_user.cal_login AND users.user_id = '".$user_id."' AND cal_is_admin = 'Y'" ;
- $res_admin = db_query($sql_admin);
- $row_admin = db_fetch_array($res_admin);
- $row[0] = $row_admin[0];
-}
-
-
-return $row[0];
-
-}
-
-?>
+<?php
+require_once('/usr/share/gforge/www/env.inc.php');
+require_once('pre.php');
+
+//Debug
+//$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+//fputs($log,"####### index2.php #######\n");
+//fclose($log);
+//Debug
+
+function forum_header($params) {
+ global $HTML,$group_id,$forum_name,$forum_id,$sys_datefmt,$sys_news_group,$Language,$f,$sys_use_forum,$group_forum_id;
+
+ if ($group_forum_id) {
+ $forum_id=$group_forum_id;
+ }
+ if (!$sys_use_forum) {
+ exit_disabled();
+ }
+
+ $params['group']=$group_id;
+ $params['toptab']='webcalendar';
+
+ /*
+ bastardization for news
+ Show icon bar unless it's a news forum
+ */
+ if ($group_id == $sys_news_group) {
+ //this is a news item, not a regular forum
+ if ($forum_id) {
+ // Show this news item at the top of the page
+ $sql="SELECT submitted_by, post_date, group_id, forum_id, summary, details FROM news_bytes WHERE forum_id='$forum_id'";
+ $result=db_query($sql);
+
+ // checks which group the news item belongs to
+ $params['group']=db_result($result,0,'group_id');
+ $params['toptab']='news';
+ $HTML->header($params);
+
+
+ echo '<table><tr><td valign="top">';
+ if (!$result || db_numrows($result) < 1) {
+ echo '<h3>'.$Language->getText('forum_utils','nonewsitem').'</h3>';
+ } else {
+ $user = user_get_object(db_result($result,0,'submitted_by'));
+ $group =& group_get_object($params['group']);
+ if (!$group || !is_object($group) || $group->isError()) {
+ exit_no_group();
+ }
+ echo '
+ <strong>'.$Language->getText('forum_utils','postedby').':</strong> '.$user->getRealName().'<br />
+ <strong>'.$Language->getText('forum_utils','date').':</strong> '. date($sys_datefmt,db_result($result,0,'post_date')).'<br />
+ <strong>'.$Language->getText('forum_utils','summary').':</strong> <a href="/forum/forum.php?forum_id='.db_result($result,0,'forum_id').'&group_id='.$group_id.'">'. db_result($result,0,'summary').'</a><br/>
+ <strong>'.$Language->getText('forum_utils','project').':</strong> <a href="/projects/'.$group->getUnixName().'">'.$group->getPublicName().'</a> <br />
+ <p>
+ '. (util_make_links(nl2br(db_result($result,0,'details'))));
+
+ echo '</p>';
+ }
+ echo '</td><td valign="top" width="35%">';
+ echo $HTML->boxTop($Language->getText('forum_utils','latest'));
+ echo news_show_latest($params['group'],5,false);
+ echo $HTML->boxBottom();
+ echo '</td></tr></table>';
+ } else {
+ site_project_header($params);
+ }
+ } else {
+ site_project_header($params);
+ }
+
+ $menu_text=array();
+ $menu_links=array();
+ if ($f && $forum_id) {
+ $menu_text[]=$Language->getText('forum_utils','discussionforum') .' '. $f->getName();
+ $menu_links[]='"/forum/forum.php?forum_id='.$forum_id.'"';
+ }
+ if ($f && $f->userIsAdmin()) {
+ $menu_text[]=$Language->getText('forum_utils','admin');
+ $menu_links[]='/forum/admin/?group_id='.$group_id;
+ }
+ if (count($menu_text) > 0) {
+ echo $HTML->subMenu(
+ $menu_text,
+ $menu_links
+ );
+ }
+
+ if (session_loggedin() ) {
+ if ($f) {
+ if ($f->isMonitoring()) {
+ echo '<a href="/forum/monitor.php?forum_id='.$forum_id.'&group_id='.$group_id.'&stop=1">' .
+ html_image('ic/xmail16w.png','20','20',array()).' '.$Language->getText('forum_utils','stopmonitor').'</a> | ';
+ } else {
+ echo '<a href="/forum/monitor.php?forum_id='.$forum_id.'&group_id='.$group_id.'&start=1">' .
+ html_image('ic/mail16w.png','20','20',array()).' '.$Language->getText('forum_utils','monitor').'</a> | ';
+ }
+ echo '<a href="/forum/save.php?forum_id='.$forum_id.'&group_id='.$group_id.'">' .
+ html_image('ic/save.png','24','24',array()) .' '.$Language->getText('forum_utils','saveplace').'</a> | ';
+ }
+ }
+
+ if ($f && $forum_id) {
+ echo '<a href="/forum/new.php?forum_id='.$forum_id.'&group_id='.$group_id.'">' .
+ html_image('ic/write16w.png','20','20',array('alt'=>$Language->getText('forum_message','thread'))) .' '.
+ $Language->getText('forum_message','thread').'</a>';
+ }
+}
+
+function forum_footer($params) {
+ site_project_footer($params);
+}
+
+forum_header(array('title'=>'Webcalendar' ));
+
+$group_id = getIntFromRequest('group_id');
+if ($group_id > 5) { // add '> 5' if you won't a calendar for the admin groups
+
+ $g =& group_get_object($group_id);
+
+if (!$g || !is_object($g) || $g->isError()) {
+ exit_no_group();
+ } else {
+
+ $user_id = user_getid() ;
+
+ $belong = user_belongs_to_group($user_id,$group_id);
+
+ //Debug
+ //$log=fopen("/var/lib/gforge/chroot/home/users/placoste/webcalendar/webcalendar.txt","a+");
+ //fputs($log,"index2.php ".$belong."\n");
+ //fclose($log);
+ //Debug
+
+ if($belong > 0){
+ ?>
+ <iframe src="/plugins/webcalendar/login.php?type_param=group&group_id=<?php print $group_id ?>" border=no scrolling="yes" width="100%" height="700"></iframe>
+ <?}
+ else {
+ print $Language->getText('webcalendar_user','allow');
+ }
+
+ }
+
+
+} else {
+
+ print $Language->getText('webcalendar_user','nocalendar');
+
+ //exit_no_group();
+
+}
+
+echo site_user_footer(array());
+
+function user_belongs_to_group($user_id,$group_id){
+global $HTML,$Language;
+$sql = "SELECT value,admin_flags FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND user_group.user_id = '".$user_id."' AND user_group.group_id = '".$group_id."' AND role_setting.section_name = 'webcal'";
+
+//$sql = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$user_id."' AND group_id = '".$group_id."'";
+$res = db_query($sql);
+$row = db_fetch_array($res);
+if($row[0] < 1 ){
+//verif si admin
+ $sql_admin = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$user_id."' AND group_id = '".$group_id."' AND admin_flags = 'A'" ;
+ $res_admin = db_query($sql_admin);
+ $row_admin = db_fetch_array($res_admin);
+ $row[0] = $row_admin[0];
+}
+if( $row[0] < 1) {
+ //verif si admin
+ $sql_admin = "SELECT COUNT(*) FROM webcal_user,users WHERE users.user_name = webcal_user.cal_login AND users.user_id = '".$user_id."' AND cal_is_admin = 'Y'" ;
+ $res_admin = db_query($sql_admin);
+ $row_admin = db_fetch_array($res_admin);
+ $row[0] = $row_admin[0];
+}
+
+
+return $row[0];
+
+}
+
+?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/layers.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/layers.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/layers.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -27,7 +27,6 @@
print_header();
if ( $allow_view_other != 'Y') {
- echo "allow_view_other = $allow_view_other <br>";
echo translate("You are not authorized");
} else {
?>
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_roles_projects.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_roles_projects.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_roles_projects.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1,20 @@
+<?php
+ require_once('www/env.inc.php');
+ require_once('pre.php');
+ header('Content-Type: text/xml');
+ echo "<?xml version=\"1.0\"?>\n";
+ echo "<roles>\n";
+ $groupname=$_GET["groupe"];
+ $rolename=0;
+ $dom = domxml_open_file("../bin/users_groups.xml");
+ $params = $dom->get_elements_by_tagname('project');
+ foreach ($params as $param) {
+ if(strcmp($param->get_attribute('name'),$groupname)==0){
+ $roles=$param->get_elements_by_tagname('role');
+ foreach ($roles as $role) {
+ echo "<role>".$role->get_attribute('name')."</role>\n";
+ }
+ }
+ }
+ echo "</roles>\n";
+?>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_unapproved.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_unapproved.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_unapproved.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,5 +1,33 @@
<?php
include_once 'includes/init.php';
+
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
+}
+
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+}
+
+if($GLOBALS['type_param']=='group' && isset($_GET['group_param'])){
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$group_cal);
+
+ //Debug
+ logs($log_file,"trailer.php : role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+ //debug
+}
+
+
+//Determine the info type
+if($GLOBALS['type_param']=='group'){
+ $info_type="type_param=group&group_param=".$GLOBALS['group_param']."&";
+}else{
+ $info_type="type_param=user&";
+}
+
send_no_cache_header ();
if ( empty ( $user ) )
@@ -21,22 +49,28 @@
// List all unapproved events for the user
// Exclude "extension" events (used when an event goes past midnight)
-function list_unapproved ( $user ) {
+function list_unapproved ( $user , $info_type="type_param=user&") {
global $temp_fullname, $key, $login;
//echo "Listing events for $user <br>";
- $sql = "SELECT webcal_entry.cal_id, webcal_entry.cal_name, " .
- "webcal_entry.cal_description, " .
- "webcal_entry.cal_priority, webcal_entry.cal_date, " .
- "webcal_entry.cal_time, webcal_entry.cal_duration, " .
- "webcal_entry_user.cal_status " .
- "FROM webcal_entry, webcal_entry_user " .
- "WHERE webcal_entry.cal_id = webcal_entry_user.cal_id " .
- "AND ( webcal_entry.cal_ext_for_id IS NULL " .
- "OR webcal_entry.cal_ext_for_id = 0 ) AND " .
- "webcal_entry_user.cal_login = '$user' AND " .
- "webcal_entry_user.cal_status = 'W' " .
- "ORDER BY webcal_entry.cal_date";
+ $sql = "SELECT e.cal_id, e.cal_name, ".
+ "e.cal_description, e.cal_priority, e.cal_date, e.cal_time, ".
+ "e.cal_duration, eu1.cal_status ".
+ "FROM webcal_entry e, webcal_entry_user eu1 WHERE ".
+ "e.cal_id = eu1.cal_id AND eu1.cal_status = 'W' ".
+ "AND (eu1.cal_group_status NOT LIKE ('%,A:".$user.",%') ".
+ "OR eu1.cal_group_status is null) AND ".
+ "(eu1.cal_group_status NOT LIKE ('%,R:".$user.",%') ".
+ "OR eu1.cal_group_status is null) AND ".
+ "( eu1.cal_login = '".$user."' OR eu1.cal_login in ".
+ "( SELECT eu2.cal_login FROM webcal_entry e, webcal_entry_user eu2, ".
+ "webcal_group_user gu,webcal_group g WHERE ".
+ "e.cal_id = eu2.cal_id AND eu2.cal_login = g.cal_name ".
+ "AND g.cal_group_id = gu.cal_group_id ".
+ "AND gu.cal_login = '".$user."' AND ".
+ "((eu2.cal_group_status NOT LIKE ('%,A:".$user.",%') ".
+ "AND eu2.cal_group_status NOT LIKE ('%,R:".$user.",%')) ".
+ " OR eu2.cal_group_status is null)))ORDER BY e.cal_date";
$res = dbi_query ( $sql );
$count = 0;
$eventinfo = "";
@@ -54,7 +88,7 @@
$status = $row[7];
$divname = "eventinfo-$id-$key";
echo "<li><a title=\"" .
- translate("View this entry") . "\" class=\"entry\" href=\"view_entry.php?id=$id&user=$user";
+ translate("View this entry") . "\" class=\"entry\" href=\"view_entry.php?id=$id&user=".$user."&".$info_type;
echo "\" onmouseover=\"window.status='" . translate("View this entry") .
"'; show(event, '$divname'); return true;\" onmouseout=\"hide('$divname'); return true;\">";
$timestr = "";
@@ -79,7 +113,7 @@
echo " (" . date_to_str ($date) . ")\n";
//approve
echo ": <a title=\"" .
- translate("Approve/Confirm") . "\" href=\"approve_entry.php?id=$id&ret=list&user=$user";
+ translate("Approve/Confirm") . "\" href=\"approve_entry.php?id=$id&ret=list&user=".$user."&".$info_type;
if ( $user == "__public__" )
echo "&public=1";
echo "\" class=\"nav\" onclick=\"return confirm('" .
@@ -87,23 +121,25 @@
translate("Approve/Confirm") . "</a>, ";
//reject
echo "<a title=\"" .
- translate("Reject") . "\" href=\"reject_entry.php?id=$id&ret=list&user=$user";
+ translate("Reject") . "\" href=\"reject_entry.php?id=$id&ret=list&user=".$user."&".$info_type;
if ( $user == "__public__" )
echo "&public=1";
echo "\" class=\"nav\" onclick=\"return confirm('" .
translate("Reject this entry?") . "');\">" .
translate("Reject") . "</a>";
//delete
- echo ", <a title=\"" .
- translate("Delete") . "\" href=\"del_entry.php?id=$id&ret=list";
- if ( $user != $login )
- echo "&user=$user";
- echo "\" class=\"nav\" onclick=\"return confirm('" .
- translate("Are you sure you want to delete this entry?") . "');\">" .
- translate("Delete") . "</a>";
+ if(Can_Modify($id,$login)){
+ echo ", <a title=\"" .
+ translate("Delete") . "\" href=\"del_entry.php?id=$id&ret=list"."&".$info_type;
+ if ( $user != $login )
+ echo "&user=$user";
+ echo "\" class=\"nav\" onclick=\"return confirm('" .
+ translate("Are you sure you want to delete this entry?") . "');\">" .
+ translate("Delete") . "</a>";
+ }
echo "\n</li>\n";
$eventinfo .= build_event_popup ( $divname, $user, $description,
- $timestr, site_extras_for_popup ( $id ));
+ $timestr, site_extras_for_popup ( $id ));
$count++;
}
dbi_free_result ( $res );
@@ -125,7 +161,7 @@
?></h2>
<?php
// List unapproved events for this user.
-list_unapproved ( ( $is_assistant || $is_nonuser_admin || $is_admin ) ? $user : $login );
+list_unapproved ( ( $is_assistant || $is_nonuser_admin || $is_admin ) ? $user : $login , $info_type);
// Admin users can also approve Public Access events
if ( $is_admin && $public_access == "Y" &&
@@ -140,11 +176,11 @@
$admincals = get_nonuser_cals ( $login );
for ( $i = 0; $i < count ( $admincals ); $i++ ) {
echo "\n<h3>" . $admincals[$i]['cal_fullname'] . "</h3>\n";
- list_unapproved ( $admincals[$i]['cal_login'] );
+ list_unapproved ( $admincals[$i]['cal_login'], $info_type );
}
}
?>
<?php print_trailer(); ?>
</body>
-</html>
\ No newline at end of file
+</html>
Added: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_users_role.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_users_role.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/list_users_role.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -0,0 +1,36 @@
+<?php
+
+ require_once('www/env.inc.php');
+ require_once('pre.php');
+
+ header('Content-Type: text/xml');
+ echo "<?xml version=\"1.0\"?>\n";
+
+ echo "<users>\n";
+
+ $groupname=$_GET["groupe"];
+ $rolename=$_GET["role"];
+
+ $dom = domxml_open_file("../bin/users_groups.xml");
+ $params = $dom->get_elements_by_tagname('project');
+ foreach ($params as $param)
+ {
+ if(strcmp($param->get_attribute('name'),$groupname)==0)
+ {
+ $roles=$param->get_elements_by_tagname('role');
+ foreach ($roles as $role)
+ {
+ if(strcmp($role->get_attribute('name'),$rolename)==0)
+ {
+ $users=$role->get_elements_by_tagname('user');
+ foreach ($users as $user)
+ {
+ echo "<user firstname='".$user->get_attribute("firstname")."' lastname='".$user->get_attribute("lastname")."'>".$user->get_content()."</user>\n";
+ }
+ }
+ }
+ }
+ }
+ echo "</users>\n";
+?>
+
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/login.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/login.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/login.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -6,6 +6,7 @@
include "./includes/$user_inc";
include "./includes/connect.php";
+
// Change this to true to show "no such user" or "invalid password" on
// login failures.
$showLoginFailureReason = true;
@@ -13,28 +14,59 @@
load_global_settings ();
//ajout de fab
+//Debug
+logs($log_file,"####### login.php #######\n");
+//Debug
+//Debug
+logs($log_file,"login.php : ".$_GET['type_param']."\n");
+//Debug
//utilisation des cookies
//modif du fichier include/user.php
-if($_GET['type'] == 'group'){
+
+if($_GET['type_param'] == 'group'){
+ $GLOBALS['type_param'] = $_GET['type_param'];
+
+ //TODO : Tester si l'utilisateur a le droit de le voir.
+
$group_id = getIntFromRequest('group_id');
//session_require(array('group'=>$group_id,'admin_flags'=>'A'));
+ //Debug
+ logs($log_file,"login.php LUSER : ".$LUSER->getUnixName()."\n");
+ //Debug
+
+ $res = dbi_query("SELECT cal_value FROM webcal_user_pref WHERE cal_login='".$LUSER->getUnixName()."' and cal_setting='STARTVIEW'");
+ $rows = pg_fetch_row($res);
+ $view = $rows[0];
+
+ //Debug
+ logs($log_file,"login.php : ".print_r($rows,true)."\n");
+ //Debug
+
+ //Debug
+ logs($log_file,"login.php : SELECT cal_value FROM webcal_user_pref WHERE cal_login='".$LUSER->getUnixName()."' and cal_setting='STARTVIEW'\n");
+ //Debug
+
//choix du calendrier a afficher
$sql_group = "SELECT unix_group_name FROM groups WHERE group_id = '".$_GET['group_id']."'" ;
$result_group = dbi_query ($sql_group);
if ( $result_group ) {
if ( $row_group = dbi_fetch_row ( $result_group ) ) {
- $return_path = 'week.php?user='.$row_group[0];
+ $return_path = ($view != "" ? $view : "week.php").'?user='.$row_group[0].'&type_param='.$GLOBALS['type_param']."&group_param=".$_GET['group_id'];
}
dbi_free_result ( $result_group );
}
//on log l'utilisateur
$sql = "SELECT user_name,user_pw FROM users WHERE user_id = '".user_getid()."'" ;
-$result = dbi_query ($sql);
+ //Debug
+ logs($log_file,"login.php : return_path : ".$return_path."\n");
+ //Debug
+
+ $result = dbi_query ($sql);
if ( $result ) {
if ( $row_log = dbi_fetch_row ( $result ) ) {
$_POST['login'] = $row_log[0];
@@ -46,21 +78,26 @@
}
+if($_GET['type_param'] == 'user'){
-if($_GET['type'] == 'user'){
-$sql = "SELECT user_name,user_pw FROM users WHERE user_id = '".user_getid()."'" ;
-$result = dbi_query ($sql);
- if ( $result ) {
- if ( $row_log = dbi_fetch_row ( $result ) ) {
- $_POST['login'] = $row_log[0];
- $_POST['password'] = $row_log[1];
-
- }
- dbi_free_result ( $result );
- }
+ $GLOBALS['type_param'] = 'user';
+
+ //Debug
+ logs($log_file,"login.php : GLOBALS : ".$GLOBALS['type_param']."\n");
+ //Debug
+
+ $sql = "SELECT user_name,user_pw FROM users WHERE user_id = '".user_getid()."'" ;
+ $result = dbi_query ($sql);
+ if ( $result ) {
+ if ( $row_log = dbi_fetch_row ( $result ) ) {
+ $_POST['login'] = $row_log[0];
+ $_POST['password'] = $row_log[1];
+ }
+
+ dbi_free_result ( $result );
+ }
}
-
//fin ajout de fab
if ( ! empty ( $last_login ) ) {
$login = "";
@@ -82,7 +119,7 @@
$return_path = clean_whitespace ( $return_path );
$url = $return_path;
} else {
- $url = "index.php";
+ $url = "index.php?type_group=user";
}
$lang = '';
if ( ! empty ( $LANGUAGE ) && $LANGUAGE != "Browser-defined" && $LANGUAGE != "none" ) {
@@ -102,8 +139,7 @@
if ( ! empty ( $settings['session'] ) && $settings['session'] = 'php' ) {
session_start ();
}
-
-// calculate path for cookie
+ // calculate path for cookie
if ( empty ( $PHP_SELF ) ) {
$PHP_SELF = $_SERVER["PHP_SELF"];
}
@@ -128,7 +164,7 @@
"<tt>" . htmlentities ( $login ) . "</tt>" );
}
if ( user_valid_login ( $login, $password ) ) {
- user_load_variables ( $login, "" );
+ user_load_variables ( $login, "" );
// set login to expire in 365 days
srand((double) microtime() * 1000000);
$salt = chr( rand(ord('A'), ord('z'))) . chr( rand(ord('A'), ord('z')));
@@ -144,7 +180,17 @@
SetCookie ( "webcalendar_session", $encoded_login, 0, $cookie_path );
}
}
-load_user_preferences ();
+
+ //Debug
+ logs($log_file,"login.php : avant load_user_preferences \n");
+ //Debug
+
+ load_user_preferences ();
+
+ //Debug
+ logs($log_file,"login.php : après load_user_preferences \n");
+ //Debug
+
// The cookie "webcalendar_login" is provided as a convenience to
// other apps that may wish to find out what the last calendar
// login was, so they can use week_ssi.php as a server-side include.
@@ -153,12 +199,21 @@
// load user preferences on the login page (before anyone has
// logged in) if $remember_last_login is set to "Y" (in admin.php).
if ( ! empty ( $remember ) && $remember == "yes" ) {
- SetCookie ( "webcalendar_login", $login,
- time() + ( 24 * 3600 * 365 ), $cookie_path );
+ SetCookie ( "webcalendar_login", $login, time() + ( 24 * 3600 * 365 ), $cookie_path );
} else {
SetCookie ( "webcalendar_login", $login, 0, $cookie_path );
}
+
+ //Debug
+ logs($log_file,"login.php : avant do_redirect\nurl : ".$url."\n");
+ //Debug
+
do_redirect ( $url );
+
+ //Debug
+ logs($log_file,"login.php : après do_redirect \n");
+ //Debug
+
} else {
// Invalid login
if ( empty ( $error ) || ! $showLoginFailureReason ) {
@@ -178,7 +233,13 @@
if (substr($cookie_path, -1) == '/') {
SetCookie ( "webcalendar_session", "", 0, substr($cookie_path, 0, -1) );
}
+
}
+
+//Debug
+logs($log_file,"login.php : avant <html>\n");
+//Debug
+
$charset = ( ! empty ( $LANGUAGE )?translate("charset"): "iso-8859-1" );
echo "<?xml version=\"1.0\" encoding=\"$charset\"?>" . "\n";
?>
@@ -214,20 +275,20 @@
}
</script>
<?php
- include "includes/styles.php";
+include "includes/styles.php";
- // Print custom header (since we do not call print_header function)
- if ( ! empty ( $CUSTOM_SCRIPT ) && $CUSTOM_SCRIPT == 'Y' ) {
- $res = dbi_query (
- "SELECT cal_template_text FROM webcal_report_template " .
- "WHERE cal_template_type = 'S' and cal_report_id = 0" );
- if ( $res ) {
- if ( $row = dbi_fetch_row ( $res ) ) {
- echo $row[0];
- }
- dbi_free_result ( $res );
- }
- }
+// Print custom header (since we do not call print_header function)
+if ( ! empty ( $CUSTOM_SCRIPT ) && $CUSTOM_SCRIPT == 'Y' ) {
+ $res = dbi_query (
+ "SELECT cal_template_text FROM webcal_report_template " .
+ "WHERE cal_template_type = 'S' and cal_report_id = 0" );
+ if ( $res ) {
+ if ( $row = dbi_fetch_row ( $res ) ) {
+ echo $row[0];
+ }
+ dbi_free_result ( $res );
+ }
+}
?>
</head>
<body onload="myOnLoad();">
@@ -304,10 +365,12 @@
<?php etranslate("Access public calendar")?></a><br />
<?php } ?>
-<?php if ( $demo_mode == "Y" ) {
- // This is used on the sourceforge demo page
- echo "Demo login: user = \"demo\", password = \"demo\"<br />";
-} ?>
+<?php
+if ( $demo_mode == "Y" ) {
+ // This is used on the sourceforge demo page
+ echo "Demo login: user = \"demo\", password = \"demo\"<br />";
+}
+?>
<br /><br /><br />
<span class="cookies"><?php etranslate("cookies-note")?></span><br />
<hr />
@@ -325,6 +388,7 @@
}
dbi_free_result ( $res );
}
-} ?>
+}
+?>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/month.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/month.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/month.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,6 +1,21 @@
<?php
+//echo "debug<br />";
+
+
include_once 'includes/init.php';
+global $get_unapproved;
+$get_unapproved = $GLOBALS['DISPLAY_UNAPPROVED']=='Y';
+
+//debug
+logs($log_file,"####### month.php ##########\n");
+//debug
+
+
+//Debug
+logs($log_file,print_r($_GET,true)."\n");
+//Debug
+
if (($user != $login) && $is_nonuser_admin) {
load_user_layers ($user);
} else {
@@ -9,6 +24,49 @@
load_user_categories ();
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
+}
+
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+}
+
+//debug
+logs($log_file,"month.php : type : ".$GLOBALS['type_param']." user : ".$user."\n");
+//debug
+
+if($GLOBALS['type_param']=='group' && isset($_GET['group_param'])){
+
+ //debug
+ logs($log_file,"month.php : Avant user_project_role \n");
+ //debug
+
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$group_cal);
+
+ $res=dbi_query("select unix_group_name from groups where group_id=".$GLOBALS['group_param']);
+ $row = pg_fetch_array($res);
+ $GLOBALS['group_name_param']=$row[0];
+
+ //debug
+ logs($log_file,"month.php : role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+ //debug
+}
+
+//debug
+logs($log_file,"month.php : Après if group \n");
+//debug
+
+//Determine the info type
+if($GLOBALS['type_param']=='group'){
+ $info_type="type_param=group&group_param=".$GLOBALS['group_param']."&";
+}else{
+ $info_type="type_param=user&";
+}
+
$next = mktime ( 3, 0, 0, $thismonth + 1, 1, $thisyear );
$nextyear = date ( "Y", $next );
$nextmonth = date ( "m", $next );
@@ -39,22 +97,46 @@
$INC = array('js/popups.php');
print_header($INC,$HeadX);
+if($GLOBALS['type_param']=='group'){
+ $user=$GLOBALS['group_name_param'];
+}else{
+ $user=$login;
+}
+
/* Pre-Load the repeated events for quicker access */
$repeated_events = read_repeated_events (
( ! empty ( $user ) && strlen ( $user ) ) ? $user : $login, $cat_id, $startdate );
+//Debug
+logs($log_file,"month.php : avant read_events \n");
+//Debug
+
/* Pre-load the non-repeating events for quicker access */
$events = read_events ( ( ! empty ( $user ) && strlen ( $user ) )
? $user : $login, $startdate, $enddate, $cat_id );
+//Debug
+logs($log_file,"month.php : après read_events \n");
+//Debug
+
if ( ! empty ( $cat_id ) )
$monthURL = "month.php?cat_id=$cat_id&";
else
$monthURL = 'month.php?';
+
+//debug
+logs($log_file,"month.php : events : ".print_r($events,true)." \n");
+//debug
+
display_small_month ( $prevmonth, $prevyear, true, true, "prevmonth",
- $monthURL );
+ $monthURL , $info_type);
display_small_month ( $nextmonth, $nextyear, true, true, "nextmonth",
- $monthURL );
+ $monthURL, $info_type );
+
+//debug
+logs($log_file,"month.php : Après small_manth \n");
+//debug
+
?>
<div class="title">
<span class="date"><br /><?php
@@ -62,16 +144,27 @@
$DATE_FORMAT_MY, false, false );
?></span>
<span class="user"><?php
- if ( $single_user == "N" ) {
- echo "<br />\n";
- echo $user_fullname;
+
+ echo "<br />\n";
+
+ if($GLOBALS['type_param'] == 'group'){
+ $res = dbi_query("SELECT group_name from groups where unix_group_name = '".$GLOBALS['group_name_param']."'");
+ $row = pg_fetch_array($res);
+ $echo .= $row[0];
+ }else{
+ $echo .= $login;
}
+
+ echo $echo;
+
+ /*echo $user_fullname;
+ }
if ( $is_nonuser_admin ) {
echo "<br />-- " . translate("Admin mode") . " --";
}
if ( $is_assistant ) {
echo "<br />-- " . translate("Assistant mode") . " --";
- }
+ }*/
?></span>
<?php
if ( $categories_enabled == "Y" && (!$user || ($user == $login || $is_assistant ))) {
@@ -144,9 +237,19 @@
echo " class=\"$class\"";
}
echo ">";
+
+ //debug
+ logs($log_file,"month.php : Avant print_date_entries \n");
+ //debug
+
//echo date ( "D, m-d-Y H:i:s", $date ) . "<br />";
print_date_entries ( date ( "Ymd", $date ),
( ! empty ( $user ) ) ? $user : $login, false );
+
+ //debug
+ logs($log_file,"month.php : Après print_date_entries \n");
+ //debug
+
print "</td>\n";
} else {
print "<td> </td>\n";
@@ -159,7 +262,7 @@
<?php
if ( ! empty ( $eventinfo ) ) echo $eventinfo;
- display_unapproved_events ( ( $is_assistant || $is_nonuser_admin ? $user : $login ) );
+ display_unapproved_events ( ( $is_assistant || $is_nonuser_admin ? $user : $login ), $info_type );
?>
<br />
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/pref.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/pref.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/pref.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,6 +1,33 @@
<?php
+
+
include_once 'includes/init.php';
+//Debug
+logs($log_file,"####### pref.php #######\n");
+//debug
+
+
+if(isset($_GET['type_param'])){
+ $GLOBALS['type_param']=$_GET['type_param'];
+}else{
+ $GLOBALS['type_param']='user';
+}
+
+if(isset($_GET['group_param'])){
+ $GLOBALS['group_param']=$_GET['group_param'];
+}
+
+if($GLOBALS['type_param']=='group' && isset($_GET['group_param'])){
+
+ $group_cal=$GLOBALS['group_param'];
+ $role_user=user_project_role($login,$group_cal);
+
+ //Debug
+ logs($log_file,"role : ".$role_user."\n login : ".$login."\n group : ".$group_cal."\nuser : ".$user."\n");
+ //debug
+}
+
if ($user != $login)
$user = (($is_admin || $is_nonuser_admin) && $user) ? $user : $login;
@@ -50,8 +77,26 @@
}
?> <img src="help.gif" alt="<?php etranslate("Help")?>" class="help" onclick="window.open ( 'help_pref.php', 'cal_help', 'dependent,menubar,scrollbars,height=400,width=400,innerHeight=420,outerWidth=420');" /></h2>
-<a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php">« <?php etranslate("Admin") ?></a><br /><br />
+<?php
+ //Debug
+ logs($log_file,"admin link\n");
+ //debug
+
+ $admin_link = "<a title=\"".translate("Admin")."\" class=\"nav\" href=\"adminhome.php";
+
+ if($GLOBALS['type_param'] == 'group'){
+ $admin_link .= "?type_param=".$GLOBALS['type_param']."&group_param=".$GLOBALS['group_param'];
+ }else{
+ $admin_link .= "?type_param=".$GLOBALS['type_param'];
+ }
+
+ $admin_link .= "\"> ".translate("Admin")."</a><br /><br />";
+
+ echo $admin_link;
+
+?>
+
<form action="pref_handler.php" method="post" onsubmit="return valid_form(this);" name="prefform">
<?php
if ($user)
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/purge.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/purge.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/purge.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -17,6 +17,52 @@
*/
include_once 'includes/init.php';
+//Debug
+logs($log_file,"####### purge.php #######\n");
+//Debug
+
+//Debug
+logs($log_file,"login : ".$login."\n");
+//Debug
+
+if(isset($_POST['type_param']) && ($_POST['type_param'] == 'group' || $_POST['type_param'] == 'user') ) {
+ $GLOBALS['type_param']=$_POST['type_param'];
+ $sender = 'post';
+}else{
+ if(isset($_GET['type_param']) && ($_GET['type_param'] == 'group' || $_GET['type_param'] == 'user') ) {
+ $GLOBALS['type_param']=$_GET['type_param'];
+ $sender = 'get';
+ }else{
+ $GLOBALS['type_param']='user';
+ }
+}
+
+logs($log_file, "type_param : ".$GLOBALS['type_param']);
+
+if($GLOBALS['type_param']=='group'){
+ if($sender == 'post'){
+ $GLOBALS['group_param']=$_POST['group_param'];
+ }else if($sender == 'get'){
+ $GLOBALS['group_param']=$_GET['group_param'];
+ }
+
+ $res=dbi_query("select unix_group_name from groups where group_id=".$GLOBALS['group_param']);
+ $row = pg_fetch_array($res);
+ $GLOBALS['group_name_param']=$row[0];
+
+ $user = $GLOBALS['group_name_param'];
+
+ logs($log_file, "group_param : ".$GLOBALS['group_param']);
+}else{
+ $user = $login;
+}
+
+$info_type = "type_param=".$GLOBALS['type_param'];
+
+if($GLOBALS['type_param'] == 'group'){
+ $info_type .= "&group_param=".$GLOBALS['group_param'];
+}
+
// Set this to true do show the SQL at the bottom of the page
$purgeDebug = true;
$sqlLog = '';
@@ -56,7 +102,7 @@
echo "</h2>\n";
?>
-<a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php">« <?php etranslate("Admin") ?></a><br /><br />
+<a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php?<?php echo $info_type ?>">« <?php etranslate("Admin") ?></a><br /><br />
<?php
if ( ! empty ( $user ) ) {
@@ -72,8 +118,10 @@
if ( $user == 'ALL' ) {
$ids = array ( 'ALL' );
} else {
+ logs($log_file,"SELECT cal_id FROM webcal_entry WHERE cal_create_by = '$user'\n");
$ids = get_ids (
"SELECT cal_id FROM webcal_entry WHERE cal_create_by = '$user'" );
+ logs($log_file, " ID : ".print_r($ids,true)."\n");
}
} elseif ( $end_date ) {
if ( $user != 'ALL' ) {
@@ -93,6 +141,9 @@
$ALL );
$ids = array_merge ( $E_ids, $M_ids );
}
+
+ logs($log_file, " ID : ".print_r($ids,true)."\n");
+
//echo "event ids: <ul><li>" . implode ( "</li><li>", $ids ) . "</li></ul>\n";
if ( count ( $ids ) > 0 ) {
purge_events ( $ids );
@@ -107,6 +158,15 @@
?>
<form action="purge.php" method="post" name="purgeform">
+<?php
+ $echo = "<input type=\"hidden\" value=\"".$GLOBALS['type_param']."\" name=\"type_param\" />";
+ if($GLOBALS['type_param']=='group'){
+ $echo2 = "<input type=\"hidden\" value=\"".$GLOBALS['group_param']."\" name=\"group_param\" />";
+ }
+ echo $echo;
+ echo $echo2;
+?>
+
<table>
<tr><td><label for="user">
<?php etranslate("User");?>:</label></td>
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/reject_entry.php
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/reject_entry.php 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/reject_entry.php 2008-01-09 13:51:10 UTC (rev 6324)
@@ -14,9 +14,28 @@
$app_user = ( $is_assistant || $is_nonuser_admin ? $user : $login );
if ( empty ( $error ) && $id > 0 ) {
- if ( ! dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'R' " .
- "WHERE cal_login = '$app_user' AND cal_id = $id" ) ) {
+
+ $res = dbi_query ( "select COUNT(*) as num FROM webcal_entry_user WHERE cal_status = 'W' " .
+ "AND cal_login = '$app_user' AND cal_id = ".$id );
+ if(!$res || $res['num'] < 1 ){
+ $result = dbi_query ( "SELECT * FROM webcal_entry_user WHERE cal_id = ".$id);
+ while ($trait = dbi_fetch_row($result)) {
+ if($trait['cal_group_status'] == null){
+ dbi_query ( "UPDATE webcal_entry_user SET cal_group_status = ',R:".$app_user.",' " .
+ "WHERE cal_id = ".$id." AND cal_login = '".$trait['cal_login']."'" );
+ }else{
+ dbi_query ( "UPDATE webcal_entry_user SET cal_group_status = cal_group_status||',R:".$app_user.",' " .
+ "WHERE cal_id = ".$id." AND cal_login = '".$trait['cal_login']."'" );
+ }
+ }
+ }else if ( ! dbi_query ( "UPDATE webcal_entry_user SET cal_status = 'R' " .
+ "WHERE cal_login = '".$app_user."' AND cal_id = ".$id ) ) {
$error = translate("Error approving event") . ": " . dbi_error ();
+ //plugin add father
+ $params[0] = $app_user ;
+ $params[1] = $id ;
+ plugin_hook('add_cal_link_father_event',$params);
+
} else {
activity_log ( $id, $login, $app_user, $LOG_REJECT, "" );
}
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Danish.txt
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Danish.txt 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Danish.txt 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,1025 +1,1025 @@
-# Use this as a starting point to translate this application into
-# another language. The format is "English text: translated text"
-# There cannot be a ":" in the English text.
-# Translated by: Allan Thraen (allan at 12go.dk)
-# Updated by: Jørgen Thomsen (jth at jth.net)
-# Last update: 12-Feb-2001
-# Last update: Nov.25-2003 by Jens Th (photo at jens-th.com)
-# Last updated: 15-Feb-2004 (Nicolaj Rasmussen, drlandau <at> msn <dot> com)
-# Last updated: 21-Mar-2005 (Morten Nielsen, mni <at> it <dot> dk)
-# Last updated: 18-Jun-2005 (Leo Todaro, leotodaro <at> hotmail.com)
-# Translation last updated on 21-March-2005
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-
-
-###############################################
-# Specify a charset (will be sent within meta tag for each page)
-#
-charset: iso-8859-1
-
-
-
-###############################################
-# Page: week.php
-#
-Week: Uge
-Previous: Forrige
-Next: Næste
-Admin mode: Administrator-tilstand
-Assistant mode: Assistent-tilstand
-cont.: cont.
-Generate printer-friendly version: Vis printervenlig side
-Printer Friendly: Printervenlig
-
-
-###############################################
-# Page: admin.php
-#
-System Settings: System indstillinger
-Help: Hjælp
-You are not authorized: Du har ikke tilladelse til dette
-Admin: Admin
-Note: Note
-Your user preferences: Dine bruger-indstillinger
-may be affecting the appearance of this page.: kan påvirke udseendet af denne side
-Click here: Tryk her
-to not use your user preferences when viewing this page: for ikke at benytte dine bruger-indstillinger når denne side vises
-are being ignored while viewing this page.: ignoreres når denne side vises.
-to load your user preferences when viewing this page: for at hente dine bruger-indstillinger når denne side vises
-Save: Gem
-Settings: Indstillinger
-Public Access: Offentlig adgang
-Groups: Grupper
-NonUser Calendars: Ikke brugertilknyttede kalendere
-Other: Diverse
-Email: Email
-colors-help: Alle farver skal indtastes som #RRGGBB hvor RR er hexkoden for rød, GG er hexkoden for grøn og BB er hexkoden for den blå farve.
-Colors: Farver
-app-name-help: Angiver navnet på kalenderen. Dette fremgår i browserens titellinie for samtlige sider samt på login-siden.
-Application Name: Kalender navn
-server-url-help: Angiver basis URL'en for applikationen. Denne bliver inkluderet når der udsendes email påmindelser og notifikationer.
-Server URL: Server URL
-language-help: Angiver hvilket sprog, der skal bruges.
-Language: Sprog
-Your browser default language is: Din browsers standardsprog er
-fonts-help: Angiver en liste over skrifttyper systemet kan benytte (f.eks. "Arial, Helvetica")
-Fonts: Skrifttyper
-custom-script-help: Tilføjelse af brugertilpasset Javascript eller stylesheet tekst som indsættes HTML "head" sektionen på hver side
-Custom script/stylesheet: Bruger tilpasset script/stylesheet
-Yes: Ja
-No: Nej
-Edit: Redigér
-custom-header-help: Tilføjelse af brugertilpasset HTML kode som indsættes i toppen af hver side
-Custom header: Brugertilpasset sidehoved
-custom-trailer-help: Tilføjelse af brugertilpasset HTML kode som indsættes i bunden af hver side
-Custom trailer: Brugertilpasset sidefod
-preferred-view-help: Angiver den foretrukne opstilling (dag, uge, måned eller år).
-Preferred view: Foretrukken opstilling
-Day: Dag
-Month: Måned
-Year: År
-display-weekends-help: Inkluderer weekender i uge-visning
-Display weekends in week view: Vis weekender i uge-visning
-yearly-shows-events-help: På års-visning, brug fed skrift for dage med aftaler
-Display days with events in bold in month and year views: Brug fed skrift for dage med aftaler på måneds- og årsvisning
-display-desc-print-day-help: Vis aftalebeskivelser i printervenlig version af dags-visning
-Display description in printer day view: Vis beskrivelse i printervenlig dags-visning
-date-format-help: Angiver det foretrukne dato format.
-Date format: Dato format
-December: December
-time-format-help: Skal tiden vises pr 12 eller 24-timer.
-Time format: Tidsformat
-12 hour: 12 timer
-24 hour: 24 timer
-time-interval-help: Angiver hvor store tidsintervaller der benyttes i uge- og dags-visning.
-Time interval: Tidsinterval
-hour: timer
-minutes: minutter
-auto-refresh-help: Når slået til bliver dags-, uge-, måneds-visning, samt listen over ikke-accepterede sider automatisk opdateret periodisk.
-Auto-refresh calendars: Auto-opdater kalender
-auto-refresh-time-help: Angiver tiden imellem hver opdatering, hvis auto-opdatering er slået til.
-Auto-refresh time: Auto-opdater tid
-require-approvals-help: Når dette er slået til skal brugere acceptere en aftale før den vises i deres kalender (pånær hvis "Vis ikke-accepterede aftaler" er slået til. Bemærk at hvis denne indstilling slåes fra, vil det samtidig slå acceptering i den offentlige kalender fra (hvis dette er slået til).
-Require event approvals: Kræv acceptering af aftaler
-display-unapproved-help: Specificér her hvorvidt din kalender skal vise ikke-accepterede aftaler.
-Display unapproved: Vis ikke-accepterede aftaler
-display-week-number-help: Angiver hvorvidt ugenumre skal vises i uge-visninger.
-Display week number: Vis ugenummer
-display-week-starts-on: Hvorvidt ugen starter mandag eller søndag.
-Week starts on: Ugen starter på
-Sunday: Søndag
-Monday: Mandag
-work-hours-help: Specificer den daglige arbejdstid.
-Work hours: Arbejdstid
-From: Fra
-to: til
-disable-priority-field-help: Hvis der vælges "ja" fjernes feltet "Prioritet" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
-Disable Priority field: Fjern Prioritets-felt
-disable-access-field-help: Hvis der vælges "ja" fjernes feltet "Adgang" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
-Disable Access field: Fjern Adgangs-felt
-disable-participants-field-help: Hvis der vælges "ja" fjernes feltet "Deltagere" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
-Disable Participants field: Fjern Deltagere-felt
-disable-repeating-field-help: Hvis der vælges "ja" fjernes feltet "Gentagelse" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
-Disable Repeating field: Fjern Gentagelses-felt
-popup-includes-siteextras-help: Hvis slået til, vis brugertilpasset aftale opsætning fra site_extras.php i aftale popup-besked.
-Display Site Extras in popup: Vis Site Extras i popup-besked
-allow-html-description-help: Vis slået til, kan brugere indtaste HTML i aftalebeskrivelsen. Hvis ikke slået til, vil HTML-kode vises som alm. tekst. Advarsel: Hvis dette slåes til kan bruger linke til billeder på andre websider
-Allow HTML in Description: Tillad HTML i beskrivelsen
-allow-view-other-help: Angiver om en bruger må se i andre brugeres kalendere
-Allow viewing other user's calendars: Tillad visning af andres kalendere
-allow-view-add-help: A '+' ikon bliver inkluderet i visninger. Dette gøre brugere i stand til hurtigt at tilføje nye aftaler til andre brugeres kalendere.
-Include add event link in views: Inkluder "Tilføj aftale" i visninger
-remember-last-login-help: Når slået til bliver brugerens sidste login automatisk udfyldt på login-siden (ikke password) og brugerens indstillinger bliver automatisk hentet (inkl. deres foretrukne farver og sprogvalg).
-Remember last login: Husk sidste login
-conflict-check-help: Kontroller aftale-konflikter (2 aftaler der er oprettet til samme tid for den samme person). Hvis denne sættes til "ja" kan du stadig oprettet flere aftaler på samme tid hvis du godkender advarslen. HVis denne sættes til "nej" bliver der ikke kontrolleret efter aftale konflikter. Du bør sætte denne til "ja" så der bliver tjekket efter konflikter.
-Check for event conflicts: Check for aftale-konflikter
-conflict-months-help: Hvis konflikt-kontrol er slået til ("Kontroller aftale konflikter"), angiver dette hvor mange måneder frem der skal tjekkes for konflikter. Hvis det tager lang tid at tilføje nye aftaler, så sæt denne værdi ned.
-Conflict checking months: Kontroller månedskonflikter
-conflict-check-override-help: Gør det muligt for brugere at ignorere konflikter og oprette flere aftaler på samme tidspunkt.
-Allow users to override conflicts: Tillad brugere at ignorere aftale-konflikter
-limit-appts-help: Gør det muligt for en administrator at sætte begrænsning på antallet af aftaler en bruger må have pr. dag.
-Limit number of timed events per day: Begræns antal aftaler pr. dag
-limit-appts-number-help: Angiver det maksimale antal aftaler en bruger kan have pr. dag.
-Maximum timed events per day: Maximum antal aftaler pr. dag
-timed-evt-len-help: Angiver hvordan længden af en tidsbetemt aftale skal indtastes.
-Specify timed event length by: Angiv længde af tidsbestemt aftale ved
-Duration: Varighed
-End Time: Sluttid
-Plugins: Plugins
-plugins-enabled-help: Gør det muligt at benytte plugins.
-Enable Plugins: Aktiver plugins
-plugins-sort-key-help: Angiver en sorteringsnøgle for den valgte plugin. Dette gør det muligt at vise plugins i en speciel rækkefølge.
-Plugin: Plugin
-allow-public-access-help: Når slået til kan kalenderen bruges som en offentlig kalender der ikke kræver login.
-Allow public access: Tillad offentlig adgang
-public-access-default-visible: Aftaler i den offentlige kalender vil automatisk optræde i alle brugeres kalendere
-Public access visible by default: Offentlig adgang vises altid
-public-access-default-selected: Når nye aftaler oprettes er brugen "Offentlig adgang" altid valgt som deltager.
-Public access is default participant: Offentlig adgang deltager altid
-public-access-view-others-help: Når kalenderen tilgåes med offentlig adgang, angiver dette om brugeren må se andre brugeres kalendere.
-Public access can view other users: Offentlig adgang kan se andre brugere
-public-access-can-add-help: Når slået til kan brugere, der tilgår kalenderen med offentlig adgang oprette nye aftaler, men disse vil ikke optræde i kalenderen før en administrator accepterer den nye aftale.
-Public access can add events: Offentlig adgang kan tilføje aftaler
-public-access-add-requires-approval-help: Angiver om aftaler tilføjet via en konto med offentlig adgang kræver godkendelse før den bliver vist.
-Public access new events require approval: Nye offentlige aftaler kræver accept
-public-access-sees-participants-help: Hvis slået til, kan brugere som tilgår kalenderen via offentlig adgang se aftale deltagere i detalje-visning
-Public access can view participants: Offentlig adgang må se andre aftale-deltagere
-groups-enabled-help: Slår understøttelse af grupper til, hvilket gør brugere i stand til at vælge brugere via gruppemedlemsskab.
-Groups enabled: Grupper slået til
-user-sees-his-group-help: Hvis slået til kan brugeren ikke se kalender-brugere der ikke er medlem af mindst én af sine egne grupper.
-User sees only his groups: Bruger kan kun se sine egne grupper.
-nonuser-enabled-help: Hvis slået til, har administrator-brugere mulighed for at tilføje ikke brugertilknyttede kalendere.
-Nonuser enabled: Ikke brugertilknyttede kalendere slået til
-nonuser-list-help: Hvor skal ikke brugertilknyttede kalendere vises i deltagerlisten
-Nonuser list: Vis i deltagerliste i
-Top: Top
-Bottom: Bund
-reports-enabled-help: Hvis slået til kan brugere vælge "Rapporter" i bunden af hver side og har mulighed for at oprettet brugerdefinerede rapporter. Derudover kan administrator-brugere oprettet globale rapporter som vises i bunden af alle sider på alle brugere.
-Reports enabled: Rapporter slået til
-subscriptions-enabled-help: Angiver om eksterne brugere kan abonnere på en WebCalendar-bruger's kalender. Dette sætter dem i stand til at se brugerens aftaler i en Ical-applikation (fx. Apple's iCal eller Mozilla Calendar).
-Allow remote subscriptions: Tillad eksterne abonnementer
-categories-enabled-help: Slår understøttelse af aftale-kategorier til.
-Categories enabled: Kategorier slået til
-allow-external-users-help: Angiver om en ekstern bruger kan tilføjes til en aftale. Dette gør det muligt for brugere (uden for systemet) at blive angivet som deltagere til en aftale.
-Allow external users: Tillad eksterne brugere
-external-can-receive-notification-help: Når eksterne brugere er slået til samtidig med email udsendelse, så kan eksterne brugere modtage notifikationer når en aftale er tilføjet, opdateret eler slettet (hvis der er angivet en emailadresse for den eksterne bruger).
-External users can receive email notifications: Eksterne brugere kan modtage email-notifikationer
-external-can-receive-reminder-help: Når eksterne brugere er slået til samtidig med emailpåmindelser, så kan eksterne brugere modtage påmindelser når en aftale er tilføjet, opdateret eler slettet (hvis der er angivet en emailadresse for den eksterne bruger)
-External users can receive email reminders: Eksterne brugere kan modtage emailpåmindelser
-email-enabled-help: Slår email-afsendelse for notifikationer og påmindelser til/fra. Sæt til "nej" hvis din server ikke er konfigureret til at kunne sende email.
-Email enabled: Email aktiveret
-email-default-sender: Angiver email-adressen der skal benyttes når der afsendes påmindelser.
-Default sender address: Standard afsender-adresse
-Default user settings: Standard brugerindstillinger
-email-event-reminders-help: Angiver om der skal sendes påmindelser
-Event reminders: Aftale-påmindelser
-email-event-added: Angiver om der skal sendes en email notofikation når en aftale tilføjes din kalender.
-Events added to my calendar: Aftaler tilføjet til min kalender
-email-event-updated: Angiver om der skal sendes en email notifikation når en aftale opdateres i din kalender.
-Events updated on my calendar: Aftaler opdateret i min kalender
-email-event-deleted: Angiver om der skal sendes en email notifikation når en aftale fjernes fra din kalender.
-Events removed from my calendar: Aftaler fjernet fra min kalender
-email-event-rejected: Angiver om der skal sendes en email notifikation når en deltager afviser en aftale der findes i din kalender.
-Event rejected by participant: Aftale afvist af deltager
-Allow user to customize colors: Tillad bruger at ændre farver
-Enable gradient images for background colors: Slå farvegraduering til på baggrundsfarver
-Not available: Ikke tilgængelig
-Document background: Dokumentbaggrund
-Select: Vælg
-Document title: Dokumenttitel
-Document text: Dokumenttekst
-Table grid color: Farve for tabelrammer
-Table header background: Baggrund for tabeloverskrift
-Table header text: Tabeloverskrift
-Table cell background: Baggrund for tabelcelle
-Table cell background for current day: Baggrund for tabelcelle (idag)
-Table cell background for weekends: Baggrund for tabelcelle (weekender)
-Event popup background: Baggrund for aftale-popup
-Event popup text: Tekst i aftale-popup
-
-
-###############################################
-# Page: activity_log.php
-#
-Activity Log: Aktivitetslog
-User: Bruger
-Calendar: Kalender
-Date: Dato
-Time: Tidspunkt
-Event: Aftale
-Action: Handling
-Event created: Aftale oprettet
-Event approved: Aftale accepteret
-Event rejected: Aftale afvist
-Event updated: Aftale opdateret
-Event deleted: Aftale slettet
-Notification sent: Notifikation afsendt
-Reminder sent: Påmindelse afsendt
-Database error: Database fejl
-Events: Aftaler
-
-###############################################
-# Page: add_entry.php
-#
-Invalid entry id: Ugyldigt aftale ID
-This is a private event and may not be added to your calendar.: Dette er en privat aftale, som ikke må tilføjes til din kalender.
-Error adding event: Fejl ved tilføjelse af aftale
-
-
-###############################################
-# Page: admin_handler.php
-#
-Error: Fejl
-The following error occurred: Følgende fejl opstod
-
-
-###############################################
-# Page: approve_entry.php
-#
-Error approving event: Fejl ved godkendelse af aftale
-
-
-###############################################
-# Page: category.php
-#
-Categories: Kategorier
-Add: Tilføj
-Category Name: Navn på kategori
-Global: Global
-Delete: Slet
-Are you sure you want to delete this entry?: Er du sikker på at du vil slette denne aftale?
-Add New Category: Tilføj ny kategori
-
-
-###############################################
-# Page: del_entry.php
-#
-Hello: Hej
-An appointment has been canceled for you by: En aftale er blevet aflyst for dig af
-The subject was: Emnet var
-Notification: Påmindelse
-
-
-
-
-###############################################
-# Page: edit_layer.php
-#
-Edit Layer: Rediger lag
-Add Layer: Tilføj lag
-Source: Kilde
-Color: Farve
-Duplicates: Gentagelser
-Show layer events that are the same as your own: Vis lag-aftaler, der er de samme som dine egne
-Delete layer: Slet lag
-Are you sure you want to delete this layer?: Er du sikker på, at du vil slette dette lag?
-
-
-###############################################
-# Page: edit_layer_handler.php
-#
-You cannot create a layer for yourself: Du kan ikke oprettet et lag for dig selv
-You can only create one layer for each user: Du kan kun oprettet ét lag pr. bruger
-
-
-
-
-###############################################
-# Page: edit_user_handler.php
-#
-Deleting users not supported: Sletning af brugere er ikke understøttet
-The passwords were not identical: Kodeordene er ikke identiske
-You have not entered a password: Du har ikke indtastet et kodeord
-Changes successfully saved: Ændringer gemt
-
-
-###############################################
-# Page: subscription.php
-#
-Publishing Disabled (Admin): Udgivelse slået fra (Admin)
-Publishing Disabled (User): Udgivelse slået fra (User)
-Unnamed Event: Unavngiven aftale
-
-
-###############################################
-# Page: export.php
-#
-Export format: Eksport format
-Palm Pilot: Palm Pilot
-Include all layers: Inkludér alle lag
-Export all dates: Eksporter alle dage
-Start date: Startdato
-End date: Slutdato
-Modified since: Ændret siden
-Export: Eksporter
-
-
-###############################################
-# Page: export_handler.php
-#
-# export format not defined or incorrect: Eksport format ikke valgt eller fejl i formatet
-
-
-###############################################
-# Page: group_edit.php
-#
-Unnamed Group: Unavngiven gruppe
-Add Group: Tilføj gruppe
-Edit Group: Rediger gruppe
-Group name: Gruppenavn
-Updated: Opdateret
-Created by: Lavet af
-Users: Brugere
-
-
-###############################################
-# Page: group_edit_handler.php
-#
-You must specify a group name: Du skal angive navnet på en gruppe
-
-
-###############################################
-# Page: groups.php
-#
-# Add New Group: Tilføj ny gruppe
-
-
-###############################################
-# Page: pref.php
-#
-Preferences: Indstillinger
-Save Preferences: Gem indstillinger
-to modify the preferences for the Public Access calendar: for at ændre indstillinger for den offentlige kalender.
-tz-help: Angiver hvor mange timer tiden skal justeres fra serverens tid til den lokale tid.
-Timezone Offset: Tidszone forskydning
-Add N hours to: Tilføj N timer til
-Subtract N hours from: Træk N timer fra
-same as: samme som
-server time: serverens tidsindstilling
-Default Category: Standard kategori
-All: Alle
-When I am the boss: Når jeg er ejer
-Email me event notification: Email mig aftale notifikationer
-I want to approve events: Jeg ønsker at acceptere aftaler
-Subscribe/Publish: Abonnér/Udgiv
-allow-remote-subscriptions-help: Angiver om eksterne brugere kan tilmelde sig din kalender. Dette giver dem mulighed for at se dine aftaler i en iCal-applikation (fx. Apple's iCal eller Mozilla Calendar)
-remote-subscriptions-url-help: Viser den URL som eksterne brugere skal benytte for at tilmelde sig din kalender.
-URL: URL
-Sun: Søn
-Mon: Man
-Tue: Tir
-Wed: Ons
-Thu: Tor
-Fri: Fre
-Sat: Lør
-
-
-###############################################
-# Page: help_bug.php
-#
-Report Bug: Rapportér fejl
-
-
-###############################################
-# Page: help_edit_entry.php
-#
-Adding/Editing Calendar Entries: Tilføj/Redigér aftale
-Brief Description: Kort beskrivelse
-brief-description-help: Her skal der stå en kort beskrivelse af aftalen - det bliver vist når man står over aftalen i oversigtskalenderen.
-Full Description: Komplet beskrivelse.
-full-description-help: Her kan der stå en komplet beskrivelse af aftalen.
-date-help: Angiver datoen for aftalen.
-time-help: Angiver tidspunktet for aftalen.<br /><i>Dette felt behøver ikke at være udfyldt.</i>
-duration-help: I dette felt kan du angive varigheden af aftalen <br /><i>Dette felt behøver ikke at være udfyldt.</i>
-end-time-help: Angiver sluttidspunktet for aftalen.
-Priority: Prioritet
-priority-help: Angiv aftalens prioritet.
-Access: Adgang
-access-help: Angiv hvorvidt aftalen skal kunne ses af alle - eller om den er fortrolig.
-Participants: Deltagere
-participants-help: Vis deltagerne i denne aftale.
-Repeat Type: Gentag type
-repeat-type-help: Hvor ofte skal aftalen gentages.
-Repeat End Date: Gentag slutdato
-repeat-end-date-help: Specificer slutdatoen for gentagelser af denne aftale.
-Repeat Day: Gentag dato
-repeat-day-help: Hvilke ugedage skal aftalen gentages på.
-Frequency: Hyppighed
-repeat-frequency-help: Hvor ofte skal aftalen gentages ? Tallet 1 viser at det skal ske hver gang, 2 så er det hver anden gang...
-
-
-###############################################
-# Page: help_index.php
-#
-Help Index: Hjælpeindex
-Layers: Lag
-Import: Importér
-
-
-###############################################
-# Page: help_layers.php
-#
-Layers are useful for displaying other users' events in your own calendar. You can specifiy the user and the color the events will be displayed in.: Lag er nyttige til at vise andre brugeres aftaler i din egen kalender. Du kan angive brugeren samt den farve du ønsker aftalerne vist i.
-Add/Edit/Delete: Tilføj/Rediger/Slet
-Clicking the Edit Layers link in the admin section at the bottom of the page will allow you to add/edit/delete layers.: Hvis du vælger "Rediger lag" i Admin-delen i bunden af siden har du mulighed for at slå lag til/fra samt redigere dem.
-Specifies the user that you would like to see displayed in your calendar.: Angiver den bruger du ønsker at vise i din egen kalender.
-The text color of the new layer that will be displayed in your calendar.: Tekstfarven på den nye lag som vises i din egen kalender.
-If checked, events that are duplicates of your events will be shown.: Hvis valgt vises aftaler der er kopier af dine egne.
-Disabling: Slå fra
-Press the Disable Layers link in the admin section at the bottom of the page to turn off layers.: Vælg "Slå lag fra" i Admin-delen i bunden af siden for at slå lag fra.
-Enabling: Slå til
-Press the Enable Layers link in the admin section at the bottom of the page to turn on layers.: Vælg "Slå lag til" i Admin-delen i bunden af siden for at slå lag til.
-
-
-###############################################
-# Page: help_admin.php
-#
-Display days with events in bold in year view: Brug fed skrift for dage med aftaler på års-visning
-Nonuser: Ikke brugertilknyttede kalendere
-Reports: Rapporter
-
-
-###############################################
-# Page: layers.php
-#
-Layers are currently: Lag er aktuelt
-Enabled: Slået til
-Disable Layers: Slå lag fra
-Disabled: Slået fra
-Enable Layers: Slå lag til
-to modify the layers settings for the: for at redigere lag indstillingerne for
-calendar: kalender
-Add layer: Tilføj lag
-Layer: Lag
-Edit layer: Rediger lag
-
-
-###############################################
-# Page: list_unapproved.php
-#
-View this entry: Se denne aftale
-Approve/Confirm: Godkend/bekræft
-Approve this entry?: Godkend denne aftale?
-Reject: Afvis
-Reject this entry?: Afvis denne aftale?
-No unapproved events for: Ingen ikke-accepterede aftaler for
-Unapproved Events: Ikke-accepterede aftaler
-
-
-###############################################
-# Page: view_entry.php
-#
-Low: Lav
-Medium: Medium
-High: Høj
-every: alle
-2nd: anden
-3rd: tredje
-4th: fjerde
-5th: femte
-1st: første
-last: sidste
-by date: efter dato
-Confidential: Fortrolig
-Description: Beskrivelse
-Status: Status
-Waiting for approval: Afventer acceptering
-Deleted: Slettet
-Rejected: Afvist
-All day event: Aftale for hele dagen
-Public: Offentlig
-Category: Kategori
-days: dage
-day: dag
-hours: timer
-minute: minutter
-before event: før aftale
-External User: Eksterne brugere
-Approve/Confirm entry: Godkend/bekræft aftale
-Reject entry: Afvis aftale
-Set category: Vælg kategori
-Edit repeating entry for all dates: Rediger gentagne aftaler for alle datoer
-Edit entry for this date: Rediger aftale for denne dag
-Delete repeating event for all dates: Slet gentagne aftaler for alle datoer
-This will delete this entry for all users.: Dette vil slette denne aftale for alle brugere.
-Delete entry only for this date: Slet kun aftalen for denne dag
-Edit entry: Redigér aftale
-Delete entry: Slet aftale
-Copy entry: Kopiér aftale
-This will delete the entry from your calendar.: Dette vil slette aftalen fra din kalender.
-Add to My Calendar: Føj til min kalender
-Do you want to add this entry to your calendar?: Vil du tilføje denne aftale til din kalender?
-This will add the entry to your calendar.: Dette vil tilføje aftalen til din kalender.
-Email all participants: Send email til alle deltagere
-Show activity log: Vis Aktivitetslog
-Hide activity log: Skjul Aktivitetslog
-Export this entry to: Eksporter denne visning til
-
-
-###############################################
-# Page: reject_entry.php
-#
-An appointment has been rejected by: En aftale er blevet afslået af
-The description is: Beskrivelsen er
-Title: Web-kalenderen
-
-
-###############################################
-# Page: search.php
-#
-Search: Søg
-Keywords: Søgeord
-Advanced Search: Avanceret søgning
-
-
-###############################################
-# Page: search_handler.php
-#
-You must enter one or more search keywords: Du skal indtaste et eller flere søgeord
-Search Results: Søgeresultater
-match found: emne fundet
-matches found: emner fundet
-No matches found: Ingen emner fundet
-
-
-###############################################
-# Page: select_user.php
-#
-View Another User's Calendar: Se anden brugers kalender
-Go: Gå til
-
-
-###############################################
-# Page: users.php
-#
-Account: Konto
-Add New User: Tilføj ny bruger
-denotes administrative user: betyder administrativ bruger
-
-
-###############################################
-# Page: usersel.php
-#
-None: Alle
-Reset: Nulstil
-Remove: Fjern
-Ok: Ok
-Cancel: Annullér
-
-
-###############################################
-# Page: import.php
-#
-Import format: Import format
-Exclude private records: Undlad import af private aftaler
-Overwrite Prior Import: Overskriv tidligere import
-
-
-###############################################
-# Page: login.php
-#
-Invalid login: Ugyldig login
-You must enter a login and password: Du skal indtaste et brugernavn og kodeord
-Username: Brugernavn
-Password: Kodeord
-Save login via cookies so I don't have to login next time: Gem login-informationer i en cookie, så jeg ikke behøver indtaste dem næste gang
-Login: Log ind
-Access public calendar: Til offentlig kalender
-cookies-note: <b>OBS:</b> Dette program kræver at cookies er slået til i browseren
-
-
-###############################################
-# Page: views.php
-#
-Views: Visninger
-Add New View: Tilføj ny visning
-
-
-###############################################
-# Page: views_edit.php
-#
-Unnamed View: Unavngivet visning
-Add View: Tilføj visning
-Edit View: Rediger visning
-View Name: Navn på visning:
-View Type: Visningstype
-Week (Users horizontal): Uge (brugere opstilles horisontalt)
-Week (Users vertical): Uge (brugere opstilles vertikalt)
-Week (Timebar): Uge (tidslinie)
-Month (Timebar): Måned (tidslinie)
-Month (side by side): Måned (opstillet sidevis)
-Month (on same calendar): Måned (på samme kalender)
-preview: vis
-Selected: Valgt
-
-
-###############################################
-# Page: nonusers.php
-#
-NONUSER_PREFIX not set: NONUSER_PREFIX er ikke udfyldt i config.php.
-
-Add New NonUser Calendar: Tilføj ny ikke brugertilknyttet kalender
-
-
-###############################################
-# Page: nonusers_handler.php
-#
-Calendar ID: Kalender ID
-word characters only: må kun indeholde bogstaver og tal (a-zA-Z_0-9)
-
-
-###############################################
-# Page: help_pref.php
-#
-default-category-help: Angiver den kategori som nye aftaler får som standard.
-
-
-###############################################
-# Page: report.php
-#
-Untimed event: Ikke tidsbestemt aftale
-Private: Privat
-Approved: Accepteret
-Unknown: Ukendt
-to manage reports for the Public Access calendar: for at redigere rapporter i den offentlige kalender
-Add new report: Tilføj ny rapport
-Invalid report id: Ugyldig rapport ID
-Manage Reports: Rediger rapporter
-
-
-###############################################
-# Page: views_edit_handler.php
-#
-You must specify a view name: Du skal angive et navn for visningen
-
-
-###############################################
-# Page: view_l.php, veiw_m.php, view_d.php, view_t.php, view_v.php, view_w.php
-#
-No users for this view: Ingen brugere til denne visning
-
-
-###############################################
-# Page: week_details.php
-#
-New Entry: Ny aftale
-am: am
-pm: pm
-
-
-###############################################
-# Page: import_handler.php
-#
-Import Results: Import resultat
-Events successfully imported: Aftaler importeret
-Events from prior import marked as deleted: Aftaler fra tidligere import er markeret som slettede
-Conflicting events: Overlappende aftaler
-Errors: Fejl
-There was an error parsing the import file or no events were returned: Der skete en fejl under indlæsning af import-filen eller der kunne ikke findes nogen aftaler.
-The import file contained no data: Import-filen indeholder ingen data.
-The following conflicts with the suggested time: Følgende aftaler er i konflikt med det foreslåede tidspunkt
-Scheduling Conflict: Tidskonflikt
-conflicts with the following existing calendar entries: er i konflikt med eksisterende aftaler
-Event Imported: Aftaler importeret
-
-
-###############################################
-# Page: edit_entry.php
-#
-Edit Entry: Redigér aftale
-Add Entry: Tilføj aftale
-Details: Detaljer
-Scheduling: Tidsangivelse
-Repeat: Gentagelse
-category-help: Angiver aftalens kategori.
-Timed event: Tidsbestemt aftale
-Availability: Tlgængelighed
-external-participants-help: Angiver en liste over deltagere som ikke er kalender-brugere. Disse brugere skal listes én pr. linie og kan godt inkludere email-adresser. Hvis en email-adresse specificeres kan brugeren modtage notifikationer og påmindelser.
-External Participants: Eksterne deltagere
-Daily: Dagligt
-Weekly: Ugentligt
-Monthly: Månedligt
-by day: efter dag
-by day (from end): daglig
-Yearly: Årligt
-Use end date: Benyt slutdato
-Tuesday: Tirsdag
-Wednesday: Onsdag
-Thursday: Torsdag
-Friday: Fredag
-Saturday: Lørdag
-You are not authorized to edit this entry: Du har ikke ret til at slette denne aftale
-
-
-###############################################
-# Page: edit_report.php
-#
-Tomorrow: I morgen
-Today: Idag
-Yesterday: Igår
-Day before yesterday: Forrige dag
-Next week: Næste dag
-This week: Denne uge
-Last week: Sidste uge
-Week before last: Forrige uge
-Next week and week after: De næste 2 uger
-This week and next week: Denne uge + næste
-Last week and this week: Sidste + denne uge
-Last two weeks: Sidste 2 uger
-Next month: Næste måned
-This month: Denne måned
-Last month: Sidste måned
-Month before last: Forrige måned
-Next year: Næste år
-This year: Dette år
-Last year: Sidste år
-Year before last: Forrige år
-Unnamed Report: Unavngiven rapport
-Add Report: Tilføj rapport
-Edit Report: Rediger rapport
-Report name: Navn på rapport
-Current User: Nuværende bruger
-Include link in trailer: Inkluder link i sidefod
-Include standard header/trailer: Inkluder standard sidehoved/fod
-Date range: Dato område
-Include previous/next links: Medtag links til forrige/næste
-Include empty dates: Medtag tomme datoer
-Template variables: Skabelon variabler
-Page template: Side skabelon
-Day template: Dags skabelon
-Event template: Aftale skabelon
-Are you sure you want to delete this report?: Er du sikker på at du vil slette denne rapport?
-
-
-###############################################
-# Page: assistant_edit.php
-#
-Assistants: Assistenter
-Yours assistants: Dine assistenter
-
-
-###############################################
-# Page: adminhome.php
-#
-Delete Events: Slet aftaler
-Public Preferences: Indstillinger offentlig adgang
-Unapproved Public Events: Ikke-accepterede offentlige aftaler
-Administrative Tools: Administrator værktøjer
-
-
-###############################################
-# Page: purge.php
-#
-Preview: Vis
-Purging events for: Sletter aftaler for
-Finished: Færdig
-Check box to delete <b>ALL</b> events for a user: Afkryds for at slette <b>ALLE</b> aftaler for en bruger
-Delete all events before: Slet alle aftaler før
-Preview delete: Vis aftaler som slettes
-Are you sure you want to delete events for: Er du sikker på du vil slette aftaler for
-Records deleted from: Poster slettet fra
-
-
-###############################################
-# Page: set_entry_cat.php
-#
-You have not added any categories: Du har ikke tilføjet nogen kategorier
-Set Category: Vælg kategori
-
-
-###############################################
-# Page: help_import.php
-#
-Palm Desktop: Palm Desktop
-This form will allow you to import entries from the Palm Desktop Datebook.: Denne formular gør det muligt at importere aftaler fra Palm Desktop adressebog.
-It should be located in your Palm directory in <tt>datebook/datebook.dat</tt> in a subdirectory named by your username.: Den bør ligge i din Palm mappe i <tt>datebook/datebook.dat</tt> i en undermappe med dit brugernavn.
-The following entries will not be imported: Følgende aftaler importeres ikke
-Entries older than the current date: Aftaler ældre end dags dato
-Entries created in the Palm Desktop that have not been HotSync'd: Aftaler oprettet på Palm Desktoppen som ikke er blevet HotSync'd
-Anything imported from Palm will be overwritten during the next import (unless the event date has passed).: Alle data importeret fra Palm bliver overskrevet ved den næste import (hvis ikke datoen for aftalen er passeret).
-Therefore, updates should be made in the Palm Desktop.: Derfor bør opdateringer blive lavet på Palm Desktoppen
-vCal: vCal
-This form will import vCalendar (.vcs) 1.0 events: Denne formular importerer vCalandar (.vcs) 1.0 aftaler
-The following formats have been tested: Følgende formater er testet
-Palm Desktop 4: Palm Desktop 4
-Lotus Organizer 6: Lotus Organizer 6
-Microsoft Outlook 2002: Microsoft Outlook 2002
-iCalendar: iCalendar
-This form will import iCalendar (.ics) events: Denne formular importerer iCalendar (.ics) aftaler
-Enabling <b>Overwrite Prior Import</b> will cause events imported previously that used the same UID as an event from the new import file to be marked as deleted. This should allow an updated iCalendar file to be imported without creating duplicates.: Ved af anvende <b>Overskriv tidligere import</b> markeres aftaler med sammenfalende UID som slettet. Dette skulle sikre mod at der oprettes dubletter ved import af en opdateret iCalendar (.ics) fil
-
-
-###############################################
-# Page: edit_report_handler.php
-#
-Variable N not found: Variabel N ikke fundet
-
-
-###############################################
-# Page: edit_entry_handler.php
-#
-A new appointment has been made for you by: En ny aftale er blevet aftalt for dig af
-An appointment has been updated by: En aftale er blevet opdateret af
-The subject is: Emnet er
-Please look on: Se venligst på
-to accept or reject this appointment: for at acceptere eller afvise denne aftale
-to view this appointment: for at se denne aftale
-Your suggested time of: Din foreslåede tid for
-
-
-###############################################
-# Page: edit_user.php
-#
-Edit User: Redigér bruger
-Add User: Tilføj bruger
-First Name: Fornavn
-Last Name: Efternavn
-E-mail address: Email-adresse
-again: igen
-Disabled for demo: Slået fra i demo
-Are you sure you want to delete this user?: Er du sikker på du vil slette denne bruger?
-Change Password: Skift kodeord
-New Password: Nyt kodeord
-Set Password: Skift kodeord
-
-
-
-###############################################
-# Page: edit_template.php
-#
-Edit Custom Script/Stylesheet: Redigér brugertilpasset Script/Stylesheet
-Edit Custom Header: Redigér brugertilpasset sidehoved
-Edit Custom Trailer: Redigér brugertilpasset sidefod
-
-
-###############################################
-# Page: includes/trailer.php
-#
-Go to: Gå til
-My Calendar: Min kalender
-Back to My Calendar: Tilbage til min kalender
-Another User's Calendar: Anden brugers kalender
-Add New Entry: Tilføj ny aftale
-Logout: Log ud
-Manage calendar of: Administrér kalender for
-
-
-###############################################
-# Page: includes/user.php
-#
-
-no such user: bruger findes ikke
-Invalid user login: Ugyldig brugerlogin
-
-
-###############################################
-# Page: includes/site_extras.php
-#
-Send Reminder: Send påmindelse
-
-
-###############################################
-# Page: includes/config.php
-#
-English: Engelsk
-Basque: Bastisk
-Bulgarian: Bulgarsk
-Catalan: Katalansk
-Chinese (Traditonal/Big5): Kinesisk (Traditonal/Big5)
-Chinese (Simplified/GB2312): Kinesisk (Simplified/GB2312)
-Czech: Tjekkisk
-Danish: Dansk
-Dutch: Hollandsk
-Estonian: Estonsk
-Finnish: Finsk
-French: Fransk
-Galician: Galisisk
-German: Tysk
-Holo (Taiwanese): Holo (Taiwanesisk)
-Hungarian: Ugngarsk
-Icelandic: Islandsk
-Italian: Italiensk
-Japanese: Japansk
-Korean: Koreansk
-Norwegian: Norsk
-Polish: Polsk
-Portuguese: Portugisisk
-Portuguese/Brazil: Portugisisk/Brasiliansk
-Romanian: Rumænsk
-Russian: Russisk
-Spanish: Spansk
-Swedish: Svensk
-Turkish: Tykisk
-
-
-###############################################
-# Page: includes/functions.php
-#
-This event is confidential: Denne aftale er fortrolig
-exceeds limit of XXX events per day: overskrider grænsen på XXX aftaler pr. dag
-You have XXX unapproved events: Du har XXX ikke-accepterede aftaler
-January: Januar
-February: Februar
-March: Marts
-April: April
-May_: Maj
-June: Juni
-July: Juli
-August: August
-September: September
-October: Oktober
-November: November
-Jan: Jan
-Feb: Feb
-Mar: Mar
-Apr: Apr
-May: Maj
-Jun: Jun
-Jul: Jul
-Aug: Aug
-Sep: Sep
-Oct: Okt
-Nov: Nov
-Dec: Dec
-All Attendees: Alle deltagere
-Busy: Optaget
-Tentative: Afventende
-
-
-###############################################
-# Page: includes/js/admin.php
-#
-Server URL is required: Server URL er påkrævet
-Server URL must end with '/': Server URL skal slutte med '/'
-Invalid work hours: Ugyldig arbejdstid
-Invalid color for document background: Ugyldig baggrundsfarve
-Invalid color for document title: Ugyldig titelfarve
-Invalid color for table cell background: Ugyldig farve for tabelbaggrund
-Invalid color for table grid: Ugyldig farve for tabelrammen.
-Invalid color for table header background: Ugyldig farve for baggrunden for tabeloverskrifter.
-Invalid color for table text background: Ugyldig farve for baggrunden for tabelteksten.
-Invalid color for event popup background: Ugyldig farve for baggrunden for aftale-popup.
-Invalid color for event popup text: Ugyldig farve for aftale-popup tekst.
-Invalid color for table cell background for today: Ugyldig farve for dagens tabelbaggrund
-Color format should be '#RRGGBB': Farven skal skrives som '#RRGGBB'
-
-
-###############################################
-# Page: includes/js/edit_entry.php
-#
-You have not entered a Brief Description: Du har ikke indtastet en kort beskrivelse
-You have not entered a valid time of day: Du har ikke indtastet et gyldigt tidspunkt
-The time you have entered begins before your preferred work hours. Is this correct?: Det valgte tidspunkt er før end din foretrukne arbejdstid. Er dette korrekt?
-Please add a participant: Tilføj venligst en deltager:
-
-
-###############################################
-# Page: includes/js/edit_layer.php
-#
-Invalid color: Ugyldig farve
-
-
-###############################################
-# Page: includes/js/pref.php
-#
-Change the date and time of this entry?: Skal dato og tid ændres for denne post?
-
-
-###############################################
-# Page: tools/send_reminders.php
-#
-This is a reminder for the event detailed below.: Dette er en påmindelse for aftalen beskrevet herunder
-Reminder: Påmindelse
+# Use this as a starting point to translate this application into
+# another language. The format is "English text: translated text"
+# There cannot be a ":" in the English text.
+# Translated by: Allan Thraen (allan at 12go.dk)
+# Updated by: Jørgen Thomsen (jth at jth.net)
+# Last update: 12-Feb-2001
+# Last update: Nov.25-2003 by Jens Th (photo at jens-th.com)
+# Last updated: 15-Feb-2004 (Nicolaj Rasmussen, drlandau <at> msn <dot> com)
+# Last updated: 21-Mar-2005 (Morten Nielsen, mni <at> it <dot> dk)
+# Last updated: 18-Jun-2005 (Leo Todaro, leotodaro <at> hotmail.com)
+# Translation last updated on 21-March-2005
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+
+
+###############################################
+# Specify a charset (will be sent within meta tag for each page)
+#
+charset: iso-8859-1
+
+
+
+###############################################
+# Page: week.php
+#
+Week: Uge
+Previous: Forrige
+Next: Næste
+Admin mode: Administrator-tilstand
+Assistant mode: Assistent-tilstand
+cont.: cont.
+Generate printer-friendly version: Vis printervenlig side
+Printer Friendly: Printervenlig
+
+
+###############################################
+# Page: admin.php
+#
+System Settings: System indstillinger
+Help: Hjælp
+You are not authorized: Du har ikke tilladelse til dette
+Admin: Admin
+Note: Note
+Your user preferences: Dine bruger-indstillinger
+may be affecting the appearance of this page.: kan påvirke udseendet af denne side
+Click here: Tryk her
+to not use your user preferences when viewing this page: for ikke at benytte dine bruger-indstillinger når denne side vises
+are being ignored while viewing this page.: ignoreres når denne side vises.
+to load your user preferences when viewing this page: for at hente dine bruger-indstillinger når denne side vises
+Save: Gem
+Settings: Indstillinger
+Public Access: Offentlig adgang
+Groups: Grupper
+NonUser Calendars: Ikke brugertilknyttede kalendere
+Other: Diverse
+Email: Email
+colors-help: Alle farver skal indtastes som #RRGGBB hvor RR er hexkoden for rød, GG er hexkoden for grøn og BB er hexkoden for den blå farve.
+Colors: Farver
+app-name-help: Angiver navnet på kalenderen. Dette fremgår i browserens titellinie for samtlige sider samt på login-siden.
+Application Name: Kalender navn
+server-url-help: Angiver basis URL'en for applikationen. Denne bliver inkluderet når der udsendes email påmindelser og notifikationer.
+Server URL: Server URL
+language-help: Angiver hvilket sprog, der skal bruges.
+Language: Sprog
+Your browser default language is: Din browsers standardsprog er
+fonts-help: Angiver en liste over skrifttyper systemet kan benytte (f.eks. "Arial, Helvetica")
+Fonts: Skrifttyper
+custom-script-help: Tilføjelse af brugertilpasset Javascript eller stylesheet tekst som indsættes HTML "head" sektionen på hver side
+Custom script/stylesheet: Bruger tilpasset script/stylesheet
+Yes: Ja
+No: Nej
+Edit: Redigér
+custom-header-help: Tilføjelse af brugertilpasset HTML kode som indsættes i toppen af hver side
+Custom header: Brugertilpasset sidehoved
+custom-trailer-help: Tilføjelse af brugertilpasset HTML kode som indsættes i bunden af hver side
+Custom trailer: Brugertilpasset sidefod
+preferred-view-help: Angiver den foretrukne opstilling (dag, uge, måned eller år).
+Preferred view: Foretrukken opstilling
+Day: Dag
+Month: Måned
+Year: År
+display-weekends-help: Inkluderer weekender i uge-visning
+Display weekends in week view: Vis weekender i uge-visning
+yearly-shows-events-help: På års-visning, brug fed skrift for dage med aftaler
+Display days with events in bold in month and year views: Brug fed skrift for dage med aftaler på måneds- og årsvisning
+display-desc-print-day-help: Vis aftalebeskivelser i printervenlig version af dags-visning
+Display description in printer day view: Vis beskrivelse i printervenlig dags-visning
+date-format-help: Angiver det foretrukne dato format.
+Date format: Dato format
+December: December
+time-format-help: Skal tiden vises pr 12 eller 24-timer.
+Time format: Tidsformat
+12 hour: 12 timer
+24 hour: 24 timer
+time-interval-help: Angiver hvor store tidsintervaller der benyttes i uge- og dags-visning.
+Time interval: Tidsinterval
+hour: timer
+minutes: minutter
+auto-refresh-help: Når slået til bliver dags-, uge-, måneds-visning, samt listen over ikke-accepterede sider automatisk opdateret periodisk.
+Auto-refresh calendars: Auto-opdater kalender
+auto-refresh-time-help: Angiver tiden imellem hver opdatering, hvis auto-opdatering er slået til.
+Auto-refresh time: Auto-opdater tid
+require-approvals-help: Når dette er slået til skal brugere acceptere en aftale før den vises i deres kalender (pånær hvis "Vis ikke-accepterede aftaler" er slået til. Bemærk at hvis denne indstilling slåes fra, vil det samtidig slå acceptering i den offentlige kalender fra (hvis dette er slået til).
+Require event approvals: Kræv acceptering af aftaler
+display-unapproved-help: Specificér her hvorvidt din kalender skal vise ikke-accepterede aftaler.
+Display unapproved: Vis ikke-accepterede aftaler
+display-week-number-help: Angiver hvorvidt ugenumre skal vises i uge-visninger.
+Display week number: Vis ugenummer
+display-week-starts-on: Hvorvidt ugen starter mandag eller søndag.
+Week starts on: Ugen starter på
+Sunday: Søndag
+Monday: Mandag
+work-hours-help: Specificer den daglige arbejdstid.
+Work hours: Arbejdstid
+From: Fra
+to: til
+disable-priority-field-help: Hvis der vælges "ja" fjernes feltet "Prioritet" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
+Disable Priority field: Fjern Prioritets-felt
+disable-access-field-help: Hvis der vælges "ja" fjernes feltet "Adgang" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
+Disable Access field: Fjern Adgangs-felt
+disable-participants-field-help: Hvis der vælges "ja" fjernes feltet "Deltagere" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
+Disable Participants field: Fjern Deltagere-felt
+disable-repeating-field-help: Hvis der vælges "ja" fjernes feltet "Gentagelse" fra sider med aftale-informationer. Dette giver en mere simpel brugerflade for begyndere.
+Disable Repeating field: Fjern Gentagelses-felt
+popup-includes-siteextras-help: Hvis slået til, vis brugertilpasset aftale opsætning fra site_extras.php i aftale popup-besked.
+Display Site Extras in popup: Vis Site Extras i popup-besked
+allow-html-description-help: Vis slået til, kan brugere indtaste HTML i aftalebeskrivelsen. Hvis ikke slået til, vil HTML-kode vises som alm. tekst. Advarsel: Hvis dette slåes til kan bruger linke til billeder på andre websider
+Allow HTML in Description: Tillad HTML i beskrivelsen
+allow-view-other-help: Angiver om en bruger må se i andre brugeres kalendere
+Allow viewing other user's calendars: Tillad visning af andres kalendere
+allow-view-add-help: A '+' ikon bliver inkluderet i visninger. Dette gøre brugere i stand til hurtigt at tilføje nye aftaler til andre brugeres kalendere.
+Include add event link in views: Inkluder "Tilføj aftale" i visninger
+remember-last-login-help: Når slået til bliver brugerens sidste login automatisk udfyldt på login-siden (ikke password) og brugerens indstillinger bliver automatisk hentet (inkl. deres foretrukne farver og sprogvalg).
+Remember last login: Husk sidste login
+conflict-check-help: Kontroller aftale-konflikter (2 aftaler der er oprettet til samme tid for den samme person). Hvis denne sættes til "ja" kan du stadig oprettet flere aftaler på samme tid hvis du godkender advarslen. HVis denne sættes til "nej" bliver der ikke kontrolleret efter aftale konflikter. Du bør sætte denne til "ja" så der bliver tjekket efter konflikter.
+Check for event conflicts: Check for aftale-konflikter
+conflict-months-help: Hvis konflikt-kontrol er slået til ("Kontroller aftale konflikter"), angiver dette hvor mange måneder frem der skal tjekkes for konflikter. Hvis det tager lang tid at tilføje nye aftaler, så sæt denne værdi ned.
+Conflict checking months: Kontroller månedskonflikter
+conflict-check-override-help: Gør det muligt for brugere at ignorere konflikter og oprette flere aftaler på samme tidspunkt.
+Allow users to override conflicts: Tillad brugere at ignorere aftale-konflikter
+limit-appts-help: Gør det muligt for en administrator at sætte begrænsning på antallet af aftaler en bruger må have pr. dag.
+Limit number of timed events per day: Begræns antal aftaler pr. dag
+limit-appts-number-help: Angiver det maksimale antal aftaler en bruger kan have pr. dag.
+Maximum timed events per day: Maximum antal aftaler pr. dag
+timed-evt-len-help: Angiver hvordan længden af en tidsbetemt aftale skal indtastes.
+Specify timed event length by: Angiv længde af tidsbestemt aftale ved
+Duration: Varighed
+End Time: Sluttid
+Plugins: Plugins
+plugins-enabled-help: Gør det muligt at benytte plugins.
+Enable Plugins: Aktiver plugins
+plugins-sort-key-help: Angiver en sorteringsnøgle for den valgte plugin. Dette gør det muligt at vise plugins i en speciel rækkefølge.
+Plugin: Plugin
+allow-public-access-help: Når slået til kan kalenderen bruges som en offentlig kalender der ikke kræver login.
+Allow public access: Tillad offentlig adgang
+public-access-default-visible: Aftaler i den offentlige kalender vil automatisk optræde i alle brugeres kalendere
+Public access visible by default: Offentlig adgang vises altid
+public-access-default-selected: Når nye aftaler oprettes er brugen "Offentlig adgang" altid valgt som deltager.
+Public access is default participant: Offentlig adgang deltager altid
+public-access-view-others-help: Når kalenderen tilgåes med offentlig adgang, angiver dette om brugeren må se andre brugeres kalendere.
+Public access can view other users: Offentlig adgang kan se andre brugere
+public-access-can-add-help: Når slået til kan brugere, der tilgår kalenderen med offentlig adgang oprette nye aftaler, men disse vil ikke optræde i kalenderen før en administrator accepterer den nye aftale.
+Public access can add events: Offentlig adgang kan tilføje aftaler
+public-access-add-requires-approval-help: Angiver om aftaler tilføjet via en konto med offentlig adgang kræver godkendelse før den bliver vist.
+Public access new events require approval: Nye offentlige aftaler kræver accept
+public-access-sees-participants-help: Hvis slået til, kan brugere som tilgår kalenderen via offentlig adgang se aftale deltagere i detalje-visning
+Public access can view participants: Offentlig adgang må se andre aftale-deltagere
+groups-enabled-help: Slår understøttelse af grupper til, hvilket gør brugere i stand til at vælge brugere via gruppemedlemsskab.
+Groups enabled: Grupper slået til
+user-sees-his-group-help: Hvis slået til kan brugeren ikke se kalender-brugere der ikke er medlem af mindst én af sine egne grupper.
+User sees only his groups: Bruger kan kun se sine egne grupper.
+nonuser-enabled-help: Hvis slået til, har administrator-brugere mulighed for at tilføje ikke brugertilknyttede kalendere.
+Nonuser enabled: Ikke brugertilknyttede kalendere slået til
+nonuser-list-help: Hvor skal ikke brugertilknyttede kalendere vises i deltagerlisten
+Nonuser list: Vis i deltagerliste i
+Top: Top
+Bottom: Bund
+reports-enabled-help: Hvis slået til kan brugere vælge "Rapporter" i bunden af hver side og har mulighed for at oprettet brugerdefinerede rapporter. Derudover kan administrator-brugere oprettet globale rapporter som vises i bunden af alle sider på alle brugere.
+Reports enabled: Rapporter slået til
+subscriptions-enabled-help: Angiver om eksterne brugere kan abonnere på en WebCalendar-bruger's kalender. Dette sætter dem i stand til at se brugerens aftaler i en Ical-applikation (fx. Apple's iCal eller Mozilla Calendar).
+Allow remote subscriptions: Tillad eksterne abonnementer
+categories-enabled-help: Slår understøttelse af aftale-kategorier til.
+Categories enabled: Kategorier slået til
+allow-external-users-help: Angiver om en ekstern bruger kan tilføjes til en aftale. Dette gør det muligt for brugere (uden for systemet) at blive angivet som deltagere til en aftale.
+Allow external users: Tillad eksterne brugere
+external-can-receive-notification-help: Når eksterne brugere er slået til samtidig med email udsendelse, så kan eksterne brugere modtage notifikationer når en aftale er tilføjet, opdateret eler slettet (hvis der er angivet en emailadresse for den eksterne bruger).
+External users can receive email notifications: Eksterne brugere kan modtage email-notifikationer
+external-can-receive-reminder-help: Når eksterne brugere er slået til samtidig med emailpåmindelser, så kan eksterne brugere modtage påmindelser når en aftale er tilføjet, opdateret eler slettet (hvis der er angivet en emailadresse for den eksterne bruger)
+External users can receive email reminders: Eksterne brugere kan modtage emailpåmindelser
+email-enabled-help: Slår email-afsendelse for notifikationer og påmindelser til/fra. Sæt til "nej" hvis din server ikke er konfigureret til at kunne sende email.
+Email enabled: Email aktiveret
+email-default-sender: Angiver email-adressen der skal benyttes når der afsendes påmindelser.
+Default sender address: Standard afsender-adresse
+Default user settings: Standard brugerindstillinger
+email-event-reminders-help: Angiver om der skal sendes påmindelser
+Event reminders: Aftale-påmindelser
+email-event-added: Angiver om der skal sendes en email notofikation når en aftale tilføjes din kalender.
+Events added to my calendar: Aftaler tilføjet til min kalender
+email-event-updated: Angiver om der skal sendes en email notifikation når en aftale opdateres i din kalender.
+Events updated on my calendar: Aftaler opdateret i min kalender
+email-event-deleted: Angiver om der skal sendes en email notifikation når en aftale fjernes fra din kalender.
+Events removed from my calendar: Aftaler fjernet fra min kalender
+email-event-rejected: Angiver om der skal sendes en email notifikation når en deltager afviser en aftale der findes i din kalender.
+Event rejected by participant: Aftale afvist af deltager
+Allow user to customize colors: Tillad bruger at ændre farver
+Enable gradient images for background colors: Slå farvegraduering til på baggrundsfarver
+Not available: Ikke tilgængelig
+Document background: Dokumentbaggrund
+Select: Vælg
+Document title: Dokumenttitel
+Document text: Dokumenttekst
+Table grid color: Farve for tabelrammer
+Table header background: Baggrund for tabeloverskrift
+Table header text: Tabeloverskrift
+Table cell background: Baggrund for tabelcelle
+Table cell background for current day: Baggrund for tabelcelle (idag)
+Table cell background for weekends: Baggrund for tabelcelle (weekender)
+Event popup background: Baggrund for aftale-popup
+Event popup text: Tekst i aftale-popup
+
+
+###############################################
+# Page: activity_log.php
+#
+Activity Log: Aktivitetslog
+User: Bruger
+Calendar: Kalender
+Date: Dato
+Time: Tidspunkt
+Event: Aftale
+Action: Handling
+Event created: Aftale oprettet
+Event approved: Aftale accepteret
+Event rejected: Aftale afvist
+Event updated: Aftale opdateret
+Event deleted: Aftale slettet
+Notification sent: Notifikation afsendt
+Reminder sent: Påmindelse afsendt
+Database error: Database fejl
+Events: Aftaler
+
+###############################################
+# Page: add_entry.php
+#
+Invalid entry id: Ugyldigt aftale ID
+This is a private event and may not be added to your calendar.: Dette er en privat aftale, som ikke må tilføjes til din kalender.
+Error adding event: Fejl ved tilføjelse af aftale
+
+
+###############################################
+# Page: admin_handler.php
+#
+Error: Fejl
+The following error occurred: Følgende fejl opstod
+
+
+###############################################
+# Page: approve_entry.php
+#
+Error approving event: Fejl ved godkendelse af aftale
+
+
+###############################################
+# Page: category.php
+#
+Categories: Kategorier
+Add: Tilføj
+Category Name: Navn på kategori
+Global: Global
+Delete: Slet
+Are you sure you want to delete this entry?: Er du sikker på at du vil slette denne aftale?
+Add New Category: Tilføj ny kategori
+
+
+###############################################
+# Page: del_entry.php
+#
+Hello: Hej
+An appointment has been canceled for you by: En aftale er blevet aflyst for dig af
+The subject was: Emnet var
+Notification: Påmindelse
+
+
+
+
+###############################################
+# Page: edit_layer.php
+#
+Edit Layer: Rediger lag
+Add Layer: Tilføj lag
+Source: Kilde
+Color: Farve
+Duplicates: Gentagelser
+Show layer events that are the same as your own: Vis lag-aftaler, der er de samme som dine egne
+Delete layer: Slet lag
+Are you sure you want to delete this layer?: Er du sikker på, at du vil slette dette lag?
+
+
+###############################################
+# Page: edit_layer_handler.php
+#
+You cannot create a layer for yourself: Du kan ikke oprettet et lag for dig selv
+You can only create one layer for each user: Du kan kun oprettet ét lag pr. bruger
+
+
+
+
+###############################################
+# Page: edit_user_handler.php
+#
+Deleting users not supported: Sletning af brugere er ikke understøttet
+The passwords were not identical: Kodeordene er ikke identiske
+You have not entered a password: Du har ikke indtastet et kodeord
+Changes successfully saved: Ændringer gemt
+
+
+###############################################
+# Page: subscription.php
+#
+Publishing Disabled (Admin): Udgivelse slået fra (Admin)
+Publishing Disabled (User): Udgivelse slået fra (User)
+Unnamed Event: Unavngiven aftale
+
+
+###############################################
+# Page: export.php
+#
+Export format: Eksport format
+Palm Pilot: Palm Pilot
+Include all layers: Inkludér alle lag
+Export all dates: Eksporter alle dage
+Start date: Startdato
+End date: Slutdato
+Modified since: Ændret siden
+Export: Eksporter
+
+
+###############################################
+# Page: export_handler.php
+#
+# export format not defined or incorrect: Eksport format ikke valgt eller fejl i formatet
+
+
+###############################################
+# Page: group_edit.php
+#
+Unnamed Group: Unavngiven gruppe
+Add Group: Tilføj gruppe
+Edit Group: Rediger gruppe
+Group name: Gruppenavn
+Updated: Opdateret
+Created by: Lavet af
+Users: Brugere
+
+
+###############################################
+# Page: group_edit_handler.php
+#
+You must specify a group name: Du skal angive navnet på en gruppe
+
+
+###############################################
+# Page: groups.php
+#
+# Add New Group: Tilføj ny gruppe
+
+
+###############################################
+# Page: pref.php
+#
+Preferences: Indstillinger
+Save Preferences: Gem indstillinger
+to modify the preferences for the Public Access calendar: for at ændre indstillinger for den offentlige kalender.
+tz-help: Angiver hvor mange timer tiden skal justeres fra serverens tid til den lokale tid.
+Timezone Offset: Tidszone forskydning
+Add N hours to: Tilføj N timer til
+Subtract N hours from: Træk N timer fra
+same as: samme som
+server time: serverens tidsindstilling
+Default Category: Standard kategori
+All: Alle
+When I am the boss: Når jeg er ejer
+Email me event notification: Email mig aftale notifikationer
+I want to approve events: Jeg ønsker at acceptere aftaler
+Subscribe/Publish: Abonnér/Udgiv
+allow-remote-subscriptions-help: Angiver om eksterne brugere kan tilmelde sig din kalender. Dette giver dem mulighed for at se dine aftaler i en iCal-applikation (fx. Apple's iCal eller Mozilla Calendar)
+remote-subscriptions-url-help: Viser den URL som eksterne brugere skal benytte for at tilmelde sig din kalender.
+URL: URL
+Sun: Søn
+Mon: Man
+Tue: Tir
+Wed: Ons
+Thu: Tor
+Fri: Fre
+Sat: Lør
+
+
+###############################################
+# Page: help_bug.php
+#
+Report Bug: Rapportér fejl
+
+
+###############################################
+# Page: help_edit_entry.php
+#
+Adding/Editing Calendar Entries: Tilføj/Redigér aftale
+Brief Description: Kort beskrivelse
+brief-description-help: Her skal der stå en kort beskrivelse af aftalen - det bliver vist når man står over aftalen i oversigtskalenderen.
+Full Description: Komplet beskrivelse.
+full-description-help: Her kan der stå en komplet beskrivelse af aftalen.
+date-help: Angiver datoen for aftalen.
+time-help: Angiver tidspunktet for aftalen.<br /><i>Dette felt behøver ikke at være udfyldt.</i>
+duration-help: I dette felt kan du angive varigheden af aftalen <br /><i>Dette felt behøver ikke at være udfyldt.</i>
+end-time-help: Angiver sluttidspunktet for aftalen.
+Priority: Prioritet
+priority-help: Angiv aftalens prioritet.
+Access: Adgang
+access-help: Angiv hvorvidt aftalen skal kunne ses af alle - eller om den er fortrolig.
+Participants: Deltagere
+participants-help: Vis deltagerne i denne aftale.
+Repeat Type: Gentag type
+repeat-type-help: Hvor ofte skal aftalen gentages.
+Repeat End Date: Gentag slutdato
+repeat-end-date-help: Specificer slutdatoen for gentagelser af denne aftale.
+Repeat Day: Gentag dato
+repeat-day-help: Hvilke ugedage skal aftalen gentages på.
+Frequency: Hyppighed
+repeat-frequency-help: Hvor ofte skal aftalen gentages ? Tallet 1 viser at det skal ske hver gang, 2 så er det hver anden gang...
+
+
+###############################################
+# Page: help_index.php
+#
+Help Index: Hjælpeindex
+Layers: Lag
+Import: Importér
+
+
+###############################################
+# Page: help_layers.php
+#
+Layers are useful for displaying other users' events in your own calendar. You can specifiy the user and the color the events will be displayed in.: Lag er nyttige til at vise andre brugeres aftaler i din egen kalender. Du kan angive brugeren samt den farve du ønsker aftalerne vist i.
+Add/Edit/Delete: Tilføj/Rediger/Slet
+Clicking the Edit Layers link in the admin section at the bottom of the page will allow you to add/edit/delete layers.: Hvis du vælger "Rediger lag" i Admin-delen i bunden af siden har du mulighed for at slå lag til/fra samt redigere dem.
+Specifies the user that you would like to see displayed in your calendar.: Angiver den bruger du ønsker at vise i din egen kalender.
+The text color of the new layer that will be displayed in your calendar.: Tekstfarven på den nye lag som vises i din egen kalender.
+If checked, events that are duplicates of your events will be shown.: Hvis valgt vises aftaler der er kopier af dine egne.
+Disabling: Slå fra
+Press the Disable Layers link in the admin section at the bottom of the page to turn off layers.: Vælg "Slå lag fra" i Admin-delen i bunden af siden for at slå lag fra.
+Enabling: Slå til
+Press the Enable Layers link in the admin section at the bottom of the page to turn on layers.: Vælg "Slå lag til" i Admin-delen i bunden af siden for at slå lag til.
+
+
+###############################################
+# Page: help_admin.php
+#
+Display days with events in bold in year view: Brug fed skrift for dage med aftaler på års-visning
+Nonuser: Ikke brugertilknyttede kalendere
+Reports: Rapporter
+
+
+###############################################
+# Page: layers.php
+#
+Layers are currently: Lag er aktuelt
+Enabled: Slået til
+Disable Layers: Slå lag fra
+Disabled: Slået fra
+Enable Layers: Slå lag til
+to modify the layers settings for the: for at redigere lag indstillingerne for
+calendar: kalender
+Add layer: Tilføj lag
+Layer: Lag
+Edit layer: Rediger lag
+
+
+###############################################
+# Page: list_unapproved.php
+#
+View this entry: Se denne aftale
+Approve/Confirm: Godkend/bekræft
+Approve this entry?: Godkend denne aftale?
+Reject: Afvis
+Reject this entry?: Afvis denne aftale?
+No unapproved events for: Ingen ikke-accepterede aftaler for
+Unapproved Events: Ikke-accepterede aftaler
+
+
+###############################################
+# Page: view_entry.php
+#
+Low: Lav
+Medium: Medium
+High: Høj
+every: alle
+2nd: anden
+3rd: tredje
+4th: fjerde
+5th: femte
+1st: første
+last: sidste
+by date: efter dato
+Confidential: Fortrolig
+Description: Beskrivelse
+Status: Status
+Waiting for approval: Afventer acceptering
+Deleted: Slettet
+Rejected: Afvist
+All day event: Aftale for hele dagen
+Public: Offentlig
+Category: Kategori
+days: dage
+day: dag
+hours: timer
+minute: minutter
+before event: før aftale
+External User: Eksterne brugere
+Approve/Confirm entry: Godkend/bekræft aftale
+Reject entry: Afvis aftale
+Set category: Vælg kategori
+Edit repeating entry for all dates: Rediger gentagne aftaler for alle datoer
+Edit entry for this date: Rediger aftale for denne dag
+Delete repeating event for all dates: Slet gentagne aftaler for alle datoer
+This will delete this entry for all users.: Dette vil slette denne aftale for alle brugere.
+Delete entry only for this date: Slet kun aftalen for denne dag
+Edit entry: Redigér aftale
+Delete entry: Slet aftale
+Copy entry: Kopiér aftale
+This will delete the entry from your calendar.: Dette vil slette aftalen fra din kalender.
+Add to My Calendar: Føj til min kalender
+Do you want to add this entry to your calendar?: Vil du tilføje denne aftale til din kalender?
+This will add the entry to your calendar.: Dette vil tilføje aftalen til din kalender.
+Email all participants: Send email til alle deltagere
+Show activity log: Vis Aktivitetslog
+Hide activity log: Skjul Aktivitetslog
+Export this entry to: Eksporter denne visning til
+
+
+###############################################
+# Page: reject_entry.php
+#
+An appointment has been rejected by: En aftale er blevet afslået af
+The description is: Beskrivelsen er
+Title: Web-kalenderen
+
+
+###############################################
+# Page: search.php
+#
+Search: Søg
+Keywords: Søgeord
+Advanced Search: Avanceret søgning
+
+
+###############################################
+# Page: search_handler.php
+#
+You must enter one or more search keywords: Du skal indtaste et eller flere søgeord
+Search Results: Søgeresultater
+match found: emne fundet
+matches found: emner fundet
+No matches found: Ingen emner fundet
+
+
+###############################################
+# Page: select_user.php
+#
+View Another User's Calendar: Se anden brugers kalender
+Go: Gå til
+
+
+###############################################
+# Page: users.php
+#
+Account: Konto
+Add New User: Tilføj ny bruger
+denotes administrative user: betyder administrativ bruger
+
+
+###############################################
+# Page: usersel.php
+#
+None: Alle
+Reset: Nulstil
+Remove: Fjern
+Ok: Ok
+Cancel: Annullér
+
+
+###############################################
+# Page: import.php
+#
+Import format: Import format
+Exclude private records: Undlad import af private aftaler
+Overwrite Prior Import: Overskriv tidligere import
+
+
+###############################################
+# Page: login.php
+#
+Invalid login: Ugyldig login
+You must enter a login and password: Du skal indtaste et brugernavn og kodeord
+Username: Brugernavn
+Password: Kodeord
+Save login via cookies so I don't have to login next time: Gem login-informationer i en cookie, så jeg ikke behøver indtaste dem næste gang
+Login: Log ind
+Access public calendar: Til offentlig kalender
+cookies-note: <b>OBS:</b> Dette program kræver at cookies er slået til i browseren
+
+
+###############################################
+# Page: views.php
+#
+Views: Visninger
+Add New View: Tilføj ny visning
+
+
+###############################################
+# Page: views_edit.php
+#
+Unnamed View: Unavngivet visning
+Add View: Tilføj visning
+Edit View: Rediger visning
+View Name: Navn på visning:
+View Type: Visningstype
+Week (Users horizontal): Uge (brugere opstilles horisontalt)
+Week (Users vertical): Uge (brugere opstilles vertikalt)
+Week (Timebar): Uge (tidslinie)
+Month (Timebar): Måned (tidslinie)
+Month (side by side): Måned (opstillet sidevis)
+Month (on same calendar): Måned (på samme kalender)
+preview: vis
+Selected: Valgt
+
+
+###############################################
+# Page: nonusers.php
+#
+NONUSER_PREFIX not set: NONUSER_PREFIX er ikke udfyldt i config.php.
+
+Add New NonUser Calendar: Tilføj ny ikke brugertilknyttet kalender
+
+
+###############################################
+# Page: nonusers_handler.php
+#
+Calendar ID: Kalender ID
+word characters only: må kun indeholde bogstaver og tal (a-zA-Z_0-9)
+
+
+###############################################
+# Page: help_pref.php
+#
+default-category-help: Angiver den kategori som nye aftaler får som standard.
+
+
+###############################################
+# Page: report.php
+#
+Untimed event: Ikke tidsbestemt aftale
+Private: Privat
+Approved: Accepteret
+Unknown: Ukendt
+to manage reports for the Public Access calendar: for at redigere rapporter i den offentlige kalender
+Add new report: Tilføj ny rapport
+Invalid report id: Ugyldig rapport ID
+Manage Reports: Rediger rapporter
+
+
+###############################################
+# Page: views_edit_handler.php
+#
+You must specify a view name: Du skal angive et navn for visningen
+
+
+###############################################
+# Page: view_l.php, veiw_m.php, view_d.php, view_t.php, view_v.php, view_w.php
+#
+No users for this view: Ingen brugere til denne visning
+
+
+###############################################
+# Page: week_details.php
+#
+New Entry: Ny aftale
+am: am
+pm: pm
+
+
+###############################################
+# Page: import_handler.php
+#
+Import Results: Import resultat
+Events successfully imported: Aftaler importeret
+Events from prior import marked as deleted: Aftaler fra tidligere import er markeret som slettede
+Conflicting events: Overlappende aftaler
+Errors: Fejl
+There was an error parsing the import file or no events were returned: Der skete en fejl under indlæsning af import-filen eller der kunne ikke findes nogen aftaler.
+The import file contained no data: Import-filen indeholder ingen data.
+The following conflicts with the suggested time: Følgende aftaler er i konflikt med det foreslåede tidspunkt
+Scheduling Conflict: Tidskonflikt
+conflicts with the following existing calendar entries: er i konflikt med eksisterende aftaler
+Event Imported: Aftaler importeret
+
+
+###############################################
+# Page: edit_entry.php
+#
+Edit Entry: Redigér aftale
+Add Entry: Tilføj aftale
+Details: Detaljer
+Scheduling: Tidsangivelse
+Repeat: Gentagelse
+category-help: Angiver aftalens kategori.
+Timed event: Tidsbestemt aftale
+Availability: Tlgængelighed
+external-participants-help: Angiver en liste over deltagere som ikke er kalender-brugere. Disse brugere skal listes én pr. linie og kan godt inkludere email-adresser. Hvis en email-adresse specificeres kan brugeren modtage notifikationer og påmindelser.
+External Participants: Eksterne deltagere
+Daily: Dagligt
+Weekly: Ugentligt
+Monthly: Månedligt
+by day: efter dag
+by day (from end): daglig
+Yearly: Årligt
+Use end date: Benyt slutdato
+Tuesday: Tirsdag
+Wednesday: Onsdag
+Thursday: Torsdag
+Friday: Fredag
+Saturday: Lørdag
+You are not authorized to edit this entry: Du har ikke ret til at slette denne aftale
+
+
+###############################################
+# Page: edit_report.php
+#
+Tomorrow: I morgen
+Today: Idag
+Yesterday: Igår
+Day before yesterday: Forrige dag
+Next week: Næste dag
+This week: Denne uge
+Last week: Sidste uge
+Week before last: Forrige uge
+Next week and week after: De næste 2 uger
+This week and next week: Denne uge + næste
+Last week and this week: Sidste + denne uge
+Last two weeks: Sidste 2 uger
+Next month: Næste måned
+This month: Denne måned
+Last month: Sidste måned
+Month before last: Forrige måned
+Next year: Næste år
+This year: Dette år
+Last year: Sidste år
+Year before last: Forrige år
+Unnamed Report: Unavngiven rapport
+Add Report: Tilføj rapport
+Edit Report: Rediger rapport
+Report name: Navn på rapport
+Current User: Nuværende bruger
+Include link in trailer: Inkluder link i sidefod
+Include standard header/trailer: Inkluder standard sidehoved/fod
+Date range: Dato område
+Include previous/next links: Medtag links til forrige/næste
+Include empty dates: Medtag tomme datoer
+Template variables: Skabelon variabler
+Page template: Side skabelon
+Day template: Dags skabelon
+Event template: Aftale skabelon
+Are you sure you want to delete this report?: Er du sikker på at du vil slette denne rapport?
+
+
+###############################################
+# Page: assistant_edit.php
+#
+Assistants: Assistenter
+Yours assistants: Dine assistenter
+
+
+###############################################
+# Page: adminhome.php
+#
+Delete Events: Slet aftaler
+Public Preferences: Indstillinger offentlig adgang
+Unapproved Public Events: Ikke-accepterede offentlige aftaler
+Administrative Tools: Administrator værktøjer
+
+
+###############################################
+# Page: purge.php
+#
+Preview: Vis
+Purging events for: Sletter aftaler for
+Finished: Færdig
+Check box to delete <b>ALL</b> events for a user: Afkryds for at slette <b>ALLE</b> aftaler for en bruger
+Delete all events before: Slet alle aftaler før
+Preview delete: Vis aftaler som slettes
+Are you sure you want to delete events for: Er du sikker på du vil slette aftaler for
+Records deleted from: Poster slettet fra
+
+
+###############################################
+# Page: set_entry_cat.php
+#
+You have not added any categories: Du har ikke tilføjet nogen kategorier
+Set Category: Vælg kategori
+
+
+###############################################
+# Page: help_import.php
+#
+Palm Desktop: Palm Desktop
+This form will allow you to import entries from the Palm Desktop Datebook.: Denne formular gør det muligt at importere aftaler fra Palm Desktop adressebog.
+It should be located in your Palm directory in <tt>datebook/datebook.dat</tt> in a subdirectory named by your username.: Den bør ligge i din Palm mappe i <tt>datebook/datebook.dat</tt> i en undermappe med dit brugernavn.
+The following entries will not be imported: Følgende aftaler importeres ikke
+Entries older than the current date: Aftaler ældre end dags dato
+Entries created in the Palm Desktop that have not been HotSync'd: Aftaler oprettet på Palm Desktoppen som ikke er blevet HotSync'd
+Anything imported from Palm will be overwritten during the next import (unless the event date has passed).: Alle data importeret fra Palm bliver overskrevet ved den næste import (hvis ikke datoen for aftalen er passeret).
+Therefore, updates should be made in the Palm Desktop.: Derfor bør opdateringer blive lavet på Palm Desktoppen
+vCal: vCal
+This form will import vCalendar (.vcs) 1.0 events: Denne formular importerer vCalandar (.vcs) 1.0 aftaler
+The following formats have been tested: Følgende formater er testet
+Palm Desktop 4: Palm Desktop 4
+Lotus Organizer 6: Lotus Organizer 6
+Microsoft Outlook 2002: Microsoft Outlook 2002
+iCalendar: iCalendar
+This form will import iCalendar (.ics) events: Denne formular importerer iCalendar (.ics) aftaler
+Enabling <b>Overwrite Prior Import</b> will cause events imported previously that used the same UID as an event from the new import file to be marked as deleted. This should allow an updated iCalendar file to be imported without creating duplicates.: Ved af anvende <b>Overskriv tidligere import</b> markeres aftaler med sammenfalende UID som slettet. Dette skulle sikre mod at der oprettes dubletter ved import af en opdateret iCalendar (.ics) fil
+
+
+###############################################
+# Page: edit_report_handler.php
+#
+Variable N not found: Variabel N ikke fundet
+
+
+###############################################
+# Page: edit_entry_handler.php
+#
+A new appointment has been made for you by: En ny aftale er blevet aftalt for dig af
+An appointment has been updated by: En aftale er blevet opdateret af
+The subject is: Emnet er
+Please look on: Se venligst på
+to accept or reject this appointment: for at acceptere eller afvise denne aftale
+to view this appointment: for at se denne aftale
+Your suggested time of: Din foreslåede tid for
+
+
+###############################################
+# Page: edit_user.php
+#
+Edit User: Redigér bruger
+Add User: Tilføj bruger
+First Name: Fornavn
+Last Name: Efternavn
+E-mail address: Email-adresse
+again: igen
+Disabled for demo: Slået fra i demo
+Are you sure you want to delete this user?: Er du sikker på du vil slette denne bruger?
+Change Password: Skift kodeord
+New Password: Nyt kodeord
+Set Password: Skift kodeord
+
+
+
+###############################################
+# Page: edit_template.php
+#
+Edit Custom Script/Stylesheet: Redigér brugertilpasset Script/Stylesheet
+Edit Custom Header: Redigér brugertilpasset sidehoved
+Edit Custom Trailer: Redigér brugertilpasset sidefod
+
+
+###############################################
+# Page: includes/trailer.php
+#
+Go to: Gå til
+My Calendar: Min kalender
+Back to My Calendar: Tilbage til min kalender
+Another User's Calendar: Anden brugers kalender
+Add New Entry: Tilføj ny aftale
+Logout: Log ud
+Manage calendar of: Administrér kalender for
+
+
+###############################################
+# Page: includes/user.php
+#
+
+no such user: bruger findes ikke
+Invalid user login: Ugyldig brugerlogin
+
+
+###############################################
+# Page: includes/site_extras.php
+#
+Send Reminder: Send påmindelse
+
+
+###############################################
+# Page: includes/config.php
+#
+English: Engelsk
+Basque: Bastisk
+Bulgarian: Bulgarsk
+Catalan: Katalansk
+Chinese (Traditonal/Big5): Kinesisk (Traditonal/Big5)
+Chinese (Simplified/GB2312): Kinesisk (Simplified/GB2312)
+Czech: Tjekkisk
+Danish: Dansk
+Dutch: Hollandsk
+Estonian: Estonsk
+Finnish: Finsk
+French: Fransk
+Galician: Galisisk
+German: Tysk
+Holo (Taiwanese): Holo (Taiwanesisk)
+Hungarian: Ugngarsk
+Icelandic: Islandsk
+Italian: Italiensk
+Japanese: Japansk
+Korean: Koreansk
+Norwegian: Norsk
+Polish: Polsk
+Portuguese: Portugisisk
+Portuguese/Brazil: Portugisisk/Brasiliansk
+Romanian: Rumænsk
+Russian: Russisk
+Spanish: Spansk
+Swedish: Svensk
+Turkish: Tykisk
+
+
+###############################################
+# Page: includes/functions.php
+#
+This event is confidential: Denne aftale er fortrolig
+exceeds limit of XXX events per day: overskrider grænsen på XXX aftaler pr. dag
+You have XXX unapproved events: Du har XXX ikke-accepterede aftaler
+January: Januar
+February: Februar
+March: Marts
+April: April
+May_: Maj
+June: Juni
+July: Juli
+August: August
+September: September
+October: Oktober
+November: November
+Jan: Jan
+Feb: Feb
+Mar: Mar
+Apr: Apr
+May: Maj
+Jun: Jun
+Jul: Jul
+Aug: Aug
+Sep: Sep
+Oct: Okt
+Nov: Nov
+Dec: Dec
+All Attendees: Alle deltagere
+Busy: Optaget
+Tentative: Afventende
+
+
+###############################################
+# Page: includes/js/admin.php
+#
+Server URL is required: Server URL er påkrævet
+Server URL must end with '/': Server URL skal slutte med '/'
+Invalid work hours: Ugyldig arbejdstid
+Invalid color for document background: Ugyldig baggrundsfarve
+Invalid color for document title: Ugyldig titelfarve
+Invalid color for table cell background: Ugyldig farve for tabelbaggrund
+Invalid color for table grid: Ugyldig farve for tabelrammen.
+Invalid color for table header background: Ugyldig farve for baggrunden for tabeloverskrifter.
+Invalid color for table text background: Ugyldig farve for baggrunden for tabelteksten.
+Invalid color for event popup background: Ugyldig farve for baggrunden for aftale-popup.
+Invalid color for event popup text: Ugyldig farve for aftale-popup tekst.
+Invalid color for table cell background for today: Ugyldig farve for dagens tabelbaggrund
+Color format should be '#RRGGBB': Farven skal skrives som '#RRGGBB'
+
+
+###############################################
+# Page: includes/js/edit_entry.php
+#
+You have not entered a Brief Description: Du har ikke indtastet en kort beskrivelse
+You have not entered a valid time of day: Du har ikke indtastet et gyldigt tidspunkt
+The time you have entered begins before your preferred work hours. Is this correct?: Det valgte tidspunkt er før end din foretrukne arbejdstid. Er dette korrekt?
+Please add a participant: Tilføj venligst en deltager:
+
+
+###############################################
+# Page: includes/js/edit_layer.php
+#
+Invalid color: Ugyldig farve
+
+
+###############################################
+# Page: includes/js/pref.php
+#
+Change the date and time of this entry?: Skal dato og tid ændres for denne post?
+
+
+###############################################
+# Page: tools/send_reminders.php
+#
+This is a reminder for the event detailed below.: Dette er en påmindelse for aftalen beskrevet herunder
+Reminder: Påmindelse
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese.txt
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese.txt 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese.txt 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,1133 +1,1133 @@
-# Translated by:
-# Antonio Costa - accmdq at mail.esoterica.pt
-# Last update: 16-Apr-2006
-# Translation last updated on 16-04-2006
-
-# No charset specified (not needed for iso-8859-1)
-# "charset" is used in a meta tag, do not translate "charset" here.
-# charset:
-
-
-
-###############################################
-# Page: week.php
-#
-Week: Semana
-Previous: Anterior
-Next: Seguinte
-Admin mode: Modo de administração
-Assistant mode: Modo de assistência
-cont.: cont.
-Generate printer-friendly version: Visualizar em formato de impressão
-Printer Friendly: Formato de impressão
-
-
-###############################################
-# Page: admin.php
-#
-System Settings: Parâmetros Gerais
-Help: Ajuda
-You are not authorized: Não está autorizado
-Admin: Admin
-Note: Nota
-Your user preferences: As suas preferências
-may be affecting the appearance of this page.: poderão afectar a aparência desta página.
-Click here: Clique aqui
-to not use your user preferences when viewing this page: para não usar as suas preferências durante a visualização desta página.
-are being ignored while viewing this page.: serão ignoradas durante a visualização desta página.
-to load your user preferences when viewing this page: para carregar as suas preferências durante a visualização desta página
-Save: Gravar
-Settings: Parâmetros
-Public Access: Acesso Público
-Groups: Grupos
-NonUser Calendars: Calendários sem utilizador
-Other: Outro
-Email: Correio electrónico
-colors-help: Todas as cores devem ser especificadas da forma "#RRGGBB" hexadecimal, em que "RR" é o valor hexadecimal para o encarnado, "GG" é o valor hexadecimal para o verde e "BB" é o valor hexadecimal para o azul.
-Colors: Cores
-app-name-help: Especifica o nome da aplicação que irá aparecer no título do navegador, para todas as páginas, incluindo a de entrada.
-Application Name: Nome da Aplicação
-server-url-help: Especifica o URL de base para esta aplicação. Ele será usado aquando do envio de lembretes e notificações.
-Server URL: URL do Servidor
-language-help: Especifica a língua a ser utilizada.
-Language: Linguagem
-Your browser default language is: A linguagem do navegador, por omissão, é
-fonts-help: Especifica a lista de tipos de letra a usar (por exemplo, "Arial, Helvetica", etc).
-Fonts: Tipos de letra
-#
-# << MISSING >>
-# custom-script-help:
-# English text: Allows entry of custom Javascript or stylesheet text that will be inserted into the HTML "head" section of every page.
-#
-Custom script/stylesheet: Script/folha de estilo personalizada
-Yes: Sim
-No: Não
-Edit: Editar
-#
-# << MISSING >>
-# custom-header-help:
-# English text: Allows a custom HTML snippet to be included in the top of every page.
-#
-Custom header: Cabeçalho personalizado
-#
-# << MISSING >>
-# custom-trailer-help:
-# English text: Allows a custom HTML snippet to be included at the end of every page.
-#
-Custom trailer: Rodapé personalizado
-preferred-view-help: Especifica a vista padrão (Dia, Semana, Mês, ou Ano).
-Preferred view: Visualização preferida
-Day: Dia
-Month: Mês
-Year: Ano
-display-weekends-help: Incluir fins-de-semana na vista de semana.
-Display weekends in week view: Mostrar fins-de-semana na vista de semana
-#
-# << MISSING >>
-# yearly-shows-events-help:
-# English text: On the yearly view, display days that contain events in a bold font.
-#
-Display days with events in bold in month and year views: Mostrar dias com eventos a negrito nas vistas mensais e anuais
-#
-# << MISSING >>
-# display-desc-print-day-help:
-# English text: Include event descriptions in printer-friendly version of day view.
-#
-Display description in printer day view: Mostrar descrição na vista de impressora (dia)
-date-format-help: Especifica o formato preferido da data.
-Date format: Formato da data
-December: Dezembro
-time-format-help: Especifica o formato da hora a utilizar: <I>12 horas:</I> Mostra no formato 3am, 8:30pm, etc. <I>24 horas:</I> Mostra no formato 300, 2030, etc.
-Time format: Formato da hora
-12 hour: 12 horas
-24 hour: 24 horas
-time-interval-help: Especifica a duração do bloco de tempo nas vistas de semana e dia.
-Time interval: Intervalo de tempo
-hour: hora
-minutes: minutos
-auto-refresh-help: Quando activo, as vistas de dia, semana, mês e lista de de páginas não-aprovadas serão automaticamente actualizadas periodicamente.
-Auto-refresh calendars: Actualizar automaticamente o calendário
-auto-refresh-time-help: Quando a actualização automática está activa, especifica o intervalo de tempo entre actualizações.
-Auto-refresh time: Tempo de actualização automática
-require-approvals-help: Quando activo, um utilizador deverá aprovar um evento antes de ser mostrado no seu calendário (excepto se <I>Mostra não-aprovados</I> estiver activo).
-Require event approvals: Requer aprovação de eventos
-display-unapproved-help: Especifica se os eventos não aprovados são mostrados no calendário
-Display unapproved: Mostrar não-aprovados
-display-week-number-help: Especifica se o número da semana (1-52) deve ser mostrado na vista semanal e mensal.
-Display week number: Mostrar número da semana
-display-week-starts-on: Especifica se a semana começa ao Domingo ou à Segunda-Feira.
-Week starts on: Semana começa em
-Sunday: Domingo
-Monday: Segunda
-work-hours-help: Especifica as horas apresentadas para marcação de eventos.
-Work hours: Horário de trabalho
-From: De
-to: para
-disable-priority-field-help: Seleccionar "Sim" irá remover o campo "Prioridade" das páginas de informação dos eventos, dando origem a uma interface mais simples para os utilizadores novatos.
-Disable Priority field: Desactivar campo "Prioridade"
-disable-access-field-help: Seleccionar "Sim" irá remover o campo "Acesso"
-Disable Access field: Desactivar campo "Acesso"
-disable-participants-field-help: Seleccionar "Sim" irá remover o campo "Participantes" das páginas de informação dos eventos, impedindo que os utilizadores adicionem outros utilizadores aos seus eventos. Se activar esta opção, recomenda-se que desactive a opção "Permitir ver calendário de outros utilizadores".
-Disable Participants field: Desactivar campo "Participantes"
-disable-repeating-field-help: Seleccionar "Sim" irá remover o campo "Repetições" aquando da criação de eventos, dando origem a uma interface mais simples para os utilizadores novatos.
-Disable Repeating field: Desactivar campo "Repetições"
-#
-# << MISSING >>
-# popup-includes-siteextras-help:
-# English text: If enabled, allow custom event fields setup in the site_extras.php file will be displayed in event popups.
-#
-Display Site Extras in popup: Mostrar Extras num popup
-#
-# << MISSING >>
-# allow-html-description-help:
-# English text: If enabled, users can enter HTML in the event description field. If not enabled, the HTML tags will be escaped so as to appear as plain text. Warning: Enabling this feature will allow users to reference images on other websites.
-#
-Allow HTML in Description: Permitir HTML na descrição
-allow-view-other-help: Especifica se um utilizador pode ou não ver o calendário de outro utilizador.
-Allow viewing other user's calendars: Permitir ver calendário de outro utilizador
-#
-# << MISSING >>
-# allow-view-add-help:
-# English text: A '+' icon will be included in views, allowing users to quickly add events to other users' calendars.
-#
-Include add event link in views: Incluir link para adicionar eventos nas vistas
-remember-last-login-help: Quando activo, o campo com o nome do utilizador será preenchido automaticamente, assim como as suas preferências.
-Remember last login: Usar preferências do último acesso
-conflict-check-help: Verificar conflito de eventos (dois eventos escalonados ao mesmo tempo pelo mesmo utilizador). Se escolher "Sim", será mostrado um aviso caso crie eventos que gerem conflito. Se escolher "Não", não será verificado o conflito de eventos. Recomenda-se a opção "Sim".
-Check for event conflicts: Verificar o conflito de eventos
-conflict-months-help: Quando está activa a verificação de conflitos, especifica quantos meses no futuro deverão ser tidos em conta nessa verificação. Se o sistema demora muito tempo a verificar conflitos, o valor deverá ser reduzido.
-Conflict checking months: Meses a usar na verificação de conflitos
-#
-# << MISSING >>
-# conflict-check-override-help:
-# English text: Allows users to override event conflicts and schedule two or more events for the same time.
-#
-Allow users to override conflicts: Permitir ultrapassar conflitos
-#
-# << MISSING >>
-# limit-appts-help:
-# English text: Allows the system administrator to set a system-wide limit on the number of appointments a single user can have on any single day.
-#
-Limit number of timed events per day: Limitar número de eventos temporizados por dia
-#
-# << MISSING >>
-# limit-appts-number-help:
-# English text: Specifies the maximum number of timed events a user can have in a single day.
-#
-Maximum timed events per day: Número máximo de eventos temporizados por dia
-#
-# << MISSING >>
-# timed-evt-len-help:
-# English text: Specifies input method for determining the length of a timed event.
-#
-Specify timed event length by: Especificar a duração dos eventos por
-Duration: Duração
-End Time: Tempo Final
-Plugins: Plugins
-#
-# << MISSING >>
-# plugins-enabled-help:
-# English text: Enable plugin applications.
-#
-Enable Plugins: Activar Plugins
-#
-# << MISSING >>
-# plugins-sort-key-help:
-# English text: Specifies a sort key for the plugin. This allows the plugins to appear in a specific order.
-#
-Plugin: Plugin
-allow-public-access-help: Quando activo, o calendário pode ser usado para acesso público (sem possibilidade de modificação).
-Allow public access: Permitir acesso público
-public-access-default-visible: Eventos do calendário público irão aparecer em todos os calendários
-Public access visible by default: Acesso público visível por omissão
-public-access-default-selected: Aquando de um novo evento, o público será definido como participante por omissão
-Public access is default participant: Acesso público participante por omissão
-public-access-view-others-help: Quando em modo de acesso público, especifica se o utilizador pode ou não ver o calendário de outro utilizador.
-Public access can view other users: Ver calendários de outros utilizadores em modo de acesso público
-public-access-can-add-help: Quando em modo de acesso público, os utilizadores poderão criar novos eventos, mas estes apenas serão visualizados depois da aprovação pelo administrador.
-Public access can add events: Adicionar eventos em modo público
-#
-# << MISSING >>
-# public-access-add-requires-approval-help:
-# English text: Specifies whether events added via the public access account require approval before being displayed.
-#
-Public access new events require approval: Novos eventos públicos exigem aprovação
-#
-# << MISSING >>
-# public-access-sees-participants-help:
-# English text: If enabled, users accessing the calendar from the public account will be able to see event participants if they view details of an event.
-#
-Public access can view participants: Acesso público pode ver participantes
-groups-enabled-help: Activa o suporte de grupos, permitindo que os utilizadores seleccionem outros utilizadores através de grupos.
-Groups enabled: Grupos activados
-user-sees-his-group-help: Quando activo, o utilizador não verá calendários de outros utilizadores que não pertençam pelo menos a um dos seus grupos.
-User sees only his groups: Utilizador apenas acede aos seus grupos
-#
-# << MISSING >>
-# nonuser-enabled-help:
-# English text: If enabled, admins will have the option to add nonuser calendars
-#
-Nonuser enabled: Informação anónima activada
-#
-# << MISSING >>
-# nonuser-list-help:
-# English text: Where to display the nonuser calendars in the participant list
-#
-Nonuser list: Mostrar lista de paticipantes em
-Top: Acima
-Bottom: Abaixo
-#
-# << MISSING >>
-# reports-enabled-help:
-# English text: If enabled, users will see a "Reports" section at the bottom of each page and will be allowed to create custom reports. Additionally, admin users can create global reports that will appear at the bottom of all users' pages.
-#
-Reports enabled: Relatórios activados
-#
-# << MISSING >>
-# subscriptions-enabled-help:
-# English text: Specifies if remote users can subscribe to a WebCalendar user's calendar, allowing them to see the WebCalendar user's events in their iCal-enabled application (such as Apple's iCal or Mozilla Calendar).
-#
-Allow remote subscriptions: Permitir subscrições remotas
-categories-enabled-help: Activa o suporte de categorias de eventos.
-Categories enabled: Categorias activadas
-#
-# << MISSING >>
-# allow-external-users-help:
-# English text: Specifies whether a non-calendar user can be added to an event. This allows non-calendar users to be listed as event participants.
-#
-Allow external users: Permitir utilizadores externos
-#
-# << MISSING >>
-# external-can-receive-notification-help:
-# English text: When external users are enabled and email usage is enabled, external users can receive email notifications when the event is added, updated or delete (if the external user's email address is provided).
-#
-External users can receive email notifications: Utilizadores externos podem receber notificações
-#
-# << MISSING >>
-# external-can-receive-reminder-help:
-# English text: When external users are enabled and email usage is enabled, external users can receive email reminders (if the external user's email address is provided).
-#
-External users can receive email reminders: Utilizadores externos podem receber lembretes de correio
-email-enabled-help: Ligar ou desligar o envio de email para notificação e lembrete. Em caso de não haver servidor SMTP, escolher "Não".
-Email enabled: Correio electrónico activado
-email-default-sender: Especifica o endereço email a usar como remetente aquando do envio de lembretes.
-Default sender address: Endereço remetente por omissão
-Default user settings: Parâmetros de utilizador por omissão
-email-event-reminders-help: Especifica se são ou não enviados lembretes.
-Event reminders: Lembretes de eventos
-email-event-added: Especifica se são ou não enviadas notificações via email quando um evento é adicionado ao calendário.
-Events added to my calendar: Eventos adicionados ao meu calendário
-email-event-updated: Especifica se são ou não enviadas notificações via email quando um evento é actualizado.
-Events updated on my calendar: Eventos actualizados no meu calendário
-email-event-deleted: Especifica se são ou não enviadas notificações via email quando um evento é apagado.
-Events removed from my calendar: Eventos apagados do meu calendário
-email-event-rejected: Especifica se são ou não enviadas notificações via email quando um participante rejeita um evento.
-Event rejected by participant: Evento rejeitado por um participante
-Allow user to customize colors: Permitir ao utilizador redefinir cores
-Document background: Fundo do documento
-Select: Seleccionar
-Document title: Título do documento
-Document text: Texto do documento
-Table grid color: Cor da grelha da tabela
-Table header background: Fundo do cabeçalho da tabela
-Table header text: Texto do cabeçalho da tabela
-Table cell background: Fundo da célula da tabela
-Table cell background for current day: Fundo da célula da tabela (para o dia actual)
-Table cell background for weekends: Fundo da célula da tabela (para semana)
-Event popup background: Fundo da caixa de aviso para eventos
-Event popup text: Texto da caixa de aviso para eventos
-
-
-###############################################
-# Page: activity_log.php
-#
-Activity Log: Registo de Actividade
-User: Utilizador
-Calendar: Calendário
-Date: Data
-Time: Hora
-Event: Evento
-Action: Acção
-Event created: Evento criado
-Event approved: Evento aprovado
-Event rejected: Evento rejeitado
-Event updated: Evento actualizado
-Event deleted: Evento apagado
-Notification sent: Notificação enviada
-Reminder sent: Lembrete enviado
-Database error: Erro na base de dados
-Events: Eventos
-
-
-###############################################
-# Page: add_entry.php
-#
-Invalid entry id: Entrada com ID inválido
-This is a private event and may not be added to your calendar.: Este evento é privado e não pode ser adicionado.
-Error adding event: Erro ao adicionar evento
-
-
-###############################################
-# Page: admin_handler.php
-#
-Error: Erro
-The following error occurred: Ocorreu o seguinte erro
-
-
-###############################################
-# Page: approve_entry.php
-#
-Error approving event: Erro durante a aprovação de um evento
-
-
-###############################################
-# Page: category.php
-#
-Categories: Categorias
-Add: Adicionar
-Category Name: Nome de Categoria
-Global: Global
-Delete: Apagar
-Are you sure you want to delete this entry?: Tem a certeza que pretende apagar esta entrada?
-Add New Category: Adicionar Nova Categoria
-
-
-###############################################
-# Page: del_entry.php
-#
-Hello: Olá
-An appointment has been canceled for you by: Uma marcação foi cancelada em seu nome
-The subject was: O assunto era
-Notification: Notificação
-
-
-###############################################
-# Page: edit_layer.php
-#
-Edit Layer: Editar Nível
-Add Layer: Adicionar Nível
-Source: Origem
-Color: Cor
-Duplicates: Duplicados
-Show layer events that are the same as your own: Mostrar eventos semelhantes doutros níveis
-Are you sure you want to delete this layer?: Quer mesmo apagar este nível?
-Delete layer: Remover nível
-
-
-###############################################
-# Page: edit_layer_handler.php
-#
-You cannot create a layer for yourself: Não é permitido criar um nível para si
-You can only create one layer for each user: Apenas pode criar um nível por utilizador
-
-
-###############################################
-# Page: edit_user_handler.php
-#
-Deleting users not supported: A remoção de utilizadores não é permitida
-The passwords were not identical: As passwords não são iguais
-You have not entered a password: Não introduziu uma password
-Changes successfully saved: Alterações gravadas com sucesso
-
-
-###############################################
-# Page: export.php
-#
-Export format: Formato da exportação
-Palm Pilot: Palm Pilot
-Include all layers: Incluir todos os níveis
-Export all dates: Exportar todas as datas
-Start date: Data de início
-End date: Data final
-Modified since: Modificado desde
-Export: Exportar
-
-
-###############################################
-# Page: export_handler.php
-#
-export format not defined or incorrect: formato de exportação não definido ou incorrecto
-
-
-###############################################
-# Page: group_edit.php
-#
-Unnamed Group: Grupo Sem Nome
-Add Group: Adicionar Grupo
-Edit Group: Editar Grupo
-Group name: Nome de grupo
-Updated: Actualizado
-Created by: Criado por
-Users: Utilizadores
-
-
-###############################################
-# Page: group_edit_handler.php
-#
-You must specify a group name: Deve especificar um nome de grupo
-
-
-###############################################
-# Page: groups.php
-#
-Add New Group: Adicionar Novo Grupo
-
-
-###############################################
-# Page: pref.php
-#
-Preferences: Preferências
-Save Preferences: Gravar Preferências
-to modify the preferences for the Public Access calendar: para modificar as preferências do calendário de Acesso Público
-tz-help: Quantas horas para ajustar o tempo à hora local
-Timezone Offset: Offset de Zona Horária
-Add N hours to: Adicionar N horas a
-Subtract N hours from: Subtrair N horas a
-same as: igual a
-server time: hora do servidor
-Default Category: Categoria por Omissão
-When I am the boss: Quando for o administrador
-Email me event notification: Enviar-me uma mensagem de notificação de evento
-I want to approve events: Quero aprovar eventos
-Subscribe/Publish: Subscrever/Publicar
-#
-# << MISSING >>
-# allow-remote-subscriptions-help:
-# English text: Specifies if remote users can subscribe to your calendar, allowing them to see your events in a iCal-enabled application (such as Apple's iCal or Mozilla Calendar).
-#
-#
-# << MISSING >>
-# remote-subscriptions-url-help:
-# English text: Displays the URL remote users should use to subscribe to your calendar.
-#
-URL: URL
-Sun: Dom
-Mon: Seg
-Tue: Ter
-Wed: Qua
-Thu: Qui
-Fri: Sex
-Sat: Sáb
-
-
-###############################################
-# Page: help_bug.php
-#
-Report Bug: Relatório de Erro (bug)
-
-
-###############################################
-# Page: help_edit_entry.php
-#
-Adding/Editing Calendar Entries: Adicionar/Editar Entradas
-Brief Description: Breve Descrição
-brief-description-help: Breve descrição (cerca de 20 caracteres) do evento. Esta descrição representa o evento na vista global do calendário.
-Full Description: Descrição Completa
-full-description-help: Descrição completa do evento. Esta informação é apresentada quando o utilizador verifica o evento isoladamente.
-date-help: Especifica a data do evento.
-time-help: Especifica a hora do evento. Este campo é opcional.
-duration-help: Especifica a duração do evento em minutos. Este campo é opcional.
-#
-# << MISSING >>
-# end-time-help:
-# English text: Specifies the time the event is expected to end.
-#
-Priority: Prioridade
-priority-help: Especifica a prioridade do evento. Prioridade Alta é apresentada num tipo de letra mais escuro.
-Access: Accesso
-access-help: Especifica o nível de acesso do evento. <BR><I>Público</I> Todos os intervenientes podem ver todos os detalhes do evento. <BR><I>Confidencial</I> Outros utilizadores poderão ver que tem um evento marcado, mas não podem visualizar os detalhes.
-Participants: Participantes
-participants-help: Lista os participantes neste evento.
-Repeat Type: Tipo de repetição
-repeat-type-help: Selecciona a periodicidade do evento. <I>Mensal (por dia)</I> faz com que o evento se repita no 1º dia do mês, 3º dia do mês, etc. <I>Mensal (por data)</I> faz com que um evento se repita todos os meses no mesmo dia.
-Repeat End Date: Data para fim de repetição
-repeat-end-date-help: Especifica a data até à qual o evento se repete.
-Repeat Day: Dia a repetir
-repeat-day-help: Especifica em que dias da semana o evento se repete. Isto é apenas utilizado quando o <I>Tipo de repetição</I> tem o valor de <I>Semanal</I>.
-Frequency: Frequência
-repeat-frequency-help: Especifica quantas vezes o evento se deve repetir. O valor padrão (1) indica que o evento acontece todos os dias. Especificar 2 faz com que o evento se repita noutra semana (se <I>Tipo de repetição</I> tem o valor de <I>Semanal</I>), todos os meses (se <I>Tipo de repetição</I> tem o valor de <I>Mensal</I>), etc.
-
-
-###############################################
-# Page: help_index.php
-#
-Help Index: Ajuda
-Layers: Níveis
-Import: Importar
-
-
-###############################################
-# Page: help_layers.php
-#
-Layers are useful for displaying other users' events in your own calendar. You can specifiy the user and the color the events will be displayed in.: Os níveis são apropriados para mostrar eventos doutros utilizadores no seu calendário. Pode especificar o utilizador e a cor dos eventos a mostrar.
-Add/Edit/Delete: Adicionar/Editar/Apagar
-Clicking the Edit Layers link in the admin section at the bottom of the page will allow you to add/edit/delete layers.: Clicar na ligação "Editar Níveis", na secção administrativa do fundo da página, permite adicionar/editar/apagar níveis.
-Specifies the user that you would like to see displayed in your calendar.: Especifica o utilizador que deseja visualizar no seu calendário
-The text color of the new layer that will be displayed in your calendar.: A cor do texto do novo nível que será usada no seu calendário.
-If checked, events that are duplicates of your events will be shown.: Quando activo, mostra eventos que são duplicados dos seus eventos.
-Disabling: Desactivando
-Press the Disable Layers link in the admin section at the bottom of the page to turn off layers.: Clique na ligação "Desactivar Níveis", na secção administrativa do fundo da página, para desactivar os níveis.
-Enabling: Activando
-Press the Enable Layers link in the admin section at the bottom of the page to turn on layers.: Clique na ligação "Activar Níveis", na secção administrativa do fundo da página, para activar os níveis.
-
-
-###############################################
-# Page: help_admin.php
-#
-Display days with events in bold in year view: Mostrar dias com eventos em negrito na vista anual
-Nonuser: Informação anónima
-Reports: Relatórios
-
-
-###############################################
-# Page: layers.php
-#
-to modify the layers settings for the: para modificar a configuração de níveis para
-Layers are currently: Os níveis estão actualmente
-Enabled: Activados
-Disabled: Desactivados
-Disable Layers: Desactivar Níveis
-Enable Layers: Activar Níveis
-Layer: Nível
-Edit layer: Editar nível
-Add layer: Adicionar nível
-
-
-###############################################
-# Page: list_unapproved.php
-#
-View this entry: Visualizar esta entrada
-Approve/Confirm: Aprovar/Confirmar
-Approve this entry?: Aprovar esta entrada?
-Reject this entry?: Rejeitar esta entrada?
-Reject: Rejeitar
-No unapproved events for: Não há eventos por aprovar para
-Unapproved Events: Eventos Não Aprovados
-
-
-###############################################
-# Page: view_entry.php
-#
-Low: Baixa
-Medium: Média
-High: Alta
-every: todos
-2nd: 2º
-3rd: 3º
-4th: 4º
-5th: 5º
-1st: 1º
-last: último
-by date: por data
-Confidential: Confidencial
-Description: Descrição
-Status: Estado
-Waiting for approval: À espera de aprovação
-Deleted: Apagada
-Rejected: Rejeitada
-All day event: Evento de dia completo
-Public: Público
-Category: Categoria
-days: dias
-day: dia
-hours: horas
-minute: minuto
-before event: antes do evento
-External User: Utilizador anónimo
-Approve/Confirm entry: Aprovar/Confirmar entrada
-Reject entry: Rejeitar entrada
-Set category: Definir categoria
-Edit repeating entry for all dates: Editar entrada repetitiva em todas as datas
-Edit entry for this date: Editar entrada desta data
-Delete repeating event for all dates: Apagar entrada repetitiva em todas as datas
-This will delete this entry for all users.: Isto apagará esta entrada para todos os utilizadores.
-Delete entry only for this date: Apagar entrada desta data
-Edit entry: Editar entrada
-Delete entry: Apagar entrada
-Copy entry: Copiar entrada
-This will delete the entry from your calendar.: Isto apagará a entrada do seu calendário.
-Add to My Calendar: Adicionar ao Meu Calendário
-Do you want to add this entry to your calendar?: Quer adicionar esta entrada ao seu calendário?
-This will add the entry to your calendar.: Isto adicionará a entrada ao seu calendário.
-Email all participants: Enviar email a todos os participantes
-Show activity log: Mostrar registo de actividades
-Hide activity log: Esconder registo de actividades
-Export this entry to: Exportar esta entrada para
-
-
-###############################################
-# Page: reject_entry.php
-#
-An appointment has been rejected by: Uma marcação foi rejeitada por
-The description is: A descrição é
-Title: Título
-
-
-###############################################
-# Page: search.php
-#
-Search: Pesquisar
-Keywords: Palavras
-Advanced Search: Pesquisa Avançada
-
-
-###############################################
-# Page: search_handler.php
-#
-You must enter one or more search keywords: Tem de introduzir uma ou mais palavras de pesquisa
-Search Results: Resultados da pesquisa
-match found: Ocorrência encontrada
-matches found: Ocorrências encontradas
-No matches found: Ocorrências não encontradas
-
-
-###############################################
-# Page: select_user.php
-#
-View Another User's Calendar: Ver Calendário de Outro Utilizador
-Go: Ver
-
-
-###############################################
-# Page: users.php
-#
-Account: Perfil
-Add New User: Adicionar Novo Utilizador
-denotes administrative user: administrador
-
-
-###############################################
-# Page: usersel.php
-#
-All: Todos
-None: Nenhuma
-Reset: Reiniciar
-Remove: Apagar
-Ok: Ok
-Cancel: Cancelar
-
-
-###############################################
-# Page: import.php
-#
-Import format: Formato de importação
-Exclude private records: Excluir eventos privados
-Overwrite Prior Import: Escrever sobre importação anterior
-
-
-###############################################
-# Page: login.php
-#
-Invalid login: Acesso inválido
-You must enter a login and password: Tem de introduzir um Utilizador e uma Password
-Username: Utilizador
-Password: Password
-Save login via cookies so I don't have to login next time: Gravar Utilizador e Password para sessões futuras (não recomendado se este computador for utilizado por mais pessoas)
-Login: Entrar
-Access public calendar: Calendário de acesso público
-cookies-note: <B>Nota:</B> Esta opção requer a activação da opção de 'cookies' no seu navegador.
-
-
-###############################################
-# Page: views.php
-#
-Views: Vistas
-Add New View: Adicionar Nova Vista
-
-
-###############################################
-# Page: views_edit.php
-#
-Unnamed View: Vista sem Nome
-Add View: Adicionar Vista
-Edit View: Editar Vista
-View Name: Nome da Vista
-View Type: Tipo de Vista
-Week (Users horizontal): Semana (Utilizadores na horizontal)
-Week (Users vertical): Semana (Utilizadores na vertical)
-Week (Timebar): Semana (Barra temporal)
-Month (Timebar): Mês (Barra temporal)
-Month (side by side): Mês (lado a lado)
-Month (on same calendar): Mês (no mesmo calendário)
-preview: previsão
-
-
-###############################################
-# Page: nonusers.php
-#
-NONUSER_PREFIX not set: Prefixo de acesso público por definir!
-Add New NonUser Calendar: Adicionar Novo Calendário Público
-
-
-###############################################
-# Page: nonusers_handler.php
-#
-Calendar ID: ID do calendário
-word characters only: apenas caracteres de palavras (a-zA-Z_0-9)
-
-
-###############################################
-# Page: help_pref.php
-#
-default-category-help: Especifica a categoria, por omissão, a que um novo deverá pertencer.
-
-
-###############################################
-# Page: report.php
-#
-Untimed event: Evento não temporizado
-Private: Privado
-Approved: Aprovada
-Unknown: Desconhecida
-to manage reports for the Public Access calendar: para gerir relatórios do calendário de Acesso Público
-Add new report: Adicionar novo relatório
-Invalid report id: Identificador de relatório inválido
-Manage Reports: Gerir Relatórios
-
-
-###############################################
-# Page: views_edit_handler.php
-#
-You must specify a view name: Deve especificar un nome de vista
-
-
-###############################################
-# Page: week_details.php
-#
-New Entry: Nova entrada
-am: AM
-pm: PM
-
-
-###############################################
-# Page: import_handler.php
-#
-Import Results: Importar Resultados
-Events successfully imported: Eventos importados com sucesso
-Events from prior import marked as deleted: Eventos de importações anteriores marcadas para remoção
-Conflicting events: Eventos conflituosos
-Errors: Erros
-There was an error parsing the import file or no events were returned: Ocorreu um erro ao interpretar o ficheiro ou não foram encontrados eventos
-The import file contained no data: O ficheiro não contém dados
-The following conflicts with the suggested time: O seguinte está em conflito com a hora sugerida
-Unnamed Event: Evento sem Nome
-Scheduling Conflict: Conflito na Marcação
-conflicts with the following existing calendar entries: está em conflito com os seguintes eventos
-Event Imported: Evento Importado
-
-
-###############################################
-# Page: edit_entry.php
-#
-Edit Entry: Editar Entrada
-Add Entry: Adicionar Entrada
-Details: Detalhes
-Scheduling: Escalonamento
-Repeat: Repetição
-category-help: Especifica a categoria do evento.
-Timed event: Evento temporizado
-#
-# << MISSING >>
-# external-participants-help:
-# English text: Specifies a list of participants for the event that are not calendar users. The users should be listed one per line and can include an email address. If an email address is specified, the user is eligible to receive notications and reminders.
-#
-External Participants: Participantes Externos
-Daily: Diário
-Weekly: Semanal
-Monthly: Mensal
-by day: por dia
-by day (from end): por dia a contar do fim
-Yearly: Anual
-Use end date: Utilizar data de fim de repetição
-Tuesday: Terça
-Wednesday: Quarta
-Thursday: Quinta
-Friday: Sexta
-Saturday: Sábado
-You are not authorized to edit this entry: Não está autorizado a editar esta entrada
-
-
-###############################################
-# Page: edit_report.php
-#
-Tomorrow: Amanhã
-Today: Hoje
-Yesterday: Ontem
-Day before yesterday: Anteontem
-Next week: Próxima semana
-This week: Semana corrente
-Last week: Semana passada
-Week before last: Semana antepassada
-Next week and week after: Semanas seguintes
-This week and next week: Semana corrente e seguinte
-Last week and this week: Semana passada e corrente
-Last two weeks: Últimas duas semanas
-Next month: Próximo mês
-This month: Mês corrente
-Last month: Mês passado
-Month before last: Mês antepassado
-Next year: Próximo ano
-This year: Ano corrente
-Last year: Ano passado
-Year before last: Ano antepassado
-Unnamed Report: Relatório sem nome
-Add Report: Adicionar Relatório
-Edit Report: Editar Relatório
-Report name: Nome de Relatório
-Current User: Utilizador Corrente
-Include link in trailer: Incluir link no rodapé
-Include standard header/trailer: Incluir cabeçalho/rodapé standard
-Date range: Gama de datas
-Include previous/next links: Incluir links anteriores/seguintes
-Include empty dates: Incluir datas vazias
-Template variables: Variáveis padrão
-Page template: Página padrão
-Day template: Dia padrão
-Event template: Evento padrão
-Are you sure you want to delete this report?: Tem a certeza que deseja apagar este relatório?
-
-
-###############################################
-# Page: assistant_edit.php
-#
-Assistants: Assistentes
-Your assistants: Seus assistentes
-
-
-###############################################
-# Page: adminhome.php
-#
-Delete Events: Remover Eventos
-Public Preferences: Preferências Públicas
-Unapproved Public Events: Eventos Públicos por Aprovar
-Administrative Tools: Ferramentas administrativas
-
-
-###############################################
-# Page: purge.php
-#
-Purging events for: Removendo eventos de
-Finished: Terminado
-Delete all events before: Remover todos os eventos antes de
-Check box to delete <b>ALL</b> events for a user: Seleccione caixa para remover <b>TODOS</b> os eventos do utilizador
-Are you sure you want to delete events for: Tem a certeza que quer apagar entradas para
-Records deleted from: Remover registos de
-
-
-###############################################
-# Page: set_entry_cat.php
-#
-You have not added any categories: Não adicionou nenhuma categoria
-Set Category: Definir Categoria
-
-
-###############################################
-# Page: help_import.php
-#
-Palm Desktop: Palm PDA
-This form will allow you to import entries from the Palm Desktop Datebook.: Este formulário permite importar entradas do Palm Datebook.
-It should be located in your Palm directory in <tt>datebook/datebook.dat</tt> in a subdirectory named by your username.: Deverá estar localizado no directório Palm em <tt>datebook/datebook.dat</tt> dentro de subdirectório com o seu nome de utilizador
-The following entries will not be imported: As seguintes entradas serão importadas
-Entries older than the current date: Entradas mais antigas do que a data corrente
-Entries created in the Palm Desktop that have not been HotSync'd: Entradas criadas no Palm Desktop que não foram HotSync'd
-Anything imported from Palm will be overwritten during the next import (unless the event date has passed).: Informação importada do Palm será sobreescrita na próxima importação (excepto se a data do evento tiver passado).
-Therefore, updates should be made in the Palm Desktop.: Assim sendo, deverão ser feitas actualizações no Palm.
-vCal: vCal
-This form will import vCalendar (.vcs) 1.0 events: Este formulário permite importar eventos vCalendar 1.0 (.vcs)
-The following formats have been tested: Os seguintes formatos foram testados
-Palm Desktop 4: Palm 4 PDA
-Lotus Organizer 6: Lotus Organizer 6
-Microsoft Outlook 2002: Microsoft Outlook 2002:
-iCalendar: iCalendar
-This form will import iCalendar (.ics) events: Este formulário irá importar eventos iCalendar (.ics)
-Enabling <b>Overwrite Prior Import</b> will cause events imported previously that used the same UID as an event from the new import file to be marked as deleted. This should allow an updated iCalendar file to be imported without creating duplicates.: Activar este mecanismo irá apagar eventos conflituosos e evitar duplicações.
-
-
-###############################################
-# Page: edit_report_handler.php
-#
-Variable N not found: Variável N não existente
-
-
-###############################################
-# Page: edit_entry_handler.php
-#
-A new appointment has been made for you by: Uma nova marcação foi criada para si por
-An appointment has been updated by: Uma marcação foi actualizada por
-The subject is: O assunto é
-Please look on: Por favor veja em
-to accept or reject this appointment: para aceitar ou rejeitar este evento
-to view this appointment: para ver este evento
-Your suggested time of: A sua hora sugerida de
-
-
-###############################################
-# Page: edit_nonusers.php
-#
-Edit User: Editar Utilizador
-Add User: Adicionar Utilizador
-First Name: Primeiro Nome
-Last Name: Último Nome
-
-
-###############################################
-# Page: edit_template.php
-#
-Edit Custom Script/Stylesheet: Editar Script/Folha de estilo Personalizada
-Edit Custom Header: Editar Cabeçalho Personalizado
-Edit Custom Trailer: Editar Rodapé Personalizado
-
-
-###############################################
-# Page: edit_user.php
-#
-E-mail address: Endereço de email
-again: novamente
-Disabled for demo: Desactivado em modo demo
-Are you sure you want to delete this user?: Tem a certeza que quer remover este utilizador?
-Change Password: Alterar Password
-New Password: Nova Password
-Set Password: Gravar Password
-
-
-###############################################
-# Page: includes/trailer.php
-#
-Go to: Ir para
-My Calendar: Meu Calendário
-Back to My Calendar: Voltar ao Meu Calendário
-Another User's Calendar: Calendário de Outro Utilizador
-Add New Entry: Adicionar Nova Entrada
-Logout: Sair
-Manage calendar of: Gerir calendário de
-
-
-###############################################
-# Page: includes/user.php
-#
-incorrect password: password incorrecta
-no such user: utilizador não encontrado
-Invalid user login: Acesso inválido
-
-
-###############################################
-# Page: includes/site_extras.php
-#
-Send Reminder: Enviar Lembrete
-
-
-###############################################
-# Page: includes/config.php
-#
-#
-# << MISSING >>
-# English:
-#
-# << MISSING >>
-# Basque:
-#
-# << MISSING >>
-# Bulgarian:
-#
-# << MISSING >>
-# Catalan:
-#
-# << MISSING >>
-# Chinese (Traditonal/Big5):
-#
-# << MISSING >>
-# Chinese (Simplified/GB2312):
-#
-# << MISSING >>
-# Czech:
-#
-# << MISSING >>
-# Danish:
-#
-# << MISSING >>
-# Dutch:
-#
-# << MISSING >>
-# Estonian:
-#
-# << MISSING >>
-# Finnish:
-#
-# << MISSING >>
-# French:
-#
-# << MISSING >>
-# Galician:
-#
-# << MISSING >>
-# German:
-#
-# << MISSING >>
-# Holo (Taiwanese):
-#
-# << MISSING >>
-# Hungarian:
-#
-# << MISSING >>
-# Icelandic:
-#
-# << MISSING >>
-# Italian:
-#
-# << MISSING >>
-# Japanese:
-#
-# << MISSING >>
-# Korean:
-#
-# << MISSING >>
-# Norwegian:
-#
-# << MISSING >>
-# Polish:
-Portuguese: Português
-#
-# << MISSING >>
-# Portuguese/Brazil:
-#
-# << MISSING >>
-# Russian:
-#
-# << MISSING >>
-# Spanish:
-#
-# << MISSING >>
-# Swedish:
-#
-# << MISSING >>
-# Turkish:
-
-
-###############################################
-# Page: includes/functions.php
-#
-This event is confidential: Este evento é confidencial
-exceeds limit of XXX events per day: excede o limite de XXX eventos por dia
-You have XXX unapproved events: Tem XXX evento(s) por aprovar
-January: Janeiro
-February: Fevereiro
-March: Março
-April: Abril
-May_: Maio
-June: Junho
-July: Julho
-August: Agosto
-September: Setembro
-October: Outubro
-November: Novembro
-Jan: Jan
-Feb: Fev
-Mar: Mar
-Apr: Abr
-May: Mai
-Jun: Jun
-Jul: Jul
-Aug: Ago
-Sep: Set
-Oct: Out
-Nov: Nov
-Dec: Dez
-
-
-###############################################
-# Page: includes/js/admin.php
-#
-Server URL is required: É necessário o URL do servidor
-Server URL must end with '/': O URL do servidor deve terminar com '/'
-Invalid work hours: Horas de trabalho incorrectas
-Invalid color for document background: Cor inválida para o fundo do documento
-Invalid color for document title: Cor inválida para o título do documento
-Invalid color for table cell background: Cor inválida para o fundo da célula da tabela
-Invalid color for table grid: Cor inválida para a grelha da tabela
-Invalid color for table header background: Cor inválida para o fundo do cabeçaºho da tabela
-Invalid color for table text background: Cor inválida para o fundo do texto da tabela
-Invalid color for event popup background: Cor inválida para o fundo da caixa de aviso
-Invalid color for event popup text: Cor inválida para o texto da caixa de aviso
-Invalid color for table cell background for today: Cor inválida para o fundo da célula da tabela (para o dia actual)
-Color format should be '#RRGGBB': O formato do código de cor deve ser '#RRGGBB'
-
-
-###############################################
-# Page: includes/js/edit_entry.php
-#
-You have not entered a Brief Description: Não introduziu uma breve descrição
-You have not entered a valid time of day: Não introduziu uma hora do dia válida
-The time you have entered begins before your preferred work hours. Is this correct?: A hora introduzida é anterior ao seu período de trabalho. Tem a certeza?
-
-
-###############################################
-# Page: includes/js/edit_layer.php
-#
-Invalid color: Cor inapropriada
-
-
-###############################################
-# Page: tools/send_reminders.php
-#
-This is a reminder for the event detailed below.: Isto é um lembrete do evento seguinte.
-Reminder: Lembrete
+# Translated by:
+# Antonio Costa - accmdq at mail.esoterica.pt
+# Last update: 16-Apr-2006
+# Translation last updated on 16-04-2006
+
+# No charset specified (not needed for iso-8859-1)
+# "charset" is used in a meta tag, do not translate "charset" here.
+# charset:
+
+
+
+###############################################
+# Page: week.php
+#
+Week: Semana
+Previous: Anterior
+Next: Seguinte
+Admin mode: Modo de administração
+Assistant mode: Modo de assistência
+cont.: cont.
+Generate printer-friendly version: Visualizar em formato de impressão
+Printer Friendly: Formato de impressão
+
+
+###############################################
+# Page: admin.php
+#
+System Settings: Parâmetros Gerais
+Help: Ajuda
+You are not authorized: Não está autorizado
+Admin: Admin
+Note: Nota
+Your user preferences: As suas preferências
+may be affecting the appearance of this page.: poderão afectar a aparência desta página.
+Click here: Clique aqui
+to not use your user preferences when viewing this page: para não usar as suas preferências durante a visualização desta página.
+are being ignored while viewing this page.: serão ignoradas durante a visualização desta página.
+to load your user preferences when viewing this page: para carregar as suas preferências durante a visualização desta página
+Save: Gravar
+Settings: Parâmetros
+Public Access: Acesso Público
+Groups: Grupos
+NonUser Calendars: Calendários sem utilizador
+Other: Outro
+Email: Correio electrónico
+colors-help: Todas as cores devem ser especificadas da forma "#RRGGBB" hexadecimal, em que "RR" é o valor hexadecimal para o encarnado, "GG" é o valor hexadecimal para o verde e "BB" é o valor hexadecimal para o azul.
+Colors: Cores
+app-name-help: Especifica o nome da aplicação que irá aparecer no título do navegador, para todas as páginas, incluindo a de entrada.
+Application Name: Nome da Aplicação
+server-url-help: Especifica o URL de base para esta aplicação. Ele será usado aquando do envio de lembretes e notificações.
+Server URL: URL do Servidor
+language-help: Especifica a língua a ser utilizada.
+Language: Linguagem
+Your browser default language is: A linguagem do navegador, por omissão, é
+fonts-help: Especifica a lista de tipos de letra a usar (por exemplo, "Arial, Helvetica", etc).
+Fonts: Tipos de letra
+#
+# << MISSING >>
+# custom-script-help:
+# English text: Allows entry of custom Javascript or stylesheet text that will be inserted into the HTML "head" section of every page.
+#
+Custom script/stylesheet: Script/folha de estilo personalizada
+Yes: Sim
+No: Não
+Edit: Editar
+#
+# << MISSING >>
+# custom-header-help:
+# English text: Allows a custom HTML snippet to be included in the top of every page.
+#
+Custom header: Cabeçalho personalizado
+#
+# << MISSING >>
+# custom-trailer-help:
+# English text: Allows a custom HTML snippet to be included at the end of every page.
+#
+Custom trailer: Rodapé personalizado
+preferred-view-help: Especifica a vista padrão (Dia, Semana, Mês, ou Ano).
+Preferred view: Visualização preferida
+Day: Dia
+Month: Mês
+Year: Ano
+display-weekends-help: Incluir fins-de-semana na vista de semana.
+Display weekends in week view: Mostrar fins-de-semana na vista de semana
+#
+# << MISSING >>
+# yearly-shows-events-help:
+# English text: On the yearly view, display days that contain events in a bold font.
+#
+Display days with events in bold in month and year views: Mostrar dias com eventos a negrito nas vistas mensais e anuais
+#
+# << MISSING >>
+# display-desc-print-day-help:
+# English text: Include event descriptions in printer-friendly version of day view.
+#
+Display description in printer day view: Mostrar descrição na vista de impressora (dia)
+date-format-help: Especifica o formato preferido da data.
+Date format: Formato da data
+December: Dezembro
+time-format-help: Especifica o formato da hora a utilizar: <I>12 horas:</I> Mostra no formato 3am, 8:30pm, etc. <I>24 horas:</I> Mostra no formato 300, 2030, etc.
+Time format: Formato da hora
+12 hour: 12 horas
+24 hour: 24 horas
+time-interval-help: Especifica a duração do bloco de tempo nas vistas de semana e dia.
+Time interval: Intervalo de tempo
+hour: hora
+minutes: minutos
+auto-refresh-help: Quando activo, as vistas de dia, semana, mês e lista de de páginas não-aprovadas serão automaticamente actualizadas periodicamente.
+Auto-refresh calendars: Actualizar automaticamente o calendário
+auto-refresh-time-help: Quando a actualização automática está activa, especifica o intervalo de tempo entre actualizações.
+Auto-refresh time: Tempo de actualização automática
+require-approvals-help: Quando activo, um utilizador deverá aprovar um evento antes de ser mostrado no seu calendário (excepto se <I>Mostra não-aprovados</I> estiver activo).
+Require event approvals: Requer aprovação de eventos
+display-unapproved-help: Especifica se os eventos não aprovados são mostrados no calendário
+Display unapproved: Mostrar não-aprovados
+display-week-number-help: Especifica se o número da semana (1-52) deve ser mostrado na vista semanal e mensal.
+Display week number: Mostrar número da semana
+display-week-starts-on: Especifica se a semana começa ao Domingo ou à Segunda-Feira.
+Week starts on: Semana começa em
+Sunday: Domingo
+Monday: Segunda
+work-hours-help: Especifica as horas apresentadas para marcação de eventos.
+Work hours: Horário de trabalho
+From: De
+to: para
+disable-priority-field-help: Seleccionar "Sim" irá remover o campo "Prioridade" das páginas de informação dos eventos, dando origem a uma interface mais simples para os utilizadores novatos.
+Disable Priority field: Desactivar campo "Prioridade"
+disable-access-field-help: Seleccionar "Sim" irá remover o campo "Acesso"
+Disable Access field: Desactivar campo "Acesso"
+disable-participants-field-help: Seleccionar "Sim" irá remover o campo "Participantes" das páginas de informação dos eventos, impedindo que os utilizadores adicionem outros utilizadores aos seus eventos. Se activar esta opção, recomenda-se que desactive a opção "Permitir ver calendário de outros utilizadores".
+Disable Participants field: Desactivar campo "Participantes"
+disable-repeating-field-help: Seleccionar "Sim" irá remover o campo "Repetições" aquando da criação de eventos, dando origem a uma interface mais simples para os utilizadores novatos.
+Disable Repeating field: Desactivar campo "Repetições"
+#
+# << MISSING >>
+# popup-includes-siteextras-help:
+# English text: If enabled, allow custom event fields setup in the site_extras.php file will be displayed in event popups.
+#
+Display Site Extras in popup: Mostrar Extras num popup
+#
+# << MISSING >>
+# allow-html-description-help:
+# English text: If enabled, users can enter HTML in the event description field. If not enabled, the HTML tags will be escaped so as to appear as plain text. Warning: Enabling this feature will allow users to reference images on other websites.
+#
+Allow HTML in Description: Permitir HTML na descrição
+allow-view-other-help: Especifica se um utilizador pode ou não ver o calendário de outro utilizador.
+Allow viewing other user's calendars: Permitir ver calendário de outro utilizador
+#
+# << MISSING >>
+# allow-view-add-help:
+# English text: A '+' icon will be included in views, allowing users to quickly add events to other users' calendars.
+#
+Include add event link in views: Incluir link para adicionar eventos nas vistas
+remember-last-login-help: Quando activo, o campo com o nome do utilizador será preenchido automaticamente, assim como as suas preferências.
+Remember last login: Usar preferências do último acesso
+conflict-check-help: Verificar conflito de eventos (dois eventos escalonados ao mesmo tempo pelo mesmo utilizador). Se escolher "Sim", será mostrado um aviso caso crie eventos que gerem conflito. Se escolher "Não", não será verificado o conflito de eventos. Recomenda-se a opção "Sim".
+Check for event conflicts: Verificar o conflito de eventos
+conflict-months-help: Quando está activa a verificação de conflitos, especifica quantos meses no futuro deverão ser tidos em conta nessa verificação. Se o sistema demora muito tempo a verificar conflitos, o valor deverá ser reduzido.
+Conflict checking months: Meses a usar na verificação de conflitos
+#
+# << MISSING >>
+# conflict-check-override-help:
+# English text: Allows users to override event conflicts and schedule two or more events for the same time.
+#
+Allow users to override conflicts: Permitir ultrapassar conflitos
+#
+# << MISSING >>
+# limit-appts-help:
+# English text: Allows the system administrator to set a system-wide limit on the number of appointments a single user can have on any single day.
+#
+Limit number of timed events per day: Limitar número de eventos temporizados por dia
+#
+# << MISSING >>
+# limit-appts-number-help:
+# English text: Specifies the maximum number of timed events a user can have in a single day.
+#
+Maximum timed events per day: Número máximo de eventos temporizados por dia
+#
+# << MISSING >>
+# timed-evt-len-help:
+# English text: Specifies input method for determining the length of a timed event.
+#
+Specify timed event length by: Especificar a duração dos eventos por
+Duration: Duração
+End Time: Tempo Final
+Plugins: Plugins
+#
+# << MISSING >>
+# plugins-enabled-help:
+# English text: Enable plugin applications.
+#
+Enable Plugins: Activar Plugins
+#
+# << MISSING >>
+# plugins-sort-key-help:
+# English text: Specifies a sort key for the plugin. This allows the plugins to appear in a specific order.
+#
+Plugin: Plugin
+allow-public-access-help: Quando activo, o calendário pode ser usado para acesso público (sem possibilidade de modificação).
+Allow public access: Permitir acesso público
+public-access-default-visible: Eventos do calendário público irão aparecer em todos os calendários
+Public access visible by default: Acesso público visível por omissão
+public-access-default-selected: Aquando de um novo evento, o público será definido como participante por omissão
+Public access is default participant: Acesso público participante por omissão
+public-access-view-others-help: Quando em modo de acesso público, especifica se o utilizador pode ou não ver o calendário de outro utilizador.
+Public access can view other users: Ver calendários de outros utilizadores em modo de acesso público
+public-access-can-add-help: Quando em modo de acesso público, os utilizadores poderão criar novos eventos, mas estes apenas serão visualizados depois da aprovação pelo administrador.
+Public access can add events: Adicionar eventos em modo público
+#
+# << MISSING >>
+# public-access-add-requires-approval-help:
+# English text: Specifies whether events added via the public access account require approval before being displayed.
+#
+Public access new events require approval: Novos eventos públicos exigem aprovação
+#
+# << MISSING >>
+# public-access-sees-participants-help:
+# English text: If enabled, users accessing the calendar from the public account will be able to see event participants if they view details of an event.
+#
+Public access can view participants: Acesso público pode ver participantes
+groups-enabled-help: Activa o suporte de grupos, permitindo que os utilizadores seleccionem outros utilizadores através de grupos.
+Groups enabled: Grupos activados
+user-sees-his-group-help: Quando activo, o utilizador não verá calendários de outros utilizadores que não pertençam pelo menos a um dos seus grupos.
+User sees only his groups: Utilizador apenas acede aos seus grupos
+#
+# << MISSING >>
+# nonuser-enabled-help:
+# English text: If enabled, admins will have the option to add nonuser calendars
+#
+Nonuser enabled: Informação anónima activada
+#
+# << MISSING >>
+# nonuser-list-help:
+# English text: Where to display the nonuser calendars in the participant list
+#
+Nonuser list: Mostrar lista de paticipantes em
+Top: Acima
+Bottom: Abaixo
+#
+# << MISSING >>
+# reports-enabled-help:
+# English text: If enabled, users will see a "Reports" section at the bottom of each page and will be allowed to create custom reports. Additionally, admin users can create global reports that will appear at the bottom of all users' pages.
+#
+Reports enabled: Relatórios activados
+#
+# << MISSING >>
+# subscriptions-enabled-help:
+# English text: Specifies if remote users can subscribe to a WebCalendar user's calendar, allowing them to see the WebCalendar user's events in their iCal-enabled application (such as Apple's iCal or Mozilla Calendar).
+#
+Allow remote subscriptions: Permitir subscrições remotas
+categories-enabled-help: Activa o suporte de categorias de eventos.
+Categories enabled: Categorias activadas
+#
+# << MISSING >>
+# allow-external-users-help:
+# English text: Specifies whether a non-calendar user can be added to an event. This allows non-calendar users to be listed as event participants.
+#
+Allow external users: Permitir utilizadores externos
+#
+# << MISSING >>
+# external-can-receive-notification-help:
+# English text: When external users are enabled and email usage is enabled, external users can receive email notifications when the event is added, updated or delete (if the external user's email address is provided).
+#
+External users can receive email notifications: Utilizadores externos podem receber notificações
+#
+# << MISSING >>
+# external-can-receive-reminder-help:
+# English text: When external users are enabled and email usage is enabled, external users can receive email reminders (if the external user's email address is provided).
+#
+External users can receive email reminders: Utilizadores externos podem receber lembretes de correio
+email-enabled-help: Ligar ou desligar o envio de email para notificação e lembrete. Em caso de não haver servidor SMTP, escolher "Não".
+Email enabled: Correio electrónico activado
+email-default-sender: Especifica o endereço email a usar como remetente aquando do envio de lembretes.
+Default sender address: Endereço remetente por omissão
+Default user settings: Parâmetros de utilizador por omissão
+email-event-reminders-help: Especifica se são ou não enviados lembretes.
+Event reminders: Lembretes de eventos
+email-event-added: Especifica se são ou não enviadas notificações via email quando um evento é adicionado ao calendário.
+Events added to my calendar: Eventos adicionados ao meu calendário
+email-event-updated: Especifica se são ou não enviadas notificações via email quando um evento é actualizado.
+Events updated on my calendar: Eventos actualizados no meu calendário
+email-event-deleted: Especifica se são ou não enviadas notificações via email quando um evento é apagado.
+Events removed from my calendar: Eventos apagados do meu calendário
+email-event-rejected: Especifica se são ou não enviadas notificações via email quando um participante rejeita um evento.
+Event rejected by participant: Evento rejeitado por um participante
+Allow user to customize colors: Permitir ao utilizador redefinir cores
+Document background: Fundo do documento
+Select: Seleccionar
+Document title: Título do documento
+Document text: Texto do documento
+Table grid color: Cor da grelha da tabela
+Table header background: Fundo do cabeçalho da tabela
+Table header text: Texto do cabeçalho da tabela
+Table cell background: Fundo da célula da tabela
+Table cell background for current day: Fundo da célula da tabela (para o dia actual)
+Table cell background for weekends: Fundo da célula da tabela (para semana)
+Event popup background: Fundo da caixa de aviso para eventos
+Event popup text: Texto da caixa de aviso para eventos
+
+
+###############################################
+# Page: activity_log.php
+#
+Activity Log: Registo de Actividade
+User: Utilizador
+Calendar: Calendário
+Date: Data
+Time: Hora
+Event: Evento
+Action: Acção
+Event created: Evento criado
+Event approved: Evento aprovado
+Event rejected: Evento rejeitado
+Event updated: Evento actualizado
+Event deleted: Evento apagado
+Notification sent: Notificação enviada
+Reminder sent: Lembrete enviado
+Database error: Erro na base de dados
+Events: Eventos
+
+
+###############################################
+# Page: add_entry.php
+#
+Invalid entry id: Entrada com ID inválido
+This is a private event and may not be added to your calendar.: Este evento é privado e não pode ser adicionado.
+Error adding event: Erro ao adicionar evento
+
+
+###############################################
+# Page: admin_handler.php
+#
+Error: Erro
+The following error occurred: Ocorreu o seguinte erro
+
+
+###############################################
+# Page: approve_entry.php
+#
+Error approving event: Erro durante a aprovação de um evento
+
+
+###############################################
+# Page: category.php
+#
+Categories: Categorias
+Add: Adicionar
+Category Name: Nome de Categoria
+Global: Global
+Delete: Apagar
+Are you sure you want to delete this entry?: Tem a certeza que pretende apagar esta entrada?
+Add New Category: Adicionar Nova Categoria
+
+
+###############################################
+# Page: del_entry.php
+#
+Hello: Olá
+An appointment has been canceled for you by: Uma marcação foi cancelada em seu nome
+The subject was: O assunto era
+Notification: Notificação
+
+
+###############################################
+# Page: edit_layer.php
+#
+Edit Layer: Editar Nível
+Add Layer: Adicionar Nível
+Source: Origem
+Color: Cor
+Duplicates: Duplicados
+Show layer events that are the same as your own: Mostrar eventos semelhantes doutros níveis
+Are you sure you want to delete this layer?: Quer mesmo apagar este nível?
+Delete layer: Remover nível
+
+
+###############################################
+# Page: edit_layer_handler.php
+#
+You cannot create a layer for yourself: Não é permitido criar um nível para si
+You can only create one layer for each user: Apenas pode criar um nível por utilizador
+
+
+###############################################
+# Page: edit_user_handler.php
+#
+Deleting users not supported: A remoção de utilizadores não é permitida
+The passwords were not identical: As passwords não são iguais
+You have not entered a password: Não introduziu uma password
+Changes successfully saved: Alterações gravadas com sucesso
+
+
+###############################################
+# Page: export.php
+#
+Export format: Formato da exportação
+Palm Pilot: Palm Pilot
+Include all layers: Incluir todos os níveis
+Export all dates: Exportar todas as datas
+Start date: Data de início
+End date: Data final
+Modified since: Modificado desde
+Export: Exportar
+
+
+###############################################
+# Page: export_handler.php
+#
+export format not defined or incorrect: formato de exportação não definido ou incorrecto
+
+
+###############################################
+# Page: group_edit.php
+#
+Unnamed Group: Grupo Sem Nome
+Add Group: Adicionar Grupo
+Edit Group: Editar Grupo
+Group name: Nome de grupo
+Updated: Actualizado
+Created by: Criado por
+Users: Utilizadores
+
+
+###############################################
+# Page: group_edit_handler.php
+#
+You must specify a group name: Deve especificar um nome de grupo
+
+
+###############################################
+# Page: groups.php
+#
+Add New Group: Adicionar Novo Grupo
+
+
+###############################################
+# Page: pref.php
+#
+Preferences: Preferências
+Save Preferences: Gravar Preferências
+to modify the preferences for the Public Access calendar: para modificar as preferências do calendário de Acesso Público
+tz-help: Quantas horas para ajustar o tempo à hora local
+Timezone Offset: Offset de Zona Horária
+Add N hours to: Adicionar N horas a
+Subtract N hours from: Subtrair N horas a
+same as: igual a
+server time: hora do servidor
+Default Category: Categoria por Omissão
+When I am the boss: Quando for o administrador
+Email me event notification: Enviar-me uma mensagem de notificação de evento
+I want to approve events: Quero aprovar eventos
+Subscribe/Publish: Subscrever/Publicar
+#
+# << MISSING >>
+# allow-remote-subscriptions-help:
+# English text: Specifies if remote users can subscribe to your calendar, allowing them to see your events in a iCal-enabled application (such as Apple's iCal or Mozilla Calendar).
+#
+#
+# << MISSING >>
+# remote-subscriptions-url-help:
+# English text: Displays the URL remote users should use to subscribe to your calendar.
+#
+URL: URL
+Sun: Dom
+Mon: Seg
+Tue: Ter
+Wed: Qua
+Thu: Qui
+Fri: Sex
+Sat: Sáb
+
+
+###############################################
+# Page: help_bug.php
+#
+Report Bug: Relatório de Erro (bug)
+
+
+###############################################
+# Page: help_edit_entry.php
+#
+Adding/Editing Calendar Entries: Adicionar/Editar Entradas
+Brief Description: Breve Descrição
+brief-description-help: Breve descrição (cerca de 20 caracteres) do evento. Esta descrição representa o evento na vista global do calendário.
+Full Description: Descrição Completa
+full-description-help: Descrição completa do evento. Esta informação é apresentada quando o utilizador verifica o evento isoladamente.
+date-help: Especifica a data do evento.
+time-help: Especifica a hora do evento. Este campo é opcional.
+duration-help: Especifica a duração do evento em minutos. Este campo é opcional.
+#
+# << MISSING >>
+# end-time-help:
+# English text: Specifies the time the event is expected to end.
+#
+Priority: Prioridade
+priority-help: Especifica a prioridade do evento. Prioridade Alta é apresentada num tipo de letra mais escuro.
+Access: Accesso
+access-help: Especifica o nível de acesso do evento. <BR><I>Público</I> Todos os intervenientes podem ver todos os detalhes do evento. <BR><I>Confidencial</I> Outros utilizadores poderão ver que tem um evento marcado, mas não podem visualizar os detalhes.
+Participants: Participantes
+participants-help: Lista os participantes neste evento.
+Repeat Type: Tipo de repetição
+repeat-type-help: Selecciona a periodicidade do evento. <I>Mensal (por dia)</I> faz com que o evento se repita no 1º dia do mês, 3º dia do mês, etc. <I>Mensal (por data)</I> faz com que um evento se repita todos os meses no mesmo dia.
+Repeat End Date: Data para fim de repetição
+repeat-end-date-help: Especifica a data até à qual o evento se repete.
+Repeat Day: Dia a repetir
+repeat-day-help: Especifica em que dias da semana o evento se repete. Isto é apenas utilizado quando o <I>Tipo de repetição</I> tem o valor de <I>Semanal</I>.
+Frequency: Frequência
+repeat-frequency-help: Especifica quantas vezes o evento se deve repetir. O valor padrão (1) indica que o evento acontece todos os dias. Especificar 2 faz com que o evento se repita noutra semana (se <I>Tipo de repetição</I> tem o valor de <I>Semanal</I>), todos os meses (se <I>Tipo de repetição</I> tem o valor de <I>Mensal</I>), etc.
+
+
+###############################################
+# Page: help_index.php
+#
+Help Index: Ajuda
+Layers: Níveis
+Import: Importar
+
+
+###############################################
+# Page: help_layers.php
+#
+Layers are useful for displaying other users' events in your own calendar. You can specifiy the user and the color the events will be displayed in.: Os níveis são apropriados para mostrar eventos doutros utilizadores no seu calendário. Pode especificar o utilizador e a cor dos eventos a mostrar.
+Add/Edit/Delete: Adicionar/Editar/Apagar
+Clicking the Edit Layers link in the admin section at the bottom of the page will allow you to add/edit/delete layers.: Clicar na ligação "Editar Níveis", na secção administrativa do fundo da página, permite adicionar/editar/apagar níveis.
+Specifies the user that you would like to see displayed in your calendar.: Especifica o utilizador que deseja visualizar no seu calendário
+The text color of the new layer that will be displayed in your calendar.: A cor do texto do novo nível que será usada no seu calendário.
+If checked, events that are duplicates of your events will be shown.: Quando activo, mostra eventos que são duplicados dos seus eventos.
+Disabling: Desactivando
+Press the Disable Layers link in the admin section at the bottom of the page to turn off layers.: Clique na ligação "Desactivar Níveis", na secção administrativa do fundo da página, para desactivar os níveis.
+Enabling: Activando
+Press the Enable Layers link in the admin section at the bottom of the page to turn on layers.: Clique na ligação "Activar Níveis", na secção administrativa do fundo da página, para activar os níveis.
+
+
+###############################################
+# Page: help_admin.php
+#
+Display days with events in bold in year view: Mostrar dias com eventos em negrito na vista anual
+Nonuser: Informação anónima
+Reports: Relatórios
+
+
+###############################################
+# Page: layers.php
+#
+to modify the layers settings for the: para modificar a configuração de níveis para
+Layers are currently: Os níveis estão actualmente
+Enabled: Activados
+Disabled: Desactivados
+Disable Layers: Desactivar Níveis
+Enable Layers: Activar Níveis
+Layer: Nível
+Edit layer: Editar nível
+Add layer: Adicionar nível
+
+
+###############################################
+# Page: list_unapproved.php
+#
+View this entry: Visualizar esta entrada
+Approve/Confirm: Aprovar/Confirmar
+Approve this entry?: Aprovar esta entrada?
+Reject this entry?: Rejeitar esta entrada?
+Reject: Rejeitar
+No unapproved events for: Não há eventos por aprovar para
+Unapproved Events: Eventos Não Aprovados
+
+
+###############################################
+# Page: view_entry.php
+#
+Low: Baixa
+Medium: Média
+High: Alta
+every: todos
+2nd: 2º
+3rd: 3º
+4th: 4º
+5th: 5º
+1st: 1º
+last: último
+by date: por data
+Confidential: Confidencial
+Description: Descrição
+Status: Estado
+Waiting for approval: À espera de aprovação
+Deleted: Apagada
+Rejected: Rejeitada
+All day event: Evento de dia completo
+Public: Público
+Category: Categoria
+days: dias
+day: dia
+hours: horas
+minute: minuto
+before event: antes do evento
+External User: Utilizador anónimo
+Approve/Confirm entry: Aprovar/Confirmar entrada
+Reject entry: Rejeitar entrada
+Set category: Definir categoria
+Edit repeating entry for all dates: Editar entrada repetitiva em todas as datas
+Edit entry for this date: Editar entrada desta data
+Delete repeating event for all dates: Apagar entrada repetitiva em todas as datas
+This will delete this entry for all users.: Isto apagará esta entrada para todos os utilizadores.
+Delete entry only for this date: Apagar entrada desta data
+Edit entry: Editar entrada
+Delete entry: Apagar entrada
+Copy entry: Copiar entrada
+This will delete the entry from your calendar.: Isto apagará a entrada do seu calendário.
+Add to My Calendar: Adicionar ao Meu Calendário
+Do you want to add this entry to your calendar?: Quer adicionar esta entrada ao seu calendário?
+This will add the entry to your calendar.: Isto adicionará a entrada ao seu calendário.
+Email all participants: Enviar email a todos os participantes
+Show activity log: Mostrar registo de actividades
+Hide activity log: Esconder registo de actividades
+Export this entry to: Exportar esta entrada para
+
+
+###############################################
+# Page: reject_entry.php
+#
+An appointment has been rejected by: Uma marcação foi rejeitada por
+The description is: A descrição é
+Title: Título
+
+
+###############################################
+# Page: search.php
+#
+Search: Pesquisar
+Keywords: Palavras
+Advanced Search: Pesquisa Avançada
+
+
+###############################################
+# Page: search_handler.php
+#
+You must enter one or more search keywords: Tem de introduzir uma ou mais palavras de pesquisa
+Search Results: Resultados da pesquisa
+match found: Ocorrência encontrada
+matches found: Ocorrências encontradas
+No matches found: Ocorrências não encontradas
+
+
+###############################################
+# Page: select_user.php
+#
+View Another User's Calendar: Ver Calendário de Outro Utilizador
+Go: Ver
+
+
+###############################################
+# Page: users.php
+#
+Account: Perfil
+Add New User: Adicionar Novo Utilizador
+denotes administrative user: administrador
+
+
+###############################################
+# Page: usersel.php
+#
+All: Todos
+None: Nenhuma
+Reset: Reiniciar
+Remove: Apagar
+Ok: Ok
+Cancel: Cancelar
+
+
+###############################################
+# Page: import.php
+#
+Import format: Formato de importação
+Exclude private records: Excluir eventos privados
+Overwrite Prior Import: Escrever sobre importação anterior
+
+
+###############################################
+# Page: login.php
+#
+Invalid login: Acesso inválido
+You must enter a login and password: Tem de introduzir um Utilizador e uma Password
+Username: Utilizador
+Password: Password
+Save login via cookies so I don't have to login next time: Gravar Utilizador e Password para sessões futuras (não recomendado se este computador for utilizado por mais pessoas)
+Login: Entrar
+Access public calendar: Calendário de acesso público
+cookies-note: <B>Nota:</B> Esta opção requer a activação da opção de 'cookies' no seu navegador.
+
+
+###############################################
+# Page: views.php
+#
+Views: Vistas
+Add New View: Adicionar Nova Vista
+
+
+###############################################
+# Page: views_edit.php
+#
+Unnamed View: Vista sem Nome
+Add View: Adicionar Vista
+Edit View: Editar Vista
+View Name: Nome da Vista
+View Type: Tipo de Vista
+Week (Users horizontal): Semana (Utilizadores na horizontal)
+Week (Users vertical): Semana (Utilizadores na vertical)
+Week (Timebar): Semana (Barra temporal)
+Month (Timebar): Mês (Barra temporal)
+Month (side by side): Mês (lado a lado)
+Month (on same calendar): Mês (no mesmo calendário)
+preview: previsão
+
+
+###############################################
+# Page: nonusers.php
+#
+NONUSER_PREFIX not set: Prefixo de acesso público por definir!
+Add New NonUser Calendar: Adicionar Novo Calendário Público
+
+
+###############################################
+# Page: nonusers_handler.php
+#
+Calendar ID: ID do calendário
+word characters only: apenas caracteres de palavras (a-zA-Z_0-9)
+
+
+###############################################
+# Page: help_pref.php
+#
+default-category-help: Especifica a categoria, por omissão, a que um novo deverá pertencer.
+
+
+###############################################
+# Page: report.php
+#
+Untimed event: Evento não temporizado
+Private: Privado
+Approved: Aprovada
+Unknown: Desconhecida
+to manage reports for the Public Access calendar: para gerir relatórios do calendário de Acesso Público
+Add new report: Adicionar novo relatório
+Invalid report id: Identificador de relatório inválido
+Manage Reports: Gerir Relatórios
+
+
+###############################################
+# Page: views_edit_handler.php
+#
+You must specify a view name: Deve especificar un nome de vista
+
+
+###############################################
+# Page: week_details.php
+#
+New Entry: Nova entrada
+am: AM
+pm: PM
+
+
+###############################################
+# Page: import_handler.php
+#
+Import Results: Importar Resultados
+Events successfully imported: Eventos importados com sucesso
+Events from prior import marked as deleted: Eventos de importações anteriores marcadas para remoção
+Conflicting events: Eventos conflituosos
+Errors: Erros
+There was an error parsing the import file or no events were returned: Ocorreu um erro ao interpretar o ficheiro ou não foram encontrados eventos
+The import file contained no data: O ficheiro não contém dados
+The following conflicts with the suggested time: O seguinte está em conflito com a hora sugerida
+Unnamed Event: Evento sem Nome
+Scheduling Conflict: Conflito na Marcação
+conflicts with the following existing calendar entries: está em conflito com os seguintes eventos
+Event Imported: Evento Importado
+
+
+###############################################
+# Page: edit_entry.php
+#
+Edit Entry: Editar Entrada
+Add Entry: Adicionar Entrada
+Details: Detalhes
+Scheduling: Escalonamento
+Repeat: Repetição
+category-help: Especifica a categoria do evento.
+Timed event: Evento temporizado
+#
+# << MISSING >>
+# external-participants-help:
+# English text: Specifies a list of participants for the event that are not calendar users. The users should be listed one per line and can include an email address. If an email address is specified, the user is eligible to receive notications and reminders.
+#
+External Participants: Participantes Externos
+Daily: Diário
+Weekly: Semanal
+Monthly: Mensal
+by day: por dia
+by day (from end): por dia a contar do fim
+Yearly: Anual
+Use end date: Utilizar data de fim de repetição
+Tuesday: Terça
+Wednesday: Quarta
+Thursday: Quinta
+Friday: Sexta
+Saturday: Sábado
+You are not authorized to edit this entry: Não está autorizado a editar esta entrada
+
+
+###############################################
+# Page: edit_report.php
+#
+Tomorrow: Amanhã
+Today: Hoje
+Yesterday: Ontem
+Day before yesterday: Anteontem
+Next week: Próxima semana
+This week: Semana corrente
+Last week: Semana passada
+Week before last: Semana antepassada
+Next week and week after: Semanas seguintes
+This week and next week: Semana corrente e seguinte
+Last week and this week: Semana passada e corrente
+Last two weeks: Últimas duas semanas
+Next month: Próximo mês
+This month: Mês corrente
+Last month: Mês passado
+Month before last: Mês antepassado
+Next year: Próximo ano
+This year: Ano corrente
+Last year: Ano passado
+Year before last: Ano antepassado
+Unnamed Report: Relatório sem nome
+Add Report: Adicionar Relatório
+Edit Report: Editar Relatório
+Report name: Nome de Relatório
+Current User: Utilizador Corrente
+Include link in trailer: Incluir link no rodapé
+Include standard header/trailer: Incluir cabeçalho/rodapé standard
+Date range: Gama de datas
+Include previous/next links: Incluir links anteriores/seguintes
+Include empty dates: Incluir datas vazias
+Template variables: Variáveis padrão
+Page template: Página padrão
+Day template: Dia padrão
+Event template: Evento padrão
+Are you sure you want to delete this report?: Tem a certeza que deseja apagar este relatório?
+
+
+###############################################
+# Page: assistant_edit.php
+#
+Assistants: Assistentes
+Your assistants: Seus assistentes
+
+
+###############################################
+# Page: adminhome.php
+#
+Delete Events: Remover Eventos
+Public Preferences: Preferências Públicas
+Unapproved Public Events: Eventos Públicos por Aprovar
+Administrative Tools: Ferramentas administrativas
+
+
+###############################################
+# Page: purge.php
+#
+Purging events for: Removendo eventos de
+Finished: Terminado
+Delete all events before: Remover todos os eventos antes de
+Check box to delete <b>ALL</b> events for a user: Seleccione caixa para remover <b>TODOS</b> os eventos do utilizador
+Are you sure you want to delete events for: Tem a certeza que quer apagar entradas para
+Records deleted from: Remover registos de
+
+
+###############################################
+# Page: set_entry_cat.php
+#
+You have not added any categories: Não adicionou nenhuma categoria
+Set Category: Definir Categoria
+
+
+###############################################
+# Page: help_import.php
+#
+Palm Desktop: Palm PDA
+This form will allow you to import entries from the Palm Desktop Datebook.: Este formulário permite importar entradas do Palm Datebook.
+It should be located in your Palm directory in <tt>datebook/datebook.dat</tt> in a subdirectory named by your username.: Deverá estar localizado no directório Palm em <tt>datebook/datebook.dat</tt> dentro de subdirectório com o seu nome de utilizador
+The following entries will not be imported: As seguintes entradas serão importadas
+Entries older than the current date: Entradas mais antigas do que a data corrente
+Entries created in the Palm Desktop that have not been HotSync'd: Entradas criadas no Palm Desktop que não foram HotSync'd
+Anything imported from Palm will be overwritten during the next import (unless the event date has passed).: Informação importada do Palm será sobreescrita na próxima importação (excepto se a data do evento tiver passado).
+Therefore, updates should be made in the Palm Desktop.: Assim sendo, deverão ser feitas actualizações no Palm.
+vCal: vCal
+This form will import vCalendar (.vcs) 1.0 events: Este formulário permite importar eventos vCalendar 1.0 (.vcs)
+The following formats have been tested: Os seguintes formatos foram testados
+Palm Desktop 4: Palm 4 PDA
+Lotus Organizer 6: Lotus Organizer 6
+Microsoft Outlook 2002: Microsoft Outlook 2002:
+iCalendar: iCalendar
+This form will import iCalendar (.ics) events: Este formulário irá importar eventos iCalendar (.ics)
+Enabling <b>Overwrite Prior Import</b> will cause events imported previously that used the same UID as an event from the new import file to be marked as deleted. This should allow an updated iCalendar file to be imported without creating duplicates.: Activar este mecanismo irá apagar eventos conflituosos e evitar duplicações.
+
+
+###############################################
+# Page: edit_report_handler.php
+#
+Variable N not found: Variável N não existente
+
+
+###############################################
+# Page: edit_entry_handler.php
+#
+A new appointment has been made for you by: Uma nova marcação foi criada para si por
+An appointment has been updated by: Uma marcação foi actualizada por
+The subject is: O assunto é
+Please look on: Por favor veja em
+to accept or reject this appointment: para aceitar ou rejeitar este evento
+to view this appointment: para ver este evento
+Your suggested time of: A sua hora sugerida de
+
+
+###############################################
+# Page: edit_nonusers.php
+#
+Edit User: Editar Utilizador
+Add User: Adicionar Utilizador
+First Name: Primeiro Nome
+Last Name: Último Nome
+
+
+###############################################
+# Page: edit_template.php
+#
+Edit Custom Script/Stylesheet: Editar Script/Folha de estilo Personalizada
+Edit Custom Header: Editar Cabeçalho Personalizado
+Edit Custom Trailer: Editar Rodapé Personalizado
+
+
+###############################################
+# Page: edit_user.php
+#
+E-mail address: Endereço de email
+again: novamente
+Disabled for demo: Desactivado em modo demo
+Are you sure you want to delete this user?: Tem a certeza que quer remover este utilizador?
+Change Password: Alterar Password
+New Password: Nova Password
+Set Password: Gravar Password
+
+
+###############################################
+# Page: includes/trailer.php
+#
+Go to: Ir para
+My Calendar: Meu Calendário
+Back to My Calendar: Voltar ao Meu Calendário
+Another User's Calendar: Calendário de Outro Utilizador
+Add New Entry: Adicionar Nova Entrada
+Logout: Sair
+Manage calendar of: Gerir calendário de
+
+
+###############################################
+# Page: includes/user.php
+#
+incorrect password: password incorrecta
+no such user: utilizador não encontrado
+Invalid user login: Acesso inválido
+
+
+###############################################
+# Page: includes/site_extras.php
+#
+Send Reminder: Enviar Lembrete
+
+
+###############################################
+# Page: includes/config.php
+#
+#
+# << MISSING >>
+# English:
+#
+# << MISSING >>
+# Basque:
+#
+# << MISSING >>
+# Bulgarian:
+#
+# << MISSING >>
+# Catalan:
+#
+# << MISSING >>
+# Chinese (Traditonal/Big5):
+#
+# << MISSING >>
+# Chinese (Simplified/GB2312):
+#
+# << MISSING >>
+# Czech:
+#
+# << MISSING >>
+# Danish:
+#
+# << MISSING >>
+# Dutch:
+#
+# << MISSING >>
+# Estonian:
+#
+# << MISSING >>
+# Finnish:
+#
+# << MISSING >>
+# French:
+#
+# << MISSING >>
+# Galician:
+#
+# << MISSING >>
+# German:
+#
+# << MISSING >>
+# Holo (Taiwanese):
+#
+# << MISSING >>
+# Hungarian:
+#
+# << MISSING >>
+# Icelandic:
+#
+# << MISSING >>
+# Italian:
+#
+# << MISSING >>
+# Japanese:
+#
+# << MISSING >>
+# Korean:
+#
+# << MISSING >>
+# Norwegian:
+#
+# << MISSING >>
+# Polish:
+Portuguese: Português
+#
+# << MISSING >>
+# Portuguese/Brazil:
+#
+# << MISSING >>
+# Russian:
+#
+# << MISSING >>
+# Spanish:
+#
+# << MISSING >>
+# Swedish:
+#
+# << MISSING >>
+# Turkish:
+
+
+###############################################
+# Page: includes/functions.php
+#
+This event is confidential: Este evento é confidencial
+exceeds limit of XXX events per day: excede o limite de XXX eventos por dia
+You have XXX unapproved events: Tem XXX evento(s) por aprovar
+January: Janeiro
+February: Fevereiro
+March: Março
+April: Abril
+May_: Maio
+June: Junho
+July: Julho
+August: Agosto
+September: Setembro
+October: Outubro
+November: Novembro
+Jan: Jan
+Feb: Fev
+Mar: Mar
+Apr: Abr
+May: Mai
+Jun: Jun
+Jul: Jul
+Aug: Ago
+Sep: Set
+Oct: Out
+Nov: Nov
+Dec: Dez
+
+
+###############################################
+# Page: includes/js/admin.php
+#
+Server URL is required: É necessário o URL do servidor
+Server URL must end with '/': O URL do servidor deve terminar com '/'
+Invalid work hours: Horas de trabalho incorrectas
+Invalid color for document background: Cor inválida para o fundo do documento
+Invalid color for document title: Cor inválida para o título do documento
+Invalid color for table cell background: Cor inválida para o fundo da célula da tabela
+Invalid color for table grid: Cor inválida para a grelha da tabela
+Invalid color for table header background: Cor inválida para o fundo do cabeçaºho da tabela
+Invalid color for table text background: Cor inválida para o fundo do texto da tabela
+Invalid color for event popup background: Cor inválida para o fundo da caixa de aviso
+Invalid color for event popup text: Cor inválida para o texto da caixa de aviso
+Invalid color for table cell background for today: Cor inválida para o fundo da célula da tabela (para o dia actual)
+Color format should be '#RRGGBB': O formato do código de cor deve ser '#RRGGBB'
+
+
+###############################################
+# Page: includes/js/edit_entry.php
+#
+You have not entered a Brief Description: Não introduziu uma breve descrição
+You have not entered a valid time of day: Não introduziu uma hora do dia válida
+The time you have entered begins before your preferred work hours. Is this correct?: A hora introduzida é anterior ao seu período de trabalho. Tem a certeza?
+
+
+###############################################
+# Page: includes/js/edit_layer.php
+#
+Invalid color: Cor inapropriada
+
+
+###############################################
+# Page: tools/send_reminders.php
+#
+This is a reminder for the event detailed below.: Isto é um lembrete do evento seguinte.
+Reminder: Lembrete
Modified: branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese_BR.txt
===================================================================
--- branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese_BR.txt 2008-01-06 19:07:26 UTC (rev 6323)
+++ branches/Branch_4_6dev/gforge/plugins/webcalendar/www/translations/Portuguese_BR.txt 2008-01-09 13:51:10 UTC (rev 6324)
@@ -1,1019 +1,1019 @@
-# Brazilian Portuguese Translation
-# Revision 1.0
-# Translated by: Mauricio Piza - mpiza at formare.com.br
-#
-# Based in Portuguese version, by Paulino Michelazzo - paulino at michelazzo.com.br
-# Based in Portuguese version, by José Roberto Kerne - joseroberto at dicaslinux.com.br
-# Based in Portuguese version, by Sérgio Oliveira - sloliv at terra.com.br
-# Based in Portuguese version, by Nuno Lopes - nml at maxitel.pt
-# Based in Portuguese version, by Andre Oliveira - zack22 at ig.com.br
-#
-# Last update: 23 June 2005
-# Translation last updated on 06-23-2005
-
-# No charset specified (not needed for iso-8859-1)
-# "charset" is used in a meta tag, do not translate "charset" here.
-# charset:
-
-
-
-###############################################
-# Page: activity_log.php
-#
-Activity Log: Log de Atividade
-Admin: Admin
-User: Usuário
-Calendar: Calendário
-Date: Data
-Time: Hora
-Event: Evento
-Action: Ação
-Event created: Evento criado
-Event approved: Evento aprovado
-Event rejected: Evento rejeitado
-Event updated: Evento atualizado
-Event deleted: Evento deletado
-Notification sent: Notificação enviada
-Reminder sent: Lembrete enviado
-Database error: Erro no banco de dados
-Previous: Anterior
-Events: Eventos
-Next: Próximo
-
-
-###############################################
-# Page: add_entry.php
-#
-Invalid entry id: Entrada com ID inválido
-This is a private event and may not be added to your calendar.: Este é um evento privado e não pode ser adicionado ao seu calendário.
-Error adding event: Erro adicionando evento
-
-
-###############################################
-# Page: admin.php
-#
-System Settings: Configurações
-Help: Ajuda
-You are not authorized: Você não está autorizado
-Note: Nota
-Your user preferences: Suas preferências
-may be affecting the appearance of this page.: podem afetar a aparência desta página.
-Click here: Clique aqui
-to not use your user preferences when viewing this page: para não usar suas preferências quando visualizar esta página
-are being ignored while viewing this page.: são ignoradas enquanto visualizar esta página
-to load your user preferences when viewing this page: para carregar suas preferências quando visualizar esta página
-Save: Salvar
-Settings: Configurações
-Public Access: Acesso Público
-Groups: Grupos
-NonUser Calendars: Calendários de não-usuário
-Other: Outros
-Email: E-mail
-colors-help: Todas as cores devem ser especificadas no formato hexadecimal "#RRGGBB".
-Colors: Cores
-app-name-help: Especificar o nome do aplicativo a ser mostrado na barra de título
-Application Name: Nome da Aplicação
-server-url-help: Especificar a URL base para a aplicação.
-Server URL: URL do Servidor
-language-help: Especificar o idioma a ser utilizado.
-Language: Idioma
-Your browser default language is: O idioma padrão do seu browser é:
-fonts-help: Especificar uma lista de fontes do sistema para uso (Exemplo: Arial, Verdana)
-Fonts: Fontes
-custom-script-help: Permite a indicação de Javacript ou folha de estilos própria que pode ser inserida na seção "head" de cada página
-Custom script/stylesheet: Script/Folha de estilos própria
-Yes: Sim
-No: Não
-Edit: Editar
-custom-header-help: Permite a inclusão de um pedaço de código HTML no topo de todas as páginas
-Custom header: Cabeçalho customizado
-custom-trailer-help: Permite a inclusão de um pedaço de código HTML no rodapé de todas as páginas
-Custom trailer: Rodapé customizado
-preferred-view-help: Especificar a visualização padrão (Dia, Semana, Mês ou Ano)
-Preferred view: Visualização preferida
-Day: Dia
-Week: Semana
-Month: Mês
-Year: Ano
-display-weekends-help: Mostrar feriados na visualização semanal
-Display weekends in week view: Mostrar feriados na visualização semanal
-yearly-shows-events-help: Na visualização anual, mostrar dias que contenham eventos em negrito
-Display days with events in bold in month and year views: Na visualização anual, mostrar em negrito dias que contenham eventos
-display-desc-print-day-help: Incluir descrições de evento na versão para impressão da visualização diária
-Display description in printer day view: Mostrar descrição na visualização diária
-date-format-help: Especifique um formato de data preferido.
-Date format: Formato da Data
-December: Dezembro
-time-format-help: Especifica o formato da hora a ser utilizada: <br /><i>12 horas
-Time format: Formato da Hora
-12 hour: 12 horas
-24 hour: 24 horas
-time-interval-help: Especifique quantos blocos devem ser mostrados na visualização
-Time interval: Intervalo de Tempo
-hour: hora
-minutes: minutos
-auto-refresh-help: Quando habilitado, as visões diaria, semanal, mensal, e a lista de páginas não aprovadas são todas auto-atulaizadas periodicamente
-Auto-refresh calendars: Auto-atualizar o calendário
-auto-refresh-time-help: Se a auto-atualização estiver habilitada, este é o tempo entre atualizações
-Auto-refresh time: Tempo de auto-atualização
-require-approvals-help: Quando habilitada, um usuário precisa aprovar um evento antes dele ser exibido no seu calendário (a não ser que Exibir não-aprovados esteja habilitado). Configurar aqui para "Não" não desligará as aprovações para o calendário de Acesso Público (se o claendário público estiver habilitado).
-Require event approvals: Requer aprovação do evento
-display-unapproved-help: Especifica se eventos não-aprovados são exibidos em seu calendário.<br /> Se configurado para "Sim", então eventos não-aprovados serão exibidos em seu calendário (em uma cor de texto diferente. <br /> Se configurado para "Não", então eventos precisam ser aprovados antes deles serem exibidos no seu calendário.
-Display unapproved: Visualizar não-aprovados
-display-week-number-help: Especifica se o número da semana (1-52) deve ser exibido na visão mensal e na visão semanal.
-Display week number: Visualizar número da semana
-display-week-starts-on: Especifica se a semana começa em uma Segunda ou um Domingo. Se a Segunda for especificada, os números de semana serão números ISO.
-Week starts on: Semana começa em
-Sunday: Domingo
-Monday: Segunda
-work-hours-help: Especifica as horas apresentadas para marcação de eventos.
-Work hours: Horário de trabalho
-From: De
-to: para
-disable-priority-field-help: Selecionando "Sim" será removido o campo "Prioridades"
-Disable Priority field: Desabilitar campo de Prioridade
-disable-access-field-help: Selecionar "Sim" removerá o campo"Acesso" das páginas de informações de evento, oferecendo uma interface mais simples para iniciantes.
-Disable Access field: Desabilitar campo Acesso
-disable-participants-field-help: Selecionar "Sim" removerá o campo "Participantes" da página de informações de evento, impedindo que usuários coloquem outros usuários em seus eventos. Se você habilitar esta opção, você pode tambem querer desabilitar o campo "Permitir visualização de calendários de outros usuários" tambem.
-Disable Participants field: Desabilitar campo Participantes
-disable-repeating-field-help: Selecionar "Sim" removerá o campo "Repetir" quando eventos forem ser adicionados. Isto oferecerá uma interface mais simplespara usuários iniciantes.
-Disable Repeating field: Desabilitar campo Repetição
-popup-includes-siteextras-help: Se habilitado, permitir setup de campos de evento customizados no arquivo site_extras.php que serão exibidos nos pop-ups de evento.
-Display Site Extras in popup: Exibir extras do site em popup
-allow-html-description-help: Se habilitado, os usuáriospodem inserir HTML no campo de descrição do evento. Se desabilitado, as tags serão ignoradas de maneira a aparecer como texto simplest. Atenção: Habilitar esta funcionalidade permitirá aos usuários referenciar imagens em outros sites.
-Allow HTML in Description: Permitir HTML na descrição
-allow-view-other-help: Especifica um usuário que poderá visualizar o calendário
-Allow viewing other user's calendars: Permitir visualização do calendário de outro usuário
-allow-view-add-help: Um ícone '+' será incluido nas visualizações, permitindo usuários rápidamente adicionar eventos a calendários de outros usuários.
-Include add event link in views: Incluir adicionar eventos em visualizações
-remember-last-login-help: Quando ligado, o logon do usuário poderá ser automaticamente lembrado
-Remember last login: Lembrar ultimo acesso
-conflict-check-help: Verificar se o evento está em conflito (dois eventos agendado no mesmo horário)
-Check for event conflicts: Verificar eventos conflitantes
-conflict-months-help: Se a verificação de conflitos estiver funcionando ("Verificar eventos conflitantes" estiver configurado para "Não"), isto especifica por quantos meses no futuro verificaremos a existência de conflitos. Se você achar que adicionar eventos está demorando demais, reduza este número.
-Conflict checking months: Verificar conflitos no mês
-conflict-check-override-help: Permite aos usuários ignorar conflitos e programar 2 ou mais eventos para a mesma hora.
-Allow users to override conflicts: Permitir aos usuários sobrescrever conflitos
-limit-appts-help: Permitite ao administrador de sistema definir um limite geral para o número de compromissos um único usuário pode ter por dia.
-Limit number of timed events per day: Limitar o número de eventos por dia
-limit-appts-number-help: Especifica o número máximo de eventos um usuário pode ter em um único dia.
-Maximum timed events per day: Número máximo de eventos por dia
-timed-evt-len-help: Especifica o método de entrada para determinar a duração de um evento.
-Specify timed event length by: Especificar evento por
-Duration: Duração
-End Time: Hora de término
-Plugins: Plugins
-plugins-enabled-help: Habilitar aplicações plugin
-Enable Plugins: Habilitar Plugins
-plugins-sort-key-help: Especifica uma chave de ordenação para o plugin. Isto permite que os plugins apareçam em uma ordem específica.
-Plugin: Plugin
-allow-public-access-help: Quando habilitado, o calendário pode ser usado como um calendário público somente leitura que não exige login dos usuários.
-Allow public access: Permitir acesso público
-public-access-default-visible: Eventos do calendário público aparecerão automáticamente em todos os calendários de usuários
-Public access visible by default: Acesso público é visível por default
-public-access-default-selected: Quando adicionando um evento novo, o usuário público será selecionado como participante por default.
-Public access is default participant: Acesso público é participante por default
-public-access-view-others-help: Quando acessando o sistema pelo Acesso Público, especifica se o usuário pode ver o calendário de outro usuário de calendário.
-Public access can view other users: Acesso público pode ver outros usuários
-public-access-can-add-help: Quando habilitado, usuários que acessem o sistema através de Acesso Público poderão adicionar novos eventos, mas eles não aparecerão no calendário até que um administrador aprovar o novo evento.
-Public access can add events: Acesso público pode criar eventos
-public-access-add-requires-approval-help: Especifica se eventos adicionados através da conta de acesso público necessitam de aprovação antes de serem exibidos.
-Public access new events require approval: Novos eventos de acesso público necessitam aprovação
-public-access-sees-participants-help: Se habilitado, usuários acessando o calendário da conta pública serão capazes de ver os participantes do evento ao olharem os detalhes de um evento.
-Public access can view participants: Acesso público pode ver participantes
-groups-enabled-help: Habilitar suporte a grupos, permintindo a seleção de usuário
-Groups enabled: Grupos está habilitado
-user-sees-his-group-help: Se habilitado, usuários não poderão visualizar usuários de grupos dos quais não participe.
-User sees only his groups: Usuário apenas visualiza seus grupos
-nonuser-enabled-help: Se habilitado, admins terão a opção de criar calendários de não-usuário
-Nonuser enabled: Habilitada criação de calendários de não-usuário
-nonuser-list-help: Aonde exibir os calendários de não-usuário na lista de parcipantes
-Nonuser list: Exibir na lista de participantes no
-Top: Topo
-Bottom: Rodapé
-reports-enabled-help: Se habilitado, os usuários verão uma seção "Relatórios" no pé de cada página e terão a permissão de criar relatórios personalizados. Usuarios admin poderão criar relatórios globais que aparecerão no rodapé de todas as páginas de usuários.
-Reports enabled: Relatórios habilitados
-subscriptions-enabled-help: Especifica se usuários remotos podem assinar o calendário de um usuário do WebCalendar, permitindo-os ver os eventos do usuário WebCalendar em sua aplicação iCal (tais como iCal da Apple's ou Calendário Mozilla).
-Allow remote subscriptions: Permitir assinaturas remotas
-categories-enabled-help: Habilitar suporte a categoria do evento.
-Categories enabled: Categorias habilitadas.
-allow-external-users-help: Especifica se um usuário sem calendário pode ser adicionado a um evento. Isto permite que usuários sem calendário sejam listados como participantes de evento.
-Allow external users: Permitir usuários externos
-external-can-receive-notification-help: Quando usuários externos estiverem habilitados e o uso de emails está habilitado, usuários externos podem receber notificações de email quando o evento é adicionado, atualizado ou excluido (se o email do usuário externo for fornecido).
-External users can receive email notifications: Usuários externos podem receber notificações por email
-external-can-receive-reminder-help: Quando usuários externos estiverem habilitados e o uso de emails está habilitado, usuários externospodem receber lembretes por email (se o email do usuário externo for fornecido).
-External users can receive email reminders: Usuários externos podem receber lembretes por email
-email-enabled-help: Ativar ou desativar notificação por e-mail para agendamento
-Email enabled: E-mail ligado
-email-default-sender: Especificar endereço de e-mail para envio de notificações
-Default sender address: Usuário padrão para envio
-Default user settings: Configurações padrão do usuário
-email-event-reminders-help: Especificar envio ou não de lembretes.
-Event reminders: Lembrete do evento
-email-event-added: Especifica se notificações por email deverão ou não ser mandadas quando um evento é adicionado ao seu calendário.
-Events added to my calendar: Eventos adicionados em meu calendário
-email-event-updated: Especifica se notificações por email deverão ou não ser mandadas quando um evento é atualizado no seu calendário.
-Events updated on my calendar: Eventos atualizados em meu calendário
-email-event-deleted: Especifica se notificações por email deverão ser mandadas ou não quando um evento é removido do seu calendário.
-Events removed from my calendar: Eventos removidos em meu calendário
-email-event-rejected: Especifica se notificações por emaildeverão ser mandadas ou não quando um participante rejeita um evento que está no seu calendário.
-Event rejected by participant: Evento rejeitado pelo participante
-Allow user to customize colors: Permitir ao usuário customizar suas cores.
-Enable gradient images for background colors: Permitir imagens em gradiente para cores de fundo
-Not available: Não disponível
-Document background: Fundo do documento
-Select: Selecionar
-Document title: Título do documento
-Document text: Texto do documento
-Table grid color: Cor da grade da tabela
-Table header background: Cor de fundo do cabeçalho
-Table header text: Texto do cabeçalho da tabela
-Table cell background: Fundo da célula da tabela
-Table cell background for current day: Fundo da célula da tabela (para o dia atual)
-Table cell background for weekends: Fundo da célula para feriados
-Event popup background: Fundo para eventos pop-up
-Event popup text: Texto para eventos pop-up
-
-
-###############################################
-# Page: adminhome.php
-#
-Preferences: Preferências
-Users: Usuários
-Account: Conta
-Assistants: Assistentes
-Categories: Categorias
-Views: Visualizações
-Layers: Níveis
-Reports: Relatórios
-Delete Events: Exclui Eventos
-Public Preferences: Preferências Públicas
-Unapproved Public Events: Eventos Públicos não aprovados
-Administrative Tools: Ferramentas Administrativas
-
-
-###############################################
-# Page: admin_handler.php
-#
-Error: Erro
-The following error occurred: Ocorreu o seguinte erro
-
-
-###############################################
-# Page: approve_entry.php
-#
-Error approving event: Erro aprovando evento
-
-
-###############################################
-# Page: assistant_edit.php
-#
-Admin mode: Modo de Administrador
-Your assistants: Seus assistentes
-
-
-###############################################
-# Page: category.php
-#
-Add: Adicionar
-Category Name: Nome da categoria
-Global: Geral
-Delete: Apagar
-Are you sure you want to delete this entry?: Tem certeza que pretende apagar esta entrada?
-Add New Category: Nova categoria
-
-
-###############################################
-# Page: day.php
-#
-Assistant mode: Modo Assistente
-Generate printer-friendly version: Visualizar em formato de impressora
-Printer Friendly: Formato de impressora
-
-
-###############################################
-# Page: del_entry.php
-#
-Hello: Olá
-An appointment has been canceled for you by: Uma evento seu foi cancelando por
-The subject was: O assunto era
-Notification: Notificação
-
-
-###############################################
-# Page: edit_entry.php
-#
-Edit Entry: Editar Entrada
-Add Entry: Adicionar Entrada
-Details: Detalhes
-Participants: Participantes
-Repeat: Repetir
-brief-description-help: Esta deve oferecer uma breve descição (em torno de 20 caracteres) do evento. Isto vai representar o evento quando visualizando o calendário.
-Brief Description: Descrição breve
-full-description-help: Esta deve completar os detalhes do evento. Esta informação pode ser vista quando o usuário vê o evento.
-Full Description: Descrição completa
-access-help: Especifica o nível de acesso de um evento.<br /> <i>Publico</i>: Todos podem ver os detalhes do evento. <br /><i>Confidencial</i>: Os outros podem ver que você tem uma entrada para aquele dia e hora, mas não os detalhes do evento.
-Access: Accesso
-Public: Público
-Confidential: Confidencial
-priority-help: Especifica a prioridade do evento. Eventos de Alta Prioridade serão exibidos em negrito.
-Priority: Prioridade
-Low: Baixa
-Medium: Média
-High: Alta
-category-help: Espeficificar a categoria do evento
-Category: Categoria
-None: Nenhuma
-date-help: Especifica a data do evento.
-Untimed event: Evento sem hora
-Timed event: Eventos com Hora
-All day event: Evento no dia todo
-time-help: Especifica a hora do evento<br /><i>Este campo é opcional.</i>
-am: am
-pm: pm
-duration-help: Especifica a duração (em minutos) do evento. <br /><i>Este campo
-hours: horas
-end-time-help: Especifica a hora em que um evento terminará.
-days: dias
-before event: Evento anterior
-participants-help: Lista os participantes desse evento
-Availability: Disponibilidade
-external-participants-help: Especifica uma lista de participantes para o evento que não são usuários de calendário. Os usuários devem ser listado um por linha e podem incluir um endereço de email. Se um endereço de email for especificado, o usuário poderá receber notificações e lembretes.
-External Participants: Participantes Externos
-repeat-type-help: Selecione quantas vezes o evento deve repetir. <i>Mensalmente (por dia)</i> permite um evento ser repetido na primeira Segunda do mês, terceira Terça do mês, etc. <i>Mensalmente (por data)</i> permite que um evento seja repetido no mesmo dia do mês.
-Repeat Type: Tipo de repetição
-Daily: Diário
-Weekly: Semanal
-Monthly: Mensal
-by day: por dia
-by day (from end): por dia (do fim)
-by date: por data
-Yearly: Anual
-repeat-end-date-help: Especifica a data até à qual o evento se deve repetir.
-Repeat End Date: Data para fim de repetição
-Use end date: Utilizar data de fim de repetição
-repeat-frequency-help: Especifica a frequência com que o evento deve ser repetido. O default 1 indica que ele deve ocorrer todas as vezes. Especificar 2 fará o evento ocorrer semana sim, semana não (se <i>Tipo de Repetição</i> estiver configurado para<i>Semanal</i>), Mês sim, mês não (se <i>Tipo de Repetição</i> estiver configurado para <i>Mensal</i>), etc.
-Frequency: Freqüência
-repeat-day-help: Especifica em quais dias da semana o evento deve ser repetido. Isto deve ser usado somente quando o <i>Tipo de Repetição</i> estiver configurado para <i>Semanal</i>.
-Repeat Day: Dia a repetir
-Tuesday: Terça
-Wednesday: Quarta
-Thursday: Quinta
-Friday: Sexta
-Saturday: Sábado
-Delete entry: Apagar entrada
-You are not authorized to edit this entry: Não está autorizado a editar esta entrada
-
-
-###############################################
-# Page: edit_entry_handler.php
-#
-The following conflicts with the suggested time: O seguinte está em conflito com o tempo sugerido
-Unnamed Event: Evento sem Nome
-The description is: A descrição é
-A new appointment has been made for you by: Um novo evento foi feito para você
-An appointment has been updated by: Um evento foi atualizado por
-The subject is: O assunto é
-Please look on: Por favor veja em
-to accept or reject this appointment: para aceitar ou rejeitar este evento
-to view this appointment: para ver este evento
-Scheduling Conflict: Conflito no agendamento
-Your suggested time of: A sua hora sugerida de
-conflicts with the following existing calendar entries: está em conflito com os eventos do calendário
-Cancel: Cancelar
-
-
-###############################################
-# Page: edit_layer.php
-#
-Edit Layer: Editar Nível
-Add Layer: Adicionar Nível
-Source: Origem
-Color: Cor
-Duplicates: Duplicados
-Show layer events that are the same as your own: Mostrar níveis de eventos que sejam os mesmos que o seu
-Delete layer: Remover nível
-Are you sure you want to delete this layer?: Quer mesmo apagar este nível?
-
-
-###############################################
-# Page: edit_layer_handler.php
-#
-You cannot create a layer for yourself: Você não pode criar um nível para si mesmo
-You can only create one layer for each user: Você deve criar apenas uma visualização para cada usuário
-
-
-###############################################
-# Page: edit_nonusers.php
-#
-NONUSER_PREFIX not set: NONUSER_PREFIX não foi definido no config.php
-word characters only: somente pode conter caracteres de palavras (a-zA-Z_0-9)
-Edit User: Editar Usuário
-Add User: Adicionar Usuário
-Calendar ID: ID do Calendário
-First Name: Primeiro Nome
-Last Name: Último Nome
-
-
-###############################################
-# Page: edit_nonusers_handler.php
-#
-Changes successfully saved: Mudanças salvas com sucesso
-
-
-###############################################
-# Page: edit_report.php
-#
-Tomorrow: Amanhã
-Today: Hoje
-Yesterday: Ontém
-Day before yesterday: Antes de Ontém
-Next week: Próxima semana
-This week: Esta semana
-Last week: Semana passada
-Week before last: Semana retrasada
-Next week and week after: Semana que vém e a próxima
-This week and next week: Esta semana e semana que vém
-Last week and this week: Semana passada e esta semana
-Last two weeks: Duas semanas atrás
-Next month: Próximo mês
-This month: Este mês
-Last month: Mês passado
-Month before last: Mês retrasado
-Next year: Próximo ano
-This year: Este ano
-Last year: Ano passado
-Year before last: Ano retrasado
-Invalid report id: Id do relatório inválido
-Unnamed Report: Relatório sem Nome
-Add Report: Adiciona Relatório
-Edit Report: Editar Relatório
-Report name: Nome do Relatório
-Current User: Usuário Corrente
-Include link in trailer: Incluir Link no Menu
-Include standard header/trailer: Incluir cabeçalho e Menu
-Date range: Período
-Include previous/next links: Incluir links prévios/próximos
-Include empty dates: Incluir datas vazias
-Template variables: variáveis de template
-Page template: Template de página
-Day template: Template de dia
-Event template: Template de evento
-Are you sure you want to delete this report?: Deseja realmente excluir este relatório?
-
-
-###############################################
-# Page: edit_report_handler.php
-#
-Variable N not found: Variável N não encontrada
-
-
-###############################################
-# Page: edit_template.php
-#
-Edit Custom Script/Stylesheet: Editar Script/Folha de estilo
-Edit Custom Header: Editar Cabeçalho Customizado
-Edit Custom Trailer: Editar Menu Customizado
-
-
-###############################################
-# Page: edit_user.php
-#
-Username: Usuário
-E-mail address: Endereço de e-mail
-Password: Senha
-again: novamente
-Disabled for demo: Desativado em modo demo
-Are you sure you want to delete this user?: Você tem certeza que deseja excluir este usuário?
-Change Password: Alterar Senha
-New Password: Nova Senha
-Set Password: Gravar Senha
-
-
-###############################################
-# Page: edit_user_handler.php
-#
-Deleting users not supported: Deleção de usuários não suportada
-The passwords were not identical: As senhas não são iguais
-You have not entered a password: Não entrou com a senha
-Username can not be blank: Nome de usuário não pode estar vazio
-
-
-###############################################
-# Page: export.php
-#
-Export: Exportar
-Export format: Formato para exportar
-Palm Pilot: Palm Pilot
-Include all layers: Incluir todas as níveis
-Export all dates: Exportar todas as datas
-Start date: Data de início
-End date: Data final
-Modified since: Modificado desde
-
-
-###############################################
-# Page: export_handler.php
-#
-export format not defined or incorrect: Formato para exportar não foi definido ou está errado.
-
-
-###############################################
-# Page: groups.php
-#
-Add New Group: Novo grupo
-
-
-###############################################
-# Page: group_edit.php
-#
-Unnamed Group: Grupo não identificado
-Add Group: Adicionar grupo
-Edit Group: Editar grupo
-Group name: Nome do grupo
-Updated: Atualizado
-Created by: Criado por
-
-
-###############################################
-# Page: group_edit_handler.php
-#
-You must specify a group name: Você deve especificar o nome do grupo
-
-
-###############################################
-# Page: help_admin.php
-#
-Display days with events in bold in year view: Mostrar em negrito dias que contenham eventos
-Nonuser: Calendários de não-usuário
-user-customize-color: Especifica se os usuários tem permissão de modificar seu próprio esquema de cores
-enable-gradient-help: Usar gradientes de cor para backgrounds de células
-Manually entering color values: Inserir valores de cor manualmente
-
-
-###############################################
-# Page: help_bug.php
-#
-Report Bug: Reportar erro
-
-
-###############################################
-# Page: help_edit_entry.php
-#
-Adding/Editing Calendar Entries: Adicionar/Editar Entradas
-
-
-###############################################
-# Page: help_import.php
-#
-Import: Importar
-Palm Desktop: Palm Desktop
-This form will allow you to import entries from the Palm Desktop Datebook.: Permite que você importe os compromissos de seu Palm Desktop
-It should be located in your Palm directory in <tt>datebook/datebook.dat</tt> in a subdirectory named by your username.: Deverá ser localizado no diretório do seu Palm em <tt>datebook/datebook.dat</tt> no subdiretório do usuário
-The following entries will not be imported: Os seguintes eventos não serão importados
-Entries older than the current date: Eventos anteriores a data corrente
-Entries created in the Palm Desktop that have not been HotSync'd: Entradas geradas no Palm Desktop que não foram sincronizados
-Anything imported from Palm will be overwritten during the next import (unless the event date has passed).: Qualquer evento importado do Palm será sobrescrito durante a próxima importação
-Therefore, updates should be made in the Palm Desktop.: Por isso, atualizações deverão ser feitas no Palm Desktop
-vCal: vCal
-This form will import vCalendar (.vcs) 1.0 events: Este formulário importa do vCalendar (.vcs)
-The following formats have been tested: Os seguintes formatos foram testados
-Palm Desktop 4: Desktop Palm 4
-Lotus Organizer 6: Organizador Lotus 6
-Microsoft Outlook 2002: Microsoft Outlook 2002
-iCalendar: iCalendar
-This form will import iCalendar (.ics) events: Este formulário importa do iCalendar (.ics)
-Enabling <b>Overwrite Prior Import</b> will cause events imported previously that used the same UID as an event from the new import file to be marked as deleted. This should allow an updated iCalendar file to be imported without creating duplicates.: Habilitar <b>Sobreescrever Antes de Importar</b> fará com que eventos previamente importados que usavam o mesmo UID que um um evento do novo arquivo importado sejam marcados como deletados. Isto deve permitir um arquivo atualizado do iCalendar ser importado sem criar duplicatas.
-
-
-###############################################
-# Page: help_index.php
-#
-Help Index: Ajuda
-
-
-###############################################
-# Page: help_layers.php
-#
-Layers are useful for displaying other users' eve