PHP4 kode fungere ikke i PHP5 - hvad er fejlen
Hejsa...Jeg har denne kode som bruges til at lave en flash graf med, men den er udviklet til php4 og jeg har php5 på min server, jeg kan ikke lige se hvad der skal laves om før den virker, er der en der kan se det ?
<?php
include 'charts.php';
$chart[ 'axis_category' ] = array ( 'size'=>14, 'color'=>"000000", 'alpha'=>0, 'font'=>"arial", 'bold'=>true, 'skip'=>0 ,'orientation'=>"horizontal" );
$chart[ 'axis_ticks' ] = array ( 'value_ticks'=>true, 'category_ticks'=>true, 'major_thickness'=>2, 'minor_thickness'=>1, 'minor_count'=>1, 'major_color'=>"000000", 'minor_color'=>"222222" ,'position'=>"outside" );
$chart[ 'axis_value' ] = array ( 'min'=>0, 'max'=>120, 'font'=>"arial", 'bold'=>true, 'size'=>10, 'color'=>"ffffff", 'alpha'=>50, 'steps'=>6, 'prefix'=>"", 'suffix'=>"", 'decimals'=>0, 'separator'=>"", 'show_min'=>true );
$chart[ 'chart_border' ] = array ( 'color'=>"000000", 'top_thickness'=>2, 'bottom_thickness'=>2, 'left_thickness'=>2, 'right_thickness'=>2 );
$chart [ 'chart_data' ][ 0 ][ 0 ] = "";
$chart [ 'chart_data' ][ 1 ][ 0 ] = "Vaagt";
$chart [ 'chart_data' ][ 2 ][ 0 ] = "Mave";
$chart [ 'chart_data' ][ 3 ][ 0 ] = "Arm";
include("dbshare.php");
$query2 = "select * FROM tabel WHERE user = 'user' ORDER BY id LIMIT 35";
$result2 = mysql_query($query2) or die(mysql_error());
$i = 1;
while ($row2 = mysql_fetch_assoc($result2)) {
$chart [ 'chart_data' ][ 0 ][ $i ] = "$row2[id]";
$i++;
}
$i = 1;
while ($row3 = mysql_fetch_assoc($result2)) {
$chart [ 'chart_data' ][ 1 ][ $i ] = "$row3[vaagt]";
$i++;
}
$i = 1;
while ($row4 = mysql_fetch_assoc($result2)) {
$chart [ 'chart_data' ][ 2 ][ $i ] = "$row4[mave]";
$i++;
}
$i = 1;
while ($row5 = mysql_fetch_assoc($result2)) {
$chart [ 'chart_data' ][ 3 ][ $i ] = "$row5[arm]";
$i++;
}
$chart[ 'chart_grid_h' ] = array ( 'alpha'=>10, 'color'=>"000000", 'thickness'=>1, 'type'=>"solid" );
$chart[ 'chart_grid_v' ] = array ( 'alpha'=>10, 'color'=>"000000", 'thickness'=>1, 'type'=>"solid" );
$chart[ 'chart_pref' ] = array ( 'line_thickness'=>2, 'point_shape'=>"none", 'fill_shape'=>false );
$chart[ 'chart_rect' ] = array ( 'x'=>40, 'y'=>25, 'width'=>335, 'height'=>200, 'positive_color'=>"000000", 'positive_alpha'=>30, 'negative_color'=>"ff0000", 'negative_alpha'=>10 );
$chart[ 'chart_type' ] = "Line";
$chart[ 'chart_value' ] = array ( 'prefix'=>"", 'suffix'=>"", 'decimals'=>0, 'separator'=>"", 'position'=>"cursor", 'hide_zero'=>true, 'as_percentage'=>false, 'font'=>"arial", 'bold'=>true, 'size'=>12, 'color'=>"ffffff", 'alpha'=>75 );
$chart[ 'draw' ] = array ( array ( 'type'=>"text", 'color'=>"ffffff", 'alpha'=>15, 'font'=>"arial", 'rotation'=>-90, 'bold'=>true, 'size'=>50, 'x'=>-10, 'y'=>348, 'width'=>300, 'height'=>150, 'text'=>"hertz", 'h_align'=>"center", 'v_align'=>"top" ),
array ( 'type'=>"text", 'color'=>"000000", 'alpha'=>15, 'font'=>"arial", 'rotation'=>0, 'bold'=>true, 'size'=>60, 'x'=>0, 'y'=>0, 'width'=>320, 'height'=>300, 'text'=>"output", 'h_align'=>"left", 'v_align'=>"bottom" ) );
$chart[ 'legend_rect' ] = array ( 'x'=>-100, 'y'=>-100, 'width'=>10, 'height'=>10, 'margin'=>10 );
$chart[ 'series_color' ] = array ( "77bb11", "cc5511" );
SendChartData ( $chart );
?>
