当前位置: 首页>>代码示例>>PHP>>正文


PHP getEvents函数代码示例

本文整理汇总了PHP中getEvents函数的典型用法代码示例。如果您正苦于以下问题:PHP getEvents函数的具体用法?PHP getEvents怎么用?PHP getEvents使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getEvents函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getEvents

 function getEvents($feedURL, $maxItems = 10, $backfill = 0)
 {
     $eventsXML = simplexml_load_file($feedURL);
     if (!$eventsXML) {
         echo 'Visit events.uoit.ca to see all events.';
     }
     $minItems = 5;
     $itemCount = 1;
     foreach ($eventsXML->channel->item as $event) {
         if ($itemCount <= $maxItems) {
             $title = $event->title;
             $description = $event->description;
             $url = $event->link;
             $unixdate = $event->date;
             $date = new DateTime();
             $date->setTimestamp((int) $unixdate);
             $monthDisplay = $date->format('M');
             $dayDisplay = $date->format('d');
             $time = $event->time;
             $location = $event->location;
             echo "<li data-equalizer style='display:block;float:none;width:100%;padding:0;'>\n\t\t\t\t    \t<a href='" . $url . "' target='_blank'>\n\t\t\t\t        <p class='event_date' data-equalizer-watch>" . $monthDisplay . "\n\t\t\t\t            <span>" . $dayDisplay . "</span>\n\t\t\t\t        </p>\n\t\t\t\t        <p class='event_info' data-equalizer-watch>\n\t\t\t\t          <span class='event_title'>" . $title . "</span>\n\t\t\t\t          <span class='event_time'>" . $location . "\n\t\t\t\t          <br>" . $time . "</span>\n\t\t\t\t        </p>\n\t\t\t\t      </a>\n\t\t\t\t    </li>";
             $itemCount++;
         }
     }
     if ($itemCount <= 5 && $backfill == '1') {
         getEvents("http://events.uoit.ca/api/v1/rss");
     }
 }
开发者ID:wosevision,项目名称:events.uoit.ca,代码行数:28,代码来源:index.php

示例2: deleteEvent

