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

PHP getStat函数代码示例

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

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



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

示例1: getStatName

function getStatName($stat)
{
    if (!is_array($stat)) {
        $stat = getStat($stat);
    }
    return array("name" => $stat['name'], "fullName" => $stat['fullName']);
}
开发者ID:gordonc64,项目名称:CellAO-WebCore,代码行数:7,代码来源:stats.php


示例2: getCpuUsage

 function getCpuUsage($_statPath = '/proc/stat')
 {
     $msge = "<div id='getCpuUsage'><small class='r'>getCpuUsage():<br />couldn't access STAT path</small></div><script type='text/javascript'>function killElement(){ document.getElementById('getCpuUsage').style.display='none'; } setTimeout('killElement()', 5000);</script>";
     $time1 = getStat($_statPath) or false;
     sleep(1);
     $time2 = getStat($_statPath) or false;
     $delta = array();
     if ($time1 != false && $time2 != false) {
         foreach ($time1 as $k => $v) {
             $delta[$k] = $time2[$k] - $v;
         }
         $deltaTotal = array_sum($delta);
         $percentages = array();
         foreach ($delta as $k => $v) {
             $percentages[$k] = @round($v / $deltaTotal * 100, 2);
         }
         return $percentages;
     } else {
         return $msge;
         //return false;
     }
 }
开发者ID:laiello,项目名称:rapidleech36b,代码行数:22,代码来源:sinfo.php


