removed OFC implementation, since we are not going to use it.

This commit is contained in:
Martynas Mickevicius
2010-07-29 20:26:16 +03:00
parent 55089f12db
commit 68f4a8daf7
4 changed files with 0 additions and 137 deletions

Binary file not shown.

View File

@@ -3,8 +3,6 @@
define('ERR_NO_GD', 0);
define('ERR_UNKNOWN_FORMAT', 1);
require_once './libraries/chart/pma_ofc_pie.php';
require_once './libraries/chart/pma_pchart_pie.php';
require_once './libraries/chart/pma_pchart_single_bar.php';
require_once './libraries/chart/pma_pchart_multi_bar.php';

View File

@@ -1,89 +0,0 @@
<?php
require_once 'pma_chart.php';
/*
* Base class for every chart implemented using OFC.
* Has the code used to embed OFC chart into the page.
*/
class PMA_OFC_Chart extends PMA_Chart
{
protected $flashBaseUrl = 'flash/';
protected $chart = null;
function __construct($options = null)
{
parent::__construct($options);
}
function get_embed_code($data)
{
$url = urlencode($url);
// output buffer
$out = array();
// check for http or https:
if (isset($_SERVER['HTTPS']))
{
if (strtoupper ($_SERVER['HTTPS']) == 'ON')
{
$protocol = 'https';
}
else
{
$protocol = 'http';
}
}
else
{
$protocol = 'http';
}
// if there are more than one charts on the
// page, give each a different ID
global $open_flash_chart_seqno;
$chart_id = 'chart';
if (!isset($open_flash_chart_seqno))
{
$open_flash_chart_seqno = 1;
}
else
{
$open_flash_chart_seqno++;
}
$obj_id .= '_'. $open_flash_chart_seqno;
$data_func_name = 'get_data_for_'.$obj_id;
// all parameters for the OFC will be given by the return value
// of the JS function
$out[] = '<script type="text/javascript">';
$out[] = 'function '.$data_func_name.'()';
$out[] = '{';
$out[] = "return '".str_replace("\n", '', $data)."';";
$out[] = '}';
$out[] = '</script>';
$out[] = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'.$protocol.'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
$out[] = 'width="'.$this->width.'" height="'.$this->height.'" id="'.$obj_id.'" align="middle">';
$out[] = '<param name="allowScriptAccess" value="sameDomain" />';
$out[] = '<param name="movie" value="'.$this->flashBaseUrl.'open-flash-chart.swf?get-data='.$data_func_name.'" />';
$out[] = '<param name="quality" value="high" />';
$out[] = '<param name="bgcolor" value="#FFFFFF" />';
$out[] = '<embed src="'.$this->flashBaseUrl.'open-flash-chart.swf?get-data='.$data_func_name.'" quality="high" bgcolor="#FFFFFF" width="'.$this->width.'" height="'.$this->height.'" name="'.$obj_id.'" align="middle" allowScriptAccess="sameDomain" ';
$out[] = 'type="application/x-shockwave-flash" pluginspage="'.$protocol.'://www.macromedia.com/go/getflashplayer" id="'.$obj_id.'"/>';
$out[] = '</object>';
return implode("\n", $out);
}
function toString()
{
return $this->get_embed_code($this->chart->toPrettyString());
}
}
?>

View File

@@ -1,46 +0,0 @@
<?php
require_once 'pma_ofc_chart.php';
/*
* Implementation of pie chart using OFC.
*/
class PMA_OFC_Pie extends PMA_OFC_Chart
{
function __construct($titleText, $data, $options = null)
{
parent::__construct($options);
require_once './libraries/chart/ofc/open-flash-chart.php';
// create and style chart title
$title = new title($titleText);
$title->set_style($this->titleStyle);
// create the main chart element - pie
$pie = new pie();
$pie->set_alpha(1);
$pie->set_start_angle(35);
$pie->add_animation(new pie_fade());
$pie->add_animation(new pie_bounce(10));
$pie->set_tooltip('#val# '._('of').' #total#<br>#percent# '._('of').' 100%');
$pie->set_colours($this->colors);
$values = array();
foreach($data as $key => $value) {
$values[] = new pie_value($value, $key);
}
$pie->set_values($values);
$pie->gradient_fill();
// create chart
$this->chart = new open_flash_chart();
$this->chart->x_axis = null;
$this->chart->set_bg_colour($this->bgColor);
$this->chart->set_title($title);
$this->chart->add_element($pie);
}
}
?>