Beispiel #1
0
     if ($row[5] != '') {
         if ($row[4] > $row[5]) {
             $endDate = date("Ymd\\THis", mktime($endtimepart[0], $endtimepart[1], $endtimepart[2], $startdatepart[1], $startdatepart[2] + 1, $startdatepart[0]));
         } else {
             $endDate = date("Ymd\\THis", mktime($endtimepart[0], $endtimepart[1], $endtimepart[2], $startdatepart[1], $startdatepart[2], $startdatepart[0]));
         }
     } else {
         $endDate = date("Ymd\\THis", mktime($starttimepart[0], $starttimepart[1], $starttimepart[2], $startdatepart[1], $startdatepart[2], $startdatepart[0]));
     }
 } else {
     $allDay = true;
     $startDate = date("Ymd", mktime(0, 0, 0, $startdatepart[1], $startdatepart[2], $startdatepart[0]));
     $endDate = date("Ymd", mktime(0, 0, 0, $startdatepart[1], $startdatepart[2] + 1, $startdatepart[0]));
 }
 $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";
Beispiel #2
0
    echo '
<!-- Generated by Helios Calendar ' . $hc_cfg[49] . ' on ' . SYSDATE . ' ' . SYSTIME . ' -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<link>' . CalRoot . '/</link>
	<atom:link href="' . CalRoot . '/rss/?sID=' . $sID . '" rel="self" type="application/rss+xml" />
	<generator>Helios Calendar</generator>
	<docs>' . CalRoot . '&#47;index.php&#63;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&#63;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>
Beispiel #3
0
function sr_event_browse($show_images = 0)
{
    global $lID, $hc_cfg, $hc_lang_event, $favQ1, $favQ2, $resultEB, $myNav;
    $location = $lID > 0 ? '&amp;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">&nbsp;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">&nbsp;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;
}
Beispiel #4
0
     if (mysql_result($result, 0, 12) != '') {
         if (mysql_result($result, 0, 10) > mysql_result($result, 0, 12)) {
             $endDate = date("Ymd\\THis", mktime($endtimepart[0], $endtimepart[1], $endtimepart[2], $startdatepart[1], $startdatepart[2] + 1, $startdatepart[0]));
         } else {
             $endDate = date("Ymd\\THis", mktime($endtimepart[0], $endtimepart[1], $endtimepart[2], $startdatepart[1], $startdatepart[2], $startdatepart[0]));
         }
     } else {
         $endDate = date("Ymd\\THis", mktime($starttimepart[0], $starttimepart[1], $starttimepart[2], $startdatepart[1], $startdatepart[2], $startdatepart[0]));
     }
 } else {
     $allDay = true;
     $startDate = date("Ymd", mktime(0, 0, 0, $startdatepart[1], $startdatepart[2], $startdatepart[0]));
     $endDate = date("Ymd", mktime(0, 0, 0, $startdatepart[1], $startdatepart[2] + 1, $startdatepart[0]));
 }
 $summary = mysql_result($result, 0, 1);
 $description = $hc_cfg[109] > 0 ? clean_truncate(strip_tags(mysql_result($result, 0, 8)), $hc_cfg[109]) . ' ' . $hc_lang_event['ReadMore'] . ' ' . CalRoot . '/?eID=' . $eID : mysql_result($result, 0, 8);
 if (mysql_result($result, 0, 33) == 0 or mysql_result($result, 0, 33) == '') {
     $location = 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, 35) . " " . mysql_result($result, 0, 7);
 } else {
     $result = doQuery("SELECT * FROM " . HC_TblPrefix . "locations WHERE PkID = '" . cIn(mysql_result($result, 0, 33)) . "'");
     $location = mysql_result($result, 0, 1) . " - " . 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);
 }
 $descFooter = "\\n______________________________\\nEvent Downloaded Powered by OU Calendar";
 if ($cID == 3) {
     header('Content-type: text/Calendar');
     header('Content-Disposition: inline; filename="' . cleanXMLChars(str_replace(" ", "", $summary), 1) . '.ics"');
 } else {
     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
     header('Content-type: text/x-vCalendar');
     header('Content-Disposition: inline; filename="' . cleanXMLChars(str_replace(" ", "", $summary), 1) . '.vcs"');
 }
