public function newTodo($id, $date = null, $targetClass = null, $targetClassID = null, $time = null, $description = null, $location = null) { $mT = new mTodoGUI(); $mT->editInPopup($id, $date, $targetClass, $targetClassID, $time, $description, $location); }
public function deleteMe() { if (Session::isPluginLoaded("mGoogle")) { Google::calendarDeleteEvent(mTodoGUI::getCalendarDetails("Todo", $this->getID())); } $AC = anyC::get("Todo", "TodoExceptionForID", $this->getID()); while ($T = $AC->getNextEntry()) { $T->deleteMe(); } if ($this->A("TodoClass") == "DBMail" and Session::isPluginLoaded("mMail")) { Mail::assignRevoke("Todo", $this->getID(), $this->A("TodoClassID")); } if (Session::isPluginLoaded("mAufgabe") and ($this->A("TodoType") == 3 or $this->A("TodoType") == 4 or $this->A("TodoType") == 5) and $this->A("TodoUserID") > 0) { $AC = anyC::get("Aufgabe", "AufgabeByClass", "Todo"); $AC->addAssocV3("AufgabeByClassID", "=", $this->getID()); while ($A = $AC->n()) { $A->deleteMe(); } } parent::deleteMe(); }
function getMeetingData() { $currentTime = date("Hi"); //create obj for today $D = new Datum(); $D->normalize(); $DE = clone $D; $DE->addDay(); $T = new mTodoGUI(); $K = $T->getCalendarData($D->time(), $DE->time(), Session::currentUser()->getID()); while ($DE->time() > $D->time()) { $termine = $K->getEventsOnDay(date("dmY", $D->time())); //debug message echo "<div style='display:none'>"; print_r($termine); echo "</div>"; if ($termine != null) { foreach ($termine as $ev) { foreach ($ev as $v) { //start time in future = upcomming if ($v->getTime() > $currentTime) { array_push($this->upcommingMeetings, $v); //current events } else { if ($v->getTime() <= $currentTime && $v->getEndTime() > $currentTime) { array_push($this->currentMeetings, $v); } else { array_push($this->oldMeetings, $v); } } //echo get_class($v).": ".$v->title()."<br>"; } } } $D->addDay(); } }
die("incorrect date format"); } if (!preg_match("/^[0-9]*\$/i", $cutoffDateFuture)) { die("incorrect date format"); } if (empty($cutoffDatePast)) { $cutoffDatePast = time() - 14 * 24 * 3600; } if (empty($cutoffDateFuture)) { $cutoffDateFuture = time() + 84 * 24 * 3600; } if (isset($_GET["auth_token"])) { if (file_exists($absolutePathToPhynx . "/ubiquitous/Sync/mSync.class.php")) { require_once $absolutePathToPhynx . "/ubiquitous/Sync/mSync.class.php"; } $userToken = $_GET["auth_token"]; if (!preg_match("/^[a-z0-9]+\$/i", $userToken)) { die("incorrect login information"); } $user = mSync::getUserByToken($userToken); $E->login($user->A("username"), $user->A("SHApassword")); } else { $E->login($_GET["username"], $_GET["password"]); } $calendar = mTodoGUI::getCalendarData($cutoffDatePast, $cutoffDateFuture); $events = array(); foreach ($calendar->getEventsList() as $calendarEvent) { $events[] = $calendarEvent->toXCal(); } echo xCalUtil::getXCal($events); $E->cleanUp();