home *** CD-ROM | disk | FTP | other *** search
- <?php
- /*
- Copyright Intermesh 2003
- Author: Merijn Schering <mschering@intermesh.nl>
- Version: 1.0 Release date: 08 July 2003
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
- */
-
- ?>
- <table border="0" cellpadding="10">
- <tr>
- <td>
- <table border="0" cellpadding="3" cellspacing="0">
- <tr><td colspan="5" height="25"><a href="calendar.php" class="normal"><?php echo $cmdAdd; ?></a></td></tr>
- <?php
- if (isset($feedback))
- {
- echo '<tr><td colspan="5" height="25">'.$feedback.'</td></tr>';
- }
-
- echo '<tr><td><h3>'.$sc_default.'</h3></td><td><h3>'.$strName.'</td><td><h3>'.$sc_owner.'</h3></td><td><h3>'.$sc_subscribed.'</h3></td><td> </td><td> </td></tr>';
-
- $default_calendar_id = $cal->get_default_calendar($GO_SECURITY->user_id);
- $calendar_count = $cal->get_authorized_calendars($GO_SECURITY->user_id);
- if ($calendar_count > 0)
- {
- while ($cal->next_record())
- {
- $calendar1= new calendar();
- if($calendar1->is_subscribed($GO_SECURITY->user_id, $cal->f("id")))
- $checked = "checked";
- else
- $checked = "";
- $check = ($cal->f('id') == $default_calendar_id) ? 'checked' : '';
-
- echo '<tr><td><input type="radio" name="default_calendar_id" value="'.$cal->f("id").'" '.$check.' /></td>';
- echo '<td nowrap><a href="index.php?calendar_id='.$cal->f("id").'" class="normal">'.$cal->f("name").'</a> </td>';
- echo '<td nowrap>'.show_profile($cal->f("user_id")).' </td>';
- echo '<td align="center"> <input type="checkbox" name="calendars[]" value="'.$cal->f("id").'" '.$checked.' /></td>';
-
- echo '<td> <a href="calendar.php?calendar_id='.$cal->f("id").'&return_to='.rawurlencode($_SERVER['REQUEST_URI']).'" title="'.$strEdit.' \''.$cal->f("name").'\'"><img src="'.$GO_THEME->images['edit'].'" border="0" /></a></td>';
- echo "<td> <a href='javascript:delete_calendar(\"".$cal->f("id")."\",\"".rawurlencode($strDeletePrefix."'".$cal->f("name")."'".$strDeleteSuffix)."\")' title=\"".$strDeleteItem." '".$cal->f("name")."'\"><img src=\"".$GO_THEME->images['delete']."\" border=\"0\"></a></td></tr>\n";
- }
- }
- echo '</table>';
- echo '<br /><br />';
- $button = new button($cmdOk, "javascript:save_calendar('true')");
- echo ' ';
- $button = new button($cmdApply, "javascript:save_calendar('false')");
- echo ' ';
- $button = new button($cmdClose,"javascript:document.location='".$return_to."'");
- ?>
- </td>
- </tr>
- </table>
- <script type="text/javascript">
- function delete_calendar(calendar_id, message)
- {
- if (confirm(unescape(message)))
- {
- document.forms[0].delete_calendar_id.value = calendar_id;
- document.forms[0].task.value='delete_calendar';
- document.forms[0].submit();
- }
- }
- function save_calendar(close_me)
- {
- document.forms[0].close_action.value=close_me;
- document.forms[0].task.value = 'save_calendar';
- document.forms[0].submit();
- }
- </script>
-
-