Merge tag 'upstream/0.6.25'
Upstream version 0.6.25
This commit is contained in:
commit
2594665299
10
ChangeLog
10
ChangeLog
@ -1,6 +1,12 @@
|
||||
**pnp-0.6.?? ??/??/2013**
|
||||
**pnp-0.6.?? ??/??/2015**
|
||||
|
||||
**pnp-0.6.24 07/30/2013**
|
||||
**pnp-0.6.25 01/03/2015**
|
||||
* Update: FPDF Update to Version 1.7
|
||||
* Bugfix: Default source fixed by AWiddersheim
|
||||
* Bugfix: Fixed urlencoding of Host- and Servicenames by Andreas Doehler
|
||||
* Bugfix: Fixed Timeranges by AWiddersheim
|
||||
|
||||
**pnp-0.6.24 07/30/2014**
|
||||
* Bugfix: Fixed some more XSS issues
|
||||
* Bugfix: Fixed PHP issue while running on PHP 5.6 ( Reported by Sven Nierlein )
|
||||
|
||||
|
22
configure
vendored
22
configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for pnp 0.6.24.
|
||||
# Generated by GNU Autoconf 2.61 for pnp 0.6.25.
|
||||
#
|
||||
# Report bugs to <pnp4nagios-devel@lists.sourceforge.net>.
|
||||
#
|
||||
@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='pnp'
|
||||
PACKAGE_TARNAME='pnp'
|
||||
PACKAGE_VERSION='0.6.24'
|
||||
PACKAGE_STRING='pnp 0.6.24'
|
||||
PACKAGE_VERSION='0.6.25'
|
||||
PACKAGE_STRING='pnp 0.6.25'
|
||||
PACKAGE_BUGREPORT='pnp4nagios-devel@lists.sourceforge.net'
|
||||
|
||||
ac_unique_file="src/"
|
||||
@ -1219,7 +1219,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures pnp 0.6.24 to adapt to many kinds of systems.
|
||||
\`configure' configures pnp 0.6.25 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1284,7 +1284,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of pnp 0.6.24:";;
|
||||
short | recursive ) echo "Configuration of pnp 0.6.25:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1380,7 +1380,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
pnp configure 0.6.24
|
||||
pnp configure 0.6.25
|
||||
generated by GNU Autoconf 2.61
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@ -1394,7 +1394,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by pnp $as_me 0.6.24, which was
|
||||
It was created by pnp $as_me 0.6.25, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -1764,9 +1764,9 @@ _ACEOF
|
||||
|
||||
|
||||
PKG_NAME=pnp4nagios
|
||||
PKG_VERSION="0.6.24"
|
||||
PKG_VERSION="0.6.25"
|
||||
PKG_HOME_URL="http://www.pnp4nagios.org/pnp/start"
|
||||
PKG_REL_DATE="30-07-2014"
|
||||
PKG_REL_DATE="03-01-2015"
|
||||
|
||||
|
||||
|
||||
@ -6330,7 +6330,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by pnp $as_me 0.6.24, which was
|
||||
This file was extended by pnp $as_me 0.6.25, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -6379,7 +6379,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
pnp config.status 0.6.24
|
||||
pnp config.status 0.6.25
|
||||
configured by $0, generated by GNU Autoconf 2.61,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT(pnp, 0.6.24, pnp4nagios-devel@lists.sourceforge.net)
|
||||
AC_INIT(pnp, 0.6.25, pnp4nagios-devel@lists.sourceforge.net)
|
||||
AC_CONFIG_SRCDIR(src/)
|
||||
AC_CONFIG_HEADERS(include/config.h:include/config.h.in)
|
||||
AC_PREFIX_DEFAULT(/usr/local/pnp4nagios)
|
||||
@ -11,9 +11,9 @@ AC_DEFINE([DEFAULT_NAGIOS_USER], [nagios], [Default Nagios User])
|
||||
AC_DEFINE([DEFAULT_NAGIOS_GROUP], [nagios], [Default Nagios Group])
|
||||
|
||||
PKG_NAME=pnp4nagios
|
||||
PKG_VERSION="0.6.24"
|
||||
PKG_VERSION="0.6.25"
|
||||
PKG_HOME_URL="http://www.pnp4nagios.org/pnp/start"
|
||||
PKG_REL_DATE="30-07-2014"
|
||||
PKG_REL_DATE="03-01-2015"
|
||||
AC_SUBST(PKG_NAME)
|
||||
AC_SUBST(PKG_VERSION)
|
||||
AC_SUBST(PKG_HOME_URL)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!@PERL@
|
||||
# nagios: -epn
|
||||
## check_pnp_rrds - PNP4Nagios.
|
||||
## Copyright (c) 2006-2009 Joerg Linge (http://www.pnp4nagios.org)
|
||||
## Copyright (c) 2006-2015 Joerg Linge (http://www.pnp4nagios.org)
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU General Public License
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!@PERL@
|
||||
# nagios: -epn
|
||||
## @PKG_NAME@–@PKG_VERSION@
|
||||
## Copyright (c) 2005-2010 Joerg Linge (http://www.pnp4nagios.org)
|
||||
## Copyright (c) 2005-2015 Joerg Linge (http://www.pnp4nagios.org)
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU General Public License
|
||||
@ -1548,7 +1548,7 @@ sub read_keyfile {
|
||||
sub print_help {
|
||||
print <<EOD;
|
||||
|
||||
Copyright (c) 2005-2010 Joerg Linge <pitchfork\@pnp4nagios.org>
|
||||
Copyright (c) 2005-2015 Joerg Linge <pitchfork\@pnp4nagios.org>
|
||||
Use process_perfdata.pl to store Nagios Plugin Performance Data into RRD Databases
|
||||
|
||||
Options:
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!@PERL@
|
||||
## @PKG_NAME@–@PKG_VERSION@ rrd_convert.pl
|
||||
## Copyright (c) 2006-2010 Joerg Linge (http://www.pnp4nagios.org)
|
||||
## Copyright (c) 2006-2015 Joerg Linge (http://www.pnp4nagios.org)
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU General Public License
|
||||
|
@ -2,7 +2,7 @@
|
||||
# nagios: -epn
|
||||
## @PKG_NAME@–@PKG_VERSION@
|
||||
#
|
||||
# Copyright (c) 2012 PNP4Nagios Developer Team (http://www.pnp4nagios.org)
|
||||
# Copyright (c) 2006-2015 PNP4Nagios Developer Team (http://www.pnp4nagios.org)
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -48,7 +48,7 @@ class Graph_Controller extends System_Controller {
|
||||
if($this->host != "" && $this->service != ""){
|
||||
$this->service = pnp::clean($this->service);
|
||||
$this->host = pnp::clean($this->host);
|
||||
$this->url = "?host=".$this->host."&srv=".$this->service;
|
||||
$this->url = "?host=".urlencode($this->host)."&srv=".urlencode($this->service);
|
||||
$services = $this->data->getServices($this->host);
|
||||
#Landingpage for mobile devices
|
||||
if($this->isMobileDevice()){
|
||||
|
@ -23,13 +23,13 @@ class System_Controller extends Template_Controller {
|
||||
// Check for mod_rewrite
|
||||
$this->check_mod_rewrite();
|
||||
|
||||
$this->start = pnp::clean($this->input->get('start',FALSE));
|
||||
$this->end = pnp::clean($this->input->get('end',FALSE));
|
||||
$this->start = $this->input->get('start',FALSE);
|
||||
$this->end = $this->input->get('end',FALSE);
|
||||
$this->theme = pnp::clean($this->input->get('theme',FALSE));
|
||||
$this->view = pnp::clean($this->input->get('view', ""));
|
||||
$this->host = pnp::clean($this->input->get('host',NULL));
|
||||
$this->service = pnp::clean($this->input->get('srv',NULL));
|
||||
$this->source = pnp::clean($this->input->get('source',0));
|
||||
$this->source = pnp::clean($this->input->get('source',NULL));
|
||||
$this->version = pnp::clean($this->input->get('version',NULL));
|
||||
$this->tpl = pnp::clean($this->input->get('tpl'));
|
||||
$this->controller = Router::$controller;
|
||||
|
@ -70,7 +70,7 @@ class Zoom_Controller extends System_Controller {
|
||||
$this->template->source = $this->source;
|
||||
$this->template->end = $this->end;
|
||||
$this->template->start = $this->start;
|
||||
$this->url = "?host=".$this->host."&srv=".$this->service;
|
||||
$this->url = "?host=".urlencode($this->host)."&srv=".urlencode($this->service);
|
||||
$this->template->graph_height = $this->graph_height;
|
||||
$this->template->graph_width = $this->graph_width;
|
||||
}else{
|
||||
|
@ -44,6 +44,8 @@ class pnp_Core {
|
||||
*
|
||||
*/
|
||||
public static function zoom_icon($host,$service,$start,$end,$source,$view,$graph_width,$graph_height){
|
||||
$service = urlencode(urlencode($service));
|
||||
$host = urlencode(urlencode($host));
|
||||
print "<a href=\"javascript:Gzoom('".url::base(TRUE)."zoom?host=$host&srv=$service&view=$view&source=$source&end=$end&start=$start&graph_width=$graph_width&graph_height=$graph_height');\" title=\"Zoom into the Graph\"><img src=\"".url::base()."media/images/zoom.png\"></a>\n";
|
||||
}
|
||||
|
||||
|
@ -661,7 +661,7 @@ class Data_Model extends System_Model
|
||||
if(!is_numeric($end)){
|
||||
$timestamp = strtotime($end);
|
||||
if(!$timestamp){
|
||||
throw new Kohana_User_Exception('Wrong Format', "$end");
|
||||
throw new Kohana_User_Exception('Wrong Format', "End -> $end");
|
||||
}else{
|
||||
$end = $timestamp;
|
||||
}
|
||||
|
9
share/pnp/application/vendor/fpdf/font/courier.php
vendored
Normal file → Executable file
9
share/pnp/application/vendor/fpdf/font/courier.php
vendored
Normal file → Executable file
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
|
8
share/pnp/application/vendor/fpdf/font/courierb.php
vendored
Executable file
8
share/pnp/application/vendor/fpdf/font/courierb.php
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
8
share/pnp/application/vendor/fpdf/font/courierbi.php
vendored
Executable file
8
share/pnp/application/vendor/fpdf/font/courierbi.php
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-BoldOblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
8
share/pnp/application/vendor/fpdf/font/courieri.php
vendored
Executable file
8
share/pnp/application/vendor/fpdf/font/courieri.php
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-Oblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
6
share/pnp/application/vendor/fpdf/font/helvetica.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/helvetica.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/helveticab.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/helveticab.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/helveticabi.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/helveticabi.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-BoldOblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/helveticai.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/helveticai.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-Oblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/symbol.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/symbol.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Symbol';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/times.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/times.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Times-Roman';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/timesb.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/timesb.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Times-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/timesbi.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/timesbi.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Times-BoldItalic';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/timesi.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/timesi.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
$type = 'Core';
|
||||
$name = 'Times-Italic';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
|
6
share/pnp/application/vendor/fpdf/font/zapfdingbats.php
vendored
Normal file → Executable file
6
share/pnp/application/vendor/fpdf/font/zapfdingbats.php
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
$type = 'Core';
|
||||
$name = 'ZapfDingbats';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
|
452
share/pnp/application/vendor/fpdf/fpdf.php
vendored
Normal file → Executable file
452
share/pnp/application/vendor/fpdf/fpdf.php
vendored
Normal file → Executable file
@ -2,12 +2,12 @@
|
||||
/*******************************************************************************
|
||||
* FPDF *
|
||||
* *
|
||||
* Version: 1.6 *
|
||||
* Date: 2008-08-03 *
|
||||
* Version: 1.7 *
|
||||
* Date: 2011-06-18 *
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
|
||||
define('FPDF_VERSION','1.6');
|
||||
define('FPDF_VERSION','1.7');
|
||||
|
||||
class FPDF
|
||||
{
|
||||
@ -21,10 +21,10 @@ var $compress; //compression flag
|
||||
var $k; // scale factor (number of points in user unit)
|
||||
var $DefOrientation; // default orientation
|
||||
var $CurOrientation; // current orientation
|
||||
var $PageFormats; //available page formats
|
||||
var $DefPageFormat; //default page format
|
||||
var $CurPageFormat; //current page format
|
||||
var $PageSizes; //array storing non-default page sizes
|
||||
var $StdPageSizes; // standard page sizes
|
||||
var $DefPageSize; // default page size
|
||||
var $CurPageSize; // current page size
|
||||
var $PageSizes; // used for pages with non default sizes or orientations
|
||||
var $wPt, $hPt; // dimensions of current page in points
|
||||
var $w, $h; // dimensions of current page in user unit
|
||||
var $lMargin; // left margin
|
||||
@ -35,7 +35,8 @@ var $cMargin; //cell margin
|
||||
var $x, $y; // current position in user unit
|
||||
var $lasth; // height of last printed cell
|
||||
var $LineWidth; // line width in user unit
|
||||
var $CoreFonts; //array of standard font names
|
||||
var $fontpath; // path containing fonts
|
||||
var $CoreFonts; // array of core font names
|
||||
var $fonts; // array of used fonts
|
||||
var $FontFiles; // array of font files
|
||||
var $diffs; // array of encoding differences
|
||||
@ -72,7 +73,7 @@ var $PDFVersion; //PDF version number
|
||||
* Public methods *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
function FPDF($orientation='P', $unit='mm', $format='A4')
|
||||
function FPDF($orientation='P', $unit='mm', $size='A4')
|
||||
{
|
||||
// Some checks
|
||||
$this->_dochecks();
|
||||
@ -100,11 +101,19 @@ function FPDF($orientation='P', $unit='mm', $format='A4')
|
||||
$this->TextColor = '0 g';
|
||||
$this->ColorFlag = false;
|
||||
$this->ws = 0;
|
||||
//Standard fonts
|
||||
$this->CoreFonts=array('courier'=>'Courier', 'courierB'=>'Courier-Bold', 'courierI'=>'Courier-Oblique', 'courierBI'=>'Courier-BoldOblique',
|
||||
'helvetica'=>'Helvetica', 'helveticaB'=>'Helvetica-Bold', 'helveticaI'=>'Helvetica-Oblique', 'helveticaBI'=>'Helvetica-BoldOblique',
|
||||
'times'=>'Times-Roman', 'timesB'=>'Times-Bold', 'timesI'=>'Times-Italic', 'timesBI'=>'Times-BoldItalic',
|
||||
'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats');
|
||||
// Font path
|
||||
if(defined('FPDF_FONTPATH'))
|
||||
{
|
||||
$this->fontpath = FPDF_FONTPATH;
|
||||
if(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\')
|
||||
$this->fontpath .= '/';
|
||||
}
|
||||
elseif(is_dir(dirname(__FILE__).'/font'))
|
||||
$this->fontpath = dirname(__FILE__).'/font/';
|
||||
else
|
||||
$this->fontpath = '';
|
||||
// Core fonts
|
||||
$this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats');
|
||||
// Scale factor
|
||||
if($unit=='pt')
|
||||
$this->k = 1;
|
||||
@ -116,26 +125,25 @@ function FPDF($orientation='P', $unit='mm', $format='A4')
|
||||
$this->k = 72;
|
||||
else
|
||||
$this->Error('Incorrect unit: '.$unit);
|
||||
//Page format
|
||||
$this->PageFormats=array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28),
|
||||
// Page sizes
|
||||
$this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28),
|
||||
'letter'=>array(612,792), 'legal'=>array(612,1008));
|
||||
if(is_string($format))
|
||||
$format=$this->_getpageformat($format);
|
||||
$this->DefPageFormat=$format;
|
||||
$this->CurPageFormat=$format;
|
||||
$size = $this->_getpagesize($size);
|
||||
$this->DefPageSize = $size;
|
||||
$this->CurPageSize = $size;
|
||||
// Page orientation
|
||||
$orientation = strtolower($orientation);
|
||||
if($orientation=='p' || $orientation=='portrait')
|
||||
{
|
||||
$this->DefOrientation = 'P';
|
||||
$this->w=$this->DefPageFormat[0];
|
||||
$this->h=$this->DefPageFormat[1];
|
||||
$this->w = $size[0];
|
||||
$this->h = $size[1];
|
||||
}
|
||||
elseif($orientation=='l' || $orientation=='landscape')
|
||||
{
|
||||
$this->DefOrientation = 'L';
|
||||
$this->w=$this->DefPageFormat[1];
|
||||
$this->h=$this->DefPageFormat[0];
|
||||
$this->w = $size[1];
|
||||
$this->h = $size[0];
|
||||
}
|
||||
else
|
||||
$this->Error('Incorrect orientation: '.$orientation);
|
||||
@ -151,8 +159,8 @@ function FPDF($orientation='P', $unit='mm', $format='A4')
|
||||
$this->LineWidth = .567/$this->k;
|
||||
// Automatic page break
|
||||
$this->SetAutoPageBreak(true,2*$margin);
|
||||
//Full width display mode
|
||||
$this->SetDisplayMode('fullwidth');
|
||||
// Default display mode
|
||||
$this->SetDisplayMode('default');
|
||||
// Enable compression
|
||||
$this->SetCompression(true);
|
||||
// Set default PDF version number
|
||||
@ -197,7 +205,7 @@ function SetAutoPageBreak($auto, $margin=0)
|
||||
$this->PageBreakTrigger = $this->h-$margin;
|
||||
}
|
||||
|
||||
function SetDisplayMode($zoom, $layout='continuous')
|
||||
function SetDisplayMode($zoom, $layout='default')
|
||||
{
|
||||
// Set display mode in viewer
|
||||
if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom))
|
||||
@ -294,14 +302,14 @@ function Close()
|
||||
$this->_enddoc();
|
||||
}
|
||||
|
||||
function AddPage($orientation='', $format='')
|
||||
function AddPage($orientation='', $size='')
|
||||
{
|
||||
// Start a new page
|
||||
if($this->state==0)
|
||||
$this->Open();
|
||||
$family = $this->FontFamily;
|
||||
$style = $this->FontStyle.($this->underline ? 'U' : '');
|
||||
$size=$this->FontSizePt;
|
||||
$fontsize = $this->FontSizePt;
|
||||
$lw = $this->LineWidth;
|
||||
$dc = $this->DrawColor;
|
||||
$fc = $this->FillColor;
|
||||
@ -317,7 +325,7 @@ function AddPage($orientation='', $format='')
|
||||
$this->_endpage();
|
||||
}
|
||||
// Start new page
|
||||
$this->_beginpage($orientation,$format);
|
||||
$this->_beginpage($orientation,$size);
|
||||
// Set line cap style to square
|
||||
$this->_out('2 J');
|
||||
// Set line width
|
||||
@ -325,7 +333,7 @@ function AddPage($orientation='', $format='')
|
||||
$this->_out(sprintf('%.2F w',$lw*$this->k));
|
||||
// Set font
|
||||
if($family)
|
||||
$this->SetFont($family,$style,$size);
|
||||
$this->SetFont($family,$style,$fontsize);
|
||||
// Set colors
|
||||
$this->DrawColor = $dc;
|
||||
if($dc!='0 G')
|
||||
@ -347,7 +355,7 @@ function AddPage($orientation='', $format='')
|
||||
}
|
||||
// Restore font
|
||||
if($family)
|
||||
$this->SetFont($family,$style,$size);
|
||||
$this->SetFont($family,$style,$fontsize);
|
||||
// Restore colors
|
||||
if($this->DrawColor!=$dc)
|
||||
{
|
||||
@ -452,64 +460,47 @@ function Rect($x, $y, $w, $h, $style='')
|
||||
|
||||
function AddFont($family, $style='', $file='')
|
||||
{
|
||||
//Add a TrueType or Type1 font
|
||||
// Add a TrueType, OpenType or Type1 font
|
||||
$family = strtolower($family);
|
||||
if($file=='')
|
||||
$file = str_replace(' ','',$family).strtolower($style).'.php';
|
||||
if($family=='arial')
|
||||
$family='helvetica';
|
||||
$style = strtoupper($style);
|
||||
if($style=='IB')
|
||||
$style = 'BI';
|
||||
$fontkey = $family.$style;
|
||||
if(isset($this->fonts[$fontkey]))
|
||||
return;
|
||||
include($this->_getfontpath().$file);
|
||||
if(!isset($name))
|
||||
$this->Error('Could not include font definition file');
|
||||
$i=count($this->fonts)+1;
|
||||
$this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file);
|
||||
if($diff)
|
||||
$info = $this->_loadfont($file);
|
||||
$info['i'] = count($this->fonts)+1;
|
||||
if(!empty($info['diff']))
|
||||
{
|
||||
// Search existing encodings
|
||||
$d=0;
|
||||
$nb=count($this->diffs);
|
||||
for($i=1;$i<=$nb;$i++)
|
||||
$n = array_search($info['diff'],$this->diffs);
|
||||
if(!$n)
|
||||
{
|
||||
if($this->diffs[$i]==$diff)
|
||||
$n = count($this->diffs)+1;
|
||||
$this->diffs[$n] = $info['diff'];
|
||||
}
|
||||
$info['diffn'] = $n;
|
||||
}
|
||||
if(!empty($info['file']))
|
||||
{
|
||||
$d=$i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($d==0)
|
||||
{
|
||||
$d=$nb+1;
|
||||
$this->diffs[$d]=$diff;
|
||||
}
|
||||
$this->fonts[$fontkey]['diff']=$d;
|
||||
}
|
||||
if($file)
|
||||
{
|
||||
if($type=='TrueType')
|
||||
$this->FontFiles[$file]=array('length1'=>$originalsize);
|
||||
// Embedded font
|
||||
if($info['type']=='TrueType')
|
||||
$this->FontFiles[$info['file']] = array('length1'=>$info['originalsize']);
|
||||
else
|
||||
$this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2);
|
||||
$this->FontFiles[$info['file']] = array('length1'=>$info['size1'], 'length2'=>$info['size2']);
|
||||
}
|
||||
$this->fonts[$fontkey] = $info;
|
||||
}
|
||||
|
||||
function SetFont($family, $style='', $size=0)
|
||||
{
|
||||
// Select a font; size given in points
|
||||
global $fpdf_charwidths;
|
||||
|
||||
$family=strtolower($family);
|
||||
if($family=='')
|
||||
$family = $this->FontFamily;
|
||||
if($family=='arial')
|
||||
$family='helvetica';
|
||||
elseif($family=='symbol' || $family=='zapfdingbats')
|
||||
$style='';
|
||||
else
|
||||
$family = strtolower($family);
|
||||
$style = strtoupper($style);
|
||||
if(strpos($style,'U')!==false)
|
||||
{
|
||||
@ -525,27 +516,20 @@ function SetFont($family, $style='', $size=0)
|
||||
// Test if font is already selected
|
||||
if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size)
|
||||
return;
|
||||
//Test if used for the first time
|
||||
// Test if font is already loaded
|
||||
$fontkey = $family.$style;
|
||||
if(!isset($this->fonts[$fontkey]))
|
||||
{
|
||||
//Check if one of the standard fonts
|
||||
if(isset($this->CoreFonts[$fontkey]))
|
||||
// Test if one of the core fonts
|
||||
if($family=='arial')
|
||||
$family = 'helvetica';
|
||||
if(in_array($family,$this->CoreFonts))
|
||||
{
|
||||
if(!isset($fpdf_charwidths[$fontkey]))
|
||||
{
|
||||
//Load metric file
|
||||
$file=$family;
|
||||
if($family=='times' || $family=='helvetica')
|
||||
$file.=strtolower($style);
|
||||
include($this->_getfontpath().$file.'.php');
|
||||
if(!isset($fpdf_charwidths[$fontkey]))
|
||||
$this->Error('Could not include font metric file');
|
||||
}
|
||||
$i=count($this->fonts)+1;
|
||||
$name=$this->CoreFonts[$fontkey];
|
||||
$cw=$fpdf_charwidths[$fontkey];
|
||||
$this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw);
|
||||
if($family=='symbol' || $family=='zapfdingbats')
|
||||
$style = '';
|
||||
$fontkey = $family.$style;
|
||||
if(!isset($this->fonts[$fontkey]))
|
||||
$this->AddFont($family,$style);
|
||||
}
|
||||
else
|
||||
$this->Error('Undefined font: '.$family.' '.$style);
|
||||
@ -626,7 +610,7 @@ function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link
|
||||
$this->ws = 0;
|
||||
$this->_out('0 Tw');
|
||||
}
|
||||
$this->AddPage($this->CurOrientation,$this->CurPageFormat);
|
||||
$this->AddPage($this->CurOrientation,$this->CurPageSize);
|
||||
$this->x = $x;
|
||||
if($ws>0)
|
||||
{
|
||||
@ -920,17 +904,23 @@ function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='')
|
||||
}
|
||||
else
|
||||
$info = $this->images[$file];
|
||||
|
||||
// Automatic width and height calculation if needed
|
||||
if($w==0 && $h==0)
|
||||
{
|
||||
//Put image at 72 dpi
|
||||
$w=$info['w']/$this->k;
|
||||
$h=$info['h']/$this->k;
|
||||
// Put image at 96 dpi
|
||||
$w = -96;
|
||||
$h = -96;
|
||||
}
|
||||
elseif($w==0)
|
||||
if($w<0)
|
||||
$w = -$info['w']*72/$w/$this->k;
|
||||
if($h<0)
|
||||
$h = -$info['h']*72/$h/$this->k;
|
||||
if($w==0)
|
||||
$w = $h*$info['w']/$info['h'];
|
||||
elseif($h==0)
|
||||
if($h==0)
|
||||
$h = $w*$info['h']/$info['w'];
|
||||
|
||||
// Flowing mode
|
||||
if($y===null)
|
||||
{
|
||||
@ -938,12 +928,13 @@ function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='')
|
||||
{
|
||||
// Automatic page break
|
||||
$x2 = $this->x;
|
||||
$this->AddPage($this->CurOrientation,$this->CurPageFormat);
|
||||
$this->AddPage($this->CurOrientation,$this->CurPageSize);
|
||||
$this->x = $x2;
|
||||
}
|
||||
$y = $this->y;
|
||||
$this->y += $h;
|
||||
}
|
||||
|
||||
if($x===null)
|
||||
$x = $this->x;
|
||||
$this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
|
||||
@ -1009,34 +1000,24 @@ function Output($name='', $dest='')
|
||||
{
|
||||
case 'I':
|
||||
// Send to standard output
|
||||
if(ob_get_length())
|
||||
$this->Error('Some data has already been output, can\'t send PDF file');
|
||||
if(php_sapi_name()!='cli')
|
||||
$this->_checkoutput();
|
||||
if(PHP_SAPI!='cli')
|
||||
{
|
||||
// We send to a browser
|
||||
header('Content-Type: application/pdf');
|
||||
if(headers_sent())
|
||||
$this->Error('Some data has already been output, can\'t send PDF file');
|
||||
header('Content-Length: '.strlen($this->buffer));
|
||||
header('Content-Disposition: inline; filename="'.$name.'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
}
|
||||
echo $this->buffer;
|
||||
break;
|
||||
case 'D':
|
||||
// Download file
|
||||
if(ob_get_length())
|
||||
$this->Error('Some data has already been output, can\'t send PDF file');
|
||||
$this->_checkoutput();
|
||||
header('Content-Type: application/x-download');
|
||||
if(headers_sent())
|
||||
$this->Error('Some data has already been output, can\'t send PDF file');
|
||||
header('Content-Length: '.strlen($this->buffer));
|
||||
header('Content-Disposition: attachment; filename="'.$name.'"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression','0');
|
||||
echo $this->buffer;
|
||||
break;
|
||||
case 'F':
|
||||
@ -1069,28 +1050,51 @@ function _dochecks()
|
||||
// Check mbstring overloading
|
||||
if(ini_get('mbstring.func_overload') & 2)
|
||||
$this->Error('mbstring overloading must be disabled');
|
||||
//Disable runtime magic quotes
|
||||
// Ensure runtime magic quotes are disabled
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(0);
|
||||
}
|
||||
|
||||
function _getpageformat($format)
|
||||
function _checkoutput()
|
||||
{
|
||||
$format=strtolower($format);
|
||||
if(!isset($this->PageFormats[$format]))
|
||||
$this->Error('Unknown page format: '.$format);
|
||||
$a=$this->PageFormats[$format];
|
||||
if(PHP_SAPI!='cli')
|
||||
{
|
||||
if(headers_sent($file,$line))
|
||||
$this->Error("Some data has already been output, can't send PDF file (output started at $file:$line)");
|
||||
}
|
||||
if(ob_get_length())
|
||||
{
|
||||
// The output buffer is not empty
|
||||
if(preg_match('/^(\xEF\xBB\xBF)?\s*$/',ob_get_contents()))
|
||||
{
|
||||
// It contains only a UTF-8 BOM and/or whitespace, let's clean it
|
||||
ob_clean();
|
||||
}
|
||||
else
|
||||
$this->Error("Some data has already been output, can't send PDF file");
|
||||
}
|
||||
}
|
||||
|
||||
function _getpagesize($size)
|
||||
{
|
||||
if(is_string($size))
|
||||
{
|
||||
$size = strtolower($size);
|
||||
if(!isset($this->StdPageSizes[$size]))
|
||||
$this->Error('Unknown page size: '.$size);
|
||||
$a = $this->StdPageSizes[$size];
|
||||
return array($a[0]/$this->k, $a[1]/$this->k);
|
||||
}
|
||||
|
||||
function _getfontpath()
|
||||
else
|
||||
{
|
||||
if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font'))
|
||||
define('FPDF_FONTPATH',dirname(__FILE__).'/font/');
|
||||
return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : '';
|
||||
if($size[0]>$size[1])
|
||||
return array($size[1], $size[0]);
|
||||
else
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
|
||||
function _beginpage($orientation, $format)
|
||||
function _beginpage($orientation, $size)
|
||||
{
|
||||
$this->page++;
|
||||
$this->pages[$this->page] = '';
|
||||
@ -1098,38 +1102,35 @@ function _beginpage($orientation, $format)
|
||||
$this->x = $this->lMargin;
|
||||
$this->y = $this->tMargin;
|
||||
$this->FontFamily = '';
|
||||
//Check page size
|
||||
// Check page size and orientation
|
||||
if($orientation=='')
|
||||
$orientation = $this->DefOrientation;
|
||||
else
|
||||
$orientation = strtoupper($orientation[0]);
|
||||
if($format=='')
|
||||
$format=$this->DefPageFormat;
|
||||
if($size=='')
|
||||
$size = $this->DefPageSize;
|
||||
else
|
||||
$size = $this->_getpagesize($size);
|
||||
if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1])
|
||||
{
|
||||
if(is_string($format))
|
||||
$format=$this->_getpageformat($format);
|
||||
}
|
||||
if($orientation!=$this->CurOrientation || $format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1])
|
||||
{
|
||||
//New size
|
||||
// New size or orientation
|
||||
if($orientation=='P')
|
||||
{
|
||||
$this->w=$format[0];
|
||||
$this->h=$format[1];
|
||||
$this->w = $size[0];
|
||||
$this->h = $size[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->w=$format[1];
|
||||
$this->h=$format[0];
|
||||
$this->w = $size[1];
|
||||
$this->h = $size[0];
|
||||
}
|
||||
$this->wPt = $this->w*$this->k;
|
||||
$this->hPt = $this->h*$this->k;
|
||||
$this->PageBreakTrigger = $this->h-$this->bMargin;
|
||||
$this->CurOrientation = $orientation;
|
||||
$this->CurPageFormat=$format;
|
||||
$this->CurPageSize = $size;
|
||||
}
|
||||
if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1])
|
||||
if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1])
|
||||
$this->PageSizes[$this->page] = array($this->wPt, $this->hPt);
|
||||
}
|
||||
|
||||
@ -1138,6 +1139,16 @@ function _endpage()
|
||||
$this->state = 1;
|
||||
}
|
||||
|
||||
function _loadfont($font)
|
||||
{
|
||||
// Load a font definition file from the font directory
|
||||
include($this->fontpath.$font);
|
||||
$a = get_defined_vars();
|
||||
if(!isset($a['name']))
|
||||
$this->Error('Could not include font definition file');
|
||||
return $a;
|
||||
}
|
||||
|
||||
function _escape($s)
|
||||
{
|
||||
// Escape special characters in strings
|
||||
@ -1199,7 +1210,7 @@ function _dounderline($x, $y, $txt)
|
||||
function _parsejpg($file)
|
||||
{
|
||||
// Extract info from a JPEG file
|
||||
$a=GetImageSize($file);
|
||||
$a = getimagesize($file);
|
||||
if(!$a)
|
||||
$this->Error('Missing or incorrect image file: '.$file);
|
||||
if($a[2]!=2)
|
||||
@ -1211,12 +1222,7 @@ function _parsejpg($file)
|
||||
else
|
||||
$colspace = 'DeviceGray';
|
||||
$bpc = isset($a['bits']) ? $a['bits'] : 8;
|
||||
//Read whole file
|
||||
$f=fopen($file,'rb');
|
||||
$data='';
|
||||
while(!feof($f))
|
||||
$data.=fread($f,8192);
|
||||
fclose($f);
|
||||
$data = file_get_contents($file);
|
||||
return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data);
|
||||
}
|
||||
|
||||
@ -1226,9 +1232,17 @@ function _parsepng($file)
|
||||
$f = fopen($file,'rb');
|
||||
if(!$f)
|
||||
$this->Error('Can\'t open image file: '.$file);
|
||||
$info = $this->_parsepngstream($f,$file);
|
||||
fclose($f);
|
||||
return $info;
|
||||
}
|
||||
|
||||
function _parsepngstream($f, $file)
|
||||
{
|
||||
// Check signature
|
||||
if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
|
||||
$this->Error('Not a PNG file: '.$file);
|
||||
|
||||
// Read header chunk
|
||||
$this->_readstream($f,4);
|
||||
if($this->_readstream($f,4)!='IHDR')
|
||||
@ -1239,14 +1253,14 @@ function _parsepng($file)
|
||||
if($bpc>8)
|
||||
$this->Error('16-bit depth not supported: '.$file);
|
||||
$ct = ord($this->_readstream($f,1));
|
||||
if($ct==0)
|
||||
if($ct==0 || $ct==4)
|
||||
$colspace = 'DeviceGray';
|
||||
elseif($ct==2)
|
||||
elseif($ct==2 || $ct==6)
|
||||
$colspace = 'DeviceRGB';
|
||||
elseif($ct==3)
|
||||
$colspace = 'Indexed';
|
||||
else
|
||||
$this->Error('Alpha channel not supported: '.$file);
|
||||
$this->Error('Unknown color type: '.$file);
|
||||
if(ord($this->_readstream($f,1))!=0)
|
||||
$this->Error('Unknown compression method: '.$file);
|
||||
if(ord($this->_readstream($f,1))!=0)
|
||||
@ -1254,7 +1268,8 @@ function _parsepng($file)
|
||||
if(ord($this->_readstream($f,1))!=0)
|
||||
$this->Error('Interlacing not supported: '.$file);
|
||||
$this->_readstream($f,4);
|
||||
$parms='/DecodeParms <</Predictor 15 /Colors '.($ct==2 ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w.'>>';
|
||||
$dp = '/Predictor 15 /Colors '.($colspace=='DeviceRGB' ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w;
|
||||
|
||||
// Scan chunks looking for palette, transparency and image data
|
||||
$pal = '';
|
||||
$trns = '';
|
||||
@ -1297,10 +1312,54 @@ function _parsepng($file)
|
||||
$this->_readstream($f,$n+4);
|
||||
}
|
||||
while($n);
|
||||
|
||||
if($colspace=='Indexed' && empty($pal))
|
||||
$this->Error('Missing palette in '.$file);
|
||||
fclose($f);
|
||||
return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data);
|
||||
$info = array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'dp'=>$dp, 'pal'=>$pal, 'trns'=>$trns);
|
||||
if($ct>=4)
|
||||
{
|
||||
// Extract alpha channel
|
||||
if(!function_exists('gzuncompress'))
|
||||
$this->Error('Zlib not available, can\'t handle alpha channel: '.$file);
|
||||
$data = gzuncompress($data);
|
||||
$color = '';
|
||||
$alpha = '';
|
||||
if($ct==4)
|
||||
{
|
||||
// Gray image
|
||||
$len = 2*$w;
|
||||
for($i=0;$i<$h;$i++)
|
||||
{
|
||||
$pos = (1+$len)*$i;
|
||||
$color .= $data[$pos];
|
||||
$alpha .= $data[$pos];
|
||||
$line = substr($data,$pos+1,$len);
|
||||
$color .= preg_replace('/(.)./s','$1',$line);
|
||||
$alpha .= preg_replace('/.(.)/s','$1',$line);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// RGB image
|
||||
$len = 4*$w;
|
||||
for($i=0;$i<$h;$i++)
|
||||
{
|
||||
$pos = (1+$len)*$i;
|
||||
$color .= $data[$pos];
|
||||
$alpha .= $data[$pos];
|
||||
$line = substr($data,$pos+1,$len);
|
||||
$color .= preg_replace('/(.{3})./s','$1',$line);
|
||||
$alpha .= preg_replace('/.{3}(.)/s','$1',$line);
|
||||
}
|
||||
}
|
||||
unset($data);
|
||||
$data = gzcompress($color);
|
||||
$info['smask'] = gzcompress($alpha);
|
||||
if($this->PDFVersion<'1.4')
|
||||
$this->PDFVersion = '1.4';
|
||||
}
|
||||
$info['data'] = $data;
|
||||
return $info;
|
||||
}
|
||||
|
||||
function _readstream($f, $n)
|
||||
@ -1338,6 +1397,22 @@ function _parsegif($file)
|
||||
if(!$im)
|
||||
$this->Error('Missing or incorrect image file: '.$file);
|
||||
imageinterlace($im,0);
|
||||
$f = @fopen('php://temp','rb+');
|
||||
if($f)
|
||||
{
|
||||
// Perform conversion in memory
|
||||
ob_start();
|
||||
imagepng($im);
|
||||
$data = ob_get_clean();
|
||||
imagedestroy($im);
|
||||
fwrite($f,$data);
|
||||
rewind($f);
|
||||
$info = $this->_parsepngstream($f,$file);
|
||||
fclose($f);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use temporary file
|
||||
$tmp = tempnam('.','gif');
|
||||
if(!$tmp)
|
||||
$this->Error('Unable to create a temporary file');
|
||||
@ -1346,6 +1421,7 @@ function _parsegif($file)
|
||||
imagedestroy($im);
|
||||
$info = $this->_parsepng($tmp);
|
||||
unlink($tmp);
|
||||
}
|
||||
return $info;
|
||||
}
|
||||
|
||||
@ -1384,13 +1460,13 @@ function _putpages()
|
||||
}
|
||||
if($this->DefOrientation=='P')
|
||||
{
|
||||
$wPt=$this->DefPageFormat[0]*$this->k;
|
||||
$hPt=$this->DefPageFormat[1]*$this->k;
|
||||
$wPt = $this->DefPageSize[0]*$this->k;
|
||||
$hPt = $this->DefPageSize[1]*$this->k;
|
||||
}
|
||||
else
|
||||
{
|
||||
$wPt=$this->DefPageFormat[1]*$this->k;
|
||||
$hPt=$this->DefPageFormat[0]*$this->k;
|
||||
$wPt = $this->DefPageSize[1]*$this->k;
|
||||
$hPt = $this->DefPageSize[0]*$this->k;
|
||||
}
|
||||
$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
|
||||
for($n=1;$n<=$nb;$n++)
|
||||
@ -1421,6 +1497,8 @@ function _putpages()
|
||||
}
|
||||
$this->_out($annots.']');
|
||||
}
|
||||
if($this->PDFVersion>'1.3')
|
||||
$this->_out('/Group <</Type /Group /S /Transparency /CS /DeviceRGB>>');
|
||||
$this->_out('/Contents '.($this->n+1).' 0 R>>');
|
||||
$this->_out('endobj');
|
||||
// Page content
|
||||
@ -1459,28 +1537,12 @@ function _putfonts()
|
||||
// Font file embedding
|
||||
$this->_newobj();
|
||||
$this->FontFiles[$file]['n'] = $this->n;
|
||||
$font='';
|
||||
$f=fopen($this->_getfontpath().$file,'rb',1);
|
||||
if(!$f)
|
||||
$this->Error('Font file not found');
|
||||
while(!feof($f))
|
||||
$font.=fread($f,8192);
|
||||
fclose($f);
|
||||
$font = file_get_contents($this->fontpath.$file,true);
|
||||
if(!$font)
|
||||
$this->Error('Font file not found: '.$file);
|
||||
$compressed = (substr($file,-2)=='.z');
|
||||
if(!$compressed && isset($info['length2']))
|
||||
{
|
||||
$header=(ord($font[0])==128);
|
||||
if($header)
|
||||
{
|
||||
//Strip first binary header
|
||||
$font=substr($font,6);
|
||||
}
|
||||
if($header && ord($font[$info['length1']])==128)
|
||||
{
|
||||
//Strip second binary header
|
||||
$font=substr($font,0,$info['length1']).substr($font,$info['length1']+6);
|
||||
}
|
||||
}
|
||||
$font = substr($font,6,$info['length1']).substr($font,6+$info['length1']+6,$info['length2']);
|
||||
$this->_out('<</Length '.strlen($font));
|
||||
if($compressed)
|
||||
$this->_out('/Filter /FlateDecode');
|
||||
@ -1497,9 +1559,9 @@ function _putfonts()
|
||||
$this->fonts[$k]['n'] = $this->n+1;
|
||||
$type = $font['type'];
|
||||
$name = $font['name'];
|
||||
if($type=='core')
|
||||
if($type=='Core')
|
||||
{
|
||||
//Standard font
|
||||
// Core font
|
||||
$this->_newobj();
|
||||
$this->_out('<</Type /Font');
|
||||
$this->_out('/BaseFont /'.$name);
|
||||
@ -1511,7 +1573,7 @@ function _putfonts()
|
||||
}
|
||||
elseif($type=='Type1' || $type=='TrueType')
|
||||
{
|
||||
//Additional Type1 or TrueType font
|
||||
// Additional Type1 or TrueType/OpenType font
|
||||
$this->_newobj();
|
||||
$this->_out('<</Type /Font');
|
||||
$this->_out('/BaseFont /'.$name);
|
||||
@ -1519,13 +1581,10 @@ function _putfonts()
|
||||
$this->_out('/FirstChar 32 /LastChar 255');
|
||||
$this->_out('/Widths '.($this->n+1).' 0 R');
|
||||
$this->_out('/FontDescriptor '.($this->n+2).' 0 R');
|
||||
if($font['enc'])
|
||||
{
|
||||
if(isset($font['diff']))
|
||||
$this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
|
||||
if(isset($font['diffn']))
|
||||
$this->_out('/Encoding '.($nf+$font['diffn']).' 0 R');
|
||||
else
|
||||
$this->_out('/Encoding /WinAnsiEncoding');
|
||||
}
|
||||
$this->_out('>>');
|
||||
$this->_out('endobj');
|
||||
// Widths
|
||||
@ -1541,9 +1600,8 @@ function _putfonts()
|
||||
$s = '<</Type /FontDescriptor /FontName /'.$name;
|
||||
foreach($font['desc'] as $k=>$v)
|
||||
$s .= ' /'.$k.' '.$v;
|
||||
$file=$font['file'];
|
||||
if($file)
|
||||
$s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
|
||||
if(!empty($font['file']))
|
||||
$s .= ' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R';
|
||||
$this->_out($s.'>>');
|
||||
$this->_out('endobj');
|
||||
}
|
||||
@ -1560,12 +1618,18 @@ function _putfonts()
|
||||
|
||||
function _putimages()
|
||||
{
|
||||
$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
|
||||
reset($this->images);
|
||||
while(list($file,$info)=each($this->images))
|
||||
foreach(array_keys($this->images) as $file)
|
||||
{
|
||||
$this->_putimage($this->images[$file]);
|
||||
unset($this->images[$file]['data']);
|
||||
unset($this->images[$file]['smask']);
|
||||
}
|
||||
}
|
||||
|
||||
function _putimage(&$info)
|
||||
{
|
||||
$this->_newobj();
|
||||
$this->images[$file]['n']=$this->n;
|
||||
$info['n'] = $this->n;
|
||||
$this->_out('<</Type /XObject');
|
||||
$this->_out('/Subtype /Image');
|
||||
$this->_out('/Width '.$info['w']);
|
||||
@ -1581,8 +1645,8 @@ function _putimages()
|
||||
$this->_out('/BitsPerComponent '.$info['bpc']);
|
||||
if(isset($info['f']))
|
||||
$this->_out('/Filter /'.$info['f']);
|
||||
if(isset($info['parms']))
|
||||
$this->_out($info['parms']);
|
||||
if(isset($info['dp']))
|
||||
$this->_out('/DecodeParms <<'.$info['dp'].'>>');
|
||||
if(isset($info['trns']) && is_array($info['trns']))
|
||||
{
|
||||
$trns = '';
|
||||
@ -1590,21 +1654,29 @@ function _putimages()
|
||||
$trns .= $info['trns'][$i].' '.$info['trns'][$i].' ';
|
||||
$this->_out('/Mask ['.$trns.']');
|
||||
}
|
||||
if(isset($info['smask']))
|
||||
$this->_out('/SMask '.($this->n+1).' 0 R');
|
||||
$this->_out('/Length '.strlen($info['data']).'>>');
|
||||
$this->_putstream($info['data']);
|
||||
unset($this->images[$file]['data']);
|
||||
$this->_out('endobj');
|
||||
// Soft mask
|
||||
if(isset($info['smask']))
|
||||
{
|
||||
$dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns '.$info['w'];
|
||||
$smask = array('w'=>$info['w'], 'h'=>$info['h'], 'cs'=>'DeviceGray', 'bpc'=>8, 'f'=>$info['f'], 'dp'=>$dp, 'data'=>$info['smask']);
|
||||
$this->_putimage($smask);
|
||||
}
|
||||
// Palette
|
||||
if($info['cs']=='Indexed')
|
||||
{
|
||||
$this->_newobj();
|
||||
$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
|
||||
$pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal'];
|
||||
$this->_newobj();
|
||||
$this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');
|
||||
$this->_putstream($pal);
|
||||
$this->_out('endobj');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _putxobjectdict()
|
||||
{
|
||||
@ -1664,7 +1736,7 @@ function _putcatalog()
|
||||
elseif($this->ZoomMode=='real')
|
||||
$this->_out('/OpenAction [3 0 R /XYZ null null 1]');
|
||||
elseif(!is_string($this->ZoomMode))
|
||||
$this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']');
|
||||
$this->_out('/OpenAction [3 0 R /XYZ null null '.sprintf('%.2F',$this->ZoomMode/100).']');
|
||||
if($this->LayoutMode=='single')
|
||||
$this->_out('/PageLayout /SinglePage');
|
||||
elseif($this->LayoutMode=='continuous')
|
||||
|
@ -57,6 +57,7 @@ jQuery.noConflict();
|
||||
<div style="position:relative;">
|
||||
<?php
|
||||
echo "<div start=$start end=$end style=\"width:".$graph_width."px; height:".$graph_height."px; position:absolute; top:33px\" class=\"graph\" id=\"".$this->url."\" ></div>";
|
||||
$srv = urlencode($srv);
|
||||
if(!empty($tpl)){
|
||||
echo "<img class=\"graph\" src=\"image?source=$source"
|
||||
."&tpl=$tpl"
|
||||
|
@ -45,7 +45,7 @@ und die Performancedaten
|
||||
<p>
|
||||
|
||||
Wie man unschwer erkennt, sind die Performancedaten auf die maschinelle Verarbeitung ausgelegt. Das Format ist in den
|
||||
<a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">Developer Guidelines</a>
|
||||
<a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">Developer Guidelines</a>
|
||||
festgelegt (einen Auszug davon gibt es <a href="/de/pnp-0.6/perfdata_format" class="wikilink1" title="de:pnp-0.6:perfdata_format">an dieser Stelle</a>), es soll aber hier noch einmal kurz erläutert werden.
|
||||
|
||||
</p>
|
||||
@ -69,7 +69,7 @@ Mehrere Datenreihen werden durch Leerzeichen getrennt. Die eigentlichen Daten d&
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Anforderungen an Plugins" [27-1903] -->
|
||||
<!-- SECTION "Anforderungen an Plugins" [27-1898] -->
|
||||
<h2><a name="benoetigte_software" id="benoetigte_software">Benötigte Software</a></h2>
|
||||
<div class="level2">
|
||||
<ul>
|
||||
@ -87,7 +87,7 @@ Achtung: wird RRDtool ohne Paket-Manager installiert, fehlen anschließend m&oum
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Benötigte Software" [1904-2519] -->
|
||||
<!-- SECTION "Benötigte Software" [1899-2514] -->
|
||||
<h2><a name="lizenz" id="lizenz">Lizenz</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -97,7 +97,7 @@ PNP ist unter der <a href="http://www.gnu.de/documents/gpl-2.0.de.html" class="u
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Lizenz" [2520-2625] -->
|
||||
<!-- SECTION "Lizenz" [2515-2620] -->
|
||||
<h2><a name="download" id="download">Download</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -123,7 +123,7 @@ Die aktuelle Entwicklung ist jederzeit unter <a href="https://github.com/lingej/
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Download" [2626-3395] -->
|
||||
<!-- SECTION "Download" [2621-3390] -->
|
||||
<h2><a name="support" id="support">Support</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -160,7 +160,7 @@ Weiterhin können die Mailinglisten auf Sourceforge verwendet werden. Dort i
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Support" [3396-4710] -->
|
||||
<!-- SECTION "Support" [3391-4705] -->
|
||||
<h2><a name="datenhaltung" id="datenhaltung">Datenhaltung</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -183,4 +183,4 @@ Durch die Speicherung in diesem Format ändert sich die Dateigröße nac
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Datenhaltung" [4711-] -->
|
||||
<!-- SECTION "Datenhaltung" [4706-] -->
|
@ -120,7 +120,7 @@ und die Performancedaten
|
||||
<p>
|
||||
|
||||
Wie man unschwer erkennt, sind die Performancedaten auf die maschinelle Verarbeitung ausgelegt. Das Format ist in den
|
||||
<a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">Developer Guidelines</a>
|
||||
<a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">Developer Guidelines</a>
|
||||
festgelegt (einen Auszug davon gibt es <a href="/de/pnp-0.6/perfdata_format" class="wikilink1" title="de:pnp-0.6:perfdata_format">an dieser Stelle</a>), es soll aber hier noch einmal kurz erläutert werden.
|
||||
|
||||
</p>
|
||||
@ -3360,7 +3360,7 @@ Es bleibt Drittanbietern überlassen, aus den Performance-Daten Graphen zu e
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Quelle: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201</a>
|
||||
Quelle: <a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">https://www.monitoring-plugins.org/doc/guidelines.html#AEN200</a>
|
||||
|
||||
</p>
|
||||
<div class="inclmeta level">
|
||||
|
@ -57,6 +57,6 @@ Es bleibt Drittanbietern überlassen, aus den Performance-Daten Graphen zu e
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Quelle: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201</a>
|
||||
Quelle: <a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">https://www.monitoring-plugins.org/doc/guidelines.html#AEN200</a>
|
||||
|
||||
</p>
|
||||
|
@ -44,7 +44,7 @@ and the performance data
|
||||
|
||||
<p>
|
||||
|
||||
Performance data is designed for automatic processing. The format is specified within the <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">Developer Guidelines</a> (you'll find an excerpt <a href="/pnp-0.6/perfdata_format" class="wikilink1" title="pnp-0.6:perfdata_format">here</a>) but should be exemplified here nonetheless:
|
||||
Performance data is designed for automatic processing. The format is specified within the <a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">Developer Guidelines</a> (you'll find an excerpt <a href="/pnp-0.6/perfdata_format" class="wikilink1" title="pnp-0.6:perfdata_format">here</a>) but should be exemplified here nonetheless:
|
||||
|
||||
</p>
|
||||
<pre class="code"> rta=2.687ms;3000.000;5000.000;0;
|
||||
@ -67,7 +67,7 @@ Several data series are separated by blanks. The actual data must not contains a
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "System requirements" [27-1698] -->
|
||||
<!-- SECTION "System requirements" [27-1693] -->
|
||||
<h2><a name="required_software" id="required_software">Required Software</a></h2>
|
||||
<div class="level2">
|
||||
<ul>
|
||||
@ -85,7 +85,7 @@ Attention: installing RRDtool without a packet manager might lead to missing dej
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Required Software" [1699-2245] -->
|
||||
<!-- SECTION "Required Software" [1694-2240] -->
|
||||
<h2><a name="license" id="license">License</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -95,7 +95,7 @@ PNP is licensed under <a href="http://www.gnu.org/licenses/gpl-2.0.txt" class="u
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "License" [2246-2340] -->
|
||||
<!-- SECTION "License" [2241-2335] -->
|
||||
<h2><a name="download" id="download">Download</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -119,7 +119,7 @@ The current development can be viewed anytime at <a href="https://github.com/lin
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Download" [2341-2996] -->
|
||||
<!-- SECTION "Download" [2336-2991] -->
|
||||
<h2><a name="support" id="support">Support</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -154,7 +154,7 @@ The mailing lists on Sourceforge can be used to request support (and are limited
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Support" [2997-4303] -->
|
||||
<!-- SECTION "Support" [2992-4298] -->
|
||||
<h2><a name="storage" id="storage">Storage</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
@ -172,7 +172,7 @@ Using this storage format the size of the files will stay the same over time. Pe
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Storage" [4304-5060] -->
|
||||
<!-- SECTION "Storage" [4299-5055] -->
|
||||
<h2><a name="statistics_and_links_to_sourceforge" id="statistics_and_links_to_sourceforge">Statistics and links to Sourceforge</a></h2>
|
||||
<div class="level2">
|
||||
<ul class="rss"><li><div class="li"><em>An error occurred while fetching this feed: </em><a href="http://sourceforge.net/export/rss2_projsummary.php?group_id=191615" class="urlextern" title="http://sourceforge.net/export/rss2_projsummary.php?group_id=191615" rel="nofollow">http://sourceforge.net/export/rss2_projsummary.php?group_id=191615</a></div></li></ul>
|
||||
@ -183,4 +183,4 @@ Using this storage format the size of the files will stay the same over time. Pe
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Statistics and links to Sourceforge" [5061-] -->
|
||||
<!-- SECTION "Statistics and links to Sourceforge" [5056-] -->
|
@ -113,7 +113,7 @@ and the performance data
|
||||
|
||||
<p>
|
||||
|
||||
Performance data is designed for automatic processing. The format is specified within the <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">Developer Guidelines</a> (you'll find an excerpt <a href="/pnp-0.6/perfdata_format" class="wikilink1" title="pnp-0.6:perfdata_format">here</a>) but should be exemplified here nonetheless:
|
||||
Performance data is designed for automatic processing. The format is specified within the <a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">Developer Guidelines</a> (you'll find an excerpt <a href="/pnp-0.6/perfdata_format" class="wikilink1" title="pnp-0.6:perfdata_format">here</a>) but should be exemplified here nonetheless:
|
||||
|
||||
</p>
|
||||
<pre class="code"> rta=2.687ms;3000.000;5000.000;0;
|
||||
@ -423,7 +423,7 @@ Changes can be tracked on <a href="http://pnp4nagios.git.sourceforge.net/git/git
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The current Version is <a href="https://sourceforge.net/projects/pnp4nagios/files/latest" class="urlextern" title="https://sourceforge.net/projects/pnp4nagios/files/latest" rel="nofollow"> pnp4nagios-0.6.22.tar.gz</a>
|
||||
The current Version is <a href="https://sourceforge.net/projects/pnp4nagios/files/latest" class="urlextern" title="https://sourceforge.net/projects/pnp4nagios/files/latest" rel="nofollow"> pnp4nagios-0.6.24.tar.gz</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -443,7 +443,7 @@ This is allways the latest GIT HEAD Version
|
||||
|
||||
<p>
|
||||
|
||||
Last Update: Wed Jul 30 06:30:01 CEST 2014
|
||||
Last Update: Sat Jan 3 13:30:01 CET 2015
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -455,6 +455,10 @@ Last Update: Wed Jul 30 06:30:01 CEST 2014
|
||||
|
||||
<strong>pnp-0.6.?? ??/??/2013</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>pnp-0.6.24 07/30/2014</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li class="level1"><div class="li"> Bugfix: Fixed some more XSS issues</div>
|
||||
</li>
|
||||
@ -464,7 +468,7 @@ Last Update: Wed Jul 30 06:30:01 CEST 2014
|
||||
|
||||
<p>
|
||||
|
||||
<strong>pnp-0.6.22 04/06/2014</strong>
|
||||
<strong>pnp-0.6.22 06/04/2014</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li class="level1"><div class="li"> Bugfix: Fixed livestatus socket parsing ( Pekka Panula )</div>
|
||||
@ -3735,7 +3739,7 @@ It is up to third party programs to convert the Nagios plugins performance data
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Origin: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201</a>
|
||||
Origin: <a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">https://www.monitoring-plugins.org/doc/guidelines.html#AEN200</a>
|
||||
|
||||
</p>
|
||||
<div class="inclmeta level">
|
||||
|
@ -15,7 +15,7 @@ Changes can be tracked on <a href="http://pnp4nagios.git.sourceforge.net/git/git
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The current Version is <a href="https://sourceforge.net/projects/pnp4nagios/files/latest" class="urlextern" title="https://sourceforge.net/projects/pnp4nagios/files/latest" rel="nofollow"> pnp4nagios-0.6.22.tar.gz</a>
|
||||
The current Version is <a href="https://sourceforge.net/projects/pnp4nagios/files/latest" class="urlextern" title="https://sourceforge.net/projects/pnp4nagios/files/latest" rel="nofollow"> pnp4nagios-0.6.24.tar.gz</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@ -35,21 +35,36 @@ This is allways the latest GIT HEAD Version
|
||||
|
||||
<p>
|
||||
|
||||
Last Update: Wed Jul 30 12:30:45 CEST 2014
|
||||
Last Update: Sat Jan 3 14:08:23 CET 2015
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "Latest Devel Version" [327-550] -->
|
||||
<!-- SECTION "Latest Devel Version" [327-549] -->
|
||||
<h2><a name="changelog" id="changelog">ChangeLog</a></h2>
|
||||
<div class="level2">
|
||||
|
||||
<p>
|
||||
|
||||
<strong>pnp-0.6.?? ??/??/2013</strong>
|
||||
<strong>pnp-0.6.?? ??/??/2015</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>pnp-0.6.24 07/30/2013</strong>
|
||||
<strong>pnp-0.6.25 01/03/2015</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li class="level1"><div class="li"> Update: FPDF Update to Version 1.7</div>
|
||||
</li>
|
||||
<li class="level1"><div class="li"> Bugfix: Default source fixed by AWiddersheim</div>
|
||||
</li>
|
||||
<li class="level1"><div class="li"> Bugfix: Fixed urlencoding of Host- and Servicenames by Andreas Doehler</div>
|
||||
</li>
|
||||
<li class="level1"><div class="li"> Bugfix: Fixed Timeranges by AWiddersheim</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
||||
<strong>pnp-0.6.24 07/30/2014</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li class="level1"><div class="li"> Bugfix: Fixed some more XSS issues</div>
|
||||
@ -475,4 +490,4 @@ Last Update: Wed Jul 30 12:30:45 CEST 2014
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- SECTION "ChangeLog" [551-] -->
|
||||
<!-- SECTION "ChangeLog" [550-] -->
|
@ -56,6 +56,6 @@ It is up to third party programs to convert the Nagios plugins performance data
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Origin: <a href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" class="urlextern" title="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201" rel="nofollow">http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201</a>
|
||||
Origin: <a href="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" class="urlextern" title="https://www.monitoring-plugins.org/doc/guidelines.html#AEN200" rel="nofollow">https://www.monitoring-plugins.org/doc/guidelines.html#AEN200</a>
|
||||
|
||||
</p>
|
||||
|
2
share/pnp/media/css/jquery.mobile.min.css
vendored
Normal file
2
share/pnp/media/css/jquery.mobile.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 273 B |
2
share/pnp/media/js/jquery-min.js
vendored
Normal file
2
share/pnp/media/js/jquery-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
125
share/pnp/media/js/jquery-ui.min.js
vendored
Normal file
125
share/pnp/media/js/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* imgAreaSelect jQuery plugin
|
||||
* version 0.9.10
|
||||
*
|
||||
* Copyright (c) 2008-2013 Michal Wojciechowski (odyniec.net)
|
||||
*
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://odyniec.net/projects/imgareaselect/
|
||||
*
|
||||
* Added to the DFSG tarball by
|
||||
* Markus Frosch <markus@lazyfrosch.de>
|
||||
*/
|
@ -1,730 +0,0 @@
|
||||
/*
|
||||
* imgAreaSelect jQuery plugin
|
||||
* version 0.9.10
|
||||
*
|
||||
* Copyright (c) 2008-2013 Michal Wojciechowski (odyniec.net)
|
||||
*
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://odyniec.net/projects/imgareaselect/
|
||||
*
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
var abs = Math.abs,
|
||||
max = Math.max,
|
||||
min = Math.min,
|
||||
round = Math.round;
|
||||
|
||||
function div() {
|
||||
return $('<div/>');
|
||||
}
|
||||
|
||||
$.imgAreaSelect = function (img, options) {
|
||||
var
|
||||
|
||||
$img = $(img),
|
||||
|
||||
imgLoaded,
|
||||
|
||||
$box = div(),
|
||||
$area = div(),
|
||||
$border = div().add(div()).add(div()).add(div()),
|
||||
$outer = div().add(div()).add(div()).add(div()),
|
||||
$handles = $([]),
|
||||
|
||||
$areaOpera,
|
||||
|
||||
left, top,
|
||||
|
||||
imgOfs = { left: 0, top: 0 },
|
||||
|
||||
imgWidth, imgHeight,
|
||||
|
||||
$parent,
|
||||
|
||||
parOfs = { left: 0, top: 0 },
|
||||
|
||||
zIndex = 0,
|
||||
|
||||
position = 'absolute',
|
||||
|
||||
startX, startY,
|
||||
|
||||
scaleX, scaleY,
|
||||
|
||||
resize,
|
||||
|
||||
minWidth, minHeight, maxWidth, maxHeight,
|
||||
|
||||
aspectRatio,
|
||||
|
||||
shown,
|
||||
|
||||
x1, y1, x2, y2,
|
||||
|
||||
selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 },
|
||||
|
||||
docElem = document.documentElement,
|
||||
|
||||
ua = navigator.userAgent,
|
||||
|
||||
$p, d, i, o, w, h, adjusted;
|
||||
|
||||
function viewX(x) {
|
||||
return x + imgOfs.left - parOfs.left;
|
||||
}
|
||||
|
||||
function viewY(y) {
|
||||
return y + imgOfs.top - parOfs.top;
|
||||
}
|
||||
|
||||
function selX(x) {
|
||||
return x - imgOfs.left + parOfs.left;
|
||||
}
|
||||
|
||||
function selY(y) {
|
||||
return y - imgOfs.top + parOfs.top;
|
||||
}
|
||||
|
||||
function evX(event) {
|
||||
return event.pageX - parOfs.left;
|
||||
}
|
||||
|
||||
function evY(event) {
|
||||
return event.pageY - parOfs.top;
|
||||
}
|
||||
|
||||
function getSelection(noScale) {
|
||||
var sx = noScale || scaleX, sy = noScale || scaleY;
|
||||
|
||||
return { x1: round(selection.x1 * sx),
|
||||
y1: round(selection.y1 * sy),
|
||||
x2: round(selection.x2 * sx),
|
||||
y2: round(selection.y2 * sy),
|
||||
width: round(selection.x2 * sx) - round(selection.x1 * sx),
|
||||
height: round(selection.y2 * sy) - round(selection.y1 * sy) };
|
||||
}
|
||||
|
||||
function setSelection(x1, y1, x2, y2, noScale) {
|
||||
var sx = noScale || scaleX, sy = noScale || scaleY;
|
||||
|
||||
selection = {
|
||||
x1: round(x1 / sx || 0),
|
||||
y1: round(y1 / sy || 0),
|
||||
x2: round(x2 / sx || 0),
|
||||
y2: round(y2 / sy || 0)
|
||||
};
|
||||
|
||||
selection.width = selection.x2 - selection.x1;
|
||||
selection.height = selection.y2 - selection.y1;
|
||||
}
|
||||
|
||||
function adjust() {
|
||||
if (!imgLoaded || !$img.width())
|
||||
return;
|
||||
|
||||
imgOfs = { left: round($img.offset().left), top: round($img.offset().top) };
|
||||
|
||||
imgWidth = $img.innerWidth();
|
||||
imgHeight = $img.innerHeight();
|
||||
|
||||
imgOfs.top += ($img.outerHeight() - imgHeight) >> 1;
|
||||
imgOfs.left += ($img.outerWidth() - imgWidth) >> 1;
|
||||
|
||||
minWidth = round(options.minWidth / scaleX) || 0;
|
||||
minHeight = round(options.minHeight / scaleY) || 0;
|
||||
maxWidth = round(min(options.maxWidth / scaleX || 1<<24, imgWidth));
|
||||
maxHeight = round(min(options.maxHeight / scaleY || 1<<24, imgHeight));
|
||||
|
||||
if ($().jquery == '1.3.2' && position == 'fixed' &&
|
||||
!docElem['getBoundingClientRect'])
|
||||
{
|
||||
imgOfs.top += max(document.body.scrollTop, docElem.scrollTop);
|
||||
imgOfs.left += max(document.body.scrollLeft, docElem.scrollLeft);
|
||||
}
|
||||
|
||||
parOfs = /absolute|relative/.test($parent.css('position')) ?
|
||||
{ left: round($parent.offset().left) - $parent.scrollLeft(),
|
||||
top: round($parent.offset().top) - $parent.scrollTop() } :
|
||||
position == 'fixed' ?
|
||||
{ left: $(document).scrollLeft(), top: $(document).scrollTop() } :
|
||||
{ left: 0, top: 0 };
|
||||
|
||||
left = viewX(0);
|
||||
top = viewY(0);
|
||||
|
||||
if (selection.x2 > imgWidth || selection.y2 > imgHeight)
|
||||
doResize();
|
||||
}
|
||||
|
||||
function update(resetKeyPress) {
|
||||
if (!shown) return;
|
||||
|
||||
$box.css({ left: viewX(selection.x1), top: viewY(selection.y1) })
|
||||
.add($area).width(w = selection.width).height(h = selection.height);
|
||||
|
||||
$area.add($border).add($handles).css({ left: 0, top: 0 });
|
||||
|
||||
$border
|
||||
.width(max(w - $border.outerWidth() + $border.innerWidth(), 0))
|
||||
.height(max(h - $border.outerHeight() + $border.innerHeight(), 0));
|
||||
|
||||
$($outer[0]).css({ left: left, top: top,
|
||||
width: selection.x1, height: imgHeight });
|
||||
$($outer[1]).css({ left: left + selection.x1, top: top,
|
||||
width: w, height: selection.y1 });
|
||||
$($outer[2]).css({ left: left + selection.x2, top: top,
|
||||
width: imgWidth - selection.x2, height: imgHeight });
|
||||
$($outer[3]).css({ left: left + selection.x1, top: top + selection.y2,
|
||||
width: w, height: imgHeight - selection.y2 });
|
||||
|
||||
w -= $handles.outerWidth();
|
||||
h -= $handles.outerHeight();
|
||||
|
||||
switch ($handles.length) {
|
||||
case 8:
|
||||
$($handles[4]).css({ left: w >> 1 });
|
||||
$($handles[5]).css({ left: w, top: h >> 1 });
|
||||
$($handles[6]).css({ left: w >> 1, top: h });
|
||||
$($handles[7]).css({ top: h >> 1 });
|
||||
case 4:
|
||||
$handles.slice(1,3).css({ left: w });
|
||||
$handles.slice(2,4).css({ top: h });
|
||||
}
|
||||
|
||||
if (resetKeyPress !== false) {
|
||||
if ($.imgAreaSelect.onKeyPress != docKeyPress)
|
||||
$(document).unbind($.imgAreaSelect.keyPress,
|
||||
$.imgAreaSelect.onKeyPress);
|
||||
|
||||
if (options.keys)
|
||||
$(document)[$.imgAreaSelect.keyPress](
|
||||
$.imgAreaSelect.onKeyPress = docKeyPress);
|
||||
}
|
||||
|
||||
if (msie && $border.outerWidth() - $border.innerWidth() == 2) {
|
||||
$border.css('margin', 0);
|
||||
setTimeout(function () { $border.css('margin', 'auto'); }, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function doUpdate(resetKeyPress) {
|
||||
adjust();
|
||||
update(resetKeyPress);
|
||||
x1 = viewX(selection.x1); y1 = viewY(selection.y1);
|
||||
x2 = viewX(selection.x2); y2 = viewY(selection.y2);
|
||||
}
|
||||
|
||||
function hide($elem, fn) {
|
||||
options.fadeSpeed ? $elem.fadeOut(options.fadeSpeed, fn) : $elem.hide();
|
||||
|
||||
}
|
||||
|
||||
function areaMouseMove(event) {
|
||||
var x = selX(evX(event)) - selection.x1,
|
||||
y = selY(evY(event)) - selection.y1;
|
||||
|
||||
if (!adjusted) {
|
||||
adjust();
|
||||
adjusted = true;
|
||||
|
||||
$box.one('mouseout', function () { adjusted = false; });
|
||||
}
|
||||
|
||||
resize = '';
|
||||
|
||||
if (options.resizable) {
|
||||
if (y <= options.resizeMargin)
|
||||
resize = 'n';
|
||||
else if (y >= selection.height - options.resizeMargin)
|
||||
resize = 's';
|
||||
if (x <= options.resizeMargin)
|
||||
resize += 'w';
|
||||
else if (x >= selection.width - options.resizeMargin)
|
||||
resize += 'e';
|
||||
}
|
||||
|
||||
$box.css('cursor', resize ? resize + '-resize' :
|
||||
options.movable ? 'move' : '');
|
||||
if ($areaOpera)
|
||||
$areaOpera.toggle();
|
||||
}
|
||||
|
||||
function docMouseUp(event) {
|
||||
$('body').css('cursor', '');
|
||||
if (options.autoHide || selection.width * selection.height == 0)
|
||||
hide($box.add($outer), function () { $(this).hide(); });
|
||||
|
||||
$(document).unbind('mousemove', selectingMouseMove);
|
||||
$box.mousemove(areaMouseMove);
|
||||
|
||||
options.onSelectEnd(img, getSelection());
|
||||
}
|
||||
|
||||
function areaMouseDown(event) {
|
||||
if (event.which != 1) return false;
|
||||
|
||||
adjust();
|
||||
|
||||
if (resize) {
|
||||
$('body').css('cursor', resize + '-resize');
|
||||
|
||||
x1 = viewX(selection[/w/.test(resize) ? 'x2' : 'x1']);
|
||||
y1 = viewY(selection[/n/.test(resize) ? 'y2' : 'y1']);
|
||||
|
||||
$(document).mousemove(selectingMouseMove)
|
||||
.one('mouseup', docMouseUp);
|
||||
$box.unbind('mousemove', areaMouseMove);
|
||||
}
|
||||
else if (options.movable) {
|
||||
startX = left + selection.x1 - evX(event);
|
||||
startY = top + selection.y1 - evY(event);
|
||||
|
||||
$box.unbind('mousemove', areaMouseMove);
|
||||
|
||||
$(document).mousemove(movingMouseMove)
|
||||
.one('mouseup', function () {
|
||||
options.onSelectEnd(img, getSelection());
|
||||
|
||||
$(document).unbind('mousemove', movingMouseMove);
|
||||
$box.mousemove(areaMouseMove);
|
||||
});
|
||||
}
|
||||
else
|
||||
$img.mousedown(event);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function fixAspectRatio(xFirst) {
|
||||
if (aspectRatio)
|
||||
if (xFirst) {
|
||||
x2 = max(left, min(left + imgWidth,
|
||||
x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1)));
|
||||
|
||||
y2 = round(max(top, min(top + imgHeight,
|
||||
y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1))));
|
||||
x2 = round(x2);
|
||||
}
|
||||
else {
|
||||
y2 = max(top, min(top + imgHeight,
|
||||
y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1)));
|
||||
x2 = round(max(left, min(left + imgWidth,
|
||||
x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1))));
|
||||
y2 = round(y2);
|
||||
}
|
||||
}
|
||||
|
||||
function doResize() {
|
||||
x1 = min(x1, left + imgWidth);
|
||||
y1 = min(y1, top + imgHeight);
|
||||
|
||||
if (abs(x2 - x1) < minWidth) {
|
||||
x2 = x1 - minWidth * (x2 < x1 || -1);
|
||||
|
||||
if (x2 < left)
|
||||
x1 = left + minWidth;
|
||||
else if (x2 > left + imgWidth)
|
||||
x1 = left + imgWidth - minWidth;
|
||||
}
|
||||
|
||||
if (abs(y2 - y1) < minHeight) {
|
||||
y2 = y1 - minHeight * (y2 < y1 || -1);
|
||||
|
||||
if (y2 < top)
|
||||
y1 = top + minHeight;
|
||||
else if (y2 > top + imgHeight)
|
||||
y1 = top + imgHeight - minHeight;
|
||||
}
|
||||
|
||||
x2 = max(left, min(x2, left + imgWidth));
|
||||
y2 = max(top, min(y2, top + imgHeight));
|
||||
|
||||
fixAspectRatio(abs(x2 - x1) < abs(y2 - y1) * aspectRatio);
|
||||
|
||||
if (abs(x2 - x1) > maxWidth) {
|
||||
x2 = x1 - maxWidth * (x2 < x1 || -1);
|
||||
fixAspectRatio();
|
||||
}
|
||||
|
||||
if (abs(y2 - y1) > maxHeight) {
|
||||
y2 = y1 - maxHeight * (y2 < y1 || -1);
|
||||
fixAspectRatio(true);
|
||||
}
|
||||
|
||||
selection = { x1: selX(min(x1, x2)), x2: selX(max(x1, x2)),
|
||||
y1: selY(min(y1, y2)), y2: selY(max(y1, y2)),
|
||||
width: abs(x2 - x1), height: abs(y2 - y1) };
|
||||
|
||||
update();
|
||||
|
||||
options.onSelectChange(img, getSelection());
|
||||
}
|
||||
|
||||
function selectingMouseMove(event) {
|
||||
x2 = /w|e|^$/.test(resize) || aspectRatio ? evX(event) : viewX(selection.x2);
|
||||
y2 = /n|s|^$/.test(resize) || aspectRatio ? evY(event) : viewY(selection.y2);
|
||||
|
||||
doResize();
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
function doMove(newX1, newY1) {
|
||||
x2 = (x1 = newX1) + selection.width;
|
||||
y2 = (y1 = newY1) + selection.height;
|
||||
|
||||
$.extend(selection, { x1: selX(x1), y1: selY(y1), x2: selX(x2),
|
||||
y2: selY(y2) });
|
||||
|
||||
update();
|
||||
|
||||
options.onSelectChange(img, getSelection());
|
||||
}
|
||||
|
||||
function movingMouseMove(event) {
|
||||
x1 = max(left, min(startX + evX(event), left + imgWidth - selection.width));
|
||||
y1 = max(top, min(startY + evY(event), top + imgHeight - selection.height));
|
||||
|
||||
doMove(x1, y1);
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function startSelection() {
|
||||
$(document).unbind('mousemove', startSelection);
|
||||
adjust();
|
||||
|
||||
x2 = x1;
|
||||
y2 = y1;
|
||||
|
||||
doResize();
|
||||
|
||||
resize = '';
|
||||
|
||||
if (!$outer.is(':visible'))
|
||||
$box.add($outer).hide().fadeIn(options.fadeSpeed||0);
|
||||
|
||||
shown = true;
|
||||
|
||||
$(document).unbind('mouseup', cancelSelection)
|
||||
.mousemove(selectingMouseMove).one('mouseup', docMouseUp);
|
||||
$box.unbind('mousemove', areaMouseMove);
|
||||
|
||||
options.onSelectStart(img, getSelection());
|
||||
}
|
||||
|
||||
function cancelSelection() {
|
||||
$(document).unbind('mousemove', startSelection)
|
||||
.unbind('mouseup', cancelSelection);
|
||||
hide($box.add($outer));
|
||||
|
||||
setSelection(selX(x1), selY(y1), selX(x1), selY(y1));
|
||||
|
||||
if (!(this instanceof $.imgAreaSelect)) {
|
||||
options.onSelectChange(img, getSelection());
|
||||
options.onSelectEnd(img, getSelection());
|
||||
}
|
||||
}
|
||||
|
||||
function imgMouseDown(event) {
|
||||
if (event.which != 1 || $outer.is(':animated')) return false;
|
||||
|
||||
adjust();
|
||||
startX = x1 = evX(event);
|
||||
startY = y1 = evY(event);
|
||||
|
||||
$(document).mousemove(startSelection).mouseup(cancelSelection);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function windowResize() {
|
||||
doUpdate(false);
|
||||
}
|
||||
|
||||
function imgLoad() {
|
||||
imgLoaded = true;
|
||||
|
||||
setOptions(options = $.extend({
|
||||
classPrefix: 'imgareaselect',
|
||||
movable: true,
|
||||
parent: 'body',
|
||||
resizable: true,
|
||||
resizeMargin: 10,
|
||||
onInit: function () {},
|
||||
onSelectStart: function () {},
|
||||
onSelectChange: function () {},
|
||||
onSelectEnd: function () {}
|
||||
}, options));
|
||||
|
||||
$box.add($outer).css({ visibility: '' });
|
||||
|
||||
if (options.show) {
|
||||
shown = true;
|
||||
adjust();
|
||||
update();
|
||||
$box.add($outer).hide().fadeIn(options.fadeSpeed||0);
|
||||
}
|
||||
|
||||
setTimeout(function () { options.onInit(img, getSelection()); }, 0);
|
||||
}
|
||||
|
||||
var docKeyPress = function(event) {
|
||||
var k = options.keys, d, t, key = event.keyCode;
|
||||
|
||||
d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt :
|
||||
!isNaN(k.ctrl) && event.ctrlKey ? k.ctrl :
|
||||
!isNaN(k.shift) && event.shiftKey ? k.shift :
|
||||
!isNaN(k.arrows) ? k.arrows : 10;
|
||||
|
||||
if (k.arrows == 'resize' || (k.shift == 'resize' && event.shiftKey) ||
|
||||
(k.ctrl == 'resize' && event.ctrlKey) ||
|
||||
(k.alt == 'resize' && (event.altKey || event.originalEvent.altKey)))
|
||||
{
|
||||
switch (key) {
|
||||
case 37:
|
||||
d = -d;
|
||||
case 39:
|
||||
t = max(x1, x2);
|
||||
x1 = min(x1, x2);
|
||||
x2 = max(t + d, x1);
|
||||
fixAspectRatio();
|
||||
break;
|
||||
case 38:
|
||||
d = -d;
|
||||
case 40:
|
||||
t = max(y1, y2);
|
||||
y1 = min(y1, y2);
|
||||
y2 = max(t + d, y1);
|
||||
fixAspectRatio(true);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
doResize();
|
||||
}
|
||||
else {
|
||||
x1 = min(x1, x2);
|
||||
y1 = min(y1, y2);
|
||||
|
||||
switch (key) {
|
||||
case 37:
|
||||
doMove(max(x1 - d, left), y1);
|
||||
break;
|
||||
case 38:
|
||||
doMove(x1, max(y1 - d, top));
|
||||
break;
|
||||
case 39:
|
||||
doMove(x1 + min(d, imgWidth - selX(x2)), y1);
|
||||
break;
|
||||
case 40:
|
||||
doMove(x1, y1 + min(d, imgHeight - selY(y2)));
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
function styleOptions($elem, props) {
|
||||
for (var option in props)
|
||||
if (options[option] !== undefined)
|
||||
$elem.css(props[option], options[option]);
|
||||
}
|
||||
|
||||
function setOptions(newOptions) {
|
||||
if (newOptions.parent)
|
||||
($parent = $(newOptions.parent)).append($box.add($outer));
|
||||
|
||||
$.extend(options, newOptions);
|
||||
|
||||
adjust();
|
||||
|
||||
if (newOptions.handles != null) {
|
||||
$handles.remove();
|
||||
$handles = $([]);
|
||||
|
||||
i = newOptions.handles ? newOptions.handles == 'corners' ? 4 : 8 : 0;
|
||||
|
||||
while (i--)
|
||||
$handles = $handles.add(div());
|
||||
|
||||
$handles.addClass(options.classPrefix + '-handle').css({
|
||||
position: 'absolute',
|
||||
fontSize: 0,
|
||||
zIndex: zIndex + 1 || 1
|
||||
});
|
||||
|
||||
if (!parseInt($handles.css('width')) >= 0)
|
||||
$handles.width(5).height(5);
|
||||
|
||||
if (o = options.borderWidth)
|
||||
$handles.css({ borderWidth: o, borderStyle: 'solid' });
|
||||
|
||||
styleOptions($handles, { borderColor1: 'border-color',
|
||||
borderColor2: 'background-color',
|
||||
borderOpacity: 'opacity' });
|
||||
}
|
||||
|
||||
scaleX = options.imageWidth / imgWidth || 1;
|
||||
scaleY = options.imageHeight / imgHeight || 1;
|
||||
|
||||
if (newOptions.x1 != null) {
|
||||
setSelection(newOptions.x1, newOptions.y1, newOptions.x2,
|
||||
newOptions.y2);
|
||||
newOptions.show = !newOptions.hide;
|
||||
}
|
||||
|
||||
if (newOptions.keys)
|
||||
options.keys = $.extend({ shift: 1, ctrl: 'resize' },
|
||||
newOptions.keys);
|
||||
|
||||
$outer.addClass(options.classPrefix + '-outer');
|
||||
$area.addClass(options.classPrefix + '-selection');
|
||||
for (i = 0; i++ < 4;)
|
||||
$($border[i-1]).addClass(options.classPrefix + '-border' + i);
|
||||
|
||||
styleOptions($area, { selectionColor: 'background-color',
|
||||
selectionOpacity: 'opacity' });
|
||||
styleOptions($border, { borderOpacity: 'opacity',
|
||||
borderWidth: 'border-width' });
|
||||
styleOptions($outer, { outerColor: 'background-color',
|
||||
outerOpacity: 'opacity' });
|
||||
if (o = options.borderColor1)
|
||||
$($border[0]).css({ borderStyle: 'solid', borderColor: o });
|
||||
if (o = options.borderColor2)
|
||||
$($border[1]).css({ borderStyle: 'dashed', borderColor: o });
|
||||
|
||||
$box.append($area.add($border).add($areaOpera)).append($handles);
|
||||
|
||||
if (msie) {
|
||||
if (o = ($outer.css('filter')||'').match(/opacity=(\d+)/))
|
||||
$outer.css('opacity', o[1]/100);
|
||||
if (o = ($border.css('filter')||'').match(/opacity=(\d+)/))
|
||||
$border.css('opacity', o[1]/100);
|
||||
}
|
||||
|
||||
if (newOptions.hide)
|
||||
hide($box.add($outer));
|
||||
else if (newOptions.show && imgLoaded) {
|
||||
shown = true;
|
||||
$box.add($outer).fadeIn(options.fadeSpeed||0);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
aspectRatio = (d = (options.aspectRatio || '').split(/:/))[0] / d[1];
|
||||
|
||||
$img.add($outer).unbind('mousedown', imgMouseDown);
|
||||
|
||||
if (options.disable || options.enable === false) {
|
||||
$box.unbind('mousemove', areaMouseMove).unbind('mousedown', areaMouseDown);
|
||||
$(window).unbind('resize', windowResize);
|
||||
}
|
||||
else {
|
||||
if (options.enable || options.disable === false) {
|
||||
if (options.resizable || options.movable)
|
||||
$box.mousemove(areaMouseMove).mousedown(areaMouseDown);
|
||||
|
||||
$(window).resize(windowResize);
|
||||
}
|
||||
|
||||
if (!options.persistent)
|
||||
$img.add($outer).mousedown(imgMouseDown);
|
||||
}
|
||||
|
||||
options.enable = options.disable = undefined;
|
||||
}
|
||||
|
||||
this.remove = function () {
|
||||
setOptions({ disable: true });
|
||||
$box.add($outer).remove();
|
||||
};
|
||||
|
||||
this.getOptions = function () { return options; };
|
||||
|
||||
this.setOptions = setOptions;
|
||||
|
||||
this.getSelection = getSelection;
|
||||
|
||||
this.setSelection = setSelection;
|
||||
|
||||
this.cancelSelection = cancelSelection;
|
||||
|
||||
this.update = doUpdate;
|
||||
|
||||
var msie = (/msie ([\w.]+)/i.exec(ua)||[])[1],
|
||||
opera = /opera/i.test(ua),
|
||||
safari = /webkit/i.test(ua) && !/chrome/i.test(ua);
|
||||
|
||||
$p = $img;
|
||||
|
||||
while ($p.length) {
|
||||
zIndex = max(zIndex,
|
||||
!isNaN($p.css('z-index')) ? $p.css('z-index') : zIndex);
|
||||
if ($p.css('position') == 'fixed')
|
||||
position = 'fixed';
|
||||
|
||||
$p = $p.parent(':not(body)');
|
||||
}
|
||||
|
||||
zIndex = options.zIndex || zIndex;
|
||||
|
||||
if (msie)
|
||||
$img.attr('unselectable', 'on');
|
||||
|
||||
$.imgAreaSelect.keyPress = msie || safari ? 'keydown' : 'keypress';
|
||||
|
||||
if (opera)
|
||||
|
||||
$areaOpera = div().css({ width: '100%', height: '100%',
|
||||
position: 'absolute', zIndex: zIndex + 2 || 2 });
|
||||
|
||||
$box.add($outer).css({ visibility: 'hidden', position: position,
|
||||
overflow: 'hidden', zIndex: zIndex || '0' });
|
||||
$box.css({ zIndex: zIndex + 2 || 2 });
|
||||
$area.add($border).css({ position: 'absolute', fontSize: 0 });
|
||||
|
||||
img.complete || img.readyState == 'complete' || !$img.is('img') ?
|
||||
imgLoad() : $img.one('load', imgLoad);
|
||||
|
||||
if (!imgLoaded && msie && msie >= 7)
|
||||
img.src = img.src;
|
||||
};
|
||||
|
||||
$.fn.imgAreaSelect = function (options) {
|
||||
options = options || {};
|
||||
|
||||
this.each(function () {
|
||||
if ($(this).data('imgAreaSelect')) {
|
||||
if (options.remove) {
|
||||
$(this).data('imgAreaSelect').remove();
|
||||
$(this).removeData('imgAreaSelect');
|
||||
}
|
||||
else
|
||||
$(this).data('imgAreaSelect').setOptions(options);
|
||||
}
|
||||
else if (!options.remove) {
|
||||
if (options.enable === undefined && options.disable === undefined)
|
||||
options.enable = true;
|
||||
|
||||
$(this).data('imgAreaSelect', new $.imgAreaSelect(this, options));
|
||||
}
|
||||
});
|
||||
|
||||
if (options.instance)
|
||||
return $(this).data('imgAreaSelect');
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
})(jQuery);
|
1
share/pnp/media/js/jquery.imgareaselect.min.js
vendored
Normal file
1
share/pnp/media/js/jquery.imgareaselect.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
share/pnp/media/js/jquery.mobile.min.js
vendored
Normal file
2
share/pnp/media/js/jquery.mobile.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -72,7 +72,7 @@ foreach ($this->DS as $KEY=>$VAL) {
|
||||
$def[$defcnt] .= rrd::area("ag","#$green");
|
||||
$def[$defcnt] .= rrd::area("ay","#$yellow");
|
||||
$def[$defcnt] .= rrd::area("ar","#$red");
|
||||
$def[$defcnt] .= rrd::line1("fullscans","#000000", "Full table sacns");
|
||||
$def[$defcnt] .= rrd::line1("fullscans","#000000", "Full table scans");
|
||||
$def[$defcnt] .= rrd::gprint("fullscans",array("MAX", "AVERAGE", "LAST"),"%3.2lf");
|
||||
$defcnt++;
|
||||
}
|
||||
@ -359,6 +359,14 @@ foreach ($this->DS as $KEY=>$VAL) {
|
||||
$defcnt++;
|
||||
}
|
||||
|
||||
if(preg_match('/^sql_runtime$/', $VAL['NAME'])) {
|
||||
$ds_name[$defcnt] = "SQL runtime";
|
||||
$opt[$defcnt] = "--vertical-label \"Seconds\" --title \"Execution time of the SQL statement\" ";
|
||||
$def[$defcnt] = "";
|
||||
$def[$defcnt] .= rrd::def("runtime",$VAL['RRDFILE'],$VAL['DS'],"AVERAGE:reduce=LAST") ;
|
||||
$def[$defcnt] .= rrd::area("runtime","#111111");
|
||||
$def[$defcnt] .= rrd::gprint("runtime",array("LAST", "MAX", "AVERAGE"),"%3.2lf Seconds") ;
|
||||
$defcnt++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user