コード例 #1
0
function printEventDetails()
{
    global $client;
    foreach (retrieveEvents($_GET['calendarId']) as $event) {
        if (isCurrentEvent($event)) {
            putEvent($event);
        }
    }
}
コード例 #2
0
function printEventDetails($client)
{
    foreach (retrieveEvents($client, $_GET['calendarId']) as $event) {
        if ($event['id'] == $_GET['showThisEvent']) {
            putTitle('Details for event: ' . $event['summary']);
            putBlock('This event has status ' . $event['status']);
            putBlock('It was created at ' . date('Y-m-d H:m', strtotime($event['created'])) . ' and last updated at ' . date('Y-m-d H:m', strtotime($event['updated'])) . '.');
            putBlock('For this event you have to <strong>' . $event['summary'] . '</strong>.');
        }
    }
}
コード例 #3
0
ファイル: events.php プロジェクト: helemaalbigt/Binair01
    ?>
				
				</div>
			</div>
			
			<!-- PAST EVENTS -->
	    	<div class="row">
    			<!--date-->
    			<div class="col-md-4 title">
	        		<span class="sidetitle underscore">PAST EVENTS</span><br><br>
				</div>
			
				<div class="content-segment col-md-8" id="content">
					
					<?php 
    retrieveEvents(0, $postsPerPage);
    ?>
				
				</div>
			</div>
			
	    </div> 
	    <?php 
}
?>
	    
	    <?php 
printFooter();
?>
	    
    	<!-- /container -->        
コード例 #4
0
ファイル: events.php プロジェクト: ucf-design-group/osi-cab
?>

		<div id="primary" class="content-area">
			<div id="content" class="site-content" role="main">
				
					<!-- future events -->
					<div class='future'>
						<h2>Upcoming Events</h2>
						<?php 
retrieveEvents('future', 0, 5);
?>
					</div>
				
					<!-- past events -->
					<div class='past'>
						<h2>Past Events</h2>
						<?php 
retrieveEvents('past', 0, 5);
?>
					</div>

			</div><!-- #content .site-content -->
		</div><!-- #primary .content-area -->
		
	<script src="<?php 
bloginfo('template_directory');
?>
/js/eventRetrieval.js"></script>
		
<?php 
get_footer();
コード例 #5
0
//initialize session if none exists
if (session_id() == '' || !isset($_SESSION)) {
    // session isn't started
    session_start();
}
/*
 * AJAX functions
 */
//load more blogposts
if (isset($_GET['loadblogposts']) && isset($_GET['load']) && isset($_GET['offset'])) {
    retrieveBlogposts($_GET['offset'], $_GET['load']);
}
//load more events
if (isset($_GET['loadevents']) && isset($_GET['load']) && isset($_GET['offset'])) {
    retrieveEvents($_GET['offset'], $_GET['load']);
}
/**
 * Clean form data 
 * 
 * Strips tags and removes/replaces certain characters from post data
 * 
 * @param array $p Post data from a form
 * @return array $p
 */
function cleanData($p)
{
    $returnArray = array();
    foreach ($p as $key => $value) {
        //if value is an array recursively apply this function
        if (is_array($value)) {
コード例 #6
0
<?php

// This is the loop for accessing events.  It is called both by the
// events template and the AJAX for loading more events dynamically.
$usingAJAX = false;
if (isset($_GET['pastorfuture']) || isset($_GET['start']) || isset($_GET['number'])) {
    $usingAJAX = true;
    $pastOrFuture = isset($_GET['pastorfuture']) ? $_GET['pastorfuture'] : '';
    $startEvent = isset($_GET['start']) ? $_GET['start'] : '';
    $number = isset($_GET['number']) ? $_GET['number'] : '';
    define('WP_USE_THEMES', false);
    require_once '../../../wp-load.php';
    retrieveEvents($pastOrFuture, $startEvent, $number);
}
function retrieveEvents($pastOrFuture, $startEvent, $number)
{
    $ascOrDesc = '';
    if ($pastOrFuture == 'past') {
        $ascOrDesc = 'DESC';
    } else {
        $ascOrDesc = 'ASC';
    }
    $showLoadMore = false;
    if ($startEvent == 0) {
        $startEvent = time();
        $showLoadMore = true;
    }
    $eventsQuery = array('post_type' => 'osi-events', 'posts_per_page' => -1, 'meta_key' => 'oe-form-start', 'orderby' => 'meta_value', 'order' => $ascOrDesc);
    $loop = new WP_Query($eventsQuery);
    $poster = array('class' => 'poster');
    $counter = 0;