Index: /branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
===================================================================
--- /branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php	(revision 22503)
+++ /branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php	(revision 22897)
@@ -72,4 +72,6 @@
         $objFormParam->setParam($_POST);
         $objFormParam->convParam();
+
+        $rank = intval($_GET['rank']);
 
         switch ($this->getMode()) {
@@ -104,4 +106,5 @@
         // カテゴリ取得
         $this->arrCatList = $objDb->sfGetCategoryList();
+        $this->rank       = $rank;
         $this->setTemplate('contents/recommend_search.tpl');
 
Index: /branches/version-2_12-multilang/data/class/pages/products/LC_Page_Products_List.php
===================================================================
--- /branches/version-2_12-multilang/data/class/pages/products/LC_Page_Products_List.php	(revision 22504)
+++ /branches/version-2_12-multilang/data/class/pages/products/LC_Page_Products_List.php	(revision 22897)
@@ -98,5 +98,19 @@
         $objProduct = new SC_Product_Ex();
 
-        $this->arrForm = $_REQUEST;//時間が無いのでコレで勘弁してください。 tao_s
+        // パラメーター管理クラス
+        $objFormParam = new SC_FormParam_Ex();        
+        
+        // パラメーター情報の初期化
+        $this->lfInitParam($objFormParam);
+        
+        // 値の設定
+        $objFormParam->setParam($_REQUEST);
+        
+        // 入力値の変換
+        $objFormParam->convParam();
+        
+        // 値の取得
+        $this->arrForm = $objFormParam->getHashArray();
+
         //modeの取得
         $this->mode = $this->getMode();
@@ -155,4 +169,24 @@
     function destroy() {
         parent::destroy();
+    }
+
+    /* パラメーター情報の初期化 */
+    function lfInitParam(&$objFormParam)
+    {
+        $objFormParam->addParam('Product ID', 'product_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Product name', 'name', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
+
+        $objFormParam->addParam('Category ID', 'category_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Maker ID', 'maker_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        
+        $objFormParam->addParam('Sort order', 'orderby', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Product ID', 'pageno', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Favorite product ID', 'disp_number', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+
+        $objFormParam->addParam('Category ID', 'category_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Prodyct Class ID', 'product_class_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Category class ID', 'classcategory_id1', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Category Class ID', 'classcategory_id2', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        $objFormParam->addParam('Quantity', 'quantity', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
     }
 
@@ -406,5 +440,6 @@
                 $arrProducts[$key]['quantity']          = $arrForm['quantity'];
                 $arrProducts[$key]['arrErr']            = $arrErr;
-                $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProducts[$key]['product_id']}, '{$arrForm['classcategory_id2']}');";
+                $classcategory_id2 = SC_Utils_Ex::jsonEncode($arrForm['classcategory_id2']);
+                $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProducts[$key]['product_id']}, {$classcategory_id2});";
             }
         }
