Source for file class.calendar.php
Documentation is available at class.calendar.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* Workgroup Calendar Management
public function __call($method, $arguments)
$event = $this->dispatcher->notifyUntil(new sfEvent($this, 'calendar.extensible_function', array(
'arguments' => $arguments
if (!$event->isProcessed())
throw new Exception(sprintf('Call to undefined method %s::%s.', get_class($this), $method));
return $event->getReturnValue();
* calendar::CheckDataIntegrity()
* Vérification intégrité des données
* @param array $table contient les composants d'une tache
* si verifié, sinon string 'message d'erreur'
if (strlen($table[1]) < 3) return _t('workshop','no_task');
if (strlen($table[2]) < 3) return _t('workshop','no_task_details');
* Ajout d'une nouvelle tache dans le calendrier
* @param array $table_task contient les composants d'une tache
* @param object $sql_object
* @return integer $last_id
function AddTask($table_task, $sql_object)
$table_task= $sql_object->DBescape($table_task);
if ($table_task[0] != '') {
if ($table_task[1] != '') {
if ($table_task[2] != '') {
if($table_task[5] == 1) {
$requete = "INSERT INTO " . $this->TDB_CALENDAR . " (workcal_task_date, workcal_task, workcal_task_details, workcal_workshop_id, workcal_posted_by, workcal_validity, workcal_date_crea) " . "VALUES('" . $this->TASK_DATE . "', '" . $this->TASK . "', '" . $this->TASK_DETAILS . "', " . $this->WORKSHOP_ID . ", '" . $this->POSTED_BY . "', '" . $this->VALIDITY . "', NOW());";
$last_id = $sql_object->DBInsert ($requete, 1);
* suppression d'une tache
* @param int $id identifiant de la tache
* @param object $sql_object
$requete = "UPDATE " . $this->TDB_CALENDAR . " SET workcal_validity='N' WHERE workcal_id=" . $this->ID . ";";
$result = $sql_object->DBQuery ($requete);
* modification d'une tache
* @param int $ID identifiant de la tache
* @param object $sql_object
* @param array $table_task contient les composants d'une tache
function ModifyTask($ID, $table_task, $sql_object)
$table_task= $sql_object->DBescape($table_task);
if ($table_task[0] != '') {
if ($table_task[1] != '') {
if ($table_task[2] != '') {
$requete = "UPDATE " . $this->TDB_CALENDAR . " SET workcal_task_date='" . $this->TASK_DATE . "', workcal_task='" . $this->TASK . "' , workcal_task_details='" . $this->TASK_DETAILS . "', workcal_last_modify=NOW() WHERE workcal_id=" . $ID . ";";
$result = $sql_object->DBQuery($requete);
|