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


PHP Basic::addNew方法代码示例

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


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

示例1: addNew

 public function addNew($arrColumns, $arrValues)
 {
     $returnVal = false;
     $addNew = parent::addNew($arrColumns, $arrValues);
     if ($addNew) {
         $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "forum_topicseen WHERE forumtopic_id = '" . $this->arrObjInfo['forumtopic_id'] . "'");
         $this->MySQL->query("OPTIMIZE TABLE `" . $this->MySQL->get_tablePrefix() . "forum_topicseen`");
         $returnVal = true;
     }
     return $returnVal;
 }
开发者ID:bluethrust,项目名称:clanscriptsv4,代码行数:11,代码来源:forumpost.php

示例2: setMemberProfile

 public function setMemberProfile()
 {
     $arrProfileValues = $this->getAppValues(true);
     if (count($arrProfileValues) > 0) {
         foreach ($arrProfileValues as $componentID => $profileItem) {
             $this->objAppComponent->select($componentID);
             $arrSelectValueID = $this->objAppComponent->getAssociateIDs("ORDER BY componentvalue");
             $this->objAppComponent->appSelectValueObj->select($arrSelectValueID[0]);
             $componentValue = $this->objAppComponent->appSelectValueObj->get_info("componentvalue");
             switch ($componentValue) {
                 case "birthday":
                 case "maingame":
                 case "recruiter":
                     $columnName = $componentValue == "maingame" ? "maingame_id" : $componentValue;
                     $this->objMember->update(array($columnName), array($profileItem['values'][0]));
                     break;
                 case "gamesplayed":
                     $gameMemberObj = new Basic($this->MySQL, "gamesplayed_members", "gamemember_id");
                     foreach ($profileItem['values'] as $gameID) {
                         $gameMemberObj->addNew(array("member_id", "gamesplayed_id"), array($this->objMember->get_info("member_id"), $gameID));
                     }
                     break;
                 default:
                     $this->objMember->setProfileValue($componentValue, $profileItem['values'][0]);
                     break;
             }
         }
     }
 }
开发者ID:nsystem1,项目名称:clanscripts,代码行数:29,代码来源:memberapp.php

