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


PHP getEvent函数代码示例

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


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

示例1: showEventBrief

function showEventBrief($idEvent, $showRelationship = true)
{
    if (!isUserLoggedIn()) {
        throw new RuntimeException("You need to be logged in.");
    }
    if (!canSeeEvent($_SESSION["userid"], $idEvent)) {
        throw new RuntimeException("You do not have access to this event.");
    }
    $event = getEvent($idEvent);
    $canEdit = isUserLoggedIn() && $event["owner"] === getUserID();
    echo '<div class="event_brief" id="event' . $idEvent . '">';
    echo '<div class="name"><a href="view_event.php?id=' . $idEvent . '">';
    echo '<h2>' . htmlspecialchars($event["name"]) . '</h2>';
    echo '</a></div>';
    if ($showRelationship) {
        if ($canEdit) {
            echo '<div class="owner"></div>';
        } else {
            if (isUserRegisteredInEvent(getUserID(), $idEvent)) {
                echo '<div class="registered"></div>';
            } else {
                echo '<div class="not_registered"></div>';
            }
        }
    }
    echo '<img src="database/event_image.php?id=' . $idEvent . '" alt="' . htmlspecialchars($event["name"]) . '" width="64" height="64" />';
    echo '<div class="description">';
    echo '<p class="description">' . htmlspecialchars($event["description"]) . '</p>';
    echo '</div>';
    echo '<datetime>' . htmlspecialchars($event["date"]) . '</datetime>';
    echo '</div>';
}
开发者ID:andrelago13,项目名称:LTW,代码行数:32,代码来源:view_event_brief.php

示例2: getMeeting

function getMeeting($u_ID, $year, $level)
{
    $query = mysql_query("select distinct meeting.meeting from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.year = '{$year}' order by meeting.meeting asc");
    while ($ans = mysql_fetch_array($query)) {
        if ($level > 1) {
            getEvent($ans['meeting'], $u_ID, $level);
        }
    }
}
开发者ID:nmzfrank,项目名称:LaPitto,代码行数:9,代码来源:export.php

示例3: showResults

function showResults()
{
    #----------------------------------------------------------------------
    global $chosenEventId, $chosenRegionId, $chosenYears, $chosenShow, $chosenSingle, $chosenAverage;
    #--- Try the cache
    tryCache('event', $chosenEventId, preg_replace('/ /', '', $chosenRegionId), $chosenYears, preg_replace('/ /', '', $chosenShow), $chosenSingle, $chosenAverage);
    #------------------------------
    # Prepare stuff for the query.
    #------------------------------
    $eventCondition = eventCondition();
    $yearCondition = yearCondition();
    $regionCondition = regionCondition('result');
    $limitCondition = '';
    if (preg_match('/^10+/', $chosenShow, $matches)) {
        $limitNumber = $matches[0];
        $limitCondition = 'LIMIT ' . 2 * $limitNumber;
    }
    $valueSource = $chosenAverage ? 'average' : 'best';
    $valueName = $chosenAverage ? 'Average' : 'Single';
    #------------------------------
    # Get results from database.
    #------------------------------
    if ($chosenShow == 'By Region') {
        require 'includes/events_regions.php';
        return;
    }
    if ($chosenShow == '100 Results' || $chosenShow == '1000 Results') {
        require 'includes/events_results.php';
    } else {
        require 'includes/events_persons.php';
    }
    #------------------------------
    # Show the table.
    #------------------------------
    startTimer();
    $event = getEvent($chosenEventId);
    tableBegin('results', 6);
    tableCaption(true, spaced(array($event['name'], chosenRegionName(), $chosenYears, $chosenShow)));
    $headerSources = $chosenAverage ? 'Result Details' : '';
    tableHeader(explode('|', "Rank|Person|Result|Citizen of|Competition|{$headerSources}"), array(0 => "class='r'", 2 => "class='R2'", 5 => 'class="f"'));
    $ctr = 0;
    foreach ($results as $result) {
        extract($result);
        $ctr++;
        $no = isset($previousValue) && $value == $previousValue ? '&nbsp;' : $ctr;
        if ($limitCondition && $no > $limitNumber) {
            break;
        }
        tableRow(array($no, personLink($personId, $personName), formatValue($value, $event['format']), htmlEntities($countryName), competitionLink($competitionId, $competitionName), formatAverageSources($chosenAverage, $result, $event['format'])));
        $previousValue = $value;
    }
    tableEnd();
    stopTimer("printing the table");
}
开发者ID:FatBoyXPC,项目名称:worldcubeassociation.org,代码行数:54,代码来源:events.php

