RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð ....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 104.225.223.251  /  Your IP : 216.73.216.41
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux agtdemo03 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/web/dev.agtindia.co.in/test-form/wp-content/plugins/booking/core/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/test-form/wp-content/plugins/booking/core/admin/wpbc-dashboard.php
<?php /**
 * @version 1.0
 * @package Booking Calendar 
 * @category Admin Panel - Dashboard functions
 * @author wpdevelop
 *
 * @web-site https://wpbookingcalendar.com/
 * @email info@wpbookingcalendar.com 
 * 
 * @modified 2016-03-16
 */

if ( ! defined( 'ABSPATH' ) ) exit;                                             // Exit, if accessed directly


////////////////////////////////////////////////////////////////////////////////
// D a s h b o a r d      W i d g e t
////////////////////////////////////////////////////////////////////////////////
    
/** Setup Widget for Dashboard */
function wpbc_dashboard_widget_setup(){            

   // Check, if we have permission  to  show Widget  ///////////////////////////
   $is_user_activated = apply_bk_filter('multiuser_is_current_user_active',  true ); //FixIn: 6.0.1.17
   if ( ! $is_user_activated ) 
       return false;

   $user_role = get_bk_option( 'booking_user_role_booking' );
   if ( ! wpbc_is_current_user_have_this_role( $user_role ) )
       return false;
   
   
   // Add Booking Calendar Widget  to Dashboard  ///////////////////////////////
   $bk_dashboard_widget_id = 'booking_dashboard_widget';
   wp_add_dashboard_widget( $bk_dashboard_widget_id, sprintf( __( 'Booking Calendar', 'booking' ) ), 'wpbc_dashboard_widget_show', null );

   
   // Sort Dashboard. Add Booking Calendar widget to top ///////////////////////
   global $wp_meta_boxes;
   $normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
   if ( isset( $normal_dashboard[$bk_dashboard_widget_id] ) ) {
        // Backup and delete our new dashbaord widget from the end of the array
        $example_widget_backup = array( $bk_dashboard_widget_id => $normal_dashboard[$bk_dashboard_widget_id] );
        unset( $normal_dashboard[$bk_dashboard_widget_id] );
    } else
        $example_widget_backup = array();

    // Sometimes, some other plugins can modify this item, so its can be not a array
    if ( is_array( $normal_dashboard ) ) {                                      
        // Merge the two arrays together so our widget is at the beginning
        if ( is_array( $normal_dashboard ) )
            $sorted_dashboard = array_merge( $example_widget_backup, $normal_dashboard );
        else
            $sorted_dashboard = $example_widget_backup;
        // Save the sorted array back into the original metaboxes
        $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
    }
}
add_action( 'wp_dashboard_setup', 'wpbc_dashboard_widget_setup' );



