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


PHP create_container函数代码示例

本文整理汇总了PHP中create_container函数的典型用法代码示例。如果您正苦于以下问题:PHP create_container函数的具体用法?PHP create_container怎么用?PHP create_container使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: forward

<?php

//we need to see if they are actually still on the planet.
if ($player->land_on_planet == 'FALSE') {
    forward(create_container("skeleton.php", "current_sector.php"));
} else {
    forward(create_container("skeleton.php", "planet_main.php"));
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:8,代码来源:planet_main_processing.php

示例2: stripslashes

<?php

$template->assign('PageTopic', 'Edit Photo');
$db->query('SELECT * FROM album WHERE account_id = ' . $db->escapeNumber(SmrSession::$account_id));
if ($db->nextRecord()) {
    $albumEntry['Location'] = stripslashes($db->getField('location'));
    $albumEntry['Email'] = stripslashes($db->getField('email'));
    $albumEntry['Website'] = stripslashes($db->getField('website'));
    $albumEntry['Day'] = $db->getInt('day');
    $albumEntry['Month'] = $db->getInt('month');
    $albumEntry['Year'] = $db->getInt('year');
    $albumEntry['Other'] = stripslashes($db->getField('other'));
    $approved = $db->getField('approved');
    if ($approved == 'TBC') {
        $albumEntry['Status'] = '<span style="color:orange;">Waiting approval</span>';
    } elseif ($approved == 'NO') {
        $albumEntry['Status'] = '<span class="red">Approval denied</span>';
    } elseif ($db->getBoolean('disabled')) {
        $albumEntry['Status'] = '<span class="red">Disabled</span>';
    } elseif ($approved == 'YES') {
        $albumEntry['Status'] = '<a href="' . URL . '/album/?' . $account->getHofName() . '" class="dgreen">Online</a>';
    }
    if (is_readable(UPLOAD . SmrSession::$account_id)) {
        $albumEntry['Image'] = URL . '/upload/' . SmrSession::$account_id;
    }
    $template->assign('AlbumEntry', $albumEntry);
}
$template->assign('AlbumEditHref', SmrSession::getNewHREF(create_container('album_edit_processing.php', '')));
开发者ID:smrealms,项目名称:smrv2.0,代码行数:28,代码来源:album_edit.php

示例3: galactic_post_online

<?php

//check to see if there is a paper already online
$db->query('SELECT * FROM galactic_post_online WHERE game_id = ' . $db->escapeNumber($player->getGameID()));
if ($db->nextRecord()) {
    $del_paper_id = $db->getField('paper_id');
}
if (!empty($del_paper_id)) {
    $db->query('DELETE FROM galactic_post_online WHERE paper_id = ' . $del_paper_id);
}
//insert the new paper in.
$db->query('INSERT INTO galactic_post_online (paper_id, game_id, online_since) VALUES (' . $var['id'] . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . TIME . ' )');
//all done lets send back to the main GP page.
$container = create_container('skeleton.php', 'galactic_post.php');
forward($container);
开发者ID:smrealms,项目名称:smrv2.0,代码行数:15,代码来源:galactic_post_make_current.php

示例4: foreach

<?php

$disable_account = $_REQUEST['disable_account'];
foreach ($disable_account as $currAccountID) {
    //never expire
    SmrAccount::getAccount($currAccountID)->banAccount(0, $account, 2, 'Double password');
}
forward(create_container('skeleton.php', 'admin_tools.php'));
开发者ID:smrealms,项目名称:smrv2.0,代码行数:8,代码来源:password_check_processing.php

示例5: elseif

 print "<tr>";
 print "<td valign=\"top\" align=\"center\"";
 if ($player->alliance_id == $id) {
     print " style=\"font-weight:bold;\"";
 } elseif ($out) {
     print " style=\"color:red;\"";
 }
 print ">{$rank}</td>";
 print "<td valign=\"top\"";
 if ($player->alliance_id == $id) {
     print " style=\"font-weight:bold;\"";
 } elseif ($out) {
     print " style=\"color:red;\"";
 }
 print ">";
 $container = create_container('skeleton.php', 'alliance_roster.php');
 $container["alliance_id"] = $id;
 if ($out) {
     print $currAllianceName;
 } else {
     print_link($container, $currAllianceName);
 }
 print "</td>";
 print "<td valign=\"top\" align=\"right\"";
 if ($player->alliance_id == $id) {
     print " style=\"font-weight:bold;\"";
 }
 if ($out) {
     print " style=\"color:red;\"";
 }
 print ">" . number_format($numKills) . "</td>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:rankings_alliance_kills.php

示例6: IN

        } else {
            if ($var['task'] == 'reset_website') {
                $db->query('UPDATE album SET website = \'\' WHERE account_id = ' . $db->escapeNumber($account_id));
            } else {
                if ($var['task'] == 'reset_birthdate') {
                    $db->query('UPDATE album SET day = 0, month = 0, year = 0 WHERE account_id = ' . $db->escapeNumber($account_id));
                } else {
                    if ($var['task'] == 'reset_other') {
                        $db->query('UPDATE album SET other = \'\' WHERE account_id = ' . $db->escapeNumber($account_id));
                    } else {
                        if ($var['task'] == 'delete_comment') {
                            $comment_ids = $_REQUEST['comment_ids'];
                            // we just ignore if nothing was set
                            if (count($comment_ids) > 0) {
                                $db->query('DELETE
					FROM album_has_comments
					WHERE album_id = ' . $db->escapeNumber($account_id) . ' AND
						  comment_id IN (' . $db->escapeArray($comment_ids) . ')');
                            }
                        } else {
                            create_error('No action chosen!');
                        }
                    }
                }
            }
        }
    }
}
$container = create_container('skeleton.php', 'album_moderate.php');
transfer('account_id');
forward($container);
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:album_moderate_processing.php

