"A problem was encountered uploading the file %s for the %s field. (%s)", ERR_ZEROLENGTH => "The file %s uploaded to the %s field was empty (zero length).", ERR_IMAGEUPLOADERROR => "A problem was encountered uploading the image file %s for the %s field. (%s)", ERR_UNSUPPORTEDIMAGEFORMAT => "The image file %s uploaded for the %s field was in an unsupported image format.", ERR_UNKNOWNIMAGETYPE => "The image file %s uploaded for the %s field was of an unknown type.", ERR_REQUIREDFIELDEMPTY => "%s%s is a required field.", ); ?>
ERROR: Name(), $ErrorInfoTwo); ?>
UserCanViewField($User, $Field)) { $Edit = $EditingAllowed ? $Resource->UserCanEditField($User, $Field) : FALSE; $Error = $ErrorCode && in_array($Field->Id(), $ErrorFieldIds); switch ($Field->Type()) { case MDFTYPE_TEXT: case MDFTYPE_NUMBER: case MDFTYPE_DATE: case MDFTYPE_TIMESTAMP: DisplayTextField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_PARAGRAPH: DisplayParagraphField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_FLAG: DisplayFlagField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_TREE: DisplayTreeField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_CONTROLLEDNAME: DisplayControlledNameField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_OPTION: DisplayOptionField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_USER: DisplayUserField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_IMAGE: DisplayImageField($Field, $Resource, $RowClass, $Edit, $Error); break; case MDFTYPE_FILE: DisplayFileField($Field, $Resource, $RowClass, $Edit, $Error); break; } $RowClass = ($RowClass == "DarkRow") ? "LightRow" : "DarkRow"; } } ?>
Name()); $FieldDescription = htmlspecialchars($Field->Description()); ?> GetByField($Field); ?> MaxLength()) { ?>maxlength="MaxLength()); ?>" > GetByField($Field); ?> GetByField($Field); ?> > FlagOnLabel()); ?> > FlagOffLabel()); ?> FlagOnLabel() : $Field->FlagOffLabel()); } ?> GetByField($Field, TRUE); # if field should be editable by current user if ($IsEditable) { # if there are already files uploaded if (count($Files)) { # for each previously uploaded file foreach ($Files as $File) { # display delete button ?> Name())); ?>
Name())); ?>
(no files uploaded) GetByField($Field, TRUE); if (is_object($Images)) { $Images = array($Images); } # if field should be editable by current user if ($IsEditable) { # if there are already images uploaded if (count($Images)) { # for each previously uploaded image foreach ($Images as $Image) { # display image thumbnail ?> 
(no images uploaded) GetPossibleValues(); asort($Names); $Names = array(-1 => "--") + $Names; # retrieve values currently selected $SetNames = $Resource->GetByField($Field); asort($SetNames); # set up javascript function to dynamically populate option lists $DBFieldName = $Field->DBFieldName(); ?> $Name) { PrintOptionList("D_".$DBFieldName."_".$MenuIndex, $Names, $NameId, "", 1, 0, FALSE, "CheckAdd('dbentry', 'D_".$DBFieldName."_', ".$MenuIndex.");"); $MenuIndex++; } # print option list for use in selecting additional name PrintOptionList("D_".$DBFieldName."_".$MenuIndex, $Names, -1, "", 1, 0, FALSE, "CheckAdd('dbentry', 'D_".$DBFieldName."_', ".$MenuIndex.");"); $MenuIndex++; # print shells to contain additional option lists $MaxNames = 21; for (; $MenuIndex < $MaxNames; $MenuIndex++) { ?> DBFieldName(); $DBFieldId = $Field->Id(); $SetNames = $Resource->GetByField($Field); asort($SetNames); # print search inputs/text containers for currently selected names $MenuIndex = 1; foreach ($SetNames as $NameId => $Name) { ?> " autocomplete="off" position="" fieldid="" fieldname="" style="width: 400px; margin-right: 50px; display: none;" value="" />
" autocomplete="off" position="" fieldid="" fieldname="" style="width: 400px; margin-right: 50px;" />
" autocomplete="off" position="" fieldid="" fieldname="" style="width: 400px; margin-right: 50px; display: none;" />
GetCountOfPossibleValues(); ?> (no values defined for this field)"); } else { ?>GetByField($Field, TRUE); asort($CurrentValues); foreach ($CurrentValues as $Value) { print(htmlspecialchars($Value->Name())); $Qualifier = $Value->Qualifier(); if ($Qualifier) { print(" (".htmlspecialchars($Qualifier->Name()).")"); } print("
"); } } ?> GetByField($Field); # if user can edit this field if ($IsEditable) { # retrieve all possible values $Options = $Field->GetPossibleValues(); asort($Options); } else { # use just options that are set to display $Options = $SetOptions; } # determine how many values per row based on length of longest value $MaxLength = 0; foreach ($Options as $OptionName) { $Length = strlen($OptionName); if ($Length > $MaxLength) { $MaxLength = $Length; } } if ($MaxLength > 25) { $OptionsPerRow = 2; } elseif ($MaxLength > 17) { $OptionsPerRow = 3; } elseif ($MaxLength > 12) { $OptionsPerRow = 4; } else { $OptionsPerRow = 5; } # determine number of rows $OptionCount = count($Options); $NumberOfRows = intval(($OptionCount + ($OptionsPerRow - 1)) / $OptionsPerRow); ?> AllowMultiple()) { ?>"); foreach ($Options as $OptionId => $OptionName) { ?>AllowMultiple()) { ?>DBFieldName()."_".$OptionId."\""); if (in_array($OptionName, $SetOptions)) { print(" checked"); } print(">"); } else { ?>"); } } else { print("· "); } print(htmlspecialchars($OptionName)." \n"); $OptionsInThisRow++; if ($OptionsInThisRow == $OptionsPerRow) { print("\n"); $OptionsInThisRow = 0; } } if (!count($Options)) { print("(no options selected)"); } print(""); ?> GetByField($Field, TRUE); if (!is_array($Users)) { $Users = array($Users); } foreach ($Users as $User) { if ($IsEditable) { print(htmlspecialchars($User->Get("UserName"))."
\n"); } else { print(htmlspecialchars($User->Get("UserName"))."
\n"); } } ?>