Вход Регистрация
Файл: include/game_header.php
Строк: 44
<?php

include_once('common_func.php');
include_once(
'players.php');
include_once(
'skill.php');

//check login
session_start();

//check player info
checkPlayerSession();

//check city
$player=new CPlayer($db,$_SESSION['vnum']);
$skill=new CSkill($db,$_SESSION['vnum']);

//set player activity
$player->setPlayerActivity();

$room_id=$player->getRoom();
$smarty->assign('ROOM',$room_id);

$cur_time=getTimes(time());
$smarty->assign('TIME',$cur_time);
$players = new CPlayers($db);
$online $players->getOnlinePlayers();
$smarty->assign('ONLINE',$online);

//get player info
$player_name=$player->getName();
$smarty->assign('PLAYER_NAME',$player_name);
$hp=$player->getHP();
$smarty->assign('PLAYER_HP',$hp);
$hp_max=$player->getMaxHP();
$smarty->assign('PLAYER_MAX_HP',$hp_max);
$hp_cur floor($hp/$hp_max*100);
$hp_need 100-$hp_cur;
$smarty->assign('HP_CUR',$hp_cur);
$smarty->assign('HP_NEED',$hp_need);

$player_level $skill->getSkillLevel(SKILL_HP);
$smarty->assign('PLAYER_LEVEL',$player_level);


$smarty->assign('CHAT_ANGEL',$player->getChatAngel());

$game_nav=$smarty->fetch($templ_path.'/game_nav.tpl');
$smarty->assign('GAME_NAV',$game_nav);

?>
Онлайн: 1
Реклама