• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_file_loc函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SmrMySqlDatabase

if (isset($_REQUEST['type'])) {
    SmrSession::updateVar('Type', $_REQUEST['type']);
}
$type = $var['Type'];
$db2 = new SmrMySqlDatabase();
//used to make sure we don't display deleted accounts
$del_num = 5;
$close_reason = ' ';
if (isset($var['type'])) {
    $type = $var['type'];
}
//another script for comp share
if ($type == 'comp_share') {
    include get_file_loc('comp_share.php');
} elseif ($type == 'all_acc') {
    include get_file_loc('list_all.php');
} elseif ($type == 'list') {
    if (isset($var['total'])) {
        $total = $var['total'];
    }
    if (empty($total)) {
        $total = 0;
    }
    if (isset($var['variable'])) {
        $variable = $var['variable'];
    }
    //we are listing ALL IPs
    $db->query('SELECT account_id as acc_id, ip FROM account_has_ip ORDER BY ip, account_id LIMIT ' . $total . ', 1000000');
    $ip_array = array();
    $count = 0;
    //make sure we have enough but not too mant to reduce lag
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:ip_view_results.php


示例2: date

 if (SmrSession::$account_id > 0) {
     $account =& SmrAccount::getAccount(SmrSession::$account_id);
     $disabled = $account->isDisabled();
     if ($disabled !== false) {
         $reason = $disabled['Reason'];
         if ($disabled['Time'] > 0) {
             $reason .= '  Your account is set to reopen on ' . date(DEFAULT_DATE_FULL_LONG, $disabled['Time']) . '.';
         } else {
             $reason .= '  Your account is set to never reopen.  If you believe this is wrong contact an admin.';
         }
     }
     //	SmrSession::destroy();
 } else {
     if (USE_COMPATIBILITY && SmrSession::$old_account_id > 0) {
         foreach (Globals::getCompatibilityDatabases('Game') as $databaseClassName => $gameType) {
             require_once get_file_loc($databaseClassName . '.class.inc');
             $db = new $databaseClassName();
             $db->query('SELECT * FROM account_is_closed JOIN closing_reason USING(reason_id) WHERE account_id = ' . $db->escapeNumber(SmrSession::$old_account_id));
             if ($db->nextRecord()) {
                 $time = $db->getField('expires');
                 $reason = $db->getField('reason');
                 if ($time > 0) {
                     $reason .= '  Your account is set to reopen ' . date(DEFAULT_DATE_FULL_LONG, $time) . '.';
                 } else {
                     $reason .= '  Your account is set to never reopen.  If you believe this is wrong contact an admin.';
                 }
             }
         }
         //	SmrSession::destroy();
     } else {
         $reason = 'Accessing Account Information Failed.  Contact an admin if you have questions.';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:disabled.php


示例3: get_file_loc

<?php

require_once get_file_loc("smr_planet.inc");
if ($player->land_on_planet == "FALSE") {
    print_error("You are not on a planet!");
    return;
}
// create planet object
$planet = new SMR_PLANET($player->sector_id, $player->game_id);
$planet->build();
print_topic("PLANET : {$planet->planet_name} [SECTOR #{$player->sector_id}]");
include get_file_loc('menue.inc');
print_planet_menue();
//print the dump cargo message or other message.
if (isset($var["msg"])) {
    print $var["msg"] . "<br>";
}
print "<table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" class=\"standard\">";
print "<tr>";
print "<th width=\"125\">&nbsp;</th>";
print "<th width=\"75\">Current</th>";
print "<th width=\"75\">Max</th>";
print "</tr>";
print "<tr>";
print "<td>Generator</td><td align=\"center\">";
print $planet->construction[1];
print "</td><td align=\"center\">";
print $planet->max_construction[1];
print "</td>";
print "</tr>";
print "<tr>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:planet_main.php


示例4: get_file_loc

<?php

require_once '/home/page/SMR/htdocs/config.inc';
require_once ENGINE . 'Default/smr.inc';
require_once get_file_loc('SmrSector.class.inc');
require_once get_file_loc('SmrGalaxy.class.inc');
require_once get_file_loc('Plotter.class.inc');
testDistances(1);
function testDistances($gameID)
{
    //Initialise cache for fairness
    $galaxies =& SmrGalaxy::getGameGalaxies($gameID);
    $galaxySectors = array();
    foreach ($galaxies as &$galaxy) {
        $galaxiesSectors[] =& $galaxy->getSectors();
    }
    unset($galaxy);
    foreach ($galaxiesSectors as &$galaxySectors) {
        foreach ($galaxySectors as &$galaxySector) {
            if ($galaxySector->hasPort()) {
                $galaxySector->getPort()->getGoods();
            }
        }
        unset($galaxySector);
    }
    unset($galaxySectors);
    //Test plotters
    $newTime = 0;
    $oldTime = 0;
    foreach ($galaxiesSectors as &$galaxySectors) {
        foreach ($galaxySectors as &$galaxySector) {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:testDistancePlotters.php


示例5: get_file_loc

<?php

require_once get_file_loc("smr_history_db.inc");
print "<div align=center>";
//topic
if (isset($var["game_name"])) {
    $game_name = $var["game_name"];
}
if (isset($var["game_id"])) {
    $game_id = $var["game_id"];
}
if (isset($game_name)) {
    $topic = "Game {$var['game_name']}";
} else {
    $topic = "Games";
}
print_topic("Viewing Old SMR {$topic}");
if (!isset($game_name)) {
    //list old games
    $db2 = new SMR_HISTORY_DB();
    $db2->query("SELECT DATE_FORMAT(start_date, '%c/%e/%Y') as start_date, " . "DATE_FORMAT(end_date, '%c/%e/%Y') as end_date, game_name, speed, game_id " . "FROM game ORDER BY game_id");
    if ($db2->nf()) {
        print_table();
        print "<tr><th align=center>Game Name</th><th align=center>Start Date</th><th align=center>End Date</th><th align=center>Speed</th><th align=center colspan=3>Options</th></tr>";
        while ($db2->next_record()) {
            $id = $db2->f("game_id");
            $container = array();
            $container["url"] = "skeleton.php";
            $container["game_id"] = $db2->f("game_id");
            $container["game_name"] = $db2->f("game_name");
            $container["body"] = "games_previous.php";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:games_previous.php


示例6: displayMessage

function displayMessage(&$messageBox, $message_id, $receiver_id, $sender_id, $message_text, $send_time, $msg_read, $type, $sentMessage = false)
{
    require_once get_file_loc('message.functions.inc');
    global $player, $account;
    $message = array();
    $sender = false;
    $senderName =& getMessagePlayer($sender_id, $player->getGameID(), $type);
    if ($senderName instanceof SmrPlayer) {
        $sender =& $senderName;
        unset($senderName);
        $replace = explode('?', $message_text);
        foreach ($replace as $key => $timea) {
            if ($sender_id > 0 && $timea != '' && ($final = strtotime($timea)) !== false) {
                //WARNING: Expects PHP 5.1.0 or later
                $send_acc =& $sender->getAccount();
                $final += $account->getOffset() * 3600 - $send_acc->getOffset() * 3600;
                $message_text = str_replace('?' . $timea . '?', date(DATE_FULL_SHORT, $final), $message_text);
            }
        }
        $container = create_container('skeleton.php', 'trader_search_result.php');
        $container['player_id'] = $sender->getPlayerID();
        $senderName =& create_link($container, $sender->getDisplayName());
    }
    $container = create_container('skeleton.php', 'message_notify_confirm.php');
    $container['message_id'] = $message_id;
    $container['sent_time'] = $send_time;
    $message['ReportHref'] = SmrSession::getNewHREF($container);
    if (is_object($sender)) {
        $container = create_container('skeleton.php', 'message_blacklist_add.php');
        $container['account_id'] = $sender_id;
        $message['BlacklistHref'] = SmrSession::getNewHREF($container);
        $container = create_container('skeleton.php', 'message_send.php');
        $container['receiver'] = $sender->getAccountID();
        $message['ReplyHref'] = SmrSession::getNewHREF($container);
        $message['Sender'] =& $sender;
    }
    $message['ID'] = $message_id;
    $message['Text'] = $message_text;
    $message['SenderDisplayName'] = $senderName;
    $receiver =& SmrPlayer::getPlayer($receiver_id, $player->getGameID());
    if ($sentMessage && is_object($receiver)) {
        $container = create_container('skeleton.php', 'trader_search_result.php');
        $container['player_id'] = $receiver->getPlayerID();
        $message['ReceiverDisplayName'] = create_link($container, $receiver->getDisplayName());
    }
    $message['Unread'] = $msg_read == 'FALSE';
    $message['SendTime'] = $send_time;
    $messageBox['Messages'][] =& $message;
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:49,代码来源:message_view.php


示例7: player_visited_port

            // save to db (not the inital value)
            if ($current_sector_id != $low - 1) {
                $db2->query("REPLACE INTO player_visited_port (account_id, game_id, sector_id, visited, port_info) " . "VALUES({$account_id}, {$game_id}, {$current_sector_id}, {$current_time}, '" . addslashes(serialize($port_info)) . "')");
            }
            // reset variables
            $current_sector_id = $sector_id;
            $port_info = array();
        }
        // add to port info array
        $port_info[$good_id] = $transaction;
    }
    //insert the last port
    $db2->query("REPLACE INTO player_visited_port (account_id, game_id, sector_id, visited, port_info) " . "VALUES({$account_id}, {$game_id}, {$current_sector_id}, {$current_time}, '" . addslashes(serialize($port_info)) . "')");
    //offer another drink and such
    print "<div align=center>Galaxy Info has been added.  Enjoy!</div><br>";
    include get_file_loc("bar_opening.php");
} else {
    //find what gal they want
    $container = array();
    $container["url"] = "skeleton.php";
    $container["body"] = "bar_main.php";
    $container["script"] = "bar_galmap_buy.php";
    $container["process"] = "yes";
    print "<div align=center>What galaxy do you want info on?<br>";
    print_form($container);
    print "<select type=select name=gal_id>";
    print "<option value=0>[Select a galaxy]</option>";
    $db->query("SELECT galaxy_id FROM sector WHERE game_id = {$player->game_id} GROUP BY galaxy_id ORDER BY galaxy_id ASC");
    $db2 = new SmrMySqlDatabase();
    while ($db->next_record()) {
        $gal_id = $db->f("galaxy_id");
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bar_galmap_buy.php


示例8: get_file_loc

<?php

if (!isset($var['GameID'])) {
    SmrSession::updateVar('GameID', $player->getGameID());
}
$gameID = $var['GameID'];
$template->assign('PageTopic', 'Current News');
require_once get_file_loc('menu.inc');
create_news_menu($template);
require_once get_file_loc('news.functions.inc');
doBreakingNewsAssign($gameID, $template);
doLottoNewsAssign($gameID, $template);
if (!isset($var['LastNewsUpdate'])) {
    SmrSession::updateVar('LastNewsUpdate', $player->getLastNewsUpdate());
}
$db->query('SELECT * FROM news WHERE game_id = ' . $db->escapeNumber($gameID) . ' AND time > ' . $db->escapeNumber($var['LastNewsUpdate']) . ' AND type = \'regular\' ORDER BY news_id DESC');
$player->updateLastNewsUpdate();
if ($db->getNumRows()) {
    $NewsItems = array();
    while ($db->nextRecord()) {
        $NewsItems[] = array('Time' => $db->getField('time'), 'Message' => bbifyMessage($db->getField('news_message')), 'Type' => $db->getField('type'));
    }
    $template->assign('NewsItems', $NewsItems);
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:24,代码来源:news_read_current.php


示例9: create_error

}
if (isset($take_scout_drones) && !is_numeric($take_scout_drones)) {
    create_error("Only numbers as input allowed");
}
// round if necessary
$drop_mines = round($drop_mines);
$drop_combat_drones = round($drop_combat_drones);
$drop_scout_drones = round($drop_scout_drones);
$take_mines = round($take_mines);
$take_combat_drones = round($take_combat_drones);
$take_scout_drones = round($take_scout_drones);
// so how many forces do we take/add per type?
$change_mines = $drop_mines - $take_mines;
$change_combat_drones = $drop_combat_drones - $take_combat_drones;
$change_scout_drones = $drop_scout_drones - $take_scout_drones;
include get_file_loc('mine_change.php');
// check max on that stack
if ($forces->mines + $change_mines > 50) {
    create_error("This stack can only take up to 50 mines!");
}
if ($forces->combat_drones + $change_combat_drones > 50) {
    create_error("This stack can only take up to 50 combat drones!");
}
if ($forces->scout_drones + $change_scout_drones > 5) {
    create_error("This stack can only take up to 5 scout drones!");
}
// do we have any action at all?
if ($change_mines == 0 && $change_combat_drones == 0 && $change_scout_drones == 0) {
    create_error("You want to add/remove 0 forces?");
}
// combat drones
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:forces_drop_processing.php


示例10: get_file_loc

    }
    //used for include if we need a spec game script outside of the game
    $overrideGameID = 0;
    if (isset($var['game_id']) && is_numeric($var['game_id'])) {
        $overrideGameID = $var['game_id'];
    }
    if ($overrideGameID == 0 && isset($var['GameID']) && is_numeric($var['GameID'])) {
        $overrideGameID = $var['GameID'];
    }
    if ($overrideGameID == 0) {
        $overrideGameID = SmrSession::$game_id;
    }
    require_once get_file_loc('SmrAccount.class.inc');
    $account =& SmrAccount::getAccount(SmrSession::$account_id);
    // get reason for disabled user
    if (($disabled = $account->isDisabled()) !== false) {
        // save session (incase we forward)
        SmrSession::update();
        if ($disabled['Reason'] == 'Invalid eMail') {
            header('Location: ' . URL . '/email.php');
            exit;
        } else {
            header('Location: ' . URL . '/disabled.php');
            exit;
        }
    }
    require_once get_file_loc('smr.inc');
    do_voodoo();
} catch (Exception $e) {
    handleException($e);
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:loader.php


示例11: get_file_loc

<?php

try {
    // includes
    require_once 'config.inc';
    require_once ENGINE . 'Default/smr.inc';
    require_once get_file_loc('SmrAccount.class.inc');
    require_once get_file_loc('SmrSession.class.inc');
    // do we have a session?
    if (SmrSession::$account_id == 0) {
        header('Location: ' . URL . '/login.php');
        exit;
    }
    // get account
    $account =& SmrAccount::getAccount(SmrSession::$account_id);
    ?>
<!DOCTYPE html>

<html>
	<head>
		<link rel="stylesheet" type="text/css" href="<?php 
    echo DEFAULT_CSS;
    ?>
">
		<link rel="stylesheet" type="text/css" href="<?php 
    echo DEFAULT_CSS_COLOUR;
    ?>
">
		<title>Space Merchant Realms</title>
		<meta http-equiv='pragma' content='no-cache'>
	</head>
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:email.php


示例12: macro_check

    $db->query("SELECT * FROM macro_check WHERE account_id = {$player->account_id}");
    if ($db->next_record()) {
        $db->query("UPDATE macro_check SET good = good + 1 WHERE account_id = {$player->account_id}");
    } else {
        $db->query("REPLACE INTO macro_check (account_id, good) VALUES ({$player->account_id}, 1)");
    }
} elseif (!$var["legit"]) {
    $db->query("SELECT * FROM macro_check WHERE account_id = {$player->account_id}");
    if ($db->next_record()) {
        $db->query("UPDATE macro_check SET bad = bad + 1 WHERE account_id = {$player->account_id}");
    } else {
        $db->query("REPLACE INTO macro_check (account_id, bad) VALUES ({$player->account_id}, 1)");
    }
}
//this might help
include get_file_loc("trader_attack.inc");
$db2 = new SmrMySqlDatabase();
// initialize random generator.
mt_srand((double) microtime() * 1000000);
// creates a new player object for attacker and defender
$attacker_id = SmrSession::$old_account_id;
$defender_id = $var["target"];
$attacker_team = new SMR_BATTLE($attacker_id, SmrSession::$game_id);
$defender_team = new SMR_BATTLE($defender_id, SmrSession::$game_id);
$sector_id = $player->sector_id;
// is the defender on the planet?
// or did he left the sector?
// or is he dead?
$db->query("SELECT * FROM player " . "WHERE account_id = {$defender_id} AND " . "dead = 'TRUE' AND " . "game_id = " . SmrSession::$game_id);
if ($db->nf() == 1) {
    create_error("Your target is already dead!");
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:trader_attack_processing.php


示例13: get_file_loc

<?php

require_once get_file_loc('smr_sector.inc');
$sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id);
require_once get_file_loc("smr_force.inc");
print_topic("SECTOR SCAN");
// initialize vars
$friendly_forces = 0;
$enemy_forces = 0;
$friendly_vessel = 0;
$enemy_vessel = 0;
// get our rank
$rank_id = $account->get_rank();
// iterate over all forces in the target sector
$db->query("SELECT * FROM sector_has_forces WHERE game_id = {$player->game_id} AND " . "sector_id = " . $var["target_sector"]);
while ($db->next_record()) {
    // we may skip forces if this is a protected gal.
    if ($sector->is_protected_gal()) {
        $forces_account = new SMR_ACCOUNT();
        $forces_account->get_by_id($db->f("owner_id"));
        // if one is vet and the other is newbie we skip it
        if (different_level($rank_id, $forces_account->get_rank(), $account->veteran, $forces_account->veteran)) {
            continue;
        }
    }
    // decide if it's an friendly or enemy stack
    $forces_owner = new SMR_PLAYER($db->f("owner_id"), $player->game_id);
    $forces = new SMR_FORCE($db->f("owner_id"), $var["target_sector"], $player->game_id);
    if ($player->alliance_id == 0 && $forces->owner_id == $player->account_id || $player->alliance_id != 0 && $player->alliance_id == $forces_owner->alliance_id) {
        $friendly_forces += $forces->mines * 3 + $forces->combat_drones * 2 + $forces->scout_drones;
    } else {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:sector_scan.php


示例14: get_file_loc

<?php

require_once get_file_loc('SmrAlliance.class.inc');
// ********************************
// *
// * V a l i d a t e d ?
// *
// ********************************
// is account validated?
if (!$account->isValidated()) {
    create_error('You are not validated. You can\'t join an alliance yet.');
}
// ********************************
// *
// * B e g i n
// *
// ********************************
$alliance =& SmrAlliance::getAlliance($var['alliance_id'], $player->getGameID());
if ($alliance->canJoinAlliance($player) !== true) {
    create_error('You are not able to join this alliance currently.');
}
if ($_REQUEST['password'] != $alliance->getPassword()) {
    create_error('Incorrect Password!');
}
// assign the player to the current alliance
$player->joinAlliance($alliance->getAllianceID());
$player->update();
forward(create_container('skeleton.php', 'alliance_roster.php'));
开发者ID:smrealms,项目名称:smrv2.0,代码行数:28,代码来源:alliance_join_processing.php


示例15: get_file_loc

try {
    // ********************************
    // *
    // * 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 LIB . 'Default/Globals.class.inc';
    require_once get_file_loc('smr.inc');
    require_once get_file_loc('SmrAccount.class.inc');
    require_once get_file_loc('SmrPlayer.class.inc');
    require_once get_file_loc('SmrSector.class.inc');
    require_once get_file_loc('SmrSession.class.inc');
    require_once get_file_loc('SmrGalaxy.class.inc');
    // avoid site caching
    header('Expires: Mon, 03 Nov 1976 16:10:00 GMT');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-cache');
    header('Pragma: no-cache');
    header('Cache-Control: post-check=0, pre-check=0', FALSE);
    // ********************************
    // *
    // * S e s s i o n
    // *
    // ********************************
    // do we have a session?
    if (SmrSession::$account_id == 0 || SmrSession::$game_id == 0) {
        header('Location: ' . URL . '/login.php');
        exit;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:map_galaxy.php


示例16: round

$drop_scout_drones = round(isset($var['drop_scout_drones']) ? $var['drop_scout_drones'] : (isset($_REQUEST['drop_scout_drones']) ? trim($_REQUEST['drop_scout_drones']) : 0));
$take_mines = round(isset($var['take_mines']) ? $var['take_mines'] : (isset($_REQUEST['take_mines']) ? trim($_REQUEST['take_mines']) : 0));
$take_combat_drones = round(isset($var['take_combat_drones']) ? $var['take_combat_drones'] : (isset($_REQUEST['take_combat_drones']) ? trim($_REQUEST['take_combat_drones']) : 0));
$take_scout_drones = round(isset($var['take_scout_drones']) ? $var['take_scout_drones'] : (isset($_REQUEST['take_scout_drones']) ? trim($_REQUEST['take_scout_drones']) : 0));
// do we have numbers?
if (!empty($drop_mines) && !is_numeric($drop_mines) || !empty($drop_combat_drones) && !is_numeric($drop_combat_drones) || !empty($drop_scout_drones) && !is_numeric($drop_scout_drones) || !empty($take_mines) && !is_numeric($take_mines) || !empty($take_combat_drones) && !is_numeric($take_combat_drones) || !empty($take_scout_drones) && !is_numeric($take_scout_drones)) {
    create_error('Only numbers as input allowed!');
}
// so how many forces do we take/add per type?
$change_mines = $drop_mines - $take_mines;
$change_combat_drones = $drop_combat_drones - $take_combat_drones;
$change_scout_drones = $drop_scout_drones - $take_scout_drones;
if ($sector->hasLocation()) {
    create_error('You can\'t drop forces in a sector with a location!');
}
require_once get_file_loc('SmrForce.class.inc');
$forces =& SmrForce::getForce($player->getGameID(), $player->getSectorID(), $var['owner_id']);
// check max on that stack
if ($forces->getMines() + $change_mines > 50) {
    $change_mines = 50 - $forces->getMines();
    //	create_error('This stack can only take up to 50 mines!');
}
if ($forces->getCDs() + $change_combat_drones > 50) {
    $change_combat_drones = 50 - $forces->getCDs();
    //	create_error('This stack can only take up to 50 combat drones!');
}
if ($forces->getSDs() + $change_scout_drones > 5) {
    $change_scout_drones = 5 - $forces->getSDs();
    //	create_error('This stack can only take up to 5 scout drones!');
}
// Check if the delta is 0 after applying the caps, in case by applying the caps we actually changed it to 0.
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:forces_drop_processing.php


示例17: get_file_loc

<?php

try {
    // ********************************
    // *
    // * 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'));
    }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:login.php


示例18: get_file_loc

<?php

if (isset($var['alliance_id'])) {
    $alliance_id = $var['alliance_id'];
} else {
    $alliance_id = $player->alliance_id;
}
require_once get_file_loc('smr_alliance.inc');
if (isset($_REQUEST['password'])) {
    $password = $_REQUEST['password'];
}
if (isset($_REQUEST['description'])) {
    $description = $_REQUEST['description'];
}
if (isset($_REQUEST['mod'])) {
    $mod = $_REQUEST['mod'];
}
if (isset($_REQUEST['url'])) {
    $url = $_REQUEST['url'];
}
if (isset($password) && $password == "") {
    create_error("I advice you set a non empty password!");
}
if (isset($description) && $description == "") {
    create_error("Please enter a description for your alliance");
}
$alliance = new SMR_ALLIANCE($alliance_id, $player->game_id);
if (isset($password)) {
    $alliance->password = $password;
}
if (isset($description)) {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_stat_processing.php


示例19: get_file_loc

<?php

require_once get_file_loc('ChessGame.class.inc');
$template->assignByRef('ChessGame', ChessGame::getChessGame($var['ChessGameID']));
$template->assign('ChessMoveHREF', SmrSession::getNewHREF(create_container('chess_move_processing.php', '', array('AJAX' => true, 'ChessGameID' => $var['ChessGameID']))));
开发者ID:smrealms,项目名称:smrv2.0,代码行数:5,代码来源:chess_play.php


示例20: print_link

if (SmrSession::$game_id > 0) {
    echo '<big>';
    $container['body'] = 'chat_rules.php';
    print_link($container, 'IRC Chat');
    echo '</big><br>';
}
echo '<a href="http://smrcnn.smrealms.de/viewtopic.php?t=3515/album/" target="_blank">User Policy</a><br>';
echo '<a href="http://smrcnn.smrealms.de/" target="_blank">WebBoard</a></b><br>';
$container['body'] = 'donation.php';
print_link($container, 'Donate');
echo '
</div></div>
</td>
<td colspan="2" class="m0"><div class="m1"><div class="m2">
';
include get_file_loc($var["body"]);
echo '
</div></div>
</td>
<td rowspan="2" class="r0"><div class="r1"><div class="r2">
';
if (SmrSession::$game_id != 0) {
    $under_attack_shields = $ship->old_hardware[HARDWARE_SHIELDS] != $ship->hardware[HARDWARE_SHIELDS];
    $under_attack_armor = $ship->old_hardware[HARDWARE_ARMOR] != $ship->hardware[HARDWARE_ARMOR];
    $under_attack_drones = $ship->old_hardware[HARDWARE_COMBAT] != $ship->hardware[HARDWARE_COMBAT];
    if ($under_attack_shields || $under_attack_armor || $under_attack_drones) {
        echo '
			<div id="attack_warning" class="attack_warning"><nobr>You are under attack!</nobr></div>
			<script type="text/javascript">
			SetBlink();
			</script>
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:skeleton.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_file_name函数代码示例发布时间:2022-05-15
下一篇:
PHP get_file_info函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap