trying to fix group edits

This commit is contained in:
skeeter 2000-10-04 03:30:03 +00:00
parent b1111878f2
commit 930e6e1d83
3 changed files with 40 additions and 42 deletions

View File

@ -56,8 +56,7 @@ if ($id > 0) {
while ($phpgw->db->next_record()) { while ($phpgw->db->next_record()) {
$participants[$phpgw->db->f("cal_login")] = 1; $participants[$phpgw->db->f("cal_login")] = 1;
} }
$phpgw->db->query("select * from webcal_entry_repeats where cal_id='$id" $phpgw->db->query("select * from webcal_entry_repeats where cal_id=$id");
. "'");
$phpgw->db->next_record(); $phpgw->db->next_record();
$rpt_type = $phpgw->db->f("cal_type"); $rpt_type = $phpgw->db->f("cal_type");
@ -108,9 +107,9 @@ function validate_and_submit() {
} }
</SCRIPT> </SCRIPT>
</HEAD> </HEAD>
<BODY BGCOLOR="<?php echo $BGCOLOR; ?>"> <BODY BGCOLOR="#C0C0C0">
<H2><FONT COLOR="<?php echo $H2COLOR;?>"><?php <H2><FONT COLOR="#000000"><?php
if ($id) if ($id)
echo lang("Calendar - Edit"); echo lang("Calendar - Edit");
else else
@ -241,7 +240,7 @@ function validate_and_submit() {
<TD><SELECT NAME="n_groups[]" multiple size="5"> <TD><SELECT NAME="n_groups[]" multiple size="5">
<?php <?php
if ($id > 0) { if ($id > 0) {
$phpgw->db->query("select groups from webcal_entry_groups where cal_id='$id'"); $phpgw->db->query("select groups from webcal_entry_groups where cal_id=$id");
$phpgw->db->next_record(); $phpgw->db->next_record();
$db_groups = $phpgw->db->f("groups"); $db_groups = $phpgw->db->f("groups");
} }

View File

@ -206,7 +206,7 @@ if (! $error) {
. "cal_end,cal_days,cal_frequency) values($id,'$rpt_type'," . "cal_end,cal_days,cal_frequency) values($id,'$rpt_type',"
. "$end,'$days',$freq)"); . "$end,'$days',$freq)");
} }
$phpgw->db->query("insert into webcal_entry_groups values ('$id','" $phpgw->db->query("insert into webcal_entry_groups values ($id,'"
. $phpgw->accounts->array_to_string($access,$n_groups) . "') "); . $phpgw->accounts->array_to_string($access,$n_groups) . "') ");

View File

