477 { |
477 { |
478 global $db, $session, $paths, $template, $plugins; // Common objects |
478 global $db, $session, $paths, $template, $plugins; // Common objects |
479 global $lang; |
479 global $lang; |
480 global $email; |
480 global $email; |
481 |
481 |
482 // IE PNG fixing code |
|
483 if ( isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) |
|
484 { |
|
485 $this->add_header(' |
|
486 <!--[if lt IE 7]> |
|
487 <script language="JavaScript"> |
|
488 function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. |
|
489 { |
|
490 var arVersion = navigator.appVersion.split("MSIE"); |
|
491 var version = parseFloat(arVersion[1]); |
|
492 if (version >= 5.5 && typeof(document.body.filters) == "object") |
|
493 { |
|
494 for(var i=0; i<document.images.length; i++) |
|
495 { |
|
496 var img = document.images[i]; |
|
497 continue; |
|
498 var imgName = img.src.toUpperCase(); |
|
499 if (imgName.substring(imgName.length-3, imgName.length) == "PNG") |
|
500 { |
|
501 var imgID = (img.id) ? "id=\'" + img.id + "\' " : ""; |
|
502 var imgClass = (img.className) ? "class=\'" + img.className + "\' " : ""; |
|
503 var imgTitle = (img.title) ? "title=\'" + img.title + "\' " : "title=\'" + img.alt + "\' "; |
|
504 var imgStyle = "display:inline-block;" + img.style.cssText; |
|
505 if (img.align == "left") imgStyle = "float:left;" + imgStyle; |
|
506 if (img.align == "right") imgStyle = "float:right;" + imgStyle; |
|
507 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle; |
|
508 var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\\\'" + img.src + "\\\', sizingMethod=\'scale\');\\"></span>"; |
|
509 img.outerHTML = strNewHTML; |
|
510 i = i-1; |
|
511 } |
|
512 } |
|
513 } |
|
514 } |
|
515 window.attachEvent("onload", correctPNG); |
|
516 </script> |
|
517 <![endif]--> |
|
518 '); |
|
519 } |
|
520 |
|
521 $is_opera = (isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'Opera')) ? true : false; |
482 $is_opera = (isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'Opera')) ? true : false; |
522 $is_msie = (isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) ? true : false; |
483 $is_msie = (isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) ? true : false; |
523 |
484 |
524 $this->assign_bool(array( |
485 $this->assign_bool(array( |
525 'auth_admin' => $session->user_level >= USER_LEVEL_ADMIN ? true : false, |
486 'auth_admin' => $session->user_level >= USER_LEVEL_ADMIN ? true : false, |