<?php
//=======================================================================
// File: JPGRAPH.PHP
// Description: PHP Graph Plotting library. Base module.
// Created: 2001-01-08
// Ver: $Id: jpgraph.php 770 2006-09-24 20:19:11Z ljp $
//
// Copyright 2006 (c) Aditus Consulting. All rights reserved.
//========================================================================
require_once('jpg-config.inc.php');
require_once 'jpgraph_gradient.php';
require_once 'jpgraph_errhandler.inc.php';
// Version info
DEFINE('JPG_VERSION','2.1.3');
// Minimum required PHP version
DEFINE('MIN_PHPVERSION','5.1.0');
// Should the image be a truecolor image?
// Note 1: Has only effect with GD 2.0.1 and above.
// Note 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use
// trucolor.
// Note 3: MUST be enabled to get background images working with GD2
DEFINE('USE_TRUECOLOR',true);
//------------------------------------------------------------------------
// Automatic settings of path for cache and font directory
// if they have not been previously specified
//------------------------------------------------------------------------
if(USE_CACHE) {
if (!defined('CACHE_DIR')) {
if ( strstr( PHP_OS, 'WIN') ) {
if( empty($_SERVER['TEMP']) ) {
$t = new ErrMsgText();
$msg = $t->Get(11,$file,$lineno);
die($msg);
}
else {
DEFINE('CACHE_DIR', $_SERVER['TEMP'] . '/');
}
} else {
DEFINE('CACHE_DIR','/tmp/jpgraph_cache/');
}
}
}
elseif( !defined('CACHE_DIR') ) {
DEFINE('CACHE_DIR', '');
}
if (!defined('TTF_DIR')) {
if (strstr( PHP_OS, 'WIN') ) {
$sroot = getenv('SystemRoot');
if( empty($sroot) ) {
$t = new ErrMsgText();
$msg = $t->Get(12,$file,$lineno);
die($msg);
}
else {
DEFINE('TTF_DIR', $sroot.'/fonts/');
}
} else {
DEFINE('TTF_DIR','/usr/X11R6/lib/X11/fonts/truetype/');
}
}
//------------------------------------------------------------------
// Constants which are used as parameters for the method calls
//------------------------------------------------------------------
// TTF Font families
// Note: First font must be FF_COURIER and the last font family must
// be given to _LAST_FONT. This is used for error checking in the text
// handling routines.
DEFINE("FF_COURIER",10);
DEFINE("FF_VERDANA",11);
DEFINE("FF_TIMES",12);
DEFINE("FF_COMIC",14);
DEFINE("FF_ARIAL",15);
DEFINE("FF_GEORGIA",16);
DEFINE("FF_TREBUCHE",17);
// Gnome Vera font
// Available from http://www.gnome.org/fonts/
DEFINE("FF_VERA",18);
DEFINE("FF_VERAMONO",19);
DEFINE("FF_VERASERIF",20);
// Chinese font
DEFINE("FF_SIMSUN",30);
DEFINE("FF_CHINESE",31);
DEFINE("FF_BIG5",31);
// Japanese font
DEFINE("FF_MINCHO",40);
DEFINE("FF_PMINCHO",41);
DEFINE("FF_GOTHIC",42);
DEFINE("FF_PGOTHIC",43);
// Limits for fonts
DEFINE("_FIRST_FONT",10);
DEFINE("_LAST_FONT",43);
// TTF Font styles
DEFINE("FS_NORMAL",9001);
DEFINE("FS_BOLD",9002);
DEFINE("FS_ITALIC",9003);
DEFINE("FS_BOLDIT",9004);
DEFINE("FS_BOLDITALIC",9004);
//Definitions for internal font, new style
DEFINE("FF_FONT0",1);
DEFINE("FF_FONT1",2);
DEFINE("FF_FONT2",4);
// Tick density
DEFINE("TICKD_DENSE",1);
DEFINE("TICKD_NORMAL",2);
DEFINE("TICKD_SPARSE",3);
DEFINE("TICKD_VERYSPARSE",4);
// Side for ticks and labels.
DEFINE("SIDE_LEFT",-1);
DEFINE("SIDE_RIGHT",1);
DEFINE("SIDE_DOWN",-1);
DEFINE("SIDE_BOTTOM",-1);
DEFINE("SIDE_UP",1);
DEFINE("SIDE_TOP",1);
// Legend type stacked vertical or horizontal
DEFINE("LEGEND_VERT",0);
DEFINE("LEGEND_HOR",1);
// Mark types for plot marks
DEFINE("MARK_SQUARE",1);
DEFINE("MARK_UTRIANGLE",2);
DEFINE("MARK_DTRIANGLE",3);
DEFINE("MARK_DIAMOND",4);
DEFINE("MARK_CIRCLE",5);
DEFINE("MARK_FILLEDCIRCLE",6);
DEFINE("MARK_CROSS",7);
DEFINE("MARK_STAR",8);
DEFINE("MARK_X",9);
DEFINE("MARK_LEFTTRIANGLE",10);
DEFINE("MARK_RIGHTTRIANGLE",11);
DEFINE("MARK_FLASH",12);
DEFINE("MARK_IMG",13);
DEFINE("MARK_FLAG1",14);
DEFINE("MARK_FLAG2",15);
DEFINE("MARK_FLAG3",16);
DEFINE("MARK_FLAG4",17);
// Builtin images
DEFINE("MARK_IMG_PUSHPIN",50);
DEFINE("MARK_IMG_SPUSHPIN",50);
DEFINE("MARK_IMG_LPUSHPIN",51);
DEFINE("MARK_IMG_DIAMOND",52);
DEFINE("MARK_IMG_SQUARE",53);
DEFINE("MARK_IMG_STAR",54);
DEFINE("MARK_IMG_BALL",55);
DEFINE("MARK_IMG_SBALL",55);
DEFINE("MARK_IMG_MBALL",56);
DEFINE("MARK_IMG_LBALL",57);
DEFINE("MARK_IMG_BEVEL",58);
// Inline defines
DEFINE("INLINE_YES",1);
DEFINE("INLINE_NO",0);
// Format for background images
DEFINE("BGIMG_FILLPLOT",1);
DEFINE("BGIMG_FILLFRAME",2);
DEFINE("BGIMG_COPY",3);
DEFINE("BGIMG_CENTER",4);
// Depth of objects
DEFINE("DEPTH_BACK",0);
DEFINE("DEPTH_FRONT",1);
// Direction
DEFINE("VERTICAL",1);
DEFINE("HORIZONTAL",0);
// Axis styles for scientific style axis
DEFINE('AXSTYLE_SIMPLE',1);
DEFINE('AXSTYLE_BOXIN',2);
DEFINE('AXSTYLE_BOXOUT',3);
DEFINE('AXSTYLE_YBOXIN',4);
DEFINE('AXSTYLE_YBOXOUT',5);
// Style for title backgrounds
DEFINE('TITLEBKG_STYLE1',1);
DEFINE('TITLEBKG_STYLE2',2);
DEFINE('TITLEBKG_STYLE3',3);
DEFINE('TITLEBKG_FRAME_NONE',0);
DEFINE('TITLEBKG_FRAME_FULL',1);
DEFINE('TITLEBKG_FRAME_BOTTOM',2);
DEFINE('TITLEBKG_FRAME_BEVEL',3);
DEFINE('TITLEBKG_FILLSTYLE_HSTRIPED',1);
DEFINE('TITLEBKG_FILLSTYLE_VSTRIPED',2);
DEFINE('TITLEBKG_FILLSTYLE_SOLID',3);
// Style for background gradient fills
DEFINE('BGRAD_FRAME',1);
DEFINE('BGRAD_MARGIN',2);
DEFINE('BGRAD_PLOT',3);
// Width of tab titles
DEFINE('TABTITLE_WIDTHFIT',0);
DEFINE('TABTITLE_WIDTHFULL',-1);
// Defines for 3D skew directions
DEFINE('SKEW3D_UP',0);
DEFINE('SKEW3D_DOWN',1);
DEFINE('SKEW3D_LEFT',2);
DEFINE('SKEW3D_RIGHT',3);
// Line styles
DEFINE('LINESTYLE_DOTTED',1);
DEFINE('LINESTYLE_DASHED',2);
DEFINE('LINESTYLE_LONGDASH',3);
DEFINE('LINESTYLE_SOLID',4);
// For internal use only
DEFINE("_JPG_DEBUG",false);
DEFINE("_FORCE_IMGTOFILE",false);
DEFINE("_FORCE_IMGDIR",'/tmp/jpgimg/');
function CheckPHPVersion($aMinVersion)
{
list($majorC, $minorC, $editC) = split('[/.-]', PHP_VERSION);
list($majorR, $minorR, $editR) = split('[/.-]', $aMinVersion);
if ($majorC > $majorR) return true;
if ($majorC < $majorR) return false;
// same major - check ninor
if ($minorC > $minorR) return true;
if ($minorC < $minorR) return false;
// and same minor
if ($editC >= $editR) return true;
return true;
}
//
// Make sure PHP version is high enough
//
if( !CheckPHPVersion(MIN_PHPVERSION) ) {
JpGraphError::RaiseL(13,PHP_VERSION,MIN_PHPVERSION);
}
//
// Make GD sanity check
//
if( !function_exists("imagetypes") || !function_exists('imagecreatefromstring') ) {
JpGraphError::RaiseL(25001);
//("This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)");
}
//
// Setup PHP error handler
//
function _phpErrorHandler($errno,$errmsg,$filename, $linenum, $vars) {
// Respect current error level
if( $errno & error_reporting() ) {
JpGraphError::RaiseL(25003,basename($filename),$linenum,$errmsg);
}
}
if( INSTALL_PHP_ERR_HANDLER ) {
set_error_handler("_phpErrorHandler");
}
//
//Check if there were any warnings, perhaps some wrong includes by the
//user
//
if( isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG &&
!preg_match('|Deprecated|', $GLOBALS['php_errormsg']) ) {
JpGraphError::RaiseL(25004,$GLOBALS['php_errormsg']);
}
// Useful mathematical function
function sign($a) {return $a >= 0 ? 1 : -1;}
// Utility function to generate an image name based on the filename we
// are running from and assuming we use auto detection of graphic format
// (top level), i.e it is safe to call this function
// from a script that uses JpGraph
function GenImgName() {
// Determine what format we should use when we save the images
$supported = imagetypes();
if( $supported & IMG_PNG ) $img_format="png";
elseif( $supported & IMG_GIF ) $img_format="gif";
elseif( $supported & IMG_JPG ) $img_format="jpeg";
if( !isset($_SER
没有合适的资源?快使用搜索试试~ 我知道了~
通达OA2013版30%官方源码
共386个文件
php:376个
js:2个
txt:2个
5星 · 超过95%的资源 需积分: 15 89 下载量 149 浏览量
2013-07-27
01:13:04
上传
评论
收藏 882KB RAR 举报
温馨提示
因软件会不断更新,此开放源码并非最新源码。 请不要使用此源码覆盖正在使用的OA系统文件,这会造成软件使用上的问题,比如已经修正的错误,可能又被替换回去。 该源码请用于用户本单位的开发参考,严禁将本源码销售给第三方或用于商业目的获利。 用户参考该源码开发的模块,建议与原OA程序目录进行区别,以免日后软件升级时被覆盖。
资源推荐
资源详情
资源评论
收起资源包目录
通达OA2013版30%官方源码 (386个子文件)
bg_content.gif 52B
bg_content.gif 52B
translate.ini 327B
inc.js 1KB
inc.js 1KB
jpgraph.php 252KB
jpgraph_gantt.php 132KB
jpgraph_gb2312.php 117KB
class.phpmailer.php 73KB
jpgraph_pie.php 39KB
en.inc.php 34KB
index.php 33KB
jpgraph_bar.php 30KB
index.php 28KB
index.php 28KB
class.smtp.php 25KB
jpgraph_pie3d.php 25KB
comment.php 25KB
progress_map.php 23KB
diary_body.php 19KB
jpgraph_plotband.php 18KB
board.php 17KB
prod1.inc.php 17KB
show_reader.php 15KB
check_manage.php 15KB
jpgraph_plotmark.inc.php 14KB
work_plan.php 14KB
read_vote.php 14KB
show_reply.php 14KB
index1.php 14KB
export.php 13KB
search.php 13KB
待办事宜.php 13KB
index1.php 13KB
check_comment.php 13KB
new.php 13KB
jpgraph_gradient.php 13KB
list.php 12KB
index.php 12KB
add_diary.php 12KB
calendar.php 12KB
list.php 12KB
index.php 12KB
edit.php 11KB
index.php 11KB
calendar.php 11KB
search.php 11KB
zip.php 11KB
plan_detail.php 11KB
query.php 11KB
show_reader.php 11KB
read.php 11KB
workflow.php 11KB
class.pop3.php 10KB
utility_sms1.php 10KB
edit.php 10KB
diary_body.php 10KB
share_search.php 10KB
user_search.php 9KB
edit.php 9KB
jpg-config.inc.php 9KB
search.php 9KB
detail.php 9KB
submit.php 9KB
input.php 9KB
insert.php 9KB
search.php 9KB
query.php 8KB
week_diary.php 8KB
new.php 8KB
comment.php 8KB
user_diary.php 8KB
input.php 8KB
conditional.php 8KB
图片新闻.php 8KB
diary_left.php 8KB
日程安排.php 7KB
read.php 7KB
jpgraph_errhandler.inc.php 7KB
plan_resource.php 7KB
search.php 7KB
import.php 7KB
index.php 7KB
share_more.php 7KB
share_read.php 7KB
add.php 6KB
manage.php 6KB
search.php 6KB
index.php 6KB
user_search_stat.php 6KB
add_opinion.php 6KB
index.php 6KB
add.php 6KB
search.php 6KB
index.php 6KB
current.php 6KB
edit_diary.php 6KB
calendar.php 6KB
submit.php 5KB
history.php 5KB
共 386 条
- 1
- 2
- 3
- 4
yanxingwuji
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页