// // Prints out a page indicating a particular error has occured. The // particular error messages printed depend on the CLIENT object properties // lpMsg1, lpMsg2 and lpMsg3 // if (project.dbconnected == 0) { write("

Error: failed to connect to database.

"); } else { if (project.register == 0) { write("

Error: registerNativeFunction() failed.

"); } else { // If lpErrno == 1, the error was generated by PrintFmtErr(). // if (client.lpErrno == 1) { write("

Error: ", client.lpErrTitle, "

\n"); write("

", client.lpErrMsg,"
\n"); write("

"); if (project.apptype == "admin") write("Return to Administration"); else write("Return to the purchase form"); write("


"); } // If lpErrno == 2, the error was generated by PrintError(). // if (client.lpErrno == 2) { write("

Error: ", client.lpErrTitle, "

\n"); write("

", client.lpErrMsg,"\n"); write("

"); if (project.apptype == "admin") write("Return to Administration"); else write("Return to the purchase form"); write("


"); } client.lpErrno = 0; // reset the error values client.lpErrTitle = ""; client.lpErrMsg = ""; client.lpErrLink = ""; } }