function deleteEvent($id)
{
    $details = getEvents($id);
    if ($details) {
        $requete = 'DELETE FROM evenement WHERE id = :id;
					DELETE FROM invitation WHERE id_evenement= :id;
					DELETE FROM commentaire WHERE id_evenement= :id;
					DELETE FROM modere WHERE id_evenement = :id;';
        $execution = [':id' => $id];
        // Supprime les Images
        if ($details["id_media_principal"]) {
            unlink(PHOTO_EVENT . $details['id_media_principal']);
        }
        $images = getImagesAndId($id);
        if (isset($images[0][0])) {
            foreach ($images as $key => $value) {
                removeEventMedia($id, $images[$key][0]);
                unlink(PHOTO_EVENT . $images[$key][1]);
            }
        }
        $bdd = new PDO(DSN, DBUSER, DBPASS);
        $query = $bdd->prepare($requete);
        if ($query->execute($execution)) {
            return True;
        } else {
            var_dump($query->errorInfo());
            return False;
        }
    } else {
        return False;
    }
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:32,代码来源:deleteEvent.php

示例3: getUserWS

/**
* es construix un objecte JSON amb tota la informació que l'usuari necessita quan s'autentifica:
	* - bbdd privada
	*  - 
* els següents continguts estaran disponibles per a tots els usuaris.
* per a usuaris anònims, els formularis no tenen efecte real, pero permeten veure el funcionament
	* - formularis per a usuaris registrats 
	* - contingut html per a usuaris registrats
	* - plantilles html per a usuaris registrats
*/
function getUserWS($user)
{
    //declarations
    $res = array();
    //entitats:
    $res['bancal'] = getBancals($user);
    $res['parcela'] = getParceles($user);
    $res['planta'] = getPlantes($user);
    $res['familia'] = getFamilies($user);
    $res['grup'] = getGrups($user);
    $res['plaga'] = getPlagues($user);
    $res['remei'] = getRemeis($user);
    $res['tasca_fixa'] = getTasquesFixes($user);
    $res['event'] = getEvents($user);
    $res['cultiu'] = getCultius($user);
    return $res;
}
开发者ID:guirisan,项目名称:userfrosting,代码行数:27,代码来源:hortapp.getData.php

示例4: delegate

function delegate($action)
{
    //cleanCache();
    $ds = dataSetName($_GET);
    $data = loadFromCache($ds);
    if ($data) {
        echo $data;
        exit(0);
    }
    switch ($action) {
        //Twitter
        case 'topTweets':
            $data = topTweets();
            break;
            //Google Analytics
        //Google Analytics
        case 'chart':
            $data = getChart();
            break;
            //Events
        //Events
        case 'events':
            $data = getEvents();
            break;
            //Statistics
        //Statistics
        case 'stats':
            $data = getStatistics();
            break;
            //Social badge
        //Social badge
        case 'social':
            $data = generateSocialBadge();
            break;
    }
    if (!empty($data)) {
        $val = storeInCache($ds, output($data));
        if (!$val) {
        }
    }
    echo output($data);
    exit(0);
}
开发者ID:Steadroy,项目名称:Dashboard,代码行数:43,代码来源:ajax.php

示例5: getCompleteEvents

function getCompleteEvents()
{
    $data = array();
    $connection = new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE);
    // Get events in the future
    $events = getEvents();
    // For each one of these events
    foreach ($events as $event) {
        $pricegroups = array();
        // Get its id
        $eId = $event['id'];
        // Get its genre id
        $genreid = $event['fk_genre_id'];
        // Select the pricgroups of it in veranstaltung_hat_preisgruppe table
        $result = $connection->query("SELECT fk_preisgruppe_id FROM veranstaltung_hat_preisgruppe WHERE fk_veranstaltung_id = '{$eId}'");
        // Save all foreign keys from query in array
        while ($row = $result->fetch_assoc()) {
            $pricegroups[] = $row;
        }
        // Get for each foreign key the pricegroup
        $finalpricegroups = array();
        foreach ($pricegroups as $pricegroup) {
            $id = $pricegroup['fk_preisgruppe_id'];
            $pricegrouplines = $connection->query("SELECT * FROM preisgruppe WHERE ID = '{$id}'");
            while ($row = $pricegrouplines->fetch_assoc()) {
                $finalpricegroups[] = $row;
            }
        }
        // Get the genre from the id
        $genreresult = $connection->query("SELECT * FROM genre WHERE id = '{$genreid}'");
        $genre = $genreresult->fetch_assoc();
        // Save everything into one big array
        $data[] = array("event" => $event, "pricegroups" => $finalpricegroups, "genre" => $genre);
    }
    return $data;
}
开发者ID:BRsmover,项目名称:Eventkalender,代码行数:36,代码来源:functions.php

示例6: trim

 <?php 
// EM Code starts here
$eventid = trim($_REQUEST['eventid']);
require "fn.cal.php";
$events = getEvents($eventid);
?>
  <html>
  <head>
