Skip to content
Newer
Older
100644 340 lines (301 sloc) 10 KB
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
1 <?php
2 /**
3 *
4 * @package Icy Phoenix
5 * @version $Id$
6 * @copyright (c) 2008 Icy Phoenix
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
8 *
9 */
10
11 /**
12 *
13 * @Extra credits for this file
14 * Smartor (smartor_xp@hotmail.com)
15 *
16 */
17
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
18 define('IN_ICYPHOENIX', true);
19 if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
20 if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
21 include(IP_ROOT_PATH . 'common.' . PHP_EXT);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
22
23 // Start session management
09f38bc @MightyGorgon Another milestone almost achieved for new Icy Phoenix version: user/s…
authored Mar 31, 2011
24 $user->session_begin(false);
d164727 @MightyGorgon First implementation of the new permissions system in CMS.
authored Sep 23, 2011
25 $auth->acl($user->data);
09f38bc @MightyGorgon Another milestone almost achieved for new Icy Phoenix version: user/s…
authored Mar 31, 2011
26 $user->setup();
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
27 // End session management
28
29 // Get general album information
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
30 include(ALBUM_MOD_PATH . 'album_common.' . PHP_EXT);
ac35162 @MightyGorgon Fixed a couple of small bugs and moved the image class into includes …
authored Apr 27, 2010
31 require(IP_ROOT_PATH . 'includes/class_image.' . PHP_EXT);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
32
33 // ------------------------------------
34 // Check the request
35 // ------------------------------------
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored Mar 20, 2010
36 $pic_id = request_var('pic_id', 0);
37 if ($pic_id <= 0)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
38 {
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored Mar 20, 2010
39 die('No pics specified');
40 //message_die(GENERAL_MESSAGE, 'No pics specified');
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
41 }
42
43 // ------------------------------------
44 // Get this pic info and current category info
45 // ------------------------------------
46 $sql = "SELECT p.*, c.*
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
47 FROM " . ALBUM_TABLE . " AS p, " . ALBUM_CAT_TABLE . " AS c
48 WHERE p.pic_id = '" . $pic_id . "'
49 AND c.cat_id = p.pic_cat_id
50 LIMIT 1";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored Oct 26, 2009
51 $result = $db->sql_query($sql);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
52 $thispic = $db->sql_fetchrow($result);
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
53 $db->sql_freeresult($result);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
54
55 $cat_id = $thispic['pic_cat_id'];
56 $album_user_id = $thispic['cat_user_id'];
57
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
58 $pic_info = array();
59 $pic_info = pic_info($thispic['pic_filename'], $thispic['pic_thumbnail'], $thispic['pic_title']);
60
61 if(empty($thispic) || ($pic_info['exists'] == false) || !file_exists($pic_info['fullpath']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
62 {
63 message_die(GENERAL_MESSAGE, $lang['Pic_not_exist']);
64 }
65
66 // ------------------------------------
67 // Check the permissions
68 // ------------------------------------
69 $album_user_access = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_VIEW, $thispic);
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
70 if ($album_user_access['view'] == false)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
71 {
1c23423 @MightyGorgon Latest updates for IP 1.3 RC2
authored Apr 27, 2009
72 message_die(GENERAL_MESSAGE, $lang['Not_Authorized']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
73 }
74
75 // ------------------------------------
76 // Check Pic Approval
77 // ------------------------------------
09f38bc @MightyGorgon Another milestone almost achieved for new Icy Phoenix version: user/s…
authored Mar 31, 2011
78 if ($user->data['user_level'] != ADMIN)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
79 {
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
80 if (($thispic['cat_approval'] == ADMIN) || (($thispic['cat_approval'] == MOD) && !$album_user_access['moderator']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
81 {
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
82 if ($thispic['pic_approval'] != 1)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
83 {
1c23423 @MightyGorgon Latest updates for IP 1.3 RC2
authored Apr 27, 2009
84 message_die(GENERAL_MESSAGE, $lang['Not_Authorized']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
85 }
86 }
87 }
88
89 // ------------------------------------
90 // Check hotlink
91 // ------------------------------------
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
92 if (($album_config['hotlink_prevent'] == true) && (isset($_SERVER['HTTP_REFERER'])) && ($album_config['hotlink_allowed'] != ''))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
93 {
94 $check_referer = explode('?', $_SERVER['HTTP_REFERER']);
95 $check_referer = trim($check_referer[0]);
96
97 $good_referers = array();
98
99 if ($album_config['hotlink_allowed'] != '')
100 {
101 $good_referers = explode(',', $album_config['hotlink_allowed']);
102 }
103
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored Oct 26, 2009
104 $good_referers[] = $config['server_name'] . $config['script_path'];
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
105
106 $errored = true;
107
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored Oct 26, 2009
108 for ($i = 0; $i < sizeof($good_referers); $i++)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
109 {
110 $good_referers[$i] = trim($good_referers[$i]);
111
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
112 if ((strstr($check_referer, $good_referers[$i])) && ($good_referers[$i] != ''))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
113 {
114 $errored = false;
115 }
116 }
117
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
118 if ($errored)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
119 {
1c23423 @MightyGorgon Latest updates for IP 1.3 RC2
authored Apr 27, 2009
120 message_die(GENERAL_MESSAGE, $lang['Not_Authorized']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
121 /*
122 header('Content-type: image/jpeg');
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
123 header('Content-Disposition: filename=' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
124 readfile($images['no_thumbnail']);
125 exit;
126 */
127 }
128 }
129
130 /*
131 +----------------------------------------------------------
132 | Main work here...
133 +----------------------------------------------------------
134 */
135
136 // --------------------------------
137 // Check thumbnail cache. If cache is available we will SEND & EXIT
138 // --------------------------------
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
139 switch ($pic_info['filetype'])
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
140 {
141 case 'gif':
142 $file_header = 'Content-type: image/gif';
143 break;
144 case 'jpg':
145 $file_header = 'Content-type: image/jpeg';
146 break;
147 case 'png':
148 $file_header = 'Content-type: image/png';
149 break;
150 default:
151 header('Content-type: image/jpeg');
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
152 header('Content-Disposition: filename=thumb_' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
153 readfile($images['no_thumbnail']);
154 exit;
155 break;
156 }
157
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
158 if(($album_config['thumbnail_cache'] == true) && file_exists($pic_info['thumbnail_s_fullpath']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
159 {
160 header($file_header);
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
161 header('Content-Disposition: filename=thumb_' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
162 readfile($pic_info['thumbnail_s_fullpath']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
163 exit;
164 }
165
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
166 $pic_filesize = @filesize($pic_info['fullpath']);
167 $pic_filesize = (!$pic_filesize ? 0 : $pic_filesize);
168 $pic_size = @getimagesize($pic_info['fullpath']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
169 $pic_width = $pic_size[0];
170 $pic_height = $pic_size[1];
171
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
172 if(($pic_width < $album_config['thumbnail_size']) && ($pic_height < $album_config['thumbnail_size']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
173 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
174 $copy_success = @copy($pic_info['fullpath'], $pic_info['thumbnail_s_fullpath']);
6fc5bc8 @MightyGorgon Pre Beta 2 Package
authored Feb 19, 2009
175 @chmod($pic_info['thumbnail_s_fullpath'], 0777);
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
176 $sql = "UPDATE " . ALBUM_TABLE . "
177 SET pic_thumbnail = '" . $pic_info['thumbnail_new'] . "', pic_size = '" . $pic_filesize . "'
178 WHERE pic_id = '" . $pic_id . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored Oct 26, 2009
179 $result = $db->sql_query($sql);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
180 header($file_header);
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
181 header('Content-Disposition: filename=thumb_' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
182 readfile($pic_info['fullpath']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
183 exit;
184 }
185 else
186 {
187 // --------------------------------
188 // Cache is empty. Try to re-generate!
189 // --------------------------------
190 if ($pic_width > $pic_height)
191 {
192 $thumbnail_width = $album_config['thumbnail_size'];
193 $thumbnail_height = $album_config['thumbnail_size'] * ($pic_height / $pic_width);
194 }
195 else
196 {
197 $thumbnail_height = $album_config['thumbnail_size'];
198 $thumbnail_width = $album_config['thumbnail_size'] * ($pic_width / $pic_height);
199 }
200
201 // Old Thumbnails - BEGIN
202 // Old thumbnail generation functions, for GD1 and some strange servers...
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
203 if (($album_config['gd_version'] == 1) || ($album_config['use_old_pics_gen'] == 1))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
204 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
205 switch ($pic_info['filetype'])
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
206 {
207 case 'gif':
208 header('Content-type: image/jpeg');
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
209 header('Content-Disposition: filename=thumb_' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
210 readfile($images['no_thumbnail']);
211 exit;
212 break;
213 }
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
214 if($album_config['show_pic_size_on_thumb'] == 1)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
215 {
216 $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height + 16) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height + 16);
217 }
218 else
219 {
220 $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height);
221 }
222
223 $resize_function = ($album_config['gd_version'] == 1) ? 'imagecopyresized' : 'imagecopyresampled';
224
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
225 @$resize_function($thumbnail, $pic_info['fullpath'], 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
226
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
227 if($album_config['show_pic_size_on_thumb'] == 1)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
228 {
229 $dimension_font = 1;
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
230 $dimension_filesize = $pic_filesize;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
231 $dimension_string = intval($pic_width) . 'x' . intval($pic_height) . '(' . intval($dimension_filesize / 1024) . 'KB)';
232 $dimension_colour = ImageColorAllocate($thumbnail, 255, 255, 255);
233 $dimension_height = imagefontheight($dimension_font);
234 $dimension_width = imagefontwidth($dimension_font) * strlen($dimension_string);
235 $dimension_x = ($thumbnail_width - $dimension_width) / 2;
236 $dimension_y = $thumbnail_height + ((16 - $dimension_height) / 2);
237 imagestring($thumbnail, 1, $dimension_x, $dimension_y, $dimension_string, $dimension_colour);
238 }
239
240 if ($album_config['thumbnail_cache'] == 1)
241 {
242 // ------------------------
243 // Re-generate successfully. Write it to disk!
244 // ------------------------
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
245 switch ($pic_info['filetype'])
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
246 {
247 case 'jpg':
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
248 @imagejpeg($thumbnail, $pic_info['thumbnail_s_fullpath'], $album_config['thumbnail_quality']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
249 break;
250 case 'png':
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
251 @imagepng($thumbnail, $pic_info['thumbnail_s_fullpath']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
252 break;
253 }
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
254 @chmod($pic_info['thumbnail_s_fullpath'], 0777);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
255 }
256
257 // ----------------------------
258 // After write to disk, do not forget to send to browser also
259 // ----------------------------
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
260 switch ($pic_info['filetype'])
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
261 {
262 case 'jpg':
263 @imagejpeg($thumbnail, '', $album_config['thumbnail_quality']);
264 break;
265 case 'png':
266 @imagepng($thumbnail);
267 break;
268 default:
269 header('Content-type: image/jpeg');
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
270 header('Content-Disposition: filename=thumb_' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
271 readfile($images['no_thumbnail']);
272 break;
273 }
274 exit;
275 }
276 // Old Thumbnails - END
277
278 $Image = new ImgObj();
279
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
280 if ($pic_info['filetype'] == 'jpg')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
281 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
282 $Image->ReadSourceFileJPG($pic_info['fullpath']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
283 }
284 else
285 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
286 $Image->ReadSourceFile($pic_info['fullpath']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
287 }
288
289 $Image->Resize($thumbnail_width, $thumbnail_height);
290
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
291 if($album_config['show_pic_size_on_thumb'] == true)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
292 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
293 $dimension_string = intval($pic_width) . 'x' . intval($pic_height) . '(' . intval($pic_filesize / 1024) . 'KB)';
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
294 $Image->Text($dimension_string);
295 }
296
297 if ($album_config['thumbnail_cache'] == true)
298 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
299 if ($pic_info['filetype'] == 'jpg')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
300 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
301 $Image->SendToFileJPG($pic_info['thumbnail_s_fullpath'], $album_config['thumbnail_quality']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
302 }
303 else
304 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
305 $Image->SendToFile($pic_info['thumbnail_s_fullpath'], $album_config['thumbnail_quality']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
306 }
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
307 //$Image->SendToFile($pic_info['thumbnail_s_fullpath'], $album_config['thumbnail_quality']);
308 //@chmod($pic_info['thumbnail_s_fullpath'], 0777);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
309
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
310 $sql = "UPDATE " . ALBUM_TABLE . "
311 SET pic_thumbnail = '" . $pic_info['thumbnail_new'] . "', pic_size = '" . $pic_filesize . "'
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
312 WHERE pic_id = '" . $pic_id . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored Oct 26, 2009
313 $result = $db->sql_query($sql);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
314 }
315
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
316 if ($pic_info['filetype'] == 'jpg')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
317 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
318 $Image->SendToBrowserJPG($pic_info['title_reg'], $pic_info['filetype'], 'thumb_', '', $album_config['thumbnail_quality']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
319 }
320 else
321 {
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
322 $Image->SendToBrowser($pic_info['title_reg'], $pic_info['filetype'], 'thumb_', '', $album_config['thumbnail_quality']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
323 }
324
01598db @MightyGorgon * Fixed a small bug in CMS for blocks counts
authored Sep 6, 2008
325 if ($Image == true)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
326 {
327 $Image->Destroy();
328 exit;
329 }
330 else
331 {
332 $Image->Destroy();
333 header('Content-type: image/jpeg');
06ce0f8 @MightyGorgon Brand new version...
authored Sep 14, 2008
334 header('Content-Disposition: filename=thumb_' . $pic_info['title_reg'] . '.' . $pic_info['filetype']);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored Aug 26, 2008
335 readfile($images['no_thumbnail']);
336 exit;
337 }
338 }
339
340 ?>
Something went wrong with that request. Please try again.