Changeset 200


Ignore:
Timestamp:
1999-03-11T13:12:30+13:00 (25 years ago)
Author:
rjmcnab
Message:

Started using status.dm to handle the bulky text. Made the status
action use frames and added some more information.

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/statusaction.cpp

    r197 r200  
    1212/*
    1313   $Log$
     14   Revision 1.8  1999/03/11 00:12:30  rjmcnab
     15   Started using status.dm to handle the bulky text. Made the status
     16   action use frames and added some more information.
     17
    1418   Revision 1.7  1999/03/09 21:00:47  rjmcnab
    1519   Reorganised the statusaction, added more functions to comtypes.
     
    4650
    4751
    48 void statusaction::output_generalinfo (cgiargsclass &/*args*/, displayclass &/*disp*/,
     52void statusaction::output_frameset (cgiargsclass &/*args*/, displayclass &disp,
     53                    outconvertclass &outconvert,
     54                    ostream &textout, ostream &/*logout*/) {
     55  textout << outconvert << disp << "_status:frameset_\n";
     56}
     57
     58void statusaction::output_select (cgiargsclass &/*args*/, displayclass &disp,
     59                  outconvertclass &outconvert,
     60                  ostream &textout, ostream &/*logout*/) {
     61  textout << outconvert << disp << "_status:header_(selector)\n"
     62    "_status:select_\n"
     63    "_status:footer_\n";
     64}
     65
     66void statusaction::output_generalinfo (cgiargsclass &/*args*/, displayclass &disp,
    4967                       outconvertclass &outconvert,
    5068                       ostream &textout, ostream &/*logout*/) {
     69  if (recpt == NULL) return;
    5170  const recptconf &rcinfo = recpt->get_configinfo ();
    5271 
    53   textout << outconvert << "<table>\n";
    54   textout << outconvert << "<tr valign=top><th>gsdlhome</th><td>\"" << rcinfo.gsdlhome
     72  textout << outconvert << disp << "_status:header_(General Information)\n";
     73  textout << outconvert
     74      << "<h2>General information</h2>\n"
     75      << "<table>\n"
     76      << "<tr valign=top><th>gsdlhome</th><td>\"" << rcinfo.gsdlhome
     77      << "\"</td></tr>\n"
     78      << "<tr valign=top><th>collection</th><td>\"" << rcinfo.collection
     79      << "\"</td></tr>\n"
     80      << "<tr valign=top><th>collectdir</th><td>\"" << rcinfo.collectdir
     81      << "\"</td></tr>\n"
     82      << "<tr valign=top><th>httpimg</th><td>\"" << rcinfo.httpimg
     83      << "\"</td></tr>\n"
     84      << "<tr valign=top><th>gwcgi</th><td>\"" << rcinfo.gwcgi
    5585      << "\"</td></tr>\n";
    56   textout << outconvert << "<tr valign=top><th>collection</th><td>\"" << rcinfo.collection
    57       << "\"</td></tr>\n";
    58   textout << outconvert << "<tr valign=top><th>collectdir</th><td>\"" << rcinfo.collectdir
    59       << "\"</td></tr>\n";
    60   textout << outconvert << "<tr valign=top><th>httpimg</th><td>\"" << rcinfo.httpimg
    61       << "\"</td></tr>\n";
    62   textout << outconvert << "<tr valign=top><th>gwcgi</th><td>\"" << rcinfo.gwcgi
    63       << "\"</td></tr>\n";
    64  
    65  
     86   
    6687  // macrofiles
    6788  textout << outconvert << "<tr valign=top><th>macrofiles</th><td>";
     
    158179  }
    159180 
    160  
    161   textout << outconvert
    162       << "</table>\n";
    163 }
    164 
    165 void statusaction::output_argumentinfo (cgiargsclass &args, displayclass &/*disp*/,
     181  textout << outconvert << disp << "</table>\n_status:footer_\n";
     182}
     183
     184void statusaction::output_argumentinfo (cgiargsclass &args, displayclass &disp,
    166185                    outconvertclass &outconvert,
    167186                    ostream &textout, ostream &/*logout*/) {
     187  if (recpt == NULL) return;
    168188  cgiargsinfoclass *rcargsinfo = recpt->get_cgiargsinfo_ptr ();
    169189
     190  textout << outconvert << disp << "_status:header_(Argument Information)\n";
    170191  textout << outconvert
    171192      << "<h2>Argument information</h2>\n"
     
    214235  }
    215236 
    216   textout << outconvert
    217       << "</table>\n";
    218 }
    219 
    220 void statusaction::output_actioninfo (cgiargsclass &/*args*/, displayclass &/*disp*/,
     237  textout << outconvert << disp << "</table>\n_status:footer_\n";
     238}
     239
     240void statusaction::output_actioninfo (cgiargsclass &/*args*/, displayclass &disp,
    221241                      outconvertclass &outconvert,
    222242                      ostream &textout, ostream &/*logout*/) {
     243  if (recpt == NULL) return;
    223244  actionmapclass *actions = recpt->get_actionmap_ptr();
    224245
     246  textout << outconvert << disp << "_status:header_(Action Information)\n";
    225247  textout << outconvert
    226248      << "<h2>Action information</h2>\n"
     
    258280  }
    259281 
     282  textout << outconvert << disp << "</table>\n_status:footer_\n";
     283}
     284
     285void statusaction::output_protocolinfo (cgiargsclass &/*args*/, displayclass &disp,
     286                    outconvertclass &outconvert,
     287                    ostream &textout, ostream &logout) {
     288  if (recpt == NULL) return;
     289  const recptconf &rcinfo = recpt->get_configinfo ();
     290  bool colspecific = !rcinfo.collection.empty();
     291  bool unreachablecol = false;
     292
     293  recptprotolistclass *rprotolist = recpt->get_recptprotolist_ptr ();
     294  if (rprotolist == NULL) return;
     295
     296  textout << outconvert << disp << "_status:header_(Protocol Information)\n";
     297  textout << outconvert
     298      << "<h2>Protocol information</h2>\n"
     299      << "<table>\n"
     300      << "<tr><th>protocol</th><th>collections</th></tr>\n";
     301
     302  text_t protoname;
     303  recptprotolistclass::iterator rprotolist_here = rprotolist->begin();
     304  recptprotolistclass::iterator rprotolist_end = rprotolist->end();
     305  while (rprotolist_here != rprotolist_end) {
     306    if ((*rprotolist_here).p != NULL) {
     307      protoname = (*rprotolist_here).p->get_protocol_name();
     308      textout << outconvert
     309          << "<tr><td>"
     310          << protoname
     311          << "</td><td>";
     312
     313      text_tarray collist;
     314      comerror_t err;
     315      (*rprotolist_here).p->get_collection_list (collist, err, logout);
     316      if (err == noError) {
     317    text_tarray::iterator collist_here = collist.begin();
     318    text_tarray::iterator collist_end = collist.end();
     319    bool first = true;
     320    while (collist_here != collist_end) {
     321      if (!first) textout << outconvert << ", ";
     322      first = false;
     323
     324      if (colspecific && *collist_here != rcinfo.collection) {
     325        unreachablecol = true;
     326        textout << outconvert << "\"" << *collist_here << "\"";
     327      } else {
     328        textout << outconvert << disp
     329            << "\"<a href=\"_gwcgi_?a=status&sp=collectioninfo&pr="
     330            << protoname
     331            << "&c="
     332            << *collist_here
     333            << "\">"
     334            << *collist_here
     335            << "</a>\"";
     336      }
     337
     338      collist_here++;
     339    }
     340
     341      } else {
     342    textout << outconvert << "Error (" << get_comerror_string (err)
     343        << ") while getting collect list\n";
     344      }
     345
     346      textout << outconvert
     347          << "</td></tr>\n";
     348    }
     349
     350    rprotolist_here++;
     351  }
     352
    260353  textout << outconvert << "</table>\n";
    261 }
    262 
    263 void statusaction::output_protocolinfo (cgiargsclass &/*args*/, displayclass &/*disp*/,
    264                     outconvertclass &/*outconvert*/,
    265                     ostream &/*textout*/, ostream &/*logout*/) {
    266 }
    267 
    268 void statusaction::output_collectioninfo (cgiargsclass &/*args*/, displayclass &/*disp*/,
    269                       outconvertclass &/*outconvert*/,
    270                       ostream &/*textout*/, ostream &/*logout*/) {
    271 }
    272 
    273 void statusaction::output_initlog (cgiargsclass &/*args*/, displayclass &/*disp*/,
     354  if (unreachablecol) {
     355    textout << outconvert
     356        << "<b>Warning:</b> the receptionist is running in collection specific\n"
     357        << "mode making some of the collections unreachable.\n";
     358  }
     359  textout << outconvert << disp << "_status:footer_\n";
     360}
     361
     362void statusaction::output_collectioninfo (cgiargsclass &args, displayclass &disp,
     363                      outconvertclass &outconvert,
     364                      ostream &textout, ostream &logout) {
     365  if (recpt == NULL) return;
     366
     367  textout << outconvert << disp << "_status:header_(Collection info)\n";
     368  textout << outconvert << "<h2>Collection info</h2>\n";
     369
     370  // get the list of protocols
     371  recptprotolistclass *rprotolist = recpt->get_recptprotolist_ptr ();
     372  if (rprotolist == NULL) return;
     373
     374  // look for the desired protocol
     375  text_t &arg_pr = args["pr"];
     376  text_t &arg_c = args["c"];
     377  recptproto *rproto;
     378  recptprotolistclass::iterator rprotolist_here = rprotolist->begin();
     379  recptprotolistclass::iterator rprotolist_end = rprotolist->end();
     380  while (rprotolist_here != rprotolist_end) {
     381    rproto = (*rprotolist_here).p;
     382    if (rproto != NULL && rproto->get_protocol_name() == arg_pr) {
     383      // see if the protocol has the collection
     384      bool hascollection;
     385      comerror_t err;
     386      rproto->has_collection (arg_c, hascollection, err, logout);
     387      if (err == noError && hascollection) break;
     388    }
     389    rprotolist_here++;
     390  }
     391 
     392  if (rprotolist_here == rprotolist_end) {
     393    textout << outconvert << "Protocol \"" << arg_pr << "\" with collection \""
     394        << arg_c << "\" was not found\n";
     395
     396  } else {
     397    ColInfoResponse_t collectinfo;
     398    comerror_t err;
     399
     400    rproto->get_collectinfo (arg_c, collectinfo, err, logout);
     401    if (err == noError) {
     402      textout << outconvert << "<table>\n"
     403          << "<tr><th>collection name</th><td>\""
     404          << collectinfo.shortInfo.name
     405          << "\"</td></tr>\n"
     406
     407          << "<tr><th>host</th><td>\""
     408          << collectinfo.shortInfo.host
     409          << "\"</td></tr>\n"
     410
     411          << "<tr><th>port</th><td>\""
     412          << collectinfo.shortInfo.port
     413          << "\"</td></tr>\n"
     414
     415          << "<tr><th>is public?</th><td>\"";
     416      if (collectinfo.isPublic) textout << outconvert << "true";
     417      else textout << outconvert << "false";
     418      textout << outconvert
     419          << "\"</td></tr>\n"
     420
     421          << "<tr><th>is beta?</th><td>\"";
     422      if (collectinfo.isBeta) textout << outconvert << "true";
     423      else textout << outconvert << "false";
     424      textout << outconvert
     425          << "\"</td></tr>\n"
     426
     427          << "<tr><th>build date</th><td>\""
     428          << collectinfo.buildDate
     429          << "\"</td></tr>\n"
     430
     431          << "<tr><th>interface languages</th><td>";
     432      text_tarray::iterator languages_here = collectinfo.languages.begin();
     433      text_tarray::iterator languages_end = collectinfo.languages.end();
     434      bool languages_first = true;
     435      while (languages_here != languages_end) {
     436    if (!languages_first) textout << outconvert << ", ";
     437    languages_first = false;
     438    textout << outconvert << "\"" << *languages_here << "\"";
     439    languages_here++;
     440      }
     441      textout << outconvert
     442          << "</td></tr>\n"
     443
     444          << "<tr><th>number of documents</th><td>\""
     445          << collectinfo.numDocs
     446          << "\"</td></tr>\n"
     447
     448          << "<tr><th>number of words</th><td>\""
     449          << collectinfo.numWords
     450          << "\"</td></tr>\n"
     451
     452          << "<tr><th>number of bytes</th><td>\""
     453          << collectinfo.numBytes
     454          << "\"</td></tr>\n"
     455
     456          << "</table>";
     457     
     458    } else {
     459      textout << outconvert << "Error (" << get_comerror_string (err)
     460          << ") while getting collect information\n";
     461    }
     462
     463    textout << outconvert << "<hr>\n"
     464        << "<h3>Metadata options</h3>\n";
     465
     466    MetadataInfoResponse_t metainfo;
     467    rproto->get_metadataoptions (arg_c, metainfo, err, logout);
     468    if (err == noError) {
     469      textout << outconvert
     470          << "<table>\n"
     471          << "<tr><th>supported fields</th><td>";
     472      text_tset::iterator sup_here = metainfo.supportedFields.begin();
     473      text_tset::iterator sup_end = metainfo.supportedFields.end();
     474      bool sup_first = true;
     475      while (sup_here != sup_end) {
     476    if (!sup_first) textout << outconvert << ", ";
     477    sup_first = false;
     478    textout << outconvert << "\"" << *sup_here << "\"";
     479    sup_here++;
     480      }
     481      textout << outconvert << "</td></tr>\n"
     482   
     483          << "<tr><th>supported languages</th><td>";
     484      sup_here = metainfo.supportedLanguages.begin();
     485      sup_end = metainfo.supportedLanguages.end();
     486      sup_first = true;
     487      while (sup_here != sup_end) {
     488    if (!sup_first) textout << outconvert << ", ";
     489    sup_first = false;
     490    textout << outconvert << "\"" << *sup_here << "\"";
     491    sup_here++;
     492      }
     493      textout << outconvert << "</td></tr>\n"
     494          << "</table>\n";
     495
     496    } else {
     497      textout << outconvert << "Error (" << get_comerror_string (err)
     498          << ") while getting metadata information\n";
     499    }
     500
     501    textout << outconvert << "<hr>\n";
     502
     503    InfoFilterOptionsResponse_t filterinfo;
     504    rproto->get_filteroptions (arg_c, filterinfo, err, logout);
     505    if (err == noError) {
     506      FilterDescript_tmap::iterator filter_here =
     507    filterinfo.filterOptions.begin();
     508      FilterDescript_tmap::iterator filter_end =
     509    filterinfo.filterOptions.end();
     510      while (filter_here != filter_end) {
     511    textout << outconvert
     512        << "<h3>Filter options for \"" << (*filter_here).first << "\"</h3>\n"
     513        << "<table>\n"
     514        << "<tr><th>option name</th><th>type</th><th>repeatable</th>"
     515        << "<th>default value</th><th>valid values</th></tr>\n";
     516
     517    FilterOption_tmap::iterator filteropt_here =
     518      (*filter_here).second.filterOptions.begin();
     519    FilterOption_tmap::iterator filteropt_end =
     520      (*filter_here).second.filterOptions.end();
     521    while (filteropt_here != filteropt_end) {
     522      textout << outconvert
     523          << "<tr><td>\""
     524          << (*filteropt_here).second.name
     525          << "\"</td>\n"
     526
     527          << "<td>\"";
     528      text_t type_string;
     529      switch ((*filteropt_here).second.type) {
     530      case FilterOption_t::booleant: type_string = "boolean"; break;
     531      case FilterOption_t::integert: type_string = "integer"; break;
     532      case FilterOption_t::enumeratedt: type_string = "enumerated"; break;
     533      case FilterOption_t::stringt: type_string = "stringt"; break;
     534      }
     535      textout << outconvert
     536          << type_string
     537          << "\"</td>\n"
     538       
     539          << "<td>\"";
     540      text_t repeat_string;
     541      switch ((*filteropt_here).second.repeatable) {
     542      case FilterOption_t::onePerQuery: repeat_string = "one per query"; break;
     543      case FilterOption_t::onePerTerm: repeat_string = "one per term"; break;
     544      case FilterOption_t::nPerTerm: repeat_string = "n per term"; break;
     545      }
     546      textout << outconvert
     547          << repeat_string
     548          << "\"</td>\n"
     549       
     550          << "<td>\""
     551          << (*filteropt_here).second.defaultValue
     552          << "\"</td>\n"
     553
     554          << "<td>";
     555
     556      text_tarray::iterator valid_here =
     557        (*filteropt_here).second.validValues.begin();
     558      text_tarray::iterator valid_end =
     559        (*filteropt_here).second.validValues.end();
     560      bool valid_first = true;
     561      while (valid_here != valid_end) {
     562        if (!valid_first) textout << outconvert << ", ";
     563        valid_first = false;
     564        textout << outconvert << "\"" << *valid_here << "\"";
     565        valid_here++;
     566      }
     567      textout << outconvert
     568          << "</td></tr>\n";
     569
     570      filteropt_here++;
     571    }
     572
     573    textout << outconvert
     574        << "</table>\n";
     575
     576    filter_here++;
     577      }
     578
     579    } else {
     580      textout << outconvert << "Error (" << get_comerror_string (err)
     581          << ") while getting filter option information\n";
     582    }
     583  }
     584 
     585  textout << outconvert << disp << "_status:footer_\n";
     586}
     587
     588void statusaction::output_initlog (cgiargsclass &/*args*/, displayclass &disp,
    274589                   outconvertclass &outconvert,
    275590                   ostream &textout, ostream &/*logout*/) {
     591  textout << outconvert << disp << "_status:header_(Init log)\n";
     592  textout << outconvert << "<h2>Init log</h2>\n";
     593
    276594  ifstream initin (GSDL_GSDLHOME "/etc/initout.txt");
    277595  if (initin) {
    278     textout << outconvert << "<p>The initialisation error log, " GSDL_GSDLHOME "/etc/initout.txt, contains the\n";
     596    textout << outconvert << "<p>The initialisation error log, "
     597      GSDL_GSDLHOME "/etc/initout.txt, contains the\n";
    279598    textout << outconvert << "following information:\n\n";
    280599    text_t errorpage = "<p><pre>\n";
     
    294613    textout << outconvert << "Couldn't read initialisation error log, " GSDL_GSDLHOME "/etc/initout.txt.\n";
    295614  }
    296 }
    297 
    298 void statusaction::output_errorlog (cgiargsclass &/*args*/, displayclass &/*disp*/,
     615
     616  textout << outconvert << disp << "_status:footer_\n";
     617}
     618
     619void statusaction::output_errorlog (cgiargsclass &/*args*/, displayclass &disp,
    299620                    outconvertclass &outconvert,
    300                     ostream &textout, ostream &/*logout*/) {
     621                    ostream &textout, ostream &logout) {
     622  textout << outconvert << disp << "_status:header_(Error log)\n";
     623  textout << outconvert << "<h2>Error log</h2>\n";
     624  logout << flush;
     625
    301626  ifstream errin (GSDL_GSDLHOME "/etc/errout.txt");
    302627  if (errin) {
     
    319644    textout << outconvert << "Couldn't read error log, " GSDL_GSDLHOME "/etc/errout.txt.\n";
    320645  }
    321 }
     646
     647  textout << outconvert << disp << "_status:footer_\n";
     648}
     649
     650void statusaction::output_errorpage (outconvertclass &outconvert,
     651                     ostream &textout, ostream &/*logout*/,
     652                     text_t message) {
     653  textout << outconvert
     654      << "<html>\n"
     655      << "<head>\n"
     656      << "<title>Error</title>\n"
     657      << "</head>\n"
     658      << "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#006666\" "
     659      << "alink=\"#cc9900\" vlink=\"#666633\">\n"
     660      << "<h2>Oops!</h2>\n"
     661      << message
     662      << "\n</body>\n"
     663      << "</html>\n";
     664  return;
     665}
     666
    322667
    323668
     
    334679  arg_ainfo.argdefault = "status";
    335680  arg_ainfo.savedarginfo = cgiarginfo::must;
    336 
     681  argsinfo.addarginfo (NULL, arg_ainfo);
     682
     683  // "sp" -- status page
     684  arg_ainfo.shortname = "sp";
     685  arg_ainfo.longname = "status page";
     686  arg_ainfo.multiplechar = true;
     687  arg_ainfo.defaultstatus = cgiarginfo::good;
     688  arg_ainfo.argdefault = "frameset";
     689  arg_ainfo.savedarginfo = cgiarginfo::can;
     690  argsinfo.addarginfo (NULL, arg_ainfo);
     691
     692  // "pr" -- protocol
     693  arg_ainfo.shortname = "pr";
     694  arg_ainfo.longname = "protocol";
     695  arg_ainfo.multiplechar = true;
     696  arg_ainfo.defaultstatus = cgiarginfo::none;
     697  arg_ainfo.argdefault = "";
     698  arg_ainfo.savedarginfo = cgiarginfo::can;
    337699  argsinfo.addarginfo (NULL, arg_ainfo);
    338700}
     
    355717                  displayclass &disp, outconvertclass &outconvert,
    356718                  ostream &textout, ostream &logout) {
    357   textout << outconvert << "<html>\n";
    358   textout << outconvert << "<head>\n";
    359   textout << outconvert << "<title>Status</title>\n";
    360   textout << outconvert << "</head>\n";
    361   textout << outconvert << "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#006666\" "
    362       << "alink=\"#cc9900\" vlink=\"#666633\">\n";
    363 
    364   textout << outconvert << disp << "<img src=\"_httpimg_/gsdl.gif\"><br>\n";
    365 
    366   if (disabled) textout << outconvert << "<h2>Status disabled</h2>\n";
     719  // make sure the status function is enabled
     720  if (disabled) {
     721    output_errorpage (outconvert, textout, logout,
     722              "The status action is disabled. "
     723              "See the documentation (what documentation!) on how "
     724              "to enable it.");
     725    return true;
     726  }
     727 
     728  // make sure we know about a receptionist
     729  if (recpt == NULL) {
     730    output_errorpage (outconvert, textout, logout,
     731              "The status action does not contain information\n"
     732              "about any receptionists. The method set_receptionist\n"
     733              "was probably not called from the module which instantiated\n"
     734              "this status action.\n");
     735    return true;
     736  }
     737
     738  // check to make sure status.dm was read in
     739  const recptconf &rcinfo = recpt->get_configinfo ();
     740  text_tarray::const_iterator macrohere = rcinfo.macrofiles.begin ();
     741  text_tarray::const_iterator macroend = rcinfo.macrofiles.end ();
     742  while (macrohere != macroend) {
     743    if (*macrohere == "status.dm") break;
     744    macrohere++;
     745  }
     746  if (macrohere == macroend) {
     747    output_errorpage (outconvert, textout, logout,
     748              "The status.dm file was not read in. This macro file is\n"
     749              "needed to display configuration and status information.\n");
     750    return true;
     751  }
     752
     753  // output the required status page
     754  text_t &arg_sp = args["sp"];
     755  if (arg_sp == "frameset") output_frameset (args, disp, outconvert, textout, logout);
     756  else if (arg_sp == "select") output_select (args, disp, outconvert, textout, logout);
     757  else if (arg_sp == "generalinfo") output_generalinfo (args, disp, outconvert, textout, logout);
     758  else if (arg_sp == "argumentinfo") output_argumentinfo (args, disp, outconvert, textout, logout);
     759  else if (arg_sp == "actioninfo") output_actioninfo (args, disp, outconvert, textout, logout);
     760  else if (arg_sp == "protocolinfo") output_protocolinfo (args, disp, outconvert, textout, logout);
     761  else if (arg_sp == "collectioninfo") output_collectioninfo (args, disp, outconvert, textout, logout);
     762  else if (arg_sp == "initlog") output_initlog (args, disp, outconvert, textout, logout);
     763  else if (arg_sp == "errorlog") output_errorlog (args, disp, outconvert, textout, logout);
    367764  else {
    368     textout << outconvert << "<h2>General information</h2>\n";
    369    
    370     if (recpt == NULL) {
    371       textout << outconvert << "The status action does not contain information\n";
    372       textout << outconvert << "about any receptionists. The method set_receptionist\n";
    373       textout << outconvert << "was probably not called from the module which instantiated\n";
    374       textout << outconvert << "this action.\n";
    375 
    376     } else {
    377       output_generalinfo (args, disp, outconvert, textout, logout);
    378       textout << outconvert << "<hr>\n";
    379 
    380       output_argumentinfo (args, disp, outconvert, textout, logout);
    381       textout << outconvert << "<hr>\n";
    382 
    383       output_actioninfo (args, disp, outconvert, textout, logout);
    384       textout << outconvert << "<hr>\n";
    385 
    386       output_initlog (args, disp, outconvert, textout, logout);
    387       textout << outconvert << "<hr>\n";
    388 
    389       output_errorlog (args, disp, outconvert, textout, logout);
    390       textout << outconvert << "<hr>\n";
    391     }
    392   }
    393  
    394 
    395   textout << outconvert << "</body>\n";
    396   textout << outconvert << "</html>\n";
     765    output_errorpage (outconvert, textout, logout,
     766              "Unknown page \"" + arg_sp + "\".\n");
     767  }
    397768
    398769  return true;
     
    409780  }
    410781}
     782
  • trunk/gsdl/src/recpt/statusaction.h

    r197 r200  
    2525  receptionist *recpt;
    2626
     27  void output_frameset (cgiargsclass &args, displayclass &disp,
     28            outconvertclass &outconvert,
     29            ostream &textout, ostream &logout);
     30  void output_select (cgiargsclass &args, displayclass &disp,
     31              outconvertclass &outconvert,
     32              ostream &textout, ostream &logout);
     33
    2734  void output_generalinfo (cgiargsclass &args, displayclass &disp,
    2835               outconvertclass &outconvert,
     
    4754            ostream &textout, ostream &logout);
    4855
     56  void output_errorpage (outconvertclass &outconvert,
     57             ostream &textout, ostream &logout,
     58             text_t message);
     59
    4960public:
    5061  statusaction ();
Note: See TracChangeset for help on using the changeset viewer.