Beispiel #1
0
<?php

/* This file handles the content of the browse page. */
require_once 'repository_fns.php';
session_start();
$disc_array = get_discipline();
do_html_header_browse();
do_page_content_browse($disc_array);
do_html_footer();
Beispiel #2
0
function display_edit_form($objid, $object_general, $object_rights, $object_lifecycle, $object_tech)
{
    echo $object_general['title'];
    ?>
  <form method="post" action="edit_this_metadata.php">
  <table>
    <tr>
      <td>Hidden:</td>
      <td><input type="hidden" name="objid" value="<?php 
    echo $objid;
    ?>
" /></td></tr>
    <tr>
      <td>Title:</td>
      <td><input type="text" name="newtitle" value="<?php 
    echo $object_general['title'];
    ?>
" /></td></tr>
    <tr>
      <td>Author:</td>
      <td><input type="text" name="newauthor" value="<?php 
    echo $object_general['author'];
    ?>
"/></td></tr>
     <tr>
              <td>Discipline</td>
              <td valign="top">
                <select name="newdiscipline" size="1">
                  <?php 
    $disc_array = get_discipline();
    foreach ($disc_array as $thisdisc) {
        echo "<option value=\"" . $thisdisc['discname'] . "\"";
        if ($thisdisc['discname'] == $object_general['discipline']) {
            echo "selected";
        }
        echo ">" . $thisdisc['discname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
         <tr>
              <td>Language</td>
              <td valign="top">
                <select name="newlanguage" size="1">
                  <?php 
    $lang_array = get_language();
    foreach ($lang_array as $thislang) {
        echo "<option value=\"" . $thislang['langname'] . "\"";
        if ($thislang['langname'] == $object_general['language']) {
            echo "selected";
        }
        echo ">" . $thislang['langname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
    <tr>
      <td>Keyword:</td>
      <td><input type="text" name="newkeyword" value="<?php 
    echo $object_general['keyword'];
    ?>
" /></td></tr> 
    <tr>
              <td>Structure</td>
              <td valign="top">
                <select name="newstructure" size="1">
                  <?php 
    $struct_array = get_structure();
    foreach ($struct_array as $thisstruct) {
        echo "<option value=\"" . $thisstruct['structname'] . "\"";
        if ($thisstruct['structname'] == $object_general['structure']) {
            echo "selected";
        }
        echo ">" . $thisstruct['structname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
     <tr>
              <td>Aggregation Level</td>
              <td valign="top">
                <select name="newaggrelvl" size="1">
                  <?php 
    $aggrelvl_array = get_aggrelvl();
    foreach ($aggrelvl_array as $thisaggrelvl) {
        echo "<option value=\"" . $thisaggrelvl['aggrelvlname'] . "\"";
        if ($thisaggrelvl['aggrelvlname'] == $object_general['aggregation_level']) {
            echo "selected";
        }
        echo ">" . $thisaggrelvl['aggrelvlname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
    <tr>
      <td>Version:</td>
      <td><input type="text" name="newversion" value="<?php 
    echo $object_lifecycle['version'];
    ?>
" /></td></tr>
     <tr>
              <td>Status</td>
              <td valign="top">
                <select name="newstatus" size="1">
                  <?php 
    $status_array = get_status();
    foreach ($status_array as $thisstatus) {
        echo "<option value=\"" . $thisstatus['statusname'] . "\"";
        if ($thisstatus['statusname'] == $object_lifecycle['status']) {
            echo "selected";
        }
        echo ">" . $thisstatus['statusname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr> 
    <tr>
              <td>Interactivity Type</td>
              <td valign="top">
                <select name="newinteracttype" size="1">
                  <?php 
    $intertype_array = get_intertype();
    foreach ($intertype_array as $thisintertype) {
        echo "<option value=\"" . $thisintertype['intertypename'] . "\"";
        if ($thisintertype['intertypename'] == $object_general['interactivity_type']) {
            echo "selected";
        }
        echo ">" . $thisintertype['intertypename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>            
    <tr>
              <td>Learning Resource Type</td>
              <td valign="top">
                <select name="newresourcetype" size="1">
                  <?php 
    $resourcetype_array = get_resourcetype();
    foreach ($resourcetype_array as $thisresourcetype) {
        echo "<option value=\"" . $thisresourcetype['resourcetypename'] . "\"";
        if ($thisresourcetype['resourcetypename'] == $object_general['learning_res_type']) {
            echo "selected";
        }
        echo ">" . $thisresourcetype['resourcetypename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>    
   <tr>
              <td>Interactivity Level</td>
              <td valign="top">
                <select name="newinteractlvl" size="1">
                  <?php 
    $interactlvl_array = get_interactlvl();
    foreach ($interactlvl_array as $thisinteractlvl) {
        echo "<option value=\"" . $thisinteractlvl['interactlvlname'] . "\"";
        if ($thisinteractlvl['interactlvlname'] == $object_general['interactivity_level']) {
            echo "selected";
        }
        echo ">" . $thisinteractlvl['interactlvlname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>    
   <tr>
              <td>Intended End User Role</td>
              <td valign="top">
                <select name="newenduserrole" size="1">
                  <?php 
    $enduserrole_array = get_enduserrole();
    foreach ($enduserrole_array as $thisenduserrole) {
        echo "<option value=\"" . $thisenduserrole['enduserrolename'] . "\"";
        if ($thisenduserrole['enduserrolename'] == $object_general['intended_end_user_role']) {
            echo "selected";
        }
        echo ">" . $thisenduserrole['enduserrolename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
   <tr>
      <td>Typical Learning Time:</td>
      <td><input type="text" name="newlearningtime" value="<?php 
    echo $object_general['typical_learning_time'];
    ?>
" /></td></tr>        
   <tr>
              <td>Cost</td>
              <td valign="top">
                <select name="newcost" size="1">
                  <?php 
    $cost_array = get_cost();
    foreach ($cost_array as $thiscost) {
        echo "<option value=\"" . $thiscost['costname'] . "\"";
        if ($thiscost['costname'] == $object_rights['cost']) {
            echo "selected";
        }
        echo ">" . $thiscost['costname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>  
   <tr>
              <td>Copyrights and Other Restrictions</td>
              <td valign="top">
                <select name="newcopyright" size="1">
                  <?php 
    $copyright_array = get_copyright();
    foreach ($copyright_array as $thiscopyright) {
        echo "<option value=\"" . $thiscopyright['copyrightname'] . "\"";
        if ($thiscopyright['copyrightname'] == $object_rights['copyrights_and_other_res']) {
            echo "selected";
        }
        echo ">" . $thiscopyright['copyrightname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr> 
                                             
   </table>
   <div class="page-header">
   <p></p>
   </div>
   <button class="btn btn-primary" type="submit">Update Object</button>
   </form>
   
   
 <?php 
}