Code Pastie ID: 111 (Edit or View CSS/HTML)

Passcode:    


type (someEnum, andYeah);

const NUM = 1;
  
procedure WhatThe;
begin
  write('Paste Bin? Or Pastie? What do you think a Pastie really is? See Logo.');
end;

function WhatIsPastie: boolean;
begin
  write('ask a lady,  or another person-a-ma-bob');
  result:= true;
end;


// MORE COMPLEX STUFF??? 
// ..... 
// .....  
// see below 

program rapid; {$mode objfpc}{$H+}

uses
  pwinit,   // for 1.7.X this is required 
  pwmain,   
  strwrap1,
  htmw;     // rapid html units 

var // initialize a rapid DIV box   
  TopPanel: THtmCustomBox = (
    position: cpAbsolute;
    left: 0;
    top: 2;
    height: 0;
    width: 96;
    pad: 6;
    HeightUnit: hmPixel;
    WidthUnit: hmPercent;
    bgcolor: 'gray';
    PageAlign: caCenter;
    border: cbNone;
    zindex: 1;
    text: '';
  );
  
  RightPanel: THtmPercentBox;
  LeftPanel: THtmPercentBox;
  ContentPanel: THtmPercentBox;
  FootPanel: THtmPercentBox;

function: TemplateFileToString(fname: string): string;
begin
  // load a file into a string  
  result:= StrLoadFile(fname);
  // format $macrovar's using pwumain format function  
  result:= WebFormat(result);
end;

begin
  // setup macrovars for template  
  SetVar('macro1' 'blue sky');
  SetVar('macro2' 'green grass');
  // open html tags, and set page Title  
  HtmBegin('Pascal Internet Program');
  // load a template into string, put in box content  
  TopPanel.text:= TemplateFileToString('content1.tpl');
  // display div box  
  BoxOut(TopPanel); 
  HtmEnd;  // close html tags  
end.