3 # FILE: SPT--FileName.php
6 # FunctionName($Parameter, $Parameter)
7 # - brief description of function supplied for use in HTML file
10 # FunctionName($Parameter, $Parameter)
11 # - brief description of function that HTML file must supply
14 # FunctionName($Parameter, $Parameter)
15 # - brief description of function that HTML file may supply
17 # FORM FIELDS EXPECTED:
19 # - brief description of form field purpose and/or content
21 # Part of the Scout Portal Toolkit
22 # Copyright 2002 Internet Scout Project
23 # http://scout.cs.wisc.edu
26 require_once(
"include/SPT--Common.php");
29 require_once(
"include/SPT--MetadataSchema.php");
32 # ----- EXPORTED FUNCTIONS ---------------------------------------------------
34 # ----- LOCAL FUNCTIONS ------------------------------------------------------
38 $Fields = $Schema->GetFields();
39 foreach ($Fields as $Field)
41 printf(
"Id: %d<br>\n", $Field->Id());
42 printf(
"Name: %s<br>\n", $Field->Name());
43 printf(
"Type: %s<br>\n", $Field->Type());
49 print(
"<br>Creating schema...<br>");
52 print(
"<br>Listing fields...<br>");
55 print(
"<br>Adding field...<br>");
59 print(
"<br>Listing fields...<br>");
62 print(
"<br>Dropping field...<br>");
63 $Field = $Schema->GetFieldByName(
"TestFieldOne");
64 $Schema->DropField($Field->Id());
65 $Field = $Schema->GetFieldByName(
"TestFieldTwo");
66 $Schema->DropField($Field->Id());
68 print(
"<br>Listing fields...<br>");
73 # ----- MAIN -----------------------------------------------------------------
75 include(FindUIFile(
"include/SPT--StandardPageStart.html"));
77 include(FindUIFile(
"include/SPT--StandardPageEnd.html"));