session_start require_once lib xtemplate class php require_once lib my

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?
session_start();
require_once('lib/xtemplate.class.php');
require_once('lib/mysql_connect.php');
$xtpl = new XTemplate('templates/main.html');
$modules=array('showmap','item','npc','npclist','itemlist');
$css='';
$js='';
$title='';
$kw='lineage 2 ii gracia база знания база знаний игра ru русский квест'; //keywords
$desc=''; //description
if(isset($_REQUEST['module']) AND in_array($_REQUEST['module'],$modules)){
$xtpl->assign_file('center','templates/'.$_REQUEST['module'].'.html');
require_once('modules/'.$_REQUEST['module'].'.php');
$xtpl->parse('main.'.$_REQUEST['module']);
}
else{
$xtpl->assign_file('center','templates/showmap.html');
require_once('modules/showmap.php');
$xtpl->parse('main.showmap');
}
$temp=mysql_query('SELECT `name` FROM `npc` WHERE `idTemplate`=\'21130\' LIMIT 1');
$xtpl->assign('css',$css);
$xtpl->assign('js',$js);
$xtpl->assign('kw',$kw);
$xtpl->assign('desc',$desc);
$xtpl->assign('title',$title);
$xtpl->parse('main');
$xtpl->out('main');
?>