Beispiel #5
0
/**
 * 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))) . '">&lt;</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))) . '">&gt;</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&amp;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&amp;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&amp;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>';
}
Beispiel #6
0
<!-- Generated by Helios Calendar ' . $hc_cfg[49] . ' ' . date("\\o\\n Y-m-d \\a\\t H:i:s") . ' local time. -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oun="http://omniupdate.com/XSL/CustomNews">
<channel>
	<link>' . CalRoot . '/</link>
	<atom:link href="' . CalRoot . '/rss/databuilder.php" rel="self" type="application/rss+xml" />
	<generator>OU Calendar</generator>
	<docs>' . CalRoot . '&#47;index.php&#63;com=tools</docs>
	<description>' . cleanXMLChars($hc_lang_rss['Upcoming']) . '</description>';
if (hasRows($result)) {
    echo '
	<title>' . cleanXMLChars($hc_lang_rss['Custom']) . '</title>';
    $cnt = 0;
    while ($row = mysql_fetch_row($result)) {
        $description = $row[2];
        $description = strip_tags(html_entity_decode($description));
        $description = $hc_cfg[107] > 0 ? clean_truncate($description, $hc_cfg[107]) : $description;
        $categories = explode(",", $row[9]);
        //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;
        }
        $min = 0;
        if (isset($row[5])) {
Beispiel #7
0
 $endTime = isset($_POST['ignoreendtime']) ? $startTime : $endTime;
 $endDate = $eventDate;
 if ($startTime > $endTime) {
     $dateParts = explode("-", $eventDate);
     $endDate = date("Y-m-d", mktime(0, 0, 0, $dateParts[1], $dateParts[2] + 1, $dateParts[0]));
 }
 $resultLoc = doQuery("SELECT NetworkID FROM " . HC_TblPrefix . "locationnetwork WHERE NetworkType = 2 AND LocationID = '" . $locID . "'");
 $venueID = hasRows($resultLoc) ? mysql_result($resultLoc, 0, 0) : '';
 $ebStatus = isset($_POST['ebStatus']) ? cIn($_POST['ebStatus']) : 'draft';
 $ebPrivacy = isset($_POST['ebPrivacy']) ? cIn($_POST['ebPrivacy']) : '0';
 $ebTimezone = isset($_POST['ebTimezone']) ? cIn($_POST['ebTimezone']) : substr(HCTZ, 0, 3);
 $ebCurrency = isset($_POST['ebCurrency']) ? cIn($_POST['ebCurrency']) : 'USD';
 $ebOrganizer = isset($_POST['ebOrgID']) ? cIn($_POST['ebOrgID']) : $hc_cfg[62];
 $eventD = utf8_encode(htmlentities(strip_tags($eventDesc)));
 if (strlen($eventD) > 400) {
     $eventD = clean_truncate($eventDesc, 400) . '<br /><br /><a href="' . CalRoot . '/index.php?eID=' . $eID . '">' . utf8_encode(htmlentities($hc_lang_event['EventbriteFull'])) . '</a>';
 }
 $ebSend .= "&title=" . urlencode(utf8_encode(htmlentities($eventTitle)));
 $ebSend .= "&description=" . urlencode(utf8_encode(nl2br($eventD)));
 $ebSend .= "&start_date=" . $eventDate . "+" . str_replace("'", "", $startTime);
 $ebSend .= "&end_date=" . $endDate . "+" . str_replace("'", "", $endTime);
 $ebSend .= "&timezone=" . $ebTimezone;
 $ebSend .= "&privacy=" . $ebPrivacy;
 $ebSend .= "&venue_id=" . $venueID;
 $ebSend .= "&organizer_id=" . $ebOrganizer;
 $ebSend .= "&currency=" . $ebCurrency;
 $ebSend .= "&status=" . $ebStatus;
 if ($ebID > 0) {
     $ebSend .= "&event_id=" . $ebID;
 }
 if (!($fp = fsockopen("ssl://www.eventbrite.com", 443, $errno, $errstr, 20))) {
Beispiel #8
0
/**
 * Output breadcrumb navigation for current page.
 * @since 2.0.0
 * @version 2.0.0
 * @param array $crumbs array of breadcrumbs ($link => $text)
 * @param integer $limit [optional] text length limit, crumb text truncated to not exceed this length (Default:50)
 * @return datatype description
 */
