Index: intraseek/modules/config_interface.pike
diff -c intraseek/modules/config_interface.pike:1.53 intraseek/modules/config_interface.pike:1.56
*** intraseek/modules/config_interface.pike:1.53	Sun May 23 21:48:28 1999
--- intraseek/modules/config_interface.pike	Sun Aug 22 03:31:12 1999
***************
*** 17,22 ****
--- 17,23 ----
  #include "shared_help.h";
  
  inherit "wizard";
+ inherit "roxenlib";
  
  #define NOPIKE 2
  #define STARTING 4
***************
*** 234,240 ****
  string do_view_log(string idt)
  {
    return    "<ul><h2>Crawler log. (Reload this page to update it):</h2><hr><tt>"
!             "<p>"+replace(""+TO->profile_handler->view_log(idt), ({"\n","Fetcher "}), ({"<br>", "<hr>Fetcher# "}))+"</tt></ul>";
  }
  
  void do_reset(string idt)
--- 212,218 ----
  string do_view_log(string idt)
  {
    return    "<ul><h2>Crawler log. (Reload this page to update it):</h2><hr><tt>"
!             "<p>"+replace(html_encode_string(""+TO->profile_handler->view_log(idt)), ({"\n","Fetcher "}), ({"<br>", "<hr>Fetcher# "}))+"</tt></ul>";
  }
  
  void do_reset(string idt)
***************
*** 306,312 ****
    o->close();
    
    (TO->profile_handler)->create_robot_id(idt, 0, time(), time(), STARTING);
!   crawlerlog("Now ("+ctime(time())+"), Launching:\n "+TO->gb_pike+" "+TO->gb_flag+" "+(TO->engine_home)+"crawler.pike "+idt);
  
    string defworld=TO->my_configuration()->query("MyWorldLocation");  // Must end with "/"
    string defaccept;
--- 284,290 ----
    o->close();
    
    (TO->profile_handler)->create_robot_id(idt, 0, time(), time(), STARTING);
!   crawlerlog("Now ("+replace(ctime(time()),"\n","")+"), Launching:\n "+(TO->engine_home)+"crawler.pike "+idt);
  
    string defworld=TO->my_configuration()->query("MyWorldLocation");  // Must end with "/"
    string defaccept;
***************
*** 848,854 ****
  string view_query_log(string profile)
  {
    return "<p>"
!          "<h2>&nbsp; Queries for the '"+profile+"' profile:</h2><hr><ul><tt>"+replace((Stdio.read_bytes(TO->engine_home+"logs/"+profile+".query.log")||"<font color=orange>No log!</font"), "\n", "<br>")+"</tt></ul>";
  }
  
  string view_con_log(string profile)
--- 826,834 ----
  string view_query_log(string profile)
  {
    return "<p>"
!          "<h2>&nbsp; Queries for the '"+profile+"' profile:</h2><hr><ul><tt>"+
!           replace(html_encode_string((Stdio.read_bytes(TO->engine_home+"logs/"+profile+".query.log")||
! 				      "<font color=orange>No log!</font")), "\n", "<br>")+"</tt></ul>";
  }
  
  string view_con_log(string profile)
Index: intraseek/modules/intraseek_engine.pike
diff -c intraseek/modules/intraseek_engine.pike:1.88 intraseek/modules/intraseek_engine.pike:1.92
*** intraseek/modules/intraseek_engine.pike:1.88	Fri Apr 30 13:33:38 1999
--- intraseek/modules/intraseek_engine.pike	Sun Aug 22 03:31:13 1999
***************
*** 44,50 ****
  #define ERR_NO_DB 1
  #define ERR_CORRUPT 2
  
! string cvs_version="$Id: intraseek_engine.pike,v 1.88 1999/04/30 11:33:38 js Exp $";
  
  mapping (string:int)_interval_counter1=([]);
  mapping (string:int)_interval_counter2=([]);
--- 44,50 ----
  #define ERR_NO_DB 1
  #define ERR_CORRUPT 2
  
! string cvs_version="$Id: intraseek_engine.pike,v 1.92 1999/08/22 01:31:13 js Exp $";
  
  mapping (string:int)_interval_counter1=([]);
  mapping (string:int)_interval_counter2=([]);
