Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1212 → Rev 1213

/trunk/plugins/viathinksoft/objectTypes/gs1/OIDplusGs1.class.php
202,7 → 202,9
$checkDigit = $this->checkDigit();
$content = '<h2>'._L('Barcode').' '.$chunked.' - <abbr title="'._L('check digit').'">'.$checkDigit.'</abbr></h2>';
$content .= '<p><a target="_blank" href="https://www.ean-search.org/?q='.htmlentities($this->fullNumber()).'">'._L('Lookup at ean-search.org').'</a></p>';
$content .= '<img src="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'barcode.php?number='.urlencode($this->fullNumber()).'">';
if (url_get_contents_available(true, $reason)) {
$content .= '<p><img alt="'._L('Barcode').'" src="' . OIDplus::webpath(__DIR__, OIDplus::PATH_RELATIVE) . 'barcode.php?number=' . urlencode($this->fullNumber()) . '"></p>';
}
$content .= $tech_info_html;
$content .= '<h2>'._L('Description').'</h2>%%DESC%%'; // TODO: add more meta information about the object type
} else {
/trunk/plugins/viathinksoft/objectTypes/gs1/barcode.php
35,7 → 35,13
$number = $_GET['number'];
$number = preg_replace("/[^0-9]/", "", $number);
$number = substr($number, 0, 20);
 
try {
$out = url_get_contents('https://bwipjs-api.metafloor.com/?bcid=code128&text='.urlencode($number).'&scale=1&includetext');
} catch (\Exception $e) {
http_response_code(500);
die();
}
 
if ($out === false) {
http_response_code(500);