本文整理汇总了PHP中Dao::getEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Dao::getEvent方法的具体用法?PHP Dao::getEvent怎么用?PHP Dao::getEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dao
的用法示例。
在下文中一共展示了Dao::getEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Dao
<?php
session_start();
require_once "Dao.php";
date_default_timezone_set("UTC");
$dao = new Dao();
$row = $dao->getLogin();
if (!$row) {
header("Location: details.php?id={$_GET["id"]}");
}
$event = $dao->getEvent($_GET["id"]);
if ($row["user_id"] === $event["sherpa"]) {
$dao->deleteEvent($_GET["id"]);
}
header("Location: index.php");
exit;
示例2: Dao
<script src="js/jquery.js"></script>
<script src="js/script.js"></script>
<script src="js/details.js"></script>
</head>
<?php
session_start();
include "timezone.php";
date_default_timezone_set("UTC");
require_once "Dao.php";
$here = "details.php?id={$_GET["id"]}";
$dao = new Dao();
$loggedInUser = $dao->getLogin();
$eventID = $_GET["id"];
$event = $dao->getEvent($eventID);
$sherpa = $dao->getUser($event["sherpa"]);
$activity = $dao->getActivity($event["activity"]);
$sherpaName = $sherpa["username"];
$sherpaAbout = $sherpa["about"];
$console = $event["console"];
$activityName = $activity["name"];
$eventStart = date_format(date_create($event['start']), 'M. d - g:i A');
$eventOther = $event["other"];
$open = "- Open -";
$guardians = array(1 => $sherpaName, 2 => $open, 3 => $open, 4 => $open, 5 => $open, 6 => $open);
$partOfGroup = false;
$i = 2;
$eventUsers = $dao->getEventUsers($eventID);
foreach ($eventUsers as $user) {
if ($user["user"] !== $sherpa["id"]) {