Source for funcs.cpp

This document shows the contents of funcs.cpp if you are starting the tutorial in Part 6. Managing Configuration Files or subsequent parts.

#include <istring.hpp>
IString Unauthorized(IString Function) {
   return Error("Unauthorized Access",
      "You do not have sufficient authority to access the "
      +Function
      +" function.");
}

IString Error(IString Title, IString Text) {
   return "<html><head><title>"
          +Title
          +"</title></head><body bgcolor=\"#FFFFFF\"><p><h3>"
          +Title
          +"</h3><p>"
          +Text
          +"</p></body></html>";
}

IString ReadFile(IString Path) {
   ifstream In(Path);
   if (!In) return "";
   return IString::lineFrom(In,EOF);
}