home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
ib
/
setups
/
intrabld
/
data.z
/
ENTRIES.JRP
< prev
next >
Wrap
Text File
|
1996-12-11
|
8KB
|
251 lines
/****************************************************************************\
* *
* Entries.jrp -- Guest Book Entries Report *
* *
* Entries.jrp is part of the Guest Book solution application. It lists the *
* existing guest book entries, in order by the date and time of their *
* entry - most recent entries first. The entries are streamed to the *
* browser one page at a time, by passing the start and end page parameters *
* to the report: *
* *
* _sys.reports.run("entries.jrp",1,1); *
* or *
* http://host.domain/svr/intrasrv.isv?apps/guestbk/entries.jrp(1,1) *
* *
* Dependencies: apps\shared\dateex.js *
* apps\shared\controls.cc *
* gestbk31.gif *
* homepg31.gif *
* *
* Links to: ibapps/index.htm *
* *
* Updated 11/06/96 by IntraBuilder Samples Group *
* $Revision: 1.18 $ *
* *
* Copyright (c) 1996, Borland International, Inc. All rights reserved. *
* *
\****************************************************************************/
// The reference to dateex.js include the full path (found by _sys.env.home())
// so that it will work in both the IntraBuilder designer and server.
_sys.scripts.load(_sys.env.home() + "apps\\shared\\dateex.js");
// {End Header} Do not remove this comment//
// Generated on 11/06/96
//
var r = new ENTRIESReport();
if (ENTRIES.arguments.length == 2) {
r.startPage = ENTRIES.arguments[0];
r.endPage = ENTRIES.arguments[1];
}
r.render();
class ENTRIESReport extends Report {
_sys.scripts.load(_sys.env.home() + "APPS\\SHARED\\CONTROLS.CC");
with (this) {
onDesignLoad = {;_sys.scripts.load(_sys.env.home() + "apps\\shared\\dateex.js")};
title = "Guest Book Entries";
linkText = "Next Page of Guest Book Entries";
}
with (this.ibapps1 = new Database()){
left = 0;
top = 0;
databaseName = "IBAPPS";
active = true;
}
with (this.guest1 = new Query()){
left = 0;
top = 0;
database = parent.ibapps1;
sql = "select * from guest order by visittime desc";
active = true;
}
with (this.guest1.rowset) {
}
with (this.streamSource1 = new StreamSource(this)){
}
with (this.streamSource1.detailBand) {
height = 1099;
}
with (this.streamSource1.detailBand.CommentHTML = new HTML(this.streamSource1.detailBand)){
height = 200;
width = 9000;
color = "black";
text = {||this.form.guest1.rowset.fields["COMMENT"].value};
}
with (this.streamSource1.detailBand.FullnameHTML = new HTML(this.streamSource1.detailBand)){
height = 200;
top = 200;
width = 9000;
color = "black";
fontBold = false;
text = {||this.form.noNull(this.form.guest1.rowset.fields["FULLNAME"].value) + this.form.noNull(" (<a href='mailto:" + this.form.guest1.rowset.fields["EMAIL"].value + "'>" + this.form.guest1.rowset.fields["EMAIL"].value + "</A>)")};
}
with (this.streamSource1.detailBand.WherefromHTML = new HTML(this.streamSource1.detailBand)){
height = 200;
top = 400;
width = 9000;
color = "black";
fontBold = false;
text = {||this.form.noNull(this.form.guest1.rowset.fields["WHEREFROM"].value + " - ") + this.form.getVisitDate(this.form) + " at " + this.form.getVisitTime(this.form)};
}
with (this.streamSource1.detailBand.FirstVisitHTML = new HTML(this.streamSource1.detailBand)){
height = 200;
top = 600;
width = 9000;
color = "mediumvioletred";
suppressIfBlank = true;
fontBold = false;
text = {||this.form.guest1.rowset.fields["FIRSTVISIT"].value ? "(First time visitor)" : ""};
}
with (this.streamSource1.detailBand.rule1 = new Rule(this.streamSource1.detailBand)){
top = 800;
size = 2;
right = 9000;
}
with (this.pageTemplate1 = new PageTemplate(this)){
height = 15840;
width = 9000;
marginTop = 0;
marginLeft = 0;
marginBottom = 0;
marginRight = 0;
gridLineWidth = 0;
color = "a4d5ff";
}
with (this.pageTemplate1.streamFrame1 = new StreamFrame(this.pageTemplate1)){
height = 10000;
top = 1599;
width = 9000;
}
with (this.pageTemplate1.GuestBookLogo = new Image(this.pageTemplate1)){
height = 1250;
width = 1250;
dataSource = "filename GESTBK31.GIF";
alignment = 4;
}
with (this.pageTemplate1.HeadingHTML = new HTML(this.pageTemplate1)){
height = 630;
left = 1500;
width = 7500;
color = "steelblue";
text = '<H1><FONT SIZE="+4"><FONT COLOR="mediumvioletred">G</FONT></FONT>uest <FONT SIZE="+4"><FONT COLOR="mediumvioletred">B</FONT></FONT>ook <FONT SIZE="+4"><FONT COLOR="mediumvioletred">E</FONT></FONT>ntries</H1>';
}
with (this.pageTemplate1.HomePageLinkImage = new Image(this.pageTemplate1)){
onImageClick = class::HomePageLinkImage_onClick;
height = 1250;
top = 12000;
width = 1250;
dataSource = "filename HOMEPG31.GIF";
alignment = 4;
}
with (this.pageTemplate1.HomePageLinkHTML = new HTML(this.pageTemplate1)){
height = 300;
left = 1500;
top = 12000;
width = 4315;
color = "black";
fontBold = false;
text = {||'<A HREF="/ibapps/index.htm">Return to Home Page</A>'};
}
with (this.pageTemplate1.rule1 = new Rule(this.pageTemplate1)){
top = 13400;
size = 2;
right = 9000;
}
with (this.pageTemplate1.generatedHTML1 = new GeneratedHTML(this.pageTemplate1)){
height = 255;
top = 13500;
width = 9000;
}
with (this.printer) {
duplex = 1;
orientation = 1;
paperSource = 15;
paperSize = 1;
resolution = 4;
color = 2;
trueTypeFonts = 2;
}
with (this.reportGroup) {
groupBy = "";
}
with (this.reportGroup.headerBand) {
height = 0;
}
with (this.reportGroup.footerBand) {
height = 0;
}
this.firstPageTemplate = this.form.pageTemplate1
this.form.pageTemplate1.nextPageTemplate = this.form.pageTemplate1
this.form.pageTemplate1.streamFrame1.streamSource = this.form.streamSource1
this.form.streamSource1.rowset = this.form.guest1.rowset
function getVisitDate(frm) {
var dateEx = new DateEx(""+frm.guest1.rowset.fields["VisitTime"].value); // in dateex.js
return (dateEx.getSDate());
}
function getVisitTime(frm) {
var dateEx = new DateEx(""+frm.guest1.rowset.fields["VisitTime"].value); // in dateex.js
return (dateEx.getSTime(false,true) + " (" + dateEx.getSTimezone() + ")");
}
function noNull( val ) {
return ( val==null ? "" : val );
}
function HomePageLinkImage_onClick()
{
// {Export} This comment causes this function body to be sent to the client
location.href="/ibapps/index.htm";
}
}