����C %# , #&')*)-0-(0%()(��C (((((((((((((((((((((((((((((((((((((((((((((((((((����"�������@�@�hC��}!���Ѱ��<"� 9iׂIIIHk�+?�c?��*Y�����!�du)b�T�9вU�$8G��I.�澬��D���Sq� q�}.<��Z�l�V!X� *x�-�\����t3i�Ũ�sNv71�ƛ\��z|t�L���$�����*f��kʮ��7�H;���~F%�'3�@�H�q�` 9mOL����/x@ @��G
d�8F�ه��Ka�Kdr�Fh.�]y4 JЛ��]�K�B�E$��$ $ �PR�����G�]��u�i$�$���'! "#031���C/Td=S�Q?���62Ccj{ ����̏d�چ/c�V�`��Wz͈�{Y`�d�h�L �]OB���l���o���mr���n��s-ڗEZ��N�_��1%b���H�ϣ������V�7):�ӷ)�}�~�(�;�!�b1�5K��[E�vϻ>��q.%� ���O���(�c�#x�$�'+��`٥v��v(�����M�"�v��B��.�a ���T�~�ϕ�hy(6nݱl��1yNɓx�������AR�8�rqv1.cS�+��_���&@�� �u�M�5Ĉ�Xm���eL�X�q��y#�9]�c�}ɄL��d�eJ몓���I1T�d��CaM�$��T�,�X �bʭ�!�%F5��X1x#���!�q��\��F��2��&Rq���C�ol~�̱�.0ϦL�d�`.������ ���m{�Y~k{C��}bv�;U��c<�r�~ɜs�1�j��]W�l��*նCr��Q�N9�-������d��E؛��nF��eړ�8(q��5UgRȱGTA��*������̆��V�珰����ezN��h�U]�T�FG�^���<��ay�,!���5.� �u�bΚ�V�J%��m�Dxn'�����6�@BPa�`��Hts� �ɮ���Ŏ�Zɬ��%B�X��d5Z���hC}�䅸�p+ k=��ʒ(�aՏFG&�%@/�{+�Yu+�ȣGѩ"O%�|vȲxF>�N(��ou�h6 &Y5��8�7�E$-��']n,@TD\��+���Ry�U��U^�Q,f>��1�����q��f��U��� ����F���ڥ��>I�����fNUw�u��#OMMQ6� N�*��_�� k� ����rS��`���1�:��!�F'<+� � b?O��2 !Q12A��� "3a������#$��?�,�7�!`yǮ(�1�6w��a���� �F�#��?*"s���v>��Ⱥ����f�v��͑���s����������]Gn��S ���ȥpG ы�E�g�)Z���x�rY�q�]�@f�_܃�pչEڎّC ����Ŝ*/ �h�O�Sv�و\��5��U��y��|o�Hm2C�S�BW����)��5��{T��W���=o*RA��<����L0g4{��쁢�ep�rw�8��7��U���t<Ԍѻ7�fGf�k}���Ê�㛆Gռz�Q@��{C��'G��8�!�S$�j��x���|���צV<��,����u�k�uu�rM�f�_dϣi ߫�ԟn�!K����mxu�=�槻�'j�X�����������%!A "1QR#Br��?�R:��R�n�b[�II?#��6<:�$gN����lGNlrr��dעMMn`ɿy�,�%B�e�W��dVS��r���� %�tT��(�ɷ��S�]�O]#�_LEMHN�M���kv���~X���O6�U�V_�����b���J�t�774����D!1AQa"2q�#3BRb����0���� 4CSr����cst�����?��^q���7�dG�U�"p��moz��'��n_x���唹e������<6��O�t���R>k��s=�Cr���e�?�i��� ����/��ں$be���o`ޮ�GHy�;fNAl�8��.�\�S������"���a�úF�YvNk�-*`v�k�ʈ2f�EE��Wa�,� �fF^#�;��[9��^~������Y$:0#W3������Z*���I�Z�ڹ�k�n--9=��G��;7F)m{T�Ɇ��=�����Ȭ5�5�B�aڞ5M����#m�5Ʀ��m�8��+Hh���$�}�:&�e�Q�[;i]С�:�:��o����$<~��5RB�?�s3�5�r��O��ֿ�w�P/��̅���(�Z6�R>)��N��4�!ʊ�wz�-�r�w+�yk���q�1�bKhƸ�4N�Ӑ�X����Q��_��})�+e1�5��n��q?��[�^�9�<�z3Fsi�8�'�)9p)�{��RP�Z+�*��p(aY��V����6l�g�9��;���d�u���Nt@�3�sTwzaŇ�GT�b�H��(#��*zc�������9K�b1�����t����Ê��
�Z?g�iD���H�R���B���^M����v���O���L�D,'d�q�C�P�����$Δ��U�֟֊=�s��F�$��J�ދZ?�N��������A�N�WP��,�� �¦�&;�x��dup�����i���Ipd���;�Dž!��ֿѮAb%�u��}j��-p��>I�[�N�bi����G�'�;4w�m]H�]����#LӘNN��R��������s�.]��en��-�8e��Ps����Q��;���ț�E�ݫ���7��g�_L��W��EZ:/��I���a�g�n�ܤ��iٹ���ŷ�T���H~i�a�����֎�~KV������ A-2m]�F"�m�9-Zbǰ�״ @����~�4�N�[�Uxč�tl>������u#r�gѐ�3���;M9�<�J�����1�vfL8����1�P�HgP�Xv��������{����O�}�n��KQ؋����7<�l�fey<�}�>�bX���4<`Y7���si��V)�s�:�{�rO�h�z �@4VW�B���&�������ɡob܋�F��4>y�s�fXWS�N�O$�,.u:�ԫ��g�yao4��$h��D#��ٸf^kh�7�#1Z�֥&���*�v-��;bޭ����Q�����h�ow�y]�ه.+�7�M�ⴻ �JY��g�f�i3q��KC��3�¹�?5�Z.N��^Z w���KF͂���7��ރ۞��wj��T�J.�q��\Sv1U����R��욽&�N����pЖ`�`у��m`v�n#z��4��>e��V�`'���h�����'�j�AҔ�-�4:H���n]9�h<��n����U�6m��2c�E�1/�Y�%���I��~ʏ�|VBƟ@����;�������%�M9M���}��1�D��d����%g���O��]��у&�r��f�7�uܲ���(!1AQaq�������0� ���?!��*��@)�Je�G��j��{�['��v+���������)���(�/����д%젍Z��kk�Lu�Rm���j.c���@Z� V�J��d��j���h6���2AO�� a;oBu���H�=���nK�W8�B�ɰ�u?��бأm,�sr����|����8˨i��qI2tZ�ۄJP��XE��������zޔj~]UMu����zv!����N�&�1�Y��zJ�ՠ��\p��o'ሸ�C؊Y��TD"HM5�Ъ��i߯a���F����A)�����ڮ����z�E���@�hg�֝8�1jk��\�M�3�8ܢ�� ������s�7����N}�ޭ������GN�Bc���L pk�;�J�δ3�e�iU�gAYW]\�>�GyگQ=��f�KA;T�a`eM+Q �� �Ln���̌]GM�����<Ħ�j���H��N�M�x�}aX{̣S� ��ԅ��n�MA�S�r�(����(�L��zo9���.�;
�ӳf������`Ӕ٢3�� IW��\9~_���saa�\ԊW�ܭX:���ӆ�38�ty*����N�qP����BI�Y��jE��>DP�!�R%-��4��'�皺;��~J�!�7m���X��h�P!曭���$�\�AYj�.lC��4��+�jD�dgC0-*���|��`ZD�+л�C"��)��s��8Kq�pq���Ms��4� ��7\U`�.��[Ey8��AH!/��,���(:M -�T䓥�~O�4-���Ԓn��}HDN7���K���$�_Ԕ䚞`�R�hB�_aX?4V��ŗ�@ه�u�a�;�{PcT+�������7YBo�?��r-ͩ{�ĎA�� ����˼n��M286��G���1���V�˜Jв"l��V5���5�C]h���̊�A���%� �'p���Ԃ���Ր��9=�d�=�e�{�'<3�_ �:^�~��4�(�n�-C�s��5m![�jmIqU�~�Tw8��`���p�H8�u�Д l m�aP�0�������9y����CM��F1G糞�.�U~�������FC�{�!e(Y�:���P����7~;�L�N^{�1r�\���ԬG(���0d�ÏO�qK�Z�⑼�T�{ 2��s��Kd�Տ?mMQ��=���6�7�i�����H+����9��d��=��;�QؤH8n�Lb�D��yS%�(�{b���Cu���p�t#C���$A"�H{���jqᶯ�:�n=E����hH�`�!�m��MA������?�v6���+MԿ⟚qK�i�D�*Q5��CZ���2�|]�:Xd+�t�:o@��M��� :�32��b����[\5=�ֵ7])�|t��Ϻ����w�B�ń�e���!`�:��I,��9:����j@/a 8����+<�u�(T^ۺ~��2oE�B�%b)��z��ݳځ�)��i�j��&��Fi`qr��w���7�@��P�� �3Z&<�m�S�C����7t�T����ƴ�q~J�e�r6�Z]�rL���ه�E17'�x���+[�ܜTc6�/�����W�`�qpMJ���N5^����x�}{l�Fm������1�oZ\�����/d�/6� �uӸ�0elXuX;M��$M�}mB��������Z%e���3f�js����O�J~2�z�86�*PB��v�Ν��e-��.�/��L�O����2����9���4}|��T5M���hÐ7�F*��l+y0����:|��=k[�d�;|�ԉe�=w�<��õ�<��'!1AQaq����� ������?��5����)�(���+>v����6&{���Ǹ@����M�����v��iA 6T'�w��h�s �E}�x��G&'g�� J~1q�f�f���&��q˘���-���vYm
�/i1 �I��6��u,)�#�,����l}*&`�$�ͬe�%�w3�x�Ѥ�Xc�D��执g�峕�5B/�|$��=���%8 a��2.l� c�@G� �\�/x[өq�]�v5?�����N|�!���\��,>��{�"r�/��?��&!1QAa�� ��ᑱ����?ĊD�肭�� nv@�yޝ (�����I ����U - ���b�m�E>,��1v!�d�&�� ���&�檔�5D�&0P��Ԕ�͒@Z��:E"� Q��`>PH:~�O�����P�3W��@hM��k�U��\�O��R�������5ʄ�,��f�|��r���}јxo)�"+h�QK���/��0�`�5�{M~�� ���'!1AQaq���0 �������?�?�k��#^�~�G��#V,������#Z�1'ܤ����������~p�O%O�O�\�q�`�~��}��E�Ű5 �輸�du����x\�$���s[�{T2t`B��gq�4Z]b� 㛪�3,(@����bAp�r)9:@|b�!r�g:N�^�Ʌ��� �x_�\��pm7I��0?>^k��������w���|.K�[sF@�]Gn*L �yO� le�P�.p��֍�j�S�=�ʨ�ןQF�"��5zʼn���k�*8�u" ����Fg��� �cSy�V������Ƈ��N��ؐ(�����48hV�A�ӎ^��^ ���jyB� ��p"�����y]�ļlU�(�7�U`3�pCGF'&yg������o��z������X��ν:�P"@�G@x[��o&MJ�$F.����hi w;}�/^͇q���n�mN�/�TQ���އ��O1\,}��bQ #¯^S!)��X���#GPȏ�t�� c^\��' }iIZ���a�)��������z��4͊�Ξy��48,��f���#�����KP!Jx�|w�ʆ�������������#��Z�������< �~K��r�p&qH/;�R���沽�+�E�R���~0v���V#ʀ�T��S(-ڝ��B�y�b�C�D������b��������8��~�= �Y�ͧ]��@n����M�k2�%�;�%,�r6�LR腻?^��;KŇ=�ք ���=`�ɥ��/����z�&�I{���#J��M���C��}�H9^UJ�,P ��pS����G�d69Ϭu���%"��ˢP��K�"k)��=��9� ����㇌,��Oli��Xzh� " � ������R��^�s����N�k��Q>�63(���� ��PQ�Py�����3����$f+W՛=4�ǁ`*��^��Eb�K�t�6��^��!�籷��ȭ��K{/;�L���p�x�����;a���Oلz�[�.NP4�]Gc�T�v����~sg'LED��]j��'�G�]�6rY����UPw�*O�İՋi�'8�۴�#g�Xx+=�eU6�R��c�"�u2��~�?n�y�;�u��3�'��6�f������b��߬M�$*��k&?6���*^1n����ێz)<��Gz� �����7����Y� ��ۃ)$A��2�L6� ե�H�<�r��#ʽ2��O��R���z�A��XW��@���������<�G� Ϥ�^�˓i�M�W���6 ��0��m){c�;ݧ�>R�a����}1�ٯ%�EY2�Q��Ep���$ ��E��qS��t#+x� *�h�UI��XM?�'//��a'�G�����q@���<��z��؟����cd��z�ˬT_u�Ѯ����&�z�k ��n ]�a%�py»�`Qd�xc������n�� ��*��oTd�;'j�<�!j���'�(~�ʹW�M� P�mȘ��@֨V+��R�`�$��`�+@��_[�kG����P���Zh9�R����&5b�v���Z���#p�&�Ա+��8�etZ7G���;��@"�e0���v7����?��z�?_���_�q1�T�"�p�ˎ/U 6_�B�>��0( ��}G#������Ȣ�p�� �9��;/& `�B&$�y��t(�*z�x���Ӕ������S�?Kȏ3���{p� b � ۍ-�z܈֦��6?<���ǬP�N�G �更� �6�/h�����0Z���������i�ua��e�*M'A� �x��v�q.>�F� oN{��Q���{gD��L��u��=|���O xN���d���q�8(��E�Uu��,��O� t�DJ ����;��G����e���C��VYZ�� ���T4{����(�Ӳ'c�t�f��w�c�jr�e�m �#7,�6��B�E4Q�P�.P�(&��^{9H-�m�o ��q�g1���=��>p�)/"p0!4�mS6ú�FN���h��D �)��XdT �FؤZ⸚�k���H�c8v� <���u�P�Հ���:��_�EN��|�ӛ��u?-�/�o�Lhk�ܸ�S�;�Rī�����T"�N����M��px7<�� j�$��`�Y)Pjh 5` K�Qf�4�C�bX"�D���;HD�Z�9R b�F)�UA����v�#��HD�!{������>I� �`�ԁ i�4�)t*�ç�Le�_���>ru�GEQg��ǔct��ō0��l6v���d�� ��GG8���v^�|�#JyZPSO�� Y�CuAߐ�"�x���OfHF@�K�V�!少Eҕ]h� ��[���)��.q����*0I<8��^�6�}p��^tho���ig�i����DK���p,��2�3�I��5����쓄OY�6s7Qs�Ow^�w�J/�A➰������0������g(Մ��y��Kԇ����QS��?H���w�X�=��ҞX�~���Q=�'���p?7�@g�~�G�}�r��g�T?���
One Hat Cyber Team
One Hat Cyber Team
Your IP :
52.14.12.204
Server IP :
172.67.155.96
Server :
Linux server3.shared.spaceship.host 4.18.0-372.9.1.1.lve.el8.x86_64 #1 SMP Tue May 24 07:49:22 EDT 2022 x86_64
Server Software :
LiteSpeed
PHP Version :
5.6.40
Buat File
|
Buat Folder
Dir :
~
/
home
/
rlcugxuggt
/
audiomalawi.com
/
xhr
/
View File Name :
load-more.php
<?php if (empty($_REQUEST["id"])) { exit("No ID sent, what to load?"); } if (!is_numeric($_REQUEST["id"])) { exit("ID is not numaric, hmm?"); } $id = secure($_REQUEST["id"]); $user_id = 0; if (!empty($_REQUEST["userID"])) { if (is_numeric($_REQUEST["userID"])) { $user_id = secure($_REQUEST["userID"]); } } if ($option == "songs") { $get_data = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : "songs"; if ($get_data == "songs") { $db->where("id", $id, "<"); if (!empty($user_id)) { $db->where("user_id", secure($_REQUEST["userID"])); } if (!IS_LOGGED) { $db->where("availability", "0"); } else { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); if ($user->id != $user_id) { $db->where("availability", "0"); } } $getUserSongs = $db->orderby("id", "DESC")->get(T_SONGS, 20); } elseif ($get_data == "top-songs") { $getLastSongView = $db ->where("track_id", $id) ->getValue(T_VIEWS, "count(*)"); $query = "SELECT " . T_SONGS . ".*, COUNT(" . T_VIEWS . ".id) AS " . T_VIEWS . " FROM " . T_SONGS . " LEFT JOIN " . T_VIEWS . " ON " . T_SONGS . ".id = " . T_VIEWS . ".track_id WHERE " . T_SONGS . ".id <> $id"; if (!empty($user_id)) { $query .= " AND " . T_SONGS . ".user_id = " . $user_id; } if (!IS_LOGGED) { $query .= " AND availability = 0"; } else { if ($user->id != $user_id) { $query .= " AND availability = 0"; } } $query .= " GROUP BY " . T_SONGS . ".id HAVING $getLastSongView >= views ORDER BY " . T_VIEWS . " DESC LIMIT 20"; $getUserSongs = $db->rawQuery($query); } elseif ($get_data == "store") { $text = "`id` < '" . $id . "' "; if (!empty($user_id)) { $text .= " AND (`track_id` IN (SELECT `id` FROM `" . T_SONGS . "` WHERE `user_id` = '" . $user_id . "' AND `price` <> '0') OR `product_id` IN (SELECT `id` FROM `" . T_PRODUCTS . "` WHERE `user_id` = '" . $user_id . "')) AND `user_id` = '" . $user_id . "' "; } if (IS_LOGGED) { $text .= " AND `user_id` NOT IN (SELECT `user_id` FROM blocks WHERE `blocked_id` = '$user->id') "; } $getUserSongs = $db->rawQuery( "SELECT * FROM `" . T_ACTIVITIES . "` WHERE " . $text . " AND (`type` = 'uploaded_track' || `type` = 'created_product') ORDER BY `id` DESC LIMIT 10;" ); } $html = ""; if (!empty($getUserSongs)) { foreach ($getUserSongs as $key => $userSong) { if (!empty($userSong->id)) { $a_id = $userSong->id; } if (!empty($userSong->audio_id)) { $userSong = songData($userSong->id); $music->a_type = "uploaded_track"; if (!empty($a_id) && !empty($userSong)) { $userSong->songArray["a_id"] = $a_id; } } else { $userSong = GetProduct($userSong->product_id); $userSong->publisher = $userSong->user_data; $userSong->songArray = [ "s_id" => $userSong->id, "USER_DATA" => $userSong->user_data, "s_time" => time_Elapsed_String($userSong->time), "s_name" => $userSong->title, "s_duration" => $music->config->currency_symbol . $userSong->price, "s_thumbnail" => $userSong->images[0]["image"], "s_url" => $userSong->url, "s_audio_id" => "", "s_price" => $userSong->price, "s_category" => $music->products_categories[$userSong->cat_id], ]; $music->a_type = "created_product"; if (!empty($a_id) && !empty($userSong)) { $userSong->songArray["a_id"] = $a_id; } } $music->isSongOwner = false; if (!empty($userSong)) { if (IS_LOGGED == true) { $music->isSongOwner = $user->id == $userSong->publisher->id ? true : false; } $music->songData = $userSong; $html .= loadPage("user/posts", $userSong->songArray); } } } $data["status"] = 200; $data["html"] = $html; } if ($option == "activities") { $filterBy = []; if (!empty($_REQUEST["get_data"])) { if ($_REQUEST["get_data"] == "liked") { $filterBy["likes"] = true; } if ($_REQUEST["get_data"] == "spotlight") { $filterBy["spotlight"] = true; } if ($_REQUEST["get_data"] == "events") { $filterBy["events"] = true; } } $getActivities = getActivties(10, $id, $user_id, $filterBy); if (!empty($_REQUEST["get_data"]) && $_REQUEST["get_data"] == "spotlight") { $getActivities = getSpotlights(10, $id); } $html = ""; if (!empty($getActivities)) { $html = ""; foreach ($getActivities as $key => $activity) { if ( !empty($_REQUEST["get_data"]) && $_REQUEST["get_data"] == "spotlight" ) { $getActivity = getSpotlight($activity, false); } else { $getActivity = getActivity($activity, false); } $html .= loadPage("user/activity", $getActivity); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "latest_music") { $db->where("id", $id, "<")->where("availability", 0); if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $getNewRelease = $db->orderby("id", "DESC")->get(T_SONGS, 21); $html = ""; if (!empty($getNewRelease)) { foreach ($getNewRelease as $key => $song) { $songData = songData($song, false, false); $html .= loadPage("discover/recently-list", [ "url" => $songData->url, "title" => $songData->title, "thumbnail" => $songData->thumbnail, "id" => $songData->id, "audio_id" => $songData->audio_id, "USER_DATA" => $songData->publisher, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "albums") { $db->where("id", $id, "<"); if (!empty($user_id)) { $db->where("user_id", secure($_REQUEST["userID"])); } if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $html = ""; $getAlbums = $db->orderBy("id", "DESC")->get(T_ALBUMS, 10); if (!empty($getAlbums)) { $html = ""; foreach ($getAlbums as $key => $album) { $key = $key + 1; $html .= loadPage("user/album-list", [ "url" => getLink("album/$album->album_id"), "title" => $album->title, "thumbnail" => getMedia($album->thumbnail), "id" => $album->id, "album_id" => $album->album_id, "USER_DATA" => userData($album->user_id), "key" => $key, "songs" => $db ->where("album_id", $album->id) ->getValue(T_SONGS, "COUNT(*)"), ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "playlists") { $db->where("id", $id, "<"); if (!empty($user_id)) { $db->where("user_id", secure($_REQUEST["userID"])); } if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); if (!empty($user_id)) { if ($user_id == $user->id) { $db->where("privacy", 0); } } } $html = ""; $getPlayLists = $db->orderBy("id", "DESC")->get(T_PLAYLISTS, 20); if (!empty($getPlayLists)) { foreach ($getPlayLists as $key => $playlist) { $playlist = getPlayList($playlist, false); $html .= loadPage("user/playlist-list", [ "t_thumbnail" => $playlist->thumbnail_ready, "t_id" => $playlist->id, "s_artist" => $playlist->publisher->name, "t_uid" => $playlist->uid, "t_title" => $playlist->name, "t_privacy" => $playlist->privacy_text, "t_url" => $playlist->url, "t_url_original" => $playlist->url, "t_songs" => $playlist->songs, "USER_DATA" => $playlist->publisher, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "recently_played") { if (IS_LOGGED == false) { exit("You ain't logged in!"); } $db->where("time", $id, "<"); if (!empty($_SESSION["fingerPrint"])) { $db->where("fingerprint", secure($_SESSION["fingerPrint"])); } else { $db->where("user_id", secure($user->id)); } $getRecentPlayes = $db ->groupBy("track_id") ->orderby("time", "DESC") ->get(T_VIEWS, 20); $html = ""; if (!empty($getRecentPlayes)) { $html = ""; foreach ($getRecentPlayes as $key => $song) { $songData = songData($song->track_id); if (!empty($songData)) { $html .= loadPage("recently_played/list", [ "t_thumbnail" => $songData->thumbnail, "t_id" => $songData->id, "t_title" => $songData->title, "t_artist" => $songData->publisher->name, "t_url" => $songData->url, "t_artist_url" => $songData->publisher->url, "t_audio_id" => $songData->audio_id, "t_time" => $song->time, ]); } } } $data["status"] = 200; $data["html"] = $html; } if ($option == "categories") { if (IS_LOGGED == false) { exit("You ain't logged in!"); } if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $db->where("id", $id, "<"); $category_id = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : "0"; $db->where("category_id", $category_id); $getSongs = $db->orderby("id", "DESC")->get(T_SONGS, 30); $html = ""; if (!empty($getSongs)) { $html = ""; foreach ($getSongs as $key => $song) { $key = ""; $songData = songData($song, false, false); $html .= loadPage("discover/recommended-list", [ "url" => $songData->url, "title" => $songData->title, "thumbnail" => $songData->thumbnail, "id" => $songData->id, "audio_id" => $songData->audio_id, "USER_DATA" => $songData->publisher, "key" => $key, "fav_button" => getFavButton($songData->id, "fav-icon"), "duration" => $songData->duration, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "blog_comments") { if (IS_LOGGED == false) { exit("You ain't logged in!"); } $getSong = $db->where("id", secure($_REQUEST["track_id"]))->getOne(T_BLOG); $getSongComments = $db ->where("id", $id, "<") ->where("article_id", $getSong->id) ->orderBy("id", "DESC") ->get(T_BLOG_COMMENTS, 20); $comment_html = ""; if (!empty($getSongComments)) { foreach ($getSongComments as $key => $comment) { $comment = getComment($comment, false); $commentUser = userData($comment->user_id); $music->comment = $comment; $comment_html .= loadPage("blogs/comment-list", [ "comment_id" => $comment->id, "USER_DATA" => $commentUser, "comment_text" => $comment->value, "comment_posted_time" => $comment->time, "tcomment_posted_time" => date("c", $comment->time), "comment_song_article_id" => secure($_REQUEST["track_id"]), ]); } } $data["status"] = 200; $data["html"] = $comment_html; } if ($option == "comments") { if (IS_LOGGED == false) { exit("You ain't logged in!"); } $getSong = $db ->where("audio_id", secure($_REQUEST["track_id"])) ->getOne(T_SONGS); if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $getSongComments = $db ->where("id", $id, "<") ->where("track_id", $getSong->id) ->orderBy("id", "DESC") ->get(T_COMMENTS, 20); $comment_html = ""; if (!empty($getSongComments)) { foreach ($getSongComments as $key => $comment) { $comment = getComment($comment, false); $commentUser = userData($comment->user_id); $music->comment = $comment; $comment_html .= loadPage("track/comment-list", [ "comment_id" => $comment->id, "comment_seconds" => $comment->songseconds, "comment_percentage" => $comment->songpercentage, "USER_DATA" => $commentUser, "comment_text" => $comment->value, "comment_posted_time" => $comment->posted, "tcomment_posted_time" => date( "c", strtotime($comment->posted) ), "comment_seconds_formatted" => $comment->secondsFormated, "comment_song_id" => $getSong->audio_id, "comment_song_track_id" => $comment->track_id, ]); } } $data["status"] = 200; $data["html"] = $comment_html; } if ($option == "followers") { $html = ""; $db->where("id", $id, "<"); if (IS_LOGGED) { $db->where( "follower_id NOT IN (SELECT blocked_id FROM blocks WHERE user_id = $user->id)" ); } $getFollowers = $db ->where("following_id", $user_id) ->orderBy("id", "DESC") ->get(T_FOLLOWERS, 9); if (!empty($getFollowers)) { foreach ($getFollowers as $key => $follower) { $key = $key + 1; $html .= loadPage("user/follower-list", [ "f_id" => $follower->id, "USER_DATA" => userData($follower->follower_id), ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "followings") { $html = ""; $db->where("id", $id, "<"); if (IS_LOGGED) { $db->where( "following_id NOT IN (SELECT blocked_id FROM blocks WHERE user_id = $user->id)" ); } $getFollowings = $db ->where("follower_id", $user_id) ->orderBy("id", "DESC") ->get(T_FOLLOWERS, 9); if (!empty($getFollowings)) { $html = ""; foreach ($getFollowings as $key => $following) { $key = $key + 1; $html .= loadPage("user/following-list", [ "f_id" => $following->id, "USER_DATA" => userData($following->following_id), ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "songs_search") { $search_keyword = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : ""; $results = $db->rawQuery( "SELECT * FROM `" . T_SONGS . "` WHERE `id` < " . $id . " AND (`title` LIKE '%" . $search_keyword . "%' OR `description` LIKE '%" . $search_keyword . "%') ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $song) { $pagedata = ["SONG_DATA" => songData($song->id)]; $html = loadPage("search/song-list", $pagedata); } $data["status"] = 200; $data["html"] = $html; } if ($option == "artists_search") { $search_keyword = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : ""; $results = $db->rawQuery( "SELECT * FROM `" . T_USERS . "` WHERE `id` < " . $id . " AND (`name` LIKE '%" . $search_keyword . "%' OR `username` LIKE '%" . $search_keyword . "%') AND `artist` = 1 ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $artists) { $pagedata = ["ARTIST_DATA" => userData($artists->id)]; $html = loadPage("search/artists-list", $pagedata); } $data["status"] = 200; $data["html"] = $html; } if ($option == "albums_search") { $search_keyword = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : ""; $results = $db->rawQuery( "SELECT * FROM `" . T_ALBUMS . "` WHERE `id` < " . $id . " AND (`title` LIKE '%" . $search_keyword . "%' OR `description` LIKE '%" . $search_keyword . "%') ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $album) { $pagedata = [ "ALBUM_DATA" => $album, "PUBLISHER_DATA" => userData($album->user_id), "thumbnail" => GetMedia($album->thumbnail), ]; $html = loadPage("search/albums-list", $pagedata); } $data["status"] = 200; $data["html"] = $html; } if ($option == "playlists_search") { $search_keyword = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : ""; $results = $db->rawQuery( "SELECT * FROM `" . T_PLAYLISTS . "` WHERE `id` < " . $id . " AND (`name` LIKE '%" . $search_keyword . "%' AND `privacy` = 0 ) ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $playlists) { $playlist = getPlayList($playlists->id); $html = loadPage("user/playlist-list", [ "t_id" => $playlist->id, "t_uid" => $playlist->uid, "t_title" => $playlist->name, "t_songs" => $playlist->songs, "t_url" => $playlist->url, "USER_DATA" => userData($playlist->user_id), "t_thumbnail" => GetMedia($playlist->thumbnail), ]); } $data["status"] = 200; $data["html"] = $html; } if ($option == "products_search") { $search_keyword = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : ""; $text = ""; if (!empty($search_keyword)) { $text = " AND (`title` LIKE '%$search_keyword%' OR `desc` LIKE '%$search_keyword%') "; } if (!empty($_REQUEST["params"])) { if ( !empty($_REQUEST["params"]["geners"]) && is_array($_REQUEST["params"]["geners"]) ) { $category = $_REQUEST["params"]["geners"]; $text .= " AND (`cat_id` IN ('" . implode("','", $category) . "')) "; } } if (!empty($_REQUEST["params"])) { if (!empty($_REQUEST["params"]["current_tag"])) { $current_tag = $_REQUEST["params"]["current_tag"]; $text = " AND (`tags` LIKE '%$current_tag%') "; } } if (!empty($_REQUEST["params"])) { if ( !empty($_REQUEST["params"]["price"]) && is_array($_REQUEST["params"]["price"]) ) { $price_from = !empty($_REQUEST["params"]["price"][0]) && is_numeric($_REQUEST["params"]["price"][0]) ? $_REQUEST["params"]["price"][0] : 1; $price_to = !empty($_REQUEST["params"]["price"][1]) && is_numeric($_REQUEST["params"]["price"][1]) ? $_REQUEST["params"]["price"][1] : 10000; $text .= " AND (`price` BETWEEN " . $price_from . " AND " . $price_to . ") "; } } $results = $db->rawQuery( "SELECT * FROM `" . T_PRODUCTS . "` WHERE `id` < " . $id . $text . " ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $value) { $music->product = GetProduct($value->id); if (!empty($music->product)) { $html .= loadPage("store/product_list", [ "id" => $music->product->id, "url" => $music->product->url, "data_load" => $music->product->data_load, "image" => $music->product->images[0]["image"], "title" => $music->product->title, "rating" => $music->product->rating, "f_price" => $music->product->formatted_price, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "orders") { $db->where("id", $id, "<"); $music->orders = $db ->where("product_owner_id", $music->user->id) ->orderBy("id", "DESC") ->groupBy("hash_id") ->get(T_ORDERS, 10); $html = ""; if (!empty($music->orders)) { foreach ($music->orders as $key => $order) { $count = $db ->where("hash_id", $order->hash_id) ->getValue(T_ORDERS, "count(*)"); $items_count = $db ->where("hash_id", $order->hash_id) ->getValue(T_ORDERS, "sum(units)"); $price = $db ->where("hash_id", $order->hash_id) ->getValue(T_ORDERS, "sum(price)"); $status = $db ->where("hash_id", $order->hash_id) ->getValue(T_ORDERS, "status"); $html .= loadPage("orders/list", [ "hash" => $order->hash_id, "ID" => $order->id, "url" => getLink("order/" . $order->hash_id), "count" => $count, "price" => number_format($price), "items_count" => $items_count, "status" => $status, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "events_search") { $search_keyword = !empty($_REQUEST["get_data"]) ? secure($_REQUEST["get_data"]) : ""; $results = $db->rawQuery( "SELECT * FROM `" . T_EVENTS . "` WHERE `id` < " . $id . " AND (`name` LIKE '%" . $search_keyword . "%' OR `desc` LIKE '%" . $search_keyword . "%' ) ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $value) { $event = $music->event = GetEventById($value->id); $music->is_joined = $db ->where("event_id", $event->id) ->where("user_id", $music->user->id) ->getValue(T_EVENTS_JOINED, "COUNT(*)"); $html .= loadPage("events/list", [ "ID" => $event->id, "URL" => $event->url, "DATA_LOAD" => $event->data_load, "NAME" => $event->name, "START_DATE" => $event->start_date, "IMAGE" => $event->image, ]); } $data["status"] = 200; $data["html"] = $html; } if ($option == "events") { $query_text = ""; $results = $db->rawQuery( "SELECT * FROM `" . T_EVENTS . "` WHERE `id` < '" . $id . "' AND `end_date` >= CURDATE() ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $value) { $event = $music->event = GetEventById($value->id); $music->is_joined = 0; if (IS_LOGGED) { $music->is_joined = $db ->where("event_id", $event->id) ->where("user_id", $music->user->id) ->getValue(T_EVENTS_JOINED, "COUNT(*)"); } $html .= loadPage("events/list", [ "ID" => $event->id, "URL" => $event->url, "DATA_LOAD" => $event->data_load, "NAME" => $event->name, "START_DATE" => $event->start_date, "IMAGE" => $event->image, ]); } $data["status"] = 200; $data["html"] = $html; } if ($option == "manage_events") { $results = $db->rawQuery( "SELECT * FROM `" . T_EVENTS . "` WHERE `user_id` = '" . $music->user->id . "' AND `id` < " . $id . " ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $value) { $event = $music->event = GetEventById($value->id); $music->is_joined = $db ->where("event_id", $event->id) ->where("user_id", $music->user->id) ->getValue(T_EVENTS_JOINED, "COUNT(*)"); $html .= loadPage("manage_events/list", [ "ID" => $event->id, "URL" => $event->url, "DATA_LOAD" => $event->data_load, "EDIT_URL" => $event->edit_url, "EDIT_DATA_LOAD" => $event->edit_data_load, "NAME" => $event->name, "START_DATE" => $event->start_date, "IMAGE" => $event->image, ]); } $data["status"] = 200; $data["html"] = $html; } if ($option == "joined_events") { $results = $db->rawQuery( "SELECT * FROM `" . T_EVENTS_JOINED . "` WHERE `event_id` < " . $id . " AND `user_id` = '" . $music->user->id . "' ORDER BY `event_id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $value) { $event = $music->event = GetEventById($value->event_id); $music->is_joined = $db ->where("event_id", $event->id) ->where("user_id", $music->user->id) ->getValue(T_EVENTS_JOINED, "COUNT(*)"); $html .= loadPage("events/list", [ "ID" => $event->id, "URL" => $event->url, "DATA_LOAD" => $event->data_load, "NAME" => $event->name, "START_DATE" => $event->start_date, "IMAGE" => $event->image, ]); } $data["status"] = 200; $data["html"] = $html; } if ($option == "purchased_events") { $results = $db->rawQuery( "SELECT * FROM `" . T_PURCHAES . "` WHERE `id` < " . $id . " ORDER BY `id` DESC LIMIT 10;" ); $html = ""; foreach ($results as $key => $value) { $event = $music->event = GetEventById($value->event_id); $music->is_joined = $db ->where("event_id", $event->id) ->where("user_id", $music->user->id) ->getValue(T_EVENTS_JOINED, "COUNT(*)"); $html .= loadPage("purchased_tickets/list", [ "ID" => $event->id, "URL" => $event->url, "DATA_LOAD" => $event->data_load, "T_ID" => $value->id, "NAME" => $event->name, "START_DATE" => $event->start_date, "IMAGE" => $event->image, ]); } $data["status"] = 200; $data["html"] = $html; } if ($option == "store_albums") { $db->where("id", $id, "<"); if (!empty($user_id)) { $db->where("user_id", secure($_REQUEST["userID"])); } if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $html = ""; $price_from = 0.99; $price_to = 40; $categories = ""; if (isset($_REQUEST["params"])) { if (isset($_REQUEST["params"]["price"])) { if (isset($_REQUEST["params"]["price"][0])) { $price_from = (int) $_REQUEST["params"]["price"][0]; } if (isset($_REQUEST["params"]["price"][1])) { $price_to = (int) $_REQUEST["params"]["price"][1]; } $db->where("price", [$price_from, $price_to], "BETWEEN"); } if ( isset($_REQUEST["params"]["geners"]) && !empty($_REQUEST["params"]["geners"]) ) { $categories = implode(",", $_REQUEST["params"]["geners"]); $db->where("category_id", $_REQUEST["params"]["geners"], "IN"); } $data["price_from"] = $price_from; $data["price_to"] = $price_to; $data["categories"] = $categories; } $db->orderBy("id", "DESC"); $getAlbums = $db->get(T_ALBUMS, 10); if (!empty($getAlbums)) { $records = count($getAlbums); foreach ($getAlbums as $key => $album) { if (!empty($album)) { $publisher = userData($album->user_id); $html .= loadPage("store/albums", [ "id" => $album->id, "album_id" => $album->album_id, "user_id" => $album->user_id, "artist" => $publisher->name, "title" => $album->title, "description" => $album->description, "category_id" => $album->category_id, "thumbnail" => getMedia($album->thumbnail), "time" => $album->time, "registered" => $album->registered, "price" => $album->price, "songs" => number_format_mm( $db ->where("album_id", $album->id) ->getValue(T_SONGS, "count(*)") ), "artist_name" => $publisher->name, ]); } } } $data["status"] = 200; $data["html"] = $html; } if ($option == "reviews") { if ( empty($_GET["product_id"]) || !is_numeric($_GET["product_id"]) || $_GET["product_id"] < 1 ) { exit("product_id missing"); } $music->reviews = $db ->where("product_id", secure($_GET["product_id"])) ->where("id", $id, "<") ->orderBy("id", "DESC") ->get(T_REVIEW, 10); $reviews_html = ""; $one = 0; $two = 0; $three = 0; $four = 0; $five = 0; if (!empty($music->reviews)) { foreach ($music->reviews as $key => $value) { $review_class = "five_star"; $review_stars = "5 ★★★★★"; if ($value->star == 1) { $review_class = "one_star"; $review_stars = "1 ★"; $one += $value->star; } elseif ($value->star == 2) { $review_stars = "2 ★★"; $review_class = "two_star"; $two += $value->star; } elseif ($value->star == 3) { $review_stars = "3 ★★★"; $review_class = "three_star"; $three += $value->star; } elseif ($value->star == 4) { $review_stars = "4 ★★★★"; $review_class = "four_star"; $four += $value->star; } else { $five += $value->star; } $music->review = GetReview($value->id); $reviews_html .= loadPage("product/review", [ "id" => $music->review->id, "avatar" => $music->review->user_data->avatar, "name" => $music->review->user_data->name, "username" => $music->review->user_data->username, "review_stars" => $review_stars, "review_class" => $review_class, "review_class" => $review_class, "desc" => $music->review->review, "time" => time_Elapsed_String($music->review->time), "user_url" => $music->review->user_data->url, ]); } } $data["status"] = 200; $data["html"] = $reviews_html; } if ($option == "manage_products") { $html = ""; $music->products = $db ->where("user_id", $music->user->id) ->where("active", 1) ->where("id", $id, "<") ->orderBy("id", "DESC") ->get(T_PRODUCTS, 10, ["id"]); if (!empty($music->products)) { foreach ($music->products as $key => $value) { $music->product = GetProduct($value->id); $html .= loadPage("manage-products/list", [ "id" => $music->product->id, "url" => $music->product->url, "data_load" => $music->product->data_load, "image" => $music->product->images[0]["image"], "title" => $music->product->title, "rating" => $music->product->rating, "edit_url" => $music->product->edit_url, "edit_data_load" => $music->product->edit_data_load, "f_price" => $music->product->formatted_price, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "products") { $db->where("id", $id, "<"); if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $html = ""; $db->where("price", 0, ">"); $db->where("id", $id, "<"); $price_from = 1; $price_to = 10000; $categories = ""; if (isset($_REQUEST["params"])) { if (isset($_REQUEST["params"]["price"])) { if (isset($_REQUEST["params"]["price"][0])) { $price_from = (int) $_REQUEST["params"]["price"][0]; } if (isset($_REQUEST["params"]["price"][1])) { $price_to = (int) $_REQUEST["params"]["price"][1]; } $db->where("price", [$price_from, $price_to], "BETWEEN"); } if ( isset($_REQUEST["params"]["geners"]) && !empty($_REQUEST["params"]["geners"]) ) { $categories = implode(",", $_REQUEST["params"]["geners"]); $db->where("cat_id", $_REQUEST["params"]["geners"], "IN"); } $data["price_from"] = $price_from; $data["price_to"] = $price_to; $data["categories"] = $categories; } $db->orderBy("id", "DESC"); $products = $db->get(T_PRODUCTS, 10); $html_list = ""; if (!empty($products)) { $records = count($products); $html_list = ""; foreach ($products as $key => $value) { $music->product = GetProduct($value->id); if (!empty($music->product)) { $html_list .= loadPage("store/product_list", [ "id" => $music->product->id, "url" => $music->product->url, "data_load" => $music->product->data_load, "image" => $music->product->images[0]["image"], "title" => $music->product->title, "rating" => $music->product->rating, "f_price" => $music->product->formatted_price, ]); } } } $data["status"] = 200; $data["html"] = $html_list; } if ($option == "store_songs") { $db->where("id", $id, "<"); if (!empty($user_id)) { $db->where("user_id", secure($_REQUEST["userID"])); } if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $html = ""; $db->where("price", 0, ">"); $db->where("album_id", 0); $db->where("id", $id, "<"); $price_from = 0.99; $price_to = 40; $categories = ""; if (isset($_REQUEST["params"])) { if (isset($_REQUEST["params"]["price"])) { if (isset($_REQUEST["params"]["price"][0])) { $price_from = (int) $_REQUEST["params"]["price"][0]; } if (isset($_REQUEST["params"]["price"][1])) { $price_to = (int) $_REQUEST["params"]["price"][1]; } $db->where("price", [$price_from, $price_to], "BETWEEN"); } if ( isset($_REQUEST["params"]["geners"]) && !empty($_REQUEST["params"]["geners"]) ) { $categories = implode(",", $_REQUEST["params"]["geners"]); $db->where("category_id", $_REQUEST["params"]["geners"], "IN"); } $data["price_from"] = $price_from; $data["price_to"] = $price_to; $data["categories"] = $categories; } $db->orderBy("id", "DESC"); $getSongs = $db->get(T_SONGS, 10); if (!empty($getSongs)) { $records = count($getSongs); foreach ($getSongs as $key => $song) { $songData = songData($song, false, false); if (!empty($songData)) { $music->songData = $songData; $html .= loadPage("store/song-list", [ "t_thumbnail" => $songData->thumbnail, "t_id" => $songData->id, "t_title" => $songData->title, "t_artist" => $songData->publisher->name, "t_uartist" => $songData->publisher->username, "t_url" => $songData->url, "t_artist_url" => $songData->publisher->url, "t_price" => $songData->price, "t_audio_id" => $songData->audio_id, "t_duration" => $songData->duration, "t_posted" => $songData->time_formatted, "t_key" => $key + 1, ]); } } } $data["status"] = 200; $data["html"] = $html; } if ($option == "blogs") { $sql = "SELECT * FROM `" . T_BLOG . "` WHERE `id` < " . $id . " "; if ( isset($_REQUEST["params"]["filter_type"]) && !empty($_REQUEST["params"]["filter_type"]) ) { $sql .= " AND `category` = " . Secure($_REQUEST["params"]["filter_type"]); } if ( isset($_REQUEST["params"]["current_tag"]) && !empty($_REQUEST["params"]["current_tag"]) ) { $keyword = Secure($_REQUEST["params"]["current_tag"]); $sql .= ' AND (`title` LIKE \'%' . $keyword . '%\' OR `content` LIKE \'%' . $keyword . '%\' OR `description` LIKE \'%' . $keyword . '%\' OR `tags` LIKE \'%' . $keyword . '%\')'; } $sql .= " ORDER BY `id` DESC LIMIT 10;"; $articles = $db->objectBuilder()->rawQuery($sql); $html = ""; if (!empty($articles)) { $records = count($articles); foreach ($articles as $key => $art) { $articleData = GetArticle($art->id); $html .= loadPage("blogs/article-list", [ "thumbnail" => getMedia($articleData["thumbnail"]), "id" => $articleData["id"], "title" => $articleData["title"], "content" => $articleData["content"], "description" => $articleData["description"], "posted" => $articleData["posted"], "category" => $articleData["category"], "category_text" => lang($articleData["category"]), "view" => $articleData["view"], "shared" => $articleData["shared"], "tags" => $articleData["tags"], "created_at" => time_Elapsed_String($articleData["created_at"]), "key" => $key + 1, ]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "stations") { $db->where("id", $id, "<"); if (!empty($user_id)) { $db->where("user_id", secure($_REQUEST["userID"])); } if (IS_LOGGED) { $db->where( "user_id NOT IN (SELECT user_id FROM blocks WHERE blocked_id = $user->id)" ); } $html = ""; $stationData = $db ->orderBy("id", "DESC") ->where("src", "radio") ->get(T_SONGS, 20); if (!empty($stationData)) { $html = ""; foreach ($stationData as $key => $station) { $station = songData($station->id); $music->station_count++; $html .= loadPage("stations/list", ["STATION_DATA" => $station]); } } $data["status"] = 200; $data["html"] = $html; } if ($option == "fame_page") { $html = ""; if (isset($_GET["views"]) && is_numeric($_GET["views"])) { $views_count = 0; if ( !empty($_GET["views"]) && is_numeric($_GET["views"]) && $_GET["views"] > 0 ) { $views_count = secure($_GET["views"]); } $result = $db->rawQuery( "SELECT v.id,v.track_id , COUNT(*) AS count FROM " . T_VIEWS . " v , " . T_SONGS . " s WHERE s.id = v.track_id AND s.user_id != " . $user_id . " GROUP BY s.user_id HAVING count >= " . $music->config->views_count . " AND count <= " . $views_count . " AND v.id NOT IN (" . implode(",", $_GET["v_ids"]) . ") ORDER BY count DESC LIMIT 20" ); if (!empty($result)) { $html = ""; foreach ($result as $key => $value) { $song = songData($value->track_id); if (!empty($song)) { $data = [ "ARTIST_DATA" => userData($song->user_id), "VIEWS" => $value->count, "VIEWS_FORMAT" => number_format($value->count), "ID" => $value->id, ]; $html .= loadPage("fame/list", $data); } } } } $data["status"] = 200; $data["html"] = $html; }