/** Show Booking Dashboard Widget content */
function wpbc_dashboard_widget_show() {

    global $wpdb;
    

    // <editor-fold     defaultstate="collapsed"                        desc=" Get bookings for counting number of specific bookings "  >
    $my_resources = array();
    if ( class_exists( 'wpdev_bk_multiuser' ) ) {  
        $is_superadmin = apply_bk_filter( 'multiuser_is_user_can_be_here', true, 'only_super_admin' );
        if ( ! $is_superadmin ) { 
            
            $bk_ids = apply_bk_filter( 'get_bk_resources_of_user', false );
            
            if ( $bk_ids !== false )
                foreach ( $bk_ids as $bk_id ) 
                    $my_resources[] = $bk_id->ID;
            
            
        }
    }
    $my_resources = implode( ',', $my_resources );

    $trash_bookings = '  bk.trash != 1 ';                                //FixIn: 6.1.1.10  - check also  below usage of {$trash_bookings}

    $sql_req = "SELECT DISTINCT bk.booking_id as id, dt.approved, dt.booking_date, bk.modification_date as m_date , bk.is_new as new
                FROM {$wpdb->prefix}bookingdates as dt
                INNER JOIN {$wpdb->prefix}booking as bk
                    ON bk.booking_id = dt.booking_id "
                . " WHERE {$trash_bookings} " ;
    if ($my_resources!='') $sql_req .=     " AND  bk.booking_type IN ({$my_resources}) ";

    $sql_req .=     "ORDER BY dt.booking_date" ;
    

    $sql_results = $wpdb->get_results( $sql_req );

//               [0] => stdClass Object (
//                    [id]          => 290
//                    [approved]    => 0
//                    [booking_date]=> 2014-08-29 00:00:00
//                    [m_date]      => 2016-01-21 16:44:33
//                    [new]         => 1
//               ), ...
    // </editor-fold>
         
    
    // <editor-fold     defaultstate="collapsed"                        desc=" Count bookings "  >
    $bk_array = array();
    if ( ! empty( $sql_results ) )
        foreach ( $sql_results as $v ) {
        
            if ( !isset( $bk_array[$v->id] ) )
                $bk_array[$v->id] = array( 
                                          'dates' => array()
                                        , 'bk_today' => 0
                                        , 'm_today' => 0 
                                        );
            $bk_array[$v->id]['id']       = $v->id;
            $bk_array[$v->id]['approved'] = $v->approved;
            $bk_array[$v->id]['dates'][]  = $v->booking_date;
            $bk_array[$v->id]['m_date']   = $v->m_date;                         // Modification Booking date
            $bk_array[$v->id]['new']      = $v->new;
            if ( wpbc_is_today_date( $v->booking_date ) )  $bk_array[$v->id]['bk_today'] = 1;
            if ( wpbc_is_today_date( $v->m_date ) )        $bk_array[$v->id]['m_today']  = 1;
        }

    $counter = array(   
                      'all' => 0
                    , 'new' => 0
                    , 'pending' => 0
                    , 'approved' => 0
                    , 'booking_today' => 0
                    , 'was_made_today' => 0
    );
    foreach ( $bk_array as $k => $v ) {        
        $counter['all']++;
        if ( $v['new'] )        $counter['new']++;
        if ( $v['m_today'] )    $counter['was_made_today']++;        
        if ( $v['bk_today'] )   $counter['booking_today']++;        
        if ( $v['approved'] )   $counter['approved']++;
        else                    $counter['pending']++;        
    }
    // </editor-fold>    
    


    wpbc_dashboard_widget_css();
                
   ?>        
   <div id="wpbc_dashboard_widget_container" >
       <?php 
       
       wpbc_dashboard_section_statistic( $counter );  



	       ?><div style="clear:both;margin-bottom:20px;"></div><?php

	       wpbc_dashboard_section_version();

	       wpbc_dashboard_section_support();

	       ?><div style="clear:both;"></div><?php

		   //FixIn: 8.1.3.11
		   wpbc_dashboard_section_video_f();
		   wpbc_dashboard_section_video_p();

		   ?><div style="clear:both;"></div><?php

	       wpbc_dashboard_section_news();



       ?>
       <div style="clear:both;"></div>            
   </div>
   <div style="clear:both;"></div>   
   <?php 
   
   /*
   <div id="modal_content1" style="display:block;width:100%;height:100px;" class="modal_content_text" >
     <iframe src="https://wpbookingcalendar.com/purchase/#content" style="border:1px solid red; width:100%;height:100px;padding:0px;margin:0px;"></iframe>
   </div>
   */
}
    

/** Get Info for Dashboard */
function wpbc_get_dashboard_info() {
    
    ob_start();  
    
    wpbc_dashboard_widget_show();
  
    return ob_get_clean();  
}


