Example #1
0
echo _("Limit by Expression Type:");
?>
</b>&nbsp;

			<select name='expressionTypeID' id='expressionTypeID' style='width:200px;'>

			<?php 
$display = array();
$expressionType = new ExpressionType();
$expressionTypeArray = $expressionType->allAsArray();
foreach ($expressionTypeArray as $display) {
    echo "<option value='" . $display['expressionTypeID'] . "'>" . $display['shortName'] . "</option>";
}
//get the first expression type so we know what to do with qualifier
$expressionTypeID = $expressionTypeArray[0]['expressionTypeID'];
$expressionType = new ExpressionType(new NamedArguments(array('primaryKey' => $expressionTypeID)));
$qualifierArray = array();
$qualifierArray = $expressionType->getQualifiers();
?>

			</select>

			</div>

			<div class="right-element" id='div_Qualifiers'>



			<?php 
if (count($qualifierArray) > 0) {
    ?>
     }
     break;
 case 'deleteUser':
     $loginID = $_GET['loginID'];
     $user = new User(new NamedArguments(array('primaryKey' => $loginID)));
     echo "<font color='red'>";
     try {
         $user->delete();
     } catch (Exception $e) {
         echo $e->getMessage();
     }
     echo "</font>";
     break;
 case 'deleteExpressionType':
     $expressionTypeID = $_GET['expressionTypeID'];
     $expressionType = new ExpressionType(new NamedArguments(array('primaryKey' => $expressionTypeID)));
     echo "<font color='red'>";
     try {
         $expressionType->removeExpressionType();
     } catch (Exception $e) {
         echo $e->getMessage();
     }
     echo "</font>";
     break;
     //verify file name for uploaded attachments (4th tab) aren't already being used
 //verify file name for uploaded attachments (4th tab) aren't already being used
 case 'checkUploadAttachment':
     $uploadAttachment = $_POST['uploadAttachment'];
     $attachmentFile = new AttachmentFile();
     $exists = 0;
     if (!is_writable("attachments")) {
Example #3
0
         $expressionObj->lastUpdateDate = "0000-00-00 00:00:00";
         $expressionObj->productionUseInd = "0";
         $expressionObj->save();
         $expressionID = $expressionObj->primaryKey;
     }
 }
 if ($_POST['generalTerms'] === "on") {
     foreach ($xml->GeneralTerms->GeneralTerm as $generalTerm) {
         //get the expressionTypeID -- create expressionType if necessary
         $expression = preg_replace('/^onixPL\\:/s', '', $generalTerm->GeneralTermType);
         $index = searchForShortName($expression, $expressionTypeArray);
         if ($index !== null) {
             $expressionTypeID = $expressionTypeArray[$index]['expressionTypeID'];
             $expressionTypeObj = new ExpressionType(new NamedArguments(array('primaryKey' => $expressionTypeID)));
         } else {
             $expressionTypeObj = new ExpressionType();
             $expressionTypeObj->shortName = $expression;
             $expressionTypeObj->noteType = "Internal";
             $expressionTypeObj->save();
             $expressionTypeID = $expressionTypeObj->primaryKey;
             $expressionTypeArray = $expressionTypeObj->allAsArray();
             $expressionTypeInserted++;
         }
         $expressionObj = new Expression();
         $expressionObj->documentID = $documentID;
         $expressionObj->expressionTypeID = $expressionTypeID;
         $expressionText = "";
         foreach ($generalTerm->LicenseTextLink as $licenseTextLink) {
             $expressionText .= $textArray[(string) $licenseTextLink["href"]] . "\n\n";
         }
         $expressionObj->documentText = $expressionText;

<table class="headerTable">
<tr><td>
<br />

<b><?php 
echo _("Limit by Expression Type:");
?>
</b>

<select name='expressionTypeID' id='expressionTypeID' onchange='javascript:updateTermsReport();'>

<?php 
$display = array();
$expressionType = new ExpressionType();
foreach ($expressionType->allAsArray() as $display) {
    if ($display['noteType'] == 'Display' && $display['shortName'] != "Interlibrary Loan (additional notes)") {
        if ($display['shortName'] == "Interlibrary Loan") {
            echo "<option value='" . $display['expressionTypeID'] . "' selected>" . $display['shortName'] . "</option>";
        } else {
            echo "<option value='" . $display['expressionTypeID'] . "'>" . $display['shortName'] . "</option>";
        }
    }
}
?>

</select>


<br />
Example #5
0
                     $displayHTML .= "<a href='javascript:void(0);' class='hideText smallLink' value='" . $expression->expressionID . "_" . $i . "'><img src='images/arrowdown.gif'></a>&nbsp;&nbsp;<a href='javascript:void(0);' class='hideText' value='" . $expression->expressionID . "_" . $i . "'>hide license snippet</a><br />";
                     $displayHTML .= "<div class='shaded' style='margin-top: 5px; padding:5px 5px 5px 18px;'>From the license agreement ({$effectiveDate}):<br><br><i>" . nl2br($expression->documentText) . "</i></div>";
                     $displayHTML .= "</div>";
                 }
                 $displayHTML .= "</div>";
                 //end expression loop
             }
             //end expression count
         }
         //target foreach loop
     }
     $displayHTML .= "</div>";
     //expression type ID was not passed in - find out what expression types are available for these targets and prompt
 } else {
     $pageTitle = "Select Expression Type";
     $expressionTypeObj = new ExpressionType();
     $targetArray = array();
     $uniqueExpressionTypeArray = array();
     foreach ($targetsArray as $i => $targetArray) {
         $expressionTypeArray = $expressionTypeObj->getExpressionTypesByResource($targetArray['public_name']);
         //loop through each displayable expression type and add to final array
         foreach ($expressionTypeArray as $expressionTypeID) {
             $uniqueExpressionTypeArray[] = $expressionTypeID;
         }
         //end target loop
     }
     //make sure expression type IDs are unique
     $uniqueExpressionTypeArray = array_unique($uniqueExpressionTypeArray);
     if (count($uniqueExpressionTypeArray) == 0) {
         $displayHTML = "Sorry, no available license expressions have been located in CORAL Licensing.";
     } else {