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


PHP DBAccess::getEventByEventID方法代码示例

本文整理汇总了PHP中DBAccess::getEventByEventID方法的典型用法代码示例。如果您正苦于以下问题:PHP DBAccess::getEventByEventID方法的具体用法?PHP DBAccess::getEventByEventID怎么用?PHP DBAccess::getEventByEventID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBAccess的用法示例。


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

示例1:

<?php

require './security.php';
include_once '../scripts/DBAccess.php';
$eventID = $_GET['eventID'];
$eventErrorText = "";
if (!is_numeric($_GET['eventID'])) {
    die;
}
$event = DBAccess::getEventByEventID($eventID);
$title = $event[0]['EventName'];
$head = '';
$content = "\n<h2 class=\"heading\">Event Details for: " . $event[0]['EventName'] . "</h2>\t\n<div style=\" clear:both;margin-top:20px;\" class=\"container\">\n<label class=\"formLabel\">Event Name</label>\n<label class=\"formField\">" . $event[0]['EventName'] . "</label>\n\n<label class=\"formLabel\">Date</label>\n<label class=\"formField\">" . $event[0]['EventDate'] . "</label>\n\n<label class=\"formLabel\">Time</label>\n<label class=\"formField\">" . $event[0]['EventTime'] . "</label>\n\n<label class=\"formLabel\" style=\"color:#" . $event[0]['EventColour'] . ";\">Colour</label>\n<label class=\"formField\" style=\"color:#" . $event[0]['EventColour'] . ";\">" . $event[0]['EventColour'] . "</label>\n\n<label class=\"formLabel\">Active</label>\n<label class=\"formField\">";
if (ord($event[0]['Active']) == 1) {
    $content .= "Y";
} else {
    $content .= "N";
}
$content .= "</label>\n\n<label class=\"formLabel\">Description</label>\n<p class=\"formField\">" . $event[0]['EventDescription'] . "</p>\n\n<label class=\"error\"></label>\n\t<span style=\"clear: left; display: block;\"></span>\n</div>\n\n<div style=\" clear:both;height:100px;margin-top:20px;\" class=\"container\">\n<form name=\"deleteevent\" action=\"deleteEvent.php?id=" . $eventID . "\" method=\"POST\" >\n<input type=\"submit\" value=\"Delete Entry\" class=\"formLabel\">\n</form>\n<form name=\"deleteevent\" action=\"editEvent.php?id=" . $eventID . "\" method=\"POST\" >\n<input type=\"submit\" value=\"Edit Entry\" class=\"formLabel\">\n</form>\n</div>\n";
require '../template/adminTemplate.php';
开发者ID:astrix37,项目名称:seqas,代码行数:20,代码来源:viewEvent.php

示例2: header

$eventColourErrorStyle = "";
$eType = "";
$eTypeErrorText = "";
$eventNameErrorStyle = "";
$eventActive = NULL;
$error = false;
$pattern = "([0-1][0-9]|2[0-3]):[0-5][0-9]";
/*
 *	Initial loading of page
 */
if ($_GET['id'] != null && $_POST['Submitted'] == null) {
    $targetEventID = $_GET['id'];
    if (!is_numeric($targetEventID)) {
        header("Location: ./index.php");
    } else {
        $result = DBAccess::getEventByEventID($targetEventID);
        $rows = count($result, 0);
        if ($rows != 1) {
            header("Location: ./index.php");
        } else {
            //valid
            $eventName = $result[0]['EventName'];
            $eventDescription = $result[0]['EventDescription'];
            $eventDate = $result[0]['EventDate'];
            $eventTime = $result[0]['EventTime'];
            $eventColour = $result[0]['EventColour'];
            $eventActive = ord($result[0]['Active']);
            $eventTypeID = $result[0]['ETypeID'];
        }
    }
    /*
开发者ID:astrix37,项目名称:seqas,代码行数:31,代码来源:editEvent.php


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