@ -66,47 +66,47 @@
</STYLE> </STYLE>
</HEAD> </HEAD>
<TABLE BORDER=0 WIDTH=100%> <table border="0" width="100%">
<TR> <tr>
<?php <?php
if (! $friendly) { if (! $friendly) {
echo "<TD ALIGN=\"left\">"; echo "<td align=\"left\">";
display_small_month($prevmonth,$prevyear,True); display_small_month($prevmonth,$prevyear,True);
} }
?> ?>
<TD ALIGN="middle"><FONT SIZE="+2" COLOR="<?php echo $H2COLOR;?>"><B> <td align="middle"><font size="+2" color="#000000"><B>
<?php <?php
$m = mktime(2,0,0,$thismonth,1,$thisyear); $m = mktime(2,0,0,$thismonth,1,$thisyear);
print lang(strftime("%B",$m)) . " " . $thisyear; print lang(strftime("%B",$m)) . " " . $thisyear;
?> ?>
</B></FONT> </b></font>
<FONT COLOR="<?php echo $H2COLOR;?>" SIZE="+1"> <font color="#000000" size="+1">
<br> <br>
<?php <?php
echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]); echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]);
?> ?>
</FONT></TD> </font></td>
<?php <?php
if (! $friendly) { if (! $friendly) {
echo '<TD ALIGN="right">'; echo "<td align=\"right\">";
display_small_month($nextmonth,$nextyear,True); display_small_month($nextmonth,$nextyear,True);
} }
?> ?>
</TR> </tr>
</TABLE> </table>
<TABLE WIDTH=100% BORDER=0 bordercolor=FFFFFF cellspacing=2 cellpadding=2> <table width="100%" border="0" bordercolor="#FFFFFF" cellspacing="2" cellpadding="2">
<TR> <tr>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Sun"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Sun"); ?></font></th>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Mon"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Mon"); ?></font></th>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Tue"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Tue"); ?></font></th>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Wed"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Wed"); ?></font></th>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Thu"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Thu"); ?></font></th>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Fri"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Fri"); ?></font></th>
<TH WIDTH=14% BGCOLOR="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><FONT COLOR="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Sat"); ?></FONT></TH> <th width="14%" bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>"><font color="<?php echo $phpgw_info["theme"]["th_text"]; ?>"><?php echo lang("Sat"); ?></font></th>
</TR> </tr>
<?php <?php
/* Pre-Load the repeated events for quckier access */ /* Pre-Load the repeated events for quckier access */
@ -130,41 +130,41 @@
for ($i = $sun; date("Ymd",$i) <= date("Ymd",$monthend); $i += (24 * 3600 * 7) ) { for ($i = $sun; date("Ymd",$i) <= date("Ymd",$monthend); $i += (24 * 3600 * 7) ) {
$CELLBG = $phpgw->nextmatchs->alternate_row_color($CELLBG); $CELLBG = $phpgw->nextmatchs->alternate_row_color($CELLBG);
echo "<TR>\n"; echo "<tr>\n";
for ($j = 0; $j < 7; $j++) { for ($j = 0; $j < 7; $j++) {
$date = $i + ($j * 24 * 3600); $date = $i + ($j * 24 * 3600);
if (date("Ymd",$date) >= date("Ymd",$monthstart) && if (date("Ymd",$date) >= date("Ymd",$monthstart) &&
date("Ymd",$date) <= date("Ymd",$monthend) ) { date("Ymd",$date) <= date("Ymd",$monthend) ) {
echo "<TD VALIGN=\"top\" WIDTH=75 HEIGHT=75 ID=\"tablecell\""; echo "<td valign=\"top\" width=\"75\" height=\"75\" id=\"tablecell\"";
if (date("Ymd",$date) == date("Ymd",$today)) { if (date("Ymd",$date) == date("Ymd",$today)) {
echo " BGCOLOR=\"".$phpgw_info["theme"]["cal_today"]."\">"; echo " bgcolor=\"".$phpgw_info["theme"]["cal_today"]."\">";
} else { } else {
echo " BGCOLOR=\"$CELLBG\">"; echo " bgcolor=\"".$phpgw_info["theme"]["cal_dayview"]."\">";
} }
print_date_entries($date,$friendly,$phpgw_info["user"]["sessionid"]); print_date_entries($date,$friendly,$phpgw_info["user"]["sessionid"]);
$thirsday=$i+24*3600*4; $thirsday=$i+24*3600*4;
if ($phpgw_info["user"]["preferences"]["weekdaystarts"] == "Sunday" && $j == 0) { if ($phpgw_info["user"]["preferences"]["weekdaystarts"] == "Sunday" && $j == 0) {
echo '<font size=-2><a href="' . $phpgw->link("week.php","date=" . date("Ymd",$date)) . '">week ' .(int)((date("z",$thirsday)+7)/7) . '</a></font>'; echo "<font size=\"-2\"><a href=\"".$phpgw->link("week.php","date=".date("Ymd",$date))."\">week " .(int)((date("z",$thirsday)+7)/7) . "</a></font>";
} }
if ($phpgw_info["user"]["preferences"]["weekdaystarts"] == "Monday" && $j == 1) { if ($phpgw_info["user"]["preferences"]["weekdaystarts"] == "Monday" && $j == 1) {
echo '<font size=-2><a href="' . $phpgw->link("week.php","date=" . date("Ymd",$date)) . '">week ' . (int)((date("z",$thirsday)+7)/7) . '</a></font>'; echo "<font size=\"-2\"><a href=\"".$phpgw->link("week.php","date=" . date("Ymd",$date)) . "\">week " . (int)((date("z",$thirsday)+7)/7) . "</a></font>";
} }
echo "</TD>\n"; echo "</td>\n";
} else { } else {
echo "<TD></TD>\n"; echo "<td></td>\n";
} }
} }
print "</TR>\n"; print "</tr>\n";
} }
?> ?>
</TABLE> </table>
<P> <p>
<P> <p>
<?php <?php
if (! $friendly) { if (! $friendly) {
@ -172,10 +172,9 @@
if ($thisyear) if ($thisyear)
$param .= "year=$thisyear&month=$thismonth&"; $param .= "year=$thisyear&month=$thismonth&";
$param .= "friendly=1\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window." $param .= "friendly=1";
. "status = '" . lang("Generate printer-friendly version"). "'"; echo "<a href=\"".$phpgw->link($PHP_SELF,$param)."\" target=\"cal_printer_friendly\" onMouseOver=\"window.status='"
echo "<a href=\"".$phpgw->link($PHP_SELF,$param)."\">"; .lang("Generate printer-friendly version")."'>[" . lang("Printer Friendly") . "]</a>";
echo "[". lang("Printer Friendly") . "]</A>";
$phpgw->common->phpgw_footer(); $phpgw->common->phpgw_footer();
} }
?> ?>