***************
*** 300,306 ****
    //  werror(database_stored_at+database_id+".new.flag\n");
    if(file_stat(database_stored_at+database_id+".new.flag"))
    {
!     engine_log_dump("Found new database!");
      from=profile_handler->working_at(database_id)+"n."+database_id+".yabu";
      to=profile_handler->store_at(database_id)+"a."+database_id+".yabu";
      if(from!=to)
--- 300,306 ----
    //  werror(database_stored_at+database_id+".new.flag\n");
    if(file_stat(database_stored_at+database_id+".new.flag"))
    {
!     engine_log_dump("Found new database ("+database_id+")!");
      from=profile_handler->working_at(database_id)+"n."+database_id+".yabu";
      to=profile_handler->store_at(database_id)+"a."+database_id+".yabu";
      if(from!=to)
***************
*** 942,948 ****
  	  int hidden_before_this;
   	  int hidden_on_this;
  	  mixed gz = Gz;
! 	  part0="<hr noshade>\n<font size=+2><input type=hidden name=lastquery value='"+query+"'>";
  	  part1=(string)(1+startt-hidden_before_this)+"$$delim"+
  	    (((startt+oneach)>sizeof(t1))?(sizeof(t1)-sizeof(hidden)):
  	     ((startt+oneach-hidden_on_this)-hidden_before_this));
--- 942,948 ----
  	  int hidden_before_this;
   	  int hidden_on_this;
  	  mixed gz = Gz;
! 	  part0="<hr noshade>\n<font size=+2><input type=hidden name=lastquery value='"+html_encode_string(query)+"'>";
  	  part1=(string)(1+startt-hidden_before_this)+"$$delim"+
  	    (((startt+oneach)>sizeof(t1))?(sizeof(t1)-sizeof(hidden)):
  	     ((startt+oneach-hidden_on_this)-hidden_before_this));
***************
*** 968,974 ****
  		  kvotat=1;
  		}
  #define MIN(X,Y) ((X)<(Y)?(X):(Y))
! 		part4+="<a "+target+"href=\""+query_base+"?p="+(kvotat?"%22":"")+http_encode_string(term)+(kvotat?"%22":"")+"&base="+http_encode_string(inbase)+"\">"+
  		  term+"</a>:"+cell[ootemp]+ //MIN(,sizeof(t1)-sizeof(hidden))
  		  "  ";
  		if(l==5)      
--- 968,976 ----
  		  kvotat=1;
  		}
  #define MIN(X,Y) ((X)<(Y)?(X):(Y))
! 		part4+="<a "+target+"href=\""+http_encode_string(query_base)+
! 		  "?p="+(kvotat?"%22":"")+http_encode_string(term)+
! 		  (kvotat?"%22":"")+"&base="+http_encode_string(inbase)+"\">"+
  		  term+"</a>:"+cell[ootemp]+ //MIN(,sizeof(t1)-sizeof(hidden))
  		  "  ";
  		if(l==5)      
***************
*** 1007,1013 ****
  	      "<TR>"
  	      "<TD ROWSPAN=3 VALIGN=TOP ALIGN=LEFT>"
  	      "<B>   "+(i+1-hidden_so_far)+")</B></TD>"
! 	      "<TD VALIGN=TOP ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\"><A HREF=\""+term+"\">"+xq[3]+"</a>.</TD>"+
  	      ((req_id->variables->sort=="by_date")?
  	       (
  		 "<TD VALIGN=TOP ALIGN=RIGHT><FONT SIZE=-1>&nbsp;Date: "+http_date((int)xq[-1])+", $$matches: "+page_count[(t1[i])]+"&nbsp;<BR>[$$size: "+sprintf("%5.1f", (((float)(xq[1]))))+" Kb]</FONT></TD>"):
--- 1009,1016 ----
  	      "<TR>"
  	      "<TD ROWSPAN=3 VALIGN=TOP ALIGN=LEFT>"
  	      "<B>   "+(i+1-hidden_so_far)+")</B></TD>"
! 	      "<TD VALIGN=TOP ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\"><A HREF=\""+term+"\">"+
! 	      html_encode_string(xq[3])+"</a>.</TD>"+
  	      ((req_id->variables->sort=="by_date")?
  	       (
  		 "<TD VALIGN=TOP ALIGN=RIGHT><FONT SIZE=-1>&nbsp;Date: "+http_date((int)xq[-1])+", $$matches: "+page_count[(t1[i])]+"&nbsp;<BR>[$$size: "+sprintf("%5.1f", (((float)(xq[1]))))+" Kb]</FONT></TD>"):
***************
*** 1015,1025 ****
  		 "<TD VALIGN=TOP ALIGN=RIGHT><FONT SIZE=-1>&nbsp;$$score: "+(sprintf("%2.1f",((float)(100*(((float)(t2[i]))/(max))))))+"%, $$matches: "+page_count[(t1[i])]+"&nbsp;<BR>[$$size: "+sprintf("%5.1f", (((float)(xq[1]))))+" Kb]</FONT></TD>"))+
  	      "</TR>"
  	      "<TR>"
