本文整理汇总了PHP中Visitor::getAccount方法的典型用法代码示例。如果您正苦于以下问题:PHP Visitor::getAccount方法的具体用法?PHP Visitor::getAccount怎么用?PHP Visitor::getAccount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visitor
的用法示例。
在下文中一共展示了Visitor::getAccount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Account
$action = (string) $_REQUEST['action'];
} else {
$action = '';
}
$logged = false;
$account_logged = new Account();
$group_id_of_acc_logged = 0;
// with ONLY_PAGE option we want disable useless SQL queries
if (!ONLY_PAGE) {
// logged boolean value: true/false
$logged = Visitor::isLogged();
// Account object with account of logged player or empty Account
$account_logged = Visitor::getAccount();
// group of acc. logged
if (Visitor::isLogged()) {
$group_id_of_acc_logged = Visitor::getAccount()->getPageAccess();
}
}
$layout_name = './layouts/' . Website::getWebsiteConfig()->getValue('layout');
$title = ucwords($subtopic) . ' - ' . Website::getServerConfig()->getValue('servername');
$topic = $subtopic;
$passwordency = Website::getServerConfig()->getValue('passwordtype');
if ($passwordency == 'plain') {
$passwordency = '';
}
$news_content = '';
$layout_ini = parse_ini_file($layout_name . '/layout_config.ini');
foreach ($layout_ini as $key => $value) {
$config['site'][$key] = $value;
}
//###################### FUNCTIONS ######################
示例2: foreach
}
if (!$bidded) {
// show bid form
$main_content .= '<form action="index.php" method="post">
<input type="hidden" name="subtopic" value="houses" />
<input type="hidden" name="action" value="bid" />
<input type="hidden" name="house" value="' . $house->getID() . '" />
<input type="hidden" name="do_bid" value="1" />
<table border=0 cellspacing=1 cellpadding=4 width=100%>
<tr bgcolor="' . $config['site']['vdarkborder'] . '" class=white>
<td colspan="2" style="color:white;"><b>Bid at auction of house ' . $house->getName() . ' placed in ' . $towns_list[$house->getTown()] . '</b></td>
</tr>
<tr bgcolor="' . $config['site']['darkborder'] . '">
<td><b>Owner:</b></td>
<td><select name="bidder">';
foreach (Visitor::getAccount()->getPlayers() as $accountPlayer) {
$main_content .= '<option value="' . $accountPlayer->getID() . '"';
if ($accountPlayer->getID() == $house->getHighestBidder()) {
$main_content .= 'selected="selected"';
}
$main_content .= '>' . htmlspecialchars($accountPlayer->getName()) . '</option>';
}
$main_content .= '</select></td>
</tr>
<tr bgcolor="' . $config['site']['lightborder'] . '">
<td width="200px"><b>Your maximum offer:</b></td>
<td><input type="text" size="9" name="bid" value="' . ($houseBidded['house_id'] == $house->getID() ? $house->getBid() : $house->getLastBid() + 1) . '" /> gold coins</td>
</tr>
<tr bgcolor="' . $config['site']['darkborder'] . '">
<td><b>Current bid:</b></td>
<td>' . $house->getLastBid() . ' gold coins</td>