";
echo "";
}
$showName=getShowNameOfField($objects[$index]['name_1'],$index);
if(strstr($objects[$index]['desc_1'],"Key Parameter"))
{
if(strstr($objects[$index]['name_1'],"RowStatus"))
{
$table_delete_flags[$table_level]=1;
echo "| Delete | ";
}
else
{
echo "";
echo "";
echo "{$showName} | ";
}
$showKeyIdList[$showKeyIdListIndex]=$index;
$showKeyIdListIndex++;
}
if(strstr($objects[$index]['name_1'],"RowStatus"))
{
echo "
";
echo "";
if($table_hide_flag[$table_level] == 1)
continue;
$indexKeyId=-1;
$entries_count=0;
for($tt=0;$tt<$showKeyIdListIndex;$tt++)
{
$id=$showKeyIdList[$tt];
if(strstr($objects[$id]['name_1'],"Index"))
$indexKeyId=$id;
else if(strstr($objects[$id]['name_1'],"RowStatus"))
$rowstatusKeyId=$id;
else if(strstr($objects[$id]['name_1'],"Entries"))
{
$entriesKeyIds[$entries_count]=$id;
//get table name
$tb=$objects[$id][name_1];
$tlen=strlen($tb);
$fg=0;
$tb1="";
for($ti=0;$ti<$tlen;$ti++)
{
if($tb[$ti] >= 'A' && $tb[$ti] <= 'Z')
$fg=1;
if($fg==1)
$tb1.=$tb[$ti];
}
$tb2=explode("Entries",$tb1);
$tb3=$tb2[0];
//PrintInfo("table3=".$tb3);
$entriesOid=findRelationOid($tb3,TABLE_ENTRY,$sysTypeNo);
$entries_oids[$entries_count]=$entriesOid;
$entries_count++;
}
else
$select_list.=$objects[$id]['name_1'].",";
}
$tmplevel=getLevelWhere($objects[$indexKeyId]['oid']);
//and instanceNo <> '0000'
$sql="select instanceNo from $paraTable where $tmplevel order by instanceNo ";
if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99)
$sql.="and subSysNo='$subSysNo' ";
$res=@mysqli_query($pubConn,$sql);
$instanceCount=0;
while($row=@mysqli_fetch_array($res))
{
$instanceList[$instanceCount]=$row[instanceNo];
$instanceCount++;
}
$tableName=$table_name[$table_level];
for($tt=0;$tt<$instanceCount;$tt++)
{
if($tt>MAX_SHOW_ROW_NUM-1)
echo "\n | ";
else
echo "\n
";
//echo "
";
for($jj=0;$jj<$showKeyIdListIndex;$jj++)
{
$id=$showKeyIdList[$jj];
$tmplevel=getLevelWhere($objects[$id]['oid']);
$sql="select initValue from $paraTable where instanceNo='{$instanceList[$tt]}' and $tmplevel ";
if($sysTypeNo == 260 && $sysNo != 99 && $subSysNo != 99)
$sql.="and subSysNo='$subSysNo' ";
$res=@mysqli_query($pubConn,$sql);
$row=@mysqli_fetch_array($res);
$rowObj[$tt][$jj]=$row[initValue];
if($id == $indexKeyId)
{
echo "| ";
echo "";
echo "{$rowObj[$tt][$jj]}";
echo "";
}
//$table_delete_flags[$table_level]=1;
else if($id == $rowstatusKeyId)
{
echo " | ";
if($table_delete_flags[$table_level] == 1)
{
echo "";
}
}
//feake
else if($entries_count>0 && in_array($id,$entriesKeyIds))
{
$sizet=sizeof($entriesKeyIds);
//PrintInfo("entries=".$entriesKeyIds[0]);
for($si=0;$si<$sizet;$si++)
{
if($id == $entriesKeyIds[$si])
{
//printf("keyId=".$entriesKeyIds[$si]);
$tmpOid=$entries_oids[$si];
break;
}
}
echo " | ";
echo "";
echo "{$rowObj[$tt][$jj]}";
echo "";
}
else
{
echo " | ";
if(trim($rowObj[$tt][$jj]) == "")
echo "--";
else
{
$showValue=translateValueToOpt($id,$rowObj[$tt][$jj]);
echo "{$showValue}";
}
}
echo " | ";
}
echo "
";
}
echo "";
if($objects[$indexKeyId]['maxAccess'] == ACCESS_INDEX_CREATE_SPE)
{
echo "| New | ";
for($si=0;$si<$showKeyIdListIndex-1;$si++)
{
echo "-- | ";
}
echo "
";
}
if($instanceCount>MAX_SHOW_ROW_NUM)
{
echo "| More >> |
";
echo "| << Hide |
";
}
echo "
";
echo "";
}
}
if($DEBUG)
{
for($s=0;$s<$table_level+1;$s++)
echo "..";
echo "LEAF_TYPE {$objects[$index]['name_1']}