Table of Content
HAL Forum
function LongInt RecordsInIndex (
string RegisterName,string RegisterSubsetKey)
Description:
Extended version of CountRecords. Gives the count of records in certain SubSet sort key (defined with SubsetKeyBegin2) indexes.
Parameters:
RegisterName The name of the register.
RegisterSubsetKey The name of the subset key of the specified register.
// Return value:
// Integer		The number of records stored with values that match the specified subset key rules.

global
procedure ToolWebHalTutorialConf(string name_,LongInt maxmail,Integer mode)
begin
  record MailVc Mailr;
  string 60 ckey;
  LongInt loopcnt;
  LongInt looppos,page;
  Boolean found;
  string 60 code_;
  string 100 News;

  loopcnt = 0;
 ToolWebHalGetConfCode(name_,code_);
  ckey = "UserTime:" & code_;
  looppos = RecordsInIndex("MailVc",ckey);
  page = StringToLongint(WebGetArg("pge"));
  SetLoopPosition(Mailr,page+1);
  found = true;
  while (LoopBackKey(ckey,Mailr,1,found)) begin
    if (found) then begin
      loopcnt = loopcnt + 1;
      if (maxmail>-1) then begin
        if (loopcnt>maxmail) then begin
          found = false;
        end;
      end;
      if (found) then begin
        switch (mode) begin
          case 0: ToolWebHalTutorialShow(Mailr,page,looppos);
          case 1: ToolWebHalTutorialShow(Mailr,page,looppos);
          otherwise
        end;
      end;
    end;
  end;
  return;
end;

Related topics:
««