/** CSS for Dashboard Widget */
function wpbc_dashboard_widget_css() {
    
    ?><style type="text/css">
        #wpbc_dashboard_widget_container {
            width:100%;
        }
        #wpbc_dashboard_widget_container .wpbc_dashboard_section {
            float:left;
            margin:0px;
            padding:0px;
            width:100%;
        }
        #wpbc_dashboard_widget_container .wpbc_dashboard_section h4 {            
            font-size: 14px;
            font-weight: 600;
            margin: 5px 0 15px;
        }     
        #bk_upgrade_section p {
            font-size: 13px;
            line-height: 1.5em;
            margin: 15px 0 0;
            padding: 0;
        }
        #dashboard-widgets-wrap #wpbc_dashboard_widget_container .wpbc_dashboard_section {
           width:49%;
        }
        #dashboard-widgets-wrap #wpbc_dashboard_widget_container .bk_right {
            float:right
        }
        #dashboard-widgets-wrap #wpbc_dashboard_widget_container .border_orrange, 
        #wpbc_dashboard_widget_container .border_orrange {
            background: #fffaf1 none repeat scroll 0 0;
            border-left: 3px solid #eeab26;
            clear: both;
            margin: 5px 5px 20px;
            padding: 10px 0;
            width: 99%;
        }
        #wpbc_dashboard_widget_container .bk_header {
            color: #555555;
            font-size: 13px;
            font-weight: 600;
            line-height: 1em;
			/* //FixIn: 8.1.3.10	*/
			padding:0 5px;
        }
        #wpbc_dashboard_widget_container .bk_table {
            background:transparent;
            border-bottom:none;
            border-top:1px solid #ECECEC;
            margin:6px 0 10px 6px;
            padding:2px 10px;
            width:95%;
            -border-radius:4px;
            -moz-border-radius:4px;
            -webkit-border-radius:4px;
            -moz-box-shadow:0 0 2px #C5C3C3;
            -webkit-box-shadow:0 0 2px #C5C3C3;
            -box-shadow:0 0 2px #C5C3C3;
        }
        #wpbc_dashboard_widget_container .bk_table td{
            border-bottom:1px solid #DDDDDD;
            line-height:19px;
            padding:4px 0px 4px 10px;
            font-size:13px;
        }
        #wpbc_dashboard_widget_container .bk_table tr td.first{
           text-align:center;
           padding:4px 0px;
        }
        #wpbc_dashboard_widget_container .bk_table tr td a {
            text-decoration: none;
        }
        #wpbc_dashboard_widget_container .bk_table tr td a span{
            font-size:18px;
            font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
        }
        #wpbc_dashboard_widget_container .bk_table td.bk_spec_font a{
            font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
            font-size:14px;
        }
        #wpbc_dashboard_widget_container .bk_table td.bk_spec_font {
            font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
            font-size:13px;
        }
        #wpbc_dashboard_widget_container .bk_table td.pending a{
            color:#E66F00;
        }
        #wpbc_dashboard_widget_container .bk_table td.new-bookings a{
            color:red;
        }
        #wpbc_dashboard_widget_container .bk_table td.actual-bookings a{
            color:green;
        }
        #bk_errror_loading {
             text-align: center;
             font-style: italic;
             font-size:11px;
        }
		#wpbc_dashboard_widget_container .bk_table tr:last-child td {
			border:none;
		}
    </style><?php
}


////////////////////////////////////////////////////////////////////////////////
// S e c t i o n s
////////////////////////////////////////////////////////////////////////////////

//FixIn: 8.1.3.11
/** Dashboard Section  - Video 1 */
function wpbc_dashboard_section_video_f() {
    ?>
    <div id='wpbc_dashboard_section_video_f' class="wpbc_dashboard_section bk_left">
        <span class="bk_header"><?php _e('Video guide' ,'booking');?> (free):</span>
		<?php  wpbc_is_dismissed( 'wpbc_dashboard_section_video_f' );        //FixIn: 8.1.3.10  ?>
		<?php // Free ?>
		<div style="text-align: center;margin:10px 0;"><iframe style="width:90%;height:auto;" src="https://www.youtube.com/embed/videoseries?list=PLabuVtqCh9dwLA5cpz1p2RrZOitLuVupR&amp;start=28&amp;rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>
    </div>
    <?php
}

//FixIn: 8.1.3.11
/** Dashboard Section  - Video 2 */
function wpbc_dashboard_section_video_p() {
    ?>
    <div id='wpbc_dashboard_section_video_p' class="wpbc_dashboard_section bk_right">
		<?php  wpbc_is_dismissed( 'wpbc_dashboard_section_video_p' );        //FixIn: 8.1.3.10 ?>
        <span class="bk_header"><?php _e('Video guide' ,'booking');?> (premium):</span>
		<?php // Premium ?>
		<div style="text-align: center;margin:10px 0;"><iframe style="width:90%;height:auto;" src="https://www.youtube.com/embed/videoseries?list=PLabuVtqCh9dyc_EO8L_1FKJyLpBuIv21_&amp;rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>
    </div>
    <?php
}