示例3: Basic

 // No errors after adding the image. Add game to database.
 $newGame = new Basic($mysqli, "gamesplayed", "gamesplayed_id");
 $arrColumns = array("name", "imageurl", "imagewidth", "imageheight", "ordernum");
 $arrValues = array($_POST['gamename'], $gameImageURL, $_POST['gameimagewidth'], $_POST['gameimageheight'], $intGameOrderNum);
 if ($newGame->addNew($arrColumns, $arrValues)) {
     $newGameInfo = $newGame->get_info_filtered();
     // Try adding stats
     $showErrorMessage = "";
     $newStat = new Basic($mysqli, "gamestats", "gamestats_id");
     $arrColumns = array("name", "stattype", "ordernum", "decimalspots", "gamesplayed_id", "hidestat", "textinput");
     $arrSavedStats = array();
     // First insert all stats so we can get their actual database ids
     // After we add them, save the info array to a separate array
     foreach ($_SESSION['btStatCache'] as $key => $statInfo) {
         $arrValues = array($statInfo['statName'], $statInfo['statType'], $key, $statInfo['rounding'], $newGameInfo['gamesplayed_id'], $statInfo['hideStat'], $statInfo['textInput']);
         if (!$newStat->addNew($arrColumns, $arrValues)) {
             $countErrors++;
             $dispError .= "&nbsp;&nbsp;<b>&middot;</b> " . filterText($statInfo['statName']) . "<br>";
         } else {
             $arrSavedStats[] = $newStat->get_info_filtered();
         }
     }
     /*
      * 	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) {
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:addgamesplayed.php

示例4: Basic

}
$cID = $_GET['cID'];
$customPageObj = new Basic($mysqli, "custompages", "custompage_id");
$countErrors = 0;
$dispError = "";
if ($_POST['submit']) {
    if (trim($_POST['pagename']) == "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must enter a page name for your custom page.<br>";
    }
    if ($countErrors == 0) {
        $_POST['wysiwygHTML'] = str_replace("<?", "", $_POST['wysiwygHTML']);
        $_POST['wysiwygHTML'] = str_replace("?>", "", $_POST['wysiwygHTML']);
        $_POST['wysiwygHTML'] = str_replace("&lt;?", "", $_POST['wysiwygHTML']);
        $_POST['wysiwygHTML'] = str_replace("?&gt;", "", $_POST['wysiwygHTML']);
        if ($customPageObj->addNew(array("pagename", "pageinfo"), array($_POST['pagename'], $_POST['wysiwygHTML']))) {
            $intManageCustomPagesID = $consoleObj->findConsoleIDByName("Manage Custom Pages");
            $customPageInfo = $customPageObj->get_info();
            echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\tSuccessfully Added Custom Page: <b>" . $customPageInfo['pagename'] . "</b>!\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tpopupDialog('Add Custom Pages', '" . $MAIN_ROOT . "members/console.php?cID=" . $intManageCustomPagesID . "&cpID=" . $customPageInfo['custompage_id'] . "&action=edit', 'successBox');\n\t\t\t\t</script>\n\t\t\t";
        } else {
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to add custom page.  Please try again!<br>";
            $_POST['submit'] = false;
            $_POST['wysiwygHTML'] = addslashes($_POST['wysiwygHTML']);
        }
    } else {
        $_POST['submit'] = false;
        $_POST['wysiwygHTML'] = addslashes($_POST['wysiwygHTML']);
    }
}
if (!$_POST['submit']) {
    $addMenuItemCID = $consoleObj->findConsoleIDByName("Add Menu Item");
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:addcustompages.php

示例5: logAction

 function logAction($message = "")
 {
     $returnVal = false;
     if ($this->intTableKeyValue != "") {
         $logObj = new Basic($this->MySQL, "logs", "log_id");
         $arrColumns = array("member_id", "logdate", "message", "ipaddress");
         $arrValues = array($this->intTableKeyValue, time(), $message, $_SERVER['REMOTE_ADDR']);
         if ($logObj->addNew($arrColumns, $arrValues)) {
             $returnVal = true;
         }
     }
     return $returnVal;
 }
开发者ID:nsystem1,项目名称:clanscripts,代码行数:13,代码来源:member.php

示例6: Member

$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$squadObj = new Squad($mysqli);
$arrSquadPrivileges = $squadObj->arrSquadPrivileges;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $LOGIN_FAIL = false;
    $memberInfo = $member->get_info_filtered();
    if ($squadObj->select($_GET['sID']) && $squadObj->memberHasAccess($memberInfo['member_id'], "postshoutbox")) {
        $squadInfo = $squadObj->get_info();
        $squadNewsObj = new Basic($mysqli, "squadnews", "squadnews_id");
        $arrColumns = array("member_id", "squad_id", "dateposted", "newspost", "newstype");
        $arrValues = array($memberInfo['member_id'], $squadInfo['squad_id'], time(), $_POST['message'], 3);
        $squadNewsObj->addNew($arrColumns, $arrValues);
        if ($squadObj->memberHasAccess($memberInfo['member_id'], "manageshoutbox")) {
            $blnManageShoutbox = true;
        }
    }
}
$squadMemberList = $squadObj->getMemberList();
$blnShowShoutBox = false;
if (in_array($memberInfo['member_id'], $squadMemberList) && $squadInfo['privateshoutbox'] == 1) {
    $blnShowShoutBox = true;
} elseif ($squadInfo['privateshoutbox'] == 0) {
    $blnShowShoutBox = true;
}
if ($blnShowShoutBox) {
    $shoutboxObj = new Shoutbox($mysqli, "squadnews", "squadnews_id");
    $shoutboxObj->strDivID = "squadsShoutbox";
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:postshoutbox.php

示例7: strtoupper

            $char = strtoupper($value);
        }
        if (is_numeric($char)) {
            unset($arrFonts[1]);
            if ($char == 0) {
                unset($arrFonts[0]);
            } elseif ($char == 3) {
                unset($arrFonts[3]);
            } elseif ($char == 9) {
                unset($arrFonts[2]);
            }
        } elseif (strtolower($char) == "s") {
            unset($arrFonts[3]);
        }
        shuffle($arrFonts);
        $randFontNum = rand(0, count($arrFonts) - 1);
        $randFont = $arrFonts[$randFontNum];
        $randNum2 = rand(0, 8);
        if ($appComponentObj->get_info("componenttype") == "captchaextra") {
            $xCoord = $counter == 0 ? 10 : 55 * $counter;
            imagettftext($im, 70, rand(0, 20), $xCoord, 80, $blackAlpha, $distortFont, $arrDistort[$randNum2]);
        }
        $xCoord = $counter == 0 ? 10 : 55 * $counter;
        imagettftext($im, 50, rand(-5, 5), $xCoord, 70, $black, $randFont, $char);
        $counter++;
        $finalCaptchaText .= $char;
    }
    $captchaObj->addNew(array("appcomponent_id", "ipaddress", "captchatext"), array($appCompInfo['appcomponent_id'], $IP_ADDRESS, strtolower($finalCaptchaText)));
    imagepng($im);
    imagedestroy($im);
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:captcha.php

示例8: saveAdditionalPostData

function saveAdditionalPostData()
{
    global $formObj, $blnPostReply, $boardObj, $mysqli, $topicInfo;
    if (!$blnPostReply) {
        // New Topic
        $postInfo = $boardObj->objPost->get_info();
        $arrColumns = array("forumboard_id", "forumpost_id", "lastpost_id");
        $arrValues = array($_GET['bID'], $postInfo['forumpost_id'], $postInfo['forumpost_id']);
        $boardObj->objTopic->addNew($arrColumns, $arrValues);
        $boardObj->objPost->update(array("forumtopic_id"), array($boardObj->objTopic->get_info("forumtopic_id")));
    } else {
        $boardObj->objPost->update(array("forumtopic_id"), array($topicInfo['forumtopic_id']));
        $newReplies = $topicInfo['replies'] + 1;
        $boardObj->objTopic->update(array("replies", "lastpost_id"), array($newReplies, $boardObj->objPost->get_info("forumpost_id")));
    }
    $formObj->saveLink = $boardObj->objPost->getLink();
    $arrDownloadID = checkForAttachments();
    if (is_array($arrDownloadID)) {
        $forumAttachmentObj = new Basic($mysqli, "forum_attachments", "forumattachment_id");
        foreach ($arrDownloadID as $downloadID) {
            $forumAttachmentObj->addNew(array("download_id", "forumpost_id"), array($downloadID, $boardObj->objPost->get_info("forumpost_id")));
        }
    }
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:24,代码来源:post.php

示例9: ConsoleOption

 $consoleObj = new ConsoleOption($mysqli);
 $member = new Member($mysqli);
 $member->select($_SESSION['btUsername']);
 $cID = $consoleObj->findConsoleIDByName("View Inactive Requests");
 $consoleObj->select($cID);
 if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) {
     exit;
 }
 $memberInfo = $member->get_info_filtered();
 $iaRequestObj = new Basic($mysqli, "iarequest", "iarequest_id");
 $checkRequestID = $iaRequestObj->select($_POST['iaRequestID']);
 if ($_POST['action'] == "postmessage" && trim($_POST['message']) != "" && $checkRequestID) {
     $iaRequestMessageObj = new Basic($mysqli, "iarequest_messages", "iamessage_id");
     $arrColumns = array("iarequest_id", "member_id", "messagedate", "message");
     $arrValues = array($iaRequestObj->get_info("iarequest_id"), $memberInfo['member_id'], time(), $_POST['message']);
     $iaRequestMessageObj->addNew($arrColumns, $arrValues);
     echo dispIAMessages($iaRequestObj->get_info("iarequest_id"));
     $requestIACID = $consoleObj->findConsoleIDByName("Inactive Request");
     $member->select($iaRequestObj->get_info("member_id"));
     $member->postNotification("A new message was posted on your inactive request!<br><br><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $requestIACID . "'>View Messages</a>");
     exit;
 } elseif (($_POST['action'] == "approve" || $_POST['action'] == "deny") && $checkRequestID) {
     $requestStatus = $_POST['action'] == "approve" ? 1 : 2;
     $iaRequestObj->update(array("reviewer_id", "reviewdate", "requeststatus"), array($memberInfo['member_id'], time(), $requestStatus));
     if ($requestStatus == 1) {
         $member->select($iaRequestObj->get_info("member_id"));
         $member->update(array("onia", "inactivedate"), array(1, time()));
         $member->postNotification("Your inactive request was approved!");
     } else {
         $member->select($iaRequestObj->get_info("member_id"));
         $member->update(array("onia", "inactivedate"), array(0, 0));
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:inactiverequestlist.php

示例10: max

     }
     // Check Starting Rank
     if ($squadObj->memberHasAccess($memberInfo['member_id'], "setrank")) {
         if (!$squadObj->objSquadRank->select($_POST['startingrank']) || $_POST['startingrank'] == $intFounderRankID) {
             $countErrors++;
             $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid starting rank!";
         }
     } else {
         $startRankKey = max(array_keys($squadRankList));
         $_POST['startingrank'] = $squadRankList[$startRankKey];
     }
     if ($countErrors == 0) {
         $arrColumns = array("squad_id", "sender_id", "receiver_id", "datesent", "message", "startingrank_id");
         $arrValues = array($squadInfo['squad_id'], $memberInfo['member_id'], $intNewMemberID, time(), $_POST['message'], $_POST['startingrank']);
         $squadInviteObj = new Basic($mysqli, "squadinvites", "squadinvite_id");
         if ($squadInviteObj->addNew($arrColumns, $arrValues)) {
             $intViewSquadInvitesCID = $consoleObj->findConsoleIDByName("View Squad Invitations");
             $member->postNotification("You have received a squad invitation from <b><a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $squadInfo['squad_id'] . "'>" . $squadInfo['name'] . "</a></b>!<br><br><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intViewSquadInvitesCID . "'>Click Here</a> to view your Squad Invitations.");
             echo "\n\t\t\t\t\n\t\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\tSuccessfully Sent Squad Invitation to " . $member->getMemberLink() . "!\n\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\tpopupDialog('Send Squad Invite', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
         } else {
             $countErrors++;
             $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";
         }
     }
     if ($countErrors > 0) {
         $_POST = filterArray($_POST);
         $_POST['submit'] = false;
     }
 }
 if (!$_POST['submit']) {
     $sqlMemberList = "('" . implode("','", $squadMemberList) . "')";
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:sendinvites.php

示例11: time

    $time = time();
    if ($memberObj->select($username)) {
        if ($memberObj->get_info("email") == $email) {
            $emailvalid = true;
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Email Address Not Valid.<br>";
        }
    } else {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Username Not Valid.<br>";
    }
    if ($countErrors == 0) {
        $arrayCol = array('username', 'email', 'changekey', 'timeofrq');
        $arrayVal = array($username, $email, $changekey, $time);
        $forgotPassObj->addNew($arrayCol, $arrayVal);
        $subject = 'Your Forgotten Password Request - ' . $CLAN_NAME;
        $message = "\n<html>\n<body>\nHello,<br>\nYou've requested a change in your password on the clan website.<br>\n<br>\nPlease click the following link to continue and follow the instructions on the page it opens:<br>\n--------------------------------------------<br>\n<a href='{$url}?stage=validate&changekey={$changekey}'>{$url}?stage=validate&changekey={$changekey}</a><br>\n<br>\nThanks!\n";
        $headers = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
        $headers .= 'From: ' . $CLAN_NAME . ' <no-reply@' . $siteDomain . '>' . "\r\n";
        mail($email, $subject, $message, $headers);
        echo "\n<div class='formDiv'>\nYour request has been successfully submitted. Please check your email for the link and further instructions.\n</div>\n";
    }
} elseif ($stage == "validate" && $countErrors == 0) {
    $changekey = $mysqli->real_escape_string($_GET['changekey']);
    $forgotPassObj->set_tableKey("changekey");
    if ($forgotPassObj->select($changekey, false)) {
        $dataArr = $forgotPassObj->get_info();
        $rqid = $dataArr['rqid'];
        $username = $dataArr['username'];
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:forgotpassword.php

示例12: saveCustomValues

function saveCustomValues()
{
    global $mysqli, $member, $arrGames, $gameMemberObj, $dbprefix, $memberInfo, $arrSocialMediaInfo;
    // Save Custom Profile Options
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "profileoptions ORDER BY sortnum");
    while ($row = $result->fetch_assoc()) {
        $postVal = "custom_" . $row['profileoption_id'];
        $member->setProfileValue($row['profileoption_id'], $_POST[$postVal]);
    }
    // Save Social Media Info
    foreach ($arrSocialMediaInfo as $socialMediaInfo) {
        $postVal = "socialmedia_" . $socialMediaInfo['social_id'];
        if ($member->objSocial->objSocialMember->selectByMulti(array("member_id" => $memberInfo['member_id'], "social_id" => $socialMediaInfo['social_id']))) {
            $arrColumns = array("value");
            $arrValues = array($_POST[$postVal]);
            $member->objSocial->objSocialMember->update($arrColumns, $arrValues);
        } else {
            $arrColumns = array("social_id", "member_id", "value");
            $arrValues = array($socialMediaInfo['social_id'], $memberInfo['member_id'], $_POST[$postVal]);
            $member->objSocial->objSocialMember->addNew($arrColumns, $arrValues);
        }
    }
    // Save Games Played
    $mysqli->query("DELETE FROM " . $dbprefix . "gamesplayed_members WHERE member_id = '" . $memberInfo['member_id'] . "'");
    $gameMemberObj = new Basic($mysqli, "gamesplayed_members", "gamemember_id");
    foreach ($arrGames as $gameID) {
        $postVal = "game_" . $gameID;
        if ($_POST[$postVal] == 1) {
            $gameMemberObj->addNew(array("member_id", "gamesplayed_id"), array($memberInfo['member_id'], $gameID));
        }
    }
    if (!$member->playsGame($_POST['maingame'])) {
        $gameMemberObj->addNew(array("member_id", "gamesplayed_id"), array($memberInfo['member_id'], $_POST['maingame']));
    }
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:35,代码来源:editprofile.php

示例13: addNew

 public function addNew($arrColumns, $arrValues)
 {
     $returnVal = false;
     // Do the original stuff
     $result = parent::addNew($arrColumns, $arrValues);
     if ($result && $this->intTableKeyValue != "") {
         // Add the Teams
         $this->arrTeamIDs = array();
         $countErrors = 0;
         $arrSeeds = range(1, $this->arrObjInfo['maxteams']);
         if ($this->arrObjInfo['seedtype'] == 2) {
             shuffle($arrSeeds);
         } elseif ($this->arrObjInfo['seedtype'] == 3) {
             $arrSeeds = array_fill(0, $this->arrObjInfo['maxteams'], 0);
         }
         for ($i = 0; $i < $this->arrObjInfo['maxteams']; $i++) {
             $teamNumber = $i + 1;
             $teamName = "Team " . $teamNumber;
             if (!$this->objTeam->addNew(array("tournament_id", "seed", "name"), array($this->arrObjInfo['tournament_id'], $arrSeeds[$i], $teamName))) {
                 $countErrors++;
             }
             $this->arrTeamIDs[] = $this->objTeam->get_info("tournamentteam_id");
         }
         if ($this->arrObjInfo['seedtype'] == 3) {
             // Pools
             $numOfPools = $this->arrPoolsPerTeams[$this->arrObjInfo['maxteams']];
             $blnPoolsAdded = true;
             // Add the pools
             for ($i = 1; $i <= $numOfPools; $i++) {
                 if (!$this->objTournamentPool->addNew(array("tournament_id"), array($this->arrObjInfo['tournament_id']))) {
                     $blnPoolsAdded = false;
                     $countErrors++;
                 }
             }
             if ($blnPoolsAdded) {
                 $arrPools = $this->getPoolList();
                 $arrTeams = $this->arrTeamIDs;
                 $teamsPerPool = $this->arrObjInfo['maxteams'] / $numOfPools;
                 $poolOffset = 0;
                 shuffle($arrTeams);
                 foreach ($arrPools as $poolID) {
                     $arrPoolTeams[$poolID] = array_slice($arrTeams, $poolOffset, $teamsPerPool);
                     $poolOffset += $teamsPerPool;
                 }
                 $arrNewPoolColumns = array("tournament_id", "pool_id", "team1_id", "team2_id");
                 foreach ($arrPoolTeams as $poolID => $tempTeamArr) {
                     $teamStart = 1;
                     foreach ($tempTeamArr as $teamID) {
                         $team1Index = $teamStart - 1;
                         for ($i = $teamStart; $i < $teamsPerPool; $i++) {
                             $arrNewPoolValues = array($this->intTableKeyValue, $poolID, $tempTeamArr[$team1Index], $tempTeamArr[$i]);
                             $this->objPoolMatch->addNew($arrNewPoolColumns, $arrNewPoolValues);
                         }
                         $teamStart++;
                     }
                 }
             }
         } else {
             // Non-Pools
             $this->resetMatches();
         }
         /*
         	-- OLD MATCH SPOT --
         */
         if ($countErrors == 0) {
             $returnVal = true;
         } else {
             // Unable to add complete tournament - Delete everything with the tournament's ID
             $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "tournamentpools_teams WHERE tournament_id = '" . $this->arrObjInfo['tournament_id'] . "'");
             $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "tournamentpools WHERE tournament_id = '" . $this->arrObjInfo['tournament_id'] . "'");
             $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "tournamentplayers WHERE tournament_id = '" . $this->arrObjInfo['tournament_id'] . "'");
             $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "tournamentmatch WHERE tournament_id = '" . $this->arrObjInfo['tournament_id'] . "'");
             $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "tournamentteams WHERE tournament_id = '" . $this->arrObjInfo['tournament_id'] . "'");
             $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "tournaments WHERE tournament_id = '" . $this->arrObjInfo['tournament_id'] . "'");
         }
     }
     return $returnVal;
 }
