Odyssey
AppAdmView.prg
1 <?php
2 
3  // Configure this script to call the lnapp script that will present the data
4 
5 
6  $DB_TABLE_PREFIX = "lnapp";
7 
8  $libPath = dirname(__FILE__) . "/../../eforms/library/";
9  $incPath = dirname(__FILE__) . "/../../eforms/includes/";
10  $sharedLibPath = dirname(__FILE__) . "/../../shared/library/";
11 
12  // ** SET THE VALUES TO LOAD THE APPLICATION
13  $DMSAPP_CURRENTUSERID = intval($_GET['app']);
14  $DMSAPP_CURRENTCUCODE = $Cu;
15  $DMSAPP_CSS = dirname(__FILE__) . "/../../eforms/static/css/styles.css";
16 
17  // ** THIS VALUES -- tells the include script to load from this value rather than a different variable on the GET
18  $Admin_View_App = intval($_GET['view']);
19 
20  $form2load = "lnappview.i";
21 
22  require_once ($libPath . "lnappfunctions.i");
23  require_once ($sharedLibPath . "cu_fun.i"); // Includes the disp_text function used in lnappview.i.
24 
25  $sql = "SELECT pname, min_chlng_qst, retrylimit, orgname
26  FROM cuadmin
27  WHERE cu = '" . prep_save($Cu, 12) . "'; ";
28  $cu_rs = db_query($sql, $dbh);
29 
30  if (db_num_rows($cu_rs) > 0) {
31 
32  // ** Load other fields from database
33  $cu_row = db_fetch_assoc($cu_rs);
34  // ** OVERRIDE DEFAULT VALUES
35  // * Product Name
36  $DMSAPP_PRODUCTNAME = trim($cu_row['pname']);
37  // * Credit Union Name
38  $DMSAPP_CUNAME = trim($cu_row['orgname']);
39  }
40  $sql = "SELECT cu, appconfig
41  FROM lnappconfig
42  WHERE cu = '" . prep_save($Cu, 12) . "';";
43  $config_rs = db_query($sql, $dbh);
44  if ($config_row = db_fetch_assoc($config_rs)) {
45 
46  $configOptions = json_decode($config_row['appconfig'], true);
47  if (json_last_error() == JSON_ERROR_NONE) {
48  // ** Use the options for the loan app
49  if (key_exists("configLoanCSS", $configOptions)) {
50  $DMSAPP_CSS = $configOptions['configLoanCSS'];
51  }
52  }
53  }
54 
55 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
56 <html xmlns="http://www.w3.org/1999/xhtml">
57 <head>
58  <meta name="keywords" content="" />
59  <meta name="description" content="" />
60  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
61  <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"/>
62  <title><?php echo $DMSAPP_CUNAME; ?> Online Application</title>
63 
64  <?php
65  /* START PASTE (copied from admin's main.prg page.) */
66 
67  // * SET the Kendo Versions on Amazon
68  $cloudfrontDomainName = GetCloudFrontDomainName();
69  $homecuKendoVersion = GetHomecuKendoVersion();
70  $bootstrapVersion = GetHomecuBootstrapVersion();
71  $fontawesomeVersion = GetFontawesomeVersion();
72  $loadStyleSheet = GetAdminDefaultKendoStyle();
73 
74  if (HCU_array_key_exists("HTTP_ACCEPT_ENCODING", $_SERVER)) {
75  $useGZExt = (stristr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE ? ".jgz" : "");
76  }
77 
78  print <<< HTML_INCLUDES
79  <link rel='stylesheet' media='all' type='text/css' href='https://{$cloudfrontDomainName}/homecu/css/reset.4085.min.css' />
80 
81  <!-- BASE BOOTSTRAP -->
82  <link href='https://{$cloudfrontDomainName}/homecu/css/bootstrap/{$bootstrapVersion}/css/bootstrap.css' rel='stylesheet'/>
83 
84  <!-- KENDO BOOTSTRAP COMMON STYLES - - - REPLACES kendo.common.css -->
85  <link href='https://{$cloudfrontDomainName}/homecu/css/KendoUI/{$homecuKendoVersion}/kendo.common-bootstrap.min.css' rel='stylesheet'/>
86 
87  <!-- KENDO BOOTSTRAP THEME */ -->
88  <link href='https://{$cloudfrontDomainName}/homecu/css/KendoUI/{$homecuKendoVersion}/kendo.{$loadStyleSheet}.min.css' rel='stylesheet'/>
89 
90  <!-- METIS MENU -->
91  <link href='/static/css/metisMenu.css' rel='stylesheet'/>
92 
93  <!-- /* CUSTOM KENDO BOOTSTRAP STYLING */ -->
94  <link rel='stylesheet' media='all' type='text/css' href='/shared/static/css/homecu-custom-kendo-boot.css' />
95 
96  <!-- /* HOMECU BASE LAYOUT */ -->
97  <link rel='stylesheet' media='all' type='text/css' href='/shared/static/css/hcuLayout.css' />
98  <link rel='stylesheet' media='all' type='text/css' href='/admbin/static/css/layout.css' />
99 
100  <!-- /* FONT AWESOME */ -->
101  <link href='https://{$cloudfrontDomainName}/homecu/css/font-awesome/{$fontawesomeVersion}/css/font-awesome.css' rel='stylesheet'/>
102 
103  <!-- /* CREDIT UNION BRANDING CUSTOM STYLES */ -->
104  <link rel='stylesheet' media='all' type='text/css' href='/admbin/static/css/brand.css' />
105 
106  <!-- /* CREDIT UNION BRANDING CUSTOM STYLES */ -->
107  <link rel='stylesheet' media='all' type='text/css' href='/admbin/static/css/admin_master.css' />
108 
109  <!-- /**
110  * JAVASCRIPT INCLUDES
111  */
112  /* JQUERY BASE */ -->
113  <script type='text/javascript' src='https://{$cloudfrontDomainName}/jquery/js/jquery-1.10.2.min.js{$useGZExt}'></script>
114 
115  <!-- /* KENDO FULL WIDGET INCLUDE - - CREATE CUSTOM FOR PRODUCTION */ -->
116  <script src='https://{$cloudfrontDomainName}/homecu/js/KendoUI/{$homecuKendoVersion}/kendo.web.min.js'></script>
117  <!-- /* BOOTSTRAP JAVASCRIPT */ -->
118  <script src='https://{$cloudfrontDomainName}/homecu/js/bootstrap/{$bootstrapVersion}/js/bootstrap.js'></script>
119 
120  <!-- /* CUSTOM JQUERY TIMEOUT DIALOG SCRIPT */ -->
121  <script type='text/javascript' src='/static/js/jquery-timeout-dialog.js'></script>
122  <!-- /* JQUERY COOKIE */ -->
123  <script type='text/javascript' src='https://{$cloudfrontDomainName}/homecu/js/jquery.cookie.js'></script>
124 
125  <!-- /* HOMECU CUSTOM ERRORS FOR FORMS */ -->
126  <script type='text/javascript' src='/shared/static/js/hcuFormError.js'></script>
127 
128  <!-- /* HOMECU CUSTOM KENDO SETTINGS */ -->
129  <script type='text/javascript' src='https://{$cloudfrontDomainName}/homecu/js/kendo.homecu.custom.4385.min.js'></script>
130 
131  <!-- /* metisMenu */ -->
132  <script type='text/javascript' src='/static/js/metisMenu.js'></script>
133 
134  <script type='text/javascript' src='/shared/static/js/kendo.homecu.custom.js'></script>
135 
136 HTML_INCLUDES;
137  ?>
138 </head>
139 <body>
140 <div id="wrapper">
141  <div id="header">
142  <div id="logo">
143  <h1></h1>
144  <p></p>
145  </div>
146  </div>
147 
148  <div id="page">
149  <div id="page-bgtop">
150  <!-- CONTENT -->
151  <?php
152 
153  include_once($incPath . $form2load);
154 
155  ?>
156 
157  <!-- END CONTENT -->
158  </div>
159  </div>
160 
161  <!-- end #page -->
162 </div>
163 
164 </body>
165 </html>