本文整理汇总了PHP中SmrMySqlDatabase::getField方法的典型用法代码示例。如果您正苦于以下问题:PHP SmrMySqlDatabase::getField方法的具体用法?PHP SmrMySqlDatabase::getField怎么用?PHP SmrMySqlDatabase::getField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmrMySqlDatabase
的用法示例。
在下文中一共展示了SmrMySqlDatabase::getField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: channel_msg_ship
function channel_msg_ship($fp, $rdata)
{
global $channel;
if (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!ship\\s(.*)\\s$/i', $rdata, $msg)) {
echo_r($msg);
$db = new SmrMySqlDatabase();
$db->query('SELECT * FROM ship_type WHERE ship_name LIKE ' . $db->escape_string('%' . $msg[4] . '%'));
if ($db->nextRecord()) {
$ship_name = $db->getField('ship_name');
$hardpoint = $db->getField('hardpoint');
$speed = $db->getField('speed');
$cost = $db->getField('cost');
$name_length = strlen($ship_name);
$hp_length = strlen('Hardpoints');
$speed_length = strlen('Speed');
$cost_length = max(strlen('Costs'), strlen($cost));
fputs($fp, 'NOTICE ' . $msg[1] . ' :' . str_pad('Name', $name_length) . ' | ' . str_pad('Hardpoints', $hp_length) . ' | ' . str_pad('Speed', $speed_length) . ' | ' . str_pad('Costs', $cost_length) . EOL);
fputs($fp, 'NOTICE ' . $msg[1] . ' :' . str_pad($ship_name, $name_length) . ' | ' . str_pad($hardpoint, $hp_length) . ' | ' . str_pad($speed, $speed_length) . ' | ' . str_pad($cost, $cost_length) . EOL);
} else {
fputs($fp, 'NOTICE ' . $msg[1] . ' :There is no ship called ' . $msg[4] . '!' . EOL);
}
return true;
}
return false;
}
示例2: notice_nickserv_registered_user
function notice_nickserv_registered_user($fp, $rdata)
{
// :NickServ!services@coldfront.net NOTICE Caretaker
if (preg_match('/^:NickServ!services@coldfront.net NOTICE ' . IRC_BOT_NICK . ' :([^ ]+) is ([^.]+)\\s$/i', $rdata, $msg)) {
$nick = $msg[1];
$registeredNick = $msg[2];
echo_r('[NOTICE_NICKSERV_REGISTERED_NICK] ' . $nick . ' is ' . $registeredNick);
$db = new SmrMySqlDatabase();
$db2 = new SmrMySqlDatabase();
$db->query('SELECT * FROM irc_seen WHERE nick = ' . $db->escapeString($nick));
while ($db->nextRecord()) {
$seen_id = $db->getField('seen_id');
$db2->query('UPDATE irc_seen SET
registered_nick = ' . $db->escapeString($registeredNick) . '
WHERE seen_id = ' . $seen_id);
}
global $actions;
foreach ($actions as $key => $action) {
// is that a callback for our nick?
if ($action[0] == 'NICKSERV_INFO' && $nick == $action[2]) {
echo_r('Callback found: ' . $action[3]);
unset($actions[$key]);
eval($action[3]);
}
}
return true;
}
return false;
}
示例3: 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;
}
示例4: channel_msg_level
function channel_msg_level($fp, $rdata)
{
global $channel, $nick;
// in channel we only accept !rank
// in private msg we accept both
if (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!level\\s(.*)\\s$/i', $rdata, $msg) || preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $nick . '\\s:?level\\s(.*)\\s$/i', $rdata, $msg)) {
echo_r($msg);
$db = new SmrMySqlDatabase();
$db->query('SELECT * FROM level WHERE level_id = ' . $msg[4]);
if ($db->nextRecord()) {
$level_name = $db->getField('level_name');
$experience = $db->getField('requirement');
fputs($fp, 'NOTICE ' . $msg[1] . ' :For a ' . $level_name . ' you need to have ' . $experience . ' experience points!' . EOL);
} else {
fputs($fp, 'NOTICE ' . $msg[1] . ' :This Level doesn\'t exist!!' . EOL);
}
return true;
}
return false;
}
示例5: user_nick
/**
* Someone changed his nick
*/
function user_nick($fp, $rdata)
{
if (preg_match('/^:(.*)!(.*)@(.*)\\sNICK\\s:(.*)\\s$/i', $rdata, $msg)) {
$nick = $msg[1];
$user = $msg[2];
$host = $msg[3];
$new_nick = $msg[4];
echo_r('[NICK] ' . $nick . ' -> ' . $new_nick);
// database object
$db = new SmrMySqlDatabase();
$db2 = new SmrMySqlDatabase();
$channel_list = array();
// 'sign off' all active old_nicks (multiple channels)
$db->query('SELECT * FROM irc_seen WHERE nick = ' . $db->escapeString($nick) . ' AND signed_off = 0');
while ($db->nextRecord()) {
$seen_id = $db->getInt('seen_id');
// remember channels where this nick was active
array_push($channel_list, $db->getField('channel'));
$db2->query('UPDATE irc_seen SET signed_off = ' . time() . ' WHERE seen_id = ' . $seen_id);
}
// now sign in the new_nick in every channel
foreach ($channel_list as $channel) {
// 'sign in' the new nick
$db->query('SELECT * FROM irc_seen WHERE nick = ' . $db->escapeString($new_nick) . ' AND channel = ' . $db->escapeString($channel));
if ($db->nextRecord()) {
// exiting nick?
$seen_id = $db->getField('seen_id');
$db->query('UPDATE irc_seen SET ' . 'signed_on = ' . time() . ', ' . 'signed_off = 0, ' . 'user = ' . $db->escapeString($user) . ', ' . 'host = ' . $db->escapeString($host) . ', ' . 'registered = NULL ' . 'WHERE seen_id = ' . $seen_id);
} else {
// new nick?
$db->query('INSERT INTO irc_seen (nick, user, host, channel, signed_on) VALUES(' . $db->escapeString($new_nick) . ', ' . $db->escapeString($user) . ', ' . $db->escapeString($host) . ', ' . $db->escapeString($channel) . ', ' . time() . ')');
}
}
unset($channel_list);
return true;
}
return false;
}
示例6: check_sms_response
function check_sms_response($fp)
{
// get one dlr per time so we do not spam anyone
$db = new SmrMySqlDatabase();
$db->query('SELECT *
FROM account_sms_response
LEFT JOIN account_sms_log USING (message_id)
WHERE announce = 0');
if ($db->nextRecord()) {
$response_id = $db->getField('response_id');
$message_id = $db->getField('message_id');
$message = $db->getField('message');
$orig_sender_id = $db->getField('account_id');
echo_r('Found new SMS response... ' . $message_id);
$orig_sender =& SmrAccount::getAccount($orig_sender_id, true);
fputs($fp, 'NOTICE ' . $orig_sender->getIrcNick() . ' :You have received a response to your text: ' . EOL);
fputs($fp, 'NOTICE ' . $orig_sender->getIrcNick() . ' :' . $message . EOL);
// update announce status
$db->query('UPDATE account_sms_response
SET announce = 1
WHERE response_id = ' . $response_id);
}
}
示例7: channel_msg_seed
function channel_msg_seed($fp, $rdata, $account, $player)
{
if (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s(.*)\\s:!seed\\s$/i', $rdata, $msg)) {
$nick = $msg[1];
$user = $msg[2];
$host = $msg[3];
$channel = $msg[4];
echo_r('[SEED] by ' . $nick . ' in ' . $channel);
// get the seedlist from db
$db = new SmrMySqlDatabase();
$db->query('SELECT sector_id
FROM alliance_has_seedlist
WHERE alliance_id = ' . $player->getAllianceID() . '
AND game_id = ' . $player->getGameID() . '
AND sector_id NOT IN (
SELECT sector_id
FROM sector_has_forces
WHERE game_id = ' . $player->getGameID() . '
AND owner_id = ' . $account->getAccountID() . '
)');
$missing_seeds = array();
while ($db->nextRecord()) {
array_push($missing_seeds, $db->getField('sector_id'));
}
if (count($missing_seeds) == 0) {
fputs($fp, 'PRIVMSG ' . $channel . ' :' . $nick . ', you seeded all sectors.' . EOL);
} else {
$seed_list = '';
foreach ($missing_seeds as $sector) {
$seed_list .= $sector . ', ';
}
fputs($fp, 'PRIVMSG ' . $channel . ' :' . $nick . ', you are missing the following seeds:' . EOL);
fputs($fp, 'PRIVMSG ' . $channel . ' :' . substr_replace($seed_list, ' [' . count($missing_seeds) . ' missing seed(s)]', -2, 1) . EOL);
}
return true;
}
return false;
}
示例8: channel_part
function channel_part($fp, $rdata)
{
// :Azool!Azool@coldfront-F706F7E1.co.hfc.comcastbusiness.net PART #smr-irc :
// :SomeGuy!mrspock@coldfront-DD847655.dip.t-dialin.net PART #smr-irc
if (preg_match('/^:(.*)!(.*)@(.*)\\sPART\\s(.*?)\\s/i', $rdata, $msg)) {
$nick = $msg[1];
$user = $msg[2];
$host = $msg[3];
$channel = $msg[4];
echo_r('[PART] ' . $nick . '!' . $user . '@' . $host . ' ' . $channel);
// database object
$db = new SmrMySqlDatabase();
$db->query('SELECT * FROM irc_seen WHERE nick = ' . $db->escapeString($nick) . ' AND channel = ' . $db->escapeString($channel));
// exiting nick?
if ($db->nextRecord()) {
$seen_id = $db->getField('seen_id');
$db->query('UPDATE irc_seen SET signed_off = ' . time() . ' WHERE seen_id = ' . $seen_id);
} else {
// we don't know this one, but who cares? he just left anyway...
}
return true;
}
return false;
}
示例9: addbyte
$file .= addbyte($level);
}
$db3->query('SELECT * FROM warp WHERE game_id = ' . $game_id . ' AND (sector_id_1 = ' . $sector_id . ' OR sector_id_2 = ' . $sector_id . ') LIMIT 1');
if ($db3->nextRecord()) {
$CurrByte = 128;
} else {
$CurrByte = 0;
}
// locations
$db2->query('SELECT * FROM location NATURAL JOIN location_type WHERE game_id = ' . $game_id . ' AND sector_id = ' . $sector_id . ' LIMIT 1');
$CurrByte += $db2->getNumRows();
$file .= addbyte($CurrByte);
// warp
$db3->query('SELECT * FROM warp WHERE game_id = ' . $game_id . ' AND (sector_id_1 = ' . $sector_id . ' OR sector_id_2 = ' . $sector_id . ') LIMIT 1');
if ($db3->nextRecord()) {
$warp_id = $db3->getField('sector_id_1') == $sector_id ? $db3->getField('sector_id_2') : $db3->getField('sector_id_1');
$file .= add2bytes($warp_id);
}
while ($db2->nextRecord()) {
$file .= add2bytes($db2->getField('mgu_id'));
}
}
$size = strlen($file);
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Content-Type: application/force-download');
header('Content-Disposition: attachment; filename="$game_name.cmf"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . $size);
示例10: while
$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;
}
}
} elseif ($isset == 'yes' && !$db2->nextRecord()) {
$PHP_OUTPUT .= 'Data Error 2: ' . $match_sec . ' does not exist!<br />';
$continue = '0';
示例11: forward
<?php
$action = $_REQUEST['action'];
if ($action == 'Skip >>') {
$container = create_container('skeleton.php', 'universe_create_ships.php');
$container['game_id'] = $var['game_id'];
forward($container);
}
$planet = $_REQUEST['planet'];
if (!isset($planet)) {
create_error('Couldn\'t determine how many planets to add!');
}
$db2 = new SmrMySqlDatabase();
$db2->query('SELECT * FROM game WHERE game_id = ' . $db->escapeNumber($var['game_id']));
$db2->nextRecord();
$date = $db2->getField('start_date');
list($year, $month, $day) = explode('-', $date);
// adjust the time so it is game start time
$time = mktime(0, 0, 0, $month, $day, $year);
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
示例12: private_msg_weapon
function private_msg_weapon($fp, $rdata)
{
global $channel;
$type = 0;
if (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!weapon\\sname\\s(.*)\\s$/i', $rdata, $msg_1)) {
$name = $msg_1[1];
sleep(2);
$type = 1;
} elseif (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!weapon\\slevel\\s(.*)\\s(.*)\\s$/i', $rdata, $msg_2)) {
$name = $msg_2[1];
sleep(2);
$type = 2;
} elseif (preg_match('/^:(.*)!(.*)@(.*)\\sPRIVMSG\\s' . $channel . '\\s:!weapon\\srange\\s(.*)\\s(.*)\\s(.*)\\s(.*)\\s$/i', $rdata, $msg_3)) {
$name = $msg_3[1];
sleep(2);
$type = 3;
}
//first lets get our orders so we can make sure our query will work
$a = array();
$a[] = 'cost';
$a[] = 'weapon_name';
$a[] = 'shield_damage';
$a[] = 'armour_damage';
$a[] = 'accuracy';
$a[] = 'race_id';
$a[] = 'buyer_restriction';
$a[] = 'power_level';
$db = new SmrMySqlDatabase();
if ($type == 1) {
$db->query('SELECT * FROM weapon_type JOIN race USING(race_id) WHERE weapon_name LIKE ' . $db->escape_string('%' . $msg_1[4] . '%'));
} elseif ($type == 2) {
if (in_array($msg_2[5], $a)) {
$db->query('SELECT * FROM weapon_type JOIN race USING(race_id) WHERE power_level = ' . $msg_2[4] . ' ORDER BY ' . $msg_2[5] . ' DESC');
} else {
$db->query('SELECT * FROM weapon_type JOIN race USING(race_id) WHERE power_level = ' . $msg_2[4]);
}
} elseif ($type == 3) {
//[4] = object
//[5] = lower limit
//[6] = upper limit
//[7] = order
//first make sure we arent flooding
sleep(2);
if (in_array($msg_3[4], $a) && in_array($msg_3[7], $a)) {
$db->query('SELECT * FROM weapon_type JOIN race USING(race_id) WHERE ' . $msg_3[4] . ' > ' . $msg_3[5] . ' AND ' . $msg_3[4] . ' < ' . $msg_3[6] . ' ORDER BY ' . $msg_3[7] . ' DESC');
} elseif (in_array($msg_3[4], $a)) {
$db->query('SELECT * FROM weapon_type JOIN race USING(race_id) WHERE ' . $msg_3[4] . ' > ' . $msg_3[5] . ' AND ' . $msg_3[4] . ' < ' . $msg_3[6]);
} else {
$rand = mt_rand(0, 7);
$object = $a[$rand];
$db->query('SELECT * FROM weapon_type JOIN race USING(race_id) WHERE ' . $object . ' > ' . $msg_3[5] . ' AND ' . $object . ' < ' . $msg_3[6]);
}
}
if ($db->getNumRows()) {
fputs($fp, 'PRIVMSG ' . $name . ' :Name | Cost | Shield Damage | Armour Damage | Accuracy | Race | Restriction' . EOL);
sleep(2);
while ($db->nextRecord()) {
$weapon_name = $db->getField('weapon_name');
$hardpoint = $db->getField('power_level');
$shield = $db->getField('shield_damage');
$armour = $db->getField('armour_damage');
$acc = $db->getField('accuracy');
$race = $db->getField('race_name');
$restrict = $db->getField('buyer_restriction');
$cost = $db->getField('cost');
$private_message = 'PRIVMSG ' . $name . ' :' . $weapon_name . ' | ' . $cost . ' | ' . $shield . ' | ' . $armour . ' | ' . $acc . ' | ' . $race . ' | ';
if ($restrict == 1) {
$private_message .= 'Good';
} elseif ($restrict == 2) {
$private_message .= 'Evil';
} else {
$private_message .= 'None';
}
$private_message .= EOL;
fputs($fp, $private_message);
sleep(2);
}
} elseif ($type == 1) {
fputs($fp, 'PRIVMSG ' . $name . ' :There is no weapon called ' . $msg_1[5] . '!' . EOL);
} elseif ($type == 2) {
fputs($fp, 'PRIVMSG ' . $name . ' :There is no weapon with ' . $msg_2[4] . ' power level!' . EOL);
} elseif ($type == 3) {
fputs($fp, 'PRIVMSG ' . $name . ' :There is no weapon in the cost range of ' . $msg_3[4] . ' - ' . $msg_3[5] . '!' . EOL);
}
if (isset($type)) {
return true;
}
return false;
}
示例13: array
$only = array();
// get all available hq's
$db->query('SELECT location_name
FROM location JOIN location_type USING(location_type_id)
WHERE location_type_id > ' . $db->escapeNumber(UNDERGROUND) . '
AND location_type_id < ' . $db->escapeNumber(FED) . '
AND game_id = ' . $db->escapeNumber($var['game_id']) . '
ORDER BY location_type_id');
while ($db->nextRecord()) {
// get the name for this race
// HACK! cut ' HQ' from location name!
$race_name = substr($db->getField('location_name'), 0, -3);
// get race id for this race
$db2->query('SELECT race_id FROM race WHERE race_name = ' . $db->escapeString($race_name) . ' LIMIT 1');
if ($db2->nextRecord()) {
$race_id = $db2->getField('race_id');
} else {
create_error('Couldn\'t find the ' . $race_name . ' in database!');
}
if (in_array($race_id, $only)) {
continue;
}
$only[] = $race_id;
// hack for the user mrspock
if ($player_name == 'MrSpock' && $race_name == 'Salvene') {
$selected = ' selected="selected"';
} else {
$selected = '';
}
$PHP_OUTPUT .= '<option value="' . $race_id . '"' . $selected . '>' . $race_name . '</option>';
}
示例14: elseif
if ($res == 1) {
$align = '+';
} elseif ($res == 2) {
$align = '-';
} else {
$align = '0';
}
$speed = $db->getField('speed');
$cost = $db->getField('cost');
$hard = $db->getField('hardpoint');
//assuem 10 for now its not implemented
$mr = 10;
$db3->query('SELECT * FROM hardware_type ORDER BY hardware_type_id');
$props = array();
while ($db3->nextRecord()) {
$hard_id = $db3->getField('hardware_type_id');
$db2->query('SELECT * FROM ship_type_support_hardware WHERE ship_type_id = ' . $id . ' ORDER BY hardware_type_id AND hardware_type_id = ' . $hard_id);
while ($db2->nextRecord()) {
$props[$hard_id] = $db2->getField('max_amount');
}
}
$shields = $props[HARDWARE_SHIELDS];
$armour = $props[HARDWARE_ARMOUR];
$cargo = $props[HARDWARE_CARGO];
$combat = $props[HARDWARE_COMBAT];
$scouts = $props[HARDWARE_SCOUT];
$mines = $props[HARDWARE_MINE];
$scanner = $props[HARDWARE_SCANNER];
$cloak = $props[HARDWARE_CLOAK];
$illus = $props[HARDWARE_ILLUSION];
$jump = $props[HARDWARE_JUMP];
示例15: count
$db2->query('SELECT 1 FROM message
WHERE account_id = ' . $db2->escapeNumber($player->getAccountID()) . '
AND game_id = ' . $db2->escapeNumber($player->getGameID()) . '
AND message_type_id = ' . $db2->escapeNumber($message_type_id) . '
AND msg_read = ' . $db2->escapeBoolean(false) . '
AND receiver_delete = ' . $db2->escapeBoolean(false) . ' LIMIT 1');
$messageBox['HasUnread'] = $db2->getNumRows() != 0;
$messageBox['MessageCount'] = 0;
// get number of msges
$db2->query('SELECT count(message_id) as message_count FROM message
WHERE account_id = ' . $db2->escapeNumber($player->getAccountID()) . '
AND game_id = ' . $db2->escapeNumber($player->getGameID()) . '
AND message_type_id = ' . $db2->escapeNumber($message_type_id) . '
AND receiver_delete = ' . $db2->escapeBoolean(false));
if ($db2->nextRecord()) {
$messageBox['MessageCount'] = $db2->getField('message_count');
}
$container = create_container('skeleton.php', 'message_view.php');
$container['folder_id'] = $message_type_id;
$messageBox['ViewHref'] = SmrSession::getNewHREF($container);
$container = create_container('message_delete_processing.php');
$container['folder_id'] = $message_type_id;
$messageBox['DeleteHref'] = SmrSession::getNewHREF($container);
$messageBoxes[] = $messageBox;
}
$messageBox = array();
$messageBox['MessageCount'] = 0;
$db->query('SELECT count(message_id) as count FROM message
WHERE sender_id = ' . $db->escapeNumber($player->getAccountID()) . '
AND game_id = ' . $db->escapeNumber($player->getGameID()) . '
AND message_type_id = ' . $db->escapeNumber(MSG_PLAYER) . '