當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Dao::getEvent方法代碼示例

本文整理匯總了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;
開發者ID:LinkofOrigin,項目名稱:DestinySherpaGroups,代碼行數:16,代碼來源:deleteevent.php

示例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"]) {
開發者ID:LinkofOrigin,項目名稱:DestinySherpaGroups,代碼行數:30,代碼來源:details.php


注:本文中的Dao::getEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。