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


PHP SmrMySqlDatabase::getBoolean方法代码示例

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


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

示例1: USING

             $playerName = 'Planet Reporter';
         }
         if ($sender_id == -1) {
             $playerName = 'Bank Reporter';
         }
         if ($sender_id == -2) {
             $playerName = 'Forces Reporter';
         }
         if ($sender_id == -3) {
             $playerName = 'Game Admins';
         }
     }
     $threads[$i]['Sender'] = $playerName;
     $db2->query('SELECT * FROM player_has_alliance_role JOIN alliance_has_roles USING(game_id,alliance_id,role_id) WHERE account_id = ' . $db->escapeNumber($player->getAccountID()) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND alliance_id=' . $db->escapeNumber($alliance->getAllianceID()) . ' LIMIT 1');
     $db2->nextRecord();
     $threads[$i]['CanDelete'] = $player->getAccountID() == $sender_id || $db2->getBoolean('mb_messages');
     if ($threads[$i]['CanDelete']) {
         $container['thread_id'] = $threadID;
         $threads[$i]['DeleteHref'] = SmrSession::getNewHREF($container);
     }
     $threads[$i]['Replies'] = $db->getInt('num_replies');
     $thread_replies[$i] = $db->getInt('num_replies');
     $threads[$i]['SendTime'] = $db->getInt('sendtime');
     ++$i;
 }
 $container = create_container('skeleton.php', 'alliance_message_view.php');
 $container['alliance_id'] = $alliance->getAllianceID();
 $container['thread_ids'] = $thread_ids;
 $container['thread_topics'] = $thread_topics;
 $container['thread_replies'] = $thread_replies;
 $container['alliance_eyes'] = $alliance_eyes;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_message.php

示例2: while

 $PHP_OUTPUT .= '<tr>';
 $PHP_OUTPUT .= '<th>ID</th>';
 $PHP_OUTPUT .= '<th>Login</th>';
 $PHP_OUTPUT .= '<th>eMail</th>';
 $PHP_OUTPUT .= '<th>Action</th>';
 $PHP_OUTPUT .= '</tr>';
 while ($db->nextRecord()) {
     $db2->query('SELECT * FROM account WHERE password = ' . $db->escape_string($db->getField('password')));
     while ($db2->nextRecord()) {
         $curr_account_id = $db2->getField('account_id');
         $db3->query('SELECT * FROM account_is_closed WHERE account_id = ' . $db->escapeNumber($curr_account_id) . ' LIMIT 1');
         $isDisabled = $db3->getNumRows() > 0;
         $PHP_OUTPUT .= '<tr' . ($isDisabled ? ' class="red"' : '') . '>';
         $PHP_OUTPUT .= '<td>' . $db2->getField('account_id') . '</td>';
         $PHP_OUTPUT .= '<td>' . $db2->getField('login') . '</td>';
         $PHP_OUTPUT .= '<td' . ($db2->getBoolean('validated') ? '' : ' style="text-decoration:line-through;"') . '>' . $db2->getField('email') . ' (' . ($db2->getBoolean('validated') ? 'Valid' : 'Invalid') . ')</td>';
         $PHP_OUTPUT .= '<td align="center"><input type="checkbox" name="disable_account[]" value="' . $curr_account_id . '"';
         // check if this guy is maybe already disabled
         $db3->query('SELECT * FROM account_is_closed WHERE account_id = ' . $db->escapeNumber($curr_account_id));
         if ($isDisabled) {
             $PHP_OUTPUT .= ' checked';
         } else {
             if ($action == 'Select All') {
                 $PHP_OUTPUT .= ' checked';
             }
         }
         $PHP_OUTPUT .= '></td>';
         $PHP_OUTPUT .= '</tr>';
     }
     $PHP_OUTPUT .= '<tr>';
     $PHP_OUTPUT .= '<td colspan="3">&nbsp;</td>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:password_check.php

示例3: stripslashes

    $PHP_OUTPUT .= 'Enter the account id of the entry you wish to edit:';
    $PHP_OUTPUT .= create_echo_form(create_container('skeleton.php', 'album_moderate.php'));
    $PHP_OUTPUT .= '<input type="number" name="account_id" size="5" id="InputFields" class="center">&nbsp;';
    $PHP_OUTPUT .= create_submit('Submit');
    $PHP_OUTPUT .= '</form>';
    $PHP_OUTPUT .= $error_msg;
} else {
    // check if input is numeric
    if (!is_numeric($account_id)) {
        create_error('Please enter an account ID, which has to be numeric!');
    }
    // check if the givin account really has an entry
    if ($account_id > 0) {
        $db->query('SELECT * FROM album WHERE account_id = ' . $db->escapeNumber($account_id) . ' AND Approved = \'YES\'');
        if ($db->nextRecord()) {
            $disabled = $db->getBoolean('disabled');
            $location = stripslashes($db->getField('location'));
            $email = stripslashes($db->getField('email'));
            $website = stripslashes($db->getField('website'));
            $day = $db->getField('day');
            $month = $db->getField('month');
            $year = $db->getField('year');
            $other = nl2br(stripslashes($db->getField('other')));
        } else {
            $account_id = 0;
            $error_msg = '<div align="center" class="red bold">This User doesn\'t have an album entry or it needs to be approved first!</div>';
        }
    }
    $container = create_container('album_moderate_processing.php', '');
    $container['account_id'] = $account_id;
    $PHP_OUTPUT .= '<table border="0" align="center" cellpadding="5" cellspacing="0">';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:album_moderate.php


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