Ejemplo n.º 1
0
		<legend>' . $hc_lang_event['Location'] . '</legend>';
echo $locID > 0 ? '
		<div id="locSetting" class="frm_ctrl">
			<label>' . $hc_lang_event['CurLocation'] . '</label>
			<span class="output">
				<b>' . $locName . '</b><br />
				' . buildAddress($locAddress, $locAddress2, $locCity, $state, $locPostal, $locCountry, $hc_lang_config['AddressType']) . '
			</span>
			<label>&nbsp;</label>
			<span class="output">
				<a href="javascript:;" onclick="setLocation(0,\'\',1);" class="locChange">' . $hc_lang_event['ChngLocation'] . '</a>
			</span>
		</div>' : '';
echo '
		<div id="locSearch" ' . ($locID > 0 ? ' style="display:none;"' : '') . '>';
location_select();
$inputs = array(1 => array('City', 'locCity', $locCity), 2 => array('Postal', 'locZip', $locPostal));
$first = $hc_lang_config['AddressType'] == 1 ? 1 : 2;
$second = $first == 1 ? 2 : 1;
echo '
		</div>
		<div id="custom"' . ($locID > 0 ? ' style="display:none;"' : '') . '>
			<label for="locName">' . $hc_lang_event['Name'] . '</label>
			<input onblur="buildT();buildF();" name="locName" id="locName" type="text" size="25" maxlength="50" value="' . ($locID < 1 ? $locName : '') . '" />
			<label for="locAddress">' . $hc_lang_event['Address'] . '</label>
			<input name="locAddress" id="locAddress" type="text" size="30" maxlength="75" value="' . ($locID < 1 ? $locAddress : '') . '" /><span class="output req2">*</span>
			<label for="locAddress2">' . $hc_lang_event['Address2'] . '</label>
			<input name="locAddress2" id="locAddress2" type="text" size="25" maxlength="75" value="' . ($locID < 1 ? $locAddress2 : '') . '" />
			<label for="' . $inputs[$first][1] . '">' . $hc_lang_event[$inputs[$first][0]] . '</label>
			<input name="' . $inputs[$first][1] . '" id="' . $inputs[$first][1] . '" type="text" size="20" maxlength="50" value="' . ($locID < 1 ? $inputs[$first][2] : '') . '" /><span class="output req2">*</span>';
