<?php

/*********************************************************      
 程序说明:         
    功能说明:本程序实现对数据表中的系统参数结构的编辑，包括生成新的系统参数表，以用于新的系统。
              用分级目录的方式对系统参数进行结构化的划分，依照该划分，菜单生成模块将生成树状菜单。

    调用关系:调用: connectdb.inc，inc/header.inc     
              被调用:      
 
    变量说明:

    返回值:无

 作者  
      
修改注释:      
NO.1      
姓名:            
时间:      
修改说明:      
 *********************************************************/
require("../../inc/header.inc");
?>

<body onload="javascript:adjust();" onresize="javascript:adjust();" leftmargin="15" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">

	<?php
	adjust_head();
	adjust_title_head();
	echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
	echo "<tr>";
	echo "<td width=\"50%\">";
	echo "Template > Log Management > Log Structure";
	echo "</td>";
	echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
	//showHelp($helpId);
	echo "</td>";
	echo "</tr>";
	echo "</table>";
	adjust_title_tail();
	adjust_content_head();
	echo "<br>";

	$DEBUG = 0;

	function omcGetObjDb($sysTypeNo)
	{
		$dbName = 'OBJ_' . $sysTypeNo;
		return ($dbName);
	}

	$pubDb		  = 'OMC_PUB';
	$sysConfTable = 'OMC_PUB.sysConf';
	$dataConfTable = 'OMC_PUB.sysLogSourceConf';

	if (!isset($sysTypeNo)) {
		$sysTypeSql = "SELECT sysTypeNo
			FROM $dataConfTable 
			ORDER BY sysTypeNo LIMIT 0,1
			";
		if ($DEBUG) echo "<br>$sysTypeSql";
		$sysTypeResult = mysqli_query($pubConn, $sysTypeSql);
		$sysTypeRows = @mysqli_fetch_array($sysTypeResult);
		$sysTypeNo = $sysTypeRows[sysTypeNo];
		if ($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
	}

	$objDb = omcGetObjDb($sysTypeNo);
	if ($DEBUG) echo "<br>objDb=$objDb";
	$dataTypeNo = isset($dataTypeNo) ? $dataTypeNo : 0;
	if ($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
	$dataAttrDefTable	= 'logAttrDef_' . $dataTypeNo;
	if ($DEBUG) echo "<br>dataAttrDefTable=$dataAttrDefTable";
	$maxLevelNum	= 5;

	//----------------------
	//选择语言版本
	if ($language == 'eng') {
		$objNameField = name_2; //语种2
	} else {
		$objNameField = name_1; //语种1(默认语种)
	}
	//-----------------------

	/**************************************删除一个类型说明***********************************************/
	if ($delete) {
		$delSql = "DELETE FROM $dataAttrDefTable WHERE keyId='$keyId'";
		$delResult = mysqli_query($pubConn, $delSql);
		echo mysqli_error($pubConn);
		//----------------
		//插入日志

		//------------
		if ($delResult) {
			echo "<script LANGUAGE=\"JavaScript\">";
			echo "alert('";
			echo $strDeleteSuccess;
			echo "')";
			echo "</script>";
		} else {
			echo "<script LANGUAGE=\"JavaScript\">";
			echo "alert('";
			echo $strDeleteFailure;
			echo "')";
			echo "</script>";
		}
	} //end if($delete) 


	/*****************************添加,保存一个新的参数类型或创建新的参数结构表*****************************/
	if ($save) {
		if ($DEBUG) echo "<br>keyId = $keyId";
		if ($keyId == 'new') {  //插入一个新类型
			$saveSql = "REPLACE INTO $dataAttrDefTable 	(fieldName,name_1,name_2,desc_1,desc_2,dataTypeNo,number,length,valueType,operType,initValue,minValue,maxValue,setTemplate_1,setTemplate_2,needNote,note_1,note_2,level_1,level_2,level_3,level_4,level_5,level_6,level_7,level_8,level_9,level_10)	 VALUES('$fieldName','$name_1','$name_2','$desc_1','$desc_2','$dataTypeNo','$number','$length','$valueType','$operType','$initValue','$minValue','$maxValue','$setTemplate_1','$setTemplate_2','$needNote','$note_1','$note_2','$level_1','$level_2','$level_3','$level_4','$level_5','$level_6','$level_7','$level_8','$level_9','$level_10')";
			$saveResult = mysqli_query($pubConn, $saveSql);
			if ($saveResult) {
				$keyIdSel = "SELECT keyId FROM $dataAttrDefTable WHERE 
					level_1='$level_1' AND
					level_2='$level_2' AND
					level_3='$level_3' AND
					level_4='$level_4' AND
					level_5='$level_5' AND
					level_6='$level_6' AND
					level_7='$level_7' AND
					level_8='$level_8' AND
					level_9='$level_9' AND
					level_10='$level_10'
					";
				$keyIdResult = mysqli_query($pubConn, $keyIdSel);
				$keyIdeRows = mysqli_fetch_array($keyIdResult);
				$keyId = $keyIdeRows[keyId];
			}
		} elseif ($keyId > 0) {  //修改已有类型
			if ($needNote != 1) {
				$needNote = 0;
			}
			$saveSql = "UPDATE $dataAttrDefTable 
			       SET 
					fieldName='$fieldName',
					name_1='$name_1',
					name_2='$name_2',
					desc_1='$desc_1',
					desc_2='$desc_2',
					dataTypeNo='$dataTypeNo',
					number='$number',
					length='$length',
					valueType='$valueType',
					operType='$operType',
					initValue='$initValue',
					minValue='$minValue',
					maxValue='$maxValue',
					needNote='$needNote',
					note_1='$note_1',
					note_2='$note_2',
					level_1='$level_1',
					level_2='$level_2',
					level_3='$level_3',
					level_4='$level_4',
					level_5='$level_5',
					level_6='$level_6',
					level_7='$level_7',
					level_8='$level_8',
					level_9='$level_9',
					level_10='$level_10'
			       WHERE  keyId='$keyId'
                              ";
			$saveResult = mysqli_query($pubConn, $saveSql);
		} else {
			echo "<br>Error: keyId == NULL";
		}
		if ($DEBUG) echo "<br>$saveSql";
		echo mysqli_error($pubConn);
		if ($saveResult > 0) {
			//更新备份文件
			$csvFileName = '/usr/local/apache/htdocs/db_backup/other/' . $objDb . '.' . $dataAttrDefTable . '.csv';
			if ($DEBUG) echo "<br>csvFileName=$csvFileName";
			@unlink($csvFileName);
			$csvFileUpdateSql = "	SELECT * 
				INTO OUTFILE '$csvFileName' 
				FIELDS TERMINATED BY ',' 
				LINES TERMINATED BY '\n' 
				FROM $dataAttrDefTable 
			";
			$csvFileUpdateResult = mysqli_query($pubConn, $csvFileUpdateSql);
			if ($DEBUG) echo "<br>csvFileUpdateSql = $csvFileUpdateSql<br>";
			echo mysqli_error($pubConn);
			echo "<script LANGUAGE=\"JavaScript\">";
			echo "alert('";
			echo $strEditSuccess;
			echo "')";
			echo "</script>";
		} else {
			echo "<script LANGUAGE=\"JavaScript\">";
			echo "alert('";
			echo $strEditFailure;
			echo "')";
			echo "</script>";
		}
	} //end if($save) 

	/*****************************创建参数库和参数配置表*****************************/
	//创建参数库
	$dbList = mysqli_query($link[0], "SHOW DATABASES");
	$dbNum = mysqli_num_rows($dbList);
	$dbRows =  mysqli_fetch_array($dbList);
	for ($i = 0; $i < $dbNum; $i++) {
		//	$dbName = mysql_dbname($dbList, $i);
		$dbName = $dbRows[0];

		if ($dbName == $objDb) {
			if ($DEBUG) echo "<br> $objDb have be created";
			break;
		}
		if ($i == $dbNum - 1) {
			if ($DEBUG) echo "<br>$objDb have not be created";
			//step 1.create objDb 
			$sql = "CREATE DATABASE $objDb";
			mysqli_query($pubConn, $sql);
			if ($DEBUG) echo "<br>create $objDb sql =$sql";
			echo mysqli_error($pubConn);
		}
	}
	//创建用户参数定义表
	if ($dbName) $dbConn=mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $dbName);
	$tableList= mysqli_query($dbConn,"SHOW TABLES");
	$tableNum = mysqli_num_rows($tableList);
	$tableRows = mysqli_fetch_array($tableList);
	for ($i = 0; $i < $tableNum; $i++) {
		//$tableName = mysql_tablename($tableList, $i);
		$tableName = $tableRows[0];
		if ($tableName == $dataAttrDefTable) {
			if ($DEBUG) echo "<br>$dataAttrDefTable have be created";
			break;
		}
		if ($i == $tableNum - 1) {
			//step 2.create paramConf table in objDb
			$sql = "CREATE TABLE $dataAttrDefTable (
			   keyId tinyint(4) NOT NULL auto_increment,
			   fieldName varchar(50) NOT NULL,
			   name_1 varchar(30) NOT NULL,
			   name_2 varchar(30) NOT NULL,
			   desc_1 varchar(255) NOT NULL,
			   desc_2 varchar(255) NOT NULL,
			   dataTypeNo tinyint(1) DEFAULT '0' NOT NULL,
			   operType tinyint(1) DEFAULT '0' NOT NULL,
			   number int(6) DEFAULT '0' NOT NULL,
			   length smallint(3) DEFAULT '0' NOT NULL,
			   valueType tinyint(1) DEFAULT '0' NOT NULL,
			   initValue varchar(255) NOT NULL,
			   minValue varchar(255) NOT NULL,
			   maxValue varchar(255) NOT NULL,
			   setTemplate_1 text NOT NULL,
			   setTemplate_2 text NOT NULL,
			   needNote tinyint(1) DEFAULT '0' NOT NULL,
			   note_1 varchar(200) NOT NULL,
			   note_2 varchar(200) NOT NULL,
			   level_1 int(5) DEFAULT '0' NOT NULL,
			   level_2 int(5) DEFAULT '0' NOT NULL,
			   level_3 int(5) DEFAULT '0' NOT NULL,
			   level_4 int(5) DEFAULT '0' NOT NULL,
			   level_5 int(5) DEFAULT '0' NOT NULL,
			   level_6 int(5) DEFAULT '0' NOT NULL,
			   level_7 int(5) DEFAULT '0' NOT NULL,
			   level_8 int(5) DEFAULT '0' NOT NULL,
			   level_9 int(5) DEFAULT '0' NOT NULL,
			   level_10 int(5) DEFAULT '0' NOT NULL,
			   PRIMARY KEY (keyId),
			   KEY level_1 (level_1),
			   KEY level_2 (level_2),
			   KEY level_3 (level_3),
			   KEY level_4 (level_4),
			   KEY level_5 (level_5),
			   KEY level_6 (level_6),
			   KEY level_7 (level_7),
			   KEY level_8 (level_8),
			   KEY level_9 (level_9),
			   KEY level_10 (level_10)
			)";
			mysqli_query($pubConn, $sql);
			if ($DEBUG) echo "<br>create paramConf table sql =$sql";
			echo mysqli_error($pubConn);
			break;
		}
	}

	/*****************************显示一个设备类型的参数定义*****************************/
	?>


	<script LANGUAGE="JavaScript">
		function chgSysType() {
			var baseUrl, urlAdd, url;
			baseUrl = '<?php echo "$PHP_SELF?"; ?>';
			urlAdd = document.confForm.dataList.options[document.confForm.dataList.selectedIndex].value;
			url = baseUrl + urlAdd;
			window.location = url;
		}

		function chgObj() {
			var baseUrl, urlAdd, url;
			baseUrl = '<?php echo "$PHP_SELF?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&keyId="; ?>';
			urlAdd = document.confForm.keyId.options[document.confForm.keyId.selectedIndex].value;
			url = baseUrl + urlAdd;
			window.location = url;
		}

		function chkValue(term) {
			term.value = term.value.toUpperCase();
			if (term.value.length != (document.confForm.length.value * 2)) {
				term.style.color = "BLUE";
				alert('2.Default Value length error,it must =' + document.confForm.length.value);
				return (false);
			}
			var hexStr = '0123456789ABCDEF';
			var checkStr = term.value;
			var allValid = true;
			for (i = 0; i < checkStr.length; i++) {
				ch = checkStr.charAt(i);
				for (j = 0; j < hexStr.length; j++) {
					if (ch == hexStr.charAt(j)) break;
				}
				if (j == hexStr.length) {
					allValid = false;
					break;
				}
			}
			if (!allValid) {
				alert('Must be a hexadecimal number');
				term.focus();
				term.style.color = "BLUE";
				return (false);
			}
			term.style.color = "BLACK";
		}

		function chgValueType() {
			var valueType;
			valueType = document.confForm.valueType.options[document.confForm.valueType.selectedIndex].value;
			if (valueType == '2') {
				document.confForm.length.value = 5;
			}
		}
	</script>
	<form method="POST" name=confForm action="<?php echo "$PHP_SELF"; ?>">
		<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#E6E6E6">
			<tr bgcolor="#E6E6E6">
				<td width="100%" colspan="2" align="center">
					<font size=3><b><?php echo "Log Atrribute Define"; ?></b></font>
				</td>
			</tr>
			<tr>
				<td width="30%">
					<?php echo $strSelectDeviceType; ?>
				</td>
				<td width="70%">
					<select size="1" name="dataList" onChange="javascript:chgSysType()">
						<?php
						//显示选择设备类型下拉菜单
						$sysTypeSql = "SELECT keyId,sysTypeNo,dataTypeNo,menuName,preObjId,dataStoreTable
					FROM $dataConfTable 
					ORDER BY sysTypeNo,sysNo,subSysNo
					";
						if ($DEBUG) echo "<br>sysTypeSql=$sysTypeSql";
						$sysTypeResult = mysqli_query($pubConn, $sysTypeSql);
						$sysTypeRows = @mysqli_fetch_array($sysTypeResult);
						do {
							echo "<option value=\"sysTypeNo=$sysTypeRows[sysTypeNo]&dataTypeNo=$sysTypeRows[dataTypeNo]\" ";
							if ($sysTypeRows[sysTypeNo] == $sysTypeNo && $sysTypeRows[dataTypeNo] == $dataTypeNo) {
								echo "selected";
								$snmpHeadStr = $sysTypeRows[preObjId];
								$sysTypeName = $sysTypeRows[sysTypeName];
								$dataStoreTable   = $sysTypeRows[dataStoreTable];
							}
							echo ">";
							echo "$sysTypeRows[menuName]";
							echo "</option>";
						} while ($sysTypeRows = mysqli_fetch_array($sysTypeResult));
						?>
					</select>
				</td>
			</tr>

			<tr>
				<td width="30%">
					<?php echo $strSelectParaType; ?>
				</td>
				<td width="70%">
					<?php
					//显示选择参数类型下拉菜单
					$orderBy = '';
					for ($i = 1; $i <= $maxLevelNum; $i++) {
						if ($i < $maxLevelNum) {
							$tempStr = ' level_' . $i . ',';
						} else {
							$tempStr = ' level_' . $i;
						}
						$orderBy .= $tempStr;
					}
					echo "<select size=\"1\" name=\"keyId\" onChange=\"javascript:chgObj()\">";
					$objSql = "SELECT * FROM $dataAttrDefTable ORDER BY $orderBy";
					$objResult = mysqli_query($pubConn, $objSql);
					$objNum = mysqli_num_rows($objResult);
					echo "<option value=\"new\">------------------New------------------</option>";
					while ($objRows = mysqli_fetch_array($objResult)) {
						echo "<option value=\"$objRows[keyId]\" ";
						if ($objRows[keyId] == $keyId && $keyId > 0) {
							echo "selected";
						}
						echo ">";
						$spaceStr = '';
						$oidStr = '';
						for ($i = $maxLevelNum; $i >= 1; $i--) {
							$levelEndId = 'level_' . $i;
							if ($objRows[$levelEndId] > 0) {
								for ($j = 1; $j <= $i; $j++) {
									$spaceStr .= '&nbsp&nbsp';
									$levelBgnId = 'level_' . $j;
									$oidStr .= $objRows[$levelBgnId] . '.';
								}
								$spaceStr .= '|--';
								break;
							}
						}
						echo " $spaceStr $oidStr $objRows[$objNameField]";
						echo "</option>";
					}
					?>
					</select>
					<?php
					if ($DEBUG) echo "<br>selected Id = $keyId";
					if ($DEBUG) echo "<br>objSql = $objSql";
					if ($DEBUG) echo mysqli_error($pubConn);
					?>
				</td>
			</tr>
			<?php //------参数oid----------- 
			$objSql = "SELECT * FROM $dataAttrDefTable WHERE keyId = '$keyId'";
			$objResult = mysqli_query($pubConn, $objSql);
			$objRows = @mysqli_fetch_array($objResult);
			?>
			<tr>
				<td width="30%"><?php echo "TLV Tag" ?>:</td>
				<td width="70%">
					<?php
					for ($i = 1; $i <= $maxLevelNum; $i++) {
						$levelId = 'level_' . $i;
						echo "<input type=\"text\" name=\"level_" . $i . "\" maxLength=5 size=2 value=\"$objRows[$levelId]\">";
						if ($i < $maxLevelNum) {
							echo "&#8226;"; //dot
						}
					}
					?>
				</td>
			</tr>

			<?php //------字段名----------- 
			?>
			<tr>
				<td width="30%">
					<?php echo "Field Name"; ?>
				</td>
				<td width="70%">
					<?php
					echo "<select size=\"1\" name=\"fieldName\">";
					echo "<option value=\"-1\">-----</option>";
					$tmpArr = explode('.', $dataStoreTable);
					$subscriberDB = $tmpArr[0];
					$dataStoreTable = $tmpArr[1];
					//$fieldResult = mysql_list_fields($subscriberDB, $dataStoreTable);
					$fieldResult=mysqli_query($subscriberDbConn,"SHOW COLUMNS FROM $dataStoreTable");

					$i = 0;
					while ($tmpName =mysqli_fetch_array($fieldResult)) {
						echo "<option value=\"$tmpName\" ";
						if ($tmpName == $objRows[fieldName]) {
							echo " selected";
						}
						echo ">$tmpName</option>";
						$i++;
					}
					echo "</select>";
					?>
				</td>
			</tr>

			<?php //------参数名----------- 
			?>
			<tr>
				<td width="30%"><?php echo "Object Name 1"; ?>:</td>
				<td width="70%">
					<input type="text" name="name_1" size="20" value="<?php echo "$objRows[name_1]"; ?>">(Chinese)
				</td>
			</tr>
			<tr>
				<td width="30%"><?php echo "Object Name 2"; ?>:</td>
				<td width="70%">
					<input type="text" name="name_2" size="20" value="<?php echo "$objRows[name_2]"; ?>">(English)
				</td>
			</tr>
			<?php //------参数描述----------- 
			?>
			<tr>
				<td width="30%"><?php echo "Object Description 1" ?>:</td>
				<td width="70%">
					<input type="text" name="desc_1" size="50" value="<?php echo "$objRows[desc_1]"; ?>">(Chinese)
				</td>
			</tr>
			<tr>
				<td width="30%"><?php echo "Object Description 2" ?>:</td>
				<td width="70%">
					<input type="text" name="desc_2" size="50" value="<?php echo "$objRows[desc_2]"; ?>">(English)
				</td>
			</tr>
			<!--
	 <?php //------参数类型----------- 
		?>
	 <tr>                   
     <td width="30%"><?php echo $strSystemPara; ?>:</td>                  
     <td width="70%"> 
     <?php echo "$strYes"; ?><input type=radio value="1" name=dataTypeNo <?php if ($objRows[dataTypeNo] == '1') echo "checked"; ?>>&nbsp
     <?php echo "$strNo"; ?><input type=radio value="0" name=dataTypeNo <?php if ($objRows[dataTypeNo] == '0' || !isset($objRows[dataTypeNo])) echo "checked"; ?>>
     </td>
     </tr>
	 -->
			<?php //------操作类型----------- 
			?>
			<tr>
				<td width="30%">Operation define:</td>
				<td width="70%">
					<select name="operType" size="1">
						<?php
						$operTypeArr = array("disable", "read only", "write only", "read and write");
						for ($i = 0; $i < sizeof($operTypeArr); $i++) {
							echo "<option value=\"$i\" ";
							if (!isset($objRows[operType]) && $setSelected <= 0 && $i == 3) {
								echo "selected";
								$setSelected = 1;
							} elseif ($objRows[operType] == $i) {
								echo "selected";
							}
							echo ">$operTypeArr[$i]</option>";
						}
						?>
					</select>
				</td>
			</tr>
			<tr bgcolor="#E6E6E6">
				<td colspan="2">
					<font size=2><b>(Needn't fill the follow fields if this object have sub-objects)</b>
						<font>
				</td>
			</tr>
			<?php //------参数个数----------- 
			?>
			<tr>
				<td width="30%">Number of instance:</td>
				<td width="70%">
					<input type="text" name="number" size="5" value="1" readOnly>
				</td>
			</tr>
			<?php //------参数长度----------- 
			?>
			<tr>
				<td width="30%">Value Length(byte):</td>
				<td width="70%">
					<input type="text" name="length" size="5" value="<?php echo "$objRows[length]"; ?>">
				</td>
			</tr>
			<?php //------参数值类型----------- 
			?>
			<tr>
				<td width="30%"><?php echo "Value Type"; ?>:</td>
				<td width="70%">
					<select size="1" name="valueType" onChange="javascript:chgValueType()">
						<?php
						$varTypeArr = array(array("4", "Hex String"), array("3", "Asc String"), array("2", "Integer"));
						for ($i = 0; $i < sizeof($varTypeArr); $i++) {
							echo "\n <option value=\"{$varTypeArr[$i][0]}\"";
							if ($objRows[valueType] == $varTypeArr[$i][0]) {
								echo " selected ";
							}
							echo ">{$varTypeArr[$i][1]}</option>";
						}
						?>
					</select>
				</td>
			</tr>
			<?php //------取值范围----------- 
			?>
			<tr>
				<td width="30%"><?php echo $strValueRange; ?>:</td>
				<td width="70%">
					<nobr>
						min value = <input type="text" name="minValue" maxlength="255" size="20" value="<?php echo "$objRows[minValue]"; ?>" onChange="javascript: chkValue(this);">&nbsp;&nbsp;&nbsp;
						max value = <input type="text" name="maxValue" maxlength="255" size="20" value="<?php echo "$objRows[maxValue]"; ?>" onChange="javascript: chkValue(this);">
					</nobr>
				</td>
			</tr>
			<tr>
				<td width="30%"><?php echo $strDefaultValue; ?>:</td>
				<td width="70%">
					<input type="text" name="initValue" maxlength="255" size="20" value="<?php echo "$objRows[initValue]"; ?>" onChange="javascript: chkValue(this);">
				</td>
			</tr>
			<?php //------操作提示----------- 
			?>
			<tr>
				<td width="30%">Need Note:</td>
				<td width="70%">
					<input type="checkbox" name="needNote" value="1" <?php if ($objRows[needNote] == '1') echo "checked"; ?>>
				</td>
			</tr>
			<tr>
				<td width="30%">Note Message 1:</td>
				<td width="70%">
					<input type="txt" name="note_1" size="40" value="<?php echo "$objRows[note_1]"; ?>">(Chinese)
				</td>
			</tr>
			<tr>
				<td width="30%">Note Message 2:</td>
				<td width="70%">
					<input type="txt" name="note_2" size="40" value="<?php echo "$objRows[note_2]"; ?>">(English)
				</td>
			</tr>
			<?php //------初始化参数----------- 
			?>
			<!--
	 <tr bgcolor="#E6E6E6">                   
     <td colspan="2">
		<input type="checkbox" name="isWantToInitParam" value="ON" onclick="expandIt('KB4');">
		<font size=2><b><?php echo $strDoYouFinishDefinitionOfAllParaType; ?></b></font>
	 </td>            
     </tr>
	 -->
		</table>

		<p><input type="submit" value="<?php echo $strSave; ?>" name="save">
			<input type="reset" value="<?php echo $strCancel; ?>" name="reset">
			<input type="submit" value="<?php echo $strDeleteMode; ?>" name="delete">
		</p>
		<input type="hidden" value="<?php echo $sysTypeNo; ?>" name="sysTypeNo">
		<input type="hidden" value="<?php echo $dataTypeNo; ?>" name="dataTypeNo">
	</form>
	<?php
	adjust_content_tail();
	?>
</body>

</html>