<?php
/**
@file
@brief 宴会の詳細とコメントの入力フォームを表示する
@version $Id$
*/

require_once "../../mainfile.php";
require_once XOOPS_ROOT_PATH."/modules/exFrame/frameloader.php";
require_once XOOPS_ROOT_PATH."/class/smarty/Smarty.class.php";

require_once "./class/global.php";

require_once "xoops/user.php";

require_once "xoops/perm.php";
	

$exXoopsUser=new exXoopsUserObject($xoopsUser);

$id = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0; 
if($id<=0)
	redirect_header("./index.php",1,"無効な宴会 ID か、権限がありません");

$pHandler = bxParty::getHandler('party');
$party = $pHandler->get($id);
if(!bxParty::Guard($party))
	redirect_header("./index.php",1,"無効な宴会 ID か、権限がありません");

// template 処理
$tpl = new Smarty();
$tpl->compile_dir = XOOPS_COMPILE_PATH;
$tpl->assign('party',$party->getStructure());
$tpl->assign('xoopsUser',$exXoopsUser->getStructure());

$com_replytext = $tpl->fetch(XOOPS_ROOT_PATH."/modules/bxParty/templates_f/bxparty_comment.tpl");
$com_replytitle = $party->getVar("title");

// コメント
include XOOPS_ROOT_PATH.'/include/comment_new.php';

?>