if ($hc_lang_config['AddressRegion'] != 0) {
Ejemplo n.º 2
0
		<a href="javascript:;" onclick="calx.select(document.getElementById(\'endDate\'),\'cal2\',\'' . $hc_cfg[51] . '\');return false;" id="cal2" class="ds calendar" tabindex="-1"></a>
	</fieldset>
	<fieldset>
		<legend>' . $hc_lang_search['KeywordTitle'] . '</legend>
		<label for="keyword">' . $hc_lang_search['Keywords'] . '</label>
		<input name="keyword" id="keyword" type="text" size="50" maxlength="50" value="" x-webkit-speech />
	</fieldset>
	<fieldset>
		<legend>
			<a href="javascript:;" onclick="toggleSearch(0);" class="legend">' . $hc_lang_search['LinkLocation'] . '</a>
			| <a href="javascript:;" onclick="toggleSearch(1);" class="legend">' . $hc_lang_search['LinkCity'] . '</a>
			' . $region . '
			| <a href="javascript:;" onclick="toggleSearch(3)" class="legend">' . $hc_lang_search['LinkPostal'] . '</a>
		</legend>
		<div id="location_div">';
location_select(false);
echo '
		</div>
		<div id="city_div" style="display:none;">
			<label for="city">' . $hc_lang_search['City'] . '</label>';
if (!file_exists(HCPATH . '/cache/selCitya.php')) {
    buildCache(4, 1);
}
include HCPATH . '/cache/selCitya.php';
echo '
		</div>
		<div id="region_div" style="display:none;">
			<label for="locState">' . $hc_lang_config['RegionLabel'] . '</label>';
$state = $hc_cfg[21];
$regSelect = $hc_lang_search['RegSelect'];
$stateDisabled = 1;
Ejemplo n.º 3
0
function sr_forms_search()
{
    global $hc_cfg, $hc_lang_core, $hc_lang_search, $hc_lang_config;
    $region = $hc_lang_config['AddressRegion'] != 0 ? ' | <a tabindex="-1" href="javascript:;" onclick="toggleMe(2)" class="legend">' . $hc_lang_config['RegionTitle'] . '</a>' : '';
    echo '
    <p>' . $hc_lang_search['SearchLabel'] . '</p>

    <form name="frmEventSearch" id="frmEventSearch" method="post" action="' . CalRoot . '/index.php?com=searchresult" onsubmit="return validate();">
    <input type="hidden" id="locPreset" name="locPreset" value="0" />
    <input type="hidden" id="locPresetName" name="locPresetName" value="" />
    <fieldset>
        <legend>' . $hc_lang_search['DateRange'] . '</legend>
        <label>' . $hc_lang_search['Dates'] . '</label>
        <input name="startDate" id="startDate" type="text" size="12" maxlength="10" value="' . strftime($hc_cfg[24], strtotime(SYSDATE)) . '" required="required" />
        <a href="javascript:;" onclick="calx.select(document.getElementById(\'startDate\'),\'cal1\',\'' . $hc_cfg[51] . '\');return false;" id="cal1" class="ds calendar" tabindex="-1"></a>
        <span class="output">&nbsp;&nbsp;' . $hc_lang_search['To'] . '&nbsp;&nbsp;</span>
        <input name="endDate" id="endDate" type="text" size="12" maxlength="10" value="' . strftime($hc_cfg[24], strtotime(SYSDATE) + $hc_cfg[53] * 86400) . '" required="required" />
        <a href="javascript:;" onclick="calx.select(document.getElementById(\'endDate\'),\'cal2\',\'' . $hc_cfg[51] . '\');return false;" id="cal2" class="ds calendar" tabindex="-1"></a>
    </fieldset>
    <fieldset>
        <legend>' . $hc_lang_search['KeywordLabel'] . '</legend>
        <label for="keyword">' . $hc_lang_search['Keywords'] . '</label>
        <input name="keyword" id="keyword" type="text" size="50" maxlength="50" placeholder="' . $hc_lang_search['PlaceKeywords'] . '" value="" speech x-webkit-speech />
    </fieldset>
    <fieldset>
        <legend>
            <a tabindex="-1" href="javascript:;" onclick="toggleMe(0);" class="legend">' . $hc_lang_search['LocationLabel'] . '</a>
            | <a tabindex="-1" href="javascript:;" onclick="toggleMe(1);" class="legend">' . $hc_lang_search['CityLabel'] . '</a>
            ' . $region . '
            | <a tabindex="-1" href="javascript:;" onclick="toggleMe(3)" class="legend">' . $hc_lang_search['PostalLabel'] . '</a>
        </legend>
        <div id="location_div">';
    location_select(false);
    echo '
        </div>
        <div id="city_div" style="display:none;">
            <label for="city">' . $hc_lang_search['City'] . '</label>';
    $f = $hc_cfg[11] == 1 ? 'a' : '';
    if (!file_exists(HCPATH . '/cache/selCity' . $f . '.php')) {
        buildCache(4, $hc_cfg[11]);
    }
    include HCPATH . '/cache/selCity' . $f . '.php';
    echo '
        </div>
        <div id="region_div" style="display:none;">
            <label for="locState">' . $hc_lang_config['RegionLabel'] . '</label>';
    $state = $hc_cfg[21];
    $regSelect = $hc_lang_search['RegSelect'];
    $stateDisabled = 1;
    include HCLANG . '/' . $hc_lang_config['RegionFile'];
    echo '
        </div>
        <div id="postal_div" style="display:none;">
            <label for="postal">' . $hc_lang_search['Postal'] . '</label>';
    if (!file_exists(HCPATH . '/cache/selPostal' . $f . '.php')) {
        buildCache(5, $hc_cfg[11]);
    }
    include HCPATH . '/cache/selPostal' . $f . '.php';
    echo '
        </div>
    </fieldset>
    <fieldset>
        <legend>' . $hc_lang_search['CategoryLabel'] . '</legend>
        <label>' . $hc_lang_search['Categories'] . '</label>';
    sr_shared_getCategories('frmEventSearch', $hc_cfg['CatCols'], NULL, $hc_cfg['CatLinks']);
    echo '
    </fieldset>
    <fieldset>
        <legend>' . $hc_lang_search['RecurringLabel'] . '</legend>
        <label for="recurSet">' . $hc_lang_search['RecurSet'] . '</label>
        <select name="recurSet" id="recurSet">
            <option value="0">' . $hc_lang_search['RecurSet0'] . '</option>
            <option value="1">' . $hc_lang_search['RecurSet1'] . '</option>
        </select>
    </fieldset>
    <input type="submit" name="submit" class="btn btn-primary" id="submit" value="' . $hc_lang_search['BeginSearch'] . '" />
    </form>
    <div id="dsCal"></div>';
}
Ejemplo n.º 4
0
/**
 * Output Event Update Submission Form
 * @since 2.1.0
 * @version 2.2.1
 * @return void
 */
function submit_update()
{
    global $hc_cfg, $hc_captchas, $hc_lang_submit, $hc_lang_config, $hc_lang_core, $hc_time;
    if (isset($_GET['msg'])) {
        switch (cIn(strip_tags($_GET['msg']))) {
            case 1:
                feedback(1, $hc_lang_submit['Feed02']);
                echo '
		<p>' . $hc_lang_submit['ThankYouUpdated'] . '</p>
		<p><a href="' . CalRoot . '/index.php?com=acc&amp;sec=list">' . $hc_lang_submit['ClickEvents'] . '</a></p>
		<p><a href="' . CalRoot . '/index.php?com=submit">' . $hc_lang_submit['ClickSubmitAgain'] . '</a></p>';
                return -1;
                break;
        }
    }
    $eID = $user_id = 0;
    $uID = isset($_SESSION['UserPkID']) && is_numeric($_SESSION['UserPkID']) ? $_SESSION['UserPkID'] : '0';
    $series = $editString = $regProgress = $dateOutput = '';
    $events = $dateString = array();
    $editSingle = false;
    $startTimeHour = date($hc_time['format'], strtotime(SYSDATE . ' ' . SYSTIME));
    $endTimeHour = date($hc_time['format'], strtotime(SYSDATE . ' ' . SYSTIME . ' +1 hour'));
    $startTimeMins = $endTimeMins = '00';
    $startTimeAMPM = date("A", strtotime(SYSDATE . ' ' . SYSTIME));
    $endTimeAMPM = date("A", strtotime(SYSDATE . ' ' . SYSTIME . ' +1 hour'));
    $user_net = $user_name = $user_email = $user_categories = '';
    if (isset($_GET['eID']) && is_numeric($_GET['eID'])) {
        $editSingle = true;
        $eID = cIn($_GET['eID']);
    } else {
        if (isset($_GET['sID'])) {
            $series = cIn(strip_tags($_GET['sID']));
            $resultS = doQuery("SELECT GROUP_CONCAT(DISTINCT PkID ORDER BY PkID SEPARATOR ',')\r\n\t\t\t\t\t\t\t\tFROM " . HC_TblPrefix . "events WHERE SeriesID = '" . $series . "'");
            $events = explode(',', mysql_result($resultS, 0, 0));
            $events = array_filter($events, 'is_numeric');
        } elseif (isset($_POST['eventID'])) {
            $events = array_filter($_POST['eventID'], 'is_numeric');
        }
        $eID = count($events) > 0 ? $events[0] : '0';
        $editString = count($events) > 0 ? implode(',', $events) : 'NULL';
        $resultS = doQuery("SELECT GROUP_CONCAT(StartDate ORDER BY StartDate SEPARATOR ',')\r\n\t\t\t\t\t\t\tFROM " . HC_TblPrefix . "events WHERE PkID IN (" . $editString . ")");
        $dateString = hasRows($resultS) ? explode(',', mysql_result($resultS, 0, 0)) : array();
    }
    $result = doQuery("SELECT e.*, l.PkID, l.Name, l.Address, l.Address2, l.City, l.State, l.Zip, l.Country, er.*, u.PkID, u.NetworkType, u.NetworkName, u.Email, u.Categories\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "events e\r\n\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "locations l ON (e.LocID = l.PkID)\r\n\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventrsvps er ON (er.EventID = e.PkID)\r\n\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "users u ON (e.OwnerID = u.PkID)\r\n\t\t\t\t\t\tWHERE e.PkID = '" . $eID . "' AND e.IsActive = 1 AND e.OwnerID = '" . cIn($uID) . "'");
    if (!hasRows($result) || $eID < 1 || mysql_result($result, 0, 0) < 1) {
        echo '
		<p>' . $hc_lang_submit['EditWarning'] . '</p>
		<p><a href="' . CalRoot . '/index.php?com=acc&amp;sec=list">' . $hc_lang_submit['ClickEvents'] . '</a></p>
		<p><a href="' . CalRoot . '/index.php?com=submit">' . $hc_lang_submit['ClickSubmitAgain'] . '</a></p>';
    } else {
        $eventTitle = cOut(mysql_result($result, 0, 1));
        $eventDesc = cOut(mysql_result($result, 0, 8));
        $tbd = cOut(mysql_result($result, 0, 11));
        $eventDate = stampToDate(mysql_result($result, 0, 9), $hc_cfg[24]);
        $contactName = cOut(mysql_result($result, 0, 13));
        $contactEmail = cOut(mysql_result($result, 0, 14));
        $contactPhone = cOut(mysql_result($result, 0, 15));
        $contactURL = mysql_result($result, 0, 24) != '' ? cOut(mysql_result($result, 0, 24)) : '';
        $views = cOut(mysql_result($result, 0, 26));
        $imageURL = cOut(mysql_result($result, 0, 38));
        $featured = cOut(mysql_result($result, 0, 40));
        $expire = mysql_result($result, 0, 41) > 0 ? cOut(mysql_result($result, 0, 41)) : $hc_cfg[134];
        $locID = cOut(mysql_result($result, 0, 33));
        $locName = $locID == 0 ? cOut(mysql_result($result, 0, 2)) : cOut(mysql_result($result, 0, 43));
        $locAddress = $locID == 0 ? cOut(mysql_result($result, 0, 3)) : cOut(mysql_result($result, 0, 44));
        $locAddress2 = $locID == 0 ? cOut(mysql_result($result, 0, 4)) : cOut(mysql_result($result, 0, 45));
        $locCity = $locID == 0 ? cOut(mysql_result($result, 0, 5)) : cOut(mysql_result($result, 0, 46));
        $state = $locID == 0 ? cOut(mysql_result($result, 0, 6)) : cOut(mysql_result($result, 0, 47));
        $locPostal = $locID == 0 ? cOut(mysql_result($result, 0, 7)) : cOut(mysql_result($result, 0, 48));
        $locCountry = $locID == 0 ? cOut(mysql_result($result, 0, 35)) : cOut(mysql_result($result, 0, 49));
        $cost = cOut(mysql_result($result, 0, 34));
        $rsvp_type = cOut(mysql_result($result, 0, 51));
        $rsvp_space = cOut(mysql_result($result, 0, 55));
        $rsvp_disp = cOut(mysql_result($result, 0, 56));
        $rsvp_notice = cOut(mysql_result($result, 0, 57));
        $rsvp_open = stampToDate(mysql_result($result, 0, 53), $hc_cfg[24]);
        $rsvp_close = stampToDate(mysql_result($result, 0, 54), $hc_cfg[24]);
        $eventStatus = cOut(mysql_result($result, 0, 17));
        $eventBillboard = cOut(mysql_result($result, 0, 18));
        $message = cOut(mysql_result($result, 0, 27));
        $user_id = cOut(mysql_result($result, 0, 58));
        $user_net = cOut(mysql_result($result, 0, 59));
        $user_name = cOut(mysql_result($result, 0, 60));
        $user_email = cOut(mysql_result($result, 0, 61));
        $user_categories = cOut(mysql_result($result, 0, 62));
        switch ($user_net) {
            case 1:
                $user_net = 'twitter.png';
                break;
            case 2:
                $user_net = 'facebook.png';
                break;
            case 3:
                $user_net = 'google.png';
                break;
        }
        if ($tbd == 0) {
            $startTimeHour = date($hc_time['format'], strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 10)));
            $startTimeMins = date("i", strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 10)));
            $startTimeAMPM = date("A", strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 10)));
            if (mysql_result($result, 0, 12) != '') {
                $endTimeHour = date($hc_time['format'], strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 12)));
                $endTimeMins = date("i", strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 12)));
                $endTimeAMPM = date("A", strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 12)));
            } else {
                $endTimeHour = date($hc_time['format'], strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 10) . ' +1 hour'));
                $endTimeAMPM = date("A", strtotime(mysql_result($result, 0, 9) . ' ' . mysql_result($result, 0, 10) . ' +1 hour'));
                $noEndTime = 1;
            }
        }
        $stime_disabled = $tbd > 0 ? ' disabled="disabled"' : '';
        $etime_disabled = isset($noEndTime) || $tbd > 0 ? ' disabled="disabled"' : '';
        echo '
		<p>' . $hc_lang_submit['UpdateNotice'] . '</p>
		' . ($_SESSION['UserLevel'] != 2 ? '<p>' . $hc_lang_submit['NotPublisher'] . '</p>' : '') . '
		<p>(<span class="req2">*</span>) = ' . $hc_lang_submit['Required2'] . '<br />
		(<span class="req3">*</span>) = ' . $hc_lang_submit['Required3'] . '</p>
		
		<form id="frmEventUpdate" name="frmEventUpdate" method="post" action="' . CalRoot . '/event-submit-update.php" onsubmit="return validate();">
		<input type="hidden" name="eID" id="eID" value="' . $eID . '" />
		<input type="hidden" name="editString" id="editString" value="' . $editString . '" />
		<input type="hidden" id="locPreset" name="locPreset" value="' . $locID . '" />
		<input type="hidden" id="locPresetName" name="locPresetName" value="' . $locName . '" />';
        if ($editSingle == false) {
            echo '
		<input type="hidden" name="grpDate" id="grpDate" value="' . stampToDate(min($dateString), $hc_cfg[24]) . ' - ' . stampToDate(max($dateString), $hc_cfg[24]) . '" />';
            $cnt = 1;
            foreach ($dateString as $val) {
                $dateOutput .= $cnt % 8 == 0 ? stampToDate($val, $hc_cfg[24]) . '<br />' : stampToDate($val, $hc_cfg[24]) . ', ';
                ++$cnt;
            }
        }
        if ($hc_cfg[65] > 0 && in_array(1, $hc_captchas)) {
            echo '
		<fieldset>
			<legend>' . $hc_lang_core['CapLegend'] . '</legend>';
            buildCaptcha();
            echo '
		</fieldset>';
        }
        echo '
		<fieldset>
			<legend>' . $hc_lang_submit['ContactInfo'] . '</legend>
			<label for="submitName">' . $hc_lang_submit['Name'] . '</label>
			<span class="output submit_user">
				<img src="' . CalRoot . '/img/share/' . $user_net . '" width="16" height="16" alt="" /> ' . $user_name . '
				<input name="submitName" id="submitName" type="hidden" value="' . $user_name . '" />
			</span>
			<label for="submitEmail">' . $hc_lang_submit['Email'] . '</label>
			<span class="output submit_user">
				' . $user_email . '
				<input name="submitEmail" id="submitEmail" type="hidden" value="' . $user_email . '" />
			</span>
			<input name="submitID" id="submitID" type="hidden" value="' . $user_id . '" />
		</fieldset>
		<fieldset>
			<legend>' . $hc_lang_submit['EventDetails'] . '</legend>
			<label for="eventTitle">' . $hc_lang_submit['Title'] . '</label>
			<input name="eventTitle" id="eventTitle" type="text" size="65" maxlength="150" required="required" placeholder="' . $hc_lang_submit['PlaceTitle'] . '" value="' . $eventTitle . '" />
			<label for="eventDescription">' . $hc_lang_submit['Description'] . '</label>
			<textarea name="eventDescription" id="eventDescription" rows="20" placeholder="' . $hc_lang_submit['PlaceDesc'] . '" class="mce_edit">' . $eventDesc . '</textarea>
			<label for="cost">' . $hc_lang_submit['Cost'] . '</label>
			<input name="cost" id="cost" type="text" size="25" maxlength="50" placeholder="' . $hc_lang_submit['PlaceCost'] . '" value="' . $cost . '" />
		</fieldset>
		<fieldset>
			<legend>' . $hc_lang_submit['DateTime'] . '</legend>
			' . ($editSingle == true ? '<label for="eventDate">' . $hc_lang_submit['EventDate'] . '</label>
			<input name="eventDate" id="eventDate" type="text" size="12" maxlength="10" required="required" value="' . $eventDate . '" />
			<a href="javascript:;" onclick="calx.select(document.getElementById(\'eventDate\'),\'cal1\',\'' . $hc_cfg[51] . '\');return false;" id="cal1" class="ds calendar" tabindex="-1"></a>' : '<label for="eventDate">' . $hc_lang_submit['Dates'] . '</label>
			<span class="output">' . $dateOutput . '</span>') . '
			<label>' . $hc_lang_submit['StartTime'] . '</label>
			<input name="startTimeHour" id="startTimeHour" type="text" size="2" maxlength="2" required="required" value="' . $startTimeHour . '"' . $stime_disabled . ' />
			<span class="frm_ctrls">
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'startTimeHour\'),1,' . $hc_time['input'] . ')" class="time tup" tabindex="-1"></a>
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'startTimeHour\'),-1,' . $hc_time['input'] . ')" class="time tdown" tabindex="-1"></a>
			</span>
			<input name="startTimeMins" id="startTimeMins" type="text" size="2" maxlength="2" required="required" value="' . $startTimeMins . '"' . $stime_disabled . ' />
			<span class="frm_ctrls">	
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'startTimeMins\'),5,59)" class="time tup" tabindex="-1"></a>
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'startTimeMins\'),-5,59)" class="time tdown" tabindex="-1"></a>
			</span>';
        if ($hc_time['input'] == 12) {
            echo '
			<select name="startTimeAMPM" id="startTimeAMPM">
				<option ' . ($startTimeAMPM == 'AM' ? 'selected="selected" ' : '') . 'value="AM">' . $hc_lang_submit['AM'] . '</option>
				<option ' . ($startTimeAMPM == 'PM' ? 'selected="selected" ' : '') . 'value="PM">' . $hc_lang_submit['PM'] . '</option>
			</select>';
        }
        echo '
			<label>' . $hc_lang_submit['EndTime'] . '</label>
			<input name="endTimeHour" id="endTimeHour" type="text" size="2" maxlength="2" required="required" value="' . $endTimeHour . '"' . $etime_disabled . ' />
			<span class="frm_ctrls">	
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'endTimeHour\'),1,' . $hc_time['input'] . ')" class="time tup" tabindex="-1"></a>
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'endTimeHour\'),-1,' . $hc_time['input'] . ')" class="time tdown" tabindex="-1"></a>
			</span>
			<input name="endTimeMins" id="endTimeMins" type="text" size="2" maxlength="2" required="required" value="' . $endTimeMins . '"' . $etime_disabled . ' />
			<span class="frm_ctrls">
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'endTimeMins\'),5,59)" class="time tup" tabindex="-1"></a>
				<a href="javascript:;" onclick="chngClock(document.getElementById(\'endTimeMins\'),-5,59)" class="time tdown" tabindex="-1"></a>
			</span>';
        if ($hc_time['input'] == 12) {
            echo '
			<select name="endTimeAMPM" id="endTimeAMPM">
				<option ' . ($endTimeAMPM == 'AM' ? 'selected="selected" ' : '') . 'value="AM">' . $hc_lang_submit['AM'] . '</option>
				<option ' . ($endTimeAMPM == 'PM' ? 'selected="selected" ' : '') . 'value="PM">' . $hc_lang_submit['PM'] . '</option>
			</select>';
        }
        echo '
			<span class="frm_ctrls">
				<label for="ignoreendtime"><input name="ignoreendtime" id="ignoreendtime" type="checkbox"' . (isset($noEndTime) ? ' checked="checked"' : '') . $stime_disabled . ' onclick="togEndTime(this.checked);" />' . $hc_lang_submit['NoEndTime'] . '</label>
			</span>
			<label class="blank">&nbsp;</label>
			<span class="frm_ctrls">
				<label for="overridetime"><input type="checkbox" name="overridetime" id="overridetime"' . ($tbd > 0 ? ' checked="checked"' : '') . ' onclick="togOverride();" />' . $hc_lang_submit['Override'] . '</label>
				<label for="specialtimeall"><input type="radio" name="specialtime" id="specialtimeall" value="allday"' . ($tbd == 0 ? ' disabled="disabled"' : '') . ($tbd < 2 ? ' checked="checked"' : '') . ' />' . $hc_lang_submit['AllDay'] . '</label>
			</span>
		</fieldset>
		
		' . ($hc_cfg['IsRSVP'] == 1 ? '
		<fieldset>
			<legend>' . $hc_lang_submit['RegTitle'] . '</legend>
			<label for="rsvp_type">' . $hc_lang_submit['Registration'] . '</label>
			<select name="rsvp_type" id="rsvp_type" onchange="togRegistration();">
				<option ' . ($rsvp_type == 0 ? 'selected="selected" ' : '') . 'value="0">' . $hc_lang_submit['Reg0'] . '</option>
				<option ' . ($rsvp_type == 1 ? 'selected="selected" ' : '') . 'value="1">' . $hc_lang_submit['Reg1'] . '</option>
			</select>
			<div id="rsvp"' . ($rsvp_type != 1 ? ' style="display:none;"' : '') . '>
				<label for="rsvp_space">' . $hc_lang_submit['Limit'] . '</label>
				<input name="rsvp_space" id="rsvp_space" type="number" min="0" max="9999" size="5" maxlength="4" value="' . $rsvp_space . '"' . ($rsvp_type != 1 ? ' disabled="disabled"' : '') . ' required="required" />
				<span class="output">' . $hc_lang_submit['LimitLabel'] . '</span>
				<label>' . $hc_lang_submit['Allow'] . '</label>
				<input name="openDate" id="openDate" type="text" size="12" maxlength="10" value="' . $rsvp_open . '"' . ($rsvp_type != 1 ? ' disabled="disabled"' : '') . ' required="required" />
				<a href="javascript:;" onclick="calx.select(document.getElementById(\'openDate\'),\'cal3\',\'' . $hc_cfg[51] . '\');return false;" id="cal3" class="ds calendar" tabindex="-1"></a>
				<span class="output">&nbsp;&nbsp;' . $hc_lang_submit['To'] . '&nbsp;&nbsp;</span>
				<input name="closeDate" id="closeDate" type="text" size="12" maxlength="10" value="' . $rsvp_close . '"' . ($rsvp_type != 1 ? ' disabled="disabled"' : '') . ' required="required" />
				<a href="javascript:;" onclick="calx.select(document.getElementById(\'closeDate\'),\'cal4\',\'' . $hc_cfg[51] . '\');return false;" id="cal4" class="ds calendar" tabindex="-1"></a>
				' . (isset($_SESSION['UserLoggedIn']) && $_SESSION['UserLoggedIn'] == 1 ? '
				<label for="rsvpEmail">' . $hc_lang_submit['EmailNotice'] . '</label>
				<select name="rsvpEmail" id="rsvpEmail">
					<option value="0">' . $hc_lang_submit['EmailNotice0'] . '</option>
					<option value="1">' . $hc_lang_submit['EmailNotice1'] . '</option>
				</select>
				<label>&nbsp;</label><span class="output onote">' . $hc_lang_submit['RSVPDownload'] . '</span>' : '<input type="hidden" name="rsvpEmail" id="rsvpEmail" value="1" /><label>&nbsp;</label><span class="output onote">' . $hc_lang_submit['RSVPDownloadNo'] . '</span>') . '
			</div>
		</fieldset>' : '
		<input type="hidden" name="rsvp_type" id="rsvp_type" value="0" />');
        if ($hc_cfg[29] == 1) {
            $uQuery = $user_categories != '' ? " AND c.PkID IN (" . $user_categories . ")" : "";
            echo '
		<fieldset>
			<legend>' . $hc_lang_submit['EventCat'] . '</legend>
			<label>' . $hc_lang_submit['Categories'] . '</label>';
            $query = $eID > 0 ? "SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, ec.EventID as Selected\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "categories c\r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID AND ec.EventID = " . cIn($eID) . ")\r\n\t\t\t\t\tWHERE c.ParentID = 0 AND c.IsActive = 1" . $uQuery . "\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID, ec.EventID\r\n\t\t\t\t\tUNION\r\n\t\t\t\t\tSELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, ec.EventID as Selected\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "categories c\r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "categories c2 ON (c.ParentID = c2.PkID)\r\n\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID AND ec.EventID = " . cIn($eID) . ")\r\n\t\t\t\t\tWHERE c.ParentID > 0 AND c.IsActive = 1" . $uQuery . "\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID, c2.CategoryName, ec.EventID\r\n\t\t\t\t\tORDER BY Sort, ParentID, CategoryName" : NULL;
            getCategories('frmEventUpdate', $hc_cfg['CatCols'], $query, $hc_cfg['CatLinks']);
            echo '
		</fieldset>';
        }
        echo '
		<fieldset>
			<legend>' . $hc_lang_submit['LocationLabel'] . '</legend>';
        echo $locID > 0 ? '
			<div id="locSetting" class="frm_ctrl">
				<label>' . $hc_lang_submit['CurLocation'] . '</label>
				<span class="output">
					<b>' . $locName . '</b><br />
					' . buildAddress($locAddress, $locAddress2, $locCity, $state, $locPostal, $locCountry, $hc_lang_config['AddressType']) . '
				</span>
				<label>&nbsp;</label>
				<span class="output">
					<a href="javascript:;" onclick="setLocation(0,\'\',1);" class="locChange">' . $hc_lang_submit['ChngLocation'] . '</a>
				</span>
			</div>' : '';
        echo '
			<div id="locSearch" ' . ($locID > 0 ? ' style="display:none;"' : '') . '>';
        location_select();
        $inputs = array(1 => array('City', 'locCity', $locCity), 2 => array('Postal', 'locZip', $locPostal));
        $first = $hc_lang_config['AddressType'] == 1 ? 1 : 2;
        $second = $first == 1 ? 2 : 1;
        echo '
			</div>
			<div id="custom"' . ($locID > 0 ? ' style="display:none;"' : '') . '>
				<label for="locName">' . $hc_lang_submit['Name'] . '</label>
				<input name="locName" id="locName" type="text" size="25" maxlength="50" value="' . ($locID < 1 ? $locName : '') . '" />
				<label for="locAddress">' . $hc_lang_submit['Address'] . '</label>
				<input name="locAddress" id="locAddress" type="text" size="30" maxlength="75" value="' . ($locID < 1 ? $locAddress : '') . '" /><span class="output req2">*</span>
				<label for="locAddress2">' . $hc_lang_submit['Address2'] . '</label>
				<input name="locAddress2" id="locAddress2" type="text" size="25" maxlength="75" value="' . ($locID < 1 ? $locAddress2 : '') . '" />
				<label for="' . $inputs[$first][1] . '">' . $hc_lang_submit[$inputs[$first][0]] . '</label>
				<input name="' . $inputs[$first][1] . '" id="' . $inputs[$first][1] . '" type="text" size="20" maxlength="50" value="' . ($locID < 1 ? $inputs[$first][2] : '') . '" /><span class="output req2">*</span>';
        if ($hc_lang_config['AddressRegion'] != 0) {
            echo '<label for="locState">' . $hc_lang_config['RegionLabel'] . '</label>';
            $regSelect = $state;
            include HCLANG . '/' . $hc_lang_config['RegionFile'];
            echo '<span class="output req2">*</span>';
        }
        echo '<label for="' . $inputs[$second][1] . '">' . $hc_lang_submit[$inputs[$second][0]] . '</label>
				<input name="' . $inputs[$second][1] . '" id="' . $inputs[$second][1] . '" type="text" size="20" maxlength="50" value="' . ($locID < 1 ? $inputs[$second][2] : '') . '" /><span class="output req2">*</span>
				<label for="locCountry">' . $hc_lang_submit['Country'] . '</label>
				<input name="locCountry" id="locCountry" type="text" size="10" maxlength="50" value="' . ($locID < 1 ? $locCountry : '') . '" />
			</div>
			<div id="custom_notice" style="display:none;">
				<label>&nbsp;</label>
				<b>' . $hc_lang_core['PresetLoc'] . '</b>
			</div>
		</fieldset>
		<fieldset>
			<legend>' . $hc_lang_submit['ContactLabel'] . '</legend>
			<label for="contactName">' . $hc_lang_submit['Name'] . '</label>
			<input name="contactName" id="contactName" type="text" size="20" maxlength="50" placeholder="' . $hc_lang_submit['PlaceContactName'] . '" value="' . $contactName . '" /><span class="output req3">*</span>
			<label for="contactEmail">' . $hc_lang_submit['Email'] . '</label>
			<input name="contactEmail" id="contactEmail" type="text" size="30" maxlength="75" placeholder="' . $hc_lang_submit['PlaceContactEmail'] . '" value="' . $contactEmail . '" /><span class="output req3">*</span>
			<label for="contactPhone">' . $hc_lang_submit['Phone'] . '</label>
			<input name="contactPhone" id="contactPhone" type="tel" size="20" maxlength="25" placeholder="' . $hc_lang_submit['PlaceContactPhone'] . '" value="' . $contactPhone . '" />
			<label for="contactURL">' . $hc_lang_submit['Website'] . '</label>
			<input name="contactURL" id="contactURL" type="url" maxlength="100" placeholder="' . $hc_lang_submit['PlaceContactURL'] . '" value="' . $contactURL . '" />
		</fieldset>
		<fieldset>
			<legend>' . $hc_lang_submit['MessageLabel'] . '</legend>
			<label for="goadminmessage">' . $hc_lang_submit['Include'] . '</label>
			<input name="goadminmessage" id="goadminmessage" type="checkbox" value="" onclick="togThis(this,document.getElementById(\'adminmessage\'));"' . ($message != '' ? ' checked="checked"' : '') . ' />
			<label for="adminmessage">' . $hc_lang_submit['Message'] . '</label>
			<textarea name="adminmessage" id="adminmessage" rows="7" required="required" placeholder="' . $hc_lang_submit['PlaceMsgAdmin'] . '"' . ($message == '' ? ' disabled="disabled"' : '') . ' >' . $message . '</textarea>
		</fieldset>
		<input name="submit" id="submit" type="submit" value="' . $hc_lang_submit['SubmitEvent'] . '" />
		</form>
		<div id="dsCal"></div>';
        makeTinyMCE('', 0, 0, 'eventDescription');
    }
}