/** Dashboard Support Section */
function wpbc_dashboard_section_support() {
    ?>
    <div id="wpbc_dashboard_section_support" class="wpbc_dashboard_section bk_right">
        <span class="bk_header"><?php _e('Support' ,'booking');?>:</span>
		<?php  wpbc_is_dismissed( 'wpbc_dashboard_section_support', array( 'css' => 'padding: 0 20px;' ) );        //FixIn: 8.1.3.10  ?>
		<?php /* ?>
		<?php // Free ?>
		<div style="text-align: center;margin:10px 0;"><iframe style="width:90%;height:auto;" src="https://www.youtube.com/embed/videoseries?list=PLabuVtqCh9dwLA5cpz1p2RrZOitLuVupR&amp;start=28&amp;rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>
		<?php // Premium ?>
		<div style="text-align: center;margin:10px 0;"><iframe style="width:90%;height:auto;" src="https://www.youtube.com/embed/videoseries?list=PLabuVtqCh9dyc_EO8L_1FKJyLpBuIv21_&amp;rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>
		<?php */ ?>
        <table class="bk_table">
            <tr class="first">
                <td style="text-align:center;" class="bk_spec_font"><a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wpbc-getting-started' ), 'index.php' ) ) ); ?>"
                    ><?php _e('Getting Started' ,'booking');?></a>
                </td>
            </tr>
            <tr>
                <td style="text-align:center;" class="bk_spec_font"><a target="_blank" href="https://wpbookingcalendar.com/help/"><?php _e('Help Info' ,'booking');?></a></td>
            </tr>
            <tr>
                <td style="text-align:center;" class="bk_spec_font"><a target="_blank" href="https://wpbookingcalendar.com/faq/"><?php _e('FAQ' ,'booking');?></a></td>
            </tr>
            <tr>
                <td style="text-align:center;" class="bk_spec_font"><a href="mailto:support@wpbookingcalendar.com"><?php _e('Contact email' ,'booking');?></a></td>
            </tr>                                        
            <tr>
                <td style="text-align:center;" class="bk_spec_font"><a target="_blank" href="https://wordpress.org/plugins/booking/"><?php _e('Rate plugin (thanks:)' ,'booking');?></a></td>
            </tr>
        </table>
    </div>
    <?php 
}


/** Dashboard News Section */
function wpbc_dashboard_section_news() {

    ?><div id="wpbc_dashboard_section_news"><?php

		wp_nonce_field( 'wpbc_ajax_admin_nonce', "wpbc_admin_panel_nonce_dashboard", true, true );      // Nonce for Ajax

		?>
		<div style="width:95%;border:none;clear:both;margin:10px 6px;" id="bk_news_section">
			<div style="width: 99%;margin-right:0;" >
				<span class="bk_header" style="padding: 0;">Booking Calendar News:</span><?php

				wpbc_is_dismissed( 'wpbc_dashboard_section_news' );        //FixIn: 8.1.3.10

				?><br/><br/>
				<div id="bk_news" class="rssSummary"> <span style="font-size:13px;text-align:center;">Loading...</span></div>
				<div id="ajax_bk_respond" class="rssSummary" style="display:none;"></div>
				<script type="text/javascript">
					jQuery.ajax({
						url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
						type:'POST',
						success: function (data, textStatus){ if( textStatus == 'success' ) jQuery('#ajax_bk_respond').html( data ); },
						error: function (XMLHttpRequest, textStatus, errorThrown){ window.status = 'Ajax sending Error status:' + textStatus; },
						data:{
							action: 'CHECK_BK_NEWS',
							wpbc_nonce: document.getElementById('wpbc_admin_panel_nonce_dashboard').value
						}
					});
				</script>
			</div>
		</div>

	</div>
		<?php
}


