25 "account" => array(
'filter' => FILTER_SANITIZE_STRING)
28 HCU_ImportVars( $inputVars,
"", $varOk );
31 $accounts = Get_UserAccounts( $HB_ENV[
'dbh'], $HB_ENV[
'Cu'], $HB_ENV[
'Uid'] );
32 $accountList = $accounts[
'data'];
36 if ( !isset( $inputVars[
"account"] ) || is_null( $inputVars[
"account"] ) ) {
39 if ( count( $accountList ) == 1 ) {
41 $accountToUse = $accountList[0];
42 }
else if ( count( $accountList ) > 1 ) {
45 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
47 <script type=
"text/javascript">
49 $(document).ready(
function() {
51 $(
"#lnkCancel").click(
function() {
53 location.href =
"<?php echo $HB_ENV['loginpath'] . "/
" . $HB_ENV['defaultScript'] . "?
" . $HB_ENV['cuquery']; ?>";
56 $(
".account-selector li" ).hover(
58 $( this ).addClass(
"k-primary" );
60 $( this ).removeClass(
"k-primary" );
64 $(
".local-list-element").kendoTouch({
66 var value = $(e.event.target).data(
"value");
72 function AddAccount( account ) {
73 $(
"#account").val( account );
76 $(
"#formAccount").submit();
83 .local-selector-width {
93 <div
class=
"container-fluid">
95 <div
class=
" col-xs-12 col-sm-10 col-md-8">
96 <div
class=
"well well-sm">
100 <h3><?php echo $MC->msg(
'Please select an account', HCU_DISPLAY_AS_HTML); ?></h3>
103 <!-- FORM CONTENT -->
104 <form
id=
'formAccount' name=
'formAccount' method=
"GET" action=
"<?php echo $HB_ENV['loginpath'] . "/
" . $HB_ENV['currentscript'] . "?
" ?>">
107 $getKeys = array_keys( $_GET );
108 for ( $i = 0; $i < count( $getKeys ); $i++ ) {
109 print
"<input type='hidden' name='{$getKeys[$i]}' value='{$_GET[$getKeys[$i]]}'>";
112 <input type=
"hidden" name=
"account" id=
"account" value=
"">
114 <ul
class=
"list-group local-list-spacer account-selector">
117 for ( $i = 0; $i < count( $accountList ); $i++ ) {
118 $encryptedAccount = hcu_encrypturl( $accountList[$i], $HB_ENV[
'historyHash'] );
119 print
"<li data-value='{$encryptedAccount}' class='list-group-item local-list-element'>{$accountList[$i]}</li>";
127 <div
class=
"col-xs-12 col-sm-3 col-md-2">
128 <span href=
"##" class=
"k-button hcu-all-100 hcu-xs-margin-top hcu-xs-btn-pad" id=
"lnkCancel"><?php echo $MC->msg(
"Cancel", HCU_DISPLAY_AS_HTML); ?></span>
134 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');
140 header (
"Location: hcuPermNotice.prg?cu=" . $HB_ENV[
"Cu"] );
145 $accountToUse = hcu_decrypturl( $inputVars[
"account"], $HB_ENV[
'historyHash'] );
148 if ( !in_array( $accountToUse, $accountList ) ) {
155 if ( $accountToUse ==
"" ) {
156 $serviceErrorMsg =
"An error was encountered trying to determine account to use.";
157 $serviceErrorCode =
'915';
159 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
163 $HB_ENV[
"selected_account"] = $accountToUse;