?? utildisplay.cpp
字號(hào):
#include "webemail.h"void cfgstatus() //displays basic configuration info{ passwd *info; cout << "content-type: text/plain" << endl; cout << "Pragma: no-cache" << endl << endl; cout << "Web Mail Config Status" << endl; cout << "Version: " << VER << endl; cout << "Executable name: " << EMAILPATH << endl; cout << endl; cout << "User ID: "; cout << getuid() << endl; info=getpwuid(getuid()); cout << "(" << info->pw_name << ")" << endl; cout << "User Group: "; cout << getgid() << endl << endl; cout << "Effective user id: "; cout << geteuid() << endl; info=getpwuid(geteuid()); cout << "(" << info->pw_name << ")" << endl; cout << "Effective Group: "; cout << getgid() << endl; cout << endl; cout << "#Defines" << endl; cout << "------------------------------" << endl; #ifdef HAS_SHADOW cout << "Using shadow passwords." << endl; #endif if (USEATTACHMENTS) cout << "Using UUencode attachments." << endl; if (USEQUOTAS) cout << "Using mail box quota: " << MAX_MBOX_SIZE << endl; if (USEEXTERNMAIL) cout << "Using Fetchmail." << endl; cout << "SendMailPath: " << SENDMAIL << endl; return;}void error(char *mes) //error messages{ cout << "Content-type: text/HTML" << endl; cout << "Pragma: no-cache" << endl << endl; cout << "<html>" << endl; cout << "<head>" << endl; cout << "<title>Web E-Mail</title>" << endl; cout << "<META HTTP-EQUIV=\"expires\" content=\"0\">" << endl; cout << "</head>" << endl; cout << "<body text=\"#000000\" bgcolor=\"#FFFFFF\" link=\"#0000EF\""; cout << " vlink=\"#0000EF\" alink=\"#FF0000\" background=/email/bg1.gif>" << endl; cout << " "; header(WEM_Error); cout << "<br>" << WEM_An_error_has_occurred; cout << WEM_Please_contact; cout << "<center>" << endl; cout << "<p><u><font color=\"#000000\">" << endl; cout << mes; cout << "</font></u></center>" << endl; cout << "<p>" << endl; tail(); cout << "</body>" << endl; cout << "</html>" << endl; exit(1); return;}void header(char title[500]){ cout << "<table CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH=\"100%\" NOSAVE>" << endl; cout << "<tr NOSAVE><td NOSAVE>" << endl; cout << "<b><font size=\"+4\">" << title << "</font></b>" << endl; cout << "<font size=-1> (" << globaluser << ")</font>" << endl; cout << "</td><td NOSAVE>" << endl; cout << "<div align=right>" << endl; cout << "< <a href=\"" << EMAILPATH << "\" TARGET=_top>" << WEM_Main << "</a> - "; cout << "<a href=\"" << EMAILPATH << "?write\" TARGET=_top>" << WEM_Compose << "</a> - "; cout << "<a href=\"" << EMAILPATH << "?book\" TARGET=_top>" << WEM_Address_Book << "</a> - "; cout << "<a href=\"" << EMAILPATH << "?about\" TARGET=_top>" << WEM_About << "</a> - "; cout << "<a href=\"" << EMAILPATH << "?reset\" TARGET=_top>" << WEM_Logout << "</a> >"; cout << "</div>" << endl; cout << "</td></tr></table><hr WIDTH=\"100%\">" << endl;}void tail(){ cout << "<hr WIDTH=\"100%\">" << endl; cout << "<br>" << WEM_Questions_or_comments_Refer_to; cout << "<a href=\"http://ashaw.dyn.cheapnet.net/webmail/support.html\">"; cout << "ashaw.dyn.cheapnet.net/webmail/support.html</a>" << endl;}void about(){ cout << "Content-type: text/HTML" << endl; cout << "Pragma: no-cache" << endl << endl; cout << "<html>" << endl; cout << "<head>" << endl; cout << "<title>Web E-Mail</title>" << endl; cout << "<meta http-equiv=\"expires\" content=\"0\">" << endl; cout << "</head>" << endl; cout << "<body text=\"#000000\" bgcolor=\"#FFFFFF\" link=\"#0000EF\" vlink=\"#0000EF\" alink=\"#FF0000\" background=/email/bg1.gif>"; header("About"); cout << "<center><font size=+2>Web E-Mail " << VER << "</font>" << endl; cout << "<p>Written by Andrew Shaw. See README for license information."; cout << "<p>Copyright © 1999 Andrew Shaw, All rights reserved.</center>"; tail(); cout << "</body>" << endl; cout << "</html>" << endl; return;}//busts up html tags to prevent js attacksvoid distroytag(char *data, char *tag){ int i = 0; while (data[i] != '\0') { if (strncasecmp(data+i, tag, strlen(tag)) == 0) data[i] = '*'; i++; }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -