Index: temp/test-xoops.ec-cube.net/data/class/SC_Image.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Image.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Image.php	(revision 1142)
@@ -0,0 +1,55 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+//---- ¥¢¥Ã¥×¥í¡¼¥É¥Õ¥¡¥¤¥ë²Ã¹©¥¯¥é¥¹(thumb.php¤È¥»¥Ã¥È¤Ç»ÈÍÑ¤¹¤ë)
+class SC_Image {
+	
+	var $tmp_dir;
+		
+	function SC_Image($tmp_dir) {
+		// ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëÆÉ¹þ
+		$include_dir = realpath(dirname( __FILE__));
+		require_once($include_dir . "/../lib/thumb.php");
+		if(!ereg("/$", $tmp_dir)) {
+			$this->tmp_dir = $tmp_dir . "/";
+		} else {
+			$this->tmp_dir = $tmp_dir;
+		}
+	}
+	
+	//--- °ì»þ¥Õ¥¡¥¤¥ëÀ¸À®(¥µ¥à¥Í¥¤¥ë²èÁüÀ¸À®ÍÑ)
+	function makeTempImage($keyname, $max_width, $max_height) {
+		// °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£
+		$mainname = uniqid("").".";
+		// ³ÈÄ¥»Ò°Ê³°¤òÃÖ¤­´¹¤¨¤ë¡£
+		$newFileName = ereg_replace("^.*\.",$mainname, $_FILES[$keyname]['name']);
+		$result  = MakeThumb($_FILES[$keyname]['tmp_name'], $this->tmp_dir , $max_width, $max_height, $newFileName);
+		gfDebugLog($result);
+		return $newFileName;
+	}
+
+	//--- ¥Õ¥¡¥¤¥ë¤ò»ØÄêÊÝÂ¸DIR¤Ø°ÜÆ°
+	function moveTempImage($filename, $save_dir) {
+		// ¥³¥Ô¡¼¸µ¥Õ¥¡¥¤¥ë¡¢¥³¥Ô¡¼Àè¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ë¤Î¤ß¼Â¹Ô¤¹¤ë
+		if(file_exists($this->tmp_dir.$filename) && file_exists($save_dir)) {
+			if(copy($this->tmp_dir . $filename , $save_dir."/".$filename)) {
+				unlink( $this->tmp_dir . $filename );
+			}
+		} else {
+			gfDebugLog($this->tmp_dir.$filename."¤Î°ÜÆ°¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£");
+		}
+	}
+
+	//---- »ØÄê¥Õ¥¡¥¤¥ë¤òºï½ü	
+	function deleteImage($filename, $dir) {
+		if(file_exists($dir."/".$filename)) {
+			unlink($dir."/".$filename);
+		}
+	}
+
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Session.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Session.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Session.php	(revision 1142)
@@ -0,0 +1,93 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ¥»¥Ã¥·¥ç¥ó´ÉÍý¥¯¥é¥¹ */
+class SC_Session {
+	var $login_id;		// ¥í¥°¥¤¥ó¥æ¡¼¥¶Ì¾
+	var $authority;		// ¥æ¡¼¥¶¸¢¸Â
+	var $cert;			// Ç§¾ÚÊ¸»úÎó(Ç§¾ÚÀ®¸ù¤ÎÈ½Äê¤Ë»ÈÍÑ)
+	var $sid;			// ¥»¥Ã¥·¥ç¥óID
+	var $member_id;		// ¥í¥°¥¤¥ó¥æ¡¼¥¶¤Î¼ç¥­¡¼
+
+	/* ¥³¥ó¥¹¥È¥é¥¯¥¿ */
+	function SC_Session() {
+		// ¥»¥Ã¥·¥ç¥ó³«»Ï
+		sfDomainSessionStart();
+
+		// ¥»¥Ã¥·¥ç¥ó¾ðÊó¤ÎÊÝÂ¸
+		if(isset($_SESSION['cert'])) {
+			$this->sid = session_id();
+			$this->cert = $_SESSION['cert'];
+			$this->login_id = $_SESSION['login_id'];
+			$this->authority = $_SESSION['authority'];	// ´ÉÍý¼Ô:0, °ìÈÌ:1, ±ÜÍ÷:2
+			$this->member_id = $_SESSION['member_id'];
+			// ¥í¥°¤Ëµ­Ï¿¤¹¤ë
+			gfPrintLog("access : user=".$this->login_id." auth=".$this->authority." sid=".$this->sid);
+		} else {
+			// ¥í¥°¤Ëµ­Ï¿¤¹¤ë
+			gfPrintLog("access error.");
+		}
+	}
+	/* Ç§¾ÚÀ®¸ù¤ÎÈ½Äê */
+	function IsSuccess() {
+		global $arrPERMISSION;
+		if($this->cert == CERT_STRING) {
+			if(isset($arrPERMISSION[$_SERVER['PHP_SELF']])) {
+				// ¿ôÃÍ¤¬¼«Ê¬¤Î¸¢¸Â°Ê¾å¤Î¤â¤Î¤Ç¤Ê¤¤¤È¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¡£
+				if($arrPERMISSION[$_SERVER['PHP_SELF']] < $this->authority) {			
+					return AUTH_ERROR;
+				} 
+			}
+			return SUCCESS;
+		}
+		
+		return ACCESS_ERROR;
+	}
+	
+	/* ¥»¥Ã¥·¥ç¥ó¤Î½ñ¤­¹þ¤ß */
+	function SetSession($key, $val) {
+		$_SESSION[$key] = $val;
+	}
+	
+	/* ¥»¥Ã¥·¥ç¥ó¤ÎÆÉ¤ß¹þ¤ß */
+	function GetSession($key) {
+		return $_SESSION[$key];
+	}
+	
+	/* ¥»¥Ã¥·¥ç¥óID¤Î¼èÆÀ */
+	function GetSID() {
+		return $this->sid;
+	}
+	
+	/* ¥»¥Ã¥·¥ç¥ó¤ÎÇË´þ */
+	function EndSession() {
+		// ¥Ç¥Õ¥©¥ë¥È¤Ï¡¢¡ÖPHPSESSID¡×
+		$sname = session_name();
+		// ¥»¥Ã¥·¥ç¥óÊÑ¿ô¤òÁ´¤Æ²ò½ü¤¹¤ë
+		$_SESSION = array();
+		// ¥»¥Ã¥·¥ç¥ó¤òÀÚÃÇ¤¹¤ë¤Ë¤Ï¥»¥Ã¥·¥ç¥ó¥¯¥Ã¥­¡¼¤âºï½ü¤¹¤ë¡£
+		// Note: ¥»¥Ã¥·¥ç¥ó¾ðÊó¤À¤±¤Ç¤Ê¤¯¥»¥Ã¥·¥ç¥ó¤òÇË²õ¤¹¤ë¡£
+		if (isset($_COOKIE[$sname])) {
+			setcookie($sname, '', time()-42000, '/');
+		}
+		// ºÇ½ªÅª¤Ë¡¢¥»¥Ã¥·¥ç¥ó¤òÇË²õ¤¹¤ë
+		session_destroy();
+		// ¥í¥°¤Ëµ­Ï¿¤¹¤ë
+		gfPrintLog("logout : user=".$this->login_id." auth=".$this->authority." sid=".$this->sid);
+	}
+	
+	// ´ØÏ¢¥»¥Ã¥·¥ç¥ó¤Î¤ßÇË´þ¤¹¤ë¡£
+	function logout() {
+		unset($_SESSION['cert']);
+		unset($_SESSION['login_id']);
+		unset($_SESSION['authority']);
+		unset($_SESSION['member_id']);
+		// ¥í¥°¤Ëµ­Ï¿¤¹¤ë
+		gfPrintLog("logout : user=".$this->login_id." auth=".$this->authority." sid=".$this->sid);
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_FormParam.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_FormParam.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_FormParam.php	(revision 1142)
@@ -0,0 +1,360 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹ */
+class SC_FormParam {
+
+	var $param;	
+	var $disp_name;
+	var $keyname;
+	var $length;
+	var $convert;
+	var $arrCheck;
+	var $default;	// ²¿¤âÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¤­¤ËÉ½¼¨¤¹¤ëÃÍ
+	var $input_db;	// DB¤Ë¤½¤Î¤Þ¤ÞÁÞÆþ²ÄÇ½¤«ÈÝ¤«
+	var $html_disp_name;
+	
+	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	function SC_FormParam() {
+		$this->check_dir = IMAGE_SAVE_DIR;
+		$this->disp_name = array();
+		$this->keyname = array();
+		$this->length = array();
+		$this->convert = array();
+		$this->arrCheck = array();
+		$this->default = array();
+		$this->input_db = array();
+	}
+	
+	// ¥Ñ¥é¥á¡¼¥¿¤ÎÄÉ²Ã
+	function addParam($disp_name, $keyname, $length="", $convert="", $arrCheck=array(), $default="", $input_db="true") {
+		$this->disp_name[] = $disp_name;
+		$this->keyname[] = $keyname;
+		$this->length[] = $length;
+		$this->convert[] = $convert;
+		$this->arrCheck[] = $arrCheck;
+		$this->default[] = $default;
+		$this->input_db[] = $input_db;
+	}
+	
+	// ¥Ñ¥é¥á¡¼¥¿¤ÎÆþÎÏ
+	// $arrVal	:$arrVal['keyname']¡¦¡¦¤ÎÇÛÎó¤ò°ìÃ×¤·¤¿¥­¡¼¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ë³ÊÇ¼¤¹¤ë
+	// $seq		:true¤Î¾ì¹ç¡¢$arrVal[0]¢·¤ÎÇÛÎó¤òÅÐÏ¿½ç¤Ë¥¤¥ó¥¹¥¿¥ó¥¹¤Ë³ÊÇ¼¤¹¤ë
+	function setParam($arrVal, $seq = false) {
+		$cnt = 0;
+		if(!$seq){
+			foreach($this->keyname as $val) {
+				if(isset($arrVal[$val])) {
+					$this->setValue($val, $arrVal[$val]);
+				}
+			}		
+		} else {
+			foreach($this->keyname as $val) {
+				$this->param[$cnt] = $arrVal[$cnt];
+				$cnt++;
+			}
+		}
+	}
+	
+	// ²èÌÌÉ½¼¨ÍÑ¥¿¥¤¥È¥ëÀ¸À®
+	function setHtmlDispNameArray() {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			$find = false;
+			foreach($this->arrCheck[$cnt] as $val) {
+				if($val == "EXIST_CHECK") {
+					$find = true;
+				}
+			}
+			
+			if($find) {
+				$this->html_disp_name[$cnt] = $this->disp_name[$cnt] . "<span class='red'>(¢¨ É¬¿Ü)</span>";					
+			} else {
+				$this->html_disp_name[$cnt] = $this->disp_name[$cnt];
+			}								
+			$cnt++;
+		}
+	}
+	
+	// ²èÌÌÉ½¼¨ÍÑ¥¿¥¤¥È¥ë¼èÆÀ
+	function getHtmlDispNameArray() {
+		return $this->html_disp_name;
+	}
+		
+	// Ê£¿ôÎó¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	function setParamList($arrVal, $keyname) {
+		// DB¤Î·ï¿ô¤ò¼èÆÀ¤¹¤ë¡£
+		$count = count($arrVal);
+		$no = 1;
+		for($cnt = 0; $cnt < $count; $cnt++) {
+			$key = $keyname.$no;
+			if($arrVal[$cnt][$keyname] != "") {
+				$this->setValue($key, $arrVal[$cnt][$keyname]);
+			}
+			$no++;
+		}
+	}
+	
+	function setDBDate($db_date, $year_key = 'year', $month_key = 'month', $day_key = 'day') {
+		list($y, $m, $d) = split("[- ]", $db_date);
+		$this->setValue($year_key, $y);
+		$this->setValue($month_key, $m);
+		$this->setValue($day_key, $d);
+	}
+	
+	// ¥­¡¼¤ËÂÐ±þ¤·¤¿ÃÍ¤ò¥»¥Ã¥È¤¹¤ë¡£
+	function setValue($key, $param) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($val == $key) {
+				$this->param[$cnt] = $param;
+				break;
+			}
+			$cnt++;
+		}
+	}
+
+	function toLower($key) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($val == $key) {
+				$this->param[$cnt] = strtolower($this->param[$cnt]);
+				break;
+			}
+			$cnt++;
+		}
+	}
+	
+	// ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+	function checkError($br = true, $keyname = "") {
+		// Ï¢ÁÛÇÛÎó¤Î¼èÆÀ
+		$arrRet = $this->getHashArray($keyname);
+		$objErr = new SC_CheckError($arrRet);
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			foreach($this->arrCheck[$cnt] as $func) {
+				switch($func) {
+				case 'EXIST_CHECK':
+				case 'NUM_CHECK':
+				case 'EMAIL_CHECK':
+				case 'EMAIL_CHAR_CHECK':
+				case 'ALNUM_CHECK':
+				case 'KANA_CHECK':
+				case 'URL_CHECK':
+				case 'SPTAB_CHECK':
+				case 'ZERO_CHECK':
+				case 'ALPHA_CHECK':
+				case 'ZERO_START':
+				case 'FIND_FILE':
+				case 'NO_SPTAB':
+				case 'DIR_CHECK':
+				case 'DOMAIN_CHECK':
+				
+					if(!is_array($this->param[$cnt])) {
+						$objErr->doFunc(array($this->disp_name[$cnt], $val), array($func));
+					} else {
+						$max = count($this->param[$cnt]);
+						for($i = 0; $i < $max; $i++) {
+							$objSubErr = new SC_CheckError($this->param[$cnt]);
+							$objSubErr->doFunc(array($this->disp_name[$cnt], $i), array($func));
+							if(count($objSubErr->arrErr) > 0) {
+								foreach($objSubErr->arrErr as $mess) {
+									if($mess != "") {
+										$objErr->arrErr[$val] = $mess;
+									}
+								}
+							}
+						}
+					}
+					break;
+				case 'LENGTH_CHECK':
+				case 'MAX_LENGTH_CHECK':
+				case 'NUM_COUNT_CHECK':
+					if(!is_array($this->param[$cnt])) {
+						$objErr->doFunc(array($this->disp_name[$cnt], $val, $this->length[$cnt]), array($func));
+					} else {
+						$max = count($this->param[$cnt]);
+						for($i = 0; $i < $max; $i++) {
+							$objSubErr = new SC_CheckError($this->param[$cnt]);
+							$objSubErr->doFunc(array($this->disp_name[$cnt], $i, $this->length[$cnt]), array($func));
+							if(count($objSubErr->arrErr) > 0) {
+								foreach($objSubErr->arrErr as $mess) {
+									if($mess != "") {
+										$objErr->arrErr[$val] = $mess;
+									}
+								}
+							}
+						}
+					}
+					break;
+				// ¾®Ê¸»ú¤ËÊÑ´¹
+				case 'CHANGE_LOWER':
+					$this->param[$cnt] = strtolower($this->param[$cnt]);
+					break;
+				// ¥Õ¥¡¥¤¥ë¤ÎÂ¸ºß¥Á¥§¥Ã¥¯
+				case 'FILE_EXISTS':
+					if($this->param[$cnt] != "" && !file_exists($this->check_dir . $this->param[$cnt])) {
+						$objErr->arrErr[$val] = "¢¨ " . $this->disp_name[$cnt] . "¤Î¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤»¤ó¡£<br>";					
+					}
+					break;
+				default:
+					$objErr->arrErr[$val] = "¢¨¢¨¡¡¥¨¥é¡¼¥Á¥§¥Ã¥¯·Á¼°($func)¤Ë¤ÏÂÐ±þ¤·¤Æ¤¤¤Þ¤»¤ó¡¡¢¨¢¨ <br>";
+					break;
+				}
+			}
+			
+			if (isset($objErr->arrErr[$val]) && !$br) {
+				$objErr->arrErr[$val] = ereg_replace("<br>$", "", $objErr->arrErr[$val]);
+			}
+			$cnt++;
+		}
+		return $objErr->arrErr;
+	}
+	
+	// ÆþÎÏÊ¸»ú¤ÎÊÑ´¹
+	function convParam() {
+		/*
+		 *	Ê¸»úÎó¤ÎÊÑ´¹
+		 *	K :  ¡ÖÈ¾³Ñ(ÊÝ¶¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹
+		 *	C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹
+		 *	V :  ÂùÅÀÉÕ¤­¤ÎÊ¸»ú¤ò°ìÊ¸»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍÑ¤·¤Þ¤¹	
+		 *	n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖÈ¾³Ñ(ÊÝ¶¸)¡×¤ËÊÑ´¹
+		 *  a :  ¡ÖÁ´³Ñ¡×±Ñ»ú¤ò¡ÖÈ¾³Ñ¡×±Ñ»ú¤ËÊÑ´¹
+		 */
+		$cnt = 0;
+		foreach ($this->keyname as $val) {
+			if(!is_array($this->param[$cnt])) {
+				if($this->convert[$cnt] != "") {
+					$this->param[$cnt] = mb_convert_kana($this->param[$cnt] ,$this->convert[$cnt]);
+				}
+			} else {
+				$max = count($this->param[$cnt]);
+				for($i = 0; $i < $max; $i++) {
+					if($this->convert[$cnt] != "") {
+						$this->param[$cnt][$i] = mb_convert_kana($this->param[$cnt][$i] ,$this->convert[$cnt]);
+					}
+				}
+			}
+			$cnt++;
+		}
+	}
+	
+	// Ï¢ÁÛÇÛÎó¤ÎºîÀ®
+	function getHashArray($keyname = "") {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($keyname == "" || $keyname == $val) {
+				$arrRet[$val] = $this->param[$cnt];
+				$cnt++;
+			}
+		}
+		return $arrRet;
+	}
+	
+	// DB³ÊÇ¼ÍÑÇÛÎó¤ÎºîÀ®
+	function getDbArray() {
+		$cnt = 0;
+		foreach ($this->keyname as $val) {
+			if ($this->input_db[$cnt]) {
+				$arrRet[$val] = $this->param[$cnt];
+			}
+			$cnt++;
+		}
+		return $arrRet;
+	}
+	
+	// ÇÛÎó¤Î½Ä²£¤òÆþ¤ìÂØ¤¨¤ÆÊÖ¤¹
+	function getSwapArray($arrKey) {
+		foreach($arrKey as $keyname) {
+			$arrVal = $this->getValue($keyname);
+			$max = count($arrVal);
+			for($i = 0; $i < $max; $i++) {
+				$arrRet[$i][$keyname] = $arrVal[$i];
+			}
+		}
+		return $arrRet;
+	}
+	
+	// ¹àÌÜÌ¾°ìÍ÷¤Î¼èÆÀ
+	function getTitleArray() {
+		return $this->disp_name;
+	}
+	
+	// ¹àÌÜ¿ô¤òÊÖ¤¹
+	function getCount() {
+		$count = count($this->keyname);
+		return $count;
+	}
+	
+	// ¥Õ¥©¡¼¥à¤ËÅÏ¤¹ÍÑ¤Î¥Ñ¥é¥á¡¼¥¿¤òÊÖ¤¹
+	function getFormParamList() {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			// ¥­¡¼Ì¾
+			$arrRet[$val]['keyname'] = $this->keyname[$cnt];
+			// Ê¸»ú¿ôÀ©¸Â
+			$arrRet[$val]['length'] = $this->length[$cnt];
+			// ÆþÎÏÃÍ
+			$arrRet[$val]['value'] = $this->param[$cnt];
+			// É½¼¨Ì¾
+			$arrRet[$val]['name'] = $this->disp_name[$cnt];
+			// ÊÑ´¹·¿
+			$arrRet[$val]['convert'] = $this->convert[$cnt];
+			
+			if($this->default[$cnt] != "" && $this->param[$cnt] == "") {
+				$arrRet[$val]['value'] = $this->default[$cnt];
+			}
+					
+			$cnt++;
+		}
+		return $arrRet;
+	}
+	
+	// ¥­¡¼Ì¾¤Î°ìÍ÷¤òÊÖ¤¹
+	function getKeyList() {
+		foreach($this->keyname as $val) {
+			$arrRet[] = $val;
+		}
+		return $arrRet;
+	}
+	
+	// ¥­¡¼Ì¾¤È°ìÃ×¤·¤¿ÃÍ¤òÊÖ¤¹
+	function getValue($keyname) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($val == $keyname) {
+				$ret = $this->param[$cnt];
+				break;
+			}
+			$cnt++;
+		}
+		return $ret;
+	}
+	
+	function splitCheckBoxes($keyname) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($val == $keyname) {
+				$this->param[$cnt] = sfSplitCheckBoxes($this->param[$cnt]);
+			}
+			$cnt++;
+		}
+	}
+	
+	function splitParamCheckBoxes($keyname) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($val == $keyname) {
+				if(!is_array($this->param[$cnt])) {
+					$this->param[$cnt] = split("-", $this->param[$cnt]);
+				}
+			}
+			$cnt++;
+		}
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_UploadFile.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_UploadFile.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_UploadFile.php	(revision 1142)
@@ -0,0 +1,367 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+$SC_UPLOADFILE_DIR = realpath(dirname( __FILE__));
+require_once($SC_UPLOADFILE_DIR . "/../lib/gdthumb.php");	
+
+/* ¥¢¥Ã¥×¥í¡¼¥É¥Õ¥¡¥¤¥ë´ÉÍý¥¯¥é¥¹ */
+class SC_UploadFile {
+	var $temp_dir;
+	var $save_dir;
+	var $keyname;	// ¥Õ¥¡¥¤¥ëinput¥¿¥°¤Îname
+	var $width;		// ²£¥µ¥¤¥º
+	var $height;	// ½Ä¥µ¥¤¥º
+	var $arrExt;	// »ØÄê¤¹¤ë³ÈÄ¥»Ò
+	var $temp_file;	// ÊÝÂ¸¤µ¤ì¤¿¥Õ¥¡¥¤¥ëÌ¾
+	var $save_file; // DB¤«¤éÆÉ¤ß½Ð¤·¤¿¥Õ¥¡¥¤¥ëÌ¾
+	var $disp_name;	// ¹àÌÜÌ¾
+	var $size;		// À©¸Â¥µ¥¤¥º
+	var $necessary; // É¬¿Ü¤Î¾ì¹ç:true
+	var $image;		// ²èÁü¤Î¾ì¹ç:true
+	
+	// ¥Õ¥¡¥¤¥ë´ÉÍý¥¯¥é¥¹
+	function SC_UploadFile($temp_dir, $save_dir) {
+		$this->temp_dir = $temp_dir;
+		$this->save_dir = $save_dir;
+		$this->file_max = 0;
+	}
+
+	// ¥Õ¥¡¥¤¥ë¾ðÊóÄÉ²Ã
+	function addFile($disp_name, $keyname, $arrExt, $size, $necessary=false, $width=0, $height=0, $image=true) {
+		$this->disp_name[] = $disp_name;
+		$this->keyname[] = $keyname;
+		$this->width[] = $width;
+		$this->height[] = $height;
+		$this->arrExt[] = $arrExt;
+		$this->size[] = $size;
+		$this->necessary[] = $necessary;
+		$this->image[] = $image;
+	}
+	// ¥µ¥à¥Í¥¤¥ë²èÁü¤ÎºîÀ®
+	function makeThumb($src_file, $width, $height) {
+		// °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£
+		$uniqname = date("mdHi") . "_" . uniqid("");
+		
+		$dst_file = $this->temp_dir . $uniqname;
+		
+		$objThumb = new gdthumb();
+		$ret = $objThumb->Main($src_file, $width, $height, $dst_file);
+		
+		if($ret[0] != 1) {
+			// ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ÎÉ½¼¨
+			print($ret[1]);
+			exit;
+		}
+		
+		return basename($ret[1]);
+	}
+		
+	// ¥¢¥Ã¥×¥í¡¼¥É¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤òÊÝÂ¸¤¹¤ë¡£
+	function makeTempFile($keyname, $rename = true) {
+		$objErr = new SC_CheckError();
+		$cnt = 0;
+		$arrKeyname = array_flip($this->keyname);
+
+		if(!($_FILES[$keyname]['size'] > 0)) {
+			$objErr->arrErr[$keyname] = "¢¨ " . $this->disp_name[$arrKeyname[$keyname]] . "¤¬¥¢¥Ã¥×¥í¡¼¥É¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br />";
+		} else {
+			foreach($this->keyname as $val) {
+				// °ìÃ×¤·¤¿¥­¡¼¤Î¥Õ¥¡¥¤¥ë¤Ë¾ðÊó¤òÊÝÂ¸¤¹¤ë¡£
+				if ($val == $keyname) {
+					// ³ÈÄ¥»Ò¥Á¥§¥Ã¥¯
+					$objErr->doFunc(array($this->disp_name[$cnt], $keyname, $this->arrExt[$cnt]), array("FILE_EXT_CHECK"));
+					// ¥Õ¥¡¥¤¥ë¥µ¥¤¥º¥Á¥§¥Ã¥¯
+					$objErr->doFunc(array($this->disp_name[$cnt], $keyname, $this->size[$cnt]), array("FILE_SIZE_CHECK"));
+					// ¥¨¥é¡¼¤¬¤Ê¤¤¾ì¹ç
+					if(!isset($objErr->arrErr[$keyname])) {
+						// ²èÁü¥Õ¥¡¥¤¥ë¤Î¾ì¹ç
+						if($this->image[$cnt]) {
+							$this->temp_file[$cnt] = $this->makeThumb($_FILES[$keyname]['tmp_name'], $this->width[$cnt], $this->height[$cnt]);
+						// ²èÁü¥Õ¥¡¥¤¥ë°Ê³°¤Î¾ì¹ç
+						} else {
+							// °ì°Õ¤Ê¥Õ¥¡¥¤¥ëÌ¾¤òºîÀ®¤¹¤ë¡£
+							if($rename) {
+								$uniqname = date("mdHi") . "_" . uniqid("").".";
+								$this->temp_file[$cnt] = ereg_replace("^.*\.",$uniqname, $_FILES[$keyname]['name']);
+							} else {
+								$this->temp_file[$cnt] = $_FILES[$keyname]['name'];	
+							}
+							$result  = copy($_FILES[$keyname]['tmp_name'], $this->temp_dir. "/". $this->temp_file[$cnt]);
+							gfPrintLog($_FILES[$keyname]['name']." -> ".$this->temp_dir. "/". $this->temp_file[$cnt]);
+						}
+					}
+				}
+				$cnt++;
+			}
+		}
+		return $objErr->arrErr[$keyname];
+	}
+	
+	// ¥¢¥Ã¥×¥í¡¼¥É¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤òFTP¥³¥Ô¡¼¤¹¤ë
+	function ftpTempFile($ftp_image_temp_dir, $image_key) {
+		global $arrWEB_SERVERS;
+		$filename = $this->getTempFileName($image_key);
+		// ¼«Ê¬¼«¿È°Ê³°¤Î¥µ¡¼¥Ð¤Ë¥Õ¥¡¥¤¥ë¤ò¥³¥Ô¡¼¤¹¤ë	
+		foreach($arrWEB_SERVERS as $array) {
+			if($array['host'] != $_SERVER["SERVER_ADDR"]) {
+				$dst_path = $ftp_image_temp_dir . $filename;
+				$src_path = $this->temp_dir . $filename;		
+				sfFtpCopy($array['host'], $array['user'], $array['pass'], $dst_path, $src_path);			
+			}
+		}
+	}
+	
+	// ²èÁü¤òºï½ü¤¹¤ë¡£
+	function deleteFile($keyname) {
+		$objImage = new SC_Image($this->temp_dir);
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if ($val == $keyname) {
+				// °ì»þ¥Õ¥¡¥¤¥ë¤Î¾ì¹çºï½ü¤¹¤ë¡£
+				if($this->temp_file[$cnt] != "") {
+					$objImage->deleteImage($this->temp_file[$cnt], $this->save_dir);
+				}
+				$this->temp_file[$cnt] = "";
+				$this->save_file[$cnt] = "";
+			}
+			$cnt++;
+		}
+	}
+	
+	// °ì»þ¥Õ¥¡¥¤¥ë¥Ñ¥¹¤ò¼èÆÀ¤¹¤ë¡£
+	function getTempFilePath($keyname) {
+		$cnt = 0;
+		$filepath = "";
+		foreach($this->keyname as $val) {
+			if ($val == $keyname) {
+				if($this->temp_file[$cnt] != "") {
+					$filepath = $this->temp_dir . "/" . $this->temp_file[$cnt];
+				}
+			}
+			$cnt++;
+		}
+		return $filepath;
+	}
+		
+	// °ì»þ¥Õ¥¡¥¤¥ëÌ¾¤ò¼èÆÀ
+	function getTempFileName($keyname) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if ($val == $keyname) {
+				return $this->temp_file[$cnt];
+			}
+			$cnt++;
+		}
+		return "";
+	}
+	
+	// °ì»þ¥Õ¥¡¥¤¥ë¤òÊÝÂ¸¥Ç¥£¥ì¥¯¥È¥ê¤Ë°Ü¤¹
+	function moveTempFile() {
+		$objImage = new SC_Image($this->temp_dir);
+		$cnt = 0;
+		$this->arrFiles = array();
+		foreach($this->keyname as $val) {
+			if($this->temp_file[$cnt] != "") {
+				// ¥³¥Ô¡¼¸µ¥Õ¥¡¥¤¥ë¡¢¥³¥Ô¡¼Àè¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ë¤Î¤ß¼Â¹Ô¤¹¤ë
+				if(file_exists($this->temp_dir . "/" . $this->temp_file[$cnt]) && file_exists($this->save_dir)) {
+					if(copy($this->temp_dir . "/" . $this->temp_file[$cnt] , $this->save_dir . "/" . $this->temp_file[$cnt])) {
+						unlink($this->temp_dir . "/" . $this->temp_file[$cnt]);
+					}
+				} else {
+					gfDebugLog($this->temp_dir . "/" . $this->temp_file[$cnt]."¤Î°ÜÆ°¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£");
+				}								
+				// ´ûÂ¸¤ÎÊÝÂ¸¥Õ¥¡¥¤¥ë¤Ïºï½ü¤¹¤ë
+				if($this->save_file[$cnt] != "") {
+					$objImage->deleteImage($this->save_file[$cnt], $this->save_dir);
+					$this->arrFiles[$cnt]['del_file'] = $this->save_file[$cnt];
+				}
+				$this->arrFiles[$cnt]['save_file'] = $this->temp_file[$cnt];
+			}
+			$cnt++;
+		}
+		// ÊÝÂ¸¤·¤¿¥Õ¥¡¥¤¥ëÌ¾¤Èºï½ü¤·¤¿¥Õ¥¡¥¤¥ëÌ¾¤òÊÖ¤¹
+		return $this->arrFiles;
+	}
+	
+	// ¥Õ¥¡¥¤¥ë¤Î¹¹¿·¤òÂ¾¥µ¡¼¥Ð¤Ë¤âÈ¿±Ç¤¹¤ë¡£
+	function ftpMoveTempFile($ftp_image_save_dir) {
+		global $arrWEB_SERVERS;
+		// ¼«Ê¬¼«¿È°Ê³°¤Î¥µ¡¼¥Ð¤Ë¥Õ¥¡¥¤¥ë¤ò¥³¥Ô¡¼¤¹¤ë
+		foreach($this->arrFiles as $files) {
+			foreach($arrWEB_SERVERS as $array) {
+				if($array['host'] != $_SERVER["SERVER_ADDR"]) {
+					$dst_path = $ftp_image_save_dir . $files['save_file'];
+					$src_path = $this->save_dir . $files['save_file'];
+					sfFtpCopy($array['host'], $array['user'], $array['pass'], $dst_path, $src_path);			
+					if($files['del_file'] != "") {
+						$del_path = $ftp_image_save_dir . $files['del_file'];
+						sfFtpDelete($array['host'], $array['user'], $array['pass'], $del_path);
+					}
+				}
+			}
+		}
+	}
+	
+	// HIDDENÍÑ¤Î¥Õ¥¡¥¤¥ëÌ¾ÇÛÎó¤òÊÖ¤¹
+	function getHiddenFileList() {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($this->temp_file[$cnt] != "") {
+				$arrRet["temp_" . $val] = $this->temp_file[$cnt];
+			}
+			if($this->save_file[$cnt] != "") {
+				$arrRet["save_" . $val] = $this->save_file[$cnt];
+			}
+			$cnt++; 
+		}
+		return $arrRet;
+	}
+	
+	// HIDDEN¤ÇÁ÷¤é¤ì¤Æ¤­¤¿¥Õ¥¡¥¤¥ëÌ¾¤ò¼èÆÀ¤¹¤ë
+	function setHiddenFileList($arrPOST) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			$key = "temp_" . $val;
+			if($arrPOST[$key] != "") {
+				$this->temp_file[$cnt] = $arrPOST[$key];
+			}
+			$key = "save_" . $val;
+			if($arrPOST[$key] != "") {
+				$this->save_file[$cnt] = $arrPOST[$key];
+			}
+			$cnt++;
+		}
+	}
+	
+	// ¥Õ¥©¡¼¥à¤ËÅÏ¤¹ÍÑ¤Î¥Õ¥¡¥¤¥ë¾ðÊóÇÛÎó¤òÊÖ¤¹
+	function getFormFileList($temp_url, $save_url, $real_size = false) {
+
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($this->temp_file[$cnt] != "") {
+				// ¥Õ¥¡¥¤¥ë¥Ñ¥¹¥Á¥§¥Ã¥¯(¥Ñ¥¹¤Î¥¹¥é¥Ã¥·¥å/¤¬Ï¢Â³¤·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡£)
+				if(ereg("/$", $temp_url)) {
+					$arrRet[$val]['filepath'] = $temp_url . $this->temp_file[$cnt];
+				} else {
+					$arrRet[$val]['filepath'] = $temp_url . "/" . $this->temp_file[$cnt];
+				}
+				$arrRet[$val]['filepath_dir'] = $this->temp_dir . $this->temp_file[$cnt];
+			} elseif ($this->save_file[$cnt] != "") {
+				// ¥Õ¥¡¥¤¥ë¥Ñ¥¹¥Á¥§¥Ã¥¯(¥Ñ¥¹¤Î¥¹¥é¥Ã¥·¥å/¤¬Ï¢Â³¤·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡£)
+				if(ereg("/$", $save_url)) {
+					$arrRet[$val]['filepath'] = $save_url . $this->save_file[$cnt];
+				} else {
+					$arrRet[$val]['filepath'] = $save_url . "/" . $this->save_file[$cnt];
+				}
+				$arrRet[$val]['filepath_dir'] = $this->save_dir . $this->save_file[$cnt];
+			}
+			if($arrRet[$val]['filepath'] != "") {
+				
+				if($real_size){
+					list($width, $height) = getimagesize($arrRet[$val]['filepath_dir']);
+					// ¥Õ¥¡¥¤¥ë²£Éý
+					$arrRet[$val]['width'] = $width;
+					// ¥Õ¥¡¥¤¥ë½ÄÉý
+					$arrRet[$val]['height'] = $height;
+				}else{
+					// ¥Õ¥¡¥¤¥ë²£Éý
+					$arrRet[$val]['width'] = $this->width[$cnt];
+					// ¥Õ¥¡¥¤¥ë½ÄÉý
+					$arrRet[$val]['height'] = $this->height[$cnt];
+				}
+				// É½¼¨Ì¾
+				$arrRet[$val]['disp_name'] = $this->disp_name[$cnt];
+			}
+			$cnt++;
+		}
+		return $arrRet;
+	}
+	
+	// DBÊÝÂ¸ÍÑ¤Î¥Õ¥¡¥¤¥ëÌ¾ÇÛÎó¤òÊÖ¤¹
+	function getDBFileList() {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($this->temp_file[$cnt] != "") {
+				$arrRet[$val] = $this->temp_file[$cnt];
+			} else  {
+				$arrRet[$val] = $this->save_file[$cnt];
+			}
+			$cnt++;
+		}
+		return $arrRet;
+	}
+	
+	// DB¤ÇÊÝÂ¸¤µ¤ì¤¿¥Õ¥¡¥¤¥ëÌ¾ÇÛÎó¤ò¥»¥Ã¥È¤¹¤ë
+	function setDBFileList($arrVal) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($arrVal[$val] != "") {
+				$this->save_file[$cnt] = $arrVal[$val];
+			}
+			$cnt++; 
+		}
+	}
+	
+	// ²èÁü¤ò¥»¥Ã¥È¤¹¤ë
+	function setDBImageList($arrVal) {
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($arrVal[$val] != "" && $val == 'tv_products_image') {
+				$this->save_file[$cnt] = $arrVal[$val];
+			}
+			$cnt++; 
+		}
+	}
+	
+	// DB¾å¤Î¥Õ¥¡¥¤¥ë¤ÎÆâºï½üÍ×µá¤¬¤¢¤Ã¤¿¥Õ¥¡¥¤¥ë¤òºï½ü¤¹¤ë¡£ 
+	function deleteDBFile($arrVal) {
+		$objImage = new SC_Image($this->temp_dir);
+		$cnt = 0;
+		foreach($this->keyname as $val) {
+			if($arrVal[$val] != "") {
+				if($this->save_file[$cnt] == "" && !ereg("^sub/", $arrVal[$val])) {
+					$objImage->deleteImage($arrVal[$val], $this->save_dir);
+				}
+			}
+			$cnt++; 
+		}
+	}
+
+	// É¬¿ÜÈ½Äê
+	function checkEXISTS($keyname = "") {
+		$cnt = 0;
+		$arrRet = array();
+		foreach($this->keyname as $val) {
+			if($val == $keyname || $keyname == "") {
+				// É¬¿Ü¤Ç¤¢¤ì¤Ð¥¨¥é¡¼¥Á¥§¥Ã¥¯
+				if ($this->necessary[$cnt] == true) {
+					if($this->save_file[$cnt] == "" && $this->temp_file[$cnt] == "") {
+						$arrRet[$val] = "¢¨ " . $this->disp_name[$cnt] . "¤¬¥¢¥Ã¥×¥í¡¼¥É¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br>";
+					}
+				}
+			}
+			$cnt++;
+		}
+		return $arrRet;
+	}
+
+	// ³ÈÂçÎ¨¤ò»ØÄê¤·¤Æ²èÁüÊÝÂ¸
+	function saveResizeImage($keyname, $to_w, $to_h) {
+		$path = "";
+		
+		// keyname¤ÎÅºÉÕ¥Õ¥¡¥¤¥ë¤ò¼èÆÀ
+		$arrImageKey = array_flip($this->keyname);
+		$file = $this->temp_file[$arrImageKey[$keyname]];
+		$filepath = $this->temp_dir . $file;
+		
+		$path = $this->makeThumb($filepath, $to_w, $to_h);
+		
+		// ¥Õ¥¡¥¤¥ëÌ¾¤À¤±ÊÖ¤¹
+		return basename($path);
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_CheckError.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_CheckError.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_CheckError.php	(revision 1142)
@@ -0,0 +1,786 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/*----------------------------------------------------------------------
+ * [Ì¾¾Î] SC_CheckError
+ * [³µÍ×] ¥¨¥é¡¼¥Á¥§¥Ã¥¯¥¯¥é¥¹
+ *----------------------------------------------------------------------
+ */
+class SC_CheckError {
+	var $arrErr;
+	var $arrParam;
+	
+	// ¥Á¥§¥Ã¥¯ÂÐ¾Ý¤ÎÃÍ¤¬´Þ¤Þ¤ì¤ëÇÛÎó¤ò¥»¥Ã¥È¤¹¤ë¡£
+	function SC_CheckError($array = "") {
+		if($array != "") {
+			$this->arrParam = $array;
+		} else {
+			$this->arrParam = $_POST;
+		}
+
+	}
+	
+	function doFunc($value, $arrFunc) {
+		foreach ( $arrFunc as $key ) {
+			$this->$key($value);
+		}
+	}
+	
+	/* HTML¤Î¥¿¥°¤ò¥Á¥§¥Ã¥¯¤¹¤ë */
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý value[2] = µö²Ä¤¹¤ë¥¿¥°¤¬³ÊÇ¼¤µ¤ì¤¿ÇÛÎó
+	function HTML_TAG_CHECK($value) {
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		
+		// ´Þ¤Þ¤ì¤Æ¤¤¤ë¥¿¥°¤òÃê½Ð¤¹¤ë
+		preg_match_all("/<([\/]?[a-z]+)/", $this->arrParam[$value[1]], $arrTag);
+
+		foreach($arrTag[1] as $val) {
+			$find = false;
+			
+			foreach($value[2] as $tag) {
+				if(eregi("^" . $tag . "$", $val)) {
+					$find = true;
+				} else {
+				}
+			}
+			
+			if(!$find) {
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ëµö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¥¿¥°[" . strtoupper($val) . "]¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£<br />";
+				return;
+			}		
+		}		
+	}
+
+	/*¡¡É¬¿ÜÆþÎÏ¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý
+	function EXIST_CHECK( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if( strlen($this->arrParam[$value[1]]) == 0 ){					
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	/*¡¡¥¹¥Ú¡¼¥¹¡¢¥¿¥Ö¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý
+	function SPTAB_CHECK( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) != 0 && ereg("^[ ¡¡\t\r\n]+$", $this->arrParam[$value[1]])){						
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ë¥¹¥Ú¡¼¥¹¡¢¥¿¥Ö¡¢²þ¹Ô¤Î¤ß¤ÎÆþÎÏ¤Ï¤Ç¤­¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	/*¡¡¥¹¥Ú¡¼¥¹¡¢¥¿¥Ö¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý
+	function NO_SPTAB( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) != 0 && mb_ereg("[¡¡ \t\r\n]+", $this->arrParam[$value[1]])){						
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ë¥¹¥Ú¡¼¥¹¡¢¥¿¥Ö¡¢²þ¹Ô¤Ï´Þ¤á¤Ê¤¤¤Ç²¼¤µ¤¤¡£<br />";
+		}
+	}
+	
+	/* ¥¼¥í¤Ç³«»Ï¤µ¤ì¤Æ¤¤¤ë¿ôÃÍ¤ÎÈ½Äê */
+	function ZERO_START($value) {
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) != 0 && ereg("^[0]+[0-9]+$", $this->arrParam[$value[1]])){						
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ë0¤Ç»Ï¤Þ¤ë¿ôÃÍ¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£<br />";
+		}
+	}
+	
+	/*¡¡É¬¿ÜÁªÂò¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý 
+	function SELECT_CHECK( $value ) {			// ¥×¥ë¥À¥¦¥ó¤Ê¤É¤ÇÁªÂò¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if( strlen($this->arrParam[$value[1]]) == 0 ){						
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br />";
+		}
+	}
+
+	/*¡¡Æ±°ìÀ­¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾1 value[1] = ¹àÌÜÌ¾2 value[2] = È½ÄêÂÐ¾ÝÊ¸»úÎó1  value[3] = È½ÄêÂÐ¾ÝÊ¸»úÎó2
+	function EQUAL_CHECK( $value ) {		// ÆþÎÏ¤¬»ØÄêÊ¸»ú¿ô°Ê¾å¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[3]])) {
+			return;
+		}
+		// Ê¸»ú¿ô¤Î¼èÆÀ			
+		if( $this->arrParam[$value[2]] != $this->arrParam[$value[3]]) {
+			$this->arrErr[$value[2]] = "¢¨ " . $value[0] . "¤È" . $value[1] . "¤¬°ìÃ×¤·¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	/*¡¡ÃÍ¤¬°Û¤Ê¤ë¤³¤È¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾1 value[1] = ¹àÌÜÌ¾2 value[2] = È½ÄêÂÐ¾ÝÊ¸»úÎó1  value[3] = È½ÄêÂÐ¾ÝÊ¸»úÎó2
+	function DIFFERENT_CHECK( $value ) {		// ÆþÎÏ¤¬»ØÄêÊ¸»ú¿ô°Ê¾å¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[3]])) {
+			return;
+		}
+		// Ê¸»ú¿ô¤Î¼èÆÀ			
+		if( $this->arrParam[$value[2]] == $this->arrParam[$value[3]]) {
+			$this->arrErr[$value[2]] = "¢¨ " . $value[0] . "¤È" . $value[1] . "¤Ï¡¢Æ±¤¸ÃÍ¤ò»ÈÍÑ¤Ç¤­¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	/*¡¡ÃÍ¤ÎÂç¤­¤µ¤òÈæ³Ó¤¹¤ë value[2] < value[3]¤Ç¤Ê¤±¤ì¤Ð¥¨¥é¡¼¡¡*/
+	// value[0] = ¹àÌÜÌ¾1 value[1] = ¹àÌÜÌ¾2 value[2] = È½ÄêÂÐ¾ÝÊ¸»úÎó1  value[3] = È½ÄêÂÐ¾ÝÊ¸»úÎó2
+	function GREATER_CHECK($value) {		// ÆþÎÏ¤¬»ØÄêÊ¸»ú¿ô°Ê¾å¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[3]])) {
+			return;
+		}
+		// Ê¸»ú¿ô¤Î¼èÆÀ			
+		if($this->arrParam[$value[2]] != "" && $this->arrParam[$value[3]] != "" && ($this->arrParam[$value[2]] > $this->arrParam[$value[3]])) {
+			$this->arrErr[$value[2]] = "¢¨ " . $value[0] . "¤Ï" . $value[1] . "¤è¤êÂç¤­¤¤ÃÍ¤òÆþÎÏ¤Ç¤­¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	
+	/*¡¡ºÇÂçÊ¸»ú¿ôÀ©¸Â¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó  value[2] = ºÇÂçÊ¸»ú¿ô(È¾³Ñ¤âÁ´³Ñ¤â1Ê¸»ú¤È¤·¤Æ¿ô¤¨¤ë)
+	function MAX_LENGTH_CHECK( $value ) {		// ÆþÎÏ¤¬»ØÄêÊ¸»ú¿ô°Ê¾å¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		// Ê¸»ú¿ô¤Î¼èÆÀ			
+		if( mb_strlen($this->arrParam[$value[1]]) > $value[2] ) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï" . $value[2] . "»ú°Ê²¼¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+	}
+	
+	/*¡¡ºÇ¾®Ê¸»ú¿ôÀ©¸Â¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó value[2] = ºÇ¾®Ê¸»ú¿ô(È¾³Ñ¤âÁ´³Ñ¤â1Ê¸»ú¤È¤·¤Æ¿ô¤¨¤ë)
+	function MIN_LENGTH_CHECK( $value ) {		// ÆþÎÏ¤¬»ØÄêÊ¸»ú¿ôÌ¤Ëþ¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}										
+		// Ê¸»ú¿ô¤Î¼èÆÀ		
+		if( mb_strlen($this->arrParam[$value[1]]) < $value[2] ) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï" . $value[2] . "»ú°Ê¾å¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+	}
+	
+	/*¡¡ºÇÂçÊ¸»ú¿ôÀ©¸Â¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó  value[2] = ºÇÂç¿ô
+	function MAX_CHECK( $value ) {		// ÆþÎÏ¤¬ºÇÂç¿ô°Ê¾å¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		// Ê¸»ú¿ô¤Î¼èÆÀ			
+		if($this->arrParam[$value[1]] > $value[2] ) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï" . $value[2] . "°Ê²¼¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+	}
+	
+		
+	/*¡¡¿ô»ú¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó 
+	function NUM_CHECK( $value ) {				// ÆþÎÏÊ¸»ú¤¬¿ô»ú°Ê³°¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if( strlen($this->arrParam[$value[1]]) > 0 && !EregI("^[[:digit:]]+$", $this->arrParam[$value[1]])) { 
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¿ô»ú¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";	
+		}
+	}
+	
+		/*¡¡¾®¿ôÅÀ¤ò´Þ¤à¿ô»ú¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó 
+	function NUM_POINT_CHECK( $value ) {				// ÆþÎÏÊ¸»ú¤¬¿ô»ú°Ê³°¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if( strlen($this->arrParam[$value[1]]) > 0 && !EregI("^[[:digit:]]+[\.]?[[:digit:]]+$", $this->arrParam[$value[1]])) { 
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¿ô»ú¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";	
+		}
+	}
+		
+	function ALPHA_CHECK($value) {
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if( strlen($this->arrParam[$value[1]]) > 0 && !EregI("^[[:alpha:]]+$", $this->arrParam[$value[1]])) { 
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤ÏÈ¾³Ñ±Ñ»ú¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";	
+		}
+	}
+	
+	/* ÅÅÏÃÈÖ¹æ¤ÎÈ½Äê ¡Ê¿ô»ú¥Á¥§¥Ã¥¯¤ÈÊ¸»ú¿ô¥Á¥§¥Ã¥¯¤ò¼Â»Ü¤¹¤ë¡£)
+		value[0] : ¹àÌÜÌ¾
+		value[1] : ÅÅÈÖ1¹àÌÜÌÜ
+		value[2] : ÅÅÈÖ2¹àÌÜÌÜ
+		value[3] : ÅÅÈÖ3¹àÌÜÌÜ
+		value[4] : Ê¸»ú¿ôÀ©¸Â
+	*/
+	function TEL_CHECK($value) {
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		
+		$cnt = 0;
+		
+		for($i = 1; $i <= 3; $i++) {
+			if(strlen($this->arrParam[$value[$i]]) > 0) {
+				$cnt++;
+			}
+		}
+		
+		// ¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬Ëþ¤¿¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤òÈ½Äê(°ìÉô¤À¤±ÆþÎÏ¤µ¤ì¤Æ¤¤¤ë¾õÂÖ)
+		if($cnt > 0 && $cnt < 3) {
+			$this->arrErr[$value[1]] .= "¢¨ " . $value[0] . "¤Ï¤¹¤Ù¤Æ¤Î¹àÌÜ¤òÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+					
+		for($i = 1; $i <= 3; $i++) {
+			if(strlen($this->arrParam[$value[$i]]) > 0 && strlen($this->arrParam[$value[$i]]) > $value[4]) {
+				$this->arrErr[$value[$i]] .= "¢¨ " . $value[0] . $i . "¤Ï" . $value[4] . "»ú°ÊÆâ¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+			} else if (strlen($this->arrParam[$value[$i]]) > 0 && !EregI("^[[:digit:]]+$", $this->arrParam[$value[$i]])) {
+				$this->arrErr[$value[$i]] .= "¢¨ " . $value[0] . $i . "¤Ï¿ô»ú¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+			}
+		}
+	}
+	
+	/* ´ØÏ¢¹àÌÜ¤¬´°Á´¤ËËþ¤¿¤µ¤ì¤Æ¤¤¤ë¤«È½Äê 
+		value[0]		: ¹àÌÜÌ¾
+		value[1]		: È½ÄêÂÐ¾ÝÍ×ÁÇÌ¾
+	*/
+	function FULL_EXIST_CHECK($value) {
+		$max = count($value);
+			
+		// ´û¤Ë³ºÅö¹àÌÜ¤Ë¥¨¥é¡¼¤¬¤¢¤ë¾ì¹ç¤Ï¡¢È½Äê¤·¤Ê¤¤¡£
+		for($i = 1; $i < $max; $i++) {
+			if(isset($this->arrErr[$value[$i]])) {
+				return;
+			}
+		}
+		
+		$blank = false;
+		
+		// ¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬¥Ö¥é¥ó¥¯¤Ç¤Ê¤¤¤«¡¢¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤È¤¹¤ë¡£
+		for($i = 1; $i < $max; $i++) {
+			if(strlen($this->arrParam[$value[$i]]) <= 0) {
+				$blank = true;
+			}
+		}
+		
+		if($blank) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br />";
+		}
+	}
+		
+	/* ´ØÏ¢¹àÌÜ¤¬¤¹¤Ù¤ÆËþ¤¿¤µ¤ì¤Æ¤¤¤ë¤«È½Äê 
+		value[0]		: ¹àÌÜÌ¾
+		value[1]		: È½ÄêÂÐ¾ÝÍ×ÁÇÌ¾
+	*/
+	function ALL_EXIST_CHECK($value) {
+		$max = count($value);
+			
+		// ´û¤Ë³ºÅö¹àÌÜ¤Ë¥¨¥é¡¼¤¬¤¢¤ë¾ì¹ç¤Ï¡¢È½Äê¤·¤Ê¤¤¡£
+		for($i = 1; $i < $max; $i++) {
+			if(isset($this->arrErr[$value[$i]])) {
+				return;
+			}
+		}
+		
+		$blank = false;
+		$input = false;
+		
+		// ¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬¥Ö¥é¥ó¥¯¤Ç¤Ê¤¤¤«¡¢¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤È¤¹¤ë¡£
+		for($i = 1; $i < $max; $i++) {
+			if(strlen($this->arrParam[$value[$i]]) <= 0) {
+				$blank = true;
+			} else {
+				$input = true;
+			}
+		}
+		
+		if($blank && $input) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¤¹¤Ù¤Æ¤Î¹àÌÜ¤òÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+		}
+	}
+	
+		/* ´ØÏ¢¹àÌÜ¤¬¤É¤ì¤«°ì¤ÄËþ¤¿¤µ¤ì¤Æ¤¤¤ë¤«È½Äê 
+		value[0]		: ¹àÌÜÌ¾
+		value[1]		: È½ÄêÂÐ¾ÝÍ×ÁÇÌ¾
+	*/
+	function ONE_EXIST_CHECK($value) {
+		$max = count($value);
+			
+		// ´û¤Ë³ºÅö¹àÌÜ¤Ë¥¨¥é¡¼¤¬¤¢¤ë¾ì¹ç¤Ï¡¢È½Äê¤·¤Ê¤¤¡£
+		for($i = 1; $i < $max; $i++) {
+			if(isset($this->arrErr[$value[$i]])) {
+				return;
+			}
+		}
+		
+		$input = false;
+		
+		// ¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬¥Ö¥é¥ó¥¯¤Ç¤Ê¤¤¤«¡¢¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤È¤¹¤ë¡£
+		for($i = 1; $i < $max; $i++) {
+			if(strlen($this->arrParam[$value[$i]]) > 0) {
+				$input = true;
+			}
+		}
+		
+		if(!$input) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	/* ¾å°Ì¤Î¹àÌÜ¤¬Ëþ¤¿¤µ¤ì¤Æ¤¤¤ë¤«È½Äê
+		value[0]		: ¹àÌÜÌ¾
+		value[1]		: È½ÄêÂÐ¾ÝÍ×ÁÇÌ¾
+	*/
+	function TOP_EXIST_CHECK($value) {
+		$max = count($value);
+			
+		// ´û¤Ë³ºÅö¹àÌÜ¤Ë¥¨¥é¡¼¤¬¤¢¤ë¾ì¹ç¤Ï¡¢È½Äê¤·¤Ê¤¤¡£
+		for($i = 1; $i < $max; $i++) {
+			if(isset($this->arrErr[$value[$i]])) {
+				return;
+			}
+		}
+		
+		$blank = false;
+		$error = false;
+				
+		// ¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬¥Ö¥é¥ó¥¯¤Ç¤Ê¤¤¤«¡¢¤¹¤Ù¤Æ¤Î¹àÌÜ¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤È¤¹¤ë¡£
+		for($i = 1; $i < $max; $i++) {
+			if(strlen($this->arrParam[$value[$i]]) <= 0) {
+				$blank = true;
+			} else {
+				if($blank) {
+					$error = true;
+				}
+			}
+		}
+		
+		if($error) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤ÏÀèÆ¬¤Î¹àÌÜ¤«¤é½çÈÖ¤ËÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+		}
+	}
+	
+	
+	/*¡¡¥«¥¿¥«¥Ê¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó 
+	function KANA_CHECK( $value ) {				// ÆþÎÏÊ¸»ú¤¬¥«¥Ê°Ê³°¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) > 0 && ! mb_ereg("^([¥¡-¥ö]|[¡¼])+$", $this->arrParam[$value[1]])) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¥«¥¿¥«¥Ê¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";	
+		}
+	}
+
+	/*¡¡±Ñ¿ô»ú¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó 
+	function ALNUM_CHECK( $value ) {				// ÆþÎÏÊ¸»ú¤¬±Ñ¿ô»ú°Ê³°¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}										
+		if( strlen($this->arrParam[$value[1]]) > 0 && ! EregI("^[[:alnum:]]+$", $this->arrParam[$value[1]] ) ) { 
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï±Ñ¿ô»ú¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";	
+		}
+	}
+
+	/*¡¡É¬¿ÜÁªÂò¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý
+	function ZERO_CHECK( $value ) {				// ÆþÎÏÃÍ¤Ç0¤¬µö¤µ¤ì¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		
+		if($this->arrParam[$value[1]] == "0" ){						
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï1°Ê¾å¤òÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+	}
+
+	/*¡¡·å¿ô¤ÎÈ½Äê¡¡¡ÊºÇ¾®ºÇÂç¡Ë*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó value[2] = ºÇ¾®·å¿ô value[3] = ºÇÂç·å¿ô
+	function NUM_RANGE_CHECK( $value ) {		// ÆþÎÏÊ¸»ú¤Î·å¿ôÈ½Äê¡¡¢ª¡¡ºÇ¾®·å¿ô¡ãÆþÎÏÊ¸»úÎó¡ãºÇÂç·å¿ô
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}										 
+		// $this->arrParam[$value[0]] = mb_convert_kana($this->arrParam[$value[0]], "n");										
+		$count = strlen($this->arrParam[$value[1]]);
+		if( ( $count > 0 ) && $value[2] > $count || $value[3] < $count ) {  
+			$this->arrErr[$value[1]] =  "¢¨ $value[0]¤Ï$value[2]·å¡Á$value[3]·å¤ÇÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+		}
+	}
+	
+	/*¡¡·å¿ô¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó value[2] = ·å¿ô 
+	function LENGTH_CHECK( $value ) {		// ÆþÎÏÊ¸»ú¤Î·å¿ôÈ½Äê¡¡¢ª¡¡ÆþÎÏÊ¸»úÎó = ·å¿ô¡¡°Ê³°¤ÏNG¤Î¾ì¹ç
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		$count = strlen($this->arrParam[$value[1]]);
+		if(($count > 0) && $count != $value[2] ) {  
+			$this->arrErr[$value[1]] =  "¢¨ $value[0]¤Ï$value[2]·å¤ÇÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+		}
+	}
+	
+	/*¡¡·å¿ô¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó value[2] = ·å¿ô 
+	function NUM_COUNT_CHECK( $value ) {		// ÆþÎÏÊ¸»ú¤Î·å¿ôÈ½Äê¡¡¢ª¡¡ÆþÎÏÊ¸»úÎó = ·å¿ô¡¡°Ê³°¤ÏNG¤Î¾ì¹ç
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		$count = strlen($this->arrParam[$value[1]]);
+		if(($count > 0) && $count != $value[2] ) {  
+			$this->arrErr[$value[1]] =  "¢¨ $value[0]¤Ï$value[2]·å¤ÇÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+		}
+	}				
+	
+	/*¡¡¥á¡¼¥ë¥¢¥É¥ì¥¹·Á¼°¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý¥á¡¼¥ë¥¢¥É¥ì¥¹
+	function EMAIL_CHECK( $value ){				//¡¡¥á¡¼¥ë¥¢¥É¥ì¥¹¤òÀµµ¬É½¸½¤ÇÈ½Äê¤¹¤ë
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) > 0 && !ereg("^[^@]+@[^.]+\..+", $this->arrParam[$value[1]])) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Î·Á¼°¤¬ÉÔÀµ¤Ç¤¹¡£<br />";
+		}
+	}		
+		
+	/*¡¡¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ë»ÈÍÑ¤Ç¤­¤ëÊ¸»ú¤ÎÈ½Äê¡¡*/
+	//  value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý¥á¡¼¥ë¥¢¥É¥ì¥¹
+	function EMAIL_CHAR_CHECK( $value ){				//¡¡¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ë»ÈÍÑ¤¹¤ëÊ¸»ú¤òÀµµ¬É½¸½¤ÇÈ½Äê¤¹¤ë
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) > 0 && !ereg("^[a-zA-Z0-9_\.@\+\?-]+$",$this->arrParam[$value[1]]) ) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ë»ÈÍÑ¤¹¤ëÊ¸»ú¤òÀµ¤·¤¯ÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+	}		
+	
+	/*¡¡URL·Á¼°¤ÎÈ½Äê¡¡*/
+	//  value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝURL
+	function URL_CHECK( $value ){				//¡¡URL¤òÀµµ¬É½¸½¤ÇÈ½Äê¤¹¤ë¡£¥Ç¥Õ¥©¥ë¥È¤Çhttp://¤¬¤¢¤Ã¤Æ¤âOK
+	 	if(isset($this->arrErr[$value[1]])) {
+			return;
+		}										
+        if( strlen($this->arrParam[$value[1]]) > 0 && !ereg( "^https?://+($|[a-zA-Z0-9_~=&\?\.\/-])+$", $this->arrParam[$value[1]] ) ) {
+            $this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤òÀµ¤·¤¯ÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";     
+        }
+    }
+  	    
+	/*¡¡³ÈÄ¥»Ò¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý value[2]=array(³ÈÄ¥»Ò)	
+	function FILE_EXT_CHECK( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]]) || count($this->arrErr[$value[2]]) == 0) {
+			return;
+		}
+		
+		if($_FILES[$value[1]]['name'] != "" ) {										
+			$errFlag = 1;
+			$array_ext = explode(".", $_FILES[$value[1]]['name']);
+			$ext = $array_ext[ count ( $array_ext ) - 1 ];
+			$ext = strtolower($ext);
+			
+			$strExt = "";
+			
+			foreach ( $value[2] as $checkExt ){
+				if ( $ext == $checkExt) {
+					$errFlag = 0;
+				}
+				
+				if($strExt == "") {
+					$strExt.= $checkExt;
+				} else {
+					$strExt.= "¡¦$checkExt";
+				}
+			}
+		}
+		if ($errFlag == 1) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Çµö²Ä¤µ¤ì¤Æ¤¤¤ë·Á¼°¤Ï¡¢" . $strExt . "¤Ç¤¹¡£<br />";
+		}
+	}
+	
+	/* ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¤«¥Á¥§¥Ã¥¯¤¹¤ë */
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý  value[2] = »ØÄê¥Ç¥£¥ì¥¯¥È¥ê
+	function FIND_FILE( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		
+		if($value[2] != "") {
+			$dir = $value[2];
+		} else {
+			$dir = IMAGE_SAVE_DIR;
+		}
+		
+		$path = $dir . "/" . $this->arrParam[$value[1]];
+		$path = ereg_replace("//", "/", $path);
+				
+		if($this->arrParam[$value[1]] != "" && !file_exists($path)){
+			$this->arrErr[$value[1]] = "¢¨ " . $path . "¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	/*¡¡¥Õ¥¡¥¤¥ë¤¬¾å¤²¤é¤ì¤¿¤«³ÎÇ§¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý  value[2] = »ØÄê¥µ¥¤¥º¡ÊKB)
+	function FILE_EXIST_CHECK( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}											
+		if(!($_FILES[$value[1]]['size'] != "" && $_FILES[$value[1]]['size'] > 0)){
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤ò¥¢¥Ã¥×¥í¡¼¥É¤·¤Æ²¼¤µ¤¤¡£<br />";
+		}
+	}
+	
+	/*¡¡¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý  value[2] = »ØÄê¥µ¥¤¥º¡ÊKB)
+	function FILE_SIZE_CHECK( $value ) {			// ¼õ¤±¼è¤ê¤¬¤Ê¤¤¾ì¹ç¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}											
+		if( $_FILES[$value[1]]['size'] > $value[2] *  1024 ){
+			$byte = "KB";
+			if( $value[2] >= 1000 ) {
+				$value[2] = $value[2] / 1000; 
+				$byte = "MB";
+			}
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Î¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤Ï" . $value[2] . $byte . "°Ê²¼¤Î¤â¤Î¤ò»ÈÍÑ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+	}
+
+	/*¡¡¥Õ¥¡¥¤¥ëÌ¾¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó
+	function FILE_NAME_CHECK( $value ) {				// ÆþÎÏÊ¸»ú¤¬±Ñ¿ô»ú,"_","-"°Ê³°¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if( strlen($_FILES[$value[1]]['name']) > 0 && ! EregI("^[[:alnum:]_\.-]+$", $_FILES[$value[1]]['name']) ) { 
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Î¥Õ¥¡¥¤¥ëÌ¾¤ËÆüËÜ¸ì¤ä¥¹¥Ú¡¼¥¹¤Ï»ÈÍÑ¤·¤Ê¤¤¤Ç²¼¤µ¤¤¡£<br />";	
+		}
+	}
+
+	/*¡¡¥Õ¥¡¥¤¥ëÌ¾¤ÎÈ½Äê(¥¢¥Ã¥×¥í¡¼¥É°Ê³°¤Î»þ)¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾ÝÊ¸»úÎó
+	function FILE_NAME_CHECK_BY_NOUPLOAD( $value ) {			// ÆþÎÏÊ¸»ú¤¬±Ñ¿ô»ú,"_","-"°Ê³°¤Ê¤é¥¨¥é¡¼¤òÊÖ¤¹
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+	
+		if( strlen($this->arrParam[$value[1]]) > 0 && ! EregI("^[[:alnum:]_\.-]+$", $this->arrParam[$value[1]]) || EregI("[\\]" ,$this->arrParam[$value[1]])) { 
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Î¥Õ¥¡¥¤¥ëÌ¾¤ËÆüËÜ¸ì¤ä¥¹¥Ú¡¼¥¹¤Ï»ÈÍÑ¤·¤Ê¤¤¤Ç²¼¤µ¤¤¡£<br />";	
+		}
+	}
+		
+	//ÆüÉÕ¥Á¥§¥Ã¥¯
+	// value[0] = ¹àÌÜÌ¾
+	// value[1] = YYYY
+	// value[2] = MM
+	// value[3] = DD
+	function CHECK_DATE($value) {						
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}										
+		// ¾¯¤Ê¤¯¤È¤â¤É¤ì¤«°ì¤Ä¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤ë¡£
+		if($this->arrParam[$value[1]] > 0 || $this->arrParam[$value[2]] > 0 || $this->arrParam[$value[3]] > 0) {
+			// Ç¯·îÆü¤Î¤É¤ì¤«¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+			if(!(strlen($this->arrParam[$value[1]]) > 0 && strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0)) {
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¤¹¤Ù¤Æ¤Î¹àÌÜ¤òÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+			} else if ( ! checkdate($this->arrParam[$value[2]], $this->arrParam[$value[3]], $this->arrParam[$value[1]])) {						
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó¡£<br />";
+			}
+		}
+	}
+	
+	//ÆüÉÕ¥Á¥§¥Ã¥¯
+	// value[0] = ¹àÌÜÌ¾
+	// value[1] = YYYY
+	// value[2] = MM
+	// value[3] = DD
+	// value[4] = HH
+	function CHECK_DATE2($value) {						
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}										
+		// ¾¯¤Ê¤¯¤È¤â¤É¤ì¤«°ì¤Ä¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤ë¡£
+		if($this->arrParam[$value[1]] > 0 || $this->arrParam[$value[2]] > 0 || $this->arrParam[$value[3]] > 0 || $this->arrParam[$value[4]] > 0) {
+			// Ç¯·îÆü»þ¤Î¤É¤ì¤«¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+			if(!(strlen($this->arrParam[$value[1]]) > 0 && strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]]) > 0)) {
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¤¹¤Ù¤Æ¤Î¹àÌÜ¤òÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+			} else if ( ! checkdate($this->arrParam[$value[2]], $this->arrParam[$value[3]], $this->arrParam[$value[1]])) {						
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó¡£<br />";
+			}
+		}
+	}
+
+	//ÆüÉÕ¥Á¥§¥Ã¥¯
+	// value[0] = ¹àÌÜÌ¾
+	// value[1] = YYYY
+	// value[2] = MM
+	function CHECK_DATE3($value) {						
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+									
+		// ¾¯¤Ê¤¯¤È¤â¤É¤ì¤«°ì¤Ä¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤ë¡£
+		if($this->arrParam[$value[1]] > 0 || $this->arrParam[$value[2]] > 0) {
+			// Ç¯·îÆü»þ¤Î¤É¤ì¤«¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+			if(!(strlen($this->arrParam[$value[1]]) > 0 && strlen($this->arrParam[$value[2]]) > 0)) {
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¤¹¤Ù¤Æ¤Î¹àÌÜ¤òÆþÎÏ¤·¤Æ²¼¤µ¤¤¡£<br />";
+			} else if ( ! checkdate($this->arrParam[$value[2]], 1, $this->arrParam[$value[1]])) {
+				$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó¡£<br />";
+			}
+		}
+	}
+	
+	/*-----------------------------------------------------------------*/
+	/*	CHECK_SET_TERM
+	/*	Ç¯·îÆü¤ËÊÌ¤ì¤¿2¤Ä¤Î´ü´Ö¤ÎÂÅÅöÀ­¤ò¥Á¥§¥Ã¥¯¤·¡¢À°¹çÀ­¤È´ü´Ö¤òÊÖ¤¹
+	/*¡¡°ú¿ô (³«»ÏÇ¯,³«»Ï·î,³«»ÏÆü,½ªÎ»Ç¯,½ªÎ»·î,½ªÎ»Æü)
+	/*¡¡ÌáÃÍ array(£±¡¤£²¡¤£³¡Ë
+	/*  		£±¡¥³«»ÏÇ¯·îÆü (YYYYMMDD 000000)
+	/*			£²¡¥½ªÎ»Ç¯·îÆü (YYYYMMDD 235959)
+	/*			£³¡¥¥¨¥é¡¼ ( 0 = OK, 1 = NG )
+	/*-----------------------------------------------------------------*/
+	// value[0] = ¹àÌÜÌ¾1
+	// value[1] = ¹àÌÜÌ¾2
+	// value[2] = start_year
+	// value[3] = start_month
+	// value[4] = start_day
+	// value[5] = end_year
+	// value[6] = end_month
+	// value[7] = end_day
+	function CHECK_SET_TERM ($value) {
+
+		// ´ü´Ö»ØÄê
+		if(isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[5]])) {
+			return;
+		}	
+		$error = 0;
+		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]] = "¢¨ " . $value[0] . "¤òÀµ¤·¤¯»ØÄê¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+		if ( (strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]] ) > 0) && ! checkdate($this->arrParam[$value[6]], $this->arrParam[$value[7]], $this->arrParam[$value[5]]) ) {
+			$this->arrErr[$value[5]] = "¢¨ " . $value[1] . "¤òÀµ¤·¤¯»ØÄê¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+		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 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]] ) > 0) ){
+
+			$date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]) .sprintf("%02d",$this->arrParam[$value[4]]) ."000000";
+			$date2 = $this->arrParam[$value[5]] .sprintf("%02d", $this->arrParam[$value[6]]) .sprintf("%02d",$this->arrParam[$value[7]]) ."235959";
+			
+			if (($this->arrErr[$value[2]] == "" && $this->arrErr[$value[5]] == "") && $date1 > $date2) {
+				$this->arrErr[$value[2]] = "¢¨ " .$value[0]. "¤È" .$value[1]. "¤Î´ü´Ö»ØÄê¤¬ÉÔÀµ¤Ç¤¹¡£<br />";
+			}
+		}
+	}
+	
+	/*-----------------------------------------------------------------*/
+	/*	CHECK_SET_TERM2
+	/*	Ç¯·îÆü»þ¤ËÊÌ¤ì¤¿2¤Ä¤Î´ü´Ö¤ÎÂÅÅöÀ­¤ò¥Á¥§¥Ã¥¯¤·¡¢À°¹çÀ­¤È´ü´Ö¤òÊÖ¤¹
+	/*¡¡°ú¿ô (³«»ÏÇ¯,³«»Ï·î,³«»ÏÆü,³«»Ï»þ´Ö,½ªÎ»Ç¯,½ªÎ»·î,½ªÎ»Æü,½ªÎ»»þ´Ö)
+	/*¡¡ÌáÃÍ array(£±¡¤£²¡¤£³¡Ë
+	/*  		£±¡¥³«»ÏÇ¯·îÆü (YYYYMMDDHH 0000)
+	/*			£²¡¥½ªÎ»Ç¯·îÆü (YYYYMMDDHH 0059)
+	/*			£³¡¥¥¨¥é¡¼ ( 0 = OK, 1 = NG )
+	/*-----------------------------------------------------------------*/
+	// value[0] = ¹àÌÜÌ¾1
+	// value[1] = ¹àÌÜÌ¾2
+	// value[2] = start_year
+	// value[3] = start_month
+	// value[4] = start_day
+	// value[5] = start_hour
+	// value[6] = end_year
+	// value[7] = end_month
+	// value[8] = end_day
+	// value[9] = end_hour
+	function CHECK_SET_TERM2 ($value) {
+
+		// ´ü´Ö»ØÄê
+		if(isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[6]])) {
+			return;
+		}	
+		$error = 0;
+		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]] = "¢¨ " . $value[0] . "¤òÀµ¤·¤¯»ØÄê¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+		if ( (strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]]) > 0 || strlen($this->arrParam[$value[8]] ) > 0 || strlen($this->arrParam[$value[9]] ) > 0) && ! checkdate($this->arrParam[$value[7]], $this->arrParam[$value[8]], $this->arrParam[$value[6]]) ) {
+			$this->arrErr[$value[6]] = "¢¨ " . $value[1] . "¤òÀµ¤·¤¯»ØÄê¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+		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) &&  (strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]]) > 0 || strlen($this->arrParam[$value[8]] ) > 0 || strlen($this->arrParam[$value[9]] ) > 0) ){
+
+			$date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]) .sprintf("%02d",$this->arrParam[$value[4]]) .sprintf("%02d",$this->arrParam[$value[5]])."0000";
+			$date2 = $this->arrParam[$value[6]] .sprintf("%02d", $this->arrParam[$value[7]]) .sprintf("%02d",$this->arrParam[$value[8]]) .sprintf("%02d",$this->arrParam[$value[9]])."0000";
+			
+			if (($this->arrErr[$value[2]] == "" && $this->arrErr[$value[6]] == "") && $date1 > $date2) {
+				$this->arrErr[$value[2]] = "¢¨ " .$value[0]. "¤È" .$value[1]. "¤Î´ü´Ö»ØÄê¤¬ÉÔÀµ¤Ç¤¹¡£<br />";
+			}
+			if($date1 == $date2) {
+				$this->arrErr[$value[2]] = "¢¨ " .$value[0]. "¤È" .$value[1]. "¤Î´ü´Ö»ØÄê¤¬ÉÔÀµ¤Ç¤¹¡£<br />";
+			}
+			
+		}
+	}
+	
+	/*-----------------------------------------------------------------*/
+	/*	CHECK_SET_TERM3
+	/*	Ç¯·î¤ËÊÌ¤ì¤¿2¤Ä¤Î´ü´Ö¤ÎÂÅÅöÀ­¤ò¥Á¥§¥Ã¥¯¤·¡¢À°¹çÀ­¤È´ü´Ö¤òÊÖ¤¹
+	/*¡¡°ú¿ô (³«»ÏÇ¯,³«»Ï·î,½ªÎ»Ç¯,½ªÎ»·î)
+	/*¡¡ÌáÃÍ array(£±¡¤£²¡¤£³¡Ë
+	/*  		£±¡¥³«»ÏÇ¯·îÆü (YYYYMMDD 000000)
+	/*			£²¡¥½ªÎ»Ç¯·îÆü (YYYYMMDD 235959)
+	/*			£³¡¥¥¨¥é¡¼ ( 0 = OK, 1 = NG )
+	/*-----------------------------------------------------------------*/
+	// value[0] = ¹àÌÜÌ¾1
+	// value[1] = ¹àÌÜÌ¾2
+	// value[2] = start_year
+	// value[3] = start_month
+	// value[4] = end_year
+	// value[5] = end_month
+	function CHECK_SET_TERM3 ($value) {
+
+		// ´ü´Ö»ØÄê
+		if(isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[4]])) {
+			return;
+		}	
+		$error = 0;
+		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]] = "¢¨ " . $value[0] . "¤òÀµ¤·¤¯»ØÄê¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+		if ( (strlen($this->arrParam[$value[4]]) > 0 || strlen($this->arrParam[$value[5]]) > 0) && ! checkdate($this->arrParam[$value[5]], 1, $this->arrParam[$value[4]]) ) {
+			$this->arrErr[$value[4]] = "¢¨ " . $value[1] . "¤òÀµ¤·¤¯»ØÄê¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";
+		}
+		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 ))) {
+
+			$date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]);
+			$date2 = $this->arrParam[$value[4]] .sprintf("%02d", $this->arrParam[$value[5]]);
+			
+			if (($this->arrErr[$value[2]] == "" && $this->arrErr[$value[5]] == "") && $date1 > $date2) {
+				$this->arrErr[$value[2]] = "¢¨ " .$value[0]. "¤È" .$value[1]. "¤Î´ü´Ö»ØÄê¤¬ÉÔÀµ¤Ç¤¹¡£<br />";
+			}
+		}
+	}	
+
+	//¥Ç¥£¥ì¥¯¥È¥êÂ¸ºß¥Á¥§¥Ã¥¯
+	function DIR_CHECK ($value) {
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(!is_dir($this->arrParam[$value[1]])) {
+			$this->arrErr[$value[1]] = "¢¨ »ØÄê¤·¤¿" . $value[0] . "¤ÏÂ¸ºß¤·¤Þ¤»¤ó¡£<br />";
+		}
+	}
+	
+	//¥Ç¥£¥ì¥¯¥È¥êÂ¸ºß¥Á¥§¥Ã¥¯
+	function DOMAIN_CHECK ($value) {
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) > 0 && !ereg("^\.[^.]+\..+", $this->arrParam[$value[1]])) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Î·Á¼°¤¬ÉÔÀµ¤Ç¤¹¡£<br />";
+		}
+	}	
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_PageNavi.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_PageNavi.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_PageNavi.php	(revision 1142)
@@ -0,0 +1,123 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ¢¨»ÈÍÑ¾ò·ï¢¨
+	¡¦form¥¿¥°¤Ë°Ê²¼¤òÄÉ²Ã¤¹¤ë¡£
+		<input type="hidden" name="pageno" value="<!--{$tpl_pageno}-->">
+	¡¦¥½¡¼¥¹¤ÎºÇ½é¤Ë°Ê²¼¤òµ­½Ò¤¹¤ë¡£
+		$objPage->tpl_pageno = $_POST['pageno'];
+	¡¦$func_name¤Ë»ØÄê¤¹¤ëJavaScript¤ÎÎã
+		// ¥Ú¡¼¥¸¥Ê¥Ó¤Ç»ÈÍÑ¤¹¤ë
+		function fnNaviPage(pageno) {
+			document.form1['pageno'].value = pageno;
+			document.form1.submit();
+		}		
+*/
+class SC_PageNavi {
+	var $now_page;		// ¸½ºß¤Î¥Ú¡¼¥¸ÈÖ¹æ
+	var $max_page;		// ºÇ½ª¤Î¥Ú¡¼¥¸ÈÖ¹æ
+	var $start_row;		// ³«»Ï¥ì¥³¡¼¥É
+	var $strnavi;		// ¥Ú¡¼¥¸Á÷¤êÊ¸»úÎó
+	var $arrPagenavi = array();	// ¥Ú¡¼¥¸
+
+	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	function SC_PageNavi($now_page, $all_row, $page_row, $func_name, $navi_max = NAVI_PMAX) {
+		$this->arrPagenavi['mode'] = 'search';
+
+		//¸½ºß¥Ú¡¼¥¸($now_page)¤¬Àµ¤·¤¤¿ôÃÍ¤Ç¤Ê¤¤¾ì¹ç
+		if (!eregi("^[[:digit:]]+$", $now_page) || $now_page < 1 || $now_page == "") {
+			$this->now_page = 1;
+		} else {
+			$this->now_page = $now_page;
+		}
+		$this->arrPagenavi['now_page'] = $this->now_page;
+
+		// ºÇ½ª¥Ú¡¼¥¸¤Î·×»»
+		$this->max_page = ceil($all_row/$page_row);
+
+		// ºÇ½ª¥Ú¡¼¥¸¤è¤ê¤â¸½ºß¥Ú¡¼¥¸¤¬Âç¤­¤¤¾ì¹ç¤Ï¡¢ºÇ½é¤ËÌá¤¹¡£
+		if($this->max_page < $this->now_page) {
+			$this->now_page = 1;
+		}
+
+		$this->start_row = ($this->now_page - 1) * $page_row;
+	
+		// ³«»Ï¹Ô¤¬ÉÔÀµ¤Ê¾ì¹ç
+		if (!($this->start_row < $all_row && $this->start_row >= 0)) {
+			$this->start_row = 0;
+		}
+
+		if($all_row > 1) {
+
+			//¡ÖÁ°¤Ø¡×¡Ö¼¡¤Ø¡×¤ÎÀßÄê
+			if ($this->now_page > 1) {
+				$before="<a href=\"". $_SERVER['PHP_SELF']. "\" onclick=\"$func_name('" . (($this->now_page) - 1) . "'); return false;\"><<Á°¤Ø</a> ";
+				$this->arrPagenavi['before'] = ($this->now_page) - 1;
+			}else{
+				$this->arrPagenavi['before'] = $this->now_page;
+			}
+			
+			if ($this->now_page < $this->max_page) {
+				$next="<a href=\"". $_SERVER['PHP_SELF']. "\" onclick=\"$func_name('" . (($this->now_page) + 1) ."'); return false;\">¼¡¤Ø>></a> ";
+				$this->arrPagenavi['next'] = ($this->now_page) + 1;
+			}else{
+				$this->arrPagenavi['next'] = $this->now_page;
+			}
+			
+			// É½¼¨¤¹¤ëºÇÂç¥Ê¥Ó¿ô¤ò·è¤á¤ë¡£
+			if($navi_max == "" || $navi_max > $this->max_page) {
+				// À©¸Â¥Ê¥Ó¿ô¤Î»ØÄê¤¬¤Ê¤¤¡£¥Ú¡¼¥¸ºÇÂç¿ô¤¬À©¸Â¥Ê¥Ó¿ô¤è¤ê¾¯¤Ê¤¤¡£
+				$disp_max = $this->max_page;
+			} else {
+				// ¸½ºß¤Î¥Ú¡¼¥¸¡ÜÀ©¸Â¥Ê¥Ó¿ô¤¬É½¼¨¤µ¤ì¤ë¡£
+				$disp_max = $this->now_page + $navi_max - 1;
+				// ¥Ú¡¼¥¸ºÇÂç¿ô¤òÄ¶¤¨¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¥Ú¡¼¥¸ºÇÂç¿ô¤Ë¹ç¤ï¤»¤ë¡£
+				if($disp_max > $this->max_page) {
+					$disp_max = $this->max_page;
+				}
+			}
+
+			// É½¼¨¤¹¤ëºÇ¾®¥Ê¥Ó¿ô¤ò·è¤á¤ë¡£
+			if($navi_max == "" || $navi_max > $this->now_page) {
+				// À©¸Â¥Ê¥Ó¿ô¤Î»ØÄê¤¬¤Ê¤¤¡£¸½ºß¥Ú¡¼¥¸ÈÖ¹æ¤¬À©¸Â¥Ê¥Ó¿ô¤è¤ê¾¯¤Ê¤¤¡£
+				$disp_min = 1;
+			} else {
+				// ¸½ºß¤Î¥Ú¡¼¥¸-À©¸Â¥Ê¥Ó¿ô¤¬É½¼¨¤µ¤ì¤ë¡£
+				$disp_min = $this->now_page - $navi_max + 1;
+			}
+			
+			$this->arrPagenavi['arrPageno'] = array();
+			for ($i=$disp_min; $i <= $disp_max; $i++) {
+				if($i != $disp_max) {
+					$sep = " | ";
+				} else {
+					$sep = "";
+				}
+				
+				if ($i == $this->now_page) {
+					$page_number .= "<strong>$i</strong> ";
+				} else {
+					$page_number.="<a href=\"". $_SERVER['PHP_SELF']. "\" onclick=\"$func_name('$i'); return false;\">$i</a> ";
+				}
+				
+				$page_number.=$sep;
+				
+				$this->arrPagenavi['arrPageno'][$i] = $i;
+			}
+			
+			if ($before || $next) {
+				$this->strnavi = $before .$page_number .$next;
+			}
+		}else{
+			$this->arrPagenavi['arrPageno'][0] = 1;
+			$this->arrPagenavi['before'] = 1;
+			$this->arrPagenavi['next'] = 1;
+		}
+	}
+}
+
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_CartSession.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_CartSession.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_CartSession.php	(revision 1142)
@@ -0,0 +1,355 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ¥«¡¼¥È¥»¥Ã¥·¥ç¥ó´ÉÍý¥¯¥é¥¹ */
+class SC_CartSession {
+	var $key;
+	var $key_tmp;	// ¥æ¥Ë¡¼¥¯ID¤ò»ØÄê¤¹¤ë¡£
+	
+	/* ¥³¥ó¥¹¥È¥é¥¯¥¿ */
+	function SC_CartSession($key = CART_ONCE) {
+		sfDomainSessionStart();
+		if($key == "") {
+			$key = CART_ONCE;
+		}
+		$this->key = $key;
+	}
+	
+	// ¾¦ÉÊ¹ØÆþ½èÍýÃæ¤Î¥í¥Ã¥¯
+	function saveCurrentCart($key_tmp) {
+		$this->key_tmp = "savecart_" . $key_tmp;
+		// ¤¹¤Ç¤Ë¾ðÊó¤¬¤Ê¤±¤ì¤Ð¸½¾õ¤Î¥«¡¼¥È¾ðÊó¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		if(count($_SESSION[$this->key_tmp]) == 0) {
+			$_SESSION[$this->key_tmp] = $_SESSION[$this->key];
+		}
+		// 1À¤Âå¸Å¤¤¥³¥Ô¡¼¾ðÊó¤Ï¡¢ºï½ü¤·¤Æ¤ª¤¯
+		foreach($_SESSION as $key => $val) {
+			if($key != $this->key_tmp && ereg("^savecart_", $key)) {
+				unset($_SESSION[$key]);
+			}
+		}
+	}
+
+	// ¾¦ÉÊ¹ØÆþÃæ¤ÎÊÑ¹¹¤¬¤¢¤Ã¤¿¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	function getCancelPurchase() {
+		$ret = $_SESSION[$this->key]['cancel_purchase'];
+		$_SESSION[$this->key]['cancel_purchase'] = false;
+		return $ret;
+	}
+	
+	// ¹ØÆþ½èÍýÃæ¤Ë¾¦ÉÊ¤ËÊÑ¹¹¤¬¤Ê¤«¤Ã¤¿¤«¤òÈ½Äê
+	function checkChangeCart() {
+		$change = false;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if ($_SESSION[$this->key][$i]['quantity'] != $_SESSION[$this->key_tmp][$i]['quantity']) {
+				$change = true;
+				break;
+			}
+			if ($_SESSION[$this->key][$i]['id'] != $_SESSION[$this->key_tmp][$i]['id']) {
+				$change = true;
+				break;
+			}
+		}
+		if ($change) {
+			// °ì»þ¥«¡¼¥È¤Î¥¯¥ê¥¢
+			unset($_SESSION[$this->key_tmp]);
+			$_SESSION[$this->key]['cancel_purchase'] = true;
+		} else {
+			$_SESSION[$this->key]['cancel_purchase'] = false;
+		}
+		return $_SESSION[$this->key]['cancel_purchase'];
+	}
+	
+	// ¼¡¤Ë³ä¤êÅö¤Æ¤ë¥«¡¼¥È¤ÎID¤ò¼èÆÀ¤¹¤ë
+	function getNextCartID() {
+		$max = count($_SESSION[$this->key]);
+		for($i = 0; $i < $max; $i++) {
+			$arrRet[] = $_SESSION[$this->key][$i]['cart_no'];
+		}
+		return (max($arrRet) + 1);		
+	}
+			
+	// ¾¦ÉÊ¤´¤È¤Î¹ç·×²Á³Ê
+	function getProductTotal($arrInfo, $id) {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['id'] == $id) {
+				// ÀÇ¹þ¤ß¹ç·×
+				$price = $_SESSION[$this->key][$i]['price'];
+				$quantity = $_SESSION[$this->key][$i]['quantity'];
+				$pre_tax = sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);
+				$total = $pre_tax * $quantity;
+				return $total;
+			}
+		}
+		return 0;
+	}
+	
+	// ÃÍ¤Î¥»¥Ã¥È
+	function setProductValue($id, $key, $val) {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['id'] == $id) {
+				$_SESSION[$this->key][$i][$key] = $val;
+			}
+		}
+	}
+		
+	// ¥«¡¼¥ÈÆâ¾¦ÉÊ¤ÎºÇÂçÍ×ÁÇÈÖ¹æ¤ò¼èÆÀ¤¹¤ë¡£
+	function getMax() {
+		$cnt = 0;
+		$pos = 0;
+		$max = 0;
+		if (count($_SESSION[$this->key]) > 0){
+			foreach($_SESSION[$this->key] as $key => $val) {
+				if (is_numeric($key)) {
+					if($max < $key) {
+						$max = $key;
+					}
+				}
+			}
+		}
+		return ($max);
+	}
+	
+	// ¥«¡¼¥ÈÆâ¾¦ÉÊ¿ô¤Î¹ç·×
+	function getTotalQuantity() {
+		$total = 0;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			$total+= $_SESSION[$this->key][$i]['quantity'];
+		}
+		return $total;
+	}
+	
+
+	// Á´¾¦ÉÊ¤Î¹ç·×²Á³Ê
+	function getAllProductsTotal($arrInfo) {
+		// ÀÇ¹þ¤ß¹ç·×
+		$total = 0;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			$price = $_SESSION[$this->key][$i]['price'];
+			$quantity = $_SESSION[$this->key][$i]['quantity'];
+			$pre_tax = sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);
+			$total+= ($pre_tax * $quantity);
+		}
+		return $total;
+	}
+
+	// Á´¾¦ÉÊ¤Î¹ç·×ÀÇ¶â
+	function getAllProductsTax($arrInfo) {
+		// ÀÇ¹ç·×
+		$total = 0;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			$price = $_SESSION[$this->key][$i]['price'];
+			$quantity = $_SESSION[$this->key][$i]['quantity'];
+			$tax = sfTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);
+			$total+= ($tax * $quantity);
+		}
+		return $total;
+	}
+	
+	// Á´¾¦ÉÊ¤Î¹ç·×¥Ý¥¤¥ó¥È
+	function getAllProductsPoint() {
+		// ¥Ý¥¤¥ó¥È¹ç·×
+		$total = 0;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			$price = $_SESSION[$this->key][$i]['price'];
+			$quantity = $_SESSION[$this->key][$i]['quantity'];
+			$point_rate = $_SESSION[$this->key][$i]['point_rate'];
+			$id = $_SESSION[$this->key][$i]['id'][0];
+			$point = sfPrePoint($price, $point_rate, POINT_RULE, $id);
+			$total+= ($point * $quantity);
+		}
+		return $total;
+	}
+	
+	// ¥«¡¼¥È¤Ø¤Î¾¦ÉÊÄÉ²Ã
+	function addProduct($id, $quantity) {
+		$find = false;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			
+			if($_SESSION[$this->key][$i]['id'] == $id) {
+				$val = $_SESSION[$this->key][$i]['quantity'] + $quantity;
+				if(strlen($val) <= INT_LEN) {
+					$_SESSION[$this->key][$i]['quantity']+= $quantity;
+				}
+				$find = true;
+			}
+		}
+		if(!$find) {
+			$_SESSION[$this->key][$max+1]['id'] = $id;
+			$_SESSION[$this->key][$max+1]['quantity'] = $quantity;
+			$_SESSION[$this->key][$max+1]['cart_no'] = $this->getNextCartID();
+		}
+	}
+	
+	// Á°ÊÇ¤ÎURL¤òµ­Ï¿¤·¤Æ¤ª¤¯
+	function setPrevURL($url) {
+		$_SESSION[$this->key]['prev_url'] = $url;
+	}
+	
+	// Á°ÊÇ¤ÎURL¤ò¼èÆÀ¤¹¤ë
+	function getPrevURL() {
+		return $_SESSION[$this->key]['prev_url'];
+	}
+
+	// ¥­¡¼¤¬°ìÃ×¤·¤¿¾¦ÉÊ¤Îºï½ü
+	function delProductKey($keyname, $val) {
+		$max = count($_SESSION[$this->key]);
+		for($i = 0; $i < $max; $i++) {
+			if($_SESSION[$this->key][$i][$keyname] == $val) {
+				unset($_SESSION[$this->key][$i]);
+			}
+		}
+	}
+	
+	function setValue($key, $val) {
+		$_SESSION[$this->key][$key] = $val;
+	}
+	
+	function getValue($key) {
+		return $_SESSION[$this->key][$key];
+	}
+	
+	function getCartList() {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] != "") {
+				$arrRet[] = $_SESSION[$this->key][$i];
+			}
+		}
+		return $arrRet;
+	}
+	
+	// ¥«¡¼¥ÈÆâ¤Ë¤¢¤ë¾¦ÉÊ£É£Ä¤òÁ´¤Æ¼èÆÀ¤¹¤ë
+	function getAllProductID() {
+		$arrRet = array();
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] != "") {
+				$arrRet[] = $_SESSION[$this->key][$i]['id'][0];
+			}
+		}
+		return $arrRet;
+	}
+	
+	function delAllProducts() {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			unset($_SESSION[$this->key][$i]);
+		}
+	}
+	
+	// ¾¦ÉÊ¤Îºï½ü
+	function delProduct($cart_no) {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] == $cart_no) {
+				unset($_SESSION[$this->key][$i]);
+			}
+		}
+	}
+	
+	// ¸Ä¿ô¤ÎÁý²Ã
+	function upQuantity($cart_no, $upquantity = 1) {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] == $cart_no) {
+				if(strlen($_SESSION[$this->key][$i]['quantity'] + $upquantity) <= INT_LEN) {
+					$_SESSION[$this->key][$i]['quantity'] = $_SESSION[$this->key][$i]['quantity']+$upquantity;
+				}
+			}
+		}
+	}
+	
+	// ¸Ä¿ô¤Î¸º¾¯
+	function downQuantity($cart_no, $downquantity = 1, $delete = false) {
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] == $cart_no) {
+				if($_SESSION[$this->key][$i]['quantity'] > $downquantity) {
+					$_SESSION[$this->key][$i]['quantity'] = $_SESSION[$this->key][$i]['quantity']-$downquantity;
+				}elseif($delete){
+					$this->delProduct($cart_no);
+				}
+			}
+		}
+	}
+
+	// Á´¾¦ÉÊ¤Î¹ç·×Á÷ÎÁ
+	function getAllProductsDelivFee() {
+		// ¥Ý¥¤¥ó¥È¹ç·×
+		$total = 0;
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			$deliv_fee = $_SESSION[$this->key][$i]['deliv_fee'];
+			$quantity = $_SESSION[$this->key][$i]['quantity'];
+			$total+= ($deliv_fee * $quantity);
+		}
+		return $total;
+	}
+	
+	// ¥«¡¼¥È¤ÎÃæ¤ÎÇä¤êÀÚ¤ì¥Á¥§¥Ã¥¯
+	function chkSoldOut($arrCartList){
+		if(count($arrCartList) > 0){
+			foreach($arrCartList as $key => $val){
+				if($val['quantity'] == 0){
+					// Çä¤êÀÚ¤ì¾¦ÉÊ¤ò¥«¡¼¥È¤«¤éºï½ü¤¹¤ë
+					$this->delProduct($val['cart_no']);
+					sfDispSiteError(SOLD_OUT, "", true);
+				}
+			}
+		}
+	}
+	
+	// ¥«¡¼¥È¢ñ¤«¤é¾¦ÉÊID¤òÊÖ¤¹
+	function getProductIDfromCartNo($cart_no){
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] == $cart_no) {
+				return $_SESSION[$this->key][$i]['id'][0];
+			}
+		}
+		
+		return "";
+	}
+	
+	// ¥«¡¼¥È¢ñ¤«¤é¾¦ÉÊ¸Ä¿ô¤òÊÖ¤¹
+	function getQuantityfromCartNo($cart_no){
+		$max = $this->getMax();
+		for($i = 0; $i <= $max; $i++) {
+			if($_SESSION[$this->key][$i]['cart_no'] == $cart_no) {
+				return $_SESSION[$this->key][$i]['quantity'];
+			}
+		}
+		
+		return "";
+	}
+	
+	// ¥æ¥Ë¡¼¥¯ID¤Î¥»¥Ã¥È
+	function setUniqueID(){
+		if(!isset($_SESSION[$this->key]['uniqid']) || $_SESSION[$this->key]['uniqid'] == "") {
+			$_SESSION[$this->key]['uniqid'] = sfGetUniqRandomId();
+		}
+		
+		return $_SESSION[$this->key]['uniqid'];
+	}
+	
+	/* ¥æ¥Ë¡¼¥¯ID¤Î²ò½ü */
+	function unsetUniqueID() {
+		$_SESSION[$this->key]['uniqid']  = "";
+	}
+	
+	
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_CustomerList.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_CustomerList.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_CustomerList.php	(revision 1142)
@@ -0,0 +1,344 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/*  [Ì¾¾Î] SC_CustomerList
+ *  [³µÍ×] ²ñ°÷¸¡º÷ÍÑ¥¯¥é¥¹
+ */
+class SC_CustomerList extends SC_SelectSql {
+
+	var $arrColumnCSV;
+	
+	function SC_CustomerList($array, $mode = '') {
+		parent::SC_SelectSql($array);
+		
+		if($mode == "") {
+			// ²ñ°÷ËÜÅÐÏ¿²ñ°÷¤Çºï½ü¤·¤Æ¤¤¤Ê¤¤²ñ°÷
+			$this->setWhere("status = 2 AND del_flg = 0 ");		
+			// ÅÐÏ¿Æü¤ò¼¨¤¹¥«¥é¥à
+			$regdate_col = 'dtb_customer.update_date';
+		}
+		
+		if($mode == "customer") {
+			// ´ÉÍý¼Ô¥Ú¡¼¥¸¸ÜµÒ¸¡º÷¤Î¾ì¹ç²¾ÅÐÏ¿²ñ°÷¤â¸¡º÷
+			$this->setWhere( "(status = 1 OR status = 2) AND del_flg = 0 ");		
+			// ÅÐÏ¿Æü¤ò¼¨¤¹¥«¥é¥à
+			$regdate_col = 'dtb_customer.update_date';
+		}
+				
+		// ¥á¡¼¥ë¥Þ¥¬¥¸¥ó¤Î¾ì¹ç		
+		if($mode == "magazine") {
+			$this->setWhere("(del_flg = 0 OR del_flg IS NULL)");
+			$this->setWhere("status = 2");
+			
+			/*¡¡²ñ°÷¤Î¤ßÂÐ¾Ý¤È¤¹¤ë¤¿¤áºï½ü
+			if(is_array($this->arrSql['customer'])) {
+				$tmp_where = "";
+				foreach($this->arrSql['customer'] as $val) {
+					if($tmp_where != "") {
+						$tmp_where.= " OR ";
+					}					
+					switch($val) {
+					// ²ñ°÷
+					case '1':
+						$tmp_where.= "status = 2";
+						break;
+					// ¥á¥ë¥Þ¥¬ÅÐÏ¿
+					case '2':
+						$tmp_where.= "customer_id IS NULL";
+						break;
+					// CSVÅÐÏ¿
+					case '3':
+						$tmp_where.= "customer_id IS NULL";
+						break;
+					default:
+						$tmp_where = "";
+						break;
+					}
+				}
+				if($tmp_where != "") {
+					$tmp_where = "(" . $tmp_where . ")";
+				}
+				$this->setWhere($tmp_where);
+			}
+			*/
+			// ÅÐÏ¿Æü¤ò¼¨¤¹¥«¥é¥à
+			$regdate_col = 'dtb_customer_mail.create_date';
+		}
+				
+		// ¸ÜµÒID
+		if ( strlen($this->arrSql['customer_id']) > 0 ) {
+			$this->setWhere( "customer_id =  ?" );
+			$this->arrVal[] = $this->arrSql['customer_id'];
+		}
+		
+		// Ì¾Á°
+		if ( strlen($this->arrSql['name']) > 0 ) {
+			$this->setWhere("(name01 || name02 LIKE ?)" );
+			$searchName = $this->addSearchStr($this->arrSql['name']);
+			$this->arrVal[] = mb_ereg_replace("[ ¡¡]+","",$searchName);
+		}
+
+		//¡¡Ì¾Á°¡Ê¥«¥Ê¡Ë
+		if ( strlen($this->arrSql['kana']) > 0 ) {
+			$this->setWhere("(kana01 || kana02 LIKE ?)");
+			$searchKana = $this->addSearchStr($this->arrSql['kana']);
+			$this->arrVal[] = mb_ereg_replace("[ ¡¡]+","",$searchKana);
+		}
+		
+		//¡¡ÅÔÆ»ÉÜ¸©
+		if ( strlen($this->arrSql['pref']) > 0 ) {
+			$this->setWhere( "pref = ?" );
+			$this->arrVal[] = $this->arrSql['pref'];
+		}
+
+		//¡¡ÅÅÏÃÈÖ¹æ
+		if ( is_numeric( $this->arrSql['tel'] ) ) {
+			$this->setWhere( "(tel01 || tel02 || tel03 LIKE ?)" );
+			$searchTel = $this->addSearchStr($this->arrSql['tel']);
+			$this->arrVal[] = ereg_replace("-", "", $searchTel);
+		}
+		
+		//¡¡À­ÊÌ
+		if ( is_array( $this->arrSql['sex'] ) ){
+			$arrSexVal = $this->setItemTerm( $this->arrSql['sex'] ,"sex" );
+			foreach ($arrSexVal as $data) {
+				$this->arrVal[] = $data;
+			}
+		}
+
+		//¡¡¿¦¶È
+		if ( is_array( $this->arrSql['job'] ) ){
+			if ( in_array("ÉÔÌÀ", $this->arrSql['job'] ) ) {
+				$arrJobVal = $this->setItemTermWithNull( $this->arrSql['job'] ,"job" );
+			} else {
+				$arrJobVal = $this->setItemTerm( $this->arrSql['job'] ,"job" );
+			}
+			if (is_array($arrJobVal)) {
+				foreach ($arrJobVal as $data) {
+					$this->arrVal[] = $data;
+				}
+			}
+		}
+
+		//¡¡E-MAIL
+		if (strlen($this->arrSql['email']) > 0) {
+			//¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÊ£¿ô¤Î¾ò·ï»ØÄê²ÄÇ½¤Ë
+			$this->arrSql['email'] = explode(",", $this->arrSql['email']);
+			$sql_where = "";
+			foreach($this->arrSql['email'] as $val) {
+				$val = trim($val);
+				//¸¡º÷¾ò·ï¤ò´Þ¤Þ¤Ê¤¤
+				if($this->arrSql['not_emailinc'] == '1') {
+					if($sql_where == "") {
+						$sql_where .= "dtb_customer.email NOT ILIKE ? ";
+					} else {
+						$sql_where .= "AND dtb_customer.email NOT ILIKE ? ";
+					}
+				} else {				
+					if($sql_where == "") {
+						$sql_where .= "dtb_customer.email ILIKE ? ";
+					} else {
+						$sql_where .= "OR dtb_customer.email ILIKE ? ";
+					}
+				}
+				$searchEmail = $this->addSearchStr($val);
+				$this->arrVal[] = $searchEmail;
+			}
+			$this->setWhere($sql_where);
+		}
+		//¡¡HTML-mail
+		if ( $mode == 'magazine' ){
+			if ( strlen($this->arrSql['htmlmail']) > 0 ) {
+				$this->setWhere( " mailmaga_flg = ? ");
+				$this->arrVal[] = $this->arrSql['htmlmail'];
+			} else {
+				$this->setWhere( " (mailmaga_flg = 1 or mailmaga_flg = 2) ");
+			}
+		}
+		
+		// ¹ØÆþ¶â³Û»ØÄê
+		if( is_numeric( $this->arrSql["buy_total_from"] ) || is_numeric( $this->arrSql["buy_total_to"] ) ) {
+			$arrBuyTotal = $this->selectRange($this->arrSql["buy_total_from"], $this->arrSql["buy_total_to"], "buy_total");
+			foreach ($arrBuyTotal as $data1) {
+				$this->arrVal[] = $data1;
+			}
+		}
+
+		// ¹ØÆþ²ó¿ô»ØÄê
+		if( is_numeric( $this->arrSql["buy_times_from"] ) || is_numeric( $this->arrSql["buy_times_to"] ) ) {
+			$arrBuyTimes = $this->selectRange($this->arrSql["buy_times_from"], $this->arrSql["buy_times_to"], "buy_times");
+			foreach ($arrBuyTimes as $data2) {
+				$this->arrVal[] = $data2;
+			}
+		}
+		
+		// ÃÂÀ¸Æü´ü´Ö»ØÄê
+		if ( (strlen($this->arrSql['b_start_year']) > 0 && strlen($this->arrSql['b_start_month']) > 0 && strlen($this->arrSql['b_start_day']) > 0) ||
+			  strlen($this->arrSql['b_end_year']) > 0 && strlen($this->arrSql['b_end_month']) > 0 && strlen($this->arrSql['b_end_day']) > 0) {
+
+			$arrBirth = $this->selectTermRange($this->arrSql['b_start_year'], $this->arrSql['b_start_month'], $this->arrSql['b_start_day']
+					  , $this->arrSql['b_end_year'], $this->arrSql['b_end_month'], $this->arrSql['b_end_day'], "birth");
+			if (is_array($arrBirth)) {
+				foreach ($arrBirth as $data3) {
+					$this->arrVal[] = $data3;
+				}
+			}
+		}
+				
+		// ÃÂÀ¸·î¤Î¸¡º÷
+		if (is_numeric($this->arrSql["birth_month"])) {
+			$this->setWhere(" EXTRACT(month from birth) = ?");  
+			$this->arrVal[] = $this->arrSql["birth_month"];
+		}
+			
+		// ÅÐÏ¿´ü´Ö»ØÄê
+		if ( (strlen($this->arrSql['start_year']) > 0 && strlen($this->arrSql['start_month']) > 0 && strlen($this->arrSql['start_day']) > 0 ) || 
+				(strlen($this->arrSql['end_year']) > 0 && strlen($this->arrSql['end_month']) >0 && strlen($this->arrSql['end_day']) > 0) ) {
+
+			$arrRegistTime = $this->selectTermRange($this->arrSql['start_year'], $this->arrSql['start_month'], $this->arrSql['start_day']
+							, $this->arrSql['end_year'], $this->arrSql['end_month'], $this->arrSql['end_day'], $regdate_col);
+			if (is_array($arrRegistTime)) {
+				foreach ($arrRegistTime as $data4) {
+					$this->arrVal[] = $data4;
+				}
+			}
+		}
+			
+		// ºÇ½ª¹ØÆþÆü»ØÄê
+		if ( (strlen($this->arrSql['buy_start_year']) > 0 && strlen($this->arrSql['buy_start_month']) > 0 && strlen($this->arrSql['buy_start_day']) > 0 ) || 
+				(strlen($this->arrSql['buy_end_year']) > 0 && strlen($this->arrSql['buy_end_month']) >0 && strlen($this->arrSql['buy_end_day']) > 0) ) {
+			$arrRegistTime = $this->selectTermRange($this->arrSql['buy_start_year'], $this->arrSql['buy_start_month'], $this->arrSql['buy_start_day']
+							, $this->arrSql['buy_end_year'], $this->arrSql['buy_end_month'], $this->arrSql['buy_end_day'], "last_buy_date");
+			if (is_array($arrRegistTime)) {
+				foreach ($arrRegistTime as $data4) {
+					$this->arrVal[] = $data4;
+				}
+			}
+		}
+		
+		//¹ØÆþ¾¦ÉÊ¥³¡¼¥É
+		if ( strlen($this->arrSql['buy_product_code']) > 0 ) {
+			$this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ))");
+			$search_buyproduct_code = $this->addSearchStr($this->arrSql['buy_product_code']);
+			$this->arrVal[] = $search_buyproduct_code;
+		}
+
+		//¹ØÆþ¾¦ÉÊÌ¾¾Î
+		if ( strlen($this->arrSql['buy_product_name']) > 0 ) {
+			$this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ))");
+			$search_buyproduct_name = $this->addSearchStr($this->arrSql['buy_product_name']);
+			$this->arrVal[] = $search_buyproduct_name;
+		}
+		
+		//¥«¥Æ¥´¥ê¡¼¤òÁªÂò¤·¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¹Ê¹þ¸¡º÷¤ò¹Ô¤¦
+		if ( strlen($this->arrSql['category_id']) != ""){
+			//¥«¥Æ¥´¥ê¡¼¤Ç¹Ê¹þ¸¡º÷¤ò¹Ô¤¦SQLÊ¸À¸À®
+			list($tmp_where, $tmp_arrval) = sfGetCatWhere(sfManualEscape($this->arrSql['category_id']));
+
+			//¥«¥Æ¥´¥ê¡¼¤Ç¹Ê¹þ¤ß¤¬²ÄÇ½¤Î¾ì¹ç
+			if($tmp_where != "") {
+				$this->setWhere( " customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_products WHERE ".$tmp_where." ))) ");
+				$this->arrVal = array_merge((array)$this->arrVal, (array)$tmp_arrval);
+			}
+		}
+		//¡¡·ÈÂÓÅÅÏÃÈÖ¹æ
+		if ( is_numeric( $this->arrSql['cell'] ) ) {
+			$this->setWhere( "(cell01 || cell02 || cell03 LIKE ?)" );
+			$searchTel = $this->addSearchStr($this->arrSql['cell']);
+			$this->arrVal[] = ereg_replace("-", "", $searchTel);
+		}
+
+
+		//¡¡¹ØÆþ¼ïÊÌ
+		if ( is_array( $this->arrSql['purchase_type'] ) ){
+
+			$i = 0;			
+			foreach($this->arrSql['purchase_type'] as $order_type) {
+				
+				if($i > 0) $tmp_where .= " OR ";
+				
+				switch($order_type) {
+					case 1:
+						$tmp_where .= " purchase_type = 1 ";
+						break;
+					case 2:
+						$tmp_where .= " purchase_type = 2 ";
+						break;
+					default:
+						break;
+				}
+				$i++;
+			}
+						
+			$this->setWhere( " ( " . $tmp_where . " ) " );		
+		}
+		$this->setOrder( "customer_id DESC" );
+
+	}
+
+	// ¸¡º÷ÍÑSQL
+	function getList() {
+		$this->select = "SELECT customer_id,name01,name02,kana01,kana02,sex,email,tel01,tel02,tel03,pref,status FROM dtb_customer ";
+		return $this->getSql(0);	
+	}
+
+	function getListMailMagazine() {
+		$this->select = "
+			SELECT 
+				dtb_customer.customer_id,
+				dtb_customer.name01,
+				dtb_customer.name02,
+				dtb_customer.kana01,
+				dtb_customer.kana02,
+				dtb_customer.sex,
+				dtb_customer.email,
+				dtb_customer.tel01,
+				dtb_customer.tel02,
+				dtb_customer.tel03,
+				dtb_customer.pref, 
+				dtb_customer.mailmaga_flg
+			FROM 
+				dtb_customer";
+		return $this->getSql(0);	
+	}
+	
+	function getListMailMagazineCount() {
+		$this->select = "SELECT COUNT(*) FROM dtb_customer_mail LEFT OUTER JOIN dtb_customer USING(email)";
+		return $this->getSql(0);	
+	}
+	//¹ØÆþ¾¦ÉÊ¥³¡¼¥É¸¡º÷ÍÑSQL
+	function getBuyList(){
+		$this->select = "SELECT A.customer_id, A.name01, A.name02, A.kana01, A.kana02, A.sex, A.email, A.tel01, A.tel02, A.tel03, A.pref, A.mail_flag, B.order_email, B.order_id, C.product_code 
+						FROM (dtb_customer LEFT OUTER JOIN dtb_customer_mail USING (email)) AS A LEFT OUTER JOIN dtb_order AS B ON 
+						A.email=B.order_email LEFT OUTER JOIN dtb_order_detail AS C ON B.order_id = C.order_id";
+	}
+
+	//¡¡¸¡º÷Áí¿ô¥«¥¦¥ó¥ÈÍÑSQL
+	function getListCount() {
+		$this->select = "SELECT COUNT(customer_id) FROM dtb_customer ";	
+		return $this->getSql(1);
+	}
+
+	//¡¡CSV¥À¥¦¥ó¥í¡¼¥ÉÍÑSQL
+	function getListCSV($arrColumnCSV) {
+		$this->arrColumnCSV = $arrColumnCSV;
+		$i = 0;
+		foreach ($this->arrColumnCSV as $val) {
+			if ($i != 0) $state .= ", ";
+			$state .= $val["sql"];
+			$i ++;
+		}
+
+		$this->select = "SELECT " .$state. " FROM dtb_customer ";
+		return $this->getSql(2);	
+	}
+	
+	function getWhere() {
+		return array($this->where, $this->arrVal);
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_SelectSql.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_SelectSql.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_SelectSql.php	(revision 1142)
@@ -0,0 +1,231 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ---- SQLÊ¸¤òºî¤ë¥¯¥é¥¹ ---- */
+class SC_SelectSql {
+	
+	var $sql;
+	
+	var $select;	
+	var $where;
+	var $order;
+	var $group;
+	var $limit;
+	var $offset;
+	var $arrSql;
+	var $arrVal;
+
+	//--¡¡¥³¥ó¥¹¥È¥é¥¯¥¿¡£
+	function SC_SelectSql($array = "") {
+		if (is_array($array)) {
+			$this->arrSql = $array;
+		}
+	}
+
+	//-- SQLÊ¬À¸À®
+	function getSql( $mode = "" ){
+		$this->sql = $this->select ." ". $this->where ." ". $this->group ." ";
+						
+		// $mode == 1 ¤Ï limit & offsetÌµ¤·						
+		if ( $mode != 1 ){
+			$this->sql .= $this->order . " " .$this->limit ." ". $this->offset;	
+		} elseif ($mode == 2) {
+			$this->sql .= $this->order;
+		}
+		return $this->sql;	
+	}
+
+		// ¸¡º÷ÍÑ
+	function addSearchStr($val) {
+		$return = sfManualEscape($val);
+		$return = "%" .$return. "%";
+		return $return;
+	}
+	
+	//-- ÈÏ°Ï¸¡º÷¡Ê¡û¡¡¢·¡¡¡û¡¡¤Þ¤Ç¡Ë
+	function selectRange($from, $to, $column) {
+
+		// ¤¢¤ëÃ±°Ì¤Î¤ß¸¡º÷($from = $to)
+		if(  $from == $to ) {
+			$this->setWhere( $column ." = ?" );
+			$return = array($from);
+		//¡¡¢·$to¤Þ¤Ç¸¡º÷
+		} elseif(  strlen($from) == 0 && strlen($to) > 0 ) {
+			$this->setWhere( $column ." <= ? "); 
+			$return = array($to);
+		//¡¡¢·$from°Ê¾å¤ò¸¡º÷
+		} elseif(  strlen($from) > 0 && strlen($to) == 0 ) {
+			$this->setWhere( $column ." >= ? ");
+			$return = array($from);
+		//¡¡$from¢·$to¤Î¸¡º÷
+		} else {
+			$this->setWhere( $column ."	BETWEEN ? AND ?" ); 
+			$return = array($from, $to);
+		}
+		return $return;
+	}
+
+	//--¡¡´ü´Ö¸¡º÷¡Ê¡ûÇ¯¡û·î¡ûÆü¤«¢·¡ûÇ¯¡û·î¡ûÆü¤Þ¤Ç¡Ë
+	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 = $to_year . "/" . $to_month . "/" . $to_day;
+		
+		// ³«»Ï´ü´Ö¤À¤±»ØÄê¤Î¾ì¹ç
+		if( ( $from_year != "" ) && ( $from_month != "" ) && ( $from_day != "" ) &&	( $to_year == "" ) && ( $to_month == "" ) && ( $to_day == "" ) ) {
+			$this->setWhere( $column ." >= '" . $date1 . "'");
+		}
+
+		//¡¡³«»Ï¢·½ªÎ»
+		if( ( $from_year != "" ) && ( $from_month != "" ) && ( $from_day != "" ) && 
+			( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "" ) ) {
+			$this->setWhere( $column ." >= '" . $date1 ."' AND ". $column . " < date('" . $date2 . "')+1" );
+		}
+
+		// ½ªÎ»´ü´Ö¤À¤±»ØÄê¤Î¾ì¹ç
+		if( ( $from_year == "" ) && ( $from_month == "" ) && ( $from_day == "" ) && ( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "" ) ) {
+			$this->setWhere( $column ." < date('" . $date2 . "')+1");
+		}
+		return $return;
+	}	
+
+	// checkbox¤Ê¤É¤ÇÆ±°ì¥«¥é¥àÆâ¤ÇÃ±°ì¡¢¤â¤·¤¯¤ÏÊ£¿ôÁªÂò»è¤¬Í­¤ë¾ì¹ç¡¡Îã: AND ( sex = xxx OR sex = xxx OR sex = xxx  ) AND ... 
+	function setItemTerm( $arr, $ItemStr ) {
+
+		foreach( $arr as $data ) {
+	
+			if( count( $arr ) > 1 ) {
+				if( ! is_null( $data ) ) $item .= $ItemStr . " = ? OR ";	
+			} else {
+				if( ! is_null( $data ) ) $item = $ItemStr . " = ?";	
+			}
+			$return[] = $data;
+		}
+
+		if( count( $arr ) > 1 )  $item = "( " . rtrim( $item, " OR " ) . " )";
+		$this->setWhere( $item );
+		return $return;
+	}
+
+	//¡¡NULLÃÍ¤¬É¬Í×¤Ê¾ì¹ç
+	function setItemTermWithNull( $arr, $ItemStr ) {
+
+		$item = " ${ItemStr} IS NULL ";
+		
+		if ( $arr ){
+			foreach( $arr as $data ) {	
+				if ($data != "ÉÔÌÀ") {
+					$item .= " OR ${ItemStr} = ?";
+					$return[] = $data;
+				}
+			}
+		}
+		
+	 	$item = "( ${item} ) ";
+		$this->setWhere( $item );
+		return $return;
+	}
+	// NULL¤â¤·¤¯¤Ï''¤Ç¸¡º÷¤¹¤ë¾ì¹ç
+	function setItemTermWithNullAndSpace( $arr, $ItemStr ) {
+		$count = count($arr);
+		$item = " ${ItemStr} IS NULL OR ${ItemStr} = '' ";
+		$i = 1;
+		if ( $arr ){
+			foreach( $arr as $data ) {	
+				if ($i == $count) break;
+				$item .= " OR ${ItemStr} = ?";	
+				$return[] = $data;
+				$i ++;
+			}
+		}
+	 	$item = "( ${item} ) ";
+		$this->setWhere( $item );
+		return $return;
+	}
+	
+
+
+	/* Ê£¿ô¤Î¥«¥é¥à¤ÇOR¤ÇÍ¥Àè¸¡º÷¤¹¤ë¾ì¹ç¡¡Îã¡§¡¡AND ( item_flag1 = xxx OR item_flag2 = xxx OR item_flag3 = xxx  ) AND ... 
+
+		ÇÛÎó¤Î¹½Â¤Îã¡¡
+		if ( $_POST['show_site1'] ) $arrShowsite_1 = array( "column" => "show_site1",
+															"value"  => $_POST['show_site1'] );
+
+	*/
+	function setWhereByOR( $arrWhere ){
+
+		$count = count( $arrWhere );
+
+		for( $i = 0; $i < $count; $i++ ) {
+
+			if( isset( $arrWhere[$i]["value"] ) ) $statement .= $arrWhere[$i]["column"] ." = '" . addslashes( $arrWhere[$i]["value"] ) ."' OR "  ;
+		}
+
+		$statement = "( " . rtrim( $statement, " OR " ) . " )";
+
+		if( $this->where ) {
+
+			$this->where .= " AND " . $statement;
+
+		} else {
+
+			$this->where = "WHERE " . $statement;
+		}
+	}
+
+	function setWhere($where){
+		if ($where != "") {		
+			if( $this->where ) {
+	
+				$this->where .= " AND " . $where;
+	
+			} else {
+	
+				$this->where = "WHERE " . $where;
+			}
+		}
+	}
+
+	function setOrder($order){
+		
+			$this->order =  "ORDER BY " . $order;
+		
+	}
+
+	function setGroup( $group ) {
+		
+		$this->group =  "GROUP BY " . $group;
+		
+	}
+
+	
+	function setLimitOffset( $limit, $offset ){
+
+		if ( is_numeric($limit) and is_numeric($offset) ){
+
+			$this->limit = " LIMIT " .$limit;
+			$this->offset = " OFFSET " .$offset;
+		}	
+	}
+	
+	function clearSql(){
+		$this->select = "";
+		$this->where = "";
+		$this->group = "";
+		$this->order = "";
+		$this->limit = "";
+		$this->offset = "";
+	}
+	
+	function setSelect($sql) {
+		$this->select = $sql;
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Customer.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Customer.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Customer.php	(revision 1142)
@@ -0,0 +1,142 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/*  [Ì¾¾Î] SC_Customer
+ *  [³µÍ×] ²ñ°÷´ÉÍý¥¯¥é¥¹
+ */
+class SC_Customer {
+	
+	var $conn;
+	var $email;
+	var $customer_data;		// ²ñ°÷¾ðÊó   
+		
+	function SC_Customer( $conn = '', $email = '', $pass = '' ) {
+		// ¥»¥Ã¥·¥ç¥ó³«»Ï
+		/* startSession¤«¤é°ÜÆ° 2005/11/04 ÃæÀî */
+		sfDomainSessionStart();
+		
+		// DBÀÜÂ³¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®
+		$DB_class_name = "SC_DbConn";
+		if ( is_object($conn)){
+			if ( is_a($conn, $DB_class_name)){
+				// $conn¤¬$DB_class_name¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ç¤¢¤ë
+				$this->conn = $conn;
+			}
+		} else {
+			if (class_exists($DB_class_name)){
+				//$DB_class_name¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òºîÀ®¤¹¤ë
+				$this->conn = new SC_DbConn();			
+			}
+		}
+			
+		if ( is_object($this->conn) ) { 
+			// Àµ¾ï¤ËDB¤ËÀÜÂ³¤Ç¤­¤ë
+			if ( $email ){
+				// email¤«¤é¸ÜµÒ¾ðÊó¤ò¼èÆÀ¤¹¤ë
+				// $this->setCustomerDataFromEmail( $email );
+			}
+		} else {
+			echo "DBÀÜÂ³¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀ¸À®¤Ë¼ºÇÔ¤·¤Æ¤¤¤Þ¤¹";
+			exit;
+		}
+		
+		if ( strlen($email) > 0 && strlen($pass) > 0 ){
+			$this->getCustomerDataFromEmailPass( $email, $pass );
+		}
+	}
+	
+	function getCustomerDataFromEmailPass( $pass, $email ) {
+		// ËÜÅÐÏ¿¤µ¤ì¤¿²ñ°÷¤Î¤ß
+		$sql = "SELECT * FROM dtb_customer WHERE email ILIKE ? AND del_flg = 0 AND status = 2";
+		$result = $this->conn->getAll($sql, array($email));
+		$data = $result[0];
+		
+		// ¥Ñ¥¹¥ï¡¼¥É¤¬¹ç¤Ã¤Æ¤¤¤ì¤Ð¸ÜµÒ¾ðÊó¤òcustomer_data¤Ë¥»¥Ã¥È¤·¤Ætrue¤òÊÖ¤¹
+		if ( sha1($pass . ":" . AUTH_MAGIC) == $data['password'] ){
+			$this->customer_data = $data;
+			$this->startSession();
+			return true;
+		}
+		return false;
+	}
+	
+	// ¥Ñ¥¹¥ï¡¼¥É¤ò³ÎÇ§¤»¤º¤Ë¥í¥°¥¤¥ó
+	function setLogin($email) {
+		// ËÜÅÐÏ¿¤µ¤ì¤¿²ñ°÷¤Î¤ß
+		$sql = "SELECT * FROM dtb_customer WHERE email ILIKE ? AND del_flg = 0 AND status = 2";
+		$result = $this->conn->getAll($sql, array($email));
+		$data = $result[0];
+		$this->customer_data = $data;
+		$this->startSession();
+	}
+	
+	// ¥»¥Ã¥·¥ç¥ó¾ðÊó¤òºÇ¿·¤Î¾ðÊó¤Ë¹¹¿·¤¹¤ë
+	function updateSession() {
+		$sql = "SELECT * FROM dtb_customer WHERE customer_id = ? AND del_flg = 0";
+		$customer_id = $this->getValue('customer_id');
+		$arrRet = $this->conn->getAll($sql, array($customer_id));
+		$this->customer_data = $arrRet[0];
+		$_SESSION['customer'] = $this->customer_data;
+	}
+		
+	// ¥í¥°¥¤¥ó¾ðÊó¤ò¥»¥Ã¥·¥ç¥ó¤ËÅÐÏ¿¤·¡¢¥í¥°¤Ë½ñ¤­¹þ¤à
+	function startSession() {
+		sfDomainSessionStart();
+		$_SESSION['customer'] = $this->customer_data;
+		// ¥»¥Ã¥·¥ç¥ó¾ðÊó¤ÎÊÝÂ¸
+		gfPrintLog("access : user=".$this->customer_data['customer_id'] ."\t"."ip=". $_SERVER['REMOTE_HOST'], CUSTOMER_LOG_PATH );
+	}
+
+	// ¥í¥°¥¢¥¦¥È¡¡$_SESSION['customer']¤ò²òÊü¤·¡¢¥í¥°¤Ë½ñ¤­¹þ¤à
+	function EndSession() {
+		// $_SESSION['customer']¤Î²òÊü
+		unset($_SESSION['customer']);
+		// ¥í¥°¤Ëµ­Ï¿¤¹¤ë
+		gfPrintLog("logout : user=".$this->customer_data['customer_id'] ."\t"."ip=". $_SERVER['REMOTE_HOST'], CUSTOMER_LOG_PATH );
+	}
+	
+	// ¥í¥°¥¤¥ó¤ËÀ®¸ù¤·¤Æ¤¤¤ë¤«È½Äê¤¹¤ë¡£
+	function isLoginSuccess() {
+		// ¥í¥°¥¤¥ó»þ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÈDB¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬°ìÃ×¤·¤Æ¤¤¤ë¾ì¹ç
+		if(sfIsInt($_SESSION['customer']['customer_id'])) {
+			$objQuery = new SC_Query();
+			$email = $objQuery->get("dtb_customer", "email", "customer_id = ?", array($_SESSION['customer']['customer_id']));
+			if($email == $_SESSION['customer']['email']) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	// ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ(Á´¥Ñ¥é¥á¡¼¥¿)
+	function getAllValue() {
+		return $_SESSION['customer'];
+	}
+			
+	// ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	function getValue($keyname) {
+		return $_SESSION['customer'][$keyname];
+	}
+	
+	// ¥Ñ¥é¥á¡¼¥¿¤Î¥»¥Ã¥È
+	function setValue($keyname, $val) {
+		$_SESSION['customer'][$keyname] = $val;
+	}
+	
+	// ÃÂÀ¸Æü·î¤Ç¤¢¤ë¤«¤É¤¦¤«¤ÎÈ½Äê
+	function isBirthMonth() {
+		$arrRet = split("[- :/]", $_SESSION['customer']['birth']);
+		$birth_month = intval($arrRet[1]);
+		$now_month = intval(date("m"));
+		
+		if($birth_month == $now_month) {
+			return true;
+		}
+		return false;
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/GC_Thumb.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/GC_Thumb.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/GC_Thumb.php	(revision 1142)
@@ -0,0 +1,64 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../lib/thumb.php");
+
+/*----------------------------------------------------------------------
+ * [Ì¾¾Î] GC_Thumb
+ * [³µÍ×] ¥¢¥Ã¥×¥í¡¼¥É¥Õ¥¡¥¤¥ë²Ã¹©¥¯¥é¥¹(thumb.php¤È¥»¥Ã¥È¤Ç»ÈÍÑ¤¹¤ë)
+ * [°ú¿ô] -
+ * [ÌáÃÍ] -
+ * [°ÍÂ¸] thumb.php
+ * [Ãí¼á] -
+ *----------------------------------------------------------------------*/
+
+Class GC_Thumb {
+
+	var $tempPath;
+
+	function GC_Thumb($tempFilePath = "") {
+		$this->tempPath	 = $_SERVER['DOCUMENT_ROOT'] . $tempFilePath;
+	}
+
+	//--- °ì»þ¥Õ¥¡¥¤¥ëÀ¸À®(¥µ¥à¥Í¥¤¥ë²èÁüÀ¸À®ÍÑ)
+	function makeImageTempFile($fileName, $phpFileName, $max_width,$max_height) {
+		// °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£
+		$mainname = uniqid("").".";
+		// ³ÈÄ¥»Ò°Ê³°¤òÃÖ¤­´¹¤¨¤ë¡£
+		$newFileName = ereg_replace("^.*\.",$mainname,$fileName);
+		$result  = MakeThumb( $phpFileName, $this->tempPath, $max_width, $max_height, $newFileName );
+		return $newFileName;
+	}
+
+	//--- °ì»þ¥Õ¥¡¥¤¥ëÀ¸À®
+	function makeTempFile($fileName, $phpFileName) {
+		$newFileNname = str_replace("'", "¡Ç", $fileName );
+		$newFileNname = date("siU") . $newFileNname;
+		copy( $phpFileName, $this->tempPath . $newFileNname );
+		return $newFileNname;	
+	}
+
+	//--- ¥Õ¥¡¥¤¥ë¤ò»ØÄêÊÝÂ¸DIR¤Ø°ÜÆ°
+	function fileMove($fileName, $dirName) {
+		if(copy( $this->tempPath . $fileName , $_SERVER['DOCUMENT_ROOT'] . $dirName . $fileName)) {
+			unlink( $this->tempPath . $fileName );
+		}
+	}
+
+	//---- °ì»þDIR¤Î¥Õ¥¡¥¤¥ë¤ò°ì³çºï½ü	
+	function execDeleteTempFile() {
+		chdir( $this->tempPath );
+		$delFile = glob( "*.*" );
+		if( is_array($delFile) ) foreach( $delFile as $val ) @unlink( $val );
+	}
+
+	//---- »ØÄê¥Õ¥¡¥¤¥ë¤òºï½ü	
+	function fileDelete($fileName, $dirName) {
+		unlink( $_SERVER['DOCUMENT_ROOT'] . $dirName . $fileName );
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_DbConn.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_DbConn.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_DbConn.php	(revision 1142)
@@ -0,0 +1,203 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+$current_dir = realpath(dirname(__FILE__));
+require_once($current_dir . "/../module/DB.php");
+
+$objDbConn = "";
+
+class SC_DbConn{
+
+	var $conn;
+	var $result; 
+	var $includePath;
+	var $error_mail_to;
+	var $error_mail_title;
+	var $dsn;
+	var $err_disp = true;
+	
+	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	function SC_DbConn($dsn = "", $err_disp = true, $new = false){
+		global $objDbConn;
+		
+		// Debug¥â¡¼¥É»ØÄê
+		$options['debug'] = PEAR_DB_DEBUG;
+		// ´û¤ËÀÜÂ³¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢¿·µ¬ÀÜÂ³Í×Ë¾¤Î¾ì¹ç¤ÏÀÜÂ³¤¹¤ë¡£
+		if(!isset($objDbConn->connection) || $new) {
+			if($dsn != "") {
+				$objDbConn = DB::connect($dsn, $options);
+				$this->dsn = $dsn;
+			} else {
+				if(defined('DEFAULT_DSN')) {
+					$objDbConn = DB::connect(DEFAULT_DSN, $options);
+					$this->dsn = DEFAULT_DSN;
+				} else {
+					return;
+				}
+			}
+		}
+		$this->conn = $objDbConn;
+		$this->error_mail_to = DB_ERROR_MAIL_TO;
+		$this->error_mail_title = DB_ERROR_MAIL_SUBJECT;
+		$this->err_disp = $err_disp;
+	}
+	
+	// ¥¯¥¨¥ê¤Î¼Â¹Ô
+	function query($n ,$arr = "", $ignore_err = false){
+		if ( $arr ) {
+			$result = $this->conn->query($n, $arr);	
+		} else {
+			$result = $this->conn->query($n);
+		}
+	
+		if ($this->conn->isError($result) && !$ignore_err){
+			$this->send_err_mail ($result, $n);
+		}
+		
+		$this->result = $result;
+		return $this->result;
+	}
+
+	// °ì·ï¤Î¤ß¼èÆÀ
+	function getOne($n, $arr = ""){
+		
+		// mysql¤Î¾ì¹ç¤Ë¤Ï¥Ó¥å¡¼É½¤òÊÑ´¹¤¹¤ë
+		if (DB_TYPE == "mysql") $n = sfChangeMySQL($n);
+		
+		if ( $arr ) {
+			$result = $this->conn->getOne($n, $arr);
+		} else {
+			$result = $this->conn->getOne($n);
+		}		
+		if ($this->conn->isError($result)){
+			$this->send_err_mail ($result ,$n);
+		}
+		$this->result = $result;
+		
+		//sfPrintR($this->conn->last_query);
+		
+		return $this->result;
+	}
+	
+	function getRow($n, $arr = ""){
+
+		// mysql¤Î¾ì¹ç¤Ë¤Ï¥Ó¥å¡¼É½¤òÊÑ´¹¤¹¤ë
+		if (DB_TYPE == "mysql") $n = sfChangeMySQL($n);
+
+		if ( $arr ) {
+			$result = $this->conn->getRow($n, $arr);
+		} else {
+			$result = $this->conn->getRow($n);
+		}		
+		if ($this->conn->isError($result)){
+			$this->send_err_mail ($result ,$n);
+		}
+		$this->result = $result;
+		return $this->result;
+	}
+
+	// SELECTÊ¸¤Î¼Â¹Ô·ë²Ì¤òÁ´¤Æ¼èÆÀ
+	function getAll($n, $arr = ""){
+
+		// mysql¤Î¾ì¹ç¤Ë¤Ï¥Ó¥å¡¼É½¤òÊÑ´¹¤¹¤ë
+		if (DB_TYPE == "mysql") $n = sfChangeMySQL($n);
+		
+		if(PEAR::isError($this->conn)) {
+			sfErrorHeader("DB¤Ø¤ÎÀÜÂ³¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£:" . $this->dsn);
+			return 0;
+		}
+
+		if ( $arr ){
+			$result = $this->conn->getAll($n, $arr, DB_FETCHMODE_ASSOC);
+		} else {
+			$result = $this->conn->getAll($n, DB_FETCHMODE_ASSOC);
+		}
+		
+		if ($this->conn->isError($result)){
+			$this->send_err_mail ($result, $n);
+		}
+		$this->result = $result;
+		
+		//sfPrintR($this->conn->last_query);
+		
+		return $this->result;
+	}	
+	
+	function autoExecute($table_name, $fields_values, $sql_where = null){
+	
+		if ( $sql_where ) {
+			$result = $this->conn->autoExecute( $table_name, $fields_values, DB_AUTOQUERY_UPDATE, $sql_where);
+		} else {
+			$result = $this->conn->autoExecute( $table_name, $fields_values, DB_AUTOQUERY_INSERT);
+		}
+		
+		if ($this->conn->isError($result)){
+			$this->send_err_mail ($result, $n);
+		}
+		$this->result = $result;
+		return $this->result;
+	}
+	
+	
+	function prepare($n){
+		global $sql;
+		$sql = $n;		
+		$result = $this->conn->prepare($n);
+		$this->result = $result;
+		return $this->result;
+	}
+	
+	function execute($n, $obj){
+		global $sql;
+		$sql = $n;
+		$result = $this->conn->execute($n, $obj);
+		$this->result = $result;
+		return $this->result;
+	}	
+	
+	function reset(){
+		$this->conn->disconnect();
+	}
+
+	function send_err_mail( $result, $sql ){
+		
+		if ($this->err_disp) {
+			if ($_SERVER['HTTPS'] == "on") {
+				$url = "https://";
+			} else {
+				$url = "http://";
+			}
+			$url.= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+			
+			$errmsg = $url."\n\n";
+			$errmsg.= "SERVER_ADDR:" . $_SERVER['SERVER_ADDR'] . "\n";
+			$errmsg.= "REMOTE_ADDR:" . $_SERVER['REMOTE_ADDR'] . "\n";
+			$errmsg.= "USER_AGENT:" . $_SERVER['HTTP_USER_AGENT'] . "\n\n";		
+			$errmsg.= $sql . "\n";
+			$errmsg.= $result->message . "\n\n";
+			$errmsg.= $result->userinfo . "\n\n";
+			
+			$arrRbacktrace = array_reverse($result->backtrace);
+						
+			foreach($arrRbacktrace as $backtrace) {
+				if($backtrace['class'] != "") {
+					$func = $backtrace['class'] . "->" . $backtrace['function'];
+				} else {
+					$func = $backtrace['function'];					
+				}
+				
+				$errmsg.= $backtrace['file'] . " " . $backtrace['line'] . ":" . $func . "\n";
+			}			
+						
+			mb_send_mail(DB_ERROR_MAIL_TO, DB_ERROR_MAIL_SUBJECT, $errmsg);
+			
+			exit;
+		}
+	}
+}
+
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Query.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Query.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Query.php	(revision 1142)
@@ -0,0 +1,431 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+class SC_Query {
+	var $option;
+	var $where;
+	var $conn;
+	
+	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	/*
+		$err_disp:¥¨¥é¡¼É½¼¨¤ò¹Ô¤¦¤«
+		$new¡§¿·µ¬¤ËÀÜÂ³¤ò¹Ô¤¦¤«
+	 */
+	function SC_Query($dsn = "", $err_disp = true, $new = false) {
+		$this->conn = new SC_DBconn($dsn, $err_disp, $new);
+		$this->where = "";
+		return $this->conn;
+	}
+	
+	// ¥¨¥é¡¼È½Äê
+	function isError() {
+		if(PEAR::isError($this->conn->conn)) {
+			return true;
+		}
+		return false;
+	}
+	
+	// COUNTÊ¸¤Î¼Â¹Ô
+	function count($table, $where = "", $arrval = array()) {
+		if(strlen($where) <= 0) {
+			$sqlse = "SELECT COUNT(*) FROM $table";
+		} else {
+			$sqlse = "SELECT COUNT(*) FROM $table WHERE $where";
+		}
+		// ¥«¥¦¥ó¥ÈÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->getOne($sqlse, $arrval);
+		return $ret;
+	}
+	
+	function select($col, $table, $where = "", $arrval = array()){
+		$sqlse = $this->getsql($col, $table, $where);
+		$ret = $this->conn->getAll($sqlse, $arrval);
+		return $ret;
+	}
+
+	function getLastQuery($disp = true) {
+		$sql = $this->conn->conn->last_query;
+		if($disp) { 
+			print($sql.";<br />\n");
+		}
+		return $sql;
+	}
+
+	function commit() {
+		$this->conn->query("COMMIT");
+	}
+	
+	function begin() {
+		$this->conn->query("BEGIN");
+	}
+	
+	function rollback() {
+		$this->conn->query("ROLLBACK");
+	}
+	
+	function exec($str, $arrval = array()) {
+		$this->conn->query($str, $arrval);
+	}
+
+	function autoselect($col, $table, $arrwhere = array(), $arrcon = array()) {
+		$strw = "";			
+		$find = false;
+		foreach ($arrwhere as $key => $val) {
+			if(strlen($val) > 0) {
+				if(strlen($strw) <= 0) {
+					$strw .= $key ." LIKE ?";
+				} else if(strlen($arrcon[$key]) > 0) {
+					$strw .= " ". $arrcon[$key]. " " . $key ." LIKE ?";
+				} else {
+					$strw .= " AND " . $key ." LIKE ?";
+				}
+				
+				$arrval[] = $val;
+			}
+		}
+		
+		if(strlen($strw) > 0) {
+			$sqlse = "SELECT $col FROM $table WHERE $strw ".$this->option;
+		} else {
+			$sqlse = "SELECT $col FROM $table ".$this->option;
+		}
+		$ret = $this->conn->getAll($sqlse, $arrval);
+		return $ret;
+	}
+	
+	function getall($sql, $arrval = array()) {
+		$ret = $this->conn->getAll($sql, $arrval);
+		return $ret;
+	}
+
+	function getsql($col, $table, $where) {
+		if($where != "") {
+			// °ú¿ô¤Î$where¤òÍ¥Àè¤·¤Æ¼Â¹Ô¤¹¤ë¡£
+			$sqlse = "SELECT $col FROM $table WHERE $where " . $this->groupby . " " . $this->order . " " . $this->option;
+		} else {
+			if($this->where != "") {
+					$sqlse = "SELECT $col FROM $table WHERE $this->where " . $this->groupby . " " . $this->order . " " . $this->option;
+				} else {
+					$sqlse = "SELECT $col FROM $table " . $this->groupby . " " . $this->order . " " . $this->option;
+			}
+		}
+		return $sqlse;
+	}
+			
+	function setoption($str) {
+		$this->option = $str;
+	}
+	
+	function setlimitoffset($limit, $offset = 0) {
+		if (is_numeric($limit) && is_numeric($offset)){
+			$this->option.= " LIMIT " . $limit;
+			$this->option.= " OFFSET " . $offset;
+		}
+	}
+	
+	function setgroupby($str) {
+		$this->groupby = "GROUP BY " . $str;
+	}
+	
+	function andwhere($str) {
+		if($this->where != "") {
+			$this->where .= " AND " . $str;
+		} else {
+			$this->where = $str;
+		}
+	}
+	
+	function orwhere($str) {
+		if($this->where != "") {
+			$this->where .= " OR " . $str;
+		} else {
+			$this->where = $str;
+		}
+	}
+		
+	function setwhere($str) {
+		$this->where = $str;
+	}
+	
+	function setorder($str) {
+		$this->order = "ORDER BY " . $str;
+	}
+	
+		
+	function setlimit($limit){
+		if ( is_numeric($limit)){
+			$this->option = " LIMIT " .$limit;
+		}	
+	}
+	
+	function setoffset($offset) {
+		if ( is_numeric($offset)){
+			$this->offset = " OFFSET " .$offset;
+		}	
+	}
+	
+	
+	// INSERTÊ¸¤ÎÀ¸À®¡¦¼Â¹Ô
+	// $table	:¥Æ¡¼¥Ö¥ëÌ¾
+	// $sqlval	:ÎóÌ¾ => ÃÍ¤Î³ÊÇ¼¤µ¤ì¤¿¥Ï¥Ã¥·¥åÇÛÎó
+	function insert($table, $sqlval) {
+		$strcol = '';
+		$strval = '';
+		$find = false;
+		
+		if(count($sqlval) <= 0 ) return false;
+		
+		foreach ($sqlval as $key => $val) {
+			$strcol .= $key . ',';
+			if(eregi("^Now\(\)$", $val)) {
+				$strval .= 'Now(),';
+			} else {
+				$strval .= '?,';
+				if($val != ""){
+					$arrval[] = $val;
+				} else {
+					$arrval[] = NULL;
+				}
+			}
+			$find = true;
+		}
+		if(!$find) {
+			return false;
+		}
+		// Ê¸Ëö¤Î","¤òºï½ü
+		$strcol = ereg_replace(",$","",$strcol);
+		// Ê¸Ëö¤Î","¤òºï½ü
+		$strval = ereg_replace(",$","",$strval);
+		$sqlin = "INSERT INTO $table(" . $strcol. ") VALUES (" . $strval . ")";
+		
+		// INSERTÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->query($sqlin, $arrval);
+		
+		return $ret;		
+	}
+	
+		// INSERTÊ¸¤ÎÀ¸À®¡¦¼Â¹Ô
+	// $table	:¥Æ¡¼¥Ö¥ëÌ¾
+	// $sqlval	:ÎóÌ¾ => ÃÍ¤Î³ÊÇ¼¤µ¤ì¤¿¥Ï¥Ã¥·¥åÇÛÎó
+	function fast_insert($table, $sqlval) {
+		$strcol = '';
+		$strval = '';
+		$find = false;
+		
+		foreach ($sqlval as $key => $val) {
+				$strcol .= $key . ',';
+				if($val != ""){
+					$eval = pg_escape_string($val);
+					$strval .= "'$eval',";
+				} else {
+					$strval .= "NULL,";
+				}
+				$find = true;
+		}
+		if(!$find) {
+			return false;
+		}
+		// Ê¸Ëö¤Î","¤òºï½ü
+		$strcol = ereg_replace(",$","",$strcol);
+		// Ê¸Ëö¤Î","¤òºï½ü
+		$strval = ereg_replace(",$","",$strval);
+		$sqlin = "INSERT INTO $table(" . $strcol. ") VALUES (" . $strval . ")";
+		
+		// INSERTÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->query($sqlin);
+		
+		return $ret;		
+	}
+	
+	
+	// UPDATEÊ¸¤ÎÀ¸À®¡¦¼Â¹Ô
+	// $table	:¥Æ¡¼¥Ö¥ëÌ¾
+	// $sqlval	:ÎóÌ¾ => ÃÍ¤Î³ÊÇ¼¤µ¤ì¤¿¥Ï¥Ã¥·¥åÇÛÎó
+	// $where	:WHEREÊ¸»úÎó
+	function update($table, $sqlval, $where = "", $arradd = "", $addcol = "") {
+		$strcol = '';
+		$strval = '';
+		$find = false;
+		foreach ($sqlval as $key => $val) {
+			if(eregi("^Now\(\)$", $val)) {
+				$strcol .= $key . '= Now(),';
+			} else {
+				$strcol .= $key . '= ?,';
+				if($val != ""){
+					$arrval[] = $val;
+				} else {
+					$arrval[] = NULL;
+				}
+			}
+			$find = true;
+		}
+		if(!$find) {
+			return false;
+		}
+		
+		if($addcol != "") {
+			foreach($addcol as $key => $val) {
+				$strcol .= "$key = $val,";
+			}
+		}
+				
+		// Ê¸Ëö¤Î","¤òºï½ü
+		$strcol = ereg_replace(",$","",$strcol);
+		// Ê¸Ëö¤Î","¤òºï½ü
+		$strval = ereg_replace(",$","",$strval);
+		
+		if($where != "") {
+			$sqlup = "UPDATE $table SET $strcol WHERE $where";
+		} else {
+			$sqlup = "UPDATE $table SET $strcol";
+		}
+		
+		if(is_array($arradd)) {
+			// ¥×¥ì¡¼¥¹¥Û¥ë¥À¡¼ÍÑ¤ËÇÛÎó¤òÄÉ²Ã
+			foreach($arradd as $val) {
+				$arrval[] = $val;
+			}
+		}
+		
+		// INSERTÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->query($sqlup, $arrval);
+		return $ret;		
+	}
+
+	// MAXÊ¸¤Î¼Â¹Ô
+	function max($table, $col, $where = "", $arrval = array()) {
+		if(strlen($where) <= 0) {
+			$sqlse = "SELECT MAX($col) FROM $table";
+		} else {
+			$sqlse = "SELECT MAX($col) FROM $table WHERE $where";
+		}
+		// MAXÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->getOne($sqlse, $arrval);
+		return $ret;
+	}
+	
+	// MINÊ¸¤Î¼Â¹Ô
+	function min($table, $col, $where = "", $arrval = array()) {
+		if(strlen($where) <= 0) {
+			$sqlse = "SELECT MIN($col) FROM $table";
+		} else {
+			$sqlse = "SELECT MIN($col) FROM $table WHERE $where";
+		}
+		// MINÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->getOne($sqlse, $arrval);
+		return $ret;
+	}
+	
+	// ÆÃÄê¤Î¥«¥é¥à¤ÎÃÍ¤ò¼èÆÀ
+	function get($table, $col, $where = "", $arrval = array()) {
+		if(strlen($where) <= 0) {
+			$sqlse = "SELECT $col FROM $table";
+		} else {
+			$sqlse = "SELECT $col FROM $table WHERE $where";
+		}
+		// SQLÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->getOne($sqlse, $arrval);
+		return $ret;
+	}
+	
+	function getone($sql, $arrval = array()) {
+		// SQLÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->getOne($sql, $arrval);
+		return $ret;
+		
+	}
+		
+	// °ì¹Ô¤ò¼èÆÀ
+	function getrow($table, $col, $where = "", $arrval = array()) {
+		if(strlen($where) <= 0) {
+			$sqlse = "SELECT $col FROM $table";
+		} else {
+			$sqlse = "SELECT $col FROM $table WHERE $where";
+		}
+		// SQLÊ¸¤Î¼Â¹Ô
+		$ret = $this->conn->getRow($sqlse, $arrval);
+		
+		return $ret;
+	}
+		
+	// ¥ì¥³¡¼¥É¤Îºï½ü
+	function delete($table, $where = "", $arrval = array()) {
+		if(strlen($where) <= 0) {
+			$sqlde = "DELETE FROM $table";
+		} else {
+			$sqlde = "DELETE FROM $table WHERE $where";
+		}
+		$ret = $this->conn->query($sqlde, $arrval);
+		return $ret;
+	}
+	
+	function nextval($table, $colname) {
+		$sql = "";
+		// postgresql¤Èmysql¤È¤Ç½èÍý¤òÊ¬¤±¤ë
+		if (DB_TYPE == "pgsql") {
+			$seqtable = $table . "_" . $colname . "_seq";
+			$sql = "SELECT NEXTVAL('$seqtable')";
+		}else if (DB_TYPE == "mysql") {
+			$sql = "SELECT last_insert_id();";
+		}
+		$ret = $this->conn->getOne($sql);
+		
+		return $ret;
+	}
+	
+	function currval($table, $colname) {
+		$sql = "";
+		if (DB_TYPE == "pgsql") {
+			$seqtable = $table . "_" . $colname . "_seq";
+			$sql = "SELECT CURRVAL('$seqtable')";
+		}else if (DB_TYPE == "mysql") {
+			$sql = "SELECT last_insert_id();";
+		}
+		$ret = $this->conn->getOne($sql);
+		
+		return $ret;
+	}	
+	
+	function setval($table, $colname, $data) {
+		$sql = "";
+		if (DB_TYPE == "pgsql") {
+			$seqtable = $table . "_" . $colname . "_seq";
+			$sql = "SELECT SETVAL('$seqtable', $data)";
+			$ret = $this->conn->getOne($sql);
+		}else if (DB_TYPE == "mysql") {
+			$sql = "ALTER TABLE $table AUTO_INCREMENT=$data";
+			$ret = $this->conn->query($sql);
+		}
+		
+		return $ret;
+	}		
+	
+	function query($n ,$arr = "", $ignore_err = false){
+		$result = $this->conn->query($n, $arr, $ignore_err);
+		return $result;
+	}
+	
+	// auto_increment¤ò¼èÆÀ¤¹¤ë
+	function get_auto_increment($table_name){
+		// ¥í¥Ã¥¯¤¹¤ë
+		$this->BEGIN();
+		
+		// ¼¡¤ÎIncrement¤ò¼èÆÀ
+		$arrRet = $this->getAll("SHOW TABLE STATUS LIKE ?", array($table_name));
+		$auto_inc_no = $arrRet[0]["Auto_increment"];
+		
+		// ÃÍ¤ò¥«¥¦¥ó¥È¥¢¥Ã¥×¤·¤Æ¤ª¤¯
+		$this->conn->query("ALTER TABLE $table_name AUTO_INCREMENT=?" , $auto_inc_no + 1);
+		
+		// ²ò½ü¤¹¤ë
+		$this->COMMIT();
+		
+		return $auto_inc_no;
+	}
+}
+
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_SiteSession.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_SiteSession.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_SiteSession.php	(revision 1142)
@@ -0,0 +1,74 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ¥«¡¼¥È¥»¥Ã¥·¥ç¥ó´ÉÍý¥¯¥é¥¹ */
+class SC_SiteSession {
+	/* ¥³¥ó¥¹¥È¥é¥¯¥¿ */
+	function SC_SiteSession() {
+		sfDomainSessionStart();
+		// Á°¥Ú¡¼¥¸¤Ç¤ÎÅÐÏ¿À®¸ùÈ½Äê¤ò°ú¤­·Ñ¤°
+		$_SESSION['site']['pre_regist_success'] = $_SESSION['site']['regist_success'];
+		$_SESSION['site']['regist_success'] = false;
+		$_SESSION['site']['pre_page'] = $_SESSION['site']['now_page'];
+		$_SESSION['site']['now_page'] = $_SERVER['PHP_SELF'];
+	}
+	
+	/* Á°¥Ú¡¼¥¸¤¬ÀµÅö¤Ç¤¢¤ë¤«¤ÎÈ½Äê */
+	function isPrePage() {
+		if($_SESSION['site']['pre_page'] != "" && $_SESSION['site']['now_page'] != "") {
+			if($_SESSION['site']['pre_regist_success'] || $_SESSION['site']['pre_page'] == $_SESSION['site']['now_page']) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	function setNowPage($path) {
+		$_SESSION['site']['now_page'] = $path;
+	}
+	
+	/* ÃÍ¤Î¼èÆÀ */
+	function getValue($keyname) {
+		return $_SESSION['site'][$keyname];
+	}
+	
+	/* ¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ */
+	function getUniqId() {
+		// ¥æ¥Ë¡¼¥¯ID¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥»¥Ã¥È¤¹¤ë¡£
+		if(!isset($_SESSION['site']['uniqid']) || $_SESSION['site']['uniqid'] == "") {
+			$this->setUniqId();
+		}
+		return $_SESSION['site']['uniqid'];
+	}
+	
+	/* ¥æ¥Ë¡¼¥¯ID¤Î¥»¥Ã¥È */
+	function setUniqId() {
+		// Í½Â¬¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¥é¥ó¥À¥àÊ¸»úÎó¤òÉÕÍ¿¤¹¤ë¡£
+		$_SESSION['site']['uniqid'] = sfGetUniqRandomId();
+	}
+	
+	/* ¥æ¥Ë¡¼¥¯ID¤Î¥Á¥§¥Ã¥¯ */
+	function checkUniqId() {
+		if($_POST['uniqid'] != "") {
+			if($_POST['uniqid'] != $_SESSION['site']['uniqid']) {
+				return false;
+			}
+		}
+		return true;
+	}
+	
+	/* ¥æ¥Ë¡¼¥¯ID¤Î²ò½ü */
+	function unsetUniqId() {
+		$_SESSION['site']['uniqid'] = "";
+	}
+	
+	/* ÅÐÏ¿À®¸ù¤òµ­Ï¿ */
+	function setRegistFlag() {
+		$_SESSION['site']['regist_success'] = true;
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Cookie.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Cookie.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Cookie.php	(revision 1142)
@@ -0,0 +1,29 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/*¡¡Æü»þÉ½¼¨ÍÑ¥¯¥é¥¹ */
+class SC_Cookie {
+	
+	var $expire;
+	
+	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	function SC_Cookie($day = 365) {
+		// Í­¸ú´ü¸Â
+		$this->expire = time() + ($day * 24 * 3600);
+	}
+	
+	// ¥¯¥Ã¥­¡¼½ñ¤­¹þ¤ß
+	function setCookie($key, $val) {
+		setcookie($key, $val, $this->expire, "/", DOMAIN_NAME);
+	}
+	
+	// ¥¯¥Ã¥­¡¼¼èÆÀ
+	function getCookie($key) {
+		return $_COOKIE[$key];
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Pdf.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Pdf.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Pdf.php	(revision 1142)
@@ -0,0 +1,535 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/*----------------------------------------------------------------------
+ * [Ì¾¾Î] GC_Pdf
+ * [³µÍ×] Pdf¥Õ¥¡¥¤¥ë¤òÉ½¼¨¤¹¤ë¡£(PDFLibÉ¬¿Ü)
+ *----------------------------------------------------------------------
+ */
+
+// ¥°¥ê¥Ã¥É¤ÈÊ¸»ú¤Î´Ö³Ö 
+define("GRID_SPACE", 4);
+
+class SC_Pdf {
+	var $arrText;
+	var $arrImage;
+	var $license_key;
+	var $block_option;
+	var $src_code;
+	var $dst_code;
+	var $pdiwarning;
+	var $pdfpath;
+	var $page_close;
+			
+	function SC_Pdf($width = 595, $height = 842, $fontsize = 10) {
+		$this->license_key = "B600602-010400-714251-5851C1";
+		$this->src_code = CHAR_CODE;
+		// UTF-8¤Ç¤Ê¤¤¤È¥Ö¥í¥Ã¥¯Æâ¤Ç²þ¹Ô¤Ç¤­¤Ê¤¤¡£
+		$this->dst_code = "UTF-8";
+		// PDF BLOCK¤Î¥×¥í¥Ñ¥Æ¥£
+		$this->block_option = "encoding=UniJIS-UCS2-H textformat=utf8 fontname=HeiseiMin-W3 textflow=true";
+		// ·Ù¹ðÉ½¼¨
+		$this->pdiwarning = "true";	
+		// ¥Ú¡¼¥¸¥µ¥¤¥ºÀßÄê
+		$this->width = $width;
+		$this->height = $height;
+		// PDF½é´ü²½
+		$this->pdf = PDF_new();
+		PDF_set_parameter($this->pdf, "license", $this->license_key);
+		PDF_set_parameter($this->pdf, "pdiwarning", $this->pdiwarning);
+		// ¥É¥­¥å¥á¥ó¥È³«»Ï
+		PDF_begin_document($this->pdf, NULL, NULL);
+		// ¥Ú¡¼¥¸¤Î¾õÂÖ
+		$this->page_open = false;
+		// ¥Æ¡¼¥Ö¥ë¤Î¿§ÀßÄê
+		$this->setTableColor();
+		// ¥Õ¥©¥ó¥È¥µ¥¤¥º¤ÎÀßÄê
+		$this->fontsize = $fontsize;
+		// ¥°¥ê¥Ã¥ÉÉÁ²è¤ÎÆÃ¼ì»ØÄê
+		$this->arrLines = array();
+		// ¥Æ¡¼¥Ö¥ë¥¿¥¤¥È¥ë¤Î¥¹¥¿¥¤¥ë
+		$this->arrHeaderColSize = array();
+		$this->arrHeaderAlign = array();
+		// ¥Æ¡¼¥Ö¥ëÊäÀµÃÍ
+		$this->table_left = 0;
+		// ¥¿¥¤¥È¥ë¹Ô¤Î½ÐÎÏ
+		$this->title_enable = true;
+		// ¥°¥ê¥Ã¥É¤Î½ÐÎÏ
+		$this->grid_enable = true;
+	}
+	
+	// ¥¿¥¤¥È¥ë¤ò½ÐÎÏ¤¹¤ë¤«ÈÝ¤«
+	function setTitleEnable($flag) {
+		$this->title_enable = $flag;
+	}
+	
+	// ¥°¥ê¥Ã¥É¤ò½ÐÎÏ¤¹¤ë¤«ÈÝ¤«
+	function setGridEnable($flag) {
+		$this->grid_enable = $flag;
+	}
+		
+		
+	// ¥­¡¼¡§¥Ö¥í¥Ã¥¯Ì¾¡¢ÃÍ¡§É½¼¨¥Æ¥­¥¹¥È¤Î¥Ï¥Ã¥·¥åÇÛÎó¤ò¥»¥Ã¥È¤¹¤ë¡£
+	function setTextBlock($list) {
+		unset($this->arrText);
+		$this->arrText[] = $list;
+	}
+	
+	// ¥­¡¼¡§¥Ö¥í¥Ã¥¯Ì¾¡¢ÃÍ¡§¥Õ¥¡¥¤¥ë¥Ñ¥¹¤Î¥Ï¥Ã¥·¥åÇÛÎó¤ò¥»¥Ã¥È¤¹¤ë¡£
+	// ¢¨¥Ñ¥¹¤Ï¥É¥­¥å¥á¥ó¥È¥ë¡¼¥È°Ê²¼
+	function setImageBlock($list) {
+		unset($this->arrImage);
+		$this->arrImage[] = $list;
+	}
+	
+	// É½¼¨ÇØ·Ê¤È¤Ê¤ë¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¥Ñ¥¹
+	// ¢¨¥Ñ¥¹¤Ï¥É¥­¥å¥á¥ó¥È¥ë¡¼¥È°Ê²¼
+	function setTemplate($pdfpath) {
+		if(file_exists($pdfpath)) {
+			$this->pdfpath = $pdfpath;
+		} else {
+			print("»ØÄê¤·¤¿PDF¥Æ¥ó¥×¥ì¡¼¥È¤ÏÂ¸ºß¤·¤Þ¤»¤ó¡§".$pdfpath);
+			exit;
+		}
+	}
+	
+	// ¥Æ¡¼¥Ö¥ë°ÌÃÖÊäÀµÃÍ
+	function setTableLeft($table_left) {
+		$this->table_left = $table_left;
+	}
+	
+	// ¥°¥ê¥Ã¥ÉÉÁ²è¤ÎÆÃ¼ì»ØÄê
+	function setGridLines($list) {
+		$this->arrLines = $list;
+	}
+	
+	// ¥Æ¡¼¥Ö¥ë¥¿¥¤¥È¥ë¤Î¥¹¥¿¥¤¥ëÀßÄê
+	function setTableHeaderStyle($arrColSize, $arrAlign) {
+		$this->arrHeaderColSize = $arrColSize;
+		$this->arrHeaderAlign = $arrAlign;
+	}
+	
+	// ¥Ö¥í¥Ã¥¯¥Ç¡¼¥¿¤Î½ñ¤­¹þ¤ß(close¤¹¤ë¤È¼¡²ó¿·µ¬¥Ú¡¼¥¸)
+	function writeBlock() {
+		// ¥Æ¥ó¥×¥ì¡¼¥È¤ò»ÈÍÑ¤¹¤ë
+		if(!file_exists($this->pdfpath)) {
+			return;
+		}
+		// ´ûÂ¸PDF¤Î¥É¥­¥å¥á¥ó¥È¤ò¼èÆÀ
+		$doc = pdf_open_pdi($this->pdf, $this->pdfpath, NULL, 0 );
+		// ´ûÂ¸PDF¤Î¥É¥­¥å¥á¥ó¥È¤«¤é»ØÄê¥Ú¡¼¥¸¤ò¼èÆÀ
+		$page = pdf_open_pdi_page($this->pdf, $doc, 1, NULL );
+		// ¥Ú¡¼¥¸¤ò³«¤¯
+		$this->openPage();
+		
+		// ´ûÂ¸PDF¤Î¥Ú¡¼¥¸¤ò³ä¤êÅö¤Æ¤ë
+		PDF_fit_pdi_page($this->pdf, $page, 0, 0, "adjustpage");
+		
+		// ¥Æ¥­¥¹¥È¥Ö¥í¥Ã¥¯¤Î½ñ¤­¹þ¤ß
+		$max = count($this->arrText);
+		for($i = 0;$i < $max; $i++) {
+			foreach($this->arrText[$i] as $key => $val) {
+				if($val != "") {
+					// Ê¸»ú¥³¡¼¥É¤ÎÊÑ´¹
+					mb_convert_variables($this->dst_code, $this->src_code, $val);
+					// ½ñ¤­¹þ¤ß
+					$ret = PDF_fill_textblock($this->pdf, $page, $key, $val, $this->block_option);
+				}
+			}
+		}
+		
+		// ¥¤¥á¡¼¥¸¥Ö¥í¥Ã¥¯¤Î½ñ¤­¹þ¤ß
+		$max = count($this->arrImage);
+		for($i = 0;$i < $max; $i++) {
+			foreach($this->arrImage[$i] as $key => $val) {
+				if($val != "") {
+					$img = PDF_load_image($this->pdf, "auto", $val, NULL );
+					$ret = PDF_fill_imageblock($this->pdf, $page, $key, $img, NULL);
+				}
+			}
+		}
+		
+		// ³ä¤êÅö¤Æ¤¿¥Ú¡¼¥¸¤òÊÄ¤¸¤ë
+		PDF_close_pdi_page($this->pdf, $page);
+		// ³ä¤êÅö¤Æ¤¿¥É¥­¥å¥á¥ó¥È¤òÊÄ¤¸¤ë
+		PDF_close_pdi($this->pdf, $doc);
+	}
+	
+	// ¥Ú¡¼¥¸¤òÊÄ¤¸¤ë
+	function closePage() {
+		if($this->page_open) {
+			// ¥Ú¡¼¥¸¤òÊÄ¤¸¤ë
+			PDF_end_page_ext($this->pdf, NULL);
+			$this->page_open = false;
+		}		
+	}
+	
+	// ¥Ú¡¼¥¸¤ò³«¤¯
+	function openPage() {
+		if(!$this->page_open) {
+			// ¿·¤·¤¤¥Ú¡¼¥¸¤ò³«¤¯	
+			PDF_begin_page_ext($this->pdf, $this->width, $this->height, NULL);
+			$this->page_open = true;
+		}
+	}
+	
+	// ¿·¤·¤¤¥Ú¡¼¥¸¤ò³«¤¯
+	function newPage() {
+		PDF_end_page_ext($this->pdf, NULL);
+		PDF_begin_page_ext($this->pdf, $this->width, $this->height, NULL);
+	}
+	
+	// ¥¢¥¯¥Æ¥£¥Ö¤Ê¥Ú¡¼¥¸¤Î¥µ¥¤¥º¤ò¼èÆÀ¤¹¤ë
+	function getSize() {
+		$this->openPage();
+		$x = PDF_get_value($this->pdf, 'pagewidth', 0);
+		$y = PDF_get_value($this->pdf, 'pageheight', 0);
+		return array($x, $y);
+	}
+	
+	// ºÂÉ¸¤òÆþ¤ìÂØ¤¨¤Æ¼èÆÀ¤¹¤ë(º¸²¼(0,0)¤òº¸¾å(0,0)¤ËÊÑ´¹)
+	function posTopDown($x, $y) {
+		$width = 0;
+		$height = 0;
+		list($width, $height) = $this->getSize();
+		// xºÂÉ¸¤Ï¡¢ÊÑ¹¹¤ÎÉ¬Í×¤Ê¤·
+		$pdf_x = $x;
+		$pdf_y = $height - $y;
+		return array($pdf_x, $pdf_y);
+	}
+	
+	// ¥Æ¡¼¥Ö¥ë¥«¥é¡¼¤ÎÀßÄê
+	function setTableColor($frame_color = "000000", $title_color = "F0F0F0", $line_color = "D1DEFE", $last_color = "FDCBFE") {
+		$this->frame_color = $frame_color;
+		$this->title_color = $title_color;
+		$this->line_color = $line_color;
+		$this->last_color = $last_color;
+	}
+	
+	// ¥Æ¡¼¥Ö¥ë¤Î¥°¥ê¥Ã¥É¤òÉ½¼¨¤¹¤ë¡£
+	function writeGrid($x, $y, $arrCol, $line_max, $last_color_flg = true) {
+		// ¥Æ¡¼¥Ö¥ëÉý
+		$max = count($arrCol);
+		$width = 0;
+		for($i = 0; $i < $max; $i++) {
+			$width += $arrCol[$i];
+		}
+		
+		if($this->title_enable) { 
+			// ¥¿¥¤¥È¥ë¥°¥ê¥Ã¥ÉÉÁ²è
+			$this->writeFrameRect($x, $y + GRID_SPACE, $width + GRID_SPACE, $this->fontsize + GRID_SPACE, $this->title_color, $this->frame_color);
+		}
+		
+		// ¥°¥ê¥Ã¥ÉÆÃ¼ì»ØÄê¤¢¤ê
+		if(count($this->arrLines) > 0) {
+			$count = count($this->arrLines);
+			$pos = 0;
+			for($i = 0; $i < $count; $i++) {
+				if(($i % 2) != 0) {
+					// ¹Ô¤Î´Ö³Ö
+					$down = ($pos + 1) * $this->fontsize * 1.5;
+					// ÉÁ²è¤¹¤ë½ÄÉý¤òµá¤á¤ë
+					$height = ($this->fontsize + GRID_SPACE) * $this->arrLines[$i] + ($this->arrLines[$i] - 1);
+					// ¹Ô¥°¥ê¥Ã¥ÉÉÁ²è
+					$this->writeRect($x, $y + GRID_SPACE + $down, $width + GRID_SPACE, $height, $this->line_color);
+				}
+				$pos += $this->arrLines[$i];	
+			}						
+		} else {
+			for($i = 1; $i <= $line_max; $i++) {
+				if(($i % 2) == 0) {
+					// ¹Ô¤Î´Ö³Ö
+					$down = $i * $this->fontsize * 1.5;
+					// ¹Ô¥°¥ê¥Ã¥ÉÉÁ²è
+					$this->writeRect($x, $y + GRID_SPACE + $down, $width + GRID_SPACE, $this->fontsize + GRID_SPACE, $this->line_color);
+				}
+			}
+			// ºÇ½ª¹Ô¤Ë¿§¤ò¤Ä¤±¤ë¾ì¹ç
+			if($last_color_flg) {
+				// ¹Ô¤Î´Ö³Ö
+				$down = $line_max * $this->fontsize * 1.5;
+				// ¹Ô¥°¥ê¥Ã¥ÉÉÁ²è
+				$this->writeRect($x, $y + GRID_SPACE + $down, $width + GRID_SPACE, $this->fontsize + GRID_SPACE, $this->last_color);
+			}
+		}
+	}
+	
+	// ¥°¥ê¥Ã¥ÉÍÑ¤Î¥¢¥ó¥À¡¼¥é¥¤¥ó¤ò°ú¤¯
+	/*
+		$x			:¥Æ¡¼¥Ö¥ë³«»Ï°ÌÃÖX¼´
+		$y			:¥Æ¡¼¥Ö¥ë³«»Ï°ÌÃÖY¼´
+		$arrCol		:¥«¥é¥à¥µ¥¤¥º¤ÎÇÛÎó
+		$line		:¥¢¥ó¥À¡¼¥é¥¤¥ó¤ò°ú¤¯¹Ô
+		$start_col	:¥¢¥ó¥À¡¼¥é¥¤¥ó³«»Ï¥«¥é¥à(0:³«»Ï¥«¥é¥à)
+	 */
+	function writeUnderLine($x, $y, $arrCol, $line, $start_col = 0) {
+		// ¥Æ¡¼¥Ö¥ëÉý
+		$max = count($arrCol);
+		$width = 0;
+		for($i = 0; $i < $max; $i++) {
+			$width += $arrCol[$i];
+		}
+		
+		$start_x = 0;
+		for($i = 0; $i < $start_col; $i++) {
+			$start_x += $arrCol[$i];
+		}
+		
+		// ¥¢¥ó¥À¡¼¥é¥¤¥ó¤ÎYºÂÉ¸¤òµá¤á¤ë
+		$down = ($line + 1) * $this->fontsize * 1.5;
+		// ¹Ô¥°¥ê¥Ã¥ÉÉÁ²è
+		$sx = $x + $start_x + GRID_SPACE + $this->table_left;
+		$sy = $y + GRID_SPACE + $down - 1;
+		$ex = $x + $width + GRID_SPACE;
+		$ey = $sy;
+				
+		$this->writeLine($sx, $sy, $ex, $ey);		
+	}
+	
+	// ¿¿¤óÃæ²£°ÌÃÖ¤òµá¤á¤ë
+	function getXCenter($width) {
+		$page_width = 0;
+		$page_height = 0;
+		list($page_width, $page_height) = $this->getSize();
+		$x = ($page_width - $width) / 2;
+		return $x;
+	}
+	
+	// ¼«Æ°Ãæ±û¤è¤»
+	function writeTableCenter($table, $y, $arrCol, $arrAlign, $line_max = 256, $start_no = 1, $last_color_flg = false) {
+		// ¥Æ¡¼¥Ö¥ë¥µ¥¤¥º¼èÆÀ
+		$width = 0;
+		foreach($arrCol as $val) {
+			$width += $val;
+		}
+		// Ãæ±û¤è¤»°ÌÃÖ¼èÆÀ
+		$x = $this->getXCenter($width) + $this->table_left;
+		list($ret_x, $ret_y) = $this->writeTable($table, $x, $y, $arrCol, $arrAlign, $line_max, $start_no, $last_color_flg);
+		// X¼´¤ÎºÂÉ¸¤òÊÖ¤¹
+		return array($ret_x, $ret_y);
+	}
+	
+	// ¥Ç¡¼¥¿¤Î½ñ¤­¹þ¤ß(close¤¹¤ë¤È¼¡²ó¿·µ¬¥Ú¡¼¥¸)
+	// $start_no:1¹ÔÌÜ(¥¿¥¤¥È¥ë)¤ò0¤È¤¹¤ë¡£
+	// $line_max:¥¿¥¤¥È¥ë¤ò´Þ¤Þ¤Ê¤¤¹Ô¿ô
+	function writeTable($table, $x, $y, $arrCol, $arrAlign, $line_max = 256, $start_no = 1, $last_color_flg = false) {
+		$this->openPage();
+		
+		$table = ereg_replace("\n$", "", $table);
+				
+		$arrRet = split("\n", $table);
+								
+		if($line_max > (count($arrRet) - $start_no)) {
+			$line_max = count($arrRet) - $start_no;
+		}
+		
+		// ¥¿¥¤¥È¥ëÍ­¸ú
+		if($this->grid_enable) {
+			// ¥°¥ê¥Ã¥É¤ÎÉÁ²è
+			$this->writeGrid($x, $y, $arrCol, $line_max, $last_color_flg);
+		}
+		
+		// Unicode¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤È¤·¤ÆUTF-8¤òÀßÄê
+		PDF_set_parameter($this->pdf, "textformat", "utf8");
+		
+		// ¥¿¥¤¥È¥ëÍ­¸ú
+		if($this->title_enable) {
+			if(count($this->arrHeaderColSize) > 0 && count($this->arrHeaderAlign) > 0 ) {
+				list($linecol, $aligncol, $width) = $this->getTableOption($this->arrHeaderColSize, $this->arrHeaderAlign);
+			} else {
+				list($linecol, $aligncol, $width) = $this->getTableOption($arrCol, $arrAlign);
+			}	
+						
+			// ¥¿¥¤¥È¥ë¹Ô¤Î½ñ¤­¹þ¤ß
+			$option = "ruler {" . $linecol . "} ";
+			$option.= "tabalignment {" . $aligncol . "} ";
+			$fontsize =  $this->fontsize;
+			$option.= "hortabmethod ruler leading=150% fontname=HeiseiKakuGo-W5 fontsize=$fontsize encoding=UniJIS-UCS2-H";
+			
+			$this->writeTableData($table, $x, $y, $width, 0, 0, $option);
+		}
+		
+		list($linecol, $aligncol, $width) = $this->getTableOption($arrCol, $arrAlign);
+		
+		// ¥Ç¡¼¥¿¹Ô¤Î½ñ¤­¹þ¤ß
+		$option = "ruler {" . $linecol . "} ";
+		$option.= "tabalignment {" . $aligncol . "} ";
+		$option.= "hortabmethod ruler leading=150% fontname=HeiseiMin-W3 fontsize=$this->fontsize encoding=UniJIS-UCS2-H";
+		
+		if($start_no <= 0) {
+			$start_no = 1;
+			$end_no = $line_max;
+		} else {
+			$end_no = $start_no + $line_max - 1;
+		}
+		
+		$y += $this->fontsize * 1.5;
+		
+		list($ret_x, $ret_y) = $this->writeTableData($table, $x, $y, $width, $start_no, $end_no, $option);
+		
+		return array($ret_x, $ret_y);
+	}
+	
+	function getTableOption($arrCol, $arrAlign) {
+		// ¥«¥é¥à¥µ¥¤¥º
+		$max = count($arrCol);
+		$width = 0;
+		for($i = 0; $i < $max; $i++) {
+			$width += $arrCol[$i];
+			$linecol.= $width . " ";
+		}
+		
+		// ¥«¥é¥à°ÌÃÖ
+		$max = count($arrAlign);
+		for($i = 0; $i < $max; $i++) {
+			$aligncol.= $arrAlign[$i] . " ";
+		}
+		
+		return array($linecol, $aligncol, $width);
+	}
+	
+	// ¥Æ¡¼¥Ö¥ë¥Ç¡¼¥¿¤Î½ñ¤­¹þ¤ß
+	function writeTableData($table, $x, $y, $table_width, $start_no, $end_no, $option) {
+		$arrLine = split("\n", $table);
+		for($i = $start_no; $i <= $end_no; $i++) {
+			$line.=$arrLine[$i] . "\n";
+		}
+				
+		// ¥Æ¡¼¥Ö¥ë°ÌÃÖ¤òµá¤á¤ë
+		list($pdf_x, $pdf_y) = $this->posTopDown($x, $y);
+						
+		// ¥Æ¡¼¥Ö¥ë¹â¤µ¤òµá¤á¤ë
+		$table_height = $this->fontsize * 1.5 * ($end_no - $start_no + 1);
+		// ¥Æ¡¼¥Ö¥ë±¦²¼¤ÎyºÂÉ¸¤òµá¤á¤ë
+		$end_y = $pdf_y - $table_height;
+		if($end_y < 0) {
+			$end_y = 0;
+		}
+		$enc_table = mb_convert_encoding($line, "utf-8", CHAR_CODE);
+				
+		$tf = PDF_create_textflow($this->pdf, $enc_table, $option);
+
+		PDF_fit_textflow($this->pdf, $tf, $pdf_x, $pdf_y, $pdf_x + $table_width, $end_y, NULL);
+		PDF_delete_textflow($this->pdf, $tf);
+		
+		// ¥Æ¡¼¥Ö¥ëº¸²¼ºÂÉ¸¤òÊÖ¤¹
+		return array($x, $y + $table_height);		
+	}
+		
+	// ¿§¤ÎÀßÄê
+	function setColor($rgb) {
+		if($rgb != "") {
+			list($r, $g, $b) = sfGetPdfRgb($rgb);
+			PDF_setcolor($this->pdf, "fillstroke", "rgb", $r, $g, $b, 0);	
+		}
+	}
+	
+	// Ã»·Á¤òÉÁ²è
+	function writeRect($x, $y, $width, $height, $rgb = "") {
+		$this->openPage();
+		list($pdf_x, $pdf_y) = $this->posTopDown($x, $y);
+		$this->setColor($rgb);
+		PDF_rect($this->pdf, $pdf_x,$pdf_y,$width,-$height);
+		PDF_fill($this->pdf);
+	}
+	
+	// ÏÈÉÕ¤ÎÃ»·Á¤òÉÁ²è
+	function writeFrameRect($x, $y, $width, $height, $rgb, $frgb) {
+		$this->openPage();
+		list($pdf_x, $pdf_y) = $this->posTopDown($x, $y);
+		$this->setColor($frgb);
+		PDF_rect($this->pdf, $pdf_x,$pdf_y,$width,-$height);
+		PDF_fill($this->pdf);
+		
+		$this->setColor($rgb);
+		PDF_rect($this->pdf, $pdf_x+1,$pdf_y-1,$width-2,-$height+2);
+		PDF_fill($this->pdf);		
+	}
+	
+	// Ä¾Àþ¤òÉÁ²è
+	function writeLine($sx, $sy, $ex, $ey, $rgb = "000000") {
+		$this->openPage();
+		list($pdf_sx, $pdf_sy) = $this->posTopDown($sx, $sy);
+		list($pdf_ex, $pdf_ey) = $this->posTopDown($ex, $ey);
+		$this->setColor($rgb);
+		PDF_setlinewidth($this->pdf, 1.0);
+		PDF_moveto($this->pdf, $pdf_sx, $pdf_sy);
+		PDF_lineto($this->pdf, $pdf_ex, $pdf_ey);
+		PDF_stroke($this->pdf);
+	}
+		
+	// ¥Õ¥¡¥¤¥ë¤Î¥À¥¦¥ó¥í¡¼¥É
+	function output($filekey = "") {
+		if(isset($this->pdf)) {
+			// ¥Ú¡¼¥¸¤òÊÄ¤¸¤ë
+			$this->closePage();
+			// PDF¤Î½ªÎ»
+			PDF_end_document($this->pdf, NULL);
+			// ½ÐÎÏÍÑ¥Ç¡¼¥¿¤Î¼èÆÀ 
+			$buf = PDF_get_buffer($this->pdf);
+			$filename = $filekey . date("ymdHis").".pdf";
+						
+			header("Content-disposition: attachment; filename=$filename");
+			header("Content-type: application/octet-stream; name=$filename");
+					
+			/*
+			 * session_start()¤ò»öÁ°¤Ë¸Æ¤Ó½Ð¤·¤Æ¤¤¤ë¾ì¹ç¤Ë½ÐÎÏ¤µ¤ì¤ë°Ê²¼¤Î¥Ø¥Ã¥À¤Ï¡¢
+			 * URLÄ¾ÀÜ¸Æ¤Ó½Ð¤·»þ¤Ë¥¨¥é¡¼¤òÈ¯À¸¤µ¤»¤ë¤Î¤Ç¶õ¤Ë¤·¤Æ¤ª¤¯¡£
+			 *
+			 * Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
+			 * Progma: no-cache
+			 *
+			 */
+			header("Cache-Control: ");
+			header("Pragma: ");
+			print $buf;
+			
+			// PDF²òÊü
+			PDF_delete($this->pdf);
+		} else {
+			print("PDF¤¬À¸À®¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£");
+		}
+		exit;		
+	}
+	
+	// ¥Õ¥¡¥¤¥ë¤ÎÉ½¼¨
+	function display() {
+		if(isset($this->pdf)) {
+			// ¥Ú¡¼¥¸¤òÊÄ¤¸¤ë
+			$this->closePage();
+			// PDF¤Î½ªÎ»
+			PDF_end_document($this->pdf, NULL);
+			
+			// ½ÐÎÏÍÑ¥Ç¡¼¥¿¤Î¼èÆÀ 
+			$buf = PDF_get_buffer($this->pdf);
+			$len = strlen($buf);
+			header("Content-type: application/pdf");
+			header("Content-Length: $len");
+			header("Content-Disposition: inline; filename=". date("YmdHis").".pdf");
+								
+			/*
+			 * session_start()¤ò»öÁ°¤Ë¸Æ¤Ó½Ð¤·¤Æ¤¤¤ë¾ì¹ç¤Ë½ÐÎÏ¤µ¤ì¤ë°Ê²¼¤Î¥Ø¥Ã¥À¤Ï¡¢
+			 * URLÄ¾ÀÜ¸Æ¤Ó½Ð¤·»þ¤Ë¥¨¥é¡¼¤òÈ¯À¸¤µ¤»¤ë¤Î¤Ç¶õ¤Ë¤·¤Æ¤ª¤¯¡£
+			 *
+			 * Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
+			 * Progma: no-cache
+			 *
+			 */
+			header("Cache-Control: ");
+			header("Pragma: ");
+			print $buf;
+			
+			// PDF²òÊü
+			PDF_delete($this->pdf);
+		} else {
+			print("PDF¤¬À¸À®¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£");
+		}
+		exit;
+	}
+}
+
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_View.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_View.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_View.php	(revision 1142)
@@ -0,0 +1,179 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+$SC_VIEW_PHP_DIR = realpath(dirname(__FILE__));
+require_once($SC_VIEW_PHP_DIR . "/../module/Smarty/libs/Smarty.class.php");
+require_once($SC_VIEW_PHP_DIR . "/../include/php_ini.inc");
+
+class SC_View {
+	
+    var $_smarty;
+	var $objSiteInfo; // ¥µ¥¤¥È¾ðÊó
+	
+    // ¥³¥ó¥¹¥È¥é¥¯¥¿
+    function SC_View($siteinfo = true) {
+		global $SC_VIEW_PHP_DIR;
+
+    	$this->_smarty = new Smarty;
+		$this->_smarty->left_delimiter = '<!--{';
+		$this->_smarty->right_delimiter = '}-->';
+		$this->_smarty->register_modifier("sfDispDBDate","sfDispDBDate");
+		$this->_smarty->register_modifier("sfMBDispDBDate","sfMBDispDBDate");
+		$this->_smarty->register_modifier("sfConvSendDateToDisp","sfConvSendDateToDisp");
+		$this->_smarty->register_modifier("sfConvSendWdayToDisp","sfConvSendWdayToDisp");
+		$this->_smarty->register_modifier("sfGetVal", "sfGetVal");
+		$this->_smarty->register_function("sfSetErrorStyle","sfSetErrorStyle");
+		$this->_smarty->register_function("sfGetErrorColor","sfGetErrorColor");
+		$this->_smarty->register_function("sfTrim", "sfTrim");
+		$this->_smarty->register_function("sfPreTax", "sfPreTax");
+		$this->_smarty->register_function("sfPrePoint", "sfPrePoint");
+		$this->_smarty->register_function("sfGetChecked", "sfGetChecked");
+		$this->_smarty->register_function("sfGetCheckedArray", "sfGetCheckedArray");
+		$this->_smarty->register_function("sfTrimURL", "sfTrimURL");
+		$this->_smarty->register_function("sfMultiply", "sfMultiply");
+		$this->_smarty->register_function("sfPutBR", "sfPutBR");
+		$this->_smarty->register_function("sfRmDupSlash", "sfRmDupSlash");
+		$this->_smarty->register_function("sfCutString", "sfCutString");
+		$this->_smarty->plugins_dir=array("plugins", $SC_VIEW_PHP_DIR . "/../smarty_extends");
+		$this->_smarty->register_function("sf_mb_convert_encoding","sf_mb_convert_encoding");
+		$this->_smarty->register_function("sf_mktime","sf_mktime");
+		$this->_smarty->register_function("sf_date","sf_date");
+		$this->_smarty->register_function("str_replace","str_replace");
+		$this->_smarty->register_function("sfPrintEbisTag","sfPrintEbisTag");
+		$this->_smarty->register_function("sfPrintAffTag","sfPrintAffTag");
+		$this->_smarty->register_function("sfPresentDisp","sfPresentDisp");
+		$this->_smarty->register_function("sfPrintRegular","sfPrintRegular");
+		
+		if(ADMIN_MODE == '1') {		
+			$this->time_start = time();
+		}
+
+		// ¥µ¥¤¥È¾ðÊó¤ò¼èÆÀ¤¹¤ë
+		if($siteinfo) {
+			if(!defined('LOAD_SITEINFO')) {
+				$this->objSiteInfo = new SC_SiteInfo();
+				$arrInfo['arrSiteInfo'] = $this->objSiteInfo->data;
+				
+				// ÅÔÆ»ÉÜ¸©Ì¾¤òÊÑ´¹
+				global $arrPref;
+				$arrInfo['arrSiteInfo']['pref'] = $arrPref[$arrInfo['arrSiteInfo']['pref']];
+				
+	 			// ¥µ¥¤¥È¾ðÊó¤ò³ä¤êÅö¤Æ¤ë
+				foreach ($arrInfo as $key => $value){
+					$this->_smarty->assign($key, $value);
+				}
+				
+				define('LOAD_SITEINFO', 1);
+			}
+		}
+	}
+    
+    // ¥Æ¥ó¥×¥ì¡¼¥È¤ËÃÍ¤ò³ä¤êÅö¤Æ¤ë
+    function assign($val1, $val2) {
+        $this->_smarty->assign($val1, $val2);
+    }
+    
+    // ¥Æ¥ó¥×¥ì¡¼¥È¤Î½èÍý·ë²Ì¤ò¼èÆÀ
+    function fetch($template) {
+        return $this->_smarty->fetch($template);
+    }
+    
+    // ¥Æ¥ó¥×¥ì¡¼¥È¤Î½èÍý·ë²Ì¤òÉ½¼¨
+    function display($template, $no_error = false) {
+		if(!$no_error) {
+			global $GLOBAL_ERR;
+			if(!defined('OUTPUT_ERR')) {
+				print($GLOBAL_ERR);
+				define('OUTPUT_ERR','ON');
+			}
+		}
+		
+		$this->_smarty->display($template);
+		if(ADMIN_MODE == '1') {
+			$time_end = time();
+			$time = $time_end - $this->time_start;
+			print("½èÍý»þ´Ö:" . $time . "ÉÃ");
+		}
+		
+		print($_SERVER['SERVER_ADDR']);
+	}
+  	
+  	// ¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤ÎÊÑ¿ô¤ò¤¹¤Ù¤Æ³ä¤êÅö¤Æ¤ë¡£
+  	function assignobj($obj) {
+		$data = get_object_vars($obj);
+		
+		foreach ($data as $key => $value){
+			$this->_smarty->assign($key, $value);
+		}
+  	}
+  	
+  	// Ï¢ÁÛÇÛÎóÆâ¤ÎÊÑ¿ô¤ò¤¹¤Ù¤Æ³ä¤êÅö¤Æ¤ë¡£
+  	function assignarray($array) {
+  		foreach ($array as $key => $val) {
+  			$this->_smarty->assign($key, $val);
+  		}
+  	}
+
+	/* ¥µ¥¤¥È½é´üÀßÄê */
+	function initpath() {
+		global $SC_VIEW_PHP_DIR;
+		
+		$array['tpl_mainnavi'] = $SC_VIEW_PHP_DIR . '/../Smarty/templates/frontparts/mainnavi.tpl';
+		$array['tpl_root_id'] = sfGetRootId();
+		$this->assignarray($array);
+	}
+}
+
+class SC_AdminView extends SC_View{
+    function SC_AdminView() {
+    	parent::SC_View(false);
+		$this->_smarty->template_dir = TEMPLATE_ADMIN_DIR;
+		$this->_smarty->compile_dir = COMPILE_ADMIN_DIR;
+		$this->initpath();
+	}
+
+	function printr($data){
+		print_r($data);
+	}
+}
+
+class SC_SiteView extends SC_View{
+    function SC_SiteView($cart = true) {
+    	parent::SC_View();
+		$this->_smarty->template_dir = TEMPLATE_DIR;
+		$this->_smarty->compile_dir = COMPILE_DIR;
+		$this->initpath();
+		
+		// PHP5¤Ç¤Ïsession¤ò¥¹¥¿¡¼¥È¤¹¤ëÁ°¤Ë¥Ø¥Ã¥À¡¼¾ðÊó¤òÁ÷¿®¤·¤Æ¤¤¤ë¤È·Ù¹ð¤¬½Ð¤ë¤¿¤á¡¢Àè¤Ë¥»¥Ã¥·¥ç¥ó¤ò¥¹¥¿¡¼¥È¤¹¤ë¤è¤¦¤ËÊÑ¹¹
+		sfDomainSessionStart();
+		
+		if($cart){
+			$include_dir = realpath(dirname( __FILE__));
+			require_once($include_dir . "/SC_CartSession.php");
+			$objCartSess = new SC_CartSession();
+			$objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
+		}
+	}
+}
+
+class SC_UserView extends SC_SiteView{
+    function SC_UserView($template_dir, $compile_dir = COMPILE_DIR) {
+    	parent::SC_SiteView();
+		$this->_smarty->template_dir = $template_dir;
+		$this->_smarty->compile_dir = $compile_dir;
+	}
+}
+
+class SC_InstallView extends SC_View{
+    function SC_InstallView($template_dir, $compile_dir = COMPILE_DIR) {
+    	parent::SC_View(false);
+		$this->_smarty->template_dir = $template_dir;
+		$this->_smarty->compile_dir = $compile_dir;
+	}
+}
+
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Page.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Page.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Page.php	(revision 1142)
@@ -0,0 +1,14 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+class SC_Page {
+	var $tpl_main_page;
+	function SC_Page() {
+		$this->tpl_main_page = '';
+	}
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_Date.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_Date.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_Date.php	(revision 1142)
@@ -0,0 +1,132 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/*¡¡Æü»þÉ½¼¨ÍÑ¥¯¥é¥¹ */
+class SC_Date {
+	var $start_year;
+	var $month;
+	var $day;
+	var $end_year;
+	
+	// ¥³¥ó¥¹¥È¥é¥¯¥¿
+	function SC_Date($start_year='', $end_year='') {
+		if ( $start_year ) 	$this->setStartYear($start_year);	
+		if ( $end_year )	$this->setEndYear($end_year);
+	}
+	
+	function setStartYear($year){
+		$this->start_year = $year;
+	}
+
+	function setEndYear($endYear) {
+		$this->end_year = $endYear;	
+	}
+	
+	function setMonth($month){
+		$this->month = $month;			
+	}
+	
+	function setDay ($day){
+		$this->day = $day;
+	}
+			
+	function getYear($year = '', $default = ''){
+		if ( $year ) $this->setStartYear($year);
+		
+		$year = $this->start_year;
+		if ( ! $year ) $year = DATE("Y");
+		
+		$end_year = $this->end_year;
+		if ( ! $end_year ) $end_year = (DATE("Y") + 3);
+		
+		$year_array = array();
+		
+		for ($i=$year; $i<=($end_year); $i++){		
+			$year_array[$year] = $i;
+			if($year == $default) {
+				$year_array['----'] = "----";
+			}
+			$year++;
+		}
+		return $year_array;
+	}
+	
+	function getZeroYear($year = ''){
+		if ( $year ) $this->setStartYear($year);
+		
+		$year = $this->start_year;
+		if ( ! $year ) $year = DATE("Y");
+		
+		$end_year = $this->end_year;
+		if ( ! $end_year ) $end_year = (DATE("Y") + 3);
+		
+		$year_array = array();
+		
+		for ($i=$year; $i<=($end_year); $i++){
+			$key = substr($i, -2);
+			$year_array[$key] = $key;
+		}
+		return $year_array;
+	}
+	
+	function getZeroMonth(){
+	
+		$month_array = array();
+		for ($i=1; $i <= 12; $i++){
+			$val = sprintf("%02d", $i);
+			$month_array[$val] = $val;
+		}
+		return $month_array;
+	}	
+	
+	
+	function getMonth(){
+	
+		$month_array = array();
+		for ($i=0; $i < 12; $i++){		
+			$month_array[$i + 1 ] = $i + 1;
+		}
+		return $month_array;
+	}	
+	
+	function getDay(){	
+		
+		$day_array = array();
+		for ($i=0; $i < 31; $i++){		
+			$day_array[ $i + 1 ] = $i + 1;
+		}
+		
+		return $day_array;
+	}
+
+	function getHour(){	
+		
+		$day_array = array();
+		for ($i=0; $i<=23; $i++){		
+			$hour_array[$i] = $i;
+		}
+		
+		return $hour_array;
+	}
+
+	function getMinutes(){	
+		
+		$minutes_array = array();
+		for ($i=0; $i<=59; $i++){		
+			$minutes_array[$i] = $i;
+		}
+		
+		return $minutes_array;
+	}
+	
+	function getMinutesInterval(){	
+		
+		$minutes_array = array("00"=>"00", "30"=>"30");		
+		return $minutes_array;
+	}	
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/SC_SiteInfo.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/SC_SiteInfo.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/SC_SiteInfo.php	(revision 1142)
@@ -0,0 +1,37 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+/* ¥»¥Ã¥·¥ç¥ó´ÉÍý¥¯¥é¥¹ */
+class SC_SiteInfo {
+	
+	var $conn;
+	var $data;
+	
+	function SC_SiteInfo($conn = ''){
+		$DB_class_name = "SC_DbConn";
+		if ( is_object($conn)){
+			if ( is_a($conn, $DB_class_name)){
+				// $conn¤¬$DB_class_name¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ç¤¢¤ë
+				$this->conn = $conn;
+			}
+		} else {
+			if (class_exists($DB_class_name)){
+				//$DB_class_name¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òºîÀ®¤¹¤ë
+				$this->conn = new SC_DbConn();			
+			}
+		}
+		
+		if ( is_object($this->conn)){
+			$conn = $this->conn;
+			$sql = "SELECT * FROM dtb_baseinfo";
+			$data = $conn->getAll($sql);
+			$this->data = $data[0];
+		}
+	}
+	
+}
+?>
Index: temp/test-xoops.ec-cube.net/data/class/GC_SendMail.php
===================================================================
--- temp/test-xoops.ec-cube.net/data/class/GC_SendMail.php	(revision 1142)
+++ temp/test-xoops.ec-cube.net/data/class/GC_SendMail.php	(revision 1142)
@@ -0,0 +1,102 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+//--- ¥Æ¥­¥¹¥È/HTML¡¡¥á¡¼¥ëÁ÷¿®
+class GC_SendMail {
+
+	var	$html;			//	HTML ¥á¡¼¥ë¥Ø¥Ã¥À¡¼
+	var $to;			//	Á÷¿®Àè
+	var $subject;		//	ÂêÌ¾
+	var $body;			//	ËÜÊ¸
+	var $header;		//	¥Ø¥Ã¥À¡¼
+	var $return_path;	//¡¡return path
+	var $mailer;
+
+	/*	¥Ø¥Ã¥ÀÅù¤ò³ÊÇ¼
+		 $to			-> Á÷¿®Àè¥á¡¼¥ë¥¢¥É¥ì¥¹
+		 $subject		-> ¥á¡¼¥ë¤Î¥¿¥¤¥È¥ë
+		 $body			-> ¥á¡¼¥ëËÜÊ¸
+		 $fromaddress	-> Á÷¿®¸µ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹
+		 $header		-> ¥Ø¥Ã¥À¡¼
+		 $from_name		-> Á÷¿®¸µ¤ÎÌ¾Á°¡ÊÁ´³ÑOK¡Ë
+		 $reply_to		-> reply_toÀßÄê
+		 $return_path	-> return-path¥¢¥É¥ì¥¹ÀßÄê¡Ê¥¨¥é¡¼¥á¡¼¥ëÊÖÁ÷ÍÑ¡Ë
+		 $cc			-> ¥«¡¼¥Ü¥ó¥³¥Ô¡¼
+		 $bcc			-> ¥Ö¥é¥¤¥ó¥É¥«¡¼¥Ü¥ó¥³¥Ô¡¼
+	*/	
+	
+	
+	function setTo($to, $to_name = "") {
+		if($to_name != "") {
+			$name = ereg_replace("<","¡ã", $to_name);
+			$name = ereg_replace(">","¡ä", $name);
+			$name = mb_encode_mimeheader($name);
+			$this->to = $name . "<" . $to . ">";
+		} else {
+			$this->to = $to;
+		}
+	}
+		
+	function setItem( $to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to="", $bcc="", $cc ="" ) {
+		
+		$this->to			 = $to;
+		$this->subject		 = $subject;
+		$this->body			 = $body;
+		// ¥Ø¥Ã¥À¡¼¤ËÆüËÜ¸ì¤ò»ÈÍÑ¤¹¤ë¾ì¹ç¤ÏMb_encode_mimeheader¤Ç¥¨¥ó¥³¡¼¥É¤¹¤ë¡£
+		$from_name = ereg_replace("<","¡ã", $from_name);
+		$from_name = ereg_replace(">","¡ä", $from_name);
+				
+		$this->header		 = "From: ". Mb_encode_mimeheader( $from_name )."<".$fromaddress.">\n";
+		$this->header		.= "Reply-To: ". $reply_to . "\n";
+		$this->header		.= "Cc: " . $cc. "\n";
+		$this->header		.= "Bcc: " . $bcc . "\n";
+		$this->header		.= "Errors-To: ". $errors_to ."\n";
+		$this->return_path   = $return_path;
+	}
+
+	
+	function setItemHtml( $to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to="", $bcc="", $cc ="" ) {
+			
+		$this->to			 = $to;
+		$this->subject		 = Mb_encode_mimeheader($subject);
+		$this->body			 = mb_convert_encoding( $body, "iso-2022-jp", CHAR_CODE);
+		$this->header		 = "Mime-Version: 1.0\n";
+		$this->header		.= "Content-Type: text/html; charset=iso-2022-jp\n";
+		$this->header		.= "Content-Transfer-Encoding: 7bit\n";
+		$this->header		.= "From: ". Mb_encode_mimeheader( $from_name )."<".$fromaddress.">\n";
+		$this->header		.= "Reply-To: ". $reply_to . "\n";
+		$this->header		.= "Cc: " . $cc. "\n";
+		$this->header		.= "Bcc: " . $bcc . "\n";
+		$this->header		.= "Errors-To: ". $errors_to ."\n";
+		$this->return_path   = $return_path;
+	}
+
+	//	¥á¡¼¥ëÁ÷¿®¤ò¼Â¹Ô¤¹¤ë
+	function sendMail() {
+
+		Mb_language( "Japanese" );
+		
+		//¡¡¥á¡¼¥ëÁ÷¿®
+		if( mb_send_mail( $this->to, $this->subject, $this->body, $this->header, "" . $this->return_path ) ) {
+			return true;
+		}
+		return false;
+	}
+
+	function sendHtmlMail() {
+
+		Mb_language( "Japanese" );	
+		
+		//¡¡¥á¡¼¥ëÁ÷¿®
+		if( mail( $this->to, $this->subject, $this->body, $this->header, "" . $this->return_path ) ) {
+			return true;
+		}
+		return false;
+	}
+}
+
+?>
