本文整理汇总了PHP中event::outputEventListSingle方法的典型用法代码示例。如果您正苦于以下问题:PHP event::outputEventListSingle方法的具体用法?PHP event::outputEventListSingle怎么用?PHP event::outputEventListSingle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类event
的用法示例。
在下文中一共展示了event::outputEventListSingle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OutputEventList
public static function OutputEventList($eventlistSelect = "", $showForm = true, $eventlistDisplayinfo = "")
{
// -----------------------
// Execution preceded by call in document->buildConfigOfPageUpdate():
//
// if (isset($_REQUEST["eventlist_select"])) {
// $this->setConfig("url",functions::callMethod("event","lib/event","getEventListUrl"));
// }
//
// followed by possible redirect to approporiate page.
// Any other 'eventlist*' GPC data are stored in session variables.
// -----------------------
$allowed = array("eventlist_select" => array("a" => array("label" => "All events", "hline" => "Event", "etype" => array("", "program", "workshop", "conference", "meeting", "school"), "xtra" => array("lbe2012")), "p" => array("label" => "Programs", "hline" => "Program", "etype" => array("program"), "xtra" => array("")), "v" => array("label" => "Workshops, Conferences, Meetings", "hline" => "Workshop, Conference, or Meeting", "etype" => array("workshop", "conference", "meeting"), "xtra" => array("")), "s" => array("label" => "Schools", "hline" => "School", "etype" => array("school"), "xtra" => array("lbe2012"))), "eventlist_displayinfo" => array("f" => "Full", "m" => "Medium", "b" => "Brief"), "eventlist_period" => array("a" => "All", "f" => "Current & Future"));
// -----------------------------------
// GPC input
// -----------------------------------
if (!isset($_REQUEST["eventlist_select"]) && in_array($eventlistSelect, array_keys($allowed["eventlist_select"]))) {
$GLOBALS["eventlist_select"] = $eventlistSelect;
} else {
functions::gpc_declare_input("eventlist_select", "a", false, array_keys($allowed["eventlist_select"]), true);
// must read from SESSION
}
if (!empty($eventlistDisplayinfo) && empty($_REQUEST["eventlist_displayinfo"])) {
$_REQUEST["eventlist_displayinfo"] = $eventlistDisplayinfo;
}
functions::gpc_declare_input("eventlist_displayinfo", "f", false, array_keys($allowed["eventlist_displayinfo"]), true);
// must read from SESSION
functions::gpc_declare_input("eventlist_period", "a", false, array_keys($allowed["eventlist_period"]), true);
// must read from SESSION
// -----------------------------------
// -- Obtain Data
// -----------------------------------
if (in_array($GLOBALS["eventlist_displayinfo"], array("m", "b"))) {
$eventArray = self::getEventByTime();
} else {
$eventArray = self::getEventByNow();
}
// -----------------------------------
// -- Output Error if No Events Found
// -----------------------------------
if (empty($eventArray)) {
return "<p class='box error padding background'><strong>» ERROR:</strong> <em>No events found</em>." . (isset($GLOBALS["nw_debug"]["fromcache_get"]) ? " [" . $GLOBALS["nw_debug"]["fromcache_get"] . "]" : "") . "</p>\r\n\r\n";
}
// -----------------------------------
// -- Construct Poster Link
// -----------------------------------
$posterlink = "";
//TODO: seems logical links won't do here
//$posterfilename = PATH_DOCS . "/nordita_programs_presentation.pdf";
//$posterfilename = PATH_DOCS . "/nordita_programs_presentation_2015_A3.pdf";
$posterfilename = self::getProgramPosterPath();
if (file_exists(INCLEVEL . $posterfilename)) {
$posterlink = "<div class='only_online bold' style='width:100%;text-align:right;margin-bottom:1em;'><a href='" . $posterfilename . "'>Download Nordita Events Poster</a></div>\r\n";
}
// -----------------------------------
// -- Construct Menu
// -----------------------------------
if (!$showForm) {
$menutxt = "";
} else {
$menutxt = " <form id='selectmenu' " . "action='" . $GLOBALS["documentClass"]->getPagePath() . "/index.php' " . "method='post' class='only_online'>\r\n" . " <table>\r\n" . " <tr>\r\n" . " <td>\r\n" . " <div class='input shadow-whiteinset'>" . "<span>Show:</span>\r\n";
//"<span>Show events:</span>\r\n";
foreach ($allowed["eventlist_select"] as $key => $value) {
$menutxt .= " <input type='radio' name='eventlist_select' value='" . $key . "'" . ($GLOBALS["eventlist_select"] == $key ? " checked" : "") . "> " . $value["label"] . "\r\n";
}
$menutxt .= " </div>\r\n" . " </td>\r\n" . " <td colspan='2'>\r\n" . " <div>\r\n" . " <input type='submit' value='Select' style='font-size:1.2em!important'>\r\n" . " <input type='hidden' name='eventlist' value='1'>\r\n" . " </div>\r\n" . " </td>\r\n" . " </tr>\r\n" . " <tr>\r\n" . " <td class='align-right'>\r\n" . " <div class='input shadow-whiteinset'>" . "<span>Info:</span>\r\n";
//"<span>Display information:</span>\r\n";
foreach ($allowed["eventlist_displayinfo"] as $key => $value) {
$menutxt .= " <input type='radio' name='eventlist_displayinfo' value='" . $key . "'" . ($GLOBALS["eventlist_displayinfo"] == $key ? " checked" : "") . "> " . $value . "\r\n";
}
$menutxt .= " </div>\r\n" . " <div class='input shadow-whiteinset'>" . "<span>Period:</span>\r\n";
//"<span>Display information:</span>\r\n";
foreach ($allowed["eventlist_period"] as $key => $value) {
$menutxt .= " <input type='radio' name='eventlist_period' value='" . $key . "'" . ($GLOBALS["eventlist_period"] == $key ? " checked" : "") . "> " . $value . "\r\n";
}
$menutxt .= " </div>\r\n" . " </td>\r\n" . " </tr>\r\n" . " </table>\r\n" . " </form>\r\n" . "\r\n";
}
// -----------------------------------
// -- If 'medium' or 'brief' output has been requested
// -----------------------------------
if (in_array($GLOBALS["eventlist_displayinfo"], array("b", "m"))) {
$medium = $GLOBALS["eventlist_displayinfo"] == "m" ? true : false;
$stdout = "";
$year = 0;
// numeric zero
foreach ($eventArray as $key => $darray) {
if ($key != "past" || $GLOBALS["eventlist_period"] == "a") {
foreach ($darray as $events) {
foreach ($events as $thisevent) {
if (in_array($thisevent["eventtype"], $allowed["eventlist_select"][$GLOBALS["eventlist_select"]]["etype"])) {
if ($medium && substr($thisevent["startdate"], 0, 4) != $year) {
$year = substr($thisevent["startdate"], 0, 4);
$stdout .= " <h3 class='program'>" . $year . "</h3>\r\n" . "\r\n";
}
$stdout .= event::outputEventListSingle($thisevent, "", "", 1, 1, 0, $medium);
}
}
}
}
}
//.........这里部分代码省略.........