示例3: function

         $tripod->saveChanges($oldGraph, new \Tripod\ExtendedGraph());
     });
     $app->post('/', function ($storeName, $podName) use($app, $tripodOptions) {
         $tripodOptions['statsConfig'] = getStat($app, $tripodOptions);
         $tripod = new \Tripod\Mongo\Driver($podName, $storeName, $tripodOptions);
         $rawGraphData = $app->request()->getBody();
         $graph = new \Tripod\Mongo\MongoGraph();
         $graph->add_rdf($rawGraphData);
         $tripod->saveChanges(new \Tripod\ExtendedGraph(), $graph);
     });
 });
 $app->group('/change', function () use($app, $tripodOptions) {
     $app->post('/', function ($storeName, $podName) use($app, $tripodOptions) {
         \Tripod\Mongo\Config::setConfig(json_decode(file_get_contents('./config/tripod-config-' . $storeName . '.json'), true));
         $app->response()->setStatus(500);
         $tripodOptions['statsConfig'] = getStat($app, $tripodOptions);
         $tripod = new \Tripod\Mongo\Driver($podName, $storeName, $tripodOptions);
         $rawChangeData = $app->request()->post('data');
         if ($rawChangeData) {
             $changeData = json_decode($rawChangeData, true);
             $from = new \Tripod\Mongo\MongoGraph();
             $to = new \Tripod\Mongo\MongoGraph();
             if (isset($changeData['originalCBDs'])) {
                 foreach ($changeData['originalCBDs'] as $change) {
                     if (is_array($change) && isset($change[_ID_KEY])) {
                         $from->add_tripod_array($change);
                     }
                 }
             }
             if (isset($changeData['newCBDs'])) {
                 foreach ($changeData['newCBDs'] as $change) {
开发者ID:talis,项目名称:tripod-php,代码行数:31,代码来源:index.php


示例4: header

<?php

include_once "include/check_login.php";
if ($user_ok == false) {
    header('location: restricted.php?refPage=mydecks');
}
/******************************************************************************************************************/
require_once 'stats.php';
$pid = getUserID($_SESSION['username']);
$lv = getStat('lv', $pid);
$pDecks = getUserDecks($pid);
$pDecksSrtAscArr = sortDeckArrDN($pDecks);
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>My Decks </title>
	<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
	<link rel="stylesheet" type="text/css" href="css/readable.bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/newStyle.css">
	<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
	<!--<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">-->
	<!--[if lt IE 9]>
	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
	<script type="text/javascript">
		<!-- 
		//Browser Support Code
		function _(el){
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:mydecks.php


示例5: getPvpRank

	<link rel="stylesheet" type="text/css" href="css/newStyle.css">
	<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
</head>
<body>
	<div class="row">
		<div class="col-md-2"></div>
		<div class="col-md-8 table-responsive">
			<h1>PVP</h1>
			<?php
			$i =2;
			foreach($pvpDis as $rank){?>
				<div class="row">
					<div class="col-xs-12">
						<?= getPvpRank(getPvpUI($pvpDis[$i])); ?>
						<span id="user<?= $i;?>"><?= getUserDetail(getPvpUI($pvpDis[$i]),'username'); ?>, </span>
						Lvl <?= getStat('lv',getPvpUI($pvpDis[$i])); ?>
						<a href="#3" id="battle<?= $i;?>" name="">Battle</a>
					</div>
				</div><?
				$i--;
			} ?>
			
			
		</div>
		<div class="col-md-2"></div>
	</div>
	<script>
		var battle2 = document.getElementById("battle2");
		var battle1 = document.getElementById("battle1");
		var battle0 = document.getElementById("battle0");
		var user2 = document.getElementById("user2").innerHTML;
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:pvp.php


示例6: getCpuUsage

 function getCpuUsage($_statPath = '/proc/stat')
 {
     $time1 = getStat($_statPath);
     if (!$time1) {
         return -1;
     }
     sleep(1);
     $time2 = getStat($_statPath);
     $delta = array();
     foreach ($time1 as $k => $v) {
         $delta[$k] = $time2[$k] - $v;
     }
     $deltaTotal = array_sum($delta);
     $percentages = array();
     foreach ($delta as $k => $v) {
         $percentages[$k] = @round($v / $deltaTotal * 100, 2);
     }
     return $percentages;
 }
开发者ID:SheppeR,项目名称:rapidleech,代码行数:19,代码来源:sinfo.php


示例7: getStat

<?php

require_once "auth.php";
require_once "smarty.php";
require_once "backend/functions.php";
$stat = getStat();
$smarty->assign("users_all", $stat['Users']['All']);
$smarty->assign("users_admin", $stat['Users']['Admin']);
$smarty->assign("FiberSplice_NetworkNodesCount", $stat['FiberSplice']['NetworkNodesCount']);
$smarty->assign("NetworkNodeCountInFiberSplice", $stat['FiberSplice']['NetworkNodeCountInFiberSplice']);
$smarty->assign("FiberSplice_FiberSpliceCount", $stat['FiberSplice']['FiberSpliceCount']);
$smarty->assign("CableLinePointCount", $stat['CableLinePoint']['Count']);
$smarty->assign("NetworkNodesCount", $stat['NetworkNode']['Count']);
$smarty->assign("NetworkBoxesCount", $stat['NetworkBox']['Count']);
$smarty->display("index.tpl");
开发者ID:nitr0man,项目名称:fiberms,代码行数:15,代码来源:index.php


示例8: session_start

<?php

session_start();
$name = $_SESSION['username'];
include $_SERVER['DOCUMENT_ROOT'] . '/include/db_browsergame.inc.php';
require $_SERVER['DOCUMENT_ROOT'] . '/browsergame/inc/logincheck.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/browsergame/functions/stats.function.php';
$setHP = getStat('sethp', $userID);
if ($setHP == 0) {
    setStat('curhp', $userID, 10);
    setStat('maxhp', $userID, 10);
    setStat('sethp', $userID, 1);
}
$attack = getStat('atk', $userID);
$magic = getStat('mag', $userID);
$defence = getStat('def', $userID);
$gold = getStat('gc', $userID);
$currentHP = getStat('curhp', $userID);
$maximumHP = getStat('maxhp', $userID);
require "main.html.php";
开发者ID:Hjorvar,项目名称:bbg,代码行数:20,代码来源:index.php


示例9: COUNT

    $msg = '	Total citations ignored for IA: ';
    $sql = "SELECT COUNT(DISTINCT nid) AS total FROM citebank_internet_archive_records WHERE archive_status = -1";
    getStat($dbi, $msg, $sql);
    $totalCitationsExternallyHosted = $totalCitations - $totalIACitations;
    echo '<br>';
    $msg = '	Citations in CB (externally hosted content files): ';
    echo $msg . $totalCitationsExternallyHosted;
    // ****************************************
    // ****************************************
    // ****************************************
} else {
    // just public stats
    // total citations
    $msg = '	Total citations: ';
    $sql = "SELECT COUNT(*) AS total FROM node AS n JOIN biblio AS b ON (n.nid = b.nid) WHERE n.type = 'biblio'";
    getStat($dbi, $msg, $sql);
}
statsEchoLine();
/*
 *
 */
function getStat($dbi, $msg, $sql)
{
    $rows = $dbi->fetch($sql);
    $count = 0;
    if (count($rows) > 0) {
        $count = $rows[0]['total'];
    }
    echo '<br>';
    echo $msg . $count;
    return $count;
开发者ID:hoangbktech,项目名称:bhl-bits,代码行数:31,代码来源:citebankstatspage.php


示例10: seoPages

 private function seoPages($task)
 {
     $mainframe =& JFactory::getApplication();
     $this->addSubmenu('pages_view');
     require_once "classes/MetatagsContainerFactory.php";
     $itemType = JRequest::getVar('type', null, '', 'string');
     if (!$itemType) {
         $itemType = key(MetatagsContainerFactory::getFeatures());
     }
     $metatagsContainer = MetatagsContainerFactory::getContainerById($itemType);
     if (!is_object($metatagsContainer)) {
         //TODO: throw error here.
     }
     switch ($task) {
         case "pages_save_text":
             $metatagsContainer->setMetadata($id = JRequest::getVar('id', '', '', 'int'), array("title" => JRequest::getVar('title', '', '', 'string'), "metatitle" => JRequest::getVar('metatitle', '', '', 'string'), "metakeywords" => JRequest::getVar('metakeywords', '', '', 'string'), "metadescription" => JRequest::getVar('metadescription', '', '', 'string')));
             echo "<script>window.parent.document.adminForm.submit();</script>";
             break;
         case "pages_edit_text":
             $id = JRequest::getVar('id', '', '', 'int');
             $data = $metatagsContainer->getMetadata($id);
             $data["id"] = $id;
             $view =& $this->getView('Pages');
             $view->assignRef('itemType', $itemType);
             $view->assignRef('data', $data);
             $view->display('edit');
             break;
         default:
             $limit = JRequest::getVar('limit', $mainframe->getCfg('list_limit'));
             $limitstart = JRequest::getVar('limitstart', 0);
             $db =& JFactory::getDBO();
             $pages = $metatagsContainer->getPages($limitstart, $limit);
             $db->setQuery('SELECT FOUND_ROWS();');
             //no reloading the query! Just asking for total without limit
             jimport('joomla.html.pagination');
             $pageNav = new JPagination($db->loadResult(), $limitstart, $limit);
             require_once "algorithm/KeywordsCounter.php";
             for ($i = 0; $i < count($pages); $i++) {
                 $stat_arr = array();
                 for ($j = 0; $j < count($pages[$i]->metakey); $j++) {
                     $stat_arr[] = getStat($pages[$i]->metakey[$j], $pages[$i]->content);
                 }
                 $pages[$i]->stat = $stat_arr;
             }
             $view =& $this->getView('Pages');
             $view->assignRef('itemType', $itemType);
             $view->assignRef('rows', $pages);
             $view->assignRef('page', $page);
             $view->assignRef('itemsOnPage', $itemsOnPage);
             $view->assignRef('filter', $metatagsContainer->getFilter());
             $view->assignRef('availableTypes', MetatagsContainerFactory::getFeatures());
             $view->assignRef('pageNav', $pageNav);
             $view->display();
     }
 }
开发者ID:Rikisha,项目名称:proj,代码行数:55,代码来源:controller.php


示例11: session_start

<?php

session_start();
include '../stats.php';
echo getStat('gc', getUserID(preg_replace('#[^a-z0-9]#i', '', $_SESSION['username'])));
开发者ID:Knixd,项目名称:JPVocab,代码行数:5,代码来源:updateGoldScript.php


示例12: getSomeDecks

			<div class="row"><?php
				$someDecks = getSomeDecks($t);
				$j=0;
				foreach($someDecks as $row => $deck){
					if(!$deck['is_sentences']){
						$deckOwners = countDeckOwners($deck['display_name']);
						if($j % 2 == 0){ ?><div class="clearfix visible-sm"></div><? }
						if($j % 3 == 0){ ?><div class="clearfix visible-md visible-lg"></div><? }?>
						<div class="col-sm-6 col-md-4">
							<div class="thumbnail">
							  <img src="../img/<?= $deck['picture'];?>" class="img-responsive" alt="<?= $deck['display_name'];?> Vocabulary" class="img-responsive">
							  <div class="caption">
								<h4><a href="http://www.JPVocab.com/Japanese-Vocabulary/deck.php?t=<?= $t;?>&d=<?= $deck['display_url']; ?>"><?= $deck['display_name'];?></a></h4>
								<p>
									 
									<a href="#2" data-toggle="popover" title="Deck Owners" data-content="<? if($user_ok ==false){ echo "Oh hey! You need to <strong>Login</strong> to do that.";}else{ foreach($deckOwners as $row => $user){ echo "<a href='http://www.jpvocab.com/player.php?player=".$user['username']."&report=summary'>". $user['username'] ."</a> <i class='text-muted small '>Lvl <strong>".getStat('level',$user['id'])."</strong></i><br />"; } }?>" data-trigger="focus" data-html="true"><small><strong><?= sizeOf($deckOwners); ?></strong> Users</a> Own This Deck</small>
								</p>
								<p><?= $deck['description'];?></p>
								<p>
									<a href="http://www.JPVocab.com/Japanese-Vocabulary/deck.php?t=<?= $t;?>&d=<?= $deck['display_url']; ?>" class="btn btn-default btn-block" role="button">Interested?</a>
								</p>
							  </div>
							</div>
						</div><?php
						$j++;
					}
				}?>
				<!--<small><a href="http://www.JPVocab.com/flashcard-rewards.php" alt="Japanese flashcard reward system">What the heck are <span class="label label-warning">Gold</span> and <span class="label label-default">Diamonds</span>?</a></small>-->
			</div>
		</div>
	</div>
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:template-display-decks.php


示例13: sprintf

         if ($count > 0) {
             # already has one of the item
             $query = sprintf("UPDATE user_items SET quantity = quantity + 1 WHERE user_id = '%s' AND item_id = '%s'", mysql_real_escape_string($userID), mysql_real_escape_string($itemID));
         } else {
             # has none - new row
             $query = sprintf("INSERT INTO user_items(quantity,user_id,item_id) VALUES (1,'%s','%s')", mysql_real_escape_string($userID), mysql_real_escape_string($itemID));
         }
         mysql_query($query);
         # retrieve the item name, so that we can display it
         $query = sprintf("SELECT name FROM items WHERE id = %s", mysql_real_escape_string($itemID));
         $result = mysql_query($query);
         list($itemName) = mysql_fetch_row($result);
         $smarty->assign('item', $itemName);
         $monster_exp = getMonsterStat('exp', $monsterID);
         $smarty->assign('exp', $monster_exp);
         $exp_rem = getStat('exp_rem', $userID);
         $exp_rem -= $monster_exp;
         $level_up = 0;
         if ($exp_rem <= 0) {
             // level up!
             $exp_rem = 100;
             $level_up = 1;
         }
         $smarty->assign('level_up', $level_up);
         setStat('exp_rem', $userID, $exp_rem);
     } else {
         // monster won
         $smarty->assign('lost', 1);
     }
     $smarty->assign('combat', $combat);
 } else {
开发者ID:LoveLeAnon,项目名称:building-browsergames-tutorial,代码行数:31,代码来源:explore.php


示例14: setMoneyBalances

function setMoneyBalances($sElement, $sMethod, $userId)
{
    $userFunds = getStat($sMethod, $userId);
    $elementP = getPrice($sElement, $sMethod);
    $balance = $userFunds - $elementP;
    if ($balance >= 0) {
        setStat($sMethod, $userId, $balance);
        return 'success';
    }
}
开发者ID:Knixd,项目名称:JPDrills,代码行数:10,代码来源:stats.php


示例15: session_start

<?php

require_once 'smarty.php';
session_start();
require_once 'config.php';
// our database settings
require_once 'stats.php';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
mysql_select_db($dbname);
// retrieve user ID
$query = sprintf("SELECT id FROM users WHERE UPPER(username) = UPPER('%s')", mysql_real_escape_string($_SESSION['username']));
$result = mysql_query($query);
list($userID) = mysql_fetch_row($result);
if ($_POST) {
    $amount = $_POST['amount'];
    $gold = getStat('gc', $userID);
    $needed = getStat('maxhp', $userID) - getStat('curhp', $userID);
    if ($amount > $needed || $amount == '') {
        $amount = $needed;
    }
    if ($amount > $gold) {
        $amount = $gold;
    }
    setStat('gc', $userID, getStat('gc', $userID) - $amount);
    setStat('curhp', $userID, getStat('curhp', $userID) + $amount);
    $smarty->assign('healed', $amount);
}
$smarty->assign('curhp', getStat('curhp', $userID));
$smarty->assign('maxhp', getStat('maxhp', $userID));
$smarty->assign('gold', getStat('gc', $userID));
$smarty->display('healer.tpl');
开发者ID:LoveLeAnon,项目名称:building-browsergames-tutorial,代码行数:31,代码来源:healer.php


示例16: getStat

$def = getStat('def', $pid);
$gc = getStat('gc', $pid);
$confidence = getStat('conf', $pid);
$maxconf = getStat('maxconf', $pid);
$lv = getStat('lv', $pid);
$cvDN = getDeckInfo(getSkill('cvset', $pid), 'display_name');
$currentHP = getStat('curhp', $pid);
$maximumHP = getStat('maxhp', $pid);
$setHP = getStat('sethp', $pid);
$ttldks = getStat('ttldks', $pid);
$ttlpvstyl = getStat('ttlpvstyl', $pid);
$sumcfc = getStat('sumcfc', $pid);
$sumckanjiRE = getStat('sumckanjiRE', $pid);
$sumckanjiE = getStat('sumckanjiE', $pid);
$sumckanjiH = getStat('sumckanjiH', $pid);
$sumcaudioR = getStat('sumcaudioR', $pid);
$vocabulary = round(getScore('vocabulary', $pid), 2);
$listening = round(getScore('listening', $pid), 2);
$kanji = round(getScore('kanji', $pid), 2);
$ttldks = countUserDecks($pid);
$pDecks = getUserDecks($pid);
$pDecksSrtAscArr = sortDeckArrDN($pDecks);
//careful with this. vertNav.php uses $uDecksSrtAscArr
include "pdc.php";
try {
    $stmt = $db->query("SELECT  uo.*,\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\tSELECT  COUNT(*)\n\t\t\t\t\t\t\tFROM    user_stats ui\n\t\t\t\t\t\t\tWHERE   (ui.value) >= (uo.value)\n\t\t\t\t\t\t\tAND ui.stat_id=14\n\t\t\t\t\t\t\t) AS rank\n\t\t\t\t\t\tFROM    user_stats uo\n\t\t\t\t\t\tWHERE user_id={$pid}\n\t\t\t\t\t\tAND stat_id=14");
    $urank = $stmt->fetchALL(PDO::FETCH_ASSOC);
} catch (PDOException $ex) {
    echo "Couldn't get rank <br />";
}
$ranktfca = $urank[0]['value'] != 0 ? $urank[0]['rank'] : 'N/A';
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:player.php


示例17: setLevelUp

        $_SESSION['streak'] = 0;
        $result = "<span style='color:#E15119'>WRONG..</span>";
    }
    $changeLog[] = "</ul></div>";
    //*******************************************************************************
    //********CHECK IF PLAYER LEVELED UP & PREPARE DISPLAY VARIABLES*****************
    //*******************************************************************************
    $lvUp = setLevelUp($userID, 'quiz');
    //change lv's if needed
    //Prepare Summary of Guess Results (correct/incorrect) for User Display
    $previousQ = "<span style='color:green;'>" . getWord($_POST['questionID'], $questionFromBank) . "</span>";
    if (getSkill('vStyle', $userID) == 'kanjiH') {
        $previousA = "<span style='color:green;'>" . getReading($answerID, $answerFromBank) . "</span>";
    } else {
        $previousA = "<span style='color:green;'>" . getWord($answerID, $answerFromBank) . "</span>";
    }
    $origQ = getWord($_POST['questionID'], $questionFromBank);
    $lv = getStat('lv', $userID);
    $currentConf = getStat('conf', $userID);
    $maxconf = getStat('maxconf', $userID);
    $currConfPerc = $currentConf / $maxconf * 100;
    $vsLv = getSkill($cvset . '_' . $vstyle . '_lv', $userID);
    $vsProg = getSkill($cvset . '_' . $vstyle . '_prog', $userID);
    $vsProgMax = getSkill($cvset . '_' . $vstyle . '_prog_max', $userID);
}
include '../display_mc.php';
?>



开发者ID:Knixd,项目名称:JPVocab,代码行数:27,代码来源:check.php


示例18: getCpuUsage

                }
            } else {
                $first = 0;
            }
        }
        return $cores;
    }
    /* compares two information snapshots and returns the cpu percentage */
    function getCpuUsage($stat1, $stat2)
    {
        if (count($stat1) !== count($stat2)) {
            return;
        }
        for ($i = 0; $i < count($stat1); $i++) {
            $diff_idle[$i] = $stat2[$i]['idle'] - $stat1[$i]['idle'];
            $diff_total[$i] = $stat2[$i]['total'] - $stat1[$i]['total'];
            $DU = round(1000 * ($diff_total[$i] - $diff_idle[$i]) / $diff_total[$i] / 10, 2);
            $diff_usage[$i] = $DU > 100 ? 100 : $DU;
        }
        return $diff_usage;
    }
    $stat1 = getStat();
    sleep(1);
    $stat2 = getStat();
    $cores = getCpuUsage($stat1, $stat2);
    $nocpushow = "0";
} elseif ($os == "nocpu") {
    $nocpushow = "1";
} else {
    $nocpushow = "1";
}
开发者ID:jamiebatch452,项目名称:Open-Game-Panel,代码行数:31,代码来源:cpu.php