<link rel="stylesheet" href="http://www.soundbooka.com/version1/webpublisher/css/layout.css" type="text/css" media="screen,projection" />
  <script type="text/javascript" language="javascript">
  function selsize()
		{		
			
			
			var check = document.getElementById('repeater').checked;
			if(check == true)
			{
				document.getElementById('RadioGroup1_0').disabled=false;
				document.getElementById('RadioGroup1_1').disabled=false;	
				document.getElementById('RadioGroup1_2').disabled=false;
				document.getElementById('radio_yearly').disabled=false;		
				document.getElementById('occurencetd').style.display ='block';	
			}
			else
			{
				document.getElementById('RadioGroup1_0').disabled=true;
				document.getElementById('RadioGroup1_1').disabled=true;
				document.getElementById('RadioGroup1_2').disabled=true;
				document.getElementById('radio_yearly').disabled=true;
				
				document.getElementById('RadioGroup1_0').checked =false;
开发者ID:nukem,项目名称:WorkSound,代码行数:31,代码来源:edit_calendar.php

示例7: getEvents

            </div>
            <!--/.nav-collapse --> 
          
        </div>
        <!--/.container-fluid -->

      </nav>
      <!-- /.navbar -->

    <div class="jumbotron">

      <!-- If event has a question -->
      <?php 
if (isset($_SESSION['firstname']) && $val > 0) {
    $i = 1;
    $eData = getEvents($eid);
    $rData = mysql_fetch_assoc($eData);
    echo "<h1><center>" . $rData['title'] . "</h1></center>";
    echo "<h3>" . $rData['description'];
    if ($rData['place'] != "") {
        echo "<br><br>Place: " . $rData['place'];
        if ($rData['date'] != "") {
            echo "<br>Date: " . $rData['date'];
        }
    }
    echo "<br><br>Lütfen bu etkinlikle ilgili fikirlerinizi belirtiniz: </h3>";
    ?>
      <br>
      
      <form id="formSurvey" action="survey_record.php?eid=<?php 
    echo $eid;
开发者ID:kaanburaksener,项目名称:bicycle-rent-app,代码行数:31,代码来源:survey.php

示例8: libraries_get_path

//we only have this here in order to have events-search.css
require 'events_functions.php';
$page = (int) $_POST['page'];
/**
 * Implements block_view_alter().
 * Adds events search filters, javascript to create array string, and manages showing previously selected elements
 * This is a bit tricky because we're using the apachesolr module to display the results and the url has to be
 * constructed in a particular way, so we have to hack the url slightly
 */
$vendorPath = libraries_get_path('vendor');
require "{$vendorPath}/solarium/solarium/bizusa_conf/init.php";
$client = new Solarium\Client($config);
if ($_POST['keyword'] == 'Search Events' || $_POSTs['applySubmit']) {
    $_POST['keyword'] = '';
}
$events = getEvents($client, $_POST, $page);
$eventsCount = $events->getNumFound();
if ($eventsCount === 0) {
    echo '
    <br/>
    <h3>There are no events matching your selected criteria.</h3>
    <br/>';
} else {
    echo "<div id='block-system-main' class='block block-system block-odd first last clearfix'>";
    echo "<div class='col-sm-12'>";
    $count = 0;
    foreach ($events as $event) {
        // the documents are also iterable, to get all fields
        $event = node_load($event['entity_id']);
        include 'event-result.tpl.php';
    }
开发者ID:hosttor,项目名称:BusinessUSA-OpenSource,代码行数:31,代码来源:.page.php

示例9: getEvents

<?php

require MODELES . 'events/getEventDetails.php';
require MODELES . 'membres/checkUsed.php';
require MODELES . 'events/insertInvite.php';
require MODELES . 'membres/getUserAuth.php';
require MODELES . 'events/checkParticipation.php';
$event = getEvents($_GET['id']);
$expediteur = $_SESSION['id'];
$contents['titreEvenement'] = $event['titre'];
$title = "Inviter un ami à l'évènement " . $contents['titreEvenement'];
$styles = ['events.css', 'form.css'];
$blocks = ['invite'];
if (connected()) {
    if (empty($_POST)) {
        ///Si le bloc est vide///
        vue($blocks, $styles, $title, $contents);
    } else {
        $destinataire = getUserAuth($_POST['destinataire']);
        if (!checkUsed($_POST['destinataire'], NULL)) {
            ///si le pseudo n'existe pas///
            alert('error', 'Le pseudo renseigné n\'est pas valide !');
            vue($blocks, $styles, $title, $contents);
        } else {
            if ($expediteur === $destinataire[0]) {
                alert('error', 'Vous ne pouvez pas vous inviter vous-même !');
                vue($blocks, $styles, $title, $contents);
            } else {
                ///On récupère l'ID du pseudo rentré et on fait l'insertion en BDD///
                insertInvite($expediteur, $_GET['id'], $destinataire['id']);
                alert('info', 'Votre message a bien été envoyé !');
开发者ID:aurelienshz,项目名称:g1a,代码行数:31,代码来源:invite.php

示例10: define

if (!defined('GLOBAL_PATH')) {
    define('GLOBAL_PATH', '../../../../');
}
if (!defined('ROOT_PATH')) {
    define('ROOT_PATH', '../../../');
}
if (!defined('CURRENT_CATEGORY')) {
    define('CURRENT_CATEGORY', 'athletica_tech');
}
if (!defined('CURRENT_PAGE')) {
    define('CURRENT_PAGE', 'results');
}
require_once ROOT_PATH . 'lib/inc.init.php';
require_once ROOT_PATH . 'lib/cls.result_tech.php';
$events = getEvents(CFG_CURRENT_MEETING, CFG_CURRENT_EVENT);
$type = $glb_types_results[$events['disc_type']];
$wind = $events['event_wind'];
$result_id = $_GET['result'];
$athlete_id = $_GET['athlete'];
$attempt = $_GET['attempt'];
$result = getResult($result_id);
$athlete = getAthleteDetails($athlete_id, false, 'ath_pos', 0, true);
?>
<script type="text/javascript">
    $(document).ready(function(){
        $('button').button();
        
         $('#result_edit_result, #result_edit_wind').keyup(function(){
            validate();   
        });
开发者ID:laiello,项目名称:athletica,代码行数:30,代码来源:dialog_edit_input.php

示例11: main


//.........这里部分代码省略.........
            } else {
                $display = $received;
                $display->error_message = "現在、登録ができません。";
                // 				include_once('page-templates/page-stage-input.tpl');
                // 				return;
            }
        }
    } else {
        if (isset($_GET["stage_id"]) && is_numeric($_GET["stage_id"])) {
            $display = (object) array();
            $display->is_update = true;
            // 変更画面であることを示す
            $stageId = $_GET["stage_id"];
            // リビジョンを指定する
            $revision = -1;
            if (isset($_GET['revision']) && is_numeric($_GET['revision'])) {
                $revision = intval($_GET['revision']);
            }
            // 公演情報取得
            $stageInfos = getStageDetail($stageId, $revision);
            if ($stageInfos != null && count($stageInfos) > 0) {
                $stageInfo = $stageInfos[0];
                $display->stage_id = $stageInfo->stage_id;
                $display->revision = $stageInfo->revision;
                // 公演日
                $display->stage_date = $stageInfo->stage_date;
                // チーム
                $display->stage_team = $stageInfo->team_id;
                // その日の回数
                $display->stage_time = array(0 => $stageInfo->stage_time);
                // 公演
                $display->stage_program = $stageInfo->program_id;
                // シャッフル?
                $display->stage_shuffled = $stageInfo->is_shuffled == 1;
                // 非公式か?
                $display->stage_unofficial = $stageInfo->is_unofficial == 1;
                // 出演メンバー
                $display->memberNameList = array();
                if (isset($stageInfo->memberList)) {
                    foreach ($stageInfo->memberList as $member) {
                        $display->memberNameList[] = $member->member_name;
                    }
                }
                // 関連リンク
                $display->linkStringList = array();
                if (isset($stageInfo->linkList)) {
                    foreach ($stageInfo->linkList as $link) {
                        $display->linkStringList[] = $link->link;
                    }
                }
                // イベント
                $display->stage_events = array();
                if (isset($stageInfo->eventMemberList) && count($stageInfo->eventMemberList) > 0) {
                    $i = 1;
                    foreach ($stageInfo->eventMemberList as $eventMember) {
                        $display->stage_events[] = (object) array('event_id' => $eventMember->event_id, 'member_id' => $eventMember->member_id);
                    }
                }
                // コメント
                // 				$display->stage_comment = array();
                $display->stage_comment = "";
                // 				foreach ($stageInfo->commentList as $comment) {
                // 					if ($comment != "") {
                // 						$display->stage_comment[] = $comment;
                // 					}
                // 				}
                if (count($stageInfo->commentList) > 0) {
                    $display->stage_comment = $stageInfo->commentList[0]->comment;
                }
            } else {
                $display->stage_date = getSqlNowDate();
                $display->revision = 0;
                $display->error_message = "該当する公演が見つかりません。";
            }
        } else {
            // 入力画面初期表示
            // 			// 日付が指定されていた場合は、その日の編集を行う
            // 			if (isset($_GET["stage_date"]) && $_GET["stage_date"] != "")
            // 			{
            // 				$display = (object) array();
            // 				$display->stage_date = $_GET["stage_date"];
            // 			}
            // デフォルトで、ダブルチェックが必要である旨のチェックをつけておく
            $display->stage_unofficial = true;
            $display->revision = 0;
            $display->stage_time[] = 1;
            if (!$isLogined) {
                $display->error_message = "現在、公演の登録・更新にはログインが必要です。";
            }
        }
    }
    // 前後の公演
    $display->previousStage = getPreviousStage(!empty($display->stage_id) ? $display->stage_id : 0, $display->stage_date);
    $display->nextStage = getNextStage(!empty($display->stage_id) ? $display->stage_id : 0, $display->stage_date);
    // イベントリスト
    $display->eventInfoList = getEvents();
    // メンバーリスト
    $display->memberInfoList = getMembers($display->stage_date);
    return $display;
}
开发者ID:tatakauashi,项目名称:meiteampower,代码行数:101,代码来源:page-stage-register.php

示例12: getEvents

<?php

$events = getEvents(1);
foreach ($events as $event) {
    $month = date("F", $event->eventDateInt);
    $day = date("d", $event->eventDateInt);
    ?>
<span class="myriad_pro_bold_condensed sidebarheader">Philippine Festival</span>
<div class="calendar">
	<div class="calendarbg">
		<span class="month myriad_pro_bold_condensed"><?php 
    echo $month;
    ?>
</span>
		<span class="date myriad_pro_bold_condensed"><?php 
    echo $day;
    ?>
</span>
	</div>
	<div class="calendardetails">
		<strong class="calendartitle"><?php 
    echo $event->titleOfActivity;
    ?>
</strong>
		<?php 
    echo $event->activityTags;
    ?>
		<div class="desc">
			<?php 
    echo stripcslashes($event->descriptionOfActivity);
    ?>
开发者ID:0x27,项目名称:Philippine-Tourism,代码行数:31,代码来源:festival_calendar.php

示例13: getParamGET

    $statement->execute();
    $gameSession = $statement->fetchAll(PDO::FETCH_ASSOC)[0];
    if (!empty($gameSession)) {
        return $gameSession['occupied'] !== '0' ? 'occupied' : 'unoccupied';
    }
    return "not found";
}
$value = "An error has occurred";
$action = getParamGET('action');
if ($action) {
    switch ($action) {
        case "creategame":
            $value = createGame($db);
            break;
        case "joingame":
            $value = joinGame($db);
            break;
        case "addevent":
            $value = addEvent($db);
            break;
        case "getevents":
            $value = getEvents($db);
            break;
        case "getoccupied":
            $value = getOccupied($db);
            break;
        default:
            $value = "unknown command";
    }
}
echo $value;
开发者ID:tatuhuttunen,项目名称:fgj2016backend,代码行数:31,代码来源:api.php

示例14: getEvents

<!DOCTYPE html>
<html lang="tr-TR">

<?php 
include 'functions.php';
include 'connectdb.php';
$id = $_GET["id"];
$eventsdb = getEvents($id);
$events = mysql_fetch_array($eventsdb);
?>

<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="assets/img/ico/favicon.png">
	<title>Etkinlik Detayı - İzmir Üniversitesi Mezun Bilgi Sistemi</title>

	<!-- Bootstrap core CSS -->

	<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

	<!-- Custom styles for this template -->

	<link href="assets/css/app.css" rel="stylesheet">
	<link href="assets/css/responsive.css" rel="stylesheet">
	<link href='http://fonts.googleapis.com/css?family=Open+Sans&subset=latin,latin-ext' rel='stylesheet' type='text/css'>

	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
开发者ID:kaanburaksener,项目名称:bicycle-rent-app,代码行数:31,代码来源:event.php

示例15: switch

<?php

/*
 * Function requested by Ajax
 */
if (isset($_POST['func']) && !empty($_POST['func'])) {
    switch ($_POST['func']) {
        case 'getCalender':
            getCalender($_POST['year'], $_POST['month']);
            break;
        case 'getEvents':
            getEvents($_POST['date']);
            break;
        default:
            break;
    }
}
/*
 * Get calendar full HTML
 */
function getCalender($year = '', $month = '')
{
    $dateYear = $year != '' ? $year : date("Y");
    $dateMonth = $month != '' ? $month : date("m");
    $date = $dateYear . '-' . $dateMonth . '-01';
    $currentMonthFirstDay = date("N", strtotime($date));
    $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN, $dateMonth, $dateYear);
    $totalDaysOfMonthDisplay = $currentMonthFirstDay == 7 ? $totalDaysOfMonth : $totalDaysOfMonth + $currentMonthFirstDay;
    $boxDisplay = $totalDaysOfMonthDisplay <= 35 ? 35 : 42;
    ?>
	<div id="calender_section">
开发者ID:agesaputra,项目名称:PPKP,代码行数:31,代码来源:functions.php


注:本文中的getEvents函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。