<?php
/*
 * Copyright(C). D-cube,Inc. All Rights Reserved.
 */

/*
 * @file		GeneralTopManager.class.php
 * @brief		一般用トップページクラス
 * @date		2007.01.24
 */

require_once(CLASS_DIR."/adodb/BitcubeDB.class.php");

class GeneralTopManager extends BitcubeDB
{
	function GeneralTopManager()
	{
		$this->BitcubeDB();
	}
	
	// タイトル取得
	function getTopTitle($group_code)
	{
		// SQL文
		$sql  = " select ";
		$sql .= " $this->group.group_name ";
		$sql .= " from ";
		$sql .= " $this->group ";
		$sql .= " where $this->group.is_delete = 0 and $this->group.group_code = $group_code ";
		
		return $this->GetOne($sql);
	}
	
	// トップページ情報取得
	function getTopInfo($group_code)
	{
		// SQL文
		$sql  = " select ";
		$sql .= " $this->template.group_code ";
		$sql .= " ,$this->template.top_page_tmpl ";
		$sql .= " from ";
		$sql .= " $this->template ";
		$sql .= " where $this->template.is_delete = 0 and $this->template.group_code = $group_code ";
		
		return $this->GetRow($sql);
	}
}