示例19: getStat

        </center>
    </div>
</div>
</header>
<?php 
if (isset($_SESSION['username'])) {
    ?>
	<div class="container">
	<div class="row no-marg-top-23" style="font-size:0.8em">
		<div class="col-xs-12 col-sm-6 text-left">
				<a href="http://www.JPVocab.com/users.php" alt="Online JPVocab Users" title="View Online Users"><u><?php 
    echo $uOnQ;
    ?>
</u></a>
		</div>
		<div class="col-xs-12  col-sm-6 pull-right text-right">
			<span>You have <b><span id="headerGC" class="text-success"><?php 
    echo getStat('gold', $_SESSION['userid']);
    ?>
</span></b> <span class="label label-warning">Gold Coins</span>
			<!--and <span class="label label-default"><?php 
    echo getStat('diamonds', $_SESSION['userid']);
    ?>
 Diamonds</span> <a href="http://www.JPVocab.com/diamond.php" title="Get Diamonds"><i>Get Diamonds</i></span></a>-->
		</div>
	</div>
	</div>
	<?php 
}
?>
<script src="../js/update-status.js" type="text/javascript"></script>
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:header.php


示例20: header

<?php

header('Content-Type: text/html; charset=utf-8');
include_once "include/check_login.php";
if ($user_ok == false) {
    header('location: restricted.php?refPage=train');
}
require_once 'config.php';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
mysql_select_db($dbname);
require_once 'stats.php';
$userID = getUserID(preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']));
$player = array(name => preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']), attack => getStat('atk', $userID), defence => getStat('def', $userID), magic => getStat('mag', $userID), curhp => getStat('curhp', $userID), maxhp => getStat('maxhp', $userID), level => getStat('lv', $userID), xp => getStat('conf', $userID), maxxp => getStat('maxconf', $userID), gold => getStat('gc', $userID));
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="robots" content="NOODP">
	<meta name="description" content="Japanese Flashcards. Many decks. Many styles. - jpvocab.com">
	<title>Train - jpvocab.com</title>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" type="text/css" href="css/readable.bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/newStyle.css">
	<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
	
	<!--[if lt IE 9]>
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:train.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getStatData_Column2D函数代码示例发布时间:2022-05-15
下一篇:
PHP getSqlForNameInDisplayFormat函数代码示例发布时间: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