getVar( "act" ); $mode = $request->getVar( "mode" ); // ========================================================================== //DB接続(MySQL) // ========================================================================== $mysql = new DBAction(); $conn =& $mysql->getConnection(); if ( !$conn ) { //エラー処理 echo( "システムエラーです" ); exit(); } switch ( $act ) { default: $act = "Top"; //強制 /// ================================== /// トップ --- Top (View) *default* /// ================================== case "Top": switch ( $mode ) { default: $mode = "View"; //強制 /// ================================== /// 一覧 --- Top (View) *default* /// ================================== case "View": //コラム情報を取得 unset( $column_list ); $account_id = "cms"; $tbl_CmsEntry = TABLENAME_PREFIX . "cms_entry"; $tbl_CmsCategory = TABLENAME_PREFIX . "cms_category"; if ( $conn ) { //コラム一覧 $stt = $conn->prepare( "SELECT CmsEntry.*, CmsCategory.cms_cat_name,CmsCategory.cms_cat_id FROM $tbl_CmsEntry AS CmsEntry LEFT OUTER JOIN $tbl_CmsCategory AS CmsCategory ON CmsEntry.cms_cat_id = CmsCategory.cms_cat_id WHERE CmsEntry.cms_view_flg = ? AND CmsEntry.account = ? AND CmsEntry.cms_cat_id != ? ORDER BY CmsEntry.cms_date DESC LIMIT 3" ); $params = array( "1", $account_id, "00000001" ); $rs = $conn->Execute( $stt, $params ); if ( $rs && $rs->NumRows()>0 ) { while ( $row = $rs->FetchRow('DB_FETCHMODE_ASSOC') ) { $column_list[] = $row; } } //新着 $stt = $conn->prepare( "SELECT CmsEntry.*, CmsCategory.cms_cat_name,CmsCategory.cms_cat_id FROM $tbl_CmsEntry AS CmsEntry LEFT OUTER JOIN $tbl_CmsCategory AS CmsCategory ON CmsEntry.cms_cat_id = CmsCategory.cms_cat_id WHERE CmsEntry.cms_view_flg = ? AND CmsEntry.account = ? AND CmsEntry.cms_cat_id = ? ORDER BY CmsEntry.cms_date DESC LIMIT 5" ); $params = array( "1", $account_id, "00000001" ); $rs = $conn->Execute( $stt, $params ); if ( $rs && $rs->NumRows()>0 ) { while ( $row = $rs->FetchRow('DB_FETCHMODE_ASSOC') ) { $news_list[] = $row; } } } $tpl_name = "index.html"; require_once( SMARTY_DIR . 'Smarty.class.php' ); $smarty = new Smarty(); $smarty->template_dir= TEMPLATE_DIR; $smarty->compile_dir= COMPILE_DIR; $smarty->config_dir = CONFIG_DIR; $smarty->plugins_dir = array(PLUGINS_DIR,'plugins'); $smarty->load_filter("pre","literal_style"); $smarty->load_filter("pre","literal_script"); $smarty->assign("HOME_URI", HOME_URI); $smarty->assign("SSL_URI", SSL_URI); $smarty->assign("HOME_URL", HOME_URL); $smarty->assign("SSL_URL", SSL_URL); $smarty->assign("CART_SESSION_ID", session_id()); $smarty->assign("flag_login", $flag_login); $smarty->assign("login_info", $login_info); $smarty->assign( "column", $column_list ); $smarty->assign( "news", $news_list ); $smarty->display($tpl_name); break; } break; } exit(); ?>