<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/SpecLoans.php';
$retMsg = 0;
$loanId = $_REQUEST['loanid'];
$catalogNumber = $_REQUEST['catalognumber'];
$collId = $_REQUEST['collid'];
if ($loanId && $collId && $catalogNumber && is_numeric($loanId) && is_numeric($collId)) {
    if ($isAdmin || (array_key_exists("CollAdmin", $userRights) && in_array($collId, $userRights["CollAdmin"]) || array_key_exists("CollEditor", $userRights) && in_array($collId, $userRights["CollEditor"]))) {
        $loanManager = new SpecLoans();
        $retMsg = $loanManager->addSpecimen($loanId, $collId, $catalogNumber);
    }
}
echo $retMsg;
<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/SpecLoans.php';
require_once $serverRoot . '/classes/PhpWord/Autoloader.php';
$loanManager = new SpecLoans();
use PhpOffice\PhpWord\Autoloader;
use PhpOffice\PhpWord\Settings;
Autoloader::register();
Settings::loadConfig();
$collId = $_REQUEST['collid'];
$printMode = $_POST['print'];
$loanId = array_key_exists('loanid', $_REQUEST) ? $_REQUEST['loanid'] : 0;
$exchangeId = array_key_exists('exchangeid', $_REQUEST) ? $_REQUEST['exchangeid'] : 0;
$loanType = array_key_exists('loantype', $_REQUEST) ? $_REQUEST['loantype'] : 0;
$institution = array_key_exists('institution', $_POST) ? $_POST['institution'] : 0;
$international = array_key_exists('international', $_POST) ? $_POST['international'] : 0;
$accountNum = array_key_exists('mailaccnum', $_POST) ? $_POST['mailaccnum'] : 0;
$searchTerm = array_key_exists('searchterm', $_POST) ? $_POST['searchterm'] : '';
$displayAll = array_key_exists('displayall', $_POST) ? $_POST['displayall'] : 0;
$formSubmit = array_key_exists('formsubmit', $_POST) ? $_POST['formsubmit'] : '';
$export = false;
$exportEngine = '';
$exportExtension = '';
if ($printMode == 'doc') {
    $export = true;
    $exportEngine = 'Word2007';
    $exportExtension = 'docx';
}
if ($collId) {
    $loanManager->setCollId($collId);
Exemple #3
0
<?php

include_once '../../config/symbini.php';
include_once $serverRoot . '/classes/SpecLoans.php';
$collId = $_REQUEST['collid'];
$exchangeId = array_key_exists('exchangeid', $_REQUEST) ? $_REQUEST['exchangeid'] : 0;
$loanManager = new SpecLoans();
if ($collId) {
    $loanManager->setCollId($collId);
}
$transInstList = $loanManager->getTransInstList($collId);
if ($transInstList) {
    ?>
	<div id="exchangeToggle" style="float:right;margin:10px;">
		<a href="#" onclick="displayNewExchange()">
			<img src="../../images/add.png" alt="Create New Exchange" />
		</a>
	</div>
	<?php 
} else {
    echo '<script type="text/javascript">displayNewExchange();</script>';
}
?>
<div id="newexchangediv" style="display:<?php 
echo $transInstList ? 'none' : 'block';
?>
;width:550px;">
	<form name="newexchangegiftform" action="index.php" method="post" onsubmit="return verfifyExchangeAddForm(this)">
		<fieldset>
			<legend>New Gift/Exchange</legend>
			<div style="padding-top:10px;float:left;">
<?php

include_once '../../../config/symbini.php';
include_once $serverRoot . '/classes/SpecLoans.php';
require_once $serverRoot . '/classes/PhpWord/Autoloader.php';
$loanManager = new SpecLoans();
use PhpOffice\PhpWord\Autoloader;
use PhpOffice\PhpWord\Settings;
Autoloader::register();
Settings::loadConfig();
$collId = $_REQUEST['collid'];
$printMode = $_POST['print'];
$language = $_POST['languagedef'];
$loanId = array_key_exists('loanid', $_REQUEST) ? $_REQUEST['loanid'] : 0;
$exchangeId = array_key_exists('exchangeid', $_REQUEST) ? $_REQUEST['exchangeid'] : 0;
$loanType = array_key_exists('loantype', $_REQUEST) ? $_REQUEST['loantype'] : 0;
$international = array_key_exists('international', $_POST) ? $_POST['international'] : 0;
$searchTerm = array_key_exists('searchterm', $_POST) ? $_POST['searchterm'] : '';
$displayAll = array_key_exists('displayall', $_POST) ? $_POST['displayall'] : 0;
$formSubmit = array_key_exists('formsubmit', $_POST) ? $_POST['formsubmit'] : '';
$export = false;
$exportEngine = '';
$exportExtension = '';
if ($printMode == 'doc') {
    $export = true;
    $exportEngine = 'Word2007';
    $exportExtension = 'docx';
}
if ($collId) {
    $loanManager->setCollId($collId);
}
Exemple #5
0
$collId = $_REQUEST['collid'];
$loanId = array_key_exists('loanid', $_REQUEST) ? $_REQUEST['loanid'] : 0;
$exchangeId = array_key_exists('exchangeid', $_REQUEST) ? $_REQUEST['exchangeid'] : 0;
$loanType = array_key_exists('loantype', $_REQUEST) ? $_REQUEST['loantype'] : 0;
$searchTerm = array_key_exists('searchterm', $_POST) ? $_POST['searchterm'] : '';
$displayAll = array_key_exists('displayall', $_POST) ? $_POST['displayall'] : 0;
$formSubmit = array_key_exists('formsubmit', $_POST) ? $_POST['formsubmit'] : '';
$tabIndex = array_key_exists('tabindex', $_REQUEST) ? $_REQUEST['tabindex'] : 0;
$eMode = array_key_exists('emode', $_REQUEST) ? $_REQUEST['emode'] : 0;
$isEditor = 0;
if ($symbUid && $collId) {
    if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collId, $userRights["CollAdmin"]) || array_key_exists("CollEditor", $userRights) && in_array($collId, $userRights["CollEditor"])) {
        $isEditor = 1;
    }
}
$loanManager = new SpecLoans();
if ($collId) {
    $loanManager->setCollId($collId);
}
$statusStr = '';
if ($isEditor) {
    if ($formSubmit) {
        if ($formSubmit == 'Create Loan Out') {
            $statusStr = $loanManager->createNewLoanOut($_POST);
            $loanId = $loanManager->getLoanId();
            $loanType = 'out';
        } elseif ($formSubmit == 'Create Loan In') {
            $statusStr = $loanManager->createNewLoanIn($_POST);
            $loanId = $loanManager->getLoanId();
            $loanType = 'in';
        } elseif ($formSubmit == 'Create Exchange') {