示例4: ajax

/**
 * Created by PhpStorm.
 * User: andry
 * Date: 13.01.16
 * Time: 16:48
 */
function ajax()
{
    switch ($_GET['action']) {
        case 'getEvent':
            $arr = getEvent();
            echo $arr;
            break;
        default:
            break;
    }
}
开发者ID:SHshzik,项目名称:bg.imperiya63.ru,代码行数:17,代码来源:ajax.php

示例5: getMeeting

function getMeeting($u_ID, $year, $level)
{
    $query = mysql_query("select distinct meeting.meeting from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.year = '{$year}'");
    while ($ans = mysql_fetch_array($query)) {
        echo "<div style='border:1px solid #000;padding:5px 15px;margin-top:5px'>";
        echo "<h3 style='margin:10px'>" . $year . "-第" . $ans['meeting'] . "次校长办公会" . "</h3>";
        if ($level > 1) {
            getEvent($ans['meeting'], $u_ID, $level);
        }
        echo "</div>";
    }
}
开发者ID:nmzfrank,项目名称:LaPitto,代码行数:12,代码来源:previewByLeader.php

示例6: find

 public static function find($id)
 {
     $event_query = getEvent($id);
     $event = new Event();
     $event->setId($event_query["id"]);
     $event->setDate($event_query["date"]);
     $event->setDescription($event_query["description"]);
     $event->setName($event_query["name"]);
     $event->setPublic($event_query["public"]);
     $event->setOwner($event_query["owner"]);
     $event->setImagePath($event_query["imagePath"]);
     return $event;
 }
开发者ID:andrelago13,项目名称:LTW,代码行数:13,代码来源:events.php

示例7: getMeeting

function getMeeting($u_ID, $year, $level)
{
    $query = mysql_query("select distinct meeting.meeting from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.year = '{$year}'");
    while ($ans = mysql_fetch_array($query)) {
        echo "<tr>";
        echo "<td colspan='11'>";
        echo "<h3 style='margin:10px'>" . $year . "-第" . $ans['meeting'] . "次校长办公会" . "</h3>";
        if ($level > 1) {
            getEvent($ans['meeting'], $u_ID, $level);
        }
        echo "</td>";
        echo "</tr>";
    }
}
开发者ID:nmzfrank,项目名称:LaPitto,代码行数:14,代码来源:previewByMeeting.php

示例8: getMeeting

function getMeeting($u_ID, $year, $level)
{
    $query = mysql_query("select distinct meeting.meeting,meeting.m_ID from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.year = '{$year}' order by meeting.meeting asc");
    while ($ans = mysql_fetch_array($query)) {
        $result = getMeetingCompletion($ans['m_ID']);
        $mid = $ans['m_ID'];
        echo "<tr>";
        echo "<td><div class='container-fluid'><div class='row'>";
        echo "<div class='col-lg-12 lv-meeting' style='background-color:rgb(128,185,188); border-radius:0.5em; padding:5px;'><span style='font-size:1.5em;'>" . $year . "-第" . $ans['meeting'] . "次校长办公会" . "</span><span class='pull-right' style='padding:5px;'>实际完成率:{$result['0']}%;&nbsp;&nbsp;&nbsp;参考完成率: {$result['1']}%;</span></div>";
        getEvent($ans['meeting'], $u_ID, $level);
        echo "</div></div></td>";
        echo "</tr>";
    }
}
开发者ID:nmzfrank,项目名称:LaPitto,代码行数:14,代码来源:reloadTable.php

示例9: showEventDetails

function showEventDetails()
{
    $EventID = $_GET['EventID'];
    if (!isset($EventID)) {
        $errorMessage = 'You must provide an EventID to display.';
        include '../view/404.php';
    } else {
        $row = getEvent($EventID);
        if ($row == FALSE) {
            $errorMessage = 'No event was found.';
            include '../view/404.php';
        } else {
            include '../view/eventDetails.php';
        }
    }
}
开发者ID:Haikere,项目名称:CuThere,代码行数:16,代码来源:controller.php

