Create HTML for a page that is inactive and so can be stored. This will be done once per inactive pager per supported language. Because this is part of the initialization process there will not be an actual HTTP event so a blank one is created. This is necessary because the language is carried by the HTTP event m_pContextLang variable. CHANGE to:- Create pro-forma HTML for the page. If the page is active, this HTML will interspersed with percent entities that must be evaluated with each serving. Returns: None

Return TypeFunction nameArguments
voidhdsPage::EvalHtml(hzChain&,)

Declared in file: hzDissemino.h
Defined in file : hdsGenerate.cpp

Function Logic:

0:START 1:items 2:unknown 3:m_Title 4:items items 5:unknown 6:items 7:items 8:unknown 9:items 10:items items 11:unknown 12:unknown 13:items 14:items 15:unknown 16:unknown 17:items 18:unknown 19:items 20:unknown 21:items 22:unknown 23:pFormref pFormdef items 24:items 25:items 26:items items 27:unknown 28:items 29:items 30:unknown 31:items 32:unknown 33:items 34:unknown 35:items 36:items items relLn 37:unknown 38:pH items 39:items items 40: No text

Function body:

void hdsPage::EvalHtml (hzChain& C)
{
   //  Create HTML for a page that is inactive and so can be stored. This will be done once per inactive pager per supported language. Because this is part of the initialization
   //  process there will not be an actual HTTP event so a blank one is created. This is necessary because the language is carried by the HTTP event m_pContextLang variable.
   //  
   //  CHANGE to:-
   //  Create pro-forma HTML for the page. If the page is active, this HTML will interspersed with percent entities that must be evaluated with each serving.
   //  
   //  Arguments: 1) C  The HTML output chain
   //     2) pLang Current language
   //  
   //  Returns: None
   _hzfunc("hdsPage::EvalHtml") ;
   hzList<hdsVE*>::Iter        ih ;    //  Html entity iterator
   hzList<hdsFormref*>::Iter   iF ;    //  Form iterator
   hzHttpEvent     httpEv ;            //  Artificial HTTP event
   hzChain         X ;                 //  For zipping output if applicable
   hdsVE*          pH ;                //  Html entity
   hdsFormref*     pFormref ;          //  Form reference
   hdsFormdef*     pFormdef ;          //  Form definition
   uint32_t        relLn ;             //  Relative line
   uint32_t        nV ;                //  Visual entity iterator
   hzEcode         rc ;                //  Return code
   //  if (!pLang)
   //   Fatal("No language supplied\n") ;
   //  httpEv.m_pContextLang = pLang ;
   m_pApp->m_pLog->Log("PAGE %s Script Flags %x\n", *m_Title, m_bScriptFlags) ;
   //  Construct the output HTML
   if (!m_Title)
       m_Title = "untitled" ;
   C << "<!DOCTYPE html>\n<html>\n<head>\n"
              ;
   C << "<title>" << m_Title << "</title>\n" ;
   if (m_Desc)
       C.Printf("<meta name=\"description\" content=\"%s\"/>\n", *m_Desc) ;
   else
       C.Printf("<meta name=\"description\" content=\"%s\"/>\n", *m_Title) ;
   if (m_Keys)
       C.Printf("<meta name=\"keywords\" content=\"%s\"/>\n", *m_Keys) ;
   C << s_std_metas ;
   C << "<link rel=\"stylesheet\" href=\"" << m_pApp->m_namCSS << "\"/>\n" ;
   if (m_bScriptFlags || m_xForms.Count())
   {
       if (m_bScriptFlags & INC_SCRIPT_RECAPTCHA)
           C << s_Recaptcha ;
       C << "<script language=\"javascript\">\n" ;
       //  If page contains forms then it must include validation javascript in the HTML
       if (m_xForms.Count())
       {
           if (m_bScriptFlags & INC_SCRIPT_CKEMAIL)
               C << _dsmScript_ckEmail ;
           if (m_bScriptFlags & INC_SCRIPT_CKURL)
               C << _dsmScript_ckUrl ;
           if (m_bScriptFlags & INC_SCRIPT_EXISTS)
               C << _dsmScript_ckExists ;
           for (iF = m_xForms ; iF.Valid() ; iF++)
           {
               pFormref = iF.Element() ;
               pFormdef = m_pApp->m_FormDefs[pFormref->m_Formname] ;
               C << pFormdef->m_ValJS ;
               //  C << pFormref->m_pFormdef->m_ValJS ;
           }
           C << m_validateJS ;
       }
       C << "</script>\n" ;
   }
   C << "</head>\n\n" ;
   //  Construct the <body> tag
   C << "<body" ;
   if (m_CSS)
       C.Printf(" class=\"%s\"", *m_CSS) ;
   else
       C.Printf(" bgcolor=\"#%06x\" marginwidth=\"%d\" marginheight=\"%d\" leftmargin=\"%d\" topmargin=\"%d\"",
           m_BgColor, m_Width, m_Height, m_Width, m_Top) ;
   if (m_Onpage) C.Printf(" onpageshow=\"%s\"", *m_Onpage) ;
   if (m_Onload) C.Printf(" onload=\"%s\"", *m_Onload) ;
   if (m_Resize) C.Printf(" onresize=\"%s\"", *m_Resize) ;
   C << ">\n" ;
   m_pApp->m_pLog->Log("PAGE %s Script Flags %x\n", *m_Title, m_bScriptFlags) ;
   //  Now construct the page elements
   relLn = m_Line ;
   for (nV = 0; nV < m_VEs.Count() ; nV++)
   {
       pH = m_VEs[nV] ; pH->Generate(C, &httpEv, relLn) ;
   }
   //  End page construction
   C << "</body>\n</html>\n" ;
   m_pApp->m_pLog->Log("PAGE %s Script Flags %x\n", *m_Title, m_bScriptFlags) ;
}