GetItems(); } catch (Exception $Exception) { ?>

There was a problem printing the fields.

Id()); $SafeGroupName = defaulthtmlentities($Item->Name()); $Fields = $Item->GetFields(); # go to the next item if there are no fields in the group if (!count($Fields)) continue; ?>

RequireUIFile("ckeditor.js"); $AF->RequireUIFile("ckeditor_setup.js"); # error codes (NOTE: Must match codes in SPT--EditResourceComplete.php!!!) if (!defined("ERR_FILEUPLOADERROR")) { define("ERR_FILEUPLOADERROR", 1); define("ERR_ZEROLENGTH", 2); define("ERR_IMAGEUPLOADERROR", 3); define("ERR_UNSUPPORTEDIMAGEFORMAT", 4); define("ERR_UNKNOWNIMAGETYPE", 5); define("ERR_REQUIREDFIELDEMPTY", 6); define("ERR_POSTEMPTY", 7); define("ERR_IMAGESTORE", 8); define("ERR_TEMPSTORE", 9); define("ERR_FILESTORE", 10); } # error messages $ErrorMessages = array( ERR_FILEUPLOADERROR => "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.", ERR_POSTEMPTY => "File or image upload was too large (No POST data received)", ERR_IMAGESTORE => "There were problems with the image store:%s
Contact the site administrator with this error to resolve them.", ERR_TEMPSTORE => "tmp does not exist or is not writeable, contact the site administrator with this error.", ERR_FILESTORE => "FileStorage does not exist or is not writeable, contact the site administrator with this error." ); ?>

- GetDisplayName(), $ErrorInfoTwo); ?>

UserCanViewField($User, $Field)) { $Edit = $EditingAllowed ? $Resource->UserCanEditField($User, $Field) : FALSE; # if the field is not editable, don't allow editing in this # interface if (!$Field->Editable()) { $Edit = FALSE; } $Error = $ErrorCode && in_array($Field->Id(), $ErrorFieldIds); $EditValue = $Resource->GetByField($Field); global $AF; $SignalResult = $AF->SignalEvent( ($Edit ? "EVENT_PRE_FIELD_EDIT_FILTER" : "EVENT_FIELD_DISPLAY_FILTER"), array( "Field" => $Field, "Resource" => $Resource, "Value" => $EditValue)); $EditValue = $SignalResult["Value"]; # get additional HTML to display, if any $Context = $Edit ? "EDIT" : "EDIT_COMPLETE_DISPLAY"; $SignalResult = $AF->SignalEvent( "EVENT_APPEND_HTML_TO_FIELD_DISPLAY", array( "Field" => $Field, "Resource" => $Resource, "Context" => $Context, "Html" => NULL)); $Html = $SignalResult["Html"]; switch ($Field->Type()) { case MetadataSchema::MDFTYPE_TEXT: case MetadataSchema::MDFTYPE_NUMBER: case MetadataSchema::MDFTYPE_DATE: case MetadataSchema::MDFTYPE_URL: DisplayTextField( $Field, $Resource, $Edit, $Error, $EditValue, $Html); break; case MetadataSchema::MDFTYPE_TIMESTAMP: DisplayTimestampField( $Field, $Resource, $Edit, $Error, $EditValue, $Html); break; case MetadataSchema::MDFTYPE_POINT: DisplayPointField( $Field, $Resource, $Edit, $Error, $EditValue, $Html); break; case MetadataSchema::MDFTYPE_PARAGRAPH: DisplayParagraphField( $Field, $Resource, $Edit, $Error, $EditValue, $Html); break; case MetadataSchema::MDFTYPE_FLAG: DisplayFlagField( $Field, $Resource, $Edit, $Error, $EditValue, $Html); break; case MetadataSchema::MDFTYPE_TREE: DisplayTreeField($Field, $Resource, $Edit, $Error, $Html); break; case MetadataSchema::MDFTYPE_CONTROLLEDNAME: DisplayControlledNameField($Field, $Resource, $Edit, $Error, $Html); break; case MetadataSchema::MDFTYPE_OPTION: DisplayOptionField($Field, $Resource, $Edit, $Error, $Html); break; case MetadataSchema::MDFTYPE_USER: DisplayUserField($Field, $Resource, $Edit, $Error, $Html); break; case MetadataSchema::MDFTYPE_IMAGE: DisplayImageField($Field, $Resource, $Edit, $Error, $Html); break; case MetadataSchema::MDFTYPE_FILE: DisplayFileField($Field, $Resource, $Edit, $Error, $Html); break; } } } function PrintLabelCell($Field, $Error, $IsEditable, $PseudoLabel=FALSE) { $FieldName = defaulthtmlentities($Field->GetDisplayName()); $Instructions = $Field->Instructions(); $ClassAttr = NULL; $OnEditPage = GetArrayValue($_GET, "P") == "EditResource"; # use the field definition if no instructions are available if (strlen($Instructions) < 1) { $Instructions = $Field->Description(); } $Title = defaulthtmlentities(strip_tags(trim($Instructions))); $Instructions = defaulthtmlentities(trim($Instructions)); if ($Error) { $ClassAttr = "cw-form-error"; } else if (!$Field->Optional() && $IsEditable) { $ClassAttr = "cw-form-required"; } ?> PUIFile("help.png"); ?>" alt="?" title="" tooltip="" />
MaxLength()) { ?>maxlength="MaxLength(); ?>" />
MaxLength()) { ?>maxlength="MaxLength(); ?>" /> UpdateMethod() == MetadataField::UPDATEMETHOD_BUTTON) { ?>
(not set)"; } ?>
AllowHTML() && $Field->UseWysiwygEditor(); ?>
class="ckeditor"<?PHP } ?> name="F_<?PHP print $Field->DBFieldName(); ?>" rows="<?PHP print $Field->ParagraphRows(); ?>" cols="<?PHP print $Field->ParagraphCols(); ?>" ><?PHP print htmlspecialChars($Value); ?>
/> FlagOnLabel(); ?> /> FlagOffLabel(); ?> FlagOnLabel() : $Field->FlagOffLabel(); } ?>
GetByField($Field, TRUE); ?> 0) { ?> class="cw-content-tallrow">

"; # display link to file ?>Name()); ?> "; } ?>

