Esempio n. 1
0
		<legend>' . $hc_lang_pages['Welcome'] . '</legend>
		<textarea name="welcomeMsg" id="welcomeMsg" rows="15" class="mce_edit">' . $welcomeMsg . '</textarea>
	</fieldset>';
echo '
	<input type="submit" name="submit" id="submit" value="' . $hc_lang_pages['SaveD'] . '" />
	</form>
	
	<script src="' . CalRoot . '/inc/javascript/validation.js"></script>
	<script>
	//<!--
	function validate(){
		var err = "";

		err += reqField(document.getElementById("newFor"),"' . $hc_lang_pages['Valid01'] . '\\n");
		if(document.getElementById("newFor").value != ""){
			err +=validNumber(document.getElementById("newFor"),"' . $hc_lang_pages['Valid02'] . '\\n");
			err +=validGreater(document.getElementById("newFor"),0,"' . $hc_lang_pages['Valid02'] . '\\n");
		}
		
		if(err != ""){
			alert(err);
			return false;
		} else {
			valid_ok(document.getElementById("submit"),"' . $hc_lang_core['Sending'] . '");
			return true;
		}
	}
	//-->
	</script>';
makeTinyMCE('99%', 1, 0, 'welcomeMsg');
Esempio n. 2
0
			ajxOutput("' . CalRoot . '/event-recur-confirm.php" + qStr,"recur_chk","' . CalRoot . '");
		}
	}
	function imgPreview(){
		var img = document.getElementById("imageURL");
		
		if(img.value == ""){
			document.getElementById("preview").style.display = "none";
			return false;
		}
		if(validURL(img,"nope") != ""){
			alert("' . $hc_lang_event['Valid67'] . '");
			return false;
		}
		document.getElementById("preview").style.display = "block";
		document.getElementById("image_preview").innerHTML = "<img src=\\"" + img.value + "\\" />";
		document.getElementById("image_preview").style.overflow = "scroll";
	}';
if ($imageURL != '') {
    echo '
	imgPreview();';
}
include_once HCADMIN . '/inc/javascript/events.php';
$pub_only = $evnt_only = 0;
include_once HCPATH . '/inc/javascript/locations.php';
echo '
	//-->
	</script>';
makeTinyMCE('82%', 1, 0, 'eventDescription');
Esempio n. 3
0
			alert(err);
			return false;
		} else {
			valid_ok(document.getElementById("submit"),"' . $hc_lang_core['Sending'] . '");
			return true;
		}
	}
	function imgPreview(){
		var img = document.getElementById("imageURL");
		
		if(img.value == ""){
			document.getElementById("preview").style.display = "none";
			return false;
		}
		if(validURL(img,"nope") != ""){
			alert("' . $hc_lang_locations['Valid18'] . '");
			return false;
		}
		document.getElementById("preview").style.display = "block";
		document.getElementById("image_preview").innerHTML = "<img src=\\"" + img.value + "\\" />";
		document.getElementById("image_preview").style.overflow = "scroll";
	}';
if ($imageURL != '') {
    echo '
	imgPreview();';
}
echo '
	//-->
	</script>';
makeTinyMCE('82%', 1, 0, 'descript');
Esempio n. 4
0
/**
 * Output Event Submission Form
 * @since 2.0.0
 * @version 2.2.1
 * @return void
 */