示例10: g_cal_updateEvent

function g_cal_updateEvent($client, $eventEditUrl, $title = '', $desc = '', $where = '', $startDate = '', $endDate = '')
{
    $gdataCal = new Zend_Gdata_Calendar($client);
    if ($eventOld = $gdataCal->getEvent($eventId)) {
        echo "Old title: " . $eventOld->title->text . "<br />\n";
        $eventOld->title = $gdataCal->newTitle($newTitle);
        try {
            $eventOld->save();
        } catch (Zend_Gdata_App_Exception $e) {
            var_dump($e);
            return null;
        }
        $eventNew = getEvent($client, $eventId);
        echo "New title: " . $eventNew->title->text . "<br />\n";
        return $eventNew;
    } else {
        return null;
    }
}
开发者ID:evanhsu,项目名称:siskiyourappellers,代码行数:19,代码来源:g_calendar_functions.php

示例11: session_start

<?php

session_start();
include_once "database/events.php";
$id = $_GET['id'];
$event = getEvent($id);
if (isset($_SESSION['username'])) {
    if ($_SESSION['username'] == 'admin' || $_SESSION['username'] == $event['creator']) {
        deleteEvent($id, $_SESSION['username']);
    }
}
header('Location: ' . './list_events.php');
开发者ID:quartz55,项目名称:LTW_classes,代码行数:12,代码来源:action_delete_event.php

示例12: register

     $out = register($_POST['email'], $_POST['password'], $_POST['nickname']);
     break;
 case 'getRowById':
     $out = getRowById($_POST['table'], $_POST['id']);
     break;
 case 'getRowByColumn':
     $out = getRowByColumn($_POST['table'], $_POST['source_column'], $_POST['value']);
     break;
 case 'getColumnByColumn':
     $out = getColumnByColumn($_POST['table'], $_POST['source_column'], $_POST['value'], $_POST['returned_column']);
     break;
 case 'addEvent':
     $out = addEvent($_POST['id_sport'], $_POST['id_location'], $_POST['date'], $_POST['time'], $_POST['description'], $_POST['id_user']);
     break;
 case 'getEvent':
     $out = getEvent($_POST['id_sport'], $_POST['id_location'], $_POST['date']);
     break;
 case 'getHistoryForPlayer':
     $out = getHistoryForPlayer($_POST['id_user']);
     break;
 case 'getUpcomingEvents':
     $out = getUpcomingEvents($_POST['id_user']);
     break;
 case 'getEventBySportName':
     $out = getEventBySportName($_POST['name_sport'], $_POST['name_location'], $_POST['date']);
     break;
 case 'getNewEventsForUser':
     $out = getNewEventsForUser($_POST['id_user']);
     break;
 case 'updateChatForEvent':
     $out = updateChatForEvent($_POST['id_event'], $_POST['chat']);
开发者ID:JacekKarwas,项目名称:projektPZ,代码行数:31,代码来源:index.php

