[Archon-L] Question about controlcard.inc.php

Chris Prom prom at uiuc.edu
Fri Apr 13 12:57:20 MDT 2007


Yes, this file was incorrectly included in the release, it causes 
certain display based on conditions here at UIUC.

We've updated the code for the next release, in the meantime, you 
can use the attached file to replace the current 
controlcard.inc.php in the templates/default folder.

Using this tempalte there will not be any display of locations, 
unless a user is authenticated, however, as Mickey point out, you 
can hack in a display here relatively easily.

Thanks,

Chris

--

Christopher J. Prom
Assistant University Archivist
University of Illinois Archives
19 Library
1408 W. Gregory Dr.
Urbana, IL 61801

phone:	217.333.0798
fax:	217.333.2868
e-mail:	prom at uiuc.edu
web:	http://web.library.uiuc.edu/ahx

On Fri, 13 Apr 2007, Mickey Soltys wrote:

> I noticed that there are some addresses hard coded in the default
> version of controlcard.inc.php. The code is as follows and starts around
> line 548:
>
> <?php
> 	foreach ($objCollection->LocationEntries as $loc)
> 	{
> ?>
> 			<tr>
> 			<td><?php echo($loc->Content);?></td> <?php
> 		if ($loc->LocationID<5 || ($loc->LocationID>7 and
> $loc->LocationID<22) )
> 			{
> ?>
> 			<td>Archives Research Center, 1707 S.
> Orchard</td>
>
> <?php
> 			}
> 		elseif ($loc->LocationID==23)
> 			{
> ?>
> 			<td>SACAM, Band Building</td>
>
> <?php
> 			}
>
> 		elseif ($loc->LocationID>=27)
> 			{
> ?>
> 			<td>19 Library, 1408 W. Gregory Drive</td>
>
>
> Has anyone else noticed this? I had to hack this to display the correct
> address for our institution. Is there a plan to incorporate these
> locations into the Archon database?
>
> Thanks,
>
> Mickey Soltys
> Morris Library
> Southern Illinois University
> Carbondale, IL
>
> _______________________________________________
> Archon mailing list
> Archon at archon.org
> http://archon.org/mailman/listinfo/archon_archon.org
>
-------------- next part --------------
<?php
/**
 * Control Card template
 *
 * The variable:
 *
 *  $objCollection
 *
 * is an instance of a Collection object, with its properties
 * already loaded when this template is referenced.
 *
 * Refer to the Collection class definition in lib/collection.inc.php
 * for available properties and methods.
 *
 * The Archon API is also available through the variable:
 *
 *  $_ARCHON
 *
 * Refer to the Archon class definition in lib/archon.inc.php
 * for available properties and methods.
 *
 * @package Archon
 * @author Chris Rishel
 */
$objCollection->dbLoadDigitalContent();

$objCollection = map_recursive('ampentity', $objCollection);
$objCollection = map_recursive('ptag', $objCollection);

?>
<span style='font-size:14pt;font-weight=bold'><?php echo($objCollection->toString()); ?></span><br><br>
<?php
if($objCollection->Classification)
{
?>
<span style='font-weight:bold'>Record Series Number:</span> <?php echo($objCollection->Classification->toString(LINK_NONE, true, false, true, false)); ?>/<?php echo($objCollection->CollectionIdentifier); ?><br>
<?php
}



if($objCollection->Extent)
{
?>
<b>Volume:</b> <?php echo($objCollection->Extent); ?> <?php echo($objCollection->ExtentUnits); ?><br>
<?php
}

?>
<?php

if($objCollection->Arrangement)
{
?>
<b>Arrangement:</b> <?php echo($objCollection->Arrangement); ?><br>
<?php
}
?>
<br>
<?php


if($objCollection->Scope)
{
?>
<b>Description:</b> <?php echo($objCollection->Scope); ?><br><br>
<?php
}

if($objCollection->Content)
{
?>
<table width="500" border=0 cellpadding=0 cellspacing=0>
  <tr>
    <td width='150'><b>Box List:</b></td>
    <td><a href='findingaid.php?id=<?php echo($objCollection->ID); ?>&q=<?php echo($_ARCHON->QueryStringURL); ?>'>Formatted</a>&nbsp;&nbsp;&nbsp;<span style='font-weight:bold'>or</span>&nbsp;&nbsp;&nbsp;<a href='findingaid.php?id=<?php echo($objCollection->ID); ?>&amp;nostyle=1'>Printer-friendly</a></td>
  </tr>
</table>
<br>
<?php
}
else if($objCollection->OtherURL)
{
?>
<b><a href='<?php echo($objCollection->OtherURL); ?>'>View Box List</a> (PDF)</b>
<br><br>
<?php
}
else
{

}
?>

<table width="100%" border=0 cellpadding=0 cellspacing=2>
<?php
if($objCollection->AcquisitionDate || $objCollection->AccrualInfo)
{
?>
  <tr>
    <td width="150" valign="top"><b>Acquired:</b></td><td>

<?php
    if($objCollection->AcquisitionDate)
    {
    	echo($objCollection->AcquisitionDateMonth . '/' . $objCollection->AcquisitionDateDay . '/' . $objCollection->AcquisitionDateYear . ".  ");
    }
    if ($objCollection->AccrualInfo)
    {
    	echo($objCollection->AccrualInfo);
    }
?>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
}

if(!empty($objCollection->Subjects))
{
    $GenreSubjectTypeID = $_ARCHON->getSubjectTypeIDFromString('Genre/Form of Material');

    foreach($objCollection->Subjects as $objSubject)
    {
        if($objSubject->SubjectTypeID == $GenreSubjectTypeID)
        {
            $arrGenres[$objSubject->ID] = $objSubject;
        }
        else
        {
            $arrSubjects[$objSubject->ID] = $objSubject;
        }
    }

    if(!empty($arrSubjects))
    {
?>
  <tr>
    <td width="150" valign="top"><b>Subjects:</b></td>
    <td><a href='#' onClick="toggleDisplay('subjects'); return false;"><img id='subjectsImage' border='0' src='images/plus.gif'> Expand Subjects</a></td>
  </tr>
  <tr style="display: none;" id="subjectsResults">
    <td width="150">&nbsp;</td>
    <td>
      <?php echo($_ARCHON->createStringFromSubjectArray($arrSubjects, "<br>\n", LINK_TOTAL)); ?>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
    }

    if(!empty($arrGenres))
    {
?>
  <tr>
    <td width="150" valign="top"><b>Genres:</b></td>
    <td>
      <?php echo($_ARCHON->createStringFromSubjectArray($arrGenres, '</td></tr><tr><td>&nbsp;</td><td>', LINK_TOTAL)); ?>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
    }
}
else
{
?>
  <tr>
    <td width="150" valign="top"><b>Subjects:</b></td>
    <td>None currently listed</td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
}

if(!empty($objCollection->DigitalContent))
{
?>
  <tr>
    <td width="150" valign="top"><b>Digital Content:</b></td>
    <td><a href='#' onClick="toggleDisplay('digitalcontent'); return false;"><img id='digitalcontentImage' border='0' src='images/plus.gif'> Expand Digital Content</a></td>
  </tr>
  <tr style="display: none;" id="digitalcontentResults">
    <td width="150">&nbsp;</td>
    <td>
      <?php echo($_ARCHON->createStringFromDigitalContentArray($objCollection->DigitalContent, "<br>\n", LINK_TOTAL)); ?>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
}

if(!empty($objCollection->Creators))
{
?>
  <tr>
    <td width="150" valign="top"><b>Creator(s):</b></td>
    <td>
      <?php echo($_ARCHON->createStringFromCreatorArray($objCollection->Creators, '</td></tr><tr><td>&nbsp;</td><td>', LINK_TOTAL)); ?>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php

    if($objCollection->PrimaryCreator->BiogHist)
    {
?>
  <tr>
    <td width="150" valign="top"><b>Biographical/Historical Note:</b></td>
    <td>
      <a href='#' onClick="toggleDisplay('BiogHist'); return false;"><img id='BiogHistImage' border='0' src='images/plus.gif'> Expand Note</a><br>
      <span id='BiogHistResults' style='display: none;'><br>
      <b></b> <?php echo($objCollection->PrimaryCreator->BiogHist); ?>
      </span>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
    }
}
?>
<?php
if(!empty($objCollection->Languages))
{
?>
  <tr>
    <td width="150" valign="top"><b>Records are in:</b></td>
    <td>
      <?php echo($_ARCHON->createStringFromLanguageArray($objCollection->Languages, '</td></tr><tr><td>&nbsp;</td><td>', LINK_TOTAL)); ?>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
else
{
}
?>
  <tr>
    <td width="150" valign="top"><b>Adminstrative Information:</b></td>
    <td><a href='#' onClick="toggleDisplay('otherinformation'); return false;"><img id='otherinformationImage' border='0' src='images/plus.gif'> Expand Information</a><br></td>
  </tr>
  <tr>
    <td colspan=2>&nbsp;</td>
  </tr>
  <tr style="display: none;" id="otherinformationResults">
    <td colspan=2>
      <table width=100%>
<?php
if($objCollection->AccessRestrictions)
{
?>
        <tr>
          <td width="150"><b>Access Restrictions</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->AccessRestrictions); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->UseRestrictions)
{
?>
        <tr>
          <td width="150"><b>Use Restrictions</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->UseRestrictions); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->PhysicalAccess)
{
?>
        <tr>
          <td width="150"><b>Physical Access Note</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->PhysicalAccess); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->TechnicalAccess)
{
?>
        <tr>
          <td width="150"><b>Technical Access Note</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->TechnicalAccess); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->AcquisitionSource)
{
?>
        <tr>
          <td width="150"><b>Acquisition Source</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->AcquisitionSource); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->AcquisitionMethod)
{
?>
        <tr>
          <td width="150"><b>Acquisition Method</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->AcquisitionMethod); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}if($objCollection->AppraisalInformation)
{
?>
        <tr>
          <td width="150"><b>Appraisal Information</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->AppraisalInformation); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->CustodialHistory)
{
?>
        <tr>
          <td width="150"><b>Custodial History</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->CustodialHistory); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->OrigCopiesNote || $objCollection->OrigCopiesURL)
{
?>
        <tr>
          <td width="150"><b>Original/Copies Note:</b></td>
        </tr>
        <tr>
          <td>
<?php
    if($objCollection->OrigCopiesNote)
    {
        echo($objCollection->OrigCopiesNote . "<br>\n");
    }
    if($objCollection->OrigCopiesURL)
    {
        echo("For more information please see <a href='$objCollection->OrigCopiesURL'>$objCollection->OrigCopiesURL</a>.");
    }
?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->RelatedMaterials || $objCollection->RelatedMaterialsURL)
{
?>
        <tr>
          <td width="150"><b>Related Materials:</b></td>
        </tr>
        <tr>
          <td>
<?php
    if($objCollection->RelatedMaterials)
    {
        echo($objCollection->RelatedMaterials . "<br>\n");
    }
    if($objCollection->RelatedMaterialsURL)
    {
        echo("For more information please see <a href='$objCollection->RelatedMaterialURL'>$objCollection->RelatedMaterialsURL</a>.");
    }
?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->RelatedPublications)
{
?>
        <tr>
          <td width="150"><b>Related Publications</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->RelatedPublications); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->PreferredCitation)
{
?>
        <tr>
          <td width="150"><b>Preferred Citation</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->PreferredCitation); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->OtherNote || $objCollection->OtherURL)
{
?>
        <tr>
          <td width="150"><b>Other Information:</b></td>
        </tr>
        <tr>
          <td>
<?php
    if($objCollection->OtherNote)
    {
        echo($objCollection->OtherNote . "<br>\n");
    }
    if($objCollection->OtherURL)
    {
        echo("For more information please see <a href='$objCollection->OtherURL'>$objCollection->OtherURL</a>.");
    }
?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->ProcessingInfo)
{
?>
        <tr>
          <td width="150"><b>Finding Aid Processing Information:</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->ProcessingInfo); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
