Index: /branches/comu-ver2/data/class/util/SC_Utils.php
===================================================================
--- /branches/comu-ver2/data/class/util/SC_Utils.php	(revision 17577)
+++ /branches/comu-ver2/data/class/util/SC_Utils.php	(revision 17579)
Index: /branches/comu-ver2/data/class/pages/products/LC_Page_Products_Detail.php
===================================================================
--- /branches/comu-ver2/data/class/pages/products/LC_Page_Products_Detail.php	(revision 17510)
+++ /branches/comu-ver2/data/class/pages/products/LC_Page_Products_Detail.php	(revision 17579)
@@ -323,4 +323,10 @@
         }
 
+        // 値の正当性チェック
+        if(!SC_Utils_Ex::sfIsInt($tmp_id)
+                || !$objDb->sfIsRecord("dtb_products", "product_id", $tmp_id, 'del_flg = 0 AND status = 1')) {
+            SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
+        }
+
         // ログイン判定
         if($objCustomer->isLoginSuccess(true)) {
Index: /branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Change.php
===================================================================
--- /branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Change.php	(revision 17519)
+++ /branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Change.php	(revision 17579)
@@ -278,5 +278,5 @@
 
             // emailはすべて小文字で処理
-            $this->paramToLower($arrMailType);
+            $this->paramToLower($_POST );
 
             //-- 入力データの変換
@@ -366,5 +366,5 @@
                 }
 
