diff --git a/workflow/engine/plugins/openFlash.php b/workflow/engine/plugins/openFlash.php deleted file mode 100644 index e91fd3302..000000000 --- a/workflow/engine/plugins/openFlash.php +++ /dev/null @@ -1,35 +0,0 @@ -sFriendlyName = 'openFlash Plugin'; - $this->sDescription = 'Charts Plugin, with this plugin you can see many differents charts using interactive flash charts for ProcessMaker'; - $this->sPluginFolder = 'openFlash'; - $this->sSetupPage = 'setupPage'; - $this->aWorkspaces = array ( ); - $this->aWorkspaces = array ( 'dev'); - $this->iVersion = 0.45; - return $res; - } - - function setup() - { - $this->registerDashboard(); - } - - function install() - { - - } - } - - $oPluginRegistry =& PMPluginRegistry::getSingleton(); - $oPluginRegistry->registerPlugin('openFlash', __FILE__); - - - - - diff --git a/workflow/engine/plugins/openFlash/chart-data.php b/workflow/engine/plugins/openFlash/chart-data.php deleted file mode 100644 index a0dbb6a22..000000000 --- a/workflow/engine/plugins/openFlash/chart-data.php +++ /dev/null @@ -1,14 +0,0 @@ -{$chartType}(); - die; - } - diff --git a/workflow/engine/plugins/openFlash/chart.php b/workflow/engine/plugins/openFlash/chart.php deleted file mode 100644 index 78d8c1975..000000000 --- a/workflow/engine/plugins/openFlash/chart.php +++ /dev/null @@ -1,11 +0,0 @@ -sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf'; - if ( !file_exists( dirname($fileConf) ) ) - throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist." ) ); - - if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) ) - throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) ); - - if ( file_exists ( $fileConf ) ) { - $content = file_get_contents ( $fileConf); - $fields = unserialize ($content); - } - else - $fields = array(); - return $fields; - } - - function updateFieldsForPageSetup ( $oData) { - $content = serialize ($oData['form']); - $fileConf = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf'; - if ( !is_writable( dirname($fileConf) ) ) - throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist or this directory is not writable." ) ); - - if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) ) - throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) ); - - file_put_contents ( $fileConf, $content); - return true; - } - - function setup() { - } - - function getChart( $chartName ) { - $this->readConfig(); - $prePath = '/sys' . config("system.workspace") . '/' . SYS_LANG . '/blank/'; - $obj = new StdClass(); - $obj->title = 'Standard ProcessMaker Reports'; - $obj->height = 220; - $obj->open->url = $prePath . 'openFlash/chart?chart=' . $chartName . "&u="; - return $obj; - } - - //here we are defining the available charts, the dashboard setup will call this function to know the charts - function getAvailableCharts( ) { - return array ( - 'CasesByStatus', - 'CasesByStatusPie', - 'CasesByProcess', - 'CasesByProcessPie' - ); - } - - /* definition of all charts */ - /* that definition comes in two parts : - /* 1. the getXX () function to get the data from the databases - /* 2. the XX () function to draw the graph - */ - - /** chart getCasesByStatus ***/ - /** to show the Cases grouped by Status*/ - function getCasesByStatus ( ) { - $dataSet = array(); - - $c = new Criteria('workflow'); - $c->clearSelectColumns(); - $c->addSelectColumn ( ApplicationPeer::APP_STATUS ); - $c->addSelectColumn ( 'COUNT(*) AS CANT') ; - $c->addGroupByColumn(ApplicationPeer::APP_STATUS); - $rs = ApplicationPeer::doSelectRS( $c ); - $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = $row['APP_STATUS']; - $data[] = (int)$row['CANT']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $aux = intval($max / 6 ) * 6 + 6; - $dataSet['max'] = $aux; - return $dataSet; - } - - function CasesByStatus( ) { - $dataSet = $this->getCasesByStatus(); - $data = $dataSet['data']; - //$series2 = $dataSet['series2']; - $g = new graph(); - $g->title( ' Cases by Status ', '{font-size: 14px;}' ); - $bar_red = new bar_3d( 50, '#3334AD' ); - $bar_red->key( 'cases', 10 ); - $bar_red->data = $data; - - $g->data_sets[] = $bar_red; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $dataSet['max'] ); - $g->y_label_steps( 6 ); - //$g->set_y_legend( 'Posts', 12, '#736AFF' ); - echo $g->render(); - } - - function CasesByStatusPie ( ) { - $g->bg_colour = '#FFFFFF'; - $dataSet = $this->getCasesByStatus(); - $data = $dataSet['data']; - $g = new graph(); - $g->pie(80,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['label'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810','#D54C78') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Cases by Status', '{font-size:18px; color: #d01f3c}' ); - echo $g->render(); - } - - /** chart CasesByProcess ***/ - /** to show the cases grouped by Process */ - function getCasesByProcess ( ) { - $dataSet = array(); - $processObj = new Process; - - $c = new Criteria('workflow'); - $c->clearSelectColumns(); - $c->addSelectColumn ( ApplicationPeer::PRO_UID ); - $c->addSelectColumn ( 'COUNT(*) AS CANT') ; - //$c->addJoin( ProcessPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN); - $c->addGroupByColumn(ApplicationPeer::PRO_UID); - $rs = ApplicationPeer::doSelectRS( $c ); - $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $processObj->load ( $row['PRO_UID'] ); - $label[] = $processObj->getProTitle(); - $labelPie[] = substr ( $processObj->getProTitle(),0,16 ); - $data[] = (int)$row['CANT']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - $dataSet['labelPie'] = $labelPie; - - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $aux = intval($max / 6 ) * 6 + 6; - $dataSet['max'] = $aux; - return $dataSet; - } - - function CasesByProcess( ) { - $dataSet = $this->getCasesByProcess(); - $data = $dataSet['data']; - //$series2 = $dataSet['series2']; - $g = new graph(); - $g->title( ' Cases by Process ', '{font-size: 14px;}' ); - $bar_red = new bar_3d( 50, '#3334AD' ); - $bar_red->key( 'cases', 10 ); - $bar_red->data = $data; - - $g->data_sets[] = $bar_red; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $dataSet['max'] ); - $g->y_label_steps( 6 ); - echo $g->render(); - } - - function CasesByProcessPie ( ) { - $g->bg_colour = '#FFFFFF'; - $dataSet = $this->getCasesByProcess(); - $data = $dataSet['data']; - $g = new graph(); - $g->pie(80,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['labelPie'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810','#D54C78') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Cases by Process', '{font-size:16px; color: #d01f3c}' ); - echo $g->render(); - } -/* - function getForumWeek ( ) { - $databases = PATH_PLUGINS . "/openFlash/config/databases.php"; - Propel::init( $databases ); - - $dataSet = array(); - $processObj = new Process; - $past2months = mktime(0, 0, 0, date("m") -2 , date("d"), date("Y")); - - $con = Propel::getConnection('forum'); - $sql = "select week(FROM_UNIXTIME(post_time )) as week ,count(*) as cant from phpbb_posts where post_time > $past2months group by week " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = date ( 'M d', mktime(0, 0, 0, 1 , $row['week']*7, date("Y")) ); - $data[] = $row['cant']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function ForumWeek ( ) { - $dataSet = $this->getForumWeek(); - $data = $dataSet['data']; - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $g = new graph(); - $g->title( ' Posts by Week ', '{font-size: 16px;}' ); - $bar_red = new bar_3d( 50, '#3334AD' ); - $bar_red->key( 'week', 10 ); - $bar_red->data = $data; - - $g->data_sets[] = $bar_red; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $max ); - $g->y_label_steps( 5 ); - $g->set_y_legend( 'Posts', 12, '#736AFF' ); - echo $g->render(); - } - - /** chart PostByUser ***/ - /** to show the last 7 days grouped by user * / - function getPostByUser ( ) { - $databases = PATH_PLUGINS . "/openFlash/config/databases.php"; - Propel::init( $databases ); - - $dataSet = array(); - $con = Propel::getConnection('forum'); - - $past7days = mktime(0, 0, 0, date("m") , date("d")-7, date("Y")); - $sql = "select username, count(*) as cant from phpbb_posts left join phpbb_users on ( poster_id = user_id ) where post_time > $past7days group by username " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = $row['username']; - $data[] = $row['cant']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - //$dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function PostByUser ( ) { - $dataSet = $this->getPostByUser(); - $data = $dataSet['data']; - $g = new graph(); - $g->title( ' Posts by User last week '. date("Y-m-d"), '{font-size: 16px;}' ); - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $max = intval($max / 4 ) * 4 + 4; - - $bar_red = new bar_3d( 50, '#356aa0' ); - $bar_red->key( 'posts', 10 ); - $bar_red->data = $data; - - $bar_blue = new bar_3d( 75, '#D54C78' ); - $bar_blue->key( 'completed', 10 ); - $bar_blue->data = $data; - - $g->data_sets[] = $bar_red; - //$g->data_sets[] = $bar_blue; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $max ); - $g->y_label_steps( 4 ); - $g->set_y_legend( 'Processmaker', 12, '#736AFF' ); - echo $g->render(); - } - - /** chart BugsByStatus ***/ - /** to show the bugs by status resolved, open, closed * / - function getBugsByStatus ( ) { - $databases = PATH_PLUGINS . "/openFlash/config/databases.php"; - Propel::init( $databases ); - - $dataSet = array(); - $con = Propel::getConnection('bugs'); - - //open - $sql = "SELECT count(*) as cant FROM mantis_bug_table where project_id = 31 and status in (20,30,40,50) " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - $label[] = 'open'; - $data[] = $row['cant']; - - //resolved - $sql = "SELECT count(*) as cant FROM mantis_bug_table where project_id = 31 and status = 80" ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - $label[] = 'resolved'; - $data[] = $row['cant']; - - //closed - $sql = "SELECT count(*) as cant FROM mantis_bug_table where project_id = 31 and status = 90" ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - $label[] = 'closed'; - $data[] = $row['cant']; - - $dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function BugsByStatus ( ) { - $dataSet = $this->getBugsByStatus(); - $data = $dataSet['data']; - $g = new graph(); - $g->title( ' Posts by User last week '. date("Y-m-d"), '{font-size: 16px;}' ); - - $g->pie(70,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['label'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Bugs by Status', '{font-size:18px; color: #d01f3c}' ); - echo $g->render(); - } - - /** chart BugsOpenByUser ***/ - /** to show the bugs in OPEN status by user * / - function getBugsOpenByUser ( ) { - $databases = PATH_PLUGINS . "/openFlash/config/databases.php"; - Propel::init( $databases ); - - $dataSet = array(); - $con = Propel::getConnection('bugs'); - - $sql = "SELECT username, count(*) as cant FROM mantis_bug_table left join mantis_user_table on ( mantis_user_table.id = handler_id) where project_id = 31 and status in (20,30,40,50) group by username " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = $row['username']; - $data[] = $row['cant']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function BugsOpenByUser ( ) { - $g->bg_colour = '#EFFFEF'; - $dataSet = $this->getBugsOpenByUser(); - $data = $dataSet['data']; - $g = new graph(); - $g->pie(80,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['label'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810','#D54C78') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Open Bugs by User', '{font-size:18px; color: #d01f3c}' ); - echo $g->render(); - } - -/*******/ - - - - - - - - -} diff --git a/workflow/engine/plugins/openFlash/open-flash-chart.php b/workflow/engine/plugins/openFlash/open-flash-chart.php deleted file mode 100644 index b1cd90627..000000000 --- a/workflow/engine/plugins/openFlash/open-flash-chart.php +++ /dev/null @@ -1,1769 +0,0 @@ -data_sets = array(); - - - $this->data = array(); - $this->links = array(); - $this->width = 250; - $this->height = 200; - $this->js_path = '/images/'; - $this->swf_path = ''; - $this->x_labels = array(); - $this->y_min = ''; - $this->y_max = ''; - $this->x_min = ''; - $this->x_max = ''; - $this->y_steps = ''; - $this->title = ''; - $this->title_style = ''; - $this->occurence = 0; - - $this->x_offset = ''; - - $this->x_tick_size = -1; - - $this->y2_max = ''; - $this->y2_min = ''; - - // GRID styles: - $this->x_axis_colour = ''; - $this->x_axis_3d = ''; - $this->x_grid_colour = ''; - $this->x_axis_steps = 1; - $this->y_axis_colour = ''; - $this->y_grid_colour = ''; - $this->y2_axis_colour = ''; - - // AXIS LABEL styles: - $this->x_label_style = ''; - $this->y_label_style = ''; - $this->y_label_style_right = ''; - - - // AXIS LEGEND styles: - $this->x_legend = ''; - $this->x_legend_size = 20; - $this->x_legend_colour = '#000000'; - - $this->y_legend = ''; - $this->y_legend_right = ''; - //$this->y_legend_size = 20; - //$this->y_legend_colour = '#000000'; - - $this->lines = array(); - $this->line_default['type'] = 'line'; - $this->line_default['values'] = '3,#87421F'; - $this->js_line_default = 'so.addVariable("line","3,#87421F");'; - - $this->bg_colour = ''; - $this->bg_image = ''; - - $this->inner_bg_colour = ''; - $this->inner_bg_colour_2 = ''; - $this->inner_bg_angle = ''; - - // PIE chart ------------ - $this->pie = ''; - $this->pie_values = ''; - $this->pie_colours = ''; - $this->pie_labels = ''; - - $this->tool_tip = ''; - - // which data lines are attached to the - // right Y axis? - $this->y2_lines = array(); - - // Number formatting: - $this->y_format=''; - $this->num_decimals=''; - $this->is_fixed_num_decimals_forced=''; - $this->is_decimal_separator_comma=''; - $this->is_thousand_separator_disabled=''; - - $this->output_type = ''; - - // - // set some default value incase the user forgets - // to set them, so at least they see *something* - // even is it is only the axis and some ticks - // - $this->set_y_min( 0 ); - $this->set_y_max( 20 ); - $this->set_x_axis_steps( 1 ); - $this->y_label_steps( 5 ); - } - - /** - * Set the unique_id to use for the flash object id. - */ - function set_unique_id() - { - $this->unique_id = uniqid(rand(), true); - } - - /** - * Get the flash object ID for the last rendered object. - */ - function get_unique_id() - { - return ($this->unique_id); - } - - /** - * Set the base path for the swfobject.js - * - * @param base_path a string argument. - * The path to the swfobject.js file - */ - function set_js_path($path) - { - $this->js_path = $path; - } - - /** - * Set the base path for the open-flash-chart.swf - * - * @param path a string argument. - * The path to the open-flash-chart.swf file - */ - function set_swf_path($path) - { - $this->swf_path = $path; - } - - /** - * Set the type of output data. - * - * @param type a string argument. - * The type of data. Currently only type is js, or nothing. - */ - function set_output_type($type) - { - $this->output_type = $type; - } - - /** - * returns the next line label for multiple lines. - */ - function next_line() - { - $line_num = ''; - if( count( $this->lines ) > 0 ) - $line_num = '_'. (count( $this->lines )+1); - - return $line_num; - } - - // escape commas (,) - function esc( $text ) - { - // we replace the comma so it is not URL escaped - // if it is, flash just thinks it is a comma - // which is no good if we are splitting the - // string on commas. - $tmp = str_replace( ',', '#comma#', $text ); - //$tmp = utf8_encode( $tmp ); - // now we urlescape all dodgy characters (like & % $ etc..) - return urlencode( $tmp ); - } - - /** - * Format the text to the type of output. - */ - function format_output($function,$values) - { - if($this->output_type == 'js') - { - $tmp = 'so.addVariable("'. $function .'","'. $values . '");'; - } - else - { - $tmp = '&'. $function .'='. $values .'&'; - } - - return $tmp; - } - - /** - * Set the text and style of the title. - * - * @param title a string argument. - * The text of the title. - * @param style a string. - * CSS styling of the title. - */ - function set_title( $title, $style='' ) - { - $this->title = $this->esc( $title ); - if( strlen( $style ) > 0 ) - $this->title_style = $style; - } - - /** - * Set the width of the chart. - * - * @param width an int argument. - * The width of the chart frame. - */ - function set_width( $width ) - { - $this->width = $width; - } - - /** - * Set the height of the chart. - * - * @param height an int argument. - * The height of the chart frame. - */ - function set_height( $height ) - { - $this->height = $height; - } - - /** - * Set the base path of the swfobject. - * - * @param base a string argument. - * The base path of the swfobject. - */ - function set_base( $base='/images/' ) - { - $this->base = $base; - } - - // Number formatting: - function set_y_format( $val ) - { - $this->y_format = $val; - } - - function set_num_decimals( $val ) - { - $this->num_decimals = $val; - } - - function set_is_fixed_num_decimals_forced( $val ) - { - $this->is_fixed_num_decimals_forced = $val?'true':'false'; - } - - function set_is_decimal_separator_comma( $val ) - { - $this->is_decimal_separator_comma = $val?'true':'false'; - } - - function set_is_thousand_separator_disabled( $val ) - { - $this->is_thousand_separator_disabled = $val?'true':'false'; - } - - /** - * Set the data for the chart - * @param a an array argument. - * An array of the data to add to the chart. - */ - function set_data( $a ) - { - $this->data[] = implode(',',$a); - } - - // UGH, these evil functions are making me fell ill - function set_links( $links ) - { - // TO DO escape commas: - $this->links[] = implode(',',$links); - } - - // $val is a boolean - function set_x_offset( $val ) - { - $this->x_offset = $val?'true':'false'; - } - - /** - * Set the tooltip to be displayed on each chart item.\n - * \n - * Replaceable tokens that can be used in the string include: \n - * #val# - The actual value of whatever the mouse is over. \n - * #key# - The key string. \n - * \
- New line. \n - * #x_label# - The X label string. \n - * #x_legend# - The X axis legend text. \n - * Default string is: "#x_label#
#val#" \n - * - * @param tip a string argument. - * A formatted string to show as the tooltip. - */ - function set_tool_tip( $tip ) - { - $this->tool_tip = $this->esc( $tip ); - } - - /** - * Set the x axis labels - * - * @param a an array argument. - * An array of the x axis labels. - */ - function set_x_labels( $a ) - { - $tmp = array(); - foreach( $a as $item ) - $tmp[] = $this->esc( $item ); - $this->x_labels = $tmp; - } - - /** - * Set the look and feel of the x axis labels - * - * @param font_size an int argument. - * The font size. - * @param colour a string argument. - * The hex colour value. - * @param orientation an int argument. - * The orientation of the x-axis text. - * 0 - Horizontal - * 1 - Vertical - * 2 - 45 degrees - * @param step an int argument. - * Show the label on every $step label. - * @param grid_colour a string argument. - */ - function set_x_label_style( $size, $colour='', $orientation=0, $step=-1, $grid_colour='' ) - { - $this->x_label_style = $size; - - if( strlen( $colour ) > 0 ) - $this->x_label_style .= ','. $colour; - - if( $orientation > -1 ) - $this->x_label_style .= ','. $orientation; - - if( $step > 0 ) - $this->x_label_style .= ','. $step; - - if( strlen( $grid_colour ) > 0 ) - $this->x_label_style .= ','. $grid_colour; - } - - /** - * Set the background colour. - * @param colour a string argument. - * The hex colour value. - */ - function set_bg_colour( $colour ) - { - $this->bg_colour = $colour; - } - - /** - * Set a background image. - * @param url a string argument. - * The location of the image. - * @param x a string argument. - * The x location of the image. 'Right', 'Left', 'Center' - * @param y a string argument. - * The y location of the image. 'Top', 'Bottom', 'Middle' - */ - function set_bg_image( $url, $x='center', $y='center' ) - { - $this->bg_image = $url; - $this->bg_image_x = $x; - $this->bg_image_y = $y; - } - - /** - * Attach a set of data (a line, area or bar chart) to the right Y axis. - * @param data_number an int argument. - * The numbered order the data was attached using set_data. - */ - function attach_to_y_right_axis( $data_number ) - { - $this->y2_lines[] = $data_number; - } - - /** - * Set the background colour of the grid portion of the chart. - * @param col a string argument. - * The hex colour value of the background. - * @param col2 a string argument. - * The hex colour value of the second colour if you want a gradient. - * @param angle an int argument. - * The angle in degrees to make the gradient. - */ - function set_inner_background( $col, $col2='', $angle=-1 ) - { - $this->inner_bg_colour = $col; - - if( strlen($col2) > 0 ) - $this->inner_bg_colour_2 = $col2; - - if( $angle != -1 ) - $this->inner_bg_angle = $angle; - } - - /** - * Internal function to build the y label style for y and y2 - */ - function _set_y_label_style( $size, $colour ) - { - $tmp = $size; - - if( strlen( $colour ) > 0 ) - $tmp .= ','. $colour; - return $tmp; - } - - /** - * Set the look and feel of the y axis labels - * - * @param font_size an int argument. - * The font size. - * @param colour a string argument. - * The hex colour value. - */ - function set_y_label_style( $size, $colour='' ) - { - $this->y_label_style = $this->_set_y_label_style( $size, $colour ); - } - - /** - * Set the look and feel of the right y axis labels - * - * @param font_size an int argument. - * The font size. - * @param colour a string argument. - * The hex colour value. - */ - function set_y_right_label_style( $size, $colour='' ) - { - $this->y_label_style_right = $this->_set_y_label_style( $size, $colour ); - } - - function set_x_max( $max ) - { - $this->x_max = floatval( $max ); - } - - function set_x_min( $min ) - { - $this->x_min = floatval( $min ); - } - - /** - * Set the maximum value of the y axis. - * - * @param max an float argument. - * The maximum value. - */ - function set_y_max( $max ) - { - $this->y_max = floatval( $max ); - } - - /** - * Set the minimum value of the y axis. - * - * @param min an float argument. - * The minimum value. - */ - function set_y_min( $min ) - { - $this->y_min = floatval( $min ); - } - - /** - * Set the maximum value of the right y axis. - * - * @param max an float argument. - * The maximum value. - */ - function set_y_right_max( $max ) - { - $this->y2_max = floatval($max); - } - - /** - * Set the minimum value of the right y axis. - * - * @param min an float argument. - * The minimum value. - */ - function set_y_right_min( $min ) - { - $this->y2_min = floatval($min); - } - - /** - * Show the y label on every $step label. - * - * @param val an int argument. - * Show the label on every $step label. - */ - function y_label_steps( $val ) - { - $this->y_steps = intval( $val ); - } - - function title( $title, $style='' ) - { - $this->title = $this->esc( $title ); - if( strlen( $style ) > 0 ) - $this->title_style = $style; - } - - /** - * Set the parameters of the x legend. - * - * @param text a string argument. - * The text of the x legend. - * @param font_size an int argument. - * The font size of the x legend text. - * @param colour a string argument - * The hex value of the font colour. - */ - function set_x_legend( $text, $size=-1, $colour='' ) - { - $this->x_legend = $this->esc( $text ); - if( $size > -1 ) - $this->x_legend_size = $size; - - if( strlen( $colour )>0 ) - $this->x_legend_colour = $colour; - } - - /** - * Set the size of the x label ticks. - * - * @param size an int argument. - * The size of the ticks in pixels. - */ - function set_x_tick_size( $size ) - { - if( $size > 0 ) - $this->x_tick_size = $size; - } - - /** - * Set how often you would like to show a tick on the x axis. - * - * @param steps an int argument. - * Show a tick ever $steps. - */ - function set_x_axis_steps( $steps ) - { - if ( $steps > 0 ) - $this->x_axis_steps = $steps; - } - - /** - * Set the depth in pixels of the 3D X axis slab. - * - * @param size an int argument. - * The depth in pixels of the 3D X axis. - */ - function set_x_axis_3d( $size ) - { - if( $size > 0 ) - $this->x_axis_3d = intval($size); - } - - /** - * The private method of building the y legend output. - */ - function _set_y_legend( $text, $size, $colour ) - { - $tmp = $text; - - if( $size > -1 ) - $tmp .= ','. $size; - - if( strlen( $colour )>0 ) - $tmp .= ','. $colour; - - return $tmp; - } - - /** - * Set the parameters of the y legend. - * - * @param text a string argument. - * The text of the y legend. - * @param font_size an int argument. - * The font size of the y legend text. - * @param colour a string argument - * The hex colour value of the font colour. - */ - function set_y_legend( $text, $size=-1, $colour='' ) - { - $this->y_legend = $this->_set_y_legend( $text, $size, $colour ); - } - - /** - * Set the parameters of the right y legend. - * - * @param text a string argument. - * The text of the right y legend. - * @param font_size an int argument. - * The font size of the right y legend text. - * @param colour a string argument - * The hex value of the font colour. - */ - function set_y_right_legend( $text, $size=-1, $colour='' ) - { - $this->y_legend_right = $this->_set_y_legend( $text, $size, $colour ); - } - - /** - * Set the colour of the x axis line and grid. - * - * @param axis a string argument. - * The hex colour value of the x axis line. - * @param grid a string argument. - * The hex colour value of the x axis grid. - */ - function x_axis_colour( $axis, $grid='' ) - { - $this->x_axis_colour = $axis; - $this->x_grid_colour = $grid; - } - - /** - * Set the colour of the y axis line and grid. - * - * @param axis a string argument. - * The hex colour value of the y axis line. - * @param grid a string argument. - * The hex colour value of the y axis grid. - */ - function y_axis_colour( $axis, $grid='' ) - { - $this->y_axis_colour = $axis; - - if( strlen( $grid ) > 0 ) - $this->y_grid_colour = $grid; - } - - /** - * Set the colour of the right y axis line. - * - * @param colour a string argument. - * The hex colour value of the right y axis line. - */ - function y_right_axis_colour( $colour ) - { - $this->y2_axis_colour = $colour; - } - - /** - * Draw a line without markers on values. - * - * @param width an int argument. - * The width of the line in pixels. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label - * @param circles an int argument - * Need to find out. - */ - function line( $width, $colour='', $text='', $size=-1, $circles=-1 ) - { - $type = 'line'. $this->next_line(); - - $description = ''; - if( $width > 0 ) - { - $description .= $width; - $description .= ','. $colour; - } - - if( strlen( $text ) > 0 ) - { - $description.= ','. $text; - $description .= ','. $size; - } - - if( $circles > 0 ) - $description .= ','. $circles; - - $this->lines[$type] = $description; - } - - /** - * Draw a line with solid dot markers on values. - * - * @param width an int argument. - * The width of the line in pixels. - * @param dot_size an int argument. - * Size in pixels of the dot. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function line_dot( $width, $dot_size, $colour, $text='', $font_size='' ) - { - $type = 'line_dot'. $this->next_line(); - - $description = "$width,$colour,$text"; - - if( strlen( $font_size ) > 0 ) - $description .= ",$font_size,$dot_size"; - - $this->lines[$type] = $description; - } - - /** - * Draw a line with hollow dot markers on values. - * - * @param width an int argument. - * The width of the line in pixels. - * @param dot_size an int argument. - * Size in pixels of the dot. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function line_hollow( $width, $dot_size, $colour, $text='', $font_size='' ) - { - $type = 'line_hollow'. $this->next_line(); - - $description = "$width,$colour,$text"; - - if( strlen( $font_size ) > 0 ) - $description .= ",$font_size,$dot_size"; - - $this->lines[$type] = $description; - } - - /** - * Draw an area chart. - * - * @param width an int argument. - * The width of the line in pixels. - * @param dot_size an int argument. - * Size in pixels of the dot. - * @param colour a string argument. - * The hex colour value of the line. - * @param alpha an int argument. - * The percentage of transparency of the fill colour. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - * @param fill_colour a string argument. - * The hex colour value of the fill colour. - */ - function area_hollow( $width, $dot_size, $colour, $alpha, $text='', $font_size='', $fill_colour='' ) - { - $type = 'area_hollow'. $this->next_line(); - - $description = "$width,$dot_size,$colour,$alpha"; - - if( strlen( $text ) > 0 ) - $description .= ",$text,$font_size"; - - if( strlen( $fill_colour ) > 0 ) - $description .= ','. $fill_colour; - - $this->lines[$type] = $description; - } - - /** - * Draw a bar chart. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar( $alpha, $colour='', $text='', $size=-1 ) - { - $type = 'bar'. $this->next_line(); - - $description = $alpha .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - /** - * Draw a bar chart with an outline. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param colour_outline a strng argument. - * The hex colour value of the outline. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_filled( $alpha, $colour, $colour_outline, $text='', $size=-1 ) - { - $type = 'filled_bar'. $this->next_line(); - - $description = "$alpha,$colour,$colour_outline,$text,$size"; - - $this->lines[$type] = $description; - } - - function bar_sketch( $alpha, $offset, $colour, $colour_outline, $text='', $size=-1 ) - { - $type = 'bar_sketch'. $this->next_line(); - - $description = "$alpha,$offset,$colour,$colour_outline,$text,$size"; - - $this->lines[$type] = $description; - } - - /** - * Draw a 3D bar chart. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_3D( $alpha, $colour='', $text='', $size=-1 ) - { - $type = 'bar_3d'. $this->next_line(); - - $description = $alpha .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - /** - * Draw a 3D bar chart that looks like glass. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param outline_colour a string argument. - * The hex colour value of the outline. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_glass( $alpha, $colour, $outline_colour, $text='', $size=-1 ) - { - $type = 'bar_glass'. $this->next_line(); - - $description = $alpha .','. $colour .','. $outline_colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - /** - * Draw a faded bar chart. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_fade( $alpha, $colour='', $text='', $size=-1 ) - { - $type = 'bar_fade'. $this->next_line(); - - $description = $alpha .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - function candle( $data, $alpha, $line_width, $colour, $text='', $size=-1 ) - { - $type = 'candle'. $this->next_line(); - - $description = $alpha .','. $line_width .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - - $a = array(); - foreach( $data as $can ) - $a[] = $can->toString(); - - $this->data[] = implode(',',$a); - } - - function hlc( $data, $alpha, $line_width, $colour, $text='', $size=-1 ) - { - $type = 'hlc'. $this->next_line(); - - $description = $alpha .','. $line_width .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - - $a = array(); - foreach( $data as $can ) - $a[] = $can->toString(); - - $this->data[] = implode(',',$a); - } - - function scatter( $data, $line_width, $colour, $text='', $size=-1 ) - { - $type = 'scatter'. $this->next_line(); - - $description = $line_width .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - - $a = array(); - foreach( $data as $can ) - $a[] = $can->toString(); - - $this->data[] = implode(',',$a); - } - - - // - // Patch by, Jeremy Miller (14th Nov, 2007) - // - /** - * Draw a pie chart. - * - * @param alpha an int argument. - * The percentage of transparency of the pie colour. - * @param $style a string argument. - * CSS style string - * @param label_colour a string argument. - * The hex colour value of the label. - * @param gradient a boolean argument. - * Use a gradient true or false. - * @param border_size an int argument. - * Size of the border in pixels. - */ - function pie( $alpha, $line_colour, $style, $gradient = true, $border_size = false ) - { - $this->pie = $alpha.','.$line_colour.','.$style; - if( !$gradient ) - { - $this->pie .= ','.!$gradient; - } - if ($border_size) - { - if ($gradient === false) - { - $this->pie .= ','; - } - $this->pie .= ','.$border_size; - } - } - - /** - * Set the values of the pie chart. - * - * @param values an array argument. - * An array of the values for the pie chart. - * @param labels an array argument. - * An array of the labels for the pie pieces. - * @param links an array argument. - * An array of the links to the pie pieces. - */ - function pie_values( $values, $labels=array(), $links=array() ) - { - $this->pie_values = implode(',',$values); - $this->pie_labels = implode(',',$labels); - $this->pie_links = implode(",",$links); - } - - /** - * Set the pie slice colours. - * - * @param colours an array argument. - * The hex colour values of the pie pieces. - */ - function pie_slice_colours( $colours ) - { - $this->pie_colours = implode(',',$colours); - } - - - /** - * Render the output. - */ - function render() - { - $tmp = array(); - - //echo headers_sent() ?'yes':'no'; - if( !headers_sent() ) - header('content-type: text; charset: utf-8'); - - if($this->output_type == 'js') - { - $this->set_unique_id(); - - $tmp[] = '
'; - $tmp[] = ''; - $tmp[] = ''; - } - - return implode("\r\n",$tmp); - } -} - -class line -{ - var $line_width; - var $colour; - var $_key; - var $key; - var $key_size; - // hold the data - var $data; - // extra tool tip info: - var $tips; - - function line( $line_width, $colour ) - { - $this->var = 'line'; - - $this->line_width = $line_width; - $this->colour = $colour; - $this->data = array(); - $this->links = array(); - $this->tips = array(); - $this->_key = false; - } - - - function key( $key, $size ) - { - $this->_key = true; - $this->key = graph::esc( $key ); - $this->key_size = $size; - } - - function add( $data ) - { - $this->data[] = $data; - } - - function add_link( $data, $link ) - { - $this->data[] = $data; - $this->links[] = graph::esc( $link ); - } - - function add_data_tip( $data, $tip ) - { - $this->data[] = $data; - $this->tips[] = graph::esc( $tip ); - } - - function add_data_link_tip( $data, $link, $tip ) - { - $this->data[] = $data; - $this->links[] = graph::esc( $link ); - $this->tips[] = graph::esc( $tip ); - } - - // return the variables for this chart - function _get_variable_list() - { - $values = array(); - $values[] = $this->line_width; - $values[] = $this->colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } - - function toString( $output_type, $set_num ) - { - $values = implode( ',', $this->_get_variable_list() ); - - $tmp = array(); - - if( $output_type == 'js' ) - { - $tmp[] = 'so.addVariable("'. $this->var.$set_num .'","'. $values . '");'; - - $tmp[] = 'so.addVariable("values'. $set_num .'","'. implode( ',', $this->data ) .'");'; - - if( count( $this->links ) > 0 ) - $tmp[] = 'so.addVariable("links'. $set_num .'","'. implode( ',', $this->links ) .'");'; - - if( count( $this->tips ) > 0 ) - $tmp[] = 'so.addVariable("tool_tips_set'. $set_num .'","'. implode( ',', $this->tips ) .'");'; - - } - else - { - $tmp[] = '&'. $this->var. $set_num .'='. $values .'&'; - $tmp[] = '&values'. $set_num .'='. implode( ',', $this->data ) .'&'; - - if( count( $this->links ) > 0 ) - $tmp[] = '&links'. $set_num .'='. implode( ',', $this->links ) .'&'; - - if( count( $this->tips ) > 0 ) - $tmp[] = '&tool_tips_set'. $set_num .'='. implode( ',', $this->tips ) .'&'; - } - - return implode( "\r\n", $tmp ); - } -} - -class line_hollow extends line -{ - var $dot_size; - - function line_hollow( $line_width, $dot_size, $colour ) - { - parent::line( $line_width, $colour ); - $this->var = 'line_hollow'; - $this->dot_size = $dot_size; - } - - // return the variables for this chart - function _get_variable_list() - { - $values = array(); - $values[] = $this->line_width; - $values[] = $this->colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - else - { - $values[] = ''; - $values[] = ''; - } - $values[] = $this->dot_size; - - return $values; - } -} - -class line_dot extends line_hollow -{ - function line_dot( $line_width, $dot_size, $colour ) - { - parent::line_dot( $line_width, $colour ); - $this->var = 'line_dot'; - } -} - -class bar -{ - var $colour; - var $alpha; - var $data; - var $links; - var $_key; - var $key; - var $key_size; - var $var; - // extra tool tip info: - var $tips; - - function bar( $alpha, $colour ) - { - $this->var = 'bar'; - - $this->alpha = $alpha; - $this->colour = $colour; - $this->data = array(); - $this->links = array(); - $this->tips = array(); - $this->_key = false; - } - - function key( $key, $size ) - { - $this->_key = true; - $this->key = graph::esc( $key ); - $this->key_size = $size; - } - - function add( $data ) - { - $this->data[] = $data; - } - - function add_link( $data, $link ) - { - $this->data[] = $data; - $this->links[] = graph::esc( $link ); - } - - function add_data_tip( $data, $tip ) - { - $this->data[] = $data; - $this->tips[] = graph::esc( $tip ); - } - - // return the variables for this - // bar chart - function _get_variable_list() - { - $values = array(); - $values[] = $this->alpha; - $values[] = $this->colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } - - function toString( $output_type, $set_num ) - { - $values = implode( ',', $this->_get_variable_list() ); - - $tmp = array(); - - if( $output_type == 'js' ) - { - $tmp[] = 'so.addVariable("'. $this->var.$set_num .'","'. $values . '");'; - - $tmp[] = 'so.addVariable("values'. $set_num .'","'. implode( ',', $this->data ) .'");'; - - if( count( $this->links ) > 0 ) - $tmp[] = 'so.addVariable("links'. $set_num .'","'. implode( ',', $this->links ) .'");'; - - if( count( $this->tips ) > 0 ) - $tmp[] = 'so.addVariable("tool_tips_set'. $set_num .'","'. implode( ',', $this->tips ) .'");'; - - } - else - { - $tmp[] = '&'. $this->var. $set_num .'='. $values .'&'; - $tmp[] = '&values'. $set_num .'='. implode( ',', $this->data ) .'&'; - - if( count( $this->links ) > 0 ) - $tmp[] = '&links'. $set_num .'='. implode( ',', $this->links ) .'&'; - - if( count( $this->tips ) > 0 ) - $tmp[] = '&tool_tips_set'. $set_num .'='. implode( ',', $this->tips ) .'&'; - } - - return implode( "\r\n", $tmp ); - } - -} - -class bar_3d extends bar -{ - function bar_3d( $alpha, $colour ) - { - parent::bar( $alpha, $colour ); - $this->var = 'bar_3d'; - } -} - -class bar_fade extends bar -{ - function bar_fade( $alpha, $colour ) - { - parent::bar( $alpha, $colour ); - $this->var = 'bar_fade'; - } -} - -class bar_outline extends bar -{ - var $outline_colour; - - function bar_outline( $alpha, $colour, $outline_colour ) - { - parent::bar( $alpha, $colour ); - $this->var = 'filled_bar'; - $this->outline_colour = $outline_colour; - } - - // override the base method - function _get_variable_list() - { - $values = array(); - $values[] = $this->alpha; - $values[] = $this->colour; - $values[] = $this->outline_colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } -} - -class bar_glass extends bar_outline -{ - function bar_glass( $alpha, $colour, $outline_colour ) - { - parent::bar_outline( $alpha, $colour, $outline_colour ); - $this->var = 'bar_glass'; - } -} - -// -// this has an outline colour and a 'jiggle' parameter -// called offset -// -class bar_sketch extends bar_outline -{ - var $offset; - - function bar_sketch( $alpha, $offset, $colour, $outline_colour ) - { - parent::bar_outline( $alpha, $colour, $outline_colour ); - $this->var = 'bar_sketch'; - $this->offset = $offset; - } - - // override the base method - function _get_variable_list() - { - $values = array(); - $values[] = $this->alpha; - $values[] = $this->offset; - $values[] = $this->colour; - $values[] = $this->outline_colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } -} - -class candle -{ - var $out; - - function candle( $high, $open, $close, $low ) - { - $this->out = array(); - $this->out[] = $high; - $this->out[] = $open; - $this->out[] = $close; - $this->out[] = $low; - } - - function toString() - { - return '['. implode( ',', $this->out ) .']'; - } -} - -class hlc -{ - var $out; - - function hlc( $high, $low, $close ) - { - $this->out = array(); - $this->out[] = $high; - $this->out[] = $low; - $this->out[] = $close; - } - - function toString() - { - return '['. implode( ',', $this->out ) .']'; - } -} - -class point -{ - var $out; - - function point( $x, $y, $size_px ) - { - $this->out = array(); - $this->out[] = $x; - $this->out[] = $y; - $this->out[] = $size_px; - } - - function toString() - { - return '['. implode( ',', $this->out ) .']'; - } -} - - -function open_flash_chart_object_str( $width, $height, $url, $use_swfobject=true, $base='' ) -{ - // - // return the HTML as a string - // - return _ofc( $width, $height, $url, $use_swfobject, $base ); -} - -function open_flash_chart_object( $width, $height, $url, $use_swfobject=true, $base='' ) -{ - // - // stream the HTML into the page - // - echo _ofc( $width, $height, $url, $use_swfobject, $base ); -} - -function _ofc( $width, $height, $url, $use_swfobject, $base ) -{ - // - // I think we may use swfobject for all browsers, - // not JUST for IE... - // - //$ie = strstr(getenv('HTTP_USER_AGENT'), 'MSIE'); - - // - // escape the & and stuff: - // - $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; - $obj_id = 'chart'; - $div_name = 'flashcontent'; - - //$out[] = ''; - - if( !isset( $open_flash_chart_seqno ) ) - { - $open_flash_chart_seqno = 1; - $out[] = ''; - } - else - { - $open_flash_chart_seqno++; - $obj_id .= '_'. $open_flash_chart_seqno; - $div_name .= '_'. $open_flash_chart_seqno; - } - - if( $use_swfobject ) - { - // Using library for auto-enabling Flash object on IE, disabled-Javascript proof - $out[] = '
'; - $out[] = ''; - $out[] = ''; - } - - return implode("\n",$out); -} - -$x = open_flash_chart_object( 300,300,"/images/open-flash-chart.swf", true); - -?> - - - -
- - diff --git a/workflow/engine/plugins/openFlash/open_flash_chart_object.php b/workflow/engine/plugins/openFlash/open_flash_chart_object.php deleted file mode 100644 index 5cf831634..000000000 --- a/workflow/engine/plugins/openFlash/open_flash_chart_object.php +++ /dev/null @@ -1,109 +0,0 @@ -'; - - if( !isset( $open_flash_chart_seqno ) ) - { - $open_flash_chart_seqno = 1; - $out[] = ''; - } - else - { - $open_flash_chart_seqno++; - $obj_id .= '_'. $open_flash_chart_seqno; - $div_name .= '_'. $open_flash_chart_seqno; - } - - if( $use_swfobject ) - { - // Using library for auto-enabling Flash object on IE, disabled-Javascript proof - $out[] = '
'; - $out[] = ''; - $out[] = ''; - } - - return implode("\n",$out); -} -?> \ No newline at end of file diff --git a/workflow/engine/plugins/openFlash/public_html/open-flash-chart.swf b/workflow/engine/plugins/openFlash/public_html/open-flash-chart.swf deleted file mode 100644 index 85b590a28..000000000 Binary files a/workflow/engine/plugins/openFlash/public_html/open-flash-chart.swf and /dev/null differ diff --git a/workflow/engine/plugins/openFlash/public_html/swfobject.js b/workflow/engine/plugins/openFlash/public_html/swfobject.js deleted file mode 100644 index 02ca073dc..000000000 --- a/workflow/engine/plugins/openFlash/public_html/swfobject.js +++ /dev/null @@ -1,233 +0,0 @@ -/** - * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ - * - * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: - * http://www.opensource.org/licenses/mit-license.php - * - */ -if(typeof deconcept == "undefined") var deconcept = new Object(); -if(typeof deconcept.util == "undefined") deconcept.util = new Object(); -if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object(); -deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) { - if (!document.getElementById) { return; } - this.DETECT_KEY = detectKey ? detectKey : 'detectflash'; - this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); - this.params = new Object(); - this.variables = new Object(); - this.attributes = new Array(); - if(swf) { this.setAttribute('swf', swf); } - if(id) { this.setAttribute('id', id); } - if(w) { this.setAttribute('width', w); } - if(h) { this.setAttribute('height', h); } - if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); } - this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); - if (!window.opera && document.all && this.installedVer.major > 7) { - // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE - deconcept.SWFObject.doPrepUnload = true; - } - if(c) { this.addParam('bgcolor', c); } - var q = quality ? quality : 'high'; - this.addParam('quality', q); - this.setAttribute('useExpressInstall', false); - this.setAttribute('doExpressInstall', false); - var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location; - this.setAttribute('xiRedirectUrl', xir); - this.setAttribute('redirectUrl', ''); - if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); } -} -deconcept.SWFObject.prototype = { - useExpressInstall: function(path) { - this.xiSWFPath = !path ? "expressinstall.swf" : path; - this.setAttribute('useExpressInstall', true); - }, - setAttribute: function(name, value){ - this.attributes[name] = value; - }, - getAttribute: function(name){ - return this.attributes[name]; - }, - addParam: function(name, value){ - this.params[name] = value; - }, - getParams: function(){ - return this.params; - }, - addVariable: function(name, value){ - this.variables[name] = value; - }, - getVariable: function(name){ - return this.variables[name]; - }, - getVariables: function(){ - return this.variables; - }, - getVariablePairs: function(){ - var variablePairs = new Array(); - var key; - var variables = this.getVariables(); - for(key in variables){ - variablePairs[variablePairs.length] = key +"="+ variables[key]; - } - return variablePairs; - }, - getSWFHTML: function() { - var swfNode = ""; - if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture - if (this.getAttribute("doExpressInstall")) { - this.addVariable("MMplayerType", "PlugIn"); - this.setAttribute('swf', this.xiSWFPath); - } - swfNode = ' 0){ swfNode += 'flashvars="'+ pairs +'"'; } - swfNode += '/>'; - } else { // PC IE - if (this.getAttribute("doExpressInstall")) { - this.addVariable("MMplayerType", "ActiveX"); - this.setAttribute('swf', this.xiSWFPath); - } - swfNode = ''; - swfNode += ''; - var params = this.getParams(); - for(var key in params) { - swfNode += ''; - } - var pairs = this.getVariablePairs().join("&"); - if(pairs.length > 0) {swfNode += '';} - swfNode += ""; - } - return swfNode; - }, - write: function(elementId){ - if(this.getAttribute('useExpressInstall')) { - // check to see if we need to do an express install - var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]); - if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) { - this.setAttribute('doExpressInstall', true); - this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl'))); - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - this.addVariable("MMdoctitle", document.title); - } - } - if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){ - var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; - n.innerHTML = this.getSWFHTML(); - return true; - }else{ - if(this.getAttribute('redirectUrl') != "") { - document.location.replace(this.getAttribute('redirectUrl')); - } - } - return false; - } -} - -/* ---- detection functions ---- */ -deconcept.SWFObjectUtil.getPlayerVersion = function(){ - var PlayerVersion = new deconcept.PlayerVersion([0,0,0]); - if(navigator.plugins && navigator.mimeTypes.length){ - var x = navigator.plugins["Shockwave Flash"]; - if(x && x.description) { - PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); - } - }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE - var axo = 1; - var counter = 3; - while(axo) { - try { - counter++; - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter); -// document.write("player v: "+ counter); - PlayerVersion = new deconcept.PlayerVersion([counter,0,0]); - } catch (e) { - axo = null; - } - } - } else { // Win IE (non mobile) - // do minor version lookup in IE, but avoid fp6 crashing issues - // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/ - try{ - var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); - }catch(e){ - try { - var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); - PlayerVersion = new deconcept.PlayerVersion([6,0,21]); - axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code) - } catch(e) { - if (PlayerVersion.major == 6) { - return PlayerVersion; - } - } - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - } catch(e) {} - } - if (axo != null) { - PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); - } - } - return PlayerVersion; -} -deconcept.PlayerVersion = function(arrVersion){ - this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0; - this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0; - this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0; -} -deconcept.PlayerVersion.prototype.versionIsValid = function(fv){ - if(this.major < fv.major) return false; - if(this.major > fv.major) return true; - if(this.minor < fv.minor) return false; - if(this.minor > fv.minor) return true; - if(this.rev < fv.rev) return false; - return true; -} -/* ---- get value of query string param ---- */ -deconcept.util = { - getRequestParameter: function(param) { - var q = document.location.search || document.location.hash; - if (param == null) { return q; } - if(q) { - var pairs = q.substring(1).split("&"); - for (var i=0; i < pairs.length; i++) { - if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { - return pairs[i].substring((pairs[i].indexOf("=")+1)); - } - } - } - return ""; - } -} -/* fix for video streaming bug */ -deconcept.SWFObjectUtil.cleanupSWFs = function() { - var objects = document.getElementsByTagName("OBJECT"); - for (var i = objects.length - 1; i >= 0; i--) { - objects[i].style.display = 'none'; - for (var x in objects[i]) { - if (typeof objects[i][x] == 'function') { - objects[i][x] = function(){}; - } - } - } -} -// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/ -if (deconcept.SWFObject.doPrepUnload) { - if (!deconcept.unloadSet) { - deconcept.SWFObjectUtil.prepUnload = function() { - __flash_unloadHandler = function(){}; - __flash_savedUnloadHandler = function(){}; - window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); - } - window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); - deconcept.unloadSet = true; - } -} -/* add document.getElementById if needed (mobile IE < 5) */ -if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }} - -/* add some aliases for ease of use/backwards compatibility */ -var getQueryParamValue = deconcept.util.getRequestParameter; -var FlashObject = deconcept.SWFObject; // for legacy support -var SWFObject = deconcept.SWFObject; diff --git a/workflow/engine/plugins/openFlash/setupPage.xml b/workflow/engine/plugins/openFlash/setupPage.xml deleted file mode 100644 index a5a5000c1..000000000 --- a/workflow/engine/plugins/openFlash/setupPage.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - <en>Open Flash Charts Plugin</en> - - - - Open Charts Plugin, with this plugin you can see many differents charts using interative flash charts - - - - - Save - - \ No newline at end of file diff --git a/workflow/engine/plugins/pmosCommunity.php b/workflow/engine/plugins/pmosCommunity.php deleted file mode 100644 index c45f5b14c..000000000 --- a/workflow/engine/plugins/pmosCommunity.php +++ /dev/null @@ -1,35 +0,0 @@ -sFriendlyName = 'PMOS Community Plugin'; - $this->sDescription = 'Community Charts Plugin, with this plugin you can see many differents charts related to ProcessMaker Open Source Community'; - $this->sPluginFolder = 'pmosCommunity'; - $this->sSetupPage = 'setupPage'; - $this->iVersion = 0.45; - $this->aWorkspaces = array ( 'os' ); - return $res; - } - - function setup() - { - //$this->registerTrigger( 10000, 'createCaseFolder' ); - $this->registerDashboard(); - } - - function install() - { - - } - } - - $oPluginRegistry =& PMPluginRegistry::getSingleton(); - $oPluginRegistry->registerPlugin('pmosCommunity', __FILE__); - - - - - diff --git a/workflow/engine/plugins/pmosCommunity/chart-data.php b/workflow/engine/plugins/pmosCommunity/chart-data.php deleted file mode 100644 index 033686972..000000000 --- a/workflow/engine/plugins/pmosCommunity/chart-data.php +++ /dev/null @@ -1,14 +0,0 @@ -{$chartType}(); - die; - } - diff --git a/workflow/engine/plugins/pmosCommunity/chart.php b/workflow/engine/plugins/pmosCommunity/chart.php deleted file mode 100644 index 691953f8c..000000000 --- a/workflow/engine/plugins/pmosCommunity/chart.php +++ /dev/null @@ -1,11 +0,0 @@ -sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf'; - if ( !file_exists( dirname($fileConf) ) ) - throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist." ) ); - - if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) ) - throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) ); - - if ( file_exists ( $fileConf ) ) { - $content = file_get_contents ( $fileConf); - $fields = unserialize ($content); - } - else - $fields = array(); - return $fields; - } - - function updateFieldsForPageSetup ( $oData) { - $content = serialize ($oData['form']); - $fileConf = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf'; - if ( !is_writable( dirname($fileConf) ) ) - throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist or this directory is not writable." ) ); - - if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) ) - throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) ); - - file_put_contents ( $fileConf, $content); - return true; - } - - function setup() { - } - - function getChart( $chartName ) { - $this->readConfig(); - $prePath = '/sys' . config("system.workspace") . '/' . SYS_LANG . '/blank/'; - $obj = new StdClass(); - switch ($chartName) { - case 'PostByForum': - $obj->title = 'Community ProcessMaker Forum - Per Forum'; - break; - case 'ForumWeek': - $obj->title = 'Community ProcessMaker Forum - Per Week'; - break; - case 'PostByUser': - $obj->title = 'Community ProcessMaker Forum - Per User'; - break; - case 'BugsOpenByUser': - $obj->title = 'Community ProcessMaker Forum - Per Post Author'; - break; - case 'BugsByStatus': - $obj->title = 'Community ProcessMaker Forum - Bugs'; - break; - } - $obj->height = 220; - $obj->image = $prePath . 'pmosCommunity/drawChart?chart=' . $chartName . "&u="; - return $obj; - } - - //here we are defining the available charts, the dashboard setup will call this function to know the charts - function getAvailableCharts( ) { - return array ( - 'PostByForum', - 'ForumWeek', - 'PostByUser', - 'BugsOpenByUser', - 'BugsByStatus' - ); - } - - /* definition of all charts */ - /* that definition comes in two parts : - /* 1. the getXX () function to get the data from the databases - /* 2. the XX () function to draw the graph - */ - - /** chart PostByForum ***/ - /** to show the last 2 months post grouped by forum and for topic */ - function getPostByForum ( ) { - $dataSet = array(); - $past1months = mktime(0, 0, 0, date("m") -1 , date("d"), date("Y")); - - $databases = PATH_PLUGINS . 'pmosCommunity' . PATH_SEP . 'config' . PATH_SEP . 'databases.php'; - Propel::init( $databases ); - - $con = Propel::getConnection('forum'); - $sql = "select forum_name, count(*) as cant from phpbb_posts left join phpbb_forums on ( phpbb_posts.forum_id = phpbb_forums.forum_id ) where post_time > $past1months group by forum_name " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - if ( strlen ( trim ($row['forum_name']) ) > 0 ) { - $label[] = $row['forum_name']; - $data[] = $row['cant']; - } - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - - $sql = "select forum_name, count( distinct( topic_id)) as cant from phpbb_posts left join phpbb_forums on ( phpbb_posts.forum_id = phpbb_forums.forum_id ) where post_time > $past1months group by forum_name " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - if ( strlen ( trim ($row['forum_name']) ) > 0 ) { - //$label[] = $row['forum_name']; - $series2[] = $row['cant']; - } - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['series2'] = $series2; - - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $aux = intval($max / 6 ) * 6 + 6; - $dataSet['max'] = $aux; - - return $dataSet; - } - - function PostByForum( ) { - - $chart = new VerticalBarChart(430, 220); - - $dataSet = $this->getPostByForum(); - $dataPostSet = new XYDataSet(); - $dataTopicSet = new XYDataSet(); - foreach ( $dataSet['label'] as $key => $label ) { - $dataPostSet->addPoint(new Point( $label, $dataSet['data'][$key] )) ; - $dataTopicSet->addPoint(new Point( $label, $dataSet['series2'][$key] )) ; - } - - $multidataSet = new XYSeriesDataSet(); - $multidataSet->addSerie("Posts", $dataPostSet); - $multidataSet->addSerie("Topics", $dataTopicSet); - - $chart->setDataSet($multidataSet); - $chart->setTitle( "Posts by Forum ( last month ) " ); - $chart->render(); - } - - function PostByForumFlash( ) { - $dataSet = $this->getPostByForum(); - $data = $dataSet['data']; - $series2 = $dataSet['series2']; - $g = new graph(); - $g->title( ' Posts by Forum ( last month )', '{font-size: 16px;}' ); - $bar_red = new bar_3d( 50, '#3334AD' ); - $bar_red->key( 'posts', 10 ); - $bar_red->data = $data; - - $bar_blue = new bar_3d( 75, '#D54C78' ); - $bar_blue->key( 'topics', 11 ); - $bar_blue->data = $series2; - - $g->data_sets[] = $bar_red; - $g->data_sets[] = $bar_blue; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $dataSet['max'] ); - $g->y_label_steps( 6 ); - //$g->set_y_legend( 'Posts', 12, '#736AFF' ); - echo $g->render(); - } - - /** chart ForumWeek ***/ - /** to show the last 2 months post grouped by week */ - function getForumWeek ( ) { - $databases = PATH_PLUGINS . 'pmosCommunity' . PATH_SEP . 'config' . PATH_SEP . 'databases.php'; - Propel::init( $databases ); - - $dataSet = array(); - $processObj = new Process; - $past2months = mktime(0, 0, 0, date("m") -2 , date("d"), date("Y")); - - $con = Propel::getConnection('forum'); - $sql = "select week(FROM_UNIXTIME(post_time )) as week ,count(*) as cant from phpbb_posts where post_time > $past2months group by week " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = date ( 'M d', mktime(0, 0, 0, 1 , $row['week']*7, date("Y")) ); - $data[] = $row['cant']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function ForumWeek( ) { - - $chart = new VerticalBarChart(430, 220); - - $dataSet = $this->getForumWeek(); - $dataPostSet = new XYDataSet(); - $dataTopicSet = new XYDataSet(); - foreach ( $dataSet['label'] as $key => $label ) { - $dataPostSet->addPoint(new Point( $label, $dataSet['data'][$key] )) ; - } - - $chart->setDataSet($dataPostSet); - $chart->setTitle( " Posts by Week " ); - $chart->render(); - } - - function ForumWeekFlash ( ) { - $dataSet = $this->getForumWeek(); - $data = $dataSet['data']; - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $g = new graph(); - $g->title( ' Posts by Week ', '{font-size: 16px;}' ); - $bar_red = new bar_3d( 50, '#3334AD' ); - $bar_red->key( 'week', 10 ); - $bar_red->data = $data; - - $g->data_sets[] = $bar_red; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $max ); - $g->y_label_steps( 5 ); - $g->set_y_legend( 'Posts', 12, '#736AFF' ); - echo $g->render(); - } - - /** chart PostByUser ***/ - /** to show the last 7 days grouped by user */ - function getPostByUser ( ) { - $databases = PATH_PLUGINS . 'pmosCommunity' . PATH_SEP . 'config' . PATH_SEP . 'databases.php'; - Propel::init( $databases ); - - $dataSet = array(); - $con = Propel::getConnection('forum'); - - $past7days = mktime(0, 0, 0, date("m") , date("d")-7, date("Y")); - $sql = "select username, count(*) as cant from phpbb_posts left join phpbb_users on ( poster_id = user_id ) where post_time > $past7days group by username " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = $row['username']; - $data[] = $row['cant']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - //$dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function PostByUser ( ) { - - $chart = new VerticalBarChart(430, 220); - - $dataSet = $this->getPostByUser(); - $dataPostSet = new XYDataSet(); - $dataTopicSet = new XYDataSet(); - foreach ( $dataSet['label'] as $key => $label ) { - $dataPostSet->addPoint(new Point( $label, $dataSet['data'][$key] )) ; - } - - $chart->setDataSet($dataPostSet); - //$chart->setTitle( " Posts by User" ); - $chart->render(); - } - - function PostByUserFlash ( ) { - $dataSet = $this->getPostByUser(); - $data = $dataSet['data']; - $g = new graph(); - $g->title( ' Posts by User last week '. date("Y-m-d"), '{font-size: 16px;}' ); - $max = 1; - foreach ( $dataSet['data'] as $k => $val ) if ( $val > $max ) $max = $val; - $max = intval($max / 4 ) * 4 + 4; - - $bar_red = new bar_3d( 50, '#356aa0' ); - $bar_red->key( 'posts', 10 ); - $bar_red->data = $data; - - $bar_blue = new bar_3d( 75, '#D54C78' ); - $bar_blue->key( 'completed', 10 ); - $bar_blue->data = $data; - - $g->data_sets[] = $bar_red; - //$g->data_sets[] = $bar_blue; - - $g->set_x_axis_3d( 12 ); - $g->x_axis_colour( '#909090', '#ADB5C7' ); - $g->y_axis_colour( '#909090', '#ADB5C7' ); - $g->set_x_labels( $dataSet['label'] ); - - $g->set_y_max( $max ); - $g->y_label_steps( 4 ); - $g->set_y_legend( 'Processmaker', 12, '#736AFF' ); - echo $g->render(); - } - - /** chart BugsByStatus ***/ - /** to show the bugs by status resolved, open, closed */ - function getBugsByStatus ( ) { - $databases = PATH_PLUGINS . 'pmosCommunity' . PATH_SEP . 'config' . PATH_SEP . 'databases.php'; - Propel::init( $databases ); - - $dataSet = array(); - $con = Propel::getConnection('bugs'); - - //open - $sql = "SELECT count(*) as cant FROM mantis_bug_table where project_id = 31 and status in (20,30,40,50) " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - $label[] = 'open'; - $data[] = $row['cant']; - - //resolved - $sql = "SELECT count(*) as cant FROM mantis_bug_table where project_id = 31 and status = 80" ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - $label[] = 'resolved'; - $data[] = $row['cant']; - - //closed - $sql = "SELECT count(*) as cant FROM mantis_bug_table where project_id = 31 and status = 90" ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - $label[] = 'closed'; - $data[] = $row['cant']; - - $dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function BugsByStatus ( ) { - - $chart = new VerticalBarChart(430, 220); - - $dataSet = $this->getBugsByStatus(); - $dataPostSet = new XYDataSet(); - $dataTopicSet = new XYDataSet(); - foreach ( $dataSet['label'] as $key => $label ) { - $dataPostSet->addPoint(new Point( $label, $dataSet['data'][$key] )) ; - } - - $chart->setDataSet($dataPostSet); - //$chart->setTitle( " Posts by User" ); - $chart->render(); - } - - function BugsByStatusFlash ( ) { - $dataSet = $this->getBugsByStatus(); - $data = $dataSet['data']; - $g = new graph(); - $g->title( ' Posts by User last week '. date("Y-m-d"), '{font-size: 16px;}' ); - - $g->pie(70,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['label'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Bugs by Status', '{font-size:18px; color: #d01f3c}' ); - echo $g->render(); - } - - /** chart BugsOpenByUser ***/ - /** to show the bugs in OPEN status by user */ - function getBugsOpenByUser ( ) { - $databases = PATH_PLUGINS . 'pmosCommunity' . PATH_SEP . 'config' . PATH_SEP . 'databases.php'; - Propel::init( $databases ); - - $dataSet = array(); - $con = Propel::getConnection('bugs'); - - $sql = "SELECT username, count(*) as cant FROM mantis_bug_table left join mantis_user_table on ( mantis_user_table.id = handler_id) where project_id = 31 and status in (20,30,40,50) group by username " ; - $stmt = $con->createStatement(); - $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $rs->next(); - $row = $rs->getRow(); - while ( is_array ( $row ) ) { - $label[] = $row['username']; - $data[] = $row['cant']; - $rs->next(); - $row = $rs->getRow(); - } - $dataSet['data'] = $data; - $dataSet['label'] = $label; - return $dataSet; - } - - function BugsOpenByUser ( ) { - - $chart = new VerticalBarChart(430, 220); - - $dataSet = $this->getBugsOpenByUser(); - $dataPostSet = new XYDataSet(); - $dataTopicSet = new XYDataSet(); - foreach ( $dataSet['label'] as $key => $label ) { - $dataPostSet->addPoint(new Point( $label, $dataSet['data'][$key] )) ; - } - - $chart->setDataSet($dataPostSet); - //$chart->setTitle( " Posts by User" ); - $chart->render(); - - } - - function BugsOpenByUserFlash ( ) { - $dataSet = $this->getBugsOpenByUser(); - $data = $dataSet['data']; - $g = new graph(); - $g->bg_colour = '#EFFFEF'; - $g->title( ' Posts by User last week '. date("Y-m-d"), '{font-size: 16px;}' ); - - $g->pie(70,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['label'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Bugs by Status', '{font-size:18px; color: #d01f3c}' ); - echo $g->render(); - /* - $dataSet = $this->getBugsOpenByUser(); - $data = $dataSet['data']; - $g = new graph(); - $g->pie(80,'#505050','{font-size: 12px; color: #404040;'); - $g->pie_values( $data, $dataSet['label'] ); - $g->pie_slice_colours( array('#d01f3c','#356aa0','#C79810','#D54C78') ); - $g->set_tool_tip( '#val# #x_label#' ); - $g->title( 'Open Bugs by User', '{font-size:18px; color: #d01f3c}' ); - echo $g->render();*/ - } - -} diff --git a/workflow/engine/plugins/pmosCommunity/config/databases.php b/workflow/engine/plugins/pmosCommunity/config/databases.php deleted file mode 100644 index 091d2768a..000000000 --- a/workflow/engine/plugins/pmosCommunity/config/databases.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/workflow/engine/plugins/pmosCommunity/config/setup.conf b/workflow/engine/plugins/pmosCommunity/config/setup.conf deleted file mode 100644 index 70cf5bfbf..000000000 --- a/workflow/engine/plugins/pmosCommunity/config/setup.conf +++ /dev/null @@ -1 +0,0 @@ -a:1:{s:6:"ACCEPT";s:4:"Save";} \ No newline at end of file diff --git a/workflow/engine/plugins/pmosCommunity/drawChart.php b/workflow/engine/plugins/pmosCommunity/drawChart.php deleted file mode 100644 index 48500961f..000000000 --- a/workflow/engine/plugins/pmosCommunity/drawChart.php +++ /dev/null @@ -1,14 +0,0 @@ -{$chartType}(); - die; - } - \ No newline at end of file diff --git a/workflow/engine/plugins/pmosCommunity/open-flash-chart.php b/workflow/engine/plugins/pmosCommunity/open-flash-chart.php deleted file mode 100644 index b1cd90627..000000000 --- a/workflow/engine/plugins/pmosCommunity/open-flash-chart.php +++ /dev/null @@ -1,1769 +0,0 @@ -data_sets = array(); - - - $this->data = array(); - $this->links = array(); - $this->width = 250; - $this->height = 200; - $this->js_path = '/images/'; - $this->swf_path = ''; - $this->x_labels = array(); - $this->y_min = ''; - $this->y_max = ''; - $this->x_min = ''; - $this->x_max = ''; - $this->y_steps = ''; - $this->title = ''; - $this->title_style = ''; - $this->occurence = 0; - - $this->x_offset = ''; - - $this->x_tick_size = -1; - - $this->y2_max = ''; - $this->y2_min = ''; - - // GRID styles: - $this->x_axis_colour = ''; - $this->x_axis_3d = ''; - $this->x_grid_colour = ''; - $this->x_axis_steps = 1; - $this->y_axis_colour = ''; - $this->y_grid_colour = ''; - $this->y2_axis_colour = ''; - - // AXIS LABEL styles: - $this->x_label_style = ''; - $this->y_label_style = ''; - $this->y_label_style_right = ''; - - - // AXIS LEGEND styles: - $this->x_legend = ''; - $this->x_legend_size = 20; - $this->x_legend_colour = '#000000'; - - $this->y_legend = ''; - $this->y_legend_right = ''; - //$this->y_legend_size = 20; - //$this->y_legend_colour = '#000000'; - - $this->lines = array(); - $this->line_default['type'] = 'line'; - $this->line_default['values'] = '3,#87421F'; - $this->js_line_default = 'so.addVariable("line","3,#87421F");'; - - $this->bg_colour = ''; - $this->bg_image = ''; - - $this->inner_bg_colour = ''; - $this->inner_bg_colour_2 = ''; - $this->inner_bg_angle = ''; - - // PIE chart ------------ - $this->pie = ''; - $this->pie_values = ''; - $this->pie_colours = ''; - $this->pie_labels = ''; - - $this->tool_tip = ''; - - // which data lines are attached to the - // right Y axis? - $this->y2_lines = array(); - - // Number formatting: - $this->y_format=''; - $this->num_decimals=''; - $this->is_fixed_num_decimals_forced=''; - $this->is_decimal_separator_comma=''; - $this->is_thousand_separator_disabled=''; - - $this->output_type = ''; - - // - // set some default value incase the user forgets - // to set them, so at least they see *something* - // even is it is only the axis and some ticks - // - $this->set_y_min( 0 ); - $this->set_y_max( 20 ); - $this->set_x_axis_steps( 1 ); - $this->y_label_steps( 5 ); - } - - /** - * Set the unique_id to use for the flash object id. - */ - function set_unique_id() - { - $this->unique_id = uniqid(rand(), true); - } - - /** - * Get the flash object ID for the last rendered object. - */ - function get_unique_id() - { - return ($this->unique_id); - } - - /** - * Set the base path for the swfobject.js - * - * @param base_path a string argument. - * The path to the swfobject.js file - */ - function set_js_path($path) - { - $this->js_path = $path; - } - - /** - * Set the base path for the open-flash-chart.swf - * - * @param path a string argument. - * The path to the open-flash-chart.swf file - */ - function set_swf_path($path) - { - $this->swf_path = $path; - } - - /** - * Set the type of output data. - * - * @param type a string argument. - * The type of data. Currently only type is js, or nothing. - */ - function set_output_type($type) - { - $this->output_type = $type; - } - - /** - * returns the next line label for multiple lines. - */ - function next_line() - { - $line_num = ''; - if( count( $this->lines ) > 0 ) - $line_num = '_'. (count( $this->lines )+1); - - return $line_num; - } - - // escape commas (,) - function esc( $text ) - { - // we replace the comma so it is not URL escaped - // if it is, flash just thinks it is a comma - // which is no good if we are splitting the - // string on commas. - $tmp = str_replace( ',', '#comma#', $text ); - //$tmp = utf8_encode( $tmp ); - // now we urlescape all dodgy characters (like & % $ etc..) - return urlencode( $tmp ); - } - - /** - * Format the text to the type of output. - */ - function format_output($function,$values) - { - if($this->output_type == 'js') - { - $tmp = 'so.addVariable("'. $function .'","'. $values . '");'; - } - else - { - $tmp = '&'. $function .'='. $values .'&'; - } - - return $tmp; - } - - /** - * Set the text and style of the title. - * - * @param title a string argument. - * The text of the title. - * @param style a string. - * CSS styling of the title. - */ - function set_title( $title, $style='' ) - { - $this->title = $this->esc( $title ); - if( strlen( $style ) > 0 ) - $this->title_style = $style; - } - - /** - * Set the width of the chart. - * - * @param width an int argument. - * The width of the chart frame. - */ - function set_width( $width ) - { - $this->width = $width; - } - - /** - * Set the height of the chart. - * - * @param height an int argument. - * The height of the chart frame. - */ - function set_height( $height ) - { - $this->height = $height; - } - - /** - * Set the base path of the swfobject. - * - * @param base a string argument. - * The base path of the swfobject. - */ - function set_base( $base='/images/' ) - { - $this->base = $base; - } - - // Number formatting: - function set_y_format( $val ) - { - $this->y_format = $val; - } - - function set_num_decimals( $val ) - { - $this->num_decimals = $val; - } - - function set_is_fixed_num_decimals_forced( $val ) - { - $this->is_fixed_num_decimals_forced = $val?'true':'false'; - } - - function set_is_decimal_separator_comma( $val ) - { - $this->is_decimal_separator_comma = $val?'true':'false'; - } - - function set_is_thousand_separator_disabled( $val ) - { - $this->is_thousand_separator_disabled = $val?'true':'false'; - } - - /** - * Set the data for the chart - * @param a an array argument. - * An array of the data to add to the chart. - */ - function set_data( $a ) - { - $this->data[] = implode(',',$a); - } - - // UGH, these evil functions are making me fell ill - function set_links( $links ) - { - // TO DO escape commas: - $this->links[] = implode(',',$links); - } - - // $val is a boolean - function set_x_offset( $val ) - { - $this->x_offset = $val?'true':'false'; - } - - /** - * Set the tooltip to be displayed on each chart item.\n - * \n - * Replaceable tokens that can be used in the string include: \n - * #val# - The actual value of whatever the mouse is over. \n - * #key# - The key string. \n - * \
- New line. \n - * #x_label# - The X label string. \n - * #x_legend# - The X axis legend text. \n - * Default string is: "#x_label#
#val#" \n - * - * @param tip a string argument. - * A formatted string to show as the tooltip. - */ - function set_tool_tip( $tip ) - { - $this->tool_tip = $this->esc( $tip ); - } - - /** - * Set the x axis labels - * - * @param a an array argument. - * An array of the x axis labels. - */ - function set_x_labels( $a ) - { - $tmp = array(); - foreach( $a as $item ) - $tmp[] = $this->esc( $item ); - $this->x_labels = $tmp; - } - - /** - * Set the look and feel of the x axis labels - * - * @param font_size an int argument. - * The font size. - * @param colour a string argument. - * The hex colour value. - * @param orientation an int argument. - * The orientation of the x-axis text. - * 0 - Horizontal - * 1 - Vertical - * 2 - 45 degrees - * @param step an int argument. - * Show the label on every $step label. - * @param grid_colour a string argument. - */ - function set_x_label_style( $size, $colour='', $orientation=0, $step=-1, $grid_colour='' ) - { - $this->x_label_style = $size; - - if( strlen( $colour ) > 0 ) - $this->x_label_style .= ','. $colour; - - if( $orientation > -1 ) - $this->x_label_style .= ','. $orientation; - - if( $step > 0 ) - $this->x_label_style .= ','. $step; - - if( strlen( $grid_colour ) > 0 ) - $this->x_label_style .= ','. $grid_colour; - } - - /** - * Set the background colour. - * @param colour a string argument. - * The hex colour value. - */ - function set_bg_colour( $colour ) - { - $this->bg_colour = $colour; - } - - /** - * Set a background image. - * @param url a string argument. - * The location of the image. - * @param x a string argument. - * The x location of the image. 'Right', 'Left', 'Center' - * @param y a string argument. - * The y location of the image. 'Top', 'Bottom', 'Middle' - */ - function set_bg_image( $url, $x='center', $y='center' ) - { - $this->bg_image = $url; - $this->bg_image_x = $x; - $this->bg_image_y = $y; - } - - /** - * Attach a set of data (a line, area or bar chart) to the right Y axis. - * @param data_number an int argument. - * The numbered order the data was attached using set_data. - */ - function attach_to_y_right_axis( $data_number ) - { - $this->y2_lines[] = $data_number; - } - - /** - * Set the background colour of the grid portion of the chart. - * @param col a string argument. - * The hex colour value of the background. - * @param col2 a string argument. - * The hex colour value of the second colour if you want a gradient. - * @param angle an int argument. - * The angle in degrees to make the gradient. - */ - function set_inner_background( $col, $col2='', $angle=-1 ) - { - $this->inner_bg_colour = $col; - - if( strlen($col2) > 0 ) - $this->inner_bg_colour_2 = $col2; - - if( $angle != -1 ) - $this->inner_bg_angle = $angle; - } - - /** - * Internal function to build the y label style for y and y2 - */ - function _set_y_label_style( $size, $colour ) - { - $tmp = $size; - - if( strlen( $colour ) > 0 ) - $tmp .= ','. $colour; - return $tmp; - } - - /** - * Set the look and feel of the y axis labels - * - * @param font_size an int argument. - * The font size. - * @param colour a string argument. - * The hex colour value. - */ - function set_y_label_style( $size, $colour='' ) - { - $this->y_label_style = $this->_set_y_label_style( $size, $colour ); - } - - /** - * Set the look and feel of the right y axis labels - * - * @param font_size an int argument. - * The font size. - * @param colour a string argument. - * The hex colour value. - */ - function set_y_right_label_style( $size, $colour='' ) - { - $this->y_label_style_right = $this->_set_y_label_style( $size, $colour ); - } - - function set_x_max( $max ) - { - $this->x_max = floatval( $max ); - } - - function set_x_min( $min ) - { - $this->x_min = floatval( $min ); - } - - /** - * Set the maximum value of the y axis. - * - * @param max an float argument. - * The maximum value. - */ - function set_y_max( $max ) - { - $this->y_max = floatval( $max ); - } - - /** - * Set the minimum value of the y axis. - * - * @param min an float argument. - * The minimum value. - */ - function set_y_min( $min ) - { - $this->y_min = floatval( $min ); - } - - /** - * Set the maximum value of the right y axis. - * - * @param max an float argument. - * The maximum value. - */ - function set_y_right_max( $max ) - { - $this->y2_max = floatval($max); - } - - /** - * Set the minimum value of the right y axis. - * - * @param min an float argument. - * The minimum value. - */ - function set_y_right_min( $min ) - { - $this->y2_min = floatval($min); - } - - /** - * Show the y label on every $step label. - * - * @param val an int argument. - * Show the label on every $step label. - */ - function y_label_steps( $val ) - { - $this->y_steps = intval( $val ); - } - - function title( $title, $style='' ) - { - $this->title = $this->esc( $title ); - if( strlen( $style ) > 0 ) - $this->title_style = $style; - } - - /** - * Set the parameters of the x legend. - * - * @param text a string argument. - * The text of the x legend. - * @param font_size an int argument. - * The font size of the x legend text. - * @param colour a string argument - * The hex value of the font colour. - */ - function set_x_legend( $text, $size=-1, $colour='' ) - { - $this->x_legend = $this->esc( $text ); - if( $size > -1 ) - $this->x_legend_size = $size; - - if( strlen( $colour )>0 ) - $this->x_legend_colour = $colour; - } - - /** - * Set the size of the x label ticks. - * - * @param size an int argument. - * The size of the ticks in pixels. - */ - function set_x_tick_size( $size ) - { - if( $size > 0 ) - $this->x_tick_size = $size; - } - - /** - * Set how often you would like to show a tick on the x axis. - * - * @param steps an int argument. - * Show a tick ever $steps. - */ - function set_x_axis_steps( $steps ) - { - if ( $steps > 0 ) - $this->x_axis_steps = $steps; - } - - /** - * Set the depth in pixels of the 3D X axis slab. - * - * @param size an int argument. - * The depth in pixels of the 3D X axis. - */ - function set_x_axis_3d( $size ) - { - if( $size > 0 ) - $this->x_axis_3d = intval($size); - } - - /** - * The private method of building the y legend output. - */ - function _set_y_legend( $text, $size, $colour ) - { - $tmp = $text; - - if( $size > -1 ) - $tmp .= ','. $size; - - if( strlen( $colour )>0 ) - $tmp .= ','. $colour; - - return $tmp; - } - - /** - * Set the parameters of the y legend. - * - * @param text a string argument. - * The text of the y legend. - * @param font_size an int argument. - * The font size of the y legend text. - * @param colour a string argument - * The hex colour value of the font colour. - */ - function set_y_legend( $text, $size=-1, $colour='' ) - { - $this->y_legend = $this->_set_y_legend( $text, $size, $colour ); - } - - /** - * Set the parameters of the right y legend. - * - * @param text a string argument. - * The text of the right y legend. - * @param font_size an int argument. - * The font size of the right y legend text. - * @param colour a string argument - * The hex value of the font colour. - */ - function set_y_right_legend( $text, $size=-1, $colour='' ) - { - $this->y_legend_right = $this->_set_y_legend( $text, $size, $colour ); - } - - /** - * Set the colour of the x axis line and grid. - * - * @param axis a string argument. - * The hex colour value of the x axis line. - * @param grid a string argument. - * The hex colour value of the x axis grid. - */ - function x_axis_colour( $axis, $grid='' ) - { - $this->x_axis_colour = $axis; - $this->x_grid_colour = $grid; - } - - /** - * Set the colour of the y axis line and grid. - * - * @param axis a string argument. - * The hex colour value of the y axis line. - * @param grid a string argument. - * The hex colour value of the y axis grid. - */ - function y_axis_colour( $axis, $grid='' ) - { - $this->y_axis_colour = $axis; - - if( strlen( $grid ) > 0 ) - $this->y_grid_colour = $grid; - } - - /** - * Set the colour of the right y axis line. - * - * @param colour a string argument. - * The hex colour value of the right y axis line. - */ - function y_right_axis_colour( $colour ) - { - $this->y2_axis_colour = $colour; - } - - /** - * Draw a line without markers on values. - * - * @param width an int argument. - * The width of the line in pixels. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label - * @param circles an int argument - * Need to find out. - */ - function line( $width, $colour='', $text='', $size=-1, $circles=-1 ) - { - $type = 'line'. $this->next_line(); - - $description = ''; - if( $width > 0 ) - { - $description .= $width; - $description .= ','. $colour; - } - - if( strlen( $text ) > 0 ) - { - $description.= ','. $text; - $description .= ','. $size; - } - - if( $circles > 0 ) - $description .= ','. $circles; - - $this->lines[$type] = $description; - } - - /** - * Draw a line with solid dot markers on values. - * - * @param width an int argument. - * The width of the line in pixels. - * @param dot_size an int argument. - * Size in pixels of the dot. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function line_dot( $width, $dot_size, $colour, $text='', $font_size='' ) - { - $type = 'line_dot'. $this->next_line(); - - $description = "$width,$colour,$text"; - - if( strlen( $font_size ) > 0 ) - $description .= ",$font_size,$dot_size"; - - $this->lines[$type] = $description; - } - - /** - * Draw a line with hollow dot markers on values. - * - * @param width an int argument. - * The width of the line in pixels. - * @param dot_size an int argument. - * Size in pixels of the dot. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function line_hollow( $width, $dot_size, $colour, $text='', $font_size='' ) - { - $type = 'line_hollow'. $this->next_line(); - - $description = "$width,$colour,$text"; - - if( strlen( $font_size ) > 0 ) - $description .= ",$font_size,$dot_size"; - - $this->lines[$type] = $description; - } - - /** - * Draw an area chart. - * - * @param width an int argument. - * The width of the line in pixels. - * @param dot_size an int argument. - * Size in pixels of the dot. - * @param colour a string argument. - * The hex colour value of the line. - * @param alpha an int argument. - * The percentage of transparency of the fill colour. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - * @param fill_colour a string argument. - * The hex colour value of the fill colour. - */ - function area_hollow( $width, $dot_size, $colour, $alpha, $text='', $font_size='', $fill_colour='' ) - { - $type = 'area_hollow'. $this->next_line(); - - $description = "$width,$dot_size,$colour,$alpha"; - - if( strlen( $text ) > 0 ) - $description .= ",$text,$font_size"; - - if( strlen( $fill_colour ) > 0 ) - $description .= ','. $fill_colour; - - $this->lines[$type] = $description; - } - - /** - * Draw a bar chart. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar( $alpha, $colour='', $text='', $size=-1 ) - { - $type = 'bar'. $this->next_line(); - - $description = $alpha .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - /** - * Draw a bar chart with an outline. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param colour_outline a strng argument. - * The hex colour value of the outline. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_filled( $alpha, $colour, $colour_outline, $text='', $size=-1 ) - { - $type = 'filled_bar'. $this->next_line(); - - $description = "$alpha,$colour,$colour_outline,$text,$size"; - - $this->lines[$type] = $description; - } - - function bar_sketch( $alpha, $offset, $colour, $colour_outline, $text='', $size=-1 ) - { - $type = 'bar_sketch'. $this->next_line(); - - $description = "$alpha,$offset,$colour,$colour_outline,$text,$size"; - - $this->lines[$type] = $description; - } - - /** - * Draw a 3D bar chart. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_3D( $alpha, $colour='', $text='', $size=-1 ) - { - $type = 'bar_3d'. $this->next_line(); - - $description = $alpha .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - /** - * Draw a 3D bar chart that looks like glass. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param outline_colour a string argument. - * The hex colour value of the outline. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_glass( $alpha, $colour, $outline_colour, $text='', $size=-1 ) - { - $type = 'bar_glass'. $this->next_line(); - - $description = $alpha .','. $colour .','. $outline_colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - /** - * Draw a faded bar chart. - * - * @param alpha an int argument. - * The percentage of transparency of the bar colour. - * @param colour a string argument. - * The hex colour value of the line. - * @param text a string argument. - * The label of the line. - * @param font_size an int argument. - * Font size of the label. - */ - function bar_fade( $alpha, $colour='', $text='', $size=-1 ) - { - $type = 'bar_fade'. $this->next_line(); - - $description = $alpha .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - } - - function candle( $data, $alpha, $line_width, $colour, $text='', $size=-1 ) - { - $type = 'candle'. $this->next_line(); - - $description = $alpha .','. $line_width .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - - $a = array(); - foreach( $data as $can ) - $a[] = $can->toString(); - - $this->data[] = implode(',',$a); - } - - function hlc( $data, $alpha, $line_width, $colour, $text='', $size=-1 ) - { - $type = 'hlc'. $this->next_line(); - - $description = $alpha .','. $line_width .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - - $a = array(); - foreach( $data as $can ) - $a[] = $can->toString(); - - $this->data[] = implode(',',$a); - } - - function scatter( $data, $line_width, $colour, $text='', $size=-1 ) - { - $type = 'scatter'. $this->next_line(); - - $description = $line_width .','. $colour .','. $text .','. $size; - - $this->lines[$type] = $description; - - $a = array(); - foreach( $data as $can ) - $a[] = $can->toString(); - - $this->data[] = implode(',',$a); - } - - - // - // Patch by, Jeremy Miller (14th Nov, 2007) - // - /** - * Draw a pie chart. - * - * @param alpha an int argument. - * The percentage of transparency of the pie colour. - * @param $style a string argument. - * CSS style string - * @param label_colour a string argument. - * The hex colour value of the label. - * @param gradient a boolean argument. - * Use a gradient true or false. - * @param border_size an int argument. - * Size of the border in pixels. - */ - function pie( $alpha, $line_colour, $style, $gradient = true, $border_size = false ) - { - $this->pie = $alpha.','.$line_colour.','.$style; - if( !$gradient ) - { - $this->pie .= ','.!$gradient; - } - if ($border_size) - { - if ($gradient === false) - { - $this->pie .= ','; - } - $this->pie .= ','.$border_size; - } - } - - /** - * Set the values of the pie chart. - * - * @param values an array argument. - * An array of the values for the pie chart. - * @param labels an array argument. - * An array of the labels for the pie pieces. - * @param links an array argument. - * An array of the links to the pie pieces. - */ - function pie_values( $values, $labels=array(), $links=array() ) - { - $this->pie_values = implode(',',$values); - $this->pie_labels = implode(',',$labels); - $this->pie_links = implode(",",$links); - } - - /** - * Set the pie slice colours. - * - * @param colours an array argument. - * The hex colour values of the pie pieces. - */ - function pie_slice_colours( $colours ) - { - $this->pie_colours = implode(',',$colours); - } - - - /** - * Render the output. - */ - function render() - { - $tmp = array(); - - //echo headers_sent() ?'yes':'no'; - if( !headers_sent() ) - header('content-type: text; charset: utf-8'); - - if($this->output_type == 'js') - { - $this->set_unique_id(); - - $tmp[] = '
'; - $tmp[] = ''; - $tmp[] = ''; - } - - return implode("\r\n",$tmp); - } -} - -class line -{ - var $line_width; - var $colour; - var $_key; - var $key; - var $key_size; - // hold the data - var $data; - // extra tool tip info: - var $tips; - - function line( $line_width, $colour ) - { - $this->var = 'line'; - - $this->line_width = $line_width; - $this->colour = $colour; - $this->data = array(); - $this->links = array(); - $this->tips = array(); - $this->_key = false; - } - - - function key( $key, $size ) - { - $this->_key = true; - $this->key = graph::esc( $key ); - $this->key_size = $size; - } - - function add( $data ) - { - $this->data[] = $data; - } - - function add_link( $data, $link ) - { - $this->data[] = $data; - $this->links[] = graph::esc( $link ); - } - - function add_data_tip( $data, $tip ) - { - $this->data[] = $data; - $this->tips[] = graph::esc( $tip ); - } - - function add_data_link_tip( $data, $link, $tip ) - { - $this->data[] = $data; - $this->links[] = graph::esc( $link ); - $this->tips[] = graph::esc( $tip ); - } - - // return the variables for this chart - function _get_variable_list() - { - $values = array(); - $values[] = $this->line_width; - $values[] = $this->colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } - - function toString( $output_type, $set_num ) - { - $values = implode( ',', $this->_get_variable_list() ); - - $tmp = array(); - - if( $output_type == 'js' ) - { - $tmp[] = 'so.addVariable("'. $this->var.$set_num .'","'. $values . '");'; - - $tmp[] = 'so.addVariable("values'. $set_num .'","'. implode( ',', $this->data ) .'");'; - - if( count( $this->links ) > 0 ) - $tmp[] = 'so.addVariable("links'. $set_num .'","'. implode( ',', $this->links ) .'");'; - - if( count( $this->tips ) > 0 ) - $tmp[] = 'so.addVariable("tool_tips_set'. $set_num .'","'. implode( ',', $this->tips ) .'");'; - - } - else - { - $tmp[] = '&'. $this->var. $set_num .'='. $values .'&'; - $tmp[] = '&values'. $set_num .'='. implode( ',', $this->data ) .'&'; - - if( count( $this->links ) > 0 ) - $tmp[] = '&links'. $set_num .'='. implode( ',', $this->links ) .'&'; - - if( count( $this->tips ) > 0 ) - $tmp[] = '&tool_tips_set'. $set_num .'='. implode( ',', $this->tips ) .'&'; - } - - return implode( "\r\n", $tmp ); - } -} - -class line_hollow extends line -{ - var $dot_size; - - function line_hollow( $line_width, $dot_size, $colour ) - { - parent::line( $line_width, $colour ); - $this->var = 'line_hollow'; - $this->dot_size = $dot_size; - } - - // return the variables for this chart - function _get_variable_list() - { - $values = array(); - $values[] = $this->line_width; - $values[] = $this->colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - else - { - $values[] = ''; - $values[] = ''; - } - $values[] = $this->dot_size; - - return $values; - } -} - -class line_dot extends line_hollow -{ - function line_dot( $line_width, $dot_size, $colour ) - { - parent::line_dot( $line_width, $colour ); - $this->var = 'line_dot'; - } -} - -class bar -{ - var $colour; - var $alpha; - var $data; - var $links; - var $_key; - var $key; - var $key_size; - var $var; - // extra tool tip info: - var $tips; - - function bar( $alpha, $colour ) - { - $this->var = 'bar'; - - $this->alpha = $alpha; - $this->colour = $colour; - $this->data = array(); - $this->links = array(); - $this->tips = array(); - $this->_key = false; - } - - function key( $key, $size ) - { - $this->_key = true; - $this->key = graph::esc( $key ); - $this->key_size = $size; - } - - function add( $data ) - { - $this->data[] = $data; - } - - function add_link( $data, $link ) - { - $this->data[] = $data; - $this->links[] = graph::esc( $link ); - } - - function add_data_tip( $data, $tip ) - { - $this->data[] = $data; - $this->tips[] = graph::esc( $tip ); - } - - // return the variables for this - // bar chart - function _get_variable_list() - { - $values = array(); - $values[] = $this->alpha; - $values[] = $this->colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } - - function toString( $output_type, $set_num ) - { - $values = implode( ',', $this->_get_variable_list() ); - - $tmp = array(); - - if( $output_type == 'js' ) - { - $tmp[] = 'so.addVariable("'. $this->var.$set_num .'","'. $values . '");'; - - $tmp[] = 'so.addVariable("values'. $set_num .'","'. implode( ',', $this->data ) .'");'; - - if( count( $this->links ) > 0 ) - $tmp[] = 'so.addVariable("links'. $set_num .'","'. implode( ',', $this->links ) .'");'; - - if( count( $this->tips ) > 0 ) - $tmp[] = 'so.addVariable("tool_tips_set'. $set_num .'","'. implode( ',', $this->tips ) .'");'; - - } - else - { - $tmp[] = '&'. $this->var. $set_num .'='. $values .'&'; - $tmp[] = '&values'. $set_num .'='. implode( ',', $this->data ) .'&'; - - if( count( $this->links ) > 0 ) - $tmp[] = '&links'. $set_num .'='. implode( ',', $this->links ) .'&'; - - if( count( $this->tips ) > 0 ) - $tmp[] = '&tool_tips_set'. $set_num .'='. implode( ',', $this->tips ) .'&'; - } - - return implode( "\r\n", $tmp ); - } - -} - -class bar_3d extends bar -{ - function bar_3d( $alpha, $colour ) - { - parent::bar( $alpha, $colour ); - $this->var = 'bar_3d'; - } -} - -class bar_fade extends bar -{ - function bar_fade( $alpha, $colour ) - { - parent::bar( $alpha, $colour ); - $this->var = 'bar_fade'; - } -} - -class bar_outline extends bar -{ - var $outline_colour; - - function bar_outline( $alpha, $colour, $outline_colour ) - { - parent::bar( $alpha, $colour ); - $this->var = 'filled_bar'; - $this->outline_colour = $outline_colour; - } - - // override the base method - function _get_variable_list() - { - $values = array(); - $values[] = $this->alpha; - $values[] = $this->colour; - $values[] = $this->outline_colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } -} - -class bar_glass extends bar_outline -{ - function bar_glass( $alpha, $colour, $outline_colour ) - { - parent::bar_outline( $alpha, $colour, $outline_colour ); - $this->var = 'bar_glass'; - } -} - -// -// this has an outline colour and a 'jiggle' parameter -// called offset -// -class bar_sketch extends bar_outline -{ - var $offset; - - function bar_sketch( $alpha, $offset, $colour, $outline_colour ) - { - parent::bar_outline( $alpha, $colour, $outline_colour ); - $this->var = 'bar_sketch'; - $this->offset = $offset; - } - - // override the base method - function _get_variable_list() - { - $values = array(); - $values[] = $this->alpha; - $values[] = $this->offset; - $values[] = $this->colour; - $values[] = $this->outline_colour; - - if( $this->_key ) - { - $values[] = $this->key; - $values[] = $this->key_size; - } - - return $values; - } -} - -class candle -{ - var $out; - - function candle( $high, $open, $close, $low ) - { - $this->out = array(); - $this->out[] = $high; - $this->out[] = $open; - $this->out[] = $close; - $this->out[] = $low; - } - - function toString() - { - return '['. implode( ',', $this->out ) .']'; - } -} - -class hlc -{ - var $out; - - function hlc( $high, $low, $close ) - { - $this->out = array(); - $this->out[] = $high; - $this->out[] = $low; - $this->out[] = $close; - } - - function toString() - { - return '['. implode( ',', $this->out ) .']'; - } -} - -class point -{ - var $out; - - function point( $x, $y, $size_px ) - { - $this->out = array(); - $this->out[] = $x; - $this->out[] = $y; - $this->out[] = $size_px; - } - - function toString() - { - return '['. implode( ',', $this->out ) .']'; - } -} - - -function open_flash_chart_object_str( $width, $height, $url, $use_swfobject=true, $base='' ) -{ - // - // return the HTML as a string - // - return _ofc( $width, $height, $url, $use_swfobject, $base ); -} - -function open_flash_chart_object( $width, $height, $url, $use_swfobject=true, $base='' ) -{ - // - // stream the HTML into the page - // - echo _ofc( $width, $height, $url, $use_swfobject, $base ); -} - -function _ofc( $width, $height, $url, $use_swfobject, $base ) -{ - // - // I think we may use swfobject for all browsers, - // not JUST for IE... - // - //$ie = strstr(getenv('HTTP_USER_AGENT'), 'MSIE'); - - // - // escape the & and stuff: - // - $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; - $obj_id = 'chart'; - $div_name = 'flashcontent'; - - //$out[] = ''; - - if( !isset( $open_flash_chart_seqno ) ) - { - $open_flash_chart_seqno = 1; - $out[] = ''; - } - else - { - $open_flash_chart_seqno++; - $obj_id .= '_'. $open_flash_chart_seqno; - $div_name .= '_'. $open_flash_chart_seqno; - } - - if( $use_swfobject ) - { - // Using library for auto-enabling Flash object on IE, disabled-Javascript proof - $out[] = '
'; - $out[] = ''; - $out[] = ''; - } - - return implode("\n",$out); -} - -$x = open_flash_chart_object( 300,300,"/images/open-flash-chart.swf", true); - -?> - - - -
- - diff --git a/workflow/engine/plugins/pmosCommunity/open_flash_chart_object.php b/workflow/engine/plugins/pmosCommunity/open_flash_chart_object.php deleted file mode 100644 index 5cf831634..000000000 --- a/workflow/engine/plugins/pmosCommunity/open_flash_chart_object.php +++ /dev/null @@ -1,109 +0,0 @@ -'; - - if( !isset( $open_flash_chart_seqno ) ) - { - $open_flash_chart_seqno = 1; - $out[] = ''; - } - else - { - $open_flash_chart_seqno++; - $obj_id .= '_'. $open_flash_chart_seqno; - $div_name .= '_'. $open_flash_chart_seqno; - } - - if( $use_swfobject ) - { - // Using library for auto-enabling Flash object on IE, disabled-Javascript proof - $out[] = '
'; - $out[] = ''; - $out[] = ''; - } - - return implode("\n",$out); -} -?> \ No newline at end of file diff --git a/workflow/engine/plugins/pmosCommunity/public_html/open-flash-chart.swf b/workflow/engine/plugins/pmosCommunity/public_html/open-flash-chart.swf deleted file mode 100644 index 85b590a28..000000000 Binary files a/workflow/engine/plugins/pmosCommunity/public_html/open-flash-chart.swf and /dev/null differ diff --git a/workflow/engine/plugins/pmosCommunity/public_html/swfobject.js b/workflow/engine/plugins/pmosCommunity/public_html/swfobject.js deleted file mode 100644 index 02ca073dc..000000000 --- a/workflow/engine/plugins/pmosCommunity/public_html/swfobject.js +++ /dev/null @@ -1,233 +0,0 @@ -/** - * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ - * - * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: - * http://www.opensource.org/licenses/mit-license.php - * - */ -if(typeof deconcept == "undefined") var deconcept = new Object(); -if(typeof deconcept.util == "undefined") deconcept.util = new Object(); -if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object(); -deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) { - if (!document.getElementById) { return; } - this.DETECT_KEY = detectKey ? detectKey : 'detectflash'; - this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); - this.params = new Object(); - this.variables = new Object(); - this.attributes = new Array(); - if(swf) { this.setAttribute('swf', swf); } - if(id) { this.setAttribute('id', id); } - if(w) { this.setAttribute('width', w); } - if(h) { this.setAttribute('height', h); } - if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); } - this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); - if (!window.opera && document.all && this.installedVer.major > 7) { - // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE - deconcept.SWFObject.doPrepUnload = true; - } - if(c) { this.addParam('bgcolor', c); } - var q = quality ? quality : 'high'; - this.addParam('quality', q); - this.setAttribute('useExpressInstall', false); - this.setAttribute('doExpressInstall', false); - var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location; - this.setAttribute('xiRedirectUrl', xir); - this.setAttribute('redirectUrl', ''); - if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); } -} -deconcept.SWFObject.prototype = { - useExpressInstall: function(path) { - this.xiSWFPath = !path ? "expressinstall.swf" : path; - this.setAttribute('useExpressInstall', true); - }, - setAttribute: function(name, value){ - this.attributes[name] = value; - }, - getAttribute: function(name){ - return this.attributes[name]; - }, - addParam: function(name, value){ - this.params[name] = value; - }, - getParams: function(){ - return this.params; - }, - addVariable: function(name, value){ - this.variables[name] = value; - }, - getVariable: function(name){ - return this.variables[name]; - }, - getVariables: function(){ - return this.variables; - }, - getVariablePairs: function(){ - var variablePairs = new Array(); - var key; - var variables = this.getVariables(); - for(key in variables){ - variablePairs[variablePairs.length] = key +"="+ variables[key]; - } - return variablePairs; - }, - getSWFHTML: function() { - var swfNode = ""; - if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture - if (this.getAttribute("doExpressInstall")) { - this.addVariable("MMplayerType", "PlugIn"); - this.setAttribute('swf', this.xiSWFPath); - } - swfNode = ' 0){ swfNode += 'flashvars="'+ pairs +'"'; } - swfNode += '/>'; - } else { // PC IE - if (this.getAttribute("doExpressInstall")) { - this.addVariable("MMplayerType", "ActiveX"); - this.setAttribute('swf', this.xiSWFPath); - } - swfNode = ''; - swfNode += ''; - var params = this.getParams(); - for(var key in params) { - swfNode += ''; - } - var pairs = this.getVariablePairs().join("&"); - if(pairs.length > 0) {swfNode += '';} - swfNode += ""; - } - return swfNode; - }, - write: function(elementId){ - if(this.getAttribute('useExpressInstall')) { - // check to see if we need to do an express install - var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]); - if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) { - this.setAttribute('doExpressInstall', true); - this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl'))); - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - this.addVariable("MMdoctitle", document.title); - } - } - if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){ - var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId; - n.innerHTML = this.getSWFHTML(); - return true; - }else{ - if(this.getAttribute('redirectUrl') != "") { - document.location.replace(this.getAttribute('redirectUrl')); - } - } - return false; - } -} - -/* ---- detection functions ---- */ -deconcept.SWFObjectUtil.getPlayerVersion = function(){ - var PlayerVersion = new deconcept.PlayerVersion([0,0,0]); - if(navigator.plugins && navigator.mimeTypes.length){ - var x = navigator.plugins["Shockwave Flash"]; - if(x && x.description) { - PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); - } - }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE - var axo = 1; - var counter = 3; - while(axo) { - try { - counter++; - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter); -// document.write("player v: "+ counter); - PlayerVersion = new deconcept.PlayerVersion([counter,0,0]); - } catch (e) { - axo = null; - } - } - } else { // Win IE (non mobile) - // do minor version lookup in IE, but avoid fp6 crashing issues - // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/ - try{ - var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); - }catch(e){ - try { - var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); - PlayerVersion = new deconcept.PlayerVersion([6,0,21]); - axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code) - } catch(e) { - if (PlayerVersion.major == 6) { - return PlayerVersion; - } - } - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - } catch(e) {} - } - if (axo != null) { - PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); - } - } - return PlayerVersion; -} -deconcept.PlayerVersion = function(arrVersion){ - this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0; - this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0; - this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0; -} -deconcept.PlayerVersion.prototype.versionIsValid = function(fv){ - if(this.major < fv.major) return false; - if(this.major > fv.major) return true; - if(this.minor < fv.minor) return false; - if(this.minor > fv.minor) return true; - if(this.rev < fv.rev) return false; - return true; -} -/* ---- get value of query string param ---- */ -deconcept.util = { - getRequestParameter: function(param) { - var q = document.location.search || document.location.hash; - if (param == null) { return q; } - if(q) { - var pairs = q.substring(1).split("&"); - for (var i=0; i < pairs.length; i++) { - if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { - return pairs[i].substring((pairs[i].indexOf("=")+1)); - } - } - } - return ""; - } -} -/* fix for video streaming bug */ -deconcept.SWFObjectUtil.cleanupSWFs = function() { - var objects = document.getElementsByTagName("OBJECT"); - for (var i = objects.length - 1; i >= 0; i--) { - objects[i].style.display = 'none'; - for (var x in objects[i]) { - if (typeof objects[i][x] == 'function') { - objects[i][x] = function(){}; - } - } - } -} -// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/ -if (deconcept.SWFObject.doPrepUnload) { - if (!deconcept.unloadSet) { - deconcept.SWFObjectUtil.prepUnload = function() { - __flash_unloadHandler = function(){}; - __flash_savedUnloadHandler = function(){}; - window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); - } - window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); - deconcept.unloadSet = true; - } -} -/* add document.getElementById if needed (mobile IE < 5) */ -if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }} - -/* add some aliases for ease of use/backwards compatibility */ -var getQueryParamValue = deconcept.util.getRequestParameter; -var FlashObject = deconcept.SWFObject; // for legacy support -var SWFObject = deconcept.SWFObject; diff --git a/workflow/engine/plugins/pmosCommunity/setupPage.xml b/workflow/engine/plugins/pmosCommunity/setupPage.xml deleted file mode 100644 index 3cf13ba37..000000000 --- a/workflow/engine/plugins/pmosCommunity/setupPage.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - <en>ProcessMaker Open Source Plugin</en> - - - - ProcessMaker Open Source Plugin, with this plugin you can see many differents charts related to the ProcessMaker Community web sites - - - - - Save - - \ No newline at end of file