if($objCollection->RevisionHistory)
{
?>
        <tr>
          <td width="150"><b>Finding Aid Revision History</b></td>
        </tr>
        <tr>
          <td>
            <?php echo($objCollection->RevisionHistory); ?>
          </td>
        </tr>
        <tr><td colspan=2>&nbsp;</td></tr>
<?php
}
?>
      </table>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>

<?php
if($_ARCHON->Security->isAuthenticated())
{
    if(!empty($objCollection->LocationEntries))
    {
?>
  <tr>
    <td width="150" valign="top"><b>Location:</b></td>
    <td>
      <table width="100%" border="1">
        <tr>
          <th>Boxes</th>
          <th>Location</th>
          <th>Range</th>
          <th>Section</th>
          <th>Shelf</th>
          <th>Extent</th>
        </tr>
        <tr>
          <td>
            <?php echo($_ARCHON->createStringFromLocationEntryArray($objCollection->LocationEntries, '&nbsp;</td></tr><tr><td>', LINK_EACH, false, '&nbsp;</td><td>')); ?>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr><td colspan=2>&nbsp;</td></tr>
<?php
    }
    else
    {
?>
  <tr><td colspan=2>No locations are listed for this collection.</td></tr>
<?php
    }
}
?>
</table>

<?php
if($_ARCHON->Security->isAuthenticated())
{
?>
<hr width='20%' align='left'>
<b>Staff views:</b><br>
&nbsp;&nbsp;&nbsp;<b><a href='ead.php?id=<?php echo($objCollection->ID); ?>'>EAD/XML</a></b><br>
&nbsp;&nbsp;&nbsp;<b><a href='marc.php?id=<?php echo($objCollection->ID); ?>'>MARC</a></b><br>
&nbsp;&nbsp;&nbsp;<b><a href='controlcard.php?id=<?php echo($objCollection->ID); ?>&template=printcontrolcard&nostyle=1'>Printable Control Card</a></b><br>
&nbsp;&nbsp;&nbsp;<b><a href='controlcard.php?id=<?php echo($objCollection->ID); ?>&template=draftcontrolcard&nostyle=1'>Draft Control Card</a></b>
<?php
}
?>


More information about the Archon mailing list