Odyssey
ImageSOLO.prg
1 <?php
2 
3 $serviceShowInfo = false;
4 $serviceLoadMenu = false;
5 $serviceShowMenu = false;
6 
7 /**
8  * When check image requests come from Admin we need to set
9  * $serviceMinimal to true or the system will look for a user
10  * cookie.
11  *
12  * In order to set the $serviceMinimal value we need to know
13  * the "adm" value from $_REQUEST. We need to include the hcuLoadLibs.i
14  * script before hcuService.i does in order to properly import and check
15  * the "adm" value.
16  */
17 require_once( dirname(__FILE__) . "/../library/hcuLoadLibs.i" );
18 
19 // Import request values
20 $inPost = array();
21 $varOk = array(
22  "CKITEM" => array("filter" => FILTER_SANITIZE_STRING),
23  "CKHASH" => array("filter" => FILTER_SANITIZE_STRING),
24  "CKSIDE" => array("filter" => FILTER_SANITIZE_STRING),
25  "CKARCHIVE" => array("filter" => FILTER_SANITIZE_STRING),
26  "adm" => array("filter" => FILTER_SANITIZE_STRING)
27 );
28 HCU_ImportVars( $inPost, "", $varOk );
29 
30 $CHK_URL = "{$_SERVER['PHP_SELF']}?";
31 $CKITEM = isset($inPost["CKITEM"]) ? $inPost["CKITEM"] : null;
32 $CKHASH = isset($inPost["CKHASH"]) ? $inPost["CKHASH"] : null;
33 $CKSIDE = isset($inPost["CKSIDE"]) ? $inPost["CKSIDE"] : "F";
34 $CKARCHIVE = isset($inPost["CKARCHIVE"]) ? $inPost["CKARCHIVE"] : null;
35 $adm = isset($inPost["adm"]) ? $inPost["adm"] : null;
36 
37 /**
38  * adm=1 means we come from the Account Hub > View Check Images card
39  * set $serviceMinimal to avoid checking for user cookies or check iamge
40  * content will not display.
41  */
42 if ($adm == "1") {
43  $serviceMinimal = true;
44 
45  /**
46  * Must check Admin cookie credentials before proceeding.
47  *
48  * If Admin cookie verification fails, the ck_aticket.i script
49  * will try to redirect to the Admin login script.
50  *
51  * ck_aticket.i needs the following variables in order to redirect
52  * smoothly without throwing errors to the console and showing
53  * Page Not Found.
54  */
55  $SYSENV = LoadSystemEnv('admin');
56 
57  $frm_login = false;
58  $http_scheme = $SYSENV['require_encryption'] ? 'https' : 'http';
59  $menu_link = "{$http_scheme}://{$_SERVER['HTTP_HOST']}/admbin/main.prg?ft=71";
60 
61  require_once(dirname(__FILE__) . '/../../admcom/library/Set_aTicket.i');
62  require_once(dirname(__FILE__) . '/../../admcom/library/ck_aticket.i');
63 }
64 
65 require_once(dirname(__FILE__) . '/../library/hcuService.i');
66 
67 /**
68  * hcuImages.i needs the $Cu value, coming from Admin we will not have it.
69  * hcuService.i will pull, sanitize and validate the "cu" value from the URL.
70  *
71  * From Archive Check or History on Banking, we will have the "Cu" value from
72  * the environment already sanitized and ready for use.
73  */
74 $Cu = isset($HB_ENV['Cu']) ? $HB_ENV['Cu'] : $HB_ENV['cu'];
75 
76 require_once(dirname(__FILE__) . '/../../shared/library/hcuImages.i');