Skip to content
Permalink
Browse files

Updates

* JpGraph library updated
* Scenes: auto-scale setting (fit, width, height)
* CONNECT: full menu render removed
* Menu: element style reset on update fixed
* "Unknown command" message removed
  • Loading branch information...
sergejey committed Aug 29, 2019
1 parent 2460e5b commit aedb5a160731e46ee0a7784b61f29a97aaeffb46
Showing with 1,465 additions and 1,206 deletions.
  1. +63 −0 3rdparty/jpgraph/README
  2. +281 −0 3rdparty/jpgraph/barcode/mkbarcode.php
  3. BIN 3rdparty/jpgraph/flags.dat
  4. BIN 3rdparty/jpgraph/flags_thumb100x100.dat
  5. BIN 3rdparty/jpgraph/flags_thumb35x35.dat
  6. BIN 3rdparty/jpgraph/flags_thumb60x60.dat
  7. +27 −25 3rdparty/jpgraph/gd_image.inc.php
  8. +460 −453 3rdparty/jpgraph/index.php
  9. +228 −323 3rdparty/jpgraph/jpgraph.php
  10. +16 −27 3rdparty/jpgraph/jpgraph_bar.php
  11. +8 −16 3rdparty/jpgraph/jpgraph_canvas.php
  12. +1 −1 3rdparty/jpgraph/jpgraph_errhandler.inc.php
  13. +4 −7 3rdparty/jpgraph/jpgraph_flags.php
  14. +2 −2 3rdparty/jpgraph/jpgraph_gradient.php
  15. +1 −1 3rdparty/jpgraph/jpgraph_line.php
  16. +1 −1 3rdparty/jpgraph/jpgraph_log.php
  17. +4 −2 3rdparty/jpgraph/jpgraph_pie.php
  18. +17 −25 3rdparty/jpgraph/jpgraph_pie3d.php
  19. +6 −8 3rdparty/jpgraph/jpgraph_polar.php
  20. +1 −1 3rdparty/jpgraph/jpgraph_scatter.php
  21. +10 −4 3rdparty/jpgraph/jpgraph_table.php
  22. +1 −2 3rdparty/jpgraph/themes/AquaTheme.class.php
  23. +6 −2 3rdparty/jpgraph/themes/GreenTheme.class.php
  24. +6 −2 3rdparty/jpgraph/themes/OceanTheme.class.php
  25. +6 −2 3rdparty/jpgraph/themes/OrangeTheme.class.php
  26. +6 −2 3rdparty/jpgraph/themes/PastelTheme.class.php
  27. +6 −2 3rdparty/jpgraph/themes/RoseTheme.class.php
  28. +6 −2 3rdparty/jpgraph/themes/SoftyTheme.class.php
  29. +1 −2 3rdparty/jpgraph/themes/UniversalTheme.class.php
  30. +6 −2 3rdparty/jpgraph/themes/VividTheme.class.php
  31. +4 −1 languages/default.php
  32. +4 −1 languages/ru.php
  33. +198 −206 lib/hooks.inc.php
  34. +2 −2 pChart/index.php
  35. +53 −72 scripts/cycle_connect.php
  36. +1 −0 templates/commands/menu.tpl
  37. +16 −5 templates/scenes/scenes.tpl
  38. +13 −5 templates/scenes/scenes_edit_default.html
@@ -0,0 +1,63 @@
README FOR JPGRAPH 4.2.8
=========================

This package contains the JpGraph PHP library version 4.2.8

The library is Copyright (C) 2000-2010 Asial Corporatoin and
released under dual license QPL 1.0 for open source and educational
use and JpGraph Professional License for commercial use.

Please see full license details at
http://jpgraph.net/pro/
http://jpgraph.net/download/


Requirements:
-------------
Miminum:
* PHP 5.1.0 or higher
* GD 2.0.28 or higher
Note: Earlier versions might work but is unsupported.

Recommended:
* >= PHP 5.2.0
* PHP Builtin GD library

