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


PHP DatabaseManager::getLastTimestamp方法代码示例

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


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

示例1: DatabaseManager

$dbMgr = new DatabaseManager(true);
$objectFactory = new ObjectFactory();
$formBuilder = new FormBuilder();
if (isset($argArray['re'])) {
    $reactionID = $argArray['re'];
    $reaction = $objectFactory->create(ObjectFactory::REACTION, $reactionID);
}
if (isset($argArray['c']) && $reaction->getReactionType() == 2) {
    $chain = 1;
    $chainStr = "Reaction Chain";
} else {
    $chain = 0;
    $chainStr = "Reaction";
}
if (isset($argArray['d'])) {
    $datetime = $dbMgr->getLastTimestamp($argArray['d'], 300);
    $dateChanged = 1;
} else {
    $datetime = $dbMgr->getLastTimestamp(time(), 300);
}
$options = array("r" => $_SESSION['params']['r'], "c" => $chain, "s" => $_SESSION['params']['s'], "g" => $_SESSION['params']['g'], "sy" => $_SESSION['params']['sy'], "i" => $_SESSION['params']['i'], "f" => $_SESSION['params']['f'], "o" => $_SESSION['params']['o'], "st" => $_SESSION['params']['st'], "b" => $_SESSION['params']['b'], "t" => $_SESSION['params']['t']);
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Reaction Scenario Drill-down</title>
		<link rel="stylesheet" type="text/css" href="include/css/bootstrap.css">
		<link rel="stylesheet" type="text/css" href="include/css/toolkit.css">
开发者ID:Covert-Inferno,项目名称:reaction-toolkit,代码行数:31,代码来源:scenario.php

示例2: chdir

<?php

chdir(__DIR__);
while (!file_exists('include/config/config.php')) {
    chdir('..');
}
include_once 'include/config/config.php';
$dbMgr = new DatabaseManager(false);
$twoDaysAgo = $dbMgr->getLastTimestamp(time() - 172800, 86400);
$yesterday = $dbMgr->getLastTimestamp(time() - 86400, 86400);
$dbMgr->processDailyHistoricalPrices($yesterday);
$dbMgr->deletePriceData($twoDaysAgo);
开发者ID:Covert-Inferno,项目名称:reaction-toolkit,代码行数:12,代码来源:process_historical_prices.php

示例3: microtime

<?php

require_once 'include/session_setup.php';
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
$scriptName = basename($_SERVER['PHP_SELF']);
$options = array("r" => $_SESSION['params']['r'], "s" => $_SESSION['params']['s'], "g" => $_SESSION['params']['g'], "sy" => $_SESSION['params']['sy'], "i" => $_SESSION['params']['i'], "f" => $_SESSION['params']['f'], "o" => $_SESSION['params']['o'], "t" => $_SESSION['params']['t']);
$dbMgr = new DatabaseManager(true);
$objectFactory = new ObjectFactory();
$formBuilder = new FormBuilder();
$datetime = $dbMgr->getLastTimestamp(time(), 300);
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <?php 
if (isset($argArray['configure'])) {
    echo "<title>Reaction Toolkit Configuration</title>";
} else {
    echo "<title>Reaction Toolkit Dashboard</title>";
}
?>
        <link rel="stylesheet" type="text/css" href="include/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="include/css/toolkit.css">
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"></script>
        <script type="text/javascript">
开发者ID:Covert-Inferno,项目名称:reaction-toolkit,代码行数:31,代码来源:dashboard.php

示例4: chdir

<?php

chdir(__DIR__);
while (!file_exists('include/config/config.php')) {
    chdir('..');
}
require_once 'include/config/config.php';
$filePath = __DIR__;
$statusFile = "{$filePath}/../include/pages/price_update.txt";
$status = "";
$dbMgr = new DatabaseManager(false);
$api = new MarketAPI();
$source = $api->updatePrices();
if ($source !== false) {
    $status = "Prices updated successfully from {$source} as of " . $dbMgr->getLastTimestamp(time()) . " EVE time (UTC).";
} else {
    $status = "Last price update failed.  Oops.";
}
file_put_contents($statusFile, $status);
开发者ID:Covert-Inferno,项目名称:reaction-toolkit,代码行数:19,代码来源:update_prices.php

示例5: array

         $numCycles = $dbMgr->getNumCycles($_SESSION['params']['t']);
         break;
     case "w":
         $timeframeStr = "Weekly";
         $numCycles = $dbMgr->getNumCycles($_SESSION['params']['t']);
         break;
     case "m":
         $timeframeStr = "Monthly";
         $numCycles = $dbMgr->getNumCycles($_SESSION['params']['t']);
         break;
 }
 $numCycles = $dbMgr->getNumCycles($_SESSION['params']['t']);
 $graphTitle = "{$itemName} {$chainStr} Historical {$timeframeStr} Net Income";
 $historicalData = array();
 for ($x = 0; $x < $numResults; $x++) {
     $datetime = $dbMgr->getLastTimestamp(time() - $modulo * $x, $modulo);
     switch ($_SESSION['params']['rn']) {
         case "d":
             $datetime = $dbMgr->getLastTimestamp(time() - $modulo * $x, $modulo);
             break;
         case "m":
             $datetime = date("Y-m-d", strtotime($datetime));
             break;
         case "y":
             $datetime = date("F Y", strtotime($datetime));
             break;
     }
     $calc = new Calculator($reactionID, $chain, $datetime);
     $netIncome = $calc->getHourlyNetIncome() * $numCycles;
     $historicalData[$datetime] = $netIncome;
 }
开发者ID:Covert-Inferno,项目名称:reaction-toolkit,代码行数:31,代码来源:history.php


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