<?php
/*
  $Id: index.php,v 1.7 2007/04/17 08:37:36 ryu Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
  
  modified for Koshoten.net2
  http://www.koshoten.net/
*/

  require('includes/application_top.php');

  if ($_POST['action']) {
    switch ($_POST['action']) {
      case 'save_cfg':
        $cID = tep_db_prepare_input($_POST['cID']);
        $configuration_value = tep_db_prepare_input($_POST['cfg_value' . $cID]);

        tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . tep_db_input($cID) . "'");
        tep_redirect(tep_href_link(FILENAME_DEFAULT, 'menu=' . $_GET['menu']));
        break;
      case 'save_tax_rates':
        $tax_rates_id = tep_db_prepare_input($_POST['trID']);
        $tax_rate = tep_db_prepare_input($_POST['tax_rate']);
        tep_db_query("update " . TABLE_TAX_RATES . " set tax_rate = '" . tep_db_input($tax_rate) . "', last_modified = now() where tax_rates_id = '" . tep_db_input($tax_rates_id) . "'");
        tep_redirect(tep_href_link(FILENAME_DEFAULT, 'menu=' . $_GET['menu']));
        break;
      case 'save_image':
        $imagefile = tep_get_uploaded_file('post_image');
        $image_name = tep_db_prepare_input($_POST['image_name']);
        if (is_uploaded_file($imagefile['tmp_name'])) {
          move_uploaded_file($imagefile['tmp_name'], DIR_FS_CATALOG . DIR_WS_IMAGES . $image_name);
        }
        tep_redirect(tep_href_link(FILENAME_DEFAULT, 'menu=' . $_GET['menu']));
        break;
    }
  }

  $languages = tep_get_languages();
  $languages_array = array();
  $languages_selected = DEFAULT_LANGUAGE;
  for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    $languages_array[] = array('id' => $languages[$i]['code'],
                               'text' => $languages[$i]['name']);
    if ($languages[$i]['directory'] == $language) {
      $languages_selected = $languages[$i]['code'];
    }
  }

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<link rel="stylesheet" type="text/css" href="includes/kn_stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
<!-- left_navigation_eof //-->
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table width="100%" class="knMenuBar">
          <tr>
            <td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'menu=1', 'NONSSL') . '">' . KN_MENU_BAR_BASIC . '</a>'; ?></td>
            <td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'menu=2', 'NONSSL') . '">' . KN_MENU_BAR_PRODUCTS . '</a>'; ?></td>
            <td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'menu=3', 'NONSSL') . '">' . KN_MENU_BAR_SALE . '</a>'; ?></td>
            <td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'menu=4', 'NONSSL') . '">' . KN_MENU_BAR_GETA . '</a>'; ?></td>
            <td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'menu=5', 'NONSSL') . '">' . KN_MENU_BAR_SITE_DESIGN01 . '</a>'; ?></td>
            <td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'menu=6', 'NONSSL') . '">' . KN_MENU_BAR_SITE_DESIGN02 . '</a>'; ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="knBox">
