<?php
/*
  mail_info.php
  作成日：2004/12/2
　最終更新日：2004/12/26

　作成者：有限会社セカンドブレーン
　　　　　　青木隆平
　　　　　　ryuhei@secondbrain.co.jp

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  if ($_GET['action']) {
    switch ($_GET['action']) {
      case 'update':
        // 文面の更新
        if (($_POST['edit_x']) || ($_POST['edit_y'])) {
        	 // プレビュー画面で戻るボタンを押されたとき
          $siID = (int)$_POST['shop_info_id'];
          $_GET['action'] = 'edit_value';
        } else {
          $shop_info_id = (int)$_POST['shop_info_id'];
          $shop_info_title = tep_db_prepare_input($_POST['shop_info_title']);
          $shop_info_value = tep_db_prepare_input($_POST['shop_info_value']);
          $shop_info_value2 = tep_db_prepare_input($_POST['shop_info_value2']);
          $sql_data_array = array('shop_info_title' => $shop_info_title,
                                      'shop_info_value' => $shop_info_value,
                                      'shop_info_value2' => $shop_info_value2,
                                      'last_modified' =>  'now()');
          tep_db_perform(TABLE_SHOP_INFO, $sql_data_array, 'update', 'shop_info_id = \'' . tep_db_input($shop_info_id) . '\'');
          tep_redirect(tep_href_link(FILENAME_MAIL_INFO));
        }
        break;
      case 'edit_value':
        // 文面の編集画面
        $siID = (int)$_GET['siID'];
        break;
      case 'confirm':
        // 編集内容の確認
        $siID = (int)$_POST['siID'];
        $shop_info_title = $_POST['shop_info_title'];
        $shop_info_key = $_POST['shop_info_key'];
        $allow_edit_value2 = $_POST['allow_edit_value2'];
        $shop_info_value = str_replace("\r\n", "\r", tep_db_prepare_input($_POST['shop_info_value']));
        $shop_info_value2 = str_replace("\r\n", "\r", tep_db_prepare_input($_POST['shop_info_value2']));
        $shop_info_value = str_replace("\r", "\n", $shop_info_value);
        $shop_info_value2 = str_replace("\r", "\n", $shop_info_value2);
        $last_modified = $_POST['last_modified'];
        break;
    }
  } else {
    // 初期処理
    $shop_info_query = tep_db_query("select shop_info_id, shop_info_title, shop_info_value, shop_info_note from " . TABLE_SHOP_INFO . " where shop_info_type='2' order by shop_info_id");
  }
?>
<!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">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table width="<?php echo BOX_WIDTH; ?>" class="knMenuBar">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
<?php
  if ($_GET['action']) {
    switch ($_GET['action']) {
      case 'edit_value':
        $shop_info_query = tep_db_query("select shop_info_title, shop_info_key, shop_info_value, shop_info_value2, shop_info_note, allow_edit_title, allow_edit_value2, allow_tags, last_modified from " . TABLE_SHOP_INFO . " where shop_info_id = '" . tep_db_input($siID) . "'");
        $shop_info = tep_db_fetch_array($shop_info_query);
        $siInfo = new objectInfo($shop_info);
      // 編集画面
?>
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="pageHeading"><?php echo TEXT_EDIT_MAIL_INFO; ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr><?php echo tep_draw_form('shop_info', FILENAME_MAIL_INFO, 'action=confirm') . tep_draw_hidden_field('shop_info_id', $siID); ?>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main" valign="top">
<?php
         if ($siInfo->allow_edit_title) {
           echo tep_draw_input_field('shop_info_title', $siInfo->shop_info_title, 'size="40"');
         } else {
           echo $siInfo->shop_info_title . tep_draw_hidden_field('shop_info_title', $siInfo->shop_info_title);
         }
?>
            </td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo tep_draw_textarea_field('shop_info_value', 'soft', '74', '20', $siInfo->shop_info_value); ?></td>
          </tr>
<?php
         if ($siInfo->allow_edit_value2) {
?>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo tep_draw_textarea_field('shop_info_value2', 'soft', '74', '10', $siInfo->shop_info_value2); ?></td>
          </tr>
<?php
         } else {
           echo tep_draw_hidden_field('shop_info_value2', $siInfo->shop_info_value2);
         }
?>
        </table></td>
        <td valign="top"><table border="0" width="100%" cellspacing="2" cellpadding="2" class="knBox">
          <tr>
            <td class="knMenu"><?php echo $siInfo->shop_info_note . tep_draw_hidden_field('shop_info_note', $siInfo->shop_info_note); ?></td>
          </tr>
          <tr>
            <td class="knMenu" align="right"><?php echo TEXT_LAST_MODIFIED . ' ' . $siInfo->last_modified; ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php echo tep_draw_hidden_field('shop_info_key', $siInfo->shop_info_key) . tep_draw_hidden_field('allow_edit_value2', $siInfo->allow_edit_value2) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_MAIL_INFO) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
          </tr>
        </table></td>
      </form></tr>
<?php
        break;
      case 'confirm':
      // 確認画面
?>
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="pageHeading"><?php echo TEXT_EDIT_MAIL_INFO_PREVIEW; ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td><?php echo TEXT_UPDATE_CONFIRM_NOTE; ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr><?php echo tep_draw_form('shop_info', FILENAME_MAIL_INFO, 'action=update') . tep_draw_hidden_field('shop_info_id', $siID); ?>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php echo '<b>' . $shop_info_title . tep_draw_hidden_field('shop_info_title', htmlspecialchars(stripslashes($shop_info_title))) . '</b>'; ?></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td><table border="0" cellspacing="0" cellpadding="0" style="background-color: #EEEEEE;" width="250">
              <tr><td class="main" style="color: #EEEEEE;" nowrap>---------------------------------------------------------------------------</td></tr>
<?php
         switch ($shop_info_key) {
           case 'SHOP_INFO_EMAIL_SIGNATURE':			// 送信メールの署名
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '30') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_SIGNATURE . "</td></tr>\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '30') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             break;
           case 'SHOP_INFO_EMAIL_WELCOME':			// アカウント登録確認メール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . STORE_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_WELCOME01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_WELCOME02 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_AUTO_REPLY':		// 注文確認メール（自動配信）
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_AUTO_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main"><span style="color: #999999;">' . STORE_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_AUTO_REPLY02 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_ORDER_RECEIVED_REPLY':		// 受注回答（前払）メール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_ORDER_RECEIVED_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_SEND_PRODUCTS_REPLY':		// 受注回答（後払）メール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_SEND_PRODUCTS_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_SOLD_OUT_REPLY':			// 品切れメール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_SOLD_OUT_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_PENDING_REPLY':		// 在庫確認中メール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_PENDING_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_CODT_PAYMENT_REPLY':			// 受注回答（代引）メール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_CODT_PAYMENT_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           case 'SHOP_INFO_EMAIL_CC_PAYMENT_REPLY':		// 受注回答（クレジット）メール
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . TEXT_SHOP_INFO_EMAIL_CC_PAYMENT_REPLY01 . '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
           default:
             $shop_info_query = tep_db_query("select shop_info_value from " . TABLE_SHOP_INFO . " where shop_info_key = 'SHOP_INFO_EMAIL_SIGNATURE'");
             $shop_info = tep_db_fetch_array($shop_info_query);
             $email_signature = nl2br(htmlspecialchars($shop_info['shop_info_value']));
             echo '<tr><td class="main"><span style="color: #999999;">' . TEXT_CUSTOMER_NAME . '</span>';
             echo  nl2br(htmlspecialchars($shop_info_value)) . tep_draw_hidden_field('shop_info_value', htmlspecialchars(stripslashes($shop_info_value)));
             echo '</td></tr>' . "\n";
             echo '<tr><td>' . tep_draw_separator('pixel_trans.gif', '1', '20') . '</td></tr>' . "\n";
             echo '<tr><td class="main">';
             echo nl2br(htmlspecialchars($shop_info_value2)) . tep_draw_hidden_field('shop_info_value2', htmlspecialchars(stripslashes($shop_info_value2)));
             echo '</td></tr>' . "\n";
             echo '<tr><td class="main" style="color: #999999;">' . $email_signature . "</td></tr>\n";
             break;
         }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) . ' ' . tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . ' <a href="' . tep_href_link(FILENAME_MAIL_INFO) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
          </tr>
        </table></td>
      </form></tr>
<?php
    }
  } else {
  // 初期画面
?>
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
      </tr>
      <tr>
        <td align="center"><table border="0" width="100%" cellspacing="0" cellpadding="0" class="knBox">
          <tr>
            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
          </tr>
<?php
    while($shop_info = tep_db_fetch_array($shop_info_query)) {
      $siInfo = new objectInfo($shop_info);
?>
          <tr>
            <td><?php echo '<a href="' . tep_href_link(FILENAME_MAIL_INFO, 'action=edit_value&siID=' . $siInfo->shop_info_id) . '" class="knMenu"><b>' . $siInfo->shop_info_title . '</b></a>'; ?></td>
            <td class="knMenu">
<?php
      if (mb_strpos($siInfo->shop_info_note, "<br>") == false) {
        echo @strip_tags($siInfo->shop_info_note);
      } else {
        echo @strip_tags(mb_substr($siInfo->shop_info_note, 0, mb_strpos($siInfo->shop_info_note, "<br>")+1));
      }
?>
      	   </td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
<?php
    }
?>
        </table></td>
      </tr>
<?php
  }
?>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>