示例13: catch

    $authenticatedMachines = $stmt->fetchAll();
    return $authenticatedMachines;
}
$sanitizer = Sanitizer::getInstance();
$username = $sanitizer->filterString('username');
$password = $sanitizer->filterString('password');
$isStaff = $sanitizer->filterString('fullrequest');
try {
    Session::checkCredentials($username, $password);
    $user = User::getUser($username);
} catch (\libAllure\UserNotFoundException $e) {
    apiReturn('reject-authentication', 'User not found');
} catch (\libAllure\IncorrectPasswordException $e) {
    apiReturn('reject-authentication', 'Password is incorrect');
}
$event = getEvent();
$signupStatus = getSignupStatus($user->getId(), $event['id']);
switch ($signupStatus) {
    case 'PAID':
        $authenticatedMachines = getAuthenticatedMachines($user->getId(), $event['id']);
        $sql = 'SELECT s.numberMachinesAllowed FROM signups s WHERE s.user = :user AND s.event = :event';
        $stmt = DatabaseFactory::getInstance()->prepare($sql);
        $stmt->bindValue(':user', $user->getId());
        $stmt->bindValue(':event', $event['id']);
        $stmt->execute();
        $signup = $stmt->fetchRowNotNull();
        if (count($authenticatedMachines) >= $signup['numberMachinesAllowed']) {
            apiReturn('reject-overuse');
        } else {
            $sql = 'INSERT INTO authenticated_machines (user, event, seat, ip, hostname, mac) VALUES (:user, :event, :seat, :ip, :hostname, :mac)';
            $stmt = DatabaseFactory::getInstance()->prepare($sql);
开发者ID:CWFranklin,项目名称:lan-party-site,代码行数:31,代码来源:machineAuthentication.php

示例14: getParameters

         //RESPONSE \"([[:ascii:]]+?)\" \"([[:ascii:]]+?)\"
         $F = getParameters($front);
         $D = getParameters($data);
         $State['IdArray_Token'] = $D[0];
         $State['IdArray_base64'] = $D[1];
         $State['IdArray'] = unpack("N*", base64_decode($D[1]));
         $musicDB = new MusicDB();
         CheckPlaylist($musicDB);
         $musicDB->close();
     }
     Send("");
     $DataHandled = true;
 } elseif (strpos($data, "EVENT ") !== false) {
     // EVENTs are sent by Your linn - those that were subscribed
     // to. We think the below ones are interesting....
     $E = getEvent($data);
     if (strpos($data, "EVENT " . $SubscribeType['Ds/Product']) !== false) {
         if (strpos($data, "SourceIndex ") !== false) {
             $State['SourceIndex'] = $E[SourceIndex];
         }
         if (strpos($data, "ProductModel ") !== false) {
             $State['ProductModel'] = $E[ProductModel];
         }
         if (strpos($data, "ProductName ") !== false) {
             $State['ProductName'] = $E[ProductName];
         }
         if (strpos($data, "ProductRoom ") !== false) {
             $State['ProductRoom'] = $E[ProductRoom];
         }
         if (strpos($data, "ProductType ") !== false) {
             $State['ProductType'] = $E[ProductType];
开发者ID:HenrikTolboel,项目名称:LinnDS-jukebox,代码行数:31,代码来源:LinnDS-jukebox-daemon-old.php

示例15: http_response_code

require INCLUDES_PATH . "/edit_event_image_action.php";
try {
    if (!isset($_GET["id"])) {
        http_response_code(400);
        showError('Missing event ID.');
    } else {
        if (!isUserLoggedIn()) {
            http_response_code(403);
            showError('You need to login to view this event.');
        } else {
            if (!canSeeEvent($_SESSION["userid"], $_GET["id"])) {
                http_response_code(403);
                showError('You do not have access to this event.');
            } else {
                $idEvent = $_GET["id"];
                $event = getEvent($idEvent);
                $canEdit = isUserLoggedIn() && $event["owner"] === getUserID();
                echo '<div class="event" id="event' . $idEvent . '">';
                if ($canEdit) {
                    echo '<a href="delete_event.php?id=' . $idEvent . '&amp;csrf_token=' . rawurlencode($_SESSION['csrf_token']) . '" class="delete" id="delete_event" onclick="return confirm(\'Are you sure you want to delete this event?\');"><div alt="Delete Event"></div></a>';
                    $public = $event["public"];
                    if ($public) {
                        echo '<a href="change_event_privacy.php?id=' . $idEvent . '&action=0&csrf_token=' . rawurlencode($_SESSION['csrf_token']) . '" class="change_privacy public" id="change_privacy"><div alt="Change Event Privacy"></div><p class="description">Make me private</p></a>';
                    } else {
                        echo '<a href="change_event_privacy.php?id=' . $idEvent . '&action=1&csrf_token=' . rawurlencode($_SESSION['csrf_token']) . '" class="change_privacy private" id="change_privacy"><div alt="Change Event Privacy"></div><p class="description">Make me public</p></a>';
                    }
                    echo '<div class="registration owner"></div>';
                    echo '<form class="invite_user" action="invite_user.php" method="get">';
                    echo '<input type="hidden" name="csrf_token" value="' . $_SESSION['csrf_token'] . '" />';
                    echo '<input type="hidden" name="idEvent" value="' . $idEvent . '" />';
                    echo '<input type="text" value="" placeholder="Invite user" name="invited_username" required/>';
开发者ID:andrelago13,项目名称:LTW,代码行数:31,代码来源:view_event.php


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