buildpathpage.cpp

来自「exam3 ssd5的」· C++ 代码 · 共 42 行

CPP
42
字号
#pragma warning(disable:4786)

#include <sstream>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <signal.h>
#include <stdio.h>

#include "main.h"
#include "buildpage.h"
#include "buildpathpage.h"
#include "Client.h"
#include "Shortest.h"

using namespace std;

void buildpathpage (ostringstream &oss, int port, 
                    vector<string>& events) {

 	in_addr ip;
	ip = getIP();

	displayPageHeader(oss);

	oss << "<P>" << endl;
	oss << "<FORM ACTION=" << CLASSIFIED_CGI << " METHOD=POST>" << endl;
	oss << "<INPUT NAME=PORT TYPE=hidden VALUE=" << port << ">" << endl;
	oss << "<INPUT NAME=IP TYPE=hidden VALUE=" << inet_ntoa(ip) << ">" << endl;

	vector<string>::iterator it;
	for (it = events.begin(); it != events.end(); it++) {
		oss << *it << "<br>" << endl;
	}

	oss << "<INPUT NAME=COMMAND TYPE=submit VALUE=\"Continue\">" << endl;
	oss << "</FORM>" << "<BR>" << endl;
     
	oss << "</BODY>" << endl;
	oss << "</HTML>" << endl;

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?