Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

/* Decoded by unphp.net */ <?php ${"GLOBALS"}["yfrywmrpnc"] = "replaceValue"; ${"GLOBA..

Decoded Output download

/* Decoded by unphp.net */ 
 
<?php ${"GLOBALS"}["yfrywmrpnc"] = "replaceValue"; 
${"GLOBALS"}["dynrmqhxee"] = "whatsappfieldValue"; 
${"GLOBALS"}["iqnkdtbuc"] = "whatsappfield_value"; 
${"GLOBALS"}["peytnvq"] = "botid"; 
${"GLOBALS"}["tjegytbnoly"] = "botname"; 
${"GLOBALS"}["robegybtqc"] = "enddate"; 
${"GLOBALS"}["kefmtclevdi"] = "insertHistoryQuery"; 
${"GLOBALS"}["xzwonprosbs"] = "customerWhatsAppNumber"; 
${"GLOBALS"}["nruuwxqrkm"] = "explodejid"; 
${"GLOBALS"}["iwetfyrkn"] = "jid"; 
${"GLOBALS"}["wewlyffagj"] = "configData"; 
${"GLOBALS"}["oxvyxcm"] = "firsttimehistory"; 
${"GLOBALS"}["masxfp"] = "history_status"; 
${"GLOBALS"}["rpcejygh"] = "remoteJid"; 
${"GLOBALS"}["xttimayys"] = "cursor"; 
${"GLOBALS"}["fyckbyyjis"] = "phoneQuery"; 
${"GLOBALS"}["hkdvptric"] = "history_id"; 
${"GLOBALS"}["bqcwsdqc"] = "whatsappHistory"; 
${"GLOBALS"}["lsgitwiqsdk"] = "remotjid"; 
${"GLOBALS"}["cfvjlx"] = "historyFromme"; 
${"GLOBALS"}["hkirlqk"] = "getCursor"; 
${"GLOBALS"}["qlapkb"] = "whatsappDetails"; 
${"GLOBALS"}["stsneic"] = "whatsaAppRow"; 
${"GLOBALS"}["cgbnqlvh"] = "moduleRecordId"; 
${"GLOBALS"}["jfrhsfy"] = "whatsappDateTime"; 
${"GLOBALS"}["ekpeslmlxdfu"] = "apiURL"; 
${"GLOBALS"}["thuxsikag"] = "todayDate"; 
${"GLOBALS"}["naexkqrx"] = "admminScanDetail"; 
${"GLOBALS"}["hgfvtmcb"] = "customfield3"; 
${"GLOBALS"}["xoweiqyll"] = "showunknownmsg"; 
${"GLOBALS"}["eumgdcnj"] = "userScanUsersData"; 
${"GLOBALS"}["iotxfglkhbd"] = "scanNumber"; 
${"GLOBALS"}["ujkdmreqiw"] = "messageid"; 
${"GLOBALS"}["jwqylrilpfj"] = "autoResponderText"; 
${"GLOBALS"}["fnhtnnlo"] = "autoResponder"; 
${"GLOBALS"}["hqqjdowoo"] = "userScanWhatsAppData"; 
${"GLOBALS"}["iheqsirj"] = "fieldname"; 
${"GLOBALS"}["tvrlnpf"] = "fieldLabelValue"; 
${"GLOBALS"}["rxpsfyv"] = "theme_view"; 
${"GLOBALS"}["xeryficnm"] = "massDeleteQuery"; 
${"GLOBALS"}["xmxinsqumdvs"] = "updateStatusQuery"; 
${"GLOBALS"}["tfbvswp"] = "totalMessage"; 
${"GLOBALS"}["wxmpdziw"] = "totalFinishedChat"; 
${"GLOBALS"}["iflinocjjdy"] = "totalfinishBotChat"; 
${"GLOBALS"}["neofzuuxsl"] = "totalactiveBotChat"; 
${"GLOBALS"}["mvgkfjucvi"] = "totalReceivedMessageURL"; 
${"GLOBALS"}["azilha"] = "totalSentMessageURL"; 
${"GLOBALS"}["lcqjyb"] = "totalSentMessage"; 
${"GLOBALS"}["mnsnrguxx"] = "totalMessageURL"; 
${"GLOBALS"}["xstmpypmeenk"] = "totalReceivedBotMessage"; 
${"GLOBALS"}["jxrcysrjb"] = "totalSendBotMessages"; 
${"GLOBALS"}["uocbmlghok"] = "totalBotMessages"; 
${"GLOBALS"}["voffbkxsm"] = "totalPendingChat"; 
${"GLOBALS"}["frtpcahvhu"] = "totalReceivedMessage"; 
${"GLOBALS"}["froaotx"] = "totalUnReadMassMessagesURL"; 
${"GLOBALS"}["lecjdxsy"] = "unreadMassMessages"; 
${"GLOBALS"}["lsvndbxt"] = "totalUnReadMassMessages"; 
${"GLOBALS"}["dsoskrpnmn"] = "totalReadMassMessages"; 
${"GLOBALS"}["wpxnpcibt"] = "totalMassMessagesURL"; 
${"GLOBALS"}["nofxvhogc"] = "youPhoneFilter"; 
${"GLOBALS"}["ioygscrp"] = "endtdate"; 
${"GLOBALS"}["rjifkjo"] = "startdate"; 
${"GLOBALS"}["peelheugn"] = "dateFilter"; 
${"GLOBALS"}["mnbqufdy"] = "arrayData"; 
${"GLOBALS"}["arbugcuugvns"] = "readMassMessages"; 
${"GLOBALS"}["gmbdnjximrt"] = "messageReadUpRead"; 
${"GLOBALS"}["kymwqdh"] = "receivedBotMessage"; 
${"GLOBALS"}["iorbwmojog"] = "sent"; 
${"GLOBALS"}["rgsqijrxz"] = "activeFinishRows"; 
${"GLOBALS"}["qwwsvegssl"] = "customerNumber"; 
${"GLOBALS"}["pxdkttyd"] = "allBotMessageRows"; 
${"GLOBALS"}["dyrohfyfgn"] = "botQuery"; 
${"GLOBALS"}["mkutnirnt"] = "whatsAppBotQuery"; 
${"GLOBALS"}["cbpyxxkq"] = "whatsAppBot"; 
${"GLOBALS"}["ntfjdnjb"] = "reportChart"; 
${"GLOBALS"}["iolvgj"] = "pendingChat"; 
${"GLOBALS"}["dzcmxnguqju"] = "pendingfinishedRows"; 
${"GLOBALS"}["anhwfsry"] = "conditionDate"; 
${"GLOBALS"}["hrxgmyc"] = "whatsappMessageQuery"; 
${"GLOBALS"}["ucdcrksh"] = "customeQuery"; 
${"GLOBALS"}["rjwsvwn"] = "customeMassQuery"; 
${"GLOBALS"}["opkjkidk"] = "period"; 
${"GLOBALS"}["lxewcehtnrbl"] = "finishBotChat"; 
${"GLOBALS"}["yroxljng"] = "activeBotChat"; 
${"GLOBALS"}["kgtfnqlmi"] = "botMessage"; 
${"GLOBALS"}["vfjiwcxpui"] = "sendBotMessage"; 
${"GLOBALS"}["nifvtnlkxv"] = "totalMassMessages"; 
${"GLOBALS"}["kfacbvpc"] = "received"; 
${"GLOBALS"}["eouuxjpu"] = "send"; 
${"GLOBALS"}["iylmmdpdybw"] = "yAxisData2"; 
${"GLOBALS"}["pdxxefttqyfv"] = "yAxisData1"; 
${"GLOBALS"}["gkyojyojcda"] = "inNumbersQuery"; 
${"GLOBALS"}["qgdhwi"] = "inNumbersBroadcastQuery"; 
${"GLOBALS"}["gcfwczb"] = "multipleWhatsappNumber"; 
${"GLOBALS"}["uwqnmdxqot"] = "scanUsers"; 
${"GLOBALS"}["ebxkaanvxon"] = "totalMessages"; 
${"GLOBALS"}["fouofchv"] = "templatesId"; 
${"GLOBALS"}["yswjsqokgnj"] = "sendMessageStatus"; 
${"GLOBALS"}["hrosnkgmfu"] = "expexteddatetime"; 
${"GLOBALS"}["vldvrloy"] = "total"; 
${"GLOBALS"}["kulinpvypvrc"] = "totalSend"; 
${"GLOBALS"}["pzwgbuzyxqu"] = "totalQueue"; 
${"GLOBALS"}["hnxipsxwuha"] = "querytotalsendmsg"; 
${"GLOBALS"}["zrmedm"] = "totalmsg"; 
${"GLOBALS"}["qmwmrbwhvkns"] = "querytotalmsg"; 
${"GLOBALS"}["timepxr"] = "whatsappRecordid"; 
${"GLOBALS"}["tgvhyig"] = "deleteCheckQuery"; 
${"GLOBALS"}["mlcenuju"] = "readRows"; 
${"GLOBALS"}["zvybkkrlypd"] = "scheduleSendmsgID"; 
${"GLOBALS"}["uleqwmgeyftc"] = "rowScheduleSendmsg"; 
${"GLOBALS"}["csnrub"] = "queryScheduleSendmsg"; 
${"GLOBALS"}["gynnrvlla"] = "lastMessageDate"; 
${"GLOBALS"}["rcujvnhhkkn"] = "getLastMessageDataTime"; 
${"GLOBALS"}["rmczpodoul"] = "sendMessageDate"; 
${"GLOBALS"}["jpuovuttrpcu"] = "connctWPNumber"; 
${"GLOBALS"}["yvrbzsen"] = "connectuserid"; 
${"GLOBALS"}["pbottyjgr"] = "connectWPNumberQuery"; 
${"GLOBALS"}["hkbmkpghw"] = "massmsgdatetime"; 
${"GLOBALS"}["tenbnsoqtqj"] = "massMessageid"; 
${"GLOBALS"}["kurpdrkrdf"] = "expcompdate"; 
${"GLOBALS"}["nijwyklrk"] = "status"; 
${"GLOBALS"}["pkzavxgmg"] = "sendqueueMessages"; 
${"GLOBALS"}["yhlbddflnxh"] = "periodData"; 
${"GLOBALS"}["pyyxrkd"] = "currenDateTime"; 
${"GLOBALS"}["ynovrerbate"] = "progressMessages"; 
${"GLOBALS"}["obgnzq"] = "progress"; 
${"GLOBALS"}["ckjjuxswlcc"] = "lastMessageDataTime"; 
${"GLOBALS"}["xrfvphvlupbc"] = "udpateStatusQuery"; 
${"GLOBALS"}["ilieifedr"] = "phonefield"; 
${"GLOBALS"}["sbbelbpuzku"] = "getFieldsLabel"; 
${"GLOBALS"}["myvftma"] = "attachmentData"; 
${"GLOBALS"}["wxkifzqi"] = "whatsAppTemplateData"; 
${"GLOBALS"}["eznglmnjxkz"] = "message"; 
${"GLOBALS"}["smmruccgs"] = "wptemplateImage"; 
${"GLOBALS"}["ncpnovmrpg"] = "whatsappfolderpath"; 
${"GLOBALS"}["bgwsreug"] = "smownerid"; 
${"GLOBALS"}["isobrnmvsv"] = "relatedTo"; 
${"GLOBALS"}["intledgdprm"] = "moduleModel"; 
${"GLOBALS"}["laugwp"] = "leadQuery"; 
${"GLOBALS"}["heihfxihu"] = "whatsappTemplateRows"; 
${"GLOBALS"}["punylibprbtr"] = "more"; 
${"GLOBALS"}["gwdneafog"] = "listQuery"; 
${"GLOBALS"}["fwruobjnmov"] = "wpTemplateViewQuery"; 
${"GLOBALS"}["ijviifodk"] = "templateTitle"; 
${"GLOBALS"}["teuwexyck"] = "templatesArray"; 
${"GLOBALS"}["cmmcswceimfk"] = "queryGenerator"; 
${"GLOBALS"}["mqrxqzrv"] = "listViewModel"; 
${"GLOBALS"}["wcymrvvndcy"] = "viewid"; 
${"GLOBALS"}["hbewyxs"] = "updateLogQuery"; 
${"GLOBALS"}["vngcnkdh"] = "task"; 
${"GLOBALS"}["dvpncuxxkq"] = "allGroupsData"; 
${"GLOBALS"}["pnmmii"] = "getUnreadGroupsquery"; 
${"GLOBALS"}["mjbseji"] = "groupUnreadcount"; 
${"GLOBALS"}["vcnksvuz"] = "getGroupMember"; 
${"GLOBALS"}["hkxaoftbkiv"] = "whatsappGroupQuery"; 
${"GLOBALS"}["ftnxey"] = "qrCodeDetail"; 
${"GLOBALS"}["xblcywva"] = "updatequery"; 
${"GLOBALS"}["lsbbbbjezkb"] = "qrcodeurl"; 
${"GLOBALS"}["lkpajltyoms"] = "fieldsString"; 
${"GLOBALS"}["nownjqwj"] = "fields"; 
${"GLOBALS"}["flvrpeapikx"] = "whatsappBotQuery"; 
${"GLOBALS"}["sjnjnsrjbkf"] = "configurationUserData"; 
${"GLOBALS"}["quvvlftd"] = "adminApiUrl"; 
${"GLOBALS"}["tbfimpnpdyq"] = "numrows"; 
${"GLOBALS"}["jofdmtll"] = "fileName"; 
${"GLOBALS"}["jfxlffrahfrf"] = "fileType"; 
${"GLOBALS"}["ttkyyfpbpxs"] = "templatesid"; 
${"GLOBALS"}["pxojjthp"] = "schedulesendmsgid"; 
${"GLOBALS"}["gbjmbbijyem"] = "insertQuery"; 
${"GLOBALS"}["dylmuasy"] = "cronDateTime"; 
${"GLOBALS"}["raxoxlur"] = "sendNowLater"; 
${"GLOBALS"}["blhofn"] = "getScheduleSendMsgidQuery"; 
${"GLOBALS"}["qfyvyroyt"] = "selectBatch"; 
${"GLOBALS"}["ithekks"] = "getMassBatchConfiguration"; 
${"GLOBALS"}["fhljlwjxcg"] = "connectUseridquery"; 
${"GLOBALS"}["gngfji"] = "scanUserId"; 
${"GLOBALS"}["qomlrqkqxsn"] = "allUserId"; 
${"GLOBALS"}["plnvlkivbn"] = "msg_body"; 
${"GLOBALS"}["mnjwfokih"] = "templatesID"; 
${"GLOBALS"}["nnkajxkvn"] = "excludedIds"; 
${"GLOBALS"}["qovpfqk"] = "customViewModel"; 
${"GLOBALS"}["sswargwlcq"] = "selected_ids"; 
${"GLOBALS"}["aryqycdjco"] = "whatsappModuleFieldsData"; 
${"GLOBALS"}["lvwtaxwr"] = "cvid"; 
${"GLOBALS"}["nfinnnpjts"] = "laterDateTime"; 
${"GLOBALS"}["ieyeutbd"] = "whatsappUserID"; 
${"GLOBALS"}["cxvqtrinjqyv"] = "getMassMessageDetail"; 
${"GLOBALS"}["wxmwjqpzuav"] = "timeinterval"; 
${"GLOBALS"}["vhonmw"] = "batch"; 
${"GLOBALS"}["heghltip"] = "whatsappNo"; 
${"GLOBALS"}["nhhlidf"] = "whatsappStatusArray"; 
${"GLOBALS"}["izwjuqzetcc"] = "getWhatsappStatusQuery"; 
${"GLOBALS"}["pboencuzf"] = "whatsappbot"; 
${"GLOBALS"}["bctlawmck"] = "authTokenKey"; 
${"GLOBALS"}["pkfowembir"] = "configurationQuery"; 
${"GLOBALS"}["fsctgepi"] = "whatsappuseid"; 
${"GLOBALS"}["oexsustcpi"] = "expiryDate"; 
${"GLOBALS"}["hocfljhyrzj"] = "licensefield1"; 
${"GLOBALS"}["btgalvijwp"] = "domain"; 
${"GLOBALS"}["ukljyozesxi"] = "fieldValue"; 
${"GLOBALS"}["ilrkcerjqug"] = "active"; 
${"GLOBALS"}["jiqevefe"] = "source_module"; 
${"GLOBALS"}["fzfraqda"] = "recordid"; 
${"GLOBALS"}["fjduxlnnvjco"] = "newdate"; 
${"GLOBALS"}["kypbhsfubo"] = "resultResponse"; 
${"GLOBALS"}["iuybajel"] = "curl"; 
${"GLOBALS"}["biwpugu"] = "currentDate"; 
${"GLOBALS"}["gobtjxprd"] = "iconActive"; 
${"GLOBALS"}["epytymfssn"] = "unreadmsg"; 
${"GLOBALS"}["tsrfxvdlkfvk"] = "getUreadMsgQuery"; 
${"GLOBALS"}["dnccibyllb"] = "allowModuleData"; 
${"GLOBALS"}["nymoewov"] = "sourceModuleName"; 
${"GLOBALS"}["ikdxrzoh"] = "ctwhatsappid"; 
${"GLOBALS"}["evikzxpkehd"] = "groupMessage"; 
${"GLOBALS"}["ppagojwkizb"] = "whatsappRecordModel"; 
${"GLOBALS"}["scrriwzoxykq"] = "whatsAppModuleId"; 
${"GLOBALS"}["ifwajzrqrst"] = "updateWhatsAppMessageId"; 
${"GLOBALS"}["ieopejxuvwg"] = "updateWhatsAppLogMessageId"; 
${"GLOBALS"}["xplodhprqy"] = "val"; 
${"GLOBALS"}["tpkkouecalcp"] = "whatsapplog"; 
${"GLOBALS"}["scycvjvv"] = "whatsAppLogId"; 
${"GLOBALS"}["uqxevotu"] = "whatsapplogid"; 
${"GLOBALS"}["wnnwxsl"] = "numberactive"; 
${"GLOBALS"}["kmjuscew"] = "requestParam"; 
${"GLOBALS"}["siesaxyfvgs"] = "whatsappactiveURL"; 
${"GLOBALS"}["mfilwrvwwkx"] = "displayname"; 
${"GLOBALS"}["izhlrit"] = "whatsapplogRows"; 
${"GLOBALS"}["mhvitjf"] = "whatsappLogQuery"; 
${"GLOBALS"}["uypuchy"] = "currentusername"; 
${"GLOBALS"}["soexvpcvnrmb"] = "oneDayMessages"; 
${"GLOBALS"}["sbfxxsgvly"] = "getWhatsappAccount"; 
${"GLOBALS"}["dciiwyyy"] = "licenseKey"; 
${"GLOBALS"}["fqngpyssqm"] = "getLicenseDetail"; 
${"GLOBALS"}["eorngnfmcmj"] = "whatsAppActiveInActive"; 
${"GLOBALS"}["ssjlptm"] = "postfieldWhatsAppnumber"; 
${"GLOBALS"}["gugsiupdvlj"] = "checkNumberWhatsAppQuery"; 
${"GLOBALS"}["glbmxcn"] = "whatsappScanNo"; 
${"GLOBALS"}["goeoppnm"] = "sql4"; 
${"GLOBALS"}["dhzuigiyw"] = "sql3"; 
${"GLOBALS"}["pgqtuwiqnd"] = "current_id"; 
${"GLOBALS"}["ivhgqfowqc"] = "params2"; 
${"GLOBALS"}["xdxvgbftn"] = "sql2"; 
${"GLOBALS"}["bdwnljcjh"] = "filename"; 
${"GLOBALS"}["smnnqypl"] = "params1"; 
${"GLOBALS"}["pmnype"] = "sql1"; 
${"GLOBALS"}["heogytv"] = "documentid"; 
${"GLOBALS"}["kcxtvv"] = "filemove"; 
${"GLOBALS"}["kynysnuizs"] = "type"; 
${"GLOBALS"}["oxmieksvyt"] = "target_file"; 
${"GLOBALS"}["ijgrimbqb"] = "filepath"; 
${"GLOBALS"}["bdiwarmohkx"] = "documentpath"; 
${"GLOBALS"}["txcrcgffe"] = "url"; 
${"GLOBALS"}["ugmgdme"] = "postfields"; 
${"GLOBALS"}["zixhtju"] = "newfileURL"; 
${"GLOBALS"}["kyyrgwf"] = "msgbody"; 
${"GLOBALS"}["lxlelvdmc"] = "site_URL"; 
${"GLOBALS"}["dcubejq"] = "newFilename"; 
${"GLOBALS"}["zpeweavmer"] = "newfile"; 
${"GLOBALS"}["gokdzxl"] = "attachmentPath"; 
${"GLOBALS"}["qmjevrnkl"] = "filetype"; 
${"GLOBALS"}["bhstjsz"] = "getAttachmentQuery"; 
${"GLOBALS"}["ponhglqx"] = "templateMsg"; 
${"GLOBALS"}["wpbkdifrnt"] = "isTemplates"; 
${"GLOBALS"}["etedhwm"] = "getWhatsappTemplateQuery"; 
${"GLOBALS"}["ubaxkaskezcj"] = "wptemplateid"; 
${"GLOBALS"}["tbtxdhuxud"] = "month"; 
${"GLOBALS"}["voorvljxgu"] = "day"; 
${"GLOBALS"}["mrzfhft"] = "week"; 
${"GLOBALS"}["cxqviycuznj"] = "root_directory"; 
${"GLOBALS"}["mwaajjd"] = "year"; 
${"GLOBALS"}["ywwvldxg"] = "whatsappFolderPath"; 
${"GLOBALS"}["ygqgebdmgmr"] = "base64imagedata"; 
${"GLOBALS"}["wjtwzumc"] = "getnumberImportant"; 
${"GLOBALS"}["thipsfslsq"] = "customfield1"; 
${"GLOBALS"}["mllfgvid"] = "api_url"; 
${"GLOBALS"}["bbewdfnpp"] = "configureUserid"; 
${"GLOBALS"}["csziedxdndf"] = "getConfigurationDatasQuery"; 
${"GLOBALS"}["yzcofwul"] = "whatsaAppRows"; 
${"GLOBALS"}["vpqpofmsg"] = "getConfigurationDataQuery"; 
${"GLOBALS"}["hwsypray"] = "date_var"; 
${"GLOBALS"}["rtephjki"] = "fileURL"; 
${"GLOBALS"}["slvojmfmkjt"] = "moduleRecordid"; 
${"GLOBALS"}["rktciu"] = "mobileno"; 
${"GLOBALS"}["pptcebfek"] = "whatsappNumber"; 
${"GLOBALS"}["fesgnwki"] = "replymessageText"; 
${"GLOBALS"}["fqjsvba"] = "replyMessageId"; 
${"GLOBALS"}["kkmhzt"] = "whatsappAllNumbers"; 
${"GLOBALS"}["jddbubxcigf"] = "uniqueHotels"; 
${"GLOBALS"}["nddbtfeked"] = "niddle"; 
${"GLOBALS"}["zwlfaqjdc"] = "Number"; 
${"GLOBALS"}["rrsoyy"] = "getnumbesrquery"; 
${"GLOBALS"}["onfrhh"] = "allNumber"; 
${"GLOBALS"}["uuezoflvl"] = "getnumbesrQuery"; 
${"GLOBALS"}["cfzyari"] = "whatsappNumbers"; 
${"GLOBALS"}["trltfbwwyxn"] = "mainUserQeury"; 
${"GLOBALS"}["sqwzkrvh"] = "whatsappno"; 
${"GLOBALS"}["lxkmzyceqzfb"] = "row1"; 
${"GLOBALS"}["rbfzjkduin"] = "query1"; 
${"GLOBALS"}["rwekyhsx"] = "k"; 
${"GLOBALS"}["nfsybl"] = "groupRows"; 
${"GLOBALS"}["nfbxgubd"] = "whatsappstatus"; 
${"GLOBALS"}["rxgmxef"] = "getnumberquery"; 
${"GLOBALS"}["uciqiaylpdt"] = "multiple_userid"; 
${"GLOBALS"}["uexfkkt"] = "commentModuleEnable"; 
${"GLOBALS"}["pdlbzatwp"] = "enableCommentQuery"; 
${"GLOBALS"}["udvrxltxjc"] = "sourceModuleTabid"; 
${"GLOBALS"}["yvbbbfgojvdw"] = "commentTabid"; 
${"GLOBALS"}["ounsbqlfp"] = "modCommentQuery"; 
${"GLOBALS"}["wlipubmfmwq"] = "whatsappMessages"; 
${"GLOBALS"}["umshdqrbxhan"] = "whatsappQuery"; 
${"GLOBALS"}["dwjoldseqkql"] = "unreadArray"; 
${"GLOBALS"}["efhpmbjr"] = "editFieldHTML"; 
${"GLOBALS"}["yfpophnmvplb"] = "style"; 
${"GLOBALS"}["skbammue"] = "ctwhatsappId"; 
${"GLOBALS"}["tedfbvmacr"] = "relatedtotask"; 
${"GLOBALS"}["munkwwkjp"] = "documentBody"; 
${"GLOBALS"}["ygxjhdsginy"] = "senderName"; 
${"GLOBALS"}["tcnlxlgnvgd"] = "queryResult"; 
${"GLOBALS"}["luqemfbuonpg"] = "lastMessageID"; 
${"GLOBALS"}["pqauoton"] = "individulMessage"; 
${"GLOBALS"}["nbisxvtvx"] = "updateQuery"; 
${"GLOBALS"}["qxehjudwsbfl"] = "relatedModuleArray"; 
${"GLOBALS"}["grxkhxtadg"] = "getModuleNameQuery"; 
${"GLOBALS"}["dnxvvrc"] = "relatedModuleTabid"; 
${"GLOBALS"}["teddfkyouvo"] = "relatedModulesRows"; 
${"GLOBALS"}["ileqdj"] = "j"; 
${"GLOBALS"}["fwitmes"] = "getRelatedModuleQuery"; 
${"GLOBALS"}["prnlldxbnm"] = "moreCommentLink"; 
${"GLOBALS"}["lhnvjnxllnr"] = "createdtime"; 
${"GLOBALS"}["vfkudbp"] = "commentcontent"; 
${"GLOBALS"}["pbjdkknyws"] = "commentHTML"; 
${"GLOBALS"}["kbffkwt"] = "menuwidth"; 
${"GLOBALS"}["dluxydmzw"] = "whatsappMessage"; 
${"GLOBALS"}["tkkjmy"] = "copyMessage"; 
${"GLOBALS"}["ohqcypj"] = "taskstyle"; 
${"GLOBALS"}["ejhtlr"] = "menumargin"; 
${"GLOBALS"}["lexifqpmxn"] = "menuicon"; 
${"GLOBALS"}["giotoxq"] = "lenth"; 
${"GLOBALS"}["doaqnaxwbop"] = "expolodeFilename"; 
${"GLOBALS"}["nwemwkvqkt"] = "groupMembersHTML"; 
${"GLOBALS"}["uvhhlgtimta"] = "whatsapp_contactid"; 
${"GLOBALS"}["sbjupqwnvm"] = "whatsapp_chatid"; 
${"GLOBALS"}["qyymvieahvnl"] = "whatsapp_sendername"; 
${"GLOBALS"}["bpazhnkk"] = "getGroupMembers"; 
${"GLOBALS"}["ockmkyh"] = "auth_token"; 
${"GLOBALS"}["lpyrkix"] = "relatedModules"; 
${"GLOBALS"}["rotsotynqf"] = "createTaskMessage"; 
${"GLOBALS"}["yocxlgsvbk"] = "messageSenderame"; 
${"GLOBALS"}["rnwmobhmmz"] = "isGroup"; 
${"GLOBALS"}["tpdhkjopuz"] = "messageReadUnRead"; 
${"GLOBALS"}["zqlesbolov"] = "your_number"; 
${"GLOBALS"}["xeyjsxwn"] = "messageType"; 
${"GLOBALS"}["kvtrossgvw"] = "createdTime"; 
${"GLOBALS"}["wyvtplsqyi"] = "notReplyWhatsapp"; 
${"GLOBALS"}["gbypmoqitnw"] = "whatsAppFileName"; 
${"GLOBALS"}["uqemncnk"] = "replyMessageHTML"; 
${"GLOBALS"}["nsnpqdsvxnm"] = "wordlExts"; 
${"GLOBALS"}["uwdnuybm"] = "fileExts"; 
${"GLOBALS"}["khdleq"] = "messageBody"; 
${"GLOBALS"}["dgbodklth"] = "urlExt"; 
${"GLOBALS"}["nhsncmpc"] = "msgid"; 
${"GLOBALS"}["neyrneiod"] = "quotemessage"; 
${"GLOBALS"}["iljbfqymbu"] = "getNumberDetails"; 
${"GLOBALS"}["shwzxur"] = "getNumberUsername"; 
${"GLOBALS"}["iststtnnbuli"] = "ctWhatsappId"; 
${"GLOBALS"}["eoekpbmjlq"] = "excelExts"; 
${"GLOBALS"}["aylbpwsfj"] = "mp3Exts"; 
${"GLOBALS"}["sjsywoia"] = "pdfExts"; 
${"GLOBALS"}["xepcjlvgqdnx"] = "imgExts"; 
${"GLOBALS"}["wxvvqxyhdmmv"] = "nextWhatsappRelatedMessage"; 
${"GLOBALS"}["pguiquq"] = "preQuestionDetail"; 
${"GLOBALS"}["qvcuhg"] = "roboticmodeQuery"; 
${"GLOBALS"}["jknnfqf"] = "commentModule"; 
${"GLOBALS"}["kdssajghr"] = "totalReceived"; 
${"GLOBALS"}["tqcknfzjlyv"] = "whatsappMessageHTML"; 
${"GLOBALS"}["cgmlrbqeitv"] = "moduleRecrodData"; 
${"GLOBALS"}["aenxtvota"] = "getBotMobile"; 
${"GLOBALS"}["lajcuihwa"] = "manualtransfer"; 
${"GLOBALS"}["nikmecphbpn"] = "activeBot"; 
${"GLOBALS"}["pibkavbwdciw"] = "relatedModuleHTML"; 
${"GLOBALS"}["gnbyubvxdjap"] = "moduleURL"; 
${"GLOBALS"}["ueussjlgy"] = "relatedModule"; 
${"GLOBALS"}["qghvspaq"] = "keyFieldsHTML"; 
${"GLOBALS"}["jltvgbsbqje"] = "fieldlabel"; 
${"GLOBALS"}["ulllmivjp"] = "getgroup"; 
${"GLOBALS"}["fpwvloj"] = "getusername"; 
${"GLOBALS"}["mdrlrde"] = "fieldvalue"; 
${"GLOBALS"}["drvkmhgigx"] = "actionName"; 
${"GLOBALS"}["ygtkgjr"] = "ModCommentsEnable"; 
${"GLOBALS"}["mxplqhnb"] = "keyFields"; 
${"GLOBALS"}["mpdjbemcbbeh"] = "messageImportant"; 
${"GLOBALS"}["fttcuxskb"] = "getWhatsappMessages"; 
${"GLOBALS"}["xzrbpycdwav"] = "recentComments"; 
${"GLOBALS"}["ioqpzmcoz"] = "totalSent"; 
${"GLOBALS"}["ejwjdywoqyje"] = "whatsappModule"; 
${"GLOBALS"}["swmhivnb"] = "phone"; 
${"GLOBALS"}["ofjdtiwcqwy"] = "phoneFieldData"; 
${"GLOBALS"}["pgekowu"] = "moduleRecordData"; 
${"GLOBALS"}["txurdvt"] = "customQuery"; 
${"GLOBALS"}["decvtdm"] = "imagePath"; 
${"GLOBALS"}["ytvwtwpbrom"] = "imageName"; 
${"GLOBALS"}["jqctqnhxcqm"] = "imageId"; 
${"GLOBALS"}["fhebhnfwwme"] = "imageOriginalName"; 
${"GLOBALS"}["uuuebmncrkkw"] = "imageDetails"; 
${"GLOBALS"}["vlhvaggwsfs"] = "whatsappData"; 
${"GLOBALS"}["oumtlvduudo"] = "dateTime"; 
${"GLOBALS"}["lhmgnydp"] = "body"; 
${"GLOBALS"}["clroexjn"] = "totalDays"; 
${"GLOBALS"}["ucqedrxvhsd"] = "phonenumber"; 
${"GLOBALS"}["keqplemrj"] = "allMessageQuery"; 
${"GLOBALS"}["mdetdrg"] = "unreadCount"; 
${"GLOBALS"}["fnridejvobp"] = "newMessagearray"; 
${"GLOBALS"}["axmtnsvlm"] = "permissionRecord"; 
${"GLOBALS"}["sqrlidgs"] = "messageData"; 
${"GLOBALS"}["pvqvqtue"] = "avgMessageDay"; 
${"GLOBALS"}["hynfnuhl"] = "imagetag"; 
${"GLOBALS"}["fekwfqwx"] = "unreadMessageCount"; 
${"GLOBALS"}["mcjtqufesisv"] = "customUnreadQuery"; 
${"GLOBALS"}["ftwvbpfiy"] = "responsecustomerNumber"; 
${"GLOBALS"}["mxgoxq"] = "responseQuery"; 
${"GLOBALS"}["eyxwyylxr"] = "responseRows"; 
${"GLOBALS"}["wdmedzqlg"] = "allnumber"; 
${"GLOBALS"}["nhiramzvkzh"] = "inNumber_Query"; 
${"GLOBALS"}["tqbulrrwwg"] = "inNumber"; 
${"GLOBALS"}["kurtlcufu"] = "whatsAppAllNumber"; 
${"GLOBALS"}["bqoncfuvy"] = "temporaryQuery"; 
${"GLOBALS"}["kmnyykyvckz"] = "searchInnerQuery"; 
${"GLOBALS"}["fxcxmjpfqy"] = "important"; 
${"GLOBALS"}["bgtlhcjtqd"] = "response"; 
${"GLOBALS"}["dvtbrxu"] = "bydefaulOpenChat"; 
${"GLOBALS"}["rsnsobisxr"] = "html"; 
${"GLOBALS"}["hsqlfix"] = "read"; 
${"GLOBALS"}["yxemjq"] = "count"; 
${"GLOBALS"}["kcspyrbiiemk"] = "index"; 
${"GLOBALS"}["qitgxwxyb"] = "moduleQuery"; 
${"GLOBALS"}["fqhtown"] = "serach"; 
${"GLOBALS"}["vdmnomgvhxl"] = "groupWhatsappNumber"; 
${"GLOBALS"}["csdiybwj"] = "importantMessages"; 
${"GLOBALS"}["ermgleo"] = "moduleMessages"; 
${"GLOBALS"}["wqheqyvcrte"] = "responseCustomer"; 
${"GLOBALS"}["wsdhsj"] = "end"; 
${"GLOBALS"}["dmvknwtxvz"] = "start"; 
${"GLOBALS"}["vfwcvgdsp"] = "whatsappmodule"; 
${"GLOBALS"}["ytusthklwgh"] = "moduleName"; 
${"GLOBALS"}["deoglpyt"] = "allUnknownRows"; 
${"GLOBALS"}["kkiudzctxin"] = "unknownRows"; 
${"GLOBALS"}["pgqrrif"] = "allUnreadCount"; 
${"GLOBALS"}["kvgifisws"] = "allUnreadMessageCount"; 
${"GLOBALS"}["nudtoiqqufg"] = "row"; 
${"GLOBALS"}["kslxyjbwxo"] = "allQuery"; 
${"GLOBALS"}["cehfem"] = "allRows"; 
${"GLOBALS"}["iryaaagcqts"] = "result"; 
${"GLOBALS"}["hwkdwmhnq"] = "allNewMessageCountquery"; 
${"GLOBALS"}["ohueadsgqw"] = "numOfRows"; 
${"GLOBALS"}["tiyhcrorrbn"] = "relatedRecordId"; 
${"GLOBALS"}["oauuzayz"] = "delete"; 
${"GLOBALS"}["vnajxvzttek"] = "unreadQuery"; 
${"GLOBALS"}["ifdddjovlmp"] = "userID"; 
${"GLOBALS"}["igedgfzdhrml"] = "mainTable"; 
${"GLOBALS"}["ktrrbkxglx"] = "baseTableid"; 
${"GLOBALS"}["peissyfumdch"] = "modulename"; 
${"GLOBALS"}["gluytrwnl"] = "inNumberQuery"; 
${"GLOBALS"}["galxfqgqf"] = "tablename"; 
${"GLOBALS"}["vvonkioccd"] = "query"; 
${"GLOBALS"}["iccyjgulz"] = "tablenameid"; 
${"GLOBALS"}["totkyicbtc"] = "phoneTableQuery"; 
${"GLOBALS"}["kgwoicgs"] = "tabid"; 
${"GLOBALS"}["jtgpuykwigg"] = "getRecordPermissionQuery"; 
${"GLOBALS"}["gwlmxwwxq"] = "searchValue"; 
${"GLOBALS"}["vquixfweqs"] = "searchQuery"; 
${"GLOBALS"}["ktktsby"] = "baseTable"; 
${"GLOBALS"}["jgbhlut"] = "moduleInstance"; 
${"GLOBALS"}["lffhtukabm"] = "getAllowModule"; 
${"GLOBALS"}["ppfivef"] = "whatsaappModule"; 
${"GLOBALS"}["eokkqrtn"] = "whatsaappModuleData"; 
${"GLOBALS"}["dumltoky"] = "sourceModuleModuleModel"; 
${"GLOBALS"}["krpoivyp"] = "module"; 
${"GLOBALS"}["kivdwa"] = "moduleIsEnable"; 
${"GLOBALS"}["drilbcvgige"] = "whatsappModuleQuery"; 
${"GLOBALS"}["iwyngpalekm"] = "rows"; 
${"GLOBALS"}["yyuszfactrx"] = "scanQRCode"; 
${"GLOBALS"}["tuvhoqu"] = "isAdmin"; 
${"GLOBALS"}["yeugmdxu"] = "queryGroupExist"; 
${"GLOBALS"}["xotmcagdlc"] = "numRowsUsers"; 
${"GLOBALS"}["akuldenvfkv"] = "currentUserID"; 
${"GLOBALS"}["vvcgdcmd"] = "whatsappModuleData"; 
${"GLOBALS"}["kmrnymylcyjk"] = "inappNotification"; 
${"GLOBALS"}["gnrrisnojfkp"] = "date"; 
${"GLOBALS"}["eufujmooqd"] = "unreadCountCounts"; 
${"GLOBALS"}["covqopwhrig"] = "massMessageAccess"; 
${"GLOBALS"}["risuyorxu"] = "whatsappUserBeep"; 
${"GLOBALS"}["bsandqj"] = "licenseExpire"; 
${"GLOBALS"}["swlnsqrjjzye"] = "phoneField"; 
${"GLOBALS"}["olscbbdffu"] = "moduleIconActive"; 
${"GLOBALS"}["jkptrzkx"] = "moduleMassMessage"; 
${"GLOBALS"}["cbxmibjlpigc"] = "allwModules"; 
${"GLOBALS"}["dlgngixo"] = "action"; 
${"GLOBALS"}["wmdewdblp"] = "expirydate"; 
${"GLOBALS"}["rlzyjmszby"] = "getexpiredate"; 
${"GLOBALS"}["copkojxldfb"] = "currentdate"; 
${"GLOBALS"}["uzumsw"] = "imageTag"; 
${"GLOBALS"}["pgmwsjte"] = "labelExplode"; 
${"GLOBALS"}["wftlerhjcih"] = "profileImage"; 
${"GLOBALS"}["kskxqpwnedbi"] = "recordModel"; 
${"GLOBALS"}["spcmpmfdlpm"] = "deleteRecord"; 
${"GLOBALS"}["qbwrpdx"] = "setype"; 
${"GLOBALS"}["avskwgujri"] = "lastBody"; 
${"GLOBALS"}["urnggayicx"] = "messageReadUnread"; 
${"GLOBALS"}["lckvfrieq"] = "notificationHTML"; 
${"GLOBALS"}["rhwecrgk"] = "messagename"; 
${"GLOBALS"}["npgrisofu"] = "imageIcon"; 
${"GLOBALS"}["pntkggbj"] = "class"; 
${"GLOBALS"}["vnvrdcwsvg"] = "label"; 
${"GLOBALS"}["lyvjgviy"] = "lastDateTime"; 
${"GLOBALS"}["uasigafv"] = "recordId"; 
${"GLOBALS"}["xvednigju"] = "unreadmsgQuery"; 
${"GLOBALS"}["vdsayvie"] = "inLogNumberQuery"; 
${"GLOBALS"}["ldpxsg"] = "picStyle2"; 
${"GLOBALS"}["gwcveswz"] = "timeStyle"; 
${"GLOBALS"}["prxmfgqlu"] = "divStyle"; 
${"GLOBALS"}["goedosny"] = "picStyle1"; 
${"GLOBALS"}["abmqrxbgd"] = "themeView"; 
${"GLOBALS"}["nxlhqiedhkli"] = "scanWhatsappNumber"; 
${"GLOBALS"}["ftgrsecllxap"] = "whatsappStatus"; 
${"GLOBALS"}["zkvahvrdny"] = "configurationData"; 
${"GLOBALS"}["fnclohksb"] = "apiUrl"; 
${"GLOBALS"}["qckjludy"] = "currenUserID"; 
${"GLOBALS"}["bqyucn"] = "value"; 
${"GLOBALS"}["pphiwgub"] = "key"; 
${"GLOBALS"}["xsrlvtgkygm"] = "groupid"; 
${"GLOBALS"}["vkkcgmyyzxj"] = "queryGetGroupId"; 
${"GLOBALS"}["keejcrk"] = "numRows"; 
${"GLOBALS"}["pnkdelqa"] = "num_rows"; 
${"GLOBALS"}["pdtrphovwnb"] = "userid"; 
${"GLOBALS"}["cecuvldefy"] = "usersGroups"; 
${"GLOBALS"}["jljyshujmicx"] = "allUsers"; 
${"GLOBALS"}["trxjmjwc"] = "userrows"; 
${"GLOBALS"}["gjdoju"] = "i"; 
${"GLOBALS"}["bkgforgx"] = "getUserGroups"; 
${"GLOBALS"}["smwxoqmfp"] = "multipleWahtsapp"; 
${"GLOBALS"}["fdixfsi"] = "getUserGrous"; 
 
class CTWhatsApp_Record_Model extends Vtiger_Record_Model 
{ 
    public function getWhatsappIcon($sourceModule) 
    { 
        ${"GLOBALS"}["qstfheypiqb"] = "currenUserID"; 
        ${"GLOBALS"}["btjgpdeyseu"] = "themeView"; 
        ${"GLOBALS"}["gmpnpizekwb"] = "isAdmin"; 
        $tlhimg = "apiurl"; 
        $ajjbqfzmm = "massMessageAccessUsers"; 
        $tnoegqikg = "currenUserID"; 
        ${"GLOBALS"}["lgfqjxoiw"] = "inNumberQuery"; 
        ${"GLOBALS"}["ptryburbbn"] = "unreadmsgCountsQuery"; 
        $rakmkft = "configurationData"; 
        ${"GLOBALS"}["howvalmlfz"] = "inLogNumberQuery"; 
        $lhwjeykvp = "expirydate"; 
        $kihpfhxuplb = "roleID"; 
        ${"GLOBALS"}["bjhdoeua"] = "apiurl"; 
        global $adb, $current_user; 
        $ktnifchmix = "configurationData"; 
        $pwcpcm = "licenseKey"; 
        $alxsapxoqy = "date"; 
        ${${"GLOBALS"}["qstfheypiqb"]} = $current_user->id; 
        ${${"GLOBALS"}["gmpnpizekwb"]} = $current_user->is_admin; 
        ${"GLOBALS"}["hwvjrxqgv"] = "allUserNumber"; 
        ${$kihpfhxuplb} = $current_user->roleid; 
        $wfoppj = "configurationData"; 
        $brkynrm = "inappNotification"; 
        ${"GLOBALS"}["bfxqghpgwe"] = "currenUserID"; 
        $bpjulmvtt = "configurationData"; 
        ${${"GLOBALS"}["fdixfsi"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration"); 
        $yyrjpdm = "massMessageAccessUsers"; 
        ${${"GLOBALS"}["smwxoqmfp"]} = $adb->query_result(${${"GLOBALS"}["fdixfsi"]}, 0, "customfield4"); 
        ${"GLOBALS"}["noyckvh"] = "unreadCountRow"; 
        if (${${"GLOBALS"}["smwxoqmfp"]} == "multipleWhatsapp") { 
            $ocqillli = "i"; 
            $zjkguurrrz = "i"; 
            $eesdckdvwvi = "allUsers"; 
            $ffyqeaxj = "getUserGroups"; 
            ${${"GLOBALS"}["bkgforgx"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers INNER JOIN vtiger_ctwhatsapp_user_groups ON vtiger_ctwhatsapp_user_groups.userid = vtiger_ctwhatsappusers.customfield5 WHERE vtiger_ctwhatsapp_user_groups.active = 1"); 
            ${"GLOBALS"}["fddfvuqk"] = "userrows"; 
            ${"GLOBALS"}["qxjugdskmfn"] = "allUsers"; 
            ${${"GLOBALS"}["fddfvuqk"]} = $adb->num_rows(${$ffyqeaxj}); 
            ${${"GLOBALS"}["qxjugdskmfn"]} = ""; 
            for (${$ocqillli} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["trxjmjwc"]}; ${$zjkguurrrz}++) { 
                $kfspuedr = "allUsers"; 
                $jnsujkg = "i"; 
                ${${"GLOBALS"}["jljyshujmicx"]} .= $adb->query_result(${${"GLOBALS"}["bkgforgx"]}, ${${"GLOBALS"}["gjdoju"]}, "userid") . ","; 
                ${$kfspuedr} .= $adb->query_result(${${"GLOBALS"}["bkgforgx"]}, ${$jnsujkg}, "multiple_userid") . ","; 
            } 
            ${${"GLOBALS"}["cecuvldefy"]} = explode(",", ${$eesdckdvwvi}); 
        } else { 
            ${${"GLOBALS"}["cecuvldefy"]} = explode(",", $adb->query_result(${${"GLOBALS"}["fdixfsi"]}, 0, "users_groups")); 
        } 
        $cvhbjlgpe = "unreadmsgQuery"; 
        ${"GLOBALS"}["ibhzftvldm"] = "getexpiredate"; 
        ${"GLOBALS"}["ardbmtef"] = "iconactive"; 
        $nxtxwbite = "notificationHTML"; 
        $wedypk = "scanWhatsappNumber"; 
        $gpjhddo = "currenUserID"; 
        ${"GLOBALS"}["crrgititvk"] = "date"; 
        ${"GLOBALS"}["xrzlkxot"] = "i"; 
        $hibgkrvrdww = "unreadCountCounts"; 
        $wghczblfgf = "sourceModule"; 
        $whbriwmybvwj = "userid"; 
        ${$whbriwmybvwj} = in_array(${${"GLOBALS"}["bfxqghpgwe"]}, ${${"GLOBALS"}["cecuvldefy"]}); 
        ${"GLOBALS"}["iiftuwjyjqy"] = "unreadmsgCountsQuery"; 
        if (${${"GLOBALS"}["pdtrphovwnb"]}) { 
            ${${"GLOBALS"}["pnkdelqa"]} = 1; 
        } else { 
            $vkqvstfijts = "queryGetGroupId"; 
            ${"GLOBALS"}["twrprj"] = "currenUserID"; 
            ${$vkqvstfijts} = $adb->pquery("SELECT * FROM vtiger_users2group WHERE userid = ?", array(${${"GLOBALS"}["twrprj"]})); 
            ${${"GLOBALS"}["keejcrk"]} = $adb->num_rows(${${"GLOBALS"}["vkkcgmyyzxj"]}); 
            for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["keejcrk"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                ${${"GLOBALS"}["xsrlvtgkygm"]}[] = $adb->query_result(${${"GLOBALS"}["vkkcgmyyzxj"]}, ${${"GLOBALS"}["gjdoju"]}, "groupid"); 
            } 
            foreach (${${"GLOBALS"}["xsrlvtgkygm"]} as ${${"GLOBALS"}["pphiwgub"]} => ${${"GLOBALS"}["bqyucn"]}) { 
                ${"GLOBALS"}["qnxqeunfs"] = "existGroup"; 
                ${"GLOBALS"}["tdhzngjia"] = "usersGroups"; 
                ${${"GLOBALS"}["qnxqeunfs"]} = in_array(${${"GLOBALS"}["bqyucn"]}, ${${"GLOBALS"}["tdhzngjia"]}); 
                ${"GLOBALS"}["ijfrnhyr"] = "existGroup"; 
                if (${${"GLOBALS"}["ijfrnhyr"]}) { 
                    ${"GLOBALS"}["sbptayas"] = "num_rows"; 
                    ${${"GLOBALS"}["sbptayas"]} = 1; 
                    break; 
                } else { 
                    ${"GLOBALS"}["enxxxjo"] = "num_rows"; 
                    ${${"GLOBALS"}["enxxxjo"]} = 0; 
                } 
            } 
        } 
        ${$ktnifchmix} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["qckjludy"]}); 
        ${$tlhimg} = str_replace("/api/", "", ${$wfoppj}["api_url"]); 
        ${${"GLOBALS"}["fnclohksb"]} = ${${"GLOBALS"}["bjhdoeua"]} . "/" . ${$bpjulmvtt}["authtoken"]; 
        ${"GLOBALS"}["qgqyyltz"] = "unreadCountCounts"; 
        ${${"GLOBALS"}["ardbmtef"]} = ${$rakmkft}["iconactive"]; 
        ${$brkynrm} = ${${"GLOBALS"}["zkvahvrdny"]}["inapp_notification"]; 
        ${$wedypk} = ${${"GLOBALS"}["zkvahvrdny"]}["whatsappno"]; 
        $xqbwbtd = "unreadCountRow"; 
        ${${"GLOBALS"}["ftgrsecllxap"]} = ${${"GLOBALS"}["zkvahvrdny"]}["whatsappstatus"]; 
        $xizssxyl = "inNumberQuery"; 
        ${${"GLOBALS"}["hwvjrxqgv"]} = CTWhatsApp_Record_Model::getAllUserWhatsappNumber(${$tnoegqikg}); 
        if (is_null(${${"GLOBALS"}["nxlhqiedhkli"]})) { 
            ${"GLOBALS"}["vtdmwrx"] = "scanWhatsappNumber"; 
            ${${"GLOBALS"}["vtdmwrx"]} = "-"; 
        } 
        ${${"GLOBALS"}["btjgpdeyseu"]} = CTWhatsApp_Record_Model::getWhatsappTheme(); 
        if (${${"GLOBALS"}["abmqrxbgd"]} == "RTL") { 
            $cusnvhrf = "picStyle2"; 
            ${${"GLOBALS"}["goedosny"]} = "margin: 0px 0px 0px 10px;float: right;"; 
            ${$cusnvhrf} = "margin: 0px 0px 0px 10px;float: right;"; 
            ${${"GLOBALS"}["prxmfgqlu"]} = "style='direction: rtl;text-align: right;'"; 
            ${${"GLOBALS"}["gwcveswz"]} = "float: left;direction: ltr;"; 
        } else { 
            ${"GLOBALS"}["lmnogeu"] = "picStyle1"; 
            ${${"GLOBALS"}["lmnogeu"]} = "margin: 0px 19px 0px 0px;float: left;"; 
            ${${"GLOBALS"}["ldpxsg"]} = "margin: 0px 19px 0px 0px;float: left;"; 
            ${${"GLOBALS"}["prxmfgqlu"]} = ""; 
            ${${"GLOBALS"}["gwcveswz"]} = "float: right;"; 
        } 
        ${"GLOBALS"}["zytjiqai"] = "getexpiredate"; 
        ${${"GLOBALS"}["lgfqjxoiw"]} = CTWhatsApp_Record_Model::getInNumberQuery(${$gpjhddo}); 
        ${${"GLOBALS"}["howvalmlfz"]} = CTWhatsApp_Record_Model::getLogInNumberQuery(${${"GLOBALS"}["qckjludy"]}); 
        ${${"GLOBALS"}["iiftuwjyjqy"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp  
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
          WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Unread' AND vtiger_ctwhatsapp.message_type = 'Recieved' AND vtiger_ctwhatsapp.whatsapp_withccode != 'Groups' " . ${$xizssxyl}); 
        ${${"GLOBALS"}["qgqyyltz"]} = $adb->num_rows(${${"GLOBALS"}["ptryburbbn"]}); 
        $iavcbzfsif = "licenseKey"; 
        if (${$hibgkrvrdww} == "") { 
            ${"GLOBALS"}["biutokq"] = "unreadCountCounts"; 
            ${${"GLOBALS"}["biutokq"]} = 0; 
        } 
        ${$cvhbjlgpe} = $adb->pquery("SELECT vtiger_whatsapplog.whatsapplog_contactid, vtiger_whatsapplog.whatsapplog_unreadread, vtiger_whatsapplog.whatsapplog_withccode, vtiger_whatsapplog.messagelog_body, vtiger_whatsapplog.whatsapplog_datetime, vtiger_whatsapplog.whatsapplog_sendername FROM vtiger_whatsapplog 
        INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid  
        INNER JOIN (SELECT ct2.whatsapplog_withccode , MAX(ct2.whatsapplogid) AS maxid FROM vtiger_whatsapplog ct2 GROUP BY ct2.whatsapplog_msgid) ct3 ON (vtiger_whatsapplog.whatsapplogid = ct3.maxid) WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["vdsayvie"]} . "  ORDER BY vtiger_whatsapplog.whatsapplog_datetime DESC LIMIT 0, 5"); 
        ${${"GLOBALS"}["noyckvh"]} = $adb->num_rows(${${"GLOBALS"}["xvednigju"]}); 
        ${$nxtxwbite} = ""; 
        for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${$xqbwbtd}; ${${"GLOBALS"}["xrzlkxot"]}++) { 
            $oebyiyn = "unreadmsgQuery"; 
            ${"GLOBALS"}["xeljrrxmzr"] = "recordId"; 
            ${"GLOBALS"}["gdtppsu"] = "messageReadUnread"; 
            ${${"GLOBALS"}["xeljrrxmzr"]} = $adb->query_result(${${"GLOBALS"}["xvednigju"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_contactid"); 
            ${${"GLOBALS"}["gdtppsu"]} = $adb->query_result(${$oebyiyn}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_unreadread"); 
            if (${${"GLOBALS"}["uasigafv"]} == "") { 
                $yugthl = "individulMessageID"; 
                $ovolhrly = "i"; 
                ${"GLOBALS"}["csvcmoabru"] = "divStyle"; 
                $fsiktl = "label"; 
                ${"GLOBALS"}["mkgkxdzttts"] = "i"; 
                $txwpbjup = "lastDateTime"; 
                ${"GLOBALS"}["iintmztihbwn"] = "lastBody"; 
                ${$fsiktl} = $adb->query_result(${${"GLOBALS"}["xvednigju"]}, ${$ovolhrly}, "whatsapplog_withccode"); 
                ${${"GLOBALS"}["iintmztihbwn"]} = $adb->query_result(${${"GLOBALS"}["xvednigju"]}, ${${"GLOBALS"}["gjdoju"]}, "messagelog_body"); 
                $kqkixxilkg = "unreadmsgQuery"; 
                ${${"GLOBALS"}["lyvjgviy"]} = $adb->query_result(${$kqkixxilkg}, ${${"GLOBALS"}["mkgkxdzttts"]}, "whatsapplog_datetime"); 
                if (${${"GLOBALS"}["vnvrdcwsvg"]} != "Groups") { 
                    ${"GLOBALS"}["vqbhpg"] = "individulMessageID"; 
                    $bxxlmjwuxq = "class"; 
                    $urnpcq = "messagename"; 
                    $lmqnmjj = "imageIcon"; 
                    ${${"GLOBALS"}["vqbhpg"]} = "id="whatsapp"";${"GLOBALS"}["gpkuot"] = "unreadmsgQuery";${$bxxlmjwuxq} = "";${$lmqnmjj} = "layouts/v7/modules/CTWhatsApp/image/AvtarIcon.png";${$urnpcq} = $adb->query_result(${${"GLOBALS"}["gpkuot"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_withccode");} else { 
                    ${"GLOBALS"}["euwinwggrm"] = "individulMessageID"; 
                    ${${"GLOBALS"}["euwinwggrm"]} = ""; 
                    ${${"GLOBALS"}["pntkggbj"]} = "receivednewmessages"; 
                    ${${"GLOBALS"}["npgrisofu"]} = "layouts/v7/modules/CTWhatsApp/image/groups.png"; 
                    ${${"GLOBALS"}["rhwecrgk"]} = $adb->query_result(${${"GLOBALS"}["xvednigju"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_sendername"); 
                } 
                $wsytdkyqitu = "timeStyle"; 
                ${${"GLOBALS"}["lckvfrieq"]} .= "<li class=\"whatsapp_new_messages " . ${${"GLOBALS"}["pntkggbj"]} . "" ".${$yugthl}." data - recordid = \"" . ${${"GLOBALS"}["vnvrdcwsvg"]} . "" style = "width: 100%;display: inline-block;float: left;border-bottom: 1px solid rgb(44 59 73 / 15%);\"> 
                <a href="#\" style=\"padding: 10px 10px !important;color: #333 !important;display: inline-block;float: left;width: 100%;"> 
                    < div class=\"pic\" style="display: inline - block;padding - right: 10px;width: 50px;height: 50px;border - radius: 50 %;box - shadow: 0 0 5px rgb(68 80 100 / 0.25);max - width: 36px;max - height : 36px;margin : 0;".${${"GLOBALS"}["goedosny"]}.""> 
                <img src=\"" . ${${"GLOBALS"}["npgrisofu"]} . "\" style="width: 40px;max - width: 36px;max - height : 36px;margin : 0;border - radius: 50 %;background: #4ebb46;"/> 
                </div > 
                <div ".${${"GLOBALS"}["csvcmoabru"]}." > 
                <span class=\"" ><b style = \"font-size: 14px; !important;font-size: 14px;overflow: hidden;text-overflow: ellipsis;display: inline-block;position: relative;top: 6px;width: 230px;\">" . ${${"GLOBALS"}["rhwecrgk"]} . "</b></span> 
                <p style=\"max-width: 300px;font-size: 12px;max-width: 200px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" > ";if(${${"GLOBALS"}["urnggayicx"]}=="Unread"){${"GLOBALS"}["vrmnwpqkck"]="notificationHTML";${${"GLOBALS"}["vrmnwpqkck"]} .= "<b>" . ${${"GLOBALS"}["avskwgujri"]} . "</b>";}else{ 
                    ${"GLOBALS"}["otoskluggt"] = "lastBody"; 
                    ${${"GLOBALS"}["lckvfrieq"]} .= ${${"GLOBALS"}["otoskluggt"]}; 
                }${${"GLOBALS"}["lckvfrieq"]}.=" </p > 
                <span class="\" style=\"font-size: 12px;line-height: 16px;font-weight: 400;display: block;" . ${$wsytdkyqitu} . "" > ".Vtiger_Util_Helper::formatDateDiffInStrings(${$txwpbjup})."</span > 
                </div > 
                </a > 
                </li > ";}else{$naqbldrz="deleteRecord";${"GLOBALS"}["wluxnx"] = "recordId";${"GLOBALS"}["tavborgng"] = "setype";${${"GLOBALS"}["tavborgng"]} = VtigerCRMObject::getSEType(${${"GLOBALS"}["uasigafv"]});${$naqbldrz} = CTWhatsApp_Record_Model::recordDelete(${${"GLOBALS"}["uasigafv"]});if (Users_Privileges_Model::isPermitted(${${"GLOBALS"}["qbwrpdx"]}, "EditView", ${${"GLOBALS"}["wluxnx"]})) { 
                    if (${${"GLOBALS"}["spcmpmfdlpm"]} == 0) { 
                        if (${${"GLOBALS"}["uasigafv"]}) { 
                            $liogcqh = "setype"; 
                            $ohdijjkuik = "recordId"; 
                            ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${$ohdijjkuik}, ${$liogcqh}); 
                            ${${"GLOBALS"}["vnvrdcwsvg"]} = $recordModel->get("label"); 
                        } 
                        ${"GLOBALS"}["ioxljgm"] = "setype"; 
                        ${"GLOBALS"}["diqpvewryd"] = "timeStyle"; 
                        ${${"GLOBALS"}["wftlerhjcih"]} = CTWhatsApp_Record_Model::getImageDetails(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["qbwrpdx"]}); 
                        $ouuwobps = "notificationHTML"; 
                        ${"GLOBALS"}["wllhjmeyscfx"] = "unreadmsgQuery"; 
                        ${"GLOBALS"}["rtdydof"] = "i"; 
                        $hvkbylbpxv = "imageTag"; 
                        ${$hvkbylbpxv} = 1; 
                        $uegvutyvqcy = "picStyle2"; 
                        if (${${"GLOBALS"}["wftlerhjcih"]} == "") { 
                            $mhthvkl = "profileImage"; 
                            ${"GLOBALS"}["axtdsegjxjs"] = "imageTag"; 
                            ${"GLOBALS"}["dixxwoio"] = "label"; 
                            $eapnqqkuxne = "labelExplode"; 
                            ${${"GLOBALS"}["pgmwsjte"]} = explode(" ", ${${"GLOBALS"}["dixxwoio"]}); 
                            ${"GLOBALS"}["egcnhkb"] = "labelExplode"; 
                            ${$mhthvkl} = mb_substr(${${"GLOBALS"}["egcnhkb"]}[0], 0, 1, "UTF-8") . mb_substr(${$eapnqqkuxne}[1], 0, 1, "UTF-8"); 
                            ${${"GLOBALS"}["axtdsegjxjs"]} = 0; 
                        } 
                        $tmnfnqddu = "lastDateTime"; 
                        ${${"GLOBALS"}["avskwgujri"]} = $adb->query_result(${${"GLOBALS"}["wllhjmeyscfx"]}, ${${"GLOBALS"}["gjdoju"]}, "messagelog_body"); 
                        $ehecyxp = "divStyle"; 
                        ${${"GLOBALS"}["lyvjgviy"]} = $adb->query_result(${${"GLOBALS"}["xvednigju"]}, ${${"GLOBALS"}["rtdydof"]}, "whatsapplog_datetime"); 
                        ${${"GLOBALS"}["lckvfrieq"]} .= "<li class="whatsapp_new_messages" id=\"whatsapp\" data-recordid=\"" . ${${"GLOBALS"}["uasigafv"]} . "\" data-setype=\"" . ${${"GLOBALS"}["ioxljgm"]} . "\" style="width: 100 %;display: inline - block;float: left;border - bottom: 1px solid rgb(44 59 73 / 15 %);"> 
                        <a href="#" style="padding: 10px 10px !important;color: #333 !important;display: inline-block;float: left;width: 100%;"> 
                        < div class=\"pic" style = \"display: inline-block;float: left; width: 36px;height: 36px;border-radius: 50%;box-shadow: 0 0 5px rgb(68 80 100 / 0.25); " . ${$uegvutyvqcy} . " text-align: center; color: #4ebb46;\">";if (${${"GLOBALS"}["uzumsw"]} == 1) { 
                            ${"GLOBALS"}["ajrorxymilxe"] = "profileImage"; 
                            ${${"GLOBALS"}["lckvfrieq"]} .= "<img src="".${${"GLOBALS"}["ajrorxymilxe"]}."\" style=" width: 100 %;margin: 0;height: 100 %;border - radius: 50 %;\"/>";} else { 
                            ${"GLOBALS"}["iewpysfwl"] = "notificationHTML"; 
                            ${${"GLOBALS"}["iewpysfwl"]} .= "<span class=\"imagename\" id=\"imagename\" style=\"font-size: 15px;line-height: 36px;\"><b>" . ${${"GLOBALS"}["wftlerhjcih"]} . "</b></span>"; 
                        }$upmmjmuinpki = "notificationHTML";${$ouuwobps} .= "</div> 
                        <div  " . ${$ehecyxp} . "> 
                        <span class="\"><b style=\"font-size: 14px; !important;font-size: 14px;overflow: hidden;text-overflow: ellipsis;display: inline-block;position: relative;top: 6px;width: 230px;" > ".${${"GLOBALS"}["vnvrdcwsvg"]}."</b ></span > 
                        <p style = "max-width: 300px;font-size: 12px;max-width: 200px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" > ";if(${${"GLOBALS"}["urnggayicx"]}=="Unread"){${${"GLOBALS"}["lckvfrieq"]}.="<b>".${${"GLOBALS"}["avskwgujri"]}."</b>";}else{ 
                            $gqnpwclllocm = "notificationHTML"; 
                            ${$gqnpwclllocm} .= ${${"GLOBALS"}["avskwgujri"]}; 
                        }${$upmmjmuinpki}.=" </p > 
                        </p > 
                        <span class="" style = "font-size: 12px;line-height: 16px;font-weight: 400;display: block;" . ${${"GLOBALS"}["diqpvewryd"]} . "\">" . Vtiger_Util_Helper::formatDateDiffInStrings(${$tmnfnqddu}) . "</span> 
                        </div> 
                        </a> 
                        </li>";} 
                }}}${${"GLOBALS"}["copkojxldfb"]}=date("Y - m - d");${${"GLOBALS"}["zytjiqai"]}=$adb->pquery("SELECT * FROM vtiger_ctwhatsapp_license_setting");$foyfecgdepi="currenUserID";${$lhwjeykvp}=$adb->query_result(${${"GLOBALS"}["rlzyjmszby"]},0,"expirydate");$frjyqiahw="allwModules";${$pwcpcm}=$adb->query_result(${${"GLOBALS"}["ibhzftvldm"]},0,"license_key");${${"GLOBALS"}["crrgititvk"]}=Settings_CTWhatsApp_ConfigurationDetail_View::encrypt_decrypt(${${"GLOBALS"}["wmdewdblp"]},${${"GLOBALS"}["dlgngixo"]}="d");${${"GLOBALS"}["cbxmibjlpigc"]}=CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${$wghczblfgf});${${"GLOBALS"}["jkptrzkx"]}=${${"GLOBALS"}["cbxmibjlpigc"]}["rows"];${${"GLOBALS"}["olscbbdffu"]}=${$frjyqiahw}["moduleIconActive"];${${"GLOBALS"}["swlnsqrjjzye"]}=${${"GLOBALS"}["cbxmibjlpigc"]}["phoneField"];if(strtotime(${$alxsapxoqy})<strtotime(${${"GLOBALS"}["copkojxldfb"]})){${${"GLOBALS"}["bsandqj"]}="yes";}else{ 
                    ${${"GLOBALS"}["bsandqj"]} = "no"; 
                }${${"GLOBALS"}["risuyorxu"]}=CTWhatsApp_Record_Model::whatsappUserBeepSettingQuery(${${"GLOBALS"}["qckjludy"]});${$yyrjpdm}=Settings_CTWhatsApp_Record_Model::getMassMessageAccessUsers();${${"GLOBALS"}["covqopwhrig"]}=in_array(${$foyfecgdepi},${$ajjbqfzmm});if(${$iavcbzfsif}!=""){${"GLOBALS"}["nwinrmm"]="num_rows";$ituelbndhrm = "massMessageAccess";$oykqjml = "iconactive";${"GLOBALS"}["wpmljsx"] = "isAdmin";$xmhnnptk = "apiUrl";${"GLOBALS"}["htypgfpwdfi"] = "currentdate";$dwzgnxh = "phoneField";$pivglpl = "moduleMassMessage";${"GLOBALS"}["ofxedwu"] = "whatsappModuleData";${${"GLOBALS"}["ofxedwu"]} = array("moduleMassMessage" => ${$pivglpl}, "apiUrl" => ${$xmhnnptk}, "whatsappicon" => ${${"GLOBALS"}["nwinrmm"]}, "unread_count" => ${${"GLOBALS"}["eufujmooqd"]}, "currentdate" => strtotime(${${"GLOBALS"}["htypgfpwdfi"]}), "licensedate" => strtotime(${${"GLOBALS"}["gnrrisnojfkp"]}), "whatsappStatus" => ${${"GLOBALS"}["ftgrsecllxap"]}, "moduleIconActive" => ${${"GLOBALS"}["olscbbdffu"]}, "phoneField" => ${$dwzgnxh}, "inappNotification" => ${${"GLOBALS"}["kmrnymylcyjk"]}, "notificationHTML" => ${${"GLOBALS"}["lckvfrieq"]}, "isAdmin" => ${${"GLOBALS"}["wpmljsx"]}, "themeView" => ${${"GLOBALS"}["abmqrxbgd"]}, "iconactive" => ${$oykqjml}, "licenseExpire" => ${${"GLOBALS"}["bsandqj"]}, "scanWhatsappNumber" => ${${"GLOBALS"}["nxlhqiedhkli"]}, "whatsappUserBeep" => ${${"GLOBALS"}["risuyorxu"]}, "massMessageAccess" => ${$ituelbndhrm});}return${${"GLOBALS"}["vvcgdcmd"]};}function getScanQRCodeURL(){ 
                    ${"GLOBALS"}["hhswkjrjftcd"] = "currentUserID"; 
                    ${"GLOBALS"}["thiprtint"] = "isAdmin"; 
                    $fdrsfdye = "queryUserExist"; 
                    global $adb, $current_user; 
                    $pdgecrxnyh = "queryUserExist"; 
                    ${${"GLOBALS"}["akuldenvfkv"]} = $current_user->id; 
                    ${${"GLOBALS"}["thiprtint"]} = $current_user->is_admin; 
                    $aoomdhlk = "numRowsUsers"; 
                    ${$pdgecrxnyh} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield3 LIKE '%" . ${${"GLOBALS"}["hhswkjrjftcd"]} . "%'", array()); 
                    ${$aoomdhlk} = $adb->num_rows(${$fdrsfdye}); 
                    if (${${"GLOBALS"}["xotmcagdlc"]} == 0) { 
                        $npugrhpmnq = "queryGetGroupId"; 
                        ${"GLOBALS"}["jqtbjsb"] = "numRowsUsers"; 
                        ${${"GLOBALS"}["vkkcgmyyzxj"]} = $adb->pquery("SELECT * FROM vtiger_group2role INNER JOIN vtiger_user2role ON vtiger_user2role.roleid = vtiger_group2role.roleid WHERE vtiger_user2role.userid = ?", array(${${"GLOBALS"}["akuldenvfkv"]})); 
                        ${${"GLOBALS"}["xsrlvtgkygm"]} = $adb->query_result(${$npugrhpmnq}, 0, "groupid"); 
                        $ddpgcsswev = "queryGroupExist"; 
                        if (${${"GLOBALS"}["xsrlvtgkygm"]} != "") { 
                            ${"GLOBALS"}["xggowwrmwoy"] = "groupid"; 
                            ${${"GLOBALS"}["yeugmdxu"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield3 LIKE '%" . ${${"GLOBALS"}["xggowwrmwoy"]} . "%'", array()); 
                        } 
                        ${${"GLOBALS"}["jqtbjsb"]} = $adb->num_rows(${$ddpgcsswev}); 
                    } 
                    if (${${"GLOBALS"}["tuvhoqu"]} == "on") { 
                        ${${"GLOBALS"}["yyuszfactrx"]} = "index.php?module=CTWhatsApp&parent=Settings&view=ConfigurationDetail"; 
                    } else { 
                        $qchbkitv = "scanQRCode"; 
                        ${$qchbkitv} = "index.php?module=CTWhatsApp&view=DashBoard&mode=moduleDashBoard&showqrcode=1"; 
                    } 
                    return ${${"GLOBALS"}["yyuszfactrx"]}; 
                }function getWhatsappAllowModules(){ 
                    ${"GLOBALS"}["pntdooxypi"] = "i"; 
                    ${"GLOBALS"}["qtffcnj"] = "rows"; 
                    $spokvpnsmd = "whatsappModuleQuery"; 
                    global $adb; 
                    ${$spokvpnsmd} = $adb->pquery("SELECT * FROM vtiger_ctwharsappallow_whatsappmodule WHERE active = 1"); 
                    ${"GLOBALS"}["ieqkosuexwc"] = "whatsaappModule"; 
                    ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["drilbcvgige"]}); 
                    ${${"GLOBALS"}["ieqkosuexwc"]} = array(); 
                    for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["qtffcnj"]}; ${${"GLOBALS"}["pntdooxypi"]}++) { 
                        ${"GLOBALS"}["albtqkfv"] = "data"; 
                        $osilqf = "module"; 
                        ${"GLOBALS"}["xwlxmbu"] = "module"; 
                        ${$osilqf} = $adb->query_result(${${"GLOBALS"}["drilbcvgige"]}, ${${"GLOBALS"}["gjdoju"]}, "module"); 
                        ${${"GLOBALS"}["albtqkfv"]} = CTWhatsApp_Record_Model::checkPermissionModule(${${"GLOBALS"}["xwlxmbu"]}); 
                        ${"GLOBALS"}["vwfqnvvrt"] = "data"; 
                        if (${${"GLOBALS"}["vwfqnvvrt"]} == 1) { 
                            ${"GLOBALS"}["drqhjrpsejt"] = "currentUserModel"; 
                            $ukwvizp = "module"; 
                            ${${"GLOBALS"}["kivdwa"]} = CTWhatsApp_Record_Model::getmoduleIsEnable(${${"GLOBALS"}["krpoivyp"]}); 
                            ${${"GLOBALS"}["drqhjrpsejt"]} = Users_Privileges_Model::getCurrentUserPrivilegesModel(); 
                            ${${"GLOBALS"}["dumltoky"]} = Vtiger_Module_Model::getInstance(${$ukwvizp}); 
                            if ($currentUserModel->hasModuleActionPermission($sourceModuleModuleModel->getId(), "CreateView")) { 
                                ${"GLOBALS"}["tmosfc"] = "moduleIsEnable"; 
                                if (${${"GLOBALS"}["tmosfc"]} == 0) { 
                                    ${"GLOBALS"}["ampwweyo"] = "row"; 
                                    ${"GLOBALS"}["wjguwrmqfi"] = "phoneField"; 
                                    ${"GLOBALS"}["vussjcj"] = "whatsaappModuleData"; 
                                    ${"GLOBALS"}["wisjfciebq"] = "module"; 
                                    ${${"GLOBALS"}["vussjcj"]} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["wisjfciebq"]}); 
                                    ${${"GLOBALS"}["wjguwrmqfi"]} = ${${"GLOBALS"}["eokkqrtn"]}["phoneField"]; 
                                    ${${"GLOBALS"}["ppfivef"]}[] = array("module" => ${${"GLOBALS"}["krpoivyp"]}, "rows" => ${${"GLOBALS"}["ampwweyo"]}, "phoneField" => ${${"GLOBALS"}["swlnsqrjjzye"]}); 
                                } 
                            } 
                        } 
                    } 
                    return ${${"GLOBALS"}["ppfivef"]}; 
                }function getmoduleIsEnable($moduleName){ 
                    ${"GLOBALS"}["vxygxnjoixgm"] = "moduleName"; 
                    $drdqvbskqm = "moduleQuery"; 
                    ${"GLOBALS"}["bopgcyk"] = "presence"; 
                    ${"GLOBALS"}["dliqlqgy"] = "moduleQuery"; 
                    global $adb; 
                    ${${"GLOBALS"}["dliqlqgy"]} = $adb->pquery("SELECT * FROM vtiger_tab WHERE name = ?", array(${${"GLOBALS"}["vxygxnjoixgm"]})); 
                    return ${${"GLOBALS"}["bopgcyk"]} = $adb->query_result(${$drdqvbskqm}, 0, "presence"); 
                }function getWhatsappAllowModuleFields($sourceModule){ 
                    ${"GLOBALS"}["njbruinrpwa"] = "sourceModule"; 
                    ${"GLOBALS"}["ygxupjmo"] = "moduleIconActive"; 
                    ${"GLOBALS"}["nmkyleyowoq"] = "phoneField"; 
                    ${"GLOBALS"}["nmwodkvwxhu"] = "rows"; 
                    $reumrrfvq = "getAllowModule"; 
                    $hqejvl = "getAllowModule"; 
                    ${"GLOBALS"}["fvsxynzmsdk"] = "getAllowModule"; 
                    global $adb; 
                    ${"GLOBALS"}["snlyvw"] = "allwModules"; 
                    ${$hqejvl} = $adb->pquery("SELECT * FROM vtiger_ctwharsappallow_whatsappmodule WHERE module = ?", array(${${"GLOBALS"}["njbruinrpwa"]})); 
                    ${${"GLOBALS"}["nmwodkvwxhu"]} = $adb->num_rows(${$reumrrfvq}); 
                    ${"GLOBALS"}["plceqlc"] = "phoneField"; 
                    ${${"GLOBALS"}["ygxupjmo"]} = $adb->query_result(${${"GLOBALS"}["fvsxynzmsdk"]}, 0, "active"); 
                    ${${"GLOBALS"}["plceqlc"]} = $adb->query_result(${${"GLOBALS"}["lffhtukabm"]}, 0, "phone_field"); 
                    ${${"GLOBALS"}["cbxmibjlpigc"]} = array("moduleIconActive" => ${${"GLOBALS"}["olscbbdffu"]}, "phoneField" => ${${"GLOBALS"}["nmkyleyowoq"]}, "rows" => ${${"GLOBALS"}["iwyngpalekm"]}); 
                    return ${${"GLOBALS"}["snlyvw"]}; 
                }function moduleQuery($modulename,$phoneField,$searchValue){ 
                    $mtqpvmyffho = "assignQuery"; 
                    ${"GLOBALS"}["zfuagvkq"] = "query"; 
                    ${"GLOBALS"}["bftywkkjxo"] = "modulename"; 
                    $xfedwrufee = "tabid"; 
                    $lsjhhieat = "currenUserID"; 
                    ${"GLOBALS"}["oegduyk"] = "phoneField"; 
                    $dvnwsxvo = "phoneTableQuery"; 
                    ${"GLOBALS"}["neiurpy"] = "baseTable"; 
                    global $adb, $current_user; 
                    $sjbrpkgea = "tablename"; 
                    ${"GLOBALS"}["fdmlrnuqilu"] = "currenUserID"; 
                    $bxlliesdtot = "baseTableid"; 
                    $kiiocykorx = "searchValue"; 
                    ${$lsjhhieat} = $current_user->id; 
                    $mjzzgyauc = "tablename"; 
                    $qmixaikfe = "moduleModel"; 
                    ${"GLOBALS"}["qsvvlqex"] = "modulename"; 
                    $suvoygezh = "phoneField"; 
                    $gkkiyzqc = "tablenameid"; 
                    ${$qmixaikfe} = CRMEntity::getInstance(${${"GLOBALS"}["bftywkkjxo"]}); 
                    $wcfhtbhj = "inNumberQuery"; 
                    ${${"GLOBALS"}["jgbhlut"]} = Vtiger_Module::getInstance(${${"GLOBALS"}["qsvvlqex"]}); 
                    ${${"GLOBALS"}["ktktsby"]} = $moduleInstance->basetable; 
                    ${$bxlliesdtot} = $moduleInstance->basetableid; 
                    ${"GLOBALS"}["ifofxwcv"] = "baseTableid"; 
                    $nfizqelhg = "modulename"; 
                    ${"GLOBALS"}["pletyl"] = "baseTableid"; 
                    ${$wcfhtbhj} = CTWhatsApp_Record_Model::getLogInNumberQuery(${${"GLOBALS"}["fdmlrnuqilu"]}); 
                    $nfgfaypbwh = "isAdmin"; 
                    if (${$kiiocykorx}) { 
                        $ozcdbu = "searchValue"; 
                        $yyftqxk = "phoneField"; 
                        ${${"GLOBALS"}["vquixfweqs"]} = " AND (vtiger_crmentity.label LIKE '%" . ${${"GLOBALS"}["gwlmxwwxq"]} . "%' OR childTable." . ${$yyftqxk} . " LIKE '%" . ${$ozcdbu} . "%')"; 
                    } else { 
                        ${"GLOBALS"}["bjbwcugve"] = "searchQuery"; 
                        ${${"GLOBALS"}["bjbwcugve"]} = ""; 
                    } 
                    $unpgfofi = "baseTable"; 
                    ${$nfgfaypbwh} = $current_user->is_admin; 
                    ${$xfedwrufee} = getTabid(${$nfizqelhg}); 
                    if (${${"GLOBALS"}["tuvhoqu"]} != "on") { 
                        ${"GLOBALS"}["vdecljkdlve"] = "tabid"; 
                        if (${${"GLOBALS"}["vdecljkdlve"]}) { 
                            ${"GLOBALS"}["tcyhyjj"] = "permission"; 
                            $ykwwkbyzsll = "permission"; 
                            ${${"GLOBALS"}["jtgpuykwigg"]} = $adb->pquery("SELECT * FROM vtiger_def_org_share WHERE tabid = ?", array(${${"GLOBALS"}["kgwoicgs"]})); 
                            ${${"GLOBALS"}["tcyhyjj"]} = $adb->query_result(${${"GLOBALS"}["jtgpuykwigg"]}, 0, "permission"); 
                            if (${$ykwwkbyzsll} == "3") { 
                                $apnvvxhde = "assignQuery"; 
                                ${$apnvvxhde} = " AND vtiger_crmentity.smownerid = '$currenUserID'"; 
                            } 
                        } 
                    } 
                    ${$dvnwsxvo} = $adb->pquery("SELECT * FROM vtiger_field WHERE fieldname = ? AND tabid = ?", array(${${"GLOBALS"}["oegduyk"]}, ${${"GLOBALS"}["kgwoicgs"]})); 
                    ${$mjzzgyauc} = $adb->query_result(${${"GLOBALS"}["totkyicbtc"]}, 0, "tablename"); 
                    ${${"GLOBALS"}["iccyjgulz"]} = $moduleModel->tab_name_index[${$sjbrpkgea}]; 
                    ${${"GLOBALS"}["vvonkioccd"]} = "SELECT * FROM vtiger_whatsapplog "; 
                    ${${"GLOBALS"}["zfuagvkq"]} .= " LEFT JOIN " . ${$unpgfofi} . " ON " . ${${"GLOBALS"}["ktktsby"]} . "." . ${${"GLOBALS"}["ifofxwcv"]} . " = vtiger_whatsapplog.whatsapplog_contactid "; 
                    ${${"GLOBALS"}["vvonkioccd"]} .= " LEFT JOIN " . ${${"GLOBALS"}["galxfqgqf"]} . " childTable ON childTable." . ${$gkkiyzqc} . " = " . ${${"GLOBALS"}["neiurpy"]} . "." . ${${"GLOBALS"}["pletyl"]} . " 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
                WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["gluytrwnl"]} . " AND childTable." . ${$suvoygezh} . " != ''" . ${${"GLOBALS"}["vquixfweqs"]} . ${$mtqpvmyffho} . " GROUP BY childTable." . ${${"GLOBALS"}["swlnsqrjjzye"]}; 
                    return ${${"GLOBALS"}["vvonkioccd"]}; 
                }function moduleQueryCount($modulename,$phoneField,$searchValue){ 
                    ${"GLOBALS"}["ooasboq"] = "query"; 
                    ${"GLOBALS"}["qnjqyobn"] = "moduleModel"; 
                    ${"GLOBALS"}["ggjfhkmzthh"] = "currenUserID"; 
                    ${"GLOBALS"}["ltatufntwl"] = "baseTable"; 
                    ${"GLOBALS"}["tfcbypjvoy"] = "baseTable"; 
                    global $adb, $current_user; 
                    $sadsweozh = "moduleInstance"; 
                    $vwemkdpw = "query"; 
                    ${${"GLOBALS"}["ggjfhkmzthh"]} = $current_user->id; 
                    ${${"GLOBALS"}["qnjqyobn"]} = CRMEntity::getInstance(${${"GLOBALS"}["peissyfumdch"]}); 
                    ${$sadsweozh} = Vtiger_Module::getInstance(${${"GLOBALS"}["peissyfumdch"]}); 
                    ${${"GLOBALS"}["ltatufntwl"]} = $moduleInstance->basetable; 
                    ${${"GLOBALS"}["ktrrbkxglx"]} = $moduleInstance->basetableid; 
                    if (${${"GLOBALS"}["gwlmxwwxq"]}) { 
                        $oyjrrsox = "searchQuery"; 
                        ${$oyjrrsox} = " AND vtiger_crmentity.label LIKE '%" . ${${"GLOBALS"}["gwlmxwwxq"]} . "%'"; 
                    } else { 
                        ${${"GLOBALS"}["vquixfweqs"]} = ""; 
                    } 
                    ${${"GLOBALS"}["igedgfzdhrml"]} = 0; 
                    ${${"GLOBALS"}["ooasboq"]} = "SELECT count(*) as rows1 FROM " . ${${"GLOBALS"}["tfcbypjvoy"]} . " 
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = " . ${${"GLOBALS"}["ktktsby"]} . "." . ${${"GLOBALS"}["ktrrbkxglx"]} . " 
            WHERE vtiger_crmentity.deleted = 0"; 
                    return ${$vwemkdpw}; 
                }public function unreadQuery(){global$adb,$current_user;$gyqgeenxbvcd="inNumberQuery";$qqvtkhbq="query";${"GLOBALS"}["leqewv"]="currentUserID";${${"GLOBALS"}["ifdddjovlmp"]}=$current_user->id;${$gyqgeenxbvcd}=CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["leqewv"]});${$qqvtkhbq}="SELECT * FROM vtiger_ctwhatsapp 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity . crmid = vtiger_ctwhatsapp . ctwhatsappid 
          WHERE vtiger_crmentity . deleted = 0";return${${"GLOBALS"}["vvonkioccd"]};}public function unreadQueryCount(){${"GLOBALS"}["ngpdbu"]="query";$uuxvmbdpu = "userID";global$adb, $current_user;${$uuxvmbdpu} = $current_user->id;${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["akuldenvfkv"]});${${"GLOBALS"}["vvonkioccd"]} = "SELECT count(*) FROM vtiger_ctwhatsapp  
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
          WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["gluytrwnl"]};return ${${"GLOBALS"}["ngpdbu"]};}public function getUnreadMessagesCount(){global$adb;${"GLOBALS"}["ljyvcrinx"]="query";${${"GLOBALS"}["vnajxvzttek"]}=CTWhatsApp_Record_Model::unreadQuery();$hhwfnoycl="unreadQuery";${${"GLOBALS"}["ljyvcrinx"]}=$adb->pquery(${$hhwfnoycl}." and vtiger_ctwhatsapp . whatsapp_unreadread = 'Unread' and vtiger_ctwhatsapp . message_type = 'Recieved' and vtiger_ctwhatsapp . whatsapp_withccode != 'Groups'");$jufhewtk="rows";${"GLOBALS"}["jgrtvutkxul"]="query";$fmqcsdoneea="rows";${$jufhewtk}=$adb->num_rows(${${"GLOBALS"}["jgrtvutkxul"]});return${$fmqcsdoneea};}public function getImportantMessagesCounts(){$efqqgirr="unreadQuery";$oidfgavoino = "delete";$vtgtxvfm = "inNumberQuery";$hocfrggh = "query";$ufpnzh = "query";global$adb, $current_user;${$efqqgirr} = CTWhatsApp_Record_Model::unreadQuery();${${"GLOBALS"}["akuldenvfkv"]} = $current_user->id;${$vtgtxvfm} = CTWhatsApp_Record_Model::getLogInNumberQuery(${${"GLOBALS"}["akuldenvfkv"]});${"GLOBALS"}["mzivinqj"] = "rows";${$hocfrggh} = $adb->pquery("SELECT * FROM vtiger_whatsapplog  
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid  
          WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_important = 1 " . ${${"GLOBALS"}["gluytrwnl"]} . " GROUP BY vtiger_whatsapplog.whatsapplog_contactid, vtiger_whatsapplog.whatsapplog_withccode", array());${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${$ufpnzh});${"GLOBALS"}["tbibtysvvrr"] = "rows";${${"GLOBALS"}["oauuzayz"]} = 0;${"GLOBALS"}["flxaemro"] = "numOfRows";${"GLOBALS"}["pyuqlhvfbhp"] = "i";for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["pyuqlhvfbhp"]} < ${${"GLOBALS"}["tbibtysvvrr"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                    $kpsdkcugs = "i"; 
                    ${${"GLOBALS"}["tiyhcrorrbn"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$kpsdkcugs}, "whatsapplog_contactid"); 
                    if (${${"GLOBALS"}["tiyhcrorrbn"]} != "") { 
                        ${"GLOBALS"}["tvkrbuqnh"] = "relatedRecordId"; 
                        ${${"GLOBALS"}["spcmpmfdlpm"]} = CTWhatsApp_Record_Model::recordDelete(${${"GLOBALS"}["tvkrbuqnh"]}); 
                        if (${${"GLOBALS"}["spcmpmfdlpm"]} == 1) { 
                            ${${"GLOBALS"}["oauuzayz"]} = ${${"GLOBALS"}["oauuzayz"]} + 1; 
                        } 
                    } 
                }$ajtefdmdds = "i";${${"GLOBALS"}["keejcrk"]} = 0;for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["mzivinqj"]}; ${$ajtefdmdds}++) { 
                    $getssjl = "relatedRecordId"; 
                    ${"GLOBALS"}["bokhmoc"] = "relatedRecordId"; 
                    ${$getssjl} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_contactid"); 
                    ${"GLOBALS"}["ioxkebggqttd"] = "setype"; 
                    ${${"GLOBALS"}["ioxkebggqttd"]} = VtigerCRMObject::getSEType(${${"GLOBALS"}["bokhmoc"]}); 
                    if (Users_Privileges_Model::isPermitted(${${"GLOBALS"}["qbwrpdx"]}, "EditView", ${${"GLOBALS"}["tiyhcrorrbn"]})) { 
                        ${"GLOBALS"}["ubdkfced"] = "numRows"; 
                        $raiilpwcm = "numRows"; 
                        ${${"GLOBALS"}["ubdkfced"]} = ${$raiilpwcm} + 1; 
                    } 
                }${${"GLOBALS"}["ohueadsgqw"]} = ${${"GLOBALS"}["keejcrk"]} - ${$oidfgavoino};return ${${"GLOBALS"}["flxaemro"]};}public function getNewMessagesCounts(){ 
                    $plhegnw = "inNumberQuery"; 
                    ${"GLOBALS"}["jvobmpot"] = "allNewMessageCountquery"; 
                    global $adb, $current_user; 
                    ${"GLOBALS"}["vuldsyljktbi"] = "allRows"; 
                    $vdrcclmsm = "currentUserID"; 
                    ${${"GLOBALS"}["akuldenvfkv"]} = $current_user->id; 
                    ${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQueryCount(); 
                    ${"GLOBALS"}["elbmoktlf"] = "inNumberQuery"; 
                    $uiwvvqyucnv = "query"; 
                    ${"GLOBALS"}["dutzhnljf"] = "query"; 
                    ${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getLogInNumberQuery(${$vdrcclmsm}); 
                    ${"GLOBALS"}["eridvj"] = "rows"; 
                    ${"GLOBALS"}["zzkdylw"] = "rows"; 
                    ${${"GLOBALS"}["dutzhnljf"]} = $adb->pquery("SELECT * FROM vtiger_whatsapplog 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
          WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_withccode != '' AND vtiger_whatsapplog.whatsapplog_unreadread = 'Unread'  AND vtiger_whatsapplog.messagelog_type = 'Recieved' AND vtiger_whatsapplog.whatsapplog_withccode != 'Groups' " . ${$plhegnw} . " GROUP BY vtiger_whatsapplog.whatsapplog_contactid, vtiger_whatsapplog.whatsapplog_withccode ORDER BY vtiger_crmentity.createdtime", array()); 
                    ${${"GLOBALS"}["eridvj"]} = $adb->num_rows(${$uiwvvqyucnv}); 
                    ${${"GLOBALS"}["jvobmpot"]} = $adb->pquery("SELECT * FROM vtiger_whatsapplog 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
          WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_withccode != '' AND vtiger_whatsapplog.whatsapplog_unreadread = 'Unread'  AND vtiger_whatsapplog.messagelog_type = 'Recieved' AND vtiger_whatsapplog.whatsapplog_withccode != 'Groups' " . ${${"GLOBALS"}["elbmoktlf"]} . "", array()); 
                    ${${"GLOBALS"}["vuldsyljktbi"]} = $adb->num_rows(${${"GLOBALS"}["hwkdwmhnq"]}); 
                    ${${"GLOBALS"}["iryaaagcqts"]} = array("rows" => ${${"GLOBALS"}["zzkdylw"]}, "allRows" => ${${"GLOBALS"}["cehfem"]}); 
                    return ${${"GLOBALS"}["iryaaagcqts"]}; 
                }public function getAllMessagesCounts(){ 
                    ${"GLOBALS"}["bcbgvsx"] = "allQuery"; 
                    ${"GLOBALS"}["egfflisun"] = "userID"; 
                    ${"GLOBALS"}["yyfynbeyxr"] = "i"; 
                    global $adb, $current_user; 
                    ${"GLOBALS"}["cnmpoxcr"] = "allUnreadMessageCount"; 
                    $syddpudmdyf = "inNumberQuery"; 
                    ${"GLOBALS"}["rfwbxnbpkmu"] = "row"; 
                    ${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQuery(); 
                    ${${"GLOBALS"}["egfflisun"]} = $current_user->id; 
                    ${"GLOBALS"}["nvusgewyy"] = "allUnreadCount"; 
                    ${$syddpudmdyf} = CTWhatsApp_Record_Model::getLogInNumberQuery(${${"GLOBALS"}["akuldenvfkv"]}); 
                    ${${"GLOBALS"}["kslxyjbwxo"]} = "SELECT * FROM vtiger_whatsapplog 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
          WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_withccode != '' " . ${${"GLOBALS"}["gluytrwnl"]} . " AND vtiger_whatsapplog.whatsapplog_withccode != 'Groups' GROUP BY vtiger_whatsapplog.whatsapplog_contactid, vtiger_whatsapplog.whatsapplog_withccode"; 
                    ${"GLOBALS"}["jxxhmuw"] = "result"; 
                    ${${"GLOBALS"}["vnajxvzttek"]} = "SELECT * FROM vtiger_whatsapplog 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
          WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_withccode != '' AND vtiger_whatsapplog.messagelog_type = 'Recieved' AND vtiger_whatsapplog.whatsapplog_unreadread = 'Unread' " . ${${"GLOBALS"}["gluytrwnl"]} . " AND vtiger_whatsapplog.whatsapplog_withccode != 'Groups' GROUP BY vtiger_whatsapplog.whatsapplog_contactid, vtiger_whatsapplog.whatsapplog_withccode"; 
                    ${${"GLOBALS"}["cnmpoxcr"]} = $adb->pquery(${${"GLOBALS"}["bcbgvsx"]}); 
                    $jomqmhlv = "row"; 
                    $vhfuwnk = "delete"; 
                    $kbxexwcdt = "allRows"; 
                    ${${"GLOBALS"}["nudtoiqqufg"]} = $adb->num_rows(${${"GLOBALS"}["kvgifisws"]}); 
                    ${${"GLOBALS"}["oauuzayz"]} = 0; 
                    for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["yyfynbeyxr"]} < ${${"GLOBALS"}["rfwbxnbpkmu"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                        ${"GLOBALS"}["oeyewbqkxk"] = "i"; 
                        ${${"GLOBALS"}["tiyhcrorrbn"]} = $adb->query_result(${${"GLOBALS"}["kvgifisws"]}, ${${"GLOBALS"}["oeyewbqkxk"]}, "whatsapplog_contactid"); 
                        if (${${"GLOBALS"}["tiyhcrorrbn"]} != "") { 
                            ${"GLOBALS"}["qyjdpww"] = "deleteRecord"; 
                            $jfpiomijlb = "relatedRecordId"; 
                            ${"GLOBALS"}["pvcloeuh"] = "deleteRecord"; 
                            ${${"GLOBALS"}["qyjdpww"]} = CTWhatsApp_Record_Model::recordDelete(${$jfpiomijlb}); 
                            if (${${"GLOBALS"}["pvcloeuh"]} == 1) { 
                                $znepuw = "delete"; 
                                ${$znepuw} = ${${"GLOBALS"}["oauuzayz"]} + 1; 
                            } 
                        } 
                    } 
                    ${${"GLOBALS"}["iwyngpalekm"]} = ${$jomqmhlv} - ${$vhfuwnk}; 
                    ${${"GLOBALS"}["nvusgewyy"]} = $adb->pquery(${${"GLOBALS"}["vnajxvzttek"]}); 
                    ${${"GLOBALS"}["cehfem"]} = $adb->num_rows(${${"GLOBALS"}["pgqrrif"]}); 
                    ${${"GLOBALS"}["jxxhmuw"]} = array("rows" => ${$kbxexwcdt}, "allRows" => ${${"GLOBALS"}["iwyngpalekm"]}); 
                    return ${${"GLOBALS"}["iryaaagcqts"]}; 
                }public function getUnknownMessagesCounts(){ 
                    ${"GLOBALS"}["mpntidv"] = "currentUserID"; 
                    $nupswy = "inNumberQuery"; 
                    ${"GLOBALS"}["jiikxvmsu"] = "currentUserID"; 
                    $jvjivub = "result"; 
                    ${"GLOBALS"}["bigpcdp"] = "allUnknownquery"; 
                    ${"GLOBALS"}["wiynrcfkuc"] = "query"; 
                    $mikvhvsxmjn = "allUnknownRows"; 
                    global $adb, $current_user; 
                    ${${"GLOBALS"}["mpntidv"]} = $current_user->id; 
                    ${$nupswy} = CTWhatsApp_Record_Model::getLogInNumberQuery(${${"GLOBALS"}["jiikxvmsu"]}); 
                    ${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQueryCount(); 
                    ${"GLOBALS"}["efwshjtqnzc"] = "inNumberQuery"; 
                    $huqpqswxpt = "allUnknownquery"; 
                    ${${"GLOBALS"}["wiynrcfkuc"]} = $adb->pquery("SELECT * FROM vtiger_whatsapplog 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
          WHERE vtiger_crmentity.deleted = 0  AND vtiger_whatsapplog.whatsapplog_contactid = '' AND vtiger_whatsapplog.whatsapplog_unreadread = 'Unread' AND vtiger_whatsapplog.whatsapplog_withccode != 'Groups' AND vtiger_whatsapplog.messagelog_type = 'Recieved' " . ${${"GLOBALS"}["gluytrwnl"]} . " GROUP BY vtiger_whatsapplog.whatsapplog_withccode", array()); 
                    ${${"GLOBALS"}["kkiudzctxin"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                    if (${${"GLOBALS"}["kkiudzctxin"]} == "") { 
                        ${${"GLOBALS"}["kkiudzctxin"]} = 0; 
                    } 
                    ${$huqpqswxpt} = $adb->pquery("SELECT * FROM vtiger_whatsapplog 
          INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
          WHERE vtiger_crmentity.deleted = 0  AND vtiger_whatsapplog.whatsapplog_contactid = '' AND vtiger_whatsapplog.whatsapplog_unreadread = 'Unread' AND vtiger_whatsapplog.whatsapplog_withccode != 'Groups' " . ${${"GLOBALS"}["efwshjtqnzc"]} . " GROUP BY vtiger_whatsapplog.whatsapplog_withccode", array()); 
                    ${$mikvhvsxmjn} = $adb->num_rows(${${"GLOBALS"}["bigpcdp"]}); 
                    if (${${"GLOBALS"}["deoglpyt"]} == "") { 
                        ${${"GLOBALS"}["deoglpyt"]} = 0; 
                    } 
                    ${$jvjivub} = array("unknownRows" => ${${"GLOBALS"}["kkiudzctxin"]}, "allUnknownRows" => ${${"GLOBALS"}["deoglpyt"]}); 
                    return ${${"GLOBALS"}["iryaaagcqts"]}; 
                }public function getModuleRecrods($request){ 
                    $yqejruxss = "searchValue"; 
                    $oypsnvoooi = "whatsappmodule"; 
                    ${${"GLOBALS"}["ytusthklwgh"]} = $request->getModule(); 
                    $xrcoxzv = "html"; 
                    ${${"GLOBALS"}["vfwcvgdsp"]} = $request->get("whatsappmodule"); 
                    $weoddktuy = "whatsappmodule"; 
                    ${$yqejruxss} = $request->get("searchValue"); 
                    ${${"GLOBALS"}["dmvknwtxvz"]} = $request->get("start"); 
                    $ylletbuy = "groupWhatsappNumber"; 
                    $suxibuwfth = "moduleMessages"; 
                    ${${"GLOBALS"}["wsdhsj"]} = $request->get("end"); 
                    ${$ylletbuy} = $request->get("groupWhatsappNumber"); 
                    ${"GLOBALS"}["wngtxfqjga"] = "whatsappmodule"; 
                    ${${"GLOBALS"}["wqheqyvcrte"]} = $request->get("responseCustomer"); 
                    ${$xrcoxzv} = ""; 
                    if (${${"GLOBALS"}["vfwcvgdsp"]} == "Important") { 
                        $gmqzoljko = "start"; 
                        $rrsrmsdw = "importantMessages"; 
                        $cihtmonlfa = "moduleMessages"; 
                        ${"GLOBALS"}["hgqcfmxi"] = "responseCustomer"; 
                        ${"GLOBALS"}["oqhfdnlag"] = "importantMessages"; 
                        ${"GLOBALS"}["swzczszkxln"] = "whatsappmodule"; 
                        $inbhhwvq = "end"; 
                        ${$rrsrmsdw} = "yes"; 
                        ${$cihtmonlfa} = CTWhatsApp_Record_Model::getNewMessagesData(${${"GLOBALS"}["oqhfdnlag"]}, ${$gmqzoljko}, ${$inbhhwvq}, ${${"GLOBALS"}["gwlmxwwxq"]}, ${${"GLOBALS"}["swzczszkxln"]}, ${${"GLOBALS"}["hgqcfmxi"]}); 
                    } else if (${$oypsnvoooi} == "NewMessages") { 
                        $ijfqttrwsri = "importantMessages"; 
                        ${"GLOBALS"}["mywsclrbowz"] = "whatsappmodule"; 
                        $mkgxre = "importantMessages"; 
                        ${"GLOBALS"}["ybcffvvtgld"] = "searchValue"; 
                        ${$ijfqttrwsri} = "no"; 
                        ${${"GLOBALS"}["ermgleo"]} = CTWhatsApp_Record_Model::getNewMessagesData(${$mkgxre}, ${${"GLOBALS"}["dmvknwtxvz"]}, ${${"GLOBALS"}["wsdhsj"]}, ${${"GLOBALS"}["ybcffvvtgld"]}, ${${"GLOBALS"}["mywsclrbowz"]}, ${${"GLOBALS"}["wqheqyvcrte"]}); 
                    } else if (${${"GLOBALS"}["vfwcvgdsp"]} == "Unknown") { 
                        $yrdfogrh = "searchValue"; 
                        ${"GLOBALS"}["wbnjhfihmp"] = "end"; 
                        $oikjphs = "moduleMessages"; 
                        ${$oikjphs} = CTWhatsApp_Record_Model::getUnknownMessagesData(${${"GLOBALS"}["dmvknwtxvz"]}, ${${"GLOBALS"}["wbnjhfihmp"]}, ${$yrdfogrh}); 
                    } else if (${${"GLOBALS"}["wngtxfqjga"]} == "AllMessages") { 
                        $othfnvkknhh = "whatsappmodule"; 
                        ${${"GLOBALS"}["csdiybwj"]} = "no"; 
                        ${"GLOBALS"}["trachklcu"] = "importantMessages"; 
                        $rwizhsigof = "moduleMessages"; 
                        ${$rwizhsigof} = CTWhatsApp_Record_Model::getNewMessagesData(${${"GLOBALS"}["trachklcu"]}, ${${"GLOBALS"}["dmvknwtxvz"]}, ${${"GLOBALS"}["wsdhsj"]}, ${${"GLOBALS"}["gwlmxwwxq"]}, ${$othfnvkknhh}, ${${"GLOBALS"}["wqheqyvcrte"]}); 
                    } else if (${$weoddktuy} == "Groups") { 
                        ${${"GLOBALS"}["ermgleo"]} = CTWhatsApp_Record_Model::getWhatsappGroup(${${"GLOBALS"}["vdmnomgvhxl"]}); 
                    } else { 
                        $lahoihimxnq = "searchValue"; 
                        ${"GLOBALS"}["pknwnnykhf"] = "moduleMessages"; 
                        $ztlxuyxwo = "query"; 
                        $kimgsykslgu = "whatsappmodule"; 
                        ${"GLOBALS"}["eekkuh"] = "query"; 
                        ${"GLOBALS"}["tdiomtibyrq"] = "phoneField"; 
                        ${${"GLOBALS"}["pknwnnykhf"]} = CTWhatsApp_Record_Model::getModuleMessagesData(${$kimgsykslgu}, ${${"GLOBALS"}["dmvknwtxvz"]}, ${${"GLOBALS"}["wsdhsj"]}, ${$lahoihimxnq}); 
                        $plunlov = "whatsaappModuleData"; 
                        global $adb; 
                        $qlptmswpyr = "row"; 
                        $ffcnkhrpvhy = "whatsappmodule"; 
                        ${$plunlov} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["vfwcvgdsp"]}); 
                        ${${"GLOBALS"}["swlnsqrjjzye"]} = ${${"GLOBALS"}["eokkqrtn"]}["phoneField"]; 
                        ${"GLOBALS"}["rbtufgmvjlnf"] = "serach"; 
                        ${"GLOBALS"}["geyfeub"] = "moduleMessages"; 
                        ${${"GLOBALS"}["fqhtown"]} = ""; 
                        ${"GLOBALS"}["fqyrbu"] = "moduleQuery"; 
                        ${${"GLOBALS"}["fqyrbu"]} = CTWhatsApp_Record_Model::moduleQueryCount(${$ffcnkhrpvhy}, ${${"GLOBALS"}["tdiomtibyrq"]}, ${${"GLOBALS"}["rbtufgmvjlnf"]}); 
                        ${$ztlxuyxwo} = $adb->pquery(${${"GLOBALS"}["qitgxwxyb"]}); 
                        ${$qlptmswpyr} = $adb->query_result(${${"GLOBALS"}["eekkuh"]}, 0, "rows1"); 
                        ${${"GLOBALS"}["nudtoiqqufg"]} = count(${${"GLOBALS"}["geyfeub"]}); 
                    } 
                    ${${"GLOBALS"}["kcspyrbiiemk"]} = 0; 
                    ${"GLOBALS"}["dksllljy"] = "key"; 
                    foreach (${${"GLOBALS"}["ermgleo"]} as ${${"GLOBALS"}["dksllljy"]} => ${${"GLOBALS"}["bqyucn"]}) { 
                        $gmzxngbrwsb = "index"; 
                        ${"GLOBALS"}["prekqcevek"] = "index"; 
                        if (${${"GLOBALS"}["bqyucn"]}["unreadMessageCount"] == 0) { 
                            $xerygtzhqc = "read"; 
                            ${$xerygtzhqc} = ""; 
                            ${${"GLOBALS"}["yxemjq"]} = ""; 
                        } else { 
                            ${${"GLOBALS"}["hsqlfix"]} = "unRead"; 
                            ${${"GLOBALS"}["yxemjq"]} = "<span class=\"counterMsg\" style="top: 0px !important;\">" . ${${"GLOBALS"}["bqyucn"]}["unreadMessageCount"] . "</span>";} 
                        $qooreddwzeq = "index"; 
                        if (${$gmzxngbrwsb} == 0) { 
                            $mfvcrli = "bydefaulOpenChat"; 
                            ${$mfvcrli} = "bydefaulOpenChat"; 
                        } else { 
                            $rnlgwweibr = "bydefaulOpenChat"; 
                            ${$rnlgwweibr} = ""; 
                        } 
                        if (${${"GLOBALS"}["vfwcvgdsp"]} == "Groups") { 
                            ${"GLOBALS"}["smyjsn"] = "html"; 
                            ${"GLOBALS"}["svrfsjv"] = "value"; 
                            $yqboxvxukj = "value"; 
                            $yxbrivgkvx = "bydefaulOpenChat"; 
                            ${"GLOBALS"}["ymssmrkhm"] = "value"; 
                            ${${"GLOBALS"}["smyjsn"]} .= "<div class=\"profile showChatMessages " . ${$yxbrivgkvx} . "\" data-recordid=\"" . ${${"GLOBALS"}["ymssmrkhm"]}["recordId"] . "" data - label = "" . ${${"GLOBALS"}["svrfsjv"]}["label"] . "" data - groupid = \"" . ${$yqboxvxukj}["groupid"] . "" data - groupMember = \"" . ${${"GLOBALS"}["bqyucn"]}["groupMember"] . "\" data-sendmessageingroup="".${${"GLOBALS"}["bqyucn"]}["isReadOnly"]."" style="cursor: pointer;">";$jofmuijopo = "value";if (${${"GLOBALS"}["bqyucn"]}["imagetag"] == 1) { 
                                $bwbwnb = "value"; 
                                ${${"GLOBALS"}["rsnsobisxr"]} .= "<div class="pic\"><img src="".${$bwbwnb}["profileImage"]."\" style="width: 100 %;\"/></div>";} else { 
                                $kvxbtdt = "html"; 
                                ${$kvxbtdt} .= "<div class="pic"><span class=\"imagename\" id=\"imagename" style = \"margin: 7px;font-size: 28px;margin: 2px;color: teal;\"><b>" . ${${"GLOBALS"}["bqyucn"]}["profileImage"] . "</b></span></div>";}${${"GLOBALS"}["rsnsobisxr"]} .= "<div class=\"pText" > 
                        <span > ".${$jofmuijopo}["label"]." </span > ".${${"GLOBALS"}["yxemjq"]}." 
                      </div > 
                    </div > ";}else{$reofom="html";$wlxunsskmaj = "value";${$reofom} .= "<div class=\"profile showChatMessages " . ${${"GLOBALS"}["dvtbrxu"]} . "\" data-recordid="".${${"GLOBALS"}["bqyucn"]}["recordId"]."" style=\"cursor: pointer;" > ";if(${${"GLOBALS"}["bqyucn"]}["imagetag"]==1){$ubxvyjkrv="html";${$ubxvyjkrv} .= "<div class="pic"><img src="".${${"GLOBALS"}["bqyucn"]}["profileImage"]."" style="width: 100 %;"/></div>";}else{ 
                                ${"GLOBALS"}["osrlgek"] = "html"; 
                                ${${"GLOBALS"}["osrlgek"]} .= "<div class="pic\"><span class=\"imagename\" id="imagename\" style="margin: 7px;font - size: 28px;margin: 2px;color: teal;\"><b>" . ${${"GLOBALS"}["bqyucn"]}["profileImage"] . "</b></span></div>";}$swhxjwjq="value";${${"GLOBALS"}["rsnsobisxr"]}.=" < div class="pText\"> 
                        <span>" . ${$wlxunsskmaj}["label"] . "</span>" . ${${"GLOBALS"}["yxemjq"]} . "<p>" . ${${"GLOBALS"}["bqyucn"]}["lastBody"] . "</p> 
                      </div> 
                      <div class=\"dateTime" > ".${$swhxjwjq}["lastDateTime"]." </div > 
                    </div > ";}${$qooreddwzeq}=${${"GLOBALS"}["prekqcevek"]}+1;}${${"GLOBALS"}["rsnsobisxr"]}.="</div > 
        </div > ";if(empty(${$suxibuwfth})){${${"GLOBALS"}["bgtlhcjtqd"]}=new Vtiger_Response();$response->setResult(array("allMessageshtml" => "", "rows" => 0));$response->emit();}else{ 
                                ${${"GLOBALS"}["bgtlhcjtqd"]} = new Vtiger_Response(); 
                                $response->setResult(array("allMessageshtml" => ${${"GLOBALS"}["rsnsobisxr"]}, "rows" => ${${"GLOBALS"}["nudtoiqqufg"]})); 
                                $response->emit(); 
                            }}public function recordDelete($recordId){global$adb;${"GLOBALS"}["ycpulrfvwniq"]="query";$rybspth="deleted";$zmgsgw="deleted";$rfjturk="query";${${"GLOBALS"}["ycpulrfvwniq"]}=$adb->pquery("SELECT * FROM vtiger_crmentity WHERE crmid = ?",array(${${"GLOBALS"}["uasigafv"]}));${$zmgsgw}=$adb->query_result(${$rfjturk},0,"deleted");return${$rybspth};}public function getNewMessagesData($importantMessages,$start,$end,$searchValue,$whatsappmodule,$responseCustomer){global$adb,$current_user;$dcukmmcg="i";$ezqoftxqnjj="value";${${"GLOBALS"}["akuldenvfkv"]}=$current_user->id;$rbneawgo="query";${"GLOBALS"}["ywkizxvuvnx"]="currentUserID";${"GLOBALS"}["civvtsmlykw"]="searchValue";${"GLOBALS"}["uvlcdsxxi"]="allnumber";$bzwppbom="i";$xtoyumurr="configurationData";$nibhqhe="importantMessages";if(${$nibhqhe}=="yes"){${${"GLOBALS"}["fxcxmjpfqy"]}=" AND vc.whatsapplog_important = 1 ";}$wvbhgjk="rows";if(${${"GLOBALS"}["civvtsmlykw"]}){$esffogyek="searchValue";if (is_numeric(${$esffogyek})) { 
                                ${"GLOBALS"}["vrhopytwlap"] = "searchQuery"; 
                                ${${"GLOBALS"}["vrhopytwlap"]} = " AND vc.whatsapplog_withccode LIKE '%" . ${${"GLOBALS"}["gwlmxwwxq"]} . "%'"; 
                            } else { 
                                $klgycbfkc = "searchValue"; 
                                ${${"GLOBALS"}["vquixfweqs"]} = " AND cw.label like '%" . ${$klgycbfkc} . "%'"; 
                                ${${"GLOBALS"}["kmnyykyvckz"]} = " INNER JOIN vtiger_crmentity cw on cw.crmid = vc.whatsapplog_contactid "; 
                            }}$fxglvwkolh="newMessagearray";if(${${"GLOBALS"}["vfwcvgdsp"]}=="NewMessages"){$sczscuahci="customUnreadQuery";${$sczscuahci} = " AND vc.whatsapplog_unreadread = 'Unread' AND vc.messagelog_type = 'Recieved'";}else{ 
                                ${${"GLOBALS"}["bqoncfuvy"]} = "INNER JOIN ct_whatsapp_temp_table_timeline ON vc.whatsapplogid = ct_whatsapp_temp_table_timeline.whatsapplogid "; 
                            }${${"GLOBALS"}["zkvahvrdny"]}=Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["akuldenvfkv"]});${"GLOBALS"}["eoltiiyo"]="allnumber";$inpbgptds="i";${"GLOBALS"}["rawkfcu"]="key";${${"GLOBALS"}["nxlhqiedhkli"]}=${$xtoyumurr}["whatsappno"];${${"GLOBALS"}["kurtlcufu"]}=CTWhatsApp_Record_Model::getAllConnectedWhatsappNumber(${${"GLOBALS"}["ywkizxvuvnx"]});${${"GLOBALS"}["tqbulrrwwg"]}="";foreach(${${"GLOBALS"}["kurtlcufu"]} as${${"GLOBALS"}["rawkfcu"]}=>${$ezqoftxqnjj}){$ukvdkvnry="inNumber";${$ukvdkvnry} .= "'" . ${${"GLOBALS"}["bqyucn"]}["whatsappno"] . "',";}${${"GLOBALS"}["uvlcdsxxi"]}=rtrim(${${"GLOBALS"}["tqbulrrwwg"]},",");${${"GLOBALS"}["gluytrwnl"]}=" and vc . whatsapplog_your_number IN(".${${"GLOBALS"}["eoltiiyo"]}.") ";$hjpdsxselhsb="rows";${${"GLOBALS"}["nhiramzvkzh"]}=" and vc_inner . whatsapplog_your_number IN(".${${"GLOBALS"}["wdmedzqlg"]}.") ";if(${${"GLOBALS"}["wqheqyvcrte"]}==1){${"GLOBALS"}["sclajsfeik"]="inNumberQuery";${"GLOBALS"}["ljcrrydz"] = "start";${"GLOBALS"}["isnnwfulwqfl"] = "responseQuery";${"GLOBALS"}["zcngxnxg"] = "i";${${"GLOBALS"}["isnnwfulwqfl"]} = $adb->pquery("SELECT * FROM whatsappbot_pre_que");${${"GLOBALS"}["eyxwyylxr"]} = $adb->num_rows(${${"GLOBALS"}["mxgoxq"]});${${"GLOBALS"}["ftwvbpfiy"]} = "";${"GLOBALS"}["vfyskys"] = "query";for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["eyxwyylxr"]}; ${${"GLOBALS"}["zcngxnxg"]}++) { 
                                ${"GLOBALS"}["cmtmvw"] = "responsecustomerNumber"; 
                                $vlgwbdiyjqx = "responseQuery"; 
                                ${${"GLOBALS"}["cmtmvw"]} .= """.$adb->query_result(${$vlgwbdiyjqx},${${"GLOBALS"}["gjdoju"]},"prequemobilenumber")."",";}${${"GLOBALS"}["vfyskys"]} = $adb->pquery("SELECT vc.whatsapplog_withccode, vc.messagelog_body, vc.whatsapplogid, vc.whatsapplog_datetime, vc.whatsapplog_contactid 
                FROM vtiger_whatsapplog vc INNER JOIN vtiger_crmentity cr ON cr.crmid = vc.whatsapplogid 
                " . ${${"GLOBALS"}["kmnyykyvckz"]} . " 
                AND vc.whatsapplog_withccode != ''    
                " . ${${"GLOBALS"}["sclajsfeik"]} . " 
                " . ${${"GLOBALS"}["fxcxmjpfqy"]} . " 
                " . ${${"GLOBALS"}["vquixfweqs"]} . " 
                " . ${${"GLOBALS"}["mcjtqufesisv"]} . " 
                AND vc.whatsapplog_withccode != 'Groups'  
                AND cr.deleted = 0  
                AND whatsapplog_withccode IN (" . rtrim(${${"GLOBALS"}["ftwvbpfiy"]}, ",") . ") 
                ORDER BY vc.whatsapplog_datetime DESC LIMIT 0," . ${${"GLOBALS"}["ljcrrydz"]});}else{ 
                                $geayxrjv = "inNumberQuery"; 
                                $swtuohibiyp = "searchInnerQuery"; 
                                ${"GLOBALS"}["cegxeuq"] = "query"; 
                                ${"GLOBALS"}["mgrhjvd"] = "start"; 
                                ${"GLOBALS"}["ehjrukxvz"] = "searchQuery"; 
                                ${${"GLOBALS"}["cegxeuq"]} = $adb->pquery("SELECT vc.whatsapplog_withccode, vc.messagelog_body, vc.whatsapplogid, vc.whatsapplog_datetime, vc.whatsapplog_contactid 
                FROM vtiger_whatsapplog vc INNER JOIN vtiger_crmentity cr ON cr.crmid = vc.whatsapplogid 
                " . ${$swtuohibiyp} . " 
                AND vc.whatsapplog_withccode != '' 
                " . ${$geayxrjv} . " 
                " . ${${"GLOBALS"}["fxcxmjpfqy"]} . " 
                " . ${${"GLOBALS"}["ehjrukxvz"]} . " 
                " . ${${"GLOBALS"}["mcjtqufesisv"]} . " 
                AND vc.whatsapplog_withccode != 'Groups' 
                AND cr.deleted = 0 
                ORDER BY vc.whatsapplog_datetime DESC LIMIT 0," . ${${"GLOBALS"}["mgrhjvd"]}); 
                            }${$wvbhgjk}=$adb->num_rows(${$rbneawgo});${$fxglvwkolh}=array();for(${$dcukmmcg}=0;${$bzwppbom}<${$hjpdsxselhsb};${$inpbgptds}++){ 
                                $wzupepe = "query"; 
                                ${${"GLOBALS"}["fekwfqwx"]} = ""; 
                                ${${"GLOBALS"}["uasigafv"]} = $adb->query_result(${$wzupepe}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_contactid"); 
                                if (${${"GLOBALS"}["uasigafv"]} == "") { 
                                    ${"GLOBALS"}["sxkuzha"] = "i"; 
                                    ${"GLOBALS"}["xjkdzpxjil"] = "messageData"; 
                                    $gvhtniykpwh = "lastBody"; 
                                    $cretqxwytax = "i"; 
                                    ${${"GLOBALS"}["vnvrdcwsvg"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$cretqxwytax}, "whatsapplog_withccode"); 
                                    ${"GLOBALS"}["pfudbbjgm"] = "lastDateTime"; 
                                    $mfmbeegkx = "query"; 
                                    $qfdsjeqeemet = "profileImage"; 
                                    ${${"GLOBALS"}["avskwgujri"]} = $adb->query_result(${$mfmbeegkx}, ${${"GLOBALS"}["sxkuzha"]}, "messagelog_body"); 
                                    $fnwuwg = "avgMessageDay"; 
                                    $lbfdegv = "newMessagearray"; 
                                    ${"GLOBALS"}["dydtlwqhrc"] = "imagetag"; 
                                    $ceqentd = "unreadMessageCount"; 
                                    ${${"GLOBALS"}["pfudbbjgm"]} = Vtiger_Util_Helper::formatDateDiffInStrings($adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_datetime")); 
                                    ${"GLOBALS"}["vixyijcgjj"] = "label"; 
                                    ${"GLOBALS"}["jeykgkhcjddy"] = "messageData"; 
                                    $qdnbdluxifx = "profileImage"; 
                                    $mpghyoow = "label"; 
                                    ${"GLOBALS"}["xgpwxaf"] = "lastDateTime"; 
                                    ${${"GLOBALS"}["uasigafv"]} = ${${"GLOBALS"}["vnvrdcwsvg"]}; 
                                    ${$qfdsjeqeemet} = "layouts/v7/modules/CTWhatsApp/image/AvtarIcon.png"; 
                                    ${${"GLOBALS"}["hynfnuhl"]} = 1; 
                                    ${${"GLOBALS"}["jeykgkhcjddy"]} = CTWhatsApp_Record_Model::getWhatsappUnReadNewMessageCounts(${$mpghyoow}); 
                                    ${"GLOBALS"}["uhnpqbzhqh"] = "unreadMessageCount"; 
                                    ${${"GLOBALS"}["uhnpqbzhqh"]} = ${${"GLOBALS"}["xjkdzpxjil"]}["unreadCount"]; 
                                    ${${"GLOBALS"}["pvqvqtue"]} = ${${"GLOBALS"}["sqrlidgs"]}["avgMessageDay"]; 
                                    ${$lbfdegv}[${${"GLOBALS"}["vixyijcgjj"]}] = array("recordId" => ${${"GLOBALS"}["uasigafv"]}, "label" => ${${"GLOBALS"}["vnvrdcwsvg"]}, "profileImage" => ${$qdnbdluxifx}, "imagetag" => ${${"GLOBALS"}["dydtlwqhrc"]}, "unreadMessageCount" => ${$ceqentd}, "avgMessageDay" => ${$fnwuwg}, "lastBody" => ${$gvhtniykpwh}, "lastDateTime" => ${${"GLOBALS"}["xgpwxaf"]}); 
                                } else { 
                                    $ijbvorzu = "setype"; 
                                    $nwioaulu = "recordId"; 
                                    ${"GLOBALS"}["iecrfhxum"] = "actionName"; 
                                    $dmddqfytl = "actionName"; 
                                    ${$ijbvorzu} = VtigerCRMObject::getSEType(${$nwioaulu}); 
                                    ${${"GLOBALS"}["iecrfhxum"]} = "DetailView"; 
                                    if (!Users_Privileges_Model::isPermitted(${${"GLOBALS"}["qbwrpdx"]}, ${$dmddqfytl}, ${${"GLOBALS"}["uasigafv"]})) { 
                                        ${"GLOBALS"}["kztecborapl"] = "permissionRecord"; 
                                        ${${"GLOBALS"}["kztecborapl"]} = "0"; 
                                    } else { 
                                        ${"GLOBALS"}["nkppgpkv"] = "permissionRecord"; 
                                        ${${"GLOBALS"}["nkppgpkv"]} = "1"; 
                                    } 
                                    if (${${"GLOBALS"}["axmtnsvlm"]} == 1) { 
                                        $sqdyeg = "setype"; 
                                        ${${"GLOBALS"}["kivdwa"]} = CTWhatsApp_Record_Model::getmoduleIsEnable(${$sqdyeg}); 
                                        if (${${"GLOBALS"}["kivdwa"]} == 0) { 
                                            ${"GLOBALS"}["zudogpvpdn"] = "recordId"; 
                                            $jepbmrgvv = "deleteRecord"; 
                                            $neejyryxycv = "deleteRecord"; 
                                            ${$neejyryxycv} = CTWhatsApp_Record_Model::recordDelete(${${"GLOBALS"}["zudogpvpdn"]}); 
                                            if (${$jepbmrgvv} == 0) { 
                                                $fxfmirkond = "newMessagearray"; 
                                                ${"GLOBALS"}["anclnvmsntx"] = "lastBody"; 
                                                ${"GLOBALS"}["ivxobewgoij"] = "query"; 
                                                $wczwbl = "unreadMessageCount"; 
                                                ${"GLOBALS"}["tdrqak"] = "label"; 
                                                ${"GLOBALS"}["kayhwvikutoq"] = "label"; 
                                                if (${${"GLOBALS"}["uasigafv"]}) { 
                                                    ${"GLOBALS"}["orhecwstoe"] = "recordModel"; 
                                                    ${"GLOBALS"}["bsjfrdnmg"] = "label"; 
                                                    ${${"GLOBALS"}["orhecwstoe"]} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["qbwrpdx"]}); 
                                                    ${${"GLOBALS"}["bsjfrdnmg"]} = $recordModel->get("label"); 
                                                } 
                                                ${${"GLOBALS"}["wftlerhjcih"]} = CTWhatsApp_Record_Model::getImageDetails(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["qbwrpdx"]}); 
                                                $wjfzsppm = "messageData"; 
                                                ${${"GLOBALS"}["hynfnuhl"]} = 1; 
                                                $kbmlkuev = "lastDateTime"; 
                                                ${"GLOBALS"}["hffvskmeqbh"] = "avgMessageDay"; 
                                                if (${${"GLOBALS"}["wftlerhjcih"]} == "") { 
                                                    ${"GLOBALS"}["lzdrojv"] = "labelExplode"; 
                                                    ${"GLOBALS"}["gfdwqopi"] = "labelExplode"; 
                                                    $uwwsdfgkdyr = "profileImage"; 
                                                    ${${"GLOBALS"}["lzdrojv"]} = explode(" ", ${${"GLOBALS"}["vnvrdcwsvg"]}); 
                                                    ${$uwwsdfgkdyr} = mb_substr(${${"GLOBALS"}["pgmwsjte"]}[0], 0, 1, "UTF-8") . mb_substr(${${"GLOBALS"}["gfdwqopi"]}[1], 0, 1, "UTF-8"); 
                                                    ${${"GLOBALS"}["hynfnuhl"]} = 0; 
                                                } 
                                                ${${"GLOBALS"}["sqrlidgs"]} = CTWhatsApp_Record_Model::getWhatsappUnReadMessageCounts(${${"GLOBALS"}["uasigafv"]}); 
                                                ${$wczwbl} = ${$wjfzsppm}["unreadCount"]; 
                                                ${${"GLOBALS"}["pvqvqtue"]} = ${${"GLOBALS"}["sqrlidgs"]}["avgMessageDay"]; 
                                                ${"GLOBALS"}["urnxcqgsqbx"] = "query"; 
                                                ${${"GLOBALS"}["anclnvmsntx"]} = $adb->query_result(${${"GLOBALS"}["urnxcqgsqbx"]}, ${${"GLOBALS"}["gjdoju"]}, "messagelog_body"); 
                                                ${"GLOBALS"}["xutktdweigm"] = "lastBody"; 
                                                $nfmeqq = "imagetag"; 
                                                ${${"GLOBALS"}["lyvjgviy"]} = Vtiger_Util_Helper::formatDateDiffInStrings($adb->query_result(${${"GLOBALS"}["ivxobewgoij"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_datetime")); 
                                                ${$fxfmirkond}[${${"GLOBALS"}["tdrqak"]}] = array("recordId" => ${${"GLOBALS"}["uasigafv"]}, "label" => ${${"GLOBALS"}["kayhwvikutoq"]}, "profileImage" => ${${"GLOBALS"}["wftlerhjcih"]}, "imagetag" => ${$nfmeqq}, "unreadMessageCount" => ${${"GLOBALS"}["fekwfqwx"]}, "avgMessageDay" => ${${"GLOBALS"}["hffvskmeqbh"]}, "lastBody" => ${${"GLOBALS"}["xutktdweigm"]}, "lastDateTime" => ${$kbmlkuev}); 
                                            } 
                                        } 
                                    } 
                                } 
                            }return${${"GLOBALS"}["fnridejvobp"]};}public function getWhatsappUnReadNewMessageCounts($phonenumber){global$adb;$jjniocohix="unreadQuery";${"GLOBALS"}["pgblrdppvb"]="unreadQuery";${"GLOBALS"}["tgisgmmf"]="unreadCount";${"GLOBALS"}["iyeymsdg"]="query";$gjxwuutv="totalDays";$pyovnbprp="allMessageQuery";$binxetyuwt="phonenumber";$ldutrhshfrq="query";${${"GLOBALS"}["vnajxvzttek"]}=CTWhatsApp_Record_Model::unreadQuery();${$ldutrhshfrq}=$adb->pquery(${${"GLOBALS"}["pgblrdppvb"]}." and vtiger_ctwhatsapp . whatsapp_unreadread = 'Unread' and vtiger_ctwhatsapp . whatsapp_withccode = ? and vtiger_ctwhatsapp . message_type = 'Recieved'",array(${$binxetyuwt}));${"GLOBALS"}["wmktgfviyuug"]="avgMessageDay";${${"GLOBALS"}["mdetdrg"]}=$adb->num_rows(${${"GLOBALS"}["iyeymsdg"]});${"GLOBALS"}["gwxqxx"]="rows";$nxlxwdos="result";${${"GLOBALS"}["keqplemrj"]}=$adb->pquery(${$jjniocohix}." and vtiger_ctwhatsapp . whatsapp_withccode = ?",array(${${"GLOBALS"}["ucqedrxvhsd"]}));${${"GLOBALS"}["iwyngpalekm"]}=$adb->num_rows(${$pyovnbprp});${$gjxwuutv}=30;${${"GLOBALS"}["wmktgfviyuug"]}=${${"GLOBALS"}["gwxqxx"]}/${${"GLOBALS"}["clroexjn"]};${${"GLOBALS"}["iryaaagcqts"]}=array("unreadCount"=>${${"GLOBALS"}["tgisgmmf"]},"avgMessageDay"=>number_format(${${"GLOBALS"}["pvqvqtue"]},2));return${$nxlxwdos};}public function getLastWhatsappNewMessageData($phonenumber){$wvfwmrwb="query";$jenpflscsgcs = "phonenumber";global$adb, $current_user;${"GLOBALS"}["vataulosa"] = "unreadQuery";$tnvlyyynpht = "unreadQuery";${"GLOBALS"}["dbmdexyztvx"] = "currentUserID";${${"GLOBALS"}["dbmdexyztvx"]} = $current_user->id;${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["akuldenvfkv"]});${${"GLOBALS"}["vataulosa"]} = CTWhatsApp_Record_Model::unreadQuery();${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery(${$tnvlyyynpht} . " AND vtiger_ctwhatsapp.whatsapp_withccode = ? " . ${${"GLOBALS"}["gluytrwnl"]} . " ORDER BY vtiger_ctwhatsapp.whatsapp_datetime DESC LIMIT 0,1", array(${$jenpflscsgcs}));${${"GLOBALS"}["lhmgnydp"]} = $adb->query_result(${$wvfwmrwb}, 0, "message_body");$iwvvxjsxpt = "whatsappData";if ($adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsapp_datetime")) { 
                                $ooojnwvvuujf = "dateTime"; 
                                ${$ooojnwvvuujf} = Vtiger_Util_Helper::formatDateDiffInStrings($adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsapp_datetime")); 
                            } else { 
                                ${${"GLOBALS"}["oumtlvduudo"]} == ""; 
                            }${${"GLOBALS"}["vlhvaggwsfs"]} = array("body" => ${${"GLOBALS"}["lhmgnydp"]}, "dateTime" => ${${"GLOBALS"}["oumtlvduudo"]});return ${$iwvvxjsxpt};}public function getImageDetails($recordId,$setype){ 
                                ${"GLOBALS"}["sbdujialq"] = "db"; 
                                global $root_directory; 
                                ${${"GLOBALS"}["sbdujialq"]} = PearDatabase::getInstance(); 
                                ${${"GLOBALS"}["uuuebmncrkkw"]} = array(); 
                                if (${${"GLOBALS"}["uasigafv"]}) { 
                                    $oejynildy = "result"; 
                                    $rkilorkinl = "imageName"; 
                                    $rvqrxnakowt = "imageName"; 
                                    ${"GLOBALS"}["mvxwohuvor"] = "imageName"; 
                                    ${"GLOBALS"}["acwefwq"] = "imagePath"; 
                                    ${"GLOBALS"}["ogpyqkngfdj"] = "sql"; 
                                    $pmwsfp = "sql"; 
                                    ${$pmwsfp} = "SELECT vtiger_attachments.*, vtiger_crmentity.setype FROM vtiger_attachments 
                INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_attachments.attachmentsid 
                WHERE vtiger_seattachmentsrel.crmid = ?"; 
                                    $zofaxn = "imageId"; 
                                    ${${"GLOBALS"}["iryaaagcqts"]} = $db->pquery(${${"GLOBALS"}["ogpyqkngfdj"]}, array(${${"GLOBALS"}["uasigafv"]})); 
                                    ${"GLOBALS"}["jvemxk"] = "result"; 
                                    ${$zofaxn} = $db->query_result(${$oejynildy}, 0, "attachmentsid"); 
                                    ${${"GLOBALS"}["acwefwq"]} = $db->query_result(${${"GLOBALS"}["iryaaagcqts"]}, 0, "path"); 
                                    ${$rkilorkinl} = $db->query_result(${${"GLOBALS"}["jvemxk"]}, 0, "storedname"); 
                                    ${${"GLOBALS"}["fhebhnfwwme"]} = urlencode(decode_html(${$rvqrxnakowt})); 
                                    if (!empty(${${"GLOBALS"}["mvxwohuvor"]})) { 
                                        ${"GLOBALS"}["egllnad"] = "imageOriginalName"; 
                                        ${"GLOBALS"}["fngnwptuxx"] = "imageName"; 
                                        ${"GLOBALS"}["tjhyfwpr"] = "imagePath"; 
                                        $bshfzblirpfx = "imagePath"; 
                                        ${"GLOBALS"}["ubvshtox"] = "imagePath"; 
                                        $nblekcelebp = "imageId"; 
                                        ${"GLOBALS"}["jfyxngulcw"] = "imageId"; 
                                        ${${"GLOBALS"}["uuuebmncrkkw"]}[] = array("id" => ${${"GLOBALS"}["jfyxngulcw"]}, "orgname" => ${${"GLOBALS"}["egllnad"]}, "path" => ${$bshfzblirpfx} . ${$nblekcelebp}, "name" => ${${"GLOBALS"}["fngnwptuxx"]}); 
                                        ${${"GLOBALS"}["ubvshtox"]} = ${${"GLOBALS"}["tjhyfwpr"]} . ${${"GLOBALS"}["jqctqnhxcqm"]} . "_" . ${${"GLOBALS"}["ytvwtwpbrom"]}; 
                                    } 
                                } 
                                return ${${"GLOBALS"}["decvtdm"]}; 
                            }public function getWhatsappUnReadMessageCounts($recordId){ 
                                ${"GLOBALS"}["daidtu"] = "query"; 
                                global $adb; 
                                $lznrjtrvqn = "recordId"; 
                                ${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQuery(); 
                                ${"GLOBALS"}["himidllfxvc"] = "query"; 
                                $byusxy = "result"; 
                                $fwhqiooh = "unreadQuery"; 
                                ${"GLOBALS"}["dxwmqnw"] = "recordId"; 
                                ${${"GLOBALS"}["himidllfxvc"]} = $adb->pquery(${${"GLOBALS"}["vnajxvzttek"]} . " AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Unread' AND vtiger_ctwhatsapp.whatsapp_contactid = ? AND vtiger_ctwhatsapp.message_type = 'Recieved'", array(${$lznrjtrvqn})); 
                                ${${"GLOBALS"}["mdetdrg"]} = $adb->num_rows(${${"GLOBALS"}["daidtu"]}); 
                                ${"GLOBALS"}["wwmcldwfwuw"] = "rows"; 
                                ${${"GLOBALS"}["keqplemrj"]} = $adb->pquery(${$fwhqiooh} . " AND vtiger_ctwhatsapp.whatsapp_contactid = ?", array(${${"GLOBALS"}["dxwmqnw"]})); 
                                ${${"GLOBALS"}["wwmcldwfwuw"]} = $adb->num_rows(${${"GLOBALS"}["keqplemrj"]}); 
                                ${${"GLOBALS"}["clroexjn"]} = 30; 
                                ${${"GLOBALS"}["pvqvqtue"]} = ${${"GLOBALS"}["iwyngpalekm"]} / ${${"GLOBALS"}["clroexjn"]}; 
                                ${$byusxy} = array("unreadCount" => ${${"GLOBALS"}["mdetdrg"]}, "avgMessageDay" => number_format(${${"GLOBALS"}["pvqvqtue"]}, 2)); 
                                ${"GLOBALS"}["gdugbxeiur"] = "result"; 
                                return ${${"GLOBALS"}["gdugbxeiur"]}; 
                            }public function getLastWhatsappMessageData($recordId){global$adb,$current_user;${"GLOBALS"}["vbmlkhh"]="unreadQuery";$rlsxyyknvc="currentUserID";${"GLOBALS"}["ufutvpdqwm"]="query";${$rlsxyyknvc}=$current_user->id;$qunlqve="recordId";${"GLOBALS"}["wtqcvx"]="body";${${"GLOBALS"}["vbmlkhh"]}=CTWhatsApp_Record_Model::unreadQuery();${${"GLOBALS"}["gluytrwnl"]}=CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["akuldenvfkv"]});${${"GLOBALS"}["ufutvpdqwm"]}=$adb->pquery(${${"GLOBALS"}["vnajxvzttek"]}." and vtiger_ctwhatsapp . whatsapp_contactid = ? ".${${"GLOBALS"}["gluytrwnl"]}." ORDER BY vtiger_ctwhatsapp . whatsapp_datetime DESC LIMIT 0,1",array(${$qunlqve}));$hiydfl="whatsappData";${${"GLOBALS"}["wtqcvx"]}=$adb->query_result(${${"GLOBALS"}["vvonkioccd"]},0,"message_body");$mebbkmux="body";if($adb->query_result(${${"GLOBALS"}["vvonkioccd"]},0,"whatsapp_datetime")){${"GLOBALS"}["rneryxu"]="dateTime";${${"GLOBALS"}["rneryxu"]} = Vtiger_Util_Helper::formatDateDiffInStrings($adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsapp_datetime"));}else{ 
                                ${"GLOBALS"}["dvuzvzc"] = "dateTime"; 
                                ${${"GLOBALS"}["dvuzvzc"]} == ""; 
                            }${${"GLOBALS"}["vlhvaggwsfs"]}=array("body"=>${$mebbkmux},"dateTime"=>${${"GLOBALS"}["oumtlvduudo"]});return${$hiydfl};}public function getUnknownMessagesData($start,$end,$searchValue){$uytkzbbxor="inNumberQuery";${"GLOBALS"}["pfmcxof"] = "currentUserID";${"GLOBALS"}["dgfncu"] = "currentUserID";global$adb, $current_user;${"GLOBALS"}["yzjkyqjqybl"] = "query";${"GLOBALS"}["xtatwltpongm"] = "inNumberQuery";$bzgadyhgck = "i";${${"GLOBALS"}["dgfncu"]} = $current_user->id;${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQuery();${$uytkzbbxor} = CTWhatsApp_Record_Model::getLogInNumberQuery(${${"GLOBALS"}["pfmcxof"]});${"GLOBALS"}["nsgynkq"] = "rows";${"GLOBALS"}["ajizdyl"] = "newMessagearray";if (${${"GLOBALS"}["gwlmxwwxq"]}) { 
                                ${${"GLOBALS"}["vquixfweqs"]} = " AND vtiger_whatsapplog.whatsapplog_withccode LIKE '%" . ${${"GLOBALS"}["gwlmxwwxq"]} . "%'"; 
                            }${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT vtiger_whatsapplog.whatsapplog_withccode, vtiger_whatsapplog.messagelog_body, vtiger_whatsapplog.whatsapplog_datetime FROM vtiger_whatsapplog  
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid  
            WHERE vtiger_crmentity.deleted = 0 AND (vtiger_whatsapplog.whatsapplog_withccode != 'Groups' AND vtiger_whatsapplog.whatsapplog_withccode != '') AND vtiger_whatsapplog.whatsapplog_contactid = '' " . ${${"GLOBALS"}["xtatwltpongm"]} . ${${"GLOBALS"}["txurdvt"]} . ${${"GLOBALS"}["vquixfweqs"]} . " GROUP BY vtiger_whatsapplog.whatsapplog_withccode ORDER BY vtiger_crmentity.createdtime DESC LIMIT 0, " . ${${"GLOBALS"}["dmvknwtxvz"]}, array());${${"GLOBALS"}["nsgynkq"]} = $adb->num_rows(${${"GLOBALS"}["yzjkyqjqybl"]});${${"GLOBALS"}["ajizdyl"]} = array();for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["iwyngpalekm"]}; ${$bzgadyhgck}++) { 
                                $ljyockd = "query"; 
                                ${"GLOBALS"}["uclwsju"] = "unreadMessageCount"; 
                                $pysjbptmqtl = "imagetag"; 
                                ${"GLOBALS"}["skxxprmy"] = "profileImage"; 
                                ${"GLOBALS"}["ewwixppqqfc"] = "unreadMessageCount"; 
                                $clwcbohvxk = "lastDateTime"; 
                                $desocfn = "i"; 
                                ${"GLOBALS"}["smyutxe"] = "i"; 
                                ${"GLOBALS"}["hfrfwcujxibq"] = "profileImage"; 
                                ${"GLOBALS"}["gyoeqmkowpr"] = "label"; 
                                ${${"GLOBALS"}["vnvrdcwsvg"]} = $adb->query_result(${$ljyockd}, ${${"GLOBALS"}["smyutxe"]}, "whatsapplog_withccode"); 
                                ${${"GLOBALS"}["uasigafv"]} = ${${"GLOBALS"}["gyoeqmkowpr"]}; 
                                $ggbgcsgww = "newMessagearray"; 
                                ${${"GLOBALS"}["hfrfwcujxibq"]} = "layouts/v7/modules/CTWhatsApp/image/AvtarIcon.png"; 
                                $ynuqsqqjyk = "i"; 
                                $zgxprhb = "lastDateTime"; 
                                $dlezyayq = "messageData"; 
                                ${"GLOBALS"}["raiuju"] = "query"; 
                                $rdownbler = "lastBody"; 
                                ${"GLOBALS"}["uxrelrbur"] = "avgMessageDay"; 
                                ${$pysjbptmqtl} = 1; 
                                ${$dlezyayq} = CTWhatsApp_Record_Model::getWhatsappUnReadNewMessageCounts(${${"GLOBALS"}["vnvrdcwsvg"]}); 
                                $ivigofpb = "query"; 
                                ${${"GLOBALS"}["uclwsju"]} = ${${"GLOBALS"}["sqrlidgs"]}["unreadCount"]; 
                                $yrmfqyqt = "lastBody"; 
                                ${${"GLOBALS"}["pvqvqtue"]} = ${${"GLOBALS"}["sqrlidgs"]}["avgMessageDay"]; 
                                $pcyokubng = "recordId"; 
                                ${$rdownbler} = $adb->query_result(${$ivigofpb}, ${$desocfn}, "messagelog_body"); 
                                ${$zgxprhb} = Vtiger_Util_Helper::formatDateDiffInStrings($adb->query_result(${${"GLOBALS"}["raiuju"]}, ${$ynuqsqqjyk}, "whatsapplog_datetime")); 
                                ${$ggbgcsgww}[${${"GLOBALS"}["vnvrdcwsvg"]}] = array("recordId" => ${$pcyokubng}, "label" => ${${"GLOBALS"}["vnvrdcwsvg"]}, "profileImage" => ${${"GLOBALS"}["skxxprmy"]}, "imagetag" => ${${"GLOBALS"}["hynfnuhl"]}, "unreadMessageCount" => ${${"GLOBALS"}["ewwixppqqfc"]}, "avgMessageDay" => ${${"GLOBALS"}["uxrelrbur"]}, "lastBody" => ${$yrmfqyqt}, "lastDateTime" => ${$clwcbohvxk}); 
                            }return ${${"GLOBALS"}["fnridejvobp"]};}public function getModuleMessagesData($whatsappmodule,$start,$end,$searchValue){ 
                                $emqpdor = "moduleQuery"; 
                                $dudnewyjm = "whatsaappModuleData"; 
                                $djdmndc = "i"; 
                                global $adb; 
                                ${$dudnewyjm} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["vfwcvgdsp"]}); 
                                ${"GLOBALS"}["kmkmscu"] = "whatsappmodule"; 
                                $ttmqzllnfoy = "phoneField"; 
                                ${$ttmqzllnfoy} = ${${"GLOBALS"}["eokkqrtn"]}["phoneField"]; 
                                ${$emqpdor} = CTWhatsApp_Record_Model::moduleQuery(${${"GLOBALS"}["kmkmscu"]}, ${${"GLOBALS"}["swlnsqrjjzye"]}, ${${"GLOBALS"}["gwlmxwwxq"]}); 
                                $ymmvnw = "moduleRecordData"; 
                                ${"GLOBALS"}["pkfntbwytqtx"] = "i"; 
                                if (${${"GLOBALS"}["gwlmxwwxq"]}) { 
                                    ${"GLOBALS"}["dvdxocog"] = "query"; 
                                    ${${"GLOBALS"}["dvdxocog"]} = $adb->pquery(${${"GLOBALS"}["qitgxwxyb"]}); 
                                } else { 
                                    ${"GLOBALS"}["rafnhrxt"] = "start"; 
                                    ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery(${${"GLOBALS"}["qitgxwxyb"]} . " ORDER BY vtiger_whatsapplog.whatsapplog_datetime DESC LIMIT 0, " . ${${"GLOBALS"}["rafnhrxt"]}); 
                                } 
                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                ${$ymmvnw} = array(); 
                                for (${${"GLOBALS"}["gjdoju"]} = 0; ${$djdmndc} < ${${"GLOBALS"}["iwyngpalekm"]}; ${${"GLOBALS"}["pkfntbwytqtx"]}++) { 
                                    $togijxq = "query"; 
                                    ${"GLOBALS"}["vxapunwoxsl"] = "label"; 
                                    ${"GLOBALS"}["phfecofd"] = "profileImage"; 
                                    ${"GLOBALS"}["gqaybd"] = "messageData"; 
                                    ${"GLOBALS"}["ewcmsqeuwg"] = "i"; 
                                    ${"GLOBALS"}["oszqxy"] = "i"; 
                                    ${"GLOBALS"}["hqkckvjw"] = "i"; 
                                    ${"GLOBALS"}["rulvssczhgl"] = "imagetag"; 
                                    ${"GLOBALS"}["fwbhoore"] = "recordId"; 
                                    $unoouthxmijt = "query"; 
                                    ${"GLOBALS"}["wrmugs"] = "label"; 
                                    ${"GLOBALS"}["pkohjuycdtdk"] = "messageData"; 
                                    ${"GLOBALS"}["dyilfmpt"] = "recordId"; 
                                    ${${"GLOBALS"}["uasigafv"]} = $adb->query_result(${$togijxq}, ${${"GLOBALS"}["hqkckvjw"]}, "whatsapplog_contactid"); 
                                    ${"GLOBALS"}["giqzti"] = "profileImage"; 
                                    $shewjiet = "messageData"; 
                                    $tfuqsrfmje = "setype"; 
                                    ${${"GLOBALS"}["wrmugs"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["oszqxy"]}, "whatsapplog_displayname"); 
                                    $oqvlqts = "lastDateTime"; 
                                    ${${"GLOBALS"}["qbwrpdx"]} = $adb->query_result(${$unoouthxmijt}, ${${"GLOBALS"}["gjdoju"]}, "setype"); 
                                    ${${"GLOBALS"}["giqzti"]} = CTWhatsApp_Record_Model::getImageDetails(${${"GLOBALS"}["dyilfmpt"]}, ${$tfuqsrfmje}); 
                                    ${${"GLOBALS"}["rulvssczhgl"]} = 1; 
                                    if (${${"GLOBALS"}["phfecofd"]} == "") { 
                                        $clegjwq = "imagetag"; 
                                        $wesfwbibrgr = "labelExplode"; 
                                        $plconce = "labelExplode"; 
                                        $jjcibtj = "label"; 
                                        ${$wesfwbibrgr} = explode(" ", ${$jjcibtj}); 
                                        ${${"GLOBALS"}["wftlerhjcih"]} = mb_substr(${${"GLOBALS"}["pgmwsjte"]}[0], 0, 1, "UTF-8") . mb_substr(${$plconce}[1], 0, 1, "UTF-8"); 
                                        ${$clegjwq} = 0; 
                                    } 
                                    ${${"GLOBALS"}["gqaybd"]} = CTWhatsApp_Record_Model::getWhatsappUnReadMessageCounts(${${"GLOBALS"}["fwbhoore"]}); 
                                    ${"GLOBALS"}["ypcvrt"] = "query"; 
                                    ${${"GLOBALS"}["fekwfqwx"]} = ${$shewjiet}["unreadCount"]; 
                                    ${"GLOBALS"}["pxeuhvcmyjj"] = "i"; 
                                    $icgtcnbxra = "avgMessageDay"; 
                                    ${${"GLOBALS"}["pvqvqtue"]} = ${${"GLOBALS"}["pkohjuycdtdk"]}["avgMessageDay"]; 
                                    ${${"GLOBALS"}["avskwgujri"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["pxeuhvcmyjj"]}, "messagelog_body"); 
                                    ${$oqvlqts} = Vtiger_Util_Helper::formatDateDiffInStrings($adb->query_result(${${"GLOBALS"}["ypcvrt"]}, ${${"GLOBALS"}["ewcmsqeuwg"]}, "whatsapplog_datetime")); 
                                    ${${"GLOBALS"}["pgekowu"]}[] = array("recordId" => ${${"GLOBALS"}["uasigafv"]}, "label" => ${${"GLOBALS"}["vxapunwoxsl"]}, "profileImage" => ${${"GLOBALS"}["wftlerhjcih"]}, "imagetag" => ${${"GLOBALS"}["hynfnuhl"]}, "unreadMessageCount" => ${${"GLOBALS"}["fekwfqwx"]}, "avgMessageDay" => ${$icgtcnbxra}, "lastBody" => ${${"GLOBALS"}["avskwgujri"]}, "lastDateTime" => ${${"GLOBALS"}["lyvjgviy"]}); 
                                } 
                                return ${${"GLOBALS"}["pgekowu"]}; 
                            }public function getImportantMessageDetail($phone){ 
                                ${"GLOBALS"}["lfzbkftoixc"] = "phone"; 
                                global $adb; 
                                ${"GLOBALS"}["uazfscfsofm"] = "important"; 
                                ${"GLOBALS"}["jcmpawy"] = "important"; 
                                ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_whatsapplog 
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
            WHERE vtiger_whatsapplog.whatsapplog_withccode = ? AND vtiger_crmentity.deleted = 0", array(${${"GLOBALS"}["lfzbkftoixc"]})); 
                                ${"GLOBALS"}["xcdnluizyoy"] = "query"; 
                                ${${"GLOBALS"}["jcmpawy"]} = $adb->query_result(${${"GLOBALS"}["xcdnluizyoy"]}, 0, "whatsapplog_important"); 
                                return ${${"GLOBALS"}["uazfscfsofm"]}; 
                            }public function getModuleRecordData($recordId,$setype,$whatsappModule,$groupid,$groupWhatsappNumber){ 
                                ${"GLOBALS"}["uxwbwzggzsbm"] = "setype"; 
                                global $adb; 
                                ${"GLOBALS"}["pigeira"] = "label"; 
                                ${"GLOBALS"}["pvsstl"] = "ModCommentsEnable"; 
                                ${"GLOBALS"}["wyibcaqd"] = "getBotMobile"; 
                                ${"GLOBALS"}["rgkktubiczh"] = "phoneFieldData"; 
                                $qmpuqsl = "themeView"; 
                                $lmutfjdfi = "relatedModules"; 
                                ${"GLOBALS"}["tihabf"] = "phoneField"; 
                                ${"GLOBALS"}["dxxmjmg"] = "recentComments"; 
                                ${"GLOBALS"}["thqqrrt"] = "getWhatsappMessages"; 
                                ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["qbwrpdx"]}); 
                                ${"GLOBALS"}["leoyshxozfa"] = "setype"; 
                                ${${"GLOBALS"}["pigeira"]} = $recordModel->get("label"); 
                                $ecgnwxlfaq = "commentModule"; 
                                $rxtzlbuivx = "keyFieldsHTML"; 
                                ${${"GLOBALS"}["ofjdtiwcqwy"]} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["qbwrpdx"]}); 
                                $vltwlepbcoi = "tabid"; 
                                ${"GLOBALS"}["bvhdbghhkyb"] = "query"; 
                                $idpymfbug = "getWhatsappMessages"; 
                                $fnybjnksugk = "getBotMobile"; 
                                $jvurupjvsurq = "whatsappMessageHTML"; 
                                ${${"GLOBALS"}["tihabf"]} = ${${"GLOBALS"}["rgkktubiczh"]}["phoneField"]; 
                                $nehsdrke = "value"; 
                                $hlvtiueeu = "profileImage"; 
                                $xnejptddks = "relatedModules"; 
                                ${"GLOBALS"}["fnkutgob"] = "getWhatsappMessages"; 
                                ${${"GLOBALS"}["swmhivnb"]} = $recordModel->get(${${"GLOBALS"}["swlnsqrjjzye"]}); 
                                ${${"GLOBALS"}["wftlerhjcih"]} = CTWhatsApp_Record_Model::getImageDetails(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["leoyshxozfa"]}); 
                                $xhujrgibx = "permissionRecord"; 
                                ${"GLOBALS"}["yxpvyngvi"] = "getWhatsappMessages"; 
                                ${"GLOBALS"}["zptxqt"] = "setype"; 
                                ${${"GLOBALS"}["hynfnuhl"]} = 1; 
                                if (${${"GLOBALS"}["wftlerhjcih"]} == "") { 
                                    $umuiqdsxgito = "profileImage"; 
                                    ${"GLOBALS"}["gwnfwnvlyg"] = "labelExplode"; 
                                    ${"GLOBALS"}["tdycrakvht"] = "labelExplode"; 
                                    ${${"GLOBALS"}["gwnfwnvlyg"]} = explode(" ", ${${"GLOBALS"}["vnvrdcwsvg"]}); 
                                    ${$umuiqdsxgito} = mb_substr(${${"GLOBALS"}["tdycrakvht"]}[0], 0, 1, "UTF-8") . mb_substr(${${"GLOBALS"}["pgmwsjte"]}[1], 0, 1, "UTF-8"); 
                                    $ftwpmylqrrd = "imagetag"; 
                                    ${$ftwpmylqrrd} = 0; 
                                } 
                                $wtoxefd = "getWhatsappMessages"; 
                                $fetrrkq = "totalReceived"; 
                                ${${"GLOBALS"}["yxpvyngvi"]} = CTWhatsApp_Record_Model::getWhatsappMessages(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["qbwrpdx"]}, ${${"GLOBALS"}["ejwjdywoqyje"]}, ${${"GLOBALS"}["xsrlvtgkygm"]}, ${${"GLOBALS"}["vdmnomgvhxl"]}); 
                                ${$jvurupjvsurq} = ${${"GLOBALS"}["thqqrrt"]}["whatsappMessageHTML"]; 
                                ${${"GLOBALS"}["ioqpzmcoz"]} = ${$wtoxefd}["totalSent"]; 
                                ${$fetrrkq} = ${${"GLOBALS"}["fnkutgob"]}["totalReceived"]; 
                                ${${"GLOBALS"}["xzrbpycdwav"]} = ${${"GLOBALS"}["fttcuxskb"]}["commentHTML"]; 
                                ${${"GLOBALS"}["kivdwa"]} = ${$idpymfbug}["moduleIsEnable"]; 
                                ${"GLOBALS"}["tgjlpakd"] = "phone"; 
                                $mtgeuuxwnjj = "key"; 
                                $qbuokonmv = "permissionRecord"; 
                                ${${"GLOBALS"}["mpdjbemcbbeh"]} = CTWhatsApp_Record_Model::getImportantMessageDetail(${${"GLOBALS"}["swmhivnb"]}); 
                                $iuusniql = "recordId"; 
                                ${$vltwlepbcoi} = getTabid(${${"GLOBALS"}["qbwrpdx"]}); 
                                ${${"GLOBALS"}["bvhdbghhkyb"]} = $adb->pquery("SELECT * FROM vtiger_field WHERE tabid = ? AND summaryfield = ? AND uitype NOT IN ('10', '51')", array(${${"GLOBALS"}["kgwoicgs"]}, 1)); 
                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                ${${"GLOBALS"}["mxplqhnb"]} = array(); 
                                ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${$iuusniql}, ${${"GLOBALS"}["zptxqt"]}); 
                                ${$ecgnwxlfaq} = CTWhatsApp_Record_Model::checkCommentModuleEnable(${${"GLOBALS"}["qbwrpdx"]}); 
                                ${${"GLOBALS"}["ygtkgjr"]} = CTWhatsApp_Record_Model::checkPermissionModule("ModComments"); 
                                ${${"GLOBALS"}["drvkmhgigx"]} = "EditView"; 
                                ${"GLOBALS"}["nljsnqusibyz"] = "label"; 
                                $qgpsdxd = "relatedModuleHTML"; 
                                if (!Users_Privileges_Model::isPermitted(${${"GLOBALS"}["qbwrpdx"]}, ${${"GLOBALS"}["drvkmhgigx"]}, ${${"GLOBALS"}["uasigafv"]})) { 
                                    ${"GLOBALS"}["efvvcfnlzyjr"] = "permissionRecord"; 
                                    ${${"GLOBALS"}["efvvcfnlzyjr"]} = "0"; 
                                } else { 
                                    $rubjyt = "permissionRecord"; 
                                    ${$rubjyt} = "1"; 
                                } 
                                ${"GLOBALS"}["ashcvpq"] = "relatedModuleHTML"; 
                                ${$qmpuqsl} = CTWhatsApp_Record_Model::getWhatsappTheme(); 
                                ${"GLOBALS"}["oiopstqhfvf"] = "imagetag"; 
                                ${$rxtzlbuivx} = ""; 
                                if (${$qbuokonmv} == 1) { 
                                    ${"GLOBALS"}["fcwlxzqsvx"] = "rows"; 
                                    ${"GLOBALS"}["soudcpgi"] = "i"; 
                                    $pstahnzafo = "i"; 
                                    for (${${"GLOBALS"}["soudcpgi"]} = 0; ${$pstahnzafo} < ${${"GLOBALS"}["fcwlxzqsvx"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                        if (${${"GLOBALS"}["gjdoju"]} < 4) { 
                                            ${"GLOBALS"}["qeybgnltp"] = "i"; 
                                            $lrennbw = "fieldname"; 
                                            $vqhyksq = "fieldname"; 
                                            ${"GLOBALS"}["pnmzyztxydy"] = "fieldname"; 
                                            ${"GLOBALS"}["rcxxlke"] = "i"; 
                                            $snktjihkti = "setype"; 
                                            ${"GLOBALS"}["gbrmsosqen"] = "fieldlabel"; 
                                            ${${"GLOBALS"}["gbrmsosqen"]} = vtranslate($adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["qeybgnltp"]}, "fieldlabel"), ${$snktjihkti}); 
                                            ${${"GLOBALS"}["pnmzyztxydy"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["rcxxlke"]}, "fieldname"); 
                                            ${${"GLOBALS"}["mdrlrde"]} = $recordModel->get(${$vqhyksq}); 
                                            if (${$lrennbw} == "assigned_user_id") { 
                                                ${"GLOBALS"}["zviwtjrautsc"] = "fieldvalue"; 
                                                ${${"GLOBALS"}["fpwvloj"]} = $adb->pquery("SELECT * FROM vtiger_users WHERE id=?", array(${${"GLOBALS"}["zviwtjrautsc"]})); 
                                                ${${"GLOBALS"}["trxjmjwc"]} = $adb->num_rows(${${"GLOBALS"}["fpwvloj"]}); 
                                                if (${${"GLOBALS"}["trxjmjwc"]} == 0) { 
                                                    ${"GLOBALS"}["jcfumxc"] = "getgroup"; 
                                                    ${"GLOBALS"}["dupmfoyhisbs"] = "fieldvalue"; 
                                                    ${${"GLOBALS"}["jcfumxc"]} = $adb->pquery("SELECT * FROM vtiger_groups WHERE groupid=?", array(${${"GLOBALS"}["dupmfoyhisbs"]})); 
                                                    $oixyiyafd = "grouprows"; 
                                                    ${$oixyiyafd} = $adb->num_rows(${${"GLOBALS"}["ulllmivjp"]}); 
                                                    ${${"GLOBALS"}["mdrlrde"]} = $adb->query_result(${${"GLOBALS"}["ulllmivjp"]}, 0, "groupname"); 
                                                } else { 
                                                    $yvptotxsqt = "getusername"; 
                                                    ${${"GLOBALS"}["mdrlrde"]} = $adb->query_result(${${"GLOBALS"}["fpwvloj"]}, 0, "first_name") . " " . $adb->query_result(${$yvptotxsqt}, 0, "last_name"); 
                                                } 
                                            } 
                                            if (${${"GLOBALS"}["abmqrxbgd"]} == "RTL") { 
                                                ${"GLOBALS"}["xpjqczmpsog"] = "keyFieldsHTML"; 
                                                ${${"GLOBALS"}["xpjqczmpsog"]} .= "<p><span class=\"" > ".${${"GLOBALS"}["mdrlrde"]}."</span > : ".${${"GLOBALS"}["jltvgbsbqje"]}." </p > ";}else{${"GLOBALS"}["svnurtq"]="fieldvalue";$bsigbbbxdg = "fieldlabel";${${"GLOBALS"}["qghvspaq"]} .= "<p>" . ${$bsigbbbxdg} . " : <span class="\">" . ${${"GLOBALS"}["svnurtq"]} . "</span></p>";}}}}${$xnejptddks}=CTWhatsApp_Record_Model::getRelatedModules(${${"GLOBALS"}["qbwrpdx"]});$flnktqieiji="phone";${${"GLOBALS"}["ashcvpq"]}="";foreach(${$lmutfjdfi} as${$mtgeuuxwnjj}=>${$nehsdrke}){${"GLOBALS"}["rvtzhifxosd"]="value";${"GLOBALS"}["uhjskjtm"] = "moduleURL";$pbypjdx = "value";${"GLOBALS"}["tvcgkplisq"] = "value";${${"GLOBALS"}["ueussjlgy"]} = vtranslate(${${"GLOBALS"}["rvtzhifxosd"]}["relatedModule"], ${${"GLOBALS"}["bqyucn"]}["relatedModule"]);$vkjqbeslqj = "value";${${"GLOBALS"}["gnbyubvxdjap"]} = "index.php?module=" . ${${"GLOBALS"}["bqyucn"]}["relatedModule"] . "&view=QuickCreateAjax&" . ${$pbypjdx}["relatedFieldName"] . "=" . ${${"GLOBALS"}["uasigafv"]};${${"GLOBALS"}["pibkavbwdciw"]} .= "<a id=\"menubar_quickCreate_" . ${${"GLOBALS"}["tvcgkplisq"]}["relatedModule"] . "\" class="dropdown - item quickCreateModule" href=\"#" data - name = \"" . ${$vkjqbeslqj}["relatedModule"] . "\" data-url=\"" . ${${"GLOBALS"}["uhjskjtm"]} . "\">" . ${${"GLOBALS"}["ueussjlgy"]} . "</a>";}${$fnybjnksugk}=CTWhatsApp_Record_Model::getPreQuestionDetail(${$flnktqieiji});${${"GLOBALS"}["nikmecphbpn"]}=${${"GLOBALS"}["wyibcaqd"]}["activeBot"];$rxgbjntk="moduleRecrodData";${${"GLOBALS"}["lajcuihwa"]}=${${"GLOBALS"}["aenxtvota"]}["manualtransfer"];${${"GLOBALS"}["cgmlrbqeitv"]}=array("recordId"=>${${"GLOBALS"}["uasigafv"]},"label"=>${${"GLOBALS"}["nljsnqusibyz"]},"phone"=>${${"GLOBALS"}["tgjlpakd"]},"profileImage"=>${$hlvtiueeu},"imagetag"=>${${"GLOBALS"}["oiopstqhfvf"]},"whatsappMessages"=>${${"GLOBALS"}["tqcknfzjlyv"]},"keyFieldsHTML"=>${${"GLOBALS"}["qghvspaq"]},"totalSent"=>${${"GLOBALS"}["ioqpzmcoz"]},"totalReceived"=>${${"GLOBALS"}["kdssajghr"]},"recentComments"=>${${"GLOBALS"}["dxxmjmg"]},"relatedModuleHTML"=>${$qgpsdxd},"messageImportant"=>${${"GLOBALS"}["mpdjbemcbbeh"]},"setype"=>${${"GLOBALS"}["uxwbwzggzsbm"]},"commentModule"=>${${"GLOBALS"}["jknnfqf"]},"moduleIsEnable"=>${${"GLOBALS"}["kivdwa"]},"ModCommentsEnable"=>${${"GLOBALS"}["pvsstl"]},"permissionRecord"=>${$xhujrgibx},"manualtransfer"=>${${"GLOBALS"}["lajcuihwa"]},"activeBot"=>${${"GLOBALS"}["nikmecphbpn"]});return${$rxgbjntk};}public function getPreQuestionDetail($phone){$uqrvoh="roboticmodeQuery";$djxllxju = "manualtransfer";${"GLOBALS"}["gcriud"] = "phone";global$adb;${"GLOBALS"}["ypyxdftvm"] = "rows";$yygshbh = "rows";${${"GLOBALS"}["qvcuhg"]} = $adb->pquery("SELECT * FROM whatsappbot_pre_que WHERE prequemobilenumber = ?", array(${${"GLOBALS"}["gcriud"]}));${${"GLOBALS"}["ypyxdftvm"]} = $adb->num_rows(${${"GLOBALS"}["qvcuhg"]});${$djxllxju} = $adb->query_result(${$uqrvoh}, 0, "manualtransfer");${${"GLOBALS"}["pguiquq"]} = array("manualtransfer" => ${${"GLOBALS"}["lajcuihwa"]}, "activeBot" => ${$yygshbh});return ${${"GLOBALS"}["pguiquq"]};}public function getWhatsAppRelatedRecord($recordId,$setype,$whatsappModule,$groupid,$nextWhatsappRelatedMessage){ 
                                                    ${"GLOBALS"}["ywxndopdvn"] = "setype"; 
                                                    $uycdlwhem = "recordId"; 
                                                    ${${"GLOBALS"}["fttcuxskb"]} = CTWhatsApp_Record_Model::getRelatedModuleWhatsappMessages(${$uycdlwhem}, ${${"GLOBALS"}["ywxndopdvn"]}, ${${"GLOBALS"}["ejwjdywoqyje"]}, ${${"GLOBALS"}["xsrlvtgkygm"]}, ${${"GLOBALS"}["wxvvqxyhdmmv"]}); 
                                                    ${${"GLOBALS"}["tqcknfzjlyv"]} = ${${"GLOBALS"}["fttcuxskb"]}["whatsappMessageHTML"]; 
                                                    ${"GLOBALS"}["huijafy"] = "moduleRecrodData"; 
                                                    ${${"GLOBALS"}["huijafy"]} = array("whatsappMessages" => ${${"GLOBALS"}["tqcknfzjlyv"]}); 
                                                    return ${${"GLOBALS"}["cgmlrbqeitv"]}; 
                                                }public function getRelatedModuleWhatsappMessages($recordId,$setype,$whatsappModule,$groupid,$nextWhatsappRelatedMessage){ 
                                                    ${"GLOBALS"}["fwopudh"] = "query"; 
                                                    $lunnuqwiwobk = "userID"; 
                                                    $grxbbvzupt = "configurationData"; 
                                                    global $adb, $current_user; 
                                                    $hppgyqp = "configurationData"; 
                                                    $gczaschsg = "whatsappScanNo"; 
                                                    $hwriezoc = "customQuery"; 
                                                    ${"GLOBALS"}["bkgemtx"] = "userID"; 
                                                    ${${"GLOBALS"}["bkgemtx"]} = $current_user->id; 
                                                    ${"GLOBALS"}["pfgybyr"] = "rows"; 
                                                    ${$grxbbvzupt} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["ifdddjovlmp"]}); 
                                                    $wnlkzrdivde = "nextWhatsappRelatedMessage"; 
                                                    ${$gczaschsg} = ${$hppgyqp}["whatsappno"]; 
                                                    ${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getInNumberQuery(${$lunnuqwiwobk}); 
                                                    if (${$wnlkzrdivde} == "") { 
                                                        $yyewctt = "nextWhatsappRelatedMessage"; 
                                                        ${$yyewctt} = 0; 
                                                    } 
                                                    $bvdfbaes = "customQuery"; 
                                                    $sjsmcavp = "rows"; 
                                                    $uijdgdsrx = "whatsappMessageHTML"; 
                                                    $heruyu = "query"; 
                                                    ${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQuery(); 
                                                    ${$hwriezoc} = " AND whatsapp_contactid = ? ORDER BY whatsapp_datetime ASC LIMIT " . ${${"GLOBALS"}["wxvvqxyhdmmv"]} . ", 5"; 
                                                    ${"GLOBALS"}["dsqjwvq"] = "wordlExts"; 
                                                    ${"GLOBALS"}["whkvwfzrvbr"] = "whatsappMessageHTML"; 
                                                    ${"GLOBALS"}["obsdaywnun"] = "rows"; 
                                                    ${${"GLOBALS"}["fwopudh"]} = $adb->pquery(${${"GLOBALS"}["vnajxvzttek"]} . ${$bvdfbaes}, array(${${"GLOBALS"}["uasigafv"]})); 
                                                    ${$sjsmcavp} = $adb->num_rows(${$heruyu}); 
                                                    ${"GLOBALS"}["dslnkwltux"] = "messageData"; 
                                                    ${${"GLOBALS"}["tqcknfzjlyv"]} = ""; 
                                                    ${${"GLOBALS"}["xepcjlvgqdnx"]} = array("gif", "jpg", "jpeg", "png", "tiff", "tif"); 
                                                    ${${"GLOBALS"}["sjsywoia"]} = array("pdf"); 
                                                    ${"GLOBALS"}["ephwcs"] = "fileExts"; 
                                                    ${${"GLOBALS"}["ephwcs"]} = array("txt", "php", "zip", "csv", "https"); 
                                                    ${${"GLOBALS"}["aylbpwsfj"]} = array("mp3"); 
                                                    ${${"GLOBALS"}["eoekpbmjlq"]} = array("xls"); 
                                                    ${${"GLOBALS"}["dsqjwvq"]} = array("docx", "doc"); 
                                                    for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["pfgybyr"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                                        ${"GLOBALS"}["ltejygrjs"] = "query"; 
                                                        $crgntwqursx = "messageReadUnRead"; 
                                                        $kenhdvulcu = "isGroup"; 
                                                        $gdlnxede = "i"; 
                                                        ${"GLOBALS"}["remosohytp"] = "query"; 
                                                        ${"GLOBALS"}["ykyrbqsz"] = "i"; 
                                                        ${"GLOBALS"}["hxcxqqyvpw"] = "imgExts"; 
                                                        $lbbuxqk = "query"; 
                                                        ${"GLOBALS"}["amojvaiag"] = "i"; 
                                                        $lqzrbvfqcrm = "query"; 
                                                        ${${"GLOBALS"}["iststtnnbuli"]} = $adb->query_result(${${"GLOBALS"}["ltejygrjs"]}, ${${"GLOBALS"}["ykyrbqsz"]}, "ctwhatsappid"); 
                                                        $jwcuxgw = "your_number"; 
                                                        ${"GLOBALS"}["tmykxcu"] = "messageType"; 
                                                        $mnbdhxr = "getNumberDetails"; 
                                                        ${"GLOBALS"}["scsdihphqxke"] = "query"; 
                                                        $qwpczrrykad = "urlExt"; 
                                                        ${"GLOBALS"}["alrxrj"] = "imgExts"; 
                                                        $xdmxtckwb = "messageBody"; 
                                                        ${"GLOBALS"}["lixwnngw"] = "i"; 
                                                        $qhuczbldh = "urlExt"; 
                                                        $mnmhtoplkm = "pdfExts"; 
                                                        ${${"GLOBALS"}["mpdjbemcbbeh"]} = $adb->query_result(${$lqzrbvfqcrm}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_important"); 
                                                        $voxrckyuci = "your_number"; 
                                                        $ijhysveqf = "i"; 
                                                        $wvaocnsk = "i"; 
                                                        $xsopicg = "messageSenderame"; 
                                                        ${"GLOBALS"}["wfweofbf"] = "messageType"; 
                                                        ${${"GLOBALS"}["tmykxcu"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "message_type"); 
                                                        ${$crgntwqursx} = $adb->query_result(${$lbbuxqk}, ${${"GLOBALS"}["lixwnngw"]}, "whatsapp_unreadread"); 
                                                        ${$xsopicg} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$wvaocnsk}, "whatsapp_sendername"); 
                                                        ${$kenhdvulcu} = $adb->query_result(${${"GLOBALS"}["scsdihphqxke"]}, ${$ijhysveqf}, "whatsapp_withccode"); 
                                                        ${$voxrckyuci} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$gdlnxede}, "your_number"); 
                                                        ${$mnbdhxr} = CTWhatsApp_Record_Model::getWhatsAppDetailWithMobileNo(${$jwcuxgw}); 
                                                        ${${"GLOBALS"}["shwzxur"]} = ${${"GLOBALS"}["iljbfqymbu"]}["username"]; 
                                                        ${"GLOBALS"}["uxhbwvik"] = "query"; 
                                                        $yugqeoekd = "urlExt"; 
                                                        ${"GLOBALS"}["diajclfupp"] = "documentBody"; 
                                                        ${${"GLOBALS"}["neyrneiod"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_quotemessage"); 
                                                        ${${"GLOBALS"}["nhsncmpc"]} = $adb->query_result(${${"GLOBALS"}["remosohytp"]}, ${${"GLOBALS"}["gjdoju"]}, "msgid"); 
                                                        ${"GLOBALS"}["uuiccfjwmm"] = "urlExt"; 
                                                        ${"GLOBALS"}["hlespcqkha"] = "urlExt"; 
                                                        ${${"GLOBALS"}["diajclfupp"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "message_body"); 
                                                        ${$xdmxtckwb} = nl2br(preg_replace("#\*([^*]+)\*#", "<b>\$1</b>", $adb->query_result(${${"GLOBALS"}["uxhbwvik"]}, ${${"GLOBALS"}["amojvaiag"]}, "message_body"))); 
                                                        ${"GLOBALS"}["bqprdcm"] = "excelExts"; 
                                                        ${${"GLOBALS"}["dgbodklth"]} = pathinfo(${${"GLOBALS"}["khdleq"]}, PATHINFO_EXTENSION); 
                                                        ${"GLOBALS"}["ajfvulqt"] = "urlExt"; 
                                                        ${"GLOBALS"}["wetyuxhhg"] = "fileExts"; 
                                                        $hkujzqs = "urlExt"; 
                                                        if (in_array(${$yugqeoekd}, ${${"GLOBALS"}["alrxrj"]})) { 
                                                            ${"GLOBALS"}["vcoliupkocw"] = "messageBody"; 
                                                            ${${"GLOBALS"}["khdleq"]} = "<image src=\"" . ${${"GLOBALS"}["vcoliupkocw"]} . "\" style="height: 60px !important;cursor: pointer;">";} else if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["uwdnuybm"]})) { 
                                                            ${"GLOBALS"}["gnnldgt"] = "messageBody"; 
                                                            ${${"GLOBALS"}["gnnldgt"]} = "<a href=\"" . ${${"GLOBALS"}["khdleq"]} . "" target = \"_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / fileicon . png\"></a>";} else if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["sjsywoia"]})) { 
                                                            ${${"GLOBALS"}["khdleq"]} = "<a href=\"" . ${${"GLOBALS"}["khdleq"]} . "\" target=\"_black\"><img src=\"layouts/v7/modules/CTWhatsApp/image/pdficon.png\"></a>"; 
                                                        } else if (in_array(${${"GLOBALS"}["ajfvulqt"]}, ${${"GLOBALS"}["bqprdcm"]})) { 
                                                            ${${"GLOBALS"}["khdleq"]} = "<a href=\"" . ${${"GLOBALS"}["khdleq"]} . "\" target="_black"><img src="layouts / v7 / modules / CTWhatsApp / image / excelicon . png"></a>";} else if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["nsnpqdsvxnm"]})) { 
                                                            $ljsefpbdyt = "messageBody"; 
                                                            ${${"GLOBALS"}["khdleq"]} = "<a href="".${$ljsefpbdyt}."\" target=\"_black" ><img src = "layouts/v7/modules/CTWhatsApp/image/wordicon.jpg" ></a > ";}else if(in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["aylbpwsfj"]})){${${"GLOBALS"}["khdleq"]}=" <audio controls> 
                        <source src="".${${"GLOBALS"}["khdleq"]}."\" type="audio / ogg\"> 
                        <source src="".${${"GLOBALS"}["khdleq"]}."" type="audio / mpeg"> 
                      Your browser does not support the audio element. 
                    </audio> ";}if(in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["hxcxqqyvpw"]})||in_array(${$qhuczbldh},${${"GLOBALS"}["wetyuxhhg"]})||in_array(${$hkujzqs},${$mnmhtoplkm})||in_array(${${"GLOBALS"}["hlespcqkha"]},${${"GLOBALS"}["aylbpwsfj"]})||in_array(${$qwpczrrykad},${${"GLOBALS"}["eoekpbmjlq"]})||in_array(${${"GLOBALS"}["uuiccfjwmm"]},${${"GLOBALS"}["nsnpqdsvxnm"]})){ 
                                                                ${"GLOBALS"}["ytrwitws"] = "documentBody"; 
                                                                ${${"GLOBALS"}["uqemncnk"]} = ""; 
                                                                ${${"GLOBALS"}["gbypmoqitnw"]} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["ytrwitws"]}); 
                                                                ${${"GLOBALS"}["wyvtplsqyi"]} = "0"; 
                                                            }else{ 
                                                                ${"GLOBALS"}["lgffrpxkb"] = "whatsAppFileName"; 
                                                                if (${${"GLOBALS"}["ejwjdywoqyje"]} != "Groups") { 
                                                                    $qkzhhnpdgpa = "notReplyWhatsapp"; 
                                                                    ${"GLOBALS"}["igeptchoyerk"] = "copyMessage"; 
                                                                    $wcinngbucr = "messageBody"; 
                                                                    ${${"GLOBALS"}["igeptchoyerk"]} = "&nbsp;&nbsp; 
                        <span class="copyMessageBody" data-copymessage="".strip_tags(${$wcinngbucr}).""> 
                          <img style=\"float: left;margin-right: 10px;width: 15px; !important" src = \"layouts/v7/modules/CTWhatsApp/image/copy.png" title = "" . vtranslate("LBL_COPY", "CTWhatsApp") . "" ><p > ".vtranslate("LBL_COPY","CTWhatsApp")." </p > 
                        </span > ";${$qkzhhnpdgpa}="1";}${${"GLOBALS"}["lgffrpxkb"]}="";}${${"GLOBALS"}["kvtrossgvw"]}=Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($adb->query_result(${${"GLOBALS"}["vvonkioccd"]},${${"GLOBALS"}["gjdoju"]},"whatsapp_datetime"));if(${${"GLOBALS"}["xeyjsxwn"]}=="Send"||${${"GLOBALS"}["xeyjsxwn"]}=="Mass Message"){${"GLOBALS"}["whiivbd"]="totalSent";$kygefcfvno = "ctWhatsappId";$xltwxn = "isGroup";$rzywiv = "messageBody";${${"GLOBALS"}["whiivbd"]} = ${${"GLOBALS"}["ioqpzmcoz"]} + 1;$njjdxipz = "whatsappMessageHTML";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class=\"sendChat\"> 
                          <div class="col - xs - 12 col - sm - 2 col - md - 2 col - lg - 2"> 
                          </div> 
                          <div class="col - xs - 12 col - sm - 2 col - md - 2 col - lg - 2\"> 
                          </div> 
                          <div class=\"col-xs-10 col-sm-8 col-md-8 col-lg-8" > 
                            <div class="mainMessageDiv" > ";$nqfhov="quotemessage";$ijbflw="whatsappMessageHTML";if(${${"GLOBALS"}["wyvtplsqyi"]}!="0"){$mcajjikj="whatsappMessageHTML";${"GLOBALS"}["trblzzir"] = "copyMessage";${"GLOBALS"}["qlrbmjbskk"] = "replyMessageHTML";$kpcjuenk = "whatsappMessageHTML";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class=\"dropdown" > 
                                                      <div class=\"dropdown-toggle\" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="true\" style="float: right !important;"> 
                                                        <i class=\"fa fa-ellipsis-v icon\" style="width: 8px;margin: 5px;cursor: pointer;"></i> 
                                                      </div> 
                                                      <div class=\"dropdown-menu" aria - labelledby = "dropdownMenuButton" > 
                                                      <div class="dropdownInnerMenu" > 
                                                        <a > ";${${"GLOBALS"}["tqcknfzjlyv"]}.=${${"GLOBALS"}["qlrbmjbskk"]}."";${${"GLOBALS"}["tqcknfzjlyv"]}.=" </a > 
                                                        <a > ";${$kpcjuenk}.=${${"GLOBALS"}["trblzzir"]}."";${$mcajjikj}.=" </a > 
                                                      </div > 
                                                      </div > 
                                                    </div > ";}${$njjdxipz}.="<div class="bubble send\" data-whatsappid=" . ${$kygefcfvno} . ">";$dvfufmqgqlw = "ctWhatsappId";if (${$nqfhov} != "") { 
                                                                        $yinpxeu = "quotemessage"; 
                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class=\"sendQuoteMessage\"><p style="word - wrap: break-word;\">" . ${$yinpxeu} . "</p></div>";}if (${$xltwxn} == "Groups") { 
                                                                        ${"GLOBALS"}["atevhafe"] = "messageSenderame"; 
                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<span><b>" . ${${"GLOBALS"}["atevhafe"]} . "</b></span>"; 
                                                                    }${$ijbflw} .= "<p style="word - wrap: break-word;\">" . ${$rzywiv} . "<br> " . urldecode(${${"GLOBALS"}["gbypmoqitnw"]}) . " </p> 
                            </div> 
                            </div> 
                            <span class="chatTime"><b><a class=\"fa fa-eye" href = "index.php?module=CTWhatsApp&view=Detail&record=" . ${$dvfufmqgqlw} . "" target = "_black" ></a >&nbsp;".${${"GLOBALS"}["zqlesbolov"]}."(".${${"GLOBALS"}["shwzxur"]}.") - </b > ".${${"GLOBALS"}["kvtrossgvw"]}."";if(${${"GLOBALS"}["tpdhkjopuz"]}=="Read"){$pvqkwtqs="whatsappMessageHTML";${$pvqkwtqs} .= "<img src=\"layouts/v7/modules/CTWhatsApp/image/read.png\">";}else{ 
                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<img src=\"layouts/v7/modules/CTWhatsApp/image/unread.png\">"; 
                                                                    }${${"GLOBALS"}["tqcknfzjlyv"]}.=" </span ></div > 
                        </div > ";}else if(${${"GLOBALS"}["wfweofbf"]}=="Recieved"){${"GLOBALS"}["jgtmhegghdd"]="totalReceived";$hnyjglchd = "createdTime";$osjspoeea = "messageReadUnRead";${"GLOBALS"}["wluilshyu"] = "totalReceived";$jxmtitebj = "messageBody";${${"GLOBALS"}["jgtmhegghdd"]} = ${${"GLOBALS"}["wluilshyu"]} + 1;$njznxmhcize = "whatsappMessageHTML";${"GLOBALS"}["ydxviuskpie"] = "whatsappMessageHTML";${$njznxmhcize} .= "<div class=\"replyChat" > 
                          <div class=\"col-xs-10 col-sm-8 col-md-8 col-lg-8\">";$gtfuswdbxi = "whatsappMessageHTML";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="bubble reply\" data-whatsappid=" . ${${"GLOBALS"}["iststtnnbuli"]} . ">";$pqplawsvtqg = "whatsAppFileName";if (${${"GLOBALS"}["neyrneiod"]} != "") { 
                                                                        $pylggwd = "quotemessage"; 
                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="sendQuoteMessage\"><p style="word - wrap: break-word;\">" . ${$pylggwd} . "</p></div>";}if (${${"GLOBALS"}["rnwmobhmmz"]} == "Groups") { 
                                                                        ${"GLOBALS"}["pncuxrr"] = "whatsappMessageHTML"; 
                                                                        ${${"GLOBALS"}["pncuxrr"]} .= "<span><b>" . ${${"GLOBALS"}["yocxlgsvbk"]} . "</b></span>"; 
                                                                    }${${"GLOBALS"}["tqcknfzjlyv"]} .= "<p style=\"word-wrap: break-word;\">" . ${$jxmtitebj} . "<br> " . urldecode(${$pqplawsvtqg}) . " </p></div>";if (${${"GLOBALS"}["qbwrpdx"]}) { 
                                                                        $nyuahr = "urlExt"; 
                                                                        $gnsgrfcq = "excelExts"; 
                                                                        $wlipblcujkpm = "urlExt"; 
                                                                        $qifmehtcs = "wordlExts"; 
                                                                        ${"GLOBALS"}["mfavahvie"] = "mp3Exts"; 
                                                                        if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["xepcjlvgqdnx"]}) || in_array(${$nyuahr}, ${${"GLOBALS"}["uwdnuybm"]}) || in_array(${$wlipblcujkpm}, ${${"GLOBALS"}["sjsywoia"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["mfavahvie"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${$gnsgrfcq}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${$qifmehtcs})) { 
                                                                            $hxuxefd = "whatsappMessageHTML"; 
                                                                            ${$hxuxefd} .= ""; 
                                                                        } else { 
                                                                            ${"GLOBALS"}["woyxjwvji"] = "recordId"; 
                                                                            ${"GLOBALS"}["khuqfppvffb"] = "setype"; 
                                                                            if (Users_Privileges_Model::isPermitted(${${"GLOBALS"}["khuqfppvffb"]}, "EditView", ${${"GLOBALS"}["woyxjwvji"]})) { 
                                                                                $njhpbalmrv = "setype"; 
                                                                                ${"GLOBALS"}["wztdbl"] = "setype"; 
                                                                                $tbnuca = "setype"; 
                                                                                ${${"GLOBALS"}["tqcknfzjlyv"]} .= "&nbsp;&nbsp; 
                                              <span class=\"editField\" style="cursor: pointer;\"> 
                                                <img style="float: left;width: 15px; !important\" src="layouts / v7 / modules / CTWhatsApp / image / editcontent . png\" title=\"" . vtranslate("LBL_EDITFIELD", "CTWhatsApp") . " " . vtranslate(${${"GLOBALS"}["qbwrpdx"]}, ${${"GLOBALS"}["wztdbl"]}) . "" ><p > ".vtranslate("LBL_EDITFIELD","CTWhatsApp")." ".vtranslate(${$tbnuca},${$njhpbalmrv})." </p > 
                                              </span > ";}}}if(${${"GLOBALS"}["wyvtplsqyi"]}!="0"){$gufflpdx="copyMessage";${"GLOBALS"}["xyaidypc"] = "replyMessageHTML";$euhoxjvydc = "whatsappMessageHTML";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class=\"dropdown" style = \"display: inline-block !important;margin: 0px 0px 0px 12px;" > 
                    <div class="dropdown-toggle\" id=\"dropdownMenuButton\" data-toggle=\"dropdown" aria - expanded = \"true\"> 
                    <i class="fa fa - ellipsis - v icon\" style=\"width: 8px;margin: 5px;cursor: pointer;\"></i> 
                    </div> 
                    <div class=\"dropdown-menu" aria - labelledby = "dropdownMenuButton" > 
                    <div class="dropdownInnerMenu" > ";${"GLOBALS"}["nfetumhew"]="whatsappMessageHTML";${$euhoxjvydc}.=" < a>".${${"GLOBALS"}["xyaidypc"]}." </a ><a > ".${$gufflpdx}."</a ><a > ".${${"GLOBALS"}["rotsotynqf"]}."</a > ";${${"GLOBALS"}["nfetumhew"]}.="</div ></div ></div > ";}${${"GLOBALS"}["ydxviuskpie"]}.="<span class="chatTime" style = \"width: 100%; !important\"><b><a class=\"fa fa-eye" href = "index.php?module=CTWhatsApp&view=Detail&record=" . ${${"GLOBALS"}["iststtnnbuli"]} . "\" target="_black\"></a>&nbsp;" . ${${"GLOBALS"}["zqlesbolov"]} . "(" . ${${"GLOBALS"}["shwzxur"]} . ") - </b>" . ${$hnyjglchd} . "";if (${$osjspoeea} == "Read") { 
                                                                                    ${"GLOBALS"}["orpjmmmfq"] = "whatsappMessageHTML"; 
                                                                                    ${${"GLOBALS"}["orpjmmmfq"]} .= "<img src=\"layouts/v7/modules/CTWhatsApp/image/read.png" > ";}else{${${"GLOBALS"}["tqcknfzjlyv"]}.="<img src="layouts / v7 / modules / CTWhatsApp / image / unread . png">";}${${"GLOBALS"}["tqcknfzjlyv"]}.=" </span ></div > ";${$gtfuswdbxi}.="<div class=\"col-xs-12 col-sm-2 col-md-2 col-lg-2\"> 
                </div> 
 
                </div>";}}${${"GLOBALS"}["whkvwfzrvbr"]}.="";${${"GLOBALS"}["sqrlidgs"]}=array("whatsappMessageHTML"=>${$uijdgdsrx},"rows"=>${${"GLOBALS"}["obsdaywnun"]});return${${"GLOBALS"}["dslnkwltux"]};}public function getMessagesRecordData($recordId,$whatsappModule,$groupid,$groupWhatsappNumber){global$adb,$current_user;$bxwfigls="currentUserID";$anewkkdv="setype";$gjkbnsogo="customfield1";$secculvnbd="groupid";$zgvvmo="themeView";${$bxwfigls}=$current_user->id;$krmbsmhk="whatsappModule";$gkjuuohr="moduleRecrodData";$olgetucbcio="getWhatsappMessages";$cwwqqmxlap="messageImportant";${"GLOBALS"}["nbsziaxsits"]="imagetag";$gogzbyix="label";${"GLOBALS"}["kklnbkthbe"]="recordId";$oofqswbq="totalSent";${"GLOBALS"}["jzmlhs"]="totalSent";$oqhtqcghrpc="whatsappModule";${"GLOBALS"}["nwgsjgwmkebg"]="getWhatsappMessages";$voyxzeg="recordId";$umkluya="getWhatsappMessages";${$gogzbyix}=${${"GLOBALS"}["uasigafv"]};$pwbmuwkly="whatsappMessageHTML";if(${${"GLOBALS"}["xsrlvtgkygm"]}){${${"GLOBALS"}["wftlerhjcih"]}="layouts/v7/modules/CTWhatsApp/image/groups.png";}else{ 
                                                                                    ${${"GLOBALS"}["wftlerhjcih"]} = "layouts/v7/modules/CTWhatsApp/image/AvtarIcon.png"; 
                                                                                }${${"GLOBALS"}["hynfnuhl"]}=1;$qjmplhhn="setype";${${"GLOBALS"}["fttcuxskb"]}=CTWhatsApp_Record_Model::getWhatsappMessages(${$voyxzeg},${$qjmplhhn},${$krmbsmhk},${$secculvnbd},${${"GLOBALS"}["vdmnomgvhxl"]});${$pwbmuwkly}=${${"GLOBALS"}["fttcuxskb"]}["whatsappMessageHTML"];$arpchrphyps="label";$dnjxwwd="currentUserID";${$oofqswbq}=${${"GLOBALS"}["fttcuxskb"]}["totalSent"];${"GLOBALS"}["jejibwoglo"]="profileImage";$cvpgxqvwcku="recordId";${${"GLOBALS"}["kdssajghr"]}=${$umkluya}["totalReceived"];${${"GLOBALS"}["mpdjbemcbbeh"]}=${${"GLOBALS"}["nwgsjgwmkebg"]}["messageImportant"];$flhsqmisb="keyFieldsHTML";$wuowtnzdb="configurationData";$lqeeurdhglew="getGroupMembers";${${"GLOBALS"}["kivdwa"]}=${$olgetucbcio}["moduleIsEnable"];${"GLOBALS"}["fkdaee"]="relatedModuleHTML";$flewms="whatsappMessageHTML";${${"GLOBALS"}["xzrbpycdwav"]}="";$hfrwzudjxnz="manualtransfer";${${"GLOBALS"}["abmqrxbgd"]}=CTWhatsApp_Record_Model::getWhatsappTheme();${"GLOBALS"}["alsimlzh"]="commentModule";$ugxsfhmx="configurationData";$ofdpmnccjbb="ModCommentsEnable";if(${$zgvvmo}=="RTL"){$hvuwmbsle="keyFieldsHTML";${$hvuwmbsle} = "<p><span class=\"" > ".${${"GLOBALS"}["uasigafv"]}."</span > : ".vtranslate("LBL_PHONE_NUMBER","Vtiger")." </p > ";}else{${"GLOBALS"}["cihgnncuo"]="keyFieldsHTML";${${"GLOBALS"}["cihgnncuo"]} = "<p>" . vtranslate("LBL_PHONE_NUMBER", "Vtiger") . " : <span class=\"" > ".${${"GLOBALS"}["uasigafv"]}."</span ></p > ";}${${"GLOBALS"}["lpyrkix"]}=CTWhatsApp_Record_Model::getWhatsappAllowModules();${${"GLOBALS"}["jknnfqf"]}=CTWhatsApp_Record_Model::checkCommentModuleEnable(${$anewkkdv});${$ofdpmnccjbb}=CTWhatsApp_Record_Model::checkPermissionModule("ModComments");${${"GLOBALS"}["fkdaee"]}="";if(${$oqhtqcghrpc}=="Groups"){$xejqhnvjlgb="relatedModuleHTML";${$xejqhnvjlgb} .= "<a id="menubar_quickCreate_HelpDesk" class=\"dropdown-item quickCreateModule\" href=\"#\" data-name="HelpDesk\" data-url=\"index.php?module=HelpDesk&view=QuickCreateAjax\">" . vtranslate("LBL_CREATE", "CTWhatsApp") . " " . vtranslate("HelpDesk", "HelpDesk") . "</a>";}else{ 
                                                                                    ${"GLOBALS"}["eommgaucxo"] = "value"; 
                                                                                    $duonynq = "key"; 
                                                                                    ${"GLOBALS"}["xsgrdg"] = "relatedModules"; 
                                                                                    foreach (${${"GLOBALS"}["xsgrdg"]} as ${$duonynq} => ${${"GLOBALS"}["eommgaucxo"]}) { 
                                                                                        $xkshglmgb = "moduleURL"; 
                                                                                        ${${"GLOBALS"}["ueussjlgy"]} = vtranslate(${${"GLOBALS"}["bqyucn"]}["module"], ${${"GLOBALS"}["bqyucn"]}["module"]); 
                                                                                        ${"GLOBALS"}["aynyrffpato"] = "moduleURL"; 
                                                                                        $cesocdmtsqfu = "recordId"; 
                                                                                        $fpgeks = "relatedModuleHTML"; 
                                                                                        $fkmklk = "value"; 
                                                                                        ${${"GLOBALS"}["aynyrffpato"]} = "index.php?module=" . ${${"GLOBALS"}["bqyucn"]}["module"] . "&view=QuickCreateAjax&" . ${$fkmklk}["phoneField"] . "=" . ${$cesocdmtsqfu}; 
                                                                                        $xjplhhf = "relatedModule"; 
                                                                                        ${${"GLOBALS"}["pibkavbwdciw"]} .= "<a id="menubar_quickCreate_".${${"GLOBALS"}["bqyucn"]}["module"]."" class="dropdown - item quickCreateModule\" href="#" data-name=\"".${${"GLOBALS"}["bqyucn"]}["module"]."\" data-url="".${$xkshglmgb}."">".vtranslate("LBL_CREATE","Vtiger")." ".${$xjplhhf}."</a>";${$fpgeks}.="<a id="menubar_quickCreate_".${${"GLOBALS"}["bqyucn"]}["module"]."\" class="dropdown-item quickUpdateModule" href=\"#\" data-name="".${${"GLOBALS"}["bqyucn"]}["module"]."\" data-url=\"".${${"GLOBALS"}["gnbyubvxdjap"]}."">".vtranslate("LBL_UPDATES","CTWhatsApp")." ".${${"GLOBALS"}["ueussjlgy"]}."</a>";}}${"GLOBALS"}["ugmvyytgdw"]="manualtransfer";${"GLOBALS"}["xnekjsznjigi"]="currentUserID";$rntdtnxpc="groupid";${${"GLOBALS"}["aenxtvota"]}=CTWhatsApp_Record_Model::getPreQuestionDetail(${${"GLOBALS"}["kklnbkthbe"]});$tqqnexvr="recentComments";${${"GLOBALS"}["nikmecphbpn"]}=${${"GLOBALS"}["aenxtvota"]}["activeBot"];${"GLOBALS"}["udvuhnpiewic"]="api_url";${${"GLOBALS"}["ugmvyytgdw"]}=${${"GLOBALS"}["aenxtvota"]}["manualtransfer"];${$ugxsfhmx}=Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${$dnjxwwd});${${"GLOBALS"}["udvuhnpiewic"]}=${$wuowtnzdb}["api_url"];${${"GLOBALS"}["ockmkyh"]}=${${"GLOBALS"}["zkvahvrdny"]}["authtoken"];${$gjkbnsogo}=${${"GLOBALS"}["zkvahvrdny"]}["customfield1"];if(${$rntdtnxpc}){${"GLOBALS"}["ycclepi"]="groupid";${${"GLOBALS"}["bpazhnkk"]}=CTWhatsApp_Record_Model::getGroupMembers(${${"GLOBALS"}["ycclepi"]});}${$gkjuuohr}=array("label"=>${$arpchrphyps},"phone"=>${$cvpgxqvwcku},"profileImage"=>${${"GLOBALS"}["jejibwoglo"]},"imagetag"=>${${"GLOBALS"}["nbsziaxsits"]},"whatsappMessages"=>${$flewms},"totalSent"=>${${"GLOBALS"}["jzmlhs"]},"totalReceived"=>${${"GLOBALS"}["kdssajghr"]},"keyFieldsHTML"=>${$flhsqmisb},"recentComments"=>${$tqqnexvr},"relatedModuleHTML"=>${${"GLOBALS"}["pibkavbwdciw"]},"messageImportant"=>${$cwwqqmxlap},"commentModule"=>${${"GLOBALS"}["alsimlzh"]},"moduleIsEnable"=>${${"GLOBALS"}["kivdwa"]},"ModCommentsEnable"=>${${"GLOBALS"}["ygtkgjr"]},"manualtransfer"=>${$hfrwzudjxnz},"activeBot"=>${${"GLOBALS"}["nikmecphbpn"]},"groupMembersHTML"=>${$lqeeurdhglew},"currentUserID"=>${${"GLOBALS"}["xnekjsznjigi"]});return${${"GLOBALS"}["cgmlrbqeitv"]};}public function getGroupMembers($groupid){$cwhkcpj="rows";$yntxofnkmy="query";$djburrqnrvm="i";${"GLOBALS"}["iaexjzk"]="query";$wnnxmwd="rows";$dtrrkvopefne="groupMembersHTML";${"GLOBALS"}["qiqtdpg"]="i";global$adb;${$yntxofnkmy}=$adb->pquery("SELECT * FROM vtiger_ctwhatsapp 
            INNER JOIN vtiger_crmentity ON vtiger_crmentity . crmid = vtiger_ctwhatsapp . ctwhatsappid 
            WHERE vtiger_crmentity . deleted = 0 and vtiger_ctwhatsapp . whatsapp_displayname = ? and vtiger_ctwhatsapp . message_type = ''",array(${${"GLOBALS"}["xsrlvtgkygm"]}));${$wnnxmwd}=$adb->num_rows(${${"GLOBALS"}["iaexjzk"]});${$dtrrkvopefne}=" < div class=\"ws-grp-ctc-wrap" > ";for(${$djburrqnrvm}=0;${${"GLOBALS"}["gjdoju"]}<${$cwhkcpj};${${"GLOBALS"}["qiqtdpg"]}++){$bmvaoyct="query";${"GLOBALS"}["nazyuddiyl"] = "whatsapp_contactid";$cqfalmp = "query";$tupxuouerpl = "i";${"GLOBALS"}["nbwtmnykli"] = "query";${${"GLOBALS"}["qyymvieahvnl"]} = $adb->query_result(${$cqfalmp}, ${$tupxuouerpl}, "whatsapp_sendername");${"GLOBALS"}["hyelsfva"] = "setype";${${"GLOBALS"}["sbjupqwnvm"]} = $adb->query_result(${$bmvaoyct}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_chatid");${${"GLOBALS"}["nazyuddiyl"]} = $adb->query_result(${${"GLOBALS"}["nbwtmnykli"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_contactid");${${"GLOBALS"}["qbwrpdx"]} = VtigerCRMObject::getSEType(${${"GLOBALS"}["uvhhlgtimta"]});${"GLOBALS"}["jvafsnpyvcq"] = "whatsapp_chatid";$tmdbiwrvyrr = "groupMembersHTML";${${"GLOBALS"}["nwemwkvqkt"]} .= "<div class=\"ws-grp-ctc-div\"> 
                                    <div class=\"groupnameWrapper\"> 
                                    <span class="ws - grp - ctc - name\">" . ${${"GLOBALS"}["qyymvieahvnl"]} . "</span>";if (${${"GLOBALS"}["hyelsfva"]}) { 
                                                                                            $hyqllkcyavd = "setype"; 
                                                                                            ${"GLOBALS"}["oknxkzr"] = "groupMembersHTML"; 
                                                                                            ${${"GLOBALS"}["oknxkzr"]} .= "<a href=\"index.php?module=" . ${$hyqllkcyavd} . "&view=Detail&record=" . ${${"GLOBALS"}["uvhhlgtimta"]} . "" target = "_blank" ><i class=\"fa fa-angle-right\"></i></a>";}${$tmdbiwrvyrr} .= "</div><span class=\"ws-grp-ctc-number" > ".${${"GLOBALS"}["jvafsnpyvcq"]}."</span > ";${${"GLOBALS"}["nwemwkvqkt"]}.="</div > ";}${${"GLOBALS"}["nwemwkvqkt"]}.="<div > ";return${${"GLOBALS"}["nwemwkvqkt"]};}public function getInNumberQuery($userid){$pbjlpga="whatsAppAllNumber";$rejbftz = "inNumber";$bntalhwrp = "inNumber";${"GLOBALS"}["oitzntflr"] = "userid";${${"GLOBALS"}["kurtlcufu"]} = CTWhatsApp_Record_Model::getAllConnectedWhatsappNumber(${${"GLOBALS"}["oitzntflr"]});${$bntalhwrp} = "";foreach (${$pbjlpga} as ${${"GLOBALS"}["pphiwgub"]} => ${${"GLOBALS"}["bqyucn"]}) { 
                                                                                            $llpcho = "value"; 
                                                                                            $qctgsryq = "inNumber"; 
                                                                                            ${$qctgsryq} .= "'" . ${$llpcho}["whatsappno"] . "',"; 
                                                                                        }${${"GLOBALS"}["wdmedzqlg"]} = rtrim(${$rejbftz}, ",");${${"GLOBALS"}["gluytrwnl"]} = " AND vtiger_ctwhatsapp.your_number IN (" . ${${"GLOBALS"}["wdmedzqlg"]} . ") ";return ${${"GLOBALS"}["gluytrwnl"]};}public function getLogInNumberQuery($userid){ 
                                                                                            ${"GLOBALS"}["vtfmnosuc"] = "key"; 
                                                                                            ${"GLOBALS"}["anopypqo"] = "whatsAppAllNumber"; 
                                                                                            ${"GLOBALS"}["iignsvf"] = "userid"; 
                                                                                            $hhlenlkj = "allnumber"; 
                                                                                            $vjmnwjq = "value"; 
                                                                                            ${"GLOBALS"}["lheqtpqyg"] = "inNumber"; 
                                                                                            ${${"GLOBALS"}["kurtlcufu"]} = CTWhatsApp_Record_Model::getAllConnectedWhatsappNumber(${${"GLOBALS"}["iignsvf"]}); 
                                                                                            ${${"GLOBALS"}["lheqtpqyg"]} = ""; 
                                                                                            foreach (${${"GLOBALS"}["anopypqo"]} as ${${"GLOBALS"}["vtfmnosuc"]} => ${$vjmnwjq}) { 
                                                                                                $owsvxsngnlx = "value"; 
                                                                                                ${${"GLOBALS"}["tqbulrrwwg"]} .= "'" . ${$owsvxsngnlx}["whatsappno"] . "',"; 
                                                                                            } 
                                                                                            ${$hhlenlkj} = rtrim(${${"GLOBALS"}["tqbulrrwwg"]}, ","); 
                                                                                            ${${"GLOBALS"}["gluytrwnl"]} = " AND vtiger_whatsapplog.whatsapplog_your_number IN (" . ${${"GLOBALS"}["wdmedzqlg"]} . ") "; 
                                                                                            return ${${"GLOBALS"}["gluytrwnl"]}; 
                                                                                        }public function getFilenameWhatsappMessage($body){ 
                                                                                            ${"GLOBALS"}["slizth"] = "expolodeFilename"; 
                                                                                            ${"GLOBALS"}["ovyvqnjcaett"] = "lenth"; 
                                                                                            $dxubyb = "expolodeFilename"; 
                                                                                            ${$dxubyb} = explode("/", ${${"GLOBALS"}["lhmgnydp"]}); 
                                                                                            ${${"GLOBALS"}["ovyvqnjcaett"]} = count(${${"GLOBALS"}["doaqnaxwbop"]}) - 1; 
                                                                                            return ${${"GLOBALS"}["slizth"]}[${${"GLOBALS"}["giotoxq"]}]; 
                                                                                        }public function getWhatsappMessages($recordId,$setype,$whatsappModule,$groupid,$groupWhatsappNumber){ 
                                                                                            ${"GLOBALS"}["yvwalcp"] = "userID"; 
                                                                                            $ogosefheqls = "totalSent"; 
                                                                                            $edbuhhqhtb = "commentHTML"; 
                                                                                            $tzubhmbj = "moduleIsEnable"; 
                                                                                            global $adb, $current_user; 
                                                                                            ${${"GLOBALS"}["ifdddjovlmp"]} = $current_user->id; 
                                                                                            $zvwasppg = "whatsappModule"; 
                                                                                            $fnffyc = "userID"; 
                                                                                            $gnsfpckksft = "unreadQuery"; 
                                                                                            $huynkjuicea = "totalReceived"; 
                                                                                            ${"GLOBALS"}["bvqctmzi"] = "whatsappScanNo"; 
                                                                                            ${${"GLOBALS"}["zkvahvrdny"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["yvwalcp"]}); 
                                                                                            ${${"GLOBALS"}["bvqctmzi"]} = ${${"GLOBALS"}["zkvahvrdny"]}["whatsappno"]; 
                                                                                            ${"GLOBALS"}["vjylutfdo"] = "rows"; 
                                                                                            ${"GLOBALS"}["pgjdml"] = "whatsappMessage"; 
                                                                                            ${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getInNumberQuery(${$fnffyc}); 
                                                                                            ${$gnsfpckksft} = CTWhatsApp_Record_Model::unreadQuery(); 
                                                                                            $vxaumkcvsnw = "whatsappMessageHTML"; 
                                                                                            if (${$zvwasppg} == "Groups") { 
                                                                                                ${"GLOBALS"}["bfkeit"] = "groupid"; 
                                                                                                ${"GLOBALS"}["ybtmerkadqer"] = "inNumberQuery"; 
                                                                                                $umltoqbhk = "query"; 
                                                                                                ${$umltoqbhk} = $adb->pquery("SELECT * FROM ( 
                  SELECT * FROM vtiger_ctwhatsapp 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid 
                WHERE vtiger_crmentity.deleted = 0 AND msgid = ? " . ${${"GLOBALS"}["ybtmerkadqer"]} . " ORDER BY whatsapp_datetime DESC LIMIT 0,25 
              ) wp_group 
              ORDER BY ctwhatsappid ASC", array(${${"GLOBALS"}["bfkeit"]})); 
                                                                                            } else { 
                                                                                                ${"GLOBALS"}["uhggebct"] = "setype"; 
                                                                                                if (${${"GLOBALS"}["uhggebct"]}) { 
                                                                                                    ${"GLOBALS"}["ddibsxmkm"] = "recordId"; 
                                                                                                    ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM ( 
                  SELECT * FROM vtiger_ctwhatsapp 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid 
                WHERE vtiger_crmentity.deleted = 0 AND whatsapp_contactid = ? " . ${${"GLOBALS"}["gluytrwnl"]} . " ORDER BY whatsapp_datetime DESC LIMIT 0,25 ) wp_group ORDER BY ctwhatsappid ASC", array(${${"GLOBALS"}["ddibsxmkm"]})); 
                                                                                                } else { 
                                                                                                    $tbfvbl = "recordId"; 
                                                                                                    $brentzqpkd = "query"; 
                                                                                                    $xgpaiqeb = "recordId"; 
                                                                                                    ${${"GLOBALS"}["uasigafv"]} = preg_replace("/[^A-Za-z0-9]/", "", ${$tbfvbl}); 
                                                                                                    ${$brentzqpkd} = $adb->pquery("SELECT * FROM ( 
                  SELECT * FROM vtiger_ctwhatsapp 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid 
                WHERE vtiger_crmentity.deleted = 0 AND whatsapp_withccode LIKE " % ".${$xgpaiqeb}." % \" " . ${${"GLOBALS"}["gluytrwnl"]} . " ORDER BY whatsapp_datetime DESC LIMIT 0,25 ) wp_group ORDER BY ctwhatsappid ASC",array());} 
                                                                                            } 
                                                                                            $mgxufygxwk = "mp3Exts"; 
                                                                                            $dhtufwodvl = "i"; 
                                                                                            $rzinqjyradi = "totalReceived"; 
                                                                                            ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                            ${"GLOBALS"}["gdaxyjo"] = "whatsappMessageHTML"; 
                                                                                            ${$ogosefheqls} = 0; 
                                                                                            ${$huynkjuicea} = 0; 
                                                                                            ${${"GLOBALS"}["pgjdml"]} = array(); 
                                                                                            ${$vxaumkcvsnw} = "<div class="chatDiv">";$dtztfpv = "excelExts";${${"GLOBALS"}["xepcjlvgqdnx"]} = array("gif", "jpg", "jpeg", "png", "tiff", "tif");${${"GLOBALS"}["sjsywoia"]} = array("pdf");${"GLOBALS"}["wnmlbkbdj"] = "wordlExts";$mtspvnvhbsu = "messageData";${${"GLOBALS"}["uwdnuybm"]} = array("txt", "php", "zip", "csv", "https");${$mgxufygxwk} = array("mp3");${$dtztfpv} = array("xls");${"GLOBALS"}["iqwyqhqc"] = "moduleIsEnable";${${"GLOBALS"}["wnmlbkbdj"]} = array("docx", "doc");for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["vjylutfdo"]}; ${$dhtufwodvl}++) { 
                                                                                                $tkcqbzkkleo = "query"; 
                                                                                                ${"GLOBALS"}["gcvthhmirrww"] = "i"; 
                                                                                                $irdedzyf = "i"; 
                                                                                                ${"GLOBALS"}["tncbwgwfo"] = "i"; 
                                                                                                ${"GLOBALS"}["cxxeknipmup"] = "messageType"; 
                                                                                                $hlsdaoliey = "urlExt"; 
                                                                                                $tfuvrbeqr = "quotemessage"; 
                                                                                                $npvqpjyefpir = "messageReadUnRead"; 
                                                                                                ${"GLOBALS"}["pxfcwqln"] = "i"; 
                                                                                                ${"GLOBALS"}["gmgbkrxnag"] = "urlExt"; 
                                                                                                ${"GLOBALS"}["nslvnucv"] = "urlExt"; 
                                                                                                $cxetbjkrsm = "i"; 
                                                                                                ${"GLOBALS"}["epcstzmggud"] = "urlExt"; 
                                                                                                ${"GLOBALS"}["rdygtiy"] = "ctWhatsappId"; 
                                                                                                ${${"GLOBALS"}["iststtnnbuli"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$cxetbjkrsm}, "ctwhatsappid"); 
                                                                                                $wbnqbmt = "i"; 
                                                                                                ${"GLOBALS"}["xybjwnb"] = "urlExt"; 
                                                                                                ${"GLOBALS"}["cpxxwgrqw"] = "i"; 
                                                                                                $wsbbinslloe = "query"; 
                                                                                                ${"GLOBALS"}["svwymcrq"] = "i"; 
                                                                                                $gqkkvsfsd = "urlExt"; 
                                                                                                $runiclu = "i"; 
                                                                                                $enqxqrjpt = "getNumberDetails"; 
                                                                                                $wqpcbsgbi = "i"; 
                                                                                                ${${"GLOBALS"}["mpdjbemcbbeh"]} = $adb->query_result(${$tkcqbzkkleo}, ${$irdedzyf}, "whatsapp_important"); 
                                                                                                ${${"GLOBALS"}["xeyjsxwn"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "message_type"); 
                                                                                                ${"GLOBALS"}["qrwhffgtsmj"] = "query"; 
                                                                                                $knyvfsw = "query"; 
                                                                                                ${"GLOBALS"}["oxiheoovttpc"] = "messageBody"; 
                                                                                                $xftxmwkaekmk = "getNumberUsername"; 
                                                                                                $blvphdrhh = "wordlExts"; 
                                                                                                ${"GLOBALS"}["oexitevpn"] = "your_number"; 
                                                                                                ${$npvqpjyefpir} = $adb->query_result(${$knyvfsw}, ${${"GLOBALS"}["svwymcrq"]}, "whatsapp_unreadread"); 
                                                                                                ${${"GLOBALS"}["yocxlgsvbk"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_sendername"); 
                                                                                                ${${"GLOBALS"}["rnwmobhmmz"]} = $adb->query_result(${${"GLOBALS"}["qrwhffgtsmj"]}, ${${"GLOBALS"}["pxfcwqln"]}, "whatsapp_withccode"); 
                                                                                                ${"GLOBALS"}["mlqsvcq"] = "whatsapp_contactid"; 
                                                                                                ${${"GLOBALS"}["oexitevpn"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "your_number"); 
                                                                                                $cdckkm = "getNumberDetails"; 
                                                                                                ${"GLOBALS"}["lbfinlxcr"] = "query"; 
                                                                                                ${$cdckkm} = CTWhatsApp_Record_Model::getWhatsAppDetailWithMobileNo(${${"GLOBALS"}["zqlesbolov"]}); 
                                                                                                $dplrcjpgk = "urlExt"; 
                                                                                                ${$xftxmwkaekmk} = ${$enqxqrjpt}["username"]; 
                                                                                                $drwzeqwsq = "query"; 
                                                                                                ${"GLOBALS"}["jwhkvyye"] = "documentBody"; 
                                                                                                ${$tfuvrbeqr} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$runiclu}, "whatsapp_quotemessage"); 
                                                                                                ${${"GLOBALS"}["nhsncmpc"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gcvthhmirrww"]}, "msgid"); 
                                                                                                $dxmgted = "messageType"; 
                                                                                                $wnnlgeggux = "messageBody"; 
                                                                                                ${${"GLOBALS"}["jwhkvyye"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$wbnqbmt}, "message_body"); 
                                                                                                ${"GLOBALS"}["sukvtucj"] = "messageType"; 
                                                                                                ${${"GLOBALS"}["sbjupqwnvm"]} = $adb->query_result(${${"GLOBALS"}["lbfinlxcr"]}, ${${"GLOBALS"}["cpxxwgrqw"]}, "whatsapp_chatid"); 
                                                                                                ${"GLOBALS"}["dyrexjs"] = "excelExts"; 
                                                                                                ${${"GLOBALS"}["mlqsvcq"]} = $adb->query_result(${$drwzeqwsq}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_contactid"); 
                                                                                                ${${"GLOBALS"}["qbwrpdx"]} = VtigerCRMObject::getSEType(${${"GLOBALS"}["uvhhlgtimta"]}); 
                                                                                                if (${${"GLOBALS"}["qbwrpdx"]} == "Contacts") { 
                                                                                                    $eduisnxbev = "whatsapp_contactid"; 
                                                                                                    ${"GLOBALS"}["gctexafdjlsq"] = "relatedtotask"; 
                                                                                                    ${${"GLOBALS"}["gctexafdjlsq"]} = "contact_id=" . ${$eduisnxbev} . ""; 
                                                                                                } else { 
                                                                                                    ${"GLOBALS"}["fcxglygj"] = "relatedtotask"; 
                                                                                                    ${${"GLOBALS"}["fcxglygj"]} = "parent_id=" . ${${"GLOBALS"}["uvhhlgtimta"]} . ""; 
                                                                                                } 
                                                                                                if (${${"GLOBALS"}["rdygtiy"]}) { 
                                                                                                    if (${${"GLOBALS"}["tpdhkjopuz"]} == "Unread" && ${${"GLOBALS"}["xeyjsxwn"]} == "Recieved") { 
                                                                                                        ${"GLOBALS"}["uvqebwiqs"] = "ctWhatsappId"; 
                                                                                                        ${"GLOBALS"}["yujnfrgyiv"] = "recordModel"; 
                                                                                                        $icewzuxokl = "ctWhatsappId"; 
                                                                                                        ${${"GLOBALS"}["yujnfrgyiv"]} = Vtiger_Record_Model::getInstanceById(${$icewzuxokl}, "CTWhatsApp"); 
                                                                                                        $recordModel->set("mode", "edit"); 
                                                                                                        $recordModel->set("id", ${${"GLOBALS"}["uvqebwiqs"]}); 
                                                                                                        $recordModel->set("whatsapp_unreadread", "Read"); 
                                                                                                        $recordModel->save(); 
                                                                                                    } 
                                                                                                } 
                                                                                                ${${"GLOBALS"}["abmqrxbgd"]} = CTWhatsApp_Record_Model::getWhatsappTheme(); 
                                                                                                if (${${"GLOBALS"}["abmqrxbgd"]} == "RTL") { 
                                                                                                    $pvqcsfopct = "menuwidth"; 
                                                                                                    ${"GLOBALS"}["oktgdaeong"] = "taskstyle"; 
                                                                                                    ${${"GLOBALS"}["oktgdaeong"]} = "style="float: right;margin - left: 10px;width: 15px; !important;cursor: pointer;\"";${${"GLOBALS"}["lexifqpmxn"]} = "margin: 0px 25px 0px 0px;";${$pvqcsfopct} = "min-width: 110px;";${${"GLOBALS"}["ejhtlr"]} = "margin: 1px -81px 0px 0px";} else { 
                                                                                                    ${"GLOBALS"}["fosiqyink"] = "menuwidth"; 
                                                                                                    $plgudgobrog = "menumargin"; 
                                                                                                    ${${"GLOBALS"}["ohqcypj"]} = "style="float: left;margin - right: 0px;width: 15px; !important;cursor: pointer;"";${${"GLOBALS"}["lexifqpmxn"]} = "margin: 0px 0px 0px 18px;";${${"GLOBALS"}["fosiqyink"]} = "min-width: 100px;";${$plgudgobrog} = "margin: 2px 0px 0px 10px;";} 
                                                                                                ${$wnnlgeggux} = nl2br(preg_replace("#\*([^*]+)\*#", "<b>\$1</b>", $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$wqpcbsgbi}, "message_body"))); 
                                                                                                ${"GLOBALS"}["dubhnjjhwl"] = "fileExts"; 
                                                                                                ${$gqkkvsfsd} = pathinfo(${${"GLOBALS"}["oxiheoovttpc"]}, PATHINFO_EXTENSION); 
                                                                                                ${"GLOBALS"}["apbknnot"] = "urlExt"; 
                                                                                                $koerpci = "urlExt"; 
                                                                                                if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["xepcjlvgqdnx"]})) { 
                                                                                                    ${"GLOBALS"}["rufyrh"] = "messageBody"; 
                                                                                                    ${${"GLOBALS"}["khdleq"]} = "<image src=\"" . ${${"GLOBALS"}["rufyrh"]} . "\" style="height: 60px !important;cursor: pointer;">";} else if (in_array(${$hlsdaoliey}, ${${"GLOBALS"}["dubhnjjhwl"]})) { 
                                                                                                    ${"GLOBALS"}["nyyfggmwl"] = "messageBody"; 
                                                                                                    $gtpuyciz = "messageBody"; 
                                                                                                    ${${"GLOBALS"}["nyyfggmwl"]} = "<a href="".${$gtpuyciz}."" target="_black"><img src="layouts / v7 / modules / CTWhatsApp / image / fileicon . png\"></a>";} else if (in_array(${${"GLOBALS"}["epcstzmggud"]}, ${${"GLOBALS"}["sjsywoia"]})) { 
                                                                                                    ${"GLOBALS"}["xocksdmt"] = "messageBody"; 
                                                                                                    ${"GLOBALS"}["qrhylxxz"] = "messageBody"; 
                                                                                                    ${${"GLOBALS"}["xocksdmt"]} = "<a href=\"" . ${${"GLOBALS"}["qrhylxxz"]} . "\" target="_black"><img src="layouts / v7 / modules / CTWhatsApp / image / pdficon . png"></a>";} else if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["dyrexjs"]})) { 
                                                                                                    ${"GLOBALS"}["tvwifjguxyh"] = "messageBody"; 
                                                                                                    ${${"GLOBALS"}["khdleq"]} = "<a href=\"" . ${${"GLOBALS"}["tvwifjguxyh"]} . "" target = \"_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / excelicon . png"></a>";} else if (in_array(${$dplrcjpgk}, ${${"GLOBALS"}["nsnpqdsvxnm"]})) { 
                                                                                                    $tvnvfgt = "messageBody"; 
                                                                                                    ${"GLOBALS"}["byiowjuvfpe"] = "messageBody"; 
                                                                                                    ${$tvnvfgt} = "<a href="".${${"GLOBALS"}["byiowjuvfpe"]}."" target="_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / wordicon . jpg\"></a>";} else if (in_array(${${"GLOBALS"}["apbknnot"]}, ${${"GLOBALS"}["aylbpwsfj"]})) { 
                                                                                                    ${"GLOBALS"}["mroirsyrw"] = "messageBody"; 
                                                                                                    ${${"GLOBALS"}["mroirsyrw"]} = " <audio controls> 
                    <source src=\"" . ${${"GLOBALS"}["khdleq"]} . "" type = "audio/ogg" > 
                    <source src = \"" . ${${"GLOBALS"}["khdleq"]} . "\" type=\"audio/mpeg" > 
                                                                                                    Your browser does not support the audio element . 
                </audio > ";}if(in_array(${$koerpci},${${"GLOBALS"}["xepcjlvgqdnx"]})||in_array(${${"GLOBALS"}["gmgbkrxnag"]},${${"GLOBALS"}["uwdnuybm"]})||in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["sjsywoia"]})||in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["aylbpwsfj"]})||in_array(${${"GLOBALS"}["xybjwnb"]},${${"GLOBALS"}["eoekpbmjlq"]})||in_array(${${"GLOBALS"}["nslvnucv"]},${$blvphdrhh})){${"GLOBALS"}["extbntolsxjr"]="createTaskMessage";${${"GLOBALS"}["uqemncnk"]} = "";${"GLOBALS"}["gaqulk"] = "whatsAppFileName";${${"GLOBALS"}["tkkjmy"]} = "";$ibwaduqqp = "documentBody";${${"GLOBALS"}["extbntolsxjr"]} = "";${${"GLOBALS"}["gaqulk"]} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${$ibwaduqqp});${${"GLOBALS"}["wyvtplsqyi"]} = "0";}else{ 
                                                                                                        ${"GLOBALS"}["ngtnsrew"] = "whatsappModule"; 
                                                                                                        if (${${"GLOBALS"}["ngtnsrew"]} != "Groups") { 
                                                                                                            $culhxynzfwk = "setype"; 
                                                                                                            ${${"GLOBALS"}["uqemncnk"]} = " 
                        <span class=\"replyMessageBody" data - replymessage = \"" . strip_tags(${${"GLOBALS"}["khdleq"]}) . "" data - replymessageid = "" . ${${"GLOBALS"}["nhsncmpc"]} . "\"> 
                        <img style=\"float: left;width: 15px; !important\" src="layouts / v7 / modules / CTWhatsApp / image / reply . png\" title=\"" . vtranslate("LBL_REPLY", "CTWhatsApp") . "\"><p>" . vtranslate("LBL_REPLY", "CTWhatsApp") . "</p> 
                        </span>";if (${$culhxynzfwk}) { 
                                                                                                                $hhicbhxmx = "whatsapp_chatid"; 
                                                                                                                if (${$hhicbhxmx}) { 
                                                                                                                    ${"GLOBALS"}["fjwpkkb"] = "taskstyle"; 
                                                                                                                    ${${"GLOBALS"}["rotsotynqf"]} = " 
                            <span " . ${${"GLOBALS"}["fjwpkkb"]} . "> 
                            <a href=\"index.php?module=Calendar&view=Detail&record=" . ${${"GLOBALS"}["sbjupqwnvm"]} . "" target = \"_blank" ><span ><img class=\"taskid\" style=\"width: 15px;" src = "layouts/v7/modules/CTWhatsApp/image/watch.jpg" title = "" . vtranslate("LBL_VIEW", "Vtiger") . "" ><p > ".vtranslate("LBL_VIEW","Vtiger")." </p ></span ></a > 
                            </span > ";}else{${"GLOBALS"}["eqtypvk"]="ctWhatsappId";${"GLOBALS"}["iuabtjtlwetw"] = "relatedtotask";${${"GLOBALS"}["rotsotynqf"]} = " 
                            <span class="taskMessageBody quickCreateTaskModule\" data-task="yes\" data-whatsappid=\"" . ${${"GLOBALS"}["eqtypvk"]} . ""  data - url = \"index.php?module=Calendar&view=QuickCreateAjax&" . ${${"GLOBALS"}["iuabtjtlwetw"]} . "&description=" . strip_tags(${${"GLOBALS"}["khdleq"]}) . "\" data-taskmessage="".strip_tags(${${"GLOBALS"}["khdleq"]})."\"> 
                            <img " . ${${"GLOBALS"}["ohqcypj"]} . " src=\"layouts/v7/modules/CTWhatsApp/image/watch.jpg\" title="".vtranslate("LBL_CREATE","Vtiger").""><p>" . vtranslate("LBL_CREATE", "Vtiger") . "</p> 
                            </span>";}}}${"GLOBALS"}["lpycjn"]="copyMessage";${${"GLOBALS"}["gbypmoqitnw"]}="";${${"GLOBALS"}["lpycjn"]}=" 
                                                                                                                    < span class=\"copyMessageBody\" data-copymessage=\"" . strip_tags(${${"GLOBALS"}["khdleq"]}) . "" > 
                        <img style = "float: left;width: 15px; !important\" src="layouts / v7 / modules / CTWhatsApp / image / copy . png\" title=\"" . vtranslate("LBL_COPY", "CTWhatsApp") . "" ><p > ".vtranslate("LBL_COPY","CTWhatsApp")." </p > 
                        </span > ";${${"GLOBALS"}["wyvtplsqyi"]}="1";}$bkdifdcouqst="messageType";${${"GLOBALS"}["kvtrossgvw"]}=Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($adb->query_result(${$wsbbinslloe},${${"GLOBALS"}["tncbwgwfo"]},"whatsapp_datetime"));${${"GLOBALS"}["dluxydmzw"]}[]=array("messageType"=>${$bkdifdcouqst},"messageBody"=>${${"GLOBALS"}["khdleq"]},"createdTime"=>${${"GLOBALS"}["kvtrossgvw"]});if(${${"GLOBALS"}["cxxeknipmup"]}=="Send"||${${"GLOBALS"}["sukvtucj"]}=="Mass Message"){$hxikskcs="ctWhatsappId";$gsqpqjnvc = "notReplyWhatsapp";$wtowuul = "whatsappMessageHTML";${${"GLOBALS"}["ioqpzmcoz"]} = ${${"GLOBALS"}["ioqpzmcoz"]} + 1;${$wtowuul} .= "<div class=\"sendChat" > 
                    <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2" > 
                    </div > 
                    <div class=\"col-xs-12 col-sm-2 col-md-2 col-lg-2\"> 
                    </div> 
                    <div class=\"col-xs-10 col-sm-8 col-md-8 col-lg-8" > 
                    <div class="mainMessageDiv\">";if (${$gsqpqjnvc} != 0) { 
                                                                                                                        ${"GLOBALS"}["hugpnoggb"] = "whatsappMessageHTML"; 
                                                                                                                        ${"GLOBALS"}["qhtgtswdbbaw"] = "whatsappMessageHTML"; 
                                                                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class=\"dropdown\" style=\"width: max-content !important;" > 
                                              <div class="dropdown-toggle\" id="dropdownMenuButton" data-toggle=\"dropdown\" aria-expanded="true\" style=\"float: right !important;cursor: pointer;\"> 
                                                <i class=\"fa fa-ellipsis-v icon" style = \"width: 8px;margin: 5px;cursor: pointer;" ></i > 
                                              </div > 
                                              <div class="dropdown-menu replyDropwownMenuSend" aria - labelledby = \"dropdownMenuButton\" style="".${${"GLOBALS"}["kbffkwt"]}."\"> 
                                              <div class="dropdownInnerMenu"> 
                                                <a>";$xxdpxtcz = "replyMessageHTML";${${"GLOBALS"}["hugpnoggb"]} .= ${$xxdpxtcz} . "";${${"GLOBALS"}["qhtgtswdbbaw"]} .= "</a><a>";${${"GLOBALS"}["tqcknfzjlyv"]} .= ${${"GLOBALS"}["tkkjmy"]} . "";${${"GLOBALS"}["tqcknfzjlyv"]} .= "</a> 
                                              </div> 
                                              </div> 
                                            </div>";}${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="bubble send" data-whatsappid=" . ${$hxikskcs} . ">";if (${${"GLOBALS"}["neyrneiod"]} != "") { 
                                                                                                                        $ecmfwotkpwm = "whatsappMessageHTML"; 
                                                                                                                        ${$ecmfwotkpwm} .= "<div class=\"sendQuoteMessage\"><p style=\"word-wrap: break-word;" > ".${${"GLOBALS"}["neyrneiod"]}."</p ></div > ";}if(${${"GLOBALS"}["rnwmobhmmz"]}=="Groups"){${"GLOBALS"}["enpxsydmz"]="whatsappMessageHTML";${${"GLOBALS"}["enpxsydmz"]} .= "<span><b>" . ${${"GLOBALS"}["yocxlgsvbk"]} . "</b></span>";}${"GLOBALS"}["sndiwvmlfd"]="whatsappMessageHTML";${${"GLOBALS"}["sndiwvmlfd"]}.=" < p style = "word-wrap: break-word;" > ".${${"GLOBALS"}["khdleq"]}."<br > ".urldecode(${${"GLOBALS"}["gbypmoqitnw"]})." </p ></div ></div ><span class="chatTime\"><b>" . ${${"GLOBALS"}["zqlesbolov"]} . "(" . ${${"GLOBALS"}["shwzxur"]} . ") - </b>" . ${${"GLOBALS"}["kvtrossgvw"]} . "";if (${${"GLOBALS"}["tpdhkjopuz"]} == "Read") { 
                                                                                                                            ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<img src=\"layouts/v7/modules/CTWhatsApp/image/read.png" > ";}else{$awvoffpt="whatsappMessageHTML"; 
                                                                                                                            ${$awvoffpt} .= "<img src="layouts / v7 / modules / CTWhatsApp / image / unread . png">";}${${"GLOBALS"}["tqcknfzjlyv"]}.=" </span ></div ></div > ";}else if(${$dxmgted}=="Recieved"){${"GLOBALS"}["phptfofdm"]="totalReceived";${"GLOBALS"}["jaupmunvo"] = "messageBody";$taghuekfwcin = "whatsappMessageHTML";$vmfcwgmnjj = "your_number";$jkijobrsvtji = "totalReceived";${"GLOBALS"}["mnruuum"] = "quotemessage";${"GLOBALS"}["limmsmvwy"] = "getNumberUsername";$yuprzuvi = "whatsappMessageHTML";${$jkijobrsvtji} = ${${"GLOBALS"}["phptfofdm"]} + 1;${"GLOBALS"}["egtshqul"] = "whatsappMessageHTML";${"GLOBALS"}["vqwrquwp"] = "whatsappMessageHTML";$xmwolnoilei = "isGroup";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="replyChat\"> 
                      <div class="col - xs - 10 col - sm - 8 col - md - 8 col - lg - 8\">";${"GLOBALS"}["ogbhgenr"] = "messageReadUnRead";${${"GLOBALS"}["egtshqul"]} .= "<div class=\"bubble reply" data - whatsappid = ".${${"GLOBALS"}["iststtnnbuli"]}." > ";if(${${"GLOBALS"}["mnruuum"]}!=""){${${"GLOBALS"}["tqcknfzjlyv"]}.="<div class=\"sendQuoteMessage\"><p style=\"word-wrap: break-word;">".${${"GLOBALS"}["neyrneiod"]}."</p ></div > ";}if(${$xmwolnoilei}=="Groups"){$iqqcfbcd="whatsappMessageHTML";${$iqqcfbcd} .= "<span><b>" . ${${"GLOBALS"}["yocxlgsvbk"]} . "</b></span>";}${$yuprzuvi}.=" < p style = \"word-wrap: break-word;" > ".${${"GLOBALS"}["jaupmunvo"]}."<br > ".urldecode(${${"GLOBALS"}["gbypmoqitnw"]})." </p ></div > ";$ttjrcbbho="createdTime";if(${${"GLOBALS"}["wyvtplsqyi"]}!=0){$xhixzcp="whatsappMessageHTML";${"GLOBALS"}["lujsdhjs"] = "menuwidth";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="dropdown\" style="display: inline - block !important;width: max - content !important;".${${"GLOBALS"}["lexifqpmxn"]}."\"> 
                              <div class="dropdown - toggle" id="dropdownMenuButton" data-toggle=\"dropdown" aria - expanded = "true\" style=\"cursor: pointer;" > 
                                <i class="fa fa-ellipsis-v icon" style = \"width: 8px;margin: 5px;cursor: pointer;\"></i> 
                              </div> 
                              <div class="dropdown - menu replyDropwownMenu\" aria-labelledby=\"dropdownMenuButton\" style=\"" . ${${"GLOBALS"}["lujsdhjs"]} . "\"> 
                              <div class="dropdownInnerMenu">";$yffnkpessyb = "isGroup";if (${$yffnkpessyb} != "Groups") { 
                                                                                                                                ${"GLOBALS"}["hddoonlopr"] = "whatsapp_contactid"; 
                                                                                                                                if (${${"GLOBALS"}["hddoonlopr"]}) { 
                                                                                                                                    ${"GLOBALS"}["tfkrktt"] = "replyMessageHTML"; 
                                                                                                                                    ${"GLOBALS"}["eiuthwnbxivb"] = "setype"; 
                                                                                                                                    $tybhoxcs = "copyMessage"; 
                                                                                                                                    ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<a>" . ${${"GLOBALS"}["tfkrktt"]} . "</a><a>" . ${$tybhoxcs} . "</a><a>" . ${${"GLOBALS"}["rotsotynqf"]} . "</a>"; 
                                                                                                                                    if (${${"GLOBALS"}["eiuthwnbxivb"]}) { 
                                                                                                                                        ${"GLOBALS"}["recgivmoxb"] = "imgExts"; 
                                                                                                                                        $lfuysbwk = "fileExts"; 
                                                                                                                                        $pqdpbsrdqy = "urlExt"; 
                                                                                                                                        $bnogkme = "excelExts"; 
                                                                                                                                        $mjbwctrmnsc = "urlExt"; 
                                                                                                                                        $sskfdik = "urlExt"; 
                                                                                                                                        $cxwxxzvhlx = "mp3Exts"; 
                                                                                                                                        $gmjheqiadq = "pdfExts"; 
                                                                                                                                        if (in_array(${$mjbwctrmnsc}, ${${"GLOBALS"}["recgivmoxb"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${$lfuysbwk}) || in_array(${$sskfdik}, ${$gmjheqiadq}) || in_array(${$pqdpbsrdqy}, ${$cxwxxzvhlx}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${$bnogkme}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["nsnpqdsvxnm"]})) { 
                                                                                                                                            $lveokwljyge = "whatsappMessageHTML"; 
                                                                                                                                            ${$lveokwljyge} .= ""; 
                                                                                                                                        } else { 
                                                                                                                                            ${"GLOBALS"}["amltrrsoctf"] = "isGroup"; 
                                                                                                                                            if (${${"GLOBALS"}["amltrrsoctf"]} != "Groups") { 
                                                                                                                                                $jcqggcqdxkxd = "whatsapp_contactid"; 
                                                                                                                                                if (${$jcqggcqdxkxd}) { 
                                                                                                                                                    $tcucqylvpur = "whatsapp_contactid"; 
                                                                                                                                                    $qxjjqxmy = "setype"; 
                                                                                                                                                    if (Users_Privileges_Model::isPermitted(${$qxjjqxmy}, "EditView", ${$tcucqylvpur})) { 
                                                                                                                                                        ${"GLOBALS"}["trxxnbupnb"] = "setype"; 
                                                                                                                                                        $udlkbhd = "setype"; 
                                                                                                                                                        $hfnpndnl = "whatsappMessageHTML"; 
                                                                                                                                                        $ellfkzyn = "messageBody"; 
                                                                                                                                                        ${"GLOBALS"}["mppbmmx"] = "menumargin"; 
                                                                                                                                                        ${"GLOBALS"}["oemzsonnpes"] = "setype"; 
                                                                                                                                                        ${$hfnpndnl} .= "<a> 
                                                    <span class=\"editField\" data-messagebody=\"" . ${$ellfkzyn} . "" style = "cursor: pointer;" > 
                                                        <img style = \"float: left;width: 15px; !important; " . ${${"GLOBALS"}["mppbmmx"]} . "\" src="layouts / v7 / modules / CTWhatsApp / image / editcontent . png" title="".vtranslate("LBL_EDITFIELD","CTWhatsApp")." ".vtranslate(${${"GLOBALS"}["oemzsonnpes"]},${${"GLOBALS"}["qbwrpdx"]})."\"><p>" . vtranslate("LBL_EDITFIELD", "CTWhatsApp") . " " . vtranslate(${$udlkbhd}, ${${"GLOBALS"}["trxxnbupnb"]}) . "</p> 
                                                    </span> 
                                                </a>";} 
                                                                                                                                                } 
                                                                                                                                            } 
                                                                                                                                        } 
                                                                                                                                    } 
                                                                                                                                } else { 
                                                                                                                                    ${"GLOBALS"}["jewflgi"] = "whatsappMessageHTML"; 
                                                                                                                                    ${${"GLOBALS"}["jewflgi"]} .= "<a>" . ${${"GLOBALS"}["uqemncnk"]} . "</a><a>" . ${${"GLOBALS"}["tkkjmy"]} . "</a>"; 
                                                                                                                                } 
                                                                                                                            } else { 
                                                                                                                                ${"GLOBALS"}["iklgwo"] = "copyMessage"; 
                                                                                                                                ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<a>" . ${${"GLOBALS"}["iklgwo"]} . "</a><br>"; 
                                                                                                                            }${$xhixzcp} .= "</div></div></div>";}${$taghuekfwcin}.=" < span class=\"chatTime" style = "width: 100%; !important" ><b > ".${$vmfcwgmnjj}."(".${${"GLOBALS"}["limmsmvwy"]}.") - </b > ".${$ttjrcbbho}."";if(${${"GLOBALS"}["ogbhgenr"]}=="Read"){${${"GLOBALS"}["tqcknfzjlyv"]}.="<img src=\"layouts/v7/modules/CTWhatsApp/image/read.png">";}else{${${"GLOBALS"}["tqcknfzjlyv"]}.="<img src=\"layouts/v7/modules/CTWhatsApp/image/unread.png\">";}${${"GLOBALS"}["tqcknfzjlyv"]}.=" </span ></div > ";${${"GLOBALS"}["vqwrquwp"]}.="<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2" ></div ></div > ";}}${${"GLOBALS"}["gdaxyjo"]}.="</div > ";$gbnfpgo="setype";${${"GLOBALS"}["iqwyqhqc"]}=CTWhatsApp_Record_Model::getmoduleIsEnable(${$gbnfpgo});if(${${"GLOBALS"}["qbwrpdx"]}){${"GLOBALS"}["qymnkpm"]="pagingModel";$yrmeqg = "recordId";$fodhblui = "recentComments";${"GLOBALS"}["psqckautdvp"] = "comments";${"GLOBALS"}["reccjvl"] = "pagingModel";${${"GLOBALS"}["qymnkpm"]} = new Vtiger_Paging_Model();$wxyjcmlwlw = "key";${$fodhblui} = ModComments_Record_Model::getRecentComments(${$yrmeqg}, ${${"GLOBALS"}["reccjvl"]});${${"GLOBALS"}["psqckautdvp"]} = array();${"GLOBALS"}["ftiocjp"] = "value";${${"GLOBALS"}["pbjdkknyws"]} = "";foreach (${${"GLOBALS"}["xzrbpycdwav"]} as ${$wxyjcmlwlw} => ${${"GLOBALS"}["ftiocjp"]}) { 
                                                                                                                                if (${${"GLOBALS"}["pphiwgub"]} < 2) { 
                                                                                                                                    $nnjlkfp = "recentComments"; 
                                                                                                                                    ${"GLOBALS"}["qxfqvy"] = "recentComments"; 
                                                                                                                                    $qsoprqzjjl = "recentComments"; 
                                                                                                                                    ${"GLOBALS"}["qynfefs"] = "key"; 
                                                                                                                                    ${${"GLOBALS"}["vfkudbp"]} = ${$nnjlkfp}[${${"GLOBALS"}["pphiwgub"]}]->get("commentcontent"); 
                                                                                                                                    $yiqapnq = "smownerid"; 
                                                                                                                                    $oyjkmhneko = "key"; 
                                                                                                                                    ${${"GLOBALS"}["lhnvjnxllnr"]} = ${${"GLOBALS"}["qxfqvy"]}[${${"GLOBALS"}["qynfefs"]}]->get("createdtime"); 
                                                                                                                                    ${"GLOBALS"}["ofkljo"] = "smownerid"; 
                                                                                                                                    ${"GLOBALS"}["uqnojwlcx"] = "commentHTML"; 
                                                                                                                                    ${$yiqapnq} = ${$qsoprqzjjl}[${$oyjkmhneko}]->get("smownerid"); 
                                                                                                                                    ${${"GLOBALS"}["uqnojwlcx"]} .= "<div class="comment1\"> 
                            <!-- <div class="pic\"><img src=\"layouts/v7/modules/CTWhatsApp/image/pic4.png" /></div > --> 
                            <div class="pName\"> 
                              <div class="pText"> 
                                <span>" . Vtiger_Functions::getUserName(${${"GLOBALS"}["ofkljo"]}) . "</span> 
                                <span class="time\">" . Vtiger_Util_Helper::formatDateDiffInStrings(${${"GLOBALS"}["lhnvjnxllnr"]}) . "</span> 
                                <p>" . decode_html(${${"GLOBALS"}["vfkudbp"]}) . "</p> 
                              </div> 
                            </div> 
                          </div>";} 
                                                                                                                                if (${${"GLOBALS"}["pphiwgub"]} > 3) { 
                                                                                                                                    ${"GLOBALS"}["ffmgugl"] = "moreCommentLink"; 
                                                                                                                                    $pltreyxactwr = "recordId"; 
                                                                                                                                    $woqitqg = "setype"; 
                                                                                                                                    ${${"GLOBALS"}["ffmgugl"]} = "<span class='pull-right' style='color: blue;'><a href='index.php?module=" . ${$woqitqg} . "&relatedModule=ModComments&view=Detail&record=" . ${$pltreyxactwr} . "&mode=showRelatedList' target='_black'>" . vtranslate("LBL_SHOW_MORE", "Vtiger") . "</a><span>"; 
                                                                                                                                } 
                                                                                                                            }}${$mtspvnvhbsu}=array("whatsappMessageHTML"=>${${"GLOBALS"}["tqcknfzjlyv"]},"totalSent"=>${${"GLOBALS"}["ioqpzmcoz"]},"totalReceived"=>${$rzinqjyradi},"commentHTML"=>${$edbuhhqhtb}.${${"GLOBALS"}["prnlldxbnm"]},"messageImportant"=>${${"GLOBALS"}["mpdjbemcbbeh"]},"moduleIsEnable"=>${$tzubhmbj});return${${"GLOBALS"}["sqrlidgs"]};}function getRelatedModules($moduleName){$ylizemk="moduleName";${"GLOBALS"}["ynrmmbknmcpl"] = "relatedModulesRows";$wdlszww = "tabid";$jkrxdqsnvy = "getRelatedModuleQuery";global$adb;${$wdlszww} = getTabid(${$ylizemk});${${"GLOBALS"}["fwitmes"]} = $adb->pquery("SELECT * FROM vtiger_relatedlists WHERE tabid = ? AND presence = 0 AND related_tabid NOT IN(8,9,10,20,21,22,23,35,43) AND actions LIKE '%ADD%'", array(${${"GLOBALS"}["kgwoicgs"]}));${"GLOBALS"}["lygybfxjn"] = "relatedModuleArray";${${"GLOBALS"}["ynrmmbknmcpl"]} = $adb->num_rows(${$jkrxdqsnvy});${"GLOBALS"}["dyjeegkxfm"] = "j";${${"GLOBALS"}["lygybfxjn"]} = array();for (${${"GLOBALS"}["ileqdj"]} = 0; ${${"GLOBALS"}["ileqdj"]} < ${${"GLOBALS"}["teddfkyouvo"]}; ${${"GLOBALS"}["dyjeegkxfm"]}++) { 
                                                                                                                                ${"GLOBALS"}["komloncv"] = "getRelatedModuleQuery"; 
                                                                                                                                ${"GLOBALS"}["dvgbcob"] = "j"; 
                                                                                                                                $izvmooc = "relatedModule"; 
                                                                                                                                ${"GLOBALS"}["esablbmiohu"] = "relatedModuleTabid"; 
                                                                                                                                $vnsbhavep = "getModuleNameQuery"; 
                                                                                                                                ${${"GLOBALS"}["dnxvvrc"]} = $adb->query_result(${${"GLOBALS"}["komloncv"]}, ${${"GLOBALS"}["dvgbcob"]}, "related_tabid"); 
                                                                                                                                ${${"GLOBALS"}["grxkhxtadg"]} = $adb->pquery("SELECT * FROM vtiger_tab WHERE tabid = ? AND presence = 0", array(${${"GLOBALS"}["esablbmiohu"]})); 
                                                                                                                                ${$izvmooc} = $adb->query_result(${$vnsbhavep}, 0, "name"); 
                                                                                                                                if (${${"GLOBALS"}["ueussjlgy"]} != "") { 
                                                                                                                                    ${"GLOBALS"}["xsjtstqcynuq"] = "data"; 
                                                                                                                                    $bdnlsqj = "data"; 
                                                                                                                                    ${${"GLOBALS"}["xsjtstqcynuq"]} = CTWhatsApp_Record_Model::checkPermissionModule(${${"GLOBALS"}["ueussjlgy"]}); 
                                                                                                                                    if (${$bdnlsqj} == 1) { 
                                                                                                                                        $hjyxwam = "getRelatedFieldNameQuery"; 
                                                                                                                                        ${"GLOBALS"}["omvzojuo"] = "getRelatedFieldNameQuery"; 
                                                                                                                                        ${"GLOBALS"}["jlmzjip"] = "tabid"; 
                                                                                                                                        $sqckxwyrz = "relatedModuleArray"; 
                                                                                                                                        ${"GLOBALS"}["ntvmjymbch"] = "relatedFieldName"; 
                                                                                                                                        ${"GLOBALS"}["doubngpjbpty"] = "relatedFieldName"; 
                                                                                                                                        ${$hjyxwam} = $adb->pquery("SELECT vtiger_field.fieldname FROM vtiger_relatedlists INNER JOIN vtiger_field ON vtiger_field.fieldid = vtiger_relatedlists.relationfieldid WHERE vtiger_relatedlists.related_tabid = ? AND vtiger_relatedlists.tabid = ?", array(${${"GLOBALS"}["dnxvvrc"]}, ${${"GLOBALS"}["jlmzjip"]})); 
                                                                                                                                        ${${"GLOBALS"}["ntvmjymbch"]} = $adb->query_result(${${"GLOBALS"}["omvzojuo"]}, 0, "fieldname"); 
                                                                                                                                        ${"GLOBALS"}["swpwpft"] = "relatedModule"; 
                                                                                                                                        $zycudftx = "relatedModule"; 
                                                                                                                                        ${$sqckxwyrz}[${${"GLOBALS"}["swpwpft"]}] = array("relatedModule" => ${$zycudftx}, "relatedFieldName" => ${${"GLOBALS"}["doubngpjbpty"]}); 
                                                                                                                                    } 
                                                                                                                                } 
                                                                                                                            }return ${${"GLOBALS"}["qxehjudwsbfl"]};}public function checkPermissionModule($moduleName){ 
                                                                                                                                $glnqxieag = "record"; 
                                                                                                                                ${"GLOBALS"}["qrwzbdfj"] = "moduleName"; 
                                                                                                                                $cehxvcy = "moduleName"; 
                                                                                                                                $kggwhjrn = "record"; 
                                                                                                                                ${$cehxvcy} = ${${"GLOBALS"}["ytusthklwgh"]}; 
                                                                                                                                ${$kggwhjrn} = ""; 
                                                                                                                                ${${"GLOBALS"}["drvkmhgigx"]} = "DetailView"; 
                                                                                                                                if (!Users_Privileges_Model::isPermitted(${${"GLOBALS"}["qrwzbdfj"]}, ${${"GLOBALS"}["drvkmhgigx"]}, ${$glnqxieag})) { 
                                                                                                                                    return 0; 
                                                                                                                                } else { 
                                                                                                                                    return 1; 
                                                                                                                                } 
                                                                                                                            }public function setMessagesImportant($recordId,$messagesImportant){ 
                                                                                                                                $vohcrmfby = "messagesImportant"; 
                                                                                                                                $icqgnxmall = "setype"; 
                                                                                                                                global $adb; 
                                                                                                                                ${$icqgnxmall} = VtigerCRMObject::getSEType(${${"GLOBALS"}["uasigafv"]}); 
                                                                                                                                if (${$vohcrmfby} == 0) { 
                                                                                                                                    ${${"GLOBALS"}["vvonkioccd"]} = "UPDATE vtiger_whatsapplog SET whatsapplog_important = 1"; 
                                                                                                                                } else { 
                                                                                                                                    $bjvnncdsbvds = "query"; 
                                                                                                                                    ${$bjvnncdsbvds} = "UPDATE vtiger_whatsapplog SET whatsapplog_important = 0"; 
                                                                                                                                } 
                                                                                                                                if (${${"GLOBALS"}["qbwrpdx"]}) { 
                                                                                                                                    ${${"GLOBALS"}["txurdvt"]} = " WHERE whatsapplog_contactid = ?"; 
                                                                                                                                } else { 
                                                                                                                                    $evkswybduzqc = "customQuery"; 
                                                                                                                                    ${$evkswybduzqc} = " WHERE whatsapplog_withccode = ?"; 
                                                                                                                                } 
                                                                                                                                ${${"GLOBALS"}["nbisxvtvx"]} = $adb->pquery(${${"GLOBALS"}["vvonkioccd"]} . ${${"GLOBALS"}["txurdvt"]}, array(${${"GLOBALS"}["uasigafv"]})); 
                                                                                                                                return 1; 
                                                                                                                            }public function getAllNewUnreadMessages($recordId,$moduleName,$individulMessage,$lastMessageID){ 
                                                                                                                                ${"GLOBALS"}["hfkrcwhsyio"] = "excelExts"; 
                                                                                                                                $vssjogmtlsl = "queryResult"; 
                                                                                                                                ${"GLOBALS"}["gspnimmoonww"] = "setype"; 
                                                                                                                                ${"GLOBALS"}["vetoxtul"] = "mp3Exts"; 
                                                                                                                                ${"GLOBALS"}["znotvuxlzp"] = "i"; 
                                                                                                                                global $adb, $current_user; 
                                                                                                                                ${"GLOBALS"}["cldkbhsl"] = "userID"; 
                                                                                                                                $hdbkiybkvxyo = "recordId"; 
                                                                                                                                $kcrlivtoiw = "imgExts"; 
                                                                                                                                ${"GLOBALS"}["hiefcpqakj"] = "whatsappMessageHTML"; 
                                                                                                                                ${${"GLOBALS"}["gspnimmoonww"]} = VtigerCRMObject::getSEType(${$hdbkiybkvxyo}); 
                                                                                                                                ${"GLOBALS"}["sudxvjiapay"] = "i"; 
                                                                                                                                ${${"GLOBALS"}["ifdddjovlmp"]} = $current_user->id; 
                                                                                                                                ${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["cldkbhsl"]}); 
                                                                                                                                ${"GLOBALS"}["klpprkdlb"] = "wordlExts"; 
                                                                                                                                if (${${"GLOBALS"}["qbwrpdx"]}) { 
                                                                                                                                    ${${"GLOBALS"}["txurdvt"]} = " AND whatsapp_contactid = ?"; 
                                                                                                                                } else { 
                                                                                                                                    if (strpos(${${"GLOBALS"}["uasigafv"]}, "@g.us") !== false) { 
                                                                                                                                        ${${"GLOBALS"}["txurdvt"]} = " AND msgid = ?"; 
                                                                                                                                    } else { 
                                                                                                                                        ${"GLOBALS"}["yeoskxcmffv"] = "customQuery"; 
                                                                                                                                        ${${"GLOBALS"}["yeoskxcmffv"]} = " AND whatsapp_withccode = ?"; 
                                                                                                                                    } 
                                                                                                                                } 
                                                                                                                                ${${"GLOBALS"}["vnajxvzttek"]} = CTWhatsApp_Record_Model::unreadQuery(); 
                                                                                                                                $fpfljmirmzr = "rows"; 
                                                                                                                                if (${${"GLOBALS"}["pqauoton"]} == 1) { 
                                                                                                                                    $fmytnqamy = "query"; 
                                                                                                                                    $prgqkwcje = "unreadQuery"; 
                                                                                                                                    ${$fmytnqamy} = ${$prgqkwcje} . ${${"GLOBALS"}["txurdvt"]} . ${${"GLOBALS"}["gluytrwnl"]} . " AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Unread' AND vtiger_ctwhatsapp.message_type IN ('Recieved') ORDER BY ctwhatsappid DESC LIMIT 0,1"; 
                                                                                                                                } else { 
                                                                                                                                    if (${${"GLOBALS"}["luqemfbuonpg"]}) { 
                                                                                                                                        ${"GLOBALS"}["ylziwm"] = "customQuery"; 
                                                                                                                                        $pelcdwjdc = "lastMessageID"; 
                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = ${${"GLOBALS"}["vnajxvzttek"]} . ${${"GLOBALS"}["ylziwm"]} . ${${"GLOBALS"}["gluytrwnl"]} . " AND ctwhatsappid > " . ${$pelcdwjdc}; 
                                                                                                                                    } else { 
                                                                                                                                        $lsgyeyxvj = "customQuery"; 
                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = ${${"GLOBALS"}["vnajxvzttek"]} . ${$lsgyeyxvj} . ${${"GLOBALS"}["gluytrwnl"]}; 
                                                                                                                                    } 
                                                                                                                                } 
                                                                                                                                ${$vssjogmtlsl} = $adb->pquery(${${"GLOBALS"}["vvonkioccd"]}, array(${${"GLOBALS"}["uasigafv"]})); 
                                                                                                                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["tcnlxlgnvgd"]}); 
                                                                                                                                ${${"GLOBALS"}["tqcknfzjlyv"]} = ""; 
                                                                                                                                ${$kcrlivtoiw} = array("gif", "jpg", "jpeg", "png", "tiff", "tif"); 
                                                                                                                                ${${"GLOBALS"}["sjsywoia"]} = array("pdf"); 
                                                                                                                                ${${"GLOBALS"}["uwdnuybm"]} = array("txt", "php", "zip", "csv", "https"); 
                                                                                                                                ${${"GLOBALS"}["vetoxtul"]} = array("mp3"); 
                                                                                                                                ${${"GLOBALS"}["hfkrcwhsyio"]} = array("xls"); 
                                                                                                                                ${${"GLOBALS"}["klpprkdlb"]} = array("docx", "doc"); 
                                                                                                                                for (${${"GLOBALS"}["sudxvjiapay"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${$fpfljmirmzr}; ${${"GLOBALS"}["znotvuxlzp"]}++) { 
                                                                                                                                    ${"GLOBALS"}["qxfwzqpm"] = "queryResult"; 
                                                                                                                                    ${"GLOBALS"}["jmwnpgwr"] = "i"; 
                                                                                                                                    $hkjqcjhrc = "replyMessageHTML"; 
                                                                                                                                    ${"GLOBALS"}["nandeei"] = "queryResult"; 
                                                                                                                                    ${"GLOBALS"}["izhiyooxr"] = "queryResult"; 
                                                                                                                                    ${"GLOBALS"}["fruycbx"] = "copyMessage"; 
                                                                                                                                    $irbhdrsutny = "i"; 
                                                                                                                                    $cbuuiaic = "i"; 
                                                                                                                                    ${"GLOBALS"}["dktvfwgh"] = "ctwhatsappId"; 
                                                                                                                                    ${"GLOBALS"}["sbwysuw"] = "queryResult"; 
                                                                                                                                    ${"GLOBALS"}["kxfwioti"] = "i"; 
                                                                                                                                    ${"GLOBALS"}["jbhiinnkwc"] = "queryResult"; 
                                                                                                                                    ${"GLOBALS"}["yymfqsjto"] = "whatsapp_contactid"; 
                                                                                                                                    ${"GLOBALS"}["snumsritvee"] = "messageType"; 
                                                                                                                                    ${$hkjqcjhrc} = ""; 
                                                                                                                                    ${${"GLOBALS"}["fruycbx"]} = ""; 
                                                                                                                                    ${${"GLOBALS"}["rotsotynqf"]} = ""; 
                                                                                                                                    $mpktaemunc = "i"; 
                                                                                                                                    $qfldmfgip = "i"; 
                                                                                                                                    ${"GLOBALS"}["vccglldqrbt"] = "i"; 
                                                                                                                                    ${${"GLOBALS"}["dktvfwgh"]} = $adb->query_result(${${"GLOBALS"}["nandeei"]}, ${${"GLOBALS"}["gjdoju"]}, "ctwhatsappid"); 
                                                                                                                                    $zwoiqhrljw = "individulMessage"; 
                                                                                                                                    ${"GLOBALS"}["gxjtltxhlbmp"] = "queryResult"; 
                                                                                                                                    ${${"GLOBALS"}["ygxjhdsginy"]} = $adb->query_result(${${"GLOBALS"}["gxjtltxhlbmp"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_sendername"); 
                                                                                                                                    $zzvcbjelhf = "isGroup"; 
                                                                                                                                    ${${"GLOBALS"}["snumsritvee"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${$cbuuiaic}, "message_type"); 
                                                                                                                                    ${${"GLOBALS"}["tpdhkjopuz"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${${"GLOBALS"}["kxfwioti"]}, "whatsapp_unreadread"); 
                                                                                                                                    $mfketgkuwt = "messageBody"; 
                                                                                                                                    ${"GLOBALS"}["yhtoqnmdu"] = "quotemessage"; 
                                                                                                                                    $skxzskfsgl = "msgid"; 
                                                                                                                                    $tpdtuis = "urlExt"; 
                                                                                                                                    ${$zzvcbjelhf} = $adb->query_result(${${"GLOBALS"}["sbwysuw"]}, ${$mpktaemunc}, "whatsapp_withccode"); 
                                                                                                                                    ${${"GLOBALS"}["zqlesbolov"]} = $adb->query_result(${${"GLOBALS"}["izhiyooxr"]}, ${${"GLOBALS"}["gjdoju"]}, "your_number"); 
                                                                                                                                    $eivlzmeaixy = "setype"; 
                                                                                                                                    ${${"GLOBALS"}["yhtoqnmdu"]} = $adb->query_result(${${"GLOBALS"}["jbhiinnkwc"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_quotemessage"); 
                                                                                                                                    $luiyudsm = "ctwhatsappId"; 
                                                                                                                                    ${"GLOBALS"}["fogccbqfvm"] = "queryResult"; 
                                                                                                                                    ${${"GLOBALS"}["munkwwkjp"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${$irbhdrsutny}, "message_body"); 
                                                                                                                                    ${${"GLOBALS"}["yymfqsjto"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${${"GLOBALS"}["jmwnpgwr"]}, "whatsapp_contactid"); 
                                                                                                                                    ${$eivlzmeaixy} = VtigerCRMObject::getSEType(${${"GLOBALS"}["uvhhlgtimta"]}); 
                                                                                                                                    $xubmasxqxpv = "createdTime"; 
                                                                                                                                    if (${${"GLOBALS"}["qbwrpdx"]} == "Contacts") { 
                                                                                                                                        ${${"GLOBALS"}["tedfbvmacr"]} = "contact_id=" . ${${"GLOBALS"}["uvhhlgtimta"]} . ""; 
                                                                                                                                    } else { 
                                                                                                                                        ${"GLOBALS"}["lorydmcc"] = "whatsapp_contactid"; 
                                                                                                                                        ${${"GLOBALS"}["tedfbvmacr"]} = "parent_id=" . ${${"GLOBALS"}["lorydmcc"]} . ""; 
                                                                                                                                    } 
                                                                                                                                    ${$skxzskfsgl} = $adb->query_result(${${"GLOBALS"}["qxfwzqpm"]}, ${$qfldmfgip}, "msgid"); 
                                                                                                                                    ${$mfketgkuwt} = nl2br(preg_replace("#\*([^*]+)\*#", "<b>\$1</b>", $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${${"GLOBALS"}["gjdoju"]}, "message_body"))); 
                                                                                                                                    if (${$luiyudsm}) { 
                                                                                                                                        $wrbqysstsx = "messageReadUnRead"; 
                                                                                                                                        ${"GLOBALS"}["jkrchhcjhnyo"] = "messageType"; 
                                                                                                                                        if (${$wrbqysstsx} == "Unread" && ${${"GLOBALS"}["jkrchhcjhnyo"]} == "Recieved") { 
                                                                                                                                            ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["skbammue"]}, "CTWhatsApp"); 
                                                                                                                                            $recordModel->set("mode", "edit"); 
                                                                                                                                            $recordModel->set("id", ${${"GLOBALS"}["skbammue"]}); 
                                                                                                                                            $recordModel->set("whatsapp_unreadread", "Read"); 
                                                                                                                                            $recordModel->save(); 
                                                                                                                                        } 
                                                                                                                                    } 
                                                                                                                                    ${${"GLOBALS"}["abmqrxbgd"]} = CTWhatsApp_Record_Model::getWhatsappTheme(); 
                                                                                                                                    if (${${"GLOBALS"}["abmqrxbgd"]} == "RTL") { 
                                                                                                                                        ${"GLOBALS"}["onidov"] = "taskstyle"; 
                                                                                                                                        ${${"GLOBALS"}["onidov"]} = "style="float: right;width: 20px; !important;cursor: pointer;"";} else { 
                                                                                                                                        ${"GLOBALS"}["pszgiwnnyai"] = "taskstyle"; 
                                                                                                                                        ${${"GLOBALS"}["pszgiwnnyai"]} = "style=\"float: left;width: 20px; !important;cursor: pointer;"";}${$tpdtuis}=pathinfo(${${"GLOBALS"}["khdleq"]},PATHINFO_EXTENSION);if(${${"GLOBALS"}["dgbodklth"]}){$bmmgfoqlaf="mp3Exts";${"GLOBALS"}["nzywevkkngi"] = "urlExt";${"GLOBALS"}["nrbtpyxxye"] = "excelExts";${"GLOBALS"}["psisomlksks"] = "urlExt";${"GLOBALS"}["zzpjntdymr"] = "imgExts";if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["zzpjntdymr"]})) { 
                                                                                                                                            $npedeijlr = "messageBody"; 
                                                                                                                                            ${"GLOBALS"}["qqoepdt"] = "documentBody"; 
                                                                                                                                            ${$npedeijlr} = "<image src=\"" . ${${"GLOBALS"}["khdleq"]} . "\" style=\"height: 60px !important;cursor: pointer;" > ";${"GLOBALS"}["aubnkrjuhjrh"]="whatsAppFileName";${${"GLOBALS"}["aubnkrjuhjrh"]}=CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["qqoepdt"]});}else if(in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["uwdnuybm"]})){${"GLOBALS"}["ymsewyok"]="messageBody";${"GLOBALS"}["fwrgmrrr"] = "messageBody";${${"GLOBALS"}["fwrgmrrr"]} = "<a href="".${${"GLOBALS"}["ymsewyok"]}."" target=\"_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / fileicon . png\"></a>";${${"GLOBALS"}["gbypmoqitnw"]} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["munkwwkjp"]});}else if(in_array(${${"GLOBALS"}["nzywevkkngi"]},${${"GLOBALS"}["sjsywoia"]})){ 
                                                                                                                                                ${"GLOBALS"}["dsfkud"] = "whatsAppFileName"; 
                                                                                                                                                ${"GLOBALS"}["omnlgvhnhi"] = "messageBody"; 
                                                                                                                                                $ysvftbh = "messageBody"; 
                                                                                                                                                ${$ysvftbh} = "<a href=\"" . ${${"GLOBALS"}["omnlgvhnhi"]} . "\" target=\"_black" ><img src = \"layouts/v7/modules/CTWhatsApp/image/pdficon.png\"></a>";${${"GLOBALS"}["dsfkud"]} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["munkwwkjp"]});}else if(in_array(${${"GLOBALS"}["psisomlksks"]},${${"GLOBALS"}["nrbtpyxxye"]})){ 
                                                                                                                                                $ujwegngpmxm = "messageBody"; 
                                                                                                                                                ${"GLOBALS"}["ijvmbipqclu"] = "messageBody"; 
                                                                                                                                                ${$ujwegngpmxm} = "<a href=\"" . ${${"GLOBALS"}["ijvmbipqclu"]} . "" target = \"_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / excelicon . png"></a>";${${"GLOBALS"}["gbypmoqitnw"]} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["munkwwkjp"]});}else if(in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["nsnpqdsvxnm"]})){ 
                                                                                                                                                $crbxjpvj = "whatsAppFileName"; 
                                                                                                                                                ${"GLOBALS"}["quooqhh"] = "documentBody"; 
                                                                                                                                                ${${"GLOBALS"}["khdleq"]} = "<a href=\"" . ${${"GLOBALS"}["khdleq"]} . "" target = \"_black" ><img src = \"layouts/v7/modules/CTWhatsApp/image/wordicon.jpg" ></a > ";${$crbxjpvj}=CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["quooqhh"]});}else if(in_array(${${"GLOBALS"}["dgbodklth"]},${$bmmgfoqlaf})){${"GLOBALS"}["edpcskfwfe"]="messageBody";${"GLOBALS"}["ewlvpcwfrvg"] = "messageBody";$pswwcow = "whatsAppFileName";${${"GLOBALS"}["khdleq"]} = " <audio controls> 
                    <source src=\"" . ${${"GLOBALS"}["edpcskfwfe"]} . "\" type="audio / ogg\"> 
                    <source src=\"" . ${${"GLOBALS"}["ewlvpcwfrvg"]} . "\" type=\"audio/mpeg\"> 
                    Your browser does not support the audio element. 
                    </audio> ";${$pswwcow} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage(${${"GLOBALS"}["munkwwkjp"]});}else{ 
                                                                                                                                                    ${"GLOBALS"}["tyixobthgbbf"] = "whatsAppFileName"; 
                                                                                                                                                    ${${"GLOBALS"}["tyixobthgbbf"]} = ""; 
                                                                                                                                                }${${"GLOBALS"}["wyvtplsqyi"]}="0";}else{$uvgnelssac="messageBody";$hkifgfbhvbhy = "wordlExts";${"GLOBALS"}["mewmexbdl"] = "excelExts";${"GLOBALS"}["hxczyln"] = "urlExt";${"GLOBALS"}["hiexod"] = "individulMessage";$rblvevhuqkcl = "messageBody";${$rblvevhuqkcl} = ${$uvgnelssac};if (${${"GLOBALS"}["hiexod"]} == 1) { 
                                                                                                                                                    ${${"GLOBALS"}["yfpophnmvplb"]} = " "; 
                                                                                                                                                } else { 
                                                                                                                                                    $eejfeaoz = "style"; 
                                                                                                                                                    ${$eejfeaoz} = "style='float: left;width: 15px;margin-right: 10px;'"; 
                                                                                                                                                }$koruzijrsi = "urlExt";${"GLOBALS"}["heigvph"] = "mp3Exts";if (${${"GLOBALS"}["qbwrpdx"]}) { 
                                                                                                                                                    ${"GLOBALS"}["ddvlrfoouau"] = "imgExts"; 
                                                                                                                                                    $fcubvpnx = "urlExt"; 
                                                                                                                                                    $lkkxmcii = "excelExts"; 
                                                                                                                                                    $ilmjkoh = "urlExt"; 
                                                                                                                                                    $jkyglrqupscx = "wordlExts"; 
                                                                                                                                                    $ltpxodsq = "pdfExts"; 
                                                                                                                                                    if (in_array(${$ilmjkoh}, ${${"GLOBALS"}["ddvlrfoouau"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["uwdnuybm"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${$ltpxodsq}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["aylbpwsfj"]}) || in_array(${$fcubvpnx}, ${$lkkxmcii}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${$jkyglrqupscx})) { 
                                                                                                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= ""; 
                                                                                                                                                    } else { 
                                                                                                                                                        $dqyhprhn = "setype"; 
                                                                                                                                                        $xielturfe = "whatsapp_contactid"; 
                                                                                                                                                        if (Users_Privileges_Model::isPermitted(${$dqyhprhn}, "EditView", ${$xielturfe})) { 
                                                                                                                                                            $kvgcekmoc = "setype"; 
                                                                                                                                                            ${${"GLOBALS"}["efhpmbjr"]} = "&nbsp;&nbsp; 
                            <span class='editField'> 
                            <img src='layouts/v7/modules/CTWhatsApp/image/editcontent.png' title='" . vtranslate("LBL_EDITFIELD", "CTWhatsApp") . " " . vtranslate(${${"GLOBALS"}["qbwrpdx"]}, ${${"GLOBALS"}["qbwrpdx"]}) . "' " . ${${"GLOBALS"}["yfpophnmvplb"]} . "><p>'" . vtranslate("LBL_EDITFIELD", "CTWhatsApp") . "" . vtranslate(${$kvgcekmoc}, ${${"GLOBALS"}["qbwrpdx"]}) . "'</p> 
                            </span>"; 
                                                                                                                                                        } 
                                                                                                                                                    } 
                                                                                                                                                }if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["xepcjlvgqdnx"]}) || in_array(${${"GLOBALS"}["hxczyln"]}, ${${"GLOBALS"}["uwdnuybm"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["sjsywoia"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["heigvph"]}) || in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["mewmexbdl"]}) || in_array(${$koruzijrsi}, ${$hkifgfbhvbhy})) { 
                                                                                                                                                    ${${"GLOBALS"}["uqemncnk"]} .= ""; 
                                                                                                                                                    ${${"GLOBALS"}["tkkjmy"]} .= ""; 
                                                                                                                                                } else { 
                                                                                                                                                    ${"GLOBALS"}["qmxeshakwxmq"] = "taskstyle"; 
                                                                                                                                                    ${"GLOBALS"}["kuzvedvor"] = "messageBody"; 
                                                                                                                                                    ${"GLOBALS"}["gkdyvavd"] = "style"; 
                                                                                                                                                    ${"GLOBALS"}["slmjxvlf"] = "copyMessage"; 
                                                                                                                                                    ${"GLOBALS"}["gzqfxetnwuvb"] = "relatedtotask"; 
                                                                                                                                                    if (${${"GLOBALS"}["rnwmobhmmz"]} != "Groups") { 
                                                                                                                                                        ${${"GLOBALS"}["uqemncnk"]} .= "<span class='replyMessageBody' data-replymessage='" . strip_tags(${${"GLOBALS"}["khdleq"]}) . "' data-replymessageid='" . ${${"GLOBALS"}["nhsncmpc"]} . "''> 
                        <img src='layouts/v7/modules/CTWhatsApp/image/reply.png' title=" . vtranslate("LBL_REPLY", "CTWhatsApp") . "' " . ${${"GLOBALS"}["yfpophnmvplb"]} . ">" . vtranslate("LBL_REPLY", "CTWhatsApp") . "' 
                        </span>"; 
                                                                                                                                                    } 
                                                                                                                                                    ${${"GLOBALS"}["slmjxvlf"]} = " 
                    <span class=\"copyMessageBody" data - copymessage = \"" . strip_tags(${${"GLOBALS"}["kuzvedvor"]}) . "\"> 
                    <img " . ${${"GLOBALS"}["gkdyvavd"]} . " src=\"layouts/v7/modules/CTWhatsApp/image/copy.png\" title="".vtranslate("LBL_COPY","CTWhatsApp")."\">" . vtranslate("LBL_COPY", "CTWhatsApp") . " 
                    </span>";$chkrfkl = "messageBody";${${"GLOBALS"}["rotsotynqf"]} = " 
                    <span class="taskMessageBody quickCreateTaskModule" data-task="yes" data-whatsappid="".${${"GLOBALS"}["iststtnnbuli"]}."\"  data-url=\"index.php?module=Calendar&view=QuickCreateAjax&" . ${${"GLOBALS"}["gzqfxetnwuvb"]} . "&description=" . strip_tags(${${"GLOBALS"}["khdleq"]}) . "" data - taskmessage = "" . strip_tags(${$chkrfkl}) . "\"> 
                    <img " . ${${"GLOBALS"}["qmxeshakwxmq"]} . " src="layouts / v7 / modules / CTWhatsApp / image / watch . jpg" title=\"" . vtranslate("LBL_CREATE", "Vtiger") . "" > ".vtranslate("LBL_CREATE","Vtiger")." 
                                                                                                                                                    </span > ";}${"GLOBALS"}["osiqxchdr"]="notReplyWhatsapp";${${"GLOBALS"}["gbypmoqitnw"]}="";${${"GLOBALS"}["osiqxchdr"]}="1";}${$xubmasxqxpv}=Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($adb->query_result(${${"GLOBALS"}["fogccbqfvm"]},${${"GLOBALS"}["vccglldqrbt"]},"whatsapp_datetime"));if(${$zwoiqhrljw}==1){$kkwyiwqyk="whatsAppFileName";${"GLOBALS"}["sihsbbq"] = "whatsappMessageHTML";$ecxmuwlquju = "whatsappMessageHTML";${$ecxmuwlquju} .= "<div class=\"message received" > 
                                                                                                                                                        ".${${"GLOBALS"}["khdleq"]}."<br > ".urldecode(${$kkwyiwqyk})." 
                    <span class=\"metadata\"> 
                <span class=\"time\"><b>" . ${${"GLOBALS"}["zqlesbolov"]} . "</b>&nbsp;&nbsp; " . ${${"GLOBALS"}["kvtrossgvw"]} . "</span>&nbsp";if (${${"GLOBALS"}["tpdhkjopuz"]} == "Unread") { 
                                                                                                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<img src="layouts / v7 / modules / CTWhatsApp / image / unread . png"/>";} else { 
                                                                                                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<img src=\"layouts/v7/modules/CTWhatsApp/image/read.png\"/>"; 
                                                                                                                                                    }${${"GLOBALS"}["sihsbbq"]} .= "</span>&nbsp; 
                </div>";${"GLOBALS"}["colnkx"] = "editFieldHTML";${${"GLOBALS"}["tqcknfzjlyv"]} .= ${${"GLOBALS"}["colnkx"]};}else{ 
                                                                                                                                                        ${"GLOBALS"}["ncmdnaklbs"] = "messageType"; 
                                                                                                                                                        if (${${"GLOBALS"}["ncmdnaklbs"]} == "Send") { 
                                                                                                                                                            $khimhqbsz = "whatsappMessageHTML"; 
                                                                                                                                                            ${"GLOBALS"}["wnoenovyr"] = "whatsappMessageHTML"; 
                                                                                                                                                            ${"GLOBALS"}["ggadrvntqnyi"] = "your_number"; 
                                                                                                                                                            $ugstntuvnyho = "whatsappMessageHTML"; 
                                                                                                                                                            ${${"GLOBALS"}["wnoenovyr"]} .= "<div class=\"sendChat\"> 
                        <div class="col - xs - 12 col - sm - 2 col - md - 2 col - lg - 2"></div> 
                        <div class="col - xs - 12 col - sm - 2 col - md - 2 col - lg - 2\"></div> 
                        <div class="col - xs - 10 col - sm - 8 col - md - 8 col - lg - 8\"> 
                        <div class="mainMessageDiv">";if (${${"GLOBALS"}["wyvtplsqyi"]} != "0") { 
                                                                                                                                                                ${"GLOBALS"}["kdncpawz"] = "copyMessage"; 
                                                                                                                                                                ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="dropdown"> 
                              <div class="dropdown - toggle" id=\"dropdownMenuButton\" data-toggle=\"dropdown" aria - expanded = "true" style = \"float: right !important;" > 
                                <i class=\"fa fa-ellipsis-v icon\" style="width: 8px;margin: 5px;cursor: pointer;"></i> 
                              </div> 
                              <div class="dropdown - menu\" aria-labelledby=\"dropdownMenuButton" > 
                                <div class="dropdownInnerMenu" > 
                                <a > ";$gqobpmszomr="replyMessageHTML";${"GLOBALS"}["cgozcepxgkni"]="whatsappMessageHTML";$babruuelxdq="whatsappMessageHTML";${${"GLOBALS"}["cgozcepxgkni"]}.=${$gqobpmszomr}."";${$babruuelxdq}.=" </a > 
                                <a > ";${"GLOBALS"}["ssixomlrgf"]="whatsappMessageHTML";${${"GLOBALS"}["tqcknfzjlyv"]}.=${${"GLOBALS"}["kdncpawz"]}."";${${"GLOBALS"}["ssixomlrgf"]}.=" </a > 
                                </div > 
                              </div > 
                            </div > ";}${"GLOBALS"}["rkjvkbys"]="quotemessage";${$ugstntuvnyho}.=" < div class="bubble send" data - whatsappid = ".${${"GLOBALS"}["skbammue"]}." > ";$snsongn="messageBody";$fmoqfuv="whatsappMessageHTML";$tjjgrtkldydl="messageReadUnRead";if(${${"GLOBALS"}["rkjvkbys"]}!=""){${${"GLOBALS"}["tqcknfzjlyv"]}.="<div class="sendQuoteMessage\"><p style="word - wrap: break-word;\">" . ${${"GLOBALS"}["neyrneiod"]} . "</p></div>";}if(${${"GLOBALS"}["rnwmobhmmz"]}=="Groups"){${${"GLOBALS"}["tqcknfzjlyv"]}.="<span><b>".${${"GLOBALS"}["ygxjhdsginy"]}."</b></span>";}${$khimhqbsz}.=" < p style = \"word-wrap: break-word;\">" . ${$snsongn} . "<br> " . urldecode(${${"GLOBALS"}["gbypmoqitnw"]}) . " </p> 
                        </div> 
                        </div> 
                        <span class=\"chatTime" style = \"width: chatTime%; !important\"><b>" . ${${"GLOBALS"}["ggadrvntqnyi"]} . "</b> - " . ${${"GLOBALS"}["kvtrossgvw"]} . "";${"GLOBALS"}["jbntkwgv"] = "whatsappMessageHTML";if (${$tjjgrtkldydl} == "Unread") { 
                                                                                                                                                                    $wvctjpp = "whatsappMessageHTML"; 
                                                                                                                                                                    ${$wvctjpp} .= "<img src=\"layouts/v7/modules/CTWhatsApp/image/unread.png" />";}else{${${"GLOBALS"}["tqcknfzjlyv"]}.="<img src="layouts / v7 / modules / CTWhatsApp / image / read . png"/>";}${$fmoqfuv}.=" </span >&nbsp;</div > ";${${"GLOBALS"}["jbntkwgv"]}.="<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2\"> 
                        </div> 
                        </div>";} else { 
                                                                                                                                                                    ${"GLOBALS"}["cflhdumpwygx"] = "ctwhatsappId"; 
                                                                                                                                                                    ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class="replyChat"> 
                        <div class="col - xs - 10 col - sm - 8 col - md - 8 col - lg - 8"> 
                        <div class="bubble reply\" data-whatsappid=" . ${${"GLOBALS"}["cflhdumpwygx"]} . ">";${"GLOBALS"}["myefgvq"] = "whatsappMessageHTML";if (${${"GLOBALS"}["neyrneiod"]} != "") { 
                                                                                                                                                                        ${${"GLOBALS"}["tqcknfzjlyv"]} .= "<div class=\"sendQuoteMessage\"><p style=\"word-wrap: break-word;" > ".${${"GLOBALS"}["neyrneiod"]}."</p ></div > ";}if(${${"GLOBALS"}["rnwmobhmmz"]}=="Groups"){${${"GLOBALS"}["tqcknfzjlyv"]}.="<span><b>".${${"GLOBALS"}["ygxjhdsginy"]}."</b></span>";}$jycnqybxj="isGroup";$fhrcfxmeof="whatsappMessageHTML";${${"GLOBALS"}["tqcknfzjlyv"]}.=" < p>".${${"GLOBALS"}["khdleq"]}." < br> ".urldecode(${${"GLOBALS"}["gbypmoqitnw"]})." </p > 
                    </div > ";${"GLOBALS"}["ugacfohdxrg"]="whatsappMessageHTML";$mmdshemrnd="whatsappMessageHTML";${${"GLOBALS"}["myefgvq"]}.=" < div class="dropdown\" style="display: inline - block !important;margin: 0px 0px 0px 12px;"> 
                              <div class="dropdown - toggle" id="dropdownMenuButton\" data-toggle=\"dropdown\" aria-expanded=\"true\"> 
                                <i class="fa fa - ellipsis - v icon\" style=\"width: 8px;margin: 5px;cursor: pointer;\"></i> 
                              </div> 
                              <div class="dropdown - menu" aria-labelledby="dropdownMenuButton"> 
                              <div class=\"dropdownInnerMenu" > ";$colxxryhqk="messageReadUnRead";$vzcltmx="createdTime";if(${$jycnqybxj}=="Groups"){${"GLOBALS"}["xfozxigwc"]="copyMessage";${${"GLOBALS"}["tqcknfzjlyv"]} .= "<a>" . ${${"GLOBALS"}["xfozxigwc"]} . "</a>";}else{if(${${"GLOBALS"}["wyvtplsqyi"]}!="0"){${"GLOBALS"}["rkbjvbuhti"]="whatsapp_contactid";if (${${"GLOBALS"}["rkbjvbuhti"]}) { 
                                                                                                                                                                            ${"GLOBALS"}["hcatvrtexjs"] = "replyMessageHTML"; 
                                                                                                                                                                            ${"GLOBALS"}["spgqoqihh"] = "createTaskMessage"; 
                                                                                                                                                                            $byyjpcrjv = "whatsappMessageHTML"; 
                                                                                                                                                                            ${"GLOBALS"}["alicqpxabhjk"] = "copyMessage"; 
                                                                                                                                                                            ${$byyjpcrjv} .= "<a>" . ${${"GLOBALS"}["efhpmbjr"]} . "</a><a>" . ${${"GLOBALS"}["hcatvrtexjs"]} . "</a><a>" . ${${"GLOBALS"}["alicqpxabhjk"]} . "</a><a>" . ${${"GLOBALS"}["spgqoqihh"]} . "</a>"; 
                                                                                                                                                                        } else { 
                                                                                                                                                                            ${"GLOBALS"}["yemgxrbbcfu"] = "copyMessage"; 
                                                                                                                                                                            ${"GLOBALS"}["jycwvxfjok"] = "whatsappMessageHTML"; 
                                                                                                                                                                            ${${"GLOBALS"}["jycwvxfjok"]} .= "<a>" . ${${"GLOBALS"}["uqemncnk"]} . "</a><a>" . ${${"GLOBALS"}["yemgxrbbcfu"]} . "</a>"; 
                                                                                                                                                                        }}}${$mmdshemrnd}.=" </div ></div ></div > ";${${"GLOBALS"}["tqcknfzjlyv"]}.="<span class=\"chatTime" style = \"width: 60%; !important" ><b > ".${${"GLOBALS"}["zqlesbolov"]}."</b > -".${$vzcltmx}."";if(${$colxxryhqk}=="Unread"){${${"GLOBALS"}["tqcknfzjlyv"]}.="<img src=\"layouts/v7/modules/CTWhatsApp/image/unread.png"/>";}else{${${"GLOBALS"}["tqcknfzjlyv"]}.="<img src="layouts / v7 / modules / CTWhatsApp / image / read . png\"/>";}${${"GLOBALS"}["ugacfohdxrg"]}.=" </span >&nbsp;</div > ";${$fhrcfxmeof}.="<div class="col-xs-12 col-sm-2 col-md-2 col-lg-2" > 
                    </div > 
                    </div > ";}}}${${"GLOBALS"}["dwjoldseqkql"]}=array("rows"=>${${"GLOBALS"}["iwyngpalekm"]},"whatsappMessageHTML"=>${${"GLOBALS"}["hiefcpqakj"]});return${${"GLOBALS"}["dwjoldseqkql"]};}public function getIndividualMessages($recordId){global$adb,$current_user;$yvlmdafkiymn="rows";${"GLOBALS"}["xzgdtgre"]="userID";${"GLOBALS"}["ubtcjggtsu"]="whatsappMessages";${"GLOBALS"}["tphoenje"]="recordId";$dydiwpbmzgr="setype";${${"GLOBALS"}["xzgdtgre"]}=$current_user->id;${${"GLOBALS"}["gluytrwnl"]}=CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["ifdddjovlmp"]});${${"GLOBALS"}["umshdqrbxhan"]}=CTWhatsApp_Record_Model::unreadQuery();${${"GLOBALS"}["qbwrpdx"]}=VtigerCRMObject::getSEType(${${"GLOBALS"}["tphoenje"]});if(${$dydiwpbmzgr}){${"GLOBALS"}["iuejkepb"]="whatsappQuery";${${"GLOBALS"}["vvonkioccd"]} = ${${"GLOBALS"}["iuejkepb"]} . ${${"GLOBALS"}["gluytrwnl"]} . " AND vtiger_ctwhatsapp.whatsapp_contactid = ? ORDER BY vtiger_ctwhatsapp.whatsapp_datetime ASC";${${"GLOBALS"}["tcnlxlgnvgd"]} = $adb->pquery(${${"GLOBALS"}["vvonkioccd"]}, array(${${"GLOBALS"}["uasigafv"]}));}else{ 
                                                                                                                                                                            ${"GLOBALS"}["oycinesei"] = "query"; 
                                                                                                                                                                            ${"GLOBALS"}["ucbpcjhoxq"] = "recordId"; 
                                                                                                                                                                            ${"GLOBALS"}["owdipiokrd"] = "query"; 
                                                                                                                                                                            ${"GLOBALS"}["crbldogk"] = "recordId"; 
                                                                                                                                                                            ${"GLOBALS"}["oplfrfh"] = "inNumberQuery"; 
                                                                                                                                                                            ${${"GLOBALS"}["ucbpcjhoxq"]} = preg_replace("/[^A-Za-z0-9]/", "", ${${"GLOBALS"}["uasigafv"]}); 
                                                                                                                                                                            ${${"GLOBALS"}["oycinesei"]} = ${${"GLOBALS"}["umshdqrbxhan"]} . ${${"GLOBALS"}["oplfrfh"]} . " AND vtiger_ctwhatsapp.whatsapp_withccode LIKE " % ".${${"GLOBALS"}["crbldogk"]}." % \"";${"GLOBALS"}["mznfclbj"] = "queryResult";${${"GLOBALS"}["mznfclbj"]} = $adb->pquery(${${"GLOBALS"}["owdipiokrd"]}, array());}${"GLOBALS"}["aehnsy"]="rows";${$yvlmdafkiymn}=$adb->num_rows(${${"GLOBALS"}["tcnlxlgnvgd"]});${"GLOBALS"}["dturnuw"]="i";${${"GLOBALS"}["xepcjlvgqdnx"]}=array("gif","jpg","jpeg","png","tiff","tif");${${"GLOBALS"}["sjsywoia"]}=array("pdf");${"GLOBALS"}["mxqlidvqgyl"]="fileExts";${${"GLOBALS"}["mxqlidvqgyl"]}=array("txt","php","zip","csv","https");${${"GLOBALS"}["aylbpwsfj"]}=array("mp3");$injuruvjhyt="i";${${"GLOBALS"}["eoekpbmjlq"]}=array("xls");${${"GLOBALS"}["nsnpqdsvxnm"]}=array("docx","doc");${${"GLOBALS"}["wlipubmfmwq"]}=array();for(${${"GLOBALS"}["dturnuw"]}=0;${$injuruvjhyt}<${${"GLOBALS"}["aehnsy"]};${${"GLOBALS"}["gjdoju"]}++){$kdsseotxjkip="senderName";$cmdkgickjhx = "ctwhatsappId";${"GLOBALS"}["abvxcyyswdk"] = "createdTime";$pwcedbk = "queryResult";${"GLOBALS"}["wwizjicbu"] = "ctwhatsappId";$nxitfjn = "queryResult";$ftptiec = "i";$brgkrhf = "whatsAppFileName";$tkvwbsbr = "messageReadUnRead";${"GLOBALS"}["migbmjlwim"] = "i";${"GLOBALS"}["sprpddc"] = "urlExt";${"GLOBALS"}["iwvxlokom"] = "i";${${"GLOBALS"}["wwizjicbu"]} = $adb->query_result(${$nxitfjn}, ${${"GLOBALS"}["migbmjlwim"]}, "ctwhatsappid");$ywzvhoz = "pdfExts";${${"GLOBALS"}["xeyjsxwn"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${${"GLOBALS"}["gjdoju"]}, "message_type");$rqhxlmp = "createdTime";${"GLOBALS"}["hjtucmvvgs"] = "mp3Exts";${"GLOBALS"}["lwwjpf"] = "queryResult";${"GLOBALS"}["hpzqgdhebm"] = "queryResult";${$kdsseotxjkip} = $adb->query_result(${$pwcedbk}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_sendername");${$tkvwbsbr} = $adb->query_result(${${"GLOBALS"}["lwwjpf"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_unreadread");${"GLOBALS"}["devdfushdml"] = "messageBody";${${"GLOBALS"}["zqlesbolov"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${${"GLOBALS"}["gjdoju"]}, "your_number");${$brgkrhf} = CTWhatsApp_Record_Model::getFilenameWhatsappMessage($adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${$ftptiec}, "message_body"));if (${$cmdkgickjhx}) { 
                                                                                                                                                                            $qegscwrccm = "messageReadUnRead"; 
                                                                                                                                                                            if (${$qegscwrccm} == "Unread" && ${${"GLOBALS"}["xeyjsxwn"]} == "Recieved") { 
                                                                                                                                                                                $scsbgmyd = "ctwhatsappId"; 
                                                                                                                                                                                $jvptmrdtc = "ctwhatsappId"; 
                                                                                                                                                                                ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${$scsbgmyd}, "CTWhatsApp"); 
                                                                                                                                                                                $recordModel->set("mode", "edit"); 
                                                                                                                                                                                $recordModel->set("id", ${$jvptmrdtc}); 
                                                                                                                                                                                $recordModel->set("whatsapp_unreadread", "Read"); 
                                                                                                                                                                                $recordModel->save(); 
                                                                                                                                                                            } 
                                                                                                                                                                        }$uilxjmkudp = "urlExt";${${"GLOBALS"}["khdleq"]} = nl2br(preg_replace("#\*([^*]+)\*#", "<b>\$1</b>", $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, ${${"GLOBALS"}["iwvxlokom"]}, "message_body")));$yqmryo = "fileExts";${"GLOBALS"}["xglysgx"] = "wordlExts";${"GLOBALS"}["ntzsvdp"] = "urlExt";${${"GLOBALS"}["dgbodklth"]} = pathinfo(${${"GLOBALS"}["khdleq"]}, PATHINFO_EXTENSION);${"GLOBALS"}["jtoyzldgsog"] = "whatsappMessages";if (in_array(${${"GLOBALS"}["ntzsvdp"]}, ${${"GLOBALS"}["xepcjlvgqdnx"]})) { 
                                                                                                                                                                            $jdwebgjmrgj = "messageBody"; 
                                                                                                                                                                            ${${"GLOBALS"}["khdleq"]} = "<image src=\"" . ${$jdwebgjmrgj} . "\" style="height: 60px !important;cursor: pointer;\">";} else if (in_array(${$uilxjmkudp}, ${$yqmryo})) { 
                                                                                                                                                                            $xvtbcwk = "messageBody"; 
                                                                                                                                                                            ${$xvtbcwk} = "<a href="".${${"GLOBALS"}["khdleq"]}."" target="_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / fileicon . png"></a>";} else if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${$ywzvhoz})) { 
                                                                                                                                                                            $hpfwsmwy = "messageBody"; 
                                                                                                                                                                            ${$hpfwsmwy} = "<a href=\"" . ${${"GLOBALS"}["khdleq"]} . "\" target=\"_black\"><img src="layouts / v7 / modules / CTWhatsApp / image / pdficon . png\"></a>";} else if (in_array(${${"GLOBALS"}["dgbodklth"]}, ${${"GLOBALS"}["eoekpbmjlq"]})) { 
                                                                                                                                                                            $vqxilmp = "messageBody"; 
                                                                                                                                                                            ${$vqxilmp} = "<a href=\"" . ${${"GLOBALS"}["khdleq"]} . "\" target=\"_black\"><img src=\"layouts/v7/modules/CTWhatsApp/image/excelicon.png" ></a > ";}else if(in_array(${${"GLOBALS"}["sprpddc"]},${${"GLOBALS"}["xglysgx"]})){$okivtmjkucp="messageBody";${${"GLOBALS"}["khdleq"]} = "<a href="".${$okivtmjkucp}."" target=\"_black\"><img src=\"layouts/v7/modules/CTWhatsApp/image/wordicon.jpg\"></a>";}else if(in_array(${${"GLOBALS"}["dgbodklth"]},${${"GLOBALS"}["hjtucmvvgs"]})){ 
                                                                                                                                                                                $iffiwwpklxn = "messageBody"; 
                                                                                                                                                                                ${${"GLOBALS"}["khdleq"]} = " <audio controls> 
                        <source src=\"" . ${${"GLOBALS"}["khdleq"]} . "\" type="audio / ogg"> 
                        <source src="".${$iffiwwpklxn}."" type=\"audio/mpeg\"> 
                      Your browser does not support the audio element. 
                    </audio> ";}else{ 
                                                                                                                                                                                $qivpoywii = "whatsAppFileName"; 
                                                                                                                                                                                ${$qivpoywii} = ""; 
                                                                                                                                                                            }${$rqhxlmp}=Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($adb->query_result(${${"GLOBALS"}["hpzqgdhebm"]},${${"GLOBALS"}["gjdoju"]},"whatsapp_datetime"));${${"GLOBALS"}["jtoyzldgsog"]}[]=array("messageType"=>${${"GLOBALS"}["xeyjsxwn"]},"messageBody"=>${${"GLOBALS"}["devdfushdml"]},"createdTime"=>${${"GLOBALS"}["abvxcyyswdk"]},"senderName"=>${${"GLOBALS"}["ygxjhdsginy"]},"messageReadUnRead"=>${${"GLOBALS"}["tpdhkjopuz"]},"your_number"=>${${"GLOBALS"}["zqlesbolov"]},"whatsAppFileName"=>${${"GLOBALS"}["gbypmoqitnw"]});}return${${"GLOBALS"}["ubtcjggtsu"]};}public function checkCommentModuleEnable($sourceModuleName){$mbpjppyjq="commentRows";$zbnicujxj = "commentRows";$bxrxpkqep = "modCommentQuery";global$adb;${$bxrxpkqep} = $adb->pquery("SELECT * FROM vtiger_tab WHERE name = 'ModComments' AND presence = 0", array());${$mbpjppyjq} = $adb->num_rows(${${"GLOBALS"}["ounsbqlfp"]});if (${$zbnicujxj}) { 
                                                                                                                                                                                ${"GLOBALS"}["uqgicaztp"] = "enableCommentQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["qtjafmoyexlm"] = "sourceModuleName"; 
                                                                                                                                                                                ${${"GLOBALS"}["yvbbbfgojvdw"]} = $adb->query_result(${${"GLOBALS"}["ounsbqlfp"]}, 0, "tabid"); 
                                                                                                                                                                                ${${"GLOBALS"}["udvrxltxjc"]} = getTabid(${${"GLOBALS"}["qtjafmoyexlm"]}); 
                                                                                                                                                                                $afvrpvw = "commentModuleEnable"; 
                                                                                                                                                                                ${${"GLOBALS"}["pdlbzatwp"]} = $adb->pquery("SELECT * FROM vtiger_relatedlists WHERE related_tabid = ? AND tabid = ?", array(${${"GLOBALS"}["yvbbbfgojvdw"]}, ${${"GLOBALS"}["udvrxltxjc"]})); 
                                                                                                                                                                                ${$afvrpvw} = $adb->num_rows(${${"GLOBALS"}["uqgicaztp"]}); 
                                                                                                                                                                            }return ${${"GLOBALS"}["uexfkkt"]};}public function getAllConnectedWhatsappNumber($currentUserID){ 
                                                                                                                                                                                ${"GLOBALS"}["ibbtgpjcb"] = "k"; 
                                                                                                                                                                                ${"GLOBALS"}["oeaugv"] = "mainUserQeury"; 
                                                                                                                                                                                ${"GLOBALS"}["piuxcssjbu"] = "whatsappNumbers"; 
                                                                                                                                                                                $qblxtqnmfpre = "i"; 
                                                                                                                                                                                $ckvxeysgakbr = "mainUserRows"; 
                                                                                                                                                                                ${"GLOBALS"}["vlyiefyajbfp"] = "currentUserID"; 
                                                                                                                                                                                $qswnwnwepm = "query"; 
                                                                                                                                                                                ${"GLOBALS"}["kkbtkfolcos"] = "query"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${"GLOBALS"}["xtxwuqsv"] = "allNumber"; 
                                                                                                                                                                                ${${"GLOBALS"}["kkbtkfolcos"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups"); 
                                                                                                                                                                                ${"GLOBALS"}["zklianmjbhc"] = "queryGetGroupId"; 
                                                                                                                                                                                ${"GLOBALS"}["mcxhhxpioij"] = "k"; 
                                                                                                                                                                                $njrdgxrlk = "i"; 
                                                                                                                                                                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${$qswnwnwepm}); 
                                                                                                                                                                                ${"GLOBALS"}["tjijrbiojh"] = "mainUserRows"; 
                                                                                                                                                                                ${${"GLOBALS"}["piuxcssjbu"]} = array(); 
                                                                                                                                                                                ${"GLOBALS"}["cexkejuprfn"] = "queryGetGroupId"; 
                                                                                                                                                                                for (${${"GLOBALS"}["gjdoju"]} = 0; ${$qblxtqnmfpre} < ${${"GLOBALS"}["iwyngpalekm"]}; ${$njrdgxrlk}++) { 
                                                                                                                                                                                    ${"GLOBALS"}["mhgxsfpqq"] = "multiple_userid"; 
                                                                                                                                                                                    ${"GLOBALS"}["irqwsqo"] = "query"; 
                                                                                                                                                                                    $hktsjqsndkr = "currentUserID"; 
                                                                                                                                                                                    ${${"GLOBALS"}["uciqiaylpdt"]} = explode(",", $adb->query_result(${${"GLOBALS"}["irqwsqo"]}, ${${"GLOBALS"}["gjdoju"]}, "multiple_userid")); 
                                                                                                                                                                                    if (in_array(${$hktsjqsndkr}, ${${"GLOBALS"}["mhgxsfpqq"]})) { 
                                                                                                                                                                                        ${"GLOBALS"}["zekxfhyfnh"] = "userid"; 
                                                                                                                                                                                        $jerfxjgx = "getnumberquery"; 
                                                                                                                                                                                        $renafgkvtc = "query"; 
                                                                                                                                                                                        $mpjhfuh = "getnumberquery"; 
                                                                                                                                                                                        ${"GLOBALS"}["uudsysci"] = "userid"; 
                                                                                                                                                                                        ${${"GLOBALS"}["zekxfhyfnh"]} = $adb->query_result(${$renafgkvtc}, ${${"GLOBALS"}["gjdoju"]}, "userid"); 
                                                                                                                                                                                        ${$jerfxjgx} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${${"GLOBALS"}["uudsysci"]})); 
                                                                                                                                                                                        $koyxroj = "whatsappno"; 
                                                                                                                                                                                        ${"GLOBALS"}["okjddjihdu"] = "whatsappno"; 
                                                                                                                                                                                        ${$koyxroj} = $adb->query_result(${${"GLOBALS"}["rxgmxef"]}, 0, "whatsappno"); 
                                                                                                                                                                                        ${${"GLOBALS"}["nfbxgubd"]} = $adb->query_result(${$mpjhfuh}, 0, "whatsappstatus"); 
                                                                                                                                                                                        if (${${"GLOBALS"}["okjddjihdu"]}) { 
                                                                                                                                                                                            $zwbvasjuljrt = "userid"; 
                                                                                                                                                                                            ${"GLOBALS"}["cbhovlrdh"] = "whatsappno"; 
                                                                                                                                                                                            $pkcicpf = "whatsappNumbers"; 
                                                                                                                                                                                            ${$pkcicpf}[] = array("whatsappno" => ${${"GLOBALS"}["cbhovlrdh"]}, "userid" => ${$zwbvasjuljrt}, "username" => getUserName(${${"GLOBALS"}["pdtrphovwnb"]}), "whatsappstatus" => ${${"GLOBALS"}["nfbxgubd"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["cexkejuprfn"]} = $adb->pquery("SELECT * FROM vtiger_users2group WHERE userid = ?", array(${${"GLOBALS"}["vlyiefyajbfp"]})); 
                                                                                                                                                                                ${${"GLOBALS"}["nfsybl"]} = $adb->num_rows(${${"GLOBALS"}["zklianmjbhc"]}); 
                                                                                                                                                                                for (${${"GLOBALS"}["rwekyhsx"]} = 0; ${${"GLOBALS"}["ibbtgpjcb"]} < ${${"GLOBALS"}["nfsybl"]}; ${${"GLOBALS"}["mcxhhxpioij"]}++) { 
                                                                                                                                                                                    ${"GLOBALS"}["nvkpjqerj"] = "groupid"; 
                                                                                                                                                                                    ${"GLOBALS"}["omyjru"] = "query1"; 
                                                                                                                                                                                    $gjwcykds = "row1"; 
                                                                                                                                                                                    $hikqwpp = "j"; 
                                                                                                                                                                                    ${${"GLOBALS"}["nvkpjqerj"]} = $adb->query_result(${${"GLOBALS"}["vkkcgmyyzxj"]}, ${${"GLOBALS"}["rwekyhsx"]}, "groupid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["rbfzjkduin"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups", array()); 
                                                                                                                                                                                    ${${"GLOBALS"}["lxkmzyceqzfb"]} = $adb->num_rows(${${"GLOBALS"}["omyjru"]}); 
                                                                                                                                                                                    for (${${"GLOBALS"}["ileqdj"]} = 0; ${${"GLOBALS"}["ileqdj"]} < ${$gjwcykds}; ${$hikqwpp}++) { 
                                                                                                                                                                                        ${"GLOBALS"}["bfjhcpxuhbeh"] = "query1"; 
                                                                                                                                                                                        ${"GLOBALS"}["mrakwuw"] = "allUserId"; 
                                                                                                                                                                                        $qqkqdmgmhp = "multiple_userid"; 
                                                                                                                                                                                        ${$qqkqdmgmhp} = $adb->query_result(${${"GLOBALS"}["bfjhcpxuhbeh"]}, ${${"GLOBALS"}["ileqdj"]}, "multiple_userid"); 
                                                                                                                                                                                        ${${"GLOBALS"}["mrakwuw"]} = explode(",", ${${"GLOBALS"}["uciqiaylpdt"]}); 
                                                                                                                                                                                        $gedpves = "allUserId"; 
                                                                                                                                                                                        if (in_array(${${"GLOBALS"}["xsrlvtgkygm"]}, ${$gedpves})) { 
                                                                                                                                                                                            $pbtrxrjy = "getnumberquery"; 
                                                                                                                                                                                            $ifiyfpwhmcf = "getnumberquery"; 
                                                                                                                                                                                            $jnkoeqdoqes = "whatsappstatus"; 
                                                                                                                                                                                            $mbyqgvibi = "getnumberquery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["pdtrphovwnb"]} = $adb->query_result(${${"GLOBALS"}["rbfzjkduin"]}, ${${"GLOBALS"}["ileqdj"]}, "userid"); 
                                                                                                                                                                                            ${$ifiyfpwhmcf} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${${"GLOBALS"}["pdtrphovwnb"]})); 
                                                                                                                                                                                            ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${$pbtrxrjy}, 0, "whatsappno"); 
                                                                                                                                                                                            $ipvuppiv = "whatsappno"; 
                                                                                                                                                                                            ${$jnkoeqdoqes} = $adb->query_result(${$mbyqgvibi}, 0, "whatsappstatus"); 
                                                                                                                                                                                            if (${$ipvuppiv}) { 
                                                                                                                                                                                                ${"GLOBALS"}["kymiufb"] = "whatsappNumbers"; 
                                                                                                                                                                                                ${"GLOBALS"}["vzxfyizfej"] = "userid"; 
                                                                                                                                                                                                ${${"GLOBALS"}["kymiufb"]}[] = array("whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}, "userid" => ${${"GLOBALS"}["pdtrphovwnb"]}, "username" => getUserName(${${"GLOBALS"}["vzxfyizfej"]}), "whatsappstatus" => ${${"GLOBALS"}["nfbxgubd"]}); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["trltfbwwyxn"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups WHERE userid = ?", array(${${"GLOBALS"}["akuldenvfkv"]})); 
                                                                                                                                                                                ${$ckvxeysgakbr} = $adb->num_rows(${${"GLOBALS"}["oeaugv"]}); 
                                                                                                                                                                                if (${${"GLOBALS"}["tjijrbiojh"]} == 1) { 
                                                                                                                                                                                    ${"GLOBALS"}["cnhymwdefy"] = "whatsappno"; 
                                                                                                                                                                                    $glrpkqkwqng = "getnumbesrquery"; 
                                                                                                                                                                                    ${"GLOBALS"}["kdadhhhweq"] = "whatsappstatus"; 
                                                                                                                                                                                    $hgyilkhl = "getnumbesrquery"; 
                                                                                                                                                                                    $drsewk = "currentUserID"; 
                                                                                                                                                                                    ${"GLOBALS"}["upudodpafm"] = "getnumbesrquery"; 
                                                                                                                                                                                    ${$hgyilkhl} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${$drsewk})); 
                                                                                                                                                                                    ${${"GLOBALS"}["cnhymwdefy"]} = $adb->query_result(${${"GLOBALS"}["upudodpafm"]}, 0, "whatsappno"); 
                                                                                                                                                                                    ${${"GLOBALS"}["kdadhhhweq"]} = $adb->query_result(${$glrpkqkwqng}, 0, "whatsappstatus"); 
                                                                                                                                                                                    if (${${"GLOBALS"}["sqwzkrvh"]}) { 
                                                                                                                                                                                        $fdfowww = "currentUserID"; 
                                                                                                                                                                                        ${"GLOBALS"}["nxokixwo"] = "currentUserID"; 
                                                                                                                                                                                        ${${"GLOBALS"}["cfzyari"]}[] = array("whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}, "userid" => ${$fdfowww}, "username" => getUserName(${${"GLOBALS"}["nxokixwo"]}), "whatsappstatus" => ${${"GLOBALS"}["nfbxgubd"]}); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    $cmtpqpt = "getnumbesrQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["dkyxysempyfv"] = "getnumbesrQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["dkyxysempyfv"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration", array()); 
                                                                                                                                                                                    ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${${"GLOBALS"}["uuezoflvl"]}, 0, "whatsappno"); 
                                                                                                                                                                                    ${${"GLOBALS"}["nfbxgubd"]} = $adb->query_result(${$cmtpqpt}, 0, "whatsappstatus"); 
                                                                                                                                                                                    if (${${"GLOBALS"}["sqwzkrvh"]}) { 
                                                                                                                                                                                        $cxhifl = "whatsappstatus"; 
                                                                                                                                                                                        ${"GLOBALS"}["yipzqhgtst"] = "currentUserID"; 
                                                                                                                                                                                        ${"GLOBALS"}["dyhecovvk"] = "whatsappNumbers"; 
                                                                                                                                                                                        ${${"GLOBALS"}["dyhecovvk"]}[] = array("whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}, "userid" => ${${"GLOBALS"}["akuldenvfkv"]}, "username" => getUserName(${${"GLOBALS"}["yipzqhgtst"]}), "whatsappstatus" => ${$cxhifl}); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["onfrhh"]} = CTWhatsApp_Record_Model::getAllConnectedNumber(${${"GLOBALS"}["cfzyari"]}); 
                                                                                                                                                                                return ${${"GLOBALS"}["xtxwuqsv"]}; 
                                                                                                                                                                            }public function getAllUserWhatsappNumber($currentUserID){ 
                                                                                                                                                                                ${"GLOBALS"}["jdspfwis"] = "rows"; 
                                                                                                                                                                                $awqkwlqm = "currentUserID"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${"GLOBALS"}["ddoxrkgufii"] = "i"; 
                                                                                                                                                                                $viraks = "i"; 
                                                                                                                                                                                ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups"); 
                                                                                                                                                                                ${"GLOBALS"}["gehmyisyu"] = "query"; 
                                                                                                                                                                                $xrncfyihhdn = "mainUserQeury"; 
                                                                                                                                                                                ${"GLOBALS"}["dhcujnmveu"] = "mainUserRows"; 
                                                                                                                                                                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["gehmyisyu"]}); 
                                                                                                                                                                                $ngbyewz = "k"; 
                                                                                                                                                                                $oktwmwbzs = "groupRows"; 
                                                                                                                                                                                ${${"GLOBALS"}["cfzyari"]} = array(); 
                                                                                                                                                                                for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["ddoxrkgufii"]} < ${${"GLOBALS"}["jdspfwis"]}; ${$viraks}++) { 
                                                                                                                                                                                    ${"GLOBALS"}["krzutbcycpwe"] = "multiple_userid"; 
                                                                                                                                                                                    ${"GLOBALS"}["pjjfnwwctxxv"] = "query"; 
                                                                                                                                                                                    ${${"GLOBALS"}["krzutbcycpwe"]} = explode(",", $adb->query_result(${${"GLOBALS"}["pjjfnwwctxxv"]}, ${${"GLOBALS"}["gjdoju"]}, "multiple_userid")); 
                                                                                                                                                                                    ${"GLOBALS"}["hdbrrnyvsv"] = "currentUserID"; 
                                                                                                                                                                                    if (in_array(${${"GLOBALS"}["hdbrrnyvsv"]}, ${${"GLOBALS"}["uciqiaylpdt"]})) { 
                                                                                                                                                                                        $uuwksukirh = "query"; 
                                                                                                                                                                                        $dyvtbbsw = "i"; 
                                                                                                                                                                                        ${"GLOBALS"}["vudqzo"] = "whatsappstatus"; 
                                                                                                                                                                                        $jfksodpt = "getnumberquery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["pdtrphovwnb"]} = $adb->query_result(${$uuwksukirh}, ${$dyvtbbsw}, "userid"); 
                                                                                                                                                                                        $intnyjsxph = "getnumberquery"; 
                                                                                                                                                                                        ${$jfksodpt} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ? AND (whatsappstatus = 1 OR whatsappstatus = 2)", array(${${"GLOBALS"}["pdtrphovwnb"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${$intnyjsxph}, 0, "whatsappno"); 
                                                                                                                                                                                        ${${"GLOBALS"}["vudqzo"]} = $adb->query_result(${${"GLOBALS"}["rxgmxef"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                        if (${${"GLOBALS"}["sqwzkrvh"]}) { 
                                                                                                                                                                                            $nuyrguivglu = "whatsappno"; 
                                                                                                                                                                                            $wosqodyjjwp = "userid"; 
                                                                                                                                                                                            $qwtxofdz = "userid"; 
                                                                                                                                                                                            ${${"GLOBALS"}["cfzyari"]}[] = array("whatsappno" => ${$nuyrguivglu}, "userid" => ${$wosqodyjjwp}, "whatsappstatus" => ${${"GLOBALS"}["nfbxgubd"]}, "username" => getUserName(${$qwtxofdz})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["vkkcgmyyzxj"]} = $adb->pquery("SELECT * FROM vtiger_users2group WHERE userid = ?", array(${${"GLOBALS"}["akuldenvfkv"]})); 
                                                                                                                                                                                $xxpvcxtkb = "whatsappNumbers"; 
                                                                                                                                                                                ${$oktwmwbzs} = $adb->num_rows(${${"GLOBALS"}["vkkcgmyyzxj"]}); 
                                                                                                                                                                                for (${${"GLOBALS"}["rwekyhsx"]} = 0; ${${"GLOBALS"}["rwekyhsx"]} < ${${"GLOBALS"}["nfsybl"]}; ${$ngbyewz}++) { 
                                                                                                                                                                                    $rcllqegdrtf = "j"; 
                                                                                                                                                                                    $huzizd = "k"; 
                                                                                                                                                                                    ${"GLOBALS"}["wpqkllc"] = "j"; 
                                                                                                                                                                                    ${"GLOBALS"}["bnonfjghsio"] = "query1"; 
                                                                                                                                                                                    $cfvhnfrlstj = "queryGetGroupId"; 
                                                                                                                                                                                    ${${"GLOBALS"}["xsrlvtgkygm"]} = $adb->query_result(${$cfvhnfrlstj}, ${$huzizd}, "groupid"); 
                                                                                                                                                                                    ${"GLOBALS"}["fyzxelvuqe"] = "query1"; 
                                                                                                                                                                                    ${${"GLOBALS"}["bnonfjghsio"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups", array()); 
                                                                                                                                                                                    ${"GLOBALS"}["pebmjuylbb"] = "j"; 
                                                                                                                                                                                    ${${"GLOBALS"}["lxkmzyceqzfb"]} = $adb->num_rows(${${"GLOBALS"}["fyzxelvuqe"]}); 
                                                                                                                                                                                    for (${$rcllqegdrtf} = 0; ${${"GLOBALS"}["pebmjuylbb"]} < ${${"GLOBALS"}["lxkmzyceqzfb"]}; ${${"GLOBALS"}["wpqkllc"]}++) { 
                                                                                                                                                                                        ${"GLOBALS"}["yugjpov"] = "query1"; 
                                                                                                                                                                                        ${"GLOBALS"}["tckddvv"] = "allUserId"; 
                                                                                                                                                                                        ${"GLOBALS"}["qsqjuivpfue"] = "allUserId"; 
                                                                                                                                                                                        ${${"GLOBALS"}["uciqiaylpdt"]} = $adb->query_result(${${"GLOBALS"}["yugjpov"]}, ${${"GLOBALS"}["ileqdj"]}, "multiple_userid"); 
                                                                                                                                                                                        ${${"GLOBALS"}["tckddvv"]} = explode(",", ${${"GLOBALS"}["uciqiaylpdt"]}); 
                                                                                                                                                                                        if (in_array(${${"GLOBALS"}["xsrlvtgkygm"]}, ${${"GLOBALS"}["qsqjuivpfue"]})) { 
                                                                                                                                                                                            $ehsiiwnlskf = "userid"; 
                                                                                                                                                                                            $pyhprloppy = "whatsappno"; 
                                                                                                                                                                                            $lbcouxkn = "whatsappstatus"; 
                                                                                                                                                                                            $ywmpettfmt = "getnumberquery"; 
                                                                                                                                                                                            ${$ehsiiwnlskf} = $adb->query_result(${${"GLOBALS"}["rbfzjkduin"]}, ${${"GLOBALS"}["ileqdj"]}, "userid"); 
                                                                                                                                                                                            ${$ywmpettfmt} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ? AND (whatsappstatus = 1 OR whatsappstatus = 2)", array(${${"GLOBALS"}["pdtrphovwnb"]})); 
                                                                                                                                                                                            ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${${"GLOBALS"}["rxgmxef"]}, 0, "whatsappno"); 
                                                                                                                                                                                            ${$lbcouxkn} = $adb->query_result(${${"GLOBALS"}["rxgmxef"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                            if (${$pyhprloppy}) { 
                                                                                                                                                                                                $tjjfjoh = "whatsappno"; 
                                                                                                                                                                                                $qlultw = "whatsappNumbers"; 
                                                                                                                                                                                                ${$qlultw}[] = array("whatsappno" => ${$tjjfjoh}, "userid" => ${${"GLOBALS"}["pdtrphovwnb"]}, "whatsappstatus" => ${${"GLOBALS"}["nfbxgubd"]}, "username" => getUserName(${${"GLOBALS"}["pdtrphovwnb"]})); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${$xrncfyihhdn} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups WHERE userid = ?", array(${$awqkwlqm})); 
                                                                                                                                                                                ${"GLOBALS"}["xffnjjpjn"] = "mainUserRows"; 
                                                                                                                                                                                ${${"GLOBALS"}["dhcujnmveu"]} = $adb->num_rows(${${"GLOBALS"}["trltfbwwyxn"]}); 
                                                                                                                                                                                if (${${"GLOBALS"}["xffnjjpjn"]} == 1) { 
                                                                                                                                                                                    $nifjjuyxleax = "getnumbesrquery"; 
                                                                                                                                                                                    $wthjwcnwx = "whatsappno"; 
                                                                                                                                                                                    ${${"GLOBALS"}["rrsoyy"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ? AND (whatsappstatus = 1 OR whatsappstatus = 2)", array(${${"GLOBALS"}["akuldenvfkv"]})); 
                                                                                                                                                                                    ${"GLOBALS"}["ymcbuyv"] = "whatsappstatus"; 
                                                                                                                                                                                    ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${$nifjjuyxleax}, 0, "whatsappno"); 
                                                                                                                                                                                    $wxznqrzipt = "getnumbesrquery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["ymcbuyv"]} = $adb->query_result(${$wxznqrzipt}, 0, "whatsappstatus"); 
                                                                                                                                                                                    if (${$wthjwcnwx}) { 
                                                                                                                                                                                        $xxtvkvspy = "currentUserID"; 
                                                                                                                                                                                        ${"GLOBALS"}["gxxhbjnptn"] = "currentUserID"; 
                                                                                                                                                                                        ${"GLOBALS"}["dnggfjekjmv"] = "whatsappstatus"; 
                                                                                                                                                                                        $lawfus = "whatsappNumbers"; 
                                                                                                                                                                                        ${$lawfus}[] = array("whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}, "userid" => ${$xxtvkvspy}, "whatsappstatus" => ${${"GLOBALS"}["dnggfjekjmv"]}, "username" => getUserName(${${"GLOBALS"}["gxxhbjnptn"]})); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["sqgctgc"] = "getnumbesrQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["uuezoflvl"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE (whatsappstatus = 1 OR whatsappstatus = 2) AND customfield5 = ?", array(${${"GLOBALS"}["akuldenvfkv"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${${"GLOBALS"}["sqgctgc"]}, 0, "whatsappno"); 
                                                                                                                                                                                    ${${"GLOBALS"}["nfbxgubd"]} = $adb->query_result(${${"GLOBALS"}["uuezoflvl"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                    if (${${"GLOBALS"}["sqwzkrvh"]}) { 
                                                                                                                                                                                        ${"GLOBALS"}["ajbbxqpdgb"] = "whatsappNumbers"; 
                                                                                                                                                                                        ${${"GLOBALS"}["ajbbxqpdgb"]}[] = array("whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}, "userid" => ${${"GLOBALS"}["akuldenvfkv"]}, "whatsappstatus" => ${${"GLOBALS"}["nfbxgubd"]}, "username" => getUserName(${${"GLOBALS"}["akuldenvfkv"]})); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["onfrhh"]} = CTWhatsApp_Record_Model::getAllConnectedNumber(${$xxpvcxtkb}); 
                                                                                                                                                                                return ${${"GLOBALS"}["onfrhh"]}; 
                                                                                                                                                                            }public function getAllConnectedNumber($whatsappNumbers){ 
                                                                                                                                                                                $bdnzgfwt = "whatsappAllNumbers"; 
                                                                                                                                                                                ${"GLOBALS"}["uxquhwrwuws"] = "whatsappNumbers"; 
                                                                                                                                                                                ${$bdnzgfwt} = array(); 
                                                                                                                                                                                foreach (${${"GLOBALS"}["uxquhwrwuws"]} as ${${"GLOBALS"}["zwlfaqjdc"]}) { 
                                                                                                                                                                                    $xuethodonmsi = "niddle"; 
                                                                                                                                                                                    ${"GLOBALS"}["birswwolzw"] = "Number"; 
                                                                                                                                                                                    $pilqfmjof = "niddle"; 
                                                                                                                                                                                    ${$xuethodonmsi} = ${${"GLOBALS"}["birswwolzw"]}["whatsappno"]; 
                                                                                                                                                                                    if (array_key_exists(${${"GLOBALS"}["nddbtfeked"]}, ${${"GLOBALS"}["jddbubxcigf"]})) continue; 
                                                                                                                                                                                    $edmywduoh = "whatsappAllNumbers"; 
                                                                                                                                                                                    ${$edmywduoh}[${$pilqfmjof}] = ${${"GLOBALS"}["zwlfaqjdc"]}; 
                                                                                                                                                                                } 
                                                                                                                                                                                return ${${"GLOBALS"}["kkmhzt"]}; 
                                                                                                                                                                            }public function sendIndividulMessage($request){ 
                                                                                                                                                                                $ecsqxux = "moduleName"; 
                                                                                                                                                                                ${"GLOBALS"}["knceuwsm"] = "wptemplateid"; 
                                                                                                                                                                                global $adb, $site_URL, $current_user, $root_directory; 
                                                                                                                                                                                ${"GLOBALS"}["vpnxeqxnnkh"] = "filetype"; 
                                                                                                                                                                                ${$ecsqxux} = $request->getModule(); 
                                                                                                                                                                                $gdbtqqiuvnp = "msgbody"; 
                                                                                                                                                                                ${"GLOBALS"}["eotsuzwhby"] = "filename"; 
                                                                                                                                                                                $dvebhpagkm = "wptemplateid"; 
                                                                                                                                                                                ${${"GLOBALS"}["ejwjdywoqyje"]} = $request->get("whatsappModule"); 
                                                                                                                                                                                ${${"GLOBALS"}["fqjsvba"]} = $request->get("replyMessageId"); 
                                                                                                                                                                                ${${"GLOBALS"}["fesgnwki"]} = $request->get("replymessageText"); 
                                                                                                                                                                                ${${"GLOBALS"}["knceuwsm"]} = $request->get("wptemplateid"); 
                                                                                                                                                                                ${${"GLOBALS"}["pptcebfek"]} = $request->get("whatsappNumber"); 
                                                                                                                                                                                if (${${"GLOBALS"}["ejwjdywoqyje"]} == "Groups") { 
                                                                                                                                                                                    $thnodjwqf = "mobileno"; 
                                                                                                                                                                                    ${$thnodjwqf} = $request->get("mobileno"); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${${"GLOBALS"}["rktciu"]} = preg_replace("/[^A-Za-z0-9]/", "", $request->get("mobileno")); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${$gdbtqqiuvnp} = html_entity_decode($request->get("msgbody")); 
                                                                                                                                                                                ${${"GLOBALS"}["slvojmfmkjt"]} = $request->get("moduleRecordid"); 
                                                                                                                                                                                if (${${"GLOBALS"}["slvojmfmkjt"]} == "") { 
                                                                                                                                                                                    ${${"GLOBALS"}["slvojmfmkjt"]} = $request->get("module_recordid"); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${"GLOBALS"}["mspcebcpkb"] = "base64imagedata"; 
                                                                                                                                                                                ${"GLOBALS"}["sfltcld"] = "whatsappModule"; 
                                                                                                                                                                                ${${"GLOBALS"}["mspcebcpkb"]} = $request->get("base64imagedata"); 
                                                                                                                                                                                ${${"GLOBALS"}["eotsuzwhby"]} = rand() . $request->get("filename"); 
                                                                                                                                                                                ${${"GLOBALS"}["vpnxeqxnnkh"]} = $request->get("filetype"); 
                                                                                                                                                                                ${${"GLOBALS"}["rtephjki"]} = ""; 
                                                                                                                                                                                ${${"GLOBALS"}["hwsypray"]} = date("Y-m-d H:i:s"); 
                                                                                                                                                                                ${${"GLOBALS"}["qckjludy"]} = $current_user->id; 
                                                                                                                                                                                ${"GLOBALS"}["jkmqkro"] = "whatsappStatus"; 
                                                                                                                                                                                if (${${"GLOBALS"}["pptcebfek"]}) { 
                                                                                                                                                                                    $omljqpb = "whatsappNumber"; 
                                                                                                                                                                                    ${"GLOBALS"}["qbjggjzv"] = "getConfigurationDataQuery"; 
                                                                                                                                                                                    $frfmmcl = "whatsaAppRows"; 
                                                                                                                                                                                    ${${"GLOBALS"}["qbjggjzv"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE whatsappno = ?", array(${$omljqpb})); 
                                                                                                                                                                                    ${$frfmmcl} = $adb->num_rows(${${"GLOBALS"}["vpqpofmsg"]}); 
                                                                                                                                                                                    if (${${"GLOBALS"}["yzcofwul"]} == 0) { 
                                                                                                                                                                                        ${"GLOBALS"}["mioflnejvcyp"] = "whatsappNumber"; 
                                                                                                                                                                                        ${"GLOBALS"}["jbwuglxeud"] = "whatsaAppRow"; 
                                                                                                                                                                                        $axrjhyqp = "whatsaAppRow"; 
                                                                                                                                                                                        ${${"GLOBALS"}["csziedxdndf"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE whatsappno = ?", array(${${"GLOBALS"}["mioflnejvcyp"]})); 
                                                                                                                                                                                        ${$axrjhyqp} = $adb->num_rows(${${"GLOBALS"}["csziedxdndf"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["jbwuglxeud"]} == 1) { 
                                                                                                                                                                                            $fieeugc = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${"GLOBALS"}["xkakmjllpf"] = "auth_token"; 
                                                                                                                                                                                            ${"GLOBALS"}["mpviliovlpak"] = "whatsappScanNo"; 
                                                                                                                                                                                            $slfjdmlcwswu = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${"GLOBALS"}["pqyqjpzqcim"] = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${"GLOBALS"}["koxrnwkwujv"] = "api_url"; 
                                                                                                                                                                                            ${${"GLOBALS"}["koxrnwkwujv"]} = $adb->query_result(${${"GLOBALS"}["csziedxdndf"]}, 0, "api_url"); 
                                                                                                                                                                                            $pbguoottb = "customfield1"; 
                                                                                                                                                                                            ${"GLOBALS"}["ivmdtsvbhio"] = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            $enlwcoe = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["xkakmjllpf"]} = $adb->query_result(${$fieeugc}, 0, "auth_token"); 
                                                                                                                                                                                            ${$pbguoottb} = $adb->query_result(${${"GLOBALS"}["ivmdtsvbhio"]}, 0, "customfield1"); 
                                                                                                                                                                                            ${${"GLOBALS"}["mpviliovlpak"]} = $adb->query_result(${$slfjdmlcwswu}, 0, "whatsappno"); 
                                                                                                                                                                                            ${${"GLOBALS"}["ftgrsecllxap"]} = $adb->query_result(${${"GLOBALS"}["pqyqjpzqcim"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                            ${${"GLOBALS"}["bbewdfnpp"]} = $adb->query_result(${$enlwcoe}, 0, "configureUserid"); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $nklawxecc = "getConfigurationDataQuery"; 
                                                                                                                                                                                        $qvmimfef = "getConfigurationDataQuery"; 
                                                                                                                                                                                        $kbsxkqyvihr = "whatsappScanNo"; 
                                                                                                                                                                                        $fcpkcj = "getConfigurationDataQuery"; 
                                                                                                                                                                                        ${"GLOBALS"}["rxxcdi"] = "getConfigurationDataQuery"; 
                                                                                                                                                                                        ${"GLOBALS"}["yqltidnv"] = "auth_token"; 
                                                                                                                                                                                        ${${"GLOBALS"}["mllfgvid"]} = $adb->query_result(${$nklawxecc}, 0, "api_url"); 
                                                                                                                                                                                        $grqdeip = "configureUserid"; 
                                                                                                                                                                                        ${${"GLOBALS"}["yqltidnv"]} = $adb->query_result(${$fcpkcj}, 0, "auth_token"); 
                                                                                                                                                                                        $gwdadaxxeuj = "customfield1"; 
                                                                                                                                                                                        ${$gwdadaxxeuj} = $adb->query_result(${${"GLOBALS"}["rxxcdi"]}, 0, "customfield1"); 
                                                                                                                                                                                        ${$kbsxkqyvihr} = $adb->query_result(${$qvmimfef}, 0, "whatsappno"); 
                                                                                                                                                                                        ${${"GLOBALS"}["ftgrsecllxap"]} = $adb->query_result(${${"GLOBALS"}["vpqpofmsg"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                        ${$grqdeip} = $adb->query_result(${${"GLOBALS"}["vpqpofmsg"]}, 0, "configureUserid"); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["ybpxoarpcw"] = "whatsappScanNo"; 
                                                                                                                                                                                    ${${"GLOBALS"}["zkvahvrdny"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["qckjludy"]}); 
                                                                                                                                                                                    ${"GLOBALS"}["ggojcqlru"] = "auth_token"; 
                                                                                                                                                                                    $nbhrbkjod = "configurationData"; 
                                                                                                                                                                                    ${${"GLOBALS"}["mllfgvid"]} = ${${"GLOBALS"}["zkvahvrdny"]}["api_url"]; 
                                                                                                                                                                                    $cpeobhtlnu = "configureUserid"; 
                                                                                                                                                                                    ${${"GLOBALS"}["ggojcqlru"]} = ${${"GLOBALS"}["zkvahvrdny"]}["authtoken"]; 
                                                                                                                                                                                    ${${"GLOBALS"}["thipsfslsq"]} = ${$nbhrbkjod}["customfield1"]; 
                                                                                                                                                                                    ${${"GLOBALS"}["ybpxoarpcw"]} = ${${"GLOBALS"}["zkvahvrdny"]}["whatsappno"]; 
                                                                                                                                                                                    ${${"GLOBALS"}["ftgrsecllxap"]} = ${${"GLOBALS"}["zkvahvrdny"]}["whatsappstatus"]; 
                                                                                                                                                                                    ${$cpeobhtlnu} = ${${"GLOBALS"}["zkvahvrdny"]}["configureUserid"]; 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["ejwjdywoqyje"]} == "Groups") { 
                                                                                                                                                                                    $nieuydsum = "mobileno"; 
                                                                                                                                                                                    ${$nieuydsum} = $request->get("mobileno"); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["bdctasvlp"] = "mobileno"; 
                                                                                                                                                                                    ${${"GLOBALS"}["rktciu"]} = CTWhatsApp_Module_Model::getMobileNumber(${${"GLOBALS"}["bdctasvlp"]}, ${${"GLOBALS"}["thipsfslsq"]}); 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["rktciu"]}) { 
                                                                                                                                                                                    ${${"GLOBALS"}["wjtwzumc"]} = CTWhatsApp_Record_Model::getWhatsappNumberImportant(${${"GLOBALS"}["rktciu"]}); 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["ygqgebdmgmr"]} != "" || ${$dvebhpagkm} != "") { 
                                                                                                                                                                                    $psmwujzekrq = "month"; 
                                                                                                                                                                                    ${"GLOBALS"}["rrjnzxoekl"] = "day"; 
                                                                                                                                                                                    $abvrsbsvb = "month"; 
                                                                                                                                                                                    ${"GLOBALS"}["kqvwrj"] = "week"; 
                                                                                                                                                                                    ${${"GLOBALS"}["ywwvldxg"]} = "/modules/CTWhatsApp/CTWhatsAppStorage/"; 
                                                                                                                                                                                    ${"GLOBALS"}["xpjkwoe"] = "whatsappFolderPath"; 
                                                                                                                                                                                    $vwauppquqr = "day"; 
                                                                                                                                                                                    ${"GLOBALS"}["nclokyr"] = "week"; 
                                                                                                                                                                                    $rnyweadzkd = "root_directory"; 
                                                                                                                                                                                    ${${"GLOBALS"}["mwaajjd"]} = date("Y"); 
                                                                                                                                                                                    ${$abvrsbsvb} = date("F"); 
                                                                                                                                                                                    ${$vwauppquqr} = date("j"); 
                                                                                                                                                                                    $uurskqm = "day"; 
                                                                                                                                                                                    $jsllivcm = "day"; 
                                                                                                                                                                                    ${${"GLOBALS"}["kqvwrj"]} = ""; 
                                                                                                                                                                                    $tsnerimkt = "week"; 
                                                                                                                                                                                    if (!is_dir(${$rnyweadzkd} . ${${"GLOBALS"}["ywwvldxg"]})) { 
                                                                                                                                                                                        $qordpvxhmqq = "whatsappFolderPath"; 
                                                                                                                                                                                        ${"GLOBALS"}["oeigrjtlm"] = "root_directory"; 
                                                                                                                                                                                        $miglxsttgbpu = "root_directory"; 
                                                                                                                                                                                        mkdir(${${"GLOBALS"}["oeigrjtlm"]} . ${$qordpvxhmqq}); 
                                                                                                                                                                                        chmod(${$miglxsttgbpu} . ${${"GLOBALS"}["ywwvldxg"]}, 0777); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    $rdnmhxgwe = "week"; 
                                                                                                                                                                                    ${"GLOBALS"}["wvoedifa"] = "year"; 
                                                                                                                                                                                    ${"GLOBALS"}["yclrwleuoe"] = "week"; 
                                                                                                                                                                                    if (!is_dir(${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["ywwvldxg"]} . ${${"GLOBALS"}["mwaajjd"]})) { 
                                                                                                                                                                                        $pyhvipqlgh = "root_directory"; 
                                                                                                                                                                                        $mgduqyfcwm = "year"; 
                                                                                                                                                                                        mkdir(${$pyhvipqlgh} . ${${"GLOBALS"}["ywwvldxg"]} . ${$mgduqyfcwm}); 
                                                                                                                                                                                        chmod(${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["ywwvldxg"]} . ${${"GLOBALS"}["mwaajjd"]}, 0777); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (!is_dir(${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["xpjkwoe"]} . ${${"GLOBALS"}["wvoedifa"]} . "/" . ${$psmwujzekrq})) { 
                                                                                                                                                                                        $lzfgttmffig = "whatsappFolderPath"; 
                                                                                                                                                                                        $hswcqxkjjul = "whatsappFolderPath"; 
                                                                                                                                                                                        mkdir(${${"GLOBALS"}["cxqviycuznj"]} . ${$lzfgttmffig} . "$year/$month/"); 
                                                                                                                                                                                        chmod(${${"GLOBALS"}["cxqviycuznj"]} . ${$hswcqxkjjul} . "$year/$month/", 0777); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${"GLOBALS"}["geynfzyebcrv"] = "day"; 
                                                                                                                                                                                    $kbgjnjuoejrg = "whatsappFolderPath"; 
                                                                                                                                                                                    $cykbxpigmbq = "day"; 
                                                                                                                                                                                    if (${$uurskqm} > 0 && ${${"GLOBALS"}["rrjnzxoekl"]} <= 7) ${${"GLOBALS"}["mrzfhft"]} = "week1"; elseif (${${"GLOBALS"}["voorvljxgu"]} > 7 && ${${"GLOBALS"}["geynfzyebcrv"]} <= 14) ${${"GLOBALS"}["nclokyr"]} = "week2"; 
                                                                                                                                                                                    elseif (${$jsllivcm} > 14 && ${${"GLOBALS"}["voorvljxgu"]} <= 21) ${${"GLOBALS"}["yclrwleuoe"]} = "week3"; 
                                                                                                                                                                                    elseif (${${"GLOBALS"}["voorvljxgu"]} > 21 && ${$cykbxpigmbq} <= 28) ${${"GLOBALS"}["mrzfhft"]} = "week4"; 
                                                                                                                                                                                    else${$rdnmhxgwe} = "week5"; 
                                                                                                                                                                                    if (!is_dir(${${"GLOBALS"}["cxqviycuznj"]} . ${$kbgjnjuoejrg} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${${"GLOBALS"}["tbtxdhuxud"]} . "/" . ${$tsnerimkt})) { 
                                                                                                                                                                                        $umgqitkatkq = "root_directory"; 
                                                                                                                                                                                        $dowqogb = "whatsappFolderPath"; 
                                                                                                                                                                                        mkdir(${$umgqitkatkq} . ${${"GLOBALS"}["ywwvldxg"]} . "$year/$month/$week/"); 
                                                                                                                                                                                        chmod(${${"GLOBALS"}["cxqviycuznj"]} . ${$dowqogb} . "$year/$month/$week/", 0777); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["ubaxkaskezcj"]}) { 
                                                                                                                                                                                    $nnjiwlhzeskg = "postfields"; 
                                                                                                                                                                                    ${"GLOBALS"}["xqqtgslrjz"] = "isTemplates"; 
                                                                                                                                                                                    ${"GLOBALS"}["thyywfwyhvm"] = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["etedhwm"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapptemplates 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid 
                INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.crmid = vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid 
                INNER JOIN vtiger_attachments ON vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid 
                WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid = ?", array(${${"GLOBALS"}["ubaxkaskezcj"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["wpbkdifrnt"]} = $adb->num_rows(${${"GLOBALS"}["thyywfwyhvm"]}); 
                                                                                                                                                                                    if (${${"GLOBALS"}["xqqtgslrjz"]}) { 
                                                                                                                                                                                        ${"GLOBALS"}["xmxhpj"] = "templatesID"; 
                                                                                                                                                                                        $pmqaycqmvo = "newfileURL"; 
                                                                                                                                                                                        $djlombqjb = "root_directory"; 
                                                                                                                                                                                        $ydcsfeqdl = "imageName"; 
                                                                                                                                                                                        ${"GLOBALS"}["rmkhffcov"] = "wptemplateImage"; 
                                                                                                                                                                                        ${"GLOBALS"}["ldfsngoxucd"] = "imageId"; 
                                                                                                                                                                                        $ippwaikugz = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                        $geqiups = "whatsappFolderPath"; 
                                                                                                                                                                                        $vgmvtgrh = "attachmentPath"; 
                                                                                                                                                                                        $smhfywzsfb = "imageId"; 
                                                                                                                                                                                        ${"GLOBALS"}["wmoxgzopp"] = "moduleRecordid"; 
                                                                                                                                                                                        ${"GLOBALS"}["nlmpzyi"] = "templateMsg"; 
                                                                                                                                                                                        $ugchonl = "newFilename"; 
                                                                                                                                                                                        ${"GLOBALS"}["ukxxsbxiijiu"] = "newFilename"; 
                                                                                                                                                                                        ${"GLOBALS"}["iqhekxnspri"] = "newFilename"; 
                                                                                                                                                                                        ${${"GLOBALS"}["xmxhpj"]} = $adb->query_result(${${"GLOBALS"}["etedhwm"]}, 0, "ctwhatsapptemplatesid"); 
                                                                                                                                                                                        $rafkvvl = "imageName"; 
                                                                                                                                                                                        $xmbhknhqjnp = "imageId"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nlmpzyi"]} = $adb->query_result(${${"GLOBALS"}["etedhwm"]}, 0, "wptemplate_text"); 
                                                                                                                                                                                        ${${"GLOBALS"}["rmkhffcov"]} = $adb->query_result(${$ippwaikugz}, 0, "storedname"); 
                                                                                                                                                                                        $gbwisyqlhvg = "imageName"; 
                                                                                                                                                                                        $qpesljh = "templatesID"; 
                                                                                                                                                                                        ${"GLOBALS"}["nwrhyci"] = "imageId"; 
                                                                                                                                                                                        ${"GLOBALS"}["tmcinpdu"] = "getAttachmentQuery"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["wmoxgzopp"]}) { 
                                                                                                                                                                                            ${"GLOBALS"}["qwwbqoqkjcr"] = "bodydata"; 
                                                                                                                                                                                            ${"GLOBALS"}["ckmonkjdko"] = "setype"; 
                                                                                                                                                                                            $qjiibkmoj = "msgbody"; 
                                                                                                                                                                                            $nrpoylwjoewb = "setype"; 
                                                                                                                                                                                            ${"GLOBALS"}["tbeimyuqiqq"] = "templateMsg"; 
                                                                                                                                                                                            $krpjlhacnssi = "moduleRecordid"; 
                                                                                                                                                                                            $tsegqhycsv = "bodydata"; 
                                                                                                                                                                                            ${"GLOBALS"}["ibjgtsni"] = "moduleRecordid"; 
                                                                                                                                                                                            ${${"GLOBALS"}["qwwbqoqkjcr"]} = str_replace(" 

", " ", html_entity_decode(${${"GLOBALS"}["tbeimyuqiqq"]})); 
                                                                                                                                                                                            ${${"GLOBALS"}["ckmonkjdko"]} = VtigerCRMObject::getSEType(${$krpjlhacnssi}); 
                                                                                                                                                                                            ${$qjiibkmoj} = getMergedDescription(${$tsegqhycsv}, ${${"GLOBALS"}["ibjgtsni"]}, ${$nrpoylwjoewb}); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $vkjtacirbl = "msgbody"; 
                                                                                                                                                                                            ${$vkjtacirbl} = str_replace(" 

", " ", html_entity_decode(${${"GLOBALS"}["ponhglqx"]})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${${"GLOBALS"}["bhstjsz"]} = $adb->pquery("SELECT vtiger_attachments.*, vtiger_crmentity.setype FROM vtiger_attachments 
                    INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid 
                    INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_attachments.attachmentsid 
                    WHERE vtiger_seattachmentsrel.crmid = ? AND vtiger_crmentity.deleted = 0", array(${$qpesljh})); 
                                                                                                                                                                                        $cypjljktjxdm = "root_directory"; 
                                                                                                                                                                                        $lnoisoilpgb = "msgbody"; 
                                                                                                                                                                                        $ipdtnvyfq = "imageName"; 
                                                                                                                                                                                        ${${"GLOBALS"}["ldfsngoxucd"]} = $adb->query_result(${${"GLOBALS"}["tmcinpdu"]}, 0, "attachmentsid"); 
                                                                                                                                                                                        ${${"GLOBALS"}["decvtdm"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "path"); 
                                                                                                                                                                                        ${$ipdtnvyfq} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "storedname"); 
                                                                                                                                                                                        ${${"GLOBALS"}["qmjevrnkl"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "type"); 
                                                                                                                                                                                        $dykfhk = "filetype"; 
                                                                                                                                                                                        ${${"GLOBALS"}["gokdzxl"]} = ${$cypjljktjxdm} . ${${"GLOBALS"}["decvtdm"]} . ${$smhfywzsfb} . "_" . ${$ydcsfeqdl}; 
                                                                                                                                                                                        ${${"GLOBALS"}["zpeweavmer"]} = ${$djlombqjb} . ${${"GLOBALS"}["ywwvldxg"]} . "$year/$month/$week/" . ${${"GLOBALS"}["nwrhyci"]} . "_" . ${$gbwisyqlhvg}; 
                                                                                                                                                                                        copy(${$vgmvtgrh}, ${${"GLOBALS"}["zpeweavmer"]}); 
                                                                                                                                                                                        $wcxfoky = "newFilename"; 
                                                                                                                                                                                        ${$ugchonl} = urlencode(${${"GLOBALS"}["ytvwtwpbrom"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["dcubejq"]} = str_replace("+", "%20", ${${"GLOBALS"}["ukxxsbxiijiu"]}); 
                                                                                                                                                                                        ${$wcxfoky} = str_replace("_", "%5F", ${${"GLOBALS"}["dcubejq"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["sdhmmfrmsfl"] = "newFilename"; 
                                                                                                                                                                                        ${"GLOBALS"}["izgmpwfuuxk"] = "newBodyfileURL"; 
                                                                                                                                                                                        ${${"GLOBALS"}["dcubejq"]} = str_replace(".", "%2E", ${${"GLOBALS"}["dcubejq"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["iqhekxnspri"]} = str_replace("-", "%2D", ${${"GLOBALS"}["dcubejq"]}); 
                                                                                                                                                                                        ${$pmqaycqmvo} = ${${"GLOBALS"}["lxlelvdmc"]} . ${$geqiups} . "$year/$month/$week/" . ${${"GLOBALS"}["jqctqnhxcqm"]} . "_" . ${${"GLOBALS"}["sdhmmfrmsfl"]}; 
                                                                                                                                                                                        ${${"GLOBALS"}["izgmpwfuuxk"]} = ${${"GLOBALS"}["lxlelvdmc"]} . ${${"GLOBALS"}["ywwvldxg"]} . "$year/$month/$week/" . ${$xmbhknhqjnp} . "_" . ${$rafkvvl}; 
                                                                                                                                                                                        if (${$lnoisoilpgb} == "") { 
                                                                                                                                                                                            ${${"GLOBALS"}["kyyrgwf"]} = ${${"GLOBALS"}["zixhtju"]}; 
                                                                                                                                                                                        } 
                                                                                                                                                                                        if (${$dykfhk}) { 
                                                                                                                                                                                            $yjhxymdhean = "filetype"; 
                                                                                                                                                                                            if (${${"GLOBALS"}["qmjevrnkl"]} == "image/jpeg" || ${${"GLOBALS"}["qmjevrnkl"]} == "image/jpg" || ${${"GLOBALS"}["qmjevrnkl"]} == "image/png") { 
                                                                                                                                                                                                ${"GLOBALS"}["wqmsyprk"] = "mobileno"; 
                                                                                                                                                                                                ${"GLOBALS"}["qwipnj"] = "url"; 
                                                                                                                                                                                                ${"GLOBALS"}["bnscrerhx"] = "api_url"; 
                                                                                                                                                                                                $cbegjvwkl = "msgbody"; 
                                                                                                                                                                                                ${${"GLOBALS"}["qwipnj"]} = ${${"GLOBALS"}["bnscrerhx"]} . "/sendfileurl"; 
                                                                                                                                                                                                ${${"GLOBALS"}["ugmgdme"]} = array("number" => ${${"GLOBALS"}["wqmsyprk"]}, "url" => ${${"GLOBALS"}["zixhtju"]}, "filetype" => "imageMessage", "caption" => ${$cbegjvwkl}); 
                                                                                                                                                                                            } else if (${$yjhxymdhean} == "image/gif") { 
                                                                                                                                                                                                ${"GLOBALS"}["xfedvtyxps"] = "postfields"; 
                                                                                                                                                                                                $lwukhvbllx = "msgbody"; 
                                                                                                                                                                                                $qpotlgwguo = "newfileURL"; 
                                                                                                                                                                                                ${${"GLOBALS"}["txcrcgffe"]} = ${${"GLOBALS"}["mllfgvid"]} . "/sendfileurl"; 
                                                                                                                                                                                                ${${"GLOBALS"}["xfedvtyxps"]} = array("number" => ${${"GLOBALS"}["rktciu"]}, "url" => ${$qpotlgwguo}, "filetype" => "gifMessage", "caption" => ${$lwukhvbllx}); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $qiymewh = "msgbody"; 
                                                                                                                                                                                        $huiqclcc = "postfields"; 
                                                                                                                                                                                        ${${"GLOBALS"}["txcrcgffe"]} = ${${"GLOBALS"}["mllfgvid"]} . "/send"; 
                                                                                                                                                                                        ${$huiqclcc} = array("number" => ${${"GLOBALS"}["rktciu"]}, "msg" => ${$qiymewh}); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (${$nnjiwlhzeskg}["caption"]) { 
                                                                                                                                                                                        ${${"GLOBALS"}["yxemjq"]} = 2; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $xjosfr = "count"; 
                                                                                                                                                                                        ${$xjosfr} = 1; 
                                                                                                                                                                                    } 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["ocqcdutie"] = "base64imagedata"; 
                                                                                                                                                                                    $ajhxepjukpms = "fileURL"; 
                                                                                                                                                                                    ${"GLOBALS"}["gxowhhmibrt"] = "whatsappModule"; 
                                                                                                                                                                                    if (${${"GLOBALS"}["ocqcdutie"]} != "") { 
                                                                                                                                                                                        $fjxvssttxu = "week"; 
                                                                                                                                                                                        $xiieniugwt = "root_directory"; 
                                                                                                                                                                                        ${"GLOBALS"}["qobdrcdcklh"] = "year"; 
                                                                                                                                                                                        $ceuducr = "base64imagedata"; 
                                                                                                                                                                                        ${"GLOBALS"}["jcwvstmwy"] = "filepath"; 
                                                                                                                                                                                        ${"GLOBALS"}["kvfhqphiah"] = "week"; 
                                                                                                                                                                                        $bnjpykmgge = "day"; 
                                                                                                                                                                                        ${"GLOBALS"}["oodvwket"] = "newBodyfileURL"; 
                                                                                                                                                                                        ${"GLOBALS"}["bcwaror"] = "week"; 
                                                                                                                                                                                        ${"GLOBALS"}["vfmamsc"] = "newFilename"; 
                                                                                                                                                                                        $yetynpxj = "week"; 
                                                                                                                                                                                        ${${"GLOBALS"}["bdiwarmohkx"]} = "storage"; 
                                                                                                                                                                                        ${"GLOBALS"}["crmphtd"] = "filepath"; 
                                                                                                                                                                                        $minfcjofj = "day"; 
                                                                                                                                                                                        ${${"GLOBALS"}["ijgrimbqb"]} = "storage/"; 
                                                                                                                                                                                        $ftmhtrm = "newFilename"; 
                                                                                                                                                                                        ${"GLOBALS"}["hypccsvn"] = "month"; 
                                                                                                                                                                                        $nsxavsgeby = "month"; 
                                                                                                                                                                                        ${${"GLOBALS"}["qobdrcdcklh"]} = date("Y"); 
                                                                                                                                                                                        ${"GLOBALS"}["hysvrkoizoi"] = "week"; 
                                                                                                                                                                                        $whfjlmihb = "day"; 
                                                                                                                                                                                        ${"GLOBALS"}["vdenqkkjf"] = "week"; 
                                                                                                                                                                                        $ecwicwlpmqy = "oldfile"; 
                                                                                                                                                                                        ${"GLOBALS"}["fjywsbyva"] = "base64imagedata"; 
                                                                                                                                                                                        $ffnmvfsiwty = "week"; 
                                                                                                                                                                                        $duuepihzmnn = "root_directory"; 
                                                                                                                                                                                        $ymnvnautek = "filename"; 
                                                                                                                                                                                        ${${"GLOBALS"}["tbtxdhuxud"]} = date("F"); 
                                                                                                                                                                                        ${"GLOBALS"}["bvgrtxzfhy"] = "month"; 
                                                                                                                                                                                        $egtiuvg = "base64imagedata"; 
                                                                                                                                                                                        ${"GLOBALS"}["lxyuyrqdcr"] = "root_directory"; 
                                                                                                                                                                                        $cytuhctlkv = "target_file"; 
                                                                                                                                                                                        ${$bnjpykmgge} = date("j"); 
                                                                                                                                                                                        ${$ffnmvfsiwty} = ""; 
                                                                                                                                                                                        ${"GLOBALS"}["lbrnuiqlk"] = "newFilename"; 
                                                                                                                                                                                        if (!is_dir(${$duuepihzmnn} . ${${"GLOBALS"}["crmphtd"]} . ${${"GLOBALS"}["mwaajjd"]})) { 
                                                                                                                                                                                            $sumqwuwfou = "root_directory"; 
                                                                                                                                                                                            $ovheoahi = "filepath"; 
                                                                                                                                                                                            $gqggmjkj = "year"; 
                                                                                                                                                                                            mkdir(${${"GLOBALS"}["cxqviycuznj"]} . ${$ovheoahi} . ${${"GLOBALS"}["mwaajjd"]}); 
                                                                                                                                                                                            chmod(${$sumqwuwfou} . ${${"GLOBALS"}["ijgrimbqb"]} . ${$gqggmjkj}, 0777); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $ptksusfgsn = "whatsappFolderPath"; 
                                                                                                                                                                                        $ykxfwylsl = "week"; 
                                                                                                                                                                                        ${"GLOBALS"}["ppjmdl"] = "oldfile"; 
                                                                                                                                                                                        ${"GLOBALS"}["ffuthxsxe"] = "filename"; 
                                                                                                                                                                                        if (!is_dir(${${"GLOBALS"}["lxyuyrqdcr"]} . ${${"GLOBALS"}["ijgrimbqb"]} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${${"GLOBALS"}["hypccsvn"]})) { 
                                                                                                                                                                                            $ustydrcvbv = "root_directory"; 
                                                                                                                                                                                            mkdir(${$ustydrcvbv} . ${${"GLOBALS"}["ijgrimbqb"]} . "$year/$month"); 
                                                                                                                                                                                            chmod(${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["ijgrimbqb"]} . "$year/$month", 0777); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${"GLOBALS"}["bqqnyhk"] = "day"; 
                                                                                                                                                                                        $yuiioqxqg = "fileURL"; 
                                                                                                                                                                                        ${"GLOBALS"}["etjjobacc"] = "root_directory"; 
                                                                                                                                                                                        ${"GLOBALS"}["ljlhge"] = "base64imagedata"; 
                                                                                                                                                                                        ${"GLOBALS"}["ltoplirt"] = "filemove"; 
                                                                                                                                                                                        ${"GLOBALS"}["kstwqletj"] = "newFilename"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["bqqnyhk"]} > 0 && ${${"GLOBALS"}["voorvljxgu"]} <= 7) ${$ykxfwylsl} = "week1"; elseif (${${"GLOBALS"}["voorvljxgu"]} > 7 && ${${"GLOBALS"}["voorvljxgu"]} <= 14) ${$fjxvssttxu} = "week2"; 
                                                                                                                                                                                        elseif (${$minfcjofj} > 14 && ${$whfjlmihb} <= 21) ${${"GLOBALS"}["hysvrkoizoi"]} = "week3"; 
                                                                                                                                                                                        elseif (${${"GLOBALS"}["voorvljxgu"]} > 21 && ${${"GLOBALS"}["voorvljxgu"]} <= 28) ${${"GLOBALS"}["mrzfhft"]} = "week4"; 
                                                                                                                                                                                        else${${"GLOBALS"}["mrzfhft"]} = "week5"; 
                                                                                                                                                                                        if (!is_dir(${${"GLOBALS"}["etjjobacc"]} . ${${"GLOBALS"}["ijgrimbqb"]} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${$nsxavsgeby} . "/" . ${$yetynpxj})) { 
                                                                                                                                                                                            ${"GLOBALS"}["zuenfpdiuff"] = "root_directory"; 
                                                                                                                                                                                            $bnqmavv = "root_directory"; 
                                                                                                                                                                                            mkdir(${${"GLOBALS"}["zuenfpdiuff"]} . ${${"GLOBALS"}["ijgrimbqb"]} . "$year/$month/$week"); 
                                                                                                                                                                                            chmod(${$bnqmavv} . ${${"GLOBALS"}["ijgrimbqb"]} . "$year/$month/$week", 0777); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${"GLOBALS"}["bqpxbs"] = "filename"; 
                                                                                                                                                                                        ${${"GLOBALS"}["oxmieksvyt"]} = ${$xiieniugwt} . ${${"GLOBALS"}["jcwvstmwy"]} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${${"GLOBALS"}["tbtxdhuxud"]} . "/" . ${${"GLOBALS"}["vdenqkkjf"]} . "/"; 
                                                                                                                                                                                        list(${${"GLOBALS"}["kynysnuizs"]}, ${${"GLOBALS"}["fjywsbyva"]}) = explode(";", ${${"GLOBALS"}["ygqgebdmgmr"]}); 
                                                                                                                                                                                        list(, ${$egtiuvg}) = explode(",", ${${"GLOBALS"}["ygqgebdmgmr"]}); 
                                                                                                                                                                                        ${$ceuducr} = base64_decode(${${"GLOBALS"}["ljlhge"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["ltoplirt"]} = file_put_contents(${$cytuhctlkv} . ${${"GLOBALS"}["ffuthxsxe"]}, ${${"GLOBALS"}["ygqgebdmgmr"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["sehxrvixyyr"] = "filename"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["kcxtvv"]}) { 
                                                                                                                                                                                            ${"GLOBALS"}["hagsdy"] = "sql2"; 
                                                                                                                                                                                            ${"GLOBALS"}["hthkvrdz"] = "date_var"; 
                                                                                                                                                                                            ${"GLOBALS"}["tehsamm"] = "Document"; 
                                                                                                                                                                                            ${${"GLOBALS"}["tehsamm"]} = Vtiger_Record_Model::getCleanInstance("Documents"); 
                                                                                                                                                                                            $Document->set("mode", ""); 
                                                                                                                                                                                            $Document->set("assigned_user_id", $current_user->id); 
                                                                                                                                                                                            ${"GLOBALS"}["ntxvugon"] = "date_var"; 
                                                                                                                                                                                            $xlnbwcsp = "filename"; 
                                                                                                                                                                                            ${"GLOBALS"}["etrbrlsdph"] = "result"; 
                                                                                                                                                                                            $Document->set("folderid", 1); 
                                                                                                                                                                                            $yfadsylest = "target_file"; 
                                                                                                                                                                                            ${"GLOBALS"}["vuwjlhcosdcf"] = "current_id"; 
                                                                                                                                                                                            $bizenfuvih = "params2"; 
                                                                                                                                                                                            $Document->set("filelocationtype", "I"); 
                                                                                                                                                                                            $gghwvgfmhpw = "current_id"; 
                                                                                                                                                                                            ${"GLOBALS"}["egsxqs"] = "current_id"; 
                                                                                                                                                                                            $Document->set("filestatus", 1); 
                                                                                                                                                                                            $Document->set("filename", ${$xlnbwcsp}); 
                                                                                                                                                                                            $Document->save(); 
                                                                                                                                                                                            $xjwkconmj = "sql1"; 
                                                                                                                                                                                            $gxheixep = "target_file"; 
                                                                                                                                                                                            ${${"GLOBALS"}["heogytv"]} = $Document->getId(); 
                                                                                                                                                                                            $fwvxbzl = "filename"; 
                                                                                                                                                                                            ${$gghwvgfmhpw} = $adb->getUniqueID("vtiger_crmentity"); 
                                                                                                                                                                                            $tkixpopkkl = "params1"; 
                                                                                                                                                                                            ${$xjwkconmj} = "insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values(?, ?, ?, ?, ?, ?, ?)"; 
                                                                                                                                                                                            ${$tkixpopkkl} = array(${${"GLOBALS"}["egsxqs"]}, $current_user->id, 1, "Documents Attachment", "", $adb->formatDate(${${"GLOBALS"}["ntxvugon"]}, true), $adb->formatDate(${${"GLOBALS"}["hthkvrdz"]}, true)); 
                                                                                                                                                                                            $adb->pquery(${${"GLOBALS"}["pmnype"]}, ${${"GLOBALS"}["smnnqypl"]}); 
                                                                                                                                                                                            rename(${${"GLOBALS"}["oxmieksvyt"]} . ${${"GLOBALS"}["bdwnljcjh"]}, ${$gxheixep} . ${${"GLOBALS"}["vuwjlhcosdcf"]} . "_" . ${$fwvxbzl}); 
                                                                                                                                                                                            chmod(${$yfadsylest}, 0777); 
                                                                                                                                                                                            ${${"GLOBALS"}["xdxvgbftn"]} = "insert into vtiger_attachments(attachmentsid, name, description, type, path) values(?, ?, ?, ?, ?)"; 
                                                                                                                                                                                            $rusciduoyr = "current_id"; 
                                                                                                                                                                                            ${${"GLOBALS"}["ivhgqfowqc"]} = array(${${"GLOBALS"}["pgqtuwiqnd"]}, ${${"GLOBALS"}["bdwnljcjh"]}, "", "", ${${"GLOBALS"}["ijgrimbqb"]} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${${"GLOBALS"}["tbtxdhuxud"]} . "/" . ${${"GLOBALS"}["mrzfhft"]} . "/"); 
                                                                                                                                                                                            ${${"GLOBALS"}["etrbrlsdph"]} = $adb->pquery(${${"GLOBALS"}["hagsdy"]}, ${$bizenfuvih}); 
                                                                                                                                                                                            ${${"GLOBALS"}["dhzuigiyw"]} = "insert into vtiger_seattachmentsrel values(?,?)"; 
                                                                                                                                                                                            ${"GLOBALS"}["efnrlop"] = "moduleRecordid"; 
                                                                                                                                                                                            $adb->pquery(${${"GLOBALS"}["dhzuigiyw"]}, array(${${"GLOBALS"}["heogytv"]}, ${$rusciduoyr})); 
                                                                                                                                                                                            ${${"GLOBALS"}["goeoppnm"]} = "insert into vtiger_senotesrel values(?,?)"; 
                                                                                                                                                                                            $adb->pquery(${${"GLOBALS"}["goeoppnm"]}, array(${${"GLOBALS"}["efnrlop"]}, ${${"GLOBALS"}["heogytv"]})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${$yuiioqxqg} = ${${"GLOBALS"}["lxlelvdmc"]} . ${${"GLOBALS"}["ijgrimbqb"]} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${${"GLOBALS"}["bvgrtxzfhy"]} . "/" . ${${"GLOBALS"}["kvfhqphiah"]} . "/" . ${${"GLOBALS"}["pgqtuwiqnd"]} . "_" . ${${"GLOBALS"}["bdwnljcjh"]}; 
                                                                                                                                                                                        ${$ecwicwlpmqy} = ${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["ijgrimbqb"]} . ${${"GLOBALS"}["mwaajjd"]} . "/" . ${${"GLOBALS"}["tbtxdhuxud"]} . "/" . ${${"GLOBALS"}["bcwaror"]} . "/" . ${${"GLOBALS"}["pgqtuwiqnd"]} . "_" . ${${"GLOBALS"}["bdwnljcjh"]}; 
                                                                                                                                                                                        ${${"GLOBALS"}["bdwnljcjh"]} = str_replace(" ", "", ${${"GLOBALS"}["bdwnljcjh"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["zpeweavmer"]} = ${${"GLOBALS"}["cxqviycuznj"]} . ${$ptksusfgsn} . "$year/$month/$week/" . ${$ymnvnautek}; 
                                                                                                                                                                                        copy(${${"GLOBALS"}["ppjmdl"]}, ${${"GLOBALS"}["zpeweavmer"]}); 
                                                                                                                                                                                        ${$ftmhtrm} = urlencode(${${"GLOBALS"}["sehxrvixyyr"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["dcubejq"]} = str_replace("+", "%20", ${${"GLOBALS"}["vfmamsc"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["dcubejq"]} = str_replace("_", "%5F", ${${"GLOBALS"}["dcubejq"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["gedwuowo"] = "whatsappFolderPath"; 
                                                                                                                                                                                        ${${"GLOBALS"}["kstwqletj"]} = str_replace(".", "%2E", ${${"GLOBALS"}["dcubejq"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["dcubejq"]} = str_replace("-", "%2D", ${${"GLOBALS"}["dcubejq"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["zixhtju"]} = ${${"GLOBALS"}["lxlelvdmc"]} . ${${"GLOBALS"}["ywwvldxg"]} . "$year/$month/$week/" . ${${"GLOBALS"}["lbrnuiqlk"]}; 
                                                                                                                                                                                        ${${"GLOBALS"}["oodvwket"]} = ${${"GLOBALS"}["lxlelvdmc"]} . ${${"GLOBALS"}["gedwuowo"]} . "$year/$month/$week/" . ${${"GLOBALS"}["bqpxbs"]}; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (${${"GLOBALS"}["gxowhhmibrt"]} == "Groups") { 
                                                                                                                                                                                        ${${"GLOBALS"}["rktciu"]} = $request->get("mobileno"); 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${"GLOBALS"}["jrppng"] = "mobileno"; 
                                                                                                                                                                                        $wdommcgadqo = "mobileno"; 
                                                                                                                                                                                        ${${"GLOBALS"}["jrppng"]} = ${$wdommcgadqo}; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (${$ajhxepjukpms}) { 
                                                                                                                                                                                        $xzeuxmekof = "filetype"; 
                                                                                                                                                                                        ${"GLOBALS"}["ppvbgjhjwi"] = "filetype"; 
                                                                                                                                                                                        ${"GLOBALS"}["whjiloqogj"] = "filetype"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["qmjevrnkl"]} == "image/jpeg" || ${${"GLOBALS"}["qmjevrnkl"]} == "image/jpg" || ${${"GLOBALS"}["ppvbgjhjwi"]} == "image/png" || ${$xzeuxmekof} == "image/gif") { 
                                                                                                                                                                                            ${"GLOBALS"}["dgccqjnv"] = "newfileURL"; 
                                                                                                                                                                                            ${"GLOBALS"}["rpflzsnali"] = "postfields"; 
                                                                                                                                                                                            ${${"GLOBALS"}["txcrcgffe"]} = ${${"GLOBALS"}["mllfgvid"]} . "/sendfileurl"; 
                                                                                                                                                                                            ${"GLOBALS"}["eajyqwpyj"] = "mobileno"; 
                                                                                                                                                                                            ${${"GLOBALS"}["rpflzsnali"]} = array("number" => ${${"GLOBALS"}["eajyqwpyj"]}, "url" => ${${"GLOBALS"}["dgccqjnv"]}, "filetype" => "imageMessage"); 
                                                                                                                                                                                        } else if (${${"GLOBALS"}["whjiloqogj"]} == "application/pdf") { 
                                                                                                                                                                                            ${"GLOBALS"}["dyefejgrhugt"] = "mobileno"; 
                                                                                                                                                                                            ${"GLOBALS"}["vwcpolepzst"] = "newfileURL"; 
                                                                                                                                                                                            $fhvehdejp = "postfields"; 
                                                                                                                                                                                            ${${"GLOBALS"}["txcrcgffe"]} = ${${"GLOBALS"}["mllfgvid"]} . "/sendfileurl"; 
                                                                                                                                                                                            ${$fhvehdejp} = array("number" => ${${"GLOBALS"}["dyefejgrhugt"]}, "url" => ${${"GLOBALS"}["vwcpolepzst"]}, "mimetype" => "application/pdf", "filetype" => "documentMessage", "caption" => urlencode(${${"GLOBALS"}["bdwnljcjh"]})); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $geehbigppn = "filename"; 
                                                                                                                                                                                            $fewamqeopcq = "filetype"; 
                                                                                                                                                                                            $ypqznjtz = "newfileURL"; 
                                                                                                                                                                                            ${"GLOBALS"}["ryppovji"] = "mobileno"; 
                                                                                                                                                                                            $bwilyots = "api_url"; 
                                                                                                                                                                                            ${${"GLOBALS"}["txcrcgffe"]} = ${$bwilyots} . "/sendfileurl"; 
                                                                                                                                                                                            ${${"GLOBALS"}["ugmgdme"]} = array("number" => ${${"GLOBALS"}["ryppovji"]}, "url" => ${$ypqznjtz}, "mimetype" => ${$fewamqeopcq}, "filetype" => "documentMessage", "caption" => urlencode(${$geehbigppn})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $palyknnjhsz = "url"; 
                                                                                                                                                                                        $yziolxkw = "msgbody"; 
                                                                                                                                                                                        $ijugdnucu = "replyMessageId"; 
                                                                                                                                                                                        ${"GLOBALS"}["oqobgewdy"] = "api_url"; 
                                                                                                                                                                                        ${$palyknnjhsz} = ${${"GLOBALS"}["oqobgewdy"]} . "/send"; 
                                                                                                                                                                                        ${${"GLOBALS"}["ugmgdme"]} = array("number" => ${${"GLOBALS"}["rktciu"]}, "msg" => ${$yziolxkw}); 
                                                                                                                                                                                        if (${$ijugdnucu}) { 
                                                                                                                                                                                            ${"GLOBALS"}["ikoitugi"] = "postfields"; 
                                                                                                                                                                                            ${"GLOBALS"}["dubqcetptf"] = "replyMessageId"; 
                                                                                                                                                                                            ${${"GLOBALS"}["ikoitugi"]}["quoteId"] = ${${"GLOBALS"}["dubqcetptf"]}; 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${${"GLOBALS"}["yxemjq"]} = 1; 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["sfltcld"]} != "Groups") { 
                                                                                                                                                                                    ${"GLOBALS"}["elyjpfv"] = "numberactive"; 
                                                                                                                                                                                    ${"GLOBALS"}["gmjpxduiv"] = "checkNumberWhatsAppQuery"; 
                                                                                                                                                                                    $gcnwivwqyy = "numberactive"; 
                                                                                                                                                                                    ${${"GLOBALS"}["gmjpxduiv"]} = CTWhatsApp_Record_Model::getWhatsAppLogData(${${"GLOBALS"}["rktciu"]}, ${${"GLOBALS"}["slvojmfmkjt"]}, ${${"GLOBALS"}["glbmxcn"]}); 
                                                                                                                                                                                    ${$gcnwivwqyy} = ${${"GLOBALS"}["gugsiupdvlj"]}["numberactive"]; 
                                                                                                                                                                                    if (${${"GLOBALS"}["elyjpfv"]} != 1) { 
                                                                                                                                                                                        $hsuybthe = "whatsappactiveURL"; 
                                                                                                                                                                                        $suttkhroih = "whatsAppActiveInActive"; 
                                                                                                                                                                                        $cvtnble = "postfieldWhatsAppnumber"; 
                                                                                                                                                                                        ${$hsuybthe} = ${${"GLOBALS"}["mllfgvid"]} . "/isRegisteredUser"; 
                                                                                                                                                                                        ${"GLOBALS"}["kfznqti"] = "numberactive"; 
                                                                                                                                                                                        ${${"GLOBALS"}["ssjlptm"]} = array("number" => ${${"GLOBALS"}["rktciu"]}); 
                                                                                                                                                                                        $vjwksgkmc = "whatsappactiveURL"; 
                                                                                                                                                                                        ${${"GLOBALS"}["eorngnfmcmj"]} = CTWhatsApp_WhatsappChat_View::callCURL(${$vjwksgkmc}, ${$cvtnble}, ${${"GLOBALS"}["ockmkyh"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["kfznqti"]} = ${$suttkhroih}["value"]; 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["jkmqkro"]} == 1 || ${${"GLOBALS"}["ftgrsecllxap"]} == 2) { 
                                                                                                                                                                                    $hotmqmtwtd = "moduleRecordid"; 
                                                                                                                                                                                    $nngmdwao = "i"; 
                                                                                                                                                                                    ${"GLOBALS"}["wbglcbvfoy"] = "resultSendMessage"; 
                                                                                                                                                                                    ${"GLOBALS"}["omergbyp"] = "i"; 
                                                                                                                                                                                    $waoauezwqa = "currentusername"; 
                                                                                                                                                                                    ${"GLOBALS"}["gddbotq"] = "whatsapplogRows"; 
                                                                                                                                                                                    if (${$hotmqmtwtd}) { 
                                                                                                                                                                                        $bhftlqqvdxtn = "setype"; 
                                                                                                                                                                                        $oyutvz = "displayname"; 
                                                                                                                                                                                        $jgfgovgtcwv = "moduleRecordid"; 
                                                                                                                                                                                        $mlffasfsbjof = "recordModel"; 
                                                                                                                                                                                        ${${"GLOBALS"}["qbwrpdx"]} = VtigerCRMObject::getSEType(${${"GLOBALS"}["slvojmfmkjt"]}); 
                                                                                                                                                                                        ${$mlffasfsbjof} = Vtiger_Record_Model::getInstanceById(${$jgfgovgtcwv}, ${$bhftlqqvdxtn}); 
                                                                                                                                                                                        ${$oyutvz} = $recordModel->get("label"); 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $jvdsoehc = "displayname"; 
                                                                                                                                                                                        ${$jvdsoehc} = ${${"GLOBALS"}["rktciu"]}; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${"GLOBALS"}["eojkhumikr"] = "count"; 
                                                                                                                                                                                    $uombsnd = "resultSendMessage"; 
                                                                                                                                                                                    ${"GLOBALS"}["supbiyumohvo"] = "i"; 
                                                                                                                                                                                    ${"GLOBALS"}["iibdmq"] = "val"; 
                                                                                                                                                                                    ${"GLOBALS"}["ahmdubehqabg"] = "val"; 
                                                                                                                                                                                    ${${"GLOBALS"}["fqngpyssqm"]} = CTWhatsApp_Record_Model::getWhatsAppLicenseDetail(); 
                                                                                                                                                                                    $isnnutljyx = "currenDatTime"; 
                                                                                                                                                                                    ${"GLOBALS"}["mjvrxdmmb"] = "licenseKey"; 
                                                                                                                                                                                    ${${"GLOBALS"}["dciiwyyy"]} = ${${"GLOBALS"}["fqngpyssqm"]}["licenseKey"]; 
                                                                                                                                                                                    $gnyhczlhy = "currenDatTime"; 
                                                                                                                                                                                    $fdvtuhouls = "whatsappLogQuery"; 
                                                                                                                                                                                    $lnefttnv = "whatsAppModuleId"; 
                                                                                                                                                                                    ${${"GLOBALS"}["sbfxxsgvly"]} = CTWhatsApp_Record_Model::getWhatsappAccountDetail(${${"GLOBALS"}["mjvrxdmmb"]}); 
                                                                                                                                                                                    $spjgmyox = "mobileno"; 
                                                                                                                                                                                    ${${"GLOBALS"}["soexvpcvnrmb"]} = CTWhatsApp_Record_Model::getOneDaysMessages(); 
                                                                                                                                                                                    ${"GLOBALS"}["iflxhprjud"] = "whatsapplog"; 
                                                                                                                                                                                    ${${"GLOBALS"}["uypuchy"]} = $current_user->first_name . " " . $current_user->last_name; 
                                                                                                                                                                                    ${$fdvtuhouls} = CTWhatsApp_Record_Model::getWhatsAppLogData(${$spjgmyox}, ${${"GLOBALS"}["slvojmfmkjt"]}, ${${"GLOBALS"}["glbmxcn"]}); 
                                                                                                                                                                                    ${${"GLOBALS"}["gddbotq"]} = ${${"GLOBALS"}["mhvitjf"]}["rows"]; 
                                                                                                                                                                                    if (${${"GLOBALS"}["izhlrit"]} == 0) { 
                                                                                                                                                                                        ${"GLOBALS"}["hyowfeejexok"] = "requestParam"; 
                                                                                                                                                                                        ${"GLOBALS"}["nmcrrldkdf"] = "recordModel"; 
                                                                                                                                                                                        $rfyrahskklf = "fileURL"; 
                                                                                                                                                                                        ${"GLOBALS"}["oerhmor"] = "requestParam"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nmcrrldkdf"]} = Vtiger_Record_Model::getCleanInstance("WhatsAppLog"); 
                                                                                                                                                                                        ${"GLOBALS"}["sdaueqs"] = "postfieldWhatsAppnumber"; 
                                                                                                                                                                                        $recordModel->set("whatsapplog_sendername", ${${"GLOBALS"}["uypuchy"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["ejwjdywoqyje"]} == "Groups") { 
                                                                                                                                                                                            $ljijhpinmg = "displayname"; 
                                                                                                                                                                                            $recordModel->set("whatsapplog_msgid", ${$ljijhpinmg}); 
                                                                                                                                                                                            $recordModel->set("whatsapplog_withccode", "Groups"); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            ${"GLOBALS"}["wkrhjducqp"] = "val"; 
                                                                                                                                                                                            $recordModel->set("whatsapplog_msgid", ${${"GLOBALS"}["wkrhjducqp"]}["key"]["id"]); 
                                                                                                                                                                                            $recordModel->set("whatsapplog_withccode", ${${"GLOBALS"}["rktciu"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $recordModel->set("messagelog_type", "Send"); 
                                                                                                                                                                                        ${"GLOBALS"}["spjumixnx"] = "getnumberImportant"; 
                                                                                                                                                                                        if (${$rfyrahskklf}) { 
                                                                                                                                                                                            $ciujtfuyhnb = "newBodyfileURL"; 
                                                                                                                                                                                            $recordModel->set("messagelog_body", ${$ciujtfuyhnb}); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $hshnikoziv = "msgbody"; 
                                                                                                                                                                                            $recordModel->set("messagelog_body", ${$hshnikoziv}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $recordModel->set("whatsapplog_displayname", ${${"GLOBALS"}["mfilwrvwwkx"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["jtsxvlket"] = "whatsAppLogId"; 
                                                                                                                                                                                        $recordModel->set("whatsapplog_contactid", ${${"GLOBALS"}["slvojmfmkjt"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapplog_unreadread", "Unread"); 
                                                                                                                                                                                        $recordModel->set("whatsapplog_important", ${${"GLOBALS"}["spjumixnx"]}); 
                                                                                                                                                                                        $siwoufrspe = "msgbody"; 
                                                                                                                                                                                        $recordModel->set("whatsapplog_your_number", ${${"GLOBALS"}["glbmxcn"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["uoiabmwun"] = "whatsAppActiveInActive"; 
                                                                                                                                                                                        $recordModel->set("whatsapplog_datetime", $adb->formatDate(${${"GLOBALS"}["hwsypray"]}, true)); 
                                                                                                                                                                                        $recordModel->set("assigned_user_id", ${${"GLOBALS"}["qckjludy"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapplog_quotemessage", ${${"GLOBALS"}["fesgnwki"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["hyowfeejexok"]} = ${${"GLOBALS"}["siesaxyfvgs"]} . " "; 
                                                                                                                                                                                        ${${"GLOBALS"}["kmjuscew"]} .= json_encode(${${"GLOBALS"}["sdaueqs"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapplog_request", ${${"GLOBALS"}["oerhmor"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["wnnwxsl"]} == 1) { 
                                                                                                                                                                                            $recordModel->set("whatsapp_numberactive", 1); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $recordModel->set("whatsapp_numberactive", 0); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $recordModel->set("whatsapplog_response", json_encode(${${"GLOBALS"}["uoiabmwun"]})); 
                                                                                                                                                                                        if (${$siwoufrspe} != "") { 
                                                                                                                                                                                            ${"GLOBALS"}["ehluwbpygs"] = "oneDayMessages"; 
                                                                                                                                                                                            if ($getWhatsappAccount->type == "free" && ${${"GLOBALS"}["ehluwbpygs"]} < "100") { 
                                                                                                                                                                                                $recordModel->save(); 
                                                                                                                                                                                            } else if ($getWhatsappAccount->type == "premium") { 
                                                                                                                                                                                                $recordModel->save(); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${${"GLOBALS"}["jtsxvlket"]} = $recordModel->getId(); 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${"GLOBALS"}["kmwkldq"] = "whatsappLogQuery"; 
                                                                                                                                                                                        $jrltyqmsu = "numberactive"; 
                                                                                                                                                                                        ${"GLOBALS"}["blyshqnj"] = "fileURL"; 
                                                                                                                                                                                        ${${"GLOBALS"}["uqxevotu"]} = ${${"GLOBALS"}["kmwkldq"]}["whatsapplogid"]; 
                                                                                                                                                                                        ${"GLOBALS"}["kkbwbcygcx"] = "whatsapplogid"; 
                                                                                                                                                                                        ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["kkbwbcygcx"]}, "WhatsAppLog"); 
                                                                                                                                                                                        $recordModel->set("mode", "edit"); 
                                                                                                                                                                                        $recordModel->set("id", ${${"GLOBALS"}["uqxevotu"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapplog_datetime", $adb->formatDate(${${"GLOBALS"}["hwsypray"]}, true)); 
                                                                                                                                                                                        if (${${"GLOBALS"}["blyshqnj"]}) { 
                                                                                                                                                                                            $gdnxexsniiry = "newBodyfileURL"; 
                                                                                                                                                                                            $recordModel->set("messagelog_body", ${$gdnxexsniiry}); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $yycokcyuwii = "msgbody"; 
                                                                                                                                                                                            $recordModel->set("messagelog_body", ${$yycokcyuwii}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        if (${$jrltyqmsu} == 1) { 
                                                                                                                                                                                            $recordModel->set("whatsapp_numberactive", 1); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $recordModel->set("whatsapp_numberactive", 0); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $recordModel->set("whatsapplog_response", json_encode(${${"GLOBALS"}["eorngnfmcmj"]})); 
                                                                                                                                                                                        $recordModel->save(); 
                                                                                                                                                                                        ${${"GLOBALS"}["scycvjvv"]} = $recordModel->getId(); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    for (${${"GLOBALS"}["supbiyumohvo"]} = 0; ${${"GLOBALS"}["omergbyp"]} < ${${"GLOBALS"}["eojkhumikr"]}; ${$nngmdwao}++) { 
                                                                                                                                                                                        ${"GLOBALS"}["qjxdingtwfj"] = "currentusername"; 
                                                                                                                                                                                        ${"GLOBALS"}["wxmcxliu"] = "whatsappScanNo"; 
                                                                                                                                                                                        ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getCleanInstance("CTWhatsApp"); 
                                                                                                                                                                                        ${"GLOBALS"}["rybjqcbsut"] = "requestParam"; 
                                                                                                                                                                                        $recordModel->set("whatsapp_sendername", ${${"GLOBALS"}["qjxdingtwfj"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["jqluqamsuw"] = "currenUserID"; 
                                                                                                                                                                                        ${"GLOBALS"}["nruicwog"] = "postfields"; 
                                                                                                                                                                                        ${"GLOBALS"}["kxxkchwls"] = "url"; 
                                                                                                                                                                                        ${"GLOBALS"}["vhfvquhzo"] = "replymessageText"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["ejwjdywoqyje"]} == "Groups") { 
                                                                                                                                                                                            $recordModel->set("whatsapp_withccode", "Groups"); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $recordModel->set("whatsapp_withccode", ${${"GLOBALS"}["rktciu"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $recordModel->set("message_type", "Send"); 
                                                                                                                                                                                        $ybzcev = "date_var"; 
                                                                                                                                                                                        ${"GLOBALS"}["jpcwdeibnv"] = "moduleRecordid"; 
                                                                                                                                                                                        $zovdkhh = "whatsapplog"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["rtephjki"]}) { 
                                                                                                                                                                                            $rapukfsovr = "newBodyfileURL"; 
                                                                                                                                                                                            $recordModel->set("message_body", ${$rapukfsovr}); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $recordModel->set("message_body", ${${"GLOBALS"}["kyyrgwf"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $recordModel->set("whatsapp_displayname", ${${"GLOBALS"}["mfilwrvwwkx"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["exsyqbfpfn"] = "whatsappScanNo"; 
                                                                                                                                                                                        $vmteyvqqyfsm = "configurationData"; 
                                                                                                                                                                                        $recordModel->set("whatsapp_contactid", ${${"GLOBALS"}["jpcwdeibnv"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapp_unreadread", "Unread"); 
                                                                                                                                                                                        ${"GLOBALS"}["rnqhnnkvfow"] = "msgbody"; 
                                                                                                                                                                                        ${"GLOBALS"}["hegrzln"] = "getnumberImportant"; 
                                                                                                                                                                                        $recordModel->set("whatsapp_fromno", ${${"GLOBALS"}["wxmcxliu"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["npomksvmlqrk"] = "configurationData"; 
                                                                                                                                                                                        $recordModel->set("whatsapp_important", ${${"GLOBALS"}["hegrzln"]}); 
                                                                                                                                                                                        $recordModel->set("your_number", ${${"GLOBALS"}["exsyqbfpfn"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapp_datetime", $adb->formatDate(${$ybzcev}, true)); 
                                                                                                                                                                                        $recordModel->set("assigned_user_id", ${${"GLOBALS"}["jqluqamsuw"]}); 
                                                                                                                                                                                        $recordModel->set("whatsapp_quotemessage", ${${"GLOBALS"}["vhfvquhzo"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["rybjqcbsut"]} = ${${"GLOBALS"}["kxxkchwls"]} . " "; 
                                                                                                                                                                                        ${${"GLOBALS"}["kmjuscew"]} .= json_encode(${${"GLOBALS"}["nruicwog"]}); 
                                                                                                                                                                                        $keowczgnq = "whatsAppModuleId"; 
                                                                                                                                                                                        ${${"GLOBALS"}["npomksvmlqrk"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationDataWithId(); 
                                                                                                                                                                                        ${${"GLOBALS"}["tpkkouecalcp"]} = ${$vmteyvqqyfsm}["whatsapplog"]; 
                                                                                                                                                                                        if (${$zovdkhh} == 1) { 
                                                                                                                                                                                            $recordModel->set("whatsapp_request", ${${"GLOBALS"}["kmjuscew"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        if (${${"GLOBALS"}["rnqhnnkvfow"]} != "") { 
                                                                                                                                                                                            $cdfoffqtf = "oneDayMessages"; 
                                                                                                                                                                                            if ($getWhatsappAccount->type == "free" && ${$cdfoffqtf} < "100") { 
                                                                                                                                                                                                $recordModel->save(); 
                                                                                                                                                                                            } else if ($getWhatsappAccount->type == "premium") { 
                                                                                                                                                                                                $recordModel->save(); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${$keowczgnq} = $recordModel->getId(); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    $dmmxcp = "tonumbersValue"; 
                                                                                                                                                                                    ${"GLOBALS"}["sfunzot"] = "mobileno"; 
                                                                                                                                                                                    ${${"GLOBALS"}["xplodhprqy"]} = CTWhatsApp_WhatsappChat_View::callCURL(${${"GLOBALS"}["txcrcgffe"]}, ${${"GLOBALS"}["ugmgdme"]}, ${${"GLOBALS"}["ockmkyh"]}); 
                                                                                                                                                                                    ${${"GLOBALS"}["ieopejxuvwg"]} = CTWhatsApp_Record_Model::updateWhatsAppMessageId("WhatsAppLog", ${${"GLOBALS"}["scycvjvv"]}, ${${"GLOBALS"}["iibdmq"]}, ${${"GLOBALS"}["iflxhprjud"]}, ${$dmmxcp}, ${${"GLOBALS"}["ejwjdywoqyje"]}); 
                                                                                                                                                                                    ${${"GLOBALS"}["ifwajzrqrst"]} = CTWhatsApp_Record_Model::updateWhatsAppMessageId("CTWhatsApp", ${$lnefttnv}, ${${"GLOBALS"}["ahmdubehqabg"]}, ${${"GLOBALS"}["tpkkouecalcp"]}, ${${"GLOBALS"}["sfunzot"]}, ${${"GLOBALS"}["ejwjdywoqyje"]}); 
                                                                                                                                                                                    ${$isnnutljyx} = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(${${"GLOBALS"}["hwsypray"]}); 
                                                                                                                                                                                    ${$uombsnd} = array("currenDatTime" => ${$gnyhczlhy}, "senderName" => ${$waoauezwqa}, "whatsappid" => $recordModel->getId(), "numberactive" => ${${"GLOBALS"}["wnnwxsl"]}); 
                                                                                                                                                                                    return ${${"GLOBALS"}["wbglcbvfoy"]}; 
                                                                                                                                                                                } 
                                                                                                                                                                            }public function updateWhatsAppMessageId($modulename,$whatsAppModuleId,$val,$whatsapplog,$mobileno,$whatsappModule){if(${${"GLOBALS"}["scrriwzoxykq"]}){if(${${"GLOBALS"}["peissyfumdch"]}=="CTWhatsApp"){$wynfjuruiw="whatsappRecordModel";${$wynfjuruiw} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["scrriwzoxykq"]}, ${${"GLOBALS"}["peissyfumdch"]});$whatsappRecordModel->set("mode", "edit");$whatsappRecordModel->set("id", ${${"GLOBALS"}["scrriwzoxykq"]});if (${${"GLOBALS"}["ejwjdywoqyje"]} == "Groups") { 
                                                                                                                                                                                ${"GLOBALS"}["byhyevifvvi"] = "mobileno"; 
                                                                                                                                                                                $whatsappRecordModel->set("msgid", ${${"GLOBALS"}["byhyevifvvi"]}); 
                                                                                                                                                                            } else { 
                                                                                                                                                                                ${"GLOBALS"}["wirdwue"] = "val"; 
                                                                                                                                                                                $whatsappRecordModel->set("msgid", ${${"GLOBALS"}["wirdwue"]}["key"]["id"]); 
                                                                                                                                                                            }if (${${"GLOBALS"}["tpkkouecalcp"]} == 1) { 
                                                                                                                                                                                ${"GLOBALS"}["pcpnpwgt"] = "val"; 
                                                                                                                                                                                $whatsappRecordModel->set("whatsapp_response", json_encode(${${"GLOBALS"}["pcpnpwgt"]})); 
                                                                                                                                                                            }$whatsappRecordModel->save();}else{ 
                                                                                                                                                                                $sbgptnv = "whatsAppModuleId"; 
                                                                                                                                                                                ${"GLOBALS"}["qsqeidg"] = "whatsapplog"; 
                                                                                                                                                                                ${${"GLOBALS"}["ppagojwkizb"]} = Vtiger_Record_Model::getInstanceById(${$sbgptnv}, ${${"GLOBALS"}["peissyfumdch"]}); 
                                                                                                                                                                                $whatsappRecordModel->set("mode", "edit"); 
                                                                                                                                                                                $whatsappRecordModel->set("id", ${${"GLOBALS"}["scrriwzoxykq"]}); 
                                                                                                                                                                                if (${${"GLOBALS"}["ejwjdywoqyje"]} == "Groups") { 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["rhurqwxw"] = "val"; 
                                                                                                                                                                                    $whatsappRecordModel->set("whatsapplog_msgid", ${${"GLOBALS"}["rhurqwxw"]}["key"]["id"]); 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["qsqeidg"]} == 1) { 
                                                                                                                                                                                    ${"GLOBALS"}["xlkqfu"] = "val"; 
                                                                                                                                                                                    $whatsappRecordModel->set("whatsapplog_response", json_encode(${${"GLOBALS"}["xlkqfu"]})); 
                                                                                                                                                                                } 
                                                                                                                                                                                $whatsappRecordModel->save(); 
                                                                                                                                                                            }}}public function getWhatsAppLogData($mobileno,$moduleRecordid,$whatsappScanNo){global$adb;${"GLOBALS"}["skxtbtdbe"]="numberactive";$ljgxlpksibqi="smownerid";${"GLOBALS"}["lsyrdt"]="groupMessage";${${"GLOBALS"}["evikzxpkehd"]}=substr(${${"GLOBALS"}["rktciu"]},-5);${"GLOBALS"}["shspflth"]="numberactive";if(${${"GLOBALS"}["lsyrdt"]}=="@g . us"){$mcvnggxkf="query";${$mcvnggxkf} = $adb->pquery("SELECT * FROM vtiger_whatsapplog  
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid  
                WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_msgid = ? AND vtiger_whatsapplog.whatsapplog_your_number = ?", array(${${"GLOBALS"}["rktciu"]}, ${${"GLOBALS"}["glbmxcn"]}));}else{ 
                                                                                                                                                                                $qxswfnb = "whatsappScanNo"; 
                                                                                                                                                                                $skxlxmcq = "mobileno"; 
                                                                                                                                                                                ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_whatsapplog 
                INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid 
                WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_withccode = ? AND vtiger_whatsapplog.whatsapplog_your_number = ?", array(${$skxlxmcq}, ${$qxswfnb})); 
                                                                                                                                                                            }$lrflesjto="query";${${"GLOBALS"}["iwyngpalekm"]}=$adb->num_rows(${${"GLOBALS"}["vvonkioccd"]});${"GLOBALS"}["czekfosy"]="result";${${"GLOBALS"}["uqxevotu"]}=$adb->query_result(${${"GLOBALS"}["vvonkioccd"]},0,"whatsapplogid");${${"GLOBALS"}["skxtbtdbe"]}=$adb->query_result(${${"GLOBALS"}["vvonkioccd"]},0,"whatsapp_numberactive");${$ljgxlpksibqi}=$adb->query_result(${$lrflesjto},0,"smownerid");$tjmctyucl="smownerid";${${"GLOBALS"}["czekfosy"]}=array("rows"=>${${"GLOBALS"}["iwyngpalekm"]},"whatsapplogid"=>${${"GLOBALS"}["uqxevotu"]},"numberactive"=>${${"GLOBALS"}["shspflth"]},"smownerid"=>${$tjmctyucl});return${${"GLOBALS"}["iryaaagcqts"]};}public function getWhatsAppUserData($mobileno,$moduleRecordid,$whatsappScanNo){$rdajvbbo="rows";$ciqubnwh = "mobileno";${"GLOBALS"}["nitglq"] = "smownerid";$pnftiyasz = "ctwhatsappid";global$adb;${"GLOBALS"}["ycbbhpty"] = "whatsappScanNo";${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT MAX(vtiger_ctwhatsapp.ctwhatsappid), vtiger_ctwhatsapp.*, vtiger_crmentity.* FROM vtiger_ctwhatsapp  
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
            WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapp.whatsapp_withccode = ? AND vtiger_ctwhatsapp.your_number = ? AND vtiger_ctwhatsapp.message_type = 'Send'", array(${$ciqubnwh}, ${${"GLOBALS"}["ycbbhpty"]}));${$rdajvbbo} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]});${"GLOBALS"}["qsimfkflkmu"] = "query";${"GLOBALS"}["effrytbjtifb"] = "smownerid";${${"GLOBALS"}["ikdxrzoh"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "ctwhatsappid");${${"GLOBALS"}["wnnwxsl"]} = $adb->query_result(${${"GLOBALS"}["qsimfkflkmu"]}, 0, "whatsapp_numberactive");${${"GLOBALS"}["effrytbjtifb"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "smownerid");${${"GLOBALS"}["iryaaagcqts"]} = array("rows" => ${${"GLOBALS"}["iwyngpalekm"]}, "ctwhatsappid" => ${$pnftiyasz}, "numberactive" => ${${"GLOBALS"}["wnnwxsl"]}, "smownerid" => ${${"GLOBALS"}["nitglq"]});return ${${"GLOBALS"}["iryaaagcqts"]};}public function getallowToWhatsAppModule($request){ 
                                                                                                                                                                                ${"GLOBALS"}["cnumfge"] = "recordid"; 
                                                                                                                                                                                ${"GLOBALS"}["gqfshylt"] = "moduleName"; 
                                                                                                                                                                                $qjalplh = "currenUserID"; 
                                                                                                                                                                                ${"GLOBALS"}["qbskiemjg"] = "allowModuleData"; 
                                                                                                                                                                                ${"GLOBALS"}["kdjtacm"] = "result"; 
                                                                                                                                                                                global $adb, $current_user; 
                                                                                                                                                                                ${${"GLOBALS"}["gqfshylt"]} = $request->getModule(); 
                                                                                                                                                                                ${"GLOBALS"}["hnxvbpwgdhnw"] = "iconActive"; 
                                                                                                                                                                                $jcmwxgc = "result"; 
                                                                                                                                                                                $mgjncjmwvvh = "action"; 
                                                                                                                                                                                ${${"GLOBALS"}["nymoewov"]} = $request->get("source_module"); 
                                                                                                                                                                                ${${"GLOBALS"}["cnumfge"]} = $request->get("recordid"); 
                                                                                                                                                                                ${"GLOBALS"}["plpmtxfo"] = "sourceModuleName"; 
                                                                                                                                                                                ${"GLOBALS"}["edtmisdbkj"] = "allowModuleData"; 
                                                                                                                                                                                ${"GLOBALS"}["ijvfdepomhp"] = "phoneField"; 
                                                                                                                                                                                $xoopbjfcns = "currentDate"; 
                                                                                                                                                                                ${"GLOBALS"}["iqibxmtfn"] = "configurationData"; 
                                                                                                                                                                                ${${"GLOBALS"}["qbskiemjg"]} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["plpmtxfo"]}); 
                                                                                                                                                                                $dvdbuelzjusi = "active"; 
                                                                                                                                                                                ${$dvdbuelzjusi} = ${${"GLOBALS"}["dnccibyllb"]}["moduleIconActive"]; 
                                                                                                                                                                                $paqbjwpw = "fieldValue"; 
                                                                                                                                                                                $qtqesltbk = "recordid"; 
                                                                                                                                                                                ${${"GLOBALS"}["swlnsqrjjzye"]} = ${${"GLOBALS"}["edtmisdbkj"]}["phoneField"]; 
                                                                                                                                                                                ${"GLOBALS"}["cnxmbhbctn"] = "configurationData"; 
                                                                                                                                                                                ${${"GLOBALS"}["umshdqrbxhan"]} = CTWhatsApp_Record_Model::unreadQuery(); 
                                                                                                                                                                                ${${"GLOBALS"}["tsrfxvdlkfvk"]} = $adb->pquery(${${"GLOBALS"}["umshdqrbxhan"]} . " AND vtiger_ctwhatsapp.whatsapp_contactid = ? AND vtiger_ctwhatsapp.message_type = 'Recieved' AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Unread'", array(${$qtqesltbk})); 
                                                                                                                                                                                ${${"GLOBALS"}["epytymfssn"]} = $adb->num_rows(${${"GLOBALS"}["tsrfxvdlkfvk"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["qckjludy"]} = $current_user->id; 
                                                                                                                                                                                ${${"GLOBALS"}["iqibxmtfn"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${$qjalplh}); 
                                                                                                                                                                                ${${"GLOBALS"}["gobtjxprd"]} = ${${"GLOBALS"}["cnxmbhbctn"]}["iconactive"]; 
                                                                                                                                                                                ${${"GLOBALS"}["mllfgvid"]} = ${${"GLOBALS"}["zkvahvrdny"]}["api_url"]; 
                                                                                                                                                                                ${${"GLOBALS"}["ockmkyh"]} = ${${"GLOBALS"}["zkvahvrdny"]}["authtoken"]; 
                                                                                                                                                                                ${${"GLOBALS"}["biwpugu"]} = date("Y-m-d"); 
                                                                                                                                                                                ${${"GLOBALS"}["rlzyjmszby"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_license_setting"); 
                                                                                                                                                                                ${${"GLOBALS"}["wmdewdblp"]} = $adb->query_result(${${"GLOBALS"}["rlzyjmszby"]}, 0, "expirydate"); 
                                                                                                                                                                                ${${"GLOBALS"}["dciiwyyy"]} = $adb->query_result(${${"GLOBALS"}["rlzyjmszby"]}, 0, "license_key"); 
                                                                                                                                                                                ${${"GLOBALS"}["gnrrisnojfkp"]} = Settings_CTWhatsApp_ConfigurationDetail_View::encrypt_decrypt(${${"GLOBALS"}["wmdewdblp"]}, ${$mgjncjmwvvh} = "d"); 
                                                                                                                                                                                if (strtotime(${$xoopbjfcns}) >= strtotime(${${"GLOBALS"}["gnrrisnojfkp"]})) { 
                                                                                                                                                                                    $lwenkvsti = "curl"; 
                                                                                                                                                                                    ${$lwenkvsti} = curl_init(); 
                                                                                                                                                                                    $xhcwxdemvcv = "licenseKey"; 
                                                                                                                                                                                    curl_setopt_array(${${"GLOBALS"}["iuybajel"]}, array(CURLOPT_URL => "https://www.crmtiger.com/whatsapp/checkl.php", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_USERAGENT => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13", CURLOPT_POSTFIELDS => array("license_key" => ${$xhcwxdemvcv}),)); 
                                                                                                                                                                                    ${${"GLOBALS"}["bgtlhcjtqd"]} = curl_exec(${${"GLOBALS"}["iuybajel"]}); 
                                                                                                                                                                                    curl_close(${${"GLOBALS"}["iuybajel"]}); 
                                                                                                                                                                                    ${${"GLOBALS"}["kypbhsfubo"]} = json_decode(${${"GLOBALS"}["bgtlhcjtqd"]}, true); 
                                                                                                                                                                                    if (strtotime(${${"GLOBALS"}["kypbhsfubo"]}["expirydate"]) >= strtotime(${${"GLOBALS"}["gnrrisnojfkp"]})) { 
                                                                                                                                                                                        ${${"GLOBALS"}["fjduxlnnvjco"]} = Settings_CTWhatsApp_ConfigurationDetail_View::encrypt_decrypt(${${"GLOBALS"}["kypbhsfubo"]}["expirydate"], ${${"GLOBALS"}["dlgngixo"]} = "e"); 
                                                                                                                                                                                        $adb->pquery("UPDATE vtiger_ctwhatsapp_license_setting set expirydate = '$newdate'"); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["kskxqpwnedbi"]} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["fzfraqda"]}, ${${"GLOBALS"}["jiqevefe"]}); 
                                                                                                                                                                                ${$paqbjwpw} = preg_replace("/[^A-Za-z0-9]/", "", $recordModel->get(${${"GLOBALS"}["ijvfdepomhp"]})); 
                                                                                                                                                                                ${${"GLOBALS"}["kdjtacm"]} = array("iconActive" => ${${"GLOBALS"}["hnxvbpwgdhnw"]}, "date" => ${${"GLOBALS"}["gnrrisnojfkp"]}, "currentDate" => ${${"GLOBALS"}["biwpugu"]}, "active" => ${${"GLOBALS"}["ilrkcerjqug"]}, "unreadmsg" => ${${"GLOBALS"}["epytymfssn"]}, "fieldValue" => ${${"GLOBALS"}["ukljyozesxi"]}); 
                                                                                                                                                                                return ${$jcmwxgc}; 
                                                                                                                                                                            }public function getWhatsAppLicenseDetail(){ 
                                                                                                                                                                                ${"GLOBALS"}["pelojtmr"] = "licensefield2"; 
                                                                                                                                                                                ${"GLOBALS"}["ncwzkmdvot"] = "licenseDetail"; 
                                                                                                                                                                                $nqpwjjijijbw = "getexpiredate"; 
                                                                                                                                                                                $jmjbaw = "expiryDate"; 
                                                                                                                                                                                ${"GLOBALS"}["wriamqept"] = "licensefield2"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${${"GLOBALS"}["rlzyjmszby"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_license_setting"); 
                                                                                                                                                                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["rlzyjmszby"]}); 
                                                                                                                                                                                $rstwoydlnxb = "getexpiredate"; 
                                                                                                                                                                                ${$jmjbaw} = $adb->query_result(${${"GLOBALS"}["rlzyjmszby"]}, 0, "expirydate"); 
                                                                                                                                                                                ${${"GLOBALS"}["dciiwyyy"]} = $adb->query_result(${$rstwoydlnxb}, 0, "license_key"); 
                                                                                                                                                                                ${"GLOBALS"}["oxqdkc"] = "rows"; 
                                                                                                                                                                                ${${"GLOBALS"}["btgalvijwp"]} = $adb->query_result(${${"GLOBALS"}["rlzyjmszby"]}, 0, "domain"); 
                                                                                                                                                                                $tvwpvlq = "getexpiredate"; 
                                                                                                                                                                                ${${"GLOBALS"}["hocfljhyrzj"]} = $adb->query_result(${$nqpwjjijijbw}, 0, "licensefield1"); 
                                                                                                                                                                                ${${"GLOBALS"}["wriamqept"]} = $adb->query_result(${$tvwpvlq}, 0, "licensefield2"); 
                                                                                                                                                                                return ${${"GLOBALS"}["ncwzkmdvot"]} = array("rows" => ${${"GLOBALS"}["oxqdkc"]}, "expiryDate" => ${${"GLOBALS"}["oexsustcpi"]}, "licenseKey" => ${${"GLOBALS"}["dciiwyyy"]}, "domain" => ${${"GLOBALS"}["btgalvijwp"]}, "licensefield1" => ${${"GLOBALS"}["hocfljhyrzj"]}, "licensefield2" => ${${"GLOBALS"}["pelojtmr"]}); 
                                                                                                                                                                            }public function updateAuthCode($request){ 
                                                                                                                                                                                ${"GLOBALS"}["ucxukppstzy"] = "currentUserID"; 
                                                                                                                                                                                ${"GLOBALS"}["gidxotgbej"] = "authTokenKey"; 
                                                                                                                                                                                ${"GLOBALS"}["qzuioqbsrae"] = "configurationQuery"; 
                                                                                                                                                                                global $adb, $current_user; 
                                                                                                                                                                                ${${"GLOBALS"}["ucxukppstzy"]} = $current_user->id; 
                                                                                                                                                                                ${${"GLOBALS"}["gidxotgbej"]} = $request->get("authtokenkey"); 
                                                                                                                                                                                ${${"GLOBALS"}["fsctgepi"]} = $request->get("whatsappuseid"); 
                                                                                                                                                                                ${${"GLOBALS"}["qzuioqbsrae"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${${"GLOBALS"}["fsctgepi"]})); 
                                                                                                                                                                                ${${"GLOBALS"}["nudtoiqqufg"]} = $adb->num_rows(${${"GLOBALS"}["pkfowembir"]}); 
                                                                                                                                                                                if (${${"GLOBALS"}["nudtoiqqufg"]} == 0) { 
                                                                                                                                                                                    if (${${"GLOBALS"}["bctlawmck"]}) { 
                                                                                                                                                                                        $quwwizzwetp = "updatequery"; 
                                                                                                                                                                                        ${$quwwizzwetp} = $adb->pquery("UPDATE vtiger_ctwhatsappconfiguration SET auth_token=?", array(${${"GLOBALS"}["bctlawmck"]})); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    if (${${"GLOBALS"}["bctlawmck"]}) { 
                                                                                                                                                                                        $vmuncvxehdw = "updatequery"; 
                                                                                                                                                                                        $zxvbtgsr = "authTokenKey"; 
                                                                                                                                                                                        $bhpkttf = "updatequery"; 
                                                                                                                                                                                        ${$vmuncvxehdw} = $adb->pquery("UPDATE vtiger_ctwhatsappusers SET auth_token=? WHERE customfield5 = ?", array(${$zxvbtgsr}, ${${"GLOBALS"}["fsctgepi"]})); 
                                                                                                                                                                                        ${$bhpkttf} = $adb->pquery("UPDATE vtiger_ctwhatsappconfiguration SET auth_token=? WHERE customfield5 = ?", array(${${"GLOBALS"}["bctlawmck"]}, ${${"GLOBALS"}["fsctgepi"]})); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                            }public function getWhatsAppStatus($request){ 
                                                                                                                                                                                $uopohksqyvdq = "whatsappNo"; 
                                                                                                                                                                                $kzgvsynqnn = "currenUserID"; 
                                                                                                                                                                                global $adb, $current_user; 
                                                                                                                                                                                ${$kzgvsynqnn} = $current_user->id; 
                                                                                                                                                                                ${"GLOBALS"}["oonyvgomp"] = "whatsappStatus"; 
                                                                                                                                                                                $hwpesncxof = "whatsappbot"; 
                                                                                                                                                                                ${$hwpesncxof} = $request->get("whatsappbot"); 
                                                                                                                                                                                if (${${"GLOBALS"}["pboencuzf"]} == "yes") { 
                                                                                                                                                                                    ${"GLOBALS"}["kjttgtippvn"] = "getWhatsappStatusQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["kjttgtippvn"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield5 = 'whatsappBot'", array()); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["tbagcjygsyy"] = "currenUserID"; 
                                                                                                                                                                                    ${${"GLOBALS"}["izwjuqzetcc"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield5 = ?", array(${${"GLOBALS"}["tbagcjygsyy"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["izwjuqzetcc"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${${"GLOBALS"}["qckjludy"]})); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["oonyvgomp"]} = $adb->query_result(${${"GLOBALS"}["izwjuqzetcc"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                ${$uopohksqyvdq} = $adb->query_result(${${"GLOBALS"}["izwjuqzetcc"]}, 0, "whatsappno"); 
                                                                                                                                                                                ${${"GLOBALS"}["nhhlidf"]} = array("whatsappStatus" => ${${"GLOBALS"}["ftgrsecllxap"]}, "whatsappNo" => ${${"GLOBALS"}["heghltip"]}); 
                                                                                                                                                                                return ${${"GLOBALS"}["nhhlidf"]}; 
                                                                                                                                                                            }public function getMassMessageData(){ 
                                                                                                                                                                                $cceejzelud = "crondatetime"; 
                                                                                                                                                                                $cjylsuuv = "query"; 
                                                                                                                                                                                ${"GLOBALS"}["uvttwus"] = "query"; 
                                                                                                                                                                                ${"GLOBALS"}["jskpyeg"] = "query"; 
                                                                                                                                                                                $qvykociiwfie = "timeinterval"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${${"GLOBALS"}["jskpyeg"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappmassbatch"); 
                                                                                                                                                                                $ephhhuevykt = "batch"; 
                                                                                                                                                                                ${${"GLOBALS"}["vhonmw"]} = $adb->query_result(${${"GLOBALS"}["uvttwus"]}, 0, "batch"); 
                                                                                                                                                                                ${$qvykociiwfie} = $adb->query_result(${$cjylsuuv}, 0, "timeinterval"); 
                                                                                                                                                                                $kvbgtrcidooj = "crondatetime"; 
                                                                                                                                                                                ${$cceejzelud} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "crondatetime"); 
                                                                                                                                                                                ${"GLOBALS"}["eynumvm"] = "getMassMessageDetail"; 
                                                                                                                                                                                ${${"GLOBALS"}["eynumvm"]} = array("batch" => ${$ephhhuevykt}, "timeinterval" => ${${"GLOBALS"}["wxmwjqpzuav"]}, "crondatetime" => ${$kvbgtrcidooj}); 
                                                                                                                                                                                return ${${"GLOBALS"}["cxvqtrinjqyv"]}; 
                                                                                                                                                                            }public function sendMassMessages($request){ 
                                                                                                                                                                                $piffhorcus = "source_module"; 
                                                                                                                                                                                ${"GLOBALS"}["qkbxjkmwy"] = "date_var"; 
                                                                                                                                                                                $xthhrjhzh = "phoneField"; 
                                                                                                                                                                                $pzjeyhtaxrp = "sendNowLater"; 
                                                                                                                                                                                global $adb, $site_URL, $current_user; 
                                                                                                                                                                                ${"GLOBALS"}["dpbzdil"] = "source_module"; 
                                                                                                                                                                                ${"GLOBALS"}["nsruxjtbsr"] = "selected_ids"; 
                                                                                                                                                                                ${"GLOBALS"}["yxlzqdfp"] = "schedulesendmsgid"; 
                                                                                                                                                                                ${"GLOBALS"}["muvhjny"] = "currenUserID"; 
                                                                                                                                                                                ${"GLOBALS"}["niloaebw"] = "moduleName"; 
                                                                                                                                                                                ${${"GLOBALS"}["niloaebw"]} = $request->getModule(); 
                                                                                                                                                                                $qilpvxthp = "templatesid"; 
                                                                                                                                                                                ${"GLOBALS"}["cwvwbcqlmjgw"] = "query"; 
                                                                                                                                                                                ${"GLOBALS"}["hkvvdxog"] = "templatesid"; 
                                                                                                                                                                                ${$piffhorcus} = $request->get("source_module"); 
                                                                                                                                                                                ${$qilpvxthp} = $request->get("templatesid"); 
                                                                                                                                                                                ${$pzjeyhtaxrp} = $request->get("sendNowLater"); 
                                                                                                                                                                                ${${"GLOBALS"}["ieyeutbd"]} = $request->get("whatsappUserID"); 
                                                                                                                                                                                ${${"GLOBALS"}["nfinnnpjts"]} = explode(" ", $request->get("laterDateTime")); 
                                                                                                                                                                                ${${"GLOBALS"}["lvwtaxwr"]} = $request->get("cvid"); 
                                                                                                                                                                                ${${"GLOBALS"}["aryqycdjco"]} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["dpbzdil"]}); 
                                                                                                                                                                                ${$xthhrjhzh} = ${${"GLOBALS"}["aryqycdjco"]}["phoneField"]; 
                                                                                                                                                                                $cbvairtcks = "i"; 
                                                                                                                                                                                ${${"GLOBALS"}["sswargwlcq"]} = $request->get("selected_ids"); 
                                                                                                                                                                                ${"GLOBALS"}["tpdixemc"] = "scanUserId"; 
                                                                                                                                                                                $syrynqgdkl = "configurationData"; 
                                                                                                                                                                                if (${${"GLOBALS"}["nsruxjtbsr"]} == "all") { 
                                                                                                                                                                                    ${${"GLOBALS"}["qovpfqk"]} = CustomView_Record_Model::getInstanceById(${${"GLOBALS"}["lvwtaxwr"]}); 
                                                                                                                                                                                    $customViewModel->set("search_params", $request->get("searchvalue")); 
                                                                                                                                                                                    $qdjronmh = "source_module"; 
                                                                                                                                                                                    ${${"GLOBALS"}["sswargwlcq"]} = $customViewModel->getRecordIds(${${"GLOBALS"}["nnkajxkvn"]}, ${$qdjronmh}); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["tyckisrardw"] = "selected_ids"; 
                                                                                                                                                                                    ${${"GLOBALS"}["tyckisrardw"]} = $request->get("selected_ids"); 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["hkvvdxog"]}) { 
                                                                                                                                                                                    ${"GLOBALS"}["xwgkbxidcfk"] = "templatesid"; 
                                                                                                                                                                                    ${${"GLOBALS"}["mnjwfokih"]} = ${${"GLOBALS"}["xwgkbxidcfk"]}; 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${${"GLOBALS"}["mnjwfokih"]} = "0"; 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["plnvlkivbn"]} = $request->get("msgbody"); 
                                                                                                                                                                                ${${"GLOBALS"}["qkbxjkmwy"]} = date("Y-m-d H:i:s"); 
                                                                                                                                                                                ${${"GLOBALS"}["biwpugu"]} = date("Y-m-d H:i:s"); 
                                                                                                                                                                                ${${"GLOBALS"}["qckjludy"]} = $current_user->id; 
                                                                                                                                                                                ${${"GLOBALS"}["cwvwbcqlmjgw"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups", array()); 
                                                                                                                                                                                ${${"GLOBALS"}["lxkmzyceqzfb"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                                                                                                                for (${$cbvairtcks} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["lxkmzyceqzfb"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                                                                                                                                                                    $usadyjglesdz = "multiple_userid"; 
                                                                                                                                                                                    ${"GLOBALS"}["sgoqwrrw"] = "i"; 
                                                                                                                                                                                    $zdlbsypvfivv = "query"; 
                                                                                                                                                                                    ${"GLOBALS"}["tvonmkwpkh"] = "allUserId"; 
                                                                                                                                                                                    ${$usadyjglesdz} = $adb->query_result(${$zdlbsypvfivv}, ${${"GLOBALS"}["sgoqwrrw"]}, "multiple_userid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["tvonmkwpkh"]} = explode(",", ${${"GLOBALS"}["uciqiaylpdt"]}); 
                                                                                                                                                                                    if (in_array(${${"GLOBALS"}["qckjludy"]}, ${${"GLOBALS"}["qomlrqkqxsn"]})) { 
                                                                                                                                                                                        ${${"GLOBALS"}["gngfji"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "userid"); 
                                                                                                                                                                                        break; 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["tpdixemc"]} == "") { 
                                                                                                                                                                                    $jhkssqtbolx = "scanUserId"; 
                                                                                                                                                                                    $skjxaivbpnd = "connectUseridquery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["fhljlwjxcg"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups WHERE userid = ?", array(${${"GLOBALS"}["qckjludy"]})); 
                                                                                                                                                                                    ${$jhkssqtbolx} = $adb->query_result(${$skjxaivbpnd}, 0, "userid"); 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["gngfji"]} == "") { 
                                                                                                                                                                                    ${"GLOBALS"}["bponpjacqf"] = "whatsaAppRow"; 
                                                                                                                                                                                    $duupbatmfke = "getConfigurationDatasQuery"; 
                                                                                                                                                                                    $ywsrxlqrfw = "getConfigurationDatasQuery"; 
                                                                                                                                                                                    ${$ywsrxlqrfw} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration", array()); 
                                                                                                                                                                                    ${"GLOBALS"}["gvbdeodiwiy"] = "getConfigurationDatasQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["lkztejc"] = "scanUserId"; 
                                                                                                                                                                                    ${${"GLOBALS"}["bponpjacqf"]} = $adb->num_rows(${$duupbatmfke}); 
                                                                                                                                                                                    ${${"GLOBALS"}["lkztejc"]} = $adb->query_result(${${"GLOBALS"}["gvbdeodiwiy"]}, 0, "customfield5"); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["zkvahvrdny"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["muvhjny"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["mllfgvid"]} = ${$syrynqgdkl}["api_url"]; 
                                                                                                                                                                                ${"GLOBALS"}["ssfisxsx"] = "configurationData"; 
                                                                                                                                                                                ${${"GLOBALS"}["ockmkyh"]} = ${${"GLOBALS"}["ssfisxsx"]}["authtoken"]; 
                                                                                                                                                                                ${${"GLOBALS"}["thipsfslsq"]} = ${${"GLOBALS"}["zkvahvrdny"]}["customfield1"]; 
                                                                                                                                                                                $suhvbmejxdg = "getScheduleSendMsgidQuery"; 
                                                                                                                                                                                ${${"GLOBALS"}["ithekks"]} = Settings_CTWhatsApp_ConfigurationDetail_View::getMassBatchConfigurationData(); 
                                                                                                                                                                                $yhdyboces = "selected_ids"; 
                                                                                                                                                                                ${${"GLOBALS"}["qfyvyroyt"]} = ${${"GLOBALS"}["ithekks"]}["batch"]; 
                                                                                                                                                                                ${${"GLOBALS"}["blhofn"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappmassmessage ORDER BY massmessageid DESC LIMIT 0,1"); 
                                                                                                                                                                                ${${"GLOBALS"}["yxlzqdfp"]} = $adb->query_result(${$suhvbmejxdg}, 0, "massmessageid") + 1; 
                                                                                                                                                                                if (${${"GLOBALS"}["raxoxlur"]} == "later") { 
                                                                                                                                                                                    ${"GLOBALS"}["ggfccxj"] = "cronDateTime"; 
                                                                                                                                                                                    ${"GLOBALS"}["gdfieucpk"] = "cronDate_Time"; 
                                                                                                                                                                                    $qscbaxoh = "cronDate_Time"; 
                                                                                                                                                                                    ${${"GLOBALS"}["gdfieucpk"]} = ${${"GLOBALS"}["nfinnnpjts"]}[0] . " " . Vtiger_Time_UIType::getTimeValueWithSeconds(${${"GLOBALS"}["nfinnnpjts"]}[1] . " " . ${${"GLOBALS"}["nfinnnpjts"]}[2]); 
                                                                                                                                                                                    $surcukpxzd = "whatsappUserID"; 
                                                                                                                                                                                    ${"GLOBALS"}["aaoywca"] = "currentDate"; 
                                                                                                                                                                                    ${${"GLOBALS"}["dylmuasy"]} = Vtiger_Datetime_UIType::getDBDateTimeValue(${$qscbaxoh}); 
                                                                                                                                                                                    ${${"GLOBALS"}["gbjmbbijyem"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsappmassmessage(massmessageid, templatesid, whatsappmessage, sendmessagedate, massmsgdatetime, connectuserid) VALUES (?,?,?,?,?,?)", array(${${"GLOBALS"}["pxojjthp"]}, ${${"GLOBALS"}["mnjwfokih"]}, ${${"GLOBALS"}["plnvlkivbn"]}, ${${"GLOBALS"}["aaoywca"]}, ${${"GLOBALS"}["ggfccxj"]}, ${$surcukpxzd})); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["jnzpmquwrn"] = "insertQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["qsserjni"] = "schedulesendmsgid"; 
                                                                                                                                                                                    ${"GLOBALS"}["bhwxklur"] = "msg_body"; 
                                                                                                                                                                                    ${"GLOBALS"}["hirithi"] = "templatesID"; 
                                                                                                                                                                                    ${${"GLOBALS"}["jnzpmquwrn"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsappmassmessage(massmessageid, templatesid, whatsappmessage, sendmessagedate, massmsgdatetime, connectuserid) VALUES (?,?,?,?,?,?)", array(${${"GLOBALS"}["qsserjni"]}, ${${"GLOBALS"}["hirithi"]}, ${${"GLOBALS"}["bhwxklur"]}, ${${"GLOBALS"}["biwpugu"]}, "", ${${"GLOBALS"}["ieyeutbd"]})); 
                                                                                                                                                                                } 
                                                                                                                                                                                foreach (${$yhdyboces} as ${${"GLOBALS"}["pphiwgub"]} => ${${"GLOBALS"}["bqyucn"]}) { 
                                                                                                                                                                                    ${"GLOBALS"}["njidflbcn"] = "scheduleSendmsgQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["ijsocdwy"] = "schedulesendmsgid"; 
                                                                                                                                                                                    ${${"GLOBALS"}["njidflbcn"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsappschedulesendmsg(schedulesendmsgid, recordid, body, status, send_msg, datesendmessage) VALUES (?,?,?,?,?,?)", array(${${"GLOBALS"}["ijsocdwy"]}, ${${"GLOBALS"}["bqyucn"]}, ${${"GLOBALS"}["plnvlkivbn"]}, 0, 0, "")); 
                                                                                                                                                                                } 
                                                                                                                                                                            }public function getWhatsAppTemplateData($request){ 
                                                                                                                                                                                $vriheiuzjnpb = "templateData"; 
                                                                                                                                                                                $ewbzqicw = "templatesid"; 
                                                                                                                                                                                ${"GLOBALS"}["gijxbo"] = "moduleName"; 
                                                                                                                                                                                global $adb, $root_directory; 
                                                                                                                                                                                ${"GLOBALS"}["mugpqqlqvmb"] = "templatesid"; 
                                                                                                                                                                                ${${"GLOBALS"}["gijxbo"]} = $request->getModule(); 
                                                                                                                                                                                ${${"GLOBALS"}["mugpqqlqvmb"]} = $request->get("templatesid"); 
                                                                                                                                                                                if (${$ewbzqicw}) { 
                                                                                                                                                                                    $qmxttsidf = "imagePath"; 
                                                                                                                                                                                    ${"GLOBALS"}["dfylaqwmyls"] = "recordModel"; 
                                                                                                                                                                                    $yxtxxgquxdv = "templatesid"; 
                                                                                                                                                                                    ${${"GLOBALS"}["dfylaqwmyls"]} = Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["ttkyyfpbpxs"]}, "CTWhatsAppTemplates"); 
                                                                                                                                                                                    ${${"GLOBALS"}["bhstjsz"]} = $adb->pquery("SELECT vtiger_attachments.*, vtiger_crmentity.setype FROM vtiger_attachments 
            INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid 
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_attachments.attachmentsid 
            WHERE vtiger_seattachmentsrel.crmid = ? AND vtiger_crmentity.deleted = 0", array(${$yxtxxgquxdv})); 
                                                                                                                                                                                    ${${"GLOBALS"}["jqctqnhxcqm"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "attachmentsid"); 
                                                                                                                                                                                    ${"GLOBALS"}["uwukcge"] = "fileName"; 
                                                                                                                                                                                    ${$qmxttsidf} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "path"); 
                                                                                                                                                                                    ${"GLOBALS"}["toskkmk"] = "type"; 
                                                                                                                                                                                    ${${"GLOBALS"}["uwukcge"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "storedname"); 
                                                                                                                                                                                    ${${"GLOBALS"}["toskkmk"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "type"); 
                                                                                                                                                                                    $ykaqudmfyho = "attachmentPath"; 
                                                                                                                                                                                    $vnuhlndznd = "attachmentPath"; 
                                                                                                                                                                                    ${"GLOBALS"}["urikshobim"] = "fileName"; 
                                                                                                                                                                                    if (strpos(${${"GLOBALS"}["kynysnuizs"]}, "image") !== false) { 
                                                                                                                                                                                        ${${"GLOBALS"}["jfxlffrahfrf"]} = 1; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${"GLOBALS"}["jzybdokbh"] = "fileType"; 
                                                                                                                                                                                        ${${"GLOBALS"}["jzybdokbh"]} = 0; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${"GLOBALS"}["mugmvr"] = "templateData"; 
                                                                                                                                                                                    ${$vnuhlndznd} = ${${"GLOBALS"}["decvtdm"]} . ${${"GLOBALS"}["jqctqnhxcqm"]} . "_" . ${${"GLOBALS"}["jofdmtll"]}; 
                                                                                                                                                                                    ${${"GLOBALS"}["mugmvr"]} = array("templatesid" => ${${"GLOBALS"}["ttkyyfpbpxs"]}, "message" => decode_html($recordModel->get("wptemplate_text")), "image" => ${$ykaqudmfyho}, "fileType" => ${${"GLOBALS"}["jfxlffrahfrf"]}, "fileName" => ${${"GLOBALS"}["urikshobim"]}); 
                                                                                                                                                                                } 
                                                                                                                                                                                return ${$vriheiuzjnpb}; 
                                                                                                                                                                            }public function createWhatsappUser($currenUserID){ 
                                                                                                                                                                                $rljfqfvjkhz = "licenseKey"; 
                                                                                                                                                                                ${"GLOBALS"}["hfqkubeh"] = "query"; 
                                                                                                                                                                                $jruipxmc = "whatsappStatus"; 
                                                                                                                                                                                $rzozwfl = "currenUserID"; 
                                                                                                                                                                                global $adb, $site_URL; 
                                                                                                                                                                                $uduglojvy = "getLicenseDetail"; 
                                                                                                                                                                                ${"GLOBALS"}["jxfyit"] = "whatsappNo"; 
                                                                                                                                                                                ${"GLOBALS"}["nksonglcd"] = "scanMessage"; 
                                                                                                                                                                                if (${${"GLOBALS"}["qckjludy"]} == "yes") { 
                                                                                                                                                                                    ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = 'whatsappBot'", array()); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["ijxvnxbjjvql"] = "currenUserID"; 
                                                                                                                                                                                    ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${${"GLOBALS"}["ijxvnxbjjvql"]})); 
                                                                                                                                                                                } 
                                                                                                                                                                                $fzpqeoxcm = "configurationUserData"; 
                                                                                                                                                                                $vwogyaos = "whatsappStatus"; 
                                                                                                                                                                                $qwbyodptkvn = "qrCodeDetail"; 
                                                                                                                                                                                ${"GLOBALS"}["jfsbiufhxyh"] = "apiUrl"; 
                                                                                                                                                                                ${${"GLOBALS"}["tbfimpnpdyq"]} = $adb->num_rows(${${"GLOBALS"}["hfqkubeh"]}); 
                                                                                                                                                                                if (${${"GLOBALS"}["tbfimpnpdyq"]} == 0) { 
                                                                                                                                                                                    ${${"GLOBALS"}["zkvahvrdny"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${${"GLOBALS"}["qckjludy"]}); 
                                                                                                                                                                                    ${"GLOBALS"}["ovjboaecl"] = "contryCode"; 
                                                                                                                                                                                    ${"GLOBALS"}["adpkwcaygmy"] = "currenUserID"; 
                                                                                                                                                                                    ${${"GLOBALS"}["quvvlftd"]} = ${${"GLOBALS"}["zkvahvrdny"]}["api_url"]; 
                                                                                                                                                                                    $hfseuicoj = "iconActive"; 
                                                                                                                                                                                    ${"GLOBALS"}["jsosxmnxkf"] = "configurationData"; 
                                                                                                                                                                                    ${${"GLOBALS"}["ovjboaecl"]} = ${${"GLOBALS"}["zkvahvrdny"]}["customfield1"]; 
                                                                                                                                                                                    ${$hfseuicoj} = ${${"GLOBALS"}["jsosxmnxkf"]}["iconactive"]; 
                                                                                                                                                                                    if (${${"GLOBALS"}["adpkwcaygmy"]} == "yes") { 
                                                                                                                                                                                        $heizqpskal = "insertQuery"; 
                                                                                                                                                                                        ${$heizqpskal} = $adb->pquery("INSERT INTO vtiger_ctwhatsappusers SET api_url='$adminApiUrl', customfield5='whatsappBot', customfield1='$contryCode', iconactive='$iconActive'", array()); 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${${"GLOBALS"}["gbjmbbijyem"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsappusers SET api_url='$adminApiUrl', customfield5='$currenUserID', customfield1='$contryCode', iconactive='$iconActive'", array()); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["sjnjnsrjbkf"]} = Settings_CTWhatsApp_Record_Model::getUserConfigurationAllDataWithId(${$rzozwfl}); 
                                                                                                                                                                                $yjerast = "authTokenKey"; 
                                                                                                                                                                                $haberdx = "configurationData"; 
                                                                                                                                                                                $xbfozdqgfl = "apiUrl"; 
                                                                                                                                                                                $nnjclugtcd = "whatsappNo"; 
                                                                                                                                                                                ${$xbfozdqgfl} = ${${"GLOBALS"}["sjnjnsrjbkf"]}["api_url"]; 
                                                                                                                                                                                ${$jruipxmc} = ${$fzpqeoxcm}["whatsappstatus"]; 
                                                                                                                                                                                ${$nnjclugtcd} = ${$haberdx}["whatsappno"]; 
                                                                                                                                                                                ${"GLOBALS"}["gqogewrr"] = "qrcodeurl"; 
                                                                                                                                                                                if (${${"GLOBALS"}["jxfyit"]} == "") { 
                                                                                                                                                                                    ${"GLOBALS"}["sddolao"] = "whatsappNo"; 
                                                                                                                                                                                    ${${"GLOBALS"}["sddolao"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsappno"); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["fqngpyssqm"]} = CTWhatsApp_DashBoard_View::getLicenseDetail(); 
                                                                                                                                                                                ${$rljfqfvjkhz} = ${$uduglojvy}["licenseKey"]; 
                                                                                                                                                                                if (${${"GLOBALS"}["qckjludy"]}) { 
                                                                                                                                                                                    $kyylibjho = "whatsappBotQuery"; 
                                                                                                                                                                                    ${$kyylibjho} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_user_groups WHERE userid = ?", array(${${"GLOBALS"}["qckjludy"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["pboencuzf"]} = $adb->query_result(${${"GLOBALS"}["flvrpeapikx"]}, 0, "whatsappbot"); 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${$vwogyaos} == 0) { 
                                                                                                                                                                                    ${"GLOBALS"}["umqgmmpoioi"] = "site_URL"; 
                                                                                                                                                                                    $iyszbmw = "apiUrl"; 
                                                                                                                                                                                    $chwxzliy = "curl"; 
                                                                                                                                                                                    $qmrfmrsy = "curl"; 
                                                                                                                                                                                    $qmqfwfo = "scanMessage"; 
                                                                                                                                                                                    $yqbmrtkaknqf = "currenUserID"; 
                                                                                                                                                                                    $svnhildu = "fields"; 
                                                                                                                                                                                    ${"GLOBALS"}["fsrliujne"] = "licenseKey"; 
                                                                                                                                                                                    $shfpbfk = "qrcodeurl"; 
                                                                                                                                                                                    $gejssluyi = "curl"; 
                                                                                                                                                                                    $ftixdzoqk = "whatsappbot"; 
                                                                                                                                                                                    ${$shfpbfk} = ${$iyszbmw} . "/init"; 
                                                                                                                                                                                    ${"GLOBALS"}["hwaqmkmhg"] = "key"; 
                                                                                                                                                                                    ${$svnhildu} = array("domain" => ${${"GLOBALS"}["lxlelvdmc"]}, "licenceKey" => ${${"GLOBALS"}["fsrliujne"]}, "statusurl" => ${${"GLOBALS"}["umqgmmpoioi"]} . "/modules/CTWhatsApp/WhatsappStatus.php?userid=" . ${$yqbmrtkaknqf},); 
                                                                                                                                                                                    if (${$ftixdzoqk} == 1) { 
                                                                                                                                                                                        $qunufkv = "site_URL"; 
                                                                                                                                                                                        ${"GLOBALS"}["zzxvynthxhho"] = "fields"; 
                                                                                                                                                                                        ${"GLOBALS"}["vsmiouoq"] = "currenUserID"; 
                                                                                                                                                                                        ${${"GLOBALS"}["zzxvynthxhho"]}["url"] = ${$qunufkv} . "/modules/CTWhatsApp//CTWhatAppReceiverBot.php?userid=" . ${${"GLOBALS"}["vsmiouoq"]}; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${"GLOBALS"}["bvsgaax"] = "fields"; 
                                                                                                                                                                                        ${${"GLOBALS"}["bvsgaax"]}["url"] = ${${"GLOBALS"}["lxlelvdmc"]} . "/modules/CTWhatsApp/CTWhatAppReceiver.php?userid=" . ${${"GLOBALS"}["qckjludy"]}; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    foreach (${${"GLOBALS"}["nownjqwj"]} as ${${"GLOBALS"}["hwaqmkmhg"]} => ${${"GLOBALS"}["bqyucn"]}) { 
                                                                                                                                                                                        $ndzvxluva = "fieldsString"; 
                                                                                                                                                                                        ${$ndzvxluva} .= ${${"GLOBALS"}["pphiwgub"]} . "=" . ${${"GLOBALS"}["bqyucn"]} . "&"; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    rtrim(${${"GLOBALS"}["lkpajltyoms"]}, "&"); 
                                                                                                                                                                                    ${${"GLOBALS"}["iuybajel"]} = curl_init(); 
                                                                                                                                                                                    ${"GLOBALS"}["szqomydnjo"] = "qrcodeurl"; 
                                                                                                                                                                                    curl_setopt_array(${$gejssluyi}, array(CURLOPT_URL => ${${"GLOBALS"}["lsbbbbjezkb"]}, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_USERAGENT => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13", CURLOPT_POSTFIELDS => json_encode(${${"GLOBALS"}["nownjqwj"]}), CURLOPT_HTTPHEADER => array("Content-Type: application/json"),)); 
                                                                                                                                                                                    ${${"GLOBALS"}["iryaaagcqts"]} = curl_exec(${$qmrfmrsy}); 
                                                                                                                                                                                    ${${"GLOBALS"}["bgtlhcjtqd"]} = json_decode(${${"GLOBALS"}["iryaaagcqts"]}); 
                                                                                                                                                                                    curl_close(${$chwxzliy}); 
                                                                                                                                                                                    ${${"GLOBALS"}["szqomydnjo"]} = $response->qr; 
                                                                                                                                                                                    ${${"GLOBALS"}["bctlawmck"]} = $response->Authorization; 
                                                                                                                                                                                    ${$qmqfwfo} = $response->message; 
                                                                                                                                                                                    if (${${"GLOBALS"}["bctlawmck"]}) { 
                                                                                                                                                                                        if (${${"GLOBALS"}["qckjludy"]} == "yes") { 
                                                                                                                                                                                            ${"GLOBALS"}["xglpraknfyur"] = "authTokenKey"; 
                                                                                                                                                                                            ${${"GLOBALS"}["xblcywva"]} = $adb->pquery("UPDATE vtiger_ctwhatsappusers SET auth_token=? WHERE customfield5 = 'whatsappBot'", array(${${"GLOBALS"}["xglpraknfyur"]})); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $rxytgzg = "currenUserID"; 
                                                                                                                                                                                            ${${"GLOBALS"}["xblcywva"]} = $adb->pquery("UPDATE vtiger_ctwhatsappusers SET auth_token=? WHERE customfield5 = ?", array(${${"GLOBALS"}["bctlawmck"]}, ${$rxytgzg})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["ftnxey"]} = array("qrcodeurl" => ${${"GLOBALS"}["gqogewrr"]}, "authTokenKey" => ${$yjerast}, "whatsappNo" => ${${"GLOBALS"}["heghltip"]}, "scanMessage" => ${${"GLOBALS"}["nksonglcd"]}, "apiUrl" => ${${"GLOBALS"}["jfsbiufhxyh"]}); 
                                                                                                                                                                                return ${$qwbyodptkvn}; 
                                                                                                                                                                            }public function getWhatsappGroup($groupWhatsappNumber){ 
                                                                                                                                                                                ${"GLOBALS"}["wdnmbcsylyu"] = "groupWhatsappNumber"; 
                                                                                                                                                                                global $current_user, $adb; 
                                                                                                                                                                                ${"GLOBALS"}["mqkxcle"] = "i"; 
                                                                                                                                                                                $torqbhjwg = "whatsappGroupQuery"; 
                                                                                                                                                                                ${${"GLOBALS"}["hkxaoftbkiv"]} = $adb->pquery("SELECT * FROM vtiger_whatsapplog  
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_whatsapplog.whatsapplogid  
            WHERE vtiger_crmentity.deleted = 0 AND vtiger_whatsapplog.whatsapplog_withccode = ? AND vtiger_whatsapplog.whatsapplog_your_number = ?", array("Groups", ${${"GLOBALS"}["wdnmbcsylyu"]})); 
                                                                                                                                                                                $iotdjrat = "allGroupsData"; 
                                                                                                                                                                                $mfkuzixngbz = "rows"; 
                                                                                                                                                                                ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${$torqbhjwg}); 
                                                                                                                                                                                ${$iotdjrat} = array(); 
                                                                                                                                                                                for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["mqkxcle"]} < ${$mfkuzixngbz}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                                                                                                                                                                    $svcjaxd = "i"; 
                                                                                                                                                                                    ${"GLOBALS"}["vppmmiau"] = "allGroupsData"; 
                                                                                                                                                                                    ${"GLOBALS"}["mdtworpnc"] = "groupid"; 
                                                                                                                                                                                    ${"GLOBALS"}["rvrwmrjssb"] = "imagetag"; 
                                                                                                                                                                                    ${${"GLOBALS"}["mdtworpnc"]} = $adb->query_result(${${"GLOBALS"}["hkxaoftbkiv"]}, ${$svcjaxd}, "whatsapplog_msgid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["vnvrdcwsvg"]} = $adb->query_result(${${"GLOBALS"}["hkxaoftbkiv"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapplog_chatid"); 
                                                                                                                                                                                    ${"GLOBALS"}["vitpacmghi"] = "groupMember"; 
                                                                                                                                                                                    $kifxdy = "i"; 
                                                                                                                                                                                    ${${"GLOBALS"}["wftlerhjcih"]} = "layouts/v7/modules/CTWhatsApp/image/groups.png"; 
                                                                                                                                                                                    ${${"GLOBALS"}["xsrlvtgkygm"]} = $adb->query_result(${${"GLOBALS"}["hkxaoftbkiv"]}, ${$kifxdy}, "whatsapplog_msgid"); 
                                                                                                                                                                                    ${"GLOBALS"}["xgrvbq"] = "isReadOnly"; 
                                                                                                                                                                                    ${${"GLOBALS"}["hynfnuhl"]} = 1; 
                                                                                                                                                                                    $nhkauviutmp = "recordId"; 
                                                                                                                                                                                    if (${${"GLOBALS"}["xsrlvtgkygm"]}) { 
                                                                                                                                                                                        $rfpktuvy = "getUnreadGroupsMessagesCount"; 
                                                                                                                                                                                        ${"GLOBALS"}["rlkdriw"] = "getUnreadGroupsquery"; 
                                                                                                                                                                                        ${"GLOBALS"}["hxrehdrgqusq"] = "groupid"; 
                                                                                                                                                                                        $klumjcgbvfu = "groupMember"; 
                                                                                                                                                                                        ${"GLOBALS"}["inhdxbhpy"] = "groupid"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vcnksvuz"]} = " AND vtiger_ctwhatsapp.msgid = ? AND vtiger_ctwhatsapp.whatsapp_chatid != ''"; 
                                                                                                                                                                                        ${$rfpktuvy} = " AND vtiger_ctwhatsapp.message_type = 'Recieved' AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Unread' AND vtiger_ctwhatsapp.msgid = ? "; 
                                                                                                                                                                                        $jwsdqxx = "getUnreadGroupsMessagesCount"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp  
                    INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
                    WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["vcnksvuz"]}, array(${${"GLOBALS"}["inhdxbhpy"]})); 
                                                                                                                                                                                        ${$klumjcgbvfu} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["rlkdriw"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp  
                    INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
                    WHERE vtiger_crmentity.deleted = 0 " . ${$jwsdqxx}, array(${${"GLOBALS"}["hxrehdrgqusq"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["mjbseji"]} = $adb->num_rows(${${"GLOBALS"}["pnmmii"]}); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    $${${"GLOBALS"}["vppmmiau"]}[${${"GLOBALS"}["xsrlvtgkygm"]}] = array("recordId" => ${$nhkauviutmp}, "label" => ${${"GLOBALS"}["vnvrdcwsvg"]}, "profileImage" => ${${"GLOBALS"}["wftlerhjcih"]}, "imagetag" => ${${"GLOBALS"}["rvrwmrjssb"]}, "groupid" => ${${"GLOBALS"}["xsrlvtgkygm"]}, "isReadOnly" => ${${"GLOBALS"}["xgrvbq"]}, "groupMember" => ${${"GLOBALS"}["vitpacmghi"]}, "unreadMessageCount" => ${${"GLOBALS"}["mjbseji"]}); 
                                                                                                                                                                                } 
                                                                                                                                                                                return $${${"GLOBALS"}["dvpncuxxkq"]}; 
                                                                                                                                                                            }public function updateWhatsappRecords($request){ 
                                                                                                                                                                                ${"GLOBALS"}["oiyldvoi"] = "phone"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${"GLOBALS"}["tubebekog"] = "recordId"; 
                                                                                                                                                                                $vwxblv = "whatsappid"; 
                                                                                                                                                                                ${${"GLOBALS"}["oiyldvoi"]} = $request->get("phone"); 
                                                                                                                                                                                ${${"GLOBALS"}["tubebekog"]} = $request->get("recordId"); 
                                                                                                                                                                                ${${"GLOBALS"}["vngcnkdh"]} = $request->get("task"); 
                                                                                                                                                                                ${$vwxblv} = $request->get("whatsappid"); 
                                                                                                                                                                                if (${${"GLOBALS"}["vngcnkdh"]} == "yes") { 
                                                                                                                                                                                    $tgicunckn = "updateQuery"; 
                                                                                                                                                                                    $boxxvjhk = "whatsappid"; 
                                                                                                                                                                                    ${$tgicunckn} = $adb->pquery("UPDATE vtiger_ctwhatsapp SET whatsapp_chatid = ? WHERE ctwhatsappid = ?", array(${${"GLOBALS"}["uasigafv"]}, ${$boxxvjhk})); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${"GLOBALS"}["edquoxnigjp"] = "updateQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["nnxrjucfg"] = "phone"; 
                                                                                                                                                                                    ${${"GLOBALS"}["edquoxnigjp"]} = $adb->pquery("UPDATE vtiger_ctwhatsapp SET whatsapp_contactid = ? WHERE whatsapp_withccode = ?", array(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["nnxrjucfg"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["hbewyxs"]} = $adb->pquery("UPDATE vtiger_whatsapplog SET whatsapplog_contactid = ? WHERE whatsapplog_withccode = ?", array(${${"GLOBALS"}["uasigafv"]}, ${${"GLOBALS"}["swmhivnb"]})); 
                                                                                                                                                                                } 
                                                                                                                                                                            }public function getWhatsappTemplates(){ 
                                                                                                                                                                                $bjkqph = "wpTemplateViewQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["pxrvrli"] = "whatsappTemplateRows"; 
                                                                                                                                                                                $lzlwinwk = "wpTemplateViewQuery"; 
                                                                                                                                                                                $tbrmjurm = "listQuery"; 
                                                                                                                                                                                $xkhlgorl = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["bdbzrkgrhmm"] = "listQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["kftjqtk"] = "j"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${$lzlwinwk} = $adb->pquery("SELECT * FROM vtiger_customview WHERE entitytype = 'CTWhatsAppTemplates' AND viewname = 'All'"); 
                                                                                                                                                                                ${${"GLOBALS"}["wcymrvvndcy"]} = $adb->query_result(${$bjkqph}, 0, "cvid"); 
                                                                                                                                                                                ${${"GLOBALS"}["mqrxqzrv"]} = Vtiger_ListView_Model::getInstance("CTWhatsAppTemplates", ${${"GLOBALS"}["wcymrvvndcy"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["cmmcswceimfk"]} = $listViewModel->get("query_generator"); 
                                                                                                                                                                                $ofsbcym = "templatesArray"; 
                                                                                                                                                                                ${${"GLOBALS"}["bdbzrkgrhmm"]} = $queryGenerator->getQuery(); 
                                                                                                                                                                                $yqynrhiua = "j"; 
                                                                                                                                                                                ${${"GLOBALS"}["etedhwm"]} = $adb->pquery(${$tbrmjurm}, array()); 
                                                                                                                                                                                ${${"GLOBALS"}["pxrvrli"]} = $adb->num_rows(${$xkhlgorl}); 
                                                                                                                                                                                ${${"GLOBALS"}["teuwexyck"]} = array(); 
                                                                                                                                                                                ${"GLOBALS"}["tkdvbfcolb"] = "whatsappTemplateRows"; 
                                                                                                                                                                                for (${${"GLOBALS"}["kftjqtk"]} = 0; ${$yqynrhiua} < ${${"GLOBALS"}["tkdvbfcolb"]}; ${${"GLOBALS"}["ileqdj"]}++) { 
                                                                                                                                                                                    $eemxrvdhnjh = "templatesID"; 
                                                                                                                                                                                    ${"GLOBALS"}["vlnqkqnj"] = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                    ${$eemxrvdhnjh} = $adb->query_result(${${"GLOBALS"}["vlnqkqnj"]}, ${${"GLOBALS"}["ileqdj"]}, "ctwhatsapptemplatesid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["ijviifodk"]} = $adb->query_result(${${"GLOBALS"}["etedhwm"]}, ${${"GLOBALS"}["ileqdj"]}, "wptemplate_title"); 
                                                                                                                                                                                    ${${"GLOBALS"}["teuwexyck"]}[${${"GLOBALS"}["mnjwfokih"]}] = ${${"GLOBALS"}["ijviifodk"]}; 
                                                                                                                                                                                } 
                                                                                                                                                                                return ${$ofsbcym}; 
                                                                                                                                                                            }public function getWhatsappTemplatesScannumber($more){ 
                                                                                                                                                                                ${"GLOBALS"}["ittklrnlcpz"] = "whatsappTemplateRows"; 
                                                                                                                                                                                $hbdiaftolho = "j"; 
                                                                                                                                                                                ${"GLOBALS"}["jcvmle"] = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["ylqiso"] = "templatesArray"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                ${${"GLOBALS"}["fwruobjnmov"]} = $adb->pquery("SELECT * FROM vtiger_customview WHERE entitytype = 'CTWhatsAppTemplates' AND viewname = 'All'"); 
                                                                                                                                                                                $itukjnt = "queryGenerator"; 
                                                                                                                                                                                ${${"GLOBALS"}["wcymrvvndcy"]} = $adb->query_result(${${"GLOBALS"}["fwruobjnmov"]}, 0, "cvid"); 
                                                                                                                                                                                ${${"GLOBALS"}["mqrxqzrv"]} = Vtiger_ListView_Model::getInstance("CTWhatsAppTemplates", ${${"GLOBALS"}["wcymrvvndcy"]}); 
                                                                                                                                                                                ${$itukjnt} = $listViewModel->get("query_generator"); 
                                                                                                                                                                                ${${"GLOBALS"}["gwdneafog"]} = $queryGenerator->getQuery(); 
                                                                                                                                                                                if (${${"GLOBALS"}["punylibprbtr"]} != "no") { 
                                                                                                                                                                                    ${"GLOBALS"}["fitqfxq"] = "listQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["fitqfxq"]} .= " AND vtiger_ctwhatsapptemplates.wptemplate_quickaccess = '1' ORDER BY vtiger_crmentity.modifiedtime DESC LIMIT 0,5"; 
                                                                                                                                                                                } 
                                                                                                                                                                                ${"GLOBALS"}["wvzslncrn"] = "j"; 
                                                                                                                                                                                ${${"GLOBALS"}["jcvmle"]} = $adb->pquery(${${"GLOBALS"}["gwdneafog"]}, array()); 
                                                                                                                                                                                ${${"GLOBALS"}["heihfxihu"]} = $adb->num_rows(${${"GLOBALS"}["etedhwm"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["ylqiso"]} = array(); 
                                                                                                                                                                                for (${${"GLOBALS"}["ileqdj"]} = 0; ${$hbdiaftolho} < ${${"GLOBALS"}["ittklrnlcpz"]}; ${${"GLOBALS"}["wvzslncrn"]}++) { 
                                                                                                                                                                                    $uonvnkknteww = "j"; 
                                                                                                                                                                                    ${"GLOBALS"}["xhfiordfujm"] = "templateTitle"; 
                                                                                                                                                                                    $xbhepyhoqpi = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                    $tlitit = "templateTitle"; 
                                                                                                                                                                                    ${"GLOBALS"}["rppwkisrum"] = "templatesID"; 
                                                                                                                                                                                    ${${"GLOBALS"}["rppwkisrum"]} = $adb->query_result(${$xbhepyhoqpi}, ${${"GLOBALS"}["ileqdj"]}, "ctwhatsapptemplatesid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["xhfiordfujm"]} = $adb->query_result(${${"GLOBALS"}["etedhwm"]}, ${$uonvnkknteww}, "wptemplate_title"); 
                                                                                                                                                                                    ${${"GLOBALS"}["teuwexyck"]}[${${"GLOBALS"}["mnjwfokih"]}] = ${$tlitit}; 
                                                                                                                                                                                } 
                                                                                                                                                                                return ${${"GLOBALS"}["teuwexyck"]}; 
                                                                                                                                                                            }public function getRelatedToId($mobileno){ 
                                                                                                                                                                                ${"GLOBALS"}["trmxvyfics"] = "resultData"; 
                                                                                                                                                                                ${"GLOBALS"}["yphkkyoshy"] = "i"; 
                                                                                                                                                                                ${"GLOBALS"}["puylyllrb"] = "relatedTo"; 
                                                                                                                                                                                ${"GLOBALS"}["eexrls"] = "resultData"; 
                                                                                                                                                                                ${"GLOBALS"}["ihwinegugs"] = "rows"; 
                                                                                                                                                                                ${"GLOBALS"}["veghqkmike"] = "whatsappModuleQuery"; 
                                                                                                                                                                                global $adb; 
                                                                                                                                                                                $ifylhcidw = "whatsappModuleQuery"; 
                                                                                                                                                                                ${$ifylhcidw} = $adb->pquery("SELECT * FROM vtiger_ctwharsappallow_whatsappmodule WHERE active = 1"); 
                                                                                                                                                                                ${${"GLOBALS"}["ihwinegugs"]} = $adb->num_rows(${${"GLOBALS"}["veghqkmike"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["ppfivef"]} = array(); 
                                                                                                                                                                                for (${${"GLOBALS"}["yphkkyoshy"]} = 0; ${${"GLOBALS"}["gjdoju"]} < ${${"GLOBALS"}["iwyngpalekm"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                                                                                                                                                                    ${"GLOBALS"}["jpkwrfebpy"] = "i"; 
                                                                                                                                                                                    ${"GLOBALS"}["fpyowfmx"] = "whatsappModuleQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["peissyfumdch"]} = $adb->query_result(${${"GLOBALS"}["fpyowfmx"]}, ${${"GLOBALS"}["jpkwrfebpy"]}, "module"); 
                                                                                                                                                                                    ${"GLOBALS"}["cmjivdr"] = "modulename"; 
                                                                                                                                                                                    ${${"GLOBALS"}["kivdwa"]} = CTWhatsApp_Record_Model::getmoduleIsEnable(${${"GLOBALS"}["cmjivdr"]}); 
                                                                                                                                                                                    if (${${"GLOBALS"}["peissyfumdch"]} == "Leads") { 
                                                                                                                                                                                        ${${"GLOBALS"}["laugwp"]} = " AND vtiger_leaddetails.converted = 0"; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $hwuxqyux = "leadQuery"; 
                                                                                                                                                                                        ${$hwuxqyux} = ""; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (${${"GLOBALS"}["kivdwa"]} == 0) { 
                                                                                                                                                                                        ${${"GLOBALS"}["eokkqrtn"]} = CTWhatsApp_Record_Model::getWhatsappAllowModuleFields(${${"GLOBALS"}["peissyfumdch"]}); 
                                                                                                                                                                                        $wjtwmgvru = "row"; 
                                                                                                                                                                                        $zplmumyxrx = "baseTableid"; 
                                                                                                                                                                                        ${"GLOBALS"}["dssrannmthn"] = "baseTable"; 
                                                                                                                                                                                        $gxyfbqzhldlv = "mobileno"; 
                                                                                                                                                                                        ${${"GLOBALS"}["swlnsqrjjzye"]} = ${${"GLOBALS"}["eokkqrtn"]}["phoneField"]; 
                                                                                                                                                                                        $dhqwal = "modulename"; 
                                                                                                                                                                                        ${"GLOBALS"}["ktxtiwlei"] = "query"; 
                                                                                                                                                                                        ${"GLOBALS"}["irigridpgavg"] = "moduleInstance"; 
                                                                                                                                                                                        ${"GLOBALS"}["whsztiw"] = "baseTable"; 
                                                                                                                                                                                        $eddgcuqqo = "leadQuery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["intledgdprm"]} = CRMEntity::getInstance(${$dhqwal}); 
                                                                                                                                                                                        $fyxcdcowqh = "query"; 
                                                                                                                                                                                        ${${"GLOBALS"}["irigridpgavg"]} = Vtiger_Module::getInstance(${${"GLOBALS"}["peissyfumdch"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["dssrannmthn"]} = $moduleInstance->basetable; 
                                                                                                                                                                                        ${$zplmumyxrx} = $moduleInstance->basetableid; 
                                                                                                                                                                                        ${"GLOBALS"}["esrykwlybl"] = "query"; 
                                                                                                                                                                                        ${${"GLOBALS"}["igedgfzdhrml"]} = 0; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = "SELECT * FROM " . ${${"GLOBALS"}["whsztiw"]}; 
                                                                                                                                                                                        foreach ($moduleModel->tab_name_index as ${${"GLOBALS"}["pphiwgub"]} => ${${"GLOBALS"}["bqyucn"]}) { 
                                                                                                                                                                                            ${${"GLOBALS"}["igedgfzdhrml"]} = ${${"GLOBALS"}["igedgfzdhrml"]} + 1; 
                                                                                                                                                                                            if (${${"GLOBALS"}["igedgfzdhrml"]} != 2) { 
                                                                                                                                                                                                ${"GLOBALS"}["klozdholda"] = "key"; 
                                                                                                                                                                                                ${"GLOBALS"}["wtgbrdlyy"] = "key"; 
                                                                                                                                                                                                if (${${"GLOBALS"}["wtgbrdlyy"]} != "vtiger_seproductsrel" && ${${"GLOBALS"}["klozdholda"]} != "vtiger_producttaxrel") { 
                                                                                                                                                                                                    $nnjrdhxf = "value"; 
                                                                                                                                                                                                    $qnqjwpg = "key"; 
                                                                                                                                                                                                    ${"GLOBALS"}["caltrc"] = "baseTable"; 
                                                                                                                                                                                                    ${${"GLOBALS"}["vvonkioccd"]} .= " INNER JOIN " . ${$qnqjwpg} . " ON " . ${${"GLOBALS"}["pphiwgub"]} . "." . ${$nnjrdhxf} . " = " . ${${"GLOBALS"}["caltrc"]} . "." . ${${"GLOBALS"}["ktrrbkxglx"]}; 
                                                                                                                                                                                                } 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${$fyxcdcowqh} .= " WHERE REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(" . ${${"GLOBALS"}["swlnsqrjjzye"]} . ", ')', ''), '(', ''),'-',''),' ',''),'.','') LIKE '%" . ${$gxyfbqzhldlv} . "' AND vtiger_crmentity.deleted=0"; 
                                                                                                                                                                                        ${${"GLOBALS"}["esrykwlybl"]} .= ${$eddgcuqqo}; 
                                                                                                                                                                                        ${${"GLOBALS"}["tcnlxlgnvgd"]} = $adb->pquery(${${"GLOBALS"}["ktxtiwlei"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["nudtoiqqufg"]} = $adb->num_rows(${${"GLOBALS"}["tcnlxlgnvgd"]}); 
                                                                                                                                                                                        if (${$wjtwmgvru}) { 
                                                                                                                                                                                            ${"GLOBALS"}["vccrkpbbb"] = "smownerid"; 
                                                                                                                                                                                            ${"GLOBALS"}["bzhhrprfc"] = "baseTableid"; 
                                                                                                                                                                                            ${"GLOBALS"}["ekwarymvso"] = "queryResult"; 
                                                                                                                                                                                            ${${"GLOBALS"}["isobrnmvsv"]} = $adb->query_result(${${"GLOBALS"}["tcnlxlgnvgd"]}, 0, ${${"GLOBALS"}["bzhhrprfc"]}); 
                                                                                                                                                                                            ${"GLOBALS"}["seocqlgm"] = "displayname"; 
                                                                                                                                                                                            ${${"GLOBALS"}["vccrkpbbb"]} = $adb->query_result(${${"GLOBALS"}["ekwarymvso"]}, 0, "smownerid"); 
                                                                                                                                                                                            $yegldwu = "queryResult"; 
                                                                                                                                                                                            ${${"GLOBALS"}["seocqlgm"]} = $adb->query_result(${$yegldwu}, 0, "label"); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["trmxvyfics"]} = array("relatedTo" => ${${"GLOBALS"}["puylyllrb"]}, "smownerid" => ${${"GLOBALS"}["bgwsreug"]}, "displayname" => ${${"GLOBALS"}["mfilwrvwwkx"]}); 
                                                                                                                                                                                return ${${"GLOBALS"}["eexrls"]}; 
                                                                                                                                                                            }public function getWhatsAppStoragePath(){global$root_directory;${"GLOBALS"}["fpehlotr"]="month";${"GLOBALS"}["kbrdcawtkkwn"]="whatsappfolderpath";${"GLOBALS"}["vdybxbnnbcu"]="year";${${"GLOBALS"}["vdybxbnnbcu"]}=date("Y");${"GLOBALS"}["qfirbp"]="root_directory";${"GLOBALS"}["eyevlzgpigt"]="day";${${"GLOBALS"}["tbtxdhuxud"]}=date("F");${${"GLOBALS"}["voorvljxgu"]}=date("j");${"GLOBALS"}["kpcjdsy"]="whatsappfolderpath";$jxhactd="year";$bqwtdmjxcqr="month";$bideagmn="day";${${"GLOBALS"}["mrzfhft"]}="";${"GLOBALS"}["elcjlhsqppy"]="root_directory";${${"GLOBALS"}["kbrdcawtkkwn"]}="modules / CTWhatsApp / CTWhatsAppStorage / ";${"GLOBALS"}["zmbwspwvrcxr"]="year";if(!is_dir(${${"GLOBALS"}["cxqviycuznj"]}.${${"GLOBALS"}["ncpnovmrpg"]})){$buegtddn="root_directory";${"GLOBALS"}["nvxznpdteoo"] = "root_directory";${"GLOBALS"}["forrbxgrrp"] = "whatsappfolderpath";mkdir(${$buegtddn} . ${${"GLOBALS"}["ncpnovmrpg"]});chmod(${${"GLOBALS"}["nvxznpdteoo"]} . ${${"GLOBALS"}["forrbxgrrp"]}, 0777);}if(!is_dir(${${"GLOBALS"}["qfirbp"]}.${${"GLOBALS"}["ncpnovmrpg"]}.${$jxhactd})){ 
                                                                                                                                                                                ${"GLOBALS"}["sjpcllornt"] = "year"; 
                                                                                                                                                                                $ayoiomvujn = "root_directory"; 
                                                                                                                                                                                ${"GLOBALS"}["sbfxldeli"] = "year"; 
                                                                                                                                                                                ${"GLOBALS"}["dvahqlfe"] = "root_directory"; 
                                                                                                                                                                                mkdir(${$ayoiomvujn} . ${${"GLOBALS"}["ncpnovmrpg"]} . ${${"GLOBALS"}["sbfxldeli"]}); 
                                                                                                                                                                                chmod(${${"GLOBALS"}["dvahqlfe"]} . ${${"GLOBALS"}["ncpnovmrpg"]} . ${${"GLOBALS"}["sjpcllornt"]}, 0777); 
                                                                                                                                                                            }if(!is_dir(${${"GLOBALS"}["cxqviycuznj"]}.${${"GLOBALS"}["kpcjdsy"]}.${${"GLOBALS"}["zmbwspwvrcxr"]}." / ".${$bqwtdmjxcqr})){${"GLOBALS"}["qlsrhbipw"]="whatsappfolderpath";${"GLOBALS"}["oiqdjkzmsn"] = "root_directory";$mpfglllwsjti = "whatsappfolderpath";mkdir(${${"GLOBALS"}["oiqdjkzmsn"]} . ${$mpfglllwsjti} . "$year/$month/");chmod(${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["qlsrhbipw"]} . "$year/$month/", 0777);}${"GLOBALS"}["bslrsxj"]="day";$ijabmcgtj="whatsappfolderpath";if(${${"GLOBALS"}["eyevlzgpigt"]}>0&&${${"GLOBALS"}["voorvljxgu"]}<=7)${${"GLOBALS"}["mrzfhft"]}="week1";elseif(${$bideagmn}>7&&${${"GLOBALS"}["voorvljxgu"]}<=14)${${"GLOBALS"}["mrzfhft"]}="week2";elseif(${${"GLOBALS"}["bslrsxj"]}>14&&${${"GLOBALS"}["voorvljxgu"]}<=21)${${"GLOBALS"}["mrzfhft"]}="week3";elseif(${${"GLOBALS"}["voorvljxgu"]}>21&&${${"GLOBALS"}["voorvljxgu"]}<=28)${${"GLOBALS"}["mrzfhft"]}="week4";else${${"GLOBALS"}["mrzfhft"]}="week5";if(!is_dir(${${"GLOBALS"}["elcjlhsqppy"]}.${${"GLOBALS"}["ncpnovmrpg"]}.${${"GLOBALS"}["mwaajjd"]}." / ".${${"GLOBALS"}["fpehlotr"]}." / ".${${"GLOBALS"}["mrzfhft"]})){${"GLOBALS"}["smvltzve"]="whatsappfolderpath";${"GLOBALS"}["jdmvpfh"] = "root_directory";mkdir(${${"GLOBALS"}["jdmvpfh"]} . ${${"GLOBALS"}["ncpnovmrpg"]} . "$year/$month/$week/");chmod(${${"GLOBALS"}["cxqviycuznj"]} . ${${"GLOBALS"}["smvltzve"]} . "$year/$month/$week/", 0777);}$nkdezqqz="target_file";${${"GLOBALS"}["oxmieksvyt"]}=${${"GLOBALS"}["cxqviycuznj"]}.${$ijabmcgtj}."$year / $month / $week / ";return${$nkdezqqz};}public function getWhatsAppTemplatesData($recordid){${"GLOBALS"}["mtbluqktro"]="whatsAppTemplateData";$itzeyjnpgd = "isTemplates";${"GLOBALS"}["sxdhrapnot"] = "templateMsg";global$adb;${${"GLOBALS"}["etedhwm"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapptemplates  
        INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid  
        INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.crmid = vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid  
        INNER JOIN vtiger_attachments ON vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid 
        WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid = ?", array(${${"GLOBALS"}["fzfraqda"]}));${${"GLOBALS"}["wpbkdifrnt"]} = $adb->num_rows(${${"GLOBALS"}["etedhwm"]});if (${$itzeyjnpgd}) { 
                                                                                                                                                                                $yuhhotpoj = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                $olmeagz = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["ehauxal"] = "templateMsg"; 
                                                                                                                                                                                ${"GLOBALS"}["ruktyd"] = "templatesID"; 
                                                                                                                                                                                ${"GLOBALS"}["akkqkcpfug"] = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                $mcbqpwe = "message"; 
                                                                                                                                                                                ${${"GLOBALS"}["ruktyd"]} = $adb->query_result(${${"GLOBALS"}["akkqkcpfug"]}, 0, "ctwhatsapptemplatesid"); 
                                                                                                                                                                                ${"GLOBALS"}["worymoygvjd"] = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                ${$mcbqpwe} = $adb->query_result(${$olmeagz}, 0, "wptemplate_text"); 
                                                                                                                                                                                ${${"GLOBALS"}["ehauxal"]} = $adb->query_result(${${"GLOBALS"}["worymoygvjd"]}, 0, "wptemplate_msg"); 
                                                                                                                                                                                ${${"GLOBALS"}["smmruccgs"]} = $adb->query_result(${$yuhhotpoj}, 0, "storedname"); 
                                                                                                                                                                            }${${"GLOBALS"}["mtbluqktro"]} = array("templatesID" => ${${"GLOBALS"}["mnjwfokih"]}, "message" => ${${"GLOBALS"}["eznglmnjxkz"]}, "templateMsg" => ${${"GLOBALS"}["sxdhrapnot"]}, "wptemplateImage" => ${${"GLOBALS"}["smmruccgs"]});return ${${"GLOBALS"}["wxkifzqi"]};}public function getAttachmentData($templatesID){global$adb;${${"GLOBALS"}["bhstjsz"]}=$adb->pquery("SELECT vtiger_attachments .*, vtiger_crmentity . setype FROM vtiger_attachments 
        INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel . attachmentsid = vtiger_attachments . attachmentsid 
        INNER JOIN vtiger_crmentity ON vtiger_crmentity . crmid = vtiger_attachments . attachmentsid 
        WHERE vtiger_seattachmentsrel . crmid = ? and vtiger_crmentity . deleted = 0",array(${${"GLOBALS"}["mnjwfokih"]}));${${"GLOBALS"}["jqctqnhxcqm"]}=$adb->query_result(${${"GLOBALS"}["bhstjsz"]},0,"attachmentsid");${"GLOBALS"}["zdppdex"]="imageId";${${"GLOBALS"}["decvtdm"]}=$adb->query_result(${${"GLOBALS"}["bhstjsz"]},0,"path");$ngrxlb="getAttachmentQuery";${"GLOBALS"}["ncdwmvwmkbv"]="imageName";${${"GLOBALS"}["ytvwtwpbrom"]}=$adb->query_result(${$ngrxlb},0,"storedname");${${"GLOBALS"}["myvftma"]}=array("imageId"=>${${"GLOBALS"}["zdppdex"]},"imagePath"=>${${"GLOBALS"}["decvtdm"]},"imageName"=>${${"GLOBALS"}["ncdwmvwmkbv"]});return${${"GLOBALS"}["myvftma"]};}public function getWhatsAppRecordQuery($startdate,$enddate){$uekeydytamvg="query";$fsvgpcm = "whatsappQuery";${$fsvgpcm} = CTWhatsApp_Record_Model::unreadQuery();${"GLOBALS"}["hedfyharx"] = "whatsappQuery";${$uekeydytamvg} = ${${"GLOBALS"}["hedfyharx"]} . " AND vtiger_ctwhatsapp.whatsapp_contactid = ? AND DATE(vtiger_crmentity.createdtime) BETWEEN '$startdate' AND '$enddate'";return ${${"GLOBALS"}["vvonkioccd"]};}public function getPhoneFieldLabel($tabid,$phoneField){global$adb;${"GLOBALS"}["pygxsnfli"]="getFieldsLabel";${"GLOBALS"}["cvvueowzxp"]="phonefield";${${"GLOBALS"}["pygxsnfli"]}=$adb->pquery("SELECT * FROM vtiger_field WHERE tabid =? and fieldname =?",array(${${"GLOBALS"}["kgwoicgs"]},${${"GLOBALS"}["swlnsqrjjzye"]}));${${"GLOBALS"}["cvvueowzxp"]}=$adb->query_result(${${"GLOBALS"}["sbbelbpuzku"]},0,"fieldlabel");return${${"GLOBALS"}["ilieifedr"]};}public function userConfigurationData($currenUserID){${"GLOBALS"}["vutnwtcfuk"]="queryUserExist";global$adb;${"GLOBALS"}["mrxxmyxeetc"] = "currenUserID";${"GLOBALS"}["nqcgkvju"] = "numRowsUsers";${${"GLOBALS"}["vutnwtcfuk"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield3 LIKE '%" . ${${"GLOBALS"}["mrxxmyxeetc"]} . "%'", array());$ifpuqf = "queryUserExist";${${"GLOBALS"}["xotmcagdlc"]} = $adb->num_rows(${$ifpuqf});if (${${"GLOBALS"}["xotmcagdlc"]} == 0) { 
                                                                                                                                                                                ${"GLOBALS"}["zbohlkspkbws"] = "groupid"; 
                                                                                                                                                                                ${"GLOBALS"}["vouvdzjhibo"] = "numRowsUsers"; 
                                                                                                                                                                                $vbxoqqumjf = "queryGroupExist"; 
                                                                                                                                                                                $vckocfo = "currenUserID"; 
                                                                                                                                                                                ${"GLOBALS"}["cqgddmbtbm"] = "groupid"; 
                                                                                                                                                                                ${${"GLOBALS"}["vkkcgmyyzxj"]} = $adb->pquery("SELECT * FROM vtiger_group2role INNER JOIN vtiger_user2role ON vtiger_user2role.roleid = vtiger_group2role.roleid WHERE vtiger_user2role.userid = ?", array(${$vckocfo})); 
                                                                                                                                                                                ${${"GLOBALS"}["cqgddmbtbm"]} = $adb->query_result(${${"GLOBALS"}["vkkcgmyyzxj"]}, 0, "groupid"); 
                                                                                                                                                                                if (${${"GLOBALS"}["zbohlkspkbws"]} != "") { 
                                                                                                                                                                                    $yjiorfb = "queryGroupExist"; 
                                                                                                                                                                                    ${$yjiorfb} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield3 LIKE '%" . ${${"GLOBALS"}["xsrlvtgkygm"]} . "%'", array()); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["vouvdzjhibo"]} = $adb->num_rows(${$vbxoqqumjf}); 
                                                                                                                                                                            }return ${${"GLOBALS"}["nqcgkvju"]};}public function updateWhatsAppSatatus($currenUserID){global$adb;${"GLOBALS"}["eondkwdpo"]="udpateStatusQuery";${"GLOBALS"}["irzfwieccrj"]="currenUserID";${${"GLOBALS"}["xrfvphvlupbc"]}=$adb->pquery("UPDATE vtiger_ctwhatsappconfiguration SET whatsappstatus = 0 WHERE customfield5 = ?",array(${${"GLOBALS"}["irzfwieccrj"]}));$nxshcumj="currenUserID";${${"GLOBALS"}["eondkwdpo"]}=$adb->pquery("UPDATE vtiger_ctwhatsappusers SET whatsappstatus = 0 WHERE customfield5 = ?",array(${$nxshcumj}));}public function createNewUser($currenUserID,$adminApiUrl,$contryCode,$iconActive){$fxorouphq="numrows";$mlrxcfgdp = "numrows";${"GLOBALS"}["sbhskmps"] = "currenUserID";$ryggexf = "query";global$adb;${$ryggexf} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield5 = ?", array(${${"GLOBALS"}["sbhskmps"]}));${$fxorouphq} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]});if (${$mlrxcfgdp} == 0) { 
                                                                                                                                                                                ${${"GLOBALS"}["gbjmbbijyem"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsappconfiguration SET api_url='$adminApiUrl', customfield5='$currenUserID', customfield1='$contryCode', iconactive='$iconActive'", array()); 
                                                                                                                                                                            }}public function getLastMessageDataTime($massMessageid){global$adb;$qelwdm="lastMessageDataTime";$owdldnlwr="query";${${"GLOBALS"}["vvonkioccd"]}=$adb->pquery("SELECT * FROM vtiger_ctwhatsappschedulesendmsg WHERE schedulesendmsgid = $massMessageid and vtiger_ctwhatsappschedulesendmsg . status = 1 and send_msg = 1 and datesendmessage != '' ORDER BY datesendmessage DESC LIMIT 0,1");${$qelwdm}=$adb->query_result(${$owdldnlwr},0,"datesendmessage");return${${"GLOBALS"}["ckjjuxswlcc"]};}public function getSendQueueMessages($request){${"GLOBALS"}["hujctljgo"]="date_var";${"GLOBALS"}["gvdwqtguia"] = "progress";$nblxxteu = "progress";global$adb;${"GLOBALS"}["eiqtcgjed"] = "selectPeriodData";${"GLOBALS"}["pvsbswwyh"] = "selectPeriodData";${${"GLOBALS"}["obgnzq"]} = $request->get("progress");${"GLOBALS"}["tuhbqls"] = "getMassMessageDetail";$lgywtvso = "getMassMessageDetail";$fllesbopc = "i";${"GLOBALS"}["vfneihpnx"] = "i";if (${${"GLOBALS"}["gvdwqtguia"]} == "Completed") { 
                                                                                                                                                                                ${"GLOBALS"}["vakbftlguu"] = "progressMessages"; 
                                                                                                                                                                                ${${"GLOBALS"}["vakbftlguu"]} = " AND status = 1"; 
                                                                                                                                                                            } else if (${$nblxxteu} == "InProgress") { 
                                                                                                                                                                                $liitamraucx = "progressMessages"; 
                                                                                                                                                                                ${$liitamraucx} = " AND status = 0"; 
                                                                                                                                                                            } else if (${${"GLOBALS"}["obgnzq"]} == "Hold") { 
                                                                                                                                                                                ${${"GLOBALS"}["ynovrerbate"]} = " AND status = 2"; 
                                                                                                                                                                            } else if (${${"GLOBALS"}["obgnzq"]} == "All") { 
                                                                                                                                                                                $gjbelisurblb = "progressMessages"; 
                                                                                                                                                                                ${$gjbelisurblb} = " AND status IN (0,1,2)"; 
                                                                                                                                                                            }$mdyigmshfsg = "i";${${"GLOBALS"}["hwsypray"]} = date("Y-m-d H:i:s");${${"GLOBALS"}["pyyxrkd"]} = $adb->formatDate(${${"GLOBALS"}["hujctljgo"]}, true);${"GLOBALS"}["vmvhcaovuvf"] = "request";${${"GLOBALS"}["tuhbqls"]} = CTWhatsApp_DashBoard_View::getMassMessageDetail();${${"GLOBALS"}["vhonmw"]} = ${$lgywtvso}["batch"];${${"GLOBALS"}["wxmwjqpzuav"]} = ${${"GLOBALS"}["cxvqtrinjqyv"]}["timeinterval"];${${"GLOBALS"}["yhlbddflnxh"]} = CTWhatsApp_DashBoard_View::getPeriodDataQuery(${${"GLOBALS"}["vmvhcaovuvf"]}, "sendmessagedate");${${"GLOBALS"}["eiqtcgjed"]} = $request->get("periodData");$tksliug = "query";if (${${"GLOBALS"}["pvsbswwyh"]} == "alltime") { 
                                                                                                                                                                                $pcoquswb = "query"; 
                                                                                                                                                                                ${$pcoquswb} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappmassmessage ORDER BY massmessageid DESC"); 
                                                                                                                                                                            } else { 
                                                                                                                                                                                ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappmassmessage WHERE " . ${${"GLOBALS"}["yhlbddflnxh"]} . " ORDER BY massmessageid DESC LIMIT 0,5"); 
                                                                                                                                                                            }${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${$tksliug});$gocyhqbjn = "sendqueueMessages";${${"GLOBALS"}["pkzavxgmg"]} = array();for (${${"GLOBALS"}["vfneihpnx"]} = 0; ${$mdyigmshfsg} < ${${"GLOBALS"}["iwyngpalekm"]}; ${$fllesbopc}++) { 
                                                                                                                                                                                $bsfiwhfodql = "readRows"; 
                                                                                                                                                                                $tyhdpbkxjst = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                $icltvlxckdgf = "connectWPNumberQuery"; 
                                                                                                                                                                                $jkxhwwmrpgnx = "connectuserid"; 
                                                                                                                                                                                $pprxwnf = "queryScheduleSendmsg"; 
                                                                                                                                                                                $buqrcvvg = "i"; 
                                                                                                                                                                                $llyoroaeewx = "querytotalsendmsg"; 
                                                                                                                                                                                ${"GLOBALS"}["zzobzina"] = "i"; 
                                                                                                                                                                                ${${"GLOBALS"}["nijwyklrk"]} = ""; 
                                                                                                                                                                                ${${"GLOBALS"}["kurpdrkrdf"]} = ""; 
                                                                                                                                                                                ${"GLOBALS"}["kgjwlrjlhte"] = "query"; 
                                                                                                                                                                                ${"GLOBALS"}["srbemehsr"] = "whatsappMessage"; 
                                                                                                                                                                                ${$bsfiwhfodql} = 0; 
                                                                                                                                                                                ${"GLOBALS"}["zcyfntdgo"] = "getReadQuery"; 
                                                                                                                                                                                $keiboarsou = "isTemplates"; 
                                                                                                                                                                                $kqhmtadp = "sendMessageStatus"; 
                                                                                                                                                                                $qyonkvwf = "connectuserid"; 
                                                                                                                                                                                $wwlcwfbyi = "totalSend"; 
                                                                                                                                                                                ${${"GLOBALS"}["tenbnsoqtqj"]} = $adb->query_result(${${"GLOBALS"}["kgjwlrjlhte"]}, ${${"GLOBALS"}["gjdoju"]}, "massmessageid"); 
                                                                                                                                                                                ${"GLOBALS"}["qkxytwt"] = "getReadQuery"; 
                                                                                                                                                                                ${"GLOBALS"}["dukuvuwv"] = "connctWPNumber"; 
                                                                                                                                                                                ${${"GLOBALS"}["srbemehsr"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["zzobzina"]}, "whatsappmessage"); 
                                                                                                                                                                                ${"GLOBALS"}["mtgklxezci"] = "connctWPNumber"; 
                                                                                                                                                                                $ymtmpylql = "query"; 
                                                                                                                                                                                ${"GLOBALS"}["lvvbfpgmgsy"] = "i"; 
                                                                                                                                                                                ${${"GLOBALS"}["hkbmkpghw"]} = $adb->query_result(${$ymtmpylql}, ${${"GLOBALS"}["gjdoju"]}, "massmsgdatetime"); 
                                                                                                                                                                                ${${"GLOBALS"}["ttkyyfpbpxs"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["lvvbfpgmgsy"]}, "templatesid"); 
                                                                                                                                                                                ${$jkxhwwmrpgnx} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${${"GLOBALS"}["gjdoju"]}, "connectuserid"); 
                                                                                                                                                                                $ojprmsqjoo = "templatesid"; 
                                                                                                                                                                                ${${"GLOBALS"}["pbottyjgr"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE customfield5 = ?", array(${$qyonkvwf})); 
                                                                                                                                                                                $xvstvakxhyf = "whatsappRecordid"; 
                                                                                                                                                                                $jrilipe = "getLastMessageDataTime"; 
                                                                                                                                                                                ${"GLOBALS"}["vqxpbgvrh"] = "totalQueue"; 
                                                                                                                                                                                ${${"GLOBALS"}["dukuvuwv"]} = $adb->num_rows(${$icltvlxckdgf}); 
                                                                                                                                                                                if (${${"GLOBALS"}["mtgklxezci"]} == 1) { 
                                                                                                                                                                                    ${"GLOBALS"}["bmtrhyfwwnv"] = "whatsappno"; 
                                                                                                                                                                                    ${${"GLOBALS"}["bmtrhyfwwnv"]} = $adb->query_result(${${"GLOBALS"}["pbottyjgr"]}, 0, "whatsappno"); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    $gwhobam = "connectWPNumberQuery"; 
                                                                                                                                                                                    ${$gwhobam} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield5 = ?", array(${${"GLOBALS"}["yvrbzsen"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["jpuovuttrpcu"]} = $adb->num_rows(${${"GLOBALS"}["pbottyjgr"]}); 
                                                                                                                                                                                    if (${${"GLOBALS"}["jpuovuttrpcu"]} == 1) { 
                                                                                                                                                                                        ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${${"GLOBALS"}["pbottyjgr"]}, 0, "whatsappno"); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["rmczpodoul"]} = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$buqrcvvg}, "sendmessagedate")); 
                                                                                                                                                                                ${$jrilipe} = CTWhatsApp_Record_Model::getLastMessageDataTime(${${"GLOBALS"}["tenbnsoqtqj"]}); 
                                                                                                                                                                                $yejxtph = "scheduleSendmsgID"; 
                                                                                                                                                                                ${"GLOBALS"}["nvceqmckpw"] = "rowScheduleSendmsg"; 
                                                                                                                                                                                if (${${"GLOBALS"}["rcujvnhhkkn"]} != "") { 
                                                                                                                                                                                    $tdrcrfthbkzy = "getLastMessageDataTime"; 
                                                                                                                                                                                    ${${"GLOBALS"}["gynnrvlla"]} = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(${$tdrcrfthbkzy}); 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${${"GLOBALS"}["gynnrvlla"]} = "-"; 
                                                                                                                                                                                } 
                                                                                                                                                                                $jlmvsx = "deleteCheckQuery"; 
                                                                                                                                                                                ${${"GLOBALS"}["csnrub"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappschedulesendmsg WHERE schedulesendmsgid = ? $progressMessages", array(${${"GLOBALS"}["tenbnsoqtqj"]})); 
                                                                                                                                                                                ${"GLOBALS"}["mqnbftzgubuc"] = "totalmsg"; 
                                                                                                                                                                                $ekvyxu = "scheduleSendmsgID"; 
                                                                                                                                                                                ${$kqhmtadp} = $adb->query_result(${$pprxwnf}, 0, "status"); 
                                                                                                                                                                                ${"GLOBALS"}["ulwiyphwyao"] = "queryScheduleSendmsg"; 
                                                                                                                                                                                ${$xvstvakxhyf} = $adb->query_result(${${"GLOBALS"}["ulwiyphwyao"]}, 0, "recordid"); 
                                                                                                                                                                                ${${"GLOBALS"}["uleqwmgeyftc"]} = $adb->num_rows(${${"GLOBALS"}["csnrub"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["zvybkkrlypd"]} = $adb->query_result(${${"GLOBALS"}["csnrub"]}, 0, "schedulesendmsgid"); 
                                                                                                                                                                                ${${"GLOBALS"}["qkxytwt"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp INNER JOIN  
              vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
              WHERE vtiger_crmentity.deleted = 0  
              AND vtiger_ctwhatsapp.message_type = 'Mass Message'  
              AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Read' 
              AND vtiger_ctwhatsapp.msgid !=''  
              AND vtiger_ctwhatsapp.whatsapp_withoccode = ?", array(${$ekvyxu})); 
                                                                                                                                                                                ${${"GLOBALS"}["mlcenuju"]} = $adb->num_rows(${${"GLOBALS"}["zcyfntdgo"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["tgvhyig"]} = $adb->pquery("SELECT * FROM vtiger_crmentity WHERE crmid = ?", array(${${"GLOBALS"}["timepxr"]})); 
                                                                                                                                                                                if ($adb->query_result(${$jlmvsx}, 0, "deleted") == 0) { 
                                                                                                                                                                                    ${${"GLOBALS"}["qbwrpdx"]} = VtigerCRMObject::getSEType(${${"GLOBALS"}["timepxr"]}); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["qmwmrbwhvkns"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappschedulesendmsg WHERE schedulesendmsgid = ?", array(${${"GLOBALS"}["zvybkkrlypd"]})); 
                                                                                                                                                                                ${${"GLOBALS"}["zrmedm"]} = $adb->num_rows(${${"GLOBALS"}["qmwmrbwhvkns"]}); 
                                                                                                                                                                                ${$llyoroaeewx} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappschedulesendmsg WHERE schedulesendmsgid = ? AND send_msg = ?", array(${$yejxtph}, 1)); 
                                                                                                                                                                                ${$wwlcwfbyi} = $adb->num_rows(${${"GLOBALS"}["hnxipsxwuha"]}); 
                                                                                                                                                                                ${${"GLOBALS"}["pzwgbuzyxqu"]} = ${${"GLOBALS"}["mqnbftzgubuc"]} - ${${"GLOBALS"}["kulinpvypvrc"]}; 
                                                                                                                                                                                if (${${"GLOBALS"}["vqxpbgvrh"]} != 0) { 
                                                                                                                                                                                    $asshrikdrx = "rowScheduleSendmsg"; 
                                                                                                                                                                                    ${"GLOBALS"}["lulwgywqjin"] = "batch"; 
                                                                                                                                                                                    ${${"GLOBALS"}["vldvrloy"]} = ${$asshrikdrx} / ${${"GLOBALS"}["lulwgywqjin"]}; 
                                                                                                                                                                                    ${"GLOBALS"}["mbwhnrbonfy"] = "total"; 
                                                                                                                                                                                    if (${${"GLOBALS"}["hkbmkpghw"]}) { 
                                                                                                                                                                                        ${"GLOBALS"}["nxwjirddizo"] = "currentdatetime"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nxwjirddizo"]} = ${${"GLOBALS"}["hkbmkpghw"]}; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $zxvlmij = "currentdatetime"; 
                                                                                                                                                                                        ${$zxvlmij} = date("Y-m-d H:i:s"); 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (${${"GLOBALS"}["mbwhnrbonfy"]} <= 1) { 
                                                                                                                                                                                        $maeytxo = "currentdatetime"; 
                                                                                                                                                                                        ${${"GLOBALS"}["hrosnkgmfu"]} = strtotime(${$maeytxo} . " + " . ${${"GLOBALS"}["wxmwjqpzuav"]} . " minute"); 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${"GLOBALS"}["qgbfoulitk"] = "totalminutes"; 
                                                                                                                                                                                        ${"GLOBALS"}["lrobkkq"] = "totalminutes"; 
                                                                                                                                                                                        ${"GLOBALS"}["jxguslemdvhw"] = "currentdatetime"; 
                                                                                                                                                                                        ${"GLOBALS"}["amztwdm"] = "timeinterval"; 
                                                                                                                                                                                        ${${"GLOBALS"}["qgbfoulitk"]} = ${${"GLOBALS"}["vldvrloy"]} * ${${"GLOBALS"}["amztwdm"]}; 
                                                                                                                                                                                        ${${"GLOBALS"}["hrosnkgmfu"]} = strtotime(${${"GLOBALS"}["jxguslemdvhw"]} . " + " . round(${${"GLOBALS"}["lrobkkq"]}) . " minute"); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                                if (${${"GLOBALS"}["yswjsqokgnj"]} == 2) { 
                                                                                                                                                                                    ${"GLOBALS"}["hgipeeilnrvn"] = "expcompdate"; 
                                                                                                                                                                                    $xamfmgx = "status"; 
                                                                                                                                                                                    ${$xamfmgx} = "Hold"; 
                                                                                                                                                                                    $wfunhvf = "expexteddatetime"; 
                                                                                                                                                                                    ${${"GLOBALS"}["hgipeeilnrvn"]} = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date("Y-m-d H:i:s", ${$wfunhvf})); 
                                                                                                                                                                                } else if (${${"GLOBALS"}["yswjsqokgnj"]} == 1) { 
                                                                                                                                                                                    if (${${"GLOBALS"}["pzwgbuzyxqu"]} == 0) { 
                                                                                                                                                                                        ${"GLOBALS"}["hsobytbllx"] = "expcompdate"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nijwyklrk"]} = "Completed"; 
                                                                                                                                                                                        ${${"GLOBALS"}["hsobytbllx"]} = "-"; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $lnbfmrdfiu = "expexteddatetime"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nijwyklrk"]} = "InProgress"; 
                                                                                                                                                                                        $uvvsdsebpvv = "expcompdate"; 
                                                                                                                                                                                        ${$uvvsdsebpvv} = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date("Y-m-d H:i:s", ${$lnbfmrdfiu})); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    ${${"GLOBALS"}["nijwyklrk"]} = "InProgress"; 
                                                                                                                                                                                    ${${"GLOBALS"}["kurpdrkrdf"]} = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date("Y-m-d H:i:s", ${${"GLOBALS"}["hrosnkgmfu"]})); 
                                                                                                                                                                                } 
                                                                                                                                                                                ${$tyhdpbkxjst} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapptemplates INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapptemplates.ctwhatsapptemplatesid = ?", array(${$ojprmsqjoo})); 
                                                                                                                                                                                ${$keiboarsou} = $adb->num_rows(${${"GLOBALS"}["etedhwm"]}); 
                                                                                                                                                                                if (${${"GLOBALS"}["wpbkdifrnt"]}) { 
                                                                                                                                                                                    $eeagmile = "getAttachmentQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["sduuhuoougwf"] = "type"; 
                                                                                                                                                                                    ${"GLOBALS"}["yuemdpy"] = "imagePath"; 
                                                                                                                                                                                    ${"GLOBALS"}["btognr"] = "templatesId"; 
                                                                                                                                                                                    $ybxjflooqpww = "whatsappMessage"; 
                                                                                                                                                                                    $ktiwofwc = "getAttachmentQuery"; 
                                                                                                                                                                                    ${$ybxjflooqpww} = ""; 
                                                                                                                                                                                    ${${"GLOBALS"}["dluxydmzw"]} = $adb->query_result(${${"GLOBALS"}["etedhwm"]}, 0, "wptemplate_text"); 
                                                                                                                                                                                    $temxsjfd = "imageId"; 
                                                                                                                                                                                    ${"GLOBALS"}["ljhfomcqu"] = "imagePath"; 
                                                                                                                                                                                    $ixzermpkhmn = "getWhatsappTemplateQuery"; 
                                                                                                                                                                                    ${${"GLOBALS"}["btognr"]} = $adb->query_result(${$ixzermpkhmn}, 0, "ctwhatsapptemplatesid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["bhstjsz"]} = $adb->pquery("SELECT * FROM vtiger_attachments 
                    INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid 
                    INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_attachments.attachmentsid 
                    WHERE vtiger_seattachmentsrel.crmid = ? AND vtiger_crmentity.deleted = 0", array(${${"GLOBALS"}["fouofchv"]})); 
                                                                                                                                                                                    ${${"GLOBALS"}["jqctqnhxcqm"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "attachmentsid"); 
                                                                                                                                                                                    ${${"GLOBALS"}["ljhfomcqu"]} = $adb->query_result(${${"GLOBALS"}["bhstjsz"]}, 0, "path"); 
                                                                                                                                                                                    ${${"GLOBALS"}["ytvwtwpbrom"]} = $adb->query_result(${$ktiwofwc}, 0, "storedname"); 
                                                                                                                                                                                    ${${"GLOBALS"}["sduuhuoougwf"]} = explode("/", $adb->query_result(${$eeagmile}, 0, "type")); 
                                                                                                                                                                                    ${${"GLOBALS"}["gokdzxl"]} = ${${"GLOBALS"}["yuemdpy"]} . ${$temxsjfd} . "_" . ${${"GLOBALS"}["ytvwtwpbrom"]}; 
                                                                                                                                                                                    if (${${"GLOBALS"}["kynysnuizs"]}[0] == "image") { 
                                                                                                                                                                                        ${"GLOBALS"}["swrpdbudb"] = "whatsappMessage"; 
                                                                                                                                                                                        ${${"GLOBALS"}["swrpdbudb"]} .= "<br><img src=\"" . ${${"GLOBALS"}["gokdzxl"]} . "\" style="width: 50px;\">";} else { 
                                                                                                                                                                                        ${"GLOBALS"}["foutkponm"] = "whatsappMessage"; 
                                                                                                                                                                                        ${${"GLOBALS"}["foutkponm"]} .= "<br><a href="".${${"GLOBALS"}["gokdzxl"]}."">" . ${${"GLOBALS"}["ytvwtwpbrom"]} . "</a>";} 
                                                                                                                                                                                } 
                                                                                                                                                                                ${${"GLOBALS"}["ebxkaanvxon"]} = ${${"GLOBALS"}["kulinpvypvrc"]} + ${${"GLOBALS"}["pzwgbuzyxqu"]}; 
                                                                                                                                                                                if (${${"GLOBALS"}["nvceqmckpw"]} != "") { 
                                                                                                                                                                                    ${"GLOBALS"}["nlloyfulbqx"] = "progress"; 
                                                                                                                                                                                    if (${${"GLOBALS"}["nijwyklrk"]} == ${${"GLOBALS"}["nlloyfulbqx"]}) { 
                                                                                                                                                                                        ${"GLOBALS"}["enuthtbavuo"] = "lastMessageDate"; 
                                                                                                                                                                                        $mkxijedufxbe = "sendMessageStatus"; 
                                                                                                                                                                                        ${"GLOBALS"}["bwlqrbakbo"] = "expcompdate"; 
                                                                                                                                                                                        ${"GLOBALS"}["xtyhtgenb"] = "totalMessages"; 
                                                                                                                                                                                        ${"GLOBALS"}["tgunbp"] = "whatsappMessage"; 
                                                                                                                                                                                        ${"GLOBALS"}["hhcmxtuoebg"] = "massMessageid"; 
                                                                                                                                                                                        $hwiodjl = "setype"; 
                                                                                                                                                                                        $wucrdvoud = "sendqueueMessages"; 
                                                                                                                                                                                        $ykxrsswutko = "whatsappno"; 
                                                                                                                                                                                        ${$wucrdvoud}[] = array("massMessageid" => ${${"GLOBALS"}["hhcmxtuoebg"]}, "date" => ${${"GLOBALS"}["rmczpodoul"]}, "whatsappmessage" => ${${"GLOBALS"}["tgunbp"]}, "totalSend" => ${${"GLOBALS"}["kulinpvypvrc"]}, "totalQueue" => ${${"GLOBALS"}["pzwgbuzyxqu"]}, "totalMessages" => ${${"GLOBALS"}["xtyhtgenb"]}, "lastMessageDate" => ${${"GLOBALS"}["enuthtbavuo"]}, "readRows" => ${${"GLOBALS"}["mlcenuju"]}, "status" => ${${"GLOBALS"}["nijwyklrk"]}, "expcompdate" => ${${"GLOBALS"}["bwlqrbakbo"]}, "sendMessageStatus" => ${$mkxijedufxbe}, "setype" => vtranslate(${${"GLOBALS"}["qbwrpdx"]}, ${$hwiodjl}), "whatsappno" => ${$ykxrsswutko}); 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        $kiipxxsp = "sendMessageDate"; 
                                                                                                                                                                                        $oclskqu = "setype"; 
                                                                                                                                                                                        $otkuzko = "totalMessages"; 
                                                                                                                                                                                        $bspjroxbbsmq = "sendqueueMessages"; 
                                                                                                                                                                                        $pmkogyrvsqc = "setype"; 
                                                                                                                                                                                        $jmylsnybndbv = "status"; 
                                                                                                                                                                                        $jfjupcgvk = "readRows"; 
                                                                                                                                                                                        ${"GLOBALS"}["nsvtcyt"] = "totalQueue"; 
                                                                                                                                                                                        ${$bspjroxbbsmq}[] = array("massMessageid" => ${${"GLOBALS"}["tenbnsoqtqj"]}, "date" => ${$kiipxxsp}, "whatsappmessage" => ${${"GLOBALS"}["dluxydmzw"]}, "totalSend" => ${${"GLOBALS"}["kulinpvypvrc"]}, "totalQueue" => ${${"GLOBALS"}["nsvtcyt"]}, "totalMessages" => ${$otkuzko}, "lastMessageDate" => ${${"GLOBALS"}["gynnrvlla"]}, "readRows" => ${$jfjupcgvk}, "status" => ${$jmylsnybndbv}, "expcompdate" => ${${"GLOBALS"}["kurpdrkrdf"]}, "sendMessageStatus" => ${${"GLOBALS"}["yswjsqokgnj"]}, "setype" => vtranslate(${$oclskqu}, ${$pmkogyrvsqc}), "whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}); 
                                                                                                                                                                                    } 
                                                                                                                                                                                } 
                                                                                                                                                                            }return ${$gocyhqbjn};}public function getWhatsAppReportData($period,$format,$periodData,$reportChart,$scanUsers,$startdate,$endtdate,$whatsAppBot){ 
                                                                                                                                                                                $notskxwcrg = "finishedChat"; 
                                                                                                                                                                                global $adb, $current_user; 
                                                                                                                                                                                ${"GLOBALS"}["lspdiiupf"] = "totalPendingChat"; 
                                                                                                                                                                                $ooomao = "totalMassMessagesURL"; 
                                                                                                                                                                                ${"GLOBALS"}["vpnwblkqkg"] = "totalReceivedBotMessage"; 
                                                                                                                                                                                ${"GLOBALS"}["hghskxjuaec"] = "totalfinishBotChat"; 
                                                                                                                                                                                ${${"GLOBALS"}["akuldenvfkv"]} = $current_user->id; 
                                                                                                                                                                                $eifbiv = "yAxisData3"; 
                                                                                                                                                                                ${${"GLOBALS"}["gluytrwnl"]} = CTWhatsApp_Record_Model::getInNumberQuery(${${"GLOBALS"}["akuldenvfkv"]}); 
                                                                                                                                                                                ${"GLOBALS"}["nhfklqblwg"] = "scanUsers"; 
                                                                                                                                                                                $smenrm = "receivedBotMessage"; 
                                                                                                                                                                                ${"GLOBALS"}["ttttgxpga"] = "totalMassMessages"; 
                                                                                                                                                                                $odiigpm = "totalSendBotMessages"; 
                                                                                                                                                                                $njmbpdfo = "key"; 
                                                                                                                                                                                $txbhqiy = "totalSentMessage"; 
                                                                                                                                                                                if (${${"GLOBALS"}["uwqnmdxqot"]} == "All" || ${${"GLOBALS"}["nhfklqblwg"]} == "") { 
                                                                                                                                                                                    $xtnystrjgo = "multipleWhatsappNumber"; 
                                                                                                                                                                                    ${"GLOBALS"}["zenituordme"] = "key"; 
                                                                                                                                                                                    ${"GLOBALS"}["wuowji"] = "inNumbersChatbotQuery"; 
                                                                                                                                                                                    $somlqqzp = "value"; 
                                                                                                                                                                                    ${"GLOBALS"}["fndwdld"] = "inNumber"; 
                                                                                                                                                                                    $qfwqzxluvsg = "allnumber"; 
                                                                                                                                                                                    ${$xtnystrjgo} = CTWhatsApp_Record_Model::getConnectedWhatsAppNumber(); 
                                                                                                                                                                                    ${${"GLOBALS"}["fndwdld"]} = ""; 
                                                                                                                                                                                    foreach (${${"GLOBALS"}["gcfwczb"]} as ${${"GLOBALS"}["zenituordme"]} => ${$somlqqzp}) { 
                                                                                                                                                                                        ${${"GLOBALS"}["tqbulrrwwg"]} .= "'" . ${${"GLOBALS"}["bqyucn"]}["whatsappno"] . "',"; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${"GLOBALS"}["buclww"] = "inNumbersQuery"; 
                                                                                                                                                                                    $yxwccch = "allnumber"; 
                                                                                                                                                                                    ${$qfwqzxluvsg} = rtrim(${${"GLOBALS"}["tqbulrrwwg"]}, ","); 
                                                                                                                                                                                    ${${"GLOBALS"}["buclww"]} = " AND cw.your_number IN (" . ${$yxwccch} . ") "; 
                                                                                                                                                                                    ${${"GLOBALS"}["qgdhwi"]} = " AND vtiger_ctwhatsapp.your_number IN (" . ${${"GLOBALS"}["wdmedzqlg"]} . ") "; 
                                                                                                                                                                                    ${${"GLOBALS"}["wuowji"]} = " AND vtiger_ctwhatsapp.your_number IN (" . ${${"GLOBALS"}["wdmedzqlg"]} . ") "; 
                                                                                                                                                                                } else { 
                                                                                                                                                                                    $kslmpgtjs = "scanUsers"; 
                                                                                                                                                                                    $qvtemocdi = "inNumbersChatbotQuery"; 
                                                                                                                                                                                    $udkeewyqbzrr = "scanUsers"; 
                                                                                                                                                                                    ${${"GLOBALS"}["gkyojyojcda"]} = " AND cw.your_number IN (" . ${$udkeewyqbzrr} . ") "; 
                                                                                                                                                                                    ${"GLOBALS"}["xpjocxg"] = "scanUsers"; 
                                                                                                                                                                                    $hmxbics = "inNumbersBroadcastQuery"; 
                                                                                                                                                                                    ${$hmxbics} = " AND vtiger_ctwhatsapp.your_number IN (" . ${${"GLOBALS"}["xpjocxg"]} . ") "; 
                                                                                                                                                                                    ${$qvtemocdi} = " AND vtiger_ctwhatsapp.your_number IN (" . ${$kslmpgtjs} . ") "; 
                                                                                                                                                                                } 
                                                                                                                                                                                ${"GLOBALS"}["vemrptt"] = "arrayData"; 
                                                                                                                                                                                $vflifjzp = "totalBotMessages"; 
                                                                                                                                                                                ${${"GLOBALS"}["vemrptt"]} = array(); 
                                                                                                                                                                                $mxybwobcl = "readMassMessages"; 
                                                                                                                                                                                ${${"GLOBALS"}["pdxxefttqyfv"]} = array(); 
                                                                                                                                                                                ${${"GLOBALS"}["iylmmdpdybw"]} = array(); 
                                                                                                                                                                                ${$eifbiv} = array(); 
                                                                                                                                                                                ${${"GLOBALS"}["eouuxjpu"]} = 0; 
                                                                                                                                                                                $xbinkblyyilu = "unreadMassMessages"; 
                                                                                                                                                                                $dfrlbbvlwggi = "totalUnReadMassMessages"; 
                                                                                                                                                                                ${${"GLOBALS"}["kfacbvpc"]} = 0; 
                                                                                                                                                                                ${${"GLOBALS"}["ebxkaanvxon"]} = 0; 
                                                                                                                                                                                ${"GLOBALS"}["uqfsstjcv"] = "pendingChat"; 
                                                                                                                                                                                ${"GLOBALS"}["lrpqdwdupti"] = "scanUsers"; 
                                                                                                                                                                                ${${"GLOBALS"}["nifvtnlkxv"]} = 0; 
                                                                                                                                                                                ${$mxybwobcl} = 0; 
                                                                                                                                                                                ${$xbinkblyyilu} = 0; 
                                                                                                                                                                                ${$notskxwcrg} = 0; 
                                                                                                                                                                                ${${"GLOBALS"}["uqfsstjcv"]} = 0; 
                                                                                                                                                                                ${"GLOBALS"}["ebeoexregpd"] = "reportChart"; 
                                                                                                                                                                                ${${"GLOBALS"}["vfjiwcxpui"]} = 0; 
                                                                                                                                                                                ${$smenrm} = 0; 
                                                                                                                                                                                ${${"GLOBALS"}["kgtfnqlmi"]} = 0; 
                                                                                                                                                                                ${${"GLOBALS"}["yroxljng"]} = 0; 
                                                                                                                                                                                ${${"GLOBALS"}["lxewcehtnrbl"]} = 0; 
                                                                                                                                                                                ${"GLOBALS"}["ulyiznvbvdc"] = "arrayData"; 
                                                                                                                                                                                foreach (${${"GLOBALS"}["opkjkidk"]} as ${$njmbpdfo} => ${${"GLOBALS"}["gnrrisnojfkp"]}) { 
                                                                                                                                                                                    $uyfdpngll = "sent"; 
                                                                                                                                                                                    $yuwcqrrxi = "reportChart"; 
                                                                                                                                                                                    ${"GLOBALS"}["quuukpmoym"] = "reportChart"; 
                                                                                                                                                                                    $mojqtb = "customeQuery"; 
                                                                                                                                                                                    ${"GLOBALS"}["bkqmnelawtdk"] = "format"; 
                                                                                                                                                                                    $kkttvjqg = "i"; 
                                                                                                                                                                                    $uyeelzzoe = "rows"; 
                                                                                                                                                                                    ${"GLOBALS"}["kxntiknyu"] = "conditionDate"; 
                                                                                                                                                                                    $joywdiktsp = "read"; 
                                                                                                                                                                                    ${${"GLOBALS"}["kxntiknyu"]} = $date->format(${${"GLOBALS"}["bkqmnelawtdk"]}); 
                                                                                                                                                                                    ${$mojqtb} = ""; 
                                                                                                                                                                                    ${"GLOBALS"}["hbgurjt"] = "periodData"; 
                                                                                                                                                                                    ${${"GLOBALS"}["rjwsvwn"]} = ""; 
                                                                                                                                                                                    if (${${"GLOBALS"}["hbgurjt"]} == "alltime") { 
                                                                                                                                                                                        ${${"GLOBALS"}["ucdcrksh"]} = " AND YEAR(vtiger_crmentity.createdtime) = ?"; 
                                                                                                                                                                                        ${${"GLOBALS"}["rjwsvwn"]} = " AND YEAR(cr.createdtime) = ?"; 
                                                                                                                                                                                    } else { 
                                                                                                                                                                                        ${"GLOBALS"}["qfxysterne"] = "customeQuery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["qfxysterne"]} = " AND DATE(vtiger_crmentity.createdtime) = ?"; 
                                                                                                                                                                                        ${"GLOBALS"}["hqetfhdpy"] = "customeMassQuery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["hqetfhdpy"]} = " AND DATE(cr.createdtime) = ?"; 
                                                                                                                                                                                    } 
                                                                                                                                                                                    if (${${"GLOBALS"}["quuukpmoym"]} == "BroadcastStatistics") { 
                                                                                                                                                                                        ${"GLOBALS"}["ngibbei"] = "conditionDate"; 
                                                                                                                                                                                        ${"GLOBALS"}["mhejpizima"] = "whatsappMessageQuery"; 
                                                                                                                                                                                        $twywgrcz = "query"; 
                                                                                                                                                                                        ${"GLOBALS"}["phsfrwmrjyl"] = "customeQuery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["mhejpizima"]} = "SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["gluytrwnl"]} . " AND vtiger_ctwhatsapp.message_type IN('Mass Message') AND vtiger_ctwhatsapp.whatsapp_botid = '' AND vtiger_ctwhatsapp.msgid != ''"; 
                                                                                                                                                                                        ${$twywgrcz} = $adb->pquery(${${"GLOBALS"}["hrxgmyc"]} . ${${"GLOBALS"}["phsfrwmrjyl"]}, array(${${"GLOBALS"}["ngibbei"]})); 
                                                                                                                                                                                    } else if (${$yuwcqrrxi} == "SendReceiveStatistics") { 
                                                                                                                                                                                        ${"GLOBALS"}["lpgunlsg"] = "whatsappMessageQuery"; 
                                                                                                                                                                                        $jqmsexxk = "query"; 
                                                                                                                                                                                        $uqmjqpaolx = "pendingfinishedRows"; 
                                                                                                                                                                                        ${"GLOBALS"}["nfpsxigtxt"] = "j"; 
                                                                                                                                                                                        ${"GLOBALS"}["rosdigeudsg"] = "j"; 
                                                                                                                                                                                        ${${"GLOBALS"}["hrxgmyc"]} = "SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["qgdhwi"]} . " AND vtiger_ctwhatsapp.message_type IN('Send','Recieved') AND vtiger_ctwhatsapp.message_type != 'Mass Message' AND vtiger_ctwhatsapp.whatsapp_botid = ''"; 
                                                                                                                                                                                        ${"GLOBALS"}["aussjfkef"] = "customeQuery"; 
                                                                                                                                                                                        $wvkygxjwkfi = "query"; 
                                                                                                                                                                                        ${$jqmsexxk} = $adb->pquery(${${"GLOBALS"}["lpgunlsg"]} . ${${"GLOBALS"}["aussjfkef"]}, array(${${"GLOBALS"}["anhwfsry"]})); 
                                                                                                                                                                                        ${$uqmjqpaolx} = $adb->num_rows(${$wvkygxjwkfi}); 
                                                                                                                                                                                        for (${${"GLOBALS"}["nfpsxigtxt"]} = 0; ${${"GLOBALS"}["rosdigeudsg"]} < ${${"GLOBALS"}["dzcmxnguqju"]}; ${${"GLOBALS"}["ileqdj"]}++) { 
                                                                                                                                                                                            $lidfjpkzq = "j"; 
                                                                                                                                                                                            $ldjgphlrr = "query"; 
                                                                                                                                                                                            $rpmsjphng = "message_type"; 
                                                                                                                                                                                            ${"GLOBALS"}["donobqf"] = "message_type"; 
                                                                                                                                                                                            $mmtzjwbvjyk = "message_type"; 
                                                                                                                                                                                            ${${"GLOBALS"}["donobqf"]} = $adb->query_result(${$ldjgphlrr}, ${$lidfjpkzq}, "message_type"); 
                                                                                                                                                                                            if (${$mmtzjwbvjyk} == "Send") { 
                                                                                                                                                                                                ${"GLOBALS"}["vgvnxlffjcc"] = "finishedChat"; 
                                                                                                                                                                                                $zrfbckmqvqk = "finishedChat"; 
                                                                                                                                                                                                ${$zrfbckmqvqk} = ${${"GLOBALS"}["vgvnxlffjcc"]} + 1; 
                                                                                                                                                                                            } else if (${$rpmsjphng} == "Recieved") { 
                                                                                                                                                                                                ${${"GLOBALS"}["iolvgj"]} = ${${"GLOBALS"}["iolvgj"]} + 1; 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } else if (${${"GLOBALS"}["ntfjdnjb"]} == "ChatbotStatistics") { 
                                                                                                                                                                                        $pnvqzpkck = "whatsAppBot"; 
                                                                                                                                                                                        $eghnyrsiwoxb = "botQuery"; 
                                                                                                                                                                                        ${"GLOBALS"}["shxmpq"] = "inNumberQuery"; 
                                                                                                                                                                                        ${"GLOBALS"}["chrdafxo"] = "i"; 
                                                                                                                                                                                        if (${$pnvqzpkck} == "All" || ${${"GLOBALS"}["cbpyxxkq"]} == "") { 
                                                                                                                                                                                            $tlhkooxh = "whatsAppBotQuery"; 
                                                                                                                                                                                            $phdqkuyiuoc = "whatsAppBot"; 
                                                                                                                                                                                            ${$phdqkuyiuoc} = ""; 
                                                                                                                                                                                            ${$tlhkooxh} = " AND vtiger_ctwhatsapp.whatsapp_botid != '' "; 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            ${"GLOBALS"}["rkmyohnii"] = "whatsAppBotQuery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["rkmyohnii"]} = " AND vtiger_ctwhatsapp.whatsapp_botid = " . ${${"GLOBALS"}["cbpyxxkq"]} . " "; 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $ihsxqloq = "whatsappMessageQuery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["hrxgmyc"]} = "SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["shxmpq"]} . ${${"GLOBALS"}["mkutnirnt"]}; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery(${$ihsxqloq} . ${${"GLOBALS"}["ucdcrksh"]}, array(${${"GLOBALS"}["anhwfsry"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["dyrohfyfgn"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 " . ${${"GLOBALS"}["gluytrwnl"]} . " " . ${${"GLOBALS"}["mkutnirnt"]} . ${${"GLOBALS"}["ucdcrksh"]} . " GROUP BY vtiger_ctwhatsapp.whatsapp_withccode", array(${${"GLOBALS"}["anhwfsry"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["pxdkttyd"]} = $adb->num_rows(${$eghnyrsiwoxb}); 
                                                                                                                                                                                        ${"GLOBALS"}["eulmfys"] = "i"; 
                                                                                                                                                                                        for (${${"GLOBALS"}["gjdoju"]} = 0; ${${"GLOBALS"}["eulmfys"]} < ${${"GLOBALS"}["pxdkttyd"]}; ${${"GLOBALS"}["chrdafxo"]}++) { 
                                                                                                                                                                                            ${"GLOBALS"}["xqxufzcvt"] = "activeFinishQuery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["qwwsvegssl"]} = $adb->query_result(${${"GLOBALS"}["dyrohfyfgn"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_withccode"); 
                                                                                                                                                                                            ${"GLOBALS"}["osknikvg"] = "activeFinishQuery"; 
                                                                                                                                                                                            $epngmtrrh = "activeFinishRows"; 
                                                                                                                                                                                            ${${"GLOBALS"}["xqxufzcvt"]} = $adb->pquery("SELECT * FROM whatsappbot_pre_que WHERE prequemobilenumber = ?", array(${${"GLOBALS"}["qwwsvegssl"]})); 
                                                                                                                                                                                            ${$epngmtrrh} = $adb->num_rows(${${"GLOBALS"}["osknikvg"]}); 
                                                                                                                                                                                            if (${${"GLOBALS"}["rgsqijrxz"]} == 1) { 
                                                                                                                                                                                                ${"GLOBALS"}["splsxa"] = "activeBotChat"; 
                                                                                                                                                                                                ${${"GLOBALS"}["splsxa"]} = ${${"GLOBALS"}["yroxljng"]} + 1; 
                                                                                                                                                                                            } else { 
                                                                                                                                                                                                ${"GLOBALS"}["qxoinndgy"] = "finishBotChat"; 
                                                                                                                                                                                                ${"GLOBALS"}["hmekirn"] = "finishBotChat"; 
                                                                                                                                                                                                ${${"GLOBALS"}["qxoinndgy"]} = ${${"GLOBALS"}["hmekirn"]} + 1; 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${"GLOBALS"}["twqpyiprjef"] = "rows"; 
                                                                                                                                                                                    $ihqjffgyvb = "yAxisData1"; 
                                                                                                                                                                                    ${${"GLOBALS"}["iorbwmojog"]} = 0; 
                                                                                                                                                                                    $qgbyhlylj = "i"; 
                                                                                                                                                                                    ${$joywdiktsp} = 0; 
                                                                                                                                                                                    $yvcrnwuj = "rows"; 
                                                                                                                                                                                    ${"GLOBALS"}["biuabfvhhx"] = "botMessage"; 
                                                                                                                                                                                    ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                                                                                                                    ${"GLOBALS"}["cistevgvlxr"] = "totalMessages"; 
                                                                                                                                                                                    ${${"GLOBALS"}["ebxkaanvxon"]} = ${${"GLOBALS"}["cistevgvlxr"]} + ${$uyeelzzoe}; 
                                                                                                                                                                                    ${${"GLOBALS"}["nifvtnlkxv"]} = ${${"GLOBALS"}["nifvtnlkxv"]} + ${${"GLOBALS"}["twqpyiprjef"]}; 
                                                                                                                                                                                    ${${"GLOBALS"}["kgtfnqlmi"]} = ${${"GLOBALS"}["biuabfvhhx"]} + ${$yvcrnwuj}; 
                                                                                                                                                                                    for (${$kkttvjqg} = 0; ${$qgbyhlylj} < ${${"GLOBALS"}["iwyngpalekm"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                                                                                                                                                                        $wfaxbkzvb = "messageReadUpRead"; 
                                                                                                                                                                                        $zdveniyxvzp = "messageType"; 
                                                                                                                                                                                        ${"GLOBALS"}["riwmlqxsqzqm"] = "query"; 
                                                                                                                                                                                        ${"GLOBALS"}["pdunhrh"] = "query"; 
                                                                                                                                                                                        $ejvbnywg = "messageType"; 
                                                                                                                                                                                        ${$zdveniyxvzp} = $adb->query_result(${${"GLOBALS"}["riwmlqxsqzqm"]}, ${${"GLOBALS"}["gjdoju"]}, "message_type"); 
                                                                                                                                                                                        ${"GLOBALS"}["holsmfwwf"] = "messageReadUpRead"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["xeyjsxwn"]} != "") { 
                                                                                                                                                                                            ${"GLOBALS"}["clewjsnvysa"] = "sent"; 
                                                                                                                                                                                            ${"GLOBALS"}["xobbtknoeh"] = "sent"; 
                                                                                                                                                                                            ${${"GLOBALS"}["clewjsnvysa"]} = ${${"GLOBALS"}["xobbtknoeh"]} + 1; 
                                                                                                                                                                                        } 
                                                                                                                                                                                        if (${$ejvbnywg} == "Send") { 
                                                                                                                                                                                            ${"GLOBALS"}["otrufgcode"] = "send"; 
                                                                                                                                                                                            ${${"GLOBALS"}["eouuxjpu"]} = ${${"GLOBALS"}["otrufgcode"]} + 1; 
                                                                                                                                                                                            ${"GLOBALS"}["bidhsvondi"] = "sendBotMessage"; 
                                                                                                                                                                                            ${"GLOBALS"}["sahblgvo"] = "sendBotMessage"; 
                                                                                                                                                                                            ${${"GLOBALS"}["bidhsvondi"]} = ${${"GLOBALS"}["sahblgvo"]} + 1; 
                                                                                                                                                                                        } else if (${${"GLOBALS"}["xeyjsxwn"]} == "Recieved") { 
                                                                                                                                                                                            ${"GLOBALS"}["nivatl"] = "received"; 
                                                                                                                                                                                            ${"GLOBALS"}["fipekntt"] = "receivedBotMessage"; 
                                                                                                                                                                                            ${${"GLOBALS"}["kfacbvpc"]} = ${${"GLOBALS"}["nivatl"]} + 1; 
                                                                                                                                                                                            ${${"GLOBALS"}["fipekntt"]} = ${${"GLOBALS"}["kymwqdh"]} + 1; 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${${"GLOBALS"}["gmbdnjximrt"]} = $adb->query_result(${${"GLOBALS"}["pdunhrh"]}, ${${"GLOBALS"}["gjdoju"]}, "whatsapp_unreadread"); 
                                                                                                                                                                                        if (${$wfaxbkzvb} == "Read") { 
                                                                                                                                                                                            $bchuupi = "read"; 
                                                                                                                                                                                            ${$bchuupi} = ${${"GLOBALS"}["hsqlfix"]} + 1; 
                                                                                                                                                                                        } 
                                                                                                                                                                                        if (${${"GLOBALS"}["holsmfwwf"]} == "Read") { 
                                                                                                                                                                                            ${"GLOBALS"}["jqqfebxs"] = "readMassMessages"; 
                                                                                                                                                                                            ${${"GLOBALS"}["arbugcuugvns"]} = ${${"GLOBALS"}["jqqfebxs"]} + 1; 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            ${"GLOBALS"}["ltzhmxil"] = "unreadMassMessages"; 
                                                                                                                                                                                            $nvlwnsx = "unreadMassMessages"; 
                                                                                                                                                                                            ${$nvlwnsx} = ${${"GLOBALS"}["ltzhmxil"]} + 1; 
                                                                                                                                                                                        } 
                                                                                                                                                                                    } 
                                                                                                                                                                                    ${$ihqjffgyvb}["count"][] = ${$uyfdpngll}; 
                                                                                                                                                                                    ${${"GLOBALS"}["iylmmdpdybw"]}["count"][] = ${${"GLOBALS"}["hsqlfix"]}; 
                                                                                                                                                                                } 
                                                                                                                                                                                $bhrzsvf = "result"; 
                                                                                                                                                                                $gesbtsi = "totalReadMassMessagesURL"; 
                                                                                                                                                                                ${${"GLOBALS"}["ulyiznvbvdc"]}["Sent"] = ${${"GLOBALS"}["pdxxefttqyfv"]}; 
                                                                                                                                                                                ${${"GLOBALS"}["mnbqufdy"]}["Read"] = ${${"GLOBALS"}["iylmmdpdybw"]}; 
                                                                                                                                                                                ${${"GLOBALS"}["peelheugn"]} = ",["createdtime",\"bw","" . ${${"GLOBALS"}["rjifkjo"]} . "," . ${${"GLOBALS"}["ioygscrp"]} . ""]";if(${${"GLOBALS"}["lrpqdwdupti"]}=="All"||${${"GLOBALS"}["uwqnmdxqot"]}==""){$ioyekavdjesr="youPhoneFilter";${$ioyekavdjesr} = "";}else{ 
                                                                                                                                                                                    $deqjvdakhkq = "scanUsers"; 
                                                                                                                                                                                    ${${"GLOBALS"}["nofxvhogc"]} = ",["your_number",\"e",\"" . ${$deqjvdakhkq} . ""]";}if(${${"GLOBALS"}["ebeoexregpd"]}=="BroadcastStatistics"){${"GLOBALS"}["ilvldidrbn"]="totalactiveBotChat";${"GLOBALS"}["cioqjswitn"] = "totalMassMessages";$ogutmgdufgkv = "totalfinishBotChat";${"GLOBALS"}["zprpttw"] = "readMassMessages";$eblsffj = "totalReadMassMessagesURL";${${"GLOBALS"}["nifvtnlkxv"]} = ${${"GLOBALS"}["cioqjswitn"]};${${"GLOBALS"}["wpxnpcibt"]} = "index.php?module=CTWhatsApp&view=List&search_params=[[["message_type\","e","Mass Message\"]" . ${${"GLOBALS"}["peelheugn"]} . "]]";${${"GLOBALS"}["dsoskrpnmn"]} = ${${"GLOBALS"}["zprpttw"]};${$eblsffj} = "index.php?module=CTWhatsApp&view=List&search_params=[[["message_type\",\"e\","Mass Message\"],["whatsapp_unreadread","e",\"Read\"]" . ${${"GLOBALS"}["peelheugn"]} . "]]";${${"GLOBALS"}["lsvndbxt"]} = ${${"GLOBALS"}["lecjdxsy"]};${"GLOBALS"}["bybzwj"] = "totalMessage";${"GLOBALS"}["vuaakgusrtt"] = "totalFinishedChat";${"GLOBALS"}["udvkhtyfdpd"] = "totalSentMessage";${${"GLOBALS"}["froaotx"]} = "index.php?module=CTWhatsApp&view=List&search_params=[[[\"message_type","e",\"Mass Message\"],["whatsapp_unreadread\","e","Unread"]" . ${${"GLOBALS"}["peelheugn"]} . "]]";${${"GLOBALS"}["bybzwj"]} = 0;${${"GLOBALS"}["udvkhtyfdpd"]} = 0;${${"GLOBALS"}["frtpcahvhu"]} = 0;${${"GLOBALS"}["vuaakgusrtt"]} = 0;${${"GLOBALS"}["voffbkxsm"]} = 0;${${"GLOBALS"}["uocbmlghok"]} = 0;${${"GLOBALS"}["jxrcysrjb"]} = 0;${${"GLOBALS"}["xstmpypmeenk"]} = 0;${${"GLOBALS"}["ilvldidrbn"]} = 0;${$ogutmgdufgkv} = 0;}else if(${${"GLOBALS"}["ntfjdnjb"]}=="SendReceiveStatistics"){$mqodcpv="totalReceivedBotMessage";$qvqntvxju = "received";$siwdyn = "totalPendingChat";$vvhouwhfmwl = "youPhoneFilter";$cnxubhocu = "totalMessage";$vlcpdvlis = "totalFinishedChat";$dptngabaen = "finishedChat";$plwtycf = "totalBotMessages";${$cnxubhocu} = ${${"GLOBALS"}["ebxkaanvxon"]};$dssmikd = "dateFilter";${${"GLOBALS"}["mnsnrguxx"]} = "index.php?module=CTWhatsApp&view=List&search_params=[[[\"message_type\","e",\"Send,Recieved"]".${$dssmikd}.${${"GLOBALS"}["nofxvhogc"]}."]]";${${"GLOBALS"}["lcqjyb"]}=${${"GLOBALS"}["eouuxjpu"]};${${"GLOBALS"}["azilha"]}="index . php ? module = CTWhatsApp & view = list&search_params=[[[\"message_type\",\"e\",\"Send\"]" . ${${"GLOBALS"}["peelheugn"]} . ${$vvhouwhfmwl} . "]]";${${"GLOBALS"}["frtpcahvhu"]} = ${$qvqntvxju};${${"GLOBALS"}["mvgkfjucvi"]} = "index.php?module=CTWhatsApp&view=List&search_params=[[[\"message_type",\"e\","Recieved\"]" . ${${"GLOBALS"}["peelheugn"]} . ${${"GLOBALS"}["nofxvhogc"]} . "]]";${$vlcpdvlis} = ${$dptngabaen};${$siwdyn} = ${${"GLOBALS"}["iolvgj"]};$bknqtli = "totalReadMassMessages";${${"GLOBALS"}["nifvtnlkxv"]} = 0;${$bknqtli} = 0;${${"GLOBALS"}["lsvndbxt"]} = 0;${$plwtycf} = 0;${${"GLOBALS"}["jxrcysrjb"]} = 0;${$mqodcpv} = 0;${${"GLOBALS"}["neofzuuxsl"]} = 0;${${"GLOBALS"}["iflinocjjdy"]} = 0;}else if(${${"GLOBALS"}["ntfjdnjb"]}=="ChatbotStatistics"){$efmicvyua="totalMessage";${"GLOBALS"}["tctibbhdef"] = "totalPendingChat";${"GLOBALS"}["tubfpbreuzy"] = "totalBotMessages";$fxapgvf = "totalMassMessages";${${"GLOBALS"}["tubfpbreuzy"]} = ${${"GLOBALS"}["kgtfnqlmi"]};${${"GLOBALS"}["jxrcysrjb"]} = ${${"GLOBALS"}["vfjiwcxpui"]};$iyqidlhzwlg = "totalactiveBotChat";${${"GLOBALS"}["xstmpypmeenk"]} = ${${"GLOBALS"}["kymwqdh"]};${$iyqidlhzwlg} = ${${"GLOBALS"}["yroxljng"]};${${"GLOBALS"}["iflinocjjdy"]} = ${${"GLOBALS"}["lxewcehtnrbl"]};${$fxapgvf} = 0;${${"GLOBALS"}["dsoskrpnmn"]} = 0;${${"GLOBALS"}["lsvndbxt"]} = 0;${"GLOBALS"}["pflngnc"] = "totalSentMessage";${$efmicvyua} = 0;${${"GLOBALS"}["pflngnc"]} = 0;${${"GLOBALS"}["frtpcahvhu"]} = 0;${${"GLOBALS"}["wxmpdziw"]} = 0;${${"GLOBALS"}["tctibbhdef"]} = 0;}${$bhrzsvf}=array("arrayData"=>${${"GLOBALS"}["mnbqufdy"]},"totalMessage"=>${${"GLOBALS"}["tfbvswp"]},"totalSentMessage"=>${$txbhqiy},"totalReceivedMessage"=>${${"GLOBALS"}["frtpcahvhu"]},"totalMassMessages"=>${${"GLOBALS"}["ttttgxpga"]},"totalReadMassMessages"=>${${"GLOBALS"}["dsoskrpnmn"]},"totalUnReadMassMessages"=>${$dfrlbbvlwggi},"totalFinishedChat"=>${${"GLOBALS"}["wxmpdziw"]},"totalPendingChat"=>${${"GLOBALS"}["lspdiiupf"]},"totalSendBotMessages"=>${$odiigpm},"totalReceivedBotMessage"=>${${"GLOBALS"}["vpnwblkqkg"]},"totalBotMessages"=>${$vflifjzp},"totalactiveBotChat"=>${${"GLOBALS"}["neofzuuxsl"]},"totalfinishBotChat"=>${${"GLOBALS"}["hghskxjuaec"]},"totalMessageURL"=>${${"GLOBALS"}["mnsnrguxx"]},"totalSentMessageURL"=>${${"GLOBALS"}["azilha"]},"totalReceivedMessageURL"=>${${"GLOBALS"}["mvgkfjucvi"]},"totalMassMessagesURL"=>${$ooomao},"totalReadMassMessagesURL"=>${$gesbtsi},"totalUnReadMassMessagesURL"=>${${"GLOBALS"}["froaotx"]});return${${"GLOBALS"}["iryaaagcqts"]};}public function massMessagePauseResume($status,$recordid){global$adb;$ykbyowxxgr="status";${${"GLOBALS"}["xmxinsqumdvs"]}=$adb->pquery("UPDATE vtiger_ctwhatsappschedulesendmsg SET status = ? WHERE schedulesendmsgid = ? and send_msg = 0",array(${$ykbyowxxgr},${${"GLOBALS"}["fzfraqda"]}));}public function massMessageDelete($recordid){global$adb;${${"GLOBALS"}["xeryficnm"]}=$adb->pquery("DELETE FROM vtiger_ctwhatsappmassmessage WHERE massmessageid = ?",array(${${"GLOBALS"}["fzfraqda"]}));${"GLOBALS"}["qlawxsuup"]="massMessageDeleteQuery";${${"GLOBALS"}["qlawxsuup"]}=$adb->pquery("DELETE FROM vtiger_ctwhatsappschedulesendmsg WHERE schedulesendmsgid = ?",array(${${"GLOBALS"}["fzfraqda"]}));}public function getWhatsappTheme(){global$adb;$fgbwdwdcmyx="query";${$fgbwdwdcmyx}=$adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE theme_view != ''",array());${${"GLOBALS"}["rxpsfyv"]}=$adb->query_result(${${"GLOBALS"}["vvonkioccd"]},0,"theme_view");return${${"GLOBALS"}["rxpsfyv"]};}public function getModulefields($tabid,$sourceModuleName,$moduleRecordId){global$adb;${"GLOBALS"}["ucpzcmin"]="moduleRecordId";$novglxk="query";${"GLOBALS"}["wqdoymszqojc"]="recordModel";${${"GLOBALS"}["vvonkioccd"]}=$adb->pquery("SELECT * FROM vtiger_field WHERE tabid = ? and quickcreate IN('0', '2') and uitype NOT IN('56', '51', '10', '15', '5', '33', '57')",array(${${"GLOBALS"}["kgwoicgs"]}));${"GLOBALS"}["gbjcvhdeg"]="num_rows";$wbfwwdljx="num_rows";$sikcyatpvriw="i";$pdjcywiigeej="i";$vbqvyidqkofz="i";${${"GLOBALS"}["gbjcvhdeg"]}=$adb->num_rows(${$novglxk});${${"GLOBALS"}["wqdoymszqojc"]}=Vtiger_Record_Model::getInstanceById(${${"GLOBALS"}["ucpzcmin"]},${${"GLOBALS"}["nymoewov"]});${${"GLOBALS"}["tvrlnpf"]}=array();for(${$sikcyatpvriw}=0;${$vbqvyidqkofz}<${$wbfwwdljx};${$pdjcywiigeej}++){$sxtljvovafpp="i";$dkxecruetanp = "query";${${"GLOBALS"}["iheqsirj"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, ${$sxtljvovafpp}, "fieldname");${"GLOBALS"}["qjkfyifpwx"] = "fieldValue";$hjrrtzfrwq = "fieldValue";${${"GLOBALS"}["jltvgbsbqje"]} = $adb->query_result(${$dkxecruetanp}, ${${"GLOBALS"}["gjdoju"]}, "fieldlabel");${${"GLOBALS"}["qjkfyifpwx"]} = $recordModel->get(${${"GLOBALS"}["iheqsirj"]});${"GLOBALS"}["yjiojoed"] = "fieldlabel";${${"GLOBALS"}["tvrlnpf"]}[${${"GLOBALS"}["yjiojoed"]}] = array("fieldName" => ${${"GLOBALS"}["iheqsirj"]}, "fieldValue" => ${$hjrrtzfrwq});}return${${"GLOBALS"}["tvrlnpf"]};}public function getUserScanWhatsAppAllData($userid){ 
                                                                                                                                                                                        $hpxthoxxs = "query"; 
                                                                                                                                                                                        ${"GLOBALS"}["vghkqgedl"] = "query"; 
                                                                                                                                                                                        ${"GLOBALS"}["voipzi"] = "autoResponderText"; 
                                                                                                                                                                                        ${"GLOBALS"}["odcowjm"] = "userid"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        $yqoidsqeff = "whatsappStatus"; 
                                                                                                                                                                                        $ylyxrg = "auth_token"; 
                                                                                                                                                                                        $iqijpvvid = "customfield1"; 
                                                                                                                                                                                        ${"GLOBALS"}["wrcpppgzggbo"] = "query"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield5 = ?", array(${${"GLOBALS"}["odcowjm"]})); 
                                                                                                                                                                                        $mmrkgq = "api_url"; 
                                                                                                                                                                                        ${"GLOBALS"}["cinwunmsmuyb"] = "row"; 
                                                                                                                                                                                        ${"GLOBALS"}["gilgtp"] = "autoResponder"; 
                                                                                                                                                                                        ${"GLOBALS"}["kbjdlxr"] = "api_url"; 
                                                                                                                                                                                        $jklcmxyyb = "whatsappStatus"; 
                                                                                                                                                                                        ${"GLOBALS"}["lrubjqtkshoy"] = "query"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nudtoiqqufg"]} = $adb->num_rows(${${"GLOBALS"}["wrcpppgzggbo"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["kbjdlxr"]} = $adb->query_result(${${"GLOBALS"}["lrubjqtkshoy"]}, 0, "api_url"); 
                                                                                                                                                                                        ${$ylyxrg} = $adb->query_result(${$hpxthoxxs}, 0, "auth_token"); 
                                                                                                                                                                                        $ucpzcpkt = "query"; 
                                                                                                                                                                                        ${"GLOBALS"}["jcaxyeua"] = "query"; 
                                                                                                                                                                                        ${${"GLOBALS"}["thipsfslsq"]} = $adb->query_result(${${"GLOBALS"}["jcaxyeua"]}, 0, "customfield1"); 
                                                                                                                                                                                        ${${"GLOBALS"}["sqwzkrvh"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsappno"); 
                                                                                                                                                                                        ${$yqoidsqeff} = $adb->query_result(${$ucpzcpkt}, 0, "whatsappstatus"); 
                                                                                                                                                                                        ${${"GLOBALS"}["gilgtp"]} = $adb->query_result(${${"GLOBALS"}["vghkqgedl"]}, 0, "customfield6"); 
                                                                                                                                                                                        ${${"GLOBALS"}["voipzi"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "customfield7"); 
                                                                                                                                                                                        ${${"GLOBALS"}["hqqjdowoo"]} = array("row" => ${${"GLOBALS"}["cinwunmsmuyb"]}, "api_url" => ${$mmrkgq}, "auth_token" => ${${"GLOBALS"}["ockmkyh"]}, "customfield1" => ${$iqijpvvid}, "whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}, "whatsappStatus" => ${$jklcmxyyb}, "autoResponder" => ${${"GLOBALS"}["fnhtnnlo"]}, "autoResponderText" => ${${"GLOBALS"}["jwqylrilpfj"]}); 
                                                                                                                                                                                        return ${${"GLOBALS"}["hqqjdowoo"]}; 
                                                                                                                                                                                    }public function checkMessageId($messageid){ 
                                                                                                                                                                                        $cnmhskcumv = "row"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        $jtjhstj = "row"; 
                                                                                                                                                                                        $whidybbb = "query"; 
                                                                                                                                                                                        $mmhswqfjhd = "query"; 
                                                                                                                                                                                        ${$whidybbb} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapp.msgid = ?", array(${${"GLOBALS"}["ujkdmreqiw"]})); 
                                                                                                                                                                                        ${$jtjhstj} = $adb->num_rows(${$mmhswqfjhd}); 
                                                                                                                                                                                        return ${$cnmhskcumv}; 
                                                                                                                                                                                    }public function getScanNumberUserId($scanNumber){ 
                                                                                                                                                                                        ${"GLOBALS"}["sxttmob"] = "userScanUsersData"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE whatsappno = ?", array(${${"GLOBALS"}["iotxfglkhbd"]})); 
                                                                                                                                                                                        ${"GLOBALS"}["jfxpvrwghcc"] = "row"; 
                                                                                                                                                                                        ${"GLOBALS"}["vskoyltpbc"] = "row"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vskoyltpbc"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["jfxpvrwghcc"]}) { 
                                                                                                                                                                                            ${${"GLOBALS"}["gngfji"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "customfield5"); 
                                                                                                                                                                                            ${${"GLOBALS"}["eumgdcnj"]} = array("scanUserId" => ${${"GLOBALS"}["gngfji"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        return ${${"GLOBALS"}["sxttmob"]}; 
                                                                                                                                                                                    }public function getAdmminScanDetail(){ 
                                                                                                                                                                                        $xvanie = "row"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        $cirgbllr = "row"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE customfield4 != ''", array()); 
                                                                                                                                                                                        ${$cirgbllr} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                                                                                                                        if (${$xvanie}) { 
                                                                                                                                                                                            ${"GLOBALS"}["yhuegb"] = "api_url"; 
                                                                                                                                                                                            $pcodgmdgb = "query"; 
                                                                                                                                                                                            ${"GLOBALS"}["iejccucldt"] = "showunknownmsg"; 
                                                                                                                                                                                            $ehenvr = "customfield3"; 
                                                                                                                                                                                            ${"GLOBALS"}["dbzswgewx"] = "api_url"; 
                                                                                                                                                                                            $ntoglsfqhfm = "whatsappUserManagemnt"; 
                                                                                                                                                                                            ${"GLOBALS"}["vbbjgrptzcsn"] = "whatsappno"; 
                                                                                                                                                                                            ${"GLOBALS"}["tflwenleovj"] = "admminScanDetail"; 
                                                                                                                                                                                            $yitkoxppbehc = "query"; 
                                                                                                                                                                                            $fqobpjcud = "query"; 
                                                                                                                                                                                            ${${"GLOBALS"}["iejccucldt"]} = $adb->query_result(${$pcodgmdgb}, 0, "showunknownmsg"); 
                                                                                                                                                                                            $wnjulr = "whatsappUserManagemnt"; 
                                                                                                                                                                                            ${$ehenvr} = $adb->query_result(${$yitkoxppbehc}, 0, "customfield3"); 
                                                                                                                                                                                            ${${"GLOBALS"}["yhuegb"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "api_url"); 
                                                                                                                                                                                            ${${"GLOBALS"}["vbbjgrptzcsn"]} = $adb->query_result(${$fqobpjcud}, 0, "whatsappno"); 
                                                                                                                                                                                            ${$wnjulr} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "customfield4"); 
                                                                                                                                                                                            ${${"GLOBALS"}["tflwenleovj"]} = array("showunknownmsg" => ${${"GLOBALS"}["xoweiqyll"]}, "multipleuser" => ${${"GLOBALS"}["hgfvtmcb"]}, "api_url" => ${${"GLOBALS"}["dbzswgewx"]}, "whatsappUserManagemnt" => ${$ntoglsfqhfm}, "whatsappno" => ${${"GLOBALS"}["sqwzkrvh"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        return ${${"GLOBALS"}["naexkqrx"]}; 
                                                                                                                                                                                    }public function getOneDaysMessages(){ 
                                                                                                                                                                                        ${"GLOBALS"}["jutxqnxvv"] = "rows"; 
                                                                                                                                                                                        ${"GLOBALS"}["oxntbjpoedf"] = "todayDate"; 
                                                                                                                                                                                        $yibahk = "query"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${${"GLOBALS"}["thuxsikag"]} = date("Y-m-d"); 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp INNER JOIN  vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapp.message_type IN ('Send','Mass Message') AND DATE(vtiger_crmentity.createdtime) = '" . ${${"GLOBALS"}["oxntbjpoedf"]} . "'"); 
                                                                                                                                                                                        ${${"GLOBALS"}["jutxqnxvv"]} = $adb->num_rows(${$yibahk}); 
                                                                                                                                                                                        return ${${"GLOBALS"}["iwyngpalekm"]}; 
                                                                                                                                                                                    }public function getWhatsappAccountDetail($licenseKey){ 
                                                                                                                                                                                        $vftmarpte = "curl"; 
                                                                                                                                                                                        $bofdbkghwmhn = "result"; 
                                                                                                                                                                                        $qdfkvhejc = "curl"; 
                                                                                                                                                                                        $lqugxyd = "result"; 
                                                                                                                                                                                        ${${"GLOBALS"}["ekpeslmlxdfu"]} = "https://www.crmtiger.com/whatsapp/checklifromapi.php?license_key=" . ${${"GLOBALS"}["dciiwyyy"]}; 
                                                                                                                                                                                        ${$vftmarpte} = curl_init(); 
                                                                                                                                                                                        $crdfhcp = "response"; 
                                                                                                                                                                                        $lxlckwebdqt = "apiURL"; 
                                                                                                                                                                                        ${"GLOBALS"}["kkhdqdclk"] = "response"; 
                                                                                                                                                                                        $thyyhjb = "curl"; 
                                                                                                                                                                                        curl_setopt_array(${$thyyhjb}, array(CURLOPT_URL => ${$lxlckwebdqt}, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_USERAGENT => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13",)); 
                                                                                                                                                                                        ${$lqugxyd} = curl_exec(${$qdfkvhejc}); 
                                                                                                                                                                                        ${${"GLOBALS"}["kkhdqdclk"]} = json_decode(${$bofdbkghwmhn}); 
                                                                                                                                                                                        curl_close(${${"GLOBALS"}["iuybajel"]}); 
                                                                                                                                                                                        return ${$crdfhcp}; 
                                                                                                                                                                                    }public function getWhatsappNumberImportant($mobileno){ 
                                                                                                                                                                                        ${"GLOBALS"}["zxquzntpsqka"] = "mobileno"; 
                                                                                                                                                                                        $hhjalxlztzlx = "important"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${"GLOBALS"}["vmbbfp"] = "important"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_ctwhatsapp.whatsapp_withccode = ? AND vtiger_crmentity.deleted = 0 LIMIT 0,1", array(${${"GLOBALS"}["zxquzntpsqka"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["vmbbfp"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsapp_important"); 
                                                                                                                                                                                        return ${$hhjalxlztzlx}; 
                                                                                                                                                                                    }public function getlastMessageDateTime(){ 
                                                                                                                                                                                        ${"GLOBALS"}["rftjkmq"] = "query"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${${"GLOBALS"}["rftjkmq"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid WHERE vtiger_crmentity.deleted = 0 AND vtiger_ctwhatsapp.msgid != '' ORDER BY vtiger_ctwhatsapp.ctwhatsappid DESC LIMIT 0,1", array()); 
                                                                                                                                                                                        ${${"GLOBALS"}["jfrhsfy"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsapp_datetime"); 
                                                                                                                                                                                        return ${${"GLOBALS"}["jfrhsfy"]}; 
                                                                                                                                                                                    }public function assignAllMessage($request){ 
                                                                                                                                                                                        ${"GLOBALS"}["fnrhwkkpyh"] = "moduleName"; 
                                                                                                                                                                                        ${"GLOBALS"}["qljsrhlq"] = "moduleRecordSearch"; 
                                                                                                                                                                                        ${"GLOBALS"}["pptksotmaar"] = "whatsappNumber"; 
                                                                                                                                                                                        $mttrgsnbvrc = "sourceModule"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${"GLOBALS"}["wketdkstnk"] = "whatsappNumber"; 
                                                                                                                                                                                        ${"GLOBALS"}["vxaenrm"] = "whatsappNumber"; 
                                                                                                                                                                                        ${${"GLOBALS"}["fnrhwkkpyh"]} = $request->getModule(); 
                                                                                                                                                                                        ${$mttrgsnbvrc} = $request->get("sourceModule"); 
                                                                                                                                                                                        ${${"GLOBALS"}["cgbnqlvh"]} = $request->get("moduleRecordId"); 
                                                                                                                                                                                        ${${"GLOBALS"}["qljsrhlq"]} = $request->get("moduleRecordSearch"); 
                                                                                                                                                                                        ${${"GLOBALS"}["vxaenrm"]} = $request->get("phonenumber"); 
                                                                                                                                                                                        $cogdokdbccds = "moduleRecordId"; 
                                                                                                                                                                                        ${${"GLOBALS"}["wketdkstnk"]} = $adb->pquery("UPDATE vtiger_ctwhatsapp SET whatsapp_contactid = ? WHERE whatsapp_withccode = ?", array(${$cogdokdbccds}, ${${"GLOBALS"}["pptksotmaar"]})); 
                                                                                                                                                                                    }public function getWhatsAppDetailWithMobileNo($whatsappNumber){ 
                                                                                                                                                                                        ${"GLOBALS"}["vcplmuxy"] = "whatsappNumber"; 
                                                                                                                                                                                        $rizwjz = "getConfigurationDataQuery"; 
                                                                                                                                                                                        ${"GLOBALS"}["pcvszekiqib"] = "api_url"; 
                                                                                                                                                                                        ${"GLOBALS"}["donawhdtlii"] = "whatsappDetails"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${$rizwjz} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappusers WHERE whatsappno = ?", array(${${"GLOBALS"}["vcplmuxy"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["yzcofwul"]} = $adb->num_rows(${${"GLOBALS"}["vpqpofmsg"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["qphxkdxshb"] = "customfield1"; 
                                                                                                                                                                                        $bfompz = "auth_token"; 
                                                                                                                                                                                        $dwsxuib = "configureUserid"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["yzcofwul"]} == 0) { 
                                                                                                                                                                                            $haumyg = "configureUserid"; 
                                                                                                                                                                                            $lioljtdgl = "whatsappNumber"; 
                                                                                                                                                                                            $hjzljdvto = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            $zwtlfonm = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["csziedxdndf"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsappconfiguration WHERE whatsappno = ?", array(${$lioljtdgl})); 
                                                                                                                                                                                            $hpilflds = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${"GLOBALS"}["sguiiqi"] = "customfield1"; 
                                                                                                                                                                                            $eeudicg = "api_url"; 
                                                                                                                                                                                            ${${"GLOBALS"}["stsneic"]} = $adb->num_rows(${$zwtlfonm}); 
                                                                                                                                                                                            ${$eeudicg} = $adb->query_result(${${"GLOBALS"}["csziedxdndf"]}, 0, "api_url"); 
                                                                                                                                                                                            ${"GLOBALS"}["veknlxj"] = "getConfigurationDatasQuery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["ockmkyh"]} = $adb->query_result(${${"GLOBALS"}["veknlxj"]}, 0, "auth_token"); 
                                                                                                                                                                                            ${${"GLOBALS"}["sguiiqi"]} = $adb->query_result(${${"GLOBALS"}["csziedxdndf"]}, 0, "customfield1"); 
                                                                                                                                                                                            ${"GLOBALS"}["muqqvxodficu"] = "whatsappScanNo"; 
                                                                                                                                                                                            ${${"GLOBALS"}["muqqvxodficu"]} = $adb->query_result(${${"GLOBALS"}["csziedxdndf"]}, 0, "whatsappno"); 
                                                                                                                                                                                            ${${"GLOBALS"}["ftgrsecllxap"]} = $adb->query_result(${$hjzljdvto}, 0, "whatsappstatus"); 
                                                                                                                                                                                            ${$haumyg} = $adb->query_result(${$hpilflds}, 0, "customfield5"); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $vkwjfuqwxpig = "getConfigurationDataQuery"; 
                                                                                                                                                                                            $cstkxtb = "getConfigurationDataQuery"; 
                                                                                                                                                                                            ${${"GLOBALS"}["mllfgvid"]} = $adb->query_result(${$vkwjfuqwxpig}, 0, "api_url"); 
                                                                                                                                                                                            ${"GLOBALS"}["ealgowaljml"] = "getConfigurationDataQuery"; 
                                                                                                                                                                                            ${"GLOBALS"}["kjgoiozauwkn"] = "whatsappStatus"; 
                                                                                                                                                                                            ${${"GLOBALS"}["ockmkyh"]} = $adb->query_result(${${"GLOBALS"}["vpqpofmsg"]}, 0, "auth_token"); 
                                                                                                                                                                                            ${${"GLOBALS"}["thipsfslsq"]} = $adb->query_result(${${"GLOBALS"}["vpqpofmsg"]}, 0, "customfield1"); 
                                                                                                                                                                                            ${${"GLOBALS"}["glbmxcn"]} = $adb->query_result(${$cstkxtb}, 0, "whatsappno"); 
                                                                                                                                                                                            ${${"GLOBALS"}["kjgoiozauwkn"]} = $adb->query_result(${${"GLOBALS"}["ealgowaljml"]}, 0, "whatsappstatus"); 
                                                                                                                                                                                            ${${"GLOBALS"}["bbewdfnpp"]} = $adb->query_result(${${"GLOBALS"}["vpqpofmsg"]}, 0, "customfield5"); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${${"GLOBALS"}["qlapkb"]} = array("api_url" => ${${"GLOBALS"}["pcvszekiqib"]}, "auth_token" => ${$bfompz}, "customfield1" => ${${"GLOBALS"}["qphxkdxshb"]}, "whatsappScanNo" => ${${"GLOBALS"}["glbmxcn"]}, "whatsappStatus" => ${${"GLOBALS"}["ftgrsecllxap"]}, "configureUserid" => ${$dwsxuib}, "username" => getUserName(${${"GLOBALS"}["bbewdfnpp"]})); 
                                                                                                                                                                                        return ${${"GLOBALS"}["donawhdtlii"]}; 
                                                                                                                                                                                    }public function getWhatsappHistory($phone,$whatsappNumber){ 
                                                                                                                                                                                        ${"GLOBALS"}["tprqvccmu"] = "whatsappNumber"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${"GLOBALS"}["uldxbg"] = "getCursor"; 
                                                                                                                                                                                        ${"GLOBALS"}["nyeegcu"] = "historyFromme"; 
                                                                                                                                                                                        ${"GLOBALS"}["myiwsj"] = "getCursor"; 
                                                                                                                                                                                        $nhaeojil = "cursorRows"; 
                                                                                                                                                                                        $rcqcrhhho = "history_id"; 
                                                                                                                                                                                        ${${"GLOBALS"}["myiwsj"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_history WHERE mobile_no = ? AND scanwpnumber = ?", array(${${"GLOBALS"}["swmhivnb"]}, ${${"GLOBALS"}["tprqvccmu"]})); 
                                                                                                                                                                                        ${"GLOBALS"}["uvdplosplbi"] = "getCursor"; 
                                                                                                                                                                                        ${$nhaeojil} = $adb->num_rows(${${"GLOBALS"}["hkirlqk"]}); 
                                                                                                                                                                                        ${$rcqcrhhho} = $adb->query_result(${${"GLOBALS"}["hkirlqk"]}, 0, "history_id"); 
                                                                                                                                                                                        ${"GLOBALS"}["tvsntrob"] = "cursorRows"; 
                                                                                                                                                                                        ${${"GLOBALS"}["cfvjlx"]} = $adb->query_result(${${"GLOBALS"}["uldxbg"]}, 0, "history_fromme"); 
                                                                                                                                                                                        ${${"GLOBALS"}["lsgitwiqsdk"]} = $adb->query_result(${${"GLOBALS"}["uvdplosplbi"]}, 0, "remotjid"); 
                                                                                                                                                                                        ${${"GLOBALS"}["bqcwsdqc"]} = array("cursorRows" => ${${"GLOBALS"}["tvsntrob"]}, "history_id" => ${${"GLOBALS"}["hkdvptric"]}, "historyFromme" => ${${"GLOBALS"}["nyeegcu"]}, "remotjid" => ${${"GLOBALS"}["lsgitwiqsdk"]}); 
                                                                                                                                                                                        return ${${"GLOBALS"}["bqcwsdqc"]}; 
                                                                                                                                                                                    }public function insertWhatsappHistory($phone,$cursor,$history_fromme,$remoteJid,$whatsappNumber){ 
                                                                                                                                                                                        $edicfusc = "row"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${"GLOBALS"}["hbdbqvexxqzx"] = "phoneQuery"; 
                                                                                                                                                                                        ${${"GLOBALS"}["hbdbqvexxqzx"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_history WHERE mobile_no = ? AND scanwpnumber = ?", array(${${"GLOBALS"}["swmhivnb"]}, ${${"GLOBALS"}["pptcebfek"]})); 
                                                                                                                                                                                        ${"GLOBALS"}["obzhgcr"] = "row"; 
                                                                                                                                                                                        ${$edicfusc} = $adb->num_rows(${${"GLOBALS"}["fyckbyyjis"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["obzhgcr"]} == 1) { 
                                                                                                                                                                                            ${"GLOBALS"}["kcugbyjmnp"] = "history_fromme"; 
                                                                                                                                                                                            $adb->pquery("UPDATE vtiger_ctwhatsapp_history set history_id=?, history_fromme=?, remotjid=? WHERE mobile_no=?", array(${${"GLOBALS"}["xttimayys"]}, ${${"GLOBALS"}["kcugbyjmnp"]}, ${${"GLOBALS"}["rpcejygh"]}, ${${"GLOBALS"}["swmhivnb"]})); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $otumwbgmxi = "history_fromme"; 
                                                                                                                                                                                            ${"GLOBALS"}["jujyghqb"] = "whatsappNumber"; 
                                                                                                                                                                                            $jilcersdnlis = "remoteJid"; 
                                                                                                                                                                                            ${"GLOBALS"}["sgshrzuuea"] = "phone"; 
                                                                                                                                                                                            $adb->pquery("INSERT INTO vtiger_ctwhatsapp_history (scanwpnumber, mobile_no, history_id, history_fromme, remotjid) values(?,?,?,?,?)", array(${${"GLOBALS"}["jujyghqb"]}, ${${"GLOBALS"}["sgshrzuuea"]}, ${${"GLOBALS"}["xttimayys"]}, ${$otumwbgmxi}, ${$jilcersdnlis})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    }public function saveWhatsAppHistoryData($request){ 
                                                                                                                                                                                        $spcegfsktxw = "whatsappNumber"; 
                                                                                                                                                                                        ${"GLOBALS"}["yopslcqdywz"] = "whatsappNumber"; 
                                                                                                                                                                                        ${"GLOBALS"}["tmcqpavjxv"] = "end_date"; 
                                                                                                                                                                                        ${"GLOBALS"}["lqylksd"] = "start_date"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${"GLOBALS"}["xqgskguventr"] = "key"; 
                                                                                                                                                                                        ${${"GLOBALS"}["lqylksd"]} = $request->get("start_date"); 
                                                                                                                                                                                        ${${"GLOBALS"}["tmcqpavjxv"]} = $request->get("end_date"); 
                                                                                                                                                                                        $tmrgkt = "apiUrl"; 
                                                                                                                                                                                        ${"GLOBALS"}["occgkoli"] = "configData"; 
                                                                                                                                                                                        ${$spcegfsktxw} = $request->get("whatsappNumber"); 
                                                                                                                                                                                        ${"GLOBALS"}["dkvybhrq"] = "val"; 
                                                                                                                                                                                        ${"GLOBALS"}["dvfzlumwlge"] = "query"; 
                                                                                                                                                                                        $btfnfrjbykd = "value"; 
                                                                                                                                                                                        ${${"GLOBALS"}["masxfp"]} = $request->get("history_status"); 
                                                                                                                                                                                        ${${"GLOBALS"}["oxvyxcm"]} = $request->get("firsttimehistory"); 
                                                                                                                                                                                        $iyezgr = "row"; 
                                                                                                                                                                                        $kffszq = "val"; 
                                                                                                                                                                                        if (${${"GLOBALS"}["oxvyxcm"]} == 1) { 
                                                                                                                                                                                            ${${"GLOBALS"}["masxfp"]} = 1; 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            ${${"GLOBALS"}["masxfp"]} = $request->get("history_status"); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        ${"GLOBALS"}["kxpmtwgfm"] = "url"; 
                                                                                                                                                                                        ${"GLOBALS"}["mupfusb"] = "postfields"; 
                                                                                                                                                                                        ${${"GLOBALS"}["dvfzlumwlge"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_contacts_history WHERE whatsappnumber = ?", array(${${"GLOBALS"}["pptcebfek"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["nudtoiqqufg"]} = $adb->num_rows(${${"GLOBALS"}["vvonkioccd"]}); 
                                                                                                                                                                                        ${"GLOBALS"}["mpqrttfqhi"] = "configData"; 
                                                                                                                                                                                        if (${$iyezgr} == 1) { 
                                                                                                                                                                                            $ngtwphrje = "start_date"; 
                                                                                                                                                                                            if (${$ngtwphrje} != "") { 
                                                                                                                                                                                                ${"GLOBALS"}["ndmdwxmzf"] = "start_date"; 
                                                                                                                                                                                                ${"GLOBALS"}["lbihegvydw"] = "end_date"; 
                                                                                                                                                                                                ${"GLOBALS"}["qawghie"] = "whatsappNumber"; 
                                                                                                                                                                                                $amgtcuk = "updateQuery"; 
                                                                                                                                                                                                ${$amgtcuk} = $adb->pquery("UPDATE vtiger_ctwhatsapp_contacts_history SET startdate = ?, enddate = ?, status = ? WHERE whatsappnumber = ?", array(${${"GLOBALS"}["ndmdwxmzf"]}, ${${"GLOBALS"}["lbihegvydw"]}, ${${"GLOBALS"}["masxfp"]}, ${${"GLOBALS"}["qawghie"]})); 
                                                                                                                                                                                            } else { 
                                                                                                                                                                                                ${"GLOBALS"}["gwngkofnv"] = "whatsappNumber"; 
                                                                                                                                                                                                $epmmyikr = "history_status"; 
                                                                                                                                                                                                $msmgrjjqxd = "updateQuery"; 
                                                                                                                                                                                                ${$msmgrjjqxd} = $adb->pquery("UPDATE vtiger_ctwhatsapp_contacts_history SET status = ? WHERE whatsappnumber = ?", array(${$epmmyikr}, ${${"GLOBALS"}["gwngkofnv"]})); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            $wlkqxuqxgpm = "start_date"; 
                                                                                                                                                                                            ${"GLOBALS"}["xtfbxonr"] = "end_date"; 
                                                                                                                                                                                            ${"GLOBALS"}["vjdrvcqmtl"] = "history_status"; 
                                                                                                                                                                                            ${${"GLOBALS"}["gbjmbbijyem"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsapp_contacts_history(whatsappnumber, startdate, enddate, status) values(?, ?, ?, ?)", array(${${"GLOBALS"}["pptcebfek"]}, ${$wlkqxuqxgpm}, ${${"GLOBALS"}["xtfbxonr"]}, ${${"GLOBALS"}["vjdrvcqmtl"]})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        $bednfnx = "auth_token"; 
                                                                                                                                                                                        ${${"GLOBALS"}["wewlyffagj"]} = CTWhatsApp_Record_Model::getWhatsAppDetailWithMobileNo(${${"GLOBALS"}["yopslcqdywz"]}); 
                                                                                                                                                                                        ${${"GLOBALS"}["fnclohksb"]} = ${${"GLOBALS"}["occgkoli"]}["api_url"]; 
                                                                                                                                                                                        ${$bednfnx} = ${${"GLOBALS"}["mpqrttfqhi"]}["auth_token"]; 
                                                                                                                                                                                        ${${"GLOBALS"}["txcrcgffe"]} = ${$tmrgkt} . "/chatlist"; 
                                                                                                                                                                                        ${${"GLOBALS"}["mupfusb"]} = array(); 
                                                                                                                                                                                        ${${"GLOBALS"}["dkvybhrq"]} = CTWhatsApp_WhatsappChat_View::callCURL(${${"GLOBALS"}["kxpmtwgfm"]}, ${${"GLOBALS"}["ugmgdme"]}, ${${"GLOBALS"}["ockmkyh"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["xplodhprqy"]}) { 
                                                                                                                                                                                            ${"GLOBALS"}["qqwhiccf"] = "whatsappNumber"; 
                                                                                                                                                                                            $adb->pquery("DELETE FROM vtiger_ctwhatsapp_allcontacts WHERE scannedwhatsappnumber = ?", array(${${"GLOBALS"}["pptcebfek"]})); 
                                                                                                                                                                                            $adb->pquery("DELETE FROM vtiger_ctwhatsapp_history WHERE scanwpnumber = ?", array(${${"GLOBALS"}["qqwhiccf"]})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        foreach (${$kffszq} as ${${"GLOBALS"}["xqgskguventr"]} => ${$btfnfrjbykd}) { 
                                                                                                                                                                                            ${"GLOBALS"}["wdhilfmlofbc"] = "jid"; 
                                                                                                                                                                                            ${${"GLOBALS"}["wdhilfmlofbc"]} = ${${"GLOBALS"}["bqyucn"]}["id"]; 
                                                                                                                                                                                            if (strpos(${${"GLOBALS"}["iwetfyrkn"]}, "@s.whatsapp.net") !== false) { 
                                                                                                                                                                                                ${"GLOBALS"}["tglbjgfqbj"] = "jid"; 
                                                                                                                                                                                                ${${"GLOBALS"}["nruuwxqrkm"]} = explode("@", ${${"GLOBALS"}["tglbjgfqbj"]}); 
                                                                                                                                                                                                ${${"GLOBALS"}["xzwonprosbs"]} = ${${"GLOBALS"}["nruuwxqrkm"]}[0]; 
                                                                                                                                                                                                ${${"GLOBALS"}["kefmtclevdi"]} = $adb->pquery("INSERT INTO vtiger_ctwhatsapp_allcontacts(scannedwhatsappnumber, customerwhatsappnumber, lastmessageid, syncstatus) values(?, ?, ?, ?)", array(${${"GLOBALS"}["pptcebfek"]}, ${${"GLOBALS"}["xzwonprosbs"]}, "", 0)); 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                    }public function getWhatsApphistoryDetail($request){ 
                                                                                                                                                                                        ${"GLOBALS"}["vudrfcbzary"] = "whatsappNumber"; 
                                                                                                                                                                                        ${"GLOBALS"}["mvgeteosdme"] = "startdate"; 
                                                                                                                                                                                        $cobknyelcgct = "enddate"; 
                                                                                                                                                                                        $cotmbdhpwfc = "result"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${${"GLOBALS"}["vudrfcbzary"]} = $request->get("multiWPNumber"); 
                                                                                                                                                                                        ${"GLOBALS"}["yyyvrcvu"] = "whatsappNumber"; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_contacts_history WHERE whatsappnumber = ?", array(${${"GLOBALS"}["yyyvrcvu"]})); 
                                                                                                                                                                                        ${${"GLOBALS"}["nijwyklrk"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "status"); 
                                                                                                                                                                                        $awfrxuih = "status"; 
                                                                                                                                                                                        ${${"GLOBALS"}["rjifkjo"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "startdate"); 
                                                                                                                                                                                        ${"GLOBALS"}["wconrn"] = "result"; 
                                                                                                                                                                                        ${${"GLOBALS"}["robegybtqc"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "enddate"); 
                                                                                                                                                                                        ${${"GLOBALS"}["wconrn"]} = array("status" => ${$awfrxuih}, "startdate" => ${${"GLOBALS"}["mvgeteosdme"]}, "enddate" => ${$cobknyelcgct}); 
                                                                                                                                                                                        return ${$cotmbdhpwfc}; 
                                                                                                                                                                                    }public function getConnectedWhatsAppNumber(){ 
                                                                                                                                                                                        $pdvwtjekzui = "query"; 
                                                                                                                                                                                        $foycslrv = "i"; 
                                                                                                                                                                                        ${"GLOBALS"}["fctdoourh"] = "query"; 
                                                                                                                                                                                        $yqwurww = "connectedWhatsAppNumber"; 
                                                                                                                                                                                        $ymjjksov = "connectedWhatsAppNumber"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${$pdvwtjekzui} = $adb->pquery("SELECT your_number FROM vtiger_ctwhatsapp 
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
            WHERE vtiger_crmentity.deleted = 0 GROUP BY vtiger_ctwhatsapp.your_number", array()); 
                                                                                                                                                                                        ${${"GLOBALS"}["iwyngpalekm"]} = $adb->num_rows(${${"GLOBALS"}["fctdoourh"]}); 
                                                                                                                                                                                        ${$yqwurww} = array(); 
                                                                                                                                                                                        for (${${"GLOBALS"}["gjdoju"]} = 0; ${$foycslrv} < ${${"GLOBALS"}["iwyngpalekm"]}; ${${"GLOBALS"}["gjdoju"]}++) { 
                                                                                                                                                                                            $getlkpvg = "your_number"; 
                                                                                                                                                                                            $udxtjnacuw = "connectedWhatsAppNumber"; 
                                                                                                                                                                                            ${"GLOBALS"}["dvnzajcgyhf"] = "query"; 
                                                                                                                                                                                            ${"GLOBALS"}["yeffuwvwfy"] = "your_number"; 
                                                                                                                                                                                            ${"GLOBALS"}["mdlpdqxpr"] = "your_number"; 
                                                                                                                                                                                            ${$getlkpvg} = $adb->query_result(${${"GLOBALS"}["dvnzajcgyhf"]}, ${${"GLOBALS"}["gjdoju"]}, "your_number"); 
                                                                                                                                                                                            ${$udxtjnacuw}[${${"GLOBALS"}["mdlpdqxpr"]}] = array("whatsappno" => ${${"GLOBALS"}["yeffuwvwfy"]}); 
                                                                                                                                                                                        } 
                                                                                                                                                                                        return ${$ymjjksov}; 
                                                                                                                                                                                    }public function getAllWhatsAppBot(){global$adb;${${"GLOBALS"}["vvonkioccd"]}=$adb->pquery("SELECT * FROM ctwhatsapp_bots WHERE remove = 0 and botname != '' ORDER BY botid DESC",array());$ovvxqg="whatsAppBot";${"GLOBALS"}["kyilxfqugj"]="i";$jbmppsl="rows";${${"GLOBALS"}["iwyngpalekm"]}=$adb->num_rows(${${"GLOBALS"}["vvonkioccd"]});${$ovvxqg}=array();for(${${"GLOBALS"}["gjdoju"]}=0;${${"GLOBALS"}["gjdoju"]}<${$jbmppsl};${${"GLOBALS"}["kyilxfqugj"]}++){$dukrvfrxn="i";$zbupqdykqc = "query";$bnvhosvtf = "botid";${"GLOBALS"}["vdxnchpbug"] = "query";${"GLOBALS"}["dcabpbyi"] = "botname";${$bnvhosvtf} = $adb->query_result(${$zbupqdykqc}, ${$dukrvfrxn}, "botid");${${"GLOBALS"}["tjegytbnoly"]} = $adb->query_result(${${"GLOBALS"}["vdxnchpbug"]}, ${${"GLOBALS"}["gjdoju"]}, "botname");${${"GLOBALS"}["cbpyxxkq"]}[${${"GLOBALS"}["peytnvq"]}] = ${${"GLOBALS"}["dcabpbyi"]};}return${${"GLOBALS"}["cbpyxxkq"]};}public function unreadGroupMessages(){ 
                                                                                                                                                                                        ${"GLOBALS"}["qkasnoi"] = "unreadgroupmessage"; 
                                                                                                                                                                                        ${"GLOBALS"}["nmjcthf"] = "query"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        $igdayqk = "unreadgroupmessage"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nmjcthf"]} = $adb->pquery("SELECT count(*) as unreadgroupmessage FROM vtiger_ctwhatsapp  
            INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_ctwhatsapp.ctwhatsappid  
            WHERE vtiger_ctwhatsapp.whatsapp_withccode = 'Groups' AND vtiger_ctwhatsapp.message_type = 'Recieved' AND vtiger_ctwhatsapp.whatsapp_unreadread = 'Unread' AND vtiger_crmentity.deleted = 0", array()); 
                                                                                                                                                                                        ${$igdayqk} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "unreadgroupmessage"); 
                                                                                                                                                                                        return ${${"GLOBALS"}["qkasnoi"]}; 
                                                                                                                                                                                    }public function setUserBeepOn($userID){ 
                                                                                                                                                                                        $emiumek = "row"; 
                                                                                                                                                                                        ${"GLOBALS"}["ekcwdrsfy"] = "query"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${${"GLOBALS"}["vvonkioccd"]} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_usersettings WHERE whatsappfield_name = 'beep_sound'", array()); 
                                                                                                                                                                                        ${$emiumek} = $adb->num_rows(${${"GLOBALS"}["ekcwdrsfy"]}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["nudtoiqqufg"]}) { 
                                                                                                                                                                                            ${"GLOBALS"}["ngpyxel"] = "whatsappfield_value"; 
                                                                                                                                                                                            ${${"GLOBALS"}["iqnkdtbuc"]} = $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsappfield_value") . "," . ${${"GLOBALS"}["ifdddjovlmp"]}; 
                                                                                                                                                                                            $adb->pquery("UPDATE vtiger_ctwhatsapp_usersettings SET whatsappfield_value = ? WHERE whatsappfield_name = 'beep_sound'", array(${${"GLOBALS"}["ngpyxel"]})); 
                                                                                                                                                                                        } else { 
                                                                                                                                                                                            ${"GLOBALS"}["qwwkkpugrh"] = "userID"; 
                                                                                                                                                                                            $adb->pquery("INSERT INTO vtiger_ctwhatsapp_usersettings(whatsappfield_label, whatsappfield_name, whatsappfield_value) values(?,?,?)", array("Beep Sound", "beep_sound", "," . ${${"GLOBALS"}["qwwkkpugrh"]})); 
                                                                                                                                                                                        } 
                                                                                                                                                                                    }public function setUserBeepOff($userID){global$adb;${"GLOBALS"}["oxgyhatb"]="query";$qvcfkezjo="row";${${"GLOBALS"}["oxgyhatb"]}=$adb->pquery("SELECT * FROM vtiger_ctwhatsapp_usersettings WHERE whatsappfield_name = 'beep_sound'",array());${${"GLOBALS"}["nudtoiqqufg"]}=$adb->num_rows(${${"GLOBALS"}["vvonkioccd"]});if(${$qvcfkezjo}){${"GLOBALS"}["ubvspxlmoij"]="replaceValue";${"GLOBALS"}["bwamkypyyr"] = "query";${${"GLOBALS"}["ubvspxlmoij"]} = "," . ${${"GLOBALS"}["ifdddjovlmp"]};${${"GLOBALS"}["dynrmqhxee"]} = str_replace(${${"GLOBALS"}["yfrywmrpnc"]}, "", $adb->query_result(${${"GLOBALS"}["bwamkypyyr"]}, 0, "whatsappfield_value"));$adb->pquery("UPDATE vtiger_ctwhatsapp_usersettings SET whatsappfield_value = ? WHERE whatsappfield_name = 'beep_sound'", array(${${"GLOBALS"}["dynrmqhxee"]}));}}public function whatsappUserBeepSettingQuery($currentUserID){ 
                                                                                                                                                                                        $yjmkzwyi = "query"; 
                                                                                                                                                                                        $qgcgwflli = "query"; 
                                                                                                                                                                                        global $adb; 
                                                                                                                                                                                        ${$qgcgwflli} = $adb->pquery("SELECT * FROM vtiger_ctwhatsapp_usersettings WHERE whatsappfield_name = 'beep_sound'", array()); 
                                                                                                                                                                                        ${"GLOBALS"}["jyrbqurax"] = "userBeep"; 
                                                                                                                                                                                        ${${"GLOBALS"}["nudtoiqqufg"]} = $adb->num_rows(${$yjmkzwyi}); 
                                                                                                                                                                                        if (${${"GLOBALS"}["nudtoiqqufg"]}) { 
                                                                                                                                                                                            ${${"GLOBALS"}["dynrmqhxee"]} = explode(",", $adb->query_result(${${"GLOBALS"}["vvonkioccd"]}, 0, "whatsappfield_value")); 
                                                                                                                                                                                            ${"GLOBALS"}["rpjbwzxucy"] = "userid"; 
                                                                                                                                                                                            ${${"GLOBALS"}["rpjbwzxucy"]} = in_array(${${"GLOBALS"}["akuldenvfkv"]}, ${${"GLOBALS"}["dynrmqhxee"]}); 
                                                                                                                                                                                            if (${${"GLOBALS"}["pdtrphovwnb"]}) { 
                                                                                                                                                                                                $ihcjzmxb = "userBeep"; 
                                                                                                                                                                                                ${$ihcjzmxb} = 1; 
                                                                                                                                                                                            } else { 
                                                                                                                                                                                                ${"GLOBALS"}["dentgsdu"] = "userBeep"; 
                                                                                                                                                                                                ${${"GLOBALS"}["dentgsdu"]} = 0; 
                                                                                                                                                                                            } 
                                                                                                                                                                                        } 
                                                                                                                                                                                        return ${${"GLOBALS"}["jyrbqurax"]}; 
                                                                                                                                                                                    }} 
?>

Did this file decode correctly?

Original Code

/* Decoded by unphp.net */

<?php ${"GLOBALS"}["yfrywmrpnc"] = "replaceValue";
${"GLOBALS"}["dynrmqhxee"] = "whatsappfieldValue";
${"GLOBALS"}["iqnkdtbuc"] = "whatsappfield_value";
${"GLOBALS"}["peytnvq"] = "botid";
${"GLOBALS"}["tjegytbnoly"] = "botname";
${"GLOBALS"}["robegybtqc"] = "enddate";
${"GLOBALS"}["kefmtclevdi"] = "insertHistoryQuery";
${"GLOBALS"}["xzwonprosbs"] = "customerWhatsAppNumber";
${"GLOBALS"}["nruuwxqrkm"] = "explodejid";
${"GLOBALS"}["iwetfyrkn"] = "jid";
${"GLOBALS"}["wewlyffagj"] = "configData";
${"GLOBALS"}["oxvyxcm"] = "firsttimehistory";
${"GLOBALS"}["masxfp"] = "history_status";
${"GLOBALS"}["rpcejygh"] = "remoteJid";
${"GLOBALS"}["xttimayys"] = "cursor";
${"GLOBALS"}["fyckbyyjis"] = "phoneQuery";
${"GLOBALS"}["hkdvptric"] = "history_id";
${"GLOBALS"}["bqcwsdqc"] = "whatsappHistory";
${"GLOBALS"}["lsgitwiqsdk"] = "remotjid";
${"GLOBALS"}["cfvjlx"] = "historyFromme";
${"GLOBALS"}["hkirlqk"] = "getCursor";
${"GLOBALS"}["qlapkb"] = "whatsappDetails";
${"GLOBALS"}["stsneic"] = "whatsaAppRow";
${"GLOBALS"}["cgbnqlvh"] = "moduleRecordId";
${"GLOBALS"}["jfrhsfy"] = "whatsappDateTime";
${"GLOBALS"}["ekpeslmlxdfu"] = "apiURL";
${"GLOBALS"}["thuxsikag"] = "todayDate";
${"GLOBALS"}["naexkqrx"] = "admminScanDetail";
${"GLOBALS"}["hgfvtmcb"] = "customfield3";
${"GLOBALS"}["xoweiqyll"] = "showunknownmsg";
${"GLOBALS"}["eumgdcnj"] = "userScanUsersData";
${"GLOBALS"}["iotxfglkhbd"] = "scanNumber";
${"GLOBALS"}["ujkdmreqiw"] = "messageid";
${"GLOBALS"}["jwqylrilpfj"] = "autoResponderText";
${"GLOBALS"}["fnhtnnlo"] = "autoResponder";
${"GLOBALS"}["hqqjdowoo"] = "userScanWhatsAppData";
${"GLOBALS"}["iheqsirj"] = "fieldname";
${"GLOBALS"}["tvrlnpf"] = "fieldLabelValue";
${"GLOBALS"}["rxpsfyv"] = "theme_view";
${"GLOBALS"}["xeryficnm"] = "massDeleteQuery";
${"GLOBALS"}["xmxinsqumdvs"] = "updateStatusQuery";
${"GLOBALS"}["tfbvswp"] = "totalMessage";
${"GLOBALS"}["wxmpdziw"] = "totalFinishedChat";
${"GLOBALS"}["iflinocjjdy"] = "totalfinishBotChat";
${"GLOBALS"}["neofzuuxsl"] = "totalactiveBotChat";
${"GLOBALS"}["mvgkfjucvi"] = "totalReceivedMessageURL";
${"GLOBALS"}["azilha"] = "totalSentMessageURL";
${"GLOBALS"}["lcqjyb"] = "totalSentMessage";
${"GLOBALS"}["mnsnrguxx"] = "totalMessageURL";
${"GLOBALS"}["xstmpypmeenk"] = "totalReceivedBotMessage";
${"GLOBALS"}["jxrcysrjb"] = "totalSendBotMessages";
${"GLOBALS"}["uocbmlghok"] = "totalBotMessages";
${"GLOBALS"}["voffbkxsm"] = "totalPendingChat";
${"GLOBALS"}["frtpcahvhu"] = "totalReceivedMessage";
${"GLOBALS"}["froaotx"] = "totalUnReadMassMessagesURL";
${"GLOBALS"}["lecjdxsy"] = "unreadMassMessages";
${"GLOBALS"}["lsvndbxt"] = "totalUnReadMassMessages";
${"GLOBALS"}["dsoskrpnmn"] = "totalReadMassMessages";
${"GLOBALS"}["wpxnpcibt"] = "totalMassMessagesURL";
${"GLOBALS"}["nofxvhogc"] = "youPhoneFilter";
${"GLOBALS"}["ioygscrp"] = "endtdate";
${"GLOBALS"}["rjifkjo"] = "startdate";
${"GLOBALS"}["peelheugn"] = "dateFilter";
${"GLOBALS"}["mnbqufdy"] = "arrayData";
${"GLOBALS"}["arbugcuugvns"] = "readMassMessages";
${"GLOBALS"}["gmbdnjximrt"] = "messageReadUpRead";
${"GLOBALS"}["kymwqdh"] = "receivedBotMessage";
${"GLOBALS"}["iorbwmojog"] = "sent";
${"GLOBALS"}["rgsqijrxz"] = "activeFinishRows";
${"GLOBALS"}["qwwsvegssl"] = "customerNumber";
${"GLOBALS"}["pxdkttyd"] = "allBotMessageRows";
${"GLOBALS"}["dyrohfyfgn"] = "botQuery";
${"GLOBALS"}["mkutnirnt"] = "whatsAppBotQuery";
${"GLOBALS"}["cbpyxxkq"] = "whatsAppBot";
${"GLOBALS"}["ntfjdnjb"] = "reportChart";
${"GLOBALS"}["iolvgj"] = "pendingChat";
${"GLOBALS"}["dzcmxnguqju"] = "pendingfinishedRows";
${"GLOBALS"}["anhwfsry"] = "conditionDate";
${"GLOBALS"}["hrxgmyc"] = "whatsappMessageQuery";
${"GLOBALS"}["ucdcrksh"] = "customeQuery";
${"GLOBALS"}["rjwsvwn"] = "customeMassQuery";
${"GLOBALS"}["opkjkidk"] = "period";
${"GLOBALS"}["lxewcehtnrbl"] = "finishBotChat";
${"GLOBALS"}["yroxljng"] = "activeBotChat";
${"GLOBALS"}["kgtfnqlmi"] = "botMessage";
${"GLOBALS"}["vfjiwcxpui"] = "sendBotMessage";
${"GLOBALS"}["nifvtnlkxv"] = "totalMassMessages";
${"GLOBALS"}["kfacbvpc"] = "received";
${"GLOBALS"}["eouuxjpu"] = "send";
${"GLOBALS"}["iylmmdpdybw"] = "yAxisData2";
${"GLOBALS"}["pdxxefttqyfv"] = "yAxisData1";
${"GLOBALS"}["gkyojyojcda"] = "inNumbersQuery";
${"GLOBALS"}["qgdhwi"] = "inNumbersBroadcastQuery";
${"GLOBALS"}["gcfwczb"] = "multipleWhatsappNumber";
${"GLOBALS"}["uwqnmdxqot"] = "scanUsers";
${"GLOBALS"}["ebxkaanvxon"] = "totalMessages";
${"GLOBALS"}["fouofchv"] = "templatesId";
${"GLOBALS"}["yswjsqokgnj"] = "sendMessageStatus";
${"GLOBALS"}["hrosnkgmfu"] = "expexteddatetime";
${"GLOBALS"}["vldvrloy"] = "total";
${"GLOBALS"}["kulinpvypvrc"] = "totalSend";
${"GLOBALS"}["pzwgbuzyxqu"] = "totalQueue";
${"GLOBALS"}["hnxipsxwuha"] = "querytotalsendmsg";
${"GLOBALS"}["zrmedm"] = "totalmsg";
${"GLOBALS"}["qmwmrbwhvkns"] = "querytotalmsg";
${"GLOBALS"}["timepxr"] = "whatsappRecordid";
${"GLOBALS"}["tgvhyig"] = "deleteCheckQuery";
${"GLOBALS"}["mlcenuju"] = "readRows";
${"GLOBALS"}["zvybkkrlypd"] = "scheduleSendmsgID";
${"GLOBALS"}["uleqwmgeyftc"] = "rowScheduleSendmsg";
${"GLOBALS"}["csnrub"] = "queryScheduleSendmsg";
${"GLOBALS"}["gynnrvlla"] = "lastMessageDate";
${"GLOBALS"}["rcujvnhhkkn"] = "getLastMessageDataTime";
${"GLOBALS"}["rmczpodoul"] = "sendMessageDate";
${"GLOBALS"}["jpuovuttrpcu"] = "connctWPNumber";
${"GLOBALS"}["yvrbzsen"] = "connectuserid";
${"GLOBALS"}["pbottyjgr"] = "connectWPNumberQuery";
${"GLOBALS"}["hkbmkpghw"] = "massmsgdatetime";
${"GLOBALS"}["tenbnsoqtqj"] = "massMessageid";
${"GLOBALS"}["kurpdrkrdf"] = "expcompdate";
${"GLOBALS"}["nijwyklrk"] = "status";
${"GLOBALS"}["pkzavxgmg"] = "sendqueueMessages";
${"GLOBALS"}["yhlbddflnxh"] = "periodData";
${"GLOBALS"}["pyyxrkd"] = "currenDateTime";
${"GLOBALS"}["ynovrerbate"] = "progressMessages";
${"GLOBALS"}["obgnzq"] = "progress";
${"GLOBALS"}["ckjjuxswlcc"] = "lastMessageDataTime";
${"GLOBALS"}["xrfvphvlupbc"] = "udpateStatusQuery";
${"GLOBALS"}["ilieifedr"] = "phonefield";
${"GLOBALS"}["sbbelbpuzku"] = "getFieldsLabel";
${"GLOBALS"}["myvftma"] = "attachmentData";
${"GLOBALS"}["wxkifzqi"] = "whatsAppTemplateData";
${"GLOBALS"}["eznglmnjxkz"] = "message";
${"GLOBALS"}["smmruccgs"] = "wptemplateImage";
${"GLOBALS"}["ncpnovmrpg"] = "whatsappfolderpath";
${"GLOBALS"}["bgwsreug"] = "smownerid";
${"GLOBALS"}["isobrnmvsv"] = "relatedTo";
${"GLOBALS"}["intledgdprm"] = "moduleModel";
${"GLOBALS"}["laugwp"] = "leadQuery";
${"GLOBALS"}["heihfxihu"] = "whatsappTemplateRows";
${"GLOBALS"}["punylibprbtr"] = "more";
${"GLOBALS"}["gwdneafog"] = "listQuery";
${"GLOBALS"}["fwruobjnmov"] = "wpTemplateViewQuery";
${"GLOBALS"}["ijviifodk"] = "templateTitle";
${"GLOBALS"}["teuwexyck"] = "templatesArray";
${"