Name()); ?>
(no files uploaded) GetByField($Field, TRUE); if (is_object($Images)) { $Images = array($Images); } ?> 0) { ?> class="cw-content-tallrow">

GetLink()); $SafeSrc = defaulthtmlentities($Image->ThumbnailUrl()); $SafeAlt = defaulthtmlentities($Image->AltText()); $SafeId = defaulthtmlentities($Image->Id()); ?>
- Alternate Text:

DBFieldName()); $SafeAltText = defaulthtmlentities($Field->DefaultAltText()); ?> Alternate Text:

GetLink()); $SafeSrc = defaulthtmlentities($Image->ThumbnailUrl()); $SafeAlt = defaulthtmlentities($Image->AltText()); ?>

(no images uploaded) GetPossibleValues(); asort($Names); $Names = array(-1 => "--") + $Names; # retrieve values currently selected $SetNames = $Resource->Get($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.");", "auto; display: block; max-height: 10000000"); $MenuIndex++; } # print option list for use in selecting additional name PrintOptionList("D_".$DBFieldName."_".$MenuIndex, $Names, -1, "", 1, 0, FALSE, "CheckAdd('dbentry', 'D_".$DBFieldName."_', ".$MenuIndex.");", "auto; display: block; max-height: 10000000"); $MenuIndex++; # print shells to contain additional option lists $MaxNames = 21; for (; $MenuIndex < $MaxNames; $MenuIndex++) { ?>
DBFieldName(); $DBFieldId = $Field->Id(); $SetNames = $Resource->Get($Field); asort($SetNames); # print search inputs/text containers for currently selected names $MenuIndex = 1; foreach ($SetNames as $NameId => $Name) { ?> " name="D_<?PHP print $DBFieldName."_".$MenuIndex; ?>" fieldid="<?PHP print $DBFieldId; ?>" ><?PHP print $Name; ?> " name="D_<?PHP print $DBFieldName."_".$MenuIndex; ?>" fieldid="<?PHP print $DBFieldId; ?>" >
GetPossibleValues(); # sort values and add "no value" value $PossibleValues[-1] = "--"; asort($PossibleValues); # retrieve value currently selected $Value = $Resource->Get($Field, TRUE); $SelectedValue = $Value instanceof User ? $Value->Id() : NULL; # set up javascript function to dynamically populate option lists $DBFieldName = $Field->DBFieldName(); PrintOptionList( "F_".$DBFieldName, $PossibleValues, $SelectedValue, "", 1, 0, FALSE, "", "auto; display: block; max-height: 10000000"); } function DisplayTermUsingSearch($Field, $Resource, $Context=NULL) { # retrieve field name/id and values currently selected $DBFieldName = $Field->DBFieldName(); $DBFieldId = $Field->Id(); # retrieve value currently selected $Value = $Resource->Get($Field, TRUE); $SelectedValue = $Value instanceof User ? $Value->Name() : NULL; $SelectedValue = defaulthtmlentities($SelectedValue); # print search input/text container for use in selecting additional name ?> <?PHP print $SelectedValue; ?>
GetCountOfPossibleValues(); ?>
(no values defined for this field)"; } else { if ($ValueCount < $InterfaceToggleThreshold) { DisplayTermsUsingLists($Field, $Resource); } else { DisplayTermsUsingSearch($Field, $Resource); } } } else { ?>

GetByField($Field, TRUE); asort($CurrentValues); foreach ($CurrentValues as $Value) { $Qualifier = $Value->Qualifier(); print "
- "; print htmlspecialchars($Value->Name()); if ($Qualifier) { print " (".htmlspecialchars($Qualifier->Name()).")"; } print "
"; } ?>

0) { ?>
GetByField($Field); # retrieve all possible values if user can edit this field if ($IsEditable) { $Options = $Field->GetPossibleValues(); asort($Options); } # otherwise use just options that are set to display else { $Options = $SetOptions; } $MaxLength = 0; # determine the length of the longest value foreach ($Options as $OptionName) { $Length = strlen($OptionName); if ($Length > $MaxLength) { $MaxLength = $Length; } } # determine how many values per row based on length of longest value if ($MaxLength > 25) { $OptionsPerRow = 2; } else if ($MaxLength > 17) { $OptionsPerRow = 3; } else if ($MaxLength > 12) { $OptionsPerRow = 4; } else { $OptionsPerRow = 5; } # determine number of rows $OptionCount = count($Options); $NumberOfRows = intval(($OptionCount + ($OptionsPerRow - 1)) / $OptionsPerRow); ?> 1) { ?> class="cw-content-tallrow">
"; foreach ($Options as $OptionId => $OptionName) { ?>AllowMultiple()) { ?>" name="DBFieldName()."_".$OptionId."\""; if (in_array($OptionName, $SetOptions)) { print " checked"; } print " />"; ?> " > "; ?> \n"; $OptionsInThisRow++; if ($OptionsInThisRow == $OptionsPerRow) { print "
\n
"; $OptionsInThisRow = 0; } } if (!count($Options)) { print "(no options selected)"; } print "
"; ?> AllowMultiple()) { ?>
GetCountOfPossibleValues(); $Users = $Resource->Get($Field, TRUE); if (!is_array($Users)) { $Users = array($Users); } ?>

- Get("UserName")); ?>