{"SOURCE":"ReportMaster: Ubilling 1.5.0 rev 9228","REPORTID":"rm1729603349","REPORTCODE":"REPORT_NAME=\"\u041e\u0431\u0434\u0437\u0432\u043e\u043d \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432 \u0437 \u0442\u0435\u0433\u0430\u043c\u0438\"\nREPORT_TYPE=\"ONEPUNCH\"\nREPORT_ALLOWADMINS=\"\"\nREPORT_QUERY=\"usercalltagfilteredrm\"\nREPORT_ONTB=\"1\"\nREPORT_AOTD=\"0\"\nREPORT_ICON=\"goat.gif\"\n","OPSCRIPT":{"id":"100","alias":"usercalltagfilteredrm","name":"\u041a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456 \u0437 \u0442\u0435\u0433\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u0431\u0434\u0437\u0432\u043e\u043d\u0456\u0432 (RM)","content":"    $mobilesExt = new MobilesExt();\r\n    $fga = new FGA();\r\n    $allTagNames = stg_get_alltagnames();\r\n    $allUsersTags = zb_UserGetAllTags();\r\n    $allUserData = zb_UserGetAllData();\r\n    $allMobilesExt = $mobilesExt->getAllUsersMobileNumbers();\r\n    $paymentsDb = new NyanORM('payments');\r\n    $paymentsDb->where('summ', '>', 0);\r\n    $paymentsDb->orderBy('id', 'asc');\r\n    $paymentsDb->groupBy('date');\r\n    $allLatestPayments = $paymentsDb->getAll('login');\r\n\r\n    if (!empty($allUsersTags)) {\r\n        $inputs = wf_Selector('showuserstagid', $allTagNames, __('Tag'), ubRouting::post('showuserstagid'), false);\r\n        $inputs .= wf_Submit(__('Show'));\r\n        $form = wf_Form('', 'POST', $inputs, 'glamour');\r\n        show_window('', $form);\r\n\r\n        if (ubRouting::checkPost('showuserstagid')) {\r\n            $filteredUsers = array();\r\n            $tagIdFilter = ubRouting::post('showuserstagid', 'int');\r\n            foreach ($allUsersTags as $eachLogin => $eachUserTags) {\r\n                if (isset($eachUserTags[$tagIdFilter])) {\r\n                    if (isset($allUserData[$eachLogin])) {\r\n                        $filteredUsers[$eachLogin] = $allUserData[$eachLogin];\r\n                    }\r\n                }\r\n            }\r\n            $result = '';\r\n            if (!empty($filteredUsers)) {\r\n                $cells = wf_TableCell(__('Address'));\r\n                $cells .= wf_TableCell(__('Real Name'));\r\n                $cells .= wf_TableCell(__('Tariff'));\r\n                $cells .= wf_TableCell(__('Cash'));\r\n                $cells .= wf_TableCell(__('Phone') . '\/' . __('Mobile'));\r\n                $cells .= wf_TableCell(__('Last payment'));\r\n                $rows = wf_TableRow($cells, 'row1');\r\n\r\n                foreach ($filteredUsers as $eachLogin => $eachUserData) {\r\n                    $userLink = wf_Link(UserProfile::URL_PROFILE . $eachLogin, web_profile_icon() . ' ' . $eachUserData['fulladress']);\r\n                    $cells = wf_TableCell($userLink);\r\n                    $cells .= wf_TableCell($eachUserData['realname']);\r\n                    $cells .= wf_TableCell($eachUserData['Tariff']);\r\n                    $cells .= wf_TableCell($eachUserData['Cash']);\r\n                    $phonesList = $eachUserData['mobile'] . ' ';\r\n                    $phonesList .= $eachUserData['phone'] . ' ';\r\n                    if (isset($allMobilesExt[$eachLogin])) {\r\n                        $phonesList .= implode(' ', $allMobilesExt[$eachLogin]);\r\n                    }\r\n                    $cells .= wf_TableCell($phonesList);\r\n\r\n                    $latestPayment = '-';\r\n                    if (isset($allLatestPayments[$eachLogin])) {\r\n                        $latestPayment = $allLatestPayments[$eachLogin]['date'];\r\n                    }\r\n                    $cells .= wf_TableCell($latestPayment);\r\n                    $rows .= wf_TableRow($cells, 'row5');\r\n                }\r\n                $result .= wf_TableBody($rows, '100%', 0, 'sortable');\r\n\r\n                show_window(__('Users') . ': ' . $allTagNames[$tagIdFilter], $result);\r\n            } else {\r\n                show_info(__('Nothing found'));\r\n            }\r\n        } else {\r\n            show_info($fga->getAdviceOfTheDay());\r\n        }\r\n    } else {\r\n        show_warning(__('Nothing to show'));\r\n    }"}}