Supporte webcalendar 1.1

This commit is contained in:
Laurent Destailleur 2007-05-09 23:55:59 +00:00
parent 9f159267a1
commit b6a089b3ae
6 changed files with 33 additions and 12 deletions

View File

@ -304,7 +304,7 @@ class InterfaceWebCal
$this->duree=0;
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->id);
$this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
@ -318,12 +318,26 @@ class InterfaceWebCal
$this->duree=0;
$this->texte=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
$this->desc=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id);
$this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
$this->desc.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day');
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_MODIFY')
{
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->id);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_RESILIATE')
{
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
@ -334,7 +348,7 @@ class InterfaceWebCal
$this->duree=0;
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id);
$this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
@ -348,7 +362,7 @@ class InterfaceWebCal
$this->duree=0;
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->id);
$this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}

View File

@ -360,6 +360,7 @@ Priority=Priority
SendAcknowledgementByMail=Send Ack. by mail
NoEMail=No EMail
Owner=Owner
DetectedVersion=Detected version
# Countries
CountryFR=France
CountryBE=Belgium

View File

@ -103,4 +103,5 @@ Int=Int
Date=Date
DateAndTime=Date and time
MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe
AddSubscription=Add subscription
AddSubscription=Add subscription
MemberModifiedInDolibarr=Member modified in Dolibarr

View File

@ -361,6 +361,7 @@ Priority=Priorit
SendAcknowledgementByMail=Envoi A.R. par mail
NoEMail=Pas d'email
Owner=Propriétaire
DetectedVersion=Version détectée
# Countries
CountryFR=France
CountryBE=Belgique

View File

@ -104,3 +104,5 @@ Date=Date
DateAndTime=Date et heure
MemberNotOrNoMoreExpectedToSubscribe=Non soumis ou plus soumis à cotisation
AddSubscription=Ajout adhésion
MemberModifiedInDolibarr=Adhérent modifié dans Dolibarr

View File

@ -38,13 +38,13 @@
class Webcal {
var $localdb;
var $error;
var $version; /* Version string from webcalendar. Not defined in 1.0 */
var $date;
var $duree = 0; /* Secondes */
var $texte;
var $desc;
var $error;
/**
@ -103,11 +103,13 @@ class Webcal {
$cal_mod_date = strftime('%Y%m%d', time());
$cal_mod_time = strftime('%H%M%S', time());
$cal_duration = round($this->duree / 60);
$cal_priority = 2;
$cal_type = "E";
$cal_access = "P";
$cal_name = $this->texte;
$cal_description = $this->desc;
$cal_priority = 2; // Medium avec 1.0, Haute avec 1.1
// Rem: 1.0: 1=bas, 2=medium, 3=haut
// 1.1: 1=haut, 2=haut, 3=haut, 4=medium ... 9=bas
$cal_type = "E"; // Evenement de type "intemporel"
$cal_access = "P"; // Acces publique
$cal_name = $this->texte; // Title for event
$cal_description = $this->desc; // Desc for event
$sql = "INSERT INTO webcal_entry (cal_id, 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)";
$sql.= " VALUES ($cal_id, '$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')";