/** * Output list of upcoming events for the location. * @since 2.0.0 * @version 2.0.0 * @param integer $limit [optional] Event List Size (Default:5) * @return void */ function location_events($limit = 5) { global $lID, $hc_cfg, $hc_lang_core, $hc_lang_locations; $result = doQuery("SELECT PkID, Title, StartDate, StartTime, EndTime, TBD\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "events \r\n\t\t\t\t\t\t\tWHERE IsActive = 1 AND IsApproved = 1 AND LocID = '" . cIn($lID) . "' AND StartDate >= '" . cIn(SYSDATE) . "'\r\n\t\t\t\t\t\tORDER BY StartDate, TBD, StartTime, Title\r\n\t\t\t\t\t\tLIMIT " . cIn($limit)); if (!hasRows($result)) { echo '<p>' . $hc_lang_locations['NoEvents'] . ' <a href="' . CalRoot . '/index.php?com=submit" rel="nofollow">' . $hc_lang_locations['NoEventsLink'] . '</a></p>'; return 0; } $cnt = $date = 0; while ($row = mysql_fetch_row($result)) { if ($date != $row[2]) { $date = $row[2]; echo $cnt > 0 ? ' </ul>' : ''; echo ' <header>' . stampToDate($row[2], $hc_cfg[14]) . '</header> <ul>'; $cnt = 1; } $hl = $cnt % 2 == 0 ? ' class="hl"' : ''; if ($row[5] == 0) { $time = $row[3] != '' ? stampToDate($row[3], $hc_cfg[23]) : ''; $time .= $row[4] != '' ? ' - ' . stampToDate($row[4], $hc_cfg[23]) : ''; $stamp = date("Y-m-d\\Th:i:00", strtotime($row[2] . trim(' ' . $row[3]))) . HCTZ; } else { $time = $row[5] == 1 ? $hc_lang_locations['AllDay'] : $hc_lang_locations['TBA']; $stamp = date("Y-m-d", strtotime($row[2])); } echo ' <li' . $hl . ' itemscope itemtype="http://schema.org/Event"><time itemprop="startDate" datetime="' . $stamp . '">' . $time . '</time><a itemprop="url" href="' . CalRoot . '/index.php?eID=' . $row[0] . '"><span itemprop="name">' . cOut($row[1]) . '</span></a></li>'; ++$cnt; } echo '</ul>'; }
/** * Output weekly dashboard to a page outside of Helios Calendar. * @since 2.0.1 * @version 2.0.1 * @param binary $submit include submit event link, 0 = hide , 1 = show (Default:1) * @param binary $ical include iCalendar subscription link, 0 = hide, 1 = show (Default:1) * @param binary $rss include All Events rss feed link, 0 = hide, 1 = show (Default:1) * @param binary $end_time include end time in event lists, 0 = hide, 1 = show (Default:1) * @param string $menu_format menu format string, accepts any supported strftime() format parameters (Default:%a %m/%d) * @return void */ function ou_event_carousel($submit = 1, $ical = 1, $rss = 1, $end_time = 1, $menu_format = '%a %m/%d') { global $hc_cfg, $hc_lang_core; include HCLANG . '/public/integration.php'; echo "SYSDATE: " . SYSDATE . "\n"; if (file_exists(HCPATH . '/cache/int14_' . SYSDATE . '.php')) { if (count(glob(HCPATH . '/cache/int14_*.php')) > 0) { foreach (glob(HCPATH . '/cache/int14_*.php') as $file) { unlink($file); } } ob_start(); $fp = fopen(HCPATH . '/cache/int14_' . SYSDATE . '.php', 'w'); fwrite($fp, "<?php\n//\tHelios Dashboard Integration Events Cache - Delete this file when upgrading.\n"); //link, category, title, start date, end date, start time, end time, location, description //array("05/15/2015 - 05/15/2015","1","test event") $result = doQuery("SELECT PkID, Title, Description, StartDate, EndDate, StartTime, EndTime, TBD, LocID, LocationName FROM " . HC_TblPrefix . "events\nWHERE IsActive = 1 AND IsApproved = 1 AND StartDate Between '" . SYSDATE . "' AND ADDDATE('" . SYSDATE . "', INTERVAL 14 DAY)\nORDER BY StartDate, TBD, StartTime, Title, LocationName"); if (hasRows($result)) { $cur_day = -1; $cur_date = ''; fwrite($fp, "\$hc_next14 = array(\n"); while ($row = mysql_fetch_row($result)) { print_r($row); $ouTitle = $row[1]; $ouDesc = $row[2]; $ouLoc = $row[7]; //echo "\nouLoc: " . $ouLoc; if ($cur_date = $row[3]) { ++$cur_day; $cur_date = $row[3]; if ($cur_day > 0) { fwrite($fp, "\t),\n"); } fwrite($fp, $cur_day . " => array(\n"); } if ($row[6] == 0) { $time = $row[4] != '' ? stampToDate($row[4], $hc_cfg[24]) : ''; $time .= $row[5] != '' && $end_time == 1 ? ' - ' . stampToDate($row[5], $hc_cfg[24]) : ''; } else { $time = $row[6] == 1 ? $hc_lang_int['AllDay'] : $hc_lang_int['TimeTBA']; } fwrite($fp, "\t" . $row[0] . " => array(\"" . $time . "\",\"" . stampToDate($row[3], $hc_cfg[15]) . "\",\"" . str_replace("\"", "'", cOut($row[1])) . "\"),\n"); } fwrite($fp, "\t),"); } fwrite($fp, "\n)\n?>"); fwrite($fp, ob_get_contents()); fclose($fp); ob_end_clean(); } include HCPATH . '/cache/int14_' . SYSDATE . '.php'; }
if (!preg_match("{$hc_cfg['85']}i", $_SERVER['HTTP_USER_AGENT'])) { doQuery("UPDATE " . HC_TblPrefix . "events SET Downloads = Downloads + 1 WHERE PkID = '" . $eID . "'"); } $link = "http://calendar.live.com/calendar/calendar.aspx?rru=addevent"; if (mysql_result($result, 0, 11) == 0) { if (mysql_result($result, 0, 12) != '') { $link .= "&dtstart=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 10), "%Y%m%dT%H%M%S") . "&dtend=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 12), "%Y%m%dT%H%M%S"); } else { $link .= "&dtstart=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 10), "%Y%m%dT%H%M%S") . "&dtend=" . stampToDate(mysql_result($result, 0, 9) . " " . mysql_result($result, 0, 10), "%Y%m%dT%H%M%S"); } } else { $link .= "&dtstart=" . stampToDate(mysql_result($result, 0, 9), "%Y%m%d") . "T000000&dtend=" . stampToDate(mysql_result($result, 0, 9), "%Y%m%d") . "T000000"; } $link .= "&summary=" . urlencode(mysql_result($result, 0, 1)); if (strlen(mysql_result($result, 0, 8)) > 400) { $link .= "&description=" . urlencode(htmlspecialchars(strip_tags(cOut(substr(mysql_result($result, 0, 8), 0, 400)))) . "...\n\nFull Description available at: " . CalRoot . "/index.php?eID=" . $eID); } else { $link .= "&description=" . urlencode(htmlspecialchars(strip_tags(cOut(mysql_result($result, 0, 8))))); } if (mysql_result($result, 0, 35) == 0 || mysql_result($result, 0, 35) == '') { $link .= "&location=" . urlencode(mysql_result($result, 0, 3) . " " . mysql_result($result, 0, 4) . " " . mysql_result($result, 0, 5) . " " . mysql_result($result, 0, 6) . " " . mysql_result($result, 0, 37) . " " . mysql_result($result, 0, 7)); } else { $result = doQuery("SELECT * FROM " . HC_TblPrefix . "locations WHERE PkID = '" . cIn(mysql_result($result, 0, 35)) . "'"); $link .= "&location=" . urlencode(mysql_result($result, 0, 2) . " " . mysql_result($result, 0, 3) . " " . mysql_result($result, 0, 4) . " " . mysql_result($result, 0, 5) . " " . mysql_result($result, 0, 6) . " " . mysql_result($result, 0, 7)); } header("Location: {$link}"); break; } } else { header('Location: ' . CalRoot); }
if (hasRows($result)) { echo ' <ul class="data"> <li class="row header uline"> <div style="width:30%;">' . $hc_lang_admin['Name'] . '</div> <div style="width:40%;">' . $hc_lang_admin['EmailLabel'] . '</div> <div style="width:20%;">' . $hc_lang_admin['Login'] . '</div> <div style="width:10%;"> </div> </li>'; $cnt = 0; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; echo ' <li class="row ' . $hl . '"> <div class="txt" style="width:30%;">' . cOut($row[2] . ', ' . $row[1]) . '</div> <div class="txt" style="width:40%;">' . cOut($row[3]) . '</div> <div class="txt" style="width:20%;">' . ($row[4] != '' ? stampToDate($row[4], $hc_cfg[24] . ' ' . $hc_cfg[23]) : 'N/A') . '</div> <div class="tools" style="width:10%;"> <a href="' . AdminRoot . '/index.php?com=adminedit&aID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a> <a href="javascript:;" onclick="doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a> </div> </li>'; ++$cnt; } echo ' </ul> <script> //<!-- function doDelete(dID){ if(confirm("' . $hc_lang_admin['Valid07'] . '\\n\\n ' . $hc_lang_admin['Valid08'] . '\\n ' . $hc_lang_admin['Valid09'] . '")){ document.location.href = "' . AdminRoot . '/components/AdminEditAction.php?dID=" + dID + "&tkn=' . set_form_token(1) . '";
$eventbriteGoogleID = cOut(mysql_result($result, 28, 0)); $eventbriteGoogleKey = cOut(mysql_result($result, 29, 0)); $twtrComKey = cOut(mysql_result($result, 30, 0)); $twtrComSec = cOut(mysql_result($result, 31, 0)); $twtrSignIn = cOut(mysql_result($result, 32, 0)); $fbSignIn = cOut(mysql_result($result, 33, 0)); $googSignIn = cOut(mysql_result($result, 34, 0)); $fbAppID = cOut(mysql_result($result, 35, 0)); $fbAppSec = cOut(mysql_result($result, 36, 0)); $fbConOpts = json_decode(cOut(mysql_result($result, 37, 0)), true); $fbActiveT = cOut(mysql_result($result, 38, 0)); $fbTokenU = cOut(mysql_result($result, 39, 0)); $fbExpires = cOut(mysql_result($result, 40, 0)); $fbActiveI = cOut(mysql_result($result, 41, 0)); $googID = cOut(mysql_result($result, 42, 0)); $googSec = cOut(mysql_result($result, 43, 0)); $fbConOptsOut = ''; echo ' <form name="frmSettings" id="frmSettings" method="post" action="' . AdminRoot . '/components/SettingsAPIAction.php" onsubmit="return validate();">'; set_form_token(); echo ' <fieldset> <legend>' . $hc_lang_settings['Maps'] . '</legend> <label for="mapLibrary">' . $hc_lang_settings['Library'] . '</label> <select name="mapLibrary" id="mapLibrary" onchange="togMapLibrary(this.options[this.selectedIndex].value);"> <option' . ($mapLibrary == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_settings['Library1'] . '</option> <option' . ($mapLibrary == 2 ? ' selected="selected"' : '') . ' value="2">' . $hc_lang_settings['Library2'] . '</option> </select> <div id="library1" style="clear:both;' . ($mapLibrary != 1 ? ' display:none;' : '') . '"> <label for="googMapURL">' . $hc_lang_settings['GoogMapURL'] . '</label> <input' . ($mapLibrary != 1 ? ' disabled="disabled"' : '') . ' name="googMapURL" id="googMapURL" type="url" size="30" maxlength="100" required="required" value="' . $googMapURL . '" />
/** * @package Helios Calendar * @license GNU General Public License version 2 or later; see LICENSE */ if (!defined('hcAdmin')) { header("HTTP/1.1 403 No Direct Access"); exit; } $errorMsg = ''; $result = doQuery("SELECT * FROM " . HC_TblPrefix . "settings WHERE PkID IN(5,6);"); if (!hasRows($result)) { $apiFail = true; $errorMsg = 'Eventbrite API Settings Unavailable.'; } else { $ebAPI = cOut(mysql_result($result, 0, 1)); $ebUser = cOut(mysql_result($result, 1, 1)); if ($ebAPI == '' || $ebUser == '') { $apiFail = true; $errorMsg = 'Eventbrite API Settings Missing.'; } else { $ebSend = "/xml/payment_update?app_key=" . $ebAPI . "&user_key=" . $ebUser; $ebSend .= "&event_id=" . $ebID; if (isset($_POST['ebPaypal']) && $hc_cfg[103] != '') { $ebSend .= "&accept_paypal=1"; $ebSend .= "&paypal_email=" . $hc_cfg[103]; } else { $ebSend .= "&accept_paypal=0"; } if (isset($_POST['ebGoogleC']) && $hc_cfg[104] != '' && $hc_cfg[105] != '') { $ebSend .= "&accept_google=1"; $ebSend .= "&google_merchant_id=" . $hc_cfg[104];
echo ' </ul> </div>'; } $result = doQuery("SELECT FirstName, LastName, Email, RegisteredAt FROM " . HC_TblPrefix . "subscribers WHERE IsConfirm = 1 ORDER BY RegisteredAt DESC, LastName, FirstName LIMIT 50"); if (hasRows($result)) { echo ' <ul class="data"> <li class="row header uline"> <div style="width:88%;">' . $hc_lang_reports['NewestUsers'] . '</div> <div style="width:10%;">' . $hc_lang_reports['Registered'] . '</div> <div style="width:2%;"> </div> </li> </ul> <div class="ostat"> <ul class="data">'; $cnt = 0; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; echo ' <li class="row' . $hl . '"> <div class="txt" title="' . cOut($row[0]) . '" style="width:30%;">' . cOut(trim($row[1] . ', ' . $row[0])) . '</div> <div style="width:60%;">' . cOut($row[2]) . '</div> <div class="number" style="width:10%;">' . stampToDate($row[3], $hc_cfg[24]) . '</div> </li>'; ++$cnt; } echo ' </ul> </div>'; }
$result = doQuery("SELECT PkID, Name, IsPublic,\r\n\t\t\t\t\t\t\t(SELECT COUNT(sg.UserID)\r\n\t\t\t\t\t\t\tFROM " . HC_TblPrefix . "subscribersgroups sg\r\n\t\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "subscribers s ON (sg.UserID = s.PkID)\r\n\t\t\t\t\t\t\tWHERE sg.GroupID = mg.PkID AND s.IsConfirm = 1) as GrpCnt,\r\n\t\t\t\t\t\t\t(SELECT COUNT(s.PkID)FROM " . HC_TblPrefix . "subscribers s WHERE s.IsConfirm = 1) as AllCnt\r\n\t\t\t\t\t\tFROM " . HC_TblPrefix . "mailgroups mg\r\n\t\t\t\t\t\tWHERE IsActive = 1 ORDER BY IsPublic, Name"); if (hasRows($result)) { echo ' <ul class="data"> <li class="row header uline"> <div style="width:50%;">' . $hc_lang_news['GroupNameLabel'] . '</div> <div style="width:20%;">' . $hc_lang_news['GroupStatusLabel'] . '</div> <div class="number" style="width:20%;">' . $hc_lang_news['GroupCountLabel'] . '</div> <div class="tools" style="width:10%;"> </div> </li>'; $cnt = 0; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; echo ' <li class="row' . $hl . '"> <div style="width:50%;">' . cOut($row[1]) . '</div> <div style="width:20%;">' . ($row[2] == 1 ? $hc_lang_news['Public'] : $hc_lang_news['AdminOnly']) . '</div> <div class="number" style="width:20%;">' . ($row[0] == 1 ? number_format($row[4], 0, '.', ',') : number_format($row[3], 0, '.', ',')) . '</div> <div class="tools" style="width:10%;"> <a href="' . AdminRoot . '/index.php?com=subgrps&gID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a> ' . ($row[0] > 1 ? '<a href="javascript:;" onclick="javascript:doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a>' : '<img src="' . AdminRoot . '/img/spacer.gif" width="16" height="16" alt="" />') . ' </div> </li>'; ++$cnt; } echo ' </ul> <script language="JavaScript" type="text/JavaScript"> //<!-- function doDelete(dID){
switch ($_GET['msg']) { case "1": feedback(1, $hc_lang_pages['Feed01']); break; } } appInstructions(0, "Digest", $hc_lang_pages['TitleDigest'], $hc_lang_pages['InstructDigest']); $aID = isset($_GET['aID']) && is_numeric($_GET['aID']) ? cIn($_GET['aID']) : 0; $result = doQuery("SELECT * FROM " . HC_TblPrefix . "settings WHERE PkID IN (97,98,99)"); $status = 0; $newFor = 1; $welcomeMsg = ''; if (hasRows($result)) { $status = cOut(mysql_result($result, 0, 1)); $welcomeMsg = cOut(mysql_result($result, 1, 1)); $newFor = cOut(mysql_result($result, 2, 1)); } echo ' <form name="frmDigest" id="frmDigest" method="post" action="' . AdminRoot . '/components/DigestAction.php" onsubmit="return validate();">'; set_form_token(); echo ' <fieldset> <legend>' . $hc_lang_pages['Settings'] . '</legend> <label for="status">' . $hc_lang_pages['StatusD'] . '</label> <select name="status" id="status"> <option' . ($status == 0 ? ' selected="selected"' : '') . ' value="0">' . $hc_lang_pages['StatusD0'] . '</option> <option' . ($status == 1 ? ' selected="selected"' : '') . ' value="1">' . $hc_lang_pages['StatusD1'] . '</option> </select> <span class="output"> <a class="tooltip" data-tip="' . $hc_lang_pages['Tip01'] . '" href="javascript:;" tabindex="-1"><img src="' . AdminRoot . '/img/icons/info.png" width="16" height="16" alt="" /></a> </span>
<div style="width:20%;">' . $hc_lang_reports['Date'] . '</div> <div class="txt" style="width:30%">' . $hc_lang_reports['User'] . '</div> <div class="tools" style="width:10%;"> </div> </li> </ul> <ul class="data"> <div class="prpt">'; $cnt = 0; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; echo ' <li class="row' . $hl . '"> <div class="txt" title="' . cOut($row[1]) . '" style="width:25%;">' . cOut('(' . $row[0] . ') ' . trim($row[1] . ' ' . $row[2])) . '</div> <div style="width:15%;">' . cOut($row[4]) . '</div> <div style="width:20%;">' . stampToDate($row[6], $hc_cfg[24] . ' ' . $hc_cfg[23]) . '</div> <div class="txt" title="' . cOut($row[5]) . '" style="width:30%;">' . cOut($row[5]) . '</div> <div class="tools" style="width:10%;"> <a href="' . AdminRoot . '/index.php?com=adminedit&aID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/user_edit.png" width="16" height="16" alt="" /></a> <a href="javascript:;" onclick="doDelete(\'' . $row[7] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a> </div> </li>'; ++$cnt; } echo ' </div> </ul> <script> //<!-- function doDelete(dID){ if(confirm("' . $hc_lang_reports['Valid04'] . '\\n\\n ' . $hc_lang_reports['Valid05'] . '\\n ' . $hc_lang_reports['Valid06'] . '")){ document.location.href = "' . AdminRoot . '/components/ReportFailAction.php?dID=" + dID + "&tkn=' . set_form_token(1) . '";
<input type="submit" name="submit" id="submit" value="' . $hc_lang_manage['SaveCat'] . '" /> </form> </div> <div class="catMgtList"> <ul class="data">'; $result = doQuery("SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, NULL 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)\r\n\t\t\t\t\tWHERE c.ParentID = 0 AND c.IsActive = 1\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID\r\n\t\t\t\t\tUNION SELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, NULL 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) \r\n\t\t\t\t\tWHERE c.ParentID > 0 AND c.IsActive = 1\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID, c2.CategoryName\r\n\t\t\t\t\tORDER BY Sort, ParentID, CategoryName"); $rowCnt = mysql_num_rows($result); if (hasRows($result)) { $cnt = 0; $curCat = ""; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; $indent = $row[2] != 0 ? ' ' : ''; echo ' <li class="row' . $hl . '"> <div style="width:85%;">' . $indent . ($cID == $row[0] && $cID > 0 ? '<b>' . cOut($row[1]) . '</b>' : cOut($row[1])) . '</div> <div style="width:15%;"> <a href="' . AdminRoot . '/index.php?com=categorymanage&cID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a> ' . ($rowCnt > 1 ? '<a href="javascript:;" onclick="doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a>' : '') . ' </div> </li>'; $cnt++; } echo ' </ul> <script> //<!-- function doDelete(dID){ if(confirm("' . $hc_lang_manage['Valid08'] . '\\n\\n ' . $hc_lang_manage['Valid09'] . '\\n ' . $hc_lang_manage['Valid10'] . '")) window.location.href = "' . AdminRoot . '/components/CategoryManageAction.php?dID=" + dID + "&tkn=' . $token . '"; }
$cleanup = "BLANK"; $dateFormat = 0; $result = doQuery("SELECT * FROM " . HC_TblPrefix . "templates WHERE PkID = '" . $tID . "' AND IsActive = 1"); if (hasRows($result)) { $whereAmI = $hc_lang_tools['EditT']; $helpText = $hc_lang_tools['InstructEditTExp']; $name = cOut(mysql_result($result, 0, 1)); $content = cOut(mysql_result($result, 0, 2)); $header = cOut(mysql_result($result, 0, 3)); $footer = cOut(mysql_result($result, 0, 4)); $ext = cOut(mysql_result($result, 0, 5)); $typeID = cOut(mysql_result($result, 0, 6)); $groupBy = cOut(mysql_result($result, 0, 7)); $sortBy = cOut(mysql_result($result, 0, 8)); $cleanup = cOut(mysql_result($result, 0, 9)); $dateFormat = cOut(mysql_result($result, 0, 10)); } appInstructions(0, $helpDoc, $whereAmI, $helpText); echo ' <form name="frmExpTemp" id="frmExpTemp" method="post" action="' . AdminRoot . '/components/TemplatesEditAction.php" onsubmit="return validate();">'; set_form_token(); echo ' <input type="hidden" name="tID" id="tID" value="' . $tID . '" /> <input type="hidden" name="typeID" id="typeID" value="' . $typeID . '" /> <fieldset> <legend>' . $hc_lang_tools['TempSettings'] . '</legend> <label for="name">' . $hc_lang_tools['Name'] . '</label> <input name="name" id="name" type="text" size="50" maxlength="255" required="required" value="' . $name . '" /> <label for="ext">' . $hc_lang_tools['Extension'] . '</label> <input name="ext" id="ext" type="text" size="5" maxlength="15" required="required" value="' . $ext . '" /> <label for="sort">' . $hc_lang_tools['Sort'] . '</label>
/** * Builds list of events for the template based on the passed query. * @param string $qry Columns: PkID, Title, StartDate, StartTime, IsBillboard, SeriesID, TBD, EndTime * @return string */ function getEventList($qry) { global $hc_lang_news, $hc_cfg; $replace = $curDate = ''; $hide = array(); $cnt = 0; $result = doQuery($qry); $str = '<ul style="list-style:none;padding:0px;">'; while ($row = mysql_fetch_row($result)) { if ($row[5] == '' || !in_array($row[5], $hide)) { if ($curDate != $row[2]) { $curDate = cOut($row[2]); $str .= '<li>' . stampToDate($row[2], $hc_cfg[14]) . '</li>'; } $str .= '<li style="padding-left:15px;"><a href="' . CalRoot . '/index.php?eID=' . $row[0] . '" target="_blank">' . $row[1] . '</a>'; if ($row[6] == 0) { $str .= ' - ' . strftime($hc_cfg[23], strtotime($row[3])) . '</li>'; } elseif ($row[6] == 1) { $str .= ' - <i>' . $hc_lang_news['AllDay'] . '</i></li>'; } elseif ($row[6] == 2) { $str .= ' - <i>' . $hc_lang_news['TBA'] . '</i></li>'; } } if ($row[5] != '' && !in_array($row[5], $hide)) { $hide[] = $row[5]; } ++$cnt; } $str .= '</ul>'; return $str; }
switch ($row[1]) { case 1: $net_img = 'twitter_icon'; break; case 2: $net_img = 'facebook_icon'; break; case 3: $net_img = 'google'; break; } echo ' <label' . $hl . ' for="usrValue_' . $row[0] . '"><input name="usrValue" id="usrValue_' . $row[0] . '" type="radio" onclick="setUser(' . $row[0] . ');" /> <a href="' . AdminRoot . '/index.php?com=useredit&uID=' . $row[0] . '" target="_blank"><img src="' . AdminRoot . '/img/icons/user_edit.png" width="16" height="16" alt="" /></a> <img src="' . AdminRoot . '/img/logos/' . $net_img . '.png" width="16" height="16" style="float:none;" /> ' . ($row[4] != '' ? '<a href="mailto:' . $row[4] . '">' . cOut($row[2]) . '</a>' : cOut($row[2])) . ' (' . $row[10] . ' ' . $hc_lang_user['Events'] . ') </label>'; ++$x; } $pages = ceil(mysql_result($resultP, 0, 0) / $resLimit); if ($pages > 1) { echo '<div id="pages">'; for ($x = 0; $x < $pages; ++$x) { if ($x % 20 == 0 && $x > 0) { echo "<br /><br />"; } elseif ($x > 0) { echo " | "; } echo $resOffset != $x ? '<a href="javascript:;" onclick="searchUsers(' . $x . ');">' . ($x + 1) . '</a>' : '<b>' . ($x + 1) . '</b>'; }
header("HTTP/1.1 403 No Direct Access"); exit; } include HCLANG . '/admin/settings.php'; if (isset($_GET['msg'])) { switch ($_GET['msg']) { case "1": feedback(1, $hc_lang_settings['Feed03']); break; } } appInstructions(0, "Themes_Settings", $hc_lang_settings['TitleTheme'], $hc_lang_settings['InstructTheme']); $result = doQuery("SELECT SettingValue FROM " . HC_TblPrefix . "settings WHERE PkID IN (83,84,86) ORDER BY PkID"); $fullsite = cOut(mysql_result($result, 0, 0)); $mobile = cOut(mysql_result($result, 1, 0)); $agents = cOut(mysql_result($result, 2, 0)); $fullsiteOpts = $mobileOpts = ''; $themes = array(); if (file_exists(HCPATH . '/themes')) { $dir = dir(HCPATH . '/themes'); while (($file = $dir->read()) != false) { if (is_dir($dir->path . '/' . $file) && $file != "." && $file != "..") { $themes[] = $file; } } } sort($themes); foreach ($themes as $val) { $fullsiteOpts .= ' <option' . ($val == $fullsite ? ' selected="selected"' : '') . ' value="' . $val . '">' . ucfirst($val) . '</option>'; $mobileOpts .= '
} spamIt($proof, $challenge, 2); $myName = cIn(strip_tags(cleanBreaks($_POST['hc_fx1']))); $myEmail = cIn(strip_tags(cleanBreaks($_POST['hc_fx2']))); $friendName = cIn(strip_tags(cleanBreaks($_POST['hc_fx3']))); $friendEmail = cIn(strip_tags(cleanBreaks($_POST['hc_fx4']))); $sendMsg = cleanBreaks(nl2br(strip_tags($_POST['hc_fx5']))); $eID = isset($_POST['eID']) && is_numeric($_POST['eID']) ? cIn(strip_tags($_POST['eID'])) : 0; $tID = isset($_POST['tID']) && is_numeric($_POST['tID']) ? cIn(strip_tags($_POST['tID'])) : 0; if ($tID == 0) { $result = doQuery("SELECT Title, StartDate, StartTime, TBD FROM " . HC_TblPrefix . "events WHERE PkID = '" . $eID . "'"); } else { $result = doQuery("SELECT Name, Address, Address2, City, State, Zip, Country FROM " . HC_TblPrefix . "locations WHERE PkID = '" . $eID . "'"); } if (hasRows($result) && $myName != '' && $myEmail != '' && $friendName != '' && $friendEmail != '') { $message = '<p>' . cOut($sendMsg) . '</p>'; $message .= '<p><b>' . mysql_result($result, 0, 0) . '</b><br />'; if ($tID == 0) { $where = '/index.php?com=send&eID='; $subject = CalName . " " . $hc_lang_sendtofriend['SubjectE'] . " " . $myName; $message .= stampToDate(mysql_result($result, 0, 1), $hc_cfg[14]) . ' - '; if (mysql_result($result, 0, 3) == 0) { $message .= stampToDate("1980-01-01 " . mysql_result($result, 0, 2), $hc_cfg[23]); } elseif (mysql_result($result, 0, 3) == 1) { $message .= $hc_lang_sendtofriend['AllDay']; } elseif (mysql_result($result, 0, 3) == 2) { $message .= $hc_lang_sendtofriend['TBA']; } $message .= '<br /><a href="' . CalRoot . '/index.php?eID=' . $eID . '">' . CalRoot . '/index.php?eID=' . $eID . '</a></p>'; } else { $where = '/index.php?com=send&lID=';
<?php /** * @package Helios Calendar * @license GNU General Public License version 2 or later; see LICENSE */ define('hcAdmin', true); include '../loader.php'; admin_logged_in(); action_headers(); $pID = isset($_GET['pID']) && is_numeric($_GET['pID']) ? cIn(strip_tags($_GET['pID'])) : 0; $result = doQuery("SELECT TemplateSource FROM " . HC_TblPrefix . "templatesnews WHERE PkID = '" . $pID . "'"); echo hasRows($result) ? cOut(mysql_result($result, 0, 0)) : $hc_lang_news['InvalidTemplate'];
if (hasRows($result)) { echo ' <ul class="data"> <li class="row header uline"> <div style="width:35%;">' . $hc_lang_news['Name'] . '</div> <div style="width:40%;">' . $hc_lang_news['Emailb'] . '</div> <div style="width:15%;">' . $hc_lang_news['Registered'] . '</div> <div style="width:10%;"> </div> </li>'; $cnt = 1; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 0 ? ' hl' : ''; echo ' <li class="row' . $hl . '"> <div style="width:35%;">' . cOut(trim($row[2] . ', ' . $row[1])) . '</div> <div class="txt" title="' . cOut($row[3]) . '" style="width:40%;">' . cOut($row[3]) . ' </div> <div style="width:15%;">' . stampToDate($row[4], $hc_cfg[24]) . '</div> <div class="tools" style="width:10%;"> <a href="' . AdminRoot . '/index.php?com=subedit&uID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a> <a href="javascript:;" onclick="doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a> </div> </li>'; ++$cnt; } echo ' </ul> <script> //<!-- function doDelete(dID){ if(confirm("' . $hc_lang_news['Valid08'] . '\\n\\n ' . $hc_lang_news['Valid09'] . '\\n ' . $hc_lang_news['Valid10'] . '"))
$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]); 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; }
$eOver = $eLimit = 0; if (mysql_result($result, 0, 0) > mysql_result($result, 0, 1) && mysql_result($result, 0, 1) != 0) { $eOver = 1; } elseif (mysql_result($result, 0, 0) == mysql_result($result, 0, 1) && mysql_result($result, 0, 1) != 0) { $eLimit = 1; } $rMsg = '<p><b>' . cOut($hc_lang_rsvp['PartySize']) . " " . cOut($partySize) . '</b>'; $rMsg .= '<br />' . cOut($regName) . '<br />' . cOut($regEmail); $rMsg .= $phone != '' ? '<br />' . $phone : ''; $rMsg .= $address != '' ? '<br />' . strip_tags(buildAddress($address, $address2, $city, $state, $zip, $country, $hc_lang_config['AddressType']), '<br>') : ''; $rMsg .= '</p>'; // RSVP User Email $regSubj = cOut($hc_lang_rsvp['regSubject']) . $eventTitle; $regMsg = '<p>' . cOut($hc_lang_rsvp['regMsg']) . '</p>'; $regMsg .= $eMsg . $rMsg; $regMsg .= $eOver == 1 ? " " . cOut($hc_lang_rsvp['regOverflow']) : ''; $regMsg .= '<p>' . cOut($hc_lang_rsvp['ThankYou']) . '<br />' . $hc_cfg[79] . '</p>'; $regMsg .= '<p>' . cOut($hc_lang_rsvp['regDisclaimer']) . '</p>'; // Event Contact Email $conSubj = cOut($hc_lang_rsvp['conSubject']) . $eventTitle; $conMsg = '<p>' . cOut($hc_lang_rsvp['conMsg']) . '</p>'; $conMsg .= $eMsg; $conMsg .= $eOver == 1 ? '<p>' . cOut($hc_lang_rsvp['conOverflow']) . '</p>' : ''; $conMsg .= $eLimit == 1 ? '<p>' . cOut($hc_lang_rsvp['conLimit']) . '</p>' : ''; $conMsg .= $rMsg; $conMsg .= '<p>' . cOut($hc_lang_rsvp['ThankYou']) . '<br />' . $hc_cfg[79] . '</p>'; $conMsg .= '<p>' . cOut($hc_lang_rsvp['conDisclaimer']) . '</p>'; reMail($regName, $regEmail, $regSubj, $regMsg, $hc_cfg[79], $hc_cfg[78]); reMail('', $conEmail, $conSubj, $conMsg, $hc_cfg[79], $hc_cfg[78]); header("Location: " . CalRoot . "/index.php?com=rsvp&eID=" . $eID . "&msg=2"); }
<generator>Helios Calendar</generator> <docs>' . CalRoot . '/index.php?com=tools</docs> <description>' . cleanXMLChars($hc_lang_rss['Upcoming']) . '</description>'; $result = doQuery($query); if (hasRows($result)) { echo ' <title>' . cleanXMLChars($feedName . ' - ' . CalName) . '</title>'; $cnt = 0; while ($row = mysql_fetch_row($result)) { $description = $hc_cfg[107] > 0 ? clean_truncate($row[2], $hc_cfg[107]) : $row[2]; $comment = $hc_cfg[25] != '' ? '<comments><![CDATA[' . CalRoot . '/index.php?eID=' . $row[0] . '#disqus_thread' . ']]></comments>' : ''; echo ' <item> <title>' . cleanXMLChars(stampToDate(cOut($row[3]), $hc_cfg[24])) . " - " . cleanXMLChars(cOut($row[1])) . '</title> <link><![CDATA[' . CalRoot . '/index.php?eID=' . $row[0] . ']]></link> <description>' . cleanXMLChars(cOut($description)) . '</description> ' . $comment . ' <guid>' . CalRoot . '/index.php?eID=' . $row[0] . '</guid> <pubDate>' . cleanXMLChars(stampToDate($row[3] . ' ' . $row[4], "%a, %d %b %Y %H:%M:%S") . ' ' . $tzRSS) . '</pubDate> </item>'; ++$cnt; } } else { echo ' <title>' . $hc_lang_rss['RSSSorry'] . '</title> <item> <title>' . $hc_lang_rss['RSSNoEvents'] . '</title> <link>' . CalRoot . '/</link> <description>' . $hc_lang_rss['RSSNoLink'] . '</description> <guid>' . CalRoot . '/</guid> </item>';
$pages = mysql_result($result, 0, 17); $notices = array_filter(explode(',', mysql_result($result, 0, 18)), 'is_numeric'); $fails = mysql_result($result, 0, 19); $active = $_SESSION['AdminPkID'] == $aID ? ' disabled="disabled"' : ''; $resultH = doQuery("SELECT * FROM " . HC_TblPrefix . "adminloginhistory WHERE AdminID = '" . $aID . "' ORDER BY LoginTime DESC LIMIT 100"); if (hasRows($resultH)) { $login_history .= ' <ul class="data">'; $cnt = 0; while ($row = mysql_fetch_row($resultH)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; $login_history .= ' <li class="row' . $hl . ($row[5] == 1 ? ' error' : '') . '"> <div style="width:25%;">' . stampToDate($row[4], $hc_cfg[24] . ' ' . $hc_cfg[23]) . '</div> <div style="width:18%;">' . cOut($row[2]) . '</div> <div class="txt" title="' . cOut($row[3]) . '" style="width:55%;">' . cOut($row[3]) . '</div> </li>'; ++$cnt; } $login_history .= ' </ul>'; } } else { $aID = 0; appInstructions(0, "Adding_Admin_Users", $hc_lang_admin['TitleAddA'], $hc_lang_admin['InstructAddA']); } echo ' <form name="frmAdminEdit" id="frmAdminEdit" method="post" action="' . AdminRoot . '/components/AdminEditAction.php" onsubmit="return validate();">'; set_form_token(); echo '
*/ define('hcAdmin', true); include '../loader.php'; admin_logged_in(); action_headers(); include HCLANG . '/admin/newsletter.php'; $eID = isset($_SESSION['ReportDownload']) ? implode(',', array_filter(explode(',', utf8_decode($_SESSION['ReportDownload'])), 'is_numeric')) : '0'; header('Content-type: application/csv'); header('Content-Disposition: inline; filename="' . CalName . ' Event Report ' . SYSDATE . '.csv"'); $resultX = doQuery("SELECT MAX(Views), MAX(Directions), MAX(Downloads), MAX(EmailToFriend), MAX(URLClicks),\r\n\t\t\t\t\t\tAVG(Views), AVG(Directions), AVG(Downloads), AVG(EmailToFriend), AVG(URLClicks)\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "events\r\n\t\t\t\t\tWHERE IsActive = 1 AND IsApproved = 1"); if (hasRows($resultX)) { $mViews = cOut(mysql_result($resultX, 0, 0)); $mDir = cOut(mysql_result($resultX, 0, 1)); $mDwnl = cOut(mysql_result($resultX, 0, 2)); $mEmail = cOut(mysql_result($resultX, 0, 3)); $mURL = cOut(mysql_result($resultX, 0, 4)); $aViews = cOut(round(mysql_result($resultX, 0, 5), 0)); $aDir = cOut(round(mysql_result($resultX, 0, 6), 0)); $aDwnl = cOut(round(mysql_result($resultX, 0, 7), 0)); $aEmail = cOut(round(mysql_result($resultX, 0, 8), 0)); $aURL = cOut(round(mysql_result($resultX, 0, 9), 0)); } echo "Event,Views,Directions,Downloads,Email,URL\n"; echo "Average," . number_format($aViews, 0, '.', ',') . "," . number_format($aDir, 0, '.', ',') . "," . number_format($aDwnl, 0, '.', ',') . "," . number_format($aEmail, 0, '.', ',') . "," . number_format($aURL, 0, '.', ',') . "\n"; echo "Best," . number_format($mViews, 0, '.', ',') . "," . number_format($mDir, 0, '.', ',') . "," . number_format($mDwnl, 0, '.', ',') . "," . number_format($mEmail, 0, '.', ',') . "," . number_format($mURL, 0, '.', ',') . "\n"; $result = doQuery("SELECT e.PkID, e.Title, e.Views, e.Directions, e.Downloads, e.EmailToFriend, e.URLClicks\r\n\t\t\t\t\tFROM " . HC_TblPrefix . "events e\r\n\t\t\t\t\tWHERE e.PkID IN(" . cIn($eID) . ") ORDER BY e.PkID"); if (hasRows($result)) { while ($row = mysql_fetch_row($result)) { echo "(" . $row[0] . ") " . str_replace(',', '', $row[1]) . "," . $row[2] . "," . $row[3] . "," . $row[4] . "," . $row[5] . "," . $row[6] . "\n"; } }
$summary = $row[1]; $description = $hc_cfg[109] > 0 ? clean_truncate(strip_tags($row[2]), $hc_cfg[109]) . ' ' . $hc_lang_event['ReadMore'] . ' ' . CalRoot . '/?eID=' . $row[0] : $row[2]; $location = $row[13] > 0 ? $row[24] . ' - ' . str_replace('<br />', ' ', buildAddress($row[25], $row[26], $row[27], $row[28], $row[29], $row[30])) : $row[16] . ' - ' . str_replace('<br />', ' ', buildAddress($row[17], $row[18], $row[19], $row[20], $row[21], $row[22])); $descFooter = "\\n______________________________\\niCalendar Feed powered by OU Calendar"; echo "BEGIN:VEVENT\r\n"; echo "URL;VALUE=URI:" . CalRoot . "/index.php?eID=" . $row[0] . "\r\n"; if ($allDay == false) { echo "DTSTART:" . $startDate . "\r\n"; echo "DTEND:" . $endDate . "\r\n"; } else { echo "DTSTART;VALUE=DATE:" . $startDate . "\r\n"; echo "DTEND;VALUE=DATE:" . $endDate . "\r\n"; } echo "SUMMARY:" . str_replace(";", "\\;", str_replace(",", "\\,", html_entity_decode(cOut(cleanSpecialChars(strip_tags($summary)))))) . "\r\n"; echo "DESCRIPTION:" . str_replace(";", "\\;", str_replace(",", "\\,", html_entity_decode(cOut(cleanSpecialChars(strip_tags(cleanBreaks($description))))) . $descFooter)) . "\r\n"; echo "LOCATION:" . str_replace(";", "\\;", str_replace(",", "\\,", html_entity_decode(cOut($location)))) . "\r\n"; echo "CATEGORIES:" . CalName . " Events\r\n"; echo "PRIORITY:0\r\n"; echo "TRANSP:TRANSPARENT\r\n"; echo "END:VEVENT\r\n"; } echo "END:VCALENDAR"; fwrite($fp, ob_get_contents()); fclose($fp); ob_end_clean(); } include HCPATH . '/cache/ical' . SYSDATE; function purge_icalendar() { if (count(glob(HCPATH . '/cache/ical*')) > 0) { foreach (glob(HCPATH . '/cache/ical*') as $file) {
<div style="width:68%;">' . $hc_lang_manage['Title'] . '</div> <div style="width:10%;">' . $hc_lang_manage['Date'] . '</div> <div class="number" style="width:10%;">' . $hc_lang_manage['Views'] . '</div> <div style="width:10%;"> </div> </li> </ul> <ul class="data"> <div class="blbd">'; $cnt = 0; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 1 ? ' hl' : ''; echo ' <li class="row ' . $hl . '"> <div class="txt" title="' . cOut($row[1]) . '" style="width:70%;">' . cOut($row[1]) . '</div> <div style="width:10%;">' . stampToDate($row[2], $hc_cfg[24]) . '</div> <div class="number" style="width:10%;">' . number_format(cOut($row[3]), 0, '', ',') . '</div> <div class="tools" style="width:10%;"> <a href="' . AdminRoot . '/index.php?com=eventedit&eID=' . $row[0] . '"><img src="' . AdminRoot . '/img/icons/edit.png" width="16" height="16" alt="" /></a> <a href="javascript:;" onclick="doDelete(\'' . $row[0] . '\');return false;"><img src="' . AdminRoot . '/img/icons/delete.png" width="16" height="16" alt="" /></a> </div> </li>'; ++$cnt; } echo ' </div> </ul> <script> //<!-- function doDelete(eID){ if(confirm("' . $hc_lang_manage['Valid01'] . "\\n\\n " . $hc_lang_manage['Valid02'] . "\\n " . $hc_lang_manage['Valid03'] . '")) window.location.href = "' . AdminRoot . '/components/EventBillboardAction.php?eID=" + eID + "&tkn=' . set_form_token(1) . '";
/** * Output weekly dashboard to a page outside of Helios Calendar. * @since 2.0.1 * @version 2.0.1 * @param binary $submit include submit event link, 0 = hide , 1 = show (Default:1) * @param binary $ical include iCalendar subscription link, 0 = hide, 1 = show (Default:1) * @param binary $rss include All Events rss feed link, 0 = hide, 1 = show (Default:1) * @param binary $end_time include end time in event lists, 0 = hide, 1 = show (Default:1) * @param string $menu_format menu format string, accepts any supported strftime() format parameters (Default:%a %m/%d) * @return void */ function int_week_dashboard($submit = 1, $ical = 1, $rss = 1, $end_time = 1, $menu_format = '%a %m/%d') { global $hc_cfg, $hc_lang_core; include HCLANG . '/public/integration.php'; if (!file_exists(HCPATH . '/cache/int7_' . SYSDATE . '.php')) { if (count(glob(HCPATH . '/cache/int7_*.php')) > 0) { foreach (glob(HCPATH . '/cache/int7_*.php') as $file) { unlink($file); } } ob_start(); $fp = fopen(HCPATH . '/cache/int7_' . SYSDATE . '.php', 'w'); fwrite($fp, "<?php\n//\tHelios Dashboard Integration Events Cache - Delete this file when upgrading.\n"); $result = doQuery("SELECT PkID, Title, StartDate, StartTime, EndTime, TBD FROM " . HC_TblPrefix . "events \r\n\t\t\t\t\t\t\tWHERE IsActive = 1 AND IsApproved = 1 AND StartDate Between '" . SYSDATE . "' AND ADDDATE('" . SYSDATE . "', INTERVAL 6 DAY)\r\n\t\t\t\t\t\t\tORDER BY StartDate, TBD, StartTime, Title"); if (hasRows($result)) { $cur_day = -1; $cur_date = ''; fwrite($fp, "\$hc_next7 = array(\n"); while ($row = mysql_fetch_row($result)) { if ($cur_date != $row[2]) { ++$cur_day; $cur_date = $row[2]; if ($cur_day > 0) { fwrite($fp, "\t),\n"); } fwrite($fp, $cur_day . " => array(\n"); } if ($row[5] == 0) { $time = $row[3] != '' ? stampToDate($row[3], $hc_cfg[23]) : ''; $time .= $row[4] != '' && $end_time == 1 ? ' - ' . stampToDate($row[4], $hc_cfg[23]) : ''; } else { $time = $row[5] == 1 ? $hc_lang_int['AllDay'] : $hc_lang_int['TimeTBA']; } fwrite($fp, "\t" . $row[0] . " => array(\"" . $time . "\",\"" . stampToDate($row[2], $hc_cfg[14]) . "\",\"" . str_replace("\"", "'", cOut($row[1])) . "\"),\n"); } fwrite($fp, "\t),"); } fwrite($fp, "\n)\n?>"); fwrite($fp, ob_get_contents()); fclose($fp); ob_end_clean(); } include HCPATH . '/cache/int7_' . SYSDATE . '.php'; echo ' <script> //<!-- function hc_tog_dash(show){var i = 0;while(i <= 6){document.getElementById("hc_dashboard_day"+i).style.display = (i == show) ? "block" : "none";i++;}} //--> </script> <div id="hc_dashboard"> <ul id="menu"> <li><a href="javascript:;" onclick="hc_tog_dash(0);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 0) . '</a></li> <li><a href="javascript:;" onclick="hc_tog_dash(1);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 1) . '</a></li> <li><a href="javascript:;" onclick="hc_tog_dash(2);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 2) . '</a></li> <li><a href="javascript:;" onclick="hc_tog_dash(3);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 3) . '</a></li> <li><a href="javascript:;" onclick="hc_tog_dash(4);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 4) . '</a></li> <li><a href="javascript:;" onclick="hc_tog_dash(5);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 5) . '</a></li> <li><a href="javascript:;" onclick="hc_tog_dash(6);return false;">' . strftime($menu_format, strtotime(SYSDATE) + 86400 * 6) . '</a></li> ' . ($rss == 1 && $hc_cfg[106] == 1 ? '<li class="icon"><a href="' . CalRoot . '/rss/" title="' . $hc_lang_int['TitleRSS'] . '" rel="nofollow" target="_blank"><img src="' . CalRoot . '/img/feed.png" width="16" height="16" alt="" /></a></li>' : '') . ' ' . ($ical == 1 && $hc_cfg[108] == 1 ? '<li class="icon"><a href="webcal://' . substr(CalRoot, 7) . '/link/ical.php" title="' . $hc_lang_int['TitleiCal'] . '" rel="nofollow"><img src="' . CalRoot . '/img/icons/ical.png" width="16" height="16" alt="" /></a></li>' : '') . ' </ul>'; $date = ''; foreach ($hc_next7 as $day => $arr) { foreach ($arr as $id => $value) { if ($date != $value[1]) { $date = $value[1]; echo ' <div id="hc_dashboard_day' . $day . '" class="hc_dashboard_day"' . ($day > 0 ? ' style="display:none;"' : '') . '> <ul> <li>' . $value[1] . '</li>'; } echo ' <li><div class="time">' . $value[0] . '</div><a href="' . CalRoot . '/index.php?eID=' . $id . '" rel="nofollow">' . cOut($value[2]) . '</a></li>'; } echo $date != '' ? ' </ul> </div>' : ''; } echo $date == '' ? $hc_lang_int['NoEvent'] : ''; echo ' <a href="' . CalRoot . '/" rel="nofollow">' . $hc_lang_int['Browse'] . '</a> ' . ($submit == 1 ? '| <a href="' . CalRoot . '/index.php?com=submit" rel="nofollow">' . $hc_lang_int['Submit'] . '</a>' : '') . ' </div>'; }
$crmbAdd[HCCanURL] = $hc_lang_core[HCCOM]; } } $title = cOut(mysql_result($result, 0, 0)); include_once HCLANG . '/public/' . HCCOM . '.php'; include_once HCPATH . HCINC . '/functions/forms.php'; load_theme_page('form.php'); break; case 'rsvp': $result = doQuery("SELECT e.Title,e.StartDate,e.StartTime,e.TBD,e.ContactName,e.ContactEmail,e.SeriesID,er.OpenDate,er.CloseDate,er.RegOption,\r\n\t\t\t\t\t\t\t\t\tMIN(e2.StartDate),MAX(e2.StartDate),MIN(e2.PkID)\r\n\t\t\t\t\t\t\t\tFROM " . HC_TblPrefix . "events e\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "events e2 ON (e.SeriesID = e2.SeriesID)\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN " . HC_TblPrefix . "eventrsvps er ON (e.PkID = er.EventID)\r\n\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\te.PkID = '" . $eID . "'\r\n\t\t\t\t\t\t\t\tGROUP BY e.Title,e.StartDate,e.StartTime,e.TBD,e.ContactName,e.ContactEmail,e.SeriesID,er.OpenDate,er.CloseDate, er.RegOption\r\n\t\t\t\t\t\t\t\tORDER BY StartDate\r\n\t\t\t\t\t\t\t\tLIMIT 1"); if ($eID > 0 && hasRows($result)) { define('HCCanURL', CalRoot . '/index.php?com=rsvp&eID=' . $eID); $crmbAdd[CalRoot . '/index.php?eID=' . $eID] = mysql_result($result, 0, 0); $crmbAdd[HCCanURL] = $hc_lang_core[HCCOM]; } $title = hasRows($result) ? cOut(mysql_result($result, 0, 0)) : ''; include_once HCLANG . '/public/rsvp.php'; include_once HCPATH . HCINC . '/functions/forms.php'; load_theme_page('form.php'); break; case 'submit': if ($hc_cfg[1] == 0) { go_home(); } case 'filter': case 'search': define('HCCanURL', CalRoot . '/index.php?com=' . HCCOM); $crmbAdd[HCCanURL] = $hc_lang_core[HCCOM]; include_once HCLANG . '/public/' . HCCOM . '.php'; include_once HCPATH . HCINC . '/functions/forms.php'; load_theme_page('form.php');
/** * Output digest newsletters list. Newsletters listed in decending order by sent date. * @since 2.1.0 * @version 2.1.0 * @param integer $size max number of newsletters to include in the list (list may be smaller depending on settings/available newsletters). * @return void */ function digest_newsletter_list($size, $dateFormat = '') { global $hc_cfg, $hc_lang_pages; if (!file_exists(HCPATH . '/cache/digest_' . SYSDATE . '_n')) { ob_start(); $fp = fopen(HCPATH . '/cache/digest_' . SYSDATE . '_n', 'w'); $result = doQuery("SELECT PkID, Subject, SentDate FROM " . HC_TblPrefix . "newsletters WHERE Status > 0 AND IsArchive = 1 AND IsActive = 1 AND ArchiveContents != '' ORDER BY SentDate DESC LIMIT " . $size); if (!hasRows($result)) { echo ' <ul class="newsletters"><li>' . $hc_lang_pages['NoNewsletters'] . '</li></ul>'; return 0; } $cnt = 1; $dateFormat = $dateFormat == '' ? $hc_cfg[24] : $dateFormat; echo ' <ul class="newsletters">'; while ($row = mysql_fetch_row($result)) { $hl = $cnt % 2 == 0 ? ' class="hl"' : ''; echo '<li' . $hl . '><time datetime="' . stampToDate($row[2], '%Y-%m-%d') . '">' . stampToDate($row[2], $dateFormat) . '</time><a href="' . CalRoot . '/newsletter/index.php?n=' . md5($row[0]) . '" target="_blank">' . cOut($row[1]) . '</a></li>'; ++$cnt; } echo ' </ul>'; fwrite($fp, ob_get_contents()); fclose($fp); ob_end_clean(); } include HCPATH . '/cache/digest_' . SYSDATE . '_n'; }
<legend>' . $hc_lang_tools['CategoriesLabel'] . '</legend>'; $result = doQuery("SELECT c.PkID, c.CategoryName, c.ParentID, c.CategoryName as Sort, NULL 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)\r\n\t\t\t\t\tWHERE c.ParentID = 0 AND c.IsActive = 1\r\n\t\t\t\t\tGROUP BY c.PkID, c.CategoryName, c.ParentID\r\n\t\t\t\t\tUNION SELECT c.PkID, c.CategoryName, c.ParentID, c2.CategoryName as Sort, NULL 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) \r\n\t\t\t\t\tWHERE c.ParentID > 0 AND c.IsActive = 1\r\n\t\t\t\t\tGROUP BY c.PkID , c.CategoryName, c.ParentID, c2.CategoryName\r\n\t\t\t\t\tORDER BY Sort, ParentID, CategoryName"); $cnt = 1; echo ' <div class="catCol">'; while ($row = mysql_fetch_row($result)) { if ($cnt > ceil(mysql_num_rows($result) / $columns) && $row[2] == 0) { echo $cnt > 1 ? ' </div>' : ''; echo ' <div class="catCol">'; $cnt = 1; } $sub = $row[2] != 0 ? ' class="sub"' : ''; echo ' <label for="catID_' . $row[0] . '"' . $sub . '><input onclick="updateLink();" name="catID[]" id="catID_' . $row[0] . '" type="checkbox" value="' . $row[0] . '" />' . cOut($row[1]) . '</label>'; ++$cnt; } echo ' </div> </fieldset> <input name="reset" id="reset" type="reset" value="' . $hc_lang_tools['ResetLink'] . '" /> </form> <script src="' . CalRoot . '/inc/javascript/validation.js"></script> <script> //<!-- function updateLink(){ var catStr = (validCheckArray("frmToolLink","catID[]",1,"error") == "") ? "l=" + checkUpdateString("frmToolLink", "catID[]") : ""; var cityStr = (validCheckArray("frmToolLink","cityName[]",1,"error") == "") ? "c=" + checkUpdateString("frmToolLink", "cityName[]") : ""; var both = (catStr != "" && cityStr != "") ? "&" : "";
function sr_event_browse($show_images = 0) { global $lID, $hc_cfg, $hc_lang_event, $favQ1, $favQ2, $resultEB, $myNav; $location = $lID > 0 ? '&lID=' . $lID : ''; $cnt = $date = 0; $row_number = 1; echo $myNav; if (!hasRows($resultEB)) { no_event_notice(); return 0; } while ($row = mysql_fetch_row($resultEB)) { //echo print_r($row); $color_class = sr_colorizer($row_number); $description = $hc_cfg[107] > 0 ? clean_truncate($row[21], $hc_cfg[107]) : $row[21]; $categories = explode(",", $row[20]); //filtering out ACE switch (count($categories)) { case 0: $category = 'No Category'; break; case 1: $category = substr($categories[0], 3); break; default: $category = substr($categories[0], -4) != '_ACE' ? substr($categories[0], 3) : substr($categories[1], 3); break; } $category = '<h4>' . $category . '</h4>'; if ($date != $row[2]) { $date = $row[2]; echo $cnt > 0 ? '</ul>' : ''; echo '<h2>' . stampToDate($row[2], '%A, %B %d, %Y') . '</h2><ul>'; $cnt = 1; } $limit = $row[8] > 0 ? cOut($row[8]) : $hc_cfg[134]; $expire = $limit > 0 ? date("Y-m-d", strtotime($date) + $limit * 86400) : ''; $cls = $cnt % 2 == 0 ? 'hl' : ''; $cls .= $row[7] > 0 ? ' featured' : ''; if ($row[5] == 0) { $time = $row[3] != '' ? stampToDate($row[3], $hc_cfg[23]) : ''; $time .= $row[4] != '' ? ' - ' . stampToDate($row[4], $hc_cfg[23]) : ''; //$stamp = date("Y-m-d\Th:i:00",strtotime($row[2] . trim(' '.$row[3]))) . HCTZ; $stamp = stampToDate($row[2], '%A, %B %d'); //$hc_cfg[14] } else { $time = $row[5] == 1 ? $hc_lang_event['AllDay'] : $hc_lang_event['TBA']; $stamp = $row[2]; $stamp = stampToDate($row[2], '%A, %B %d'); } echo ' <li ' . ($cls != '' ? 'class="' . $color_class . ' ' . trim($cls) . '" ' : 'class="' . $color_class . '"') . 'itemscope itemtype="http://schema.org/Event"> <a href="' . CalRoot . '/index.php?eID=' . $row[0] . $location . '">' . '<div class="event-content-container">' . $category . '<h3 itemprop="name">' . cOut($row[1]) . '</h3><div class="date-time"> <span itemprop="startDate" datetime="' . $stamp . '">' . $stamp . ', ' . $time . '</span> <span class="location"><i class="fa fa-map-marker"></i> ' . $row[14] . ($row[22] != '' ? ' - ' . $row[22] : '') . '</span></div><p>' . strip_tags(cOut($description)) . '<span class="readmore"> READ MORE</span></p></div>' . ($show_images == 1 && $row[6] != '' ? '<div class="event-image-container" style="background-image: url(' . $row[6] . '); min-width:' . (strlen($row[1]) > 43 ? 325 : 287) . 'px;"></div>' : '') . '</a></li>'; //'<span class="readmore"> READ MORE</span></p></div>'.(($show_images == 1 && $row[6] != '') ? '<div class="event-image-container"><img itemprop="image" src="'.$row[6].'" class="eimage_b" /></div>':'').'</a></li>' ++$cnt; ++$row_number; } echo ' </ul> ' . $myNav; }