? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/hotel/
File Upload :
Current File : /home/admin/public_html/old/hotel/class.flashslideshow.php

<?php


class flashSlideShow
{
	//initiate needed variables
	var $movie;
	var $i;
	var $width;
	var $height;
	var $bgred;
	var $bggreen;
	var $bgblue;
	var $interval;
	

	function flashSlideShow($width, $height, $interval = 1, $bgcolor = '#FFFFFF') 
	{
		$this->width = $width;
		$this->height = $height;
		
		$this->movie = new swfMovie();
		$this->movie->setDimension($width, $height);
		$this->movie->setRate(10);
		
		$this->setBgColor($bgcolor);
		$this->setInterval($interval);
	}
	

	function setInterval($interval) 
	{
		if (is_int($interval) AND $interval >= 1) {
			$this->interval = $interval*10;
		} else {
			$this->interval = 10;
		}
	}
	

	function setBgColor($bgcolor) 
	{
		$this->bgred   = hexdec(substr($bgcolor,0,2));
		$this->bggreen = hexdec(substr($bgcolor,2,2));
		$this->bgblue  = hexdec(substr($bgcolor,4,2));
	}
	

	function setBgColorRGB($red,$green,$blue) 
	{
		$this->bgred   = $red;
		$this->bggreen = $green;
		$this->bgblue  = $blue;
	}
	
	/**
	* Add image to slideshow
	*
	* Add one JPEG file to flash slideshow
	*
	* @access	public
	* @param	string		$filename	JPEG filename
	* @return	void
	*/
	function addImage($filename) 
	{
		//$this->movie->add(new SWFBitmap(fopen($filename, "rb")));
		
		//create image object
		$b = new SWFBitmap(fopen($filename,'rb')); 
 		$s = new SWFShape(); 
 		$s->setRightFill($s->addFill($b)); 
 		$s->drawLine($this->width, 0); 
 		$s->drawLine(0, $this->height); 
 		$s->drawLine(-$this->width, 0); 
		$s->drawLine(0, -$this->height);
		
		//transition white to image
		$this->i = $this->movie->add($s);
		$r = 255;
		for($n=0; $n<=5; ++$n) { 
		   //$i->multColor(1.0-$n/10, 1.0, 1.0); 
		   //$i->addColor(0xff*$n/20, 0, 0); 
		   $this->i->addColor($r-30, $r-30, $r-30); 
		   $this->movie->nextFrame(); 
		   $r = $r - 30;
		}
		
		//static image
		$this->i = $this->movie->add($s);
		$this->addInterval();
		
		//transition image to white
		$r = 0;
		for($n=0; $n<=5; ++$n) 
		{ 
		   //$i->multColor(1.0-$n/10, 1.0, 1.0); 
		   //$i->addColor(0xff*$n/20, 0, 0); 
		   $this->i->addColor($r+30, $r+30, $r+30); 
		   $this->movie->nextFrame(); 
		   $r = $r +30;
		} 
	}
	
	/**
	* Add array of image to slideshow
	*
	* Add array of JPEG files to flash slideshow
	*
	* @access	public
	* @param	array		$filename	array of JPEG files
	* @return	void
	*/
	function addImages($filearray) 
	{
		foreach($filearray as $key => $val) {
			$this->addImage($val);
		}
	}
	
	/**
	* Add interval between each image
	*
	* Add interval between each image
	*
	* @access	private
	* @return	void
	*/
	function addInterval() 
	{
		$i = 1;
		while ($i <= $this->interval) {
			$this->movie->nextFrame();
			$i++;
		}
	}

	/**
	* Save movie
	*
	* Save movie
	*
	* @access	public
	* @param	string		$filename	name of movie file to saved
	* @return	void
	*/
	function save($filename) 
	{
		$this->movie->save($filename);
	}

	function output() 
	{
		header("Content-Type:application/x-shockwave-flash");
		$this->movie->output();
	}
}
?>

T1KUS90T
  root-grov@210.1.60.28:~$