示例7: create_error

        // now transfer
        $planet->shields += $amount;
        $ship->hardware[1] -= $amount;
        $account->log(11, "Player puts {$amount} shields on planet.", $player->sector_id);
        // do the user wants to transfer drones?
    } else {
        if ($type_id == 4) {
            // do we want transfer more than we have?
            if ($amount > $ship->hardware[4]) {
                create_error("You can't transfer more combat drones than you carry!");
            }
            // do we want to transfer more than we can carry?
            if ($amount + $planet->drones > $planet->construction[2] * 20) {
                create_error("The planet can't hold more than " . $planet->construction[2] * 20 . " drones!");
            }
            // now transfer
            $planet->drones += $amount;
            $ship->hardware[4] -= $amount;
            $account->log(11, "Player puts {$amount} drones on planet.", $player->sector_id);
        }
    }
} else {
    create_error("You must choose if you want to transfer to planet or to the ship!");
}
$ship->mark_seen();
// update both
$planet->update();
$ship->update_hardware();
$ship->mark_seen();
forward(create_container("skeleton.php", "planet_defense.php"));
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:planet_defense_processing.php

示例8: get_file_loc

<?php

$sector =& $player->getSector();
$template->assign('PageTopic', 'Place a Bounty');
require_once get_file_loc('menu.inc');
if ($sector->hasHQ()) {
    create_hq_menu();
} else {
    create_ug_menu();
}
$container = create_container('skeleton.php', 'bounty_place_confirm.php');
transfer('LocationID');
$PHP_OUTPUT .= create_echo_form($container);
$PHP_OUTPUT .= 'Select the player you want to add the bounty to<br />';
$PHP_OUTPUT .= '<select name="player_id" size="1" id="InputFields">';
$PHP_OUTPUT .= '<option value="0">[Please Select]</option>';
$db->query('SELECT player_id, player_name FROM player JOIN account USING(account_id) WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND account_id != ' . $db->escapeNumber($player->getAccountID()) . ' ORDER BY player_name');
while ($db->nextRecord()) {
    $PHP_OUTPUT .= '<option value="' . $db->getInt('player_id') . '">' . $db->getField('player_name') . '</option>';
}
$PHP_OUTPUT .= '</select>';
$PHP_OUTPUT .= '<br /><br />';
$PHP_OUTPUT .= 'Enter the amount you wish to place on this player<br />';
$PHP_OUTPUT .= '<table class="standardnobord"><tr><td>Credits:</td><td><input type="number" name="amount" maxlength="10" size="10" id="InputFields"></td></tr>';
$PHP_OUTPUT .= '<tr><td>Smr Credits:</td><td><input type="number" name="smrcredits" maxlength="10" size="10" id="InputFields"></td></tr></table>';
$PHP_OUTPUT .= '<br /><br />';
$PHP_OUTPUT .= create_submit('Place');
开发者ID:smrealms,项目名称:smrv2.0,代码行数:27,代码来源:bounty_place.php

