Changeset 936 for trunk/gsdl/src/recpt
- Timestamp:
- 2000-02-17T15:35:04+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/queryaction.cpp
r928 r936 28 28 /* 29 29 $Log$ 30 Revision 1.35 2000/02/17 02:35:04 sjboddie 31 tidied up search history stuff a bit - replaced strings with macros 32 30 33 Revision 1.34 2000/02/15 22:53:52 kjm18 31 34 search history stuff added. … … 360 363 arg_ainfo.longname = "history display"; 361 364 arg_ainfo.multiplechar = false; 365 arg_ainfo.multiplevalue = false; 362 366 arg_ainfo.defaultstatus = cgiarginfo::weak; 363 367 arg_ainfo.argdefault = "0"; … … 609 613 } // define external macros 610 614 611 void queryaction::define_history_macros (displayclass &disp, cgiargsclass &args,612 615 void queryaction::define_history_macros (displayclass &disp, cgiargsclass &args, 616 recptprotolistclass *protos, ostream &logout) { 613 617 614 618 // defines the following macros … … 626 630 text_t userid = args["z"]; 627 631 text_tarray entries; 628 if (get_history_info (userid, entries)) {632 if (get_history_info (userid, entries, logout)) { 629 633 int count = 1; 630 634 text_tarray::iterator here = entries.begin(); … … 637 641 historylist += "<table align=center width=500 border=0>\n"; 638 642 historylist += "<tr><td width=300 align=center>"; 639 historylist += "<a href=\"_httpclearhistory_\"> Clear History</a></td>\n";643 historylist += "<a href=\"_httpclearhistory_\">_textclearhistory_</a></td>\n"; 640 644 641 645 if (size>5&&args["hcl"]==1) { //compress the list, show the expand button 642 646 643 historylist += "<td><a href=\"_gwcgi_?e=_compressedoptions_&a=q&hcl=0\"> Expand</a></td>\n";647 historylist += "<td><a href=\"_gwcgi_?e=_compressedoptions_&a=q&hcl=0\">_textexpand_</a></td>\n"; 644 648 } 645 649 else if (size >5 && args["hcl"]==0) { // expand the list, show contract button 646 historylist += "<td><a href=\"_gwcgi_?e=_compressedoptions_&a=q&hcl=1\"> Contract</a></td>\n";650 historylist += "<td><a href=\"_gwcgi_?e=_compressedoptions_&a=q&hcl=1\">_textcontract_</a></td>\n"; 647 651 } 648 652 historylist += "</table>\n"; 649 historylist += " <table align=center width=500 border=1> \n<tr><th colspan=4 align=center>";650 historylist += " Search History</th></tr>\n";651 historylist += "<tr><th width=40>#</th>\n<th width=340> Query</th>\n";652 historylist += "<th width=60> Results</th><th width=60>View</th></tr>\n";653 historylist += "<table align=center width=500 border=1>\n<tr><th colspan=4 align=center>"; 654 historylist += "_textsearchhistory_</th></tr>\n"; 655 historylist += "<tr><th width=40>#</th>\n<th width=340>_textquery_</th>\n"; 656 historylist += "<th width=60>_textresults_</th><th width=60>_textview_</th></tr>\n"; 653 657 654 658 while (here !=end ) { 655 659 text_t c; 656 660 text_t query; 657 text_t q = "q";658 661 text_t numdocs; 659 662 text_t cgiargs; 660 663 text_t userinfo; 661 664 split_saved_query(*here,c, numdocs, cgiargs); 662 parse_saved_args(cgiargs, q, query); // get query string out665 parse_saved_args(cgiargs, "q", query); // get query string out 663 666 decode_cgi_arg(query); // un cgisafe it 664 667 … … 668 671 historylist += "<td width=340 align=left>"+query+"</td><td width=60 align=center>"+numdocs+"</td>\n"; 669 672 historylist += "<td width=60 align=center><a href=\"_gwcgi_?e=_compressedoptions_&"; 670 historylist += *here+"\"><img name=\"display\" src=\" /gsdl/images/display.gif\" width=\"60\"";671 historylist += "height= \"20\"border=\"0\" alt=\"" + userinfo +"\"></a></td></tr>\n";672 673 673 historylist += *here+"\"><img name=\"display\" src=\"_httpicondisplay_\" width=_widthdisplay_ "; 674 historylist += "height=_heightdisplay_ border=\"0\" alt=\"" + userinfo +"\"></a></td></tr>\n"; 675 here++; 676 count++; 674 677 } 675 678 historylist+="</table>\n\n"; … … 677 680 } // if 678 681 else { 679 historylist += " Search history not available\n";682 historylist += "_textnohistory_"; 680 683 } 681 684 historylist += "<p><! ---- end of history list ----->\n"; … … 1107 1110 logout << "save failed"; 1108 1111 1109 define_history_macros (disp, args, protos, logout);1112 define_history_macros (disp, args, protos, logout); 1110 1113 1111 1114 textout << outconvert << disp << "_query:header_\n"
Note:
See TracChangeset
for help on using the changeset viewer.