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

include_once("settings.php");
include_once(
"game_header.php");
include_once(
"creature.php");

if(isset(
$_REQUEST['mob'])){
    
$vnum_mob=$_REQUEST['mob'];
}else{
    
$vnum_mob="";
}

if(isset(
$_REQUEST['mode'])){
    
$mode $_REQUEST['mode'];
}else{
    
$mode '';
}

$creature = new CCreature($db,$vnum_mob);

$creature_name $creature->getName();


$creature_desc $creature->getDesc();
$creature_hp $creature->getCurHP();
$creature_ac $creature->getAC();
$creature_dm $creature->getMaxDM();


$smarty->assign('NAME',$creature_name);
$smarty->assign('DESC',$creature_desc);
$smarty->assign('HP',$creature_hp);
$smarty->assign('AC',$creature_ac);
$smarty->assign('DM',$creature_dm);

//make image path
$obj=$creature->getVnum();
$image_path=IMAGE_PATH.'animals/'.$obj.'.gif';
print(
$image_path);
//check file
if(!checkFile($image_path)) $image_path="";//no images
$smarty->assign('IMAGE_PATH',$image_path);

switch(
$mode){
    case 
'compare':
        
$mobinfo=$smarty->fetch($templ_path.'/mobinfo_compare.tpl');
        break;
    default:
        
$mobinfo=$smarty->fetch($templ_path.'/mobinfo.tpl');
}

$smarty->assign('MAIN',$mobinfo);

echo(
$smarty->fetch($templ_path.'/game.tpl'));

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