<?php
  $mID = $_GET['menu'];
  switch ($mID) {
    case '1':	// 基本設定
?>
          <tr>
            <td colspan="2"><h3><?php echo HEADING_TITLE01; ?></h3></td>
          </tr>
          <tr class="knMenuOdd">
<?php
      // サイト名
      $cfg_key ='STORE_NAME';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_name', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ショップ名
      $cfg_key ='STORE_OWNER';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_owner', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // ショップの所在地域
      $cfg_key ='STORE_ZONE';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_zone', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_pull_down_menu('cfg_value' . $cfg_data['configuration_id'], tep_get_country_zones(STORE_COUNTRY), htmlspecialchars($cfg_data['configuration_value']), 'class="knInput"');
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ショップ所在地
      $cfg_key ='STORE_NAME_ADDRESS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_name_address', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_textarea_field('cfg_value' . $cfg_data['configuration_id'], false, 35, 5, $cfg_data['configuration_value']);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 税込み表示
      $cfg_key ='DISPLAY_PRICE_WITH_TAX';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_display_price_with_tax', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 消費税率
      $tax_rates_id =1;		//消費税のレコードのIDが1であることが前提
      $tax_data_query = tep_db_query("select tc.tax_class_title, tr.tax_rate, tr.tax_description from " . TABLE_TAX_RATES . " tr, " . TABLE_TAX_CLASS . " tc where tr.tax_rates_id = '" . $tax_rates_id . "' and tr.tax_class_id = tc.tax_class_id");
      $tax_data = tep_db_fetch_array($tax_data_query);
      echo tep_draw_form('tax_rates1', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_tax_rates') . tep_draw_hidden_field("trID", $tax_rates_id);
      echo '<td><span class="knMenuTitle">' . $tax_data['tax_class_title'] . '</span><br>';
      echo tep_draw_input_field('tax_rate', $tax_data['tax_rate'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_TAX_RATES_DESCRIPTION . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 税額の端数処理
      $cfg_key ='TAX_ROUND_OPTION';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_tax_round_option', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'drop', '', $cfg_data['configuration_value']) . ' drop  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'round', '', $cfg_data['configuration_value']) . ' round  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'raise', '', $cfg_data['configuration_value']) . ' raise  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 通貨設定
      echo '<td class="knMenu"><span class="knMenuTitle">' . TEXT_KN_MENU_CURRENCIES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CURRENCIES, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_CURRENCIES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_CURRENCIES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 言語設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_LANGUAGES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_LANGUAGES, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_LANGUAGES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_LANGUAGES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 国名設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_COUNTRIES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_COUNTRIES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_COUNTRIES_DESCRIPTION . "</td>\n";
?>
          </tr>
<?php
      if ($ocertify->npermission == 15) {
?>
          <tr class="knMenuOdd">
<?php
      // 言語ファイル管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_DEFINE_LANGUAGE . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_DEFINE_LANGUAGE, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_DEFINE_LANGUAGE_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_DEFINE_LANGUAGE_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // データベース・バックアップ管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_BACKUP . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_BACKUP, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_BACKUP_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_BACKUP_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ユーザ管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_USERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_USERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_USERS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_USERS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // バナー管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_BANNER_MANAGER . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_BANNER_MANAGER, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_BANNER_MANAGER_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_BANNER_MANAGER_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // オンラインユーザ
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_WHOS_ONLINE . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_WHOS_ONLINE, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_WHOS_ONLINE_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_WHOS_ONLINE_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // アクセスログ
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_USERS_LOGINLOG . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_USERS_LOGINLOG, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_USERS_LOGINLOG_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_USERS_LOGINLOG_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // アドバンスド設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_KN_CONFIGURATION . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_KN_CONFIGURATION, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_KN_CONFIGURATION_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_KN_CONFIGURATION_DESCRIPTION . "</td>\n";
?>
          </tr>
<?php
      }
      break;
    case '2':	// 商品管理
?>
          <tr>
            <td colspan="2"><h3><?php echo HEADING_TITLE02; ?></h3></td>
          </tr>
          <tr class="knMenuOdd">
<?php
      // カテゴリー管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_CATEGORIES_EDIT . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CATEGORIES_EDIT, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_CATEGORIES_EDIT_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_CATEGORIES_EDIT_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 商品単品管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_PRODUCTS_EDIT . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EDIT, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PRODUCTS_EDIT_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_PRODUCTS_EDIT_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 商品一括処理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_PRODUCTS_UPLOADER . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_UPLOADER, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PRODUCTS_UPLOADER_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_PRODUCTS_UPLOADER_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 特価商品管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_SPECIALS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_SPECIALS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_SPECIALS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // シリーズ名の使用
      $cfg_key ='KN_CFG_USE_REVIEWS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_series_title', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 書評管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_REVIEWS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_REVIEWS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_REVIEWS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 商品オプション管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_PRODUCTS_ATTRIBUTES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PRODUCTS_ATTRIBUTES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_PRODUCTS_ATTRIBUTES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 追加分類項目管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_MANUFACTURERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_MANUFACTURERS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_MANUFACTURERS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 追加分類項目名
      $cfg_key ='KN_CFG_USE_MANUFACTURERS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_manufacturers', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 副題の使用
      $cfg_key ='KN_CFG_USE_SUBTITLE';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_subtitle', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // シリーズ名の使用
      $cfg_key ='KN_CFG_USE_SERIES_TITLE';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_series_title', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 著者名の使用
      $cfg_key ='KN_CFG_USE_AUTHOR';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_author', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 説明文２の使用
      $cfg_key ='KN_CFG_USE_DESCRIPTION2';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_description2', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // キーワードの使用
      $cfg_key ='KN_CFG_USE_KEYWORDS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_keyword', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // ISBNコードの使用
      $cfg_key ='KN_CFG_USE_ISBN';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_isbn', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 冊数の使用
      $cfg_key ='KN_CFG_USE_VOLUME';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_volume', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 出版元の使用
      $cfg_key ='KN_CFG_USE_PUBLISHERS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_publishers', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 刊行年の使用
      $cfg_key ='KN_CFG_USE_PUBLISHED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_published', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 重量の使用
      $cfg_key ='KN_CFG_USE_WEIGHT';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_weight', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 発売日の使用
      $cfg_key ='KN_CFG_USE_DATE_AVAILABLE';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_date_available', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 商品のURLの使用
      $cfg_key ='KN_CFG_USE_URL';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_url', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
<?php
      break;
    case '3':	// 販売管理
?>
          <tr>
            <td colspan="2"><h3><?php echo HEADING_TITLE03; ?></h3></td>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 注文管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_ORDERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_ORDERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_ORDERS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_ORDERS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 簡易版受注画面の使用
      $cfg_key ='KN_CFG_SHORT_CHECKOUT';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_short_checkout', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 配送方法設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_SHIPPING_MODULES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_KN_MODULES, 'set=kn_shipping', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_SHIPPING_MODULES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_SHIPPING_MODULES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 支払方法設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_PAYMENT_MODULES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_KN_MODULES, 'set=kn_payment', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PAYMENT_MODULES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_PAYMENT_MODULES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 合計行設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_ORDER_TOTAL_MODULES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_KN_MODULES, 'set=ordertotal', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_ORDER_TOTAL_MODULES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_ORDER_TOTAL_MODULES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 注文ステータス設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_ORDERS_STATUS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_ORDERS_STATUS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_ORDERS_STATUS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_ORDERS_STATUS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 配送/パッキング設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_SHIPPING_ESTIMATE . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=7', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_SHIPPING_ESTIMATE_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_SHIPPING_ESTIMATE_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 顧客管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_CUSTOMERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_CUSTOMERS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_CUSTOMERS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // E-Mail アドレス
      $cfg_key ='STORE_OWNER_EMAIL_ADDRESS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_owner_email_address', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // E-Mail の差出人
      $cfg_key ='EMAIL_FROM';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_email_from', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 注文通知メールの送付先
      $cfg_key ='SEND_EXTRA_ORDER_EMAILS_TO';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_send_extra_order_emails_to', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // メール文面設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_MAIL_INFO . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_MAIL_INFO, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_MAIL_INFO_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_MAIL_INFO_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 受注メールの個人情報表示
      $cfg_key ='KN_CFG_MAIL_PRIVACY_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_mail_privacy_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ダイレクトメール送信
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_DIRECT_MAIL . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_MAIL, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_DIRECT_MAIL_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_DIRECT_MAIL_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // メールマガジン送信
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_NEWSLETTERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_NEWSLETTERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_NEWSLETTERS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_NEWSLETTERS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // アカウント表示設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_ACCOUNT_ITEMS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=5', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_ACCOUNT_ITEMS_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_ACCOUNT_ITEMS_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // アドレス帳の登録数
      $cfg_key ='MAX_ADDRESS_BOOK_ENTRIES';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_manufacturers', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ゲストに「友達に知らせる」を許可
      $cfg_key ='ALLOW_GUEST_TO_TELL_A_FRIEND';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_allow_guest_to_tell_a_friend', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 月別の受注高一覧
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_STATS_MONTHLY_SALES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_STATS_MONTHLY_SALES, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_STATS_MONTHLY_SALES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_STATS_MONTHLY_SALES_DESCRIPTION . "</td>\n";
?>
          </tr>
<?php
      break;
    case '4':	// 連想検索設定
?>
          <tr>
            <td colspan="2"><h3><?php echo HEADING_TITLE04; ?></h3></td>
          </tr>
          <tr class="knMenuOdd">
<?php
      // GETAの有効化
      $cfg_key ='KN_CFG_GETA_ENABLED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_enabled', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
<?php
      if (KN_CFG_GETA_ENABLED == 'true') {
?>
          <tr class="knMenuEven">
<?php
      // データベース更新
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_MAKEWAM . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_MAKEWAM, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_MAKEWAM_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_MAKEWAM_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 連想検索の有効化
      $cfg_key ='KN_CFG_GETA_SEARCH_ENABLED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_search_enabled', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 連想検索結果表示数
      $cfg_key ='KN_CFG_GETA_SEARCH_RESULTS_MAX';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_search_results_max', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 商品連想の有効化
      $cfg_key ='KN_CFG_GETA_PRODUCTS_ENABLED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_products_enabled', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 商品連想表示数
      $cfg_key ='KN_CFG_GETA_PRODUCTS_MAX';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_products_max', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // テーマ連想の有効化
      $cfg_key ='KN_CFG_GETA_THEMES_ENABLED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_themes_enabled', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // GETAテーマ設定
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_GETA_THEMES . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_GETA_THEMES, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_GETA_THEMES_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_GETA_THEMES_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      //GETAテーマ名
      $cfg_key ='KN_CFG_GETA_THEMES_TITLE';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_themes_title', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      //GETAテーマ表示数
      $cfg_key ='KN_CFG_GETA_THEMES_MAX';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_geta_themes_max', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
<?php
      }
      break;
    case '5':	// サイトデザイン（基本）
?>
          <tr>
            <td colspan="2"><h3><?php echo HEADING_TITLE05; ?></h3><p class="knMain"><?php echo HEADING_TITLE05_DESCRIPTION; ?></p></td>
          </tr>
          <tr class="knMenuOdd">
<?php
      // ヘッダー画像１
      echo tep_draw_form('upload_confirm01', FILENAME_DEFAULT, 'menu=' . $mID, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field("action", 'save_image') . tep_draw_hidden_field("image_name", KN_HEADER_IMAGE01);
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_HEADER_IMAGE01 . '</span><br>';
      echo tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . KN_HEADER_IMAGE01, TEXT_KN_MENU_HEADER_IMAGE01, '', '', 'style="float: left;"');
      echo tep_draw_input_field('post_image', '', 'size=40', '', 'file');
      echo '<br><input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top" width="100%">';
      if (preg_match("/\.jpe?g$/i", KN_HEADER_IMAGE01)) {
        echo TEXT_KN_MENU_HEADER_IMAGE01_DESCRIPTION_JPG . '<br>' . TEXT_KN_MENU_HEADER_IMAGE_NOTE . "</td>\n";
      } elseif (preg_match("/\.png$/i", KN_HEADER_IMAGE01)) {
        echo TEXT_KN_MENU_HEADER_IMAGE01_DESCRIPTION_PNG . '<br>' . TEXT_KN_MENU_HEADER_IMAGE_NOTE . "</td>\n";
      } else {
        echo TEXT_KN_MENU_HEADER_IMAGE01_DESCRIPTION . '<br>' . TEXT_KN_MENU_HEADER_IMAGE_NOTE . "</td>\n";
      }
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ヘッダー画像２
      echo tep_draw_form('upload_confirm01', FILENAME_DEFAULT, 'menu=' . $mID, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field("action", 'save_image') . tep_draw_hidden_field("image_name", KN_HEADER_IMAGE02);
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_HEADER_IMAGE02 . '</span><br>';
      echo tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . KN_HEADER_IMAGE02, TEXT_KN_MENU_HEADER_IMAGE02, '', '', 'style="float: left;"');
      echo tep_draw_input_field('post_image', '', 'size=40', '', 'file');
      echo '<br><input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top" width="100%">';
      if (preg_match("/\.jpe?g$/i", KN_HEADER_IMAGE02)) {
        echo TEXT_KN_MENU_HEADER_IMAGE02_DESCRIPTION_JPG . '<br>' . TEXT_KN_MENU_HEADER_IMAGE_NOTE . "</td>\n";
      } elseif (preg_match("/\.png$/i", KN_HEADER_IMAGE02)) {
        echo TEXT_KN_MENU_HEADER_IMAGE02_DESCRIPTION_PNG . '<br>' . TEXT_KN_MENU_HEADER_IMAGE_NOTE . "</td>\n";
      } else {
        echo TEXT_KN_MENU_HEADER_IMAGE02_DESCRIPTION . '<br>' . TEXT_KN_MENU_HEADER_IMAGE_NOTE . "</td>\n";
      }
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // コラムレイアウト
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_COLUMN_LAYOUT . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=104', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_COLUMN_LAYOUT_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_COLUMN_LAYOUT_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // お知らせ文面管理
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_SHOP_INFO . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_SHOP_INFO, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_SHOP_INFO_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_SHOP_INFO_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 商品一覧表示
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_PRODUCTS_LISTING . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=103', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PRODUCTS_LISTING_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_PRODUCTS_LISTING_DESCRIPTION . "</td>\n";
?>
          </tr>
         <tr class="knMenuEven">
<?php
      // 検索結果表示数
      $cfg_key ='MAX_DISPLAY_SEARCH_RESULTS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_search_results', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 画像サイズ
      echo '<td><span class="knMenuTitle">' . TEXT_KN_MENU_IMAGE_SIZE . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=4', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_IMAGE_SIZE_LINK . "</a></td>\n";
      echo '<td class="knMenu" valign="top">' . TEXT_KN_MENU_IMAGE_SIZE_DESCRIPTION . "</td>\n";
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // カテゴリー一覧表示
      $cfg_key ='KN_CFG_CATEGORIES_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_categories_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // カテゴリー一覧タイプ
      $cfg_key ='KN_CFG_CATEGORIES_DISPLAY_TYPE';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_categories_display_type', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'type1', '', $cfg_data['configuration_value']) . ' type1  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'type2', '', $cfg_data['configuration_value']) . ' type2  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      //１行に表示するカテゴリー数
      $cfg_key ='KN_CFG_MAX_DISPLAY_CATEGORIES_PER_ROW';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_categories_per_row', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // お薦め商品コラム表示
      $cfg_key ='KN_CFG_RECOMMENDATION_COLUMN_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_recommendation_column_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      //お薦め商品表示数
      $cfg_key ='KN_CFG_MAX_DISPLAY_RECOMMENDATION';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_recommendation', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      //１行に表示するお勧め商品数
      $cfg_key ='KN_CFG_MAX_DISPLAY_RECOMMENDATION_PER_ROW';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_recommendation_per_row', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // お勧め商品説明文２表示
      $cfg_key ='KN_CFG_RECOMMENDATION_DESCRIPTION2_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_recommendation_description2_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 新着商品コラム表示
      $cfg_key ='KN_CFG_NEW_PRODUCTS_COLUMN_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_new_products_column_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      //新着商品表示数
      $cfg_key ='KN_CFG_MAX_DISPLAY_NEW_PRODUCTS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_new_products', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      //１行に表示する新着商品数
      $cfg_key ='KN_CFG_MAX_DISPLAY_NEW_PRODUCTS_PER_ROW';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_new_products_per_row', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
<?php
      break;
    case '6':	// サイトデザイン（詳細）
?>
          <tr>
            <td colspan="2"><h3><?php echo HEADING_TITLE06; ?></h3></td>
          </tr>
          <tr class="knMenuOdd">
<?php
      // カテゴリー内の商品数を表示
      $cfg_key ='SHOW_COUNTS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_show_counts', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // カテゴリー/メーカーの絞込みの表示
      $cfg_key ='PRODUCT_LIST_FILTER';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_product_list_filter', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // [前ページ]/[次ページ]の表示位置
      $cfg_key ='PREV_NEXT_BAR_LOCATION';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_prev_next_bar_location', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ページ・リンク数
      $cfg_key ='MAX_DISPLAY_PAGE_LINKS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_page_links', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 登録日表示
      $cfg_key ='KN_CFG_DATE_ADDED_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_date_added_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 同時購入表示
      $cfg_key ='KN_CFG_ALSO_PURCHASED_DISPLAY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_also_purchased_display', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 同時購入（最小値）
      $cfg_key ='MIN_DISPLAY_ALSO_PURCHASED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_min_display_also_purchased', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 同時購入（最大値）
      $cfg_key ='MAX_DISPLAY_ALSO_PURCHASED';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_also_purchased', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 価格検索の使用
      $cfg_key ='KN_CFG_USE_PRICE_SEARCH';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_price_search', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 登録日検索の使用
      $cfg_key ='KN_CFG_USE_DATE_SEARCH';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_date_search', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 書評一覧表示数
      $cfg_key ='MAX_DISPLAY_NEW_REVIEWS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_new_reviews', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 書評のランダム選択数
      $cfg_key ='MAX_RANDOM_SELECT_REVIEWS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_random_select_reviews', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 新着商品一覧表示数
      $cfg_key ='MAX_DISPLAY_PRODUCTS_NEW';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_new_products', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 新着商品のランダム選択数
      $cfg_key ='MAX_RANDOM_SELECT_NEW';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_random_select_new', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 特価商品表示数
      $cfg_key ='MAX_DISPLAY_SPECIAL_PRODUCTS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_special_products', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 特価商品のランダム選択数
      $cfg_key ='MAX_RANDOM_SELECT_SPECIALS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_random_select_specials', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 注文履歴表示数
      $cfg_key ='MAX_DISPLAY_ORDER_HISTORY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_order_history', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 注文状況の表示
      $cfg_key ='KN_CFG_USE_ORDER_HISTORY';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_use_order_history', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 注文履歴BOX表示数
      $cfg_key ='MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_products_in_order_history_box', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 商品の追加後にカートを表示
      $cfg_key ='DISPLAY_CART';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_display_cart', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'true', '', $cfg_data['configuration_value']) . ' true  ' . tep_draw_radio_field('cfg_value' . $cfg_data['configuration_id'], 'false', '', $cfg_data['configuration_value']) . ' false  ';
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 追加項目リスト表示数
      $cfg_key ='MAX_DISPLAY_MANUFACTURERS_IN_A_LIST';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_manufacturers_in_a_list', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // 追加項目選択サイズ
      $cfg_key ='MAX_MANUFACTURERS_LIST';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_manufacturers_list', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // 追加項目名の長さ
      $cfg_key ='MAX_DISPLAY_MANUFACTURER_NAME_LEN';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_manufacturers_name_len', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuEven">
<?php
      // ベストセラー（最小値）
      $cfg_key ='MIN_DISPLAY_BESTSELLERS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_min_display_bestsellers', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
          <tr class="knMenuOdd">
<?php
      // ベストセラー（最大値）
      $cfg_key ='MAX_DISPLAY_BESTSELLERS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_max_display_bestsellers', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<td><span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "</td>\n";
      echo '<td class="knMenu" valign="top">' . $cfg_data['configuration_description'] . "</td>\n";
      echo '</form>';
?>
          </tr>
<?php
      break;
    default:	// 初期画面
?>
          <tr>
            <td><h3><?php echo HEADING_TITLE; ?></h3></td>
          </tr>
          <tr>
            <td class="knMain"><?php echo TEXT_WELCOME_KOSHOTEN_NET; ?></td>
          </tr>
        </table>
        <p align="center"><b><?php echo TEXT_SIMPLE_MENU; ?><b></p>
        <table border="0" width="100%" cellspacing="3" cellpadding="1" class="knBox">
          <tr>
            <td class="knMain" valign="top">
<?php
      // サイト名
      $cfg_key ='STORE_NAME';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_name', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "\n";
      echo "</form>\n";
      // ショップ名
      $cfg_key ='STORE_OWNER';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_owner', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "\n";
      echo "</form>\n";
      // E-Mail アドレス
      $cfg_key ='STORE_OWNER_EMAIL_ADDRESS';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_store_owner_email_address', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "\n";
      echo "</form>\n";
      // E-Mail の差出人
      $cfg_key ='EMAIL_FROM';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_email_from', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "\n";
      echo "</form>\n";
      // 注文通知メールの送付先
      $cfg_key ='SEND_EXTRA_ORDER_EMAILS_TO';
      $cfg_data_query = tep_db_query("select configuration_id, configuration_title, configuration_value, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $cfg_key . "'");
      $cfg_data = tep_db_fetch_array($cfg_data_query);
      echo tep_draw_form('cfg_send_extra_order_emails_to', FILENAME_DEFAULT, 'menu=' .  $mID) . tep_draw_hidden_field("action", 'save_cfg') . tep_draw_hidden_field("cID", $cfg_data['configuration_id']);
      echo '<span class="knMenuTitle">' . $cfg_data['configuration_title'] . '</span><br>';
      echo tep_draw_input_field('cfg_value' . $cfg_data['configuration_id'], $cfg_data['configuration_value'], 'class="knInput"', false, 'text', false);
      echo '<input type="submit" value="' . TEXT_KN_BUTTON_UPDATE . '" class="knInput">' . "\n";
      echo "</form>\n";
?>
            </td>
            <td class="knMain" valign="top">
<?php
      // カテゴリー管理
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_CATEGORIES_EDIT . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CATEGORIES_EDIT, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_CATEGORIES_EDIT_LINK . "</a><br><br>\n";
      // 商品単品管理
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_PRODUCTS_EDIT . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EDIT, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PRODUCTS_EDIT_LINK . "</a><br><br>\n";
      // 商品一括処理
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_PRODUCTS_UPLOADER . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_UPLOADER, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_PRODUCTS_UPLOADER_LINK . "</a><br><br>\n";
      if (KN_CFG_GETA_ENABLED == 'true') {
        // GETAデータベース更新
        echo '<span class="knMenuTitle">' . TEXT_KN_MENU_MAKEWAM . '</span><br>';
        echo '<a href="' . tep_href_link(FILENAME_MAKEWAM, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_MAKEWAM_LINK . "</a>\n";
      }
?>
            </td>
            <td class="knMain" valign="top">
<?php
      // 注文管理
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_ORDERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_ORDERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_ORDERS_LINK . "</a><br><br>\n";
      // メール文面設定
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_MAIL_INFO . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_MAIL_INFO, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_MAIL_INFO_LINK . "</a><br><br>\n";
      // 顧客管理
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_CUSTOMERS . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_CUSTOMERS_LINK . "</a>\n";
?>
            </td>
            <td class="knMain" valign="top">
<?php
      // お知らせ文面管理
      echo '<span class="knMenuTitle">' . TEXT_KN_MENU_SHOP_INFO . '</span><br>';
      echo '<a href="' . tep_href_link(FILENAME_SHOP_INFO, '', 'NONSSL') . '" class="knInput">' . TEXT_KN_MENU_SHOP_INFO_LINK . "</a>\n";
?>
            </td>
          </tr>
<?php
  }
?>
        </table></td>
     </tr>
    </table></td>
<!-- body_text_eof //-->
<!-- right_column //-->
    <td width="150" valign="top">
      <table border="0" width="150" cellspacing="1" cellpadding="1" class="columnRight">
        <tr>
          <td class="knMain"><?php echo TEXT_OSC_NOTE; ?></td>
        </tr>
        <tr>
          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
        </tr>
        <tr>
          <td class="knMain"><?php echo TEXT_KN_NOTE; ?></td>
        </tr>
        <tr>
          <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
        </tr>
        <tr>
          <td class="knMain"><?php echo TEXT_GETA_NOTE; ?></td>
        </tr>
      </table>
      <table border="0" width="150" cellspacing="0" cellpadding="2">
        <tr>
          <td class="smalltext"><?php echo KN_VERSION; ?></td>
        </tr>
        <tr>
          <td class="smalltext">
<?php
  $contents = array();

  if (getenv('HTTPS') == 'on') {
    $size = ((getenv('SSL_CIPHER_ALGKEYSIZE')) ? getenv('SSL_CIPHER_ALGKEYSIZE') . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>');
    echo tep_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, $size);
  } else {
    echo tep_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"') . BOX_CONNECTION_UNPROTECTED;
  }
?>
</td>
        </tr>
        <tr><?php echo tep_draw_form('languages', 'index.php', '', 'get'); ?>
          <td class="smalltext"><?php echo TEXT_LANGUAGES . ' ' . tep_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"'); ?></td>
        </form></tr>
      </table>
    </td>
<!-- right_column_eof //-->
  </tr>
</table>
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

</body>

</html>
