本文整理汇总了PHP中Rank类的典型用法代码示例。如果您正苦于以下问题:PHP Rank类的具体用法?PHP Rank怎么用?PHP Rank使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Rank类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: saveRank
private function saveRank($playerId, $tournamentId, $score, $oRank)
{
if ($oRank instanceof Doctrine_Record) {
$oRank->score = $score;
$oRank->save();
} else {
$rank = new Rank();
$rank->Players_id = $playerId;
$rank->Tournaments_id = $tournamentId;
$rank->score = $score;
$rank->save();
}
}
开发者ID:jager,项目名称:cms,代码行数:13,代码来源:Rank.php
示例2: addMember
public function addMember()
{
$rankObj = new Rank($this->MySQL);
$rankObj->selectByOrder(2);
$newMemRank = $rankObj->get_info("rank_id");
$appInfo = $this->get_info();
$arrColumns = array("username", "password", "password2", "rank_id", "email", "datejoined", "lastlogin", "lastseen");
$arrValues = array($appInfo['username'], $appInfo['password'], $appInfo['password2'], $newMemRank, $appInfo['email'], time(), time(), time());
if ($this->objMember->addNew($arrColumns, $arrValues)) {
$this->setMemberProfile();
$returnVal = $this->update(array("memberadded"), array(1));
$this->notifyNewMember();
}
return $returnVal;
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:15,代码来源:memberapp.php
示例3: getInstance
/**
* Singleton Pattern
*
* Auto Create Object Instance.
*
*/
public static function getInstance()
{
if (null === self::$_objInstance) {
self::$_objInstance = new Rank();
}
return self::$_objInstance;
}
开发者ID:edupol,项目名称:examsystem,代码行数:13,代码来源:Rank.php
示例4: getDivisionLeaders
/**
* @param $division_structure
* @return string
*/
private function getDivisionLeaders($division_structure)
{
$division_leaders = Division::findDivisionLeaders($this->game_id);
foreach ($division_leaders as $division_leader) {
$aod_url = Member::createAODlink(['member_id' => $division_leader->member_id, 'rank' => Rank::convert($division_leader->rank_id)->abbr, 'forum_name' => $division_leader->forum_name]);
$division_structure .= property_exists($division_leader, 'position_desc') ? "{$aod_url} - {$division_leader->position_desc}\r\n" : "{$aod_url}\r\n";
}
return $division_structure;
}
开发者ID:higginsd,项目名称:Division-Tracker,代码行数:13,代码来源:WgDivisionStructure.php
示例5: revokeRank
public function revokeRank($rank)
{
if (is_array($rank)) {
$revokeReason = $rank['reason'];
$rank = Rank::findOrFail($rank['model']->id);
}
if ($rank->count() && empty($rank->revoked_at)) {
$this->getRankPivotBuilder($rank->id)->update(['revoke_reason' => $revokeReason, 'revoked_at' => Carbon::now()]);
}
}
开发者ID:autocar,项目名称:draperstudio_laravel-rewardable,代码行数:10,代码来源:RankRepository.php
示例6: createView
/**
* Create view
*/
private function createView()
{
$this->oView->addData('titre', Language::translate('PERMISSIONS_ADMIN_TABLE_TITLE'));
$oTable = new TableGenerator();
$oTable->setId(md5('Access'));
$aRanks = Rank::getRanks();
$oTable->addColumn('');
foreach ($aRanks as $oRank) {
$oTable->addColumn($oRank->getName());
}
$aModules = Permission::getModules();
foreach ($aModules as $iId => $sName) {
$aBuffer = array();
$aBuffer[] = $sName;
foreach ($aRanks as $oRank) {
if ($oRank->checkAccess($sName)) {
$sIcon = 'fa-check';
$sStyle = 'success';
$sNewValue = 'false';
} else {
$sIcon = 'fa-times';
$sStyle = 'danger';
$sNewValue = 'true';
}
$oLabel = new View('minibutton');
$oLabel->addData('icon', $sIcon);
$oLabel->addData('style', $sStyle);
$oLabel->addData('link', 'index.php?p=adminpermissions&m=' . $iId . '&r=' . $oRank->getId() . '&v=' . $sNewValue);
$oLabel->create();
$aBuffer[] = $oLabel->getCode();
}
$oTable->addLine($aBuffer);
}
$oTable->setBottom('');
$oTable->create();
$this->oView->addData('content', $oTable->getCode());
$this->oView->Create();
}
开发者ID:Jatax,项目名称:TKS,代码行数:41,代码来源:adminpermissions.controller.php
示例7: elseif
} elseif ($memberInfo['promotepower'] == -1) {
$rankInfo['promotepower'] = 0;
}
$cID = $_GET['cID'];
$dispError = "";
$countErrors = 0;
if ($memberInfo['rank_id'] == 1) {
$maxOrderNum = $mysqli->query("SELECT MAX(ordernum) FROM " . $dbprefix . "ranks WHERE rank_id != '1'");
$arrMaxOrderNum = $maxOrderNum->fetch_array(MYSQLI_NUM);
if ($maxOrderNum->num_rows > 0) {
$result = $mysqli->query("SELECT rank_id FROM " . $dbprefix . "ranks WHERE ordernum = '" . $arrMaxOrderNum[0] . "'");
$row = $result->fetch_assoc();
$rankInfo['promotepower'] = $row['rank_id'];
}
}
$rankObj = new Rank($mysqli);
if ($_POST['submit']) {
$rankObj->select($rankInfo['promotepower']);
$maxRankInfo = $rankObj->get_info_filtered();
if ($rankInfo['rank_id'] == 1) {
$maxRankInfo['ordernum'] += 1;
}
$arrRanks = array();
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE ordernum <= '" . $maxRankInfo['ordernum'] . "' AND rank_id != '1' ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
$arrRanks[] = $row['rank_id'];
if ($maxRankInfo['ordernum'] > $row['ordernum']) {
$arrMemRanks[] = $row['rank_id'];
}
}
// Check Member
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:setrank.php
示例8: createAddPopup
/**
* Créer la Popup d'ajout d'un utilisateur
* @param \Rank $p_aRanks Rangs possibles
* @return string
*/
private function createAddPopup($p_aRanks)
{
$oPopupAdd = new View('popup');
$oPopupAdd->addData('id', 'adduser');
$oPopupAdd->addData('buttonstyle', 'btn-success');
$oPopupAdd->addData('buttonicon', 'fa-plus');
$oPopupAdd->addData('buttontext', 'Ajouter');
$oPopupAdd->addData('title', 'Ajouter un utilisateur');
$oFormAdd = new FormGenerator();
$oFormAdd->setAction('index.php?p=adminusers');
$oFormAdd->addInput('Identifiant', 'login', true, false, 'text', 'Identifiant ...');
$oFormAdd->addInput('Password', 'password', true, false, 'password', 'Password ...');
$oFormAdd->addInput('Confirmation', 'confirmation', true, false, 'password', 'Confirmation ...');
$oFormAdd->addInput('Email', 'mail', true, false, 'text', 'Email ...');
$oFormAdd->addSelect('Rang', 'rank', $p_aRanks, Rank::getDefaultRank()->getId());
$oFormAdd->create();
$oPopupAdd->addData('content', $oFormAdd->getCode());
$oPopupAdd->create();
return $oPopupAdd->getCode();
}
开发者ID:Jatax,项目名称:TKS,代码行数:25,代码来源:adminusers.controller.php
示例9: thankyouAction
function thankyouAction()
{
$this->view->activeTab = 'Polls';
$this->view->title = $this->view->title = $this->view->translate("Wildfire") . " - " . $this->view->translate("Thanks_For_Poll");
$consumer = $this->_currentUser;
$id = (int) $this->_request->getParam('survey', 0);
$profileSurveyModel = new ProfileSurvey();
$profileSurvey = $profileSurveyModel->fetchRow("i2_survey_id =" . $id . " or " . "i2_survey_id_en =" . $id);
// $this->view->point = $profileSurvey->points;
//check history to prevent multiple participation
$db = Zend_Registry::get('db');
$select1 = $db->select();
$select1->from("poll_participation", "count(*)");
$select1->where("poll_participation.poll_id = ?", $profileSurvey->id);
$select1->where("poll_participation.consumer_id = ?", $consumer->id);
$participationCount = $db->fetchOne($select1);
if ($participationCount == 0) {
// check ws
$indicate2Connect = new Indicate2_Connect();
$ids = array($id);
$wsResult = $indicate2Connect->getAnswerSetCount($consumer->email, $ids);
// Zend_Debug::dump($wsResult."------------".$profileSurvey->points);die;
if ($wsResult > 0) {
// add poll participation
$currentTime = date("Y-m-d H:i:s");
$pollParticipationModel = new PollParticipation();
$pollParticipation = $pollParticipationModel->createRow();
$pollParticipation->poll_id = $profileSurvey->id;
$pollParticipation->consumer_id = $consumer->id;
$pollParticipation->date = $currentTime;
$pollParticipation->save();
// add points
$pointRecordModel = new RewardPointTransactionRecord();
$point = $pointRecordModel->createRow();
$point->consumer_id = $consumer->id;
$point->transaction_id = 3;
$point->date = $currentTime;
$point->point_amount = $profileSurvey->points;
$point->save();
//2011-05-13 change the rank of consumer
$rankModel = new Rank();
$rankModel->changeConsumerRank($consumer->id);
$this->view->point = $point->point_amount;
} else {
// add poll participation
$currentTime = date("Y-m-d H:i:s");
$pollParticipationModel = new PollParticipation();
$pollParticipation = $pollParticipationModel->createRow();
$pollParticipation->poll_id = $profileSurvey->id;
$pollParticipation->consumer_id = $consumer->id;
$pollParticipation->date = $currentTime;
$pollParticipation->save();
// add points
$pointRecordModel = new RewardPointTransactionRecord();
$point = $pointRecordModel->createRow();
$point->consumer_id = $consumer->id;
$point->transaction_id = 3;
$point->date = $currentTime;
$point->point_amount = $profileSurvey->points;
$point->save();
//2011-05-13 change the rank of consumer
$rankModel = new Rank();
$rankModel->changeConsumerRank($consumer->id);
$this->view->point = $point->point_amount;
}
}
}
开发者ID:omusico,项目名称:wildfire_php,代码行数:67,代码来源:ProfilesurveyController.php
示例10: Basic
// Classes needed for index.php
$ipbanObj = new Basic($mysqli, "ipban", "ipaddress");
if ($ipbanObj->select($IP_ADDRESS, false)) {
$ipbanInfo = $ipbanObj->get_info();
if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) {
die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>");
} else {
$ipbanObj->delete();
}
}
// Start Page
$PAGE_NAME = "Members - ";
$dispBreadCrumb = "";
include $prevFolder . "themes/" . $THEME . "/_header.php";
$member = new Member($mysqli);
$rankObj = new Rank($mysqli);
// Disable Members for Inactivity
if ($websiteInfo['maxdsl'] != 0) {
$maxDSLTime = time() - $websiteInfo['maxdsl'] * 86400;
$time = time();
$result = $mysqli->query("UPDATE " . $dbprefix . "members SET disabled = '1', disableddate = '" . $time . "' WHERE disabled = '0' AND rank_id != '1' AND onia = '0' AND lastlogin <= '" . $maxDSLTime . "'");
$result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE disableddate = '" . $time . "'");
while ($row = $result->fetch_assoc()) {
$arrLogColumns = array("member_id", "logdate", "message");
$arrLogValues = array($row['member_id'], $time, "Disabled due to inactivity.");
$logObj->addNew($arrLogColumns, $arrLogValues);
}
}
// Disable members who fail to be promoted for auto-disable ranks
$arrRanks = array();
$result = $mysqli->query("SELECT rank_id FROM " . $dbprefix . "ranks WHERE autodisable != '0'");
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:members.php
示例11: array
if ($memberObj->hasAccess($consoleOptionObj)) {
$shoutBoxPostLink = $MAIN_ROOT . "members/include/news/include/postshoutbox.php";
}
$arrSpecialMenuItems = array();
// TOP PLAYERS
$arrSpecialMenuItems['top-players'] = " <b>·</b> <a href='" . $MAIN_ROOT . "top-players/recruiters.php'>Recruiters</a><br>";
$hpGameObj = new Game($mysqli);
$arrGames = $hpGameObj->getGameList();
foreach ($arrGames as $gameID) {
$hpGameObj->select($gameID);
$arrSpecialMenuItems['top-players'] .= " <b>·</b> <a href='" . $MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'>" . $hpGameObj->get_info_filtered("name") . "</a><br>";
}
// NEWEST MEMBERS
$arrSpecialMenuItems['newmembers'] = "<div style='margin-left: 3px; margin-right: 3px; margin-top: 5px; margin-bottom: 20px'>";
$menuMemberObj = new Member($mysqli);
$menuMemberRankObj = new Rank($mysqli);
$counter = 0;
$result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE rank_id != '1' ORDER BY datejoined DESC LIMIT 5");
while ($row = $result->fetch_assoc()) {
$addCSS = "";
if ($counter == 0) {
$addCSS = " alternateBGColor";
$counter = 1;
} else {
$counter = 0;
}
$arrSpecialMenuItems['newmembers'] .= "<div class='dottedLine " . $addCSS . "' style='padding: 5px 5px'>";
$menuMemberObj->select($row['member_id']);
$newestMemberInfo = $menuMemberObj->get_info_filtered();
$checkURL = parse_url($newestMemberInfo['profilepic']);
if ((!isset($checkURL['scheme']) || $checkURL['scheme'] == "") && $newestMemberInfo['profilepic'] != "") {
开发者ID:bluethrust,项目名称:clanscriptsv4,代码行数:31,代码来源:_menus.php
示例12: next
public function next()
{
$rank = Rank::getRandomRank();
$card = new Card($rank);
return $card;
}
开发者ID:perenchiod,项目名称:php-blackjack,代码行数:6,代码来源:blackjack.php
示例13: arrayToObject
echo $memberInfo->forum_name;
?>
</li>
</ul>
<div class='page-header vertical-align'>
<div class='col-xs-1 hidden-sm hidden-xs'>
<?php
echo Member::avatar($memberInfo->member_id, 'large');
?>
</div>
<div class='col-xs-5'>
<h2>
<strong><?php
echo Rank::convert($memberInfo->rank_id)->abbr . " " . $memberInfo->forum_name;
?>
</strong>
<span class="games_played">
<?php
if (count($gamesPlayed)) {
$gamesPlayed = arrayToObject($gamesPlayed);
?>
<?php
foreach ($gamesPlayed as $game) {
?>
<?php
$img = "assets/images/game_icons/16x16/{$game->short_name}.png";
?>
<?php
if (file_exists($img)) {
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:31,代码来源:profile.php
示例14: add_hierarchy_entry
function add_hierarchy_entry(&$row, $parent_hierarchy_entry_id, $ancestry, $branch_kingdom)
{
self::debug_iterations("Inserting taxon");
self::commit_iterations("Taxa", 500);
if ($this->archive_validator->has_error_by_line('http://rs.tdwg.org/dwc/terms/taxon', $row['archive_file_location'], $row['archive_line_number'])) {
write_to_resource_harvesting_log("ERROR: add_hierarchy_entry: has_error_by_line" . ",file_location:" . $row['archive_file_location'] . ",line_number:" . $row['archive_line_number']);
return false;
}
// make sure this taxon has a name, otherwise skip this branch
$scientific_name = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/scientificName']);
$authorship = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/scientificNameAuthorship']);
$kingdom = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/kingdom']);
$genus = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/genus']);
$rank_label = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/taxonRank']);
// COL exception
if (strtolower($kingdom) == 'viruses') {
if (substr($scientific_name, -1) == ":") {
$scientific_name = substr($scientific_name, 0, -1);
}
if (preg_match("/^(.*) ICTV\$/i", $scientific_name, $arr)) {
$scientific_name = $arr[1];
}
}
// COL exception
if (strtolower($kingdom) == 'viruses' && $genus && strtolower($rank_label) != 'genus') {
if (stripos($scientific_name, $genus) == 0) {
$scientific_name = ucfirst(trim(substr($scientific_name, strlen($genus))));
}
} else {
if ($authorship && stripos($scientific_name, $authorship) === false) {
$scientific_name = trim($scientific_name . " " . $authorship);
}
}
if (!$scientific_name) {
return false;
}
$taxon_id = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/taxonID']);
if (!$taxon_id) {
$taxon_id = @self::field_decode($row['http://purl.org/dc/terms/identifier']);
}
if (!$taxon_id) {
debug("ERROR - no taxon ID for {$scientific_name}, skipping");
return false;
}
if (isset($this->taxon_ids_inserted[$taxon_id])) {
// this taxon_id has already been inserted meaning this tree has a loop in it - so stop
debug("ERROR - taxon ID ({$taxon_id}) for {$scientific_name} already inserted; LOOP?");
return false;
}
$scientific_name = ucfirst($scientific_name);
$name = Name::find_or_create_by_string($scientific_name);
if (@(!$name->id)) {
debug("ERROR - Failed to insert name: {$scientific_name}");
return false;
}
$phylum = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/phylum']);
$class = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/class']);
$order = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/order']);
$family = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/family']);
$rank = Rank::find_or_create_by_translated_label($rank_label);
$dataset_id = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/datasetID']);
$taxonomic_status = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/taxonomicStatus']);
$source_url = @self::field_decode($row['http://rs.tdwg.org/ac/terms/furtherInformationURL']);
if (!$source_url) {
$source_url = @self::field_decode($row['http://purl.org/dc/terms/source']);
}
if (!$source_url) {
$source_url = @self::field_decode($row['http://purl.org/dc/terms/references']);
}
if (!$source_url) {
$source_url = @self::field_decode($row['http://purl.org/dc/terms/isReferencedBy']);
}
if (isset($row['http://rs.tdwg.org/dwc/terms/taxonRemarks'])) {
$taxon_remarks = @self::field_decode($row['http://rs.tdwg.org/dwc/terms/taxonRemarks']);
} else {
$taxon_remarks = NULL;
}
if (!$taxon_remarks && strtolower($taxonomic_status) == 'provisionally accepted name') {
$taxon_remarks = "provisionally accepted name";
}
// TODO: This block is somewhat confusing. Clearly, it's clearing the
// rank that's currently being read, but shouldn't it also clear all of
// the ranks below that?
if (strtolower($rank_label) == 'kingdom') {
$kingdom = null;
}
if (strtolower($rank_label) == 'phylum') {
$phylum = null;
}
if (strtolower($rank_label) == 'class') {
$class = null;
}
if (strtolower($rank_label) == 'order') {
$order = null;
}
if (strtolower($rank_label) == 'family') {
$family = null;
}
if (strtolower($rank_label) == 'genus') {
$genus = null;
//.........这里部分代码省略.........
开发者ID:eliagbayani,项目名称:maps_test,代码行数:101,代码来源:ArchiveDataIngester.php
示例15: Basic
// Classes needed for index.php
$ipbanObj = new Basic($mysqli, "ipban", "ipaddress");
if ($ipbanObj->select($IP_ADDRESS, false)) {
$ipbanInfo = $ipbanObj->get_info();
if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) {
die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>");
} else {
$ipbanObj->delete();
}
}
// Start Page
$PAGE_NAME = "Ranks - ";
$dispBreadCrumb = "";
include $prevFolder . "themes/" . $THEME . "/_header.php";
$member = new Member($mysqli);
$rankObj = new Rank($mysqli);
$rankCatObj = new RankCategory($mysqli);
$breadcrumbObj->setTitle("Ranks");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Ranks");
include $prevFolder . "include/breadcrumb.php";
?>
<table id='rankPageTable' class='formTable' style='width: 75%; margin-left: auto; margin-right: auto'>
<?php
$result = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory WHERE hidecat = '0' ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
$rankCatObj->select($row['rankcategory_id']);
$rankCatInfo = $rankCatObj->get_info_filtered();
if ($rankCatInfo['useimage'] == 1 && $rankCatInfo['imageurl'] != "") {
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:ranks.php
示例16: foreach
<?php
foreach ($squads as $squad) {
?>
<?php
$leader = Member::findById($squad->leader_id);
?>
<?php
$platoon = Platoon::findById($squad->platoon_id);
?>
<option value='<?php
echo $squad->id;
?>
'><?php
echo $squad->leader_id != 0 ? Rank::convert($leader->rank_id)->abbr . " " . ucwords($leader->forum_name) : "TBA (Squad #{$squad->id})";
?>
- <?php
echo $platoon->name;
?>
</option>
<?php
}
?>
<?php
}
?>
<option value='0' selected>None (Division Leader)</option>
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:31,代码来源:view_member.php
示例17: Rank
}
// Check Auto Days
if ($_POST['autodays'] != "") {
if (!is_numeric($_POST['autodays']) or is_numeric($_POST['autodays']) and $_POST['autodays'] < 0) {
$countErrors++;
$dispError .= " <b>·</b> Auto days must either be blank or a positive numeric value.<br>";
}
}
if ($_POST['autodisable'] != "") {
if (!is_numeric($_POST['autodisable']) or is_numeric($_POST['autodisable']) and $_POST['autodisable'] < 0) {
$countErrors++;
$dispError .= " <b>·</b> Auto disable must either be blank or a positive numeric value.<br>";
}
}
// Check Rank Order and Promote Power
$checkRankObj = new Rank($mysqli);
if ($_POST['rankorder'] == $rankInfo['rank_id']) {
// Hack attempt
$countErrors++;
$dispError .= " <b>·</b> You selected an invalid rank order. (possible hack attempt?)<br>";
}
//Check if rank selected for rank order is an actual rank
if ($checkRankObj->select($_POST['rankorder'])) {
$checkRankInfo = $checkRankObj->get_info();
if ($_POST['beforeafter'] == "before") {
$intTempRankOrder = $checkRankInfo['ordernum'] + 1;
} else {
$intTempRankOrder = $checkRankInfo['ordernum'] - 1;
}
// If the rank order is the same do nothing keep it the same
// If its not the same make room for the new order and then resort ordernum
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:edit.php
示例18: dirname
<?php
require_once dirname(__FILE__) . '/features/classes/Servants.php';
require_once dirname(__FILE__) . '/features/classes/Rank.php';
$servantsObj = new Servants();
$servantsObj->connect();
$servantsObj->fetch_servants();
$rankObj = new Rank();
$rankObj->connect();
$rankObj->fetch_rank();
?>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="Description"
content="Strona jednego z najstarszych polskich klanów Diablo. Zrzeszamy graczy serii Diablo od 2000 roku. Od 2012 roku nasza działalność skupia się na scenie Diablo 3!"/>
<meta name="Keywords"
content="Diablo, Diablo 3, Diablo3, Diablo III, Klan, Clan, AZM, Clan AZM, Klan AZM, Słudzy Azmodana, Azmodan, forum, PvP, d3cl, "/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<title>Słudzy Azmodana =AZM= klan Diablo 3</title>
<script type='text/javascript' src='jquery-1.10.js'></script>
<script src='nprogress.js'></script>
<link rel="stylesheet" type="text/css" media="all" href="nprogress.css"/>
<script>
// NProgress.start();
</script>
</head>
<body>
<div id="tabela">
开发者ID:sekarasiewicz,项目名称:azm_sludzy,代码行数:30,代码来源:sludzy.php
示例19: foreach
'></input>
<div class="form-group">
<select name="leader_id" class="form-control">
<?php
if (count((array) $leaders)) {
?>
<?php
foreach ($leaders as $leader) {
?>
<option value="<?php
echo $leader->id;
?>
"><?php
echo Rank::convert($leader->rank_id)->abbr . " " . ucwords($leader->forum_name);
?>
</option>
<?php
}
?>
<?php
}
?>
<option value="0">None</option>
</select>
</div>
</div>
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:30,代码来源:modify_squad.php
示例20: generate
public function generate()
{
// header
$division_structure = "[table='align:center,width: {$this->info_width}']";
$division_structure .= "[tr][td]";
// banner
$division_structure .= "[center][img]http://puu.sh/kGjU9/4f331d1a99.jpg[/img][/center]\r\n";
/**
* ------division leaders-----
*/
$division_structure .= "\r\n\r\n[center][size=5][color={$this->div_name_color}][b][i][u]Division Leaders[/u][/i][/b][/color][/size][/center]\r\n";
$division_structure .= "[center][size=4]";
$division_leaders = Division::findDivisionLeaders($this->game_id);
foreach ($division_leaders as $player) {
$player_name = Rank::convert($player->rank_id)->abbr . " " . $player->forum_name;
$aod_url = Member::createAODlink(array('member_id' => $player->member_id, 'forum_name' => $player_name, 'color' => $this->division_leaders_color));
$division_structure .= "{$aod_url} - {$player->position_desc}\r\n";
}
$division_structure .= "[/size][/center]\r\n\r\n";
/**
* -----general sergeants-----
*/
$division_structure .= "[center][size=3][color={$this->platoon_pos_color}]General Sergeants[/color]\r\n";
$general_sergeants = Division::findGeneralSergeants($this->game_id);
foreach ($general_sergeants as $player) {
$player_name = Rank::convert($player->rank_id)->abbr . " " . $player->forum_name;
$aod_url = Member::createAODlink(array('member_id' => $player->member_id, 'forum_name' => $player_name));
$division_structure .= "{$aod_url}\r\n";
}
$division_structure .= "[/size][/center]";
$division_structure .= "[/td][/tr][/table]";
/**
* ---------platoons----------
*/
$division_structure .= "\r\n\r\n[table='align:center,width: {$this->players_width}']";
$platoons = $this->platoons;
$i = 1;
foreach ($platoons as $platoon) {
$countMembers = Platoon::countPlatoon($platoon->id);
if ($i == 1) {
$division_structure .= "[tr]";
$division_structure .= "[td]";
} else {
$division_structure .= "[td]";
}
$division_structure .= "[size=5]{$platoon->name}[/size]\r\n\r\n";
// Legion Commander
$player = Member::findByMemberId($platoon->leader_id);
// is a Legion Commander assigned?
if ($platoon->leader_id != 0) {
$player_name = Rank::convert($player->rank_id)->abbr . " " . $player->forum_name;
$aod_url = Member::createAODlink(array('member_id' => $player->member_id, 'forum_name' => $player_name, 'color' => $this->platoon_leaders_color));
$division_structure .= "[size=3][color={$this->platoon_pos_color}]Legion Commander[/color]\r\n{$aod_url}[/size]\r\n\r\n";
} else {
$division_structure .= "[size=3][color={$this->platoon_pos_color}]Legion Commander[/color]\r\n[color={$this->platoon_leaders_color}]TBA[/color][/size]\r\n\r\n";
}
// Regimental Leaders
$squads = Squad::findAll($this->game_id, $platoon->id);
foreach ($squads as $squad) {
if ($squad->leader_id != 0) {
$squad_leader = Member::findById($squad->leader_id);
$player_name = Rank::convert($squad_leader->rank_id)->abbr . " " . $squad_leader->forum_name;
$aod_url = Member::createAODlink(array('member_id' => $squad_leader->member_id, 'forum_name' => $player_name, 'color' => $this->squad_leaders_color));
$division_structure .= "[size=3][color={$this->platoon_pos_color}]Regimental Leader[/color]\r\n{$aod_url}[/size]\r\n\r\n";
$division_structure .= "[size=1]";
// direct recruits
$recruits = arrayToObject(Member::findRecruits($squad_leader->member_id, $squad_leader->platoon_id, $squad->id, true));
if (count((array) $recruits)) {
$division_structure .= "[list=1]";
foreach ($recruits as $player) {
$player_name = Rank::convert($player->rank_id)->abbr . " " . $player->forum_name;
$aod_url = Member::createAODlink(array('member_id' => $player->member_id, 'forum_name' => $player_name));
$division_structure .= "[*]{$aod_url}\r\n";
}
$division_structure .= "[/list]";
}
} else {
$division_structure .= "[size=3][color={$this->platoon_pos_color}]Regimental Leader[/color]\r\n[color={$this->squad_leaders_color}]TBA[/color][/size]\r\n";
$division_structure .= "[size=1]";
}
$division_structure .= "\r\n";
// squad members
$squadMembers = arrayToObject(Squad::findSquadMembers($squad->id, true, $squad_leader->member_id));
if (count((array) $squadMembers)) {
foreach ($squadMembers as $player) {
$player_name = Rank::convert($player->rank_id)->abbr . " " . $player->forum_name;
$aod_url = Member::createAODlink(array('member_id' => $player->member_id, 'forum_name' => $player_name));
$division_structure .= "{$aod_url}\r\n";
}
}
$division_structure .= "[/size]\r\n";
}
$division_structure .= "\r\n\r\n";
if ($i % $this->num_columns == 0) {
$division_structure .= "[/td][/tr][tr]";
}
$division_structure .= "[/td]";
$i++;
}
// end last platoon
//.........这里部分代码省略.........
开发者ID:Oogieboogie23,项目名称:Division-Tracker,代码行数:101,代码来源:SWBDivisionStructure.php
注:本文中的Rank类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论