<?php
$tdata=array();
##if @TABLE.bShowFirst## $tdata[".NumberOfChars"]=##@TABLE.nNumberOfChars##; ##endif##
$tdata[".ShortName"]="##@TABLE.strShortTableName##";
$tdata[".OwnerID"]="##@TABLE.strMainTableOwnerID s##";
##foreach Fields as @f##
// ##@f.strName##
$fdata = array();
##if @f.strLabel!=@f.strName## $fdata["Label"]="##@f.strLabel s##"; ##endif##
##if @f.strFilename## $fdata["Filename"]="##@f.strFilename s##"; ##endif##
##if @f.strhlPrefix## $fdata["LinkPrefix"]="##@f.strhlPrefix s##"; ##endif##
$fdata["FieldType"]= ##@f.nDataType##;
$fdata["EditFormat"]= "##@f.strEditFormat s##";
$fdata["ViewFormat"]= "##@f.strViewFormat s##";
##if @f.bShowTime## $fdata["ShowTime"]=true; ##endif##
$fdata["GoodName"]= "##@f.strName g##";
##if @f.strSQLExpression##
$fdata["FullName"]= "##@f.strSQLExpression ls##";
##else##
##if @TABLE.strOriginalTable##
$fdata["FullName"]= "##@TABLE.strOriginalTable ts##.##@f.strName ws##";
##else##
$fdata["FullName"]= "##@TABLE.strDataSourceTable ts##.##@f.strName ws##";
##endif##
##endif##
##if @f.bRequired## $fdata["IsRequired"]=true; ##endif##
##if @f.bUseRTE## $fdata["UseRTE"]=true; ##endif##
##if @f.bTimestamp## $fdata["UseTimestamp"]=true; ##endif##
##if @f.strUploadFolder## $fdata["UploadFolder"]="##@f.strUploadFolder s##"; ##endif##
$fdata["Index"]= ##@index##;
##if @f.strEditFormat==EDIT_FORMAT_DATE## $fdata["DateEditType"]=##@f.nDateEditType##; ##endif##
##if @f.strEditFormat==EDIT_FORMAT_TEXT_AREA##
$fdata["EditParams"]="";
##if @f.nRows>0##
$fdata["EditParams"].= " rows=##@f.nRows##";
$fdata["nRows"] = ##@f.nRows##;
##endif##
##if @f.nCols>0##
$fdata["EditParams"].= " cols=##@f.nCols##";
$fdata["nCols"] = ##@f.nCols##;
##endif##
##endif##
##if @f.strEditFormat==EDIT_FORMAT_TEXT_FIELD || @f.strEditFormat==EDIT_FORMAT_PASSWORD##
$fdata["EditParams"]="";
##if @f.nMaxLength>0##
$fdata["EditParams"].= " maxlength=##@f.nMaxLength##";
##endif##
##if @f.nSize>0##
$fdata["EditParams"].= " size=##@f.nSize##";
##endif##
##endif##
##if @f.bEditPage || @f.bExportPage || @f.bListPage || @f.bPrinterPage ||@f.bViewPage
|| Fields[strViewFormat==FORMAT_DATABASE_IMAGE && ListFormatObj.bShowThumbnail && @f.strName==strThumbnail].len##
$fdata["FieldPermissions"]=true;
##endif##
$tdata["##@f.strName s##"]=$fdata;
##endfor##
$tables_data["##@TABLE.strDataSourceTable s##"]=$tdata;
?>