/* Define o limite de tempo do cache em 5 minutos */
session_cache_expire (5);
session_start();
...
?>
é isso ai!!! até mais
|

sergioamim hasn't added any friends yet.
01/01/2004, 04:59
01/01/2004, 04:36
26/12/2003, 13:02
22/12/2003, 14:04
22/12/2003, 14:03
class CWebBrowserPrint { public: enum Orientation { OrientationUndefined, OrientationPortrait, OrientationLandscape }; enum PrintRange { PrintRangeUndefined, PrintRangeAll, PrintRangePages, PrintRangeSelection }; enum PrintFrames { PrintFramesUndefined, PrintFramesScreen, PrintFramesSelected, PrintFramesIndividually }; void SetWebBrowser(IWebBrowser2* pWebBrowser); bool Print(); bool ReadDlgSettings(); CString GetPrinterName(ULONG lIndex); ULONG GetPrinterCount(); CStrin GetDefaultPrinterName(); // Page Setup dialog settings CString m_sPaperSize; CString m_sPaperSource; CString m_sHeader; CString m_sFooter; Orientation m_Orientation; float m_fLeftMargin; float m_fTopMargin; float m_fRightMargin; float m_fBottomMargin; // Print dialog settings CString m_sPrinterName; bool m_bPrintToFile; PrintRange m_PrintRange; ULONG m_lPrintRangePagesFrom; ULONG m_lPrintRangePagesTo; ULONG m_lCopies; bool m_bCollate; PrintFrames m_PrintFrames; bool m_bPrintLinks; bool m_bPrintLinkTable; };
CWebBrowserPrint wbp; if (_tcslen(wbp.GetDefaultPrinterName())) { wbp.SetWebBrowser(pWebBrowser); wbp.ReadDlgSettings(); wbp.m_sHeader = _T("My Header"); wbp.m_Orientation = CWebBrowserPrint::Landscape; wbp.Print(); }
<HTML> <HEAD> <OBJECT ID="wbp" CLASSID="CLSID:778C58A9-81B6-11D3-BB8F-00C04FA3471C"> </OBJECT> <script LANGUAGE="VBScript"> Sub Print() If Len(wbp.DefaultPrinterName) = 0 Then MsgBox "No default printer!" Exit Sub End If wbp.Header = "My Header" wbp.Orientation = 2 ' Landscape wbp.Print End Sub </SCRIPT> </HEAD> <BODY> <INPUT TYPE="BUTTON" VALUE="Print" ONCLICK="Print()"> </BODY> </HTML>Note that there is no need to call SetWebBrowser or ReadDlgSettings when using this control on a Web page, because the control can obtain this information on its own. However, SetWebBrowser is exposed so you can set the reference when hosting the WebBrowser control in your own application.
Community Forum Software by IP.Board
Licensed to: Webmasters Online