Exemplo n.º 1
0
    $exportExtension = 'docx';
}
$sectionStyle = array();
if ($rowsPerPage == 1) {
    $lineWidth = 740;
    $sectionStyle = array('pageSizeW' => 12240, 'pageSizeH' => 15840, 'marginLeft' => 360, 'marginRight' => 360, 'marginTop' => 360, 'marginBottom' => 360, 'headerHeight' => 0, 'footerHeight' => 0);
}
if ($rowsPerPage == 2) {
    $lineWidth = 350;
    $sectionStyle = array('pageSizeW' => 12240, 'pageSizeH' => 15840, 'marginLeft' => 360, 'marginRight' => 360, 'marginTop' => 360, 'marginBottom' => 360, 'headerHeight' => 0, 'footerHeight' => 0, 'colsNum' => 2, 'colsSpace' => 690, 'breakType' => 'continuous');
}
if ($rowsPerPage == 3) {
    $lineWidth = 220;
    $sectionStyle = array('pageSizeW' => 12240, 'pageSizeH' => 15840, 'marginLeft' => 360, 'marginRight' => 360, 'marginTop' => 360, 'marginBottom' => 360, 'headerHeight' => 0, 'footerHeight' => 0, 'colsNum' => 3, 'colsSpace' => 690, 'breakType' => 'continuous');
}
$labelManager->setCollid($collid);
$isEditor = 0;
if ($symbUid) {
    if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"]) || array_key_exists("CollEditor", $userRights) && in_array($collid, $userRights["CollEditor"])) {
        $isEditor = 1;
    }
}
if ($isEditor && $action) {
    $labelArr = $labelManager->getLabelArray($_POST['occid'], $speciesAuthors);
}
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$phpWord->addParagraphStyle('firstLine', array('lineHeight' => 0.1, 'spaceAfter' => 0, 'keepNext' => true, 'keepLines' => true));
$phpWord->addParagraphStyle('lastLine', array('spaceAfter' => 300, 'lineHeight' => 0.1));
$phpWord->addFontStyle('dividerFont', array('size' => 1));
$phpWord->addParagraphStyle('barcodeonly', array('align' => 'center', 'lineHeight' => 1.0, 'spaceAfter' => 300, 'keepNext' => true, 'keepLines' => true));
$phpWord->addParagraphStyle('lheader', array('align' => 'center', 'lineHeight' => 1.0, 'spaceAfter' => 150, 'keepNext' => true, 'keepLines' => true));
Exemplo n.º 2
0
<?php

include_once '../../config/symbini.php';
@(include_once 'Image/Barcode.php');
@(include_once 'Image/Barcode2.php');
include_once $serverRoot . '/classes/OccurrenceLabel.php';
header("Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ../../profile/index.php?refurl=../collections/reports/labelmanager.php?' . $_SERVER['QUERY_STRING']);
}
$collid = $_REQUEST["collid"];
$tabTarget = array_key_exists('tabtarget', $_REQUEST) ? $_REQUEST['tabtarget'] : 0;
$action = array_key_exists('submitaction', $_REQUEST) ? $_REQUEST['submitaction'] : '';
$datasetManager = new OccurrenceLabel();
$datasetManager->setCollid($collid);
$reportsWritable = false;
if (is_writable($serverRoot . '/temp/report')) {
    $reportsWritable = true;
}
$isEditor = 0;
$occArr = array();
$annoArr = array();
if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collid, $userRights["CollAdmin"])) {
    $isEditor = 1;
} elseif (array_key_exists("CollEditor", $userRights) && in_array($collid, $userRights["CollEditor"])) {
    $isEditor = 1;
}
if ($isEditor) {
    $annoArr = $datasetManager->getAnnoQueue();
    if ($action == "Filter Specimen Records") {
        $occArr = $datasetManager->queryOccurrences($_POST);