示例9: get_file_loc

    // *
    // * I n c l u d e s   h e r e
    // *
    // ********************************
    require_once 'config.inc';
    require_once LIB . 'Default/SmrMySqlDatabase.class.inc';
    require_once ENGINE . 'Default/smr.inc';
    require_once get_file_loc('SmrSession.class.inc');
    require_once get_file_loc('SmrAccount.class.inc');
    // ********************************
    // *
    // * S e s s i o n
    // *
    // ********************************
    if (SmrSession::$account_id > 0) {
        // creates a new user account object
        $account =& SmrAccount::getAccount(SmrSession::$account_id);
        // update last login column
        $account->updateLastLogin();
        $href = SmrSession::getNewHREF(create_container('login_check_processing.php'), true);
        SmrSession::update();
        header('Location: ' . $href);
        exit;
    }
    if (isset($_REQUEST['msg'])) {
        $template->assign('Message', htmlentities(trim($_REQUEST['msg']), ENT_COMPAT, 'utf-8'));
    }
    require_once LIB . 'Login/loginSmarty.php';
} catch (Exception $e) {
    handleException($e);
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:login.php

示例10: create_container

<?php

$container = create_container('skeleton.php', 'word_filter.php');
if (!isset($_REQUEST['Word']) || !isset($_REQUEST['WordReplacement'])) {
    $container['error'] = 1;
    forward($container);
    exit;
}
$word = strtoupper(trim($_REQUEST['Word']));
$word_replacement = strtoupper(trim($_REQUEST['WordReplacement']));
if (empty($word) || empty($word_replacement)) {
    $container['error'] = 1;
    forward($container);
    exit;
}
$db = new SmrMySqlDatabase();
$db->query('SELECT word_id FROM word_filter WHERE word_value=' . $db->escapeString($word) . ' LIMIT 1');
if ($db->nextRecord()) {
    $container['error'] = 1;
    forward($container);
    exit;
}
$db->query('INSERT INTO word_filter(word_value,word_replacement) VALUES (' . $db->escapeString($word) . ',' . $db->escapeString($word_replacement) . ')');
$container['error'] = 2;
forward($container);
开发者ID:smrealms,项目名称:smrv2.0,代码行数:25,代码来源:word_filter_add.php

示例11: bar_wall

    $amount = $db->getInt('message_id') + 1;
} else {
    $amount = 1;
}
$wall = $_REQUEST['wall'];
if (isset($wall)) {
    $db->query('INSERT INTO bar_wall (sector_id, game_id, message_id, message, time) VALUES (' . $db->escapeNumber($sector->getSectorID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($amount) . ',  ' . $db->escapeString($wall) . ' , ' . $db->escapeNumber(TIME) . ')');
}
$db->query('SELECT * FROM bar_wall WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND sector_id = ' . $db->escapeNumber($player->getSectorID()) . ' ORDER BY time DESC');
if ($db->getNumRows()) {
    $PHP_OUTPUT .= '<table class="standard">';
    $PHP_OUTPUT .= '<tr>';
    $PHP_OUTPUT .= '<th align="center">Time written</th>';
    $PHP_OUTPUT .= '<th align="center">Message</th>';
    $PHP_OUTPUT .= '</tr>';
    while ($db->nextRecord()) {
        $time = $db->getInt('time');
        $message_on_wall = $db->getField('message');
        $PHP_OUTPUT .= '<tr>';
        $PHP_OUTPUT .= '<td align="center"><b> ' . date(DATE_FULL_SHORT, $time) . ' </b></td>';
        $PHP_OUTPUT .= '<td align="center"><b>' . $message_on_wall . '</b></td>';
        $PHP_OUTPUT .= '</tr>';
    }
    $PHP_OUTPUT .= '</table>';
}
$template->assign('PageTopic', 'Write on the wall');
$PHP_OUTPUT .= '<br />';
$PHP_OUTPUT .= create_echo_form(create_container('skeleton.php', 'bar_read_wall.php'));
$PHP_OUTPUT .= '<textarea spellcheck="true" name="wall" id="InputFieldsText"></textarea><br /><br />';
$PHP_OUTPUT .= create_submit('Write it');
$PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bar_read_wall.php

示例12: create_ranking_menu

create_ranking_menu(1, 3);
$db->query('SELECT count(*) FROM alliance
			WHERE game_id = ' . $db->escapeNumber($player->getGameID()));
$db->nextRecord();
$numAlliances = $db->getInt('count(*)');
$ourRank = 0;
if ($player->hasAlliance()) {
    $db->query('SELECT count(*)
				FROM alliance
				WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . '
				AND (
					alliance_deaths > ' . $db->escapeNumber($player->getAlliance()->getDeaths()) . '
					OR (
						alliance_deaths = ' . $db->escapeNumber($player->getAlliance()->getDeaths()) . '
						AND alliance_name <= ' . $db->escapeString($player->getAllianceName()) . '
					)
				)');
    $db->nextRecord();
    $ourRank = $db->getInt('count(*)');
    $template->assign('OurRank', $ourRank);
}
$db->query('SELECT alliance_id, alliance_deaths amount FROM alliance
			WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT 10');
$template->assignByRef('Rankings', Rankings::collectAllianceRankings($db, $player, 0));
Rankings::calculateMinMaxRanks($ourRank, $numAlliances);
$lowerLimit = $var['MinRank'] - 1;
$db->query('SELECT alliance_id, alliance_deaths amount FROM alliance
			WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit));
$template->assignByRef('FilteredRankings', Rankings::collectAllianceRankings($db, $player, 0));
$template->assign('FilterRankingsHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'rankings_alliance_death.php')));
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:rankings_alliance_death.php

示例13: USING

$template->assign('PageTopic', 'Ship Dealer');
$db->query('SELECT ship_type_id FROM location
			JOIN location_sells_ships USING (location_type_id)
			WHERE sector_id = ' . $db->escapeNumber($player->getSectorID()) . '
				AND game_id = ' . $db->escapeNumber($player->getGameID()) . '
				AND location_type_id = ' . $db->escapeNumber($var['LocationID']));
$shipsSold = array();
if ($db->getNumRows() > 0) {
    $container = create_container('skeleton.php', 'shop_ship.php');
    transfer('LocationID');
    while ($db->nextRecord()) {
        $shipTypeID = $db->getField('ship_type_id');
        $shipsSold[$shipTypeID] =& AbstractSmrShip::getBaseShip(Globals::getGameType($player->getGameID()), $shipTypeID);
        $container['ship_id'] = $shipTypeID;
        $container['level_needed'] = $shipsSold[$shipTypeID]['Level'];
        $shipsSoldHREF[$shipTypeID] = SmrSession::getNewHREF($container);
    }
}
$template->assign('ShipsSold', $shipsSold);
$template->assign('ShipsSoldHREF', $shipsSoldHREF);
if (isset($var['ship_id'])) {
    $compareShip = AbstractSmrShip::getBaseShip(Globals::getGameType($player->getGameID()), $var['ship_id']);
    $compareShip['RealSpeed'] = $compareShip['Speed'] * Globals::getGameSpeed($player->getGameID());
    $compareShip['Turns'] = round($player->getTurns() * $compareShip['Speed'] / $ship->getSpeed());
    $container = create_container('shop_ship_processing.php');
    transfer('LocationID');
    transfer('ship_id');
    $compareShip['BuyHREF'] = SmrSession::getNewHREF($container);
    $template->assign('CompareShip', $compareShip);
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:shop_ship.php

示例14: foreach

$table .= '<th>Good</th>';
$table .= '<th>Ship</th>';
$table .= '<th>Planet</th>';
$table .= '<th>Amount</th>';
$table .= '<th>Transfer to</th>';
$table .= '</tr>';
$GOODS =& Globals::getGoods();
foreach ($GOODS as $goodID => $good) {
    if (!$ship->hasCargo($goodID) && !$planet->hasStockpile($goodID)) {
        continue;
    }
    if (!$present) {
        $present = true;
        $PHP_OUTPUT = "";
    }
    $container = create_container('planet_stockpile_processing.php');
    $container['good_id'] = $goodID;
    $PHP_OUTPUT .= create_echo_form($container);
    $PHP_OUTPUT .= '<tr>';
    $PHP_OUTPUT .= '<td class="left"><img src="' . $good['ImageLink'] . '" width="13" height="16" title="' . $good['Name'] . '" alt=""></td>';
    $PHP_OUTPUT .= '<td>' . $good['Name'] . '</td>';
    $PHP_OUTPUT .= '<td align="center">' . $ship->getCargo($goodID) . '</td>';
    $PHP_OUTPUT .= '<td align="center">' . $planet->getStockpile($goodID) . '</td>';
    $PHP_OUTPUT .= '<td align="center"><input type="number" name="amount" value="' . $ship->getCargo($goodID) . '" id="InputFields" size="4" class="center"/></td>';
    $PHP_OUTPUT .= '<td>';
    $PHP_OUTPUT .= create_submit('Ship');
    $PHP_OUTPUT .= '&nbsp;';
    $PHP_OUTPUT .= create_submit('Planet');
    $PHP_OUTPUT .= '</td>';
    $PHP_OUTPUT .= '</tr>';
    $PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:planet_stockpile.php

示例15: create_link

 $PHP_OUTPUT .= create_link($container, '<b>Edit this article</b>');
 $PHP_OUTPUT .= '<br />';
 $container = array();
 $container['url'] = 'skeleton.php';
 $container['body'] = 'galactic_post_delete_confirm.php';
 $container['article'] = 'yes';
 transfer('id');
 $PHP_OUTPUT .= create_link($container, '<b>Delete This article</b>');
 $PHP_OUTPUT .= '<br /><br />';
 $db->query('SELECT * FROM galactic_post_paper WHERE game_id = ' . $db->escapeNumber($player->getGameID()));
 $container = array();
 $container['url'] = 'galactic_post_add_article_to_paper.php';
 transfer('id');
 if (!$db->getNumRows()) {
     $PHP_OUTPUT .= 'You have no papers made that you can add an article to.';
     $PHP_OUTPUT .= create_link(create_container('skeleton.php', 'galactic_post_make_paper.php'), '<b>Click Here</b>');
     $PHP_OUTPUT .= 'To make a new one.';
 }
 while ($db->nextRecord()) {
     $paper_title = $db->getField('title');
     $paper_id = $db->getField('paper_id');
     $container['paper_id'] = $paper_id;
     $PHP_OUTPUT .= create_link($container, '<b>Add this article to ' . $paper_title . '!</b>');
     $PHP_OUTPUT .= '<br />';
 }
 $container = array();
 $container['url'] = 'skeleton.php';
 $container['body'] = 'galactic_post_view_article.php';
 $container['news'] = $message;
 transfer('id');
 $PHP_OUTPUT .= '<small><br />note: breaking news is in the news section.<br /></small>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:galactic_post_view_article.php


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