function build_breadcrumb($crumbs, $limit = 50)
{
    if (!is_array($crumbs)) {
        return 0;
    }
    echo '
	<ul class="breadbox">
		<li id="bread_top"><a href="#top" rel="nofollow">&uarr;</a></li>';
    foreach ($crumbs as $link => $text) {
        echo $link != 'NULL' ? '
		<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="' . $link . '" itemprop="url"><span itemprop="title">' . clean_truncate($text, $limit) . '</span></a><span class="arrow"><span>&nbsp;</span></span></li>' : '
		<li class="empty">' . $text . '</li>';
    }
    echo '
	</ul>';
}
Beispiel #9
0
/**
 * Output event browse navigation links & event list by date.
 * @since 2.0.0
 * @version 2.1.0
 * @param integer $show_images Include event images with browse output. 0 = Do NOT include images, 1 = Include images. (Default: 0)
 * @param string $nav_function [optional] Browse Navigation function to use. (Default: event_browse_bs_nav)
 * @return void
 */
function event_browse_bs($show_images = 0)
{
    global $lID, $hc_cfg, $hc_lang_event, $favQ1, $favQ2, $resultEB, $mybsNav;
    $location = $lID > 0 ? '&amp;lID=' . $lID : '';
    $cnt = $date = 0;
    echo $mybsNav;
    if (!hasRows($resultEB)) {
        no_event_notice();
        return 0;
    }
    while ($row = mysql_fetch_row($resultEB)) {
        $limit = $row[8] > 0 ? cOut($row[8]) : $hc_cfg[134];
        $expire = $limit > 0 ? date("Y-m-d", strtotime($date) + $limit * 86400) : '';
        $eID = $row[0];
        if ($row[7] > 0) {
            $cls = ' panel-primary';
        } else {
            $cls = ' panel-default';
        }
        $desc = $row[20];
        $desc = strip_tags(html_entity_decode($desc));
        //$desc = preg_replace("/<img[^>]+\>/i", "", $desc);
        //$desc = preg_replace('~</?p[^>]*>~i','', $desc);
        $desc = strlen($desc) >= $hc_cfg[107] ? clean_truncate($desc, $hc_cfg[107]) : $desc;
        $marker = $row[14];
        $marker = $row[14] != '' ? '<a href="' . CalRoot . '/index.php?com=location&amp;lID=' . $row[9] . '"><span class="pull-right"><i class="fa  fa-map-marker"></i> ' . $row[14] . '</span></a>' : $marker;
        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_event['AllDay'] : $hc_lang_event['TBA'];
            $stamp = date("Y-m-d", strtotime($row[2]));
        }
        echo '
			<div class="panel' . $cls . ' event-item">
			<div class="panel-heading"><h4 class="panel-title"><a itemprop="url" href="' . CalRoot . '/index.php?eID=' . $row[0] . $location . '"' . ($expire <= SYSDATE ? ' rel="nofollow"' : '') . '><span itemprop="name">' . cOut($row[1]) . '</span></a><span class="badge pull-right">' . stampToDate($row[2], $hc_cfg[14]) . '</span></h4></div>
			<div ' . ($cls != '' ? 'class="panel-body ' . trim($cls) . '" ' : '') . 'itemscope itemtype="http://schema.org/Event">
				' . ($show_images == 1 && $row[6] != '' ? ' <a itemprop="url" href="' . CalRoot . '/index.php?eID=' . $row[0] . $location . '"' . ($expire <= SYSDATE ? ' rel="nofollow"' : '') . '>
				<img alt="' . cOut($row[1]) . '" itemprop="image" src="' . $row[6] . '" class="img-thumbnail pull-left" /></a>' : '') . '
				<p>' . $desc . '</p><div>';
        cat_buttons($row[0]);
        echo '</div></div>				
			<div class="panel-footer panel-info"><time itemprop="startDate" datetime="' . $stamp . '">' . $time . '</time>' . $marker . '</div>
			</div>';
        ++$cnt;
    }
    echo $mybsNav;
}