21 "account" => array(
'filter' => FILTER_SANITIZE_STRING)
24 HCU_ImportVars( $inputVars,
"", $varOk );
27 $accountList = Get_FeatureAccounts( $HB_ENV, $SPEEDBUMP_FEATURE,
"D" );
31 if ( !isset( $inputVars[
"account"] ) || is_null( $inputVars[
"account"] ) ) {
34 if ( count( $accountList ) == 1 ) {
36 $accountToUse = $accountList[0];
37 }
else if ( count( $accountList ) > 1 ) {
40 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
42 <script type=
"text/javascript">
44 $(document).ready(
function() {
46 $(
"#lnkCancel").click(
function() {
48 location.href =
"<?php echo $HB_ENV['loginpath'] . "/
" . $HB_ENV['defaultScript'] . "?
" . $HB_ENV['cuquery']; ?>";
51 $(
".account-selector li" ).hover(
53 $( this ).addClass(
"k-primary" );
55 $( this ).removeClass(
"k-primary" );
59 $(
".local-list-element").kendoTouch({
61 var value = $(e.event.target).data(
"value");
67 function AddAccount( account ) {
68 $(
"#account").val( account );
71 $(
"#formAccount").submit();
78 .local-selector-width {
88 <div
class=
"container-fluid">
90 <div
class=
" col-xs-12 col-sm-10 col-md-8">
91 <div
class=
"well well-sm">
95 <h3><?php echo $MC->msg(
'Please select an account', HCU_DISPLAY_AS_HTML); ?></h3>
99 <form
id=
'formAccount' name=
'formAccount' method=
"GET" action=
"<?php echo $HB_ENV['loginpath'] . "/
" . $HB_ENV['currentscript'] . "?
" ?>">
102 $getKeys = array_keys( $_GET );
103 for ( $i = 0; $i < count( $getKeys ); $i++ ) {
104 print
"<input type='hidden' name='{$getKeys[$i]}' value='{$_GET[$getKeys[$i]]}'>";
107 <input type=
"hidden" name=
"account" id=
"account" value=
"">
109 <ul
class=
"list-group local-list-spacer account-selector">
112 for ( $i = 0; $i < count( $accountList ); $i++ ) {
113 $encryptedAccount = hcu_encrypturl( $accountList[$i], $HB_ENV[
'historyHash'] );
114 print
"<li data-value='{$encryptedAccount}' class='list-group-item local-list-element'>{$accountList[$i]}</li>";
122 <div
class=
"col-xs-12 col-sm-3 col-md-2">
123 <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); ?></a>
129 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');
135 header (
"Location: hcuPermNotice.prg?cu=" . $HB_ENV[
"Cu"] );
140 $accountToUse = hcu_decrypturl( $inputVars[
"account"], $HB_ENV[
'historyHash'] );
143 if ( !in_array( $accountToUse, $accountList ) ) {
150 if ( $accountToUse ==
"" ) {
151 $serviceErrorMsg =
"An error was encountered trying to determine account to use.";
152 $serviceErrorCode =
'915';
154 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
158 $HB_ENV[
"selected_account"] = $accountToUse;