X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fprinter_friendly_main.php;h=8c0c03d6e4d522e013beeb0eece54a562e188504;hb=74b80a5157e8170c7dce66a92f607d4bb6550cb9;hp=4d5a703b1d1dd3fcb3825689e467bfbe7ace3ba7;hpb=e2da1d80467aa6f6b68803733869c3c6b367ea89;p=squirrelmail.git diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php index 4d5a703b..8c0c03d6 100644 --- a/src/printer_friendly_main.php +++ b/src/printer_friendly_main.php @@ -3,42 +3,43 @@ /** * printer_friendly frameset * - * @copyright (c) 1999-2005 The SquirrelMail Project Team + * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail */ +/** This is the printer_friendly_main page */ +define('PAGE_NAME', 'printer_friendly_main'); + /** - * Path for SquirrelMail required files. - * @ignore + * Include the SquirrelMail initialization file. */ -define('SM_PATH','../'); - -/* SquirrelMail required files. */ -require_once(SM_PATH . 'include/validate.php'); +include('../include/init.php'); /* get those globals into gear */ -global $color; if ( ! sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_GET)) $passed_ent_id = 0; if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || ! sqgetGlobalVar('passed_id',$passed_id,SQ_GET)) { - error_box(_("Invalid URL"),$color); + error_box(_("Invalid URL")); } else { $passed_id= (int) $passed_id; $view_unsafe_images = (bool) $_GET['view_unsafe_images']; + sqgetGlobalVar('show_html_default', $show_html_default, SQ_FORM); /* end globals */ displayHtmlHeader( _("Printer Friendly"), '', false, true ); - echo '' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo "\n"; + + $oErrorHandler->setDelayedErrors(true); + + $url = 'printer_friendly_bottom.php?passed_ent_id=' . + urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) . + '&passed_id=' . $passed_id . + '&view_unsafe_images='.$view_unsafe_images . + '&show_html_default='.$show_html_default; + + $oTemplate->assign('printer_friendly_url', $url); + + $oTemplate->display('printer_friendly_main.tpl'); + } -?> - \ No newline at end of file