function PrintIcon($link = '', $use_icon = true, $add_text = '') { global $VM_LANG, $mosConfig_live_site, $mosConfig_absolute_path, $cur_template, $Itemid; if (@VM_SHOW_PRINTICON == '1') { if (!$link) { $query_string = str_replace('only_page=1', 'only_page=0', vmAmpReplace(vmGet($_SERVER, 'QUERY_STRING'))); $link = 'index2.php?' . $query_string . '&pop=1' . (vmIsJoomla('1.5') ? '&tmpl=component' : ''); } // checks template image directory for image, if non found default are loaded if ($use_icon) { $text = vmCommonHTML::ImageCheck('printButton.png', '/images/M_images/', NULL, NULL, $VM_LANG->_('CMN_PRINT'), $VM_LANG->_('CMN_PRINT')); $text .= shopMakeHtmlSafe($add_text); } else { $text = '| ' . $VM_LANG->_('CMN_PRINT') . ' |'; } $isPopup = vmGet($_GET, 'pop'); if ($isPopup) { // Print Preview button - used when viewing page $html = '<span class="vmNoPrint"> <a href="javascript:void(0)" onclick="javascript:window.print(); return false;" title="' . $VM_LANG->_('CMN_PRINT') . '"> ' . $text . ' </a></span>'; return $html; } else { // Print Button - used in pop-up window return vmPopupLink($link, $text, 640, 480, '_blank', $VM_LANG->_('CMN_PRINT')); } } }