/** Dashboard Version Section */
function wpbc_dashboard_section_version() {


    $version = 'free';
    $version = get_bk_version();
    if ( wpbc_is_this_demo() ) 
        $version = 'free';

    /*

    Disbale hidded notice about Upgrade to  higher version in paid versions
    //FixIn: 8.0.1.6
    if ( ( $version !== 'free' ) && ( class_exists('wpdev_bk_multiuser') === false ) ) { ?>
        <div class="wpbc_dashboard_section border_orrange" id="bk_upgrade_section"> 
            <div style="padding:0px 10px;width:96%;">
                <h4><?php _e('Upgrade to higher versions' ,'booking') ?>:</h4>
                <p>Check additional advanced functionality, which exist in higher versions and can be interesting for you <a href="https://wpbookingcalendar.com/overview/" target="_blank">here &raquo;</a></p>
                <p><a class="button button-primary" style="margin-top: 10px;font-weight: 600;"  href="<?php echo wpbc_up_link(); ?>" target="_blank"><?php if ( wpbc_get_ver_sufix() == '' ) { _e('Purchase' ,'booking'); } else { _e('Upgrade Now' ,'booking'); } ?></a> </p>
            </div>
        </div>
        <div style="clear:both;"></div>
        <?php if ( wpbc_get_ver_sufix() != '' ) { ?>
            <script type="text/javascript">
                jQuery(document).ready(function(){
                    jQuery('#bk_upgrade_section').animate({opacity:1},7000).fadeOut(2000);
                });
            </script>
        <?php } ?>
    <?php } 
    */
    ?>
    <div id="wpbc_dashboard_section_current_version" class="wpbc_dashboard_section" >
        <span class="bk_header"><?php _e('Current version' ,'booking');?>:</span>
        <table class="bk_table">
			<?php if ( wpbc_is_this_demo() ) { ?>
            <tr class="first">
				<td></td>
                <td style="font-weight: 600; text-align: left;"><?php _e('Demo' ,'booking');?></td>
            </tr>
			<?php } ?>
            <tr class="first">
                <td style="width:35%;text-align: right;;" class=""><?php _e('Version' ,'booking');?>:</td>
                <td style="color: #e50;font-size: 13px;font-weight: 600;text-align: left;text-shadow: 0 -1px 0 #eee;;" 
                    class="bk_spec_font"><?php 
                if ( substr( WPDEV_BK_VERSION, 0, 3 ) == '10.' ) {
                    $show_version =  substr( WPDEV_BK_VERSION , 3 ) ;
                    if ( substr($show_version, ( -1 * ( strlen( WP_BK_VERSION_NUM ) ) ) ) === WP_BK_VERSION_NUM ) {
                        $show_version = substr($show_version, 0, ( -1 * ( strlen( WP_BK_VERSION_NUM ) ) - 1 ) );
                        $show_version = str_replace('.', ' ', $show_version) . " <sup><strong style='font-size:12px;'>" . WP_BK_VERSION_NUM . "</strong></sup>" ;
                    }
                    echo $show_version ;
                } else
                    echo WPDEV_BK_VERSION;
                ?></td>
            </tr>
            <?php if ($version != 'free') { ?>
            <tr>
                <td style="width:35%;text-align: right;" class="first b"><?php _e('Type' ,'booking');?>:</td>
                <td style="text-align: left;  font-weight: 600;" class="bk_spec_font"><?php $ver = get_bk_version();if (class_exists('wpdev_bk_multiuser')) $ver = 'multiUser';$ver = str_replace('_m', ' Medium',$ver);$ver = str_replace('_l', ' Large',$ver);$ver = str_replace('_s', ' Small',$ver);$ver = str_replace('biz', 'Business',$ver); echo ucwords($ver);  ?></td>
            </tr>
            <tr>
                <td style="width:35%;text-align: right;" class="first b"><?php _e('Used for' ,'booking');?>:</td>
                <td style="text-align: left;  font-weight: 600;" class="bk_spec_font"><?php 
                        $v_type = '';
                        if( strpos( strtolower(WPDEV_BK_VERSION) , 'multisite') !== false  ) {
                            $v_type = '5';
                        } else if( strpos( strtolower(WPDEV_BK_VERSION) , 'develop') !== false  ) {
                            $v_type = '2';
                        }
                        if ( ! empty($v_type) ) { 
                            echo ' ' .$v_type . ' '. __('websites' ,'booking'); 
                        } else {
                            echo ' 1' . ' '. __('website' ,'booking'); 
                        }
                ?></td>
            </tr>
            <?php } ?>
            <tr>
                <td style="width:35%;text-align: right;" class="first b"><?php _e('Release date' ,'booking');?>:</td>
                <td style="text-align: left;  font-weight: 600;" class="bk_spec_font"><?php echo date ("d.m.Y", filemtime(WPBC_FILE)); ?></td>
            </tr>
        </table>
		<div id="wpbc_dashboard_section_current_version_upgrade">

			<table class="bk_table"style="border:none;">
				<tr>
					<td colspan="2" style="border:none;text-align:center;" class=""><?php
						?><?php  wpbc_is_dismissed( 'wpbc_dashboard_section_current_version_upgrade' , array( 'css' => 'padding: 0 0px;' ) );        //FixIn: 8.1.3.10  ?><?php
						if ($version == 'free') {
							?><a class="button-primary button" style="font-weight:600;" target="_blank" href="https://wpbookingcalendar.com/overview/"><?php _e('Check Premium Features' ,'booking');?></a><?php
						} elseif  ( wpbc_get_ver_sufix() != '' )  {
							?><a class="button-primary button"  href="<?php echo wpbc_get_settings_url(); ?>&tab=upgrade"><?php _e('Upgrade' ,'booking');?></a><?php
						} else {
							?><a class="button-primary button" target="_blank" href="https://wpbookingcalendar.com/overview/"><?php _e('Explore Premium Features' ,'booking');?></a><?php
						}
				  ?></td>
				</tr>
			</table>
		</div>
    </div>
    
    <?php 
}