function sr_forms_submit()
{
    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['Feed01']);
                echo '
        <p>' . $hc_lang_submit['ThankYou'] . '</p>
        <p><a href="' . CalRoot . '/index.php?com=submit">' . $hc_lang_submit['ClickSubmitAgain'] . '</a></p>
        <p><a href="' . CalRoot . '/">' . $hc_lang_submit['ClickToBrowse'] . '</a></p>';
                return -1;
                break;
        }
    }
    echo '
        <p>' . $hc_lang_submit['Notice'] . '</p>
        <p>(<span class="req2">*</span>) = ' . $hc_lang_submit['Required2'] . '<br />
        (<span class="req3">*</span>) = ' . $hc_lang_submit['Required3'] . '</p>
        
        <form id="frmEventSubmit" name="frmEventSubmit" method="post" action="' . CalRoot . '/event-submit.php" onsubmit="return validate();">';
    if ($hc_cfg[65] > 0 && in_array(1, $hc_captchas)) {
        echo '
        <fieldset>
            <legend>' . $hc_lang_core['CapLegend'] . '</legend>';
        buildCaptcha();
        echo '
        </fieldset>';
    }
    $user_id = 0;
    $user_net = $user_name = $user_email = $user_categories = '';
    if (user_check_status()) {
        $resultU = doQuery("SELECT PkID, NetworkType, NetworkName, Email, Categories FROM " . HC_TblPrefix . "users WHERE PkID = '" . cIn($_SESSION['UserPkID']) . "'");
        if (hasRows($resultU)) {
            $user_id = cOut(mysql_result($resultU, 0, 0));
            $user_net = cOut(mysql_result($resultU, 0, 1));
            $user_name = cOut(mysql_result($resultU, 0, 2));
            $user_email = cOut(mysql_result($resultU, 0, 3));
            $user_categories = cOut(mysql_result($resultU, 0, 4));
            switch ($user_net) {
                case 1:
                    $user_net = 'twitter.png';
                    break;
                case 2:
                    $user_net = 'facebook.png';
                    break;
                case 3:
                    $user_net = 'google.png';
                    break;
            }
        }
    }
    $si_notice = $hc_cfg[113] + $hc_cfg[114] + $hc_cfg[115] > 0 && !user_check_status() ? '
            <label>&nbsp;</label>
            <p>' . $hc_lang_submit['SignInNotice'] . '</p>' : '';
    echo $user_id > 0 && $user_net != '' && $user_name != '' && $user_email != '' ? '
        <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['ContactInfo'] . '</legend>
            ' . $si_notice . '
            <label for="submitName">' . $hc_lang_submit['Name'] . '</label>
            <input name="submitName" id="submitName" type="text" size="25" maxlength="50" required="required" placeholder="' . $hc_lang_submit['PlaceSubName'] . '" value="" />
            <label for="submitEmail">' . $hc_lang_submit['Email'] . '</label>
            <input name="submitEmail" id="submitEmail" type="email" size="35" maxlength="75" required="required" placeholder="' . $hc_lang_submit['PlaceSubEmail'] . '" value="" />
            <input name="submitID" id="submitID" type="hidden" value="0" />
        </fieldset>';
    echo '
        <fieldset>
            <legend>' . $hc_lang_submit['EventDetails'] . '</legend>
            <label for="eventTitle">' . $hc_lang_submit['Title'] . '</label>
            <input name="eventTitle" id="eventTitle" type="text" size="55" maxlength="42" required="required" placeholder="' . $hc_lang_submit['PlaceTitle'] . '" value="" />
            <div class="col-md-12 row">
                <p></p>
                <p><strong>' . $hc_lang_submit['Description'] . '</strong></p>
                <p>' . $hc_lang_submit['DescriptionHelper'] . '</p>
            </div>  
            <textarea name="eventDescription" id="eventDescription" rows="20" placeholder="' . $hc_lang_submit['PlaceDesc'] . '" class="mce_edit"></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="" />
        </fieldset>
        <fieldset>
            <legend>' . $hc_lang_submit['DateTime'] . '</legend>
            <label for="eventDate">' . $hc_lang_submit['EventDate'] . '</label>
            <input name="eventDate" id="eventDate" type="text" size="12" maxlength="10" required="required" value="' . strftime($hc_cfg[24], strtotime(SYSDATE)) . '" />
            <a href="javascript:;" onclick="calx.select(document.getElementById(\'eventDate\'),\'cal1\',\'' . $hc_cfg[51] . '\');return false;" id="cal1" class="ds calendar" tabindex="-1"></a>
            <label>' . $hc_lang_submit['StartTime'] . '</label>
            <input name="startTimeHour" id="startTimeHour" type="text" size="2" maxlength="2" required="required" value="' . date($hc_time['format'], strtotime(SYSDATE . ' ' . SYSTIME)) . '" />
            <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="00" />
            <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 ' . (date("A") == 'AM' ? 'selected="selected" ' : '') . 'value="AM">' . $hc_lang_submit['AM'] . '</option>
                <option ' . (date("A") == '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" value="' . date($hc_time['format'], strtotime(SYSDATE . ' ' . SYSTIME . " +1 hour")) . '" required="required" />
            <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" value="00" required="required" />
            <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 ' . (date("A") == 'AM' ? 'selected="selected" ' : '') . 'value="AM">' . $hc_lang_submit['AM'] . '</option>
                <option ' . (date("A") == '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" 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" onclick="togOverride();" />' . $hc_lang_submit['Override'] . '</label>
                <label for="specialtimeall"><input disabled="disabled" type="radio" name="specialtime" id="specialtimeall" value="allday" checked="checked" />' . $hc_lang_submit['AllDay'] . '</label>
            </span>
            <label>' . $hc_lang_submit['Recur'] . '</label>
            <span class="frm_ctrls">
                <label for="recurCheck"><input name="recurCheck" id="recurCheck" type="checkbox" onclick="togRecur();toggleMe(document.getElementById(\'recur_inpts\'));" /> ' . $hc_lang_submit['RecurCheck'] . '</label>
            </span>
            <div id="recur_inpts" style="display:none;">
                <label class="blank">&nbsp;</label>
                <span class="frm_ctrls">
                    <label for="recurType1"><input name="recurType" id="recurType1" type="radio" value="daily" disabled="disabled" checked="checked" onclick="togArray(recOpts,\'daily\')" />' . $hc_lang_submit['RecDaily'] . '</label>
                    <label for="recurType2"><input name="recurType" id="recurType2" type="radio" value="weekly" disabled="disabled" onclick="togArray(recOpts,\'weekly\')" />' . $hc_lang_submit['RecWeekly'] . '</label>
                    <label for="recurType3"><input name="recurType" id="recurType3" type="radio" value="monthly" disabled="disabled" onclick="togArray(recOpts,\'monthly\')" />' . $hc_lang_submit['RecMonthly'] . '</label>
                </span>
                <div id="daily" class="frm_ctrls">
                    <label for="recDaily1"><input name="dailyOptions" id="recDaily1" type="radio" checked="checked" disabled="disabled" value="EveryXDays" />' . $hc_lang_submit['Every'] . '</label><input id="dailyDays" name="dailyDays" type="number" min="1" max="31" size="3" maxlength="2" value="1" disabled="disabled" />' . $hc_lang_submit['xDays'] . '<br />
                    <label for="recDaily2"><input name="dailyOptions" id="recDaily2" type="radio" disabled="disabled" value="WeekdaysOnly" />' . $hc_lang_submit['Daily2'] . '</label>
                </div>
                <div id="weekly" class="frm_ctrls" style="display:none;">
                    ' . $hc_lang_submit['Every'] . '<input name="recWeekly" id="recWeekly" type="number" min="1" max="52" size="3" maxlength="2" value="1" />' . $hc_lang_submit['xWeeks'] . '<br />
                    <label for="recWeeklyDay_0"><input id="recWeeklyDay_0" name="recWeeklyDay[]" type="checkbox" value="0" />' . $hc_lang_submit['Sun'] . '</label>
                    <label for="recWeeklyDay_1"><input id="recWeeklyDay_1" name="recWeeklyDay[]" type="checkbox" value="1" />' . $hc_lang_submit['Mon'] . '</label>
                    <label for="recWeeklyDay_2"><input id="recWeeklyDay_2" name="recWeeklyDay[]" type="checkbox" value="2" />' . $hc_lang_submit['Tue'] . '</label>
                    <label for="recWeeklyDay_3"><input id="recWeeklyDay_3" name="recWeeklyDay[]" type="checkbox" value="3" />' . $hc_lang_submit['Wed'] . '</label>
                    <label for="recWeeklyDay_4"><input id="recWeeklyDay_4" name="recWeeklyDay[]" type="checkbox" value="4" />' . $hc_lang_submit['Thu'] . '</label>
                    <label for="recWeeklyDay_5"><input id="recWeeklyDay_5" name="recWeeklyDay[]" type="checkbox" value="5" />' . $hc_lang_submit['Fri'] . '</label>
                    <label for="recWeeklyDay_6"><input id="recWeeklyDay_6" name="recWeeklyDay[]" type="checkbox" value="6" />' . $hc_lang_submit['Sat'] . '</label>
                </div>
                <div id="monthly" class="frm_ctrls" style="display:none;">
                    <input name="monthlyOption" id="monthlyOption1" type="radio" checked="checked" value="Day" />' . $hc_lang_submit['Day'] . '<input name="monthlyDays" id="monthlyDays" type="number" min="1" max="31" size="3" maxlength="2" value="' . date("d") . '" />' . $hc_lang_submit['ofEvery'] . '<input name="monthlyMonths" id="monthlyMonths" type="number" min="1" max="12" size="3" maxlength="2" value="1" />' . $hc_lang_submit['Months'] . '
                    <br />
                    <span class="frm_ctrls">
                        <input name="monthlyOption" id="monthlyOption2" type="radio" value="Month" />
                        <select name="monthlyMonthOrder" id="monthlyMonthOrder">
                            <option value="1">' . $hc_lang_submit['First'] . '</option>
                            <option value="2">' . $hc_lang_submit['Second'] . '</option>
                            <option value="3">' . $hc_lang_submit['Third'] . '</option>
                            <option value="4">' . $hc_lang_submit['Fourth'] . '</option>
                            <option value="0">' . $hc_lang_submit['Last'] . '</option>
                        </select>
                        <select name="monthlyMonthDOW" id="monthlyMonthDOW">
                            <option ' . (date("w") == 0 ? 'selected="selected"' : '') . 'value="0">' . $hc_lang_submit['Sun'] . '</option>
                            <option ' . (date("w") == 1 ? 'selected="selected"' : '') . 'value="1">' . $hc_lang_submit['Mon'] . '</option>
                            <option ' . (date("w") == 2 ? 'selected="selected"' : '') . 'value="2">' . $hc_lang_submit['Tue'] . '</option>
                            <option ' . (date("w") == 3 ? 'selected="selected"' : '') . 'value="3">' . $hc_lang_submit['Wed'] . '</option>
                            <option ' . (date("w") == 4 ? 'selected="selected"' : '') . 'value="4">' . $hc_lang_submit['Thu'] . '</option>
                            <option ' . (date("w") == 5 ? 'selected="selected"' : '') . 'value="5">' . $hc_lang_submit['Fri'] . '</option>
                            <option ' . (date("w") == 6 ? 'selected="selected"' : '') . 'value="6">' . $hc_lang_submit['Sat'] . '</option>
                        </select>
                        ' . $hc_lang_submit['ofEvery'] . '<input name="monthlyMonthRepeat" id="monthlyMonthRepeat" type="number" min="1" max="12" size="3" maxlength="2" value="1" />' . $hc_lang_submit['Months'] . '
                    </span>
                </div>
                <label for="recurEndDate">' . $hc_lang_submit['RecurUntil'] . '</label>
                <input name="recurEndDate" id="recurEndDate" type="text" disabled="disabled" size="10" maxlength="10" required="required" value="" />
                <a href="javascript:;" onclick="calx.select(document.getElementById(\'recurEndDate\'),\'cal2\',\'' . $hc_cfg[51] . '\');return false;" id="cal2" class="ds calendar" tabindex="-1"></a>
                <label class="blank">&nbsp;</label>
                <div id="recur_chk">
                    <a href="javascript:;" onclick="confirmRecurDates();">' . $hc_lang_submit['ConfirmDate'] . '</a>
                </div>
            </div>
        </fieldset>';
    if ($hc_cfg[29] == 1) {
        echo '
        <fieldset>
            <legend>' . $hc_lang_submit['EventCat'] . '</legend>
            <div class="col-md-12 row">
                <p>' . $hc_lang_submit['CategoriesHelper'] . '</p>
            </div>';
        $query = $user_categories != '' ? "SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, NULL as Selected\r\n                    FROM " . HC_TblPrefix . "categories c \r\n                        LEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID)\r\n                    WHERE c.ParentID = 0 AND c.IsActive = 1 AND c.PkID IN (" . $user_categories . ")\r\n                    GROUP BY c.PkID, c.CategoryName, c.ParentID\r\n                    UNION SELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, NULL as Selected\r\n                    FROM " . HC_TblPrefix . "categories c \r\n                        LEFT JOIN " . HC_TblPrefix . "categories c2 ON (c.ParentID = c2.PkID) \r\n                        LEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (c.PkID = ec.CategoryID) \r\n                    WHERE c.ParentID > 0 AND c.IsActive = 1 AND c.PkID IN (" . $user_categories . ")\r\n                    GROUP BY c.PkID, c.CategoryName, c.ParentID, c2.CategoryName\r\n                    ORDER BY Sort, ParentID, CategoryName" : NULL;
        sr_shared_getCategories('frmEventSubmit', $hc_cfg['CatCols'], $query, $hc_cfg['CatLinks']);
        echo '
        </fieldset>';
    }
    echo '
        <fieldset>
            <legend>' . $hc_lang_submit['LocationLabel'] . '</legend>
            <input type="hidden" id="locPreset" name="locPreset" value="0" />
            <input type="hidden" id="locPresetName" name="locPresetName" value="" />';
    location_select();
    echo '
            <div id="custom_notice" style="display:none;">
                <label class="blank">&nbsp;</label>
                <b>' . $hc_lang_core['PresetLoc'] . '</b>
            </div>
            <div id="custom">
                <label for="locName">' . $hc_lang_submit['Name'] . '</label>
                <input name="locName" id="locName" type="text" size="25" maxlength="50" required="required" placeholder="' . $hc_lang_submit['PlaceLocName'] . '" value="" />
                <label for="locAddress">' . $hc_lang_submit['Address'] . '</label>
                <input name="locAddress" id="locAddress" type="text" size="30" maxlength="75" placeholder="' . $hc_lang_submit['PlaceLocAddress'] . '" value="" /><span class="output req2">*</span>
                <label for="locAddress2">' . $hc_lang_submit['Address2'] . '</label>
                <input name="locAddress2" id="locAddress2" type="text" size="25" maxlength="75" placeholder="' . $hc_lang_submit['PlaceLocAddress2'] . '" value="" />';
    $inputs = array(1 => array('City', 'locCity', 'PlaceLocCity'), 2 => array('Postal', 'locZip', 'PlaceLocPostal'));
    $first = $hc_lang_config['AddressType'] == 1 ? 1 : 2;
    $second = $first == 1 ? 2 : 1;
    echo '
                <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" placeholder="' . $hc_lang_submit[$inputs[$first][2]] . '" value="" /><span class="output req2">*</span>';
    if ($hc_lang_config['AddressRegion'] != 0) {
        echo '<div class="frmOpt">';
        echo '<label for="locState">' . $hc_lang_config['RegionLabel'] . '</label>';
        $regSelect = $hc_lang_submit['PlaceLocRegion'];
        $state = $hc_cfg[21];
        include HCLANG . '/' . $hc_lang_config['RegionFile'];
        echo '<span class="output req2">*</span></div>';
    }
    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" placeholder="' . $hc_lang_submit[$inputs[$second][2]] . '" value="" /><span class="output req2">*</span>
                <label for="locCountry">' . $hc_lang_submit['Country'] . '</label>
                <input name="locCountry" id="locCountry" type="text" size="10" maxlength="50" placeholder="' . $hc_lang_submit['PlaceLocCountry'] . '" value="" />
            </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="" /><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="" /><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="" />
            <label for="contactURL">' . $hc_lang_submit['Website'] . '</label>
            <input name="contactURL" id="contactURL" type="url" maxlength="100" placeholder="' . $hc_lang_submit['PlaceContactURL'] . '" value="" />
        </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\'));" />
            <div class="col-md-12 row">
                <p></p>
                <p><strong>' . $hc_lang_submit['Message'] . '</strong></p>
                <p>' . $hc_lang_submit['MessageHelper'] . '</p>
            </div>
            <textarea name="adminmessage" id="adminmessage" rows="7" disabled="disabled" required="required" placeholder="' . $hc_lang_submit['PlaceMsgAdmin'] . '"></textarea>
        </fieldset>
        <input name="submit" id="submit" type="submit" value="' . $hc_lang_submit['SubmitEvent'] . '" />
        </form>
        <div id="dsCal"></div>';
    makeTinyMCE('', 0, 0, 'eventDescription');
}
Esempio n. 5
0
		try{
			err +=chkTinyMCE(tinyMCE.get("tempsource").getContent(),"' . $hc_lang_news['Valid25'] . '\\n");}
		catch(error){
			err +=reqField(document.getElementById("tempsource"),"' . $hc_lang_news['Valid25'] . '\\n");}

		if(err != ""){
			alert(err);
			return false;
		} else {
			return true;
		}
	}
	//-->
	</script>';
    makeTinyMCE('99%', 1, $ovrEdit, 'tempsource');
} else {
    if (isset($_GET['msg'])) {
        switch ($_GET['msg']) {
            case "1":
                feedback(1, $hc_lang_news['Feed07']);
                break;
            case "2":
                feedback(1, $hc_lang_news['Feed08']);
                break;
            case "3":
                feedback(1, $hc_lang_news['Feed09']);
                break;
        }
    }
    appInstructions(0, "Newsletter_Templates", $hc_lang_news['TitleEditN'], $hc_lang_news['InstructEditNL']);
Esempio n. 6
0
	function togRSS(){
		var obj = document.getElementById("rssStatus");
		var inpts = (obj.options[obj.selectedIndex].value != 0) ? false : true;
		document.getElementById("maxRSS").disabled = inpts;
		document.getElementById("rssTrunc").disabled = inpts;
	}
	function togiCal(){
		var obj = document.getElementById("icalStatus");
		var inpts = (obj.options[obj.selectedIndex].value != 0) ? false : true;
		document.getElementById("iCalMax").disabled = inpts;
		document.getElementById("iCalTrunc").disabled = inpts;
		document.getElementById("iCalRef").disabled = inpts;
	}
	function sendTestMsg(){
		if(confirm("' . $hc_lang_settings['Valid33'] . '")){
			var err = "";
			err +=validEmail(document.getElementById("mailTest"),"' . $hc_lang_settings['Valid54'] . '\\n");
			if(err != ""){
				alert(err);
				return false;
			} else {
				window.open("' . AdminRoot . '/components/EmailTest.php?tkn=' . $token . '&e=" + document.getElementById("mailTest").value,"hc_mailtest","location=1,status=1,scrollbars=1,width=800,height=300,left="+(screen.availWidth/2-400)+",top="+(screen.availHeight/2-300));
			}
		} else {
			return false;
		}
	}
	//-->
	</script>';
makeTinyMCE('82%', 1, 0, 'defaultApprove,defaultDecline');
Esempio n. 7
0
					"' . html_entity_decode(htmlentities($hc_lang_event["SaveWMessage"], ENT_QUOTES), ENT_NOQUOTES) . '" : 
					"' . html_entity_decode(htmlentities($hc_lang_event["SaveWOMessage"], ENT_QUOTES), ENT_NOQUOTES) . '";
			}
			function imgPreview(){
				var img = document.getElementById("imageURL");

				if(img.value == ""){
					document.getElementById("preview").style.display = "none";
					return false;
				}
				if(validURL(img,"nope") != ""){
					alert("' . $hc_lang_event['Valid67'] . '");
					return false;
				}
				document.getElementById("preview").style.display = "block";
				document.getElementById("image_preview").innerHTML = "<img src=\\"" + img.value + "\\" />";
				document.getElementById("image_preview").style.overflow = "scroll";
			}';
        if ($imageURL != '') {
            echo '
			imgPreview();';
        }
        include_once HCADMIN . '/inc/javascript/events.php';
        $pub_only = $evnt_only = 0;
        include_once HCPATH . '/inc/javascript/locations.php';
        echo '
			//-->
			</script>';
        makeTinyMCE('82%', 1, 0, 'eventDescription,message');
    }
}
Esempio n. 8
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');
    }
}
Esempio n. 9
0
		err +=reqField(document.getElementById("mailTitle"),"' . $hc_lang_news['Valid39'] . '\\n");
		err +=reqField(document.getElementById("mailSubj"),"' . $hc_lang_news['Valid40'] . '\\n");
		err += validDate(document.getElementById("startDate"),"' . $hc_cfg[51] . '","' . $hc_lang_news['Valid15'] . ' ' . strtoupper($hc_cfg[51]) . '\\n");
		err +=reqField(document.getElementById("startDate"),"' . $hc_lang_news['Valid16'] . '\\n");
		err += validDate(document.getElementById("endDate"),"' . $hc_cfg[51] . '","' . $hc_lang_news['Valid17'] . ' ' . strtoupper($hc_cfg[51]) . '\\n");
		err +=reqField(document.getElementById("endDate"),"' . $hc_lang_news['Valid18'] . '\\n");
		err += validDateBefore(document.getElementById("startDate").value,document.getElementById("endDate").value,"' . $hc_cfg[51] . '","' . $hc_lang_news['Valid13'] . '\\n");
		err += validCheckArray("frmNewsletter","grpID[]",1,"' . $hc_lang_news['Valid41'] . '\\n");
		
		before += validDateBefore("' . SYSDATE . '",document.getElementById("startDate").value,"' . $hc_cfg[51] . '","' . $hc_lang_news['Valid13'] . '\\n");
		before += validDateBefore("' . SYSDATE . '",document.getElementById("endDate").value,"' . $hc_cfg[51] . '","' . $hc_lang_news['Valid13'] . '\\n");
		
		if(err != ""){
			alert(err);
			return false;
		} else {
			if(before != ""){
				if(confirm("' . $hc_lang_news['Valid14'] . '"))
					return true;
				else
					return false;
			} else {
				return true;
			}
		}
	}
	//-->
	</script>';
makeTinyMCE('82%', 1, 0, 'mailMsg');