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


PHP Visitor::getAccount方法代码示例

本文整理汇总了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 ######################
开发者ID:Pietia10,项目名称:Gesior-for-OTServ,代码行数:31,代码来源:load.compat.php

示例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>
开发者ID:aottibia,项目名称:www,代码行数:31,代码来源:houses.php


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