! 	      "<TD COLSPAN=2><FONT COLOR=\"$$textcolor\">"+xq[2]+"</FONT></TD>"
  	      "</TR>"
  	      "<TR>"
  #ifndef HANDELSBANKEN	      
! 	      "<TD VALIGN=TOP ALIGN=LEFT COLSPAN=2><FONT size=-1 FACE=\"Arial,Helvetica\" COLOR=\"#ff5050\"><A HREF=\""+term+"\">"+term+"</A></FONT></TD>"
  #else
  	      ""
  #endif	      
--- 1018,1028 ----
  		 "<TD VALIGN=TOP ALIGN=RIGHT><FONT SIZE=-1>&nbsp;$$score: "+(sprintf("%2.1f",((float)(100*(((float)(t2[i]))/(max))))))+"%, $$matches: "+page_count[(t1[i])]+"&nbsp;<BR>[$$size: "+sprintf("%5.1f", (((float)(xq[1]))))+" Kb]</FONT></TD>"))+
  	      "</TR>"
  	      "<TR>"
! 	      "<TD COLSPAN=2><FONT COLOR=\"$$textcolor\">"+html_encode_string(xq[2])+"</FONT></TD>"
  	      "</TR>"
  	      "<TR>"
  #ifndef HANDELSBANKEN	      
! 	      "<TD VALIGN=TOP ALIGN=LEFT COLSPAN=2><FONT size=-1 FACE=\"Arial,Helvetica\" COLOR=\"#ff5050\"><A HREF=\""+term+"\">"+html_encode_string(term)+"</A></FONT></TD>"
  #else
  	      ""
  #endif	      
***************
*** 1040,1047 ****
  	part7="";
  	query = (query/" " - ({""})) * " ";
  	if(startt>=oneach)
! 	  part7+="&nbsp;<a "+target+"href=\""+query_base+"?p="+
! 	    replace(http_encode_string(query), "+", "%2B")+
  	    "&start="+(startt-oneach)+"&base="+http_encode_string(inbase)+"\">[$$prev]</a>&nbsp;";
  
  	int pageline=profile_handler->quicklinks(base);
--- 1043,1050 ----
  	part7="";
  	query = (query/" " - ({""})) * " ";
  	if(startt>=oneach)
! 	  part7+="&nbsp;<a "+target+"href=\""+http_encode_string(query_base)+
! 	    "?p="+replace(http_encode_string(query), "+", "%2B")+
  	    "&start="+(startt-oneach)+"&base="+http_encode_string(inbase)+"\">[$$prev]</a>&nbsp;";
  
  	int pageline=profile_handler->quicklinks(base);
***************
*** 1053,1067 ****
  	    if((i*oneach)==startt)
  	      part7+="&nbsp;"+(i+1)+"&nbsp;";
  	    else
! 	      part7+="&nbsp;<a "+target+"href=\""+query_base+"?p="+
! 		replace(http_encode_string(query), "+", "%2B")+
  		"&start="+(i*oneach)+"&base="+http_encode_string(inbase)+"\">"+(i+1)+"</a>&nbsp;";
  	  }
  	}
        
  	if ((((startt+oneach)<sizeof(t1))) && ((startt+oneach)<(pageline*oneach)))
! 	  part7+="&nbsp;<a "+target+"href=\""+query_base+"?p="+
! 	    replace(http_encode_string(query), "+", "%2B")+
  	    "&start="+(startt+oneach)+"&base="+http_encode_string(inbase)+"\">[$$next]</a>&nbsp;";
      
        }
--- 1056,1070 ----
  	    if((i*oneach)==startt)
  	      part7+="&nbsp;"+(i+1)+"&nbsp;";
  	    else
! 	      part7+="&nbsp;<a "+target+"href=\""+http_encode_string(query_base)+
! 		"?p="+replace(http_encode_string(query), "+", "%2B")+
  		"&start="+(i*oneach)+"&base="+http_encode_string(inbase)+"\">"+(i+1)+"</a>&nbsp;";
  	  }
  	}
        
  	if ((((startt+oneach)<sizeof(t1))) && ((startt+oneach)<(pageline*oneach)))
! 	  part7+="&nbsp;<a "+target+"href=\""+http_encode_string(query_base)+
! 	    "?p="+replace(http_encode_string(query), "+", "%2B")+
  	    "&start="+(startt+oneach)+"&base="+http_encode_string(inbase)+"\">[$$next]</a>&nbsp;";
      
        }
