Fixed the parciapant list. Its now working again

This commit is contained in:
jengo 2000-10-04 21:20:50 +00:00
parent 21f29756b1
commit 37d53dce3a
2 changed files with 11 additions and 11 deletions

View File

@ -273,9 +273,8 @@ function validate_and_submit() {
. "<TD>\n<SELECT NAME=\"participants[]\" multiple size=\"$size\">\n";
while ($phpgw->db->next_record()) {
echo "<option value=\"" . $phpgw->db->f("loginid") . "\"";
if (($participants[$phpgw->db->f("account_lid")]
|| $phpgw->db->f("account_lid") == $loginid))
echo "<option value=\"" . $phpgw->db->f("account_lid") . "\"";
if ($participants[$phpgw->db->f("account_lid")])
echo " selected";
// Change this to use accounts->display_full_name()
@ -287,9 +286,9 @@ function validate_and_submit() {
echo "</option>\n";
}
echo "<input type=\"hidden\" name=\"participants[]\" value=\""
echo "</select><input type=\"hidden\" name=\"participants[]\" value=\""
. $phpgw_info["user"]["userid"] ."\">"
. "</select></td></tr>\n";
. "</td></tr>\n";
?>

View File

@ -167,17 +167,18 @@ if (! $error) {
$id = $phpgw->db->f(0);
for ($i = 0; $i < count($participants); $i++) {
while ($participant = each($participants)) {
// for ($i = 0; $i < count($participants); $i++) {
// Rewrite
$sql = "INSERT INTO webcal_entry_user (cal_id,cal_login,cal_status ) "
. "VALUES ($id, '" . $participants[$i] . "', 'A')";
. "VALUES ($id, '" . $participant[1] . "', 'A')";
$phpgw->db->query($sql);
}
if (count($participants) == 0)
$phpgw->db->query("insert into webcal_entry_user (cal_id,cal_login,cal_status"
. ") values ($id,'" . $phpgw_info["user"]["userid"] . "','A' )");
}
// if (count($participants) == 0)
// $phpgw->db->query("insert into webcal_entry_user (cal_id,cal_login,cal_status"
// . ") values ($id,'" . $phpgw_info["user"]["userid"] . "','A' )");
// }
if (strlen($rpt_type) || ! strcmp($rpt_type,'none') == 0) {
// clearly, we want to delete the old repeats, before inserting new...