- StringFunctions::Convert(portstr,port);\r
-\r
- std::string aclstr;\r
- Option::Instance()->Get("HTTPAccessControl",aclstr);\r
-\r
- // set template\r
- templatestr="<html><head></head><body><a href=\"home.htm\">Home</a><br><h1>Could not find template.htm! Place in program directory and restart!</h1><br>[CONTENT]</body></html>";\r
- FILE *infile=fopen("template.htm","r+b");\r
- if(infile)\r
- {\r
- fseek(infile,0,SEEK_END);\r
- long len=ftell(infile);\r
- std::vector<char> data(len,0);\r
- fseek(infile,0,SEEK_SET);\r
- fread(&data[0],1,len,infile);\r
- fclose(infile);\r
- templatestr.assign(data.begin(),data.end());\r
- }\r
- else\r
- {\r
- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"HTTPThread::HTTPThread could not open template.htm");\r
- }\r