/** * Generate public calendar menu option array. Structure: Item Name => array(link url,link text,default core css classes) * @since 2.0.0 * @version 2.2.1 * @return array menu */ function cal_menu_items() { global $hc_cfg, $hc_lang_core; $menu_items['home'] = array(CalRoot . '/index.php', $hc_lang_core['Events'], 'hc_mnu_e'); if ($hc_cfg[45] == 1 && ($hc_cfg[42] != '' && $hc_cfg[43] != '')) { $menu_items['venues'] = array(CalRoot . '/index.php?com=location', $hc_lang_core['Locations'], 'hc_mnu_v'); } if ($hc_cfg[1] == 1) { $menu_items['submit'] = array(CalRoot . '/index.php?com=submit', $hc_lang_core['Submit'], 'hc_mnu_sb'); } $menu_items['search'] = array(CalRoot . '/index.php?com=search', $hc_lang_core['Search'], 'hc_mnu_se'); if ($hc_cfg[54] == 1) { $menu_items['newsletter'] = array(CalRoot . '/index.php?com=newsletter', $hc_lang_core['Newsletter'], 'hc_mnu_n'); } $menu_items['tools'] = array(CalRoot . '/index.php?com=tools', $hc_lang_core['Tools'], 'hc_mnu_t'); if ($hc_cfg[97] == 1) { $menu_items['digest'] = array(CalRoot . '/index.php?com=digest', $hc_lang_core['WhatsNew'], 'hc_mnu_d'); } if (user_check_status()) { $menu_items['user_account'] = array(CalRoot . '/index.php?com=acc', $hc_lang_core['Account'], 'hc_mnu_usr hc_mnu_usr_ac'); $menu_items['user_signout'] = array(CalRoot . '/signout.php', $hc_lang_core['SignOut'], 'hc_mnu_usr hc_mnu_usr_so'); } elseif ($hc_cfg[113] + $hc_cfg[114] + $hc_cfg[115] > 0 && !user_check_status()) { $menu_items['user_signin'] = array(CalRoot . '/index.php?com=signin', $hc_lang_core['SignIn'], 'hc_mnu_usr hc_mnu_usr_si'); } return $menu_items; }
function my_menu_user() { echo !user_check_status() ? ' <li><a href="' . cal_url() . '/index.php?com=signin">Sign In</a></li>' : ' <li><a href="' . cal_url() . '/index.php?com=acc&sec=edit" class="user_menu">Edit Acc.</a></li> <li><a href="' . cal_url() . '/index.php?com=acc&sec=list" class="user_menu">My Events</a></li> <li><a href="' . cal_url() . '/signout.php" class="user_menu">Sign Out</a></li>'; }
include_once HCPATH . HCINC . '/functions/comments.php'; include_once HCPATH . HCINC . '/functions/maps.php'; include_once HCPATH . HCINC . '/functions/pages.php'; load_theme_page('digest.php'); break; case 'signin': if (!($hc_cfg[113] + $hc_cfg[114] + $hc_cfg[115]) > 0 || user_check_status()) { go_home(); } define('HCCanURL', CalRoot . '/index.php?com=' . HCCOM); $crmbAdd[HCCanURL] = $hc_lang_core[HCCOM]; include_once HCLANG . '/public/user.php'; load_theme_page('signin.php'); break; case 'acc': if (!user_check_status()) { go_home(); } define('HCCanURL', CalRoot . '/index.php?com=' . HCCOM); $crmbAdd[HCCanURL] = $hc_lang_core[HCCOM]; include_once HCLANG . '/public/user.php'; load_theme_page('user.php'); break; case 'detail': default: include_once HCLANG . '/public/event.php'; include_once HCPATH . HCINC . '/functions/events.php'; if ($eID > 0) { include_once HCPATH . HCINC . '/functions/comments.php'; include_once HCPATH . HCINC . '/functions/maps.php'; define('HCCanURL', CalRoot . '/index.php?eID=' . $eID);
} include HCPATH . HCINC . '/functions/events.php'; include HCLANG . '/config.php'; include HCLANG . '/public/submit.php'; $proof = $challenge = ''; if ($hc_cfg[65] == 1) { $proof = isset($_POST['proof']) ? $_POST['proof'] : NULL; $challenge = isset($_SESSION['hc_cap']) ? $_SESSION['hc_cap'] : NULL; } elseif ($hc_cfg[65] == 2) { $proof = isset($_POST["recaptcha_response_field"]) ? $_POST["recaptcha_response_field"] : NULL; $challenge = isset($_POST["recaptcha_challenge_field"]) ? $_POST["recaptcha_challenge_field"] : NULL; } spamIt($proof, $challenge, 1); $newPkID = 0; $dates = array(); $appStatus = user_check_status() && $_SESSION['UserLevel'] == 2 ? 1 : 2; $pubDate = $appStatus == 1 ? "'" . SYSDATE . ' ' . SYSTIME . "'" : 'NULL'; $filter = array('/onclick=["\'][^"\']+["\']/i', '/ondblclick=["\'][^"\']+["\']/i', '/onkeydown=["\'][^"\']+["\']/i', '/onkeypress=["\'][^"\']+["\']/i', '/onkeyup=["\'][^"\']+["\']/i', '/onmousedown=["\'][^"\']+["\']/i', '/onmousemove=["\'][^"\']+["\']/i', '/onmouseout=["\'][^"\']+["\']/i', '/onmouseover=["\'][^"\']+["\']/i', '/onmouseup=["\'][^"\']+["\']/i', '/onmousemove=["\'][^"\']+["\']/i', '/onfocus=["\'][^"\']+["\']/i', '/onblur=["\'][^"\']+["\']/i'); $eID = $tbd = $stop = 0; $subName = isset($_POST['submitName']) ? htmlspecialchars(strip_tags($_POST['submitName'])) : NULL; $subEmail = isset($_POST['submitEmail']) ? htmlspecialchars(strip_tags($_POST['submitEmail'])) : NULL; $subID = isset($_POST['submitID']) ? htmlspecialchars(strip_tags($_POST['submitID'])) : NULL; $eventTitle = isset($_POST['eventTitle']) ? htmlspecialchars(cleanQuotes(strip_tags($_POST['eventTitle']))) : NULL; $eventDesc = isset($_POST['eventDescription']) ? cleanQuotes(strip_tags($_POST['eventDescription'], '<abbr><acronym><blockquote><br><caption><center><cite><dd><del><dfn><dir><div><dl><dt><em><i><font><hr><img><legend><li><menu><ol><p><pre><listing><plaintext><q><small><span><strike><strong><b><style><sub><sup><table><td><tr><tt><u><ul><var>'), 0) : NULL; $eventDesc = preg_replace($filter, '', $eventDesc); $locID = isset($_POST['locPreset']) ? htmlspecialchars(strip_tags($_POST['locPreset'])) : NULL; $contactName = isset($_POST['contactName']) ? htmlspecialchars(strip_tags($_POST['contactName'])) : NULL; $contactEmail = isset($_POST['contactEmail']) ? htmlspecialchars(strip_tags($_POST['contactEmail'])) : NULL; $contactPhone = isset($_POST['contactPhone']) ? htmlspecialchars(strip_tags($_POST['contactPhone'])) : NULL; $contactURL = isset($_POST['contactURL']) ? cIn(htmlspecialchars(strip_tags($_POST['contactURL']))) : NULL; $contactURL = preg_match('/^https?:\\/\\//', $contactURL) || $contactURL == '' ? $contactURL : 'http://' . $contactURL;
<?php /** * @package Helios Calendar * @license GNU General Public License version 2 or later; see LICENSE */ define('isHC', true); define('isAction', true); include '../loader.php'; action_headers(); if (user_check_status() || $hc_cfg[113] == 0 || isset($_GET['denied'])) { go_home(); } $target = CalRoot . '/index.php'; $callback_url = CalRoot . '/signin/twitter.php'; $consumer_key = $consumer_secret = ''; $result = doQuery("SELECT SettingValue FROM " . HC_TblPrefix . "settings WHERE PkID IN(111,112)"); if (hasRows($result)) { $consumer_key = mysql_result($result, 0, 0); $consumer_secret = mysql_result($result, 1, 0); } if ($consumer_key != '' && $consumer_secret != '') { if (isset($_GET['oauth_token']) && isset($_GET['oauth_verifier'])) { $oauth_token = cIn(strip_tags($_GET['oauth_token'])); $oauth_verifier = cIn(strip_tags($_GET['oauth_verifier'])); if (!isset($_SESSION['RequestToken']) || $_SESSION['RequestToken'] != $oauth_token) { session_destroy(); go_home(); } include HCPATH . HCINC . '/api/twitter/AccessToken.php'; if (isset($authUser) && isset($authUserID) && isset($authToken) && isset($authSecret) && $authUser . $authUserID . $authToken . $authSecret != '') {
<?php /** * @package Helios Calendar * @license GNU General Public License version 2 or later; see LICENSE */ define('isHC', true); define('isAction', true); include '../loader.php'; action_headers(); if (user_check_status() || $hc_cfg[115] == 0 || isset($_GET['error'])) { go_home(); } $target = CalRoot . '/index.php'; $callback_url = CalRoot . '/signin/google.php'; $client_id = $client_secret = ''; $_SESSION['Google_State'] = !isset($_SESSION['Google_State']) ? md5(mt_rand() . date("U")) : $_SESSION['Google_State']; $result = doQuery("SELECT SettingValue FROM " . HC_TblPrefix . "settings WHERE PkID IN(124,125)"); if (hasRows($result)) { $client_id = mysql_result($result, 0, 0); $client_secret = mysql_result($result, 1, 0); } if ($client_id != '' && $client_secret != '') { if (isset($_GET['state']) && isset($_GET['code'])) { if (!isset($_SESSION['Google_State']) || $_SESSION['Google_State'] != $_GET['state']) { session_destroy(); go_home(); } $code = cIn(strip_tags($_GET['code'])); if (!($fp = fsockopen("ssl://accounts.google.com", 443, $errno, $errstr, 20))) { $fp = fsockopen("accounts.google.com", 80, $errno, $errstr, 20);
<?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'; action_headers(); post_only(); $target = CalRoot; $uID = isset($_POST['uID']) && is_numeric($_POST['uID']) ? cIn(strip_tags($_POST['uID'])) : 0; $result = doQuery("SELECT PkID FROM " . HC_TblPrefix . "users WHERE PkID = '" . $uID . "'"); if (!user_check_status() || !hasRows($result)) { session_destroy(); } else { $email = isset($_POST['email']) ? cIn(htmlentities(strip_tags($_POST['email']))) : ''; $email = preg_match('/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/', $email) == 1 ? $email : ''; $birthdate = isset($_POST['birthdate']) ? cIn(dateToMySQL(htmlentities(strip_tags($_POST['birthdate'])), $hc_cfg[24])) : ''; $birthdate = strtotime($birthdate) <= strtotime('-13 years') ? $birthdate : ''; $location = isset($_POST['user_loc']) ? cIn(htmlentities(strip_tags($_POST['user_loc']))) : ''; $api_key = isset($_POST['regen_apik']) ? ", APIKey = '" . cIn(md5(sha1($email . $birthdate . $location . rand() * date("U")))) . "' " : ''; doQuery("UPDATE " . HC_TblPrefix . "users SET Email = '" . $email . "', Birthdate = '" . $birthdate . "', Location = '" . $location . "'{$api_key} WHERE PkID = '" . $uID . "'"); if ($email != '' && $birthdate != '') { if (isset($_SESSION['new_user'])) { unset($_SESSION['new_user']); } if (isset($_SESSION['new_user_bday'])) { unset($_SESSION['new_user_bday']); }
/** * 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> </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"> </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"> </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"> </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"> </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'); }
/** * Output user's list of submitted events. * @since 2.1.0 * @version 2.2.1 * @return void */ function user_manage_events() { global $hc_cfg, $hc_lang_user; if (!user_check_status()) { return -1; } $date = isset($_GET['d']) && is_numeric($_GET['d']) ? strftime("%Y-%m-%d", cIn(strip_tags($_GET['d']))) : SYSDATE; $d = explode('-', $date); $year = isset($d[0]) && is_numeric($d[0]) ? $d[0] : NULL; $month = isset($d[1]) && is_numeric($d[1]) ? $d[1] : NULL; $day = isset($d[2]) && is_numeric($d[2]) ? $d[2] : NULL; if (!checkdate($month, $day, $year)) { $date = SYSDATE; $day = date('d', strtotime(SYSDATE)); $month = date('m', strtotime(SYSDATE)); $year = date('Y', strtotime(SYSDATE)); } $sqlStart = $year . '-' . $month . '-1'; $sqlEnd = strftime("%Y-%m-%d", mktime(0, 0, 0, $month + 1, 0, $year)); $result = doQuery("SELECT DISTINCT e.PkID, e.Title, e.StartDate, e.StartTime, e.EndTime, e.TBD, e.IsApproved, e.SeriesID, er.Type, er.Space,\r\n\t\t\t\t\t\t\t(SELECT COUNT(PkID) FROM " . HC_TblPrefix . "registrants r WHERE EventID = e.PkID) as SpacesTaken\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "events e\r\n\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventcategories ec ON (ec.EventID = e.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 . "locations l ON (e.LocID = l.PkID)\r\n\t\t\t\t\t\tWHERE e.StartDate BETWEEN '" . cIn($sqlStart) . "' AND '" . cIn($sqlEnd) . "' \r\n\t\t\t\t\t\t\tAND e.IsActive = 1 AND e.OwnerID = '" . cIn($_SESSION['UserPkID']) . "'\r\n\t\t\t\t\t\tGROUP BY e.PkID, e.Title, e.StartDate, e.StartTime, e.EndTime, e.TBD, e.IsApproved, e.SeriesID, er.Type, er.Space\r\n\t\t\t\t\t\tORDER BY e.StartDate, e.TBD, e.StartTime, e.Title"); $i = 0; $jmp = 12; $stop = $jmp + 12; $jumpMonth = date("n", mktime(0, 0, 0, $month - $jmp, 1, $year)); $jumpYear = date("Y", mktime(0, 0, 0, $month - $jmp, 1, $year)); $actJump = date("Y-m-d", mktime(0, 0, 0, $month, 1, $year)); $opts = ''; while ($i <= 24) { $jmpDate = date("Y-m-d", mktime(0, 0, 0, $jumpMonth + $i, 1, $jumpYear)); $select = $jmpDate == $actJump ? ' selected="selected"' : ''; $opts .= ' <option value="' . CalRoot . '/index.php?com=acc&sec=list&d=' . date("U", mktime(0, 0, 0, $jumpMonth + $i, 1, $jumpYear)) . '"' . $select . '>' . strftime($hc_cfg[92], mktime(0, 0, 0, $jumpMonth + $i, 1, $jumpYear)) . '</option>'; ++$i; } echo ' <fieldset class="user"> <legend>' . $hc_lang_user['UserEventLabel'] . '</legend> <ul id="user_events"> <li id="ue_prev"><a href="' . CalRoot . '/index.php?com=acc&sec=list&d=' . strtotime(strftime("%Y-%m-%d", mktime(0, 0, 0, $month - 1, 1, $year))) . '"><</a></li> <li id="ue_jump"> <select name="ue_jump_select" id="ue_jump_select" onchange="window.location.href=this.value;">' . $opts . ' </select> </li> <li id="ue_next"><a href="' . CalRoot . '/index.php?com=acc&sec=list&d=' . strtotime(strftime("%Y-%m-%d", mktime(0, 0, 0, $month + 1, 1, $year))) . '">></a></li> </ul>'; if (!hasRows($result)) { echo '<p>' . $hc_lang_user['NoEventNotice'] . '</p>'; return -1; } echo ' <ul class="data">'; $cnt = 1; while ($row = mysql_fetch_row($result)) { echo ' <li class="row' . ($cnt % 2 == 0 ? ' hl' : '') . '"> <div class="ue_title txt" title="' . cOut($row[1]) . '">' . clean_truncate(cOut($row[1]), 100) . '</div> <div class="ue_date">' . stampToDate($row[2], $hc_cfg[24]) . '</div> <div class="ue_time txt">'; if ($row[5] == 0) { $time = $row[3] != '' ? stampToDate($row[3], $hc_cfg[23]) : ''; } else { $time = $row[5] == 1 ? $hc_lang_user['AllDay'] : $hc_lang_user['TBD']; } $rsvp = ''; if ($row[8] == 1) { $rsvp = $row[10] > 0 && $row[6] != 2 ? '<a href="' . CalRoot . '/download-rsvp.php?eID=' . cOut($row[0]) . '"><img src="' . CalRoot . '/img/icons/rsvp_download.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleRSVP'] . '" /></a>' : '<img src="' . CalRoot . '/img/icons/rsvp_download_o.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleRSVP0'] . '" />'; } echo $time . '</div> <div class="ue_status txt"> ' . $rsvp . $hc_lang_user['Status' . $row[6]] . ' </div> <div class="ue_tools tools"> ' . ($row[6] == 2 ? '<img src="' . CalRoot . '/img/icons/single_o.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleView'] . '" />' : '<a href="' . CalRoot . '/index.php?eID=' . $row[0] . '"><img src="' . CalRoot . '/img/icons/single.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleView'] . '" /></a>') . ' <a href="' . CalRoot . '/index.php?com=submit&eID=' . $row[0] . '"><img src="' . CalRoot . '/img/icons/edit.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleEdit'] . '" /></a>'; if ($row[7] != '') { echo ($row[6] == 2 ? ' <img src="' . CalRoot . '/img/icons/series_o.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleViewSeries'] . '" />' : '<a href="' . CalRoot . '/index.php?com=series&sID=' . $row[7] . '"><img src="' . CalRoot . '/img/icons/series.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleViewSeries'] . '" /></a>') . ' <a href="' . CalRoot . '/index.php?com=submit&sID=' . $row[7] . '"><img src="' . CalRoot . '/img/icons/edit_series.png" width="16" height="16" alt="" title="' . $hc_lang_user['TitleEditSeries'] . '" /></a>'; } echo ' </div> </li>'; ++$cnt; } echo ' </fieldset>'; }
<?php /** * @package Helios Calendar * @license GNU General Public License version 2 or later; see LICENSE */ if (!defined('isHC')) { exit(-1); } header("X-Frame-Options: SAMEORIGIN"); if (function_exists('ini_set')) { ini_set("session.cookie_httponly", true); } session_name($hc_cfg[201]); session_start(); if (user_check_status() && $_SESSION['UserLoginTime'] + 300 < date("U")) { user_update_status($_SESSION['UserNetType'], $_SESSION['UserNetName'], $_SESSION['UserNetID'], $_SESSION['UserLoggedIn']); } if (!isset($_SESSION['LangSet'])) { $_SESSION['LangSet'] = $hc_cfg[28]; } if (!isset($_SESSION['Theme'])) { $_SESSION['Theme'] = !isset($_SERVER['HTTP_USER_AGENT']) || !preg_match("{$hc_cfg['86']}i", $_SERVER['HTTP_USER_AGENT']) ? $hc_cfg[83] : $hc_cfg[84]; } if (isset($_GET['theme']) && $_GET['theme'] != '') { $theme = cIn(strip_tags($_GET['theme'])); if (is_dir(HCPATH . '/themes/' . $theme . '/')) { $_SESSION['Theme'] = strtolower($theme); } } if (!isset($_SESSION['hc_favCat']) && isset($_COOKIE[$hc_cfg[201] . '_fn'])) {
<?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']);