// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wLogoutStartView: // The auth view. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wStrBuf.h" #include "p4wHtml.h" #include "p4wView.h" #include "p4wLogoutStartView.h" // // ------------------------------------- // Constructors and destructor. // p4wLogoutStartView::p4wLogoutStartView(p4wRequest & Request) : p4wView(Request) { } p4wLogoutStartView::~p4wLogoutStartView() { } // ------------------------------------- // Render this view. // void p4wLogoutStartView::Render() { // // Generate the HTTP header for an authentication failure p4wHtml htm; StrBuf url; StrBufDict args; args.SetVar( "pw", "" ); htm.httpHeader( 200 ); htm.serverId(); htm.contentType( "text/html", 1 ); // // Include p4web-style features, like the BASE and links // without underlines htm.beginHeader( 0 ); htm.title( "P4Web - Logging Out" ); htm << "<META http-equiv=\"Refresh\" content=\"1; URL="; fRequest.ConstructSafeURL( url, fRequest.GetURL().Text(), AC_LOGOUT2, &args ); htm << url.Text(); htm << "\">\n"; htm.styleSheet(&fRequest); htm.base( p4wStrBuf().NormalizeBase( fRequest.GetBase() ).Text(), fRequest.IsHTTPS() ); htm.endHeader( fRequest.GetHTTPPort().Text(), fRequest.IsHTTPS() ); // // Generate the instructions to the user htm.beginBody( "#ffffff", "#0000cc", "#0000cc", 0,0,0,0, "onLoad", "document.execCommand('ClearAuthenticationCache')" ); htm.header( "Logging you out of Perforce..." ); htm.text( "When your browser's Login dialog appears," ); htm.linebreak(); if( fRequest.GetJavascriptMode() != 2 && !strstr(fRequest.GetUserAgent().Text(), "Opera")) htm.text( "click the Cancel button to complete the logout process." ); else htm.text( "enter an INVALID password to complete the logout process." ); htm.linebreak(); htm.linebreak(); // // Include a link in case the META Refresh tag above doesn't work fRequest.ConstructSafeURL( url, fRequest.GetURL().Text(), AC_LOGOUT2, &args ); htm.text( "If your browser's Login dialog does not automatically appear," ); htm.linebreak(); htm.text( "click [" ); htm.beginLink( url.Text() ); htm.text( "here" ); htm.endLink(); htm.text( "] to complete the logout process." ); htm.linebreak(); htm.linebreak(); // Tell the user he cannot use the current login dialog to log back in htm.text( "(You cannot use the browser's login dialog to log back in at this time;" ); htm.linebreak(); htm.text( "you must Cancel the dialog to complete the log process before you can log back in.)" ); htm.endBody(); // // Write out the page fRequest << htm; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Views/p4wLogoutStartView.cpp | |||||
#2 | 10416 | Lester Cheung | Using HTTPS for favicon when option -ss (HTTPS mode) is used. | ||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |