Exemplo n.º 1
0
<?php

include_once "calico_classes_v2.php";
if (!isset($_SESSION["USER"])) {
    \HTTP\HTTPRedirector::Redirect("calico_login.php");
}
$compositecalendar = new \GUI\CompositeCalendar(unserialize($_SESSION["USER"]));
$compositecalendar->Postback();
$compositecalendar->Refresh();
echo "<HTML>\n<HEAD>\n<TITLE>Calico: Composite Calendar</TITLE>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"calico.css\">\n<link rel=\"SHORTCUT ICON\" href=\"favicon.ico\">\n</HEAD>\n<BODY>";
echo $compositecalendar->Draw();
echo "</BODY>\n</HTML>";
/*
foreach(array_keys($_REQUEST) as $str) {
   if(strpos($str, "ENT:") > 0) {
        
        $_SESSION["EVENT"] = $str;
		$_SESSION["USER"] = "";
		$_SESSION["FEED"] = "";
		
        
        // And the redirect works. This code must be up here, before anything else.
        header('Location : calico_event.php');             
    } 
    
}
?>
<html>
<HEAD>
<link rel="stylesheet" type="text/css" href="calico.css">
<script type="text/javascript">
Exemplo n.º 2
0
 public function Postback()
 {
     $this->Message = "";
     if (isset($_POST["SaveEvent"])) {
         if (isset($_POST["Summary"])) {
             $summary = $_POST["Summary"];
             $location = $_POST["Location"];
             $description = $_POST["Description"];
             $startdate = $this->GetPanelDateTime("Start");
             $enddate = $this->GetPanelDateTime("End");
             $rrule = $_POST["Rrule"];
             if ($this->Event == null) {
                 $id = $_POST["SelectedFeed"];
                 $feeddata = $this->GetFeedData();
                 $feedurl = $feeddata["FeedURL"][$id];
                 $feedusername = $feeddata["FeedUsername"][$id];
                 $feedpassword = $feeddata["FeedPassword"][$id];
                 $_SESSION["EVENT"] = serialize(\Data\Event::Create($feedurl, $feedusername, $feedpassword, $summary, $startdate, $enddate, $location, $description, $rrule));
             } else {
                 $this->Event->Update($summary, $location, $description, $startdate, $enddate, $rrule);
                 $_SESSION["EVENT"] = serialize($this->Event);
             }
             $this->Message = "Event Saved.<BR>";
             \HTTP\HTTPRedirector::Redirect("calico_event.php");
         }
     }
     if (isset($_POST["NewEvent"])) {
         unset($_SESSION["EVENT"]);
         //$_SESSION["EVENT"] = null;
         $this->Event = null;
         \HTTP\HTTPRedirector::Redirect("calico_event.php");
     }
     if (isset($_POST["DeleteEvent"]) && $this->Event != null) {
         $this->Event->Delete();
         unset($_SESSION["EVENT"]);
         $this->Event = null;
         //$_SESSION["EVENT"] = null;
         $this->Message = "Event Deleted.<BR>";
         \HTTP\HTTPRedirector::Redirect("calico_event.php");
     }
     if (isset($_POST["CompositeCalendarRedirect"])) {
         unset($_SESSION["EVENT"]);
         $this->Event = null;
         \HTTP\HTTPRedirector::Redirect("calico_compositecalendar.php");
     }
     //\HTTP\HTTPRedirector::Redirect("calico_compositecalendar.php");
 }