Installation
------------
1. Make sure that the PHP version is compatible with the stated
requirements and that the PHP installation has support for
the GD library. Please run phpinfo() to check if GD library
is supported in the installation.
If the GD library doesn't seem to be installed
please consult the PHP manual under section "Image" for
instructions on where to find this library. Please refer to
the manual section "Verifying your PHP installation"

2. Unzip and copy the files to a directory of your choice where Your
httpd sever can access them.
For a global site installation you should copy the files to
somewhere in the PHP search path.

3. Check that the default directory paths in jpg-config.inc.php
for cache directory and TTF directory suits your installation.
Note1: The default directories are different depending on if
the library is running on Windows or UNIX.
Note2: Apache/PHP must have write permission to your cache
directory if you enable the cache feature. By default the cache
is disabled.


Documentation
-------------
The installation includes HTML documentation and reference guide for the
library. The portal page for all documentation is
<YOUR-INSTALLATION-DIRECTORY>/docs/index.html


Bug reports and suggestions
---------------------------
Should be reported using the contact form at

http://jpgraph.net/contact/

@@ -0,0 +1,281 @@
<?php
require_once('jpgraph/jpgraph_barcode.php');
/*=======================================================================
// File: MKBARCODE.PHP
// Description: Comman line tool to generate linear barcodes
// Created: 2009-06-20
// Ver: $Id: mkbarcode.php 1455 2009-07-03 18:52:25Z ljp $
//
// Copyright (c) Asial Corporation. All rights reserved.
//=======================================================================
*/
//----------------------------------------------------------------------
// CLASS ParseArgs
// Parse command line arguments and make sanity checks
//----------------------------------------------------------------------
class ParseArgs {
var $argc,$argv;
function ParseArgs() {
// Get command line argument
$this->argv = ($_SERVER['argv']);
$this->argc = ($_SERVER['argc']);
}
function PrintUsage() {
$n = $this->argv[0];
echo "$n -b <symbology> [-r -h -c -o <output format> -m <width> -s <scale> -y <height> -f <filename> ] datastring \n".
"Create the specified barcode\n".
"-b What symbology to use, one of the following strings (case insensitive)\n".
" UPCA \n".
" UPCE \n".
" EAN128 \n".
" EAN13 \n".
" EAN8 \n".
" CODE11 \n".
" CODE39 \n".
" CODE128 \n".
" CODE25 \n".
" CODEI25 \n".
" CODABAR \n".
" BOOKLAND \n".
"-c Add checkdigit for symbologies where this is optional\n".
"-o Output format. 0=Image, 1=PS, 2=EPS\n".
"-m Module width\n".
"-s Scale factor\n".
"-h Show this help\n".
"-f Filename to write to\n".
"-r Rotate barcode 90 degrees\n".
"-y height Set height in pixels\n".
"-x Hide the human readable text\n".
"--silent Silent. Don't give any error mesages\n";
exit(1);
}
function Get() {
$barcode='code39';
$hide=false;
$checkdigit=false;
$modulewidth=2;
$scale=1;
$output=0;
$filename='';
$data = '';
$rotate = false;
$silent=false;
$height = 70;
if( ($n=$this->GetNum()) > 0 ) {
$i=1;
while( $i <= $n ) {
switch( $this->argv[$i] ) {
case '-h':
$this->PrintUsage();
exit(0);
break;
case '-b':
$barcode = $this->argv[++$i];
break;
case '-o':
$output = (int)$this->argv[++$i];
break;
case '-y':
$height = (int)$this->argv[++$i];
break;
case '-x':
$hide=true;
break;
case '-r':
$rotate=true;
break;
case '-c':
$checkdigit=true;
break;
case '--silent':
$silent=true;
break;
case '-s':
$scale = (float)$this->argv[++$i];
break;
case '-m':
$modulewidth = (float)$this->argv[++$i];
break;
case '-f':
$filename = $this->argv[++$i];
break;
default:
if( $data == '' ) {
$data = $this->argv[$i];
}
else {
$this->PrintUsage();
die("Illegal specified parameters");
}
break;
}
++$i;
}
}
if( $output < 0 || $output > 2 ) {
fwrite(STDERR,"Unkown output format ($output)\n");
exit(1);
}
if( $output === 0 ) {
$modulewidth = floor($modulewidth);
}
// Sanity check
if( $modulewidth > 15 ) {
fwrite(STDERR,"Too large modulewidth\n");
exit(1);
}
// Sanity check
if( $height > 1000 ) {
fwrite(STDERR,"Too large height\n");
exit(1);
}
// Sanity check
if( $scale > 15 ) {
fwrite(STDERR,"Too large scale factor\n");
exit(1);
}
if( strlen($filename) > 256 ) {
fwrite(STDERR,"Too long filename\n");
exit(1);
}
if( trim($data) == '' ) {
fwrite(STDERR,"No input data specified\n");
exit(1);
}
$barcodes = array(
'UPCA' => ENCODING_UPCA,
'UPCE' => ENCODING_UPCE,
'EAN128' => ENCODING_EAN128,
'EAN13' => ENCODING_EAN13,
'EAN8' => ENCODING_EAN8,
'CODE11' => ENCODING_CODE11,
'CODE39' => ENCODING_CODE39,
'CODE128' => ENCODING_CODE128,
'CODE25' => ENCODING_CODE25,
'CODEI25' => ENCODING_CODEI25,
'CODABAR' => ENCODING_CODABAR,
'BOOKLAND' => ENCODING_BOOKLAND,
);
$barcode = strtoupper($barcode);
if( key_exists($barcode,$barcodes) ) {
$barcode = $barcodes[$barcode];
}
else {
fwrite(STDERR,'Specified barcode symbology ('.$barcode.") is not supported\n");
exit(1);
}
$ret = array(
'barcode' => $barcode,
'hide' => $hide,
'modulewidth' => $modulewidth,
'scale' => $scale,
'output' => $output,
'data' => $data,
'silent' => $silent,
'rotate' => $rotate,
'height' => $height,
'checkdigit' => $checkdigit,
'filename' => $filename
);
return $ret;
}
function _Dump() {
var_dump($this->argv);
}
function GetNum() {
return $this->argc-1;
}
}
//----------------------------------------------------------------------
// CLASS Driver
// Main driver class to create barcodes with the parmeters specified on
// the command line.
//----------------------------------------------------------------------
class Driver {
private $iParams;
static public $silent=false;
static public function ErrHandlerPS(Exception $e) {
if( !Driver::$silent )
fwrite(STDERR,$e->getMessage()."\n");
exit(1);
}
static public function ErrHandlerImg(Exception $e) {
if( !Driver::$silent )
fwrite(STDERR,$e->getMessage()."\n");
$errobj = new JpGraphErrObjectImg();
$errobj->Raise($e->getMessage());
exit(1);
}
function Run($aParams) {
$this->iParams = $aParams;
Driver::$silent = $aParams['silent'];
$encoder = BarcodeFactory::Create($aParams['barcode']);
$encoder->AddChecksum($aParams['checkdigit']);
switch( $aParams['output'] ) {
case 0:
$e = BackendFactory::Create(BACKEND_IMAGE,$encoder);
set_exception_handler(array('Driver','ErrHandlerImg'));
break;
case 1:
$e = BackendFactory::Create(BACKEND_PS,$encoder);
set_exception_handler(array('Driver','ErrHandlerPS'));
break;
case 2:
$e = BackendFactory::Create(BACKEND_PS,$encoder);
$e->SetEPS();
set_exception_handler(array('Driver','ErrHandlerPS'));
break;
}
$e->SetHeight($aParams['height']);
$e->SetVertical($aParams['rotate']);
$e->SetModuleWidth($aParams['modulewidth']);
$e->SetScale($aParams['scale']);
$e->HideText($aParams['hide']);
if( $aParams['output'] === 0 ) {
$err = $e->Stroke($aParams['data'], $aParams['filename']);
}
else {
$s = $e->Stroke($aParams['data'], $aParams['filename']);
if( $aParams['filename'] == '' ) {
// If no filename specified then return the generated postscript
echo $s;
}
}
}
}
$pa = new ParseArgs();
$params = $pa->Get();
$driver = new Driver();
$driver->Run($params);
// Successfull termination
exit(0);
?>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit aedb5a1

Please sign in to comment.
You can’t perform that action at this time.