Exemple #1
0
        <div id="TabEventGoogleCalSync" style="display: none; width: 100%;padding-top:10px;">
        <?php 
if ($google_sync_id) {
    $user_fullname = getITSUserFullName($current_user->id);
    require_once 'modules/Calendar4You/GoogleSync4You.php';
    $GoogleSync4You = new GoogleSync4You();
    $have_access_data = $GoogleSync4You->setAccessDataForUser($current_user->id);
    if ($have_access_data) {
        $GoogleSync4You->connectToGoogle();
        if (!$GoogleSync4You->is_logged) {
            echo $GoogleSync4You->getStatus();
        } else {
            $GoogleSync4You->setEvent($id);
            $selected_calendar = $GoogleSync4You->getSCalendar("1");
            echo $mod_strings["LBL_TO_GOOGLE_CALENDAR"] . ": ";
            $listFeed = $GoogleSync4You->getGoogleCalendars();
            echo "<select name='selected_calendar' onChange='showGoogleSyncAccDiv(this.value)'>";
            echo "<option value=''></option>";
            foreach ($listFeed as $calendar) {
                if ($calendar->id == $selected_calendar) {
                    $selected = "selected";
                } else {
                    $selected = "";
                }
                echo "<option value='" . $calendar->id . "' " . $selected . ">" . $calendar->summary . "</option>";
            }
            echo "</select>";
            echo "<br /><br />";
            if ($selected_calendar != "") {
                $display = "block";
            } else {