本文整理汇总了PHP中Poll::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Poll::select方法的具体用法?PHP Poll::select怎么用?PHP Poll::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poll
的用法示例。
在下文中一共展示了Poll::select方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dispMenu
function dispMenu($intSectionNum)
{
global $MAIN_ROOT, $LOGGED_IN, $mysqli, $shoutBoxPostLink, $shoutBoxDeleteLink, $shoutBoxEditLink, $arrShoutBoxIDs, $websiteInfo, $arrLoginInfo;
echo "<div id='menuSection_" . $intSectionNum . "'>";
$menuCatObj = new MenuCategory($mysqli);
$menuItemObj = new MenuItem($mysqli);
$customPageObj = new Basic($mysqli, "custompages", "custompage_id");
$customFormObj = new CustomForm($mysqli);
$downloadCatObj = new Basic($mysqli, "downloadcategory", "downloadcategory_id");
$memberObj = new Member($mysqli);
$pollObj = new Poll($mysqli);
if ($LOGGED_IN) {
$intMenuAccessType = 1;
} else {
$intMenuAccessType = 2;
}
$arrMenuCategories = $menuCatObj->getCategories($intSectionNum, $intMenuAccessType);
foreach ($arrMenuCategories as $menuCatID) {
$menuCatObj->select($menuCatID);
$menuCatInfo = $menuCatObj->get_info();
$arrMenuItems = $menuItemObj->getItems($menuCatInfo['menucategory_id'], $intMenuAccessType);
if ($menuCatInfo['headertype'] == "image") {
echo "<img src='" . $MAIN_ROOT . $menuCatInfo['headercode'] . "' class='menuHeaderImg'><br>";
} else {
$menuCatInfo['headercode'] = str_replace("[MAIN_ROOT]", $MAIN_ROOT, $menuCatInfo['headercode']);
$menuCatInfo['headercode'] = str_replace("[MEMBER_ID]", $arrLoginInfo['memberID'], $menuCatInfo['headercode']);
$menuCatInfo['headercode'] = str_replace("[MEMBERUSERNAME]", $arrLoginInfo['memberUsername'], $menuCatInfo['headercode']);
$menuCatInfo['headercode'] = str_replace("[MEMBERRANK]", $arrLoginInfo['memberRank'], $menuCatInfo['headercode']);
$menuCatInfo['headercode'] = str_replace("[PMLINK]", $arrLoginInfo['pmLink'], $menuCatInfo['headercode']);
echo $menuCatInfo['headercode'];
}
foreach ($arrMenuItems as $menuItemID) {
$menuItemObj->select($menuItemID);
$menuItemInfo = $menuItemObj->get_info();
$menuItemInfo['itemtype'] = $menuItemInfo['itemtype'] == "customcode" || $menuItemInfo['itemtype'] == "customformat" ? "customblock" : $menuItemInfo['itemtype'];
switch ($menuItemInfo['itemtype']) {
case "link":
$menuItemObj->objLink->select($menuItemInfo['itemtype_id']);
$menuLinkInfo = $menuItemObj->objLink->get_info();
$checkURL = parse_url($menuLinkInfo['link']);
if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) {
$menuLinkInfo['link'] = $MAIN_ROOT . $menuLinkInfo['link'];
}
echo "<div style='text-align: " . $menuLinkInfo['textalign'] . "'> " . $menuLinkInfo['prefix'] . "<a href='" . $menuLinkInfo['link'] . "' target='" . $menuLinkInfo['linktarget'] . "'>" . $menuItemInfo['name'] . "</a></div>";
break;
case "top-players":
$dispTopPlayers = unserialize(SPECIAL_MENU_ITEM);
echo $dispTopPlayers['top-players'];
break;
case "customform":
$menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']);
$menuCustomFormInfo = $menuItemObj->objCustomPage->get_info();
$customFormObj->select($menuCustomFormInfo['custompage_id']);
echo "<div style='text-align: " . $menuCustomFormInfo['textalign'] . "'> " . $menuCustomFormInfo['prefix'] . "<a href='" . $MAIN_ROOT . "customform.php?pID=" . $menuCustomFormInfo['custompage_id'] . "' target='" . $menuCustomFormInfo['linktarget'] . "'>" . $customFormObj->get_info_filtered("name") . "</a></div>";
break;
case "custompage":
$menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']);
$menuCustomPageInfo = $menuItemObj->objCustomPage->get_info();
$customPageObj->select($menuCustomPageInfo['custompage_id']);
echo "<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'> " . $menuCustomPageInfo['prefix'] . "<a href='" . $MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a></div>";
break;
case "downloads":
$menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']);
$menuDownloadLinkInfo = $menuItemObj->objCustomPage->get_info();
$downloadCatObj->select($menuDownloadLinkInfo['custompage_id']);
echo "<div style='text-align: " . $menuDownloadLinkInfo['textalign'] . "'> " . $menuDownloadLinkInfo['prefix'] . "<a href='" . $MAIN_ROOT . "downloads/index.php?catID=" . $menuDownloadLinkInfo['custompage_id'] . "' target='" . $menuDownloadLinkInfo['linktarget'] . "'>" . $downloadCatObj->get_info_filtered("name") . "</a></div>";
break;
case "customblock":
$menuItemObj->objCustomBlock->select($menuItemInfo['itemtype_id']);
$menuCustomBlockInfo = $menuItemObj->objCustomBlock->get_info();
$menuCustomBlockInfo['code'] = str_replace("[MAIN_ROOT]", $MAIN_ROOT, $menuCustomBlockInfo['code']);
$menuCustomBlockInfo['code'] = str_replace("[MEMBER_ID]", $arrLoginInfo['memberID'], $menuCustomBlockInfo['code']);
$menuCustomBlockInfo['code'] = str_replace("[MEMBERUSERNAME]", $arrLoginInfo['memberUsername'], $menuCustomBlockInfo['code']);
$menuCustomBlockInfo['code'] = str_replace("[MEMBERRANK]", $arrLoginInfo['memberRank'], $menuCustomBlockInfo['code']);
$menuCustomBlockInfo['code'] = str_replace("[PMLINK]", $arrLoginInfo['pmLink'], $menuCustomBlockInfo['code']);
echo $menuCustomBlockInfo['code'];
break;
case "image":
$menuItemObj->objImage->select($menuItemInfo['itemtype_id']);
$menuImageInfo = $menuItemObj->objImage->get_info();
$checkURL = parse_url($menuItemInfo['imageurl']);
if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) {
$menuImageInfo['imageurl'] = $MAIN_ROOT . $menuImageInfo['imageurl'];
}
$dispSetWidth = "";
if ($menuImageInfo['width'] != 0) {
$dispSetWidth = "width: " . $menuImageInfo['width'] . "px; ";
}
$dispSetHeight = "";
if ($menuImageInfo['height'] != 0) {
$dispSetHeight = "height: " . $menuImageInfo['height'] . "px; ";
}
echo "<div style='text-align: " . $menuImageInfo['imagealign'] . "; margin-top: 15px; margin-bottom: 15px'>";
if ($menuImageInfo['link'] != "") {
$checkURL = parse_url($menuImageInfo['link']);
if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) {
$menuImageInfo['link'] = $MAIN_ROOT . $menuImageInfo['link'];
}
echo "<a href='" . $menuImageInfo['link'] . "' target='" . $menuImageInfo['linktarget'] . "'><img src='" . $menuImageInfo['imageurl'] . "' style='" . $dispSetWidth . $dispSetHeight . "' title='" . $menuItemInfo['name'] . "'></a>";
} else {
//.........这里部分代码省略.........
示例2: ConsoleOption
* Website: http://www.bluethrust.com
*
* License: http://www.bluethrust.com/license.php
*
*/
// Config File
$prevFolder = "../";
include $prevFolder . "_setup.php";
include_once $prevFolder . "classes/member.php";
include_once $prevFolder . "classes/poll.php";
$consoleObj = new ConsoleOption($mysqli);
$pollObj = new Poll($mysqli);
$member = new Member($mysqli);
$arrReturn = array("result" => "fail");
$pollOptionSelector = "poll_" . $_POST['pollID'];
if ($pollObj->select($_POST['pollID'])) {
$pollInfo = $pollObj->get_info_filtered();
$pollObj->objAccess->arrAccessFor = array("keyName" => "poll_id", "keyValue" => $pollInfo['poll_id']);
$blnVote = false;
$member->select($_SESSION['btUsername']);
$memberID = "";
if ($pollInfo['accesstype'] == "members" && $member->authorizeLogin($_SESSION['btPassword'])) {
$memberID = $member->get_info("member_id");
$blnVote = true;
} elseif ($pollInfo['accesstype'] == "memberslimited" && $member->authorizeLogin($_SESSION['btPassword']) && $pollObj->hasAccess($member)) {
$memberID = $member->get_info("member_id");
$blnVote = true;
} elseif ($pollInfo['accesstype'] == "public") {
$memberID = $member->authorizeLogin($_SESSION['btPassword']) ? $member->get_info("member_id") : "";
$blnVote = true;
}
示例3: displayMenuItem
public function displayMenuItem()
{
global $hooksObj;
$this->menuItemInfo['itemtype'] = $this->menuItemInfo['itemtype'] == "customcode" || $this->menuItemInfo['itemtype'] == "customformat" ? "customblock" : $this->menuItemInfo['itemtype'];
switch ($this->menuItemInfo['itemtype']) {
case "link":
$this->menuItemObj->objLink->select($this->menuItemInfo['itemtype_id']);
$this->displayLink();
break;
case "top-players":
$this->displayTopPlayers();
break;
case "customform":
$this->menuItemObj->objCustomPage->select($this->menuItemInfo['itemtype_id']);
$this->displayCustomFormLink();
break;
case "custompage":
$this->menuItemObj->objCustomPage->select($this->menuItemInfo['itemtype_id']);
$this->displayCustomPageLink();
break;
case "downloads":
$this->menuItemObj->objCustomPage->select($this->menuItemInfo['itemtype_id']);
$this->displayDownloadPageLink();
break;
case "customblock":
$this->menuItemObj->objCustomBlock->select($this->menuItemInfo['itemtype_id']);
$this->displayCustomCodeBlock();
break;
case "image":
$this->menuItemObj->objImage->select($this->menuItemInfo['itemtype_id']);
$this->displayImage();
break;
case "shoutbox":
$this->menuItemObj->objShoutbox->select($this->menuItemInfo['itemtype_id']);
$this->displayShoutbox();
$arrShoutBoxIDs = $theme->data['shoutboxIDs'];
break;
case "newestmembers":
$this->displayNewMembers();
break;
case "forumactivity":
$this->displayForumActivity();
break;
case "login":
$this->displayLogin();
break;
case "poll":
$pollObj = new Poll($this->MySQL);
$pollObj->select($this->menuItemInfo['itemtype_id']);
$pollObj->dispPollMenu($this->memberObj);
break;
default:
$GLOBALS['menu_item_info'] = $this->menuItemInfo;
$hooksObj->run("menu_item");
unset($GLOBALS['menu_item_info']);
break;
}
}
示例4: ConsoleOption
* Author: Bluethrust Web Development
* E-mail: support@bluethrust.com
* Website: http://www.bluethrust.com
*
* License: http://www.bluethrust.com/license.php
*
*/
// Config File
$prevFolder = "../";
include $prevFolder . "_setup.php";
include_once $prevFolder . "classes/member.php";
include_once $prevFolder . "classes/poll.php";
$consoleObj = new ConsoleOption($mysqli);
$pollObj = new Poll($mysqli);
$member = new Member($mysqli);
if (!$pollObj->select($_GET['pID'])) {
echo "\n\t\t<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>\n\t";
exit;
}
$viewPollResultsCID = $consoleObj->findConsoleIDByName("View Poll Results");
$consoleObj->select($viewPollResultsCID);
$pollInfo = $pollObj->get_info_filtered();
$member->select($_SESSION['btUsername']);
$blnMemberVoted = false;
if ($member->authorizeLogin($_SESSION['btPassword']) && $pollObj->hasVoted($member->get_info("member_id"))) {
$blnMemberVoted = true;
}
if ($member->authorizeLogin($_SESSION['btPassword'])) {
$memberInfo = $member->get_info_filtered();
}
$blnShowResults = false;
示例5: Poll
* Author: Bluethrust Web Development
* E-mail: support@bluethrust.com
* Website: http://www.bluethrust.com
*
* License: http://www.bluethrust.com/license.php
*
*/
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") {
exit;
} else {
$memberInfo = $member->get_info();
$consoleObj->select($_GET['cID']);
if (!$member->hasAccess($consoleObj)) {
exit;
}
}
include_once "../classes/access.php";
include_once "../classes/poll.php";
$cID = $_GET['cID'];
$pollObj = new Poll($mysqli);
if (isset($_GET['pID']) && $pollObj->select($_GET['pID'])) {
define("SHOW_EDITPOLL", true);
$pollInfo = $pollObj->get_info_filtered();
include "include/edit.php";
} else {
$createPollCID = $consoleObj->findConsoleIDByName("Create a Poll");
echo "\n\t\t<div class='formDiv' style='border: 0px; text-align: right; background: none'>\n\t\t\t» <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $createPollCID . "'>Create a Poll</a> «\n\t\t</div>\n\t\t\n\t\t<table class='formTable'>\n\t\t\t<tr>\n\t\t\t\t<td class='formTitle' style='width: 76%'>Poll Question:</td>\n\t\t\t\t<td class='formTitle' style='width: 24%'>Actions:</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<div id='loadingSpiral' class='loadingSpiral'>\n\t\t\t<p align='center'>\n\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t</p>\n\t\t</div>\n\t\t<div id='pollList'>\n\t";
define("SHOW_POLLLIST", true);
include "include/polllist.php";
echo "\n\t\t</div>\n\t";
}
示例6: ConsoleOption
<?php
/*
* Bluethrust Clan Scripts v4
* Copyright 2014
*
* Author: Bluethrust Web Development
* E-mail: support@bluethrust.com
* Website: http://www.bluethrust.com
*
* License: http://www.bluethrust.com/license.php
*
*/
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/poll.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$managePollsCID = $consoleObj->findConsoleIDByName("Manage Polls");
$consoleObj->select($managePollsCID);
$pollObj = new Poll($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $pollObj->select($_POST['pollID']) && $member->hasAccess($consoleObj)) {
$pollInfo = $pollObj->get_info_filtered();
$pollObj->delete();
define("SHOW_POLLLIST", true);
include "polllist.php";
}