[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 // image rendering functions 24 // moved away from front 25 26 function imagetable(& $phpwcms, & $image, $rand="0:0:0:0", $align=0) { 27 // creates the image tags if text w/image 28 // 0 :1 :2 :3 :4 :5 :6 :7 :8 29 // dbid:filename:hash:extension:width:height:caption:position:zoom 30 31 $cnt_image_lightbox = empty($GLOBALS['cnt_image_lightbox']) ? 0 : 1; 32 $crop = empty($image['crop']) ? 0 : 1; 33 34 $thumb_image = get_cached_image( 35 array( "target_ext" => $image[3], 36 "image_name" => $image[2] . '.' . $image[3], 37 "max_width" => $image[4], 38 "max_height" => $image[5], 39 "thumb_name" => md5($image[2].$image[4].$image[5].$phpwcms["sharpen_level"].$crop), 40 'crop_image' => $crop 41 ) 42 ); 43 44 if($image[8]) { 45 46 $zoominfo = get_cached_image( 47 array( "target_ext" => $image[3], 48 "image_name" => $image[2] . '.' . $image[3], 49 "max_width" => $phpwcms["img_prev_width"], 50 "max_height" => $phpwcms["img_prev_height"], 51 "thumb_name" => md5($image[2].$phpwcms["img_prev_width"].$phpwcms["img_prev_height"].$phpwcms["sharpen_level"]) 52 ) 53 ); 54 55 if($zoominfo == false) $image[8] = 0; 56 57 } 58 59 $table = ''; 60 61 if($thumb_image != false) { 62 63 // read content image info 64 $table_class = $GLOBALS["template_default"]["article"]["image_table_class"]; 65 $table_class = ($table_class) ? ' class="'.$table_class.'"' : ''; 66 $table_bgcolor = $GLOBALS["template_default"]["article"]["image_table_bgcolor"]; 67 $table_bgcolor = ($table_bgcolor) ? ' bgcolor="'.$table_bgcolor.'"' : ''; 68 $image_align = $GLOBALS["template_default"]["article"]["image_align"]; 69 $image_align = ($image_align) ? ' align="'.$image_align.'"' : ''; 70 $image_valign = $GLOBALS["template_default"]["article"]["image_valign"]; 71 $image_valign = ($image_valign) ? ' valign="'.$image_valign.'"' : ''; 72 $image_border = ' border="'.intval($GLOBALS["template_default"]["article"]["image_border"]).'"'; 73 $image_imgclass = $GLOBALS["template_default"]["article"]["image_imgclass"]; 74 $image_imgclass = ($image_imgclass) ? ' class="'.$image_imgclass.'"' : ''; 75 $image_class = $GLOBALS["template_default"]["article"]["image_class"]; 76 $image_class = ($image_class) ? ' class="'.$image_class.'"' : ''; 77 $image_bgcolor = $GLOBALS["template_default"]["article"]["image_bgcolor"]; 78 $image_bgcolor = ($image_bgcolor) ? ' bgcolor="'.$image_bgcolor.'"' : ''; 79 $caption_class = $GLOBALS["template_default"]["article"]["image_caption_class"]; 80 $caption_class = ($caption_class) ? ' class="'.$caption_class.'"' : ''; 81 $caption_bgcolor= $GLOBALS["template_default"]["article"]["image_caption_bgcolor"]; 82 $caption_bgcolor= ($caption_bgcolor) ? ' bgcolor="'.$caption_bgcolor.'"' : ''; 83 $caption_valign = $GLOBALS["template_default"]["article"]["image_caption_valign"]; 84 $caption_valign = ($caption_valign) ? ' valign="'.$caption_valign.'"' : ''; 85 $caption_align = $GLOBALS["template_default"]["article"]["image_caption_align"]; 86 $caption_align = ($caption_align) ? ' align="'.$caption_align.'"' : ''; 87 $capt_before = $GLOBALS["template_default"]["article"]["image_caption_before"]; 88 $capt_after = $GLOBALS["template_default"]["article"]["image_caption_after"]; 89 90 // image caption 91 //$caption = explode('|', base64_decode($image[6])); 92 $caption = getImageCaption(base64_decode($image[6])); 93 $caption[0] = html_specialchars($caption[0]); 94 $caption[3] = empty($caption[3]) ? '' : ' title="'.html_specialchars($caption[3]).'"'; //title 95 $caption[1] = empty($caption[1]) ? html_specialchars($image[1]) : html_specialchars($caption[1]); 96 97 // image source 98 $img = '<img src="'.PHPWCMS_IMAGES.$thumb_image[0].'" '.$thumb_image[3]; 99 $img .= $image_border.$image_imgclass.' alt="'.$caption[1].'"'.$caption[3].' />'; 100 101 $tablewidth = $thumb_image[1]; 102 103 // spaces around image table 104 $rand = explode(":", $rand); 105 if(is_array($rand) && count($rand)) { 106 foreach($rand as $key => $value) { 107 $rand[$key] = intval($value); 108 } 109 } else { 110 $rand = array(0,0,0,0); 111 } 112 if($rand[2] && $rand[3]) { 113 $colspan = ' colspan="3"'; 114 } else { 115 if($rand[2] || $rand[3]) { 116 $colspan = ' colspan="2"'; 117 } else { 118 $colspan = ''; 119 } 120 } 121 $tablewidth += $rand[2] + $rand[3]; 122 123 $table .= '<table width="'.$tablewidth.'" border="0" cellspacing="0" cellpadding="0" '; 124 $table .= ($align) ? 'align="'.$align.'"' : ''; 125 $table .= $table_bgcolor.$table_class.">\n"; 126 $table .= ($rand[0]) ? '<tr><td'.$colspan.'>'.spacer(1,$rand[0])."</td></tr>\n" : ''; 127 $table .= '<tr>'; 128 $table .= ($rand[2]) ? '<td>'.spacer($rand[2],1).'</td>' : ''; 129 if($image[8]) { 130 131 $open_popup_link = 'image_zoom.php?'.getClickZoomImageParameter($zoominfo[0].'?'.$zoominfo[3]); 132 $table .= '<td'.$image_align.$image_valign.$image_bgcolor.$image_class.">"; 133 if($caption[2][0]) { 134 $open_link = $caption[2][0]; 135 $return_false = ''; 136 } else { 137 $open_link = $open_popup_link; 138 $return_false = 'return false;'; 139 } 140 141 if(!$cnt_image_lightbox || $caption[2][0]) { 142 143 $table .= "<a href=\"".$open_link."\" onclick=\"checkClickZoom();clickZoom('".$open_popup_link."','previewpic','width="; 144 $table .= $zoominfo[1].",height=".$zoominfo[2]."');".$return_false."\"".$caption[2][1].">"; 145 146 } else { 147 148 $table .= '<a href="'.PHPWCMS_IMAGES.$zoominfo[0].'" rel="lightbox"'; 149 if($caption[0]) { 150 $table .= ' title="'.parseLightboxCaption($caption[0]).'"'; 151 } 152 $table .= ' target="_blank">'; 153 154 } 155 $table .= $img.'</a></td>'; 156 } else { 157 $table .= '<td'.$image_align.$image_valign.$image_bgcolor.$image_class.">"; 158 if($caption[2][0]) { 159 $table .= '<a href="'.$caption[2][0].'"'.$caption[2][1].'>'.$img.'</a>'; 160 } else { 161 $table .= $img; 162 } 163 $table .= '</td>'; 164 } 165 $table .= ($rand[3]) ? "<td>".spacer($rand[3],1)."</td>" : ""; 166 $table .= "</tr>\n"; 167 if($caption[0] && empty($image['nocaption'])) { 168 $table .= "<tr>"; 169 $table .= ($rand[2]) ? "<td>".spacer($rand[2],1)."</td>" : ""; 170 $table .= '<td'.$caption_valign.$caption_align.$caption_bgcolor.$caption_class.'>'.$capt_before.$caption[0]; 171 if($caption[4] !== '') { 172 $table .= ' <span class="copyright">'.html_specialchars($caption[4]).'</span>'; 173 } 174 $table .= $capt_after."</td>"; 175 $table .= ($rand[3]) ? "<td>".spacer($rand[3],1)."</td>" : ""; 176 $table .= "</tr>\n"; 177 } 178 $table .= ($rand[1]) ? "<tr><td".$colspan.">".spacer(1,$rand[1])."</td></tr>\n" : ""; 179 $table .= "</table>"; 180 181 } 182 183 return $table; 184 } 185 186 function imagediv(& $phpwcms, & $image, $classname='') { 187 // creates the image tags if text w/image 188 // 0 :1 :2 :3 :4 :5 :6 :7 :8 189 // dbid:filename:hash:extension:width:height:caption:position:zoom 190 191 $cnt_image_lightbox = empty($GLOBALS['cnt_image_lightbox']) ? 0 : 1; 192 $crop = empty($image['crop']) ? 0 : 1; 193 194 $classname = 'imgDIV'.$classname; 195 196 $thumb_image = get_cached_image( 197 array( "target_ext" => $image[3], 198 "image_name" => $image[2] . '.' . $image[3], 199 "max_width" => $image[4], 200 "max_height" => $image[5], 201 "thumb_name" => md5($image[2].$image[4].$image[5].$phpwcms["sharpen_level"].$crop), 202 'crop_image' => $crop 203 ) 204 ); 205 206 if($image[8]) { 207 208 $zoominfo = get_cached_image( 209 array( "target_ext" => $image[3], 210 "image_name" => $image[2] . '.' . $image[3], 211 "max_width" => $phpwcms["img_prev_width"], 212 "max_height" => $phpwcms["img_prev_height"], 213 "thumb_name" => md5($image[2].$phpwcms["img_prev_width"].$phpwcms["img_prev_height"].$phpwcms["sharpen_level"]) 214 ) 215 ); 216 217 if($zoominfo == false) $image[8] = 0; 218 219 } 220 221 $image_block = ''; 222 223 if($thumb_image != false) { 224 225 // read content image info 226 $image_border = ' border="'.intval($GLOBALS["template_default"]["article"]["image_border"]).'"'; 227 $image_imgclass = $GLOBALS["template_default"]["article"]["image_imgclass"]; 228 $image_imgclass = ($image_imgclass) ? ' class="'.$image_imgclass.'"' : ''; 229 $image_class = $GLOBALS["template_default"]["article"]["image_class"]; 230 $image_class = ($image_class) ? ' class="'.$image_class.'"' : ' class="imgClass"'; 231 $caption_class = $GLOBALS["template_default"]["article"]["image_caption_class"]; 232 $caption_class = ($caption_class) ? ' class="'.$caption_class.'"' : ' class="caption"'; 233 $capt_before = $GLOBALS["template_default"]["article"]["image_caption_before"]; 234 $capt_after = $GLOBALS["template_default"]["article"]["image_caption_after"]; 235 236 // image caption 237 $caption = getImageCaption(base64_decode($image[6])); 238 $caption[0] = html_specialchars($caption[0]); 239 $caption[3] = empty($caption[3]) ? '' : ' title="'.html_specialchars($caption[3]).'"'; //title 240 $caption[1] = empty($caption[1]) ? html_specialchars($image[1]) : html_specialchars($caption[1]); 241 242 // image source 243 $img = '<img src="'.PHPWCMS_IMAGES.$thumb_image[0].'" '.$thumb_image[3]; 244 $img .= $image_border.$image_imgclass.' alt="'.$caption[1].'"'.$caption[3].' />'; 245 246 $image_block .= '<div class="'.$classname.'">'; 247 248 if($image[8]) { 249 250 $open_popup_link = 'image_zoom.php?'.getClickZoomImageParameter($zoominfo[0].'?'.$zoominfo[3]); 251 $image_block .= '<div'.$image_class.">"; 252 if($caption[2][0]) { 253 $open_link = $caption[2][0]; 254 $return_false = ''; 255 } else { 256 $open_link = $open_popup_link; 257 $return_false = 'return false;'; 258 } 259 260 if(!$cnt_image_lightbox || $caption[2][0]) { 261 262 $image_block .= '<a href="'.$open_link."\" onclick=\"checkClickZoom();clickZoom('".$open_popup_link."','previewpic','width="; 263 $image_block .= $zoominfo[1].",height=".$zoominfo[2]."');".$return_false."\"".$caption[2][1].">"; 264 265 } else { 266 267 $image_block .= '<a href="'.PHPWCMS_IMAGES.$zoominfo[0].'" rel="lightbox"'; 268 if($caption[0]) { 269 $image_block .= ' title="'.parseLightboxCaption($caption[0]).'"'; 270 } 271 $image_block .= ' target="_blank">'; 272 273 } 274 $image_block .= $img.'</a></div>'; 275 276 } else { 277 278 $image_block .= '<div'.$image_class.">"; 279 if($caption[2][0]) { 280 281 $image_block .= '<a href="'.$caption[2][0].'"'.$caption[2][1].'>'.$img.'</a>'; 282 283 } else { 284 285 $image_block .= $img; 286 287 } 288 $image_block .= '</div>'; 289 } 290 if($caption[0] && empty($image['nocaption'])) { 291 $image_block .= '<p'.$caption_class.'>'.$capt_before.$caption[0]; 292 if($caption[4] !== '') { 293 $image_block .= ' <span class="copyright">'.html_specialchars($caption[4]).'</span>'; 294 } 295 $image_block .= $capt_after."</p>"; 296 } 297 298 $image_block .= "</div>"; 299 300 } 301 302 return $image_block; 303 } 304 305 function imagelisttable($imagelist, $rand="0:0:0:0", $align=0, $type=0) { 306 // build imagelist or ecard chooser table 307 // image: type = 0 308 // ecard: type = 1 309 $template_type = (!$type) ? 'imagelist' : 'ecard'; 310 311 if(empty($GLOBALS['cnt_image_lightbox'])) { 312 $lightbox = 0; 313 } else { 314 $lightbox = generic_string(5); 315 } 316 317 $caption_on = empty($imagelist['nocaption']) ? true : false; 318 $crop = empty($imagelist['crop']) ? 0 : 1; 319 320 $table_class = $GLOBALS["template_default"]["article"][$template_type."_table_class"]; 321 if($align) { 322 $table_class .= ' imgListTable'.ucfirst($align); 323 } 324 325 $table_class = ($table_class) ? ' class="'.$table_class.'"' : ''; 326 $table_bgcolor = $GLOBALS["template_default"]["article"][$template_type."_table_bgcolor"]; 327 $table_bgcolor = ($table_bgcolor) ? ' bgcolor="'.$table_bgcolor.'"' : ''; 328 $image_align = $GLOBALS["template_default"]["article"][$template_type."_align"]; 329 $image_align = ($image_align) ? ' align="'.$image_align.'"' : ''; 330 $image_valign = $GLOBALS["template_default"]["article"][$template_type."_valign"]; 331 $image_valign = ($image_valign) ? ' valign="'.$image_valign.'"' : ''; 332 $image_border = ' border="'.intval($GLOBALS["template_default"]["article"][$template_type."_border"]).'"'; 333 $image_imgclass = $GLOBALS["template_default"]["article"][$template_type."_imgclass"]; 334 $image_imgclass = ($image_imgclass) ? ' class="'.$image_imgclass.'"' : ''; 335 $image_class = $GLOBALS["template_default"]["article"][$template_type."_class"]; 336 $image_class = ($image_class) ? ' class="'.$image_class.'"' : ''; 337 $image_bgcolor = $GLOBALS["template_default"]["article"][$template_type."_bgcolor"]; 338 $image_bgcolor = ($image_bgcolor) ? ' bgcolor="'.$image_bgcolor.'"' : ''; 339 $caption_class = $GLOBALS["template_default"]["article"][$template_type."_caption_class"]; 340 $caption_class = ($caption_class) ? ' class="'.$caption_class.'"' : ''; 341 $caption_bgcolor= $GLOBALS["template_default"]["article"][$template_type."_caption_bgcolor"]; 342 $caption_bgcolor= ($caption_bgcolor) ? ' bgcolor="'.$caption_bgcolor.'"' : ''; 343 $caption_valign = $GLOBALS["template_default"]["article"][$template_type."_caption_valign"]; 344 $caption_valign = ($caption_valign) ? ' valign="'.$caption_valign.'"' : ''; 345 $caption_align = $GLOBALS["template_default"]["article"][$template_type."_caption_align"]; 346 $caption_align = ($caption_align) ? ' align="'.$caption_align.'"' : ''; 347 $capt_before = $GLOBALS["template_default"]["article"][$template_type."_caption_before"]; 348 $capt_after = $GLOBALS["template_default"]["article"][$template_type."_caption_after"]; 349 350 $align = (!$align) ? '' : ' align="'.$align.'"'; 351 $rand = explode(":", $rand); 352 if(count($rand)) { 353 foreach($rand as $key => $value) { 354 $rand[$key] = intval($value); 355 } 356 } else { 357 $rand = array(0,0,0,0); 358 } 359 $col_rand = ($rand[2] && $rand[3]) ? 2 : (($rand[2] || $rand[3]) ? 1 : 0 ); 360 361 if($count_images = count($imagelist['images'])) { 362 363 // select random image from image 364 if(!empty($imagelist['random'])){ 365 $random = array_rand($imagelist['images'], 1); 366 $imagelist['images'] = array( $imagelist['images'][ $random ] ); 367 } 368 369 //Tabelle starten 370 $table = LF.'<table border="0" cellspacing="0" width="10%" cellpadding="0"'.$align.$table_bgcolor.$table_class.' summary="">'.LF; 371 $x=0; 372 $y=0; 373 $z=0; 374 foreach($imagelist['images'] as $key => $value) { 375 376 $y++; 377 if($z && $x==1) { 378 if($col_space) { 379 $table .= LF.'<tr>'.LF.' <td'; 380 $table .= (($col_total>1)?" colspan=\"".$col_total."\"":""); 381 if(!empty($GLOBALS["template_default"]['article']['imagelist_spacerrow_class'])) { 382 $table .= ' class="'.$GLOBALS["template_default"]['article']['imagelist_spacerrow_class'].'">'; 383 $table .= spacer(1,1).'</td>'.LF.'</tr>'.LF; 384 } else { 385 $table .= '>'.spacer(1,$col_space).'</td>'.LF.'</tr>'.LF; 386 } 387 } 388 } 389 390 if(!$x) { 391 //Some default values 392 $col_space = $imagelist['space']; //Space between images 393 $col_count = $imagelist['col']; //columns 394 $col_total = $col_count + (($col_space)?($col_count-1):(0)) + $col_rand; 395 //Wenn oberer Rand definiert 396 if($rand[0]) { 397 $table .= '<tr>'.LF.' <td'.(($col_total>1)?' colspan="'.$col_total.'"':'').'>'.spacer(1,$rand[0]).'</td>'.LF.'</tr>'.LF; 398 } 399 $x=1; 400 } 401 if($x==1) { 402 403 // if left border 404 $table_tmp = ($rand[2]) ? ' <td width="'.$rand[2].'">'.spacer($rand[2],1).'</td>'.LF : ''; 405 406 //Neue Tabellenzeile 407 $capt_tmp = ''; 408 $capt_row = '<tr>'.LF.$table_tmp; 409 410 if($caption_on) { 411 $table .= $capt_row; 412 } else { 413 $table .= '<tr>'.LF; 414 } 415 416 } 417 //Aktuelle Bildspalte ausgeben 418 $table .= ' <td'.$image_align.$image_valign.$image_bgcolor.$image_class.'>'; 419 //width="'.$imagelist[$key]["w"].'" removed because no centered image possible 420 421 422 $thumb_image = get_cached_image( 423 array( "target_ext" => $imagelist['images'][$key][3], 424 "image_name" => $imagelist['images'][$key][2] . '.' . $imagelist['images'][$key][3], 425 "max_width" => $imagelist['images'][$key][4], 426 "max_height" => $imagelist['images'][$key][5], 427 "thumb_name" => md5( $imagelist['images'][$key][2].$imagelist['images'][$key][4]. 428 $imagelist['images'][$key][5].$GLOBALS['phpwcms']["sharpen_level"].$crop), 429 'crop_image' => $crop 430 ) 431 ); 432 433 if($imagelist['zoom']) { 434 435 $zoominfo = get_cached_image( 436 array( "target_ext" => $imagelist['images'][$key][3], 437 "image_name" => $imagelist['images'][$key][2] . '.' . $imagelist['images'][$key][3], 438 "max_width" => $GLOBALS['phpwcms']["img_prev_width"], 439 "max_height" => $GLOBALS['phpwcms']["img_prev_height"], 440 "thumb_name" => md5( $imagelist['images'][$key][2].$GLOBALS['phpwcms']["img_prev_width"]. 441 $GLOBALS['phpwcms']["img_prev_height"].$GLOBALS['phpwcms']["sharpen_level"] 442 ) 443 ) 444 ); 445 } 446 447 // now try to build caption and if neccessary add alt to image or set external link for image 448 $caption = getImageCaption($imagelist['images'][$key][6]); 449 // set caption and ALT Image Text for imagelist 450 $capt_cur = !$type ? html_specialchars($caption[0]) : $caption[0]; 451 $caption[3] = empty($caption[3]) ? '' : ' title="'.html_specialchars($caption[3]).'"'; //title 452 $caption[1] = empty($caption[1]) ? html_specialchars($imagelist['images'][$key][1]) : html_specialchars($caption[1]); 453 454 $list_img_temp = '<img src="'.PHPWCMS_IMAGES.$thumb_image[0].'" '.$thumb_image[3].$image_border.$image_imgclass; 455 $list_img_temp .= ' alt="'.$caption[1].'"'.$caption[3].' />'; 456 457 if($imagelist['zoom'] && isset($zoominfo) && $zoominfo != false) { 458 // if click enlarge the image 459 $open_popup_link = 'image_zoom.php?'.getClickZoomImageParameter($zoominfo[0].'?'.$zoominfo[3]); 460 if($caption[2][0]) { 461 $open_link = $caption[2][0]; 462 $return_false = ''; 463 } else { 464 $open_link = $open_popup_link; 465 $return_false = 'return false;'; 466 } 467 468 if(!$lightbox || $caption[2][0]) { 469 470 $table .= "<a href=\"".$open_link."\" onclick=\"checkClickZoom();clickZoom('".$open_popup_link."','previewpic','width="; 471 $table .= $zoominfo[1].",height=".$zoominfo[2]."');".$return_false.'"'.$caption[2][1].'>'; 472 473 } else { 474 475 // lightbox 476 $table .= '<a href="'.PHPWCMS_IMAGES.$zoominfo[0].'" rel="lightbox['.$lightbox.']"'; 477 if($capt_cur) { 478 $table .= ' title="'.parseLightboxCaption($capt_cur).'"'; 479 } 480 $table .= ' target="_blank">'; 481 482 } 483 484 $table .= $list_img_temp."</a>"; 485 } else { 486 // if not click enlarge 487 if($caption[2][0]) { 488 $table .= '<a href="'.$caption[2][0].'"'.$caption[2][1].'>'.$list_img_temp.'</a>'; 489 } else { 490 $table .= $list_img_temp; 491 } 492 } 493 $table .= '</td>'.LF; 494 495 $capt_tmp .= $capt_cur; 496 $capt_row .= ' <td'.$caption_valign.$caption_align.$caption_bgcolor.$caption_class.'>'.$capt_before.$capt_cur.$capt_after.'</td>'.LF; 497 498 499 //Gegenchecken wieviele Tabellenspalten als Rest bleiben und ergänzen 500 if($y == $count_images && $col_count > 1) { //wenn eigentlich alle Bilder durchlaufen sind 501 if ($col_space && $x<$col_count) { 502 $xct = ' <td>'.spacer($col_space,1).'</td>'.LF; 503 $table .= $xct; 504 $capt_row .= $xct; 505 } 506 $rest_image = (ceil($count_images / $col_count) * $col_count) - $count_images; 507 for ($i=1; $i <= $rest_image; $i++) { 508 $table .= ' <td> </td>'; 509 $capt_row .= ' <td> </td>'; 510 if($i < $rest_image) { 511 if($col_space) { 512 $xct = ' <td width="'.$col_space.'">'.spacer($col_space,1).'</td>'.LF; 513 $table .= $xct; 514 $capt_row .= $xct; 515 } 516 } 517 $x++; 518 } 519 } 520 521 if($x==$col_count) { //Wenn maximale Anzahl Bildspalten erreicht 522 $xct = ($rand[3]) ? '<td width="'.$rand[3].'">'.spacer($rand[3],1).'</td>'.LF : ''; 523 $table .= $xct; 524 $capt_row .= $xct; 525 $table .= "</tr>".LF; 526 $capt_row .= "</tr>".LF; 527 if($capt_tmp) { 528 if($caption_on) { 529 $table .= $capt_row; 530 } 531 $capt_row = ''; 532 $capt_tmp = ''; 533 } 534 $x=1; $z++; 535 } else { 536 $xct = ($col_space) ? ' <td width="'.$col_space.'">'.spacer($col_space,1).'</td>'.LF : ''; 537 $table .= $xct; 538 $capt_row .= $xct; 539 $x++; 540 } 541 } 542 543 if($rand[1]) { 544 $table .= '<tr>'.LF.' <td'.(($col_total>1)?" colspan=\"".$col_total."\"":"").">".spacer(1,$rand[1]).'</td>'.LF.'</tr>'.LF; 545 } 546 $table .= '</table>'.LF; 547 } 548 return $table; 549 } 550 551 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |