本文整理汇总了PHP中Basic::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Basic::select方法的具体用法?PHP Basic::select怎么用?PHP Basic::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Basic
的用法示例。
在下文中一共展示了Basic::select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select
public function select($intIDNum, $numericIDOnly = true)
{
$returnVal = parent::select($intIDNum, $numericIDOnly);
$this->accessToken = $this->arrObjInfo['access_token'];
$this->refreshToken = $this->arrObjInfo['refresh_token'];
return $returnVal;
}
示例2: revokeMedalSave
function revokeMedalSave()
{
global $mysqli, $member, $medalObj, $memberInfo, $formObj;
$revokeMedalObj = new Basic($mysqli, "medals_members", "medalmember_id");
$arrMemberMedals = $member->getMedalList(true);
$memberMedalID = array_search($_POST['medal'], $arrMemberMedals);
if ($revokeMedalObj->select($memberMedalID) && $revokeMedalObj->delete()) {
// Check if medal is frozen for member already
$arrFrozenMembers = $medalObj->getFrozenMembersList();
if (in_array($_POST['member'], $arrFrozenMembers)) {
$frozenMedalID = array_search($_POST['member'], $arrFrozenMembers);
$medalObj->objFrozenMedal->select($frozenMedalID);
$medalObj->objFrozenMedal->delete();
}
$frozenMessage = "";
if ($medalObj->get_info("autodays") != 0 || $medalObj->get_info("autorecruits") != 0) {
$freezeTime = 86400 * $_POST['freezetime'] + time();
$medalObj->objFrozenMedal->addNew(array("medal_id", "member_id", "freezetime"), array($_POST['medal'], $_POST['member'], $freezeTime));
$dispDays = $_POST['freezetime'] == 1 ? "day" : "days";
$frozenMessage = " The medal will not be awarded again for " . $_POST['freezetime'] . " " . $dispDays . ".";
}
$logMessage = $member->getMemberLink() . " was stripped of the " . $medalObj->get_info_filtered("name") . " medal." . $frozenMessage . "<br><br><b>Reason:</b><br>" . filterText($_POST['reason']);
$member->postNotification("You were stripped of the medal: <b>" . $medalObj->get_info_filtered("name") . "</b>");
$member->select($memberInfo['member_id']);
$member->logAction($logMessage);
} else {
$formObj->blnSaveResult = false;
$formObj->errors[] = "Unable to save information to the database. Please contact the website administrator.";
}
}
示例3: displayCustomPageLink
public function displayCustomPageLink()
{
$customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
$menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
$customPageObj->select($menuCustomPageInfo['custompage_id']);
echo "\n\t\t\t<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'>\n\t\t\t" . $menuCustomPageInfo['prefix'] . "<a href='" . MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a>\n\t\t\t</div>\n\t\t\t";
}
示例4: select
public function select($intIDNum, $numericIDOnly = true)
{
$returnVal = parent::select($intIDNum, $numericIDOnly);
if ($returnVal) {
$this->populateConfig();
}
return $returnVal;
}
示例5: displayCustomPageLink
public function displayCustomPageLink()
{
$customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
$menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
$customPageObj->select($menuCustomPageInfo['custompage_id']);
$menuItemInfo = $customPageObj->get_info_filtered();
$menuItemInfo['name'] = $menuItemInfo['pagename'];
$menuCustomPageInfo['link'] = MAIN_ROOT . "custompage.php?pID=" . $menuItemInfo['custompage_id'];
$this->formatLink($menuItemInfo, $menuCustomPageInfo);
}
示例6: select
public function select($intIDNum)
{
$returnVal = false;
if (is_numeric($intIDNum) && parent::select($intIDNum)) {
if ($this->objEvent->select($this->arrObjInfo['event_id'])) {
$returnVal = true;
}
}
return $returnVal;
}
示例7: select
public function select($intIDNum, $numericIDOnly = true)
{
$temp = $this->arrObjInfo;
$returnVal = parent::select($intIDNum, $numericIDOnly);
if ($this->blnRefreshInfo) {
$this->arrObjInfo = array();
$result = $this->MySQL->query("SELECT * FROM " . $this->strTableName);
while ($row = $result->fetch_assoc()) {
$this->arrObjInfo[$row['name']] = $row['value'];
$this->arrKeys[$row['name']] = $row['websiteinfo_id'];
}
$this->blnRefreshInfo = false;
} else {
$this->arrObjInfo = $temp;
}
return $returnVal;
}
示例8: calcStat
function calcStat($gameStatID, $memberObj)
{
$calculatedValue = 0;
$gameStatObj = new Basic($this->MySQL, "gamestats", "gamestats_id");
if ($gameStatObj->select($gameStatID) && isset($memberObj)) {
$gameStatInfo = $gameStatObj->get_info_filtered();
$gameStat1Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
$gameStat2Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
if ($gameStatInfo['stattype'] == "calculate" && $gameStat1Obj->select($gameStatInfo['firststat_id']) && $gameStat2Obj->select($gameStatInfo['secondstat_id'])) {
$gameStats1Info = $gameStat1Obj->get_info_filtered();
$gameStats2Info = $gameStat2Obj->get_info_filtered();
$gameStat1Type = $gameStats1Info['stattype'];
$gameStat2Type = $gameStats2Info['stattype'];
if ($gameStat1Type == "calculate") {
$gameStat1Value = $this->calcStat($gameStats1Info['gamestats_id'], $memberObj);
} else {
$gameStat1Value = $memberObj->getGameStatValue($gameStats1Info['gamestats_id']);
}
if ($gameStat2Type == "calculate") {
$gameStat2Value = $this->calcStat($gameStats2Info['gamestats_id'], $memberObj);
} else {
$gameStat2Value = $memberObj->getGameStatValue($gameStats2Info['gamestats_id']);
}
switch ($gameStatInfo['calcop']) {
case "div":
if ($gameStat2Value == 0) {
$gameStat2Value = 1;
}
$calculatedValue = round($gameStat1Value / $gameStat2Value, $gameStatInfo['decimalspots']);
break;
case "mul":
$calculatedValue = round($gameStat1Value * $gameStat2Value, $gameStatInfo['decimalspots']);
break;
case "sub":
$calculatedValue = round($gameStat1Value - $gameStat2Value, $gameStatInfo['decimalspots']);
break;
default:
$calculatedValue = round($gameStat1Value + $gameStat2Value, $gameStatInfo['decimalspots']);
}
}
}
return $calculatedValue;
}
示例9: 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 {
//.........这里部分代码省略.........
示例10: ConsoleOption
* License: http://www.bluethrust.com/license.php
*
*/
include_once "../../../_setup.php";
include_once "../../../classes/member.php";
include_once "../../../classes/rank.php";
include_once "../../../classes/news.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage News");
$consoleObj->select($cID);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$memberInfo = $member->get_info_filtered();
$commentObj = new Basic($mysqli, "comments", "comment_id");
$newsObj = new News($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $commentObj->select($_POST['commentID'])) {
$commentInfo = $commentObj->get_info_filtered();
$newsObj->select($commentInfo['news_id']);
$newsInfo = $newsObj->get_info_filtered();
$member->select($commentInfo['member_id']);
$posterInfo = $member->get_info_filtered();
$logMessage = "Deleted comment by " . $member->getMemberLink() . " on news post: <b><a href='" . $MAIN_ROOT . "news/viewpost.php?nID=" . $newsInfo['news_id'] . "'>" . $newsInfo['postsubject'] . "</a></b>";
$member->select($memberInfo['member_id']);
$member->logAction($logMessage);
$commentObj->delete();
$arrComments = $newsObj->getComments();
$commentCount = $newsObj->countComments();
}
include "../../../news/comments.php";
echo "\n\t<script type='text/javascript'>\n\t\t\$(document).ready(function() {\n\t\t\t\$('#commentCount').html('" . $commentCount . "');\n\t\t});\n\t</script>\n";
示例11: array
* 1. Make sure that all of the game stats were successfully inserted into the db
* 2. For each stat that was an auto-calculated stat, we need to update the firststat and secondstat IDs
* 3. We can identify the correct $arrSavedStat index by accessing the stat order which is stored in
* $_SESSION[btStatCache][key][firstStat] and $_SESSION[btStatCache][key][secondStat]
*/
if ($countErrors == 0) {
$arrColumns = array("firststat_id", "secondstat_id", "calcop");
foreach ($arrSavedStats as $key => $statInfo) {
if ($statInfo['stattype'] == "calculate") {
$intFirstStatOrder = $_SESSION['btStatCache'][$key]['firstStat'];
$intFirstStatID = $arrSavedStats[$intFirstStatOrder]['gamestats_id'];
$intSecondStatOrder = $_SESSION['btStatCache'][$key]['secondStat'];
$intSecondStatID = $arrSavedStats[$intSecondStatOrder]['gamestats_id'];
$calcOp = $_SESSION['btStatCache'][$key]['calcOperation'];
$arrValues = array($intFirstStatID, $intSecondStatID, $calcOp);
$newStat->select($statInfo['gamestats_id']);
$newStat->update($arrColumns, $arrValues);
}
}
} else {
$showErrorMessage = "<br><br>However, the following stats were unable to be saved:<br><br>" . $dispError;
}
echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t<p align='center'>\n\t\t\tSuccessfully Added New Game: <b>" . $newGameInfo['name'] . "</b>!" . $showErrorMessage . "\n\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\tpopupDialog('Add New Game', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t</script>\n\t\t\t";
} else {
$dispError .= " <b>·</b> Unable to add new game. Please try again.<br>";
$_POST['submit'] = false;
}
} else {
$_POST = filterArray($_POST);
$_POST['submit'] = false;
}
示例12: Member
<?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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$manageClanCID = $consoleObj->findConsoleIDByName("Diplomacy: Manage Clans");
$consoleObj->select($manageClanCID);
$diplomacyClanObj = new Basic($mysqli, "diplomacy", "diplomacy_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyClanObj->select($_POST['dClanID']) && $member->hasAccess($consoleObj)) {
$dClanName = $diplomacyClanObj->get_info_filtered("clanname");
if (isset($_POST['confirmDelete'])) {
$diplomacyClanObj->delete();
$member->logAction("Deleted " . $dClanName . " from the diplomacy page.");
include "main_manageclans.php";
} else {
echo "<p class='main' align='center'>Are you sure you want to delete " . $dClanName . " from the diplomacy page?</p>";
}
}
示例13: elseif
if ($replyPMInfo['receiver_id'] != 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || $replyPMInfo['receiver_id'] == $memberInfo['member_id'])) {
$member->select($replyPMInfo['sender_id']);
$member->objRank->select($member->get_info("rank_id"));
$_SESSION['btComposeList'][$pmSessionID]['member'][] = $replyPMInfo['sender_id'];
$composeListJS = "\n\t\t\t\t\n\t\t\t\t\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'member_" . $replyPMInfo['sender_id'] . "'><div style='float: left'>" . $member->objRank->get_info_filtered("name") . " " . $member->get_info_filtered("username") . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'member_" . $replyPMInfo['sender_id'] . "'>×</div></div>\");\n\t\t\t\t\n\t\t\t\t";
} elseif ($replyPMInfo['receiver_id'] == 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || in_array($memberInfo['member_id'], $arrReceivers))) {
if (isset($_GET['replyall'])) {
$pmObj->set_assocTableKey("pmmember_id");
$arrPMMID = $pmObj->getAssociateIDs();
$arrGroups['list'] = array();
$arrGroups['rank'] = array();
$arrGroups['squad'] = array();
$arrGroups['tournament'] = array();
$arrGroups['rankcategory'] = array();
foreach ($arrPMMID as $pmmID) {
$multiMemPMObj->select($pmmID);
$multiMemPMInfo = $multiMemPMObj->get_info();
if ($multiMemPMInfo['grouptype'] != "" && !in_array($multiMemPMInfo['group_id'], $arrGroups[$multiMemPMInfo['grouptype']])) {
$arrGroups[$multiMemPMInfo['grouptype']][] = $multiMemPMInfo['group_id'];
switch ($multiMemPMInfo['grouptype']) {
case "rankcategory":
$dispName = $rankCatObj->select($multiMemPMInfo['group_id']) ? $rankCatObj->get_info_filtered("name") . " - Category" : "";
$_SESSION['btComposeList'][$pmSessionID]['rankcategory'][] = $multiMemPMInfo['group_id'];
$composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t";
break;
case "rank":
$dispName = $member->objRank->select($multiMemPMInfo['group_id']) ? $member->objRank->get_info_filtered("name") . " - Rank" : "";
$_SESSION['btComposeList'][$pmSessionID]['rank'][] = $multiMemPMInfo['group_id'];
$composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rank_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rank_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t";
break;
case "squad":
示例14: getMemberLink
function getMemberLink($args = array("color" => true))
{
global $MAIN_ROOT;
$returnVal = "";
if ($this->intTableKeyValue != "" && is_numeric($this->intTableKeyValue)) {
$memberRank = new Rank($this->MySQL);
$memberRankCat = new Basic($this->MySQL, "rankcategory", "rankcategory_id");
$memberInfo = $this->get_info_filtered();
$memberRank->select($memberInfo['rank_id']);
$rankInfo = $memberRank->get_info_filtered();
$memberRankCat->select($rankInfo['rankcategory_id']);
$memberColor = $memberRankCat->get_info_filtered("color");
if ($args['color']) {
$returnVal = "<span style='color: " . $rankInfo['color'] . "'><a href='" . $MAIN_ROOT . "profile.php?mID=" . $memberInfo['member_id'] . "' style='color: " . $memberColor . "' title='" . $memberInfo['username'] . "'>" . $memberInfo['username'] . "</a></span>";
} else {
$returnVal = "<a href='" . MAIN_ROOT . "profile.php?mID=" . $this->intTableKeyValue . "'>" . $memberInfo['username'] . "</a>";
}
if ($args['wrapper'] === false) {
$returnVal = MAIN_ROOT . "profile.php?mID=" . $this->intTableKeyValue;
}
}
return $returnVal;
}
示例15: btmysql
<?php
include_once "../../_config.php";
include_once "../../classes/btmysql.php";
include_once "../../classes/member.php";
$mysqli = new btmysql($dbhost, $dbuser, $dbpass, $dbname);
$mysqli->set_tablePrefix($dbprefix);
$member = new Member($mysqli);
$websiteInfoObj = new Basic($mysqli, "websiteinfo", "websiteinfo_id");
$member->select($_POST['user']);
if ($member->authorizeLogin($_POST['pass'], 1) && $member->get_info("rank_id") == "1") {
$memberInfo = $member->get_info_filtered();
$websiteInfoObj->select(1);
$websiteInfoObj->update(array("theme"), array($_POST['themeName']));
echo "\n\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$.post('../themes/" . $_POST['themeName'] . "/menuimport_default.php');\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t";
} else {
if (!$member->select($_POST['user'])) {
echo "Unable to select user " . $_POST['user'] . "<br>";
}
if (!$member->authorizeLogin($_POST['pass'], 1)) {
echo "Not Authorized<br>";
}
if (!$member->get_info("rank_id") == "1") {
echo "Not Admin<br>";
}
}