/** Dashboard Statistic Section */
function wpbc_dashboard_section_statistic( $counter ) {
    
    $bk_admin_url = wpbc_get_bookings_url() . '&wh_approved=';
    ?>
    <div class="wpbc_dashboard_section bk_right">
        <span class="bk_header"><?php _e('Statistic' ,'booking');?>:</span>
        <table class="bk_table">
            <tr class="first">
                <td class="first"> <a href="<?php echo $bk_admin_url,'&wh_is_new=1&wh_booking_date=3&view_mode=vm_listing'; ?>"><span class=""><?php echo $counter['new']; ?></span></a> </td>
                <td class=""> <a href="<?php echo $bk_admin_url,'&wh_is_new=1&wh_booking_date=3&view_mode=vm_listing'; ?>"><?php _e('New (unverified) booking(s)' ,'booking');?></a></td>
            </tr>
            <tr>
                <td class="first"> <a href="<?php echo $bk_admin_url,'&wh_approved=0&wh_booking_date=3&view_mode=vm_listing'; ?>"><span class=""><?php echo $counter['pending']; ?></span></a></td>
                <td class="pending"><a href="<?php echo $bk_admin_url,'&wh_approved=0&wh_booking_date=3&view_mode=vm_listing'; ?>" class=""><?php _e('Pending booking(s)' ,'booking');?></a></td>
            </tr>
        </table>
    </div>
    <div class="wpbc_dashboard_section" >
        <span class="bk_header"><?php _e('Agenda' ,'booking');?>:</span>
        <table class="bk_table">
            <tr class="first">
                <td class="first"> <a href="<?php echo $bk_admin_url,'&wh_modification_date=1&wh_booking_date=3&view_mode=vm_listing'; ?>"><span><?php echo $counter['was_made_today']; ?></span></a> </td>
                <td class="new-bookings"><a href="<?php echo $bk_admin_url,'&wh_modification_date=1&wh_booking_date=3&view_mode=vm_listing'; ?>" class=""><?php _e('New booking(s) made today' ,'booking');?></a> </td>
            </tr>
            <tr>
                <td class="first"> <a href="<?php echo $bk_admin_url,'&wh_booking_date=1&view_mode=vm_listing'; ?>"><span><?php echo $counter['booking_today']; ?></span></a> </td>
                <td class="actual-bookings"> <a href="<?php echo $bk_admin_url,'&wh_booking_date=1&view_mode=vm_listing'; ?>" class=""><?php _e('Bookings for today' ,'booking');?></a> </td>
            </tr>
        </table>
    </div>
    <?php
}

Youez - 2016 - github.com/yon3zu
LinuXploit