Index: trunk/gsdl/src/recpt/htmlaction.cpp
===================================================================
--- trunk/gsdl/src/recpt/htmlaction.cpp	(revision 636)
+++ 	(revision )
@@ -1,162 +1,0 @@
-/**********************************************************************
- *
- * htmlaction.cpp -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- *
- *********************************************************************/
-
-/*
-   $Log$
-   Revision 1.1  1999/09/16 21:41:03  sjboddie
-   new action
-
-
- */
-
-
-#include "htmlaction.h"
-#include "receptionist.h"
-#include <time.h>
-
-htmlaction::htmlaction () {
-
-  // this action uses cgi variables "a" and "hp"
-  cgiarginfo arg_ainfo;
-  arg_ainfo.shortname = "a";
-  arg_ainfo.longname = "action";
-  arg_ainfo.multiplechar = true;
-  arg_ainfo.defaultstatus = cgiarginfo::weak;
-  arg_ainfo.argdefault = "html";
-  arg_ainfo.savedarginfo = cgiarginfo::must;
-  argsinfo.addarginfo (NULL, arg_ainfo);
-
-  arg_ainfo.shortname = "hp";
-  arg_ainfo.longname = "html page";
-  arg_ainfo.multiplechar = true;
-  arg_ainfo.defaultstatus = cgiarginfo::weak;
-  arg_ainfo.argdefault = "";
-  arg_ainfo.savedarginfo = cgiarginfo::mustnot;
-  argsinfo.addarginfo (NULL, arg_ainfo);
-}
-
-htmlaction::~htmlaction () {
-}
-
-bool pageaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &/*args*/, 
-				ostream &/*logout*/) {
-  // don't want to check anything yet.
-  return true;
-}
-
-void pageaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response,
-				   text_t &response_data, ostream &/*logout*/) {
-  response = content;
-  response_data = "text/html";
-}
-
-
-// define all the macros which might be used by other actions
-// to produce pages. 
-void pageaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 
-					 cgiargsclass &/*args*/, recptproto */*collectproto*/, 
-					 ostream &/*logout*/) {
-}
-
-
-void pageaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 
-					 cgiargsclass &args, recptproto */*collectproto*/, 
-					 ostream &logout) {
-
-  // define_internal_macros sets the following macros:
-
-  // _homeextra_   this is the list of available collections and collection info
-  //               to be displayed on the home page
-
-  if (args["p"] == "home") {
-    // make sure we know about a receptionist
-    if (recpt == NULL) {
-      logout << "The page action does not contain information\n"
-	     << "about any receptionists. The method set_receptionist\n"
-	     <<	"was probably not called from the module which instantiated\n"
-	     <<	"this page action.\n";
-      return;
-    }
-
-    unsigned long current_time = time(NULL);
-    text_t homeextra;
-
-    recptprotolistclass *rprotolist = recpt->get_recptprotolist_ptr ();
-    if (rprotolist == NULL) return;
-
-    recptprotolistclass::iterator rprotolist_here = rprotolist->begin();
-    recptprotolistclass::iterator rprotolist_end = rprotolist->end();
-    while (rprotolist_here != rprotolist_end) {
-      if ((*rprotolist_here).p != NULL) {
-	text_tarray collist;
-	comerror_t err;
-	(*rprotolist_here).p->get_collection_list (collist, err, logout);
-	if (err == noError) {
-	  text_tarray::iterator collist_here = collist.begin();
-	  text_tarray::iterator collist_end = collist.end();
-
-	  homeextra += "<dl>\n";
-
-	  while (collist_here != collist_end) {
-	    ColInfoResponse_t cinfo;
-	    (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, logout);
-	    if (err == noError) {
-	      text_t link = "<a href=\"_gwcgi_?a=q&c=" + *collist_here + "\">";
-	      if (!cinfo.receptionist.empty()) 
-		link = "<a href=\"" + cinfo.receptionist + "?a=q&c=" + *collist_here + "\">";
-	      
-	      homeextra += "<dt>" + link + *collist_here + "</a></dt>\n";
-	      homeextra += "<dd>";
-	      if (cinfo.numDocs != 0) homeextra += text_t(cinfo.numDocs) + "_documents_";
-	      if (cinfo.numWords != 0) homeextra += text_t(cinfo.numWords) + "_words_";
-	      unsigned long last_update = (current_time - cinfo.buildDate) / 86400;
-	      homeextra += "_lastupdate_ " + text_t(last_update) + " _ago_</dd>\n";
-	    }
-	    collist_here ++;
-	  }
-	  homeextra += "</dl>\n";
-	  disp.setmacro ("homeextra", "home", homeextra); 
-	}
-      }
-      rprotolist_here ++;
-    }
-  }
-}
-
-bool pageaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 
-			    recptproto */*collectproto*/, displayclass &disp, 
-			    outconvertclass &outconvert, ostream &textout, 
-			    ostream &/*logout*/) {
-
-  text_t &arg_p = args["p"];
-
-  textout << outconvert << disp << ("_" + arg_p + ":header_\n")
-	  << ("_" + arg_p + ":content_\n")
-	  << ("_" + arg_p + ":footer_\n");
-
-  return true;
-}
Index: trunk/gsdl/src/recpt/htmlaction.h
===================================================================
--- trunk/gsdl/src/recpt/htmlaction.h	(revision 636)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/**********************************************************************
- *
- * htmlaction.h -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- *
- *********************************************************************/
-
-
-#ifndef HTMLACTION_H
-#define HTMLACTION_H
-
-
-#include "gsdlconf.h"
-#include "action.h"
-#include "receptionist.h"
-
-
-class htmlaction : public action {
-
-public:
-  htmlaction ();
-  virtual ~htmlaction ();
-
-  text_t get_action_name () {return "html";}
-
-  bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args, 
-		      ostream &logout);
-
-  bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 
-		  recptproto *collectproto, displayclass &disp, 
-		  outconvertclass &outconvert, ostream &textout, 
-		  ostream &logout);
-};
-
-
-#endif