-                foreach($_POST as $key => $val) {
+                foreach($this->arrForm as $key => $val) {
                     if ($key != "return" && $key != "mode" && $key != "confirm" && $key != session_name() && !in_array($key, $checkVal)) {
                         $this->list_data[ $key ] = $val;
@@ -425,5 +425,5 @@
 
         // emailはすべて小文字で処理
-        $this->paramToLower($arrMailType);
+        $this->paramToLower($arrRegistColumn);
 
         //エラーチェック
@@ -655,6 +655,4 @@
         $arrRegist["first_buy_date"] = "";	 	// 最初の購入日
 
-        // 携帯メールアドレス
-        //$arrRegist['email_mobile'] = $arrRegist['email'];
 
         //-- 仮登録実行
@@ -840,10 +838,10 @@
      */
     function paramToLower(&$arrParam) {
-
-        foreach ($arrParam as $param) {
-            if (!isset($this->arrForm[$param])) {
-                $this->arrForm[$param] = "";
-            }
-            $this->arrForm[$param] = strtolower($this->arrForm[$param]);
+        foreach ($arrParam as $key => $val) {
+            if (!isset($val)) {
+                $this->arrForm[$key] = "";
+            }elseif($key == 'email' || $key == 'email_mobile'){
+                $this->arrForm[$key] = strtolower($val);
+            }
         }
     }
Index: /branches/comu-ver2/data/class/pages/shopping/LC_Page_Shopping_Complete.php
===================================================================
--- /branches/comu-ver2/data/class/pages/shopping/LC_Page_Shopping_Complete.php	(revision 17509)
+++ /branches/comu-ver2/data/class/pages/shopping/LC_Page_Shopping_Complete.php	(revision 17579)
@@ -280,5 +280,11 @@
     }
 
-    // 完了処理
+    /**
+     * 購入完了処理
+     *
+     * @param object $objQuery
+     * @param string $uniqid
+     * @return string $order_id
+     */
     function lfDoComplete(&$objQuery, $uniqid) {
         $objDb = new SC_Helper_DB_Ex();
@@ -412,5 +418,5 @@
         $objMail->setItem(
                             ''										//　宛先
-                            , $mailHelper->sfMakeSubject("会員登録のご確認")		//　サブジェクト
+                            , $mailHelper->sfMakeSubject($objQuery,$objMailView,$objMailPage,"会員登録のご確認")		//　サブジェクト
                             , $body									//　本文
                             , $arrInfo['email03']					//　配送元アドレス
Index: /branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CampaignCreateTag.php
===================================================================
--- /branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CampaignCreateTag.php	(revision 17289)
+++ /branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CampaignCreateTag.php	(revision 17579)
@@ -87,8 +87,8 @@
                     break;
                 case 'search_category_id':
-                     list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val);
-                    if($tmp_where != "") {
-                        $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")";
-                        $arrval = array_merge((array)$arrval, (array)$tmp_arrval);
+                        list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 
+                        if($tmp_where != "") { 
+                            $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
+                            $arrval = array_merge((array)$arrval, (array)$tmp_arrval);
                     }
                     break;
@@ -159,5 +159,10 @@
     }
 
-    /* 取得文字列の変換 */
+
+    /**
+     * 取得する文字数の変換を行うメソッド
+     *
+     * @return void
+     */
     function lfConvertParam() {
         /*
@@ -180,5 +185,11 @@
     }
 
-    /* タグを生成 */
+    /**
+     * キャンペーンページのための商品用タグを生成するメソッド
+     *
+     * @param string $product_id 商品ID
+     * @return void
+     */
+    
     function lfGetCreateTag($product_id) {
         // 書き込みタグ
Index: /branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
===================================================================
--- /branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php	(revision 17455)
+++ /branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php	(revision 17579)
@@ -73,6 +73,5 @@
             $this->lfConvertParam();
 
-
-            $where = "del_flg = 0";
+            $where = "del_flg = 0 AND status = 1";
 
             /* 入力エラーなし */
Index: /branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
===================================================================
--- /branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php	(revision 17576)
+++ /branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php	(revision 17579)
@@ -97,4 +97,7 @@
         $this->objUpFile->setHiddenFileList($_POST);
 
+        // 規格の有り無し判定
+        $this->tpl_nonclass = $this->lfCheckNonClass($_POST['product_id']);
+
         // 検索パラメータの引き継ぎ
         foreach ($_POST as $key => $val) {
@@ -140,6 +143,4 @@
                 $this->arrRecommend = $this->lfPreGetRecommendProducts($_POST['product_id']);
 
-                // 規格登録ありなし判定
-                $this->tpl_nonclass = $this->lfCheckNonClass($_POST['product_id']);
                 $this->lfProductPage();		// 商品登録ページ
             }
@@ -147,11 +148,7 @@
         // 商品登録・編集
         case 'edit':
-            // 規格登録ありなし判定
-            $tpl_nonclass = $this->lfCheckNonClass($_POST['product_id']);
-
             if($_POST['product_id'] == "" and SC_Utils_Ex::sfIsInt($_POST['copy_product_id'])){
-                $tpl_nonclass = $this->lfCheckNonClass($_POST['copy_product_id']);
-            }
-            $this->tpl_nonclass = $tpl_nonclass;
+                $this->tpl_nonclass = $this->lfCheckNonClass($_POST['copy_product_id']);
+            }
 
             // 入力値の変換
@@ -200,6 +197,4 @@
         // 確認ページからの戻り
         case 'confirm_return':
-            // 規格登録ありなし判定
-            $this->tpl_nonclass = $this->lfCheckNonClass($_POST['product_id']);
             $this->lfProductPage();		// 商品登録ページ
             break;
@@ -442,14 +437,14 @@
                 $sqlval['product_id'] = $product_id;
             }
-            
+
             // INSERTの実行
             $sqlval['create_date'] = "Now()";
             $objQuery->insert("dtb_products", $sqlval);
-            
+
             // product_id 取得（MySQLの場合）
             if(DB_TYPE=='mysql'){
                 $product_id = $objQuery->nextval("dtb_products", "product_id");
             }
-            
+
             // カテゴリを更新
             $objDb->updateProductCategories($arrList['category_id'], $product_id);
@@ -694,5 +689,5 @@
             if($forced) $this->objUpFile->save_file[$arrImageKey[$to_key]] = "";
 
-            if(empty($this->objUpFile->temp_file[$arrImageKey[$to_key]]) && 
+            if(empty($this->objUpFile->temp_file[$arrImageKey[$to_key]]) &&
                empty($this->objUpFile->save_file[$arrImageKey[$to_key]])) {
 
Index: /branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php
===================================================================
--- /branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php	(revision 17522)
+++ /branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php	(revision 17579)
@@ -218,11 +218,11 @@
         // 規格分類が登録されていない規格は表示しないようにする。
         $arrClassCatCount = SC_Utils_Ex::sfGetClassCatCount();
-
-        foreach($arrClass as $key => $val) {
-            if($arrClassCatCount[$key] > 0) {
-                $this->arrClass[$key] = $arrClass[$key];
-            }
-        }
-
+        if (count($arrClass) > 0) {
+            foreach($arrClass as $key => $val) {
+                if($arrClassCatCount[$key] > 0) {
+                    $this->arrClass[$key] = $arrClass[$key];
+                }
+            }
+        }
         // 商品名を取得
         $objQuery = new SC_Query();
Index: /branches/comu-ver2/data/class/SC_CartSession.php
===================================================================
--- /branches/comu-ver2/data/class/SC_CartSession.php	(revision 17444)
+++ /branches/comu-ver2/data/class/SC_CartSession.php	(revision 17579)
@@ -367,5 +367,5 @@
                 // 売り切れ商品をカートから削除する
                 $this->delProduct($val['cart_no']);
-                sfDispSiteError(SOLD_OUT, "", true, "", $is_mobile);
+                SC_Utils_Ex::sfDispSiteError(SOLD_OUT, "", true, "", $is_mobile);
             }
         }
Index: /branches/comu-ver2/data/class/SC_SelectSql.php
===================================================================
--- /branches/comu-ver2/data/class/SC_SelectSql.php	(revision 17546)
+++ /branches/comu-ver2/data/class/SC_SelectSql.php	(revision 17579)
@@ -90,9 +90,11 @@
     function selectTermRange($from_year, $from_month, $from_day, $to_year, $to_month, $to_day, $column) {
 
-        // FROM
+        // 開始期間の構築
         $date1 = $from_year . "/" . $from_month . "/" . $from_day;
 
-        // TO
-        $date2 = @mktime (0, 0, 0, $to_month, $to_day,  $to_year);
+        // 終了期間の構築
+        // @see http://svn.ec-cube.net/open_trac/ticket/328
+        // FIXME とりあえずintvalで対策...
+        $date2 = mktime (0, 0, 0, intval($to_month), intval($to_day), intval($to_year));
         $date2 = $date2 + 86400;
         // SQL文のdate関数に与えるフォーマットは、yyyy/mm/ddで指定する。
Index: /branches/comu-ver2/data/smarty_extends/modifier.script_escape.php
===================================================================
--- /branches/comu-ver2/data/smarty_extends/modifier.script_escape.php	(revision 15532)
+++ /branches/comu-ver2/data/smarty_extends/modifier.script_escape.php	(revision 17579)
@@ -7,10 +7,10 @@
  */
 function smarty_modifier_script_escape($value) {
-    
+
     if (is_array($value)) return $value;
-    
-    $pattern = "/<script.*?>|<\/script>|javascript:/";
+
+    $pattern = "/<script.*?>|<\/script>|javascript:/i";
     $convert = "#script tag escaped#";
-    
+
     if ( preg_match_all($pattern, $value, $matches) ) {
         return preg_replace($pattern, $convert, $value);
Index: /branches/comu-ver2/data/Smarty/templates/default/admin/order/edit.tpl
===================================================================
--- /branches/comu-ver2/data/Smarty/templates/default/admin/order/edit.tpl	(revision 17364)
+++ /branches/comu-ver2/data/Smarty/templates/default/admin/order/edit.tpl	(revision 17579)
@@ -382,5 +382,5 @@
         <!--{assign var=key value="use_point"}-->
         <span class="attention"><!--{$arrErr[$key]}--></span>
-        <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape|default:0}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"  size="5" class="box6" />
+        <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape|number_format|default:0}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"  size="5" class="box6" />
          pt
       </td>
