2000-10-12 19:36:47 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - Calendar *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* 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. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2000-12-26 21:13:34 +01:00
|
|
|
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True, "noheader" => True, "nonavbar" => True, "noappheader" => True, "noappfooter" => True);
|
2000-10-12 19:36:47 +02:00
|
|
|
include("../header.inc.php");
|
|
|
|
|
|
|
|
if ($submit) {
|
2000-12-14 12:58:51 +01:00
|
|
|
$phpgw->preferences->change("calendar","weekdaystarts");
|
|
|
|
$phpgw->preferences->change("calendar","workdaystarts");
|
|
|
|
$phpgw->preferences->change("calendar","workdayends");
|
2001-01-05 02:38:12 +01:00
|
|
|
$phpgw->preferences->change("calendar","defaultcalendar");
|
2000-12-14 12:58:51 +01:00
|
|
|
$phpgw->preferences->change("calendar","defaultfilter");
|
2000-10-12 19:36:47 +02:00
|
|
|
if ($mainscreen_showevents) {
|
2000-12-14 12:58:51 +01:00
|
|
|
$phpgw->preferences->change("calendar","mainscreen_showevents");
|
2000-12-13 16:19:03 +01:00
|
|
|
} else {
|
|
|
|
$phpgw->preferences->delete("calendar","mainscreen_showevents");
|
2000-10-12 19:36:47 +02:00
|
|
|
}
|
2000-12-13 16:19:03 +01:00
|
|
|
$phpgw->preferences->commit();
|
|
|
|
|
2000-10-12 19:36:47 +02:00
|
|
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php"));
|
2000-12-24 01:30:41 +01:00
|
|
|
$phpgw->common->phpgw_exit();
|
2000-10-12 19:36:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$phpgw->common->phpgw_header();
|
2001-01-06 05:11:13 +01:00
|
|
|
echo parse_navbar();
|
2000-10-12 19:36:47 +02:00
|
|
|
|
|
|
|
if ($totalerrors) {
|
|
|
|
echo "<p><center>" . $phpgw->common->error_list($errors) . "</center>";
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<p><b>" . lang("Calendar preferences") . ":" . "</b><hr><p>";
|
2000-11-11 19:51:14 +01:00
|
|
|
|
2000-10-12 19:36:47 +02:00
|
|
|
?>
|
|
|
|
<form action="<?php echo $phpgw->link(); ?>" method="POST">
|
|
|
|
<table border="0" align="center" width="50%">
|
|
|
|
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
|
|
|
|
<td colspan="2"> </td>
|
|
|
|
</tr>
|
|
|
|
<?php $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); ?>
|
|
|
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
2000-12-08 04:30:25 +01:00
|
|
|
<td><?php echo lang("show day view on main screen"); ?> ?</td>
|
2000-11-11 19:51:14 +01:00
|
|
|
<td align="center"><input type="checkbox" name="mainscreen_showevents" value="Y" <?php
|
|
|
|
if ($phpgw_info["user"]["preferences"]["calendar"]["mainscreen_showevents"] == "Y") echo " checked";
|
|
|
|
?>>
|
|
|
|
</td>
|
2000-10-12 19:36:47 +02:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<?php
|
2000-10-12 20:18:03 +02:00
|
|
|
$t_weekday[$phpgw_info["user"]["preferences"]["calendar"]["weekdaystarts"]] = " selected";
|
2000-10-12 19:36:47 +02:00
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
|
|
|
?>
|
|
|
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
|
|
|
<td><?php echo lang("weekday starts on"); ?></td>
|
|
|
|
<td align="center">
|
|
|
|
<select name="weekdaystarts">
|
2000-11-14 07:17:16 +01:00
|
|
|
<option value="Monday"<?php echo $t_weekday["Monday"]; ?>><?php echo lang("Monday"); ?></option>
|
|
|
|
<option value="Sunday"<?php echo $t_weekday["Sunday"]; ?>><?php echo lang("Sunday"); ?></option>
|
2000-10-12 19:36:47 +02:00
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<?php
|
2000-10-12 20:18:03 +02:00
|
|
|
$t_workdaystarts[$phpgw_info["user"]["preferences"]["calendar"]["workdaystarts"]] = " selected";
|
2000-10-12 19:36:47 +02:00
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
|
|
|
?>
|
|
|
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
|
|
|
<td><?php echo lang("work day starts on"); ?></td>
|
|
|
|
<td align="center">
|
|
|
|
<select name="workdaystarts">
|
|
|
|
<?php
|
|
|
|
for ($i=0; $i<24; $i++)
|
|
|
|
echo "<option value=\"$i\"" . $t_workdaystarts[$i] . ">"
|
|
|
|
. $phpgw->common->formattime($i+1,"00") . "</option>";
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
2000-10-12 20:18:03 +02:00
|
|
|
$t_workdayends[$phpgw_info["user"]["preferences"]["calendar"]["workdayends"]] = " selected";
|
2000-10-12 19:36:47 +02:00
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
|
|
|
?>
|
|
|
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
|
|
|
<td><?php echo lang("work day ends on"); ?></td>
|
|
|
|
<td align="center">
|
|
|
|
<select name="workdayends">
|
|
|
|
<?php
|
|
|
|
for ($i=0; $i<24; $i++) {
|
|
|
|
echo "<option value=\"$i\"" . $t_workdayends[$i] . ">"
|
|
|
|
. $phpgw->common->formattime($i+1,"00") . "</option>";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2000-12-04 00:36:50 +01:00
|
|
|
<?php
|
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
|
|
|
?>
|
|
|
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
|
|
|
<td><?php echo lang("default calendar view"); ?></td>
|
|
|
|
<td align="center">
|
|
|
|
<select name="defaultcalendar">
|
2000-12-08 04:30:25 +01:00
|
|
|
<?php
|
|
|
|
$selected = array();
|
2001-01-05 02:38:12 +01:00
|
|
|
$selected[$phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"]] = " selected";
|
2001-01-21 05:16:15 +01:00
|
|
|
if (! isset($phpgw_info["user"]["preferences"]["calendar"]["defaultcalendar"])) {
|
|
|
|
$selected["month.php"] = " selected";
|
2000-12-08 04:30:25 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
<option value="year.php"<?php echo $selected["year.php"] . ">" . lang("Yearly"); ?></option>
|
2001-01-21 05:16:15 +01:00
|
|
|
<option value="index.php"<?php echo $selected["month.php"] . ">" . lang("Monthly"); ?></option>
|
2000-12-08 04:30:25 +01:00
|
|
|
<option value="week.php"<?php echo $selected["week.php"] . ">" . lang("Weekly"); ?></option>
|
|
|
|
<option value="day.php"<?php echo $selected["day.php"] . ">" . lang("Daily"); ?></option>
|
2000-12-04 00:36:50 +01:00
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2000-12-14 03:37:58 +01:00
|
|
|
<?php
|
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
|
|
|
?>
|
|
|
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
|
|
|
<td><?php echo lang("default calendar filter"); ?></td>
|
|
|
|
<td align="center">
|
|
|
|
<select name="defaultfilter">
|
|
|
|
<?php
|
|
|
|
$selected = array();
|
|
|
|
$selected[$phpgw_info["user"]["preferences"]["calendar"]["defaultfilter"]] = " selected";
|
|
|
|
if (! isset($phpgw_info["user"]["preferences"]["calendar"]["defaultfilter"]) || $phpgw_info["user"]["preferences"]["calendar"]["defaultfilter"] == "private") {
|
|
|
|
$selected["private"] = " selected";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<option value="all"<?php echo $selected["all"].">".lang("all"); ?></option>
|
|
|
|
<option value="private"<?php echo $selected["private"]. ">".lang("private only"); ?></option>
|
|
|
|
<option value="public"<?php echo $selected["public"].">".lang("global public only"); ?></option>
|
|
|
|
<option value="group"<?php echo $selected["group"].">".lang("group public only"); ?></option>
|
|
|
|
<option value="private+public"<?php echo $selected["private+public"].">".lang("private and global public"); ?></option>
|
|
|
|
<option value="private+group"<?php echo $selected["private+group"].">".lang("private and group public"); ?></option>
|
|
|
|
<option value="public+group"<?php echo $selected["public+group"].">".lang("global public and group public") ?></option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2000-10-12 19:36:47 +02:00
|
|
|
<tr><td align="center"><input type="submit" name="submit" value="<?php echo lang("submit"); ?>"></td></tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
|
2001-01-07 18:14:36 +01:00
|
|
|
<?php $phpgw->common->phpgw_footer(); ?>
|