Index: /branches/version-2_12-multilang/data/class/pages/LC_Page_ResizeImage.php
===================================================================
--- /branches/version-2_12-multilang/data/class/pages/LC_Page_ResizeImage.php	(revision 22496)
+++ /branches/version-2_12-multilang/data/class/pages/LC_Page_ResizeImage.php	(revision 22897)
@@ -106,8 +106,6 @@
      */
     function lfCheckFileName() {
-        //$pattern = '|^[0-9]+_[0-9a-z]+\.[a-z]{3}$|';
-        $pattern = '|\./|';
         $file    = trim($_GET['image']);
-        if (preg_match_all($pattern, $file, $matches)) {
+        if (!preg_match("/^[[:alnum:]_\.-]+$/i", $file)) {
             return false;
         } else {
Index: /branches/version-2_12-multilang/data/class/SC_FormParam.php
===================================================================
--- /branches/version-2_12-multilang/data/class/SC_FormParam.php	(revision 22496)
+++ /branches/version-2_12-multilang/data/class/SC_FormParam.php	(revision 22897)
@@ -277,6 +277,6 @@
             }
         } else {
-            $objErr = new SC_CheckError_Ex(array(0 => $value));
-            $objErr->doFunc(array($disp_name, 0, $length), array($func));
+            $objErr = new SC_CheckError_Ex(array(($error_last_key ? $error_last_key : $error_key) => $value));
+            $objErr->doFunc(array($disp_name, ($error_last_key ? $error_last_key : $error_key), $length), array($func));
             if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {
                 foreach ($objErr->arrErr as $message) {
Index: /branches/version-2_12-multilang/data/class/SC_CheckError.php
===================================================================
--- /branches/version-2_12-multilang/data/class/SC_CheckError.php	(revision 22510)
+++ /branches/version-2_12-multilang/data/class/SC_CheckError.php	(revision 22897)
@@ -104,5 +104,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         if (strlen($this->arrParam[$value[0]]) == 0) {
             $this->arrErr[$value[0]] = t('c_* T_ARG1 is blank. <br />_01', array('T_ARG1' => $value[1]));
@@ -183,5 +183,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         // 文字数の取得
         if ($this->arrParam[$value[2]] !== $this->arrParam[$value[3]]) {
@@ -201,5 +201,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         // 文字数の取得
         if ($this->arrParam[$value[2]] == $this->arrParam[$value[3]]) {
@@ -219,5 +219,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         // 文字数の取得
         if ($this->arrParam[$value[2]] != '' && $this->arrParam[$value[3]] != '' && ($this->arrParam[$value[2]] > $this->arrParam[$value[3]])) {
@@ -930,5 +930,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) {
             $this->arrErr[$value[2]] = t('c_* Specify T_ARG1 correctly. <br />_01', array('T_ARG1' => $value[0]));
@@ -980,5 +980,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]]) > 0 || strlen($this->arrParam[$value[5]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) {
             $this->arrErr[$value[2]] = t('c_* Specify T_ARG1 correctly. <br />_01', array('T_ARG1' => $value[0]));
@@ -1023,5 +1023,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0) && ! checkdate($this->arrParam[$value[3]], 1, $this->arrParam[$value[2]])) {
             $this->arrErr[$value[2]] = t('c_* Specify T_ARG1 correctly. <br />_01', array('T_ARG1' => $value[0]));
@@ -1135,5 +1135,5 @@
             return;
         }
-        $this->createParam($value);
+        // $this->createParam($value);
         if ($this->evalCheck($value[1]) === false) {
             $this->arrErr[$value[0]] = t('c_* The T_ARG1 format is incorrect. <br />_01', array('T_ARG1' => $value[0]));
@@ -1164,9 +1164,18 @@
      */
     function createParam($value) {
-        foreach ($value as $key) {
-            if (is_string($key) || is_int($key)) {
-                if (!isset($this->arrParam[$key]))  $this->arrParam[$key] = '';
-            }
-        }
+         foreach ($value as $val_key => $key) {
+             if ($val_key != 0 && (is_string($key) || is_int($key))) {
+                 if (!is_numeric($key) && preg_match('/^[a-z0-9_]+$/i', $key)) {
+                     if (!isset($this->arrParam[$key])) $this->arrParam[$key] = '';
+                     if (strlen($this->arrParam[$key]) > 0
+                           && (preg_match('/^[[:alnum:]\-\_]*[\.\/\\\\]*\.\.(\/|\\\\)/',$this->arrParam[$key]) || !preg_match('/\A[^\x00-\x08\x0b\x0c\x0e-\x1f\x7f]+\z/u', $this->arrParam[$key])))
+                           ) {
+                         $this->arrErr[$value[1]] = '※ ' . $value[0] . ' is not a valid character.<br />';
+                     }
+                 } else if (preg_match('/[^a-z0-9_]/i', $key)) {
+                     trigger_error('', E_USER_ERROR);
+                 }
+             }
+         }
     }
 
Index: /branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend_search.tpl
===================================================================
--- /branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend_search.tpl	(revision 22453)
+++ /branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend_search.tpl	(revision 22897)
@@ -30,8 +30,8 @@
 
 function func_submit( id ){
-    var fm = window.opener.document.form<!--{$smarty.get.rank}-->;
+    var fm = window.opener.document.form<!--{$rank|h}-->;
     fm.product_id.value = id;
     fm.mode.value = 'set_item';
-    fm.rank.value = '<!--{$smarty.get.rank}-->';
+    fm.rank.value = '<!--{$rank|h}-->';
     fm.submit();
     window.close();
