'; $newEvent = dbFetchOne('SELECT E.* FROM Events AS E WHERE E.Id = ?', NULL, array($eid)); } elseif ( $eids ) { // Multi Event Mode $title = translate('Events'); $sql = 'SELECT E.* FROM Events AS E WHERE '; $sqlWhere = array(); $sqlValues = array(); foreach ( $eids as $eid ) { $eid = validInt($eid); $inputs .= ''; $sqlWhere[] = 'E.Id = ?'; $sqlValues[] = $eid; } unset($eid); $sql .= join(' OR ', $sqlWhere); foreach( dbFetchAll( $sql, NULL, $sqlValues ) as $row ) { if ( !isset($newEvent) ) { $newEvent = $row; } else { if ( $newEvent['Cause'] && $newEvent['Cause'] != $row['Cause'] ) $newEvent['Cause'] = ''; if ( $newEvent['Notes'] && $newEvent['Notes'] != $row['Notes'] ) $newEvent['Notes'] = ''; } } } else { // Event Mode not specified - should we really proceed if neither eid nor eids is set? $title = translate('Events'); } ?>