Subversion Repositories SmartDukaan

Rev

Rev 10780 | Rev 11126 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10780 Rev 11123
Line 92... Line 92...
92
 
92
 
93
		while ($filename = @readdir($current_dir))
93
		while ($filename = @readdir($current_dir))
94
		{
94
		{
95
			if ($filename != "." and $filename != ".." and $filename != "index.html")
95
			if ($filename != "." and $filename != ".." and $filename != "index.html")
96
			{
96
			{
97
				$name = str_replace(".jpg", "", $filename);
97
				$name = str_replace(".png", "", $filename);
98
 
98
 
99
				if (($name + $expiration) < $now)
99
				if (($name + $expiration) < $now)
100
				{
100
				{
101
					@unlink($img_path.$filename);
101
					@unlink($img_path.$filename);
102
				}
102
				}
Line 191... Line 191...
191
 
191
 
192
		$use_font = ($font_path != '' AND file_exists($font_path) AND function_exists('imagettftext')) ? TRUE : FALSE;
192
		$use_font = ($font_path != '' AND file_exists($font_path) AND function_exists('imagettftext')) ? TRUE : FALSE;
193
 
193
 
194
		if ($use_font == FALSE)
194
		if ($use_font == FALSE)
195
		{
195
		{
196
			$font_size = 12;
196
			$font_size = 30;
197
			$x = rand(0, $img_width/($length/3));
197
			$x = rand(0, $img_width/($length/3));
198
			$y = 0;
198
			$y = 0;
199
		}
199
		}
200
		else
200
		else
201
		{
201
		{
202
			$font_size	= 12;
202
			$font_size	= 30;
203
			$x = rand(0, $img_width/($length/1.5));
203
			$x = rand(0, $img_width/($length/1.5));
204
			$y = $font_size+2;
204
			$y = $font_size+2;
205
		}
205
		}
206
 
206
 
207
		for ($i = 0; $i < strlen($word); $i++)
207
		for ($i = 0; $i < strlen($word); $i++)
208
		{
208
		{
209
			if ($use_font == FALSE)
209
			if ($use_font == FALSE)
210
			{
210
			{
211
				$y = rand(0 , $img_height/2);
211
				$y = rand(0 , $img_height/2);
212
				imagestring($im, $font_size, $x, $y, substr($word, $i, 1), $text_color);
212
				imagettftext($im, $font_size, $x, $y, substr($word, $i, 1), $text_color);
213
				$x += ($font_size*2);
213
				$x += ($font_size*2);
214
			}
214
			}
215
			else
215
			else
216
			{
216
			{
217
				$y = rand($img_height/2, $img_height-3);
217
				$y = rand($img_height/2, $img_height-3);