mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 15:59:23 +01:00
change of cal_create_by to cal_owner
This commit is contained in:
parent
7c58c04db3
commit
ce74573ead
@ -14,13 +14,15 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if (isset($friendly) && $friendly){
|
||||
if (isset($friendly) && $friendly==1){
|
||||
$phpgw_info["flags"]["noheader"] = True;
|
||||
$phpgw_info["flags"]["nonavbar"] = True;
|
||||
$phpgw_info["flags"]["nocalendarheader"] = True;
|
||||
} else {
|
||||
$friendly = 0;
|
||||
}
|
||||
|
||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True);
|
||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True, "enable_template_class" => True);
|
||||
include("../header.inc.php");
|
||||
|
||||
$view = "day";
|
||||
@ -46,62 +48,38 @@
|
||||
|
||||
$now = $phpgw->calendar->splitdate(mktime (2, 0, 0, $thismonth, $thisday, $thisyear));
|
||||
|
||||
$phpgw->template->set_file(array("day" => "day.tpl"));
|
||||
|
||||
$phpgw->template->set_block("day");
|
||||
|
||||
if ($friendly) {
|
||||
echo "<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">";
|
||||
$phpgw->template->set_var("printer_friendly","<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">");
|
||||
} else {
|
||||
$phpgw->template->set_var("printer_friendly","");
|
||||
}
|
||||
|
||||
?>
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="70%">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" width=100%>
|
||||
<tr>
|
||||
<td align="middle">
|
||||
<font size="+2" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>">
|
||||
<b>
|
||||
<?php
|
||||
$phpgw->template->set_var("bg_text",$phpgw_info["theme"]["bg_text"]);
|
||||
|
||||
$m = mktime(2,0,0,$thismonth,1,$thisyear);
|
||||
echo lang(strftime("%B",$m)) . " " .$thisday . ", " . $thisyear;
|
||||
?>
|
||||
</b>
|
||||
</font>
|
||||
<font size="+1" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>"><br>
|
||||
<?php
|
||||
echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]);
|
||||
?>
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $phpgw_info["theme"]["bg_text"]; ?>">
|
||||
<table border="0" width="100%" cellspacing="1" cellpadding="2" border="0">
|
||||
<?php echo $phpgw->calendar->print_day_at_a_glance($now); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" align="right">
|
||||
<?php echo $phpgw->calendar->pretty_small_calendar($now["day"],$now["month"],$now["year"],"day.php"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
if (! $friendly) {
|
||||
$param = "";
|
||||
// if ($thisyear)
|
||||
$param .= "year=".$now["year"]."&month=".$now["month"]."&day=".$now["day"]."&";
|
||||
$phpgw->template->set_var("date",lang(strftime("%B",$m))." ".$thisday.", ".$thisyear);
|
||||
$phpgw->template->set_var("username",$phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]));
|
||||
$phpgw->template->set_var("daily_events",$phpgw->calendar->print_day_at_a_glance($now));
|
||||
$cal = $phpgw->calendar->pretty_small_calendar($now["day"],$now["month"],$now["year"],"day.php");
|
||||
$phpgw->template->set_var("small_calendar",$cal);
|
||||
|
||||
$param .= "friendly=1\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||
. "status = '" . lang("Generate printer-friendly version"). "'";
|
||||
echo "<a href=\"".$phpgw->link($PHP_SELF,$param)."\">";
|
||||
echo "[". lang("Printer Friendly") . "]</A>";
|
||||
$phpgw->common->phpgw_footer();
|
||||
if (!$friendly) {
|
||||
$param = "";
|
||||
$param .= "year=".$now["year"]."&month=".$now["month"]."&day=".$now["day"]."&";
|
||||
|
||||
$param .= "friendly=1\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||
. "status = '" . lang("Generate printer-friendly version"). "'";
|
||||
$phpgw->template->set_var("print","<a href=\"".$phpgw->link($PHP_SELF,$param)."\">[". lang("Printer Friendly") . "]</A>");
|
||||
$phpgw->template->parse("out","day");
|
||||
$phpgw->template->pparse("out","day");
|
||||
$phpgw->common->phpgw_footer();
|
||||
} else {
|
||||
$phpgw->template->set_var("print","");
|
||||
$phpgw->template->parse("out","day");
|
||||
$phpgw->template->pparse("out","day");
|
||||
}
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?phpphp_track_vars?>
|
||||
<?php php_track_vars?>
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
@ -18,74 +18,66 @@
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
if ($id > 0) {
|
||||
$cal_info = new calendar_item;
|
||||
|
||||
if ($id > 0) {
|
||||
$can_edit = false;
|
||||
$phpgw->db->query("SELECT cal_id FROM webcal_entry_user WHERE cal_login="
|
||||
. "'" . $phpgw_info["user"]["account_id"] . "' AND cal_id = $id");
|
||||
. $phpgw_info["user"]["account_id"] . " AND cal_id = $id");
|
||||
$phpgw->db->next_record();
|
||||
if ($phpgw->db->f("cal_id") > 0)
|
||||
$can_edit = true;
|
||||
|
||||
$phpgw->db->query("SELECT cal_create_by, cal_date, cal_time, cal_mod_date, "
|
||||
. "cal_mod_time, cal_duration, cal_priority, cal_type, "
|
||||
. "cal_access, cal_name, cal_description FROM webcal_entry "
|
||||
. "WHERE cal_id=$id");
|
||||
$cal = $phpgw->calendar->getevent((int)$id);
|
||||
|
||||
$phpgw->db->next_record();
|
||||
$year = (int)($phpgw->db->f(1) / 10000);
|
||||
$month = ($phpgw->db->f(1) / 100) % 100;
|
||||
$day = $phpgw->db->f(1) % 100;
|
||||
$time = $phpgw->db->f(2);
|
||||
if ($time > 0) {
|
||||
$hour = intval($time / 10000);
|
||||
$minute = ($time / 100) % 100;
|
||||
}
|
||||
$duration = $phpgw->db->f(5);
|
||||
$priority = $phpgw->db->f(6);
|
||||
$type = $phpgw->db->f(7);
|
||||
$access = $phpgw->db->f(8);
|
||||
$name = $phpgw->db->f(9);
|
||||
$description = $phpgw->db->f(10);
|
||||
$cal_info = $cal[0];
|
||||
|
||||
$name = stripslashes($name);
|
||||
$name = htmlspecialchars($name);
|
||||
$description = stripslashes($description);
|
||||
$description = htmlspecialchars($description);
|
||||
} else {
|
||||
|
||||
$phpgw->db->query("SELECT cal_login FROM webcal_entry_user WHERE cal_id=$id");
|
||||
while ($phpgw->db->next_record()) {
|
||||
$participants[$phpgw->db->f("cal_login")] = 1;
|
||||
}
|
||||
$phpgw->db->query("select * from webcal_entry_repeats where cal_id=$id");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
$rpt_type = $phpgw->db->f("cal_type");
|
||||
if ($phpgw->db->f("cal_end"))
|
||||
$rpt_end = date_to_epoch($phpgw->db->f("cal_end"));
|
||||
if (!isset($day) || !$day)
|
||||
$thisday = (int)$phpgw->calendar->today["day"];
|
||||
else
|
||||
$rpt_end = 0;
|
||||
$thisday = $day;
|
||||
if (!isset($month) || !$month)
|
||||
$thismonth = (int)$phpgw->calendar->today["month"];
|
||||
else
|
||||
$thismonth = $month;
|
||||
if (!isset($year) || !$year)
|
||||
$thisyear = (int)$phpgw->calendar->today["year"];
|
||||
else
|
||||
$thisyear = $year;
|
||||
|
||||
$rpt_freq = $phpgw->db->f("cal_frequency");
|
||||
$rpt_days = $phpgw->db->f("cal_days");
|
||||
if (!isset($hour))
|
||||
$thishour = 0;
|
||||
else
|
||||
$thishour = (int)$hour;
|
||||
if (!isset($minute))
|
||||
$thisminute = 00;
|
||||
else
|
||||
$thisminute = (int)$minute;
|
||||
|
||||
$rpt_sun = (substr($rpt_days,0,1)=='y');
|
||||
$rpt_mon = (substr($rpt_days,1,1)=='y');
|
||||
$rpt_tue = (substr($rpt_days,2,1)=='y');
|
||||
$rpt_wed = (substr($rpt_days,3,1)=='y');
|
||||
$rpt_thu = (substr($rpt_days,4,1)=='y');
|
||||
$rpt_fri = (substr($rpt_days,5,1)=='y');
|
||||
$rpt_sat = (substr($rpt_days,6,1)=='y');
|
||||
$time = $phpgw->calendar->splittime_($phpgw->calendar->fixtime($thishour,$thisminute));
|
||||
|
||||
} else {
|
||||
$can_edit = true;
|
||||
}
|
||||
$cal_info->name = "";
|
||||
$cal_info->description = "";
|
||||
|
||||
if ($year)
|
||||
$thisyear = $year;
|
||||
if ($month)
|
||||
$thismonth = $month;
|
||||
if (! $rpt_type)
|
||||
$rpt_type = "none";
|
||||
$cal_info->day = $thisday;
|
||||
$cal_info->month = $thismonth;
|
||||
$cal_info->year = $thisyear;
|
||||
|
||||
$cal_info->rpt_day = $thisday + 1;
|
||||
$cal_info->rpt_month = $thismonth;
|
||||
$cal_info->rpt_year = $thisyear;
|
||||
|
||||
$cal_info->hour = (int)$time["hour"];
|
||||
$cal_info->minute = (!(int)$time["minute"]?"00":(int)$time["minute"]);
|
||||
$cal_info->ampm = "am";
|
||||
if($cal_info->hour > 12 && $phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
|
||||
$cal_info["hour"] = $cal_info["hour"] - 12;
|
||||
$cal_info["ampm"] = "pm";
|
||||
}
|
||||
$can_edit = true;
|
||||
}
|
||||
?>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
@ -128,7 +120,7 @@ function validate_and_submit() {
|
||||
<TR>
|
||||
<TD><B><?php echo lang("Brief Description"); ?>:</B></TD>
|
||||
<TD>
|
||||
<INPUT NAME="name" SIZE=25 VALUE="<?php echo ($name); ?>">
|
||||
<INPUT NAME="name" SIZE=25 VALUE="<?php echo ($cal_info->name); ?>">
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@ -136,7 +128,7 @@ function validate_and_submit() {
|
||||
<TD VALIGN="top"><B><?php echo lang("Full Description"); ?>:</B></TD>
|
||||
<TD>
|
||||
<TEXTAREA NAME="description" ROWS=5 COLS=40 WRAP="virtual"><?php
|
||||
echo ($description); ?></TEXTAREA>
|
||||
echo ($cal_info->description); ?></TEXTAREA>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@ -145,29 +137,22 @@ function validate_and_submit() {
|
||||
<TD>
|
||||
<?php
|
||||
$day_html = "<SELECT NAME=\"day\">";
|
||||
if ($day == 0)
|
||||
$day = date("d");
|
||||
for ($i = 1; $i <= 31; $i++)
|
||||
$day_html .= "<OPTION value=\"$i\"" . ($i == $day ? " SELECTED" : "") . ">$i"
|
||||
$day_html .= "<OPTION value=\"$i\"" . ($i == $cal_info->day ? " SELECTED" : "") . ">$i"
|
||||
. "</option>\n";
|
||||
$day_html .= "</select>";
|
||||
|
||||
$month_html = "<SELECT NAME=\"month\">";
|
||||
if ($month == 0)
|
||||
$month = date("m");
|
||||
if ($year == 0)
|
||||
$year = date("Y");
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$m = lang(date("F", mktime(0,0,0,$i,1,$year)));
|
||||
$month_html .= "<OPTION VALUE=\"$i\"" . ($i == $month ? " SELECTED" : "") . ">$m"
|
||||
$m = lang(date("F", mktime(0,0,0,$i,1,$cal_info->year)));
|
||||
$month_html .= "<OPTION VALUE=\"$i\"" . ($i == $cal_info->month ? " SELECTED" : "") . ">$m"
|
||||
. "</option>\n";
|
||||
}
|
||||
$month_html .= "</select>";
|
||||
|
||||
$year_html = "<SELECT NAME=\"year\">";
|
||||
for ($i = -1; $i < 5; $i++) {
|
||||
$y = date("Y") + $i;
|
||||
$year_html .= "<OPTION VALUE=\"$y\"" . ($y == $year ? " SELECTED" : "") . ">$y"
|
||||
for ($i = ($cal_info->year - 1); $i < ($cal_info->year + 5); $i++) {
|
||||
$year_html .= "<OPTION VALUE=\"$i\"" . ($i == $cal_info->year ? " SELECTED" : "") . ">$i"
|
||||
. "</option>\n";
|
||||
}
|
||||
$year_html .= "</select>";
|
||||
@ -181,24 +166,18 @@ function validate_and_submit() {
|
||||
<TR>
|
||||
<TD><B><?php echo lang("Time"); ?>:</B></TD>
|
||||
<?php
|
||||
$h12 = $hour;
|
||||
$amsel = "CHECKED"; $pmsel = "";
|
||||
if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
|
||||
if ($h12 < 12) {
|
||||
$amsel = "CHECKED"; $pmsel = "";
|
||||
} else {
|
||||
if ($cal_info->ampm == "pm") {
|
||||
$amsel = ""; $pmsel = "CHECKED";
|
||||
} else {
|
||||
$amsel = "CHECKED"; $pmsel = "";
|
||||
}
|
||||
|
||||
$h12 %= 12;
|
||||
if ($h12 == 0 && $hour) $h12 = 12;
|
||||
if ($h12 == 0 && ! $hour) $h12 = "";
|
||||
}
|
||||
?>
|
||||
<TD>
|
||||
<INPUT NAME="hour" SIZE=2 VALUE="<?php
|
||||
echo $h12;?>" MAXLENGTH=2>:<INPUT NAME="minute" SIZE=2 VALUE="<?php
|
||||
if ($hour > 0) printf ("%02d", $minute); ?>" MAXLENGTH=2>
|
||||
echo $cal_info->hour;?>" MAXLENGTH=2>:<INPUT NAME="minute" SIZE=2 VALUE="<?php echo $cal_info->minute>"0" && $cal_info->minute<"9"?"0".$cal_info->minute:$cal_info->minute; ?>" MAXLENGTH=2>
|
||||
<?php
|
||||
if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
|
||||
echo "<INPUT TYPE=radio NAME=ampm VALUE=\"am\" $amsel>am\n";
|
||||
@ -210,15 +189,15 @@ function validate_and_submit() {
|
||||
<TR>
|
||||
<TD><B><?php echo lang("Duration"); ?>:</B></TD>
|
||||
<TD><INPUT NAME="duration" SIZE=3 VALUE="<?php
|
||||
echo $duration;?>"> <?php echo lang("minutes"); ?></TD>
|
||||
!$cal_info->duration?0:$cal_info->duration; ?>"> <?php echo lang("minutes"); ?></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><B><?php echo lang("Priority"); ?>:</B></TD>
|
||||
<TD><SELECT NAME="priority">
|
||||
<OPTION VALUE="1"<?php if ($priority == 1) echo " SELECTED";?>><?php echo lang("Low"); ?> </option>
|
||||
<OPTION VALUE="2"<?php if ($priority == 2 || $priority == 0 ) echo " SELECTED";?>><?php echo lang("Medium"); ?></option>
|
||||
<OPTION VALUE="3"<?php if ($priority == 3) echo " SELECTED";?>><?php echo lang("High"); ?></option>
|
||||
<OPTION VALUE="1"<?php if ($cal_info->priority == 1) echo " SELECTED";?>><?php echo lang("Low"); ?> </option>
|
||||
<OPTION VALUE="2"<?php if ($cal_info->priority == 2 || $cal_info->priority == 0 ) echo " SELECTED";?>><?php echo lang("Medium"); ?></option>
|
||||
<OPTION VALUE="3"<?php if ($cal_info->priority == 3) echo " SELECTED";?>><?php echo lang("High"); ?></option>
|
||||
</SELECT></TD>
|
||||
</TR>
|
||||
|
||||
@ -226,11 +205,11 @@ function validate_and_submit() {
|
||||
<TD><B><?php echo lang("Access"); ?>:</B></TD>
|
||||
<TD><SELECT NAME="access">
|
||||
<OPTION VALUE="private"<?php
|
||||
if ($access == "private" || ! $id) echo " SELECTED";?>><?php echo lang("Private"); ?></option>
|
||||
if ($cal_info->access == "private" || ! $id) echo " SELECTED";?>><?php echo lang("Private"); ?></option>
|
||||
<OPTION VALUE="public"<?php
|
||||
if ($access == "public") echo " SELECTED"; ?>><?php echo lang("Global Public"); ?></option>
|
||||
if ($cal_info->access == "public") echo " SELECTED"; ?>><?php echo lang("Global Public"); ?></option>
|
||||
<OPTION VALUE="group"<?php
|
||||
if ($access == "public" || strlen($access)) echo " SELECTED";?>><?php echo lang("Group Public"); ?></option>
|
||||
if ($cal_info->access == "public" || strlen($cal_info->access)) echo " SELECTED";?>><?php echo lang("Group Public"); ?></option>
|
||||
</SELECT>
|
||||
</TD>
|
||||
</tr>
|
||||
@ -239,20 +218,13 @@ function validate_and_submit() {
|
||||
<TD><B><?php echo lang("group access"); ?>:</B></TD>
|
||||
<TD><SELECT NAME="n_groups[]" multiple size="5">
|
||||
<?php
|
||||
if ($id > 0) {
|
||||
$phpgw->db->query("select groups from webcal_entry_groups where cal_id=$id");
|
||||
$phpgw->db->next_record();
|
||||
$db_groups = $phpgw->db->f("groups");
|
||||
}
|
||||
|
||||
$user_groups = $phpgw->accounts->read_group_names();
|
||||
for ($i=0;$i<count($user_groups);$i++) {
|
||||
echo "<option value=\"" . $user_groups[$i][0] . "\"";
|
||||
if (ereg(",".$user_groups[$i][0].",",$db_groups))
|
||||
if (ereg(",".$user_groups[$i][0].",",$cal_info->groups))
|
||||
echo " selected";
|
||||
echo ">" . $user_groups[$i][1] . "</option>\n";
|
||||
}
|
||||
|
||||
?></SELECT></TD>
|
||||
</TR>
|
||||
|
||||
@ -275,7 +247,7 @@ function validate_and_submit() {
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
echo "<option value=\"" . $phpgw->db->f("account_id") . "\"";
|
||||
if ($participants[$phpgw->db->f("account_id")])
|
||||
if ($cal_info->participants[$phpgw->db->f("account_id")])
|
||||
echo " selected";
|
||||
|
||||
echo ">" . $phpgw->common->display_fullname($phpgw->db->f("account_lid"),
|
||||
@ -294,22 +266,22 @@ function validate_and_submit() {
|
||||
<td><b><?php echo lang("Repeat type"); ?>:</b></td>
|
||||
<td><select name="rpt_type">
|
||||
<?php
|
||||
echo "<option value=\"none\"" . (strcmp($rpt_type,'none')==0?"selected":"") . ">"
|
||||
echo "<option value=\"none\"" . (strcmp($cal_info->rpt_type,'none')==0?"selected":"") . ">"
|
||||
. lang("None") . "</option>";
|
||||
|
||||
echo "<option value=\"daily\"" . (strcmp($rpt_type,'daily')==0?"selected":"") . ">"
|
||||
echo "<option value=\"daily\"" . (strcmp($cal_info->rpt_type,'daily')==0?"selected":"") . ">"
|
||||
. lang("Daily") . "</option>";
|
||||
|
||||
echo "<option value=\"weekly\"" . (strcmp($rpt_type,'weekly')==0?"selected":"") . ">"
|
||||
echo "<option value=\"weekly\"" . (strcmp($cal_info->rpt_type,'weekly')==0?"selected":"") . ">"
|
||||
. lang("Weekly") . "</option>";
|
||||
|
||||
echo "<option value=\"monthlyByDay\"".(strcmp($rpt_type,'monthlyByDay')==0?"selected":"")
|
||||
echo "<option value=\"monthlyByDay\"".(strcmp($cal_info->rpt_type,'monthlyByDay')==0?"selected":"")
|
||||
. ">" . lang("Monthly (by day)") . "</option>";
|
||||
|
||||
echo "<option value=\"monthlyByDate\"".(strcmp($rpt_type,'monthlyByDate')==0?"checked":"")
|
||||
echo "<option value=\"monthlyByDate\"".(strcmp($cal_info->rpt_type,'monthlyByDate')==0?"checked":"")
|
||||
. "> " . lang("Monthly (by date)") . "</option>";
|
||||
|
||||
echo "<option value=\"yearly\"" . (strcmp($rpt_type,'yearly')==0?"checked":"") . ">"
|
||||
echo "<option value=\"yearly\"" . (strcmp($cal_info->rpt_type,'yearly')==0?"checked":"") . ">"
|
||||
. lang("Yearly") . "</option>";
|
||||
?>
|
||||
</select>
|
||||
@ -317,39 +289,28 @@ function validate_and_submit() {
|
||||
<tr>
|
||||
<td><b><?php echo lang("Repeat End date"); ?>:</b></td>
|
||||
<td><input type=checkbox name=rpt_end_use value=y <?php
|
||||
echo ($rpt_end?"checked":""); ?>> <?php echo lang("Use End date"); ?>
|
||||
echo ($cal_info->rpt_end?"checked":""); ?>> <?php echo lang("Use End date"); ?>
|
||||
|
||||
<?php
|
||||
if ($rpt_end) {
|
||||
$rpt_day = date("d",$rpt_end);
|
||||
$rpt_month = date("m",$rpt_end);
|
||||
$rpt_year = date("Y",$rpt_end);
|
||||
} else {
|
||||
$rpt_day = $day+1;
|
||||
$rpt_month = $month;
|
||||
$rpt_year = $year;
|
||||
}
|
||||
|
||||
$day_html = "<SELECT NAME=\"rpt_day\">";
|
||||
for ($i = 1; $i <= 31; $i++) {
|
||||
$day_html .= "<OPTION value=\"$i\"" . ($i == $rpt_day ? " SELECTED" : "")
|
||||
$day_html .= "<OPTION value=\"$i\"" . ($i == $cal_info->rpt_day ? " SELECTED" : "")
|
||||
. ">$i</option>\n";
|
||||
}
|
||||
$day_html .= "</select>";
|
||||
|
||||
$month_html = "<select name=\"rpt_month\">";
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$m = lang(date("F", mktime(0,0,0,$i,1,$rpt_year)));
|
||||
$month_html .= "<OPTION VALUE=\"$i\"" . ($i == $rpt_month ? " SELECTED" : "")
|
||||
$m = lang(date("F", mktime(0,0,0,$i,1,$cal_info->rpt_year)));
|
||||
$month_html .= "<OPTION VALUE=\"$i\"" . ($i == $cal_info->rpt_month ? " SELECTED" : "")
|
||||
. ">$m</option>\n";
|
||||
}
|
||||
$month_html .= "</select>";
|
||||
|
||||
$year_html = "<select name=\"rpt_year\">";
|
||||
for ($i = -1; $i < 5; $i++) {
|
||||
$y = date("Y") + $i;
|
||||
$year_html .= "<OPTION VALUE=\"$y\"" . ($y == $rpt_year ? " SELECTED" : "")
|
||||
. ">$y</option>\n";
|
||||
for ($i = ($cal_info->rpt_year - 1); $i < ($cal_info->rpt_year + 5); $i++) {
|
||||
$year_html .= "<OPTION VALUE=\"$i\"" . ($i == $cal_info->rpt_year ? " SELECTED" : "") . ">$i"
|
||||
. "</option>\n";
|
||||
}
|
||||
$year_html .= "</select>";
|
||||
|
||||
@ -362,19 +323,19 @@ function validate_and_submit() {
|
||||
<td><b><?php echo lang("Repeat day"); ?>: </b><?php echo lang("(for Weekly)"); ?></td>
|
||||
<td><?php
|
||||
echo "<input type=checkbox name=rpt_sun value=y "
|
||||
. ($rpt_sun?"checked":"") . "> " . lang("Sunday");
|
||||
. ($cal_info->rpt_sun?"checked":"") . "> " . lang("Sunday");
|
||||
echo "<input type=checkbox name=rpt_mon value=y "
|
||||
. ($rpt_mon?"checked":"") . "> " . lang("Monday");
|
||||
. ($cal_info->rpt_mon?"checked":"") . "> " . lang("Monday");
|
||||
echo "<input type=checkbox name=rpt_tue value=y "
|
||||
. ($rpt_tue?"checked":"") . "> " . lang("Tuesday");
|
||||
. ($cal_info->rpt_tue?"checked":"") . "> " . lang("Tuesday");
|
||||
echo "<input type=checkbox name=rpt_wed value=y "
|
||||
. ($rpt_wed?"checked":"") . "> " . lang("Wednesday");
|
||||
. ($cal_info->rpt_wed?"checked":"") . "> " . lang("Wednesday");
|
||||
echo "<input type=checkbox name=rpt_thu value=y "
|
||||
. ($rpt_thu?"checked":"") . "> " . lang("Thursday");
|
||||
. ($cal_info->rpt_thu?"checked":"") . "> " . lang("Thursday");
|
||||
echo "<input type=checkbox name=rpt_fri value=y "
|
||||
. ($rpt_fri?"checked":"") . "> " . lang("Friday");
|
||||
. ($cal_info->rpt_fri?"checked":"") . "> " . lang("Friday");
|
||||
echo "<input type=checkbox name=rpt_sat value=y "
|
||||
. ($rpt_sat?"checked":"") . "> " . lang("Saturday");
|
||||
. ($cal_info->rpt_sat?"checked":"") . "> " . lang("Saturday");
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
@ -382,7 +343,7 @@ function validate_and_submit() {
|
||||
<td><b><?php echo lang("Frequency"); ?>: </b></td>
|
||||
<td>
|
||||
<input name="rpt_freq" size="4" maxlength="4" value="<?php
|
||||
echo $rpt_freq; ?>">
|
||||
echo $cal_info->rpt_freq; ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</TABLE>
|
||||
|
@ -15,7 +15,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"]["noheader"]="True";
|
||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True);
|
||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "noheader" => True, "nonavbar" => True, "enable_calendar_class" => True, "enable_nextmatchs_class" => True);
|
||||
include("../header.inc.php");
|
||||
// Input time format "2359"
|
||||
function add_duration($time, $duration)
|
||||
@ -123,7 +123,7 @@ if (! $error) {
|
||||
$phpgw->db->query("DELETE FROM webcal_entry_groups WHERE cal_id = $id");
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO webcal_entry (cal_create_by, cal_date, " .
|
||||
$sql = "INSERT INTO webcal_entry (cal_owner, cal_date, " .
|
||||
"cal_time, cal_mod_date, cal_mod_time, cal_duration, cal_priority, " .
|
||||
"cal_access, cal_type, cal_name, cal_description ) " .
|
||||
"VALUES ('" . $phpgw_info["user"]["account_id"] . "', ";
|
||||
@ -230,3 +230,4 @@ $phpgw->common->phpgw_header();
|
||||
|
||||
$phpgw->db->unlock();
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -49,15 +49,15 @@
|
||||
if ($phpgw->db->f(0) == $id)
|
||||
$is_my_event = true;
|
||||
|
||||
$phpgw->db->query("SELECT cal_create_by, cal_date, cal_time, cal_mod_date, "
|
||||
$phpgw->db->query("SELECT cal_owner, cal_date, cal_time, cal_mod_date, "
|
||||
. "cal_mod_time,cal_duration,cal_priority,cal_type,cal_access, "
|
||||
. "cal_name,cal_description,account_firstname, account_lastname "
|
||||
. " FROM webcal_entry, accounts WHERE cal_id=$id "
|
||||
. " and webcal_entry.cal_create_by = accounts.account_id");
|
||||
. " and webcal_entry.cal_owner = accounts.account_id");
|
||||
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$create_by = $phpgw->db->f(0);
|
||||
$owner = $phpgw->db->f(0);
|
||||
$name = $phpgw->db->f(9);
|
||||
$description = $phpgw->db->f(10);
|
||||
|
||||
@ -197,7 +197,7 @@
|
||||
<P>
|
||||
|
||||
<?php
|
||||
if ($phpgw_info["user"]["account_id"] == $create_by) {
|
||||
if ($phpgw_info["user"]["account_id"] == $owner) {
|
||||
echo "<A HREF=\"" . $phpgw->link("edit_entry.php","id=$id") . "\">"
|
||||
. lang("Edit") . "</A><BR>\n<A HREF=\"" . $phpgw->link("delete.php","id=$id") . "\" onClick=\"return confirm('"
|
||||
. lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang("Delete") . "</A><BR>\n";
|
||||
|
@ -9,6 +9,7 @@
|
||||
- Fixed problem with deletion of accounts.
|
||||
- Fixed a few problems with error reporting in the accounts section.
|
||||
Thanks mdean <mdean@kcnet.com>
|
||||
- Renamed the webcal_entry.cal_create_by field to webcal_entry.cal_owner.
|
||||
|
||||
[0.9.3] - Fixed the new user account form not returning the users firstname or last name when an
|
||||
error is reported.
|
||||
|
@ -67,7 +67,7 @@
|
||||
|
||||
$ok = true;
|
||||
$baseDir = $phpgw_info["server"]["server_root"];
|
||||
include("./inc/core_setup.inc.php");
|
||||
include("inc/core_setup.inc.php");
|
||||
if (!$ok) {
|
||||
exit;
|
||||
} else {
|
||||
|
@ -166,7 +166,7 @@
|
||||
$sql = "CREATE TABLE webcal_entry (
|
||||
cal_id int(11) DEFAULT '0' NOT NULL auto_increment,
|
||||
cal_group_id int(11),
|
||||
cal_create_by varchar(25) NOT NULL,
|
||||
cal_owner int(11) NOT NULL,
|
||||
cal_date int(11) DEFAULT '0' NOT NULL,
|
||||
cal_time int(11),
|
||||
cal_mod_date int(11),
|
||||
|
@ -324,6 +324,11 @@
|
||||
$currentver = "0.9.4pre2";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre2") {
|
||||
$db->query("alter table webcal_entry change cal_create_by cal_owner int(11) NOT NULL");
|
||||
$currentver = "0.9.4pre3";
|
||||
update_version_table();
|
||||
}
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 0.9.3 to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
@ -334,4 +339,4 @@
|
||||
v0_9_2to0_9_3();
|
||||
v0_9_3to0_9_4();
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -144,7 +144,7 @@
|
||||
$sql = "CREATE TABLE webcal_entry (
|
||||
cal_id serial,
|
||||
cal_group_id int NULL,
|
||||
cal_create_by varchar(25) NOT NULL,
|
||||
cal_owner int NOT NULL,
|
||||
cal_date int NOT NULL,
|
||||
cal_time int NULL,
|
||||
cal_mod_date int,
|
||||
|
@ -325,6 +325,11 @@
|
||||
$currentver = "0.9.4pre2";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre2") {
|
||||
$db->query("alter table webcal_entry change cal_create_by cal_owner int NOT NULL");
|
||||
$currentver = "0.9.4pre3";
|
||||
update_version_table();
|
||||
}
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 0.9.3 to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
@ -335,4 +340,4 @@
|
||||
v0_9_2to0_9_3();
|
||||
v0_9_3to0_9_4();
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user