Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
Using coolets in an enterprise environment (continued)

CURSOR au_cur (hpcode varchar2) IS
SELECT 'PARTNERID=XXXXX||RECORDID='|| TO_CHAR(USER_ID) || '||LAST_NAME=' || rtrim(last_name) || '||FIRST_NAME=' || rtrim(first_name) || '||TITLE=' || decode(title_code,1,'Mr.',2,'Mrs.',3,'Miss',4,'Dr.',5,'Ms.',' ') ||
'||COMPANY=' || rtrim(u.institute_id) || '||ADDRESS=' || building || building_sufx || floor || wing || room || room_sufx || '||CITY=BETHESDA||STATE=MD||COUNTRY=USA' || '||EMAIL=' || substr(rtrim(E_MAIL_ADDRESS),1,50) || '||WORK_PHONE=' || to_char(phone_num) || '||FAX=' || to_char(fax_no) || '||NOTE= USERID(' || TO_CHAR(USER_ID) || ') MAIL ADDRESS IS ' || MAIL_ADDRESS || ' HP AREA IS ' || HP_CODE || '||' AUCOOLA
from oracle8.users u, oracle8.institutes i where u.institute_id = i.institute_id and u.status = 'A' and u.authorized = 'Y' and (u.hp_code=hpcode);

aurec au_cur%ROWTYPE;

Cursor MEMO_CUR is used to generate the hidden fields for an HTML form that will contain a coolet for synchronizing the Memo Pad.

CURSOR memo_cur is
select 'PARTNERID=12345||RECORDID='|| SUBSTR(S.section_name,1,66) || '||TITLE='||S.SECTION_NAME || '||NOTE=' || S.section_topic || '||' MEMOCOOLA from oracle8.sections s where s.disable='Y';

memorec memo_cur%rowtype;
i integer;

Build the HTML page to display the coolet using the Oracle PL/SQL Web Toolkit packages.

BEGIN
htp.htmlOpen;
htp.headOpen;
htp.title( 'Coola Web Site');
htp.print('<META HTTP?EQUIV="expires" CONTENT="0">');
htp.print( '<SCRIPT LANGUAGE="javascript" SRC="http://www.coola.com/coolascripts.js";>' );
htp.print('</SCRIPT>' );
htp.print('<link rel="stylesheet" href="/webhtml/nihstyles1.css">');
htp.headClose;
htp.bodyOpen(cattributes =>'class ="bodycopy1"');

Generate the form containing hidden fields for the Address Book coolet using the AU_CUR cursor.

htp.formOpen( curl => 'http://www.coola.com/cgi?bin/addinfo.cgi', cmethod => 'POST',cattributes =>'onsubmit="coolapopup()" TARGET="coolawindow"');
i:=0;
for aurec in au_cur(hpcode) loop
i := 1;
htp.formHidden(cname => 'ADDRESS', cvalue => AUREC.AUCOOLA);
end loop;
htp.tableOpen( calign => 'CENTER', cattributes => ' border="1" cellspacing="0" cellpadding="0" width="100%"' );
htp.tableRowOpen;
htp.tableData( htf.centerOpen ||
'<B>This Snap shot syncs the data for Authorized Users in HP Area ' || hpcode || '</B>' ||
htf.centerClose,cattributes =>'width = "100%"');
htp.tableRowClose;
htp.tableRowOpen;
if i != 0 then
htp.tableData( '<input type=image name = "Coola ?Sync Authorized Users to palm" ALT="Coola ?Sync Authorized Users to palm" src="http://www.coola.com/images/synctopalm.gif"; align="bottom" border="0">', cattributes => ' width="100%"', calign => 'CENTER');
else
htp.tableData( '<B>No Authorized Users for this HP Area</B>', cattributes => ' width="100%"', calign => 'CENTER');
end if;
htp.tabLERowClose;
htp.tableClose;
htp.formClose;




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2000-2008, ZATZ Publishing. All rights reserved worldwide.