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


PHP SmrMySqlDatabase::getNumRows方法代码示例

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


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

示例1: main_page

function main_page()
{
    // database object
    $db = new SmrMySqlDatabase();
    // list of all first letter nicks
    create_link_list();
    // news
    echo '<p><u>Space Merchant Realms Photo Album Rules</u>';
    echo '<ol>';
    echo '<li>500 x 500 maximum pixel size only.</li>';
    echo '<li>Only .JPG or .GIF files will be accepted.</li>';
    echo '<li>NO derogatory or vulgar pictures will be accepted.</li>';
    echo '<li>ALL pictures MUST depict the real you. No anime, fictitional, or otherwise \'fake\' pictures are allowed.</li>';
    echo '<li>Please watch your language while posting within the album. Same general rules apply here as they do in the SMR chat room.</li>';
    echo '<li>Please respect all members in this area. Treat them as you would want to be treated. Do not post cruel or otherwise unneeded comments about someone or their property.</li>';
    echo '<li>You must be logged into your account to post within this album, therefore if you break any of these rules your account may be subject to disablement. Prolonged periods will incur if you break any of these rules more than once.</li>';
    echo '</ol>';
    echo '<small><b>Please Note:</b> Your warning is written here. You will not be warned beyond this point. It will be a 24 hour disablement beyond this warning the first time you break a rule. (IF you break a rule)</small>';
    echo '</p>';
    echo '<p>&nbsp;</p>';
    // most hits
    echo '<p><u>Top 5 Pictures</u><br /><br />';
    $db->query('SELECT *
				FROM album
				WHERE approved = \'YES\'
				ORDER BY page_views DESC
				LIMIT 5');
    if ($db->getNumRows()) {
        while ($db->nextRecord()) {
            $page_views = $db->getField('page_views');
            $nick = get_album_nick($db->getField('account_id'));
            echo '<a href="' . URL . '/album/?' . urlencode($nick) . '">' . $nick . '</a> (' . $page_views . ')<br />';
        }
    }
    // latest picture
    echo '<p><u>Latest Picture</u><br /><br />';
    $db->query('SELECT *
				FROM album
				WHERE approved = \'YES\'
				ORDER BY created DESC
				LIMIT 5');
    if ($db->getNumRows()) {
        while ($db->nextRecord()) {
            $created = $db->getField('created');
            $nick = get_album_nick($db->getField('account_id'));
            echo '<span style="font-size:85%;"><b>[' . date(defined('DATE_FULL_SHORT') ? DATE_FULL_SHORT : DEFAULT_DATE_FULL_SHORT, $created) . ']</b> Picture of <a href="' . URL . '/album/?' . urlencode($nick) . '">' . $nick . '</a> added</span><br />';
        }
    } else {
        echo '<span style="font-size:85%;">no entries</span>';
    }
    echo '</p>';
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:52,代码来源:album_functions.php

示例2: channel_msg_rank

function channel_msg_rank($fp, $rdata)
{
    global $channel, $nick;
    // did he gave us no parameter?
    if (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!rank\\s$/i', $rdata, $msg) || preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $nick . '\\s:rank\\s$/i', $rdata, $msg)) {
        echo_r($msg);
        fputs($fp, 'NOTICE ' . $msg[1] . ' :SYNTAX !rank <nick>' . EOL);
        return true;
    }
    // in channel we only accept !rank
    // in private msg we accept both
    if (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!rank\\s(.*)\\s$/i', $rdata, $msg) || preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $nick . '\\s:?rank\\s(.*)\\s$/i', $rdata, $msg)) {
        echo_r($msg);
        $db = new SmrMySqlDatabase();
        $db2 = new SmrMySqlDatabase();
        $db->query('SELECT * FROM player WHERE player_name = ' . $db->escape_string($msg[4], true));
        if ($db->getNumRows()) {
            while ($db->nextRecord()) {
                $player_name = stripslashes($db->getField('player_name'));
                $experience = $db->getField('experience');
                $game_id = $db->getField('game_id');
                $db2->query('SELECT COUNT(*) as our_rank FROM player ' . 'WHERE game_id = ' . $game_id . ' AND ' . '(experience > ' . $experience . ' OR ' . '(experience = ' . $experience . ' AND ' . 'player_name <= ' . $db->escape_string($player_name, true) . ' ))');
                if ($db2->nextRecord()) {
                    $our_rank = $db2->getField('our_rank');
                }
                // how many players are there?
                $db2->query('SELECT COUNT(*) as total_player FROM player WHERE game_id = ' . $game_id);
                if ($db2->nextRecord()) {
                    $total_player = $db2->getField('total_player');
                }
                $db2->query('SELECT game_name FROM game WHERE game_id = ' . $game_id);
                if ($db2->nextRecord()) {
                    $game_name = $db2->getField('game_name');
                }
                fputs($fp, 'NOTICE ' . $msg[1] . ' :' . $msg[1] . ' you are ranked ' . $our_rank . ' out of ' . $total_player . ' in ' . $game_name . '!' . EOL);
            }
        } else {
            fputs($fp, 'NOTICE ' . $msg[1] . ' :No Trader found that matches your query!' . EOL);
        }
        return true;
    }
    return false;
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:43,代码来源:rank.php

示例3: while

 $PHP_OUTPUT .= create_submit('Select All');
 $PHP_OUTPUT .= '</form>';
 $PHP_OUTPUT .= create_echo_form(create_container('password_check_processing.php', ''));
 $PHP_OUTPUT .= '<table>';
 $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>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:password_check.php

示例4: addbyte

    $file .= addbyte(sqrt($db->getField('num_sec')));
}
//planet definitions (num of, [size of name, name])
$file .= addbyte(2);
$file .= addbyte(8);
$file .= 'Friendly';
$file .= addbyte(5);
$file .= 'Enemy';
//done with all header info
$db2 = new SmrMySqlDatabase();
$db3 = new SmrMySqlDatabase();
$db->query('SELECT * FROM sector WHERE game_id = ' . $game_id . ' ORDER BY sector_id');
while ($db->nextRecord()) {
    $sector_id = $db->getField('sector_id');
    $db2->query('SELECT * FROM player_visited_sector WHERE sector_id = ' . $sector_id . ' AND game_id = ' . $game_id . ' AND account_id = ' . $db->escapeNumber($player->getAccountID()) . ' LIMIT 1');
    if ($db2->getNumRows() > 0) {
        $CurrByte = 3;
        $up = $db->getField('link_up');
        $db2->query('SELECT * FROM player_visited_sector WHERE sector_id = ' . $up . ' AND game_id = ' . $game_id . ' AND account_id = ' . $db->escapeNumber($player->getAccountID()) . ' LIMIT 1');
        if ($db2->getNumRows() == 0 && $up != 0) {
            $CurrByte += 128;
        }
        $right = $db->getField('link_right');
        $db2->query('SELECT * FROM player_visited_sector WHERE sector_id = ' . $right . ' AND game_id = ' . $game_id . ' AND account_id = ' . $db->escapeNumber($player->getAccountID()) . ' LIMIT 1');
        if ($db2->getNumRows() == 0 && $right != 0) {
            $CurrByte += 64;
        }
        $down = $db->getField('link_down');
        $db2->query('SELECT * FROM player_visited_sector WHERE sector_id = ' . $down . ' AND game_id = ' . $game_id . ' AND account_id = ' . $db->escapeNumber($player->getAccountID()) . ' LIMIT 1');
        if ($db2->getNumRows() == 0 && $down != 0) {
            $CurrByte += 32;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:mgu_create.php

示例5: while

 }
 while ($continue) {
     if (isset($stop) && $stop != '') {
         $continue = '0';
         continue;
     }
     if ($continue == 'next') {
         if (isset($match_sec) && $match_sec != '') {
             $isset = 'yes';
         } else {
             $match_sec = $login_name;
             $isset = 'no';
         }
         $db3->query('SELECT * FROM account_is_closed WHERE suspicion = ' . $db->escapeString($match_sec));
         $db2->query('SELECT * FROM account WHERE login = ' . $db->escapeString($match_sec));
         if ($db3->getNumRows()) {
             while ($db3->nextRecord()) {
                 //we have a match the other way
                 $curr_acc =& SmrAccount::getAccount($db3->getField('account_id'));
                 $id = $curr_acc->getAccountID();
                 $match_sec = $curr_acc->getLogin();
                 if (!in_array($match_sec, $names)) {
                     $continue = 'next';
                     $PHP_OUTPUT .= $login_name . ' is disabled matching ' . $match_sec . '<br />';
                 } elseif (in_array($match_sec, $next_arr)) {
                     $stop = 'yes';
                     continue;
                 } else {
                     $next_arr[] = $match_sec;
                 }
             }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:info_check.php

示例6: rand

reset($planet);
foreach ($planet as $galaxy_id => $amount) {
    $count = 0;
    // get a sector with none port
    $db->query('SELECT * FROM sector
				WHERE game_id = ' . $db->escapeNumber($var['game_id']) . '
				AND galaxy_id = ' . $db->escapeNumber($galaxy_id) . '
				ORDER BY rand()');
    while ($count < $amount && $db->nextRecord()) {
        $sector_id = $db->getInt('sector_id');
        // does this sector have a fed beacon??
        $db2->query('SELECT * FROM location
					WHERE game_id = ' . $db->escapeNumber($var['game_id']) . '
						AND sector_id = ' . $db->escapeNumber($sector_id) . '
						AND location_type_id = 1');
        if ($db2->getNumRows() > 0) {
            continue;
        }
        // ok we did $count planets so far
        $count++;
        $inhabitable_time = $time + pow(mt_rand(45, 85), 3);
        // insert planet into db
        $db2->query('INSERT INTO planet (game_id, sector_id, inhabitable_time)
					VALUES (' . $db->escapeNumber($var['game_id']) . ', ' . $db->escapeNumber($sector_id) . ', ' . $db->escapeNumber($inhabitable_time) . ')');
    }
}
$container = array();
$container['url'] = 'skeleton.php';
$container['body'] = 'universe_create_ships.php';
$container['game_id'] = $var['game_id'];
forward($container);
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:universe_create_planets_processing.php

示例7: header

        SmrSession::update();
        if ($disabled['Reason'] == 'Invalid eMail') {
            header('Location: ' . URL . '/email.php');
            exit;
        } else {
            header('Location: ' . URL . '/disabled.php');
            exit;
        }
    }
    // *********************************
    // *
    // * a u t o   n e w b i e   t u r n
    // *
    // *********************************
    $db->query('SELECT * FROM active_session ' . 'WHERE last_accessed > ' . $db->escapeNumber(TIME - TIME_BEFORE_NEWBIE_TIME));
    if ($db->getNumRows() == 0) {
        $db->query('UPDATE player SET newbie_turns = 1
					WHERE newbie_turns = 0 AND
						  land_on_planet = \'FALSE\'');
    }
    // ******************************************
    // *
    // * r e m o v e   e x p i r e d   s t u f f
    // *
    // ******************************************
    $db->query('DELETE FROM player_has_ticker WHERE expires <= ' . $db->escapeNumber(TIME));
    $db->query('DELETE FROM cpl_tag WHERE expires <= ' . $db->escapeNumber(TIME) . ' AND expires > 0');
    // save ip
    $account->updateIP();
    //now we set a cookie that we can use for mult checking
    if (!isset($_COOKIE['Session_Info'])) {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:login_processing2.php

示例8: SmrMySqlDatabase

        case 3:
            $PHP_OUTPUT .= '<span class="yellow">' . $_REQUEST['PlayerName'] . '</span> has been added to your blacklist.';
            break;
        case 4:
            $PHP_OUTPUT .= '<span class="red bold">ERROR: </span>No entries selected for deletion.';
            break;
        default:
            $PHP_OUTPUT .= '<span class="red bold">ERROR: </span>Unknown error event.';
            break;
    }
    $PHP_OUTPUT .= '<br /><br />';
}
$PHP_OUTPUT .= '<h2>Blacklisted Players</h2><br />';
$db = new SmrMySqlDatabase();
$db->query('SELECT p.player_name, p.game_id, b.entry_id FROM player p JOIN message_blacklist b ON p.account_id = b.blacklisted_id AND b.game_id = p.game_id WHERE b.account_id=' . $db->escapeNumber($player->getAccountID()) . ' ORDER BY p.game_id, p.player_name');
if ($db->getNumRows()) {
    $container = array();
    $container['url'] = 'message_blacklist_del.php';
    $form = create_form($container, 'Remove Selected');
    $PHP_OUTPUT .= $form['form'];
    $PHP_OUTPUT .= '<table class="standard"><tr><th>Option</th><th>Name</th><th>Game ID</th>';
    while ($db->nextRecord()) {
        $row = $db->getRow();
        $PHP_OUTPUT .= '<tr>';
        $PHP_OUTPUT .= '<td class="center shrink"><input type="checkbox" name="entry_ids[]" value="' . $row['entry_id'] . '"></td>';
        $PHP_OUTPUT .= '<td>' . $row['player_name'] . '</td>';
        $PHP_OUTPUT .= '<td>' . $row['game_id'] . '</td>';
        $PHP_OUTPUT .= '</tr>';
    }
    $PHP_OUTPUT .= '</table><br />';
    $PHP_OUTPUT .= $form['submit'];
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:message_blacklist.php

示例9: urldecode

	<tr>
	<td width="1" bgcolor="#0B8D35"></td>
	<td align="left" valign="top" bgcolor="#06240E">
	<table width="100%" height="100%" border="0" cellspacing="5" cellpadding="5">
	<tr>
	<td valign="top">
	<?php 
    if (!empty($_SERVER['QUERY_STRING'])) {
        // query string should be a nick or some letters of a nick
        $query = urldecode($_SERVER['QUERY_STRING']);
        $db->query('SELECT account_id as album_id
					FROM album JOIN account USING(account_id)
					WHERE hof_name LIKE ' . $db->escapeString($query . '%') . ' AND
						  approved = \'YES\'
					ORDER BY hof_name');
        if ($db->getNumRows() > 1) {
            $db2->query('SELECT account_id as album_id
					FROM album JOIN account USING(account_id)
					WHERE hof_name = ' . $db->escapeString($query) . ' AND
						  approved = \'YES\'
					ORDER BY hof_name');
            if ($db2->nextRecord()) {
                album_entry($db2->getField('album_id'));
            } else {
                // get all id's and build array
                $album_ids = array();
                while ($db->nextRecord()) {
                    $album_ids[] = $db->getField('album_id');
                }
                // double check if we have id's
                if (count($album_ids) > 0) {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:index.php

示例10: foreach

         $account_numbers[] = $acc_id;
     }
 }
 foreach ($ip_numbers as $something) {
     $amount += 1;
 }
 reset($ip_numbers);
 array_multisort($ip_numbers, $account_numbers);
 $i = 0;
 while ($i < $amount) {
     $account_wanted = array_shift($account_numbers);
     $ip_wanted = array_shift($ip_numbers);
     $new_acc =& SmrAccount::getAccount($account_wanted);
     $last_acc =& SmrAccount::getAccount($last_acc_id);
     $db2->query('SELECT * FROM account_is_closed WHERE account_id = ' . $db2->escapeNumber($acc_id));
     if ($db2->getNumRows() && $db_ip != $last_ip) {
         continue;
     }
     $PHP_OUTPUT .= '<tr>';
     $PHP_OUTPUT .= '<td align=center>' . $new_acc->getLogin() . ' (' . $new_acc->getAccountID() . ')</td>';
     $PHP_OUTPUT .= '<td align=center>' . $ip_wanted . '</td>';
     if ($ip_wanted == $last_ip && !$db2->nextRecord()) {
         $PHP_OUTPUT .= '<td align=center><span class="red">MATCH w/ ' . $last_acc->getLogin() . '</span></td>';
     } elseif ($ip_wanted == $last_ip) {
         $PHP_OUTPUT .= '<td align=center><span class="red">(Already disabled) MATCH w/ ' . $last_acc->getLogin() . '</span></td>';
     } else {
         $PHP_OUTPUT .= '<td align=center>&nbsp;</td>';
     }
     $PHP_OUTPUT .= '<td><input type="checkbox" name="account_id[]" value="' . $new_acc->getAccountID() . '"></td>';
     $PHP_OUTPUT .= '</tr>';
     $i += 1;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:account_ip_view_result.php

示例11: header

     //}
     $country_code = $_REQUEST['country_code'];
     //if (empty($country_code)) {
     //
     //	$msg = 'Please choose a country!';
     //	header('Location: '.URL.'/error.php?msg=' . rawurlencode(htmlspecialchars($msg, ENT_QUOTES)));
     //	exit;
     //}
 }
 if ($login == $password) {
     $msg = 'Your chosen password is invalid!';
     header('Location: ' . URL . '/error.php?msg=' . rawurlencode(htmlspecialchars($msg, ENT_QUOTES)));
     exit;
 }
 $db->query('SELECT * FROM account WHERE login = ' . $db->escapeString($login));
 if ($db->getNumRows() > 0) {
     $msg = 'This user name is already registered.';
     header('Location: ' . URL . '/error.php?msg=' . rawurlencode(htmlspecialchars($msg, ENT_QUOTES)));
     exit;
 }
 $db->query('SELECT * FROM account WHERE email = ' . $db->escapeString($email));
 if ($db->getNumRows() > 0) {
     $msg = 'This email address is already registered.';
     header('Location: ' . URL . '/error.php?msg=' . rawurlencode(htmlspecialchars($msg, ENT_QUOTES)));
     exit;
 }
 $referral = !empty($_REQUEST['referral_id']) ? $_REQUEST['referral_id'] : 0;
 if (!is_numeric($referral)) {
     $msg = 'Referral ID must be a number if entered!';
     header('Location: ' . URL . '/error.php?msg=' . rawurlencode(htmlspecialchars($msg, ENT_QUOTES)));
     exit;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:login_create_processing2.php

示例12: SmrMySqlDatabase

<?php

$template->assign('PageTopic', 'Galactic Post');
require_once get_file_loc('menu.inc');
create_galactic_post_menu();
$db2 = new SmrMySqlDatabase();
$db3 = new SmrMySqlDatabase();
$db->query('SELECT * FROM galactic_post_online WHERE game_id = ' . $db->escapeNumber($player->getGameID()));
if ($db->nextRecord()) {
    $paper_id = $db->getField('paper_id');
    $db2->query('SELECT * FROM galactic_post_paper WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND paper_id = ' . $paper_id);
    $db2->nextRecord();
    $paper_name = bbifyMessage($db2->getField('title'));
    $template->assign('PageTopic', 'Reading <i>Galactic Post</i> Edition : ' . $paper_name);
    $db2->query('SELECT * FROM galactic_post_paper_content WHERE paper_id = ' . $db2->escapeNumber($paper_id) . ' AND game_id = ' . $db2->escapeNumber($player->getGameID()));
    $even = $db2->getNumRows() % 2 == 0;
    $curr_position = 0;
    $PHP_OUTPUT .= '<table align="center" spacepadding="20" cellspacing="20">';
    $amount = $db2->getNumRows();
    if ($even === false) {
        $amount += 1;
    }
    while ($curr_position < $amount) {
        $curr_position += 1;
        if ($even === false && $db2->getNumRows() + 1 == $curr_position) {
            $PHP_OUTPUT .= '<td>&nbsp;</td>';
            continue;
        }
        $db2->nextRecord();
        //now we have the articles in this paper.
        $db3->query('SELECT * FROM galactic_post_article WHERE game_id = ' . $db3->escapeNumber($player->getGameID()) . ' AND article_id = ' . $db3->escapeNumber($db2->getField('article_id')) . ' LIMIT 1');
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:galactic_post_read.php

示例13: array

    $alliance_eyes = array();
    while ($db->nextRecord()) {
        $threadID = $db->getInt('thread_id');
        $alliance_eyes[$i] = $db->getInt('alliance_only') == 1;
        $threads[$i]['ThreadID'] = $threadID;
        $thread_ids[$i] = $threadID;
        $thread_topics[$i] = $db->getField('topic');
        $threads[$i]['Topic'] = $db->getField('topic');
        $db2->query('SELECT time
					FROM player_read_thread 
					WHERE account_id=' . $db2->escapeNumber($player->getAccountID()) . '
					AND game_id=' . $db2->escapeNumber($player->getGameID()) . '
					AND alliance_id =' . $db2->escapeNumber($alliance->getAllianceID()) . '
					AND thread_id=' . $db2->escapeNumber($threadID) . '
					AND time>' . $db2->escapeNumber($db->getInt('sendtime')) . ' LIMIT 1');
        $threads[$i]['Unread'] = $db2->getNumRows() == 0;
        if ($db->getInt('sender_id') > 0) {
            $db2->query('SELECT
						player.player_name as player_name,
						alliance_thread.sender_id as sender_id
						FROM player
						JOIN alliance_thread ON alliance_thread.game_id = player.game_id AND player.account_id=alliance_thread.sender_id
						WHERE player.game_id=' . $db2->escapeNumber($player->getGameID()) . '
						AND alliance_thread.alliance_id=' . $db2->escapeNumber($alliance->getAllianceID()) . '
						AND alliance_thread.thread_id=' . $db2->escapeNumber($threadID) . '
						AND alliance_thread.reply_id=1 LIMIT 1
						');
            if ($db2->nextRecord()) {
                $sender_id = $db2->getInt('sender_id');
                $author =& SmrPlayer::getPlayer($sender_id, $player->getGameID());
                $playerName = $author->getLinkedDisplayName(false);
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_message.php

示例14: made

 $PHP_OUTPUT .= create_link(create_container('skeleton.php', 'galactic_post_view_article.php'), 'View the articles');
 $PHP_OUTPUT .= '<br />';
 $PHP_OUTPUT .= create_link(create_container('skeleton.php', 'galactic_post_make_paper.php'), 'Make a paper');
 $PHP_OUTPUT .= '<br />';
 $PHP_OUTPUT .= create_link(create_container('skeleton.php', 'galactic_post_view_members.php'), 'View Members');
 $PHP_OUTPUT .= '<br />';
 $db->query('SELECT * FROM galactic_post_paper WHERE game_id = ' . $db->escapeNumber($player->getGameID()));
 if ($db->getNumRows()) {
     $PHP_OUTPUT .= 'The following papers are already made (note papers must have 3-8 articles to go to the press)';
 }
 while ($db->nextRecord()) {
     $paper_name = $db->getField('title');
     $paper_id = $db->getField('paper_id');
     $PHP_OUTPUT .= '<span class="red">***</span><i>' . $paper_name . '</i>';
     $db2->query('SELECT * FROM galactic_post_paper_content WHERE paper_id = ' . $db2->escapeNumber($paper_id) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()));
     $PHP_OUTPUT .= ' which contains <span class="red"> ' . $db2->getNumRows() . ' </span>articles. ';
     if ($db2->getNumRows() > 2 && $db2->getNumRows() < 9) {
         $container = array();
         $container['url'] = 'galactic_post_make_current.php';
         $container['id'] = $paper_id;
         $PHP_OUTPUT .= create_link($container, '<b>HIT THE PRESS!</b>');
     }
     $PHP_OUTPUT .= '<br />';
     $container = array();
     $container['url'] = 'skeleton.php';
     $container['body'] = 'galactic_post_delete_confirm.php';
     $container['paper'] = 'yes';
     $container['id'] = $paper_id;
     $PHP_OUTPUT .= create_link($container, 'Delete ' . $paper_name);
     $PHP_OUTPUT .= '<br />';
     $container = array();
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:galactic_post.php

示例15: strtoupper

            $PHP_OUTPUT .= '<span class="red bold">ERROR: </span>Invalid input.';
            break;
        case 2:
            $PHP_OUTPUT .= '<span class="yellow">' . strtoupper(trim($_REQUEST['Word'])) . '</span> will now be replaced with <span class="yellow">' . strtoupper(trim($_REQUEST['WordReplacement'])) . '</span>.';
            break;
        case 3:
            $PHP_OUTPUT .= '<span class="red bold">ERROR: </span>No entries selected for deletion.';
            break;
        default:
            $PHP_OUTPUT .= '<span class="red bold">ERROR: </span>Unknown error event.';
            break;
    }
    $PHP_OUTPUT .= '<br /><br />';
}
$PHP_OUTPUT .= '<h2>Filtered Words</h2><br />';
if (!$db->getNumRows()) {
    $PHP_OUTPUT .= 'No words are currently being filtered.<br /><br />';
} else {
    $container = array();
    $container['url'] = 'word_filter_del.php';
    $form = create_form($container, 'Remove Selected');
    $PHP_OUTPUT .= $form['form'];
    $PHP_OUTPUT .= '<table class="standard"><tr><th>Option</th><th>Word</th><th>Replacement</th></tr>';
    while ($db->nextRecord()) {
        $row = $db->getRow();
        $PHP_OUTPUT .= '<tr>';
        $PHP_OUTPUT .= '<td class="center shrink"><input type="checkbox" name="word_ids[]" value="' . $row['word_id'] . '"></td>';
        $PHP_OUTPUT .= '<td>' . $row['word_value'] . '</td>';
        $PHP_OUTPUT .= '<td>' . $row['word_replacement'] . '</td>';
        $PHP_OUTPUT .= '</tr>';
    }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:word_filter.php


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