185be269e596c6fd750916af8c9143dec167e254
[Evergreen.git] / Open-ILS / src / reporter / templates / logic_header.ttk
1 <style>
2 *  {    font-family: sans-serif;
3                 font-size: 10pt;
4 }
5 </style>
6 [%
7
8 PROCESS utils;
9
10 BLOCK logme_block;
11         "\n\t<!-- " _ x _ " -->\n";
12 END;
13
14 MACRO logme(a) PROCESS logme_block x = a.list.join(', ');
15
16 USE CGI;
17 USE DBI;
18 USE WebSession;
19 USE utils = WebUtils;
20 USE config = XML.LibXML(config_xml, expand_xinclude => 1);
21
22
23 dir = '/reporter/setup/files/' _ stage_dir;
24 dir = config.findvalue(dir);
25
26 dbdriver = config.findvalue('/reporter/setup/database/driver');
27 dbname = config.findvalue('/reporter/setup/database/name');
28 dbhost = config.findvalue('/reporter/setup/database/host');
29 d_u = config.findvalue('/reporter/setup/database/user');
30 d_p = config.findvalue('/reporter/setup/database/password');
31
32 dsn = "dbi:" _ dbdriver _ ":dbname=" _ dbname _';host=' _ dbhost;
33
34 logme([dsn,d_u,d_p]);
35
36 DBI.connect(dsn,d_u,d_p);
37
38 stage2_insert = 'INSERT INTO reporter.stage2 (stage1, params, owner, pub)' _
39                                                 ' VALUES ( ?,?,?,? )';
40
41 stage3_insert = 'INSERT INTO reporter.stage3 (stage2, params, owner, pub, runtime, recurrence)' _
42                                                 ' VALUES ( ?,?,?,?,?,? )';
43 %]