***************
*** 1144,1150 ****
    if (arguments->action)
      query_base += " action=\""+arguments->action+"\"";
    else
!     query_base += " action=\""+req_id->not_query+"\"";
    if (arguments->target)
      query_base += " target=\""+arguments->target+"\"";
    
--- 1147,1153 ----
    if (arguments->action)
      query_base += " action=\""+arguments->action+"\"";
    else
!     query_base += " action=\""+http_encode_string(req_id->not_query)+"\"";
    if (arguments->target)
      query_base += " target=\""+arguments->target+"\"";
    
***************
*** 1182,1188 ****
    
    if(def)  // if a default one, make this hidden!
    {
!     part2="<input type=hidden name=base value=\""+def+"\">";
      defflag=1;
    }
    else  // Otherwise, make a selection list out the available ones!
--- 1185,1191 ----
    
    if(def)  // if a default one, make this hidden!
    {
!     part2="<input type=hidden name=base value=\""+html_encode_string(def)+"\">";
      defflag=1;
    }
    else  // Otherwise, make a selection list out the available ones!
***************
*** 1192,1200 ****
      for (i=0; (i<sizeof(id)); i++)
      {
        if (id[i]==base)
! 	part2+="<option value=\""+id[i]+"\" selected>"+realnames[id[i]]+"</option>";
        else
! 	part2+="<option value=\""+id[i]+"\" >"+realnames[id[i]]+"</option>";
      }
      part2+="</select>";
    }
--- 1195,1205 ----
      for (i=0; (i<sizeof(id)); i++)
      {
        if (id[i]==base)
! 	part2+="<option value=\""+html_encode_string(id[i])+"\" selected>"+
! 	  html_encode_string(realnames[id[i]])+"</option>";
        else
! 	part2+="<option value=\""+html_encode_string(id[i])+"\" >"+
! 	  html_encode_string(realnames[id[i]])+"</option>";
      }
      part2+="</select>";
    }
***************
*** 1202,1215 ****
  #ifdef HANDELSBANKEN
    part3=" <input size=30 name=p value=\"";
    if ((query) && (query!="0") && (query!=""))
!     part3+=replace(query, "\"", "&quot;");
    
    part3+="\"></td><td>&nbsp;<input type=submit value=\"";
    part4="\">&nbsp;<input type=hidden name=start value=0></td></tr></table>";
  #else
    part3=" <input size=30 name=p value=\"";
    if ((query) && (query!="0") && (query!=""))
!     part3+=replace(query, "\"", "&quot;");
    
    part3+="\">&nbsp;<input type=submit value=\"";
    part4="\">&nbsp;<input type=hidden name=start value=0>";
--- 1207,1220 ----
  #ifdef HANDELSBANKEN
    part3=" <input size=30 name=p value=\"";
    if ((query) && (query!="0") && (query!=""))
!     part3+=html_encode_string(query);
    
    part3+="\"></td><td>&nbsp;<input type=submit value=\"";
    part4="\">&nbsp;<input type=hidden name=start value=0></td></tr></table>";
  #else
    part3=" <input size=30 name=p value=\"";
    if ((query) && (query!="0") && (query!=""))
!     part3+=html_encode_string(query);
    
    part3+="\">&nbsp;<input type=submit value=\"";
    part4="\">&nbsp;<input type=hidden name=start value=0>";
***************
*** 1301,1309 ****
    if ((!(lang=(arguments->lang))) || (search(global_languages, lang)==-1))
      lang=DEF_LANG;
    if(req_id->variables->p)
!     return (string)languages[lang][13]+""+req_id->variables->p;
    else
!     return languages[lang][0];
  }
  
  int is_this_the_engine_home_location(string where)
--- 1306,1314 ----
    if ((!(lang=(arguments->lang))) || (search(global_languages, lang)==-1))
      lang=DEF_LANG;
    if(req_id->variables->p)
!     return html_encode_string((string)languages[lang][13]+""+req_id->variables->p);
    else
!     return html_encode_string(languages[lang][0]);
  }
  
  int is_this_the_engine_home_location(string where)
***************
*** 1434,1440 ****
    
  
    array err;
!   module_dependencies(configuration, ({ "graphic_text#0", "obox#0" }) );
    global_problem=0;
    loaded=1;
  
--- 1439,1447 ----
    
  
    array err;
!   module_dependencies(configuration, ({ "graphic_text#0",
! 					"obox#0",
! 					"configtablist#0"  }) );
    global_problem=0;
    loaded=1;
  