开发者ID:nsystem1,项目名称:clanscripts,代码行数:78,代码来源:tournament.php

示例14: time

    // Check Subject
    if (trim($_POST['subject']) == "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must enter a news subject.<br>";
    }
    // Check Message
    if (trim($_POST['message']) == "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You may not make a blank news post.<br>";
    }
    if ($countErrors == 0) {
        $time = time();
        $arrColumns = array("squad_id", "member_id", "newstype", "dateposted", "postsubject", "newspost");
        $arrValues = array($squadInfo['squad_id'], $memberInfo['member_id'], $_POST['newstype'], $time, $_POST['subject'], $_POST['message']);
        $newsPost = new Basic($mysqli, "squadnews", "squadnews_id");
        if ($newsPost->addNew($arrColumns, $arrValues)) {
            echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\tSuccessfully Posted Squad News!\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tpopupDialog('Post Squad News', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t";
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";
        }
    }
    if ($countErrors > 0) {
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    echo "\n\t\t<form action='managesquad.php?sID=" . $_GET['sID'] . "&pID=PostNews' method='post'>\n\t\t\t<div class='formDiv'>\n\t\t\t\n\t\t\t";
    if ($dispError != "") {
        echo "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to post squad news because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t</div>\n\t\t";
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:postnews.php

示例15: array

                $checkBoxName = "rankaccess_" . $row['rank_id'];
                if ($_POST[$checkBoxName] == 1) {
                    $arrValues = array($row['rank_id'], $newConsoleInfo['console_id']);
                    $consolePrivObj->addNew($arrColumns, $arrValues);
                }
            }
            $memberConsoleObj = new Basic($mysqli, "console_members", "privilege_id");
            $arrColumns = array("member_id", "console_id", "allowdeny");
            foreach ($_SESSION['btAccessRules'] as $memAccessInfo) {
                if ($memAccessInfo['accessRule'] == "allow") {
                    $intAllowDeny = 1;
                } else {
                    $intAllowDeny = 0;
                }
                if ($member->select($memAccessInfo['mID'])) {
                    $memberConsoleObj->addNew($arrColumns, array($memAccessInfo['mID'], $newConsoleInfo['console_id'], $intAllowDeny));
                }
            }
            $consolePrivObj->addNew(array("rank_id", "console_id"), array("1", $newConsoleInfo['console_id']));
            $consoleObj->resortOrder();
            echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t<p align='center'>\n\t\t\tSuccessfully Edited Console Option: <b>" . $newConsoleInfo['pagetitle'] . "</b>!\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('Edit Console Option', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t</script>\n\t\t\t";
        }
    } else {
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    $_SESSION['btAccessRules'] = array();
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "console_members WHERE console_id = '" . $consoleInfo['console_id'] . "'");
    while ($row = $result->fetch_assoc()) {
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:edit.php


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