#!/usr/bin/perl

#---初期設定------------------------------------------------

# ユーザーディレクトリ設定ファイルへのパスを指定
require './dir.pl';

# データベース設定ファイルへのパスを指定
require $root_to_kanri.'/dbpass/param.pl';

#Jcode.pmへのパスを指定
require $root_to_kanri.'/common/Jcode.pm';

#top_layout.plへのパスを指定1
require $root_to_kanri.'/common/top_layout.pl';

&top_layout;

#header_footer.plへのパスを指定1
require $root_to_kanri.'/common/header_footer.pl';

&header_footer;

# library.plへのパスを指定。
require $root_to_kanri.'/common/library.pl';

# 基本設定読み込み
&config;



#---初期設定ここまで----------------------------------------

use POSIX;
use CGI;
use DBI;

&decode;

$contents_id = $in{'contents_id'};
if(!$contents_id){$contents_id = '1';}

$main_cate = 'HOME';

# DBに接続
&db_connect;

# SQL
$sql = "select * from contents where contents_id=1";

$sth = $db->prepare($sql);
if(!$sth->execute){print "データの取得に失敗しました(2)<br>\n";exit;}

@rec = $sth->fetchrow_array;

if($rec[48]){$title=$rec[48];}
if($rec[49]){$keywords=$rec[49];}
if($rec[50]){$description=$rec[50];}


# ステートメントハンドルクリア
$sth->finish;

&header($title);

&head_lines;

#&menu_top;

#&menu;

#&menu_end;

&box_top;

#&event_top;

#&new_item;

#&recommend_item;

if($rec[41]){print "$rec[41]\n\n";}

&whats_new;

&sns_box;

&box_end;

&footer3;

exit;

