include HCLANG . '/admin/register.php'; $target = AdminRoot . '/index.php'; $eID = isset($_GET['eID']) && is_numeric($_GET['eID']) ? cIn(strip_tags($_GET['eID'])) : 0; $result = doQuery("SELECT e.Title, e.StartDate, e.StartTime, e.TBD, e.ContactName, e.ContactEmail, er.Space, COUNT(r.PkID) as SpacesTaken\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "events e\r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventrsvps er ON (e.PkID = er.EventID)\r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "registrants r ON (e.PkID = r.EventID)\r\n\t\t\t\t\tWHERE e.PkID = '" . $eID . "' AND r.IsActive = 1\r\n\t\t\t\t\tGROUP BY e.Title, e.StartDate, e.StartTime, e.TBD, e.ContactName, e.ContactEmail, er.Space"); if (hasRows($result)) { $eName = mysql_result($result, 0, 4); $eEmail = mysql_result($result, 0, 5); $filename = clean_filename(cleanQuotes(strip_tags(mysql_result($result, 0, 0)))); if (mysql_result($result, 0, 3) == 0) { $eventTime = stampToDate("1980-01-01 " . mysql_result($result, 0, 2), $hc_cfg[23]); } elseif (mysql_result($result, 0, 3) == 1) { $eventTime = $hc_lang_register['AllDay']; } elseif (mysql_result($result, 0, 3) == 2) { $eventTime = $hc_lang_register['TBA']; } $rsvps = array(fetch_event_rsvp($eID, $hc_lang_register['CSVHeader']), cIn($filename) . ".csv", 'text/csv'); if (hasRows($result)) { $subject = $hc_lang_register['RosterSubject'] . ' - ' . CalName; $message = '<p> ' . $hc_lang_register['RosterEmailA'] . ' </p> <p> ' . $hc_lang_register['RosterEmailC'] . ' ' . strftime($hc_cfg[24] . ' ' . $hc_cfg[23], strtotime(SYSDATE . ' ' . SYSTIME)) . ' </p> <p> <b>' . mysql_result($result, 0, 0) . '</b><br />' . stampToDate(mysql_result($result, 0, 1), $hc_cfg[14]) . ' - ' . $eventTime . ' <br /><a href="' . CalRoot . '/index.php?eID=' . $eID . '">' . CalRoot . '/index.php?eID=' . $eID . '</a> </p> <p> <b>' . $hc_lang_register['SpacesRequested'] . '</b> ' . mysql_result($result, 0, 7) . ' ' . $hc_lang_register['Of'] . ' ' . mysql_result($result, 0, 6) . ' </p>';
<?php /** * @package Helios Calendar * @license GNU General Public License version 2 or later; see LICENSE */ define('isHC', true); define('isAction', true); include dirname(__FILE__) . '/loader.php'; $eID = isset($_GET['eID']) && is_numeric($_GET['eID']) ? cIn(strip_tags($_GET['eID'])) : 0; if (user_check_status() == 0 || !$eID > 0) { go_home(); } $result = doQuery("SELECT Title FROM " . HC_TblPrefix . "events WHERE PkID = '" . $eID . "' AND OwnerID = '" . cIn(strip_tags($_SESSION['UserPkID'])) . "'"); if (!hasRows($result)) { go_home(); } header('Content-type: application/csv'); header('Content-Disposition: inline; filename="' . clean_filename(cleanQuotes(strip_tags(mysql_result($result, 0, 0)))) . '.csv"'); echo fetch_event_rsvp($eID, $hc_lang_core['RSVPHeader']);