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: Select action/file-type: vgrid = new LineProperty(); } function Hide($aF=true) { $this->iShow=!$aF; } function Show($aF=true) { $this->iShow=$aF; } // Specify font function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { $this->iFFamily = $aFFamily; $this->iFStyle = $aFStyle; $this->iFSize = $aFSize; } function SetStyle($aStyle) { $this->iStyle = $aStyle; } function SetColumnMargin($aLeft,$aRight) { $this->iLeftColMargin = $aLeft; $this->iRightColMargin = $aRight; } function SetFontColor($aFontColor) { $this->iFontColor = $aFontColor; } function SetColor($aColor) { $this->iColor = $aColor; } function SetBackgroundColor($aColor) { $this->iBackgroundColor = $aColor; } function SetColTitles($aTitles,$aWidth=null) { $this->iTitles = $aTitles; $this->iWidth = $aWidth; } function SetMinColWidth($aWidths) { $n = min(count($this->iTitles),count($aWidths)); for($i=0; $i < $n; ++$i ) { if( !empty($aWidths[$i]) ) { if( empty($this->iWidth[$i]) ) { $this->iWidth[$i] = $aWidths[$i]; } else { $this->iWidth[$i] = max($this->iWidth[$i],$aWidths[$i]); } } } } function GetWidth($aImg) { $txt = new TextProperty(); $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); $n = count($this->iTitles) ; $rm=$this->iRightColMargin; $w = 0; for($h=0, $i=0; $i < $n; ++$i ) { $w += $this->iLeftColMargin; $txt->Set($this->iTitles[$i]); if( !empty($this->iWidth[$i]) ) { $w1 = max($txt->GetWidth($aImg)+$rm,$this->iWidth[$i]); } else { $w1 = $txt->GetWidth($aImg)+$rm; } $this->iWidth[$i] = $w1; $w += $w1; $h = max($h,$txt->GetHeight($aImg)); } $this->iHeight = $h+$this->iTopHeaderMargin; $txt=''; return $w; } function GetColStart($aImg,&$ioStart,$aAddLeftMargin=false) { $n = count($this->iTitles) ; $adj = $aAddLeftMargin ? $this->iLeftColMargin : 0; $ioStart=array($aImg->left_margin+$adj); for( $i=1; $i < $n; ++$i ) { $ioStart[$i] = $ioStart[$i-1]+$this->iLeftColMargin+$this->iWidth[$i-1]; } } // Adjust headers left, right or centered function SetHeaderAlign($aAlign) { $this->iHeaderAlign=$aAlign; } function Stroke($aImg,$aXLeft,$aYTop,$aXRight,$aYBottom,$aUseTextHeight=false) { if( !$this->iShow ) return; $txt = new TextProperty(); $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); $txt->SetColor($this->iFontColor); $txt->SetAlign($this->iHeaderAlign,'top'); $n=count($this->iTitles); if( $n == 0 ) return; $x = $aXLeft; $h = $this->iHeight; $yTop = $aUseTextHeight ? $aYBottom-$h-$this->iTopColMargin-$this->iBottomColMargin : $aYTop ; if( $h < 0 ) { JpGraphError::Raise('Internal error. Height for ActivityTitles is < 0'); } $aImg->SetLineWeight(1); // Set background color $aImg->SetColor($this->iBackgroundColor); $aImg->FilledRectangle($aXLeft,$yTop,$aXRight,$aYBottom-1); if( $this->iStyle == 1 ) { // Make a 3D effect $aImg->SetColor('white'); $aImg->Line($aXLeft,$yTop+1, $aXRight,$yTop+1); } for($i=0; $i < $n; ++$i ) { if( $this->iStyle == 1 ) { // Make a 3D effect $aImg->SetColor('white'); $aImg->Line($x+1,$yTop,$x+1,$aYBottom); } $x += $this->iLeftColMargin; $txt->Set($this->iTitles[$i]); // Adjust the text anchor position according to the choosen alignment $xp = $x; if( $this->iHeaderAlign == 'center' ) { $xp = (($x-$this->iLeftColMargin)+($x+$this->iWidth[$i]))/2; } elseif( $this->iHeaderAlign == 'right' ) { $xp = $x +$this->iWidth[$i]-$this->iRightColMargin; } $txt->Stroke($aImg,$xp,$yTop+$this->iTopHeaderMargin); $x += $this->iWidth[$i]; if( $i < $n-1 ) { $aImg->SetColor($this->iColor); $aImg->Line($x,$yTop,$x,$aYBottom); } } $aImg->SetColor($this->iColor); $aImg->Line($aXLeft,$yTop, $aXRight,$yTop); // Stroke vertical column dividers $cols=array(); $this->GetColStart($aImg,$cols); $n=count($cols); for( $i=1; $i < $n; ++$i ) { $this->vgrid->Stroke($aImg,$cols[$i],$aYBottom,$cols[$i], $aImg->height - $aImg->bottom_margin); } } } //=================================================== // CLASS GanttGraph // Description: Main class to handle gantt graphs //=================================================== class GanttGraph extends Graph { var $scale; // Public accessible var $iObj=array(); // Gantt objects var $iLabelHMarginFactor=0.2; // 10% margin on each side of the labels var $iLabelVMarginFactor=0.4; // 40% margin on top and bottom of label var $iLayout=GANTT_FROMTOP; // Could also be GANTT_EVEN var $iSimpleFont = FF_FONT1,$iSimpleFontSize=11; var $iSimpleStyle=GANTT_RDIAG,$iSimpleColor='yellow',$iSimpleBkgColor='red'; var $iSimpleProgressBkgColor='gray',$iSimpleProgressColor='darkgreen'; var $iSimpleProgressStyle=GANTT_SOLID; var $hgrid=null; //--------------- // CONSTRUCTOR // Create a new gantt graph function GanttGraph($aWidth=0,$aHeight=0,$aCachedName="",$aTimeOut=0,$aInline=true) { // Backward compatibility if( $aWidth == -1 ) $aWidth=0; if( $aHeight == -1 ) $aHeight=0; if( $aWidth< 0 |
:: 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 ]-- |