<?php
/**
*
* FusionCharts Exporter is a PHP script that handles
* FusionCharts (since v3.1) Server Side Export feature.
* This in conjuncture with other resource PHP scripts would
* process FusionCharts Export Data POSTED to it from FusionCharts
* and convert the data to image or PDF and subsequently save to the
* server or response back as http response to client side as download.
*
* This script might be called as the FusionCharts Exporter - main module
*
* @author FusionCharts
* @description FusionCharts Exporter (Server-Side - PHP)
* @version 2.0 [ 12 February 2009 ]
*
*/
/**
* ChangeLog / Version History:
* ----------------------------
*
* 2.0 [ 12 February 2009 ]
* - Integrated with new Export feature of FusionCharts 3.1
* - can save to server side directory
* - can provide download or open in popupr window
* - can report back to chart
* - can save as PDF/JPG/PNG/GIF
*
* 1.0 [ 16 August 2007 ]
* - can process chart data to jpg image and response back to client side as download.
*
*/
/**
* Copyright (c) 2009 InfoSoft Global Private Limited. All Rights Reserved.
*
*/
/**
* GENERAL NOTES
* -------------
*
* Chart would POST export data (which consists of encoded image data stream,
* width, height, background color and various other export parameters like
* exportFormat, exportFileName, exportAction, exportTargetWindow) to this script.
*
* The script would process this data using appropriate resource files and build
* export binary (PDF/image)
*
* It either saves the binary as file to a server side directory or push it as
* Download to client side.
*
*
* ISSUES
* ------
* Q. What if someone wishes to open in the same page where the chart existed as postback
* replacing the old page?
*
* A. Not directly supported using any chart attribute or parameter but can do by
* removing/commenting the line containing 'header( content-disposition ...'
*
*/
/**
* @requires FCExporter_{format}.php as export resouce for the specific format
* e.g. FCExporter_PDF.php (containing PDF Releated Export resource functions)
* FCExporter_IMG.php (containing JPEG/PNG/GIF Releated Export resource functions)
*
* Details
* -------
* Only one export resource would be included at one time.
*
* The resource files would have these things as common:
*
* a) a constant - MIMETYPES that would have a string
* containing semicolon separated key value pairs.
* Each key can be a format name specified in the
* HANDLERASSOCIATIONS constant. The associated value
* would be the mimetype for the specified format.
*
* e.g. define("MIMETYPES","jpg=image/jpeg;jpeg=image/jpeg;png=image/png;gif=image/gif");
*
*
* b) a constant - EXTENSIONS that again contain a string of
* semicolon separated key value pair. Each key would again be the
* format name and the extension would be the file extension.
*
* e.g. define("EXTENSIONS","jpg=jpg;jpeg=jpg;png=png;gif=gif");
*
*
* c) a function - exportProcessor ( $stream , $meta )
* It would take the FusionCharts exncoded image string as $stream &
* an associative array $meta containging width, height and bgColor keys.
*
* The function would return an object of mixed type which would contain
* the processed binary/relevant export object.
*
*
* d) a function - exportOutput ( $exportObj, $exportSettings, $quality=1 )
* It would take the processed export object and other export setting as parameter.
* Moreover, it would take an optional parameter - $quality (in scale of 0 to 1).
* By Default, the $quality is passed as 1 (best quality)
*
* The function would return the file path on success or return false on failure.
*
* [ The other code in the resource file can be anything that support this architecture ]
*
*/
// =============================================================================
// == Constants and Variables ==
// =============================================================================
// USERS are to EDIT the values of the following constants.
/* ----------------------- EXPORT PATH & URI -------------------------------- */
/**
* IMPORTANT: You need to change the location of folder where
* the exported chart images/PDFs will be saved on your
* server. Please specify the path to a folder with
* write permissions in the constant SAVE_PATH below.
*
* Please provide the path as per PHP path conventions. You can use relative or
* absolute path.
* Examples: './' , '/users/me/images/' , './myimages'
*
* For Windows servers you can ALSO use \\ as path separator too. e.g. c:\\php\\mysite\\
*/
define ( "SAVE_PATH", "./" );
/**
* IMPORTANT: This constant HTTP_URI stores the HTTP reference to
* the folder where exported charts will be saved.
* Please enter the HTTP representation of that folder
* in this constant e.g., http://www.yourdomain.com/images/
*/
define ( "HTTP_URI", "http://www.yourdomain.com/images/" );
// ==============================================================================
// Users are recommended NOT to perform any editing beyond this point. ==
// ==============================================================================
/* ------------------------- EXPORT RESOURCES -------------------------------- */
// This constant defines the name of the export handler script file
// The name is appended with a suffix (from constant HANDLERASSOCIATIONS)
define ( "EXPORTHANDLER", "FCExporter_" );
// This constant lists all the currently supported export formats
// and related export handler file suffix.
// e.g. for JPEG the suffix is
define ( "HANDLERASSOCIATIONS", "PDF=PDF;JPEG=IMG;JPG=IMG;PNG=IMG;GIF=IMG" );
// Path where the export handler files are located
// Please note that the resource path should be relative to
// FCExporter.php file's directory
// By default the path is "./Resources/"
define ( "RESOURCEPATH","Resources/" );
/* ---------------------------- Export Settings ------------------------------- */
/**
* OVERWRITEFILE sets whether the export handler would overwrite an existing file
* the newly created exported file. If it is set to false the export handler would
* not overwrite. In this case if INTELLIGENTFILENAMING is set to true the handler
* would add a suffix to the new file name. The suffix is a randomly generated UUID.
* Additionally, you add a timestamp or random number as additional suffix.
*
*/
define ( "OVERWRITEFILE", false );
define ( "INTELLIGENTFILENAMING", true );
define ( "FILESUFFIXFORMAT", "TIMESTAMP" ) ;// value can be either 'TIMESTAMP' or 'RANDOM'
// List the default exportParameter values taken if not provided by chart
$defaultParameterValues = array(
"exportfilename" => "FusionCharts",
"exportaction" => "download",
"exporttargetwindow" => "_self",
"exportformat" => "PDF"
);
// Stores server notices if any as string [ to be send back to chart after save ]
$notices = "" ;
// =============================================================================
// == processing ==
// =============================================================================
/**
* Retrieve export data from POST Request sent by chart
* Parse the Request stream into export data readable by this script
*
* Store export data into an array containing keys 'stream' (contains encoded
* image data) ; 'meta' ( contains an array with 'width', 'height' and 'bgColor' key
没有合适的资源?快使用搜索试试~ 我知道了~
FusionMap_Trial
共1773个文件
html:810个
swf:327个
xml:297个
5星 · 超过95%的资源 需积分: 9 28 下载量 73 浏览量
2009-11-16
17:19:14
上传
评论
收藏 29.9MB ZIP 举报
温馨提示
FusionCharts配套的产品,这个是试用版,官方发布的
资源推荐
资源详情
资源评论
收起资源包目录
FusionMap_Trial (1773个子文件)
Detailed.asp 6KB
FusionCharts.asp 6KB
FusionCharts.asp 6KB
FusionMaps.asp 6KB
FusionMaps.asp 6KB
Index.asp 5KB
Charts.asp 5KB
BasicMapsArray.asp 4KB
Default.asp 3KB
FormSubmit.asp 3KB
getURLdata.asp 3KB
BasicMapsURL.asp 652B
DBConn.asp 644B
DBConn.asp 644B
Default.aspx 5KB
Default.aspx 5KB
WorldPopulationData.aspx 3KB
WorldPopulationData.aspx 3KB
BasicArray.aspx 2KB
BasicArray.aspx 2KB
Default.aspx 2KB
Default.aspx 2KB
StateDetails.aspx 2KB
StateDetails.aspx 2KB
Charts.aspx 2KB
Charts.aspx 2KB
BasicArrayURL.aspx 2KB
BasicArrayURL.aspx 2KB
FormSubmit.aspx 2KB
FormSubmit.aspx 2KB
Default.aspx 2KB
Default.aspx 2KB
DataGen.aspx 107B
DataGen.aspx 106B
FCExporter.aspx 102B
CodeASPDXML1.bmp 948KB
CodeASPDURL1.bmp 940KB
CodeASPForm2.bmp 889KB
CodeASPForm1.bmp 672KB
PDFGenerator.class 10KB
FusionChartsExportHelper.class 7KB
ErrorHandler.class 5KB
ExportBean.class 4KB
JPEGEncoder.class 4KB
BasicEncoder.class 4KB
ImageGenerator.class 3KB
ChartMetadata.class 1KB
Encoder.class 739B
web.config 2KB
web.config 2KB
FCExporter.aspx.cs 110KB
FusionMaps.cs 15KB
DataGen.aspx.cs 14KB
FormSubmit.aspx.cs 4KB
BasicArray.aspx.cs 4KB
Charts.aspx.cs 3KB
DbHelper.cs 3KB
BasicArrayURL.aspx.cs 1KB
StateDetails.aspx.cs 1KB
Default.aspx.cs 1KB
Default.aspx.cs 980B
Tabber.css 2KB
Style.css 2KB
typoset.css 2KB
Style.css 1KB
ChartStyle.css 1KB
style.css 765B
style.css 765B
dtree.css 509B
StyleMapSS.css 486B
prettify.css 453B
FusionCharts.dll 9KB
FusionCharts.dll 9KB
FusionMaps.dll 8KB
FusionMaps.dll 8KB
error.html.erb 41B
FormExample.fla 789KB
MultipleMaps.fla 361KB
ClickHandler.fla 208KB
MyFirstMap.fla 203KB
WorldMap1.gif 40KB
GUIWorldPreview.gif 35KB
WorldMap2.gif 33KB
GUIStart2.gif 32KB
WorldMap5.gif 32KB
WorldMap4.gif 32KB
Flash_O_Fi.gif 31KB
ExportDataClip1.gif 29KB
GUIConfigTab.gif 26KB
WorldMap3.gif 25KB
GUIMapConfig.gif 22KB
WorldMap6.gif 21KB
ECClientProcess.gif 21KB
ECBatchOverview1.gif 21KB
GUIXMLData.gif 20KB
GUIDataTab.gif 19KB
MarkerXML.gif 18KB
ECServerOverview1.gif 17KB
Flash_O_Lib.gif 16KB
Connector_Example.gif 13KB
共 1773 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18
资源评论
- deardaishu2012-07-23确实可以用,就是5分蛮高的啊。
sophiasy
- 粉丝: 113
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功